ImportError: No module named pandas
I am trying to write code in Python to fetch Twitter data, and I am not getting an error for twython. But I am getting an error for Pandas. I have installed Pandas using `pip install pandas`. But I st...
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
I have a project created by Maven integration in Eclipse. All work fine, but in the work space in all JSP files have this: ``` The superclass "javax.servlet.http.HttpServlet" was not found on the Jav...
How to see log files in MySQL?
I've read that Mysql server creates a log file where it keeps a record of all activities - like when and what queries execute. Can anybody tell me where it exists in my system? How can I read it? ...
Math.random() explanation
This is a pretty simple Java (though probably applicable to all programming) question: > `Math.random()` returns a number between zero and one. If I want to return an integer between zero and hundre...
Simple example of threading in C++
Can someone post a simple example of starting two (Object Oriented) threads in C++. I'm looking for actual C++ thread objects that I can extend run methods on (or something similar) as opposed to ca...
- Modified
- 13 Aug at 19:23
Find duplicate records in MySQL
I want to pull out duplicate records in a MySQL Database. This can be done with: ``` SELECT address, count(id) as cnt FROM list GROUP BY address HAVING cnt > 1 ``` Which results in: ``` 100 MAIN ...
- Modified
- 12 May at 18:24
Dealing with multiple Python versions and PIP?
Is there any way to make `pip` play well with multiple versions of Python? For example, I want to use `pip` to explicitly install things to either my site 2.5 installation or my site 2.6 installation....
Error in launching AVD with AMD processor
I have Windows 8.1 pro with an AMD processor. I installed the Android SDK and Eclipse. It works but the problem is that when I Create AVD and launch it shows this error: > emulator: ERROR: x86 emulat...
- Modified
- 31 Mar at 13:2
How to sort a list/tuple of lists/tuples by the element at a given index?
I have some data either in a list of lists or a list of tuples, like this: ``` data = [[1,2,3], [4,5,6], [7,8,9]] data = [(1,2,3), (4,5,6), (7,8,9)] ``` And I want to sort by the 2nd element in the...
Copy Paste Values only( xlPasteValues )
I'm trying to copy entire column in sheetA to Sheet B. sheetA column has values formed with formuls. I'm copying SheetA column values only using . But it is not paste the values to another sheetB. The...
- Modified
- 6 Jul at 02:50
How to open a file using the open with statement
I'm looking at how to do file input and output in Python. I've written the following code to read a list of names (one per line) from a file into another file while checking a name against the names i...
- Modified
- 24 Jan at 14:57
How to completely remove borders from HTML table
My goal is to make an HTML page that is similar to a "photo frame". In other words, I want to make a blank page that is surrounded by 4 pictures. This is my code: ``` <table> <tr> <td cl...
- Modified
- 7 Nov at 22:7
Set size on background image with CSS?
Is it possible to set the size of the background image with CSS? I want to do something like: ``` background: url('bg.gif') top repeat-y; background-size: 490px; ``` But it seems it's totally wron...
- Modified
- 5 May at 12:32
Bootstrap 3 Navbar with Logo
I want to use the Bootstrap 3 default navbar with an image logo instead of text branding. What's the proper way of doing this without causing any issues with different screen sizes? I assume this a co...
- Modified
- 9 May at 20:52
Convert float to String and String to float in Java
How could I convert from float to string or string to float? In my case I need to make the assertion between 2 values string (value that I have got from table) and float value that I have calculated. ...
- Modified
- 19 Apr at 10:29
How to make HTML input tag only accept numerical values?
I need to make sure that a certain `<input>` field only takes numbers as value. The input is not part of a form. Hence it doesn't get submitted, so validating during submission is not an option. I wan...
- Modified
- 6 Jul at 07:30
How to put a border around an Android TextView?
Is it possible to draw a border around an Android `TextView`?
- Modified
- 18 May at 01:19
How to get the list of files in a directory in a shell script?
I'm trying to get the contents of a directory using shell script. My script is: ``` for entry in `ls $search_dir`; do echo $entry done ``` where `$search_dir` is a relative path. However, `$se...
- Modified
- 13 Mar at 06:18
Convert JSON String To C# Object
Trying to convert a JSON string into an object in C#. Using a really simple test case: ``` JavaScriptSerializer json_serializer = new JavaScriptSerializer(); object routes_list = json_serializer.Dese...
How to for each the hashmap?
I have this field: ``` HashMap<String, HashMap> selects = new HashMap<String, HashMap>(); ``` For each `Hash<String, HashMap>` I need to create a `ComboBox`, whose items are the value (which happen...
- Modified
- 12 Jun at 03:46
Validation failed for one or more entities. See 'EntityValidationErrors' property for more details
I am having this error when seeding my database with code first approach. > Validation failed for one or more entities. See 'EntityValidationErrors' property for more details. To be honest I don't k...
- Modified
- 14 Dec at 19:5
Laravel Add a new column to existing table in a migration
I can't figure out how to add a new column to my existing database table using the Laravel framework. I tried to edit the migration file using... ``` <?php public function up() { Schema::create...
- Modified
- 23 Dec at 06:11
Determine if a String is an Integer in Java
I'm trying to determine if a particular item in an Array of strings is an integer or not. I am `.split(" ")`'ing an infix expression in `String` form, and then trying to split the resultant array int...
JavaScript: location.href to open in new window/tab?
I have a JavaScript file from a third party developer. It has a has link which replaces the current page with the target. I want to have this page opened in a new tab. This is what I have so far: ``...
- Modified
- 4 Sep at 15:11
Convert a space delimited string to list
i have a string like this : ``` states = "Alaska Alabama Arkansas American Samoa Arizona California Colorado" ``` and I want to split it into a list like this ``` states = {Alaska, Alabama, Arkans...