0
votes
0answers
2 views

Error about using Auto Mapper

I use Auto Mapper in my project. when i SaveChanges, there is a error occuring: Multiplicity constraint violated. The role 'ShoppingCart_Student_Target' of the relationship ...
0
votes
0answers
3 views

C++ How to protect oneself from stdio.h macros

I spent a long time trying to figure out why the following wouldn't compile: enum IPC_RC {OK, EOF, ERROR, NEW }; The error message said only something to the effect that it wasn't expecting to see ...
0
votes
0answers
5 views

What am I doing wrong here? PHP PDO

$result = $db->query("SELECT 1 FROM mxscript_slayer_licensekeys WHERE `username` = '$user'"); $result1 = $db->query("SELECT 1 FROM mxscript_slayer_licensekeys WHERE `hardwareID` = '$id'"); if ...
0
votes
0answers
2 views

jvectormap region label click event ignored on touch devices

The mouse over label for a region remains on screen for mobile devices as it should. My issue is that the label is so large on smaller devices that it consumes the region and makes it near impossible ...
0
votes
0answers
4 views

How to show Images from a video as preview for playlist

You guys Have seen Youtube right. There while you are watching a video, You will also get related videos preview alongwith link. So how we can get it from video itself.. Is it possible to do so.. I am ...
0
votes
0answers
3 views

Inserting Javascript (or text) inside a form

I need to trigger some javascript to load up an extra part of a form in activeadmin. For the "create" action I've successfully triggered the javascript from the onchange event of a dropdown box, but ...
0
votes
0answers
6 views

C#: Tasks, Unhandled Exceptions, and Joining Strings

all! When working with C#, I was asked this question, to which I have no definite answer: "You're working with Tasks in C#. Task 1 fails under heavy network traffic. How can you call a second task ...
0
votes
0answers
4 views

Basic Google Guice injection. Playframework 2.1

In my Playframework application, I have a service called UserService which looks like this: public class UserService { // Note it doesn't implement an interface private UserDao userDao; ...
0
votes
0answers
2 views

Drawing a graph with some properties displayed with Boost Graph Library

everyone. I have been using Boost Graph Library but it's quite difficult to me. Recently, I have tried to draw the following graph (I used .dot file to display coz I don;t have enough reputation to ...
0
votes
1answer
11 views

How do i protect $.ajax datatype:json Post parameters

I am using the parameters for updating via Web service method. Please see the post below. Post: http://myweb.com:8241/web/Dashboard.aspx/BindDatatable Host: localhost:8241 User-Agent: Mozilla/5.0 ...
-1
votes
1answer
7 views

How to create a reusable code into function in jquery?

I'm trying to reuse a code as below: function new1(){ $(combobox).val(); } function new2(){ $(combobox).val(); } How can i add $(combobox).val() to both function without repeat it ?
0
votes
0answers
7 views

Abstract Error in Java

I'm new to Java and I'm running into a compile error I cannot figure out. Chapter5Debug is not abstract and does not override abstract method itemStateChanged(java.awt.event.ItemEvent) in ...
0
votes
0answers
15 views

Initializing/using multiple object of a class

I'm newbie to C++. I'm trying to create a game using it. Basically, my game has multiple levels, each having a different number of monsters. I have a class represeting the monster. My question is, how ...
0
votes
0answers
4 views

Drupal site webpages getting 500 in google

I am working on a site that is having issues when google tries to crawl over it. (I just inherited this site.) Google is returning a 500 error that it can not find the page. I have done some debug but ...
0
votes
0answers
3 views

ColdFusion: how to check 15 days past the submitted date?

I saved several accounts in the database. I want to email the accountsdd that have been expired for 15 days. In another word, if the submitted day (date format: mm-dd-yyyy) is 15 days older from ...
0
votes
0answers
2 views

Aptana Studio 3 terminal strange indentation characters in Windows

I am using Aptana Studio 3 on Windows 7 to develop in Ruby. However when I try to use the built-in terminal to run commands such as rspec or git, I get strange characters instead of indentation. In ...
0
votes
0answers
4 views

Resolving a UnicodeDecodeError when saving a model with a FileField in Django

I'm running Django 1.5 with Python 3.3 and here's the code I'm having trouble with: from django.db import models from django.core.files import File class Archive(models.Model): attachment = ...
0
votes
0answers
2 views

Liferay Portal CE and EE

Our company is developing e-portal solutions for the government in Vietnam. We are using Liferay Community Edition. We are considering switching to Enterprise Edition. From a programmer's ...
0
votes
0answers
2 views

How to get version number when using Chef to deploy application

I am using Jenkins to build the application in the testing server, after that, jenkins executes a fabric script in which a chef script will be executed in the production server. In the chef script, ...
0
votes
3answers
13 views

Sql with mysql reserved word

I have this following sql code: $sql = "INSERT INTO data (Artist, Name) VALUES ('TF2', 'you're right behind me')"; The code itself looks normal but for some reason mysql doesn't want to allow me to ...
0
votes
0answers
4 views

How to limit current scope of nested form to first item

I'm creating a simple discussion board in Rails. Every new Topic creates also a first Reply that includes the content. This is my current schema. Topic > title:string > user_id: integer ...
0
votes
0answers
5 views

How can I do a live ajax search on page load with black search criteria?

I have this code which does a live ajax search when you begin typing but id like to load all results on page load and have it narrow down the search results when entering a string in the search box. ...
0
votes
0answers
6 views

PyPy Sandbox: Cannot import rpython module

I'm trying to use PyPy to create a server-side sandbox with limited access to my file system. I am working on Ubuntu 12.04 64 bit machine and have been trying to install the full source code for PyPy ...
0
votes
0answers
5 views

Obtain list of strings from column index of pandas dataframe

First off, here is what my .xlsx timeseries data looks like: and here is how I'm reading it: def loaddata(filepaths): t1 = time.clock() for i in range(len(filepaths)): xl = ...
0
votes
1answer
8 views

Unexpected Return (LocalJumpError)

What is the problem with this Ruby 2.0 code? p (1..8).collect{|denom| (1...denom).collect{|num| r = Rational(num, denom) if r > Rational(1, 3) and r < Rational(1, 2) ...
0
votes
1answer
7 views

How to check which Python interpreter is used to run WSGI scripts in apache2?

For example, there're two versions of django (1.1, 1.4) installed on the server, and two versions of python(2.6,2.7) as well. Is there a way to check which version of python/library is being used by ...
0
votes
1answer
10 views

why doesn't my navbar bar extent to 100% despite width 100%

I have created a navbar that i wish to make it 100%. However, despite putting width:100%; It still remain the same. I was hoping that all my 5 choices will be centered and divided evenly like ...
0
votes
0answers
7 views

How to use mode in cmd?

How do you use mode to change the cmd/command promp window size? This Is Lines: Mode 100 This Is Full Window Size: Mode Con: Cols=100 Lines=100
0
votes
0answers
3 views

OpenCV python - cannot make window fullscreen

I've googled around and done put together what others say should work: cv2.namedWindow(winName, cv2.cv.CV_WINDOW_FULLSCREEN) cv2.setWindowProperty("FPV", cv2.WND_PROP_FULLSCREEN, ...
1
vote
2answers
19 views

How to convert a text into double in Android

I used the following way to change the string into double but unfortunately this closes the app. The EditText inputtype is "NumberDecimal" numA = (EditText) findViewById(R.id.numA); numB = (EditText) ...
0
votes
0answers
2 views

Yii validation with file upload failing

I'm having what looks to me some strange behaviour within Yii. I have a simple file upload, that takes a name and the file itself. If I just submit the form with no name or file I can bypass the ...
0
votes
1answer
8 views

Jquery AJAX Deferred not working?

I have the following: var archiveFolders = function (ids) { var options = {// stuff} return $.ajax(options) } archiveFolders(data).then(alert("heyo")); But "heyo" is getting displayed ...
0
votes
0answers
4 views

Android Studio: Default project directory

Whenever I create a new project in Android Studio it wants to put it in a generic default folder at a location something similar to (dependent on OS - Ubuntu here): /home/USER/AndroidStudioProjects/ ...
0
votes
0answers
10 views

Ivar showing null although it's strongly referenced and initialized and allocated

I have class called A with a public ivar called lines of type NSMutableArray. I allocate and initialize the ivar in the init method. On the other hand I have another class called B which has a strong ...
0
votes
0answers
2 views

Play 2.1: unit testing EssentialActions

I want to unit test a controller method that returns an EssentialAction. I pass a FakeRequest to it, and get back a Iteratee[Array[Byte], Result]. It looks like the test helpers contentAsString, ...
0
votes
0answers
9 views

Getting Model data in a JSP into javascript

I'm trying to get data from the Model classes into the javascript. I'm calling the game object from a request.getAttribute in the JSP, and I'm trying to access items in that object within javascript. ...
0
votes
1answer
11 views

how would I turn these functions into a loop?

So I've created an erb block that iterates through a set of images, and then displays div.tagged for each image at the given coordinates. In this particular case the block iterates through 2 images. ...
0
votes
0answers
2 views

Relative file links in pdf files

I'm creating a single pdf file that I'd like to link to other files in the same directory as the pdf. ie. MyFolder | |-main.pdf |-myotherpdf.pdf |-myotherotherpdf.pdf ...
0
votes
2answers
14 views

Is there any way besides __init__ to receive values when constructing a class?

Here is an example: # class.py class MyString: def __init__(self, str): self.str = str def __div__(self, sep): return self.str.split(sep) >>> m = ...
-1
votes
3answers
24 views

Java : Subclass inheritance without all of the Superclass instance variables/methods

A theoretical question : Is it possible to create a subclass B from a superclass A inheriting all of the A's instance variables/methods except a specific instance variable/method from superclass A ?
0
votes
1answer
11 views

SQL Server + comparing output results

I have a bit of difficulty in trying to compare some results, basically (SELECT [DishId] FROM [Package_Set_Dish] WHERE [Package_Set_Id] = COALESCE((SELECT [SetId] FROM [Package_Schedule_Set_Daily] ...
0
votes
1answer
6 views

VS2010 - Zip and upload to FTP

Is it possible to have Visual Studio Zip up certain files and upload them to a ftp server whenever I have a successful build? What would be the best way to go about doing it?
-1
votes
0answers
8 views

How do I store data in a loop in Xcode

I have a loop that gathers data every time. What I want to do is display all the data collected at the end of all loops. How do I store the data in a place that I can add more and more data to until ...
0
votes
0answers
4 views

Entity Framework Unit Test - The function evaluation requires all thread to run

I'm trying to create a simple Unit test on a projet in order to test my connection to my database, but each time i run my test, the DbContext throw me the following error : The function requires all ...
0
votes
0answers
13 views

Purpose of bCancel=true and bCancel=false

I saw some html files that using onclick="bCancel=false" and onclick="bCancel=true". Eg:<html:submit property="save" onclick="bCancel=false">Save</html:submit>. Could someone help to ...
0
votes
0answers
3 views

Batch Script to replace line in an .ini

Please excuse me. I'm a complete noob. I have 1 ini file with only 1 IP address and a version number.in this format: xxx.xxx.xxx.xxx abcde I have 3 total IP's that I need to accommodate. I'm ...
0
votes
0answers
11 views

normalize 2d c array column or row

My question is simple: what is the most efficient way to normalize a 2d double array in c, so that its column (or its row) sum to 1. Below is a simple example to illustrate what I want to do. It's OK ...
0
votes
2answers
10 views

updating table with data from different source

I am trying to do the following: update mytable set fullname = anothersource.firstname ||' '|| anothersource.lastname where userid = anothersource.userid ; I am having errors which I am not ...
0
votes
1answer
6 views

How to call User Type and User ID at Joomla 3 administration backend

I want to show and hide my administration backend according to their user access level and I follow these instruction http://docs.joomla.org/Accessing_the_current_user_object. In one module (which I ...
0
votes
0answers
4 views

Coordinates of box of annotations in matplotlib

How can I get the coordinates of the box displayed in the following plot? fig, ax = subplots() x = ax.annotate('text', xy=(0.5, 0), xytext=(0.0,0.7), ha='center', va='bottom', ...

15 30 50 per page
1 2 3 4 5 108115