Questions

Insert a row to pandas dataframe

I have a dataframe: ``` s1 = pd.Series([5, 6, 7]) s2 = pd.Series([7, 8, 9]) df = pd.DataFrame([list(s1), list(s2)], columns = ["A", "B", "C"]) A B C 0 5 6 7 1 7 8 9 [2 rows x 3 column...

11 Dec at 03:54

.prop() vs .attr()

So [jQuery 1.6](http://api.jquery.com/category/version/1.6/) has the new function [prop()](http://api.jquery.com/prop/). ``` $(selector).click(function(){ //instead of: this.getAttribute('sty...

25 Apr at 18:2

Git: Permission denied (publickey) fatal - Could not read from remote repository. while cloning Git repository

I am unable to clone a Git repository, and getting this error: ``` krishna.soni@KRISHNACHANDRAS /c/Projects $ git clone http://stage.abc.com:10088/pqr http://<url>/<repository> Cloning into '<reposit...

22 Mar at 14:48

How does one remove a Docker image?

I'm running Docker under Vagrant under OS X 10.8.4 (Mountain Lion), and whenever I try to delete a saved image, I get an error: ``` $ docker rmi some-image-id 2013/07/15 hh:mm:ss unexpected JSON inp...

24 Jan at 22:0

C++ Structure Initialization

Is it possible to initialize structs in C++ as indicated below: ``` struct address { int street_no; char *street_name; char *city; char *prov; char *postal_code; }; address temp_a...

9 Aug at 13:51

How to sparsely checkout only one single file from a git repository?

How do I checkout just one file from a git repo?

14 Nov at 17:19

Redirect stdout to a file in Python?

How do I redirect stdout to an arbitrary file in Python? When a long-running Python script (e.g, web application) is started from within the ssh session and backgounded, and the ssh session is closed...

5 Oct at 15:17

JavaScript file upload size validation

Is there any way to check before uploading it using JavaScript?

30 Jul at 21:32

How can I revert a single file to a previous version?

Is there a way to go through different commits on a file. Say I modified a file 5 times and I want to go back to change 2, after I already committed and pushed to a repository. In my understanding t...

25 Feb at 14:46

How to get a list of column names on Sqlite3 database?

I want to migrate my iPhone app to a new database version. Since I don't have some version saved, I need to check if certain column names exist. This [Stackoverflow entry](https://stackoverflow.com/q...

How do you update Xcode on OSX to the latest version?

What is the easiest way to update Xcode on OSX? I see this in the terminal: ``` $ brew install xxxxxxx Warning: Your Xcode (4.3.3) is outdated Please install Xcode 4.6. ``` But when I go to open u...

14 Mar at 18:42

How to apply !important using .css()?

I am having trouble applying a style that is `!important`. I’ve tried: ``` $("#elem").css("width", "100px !important"); ``` This does ; no width style whatsoever is applied. Is there a jQuery-ish w...

11 Apr at 20:25

Error related to only_full_group_by when executing a query in MySql

I have upgraded my system and have installed MySql 5.7.9 with php for a web application I am working on. I have a query that is dynamically created, and when run in older versions of MySQL it works fi...

21 Jul at 22:35

How do you loop in a Windows batch file?

What is the syntax for a FOR loop in a Windows batch file?

4 Dec at 03:50

Loading/Downloading image from URL on Swift

I'd like to load an image from a URL in my application, so I first tried with Objective-C and it worked, however, with Swift, I've a compilation error: > 'imageWithData' is unavailable: use object c...

2 Apr at 17:31

Adding two numbers concatenates them instead of calculating the sum

I am adding two numbers, but I don't get a correct value. For example, doing `1 + 2` returns 12 and not 3 What am I doing wrong in this code? ``` function myFunction() { var y = document.getEleme...

9 Feb at 21:12

Is an entity body allowed for an HTTP DELETE request?

When issuing an HTTP DELETE request, the request URI should completely identify the resource to delete. However, is it allowable to add extra meta-data as part of the entity body of the request?

18 Nov at 18:14

Get an OutputStream into a String

What's the best way to pipe the output from an java.io.OutputStream to a String in Java? Say I have the method: ``` writeToStream(Object o, OutputStream out) ``` Which writes certain data from the...

7 Jun at 15:16

Gitignore not working

My `.gitignore` file isn't working for some reason, and no amount of Googling has been able to fix it. Here is what I have: ``` *.apk *.ap_ *.dex *.class **/bin/ **/gen/ .gradle/ build/ local.propert...

3 Jul at 14:10

How do I get my program to sleep for 50 milliseconds?

How do I get my Python program to sleep for 50 milliseconds?

10 Mar at 19:18

How to convert date to timestamp?

I want to convert date to timestamp, my input is `26-02-2012`. I used ``` new Date(myDate).getTime(); ``` It says NaN.. Can any one tell how to convert this?

24 Sep at 21:35

Set value of hidden field in a form using jQuery's ".val()" doesn't work

I've been trying to set the value of a hidden field in a form using jQuery, but without success. Here is a sample code that explains the problem. If I keep the input type to "text", it works without...

31 Oct at 19:49

SQL Query Where Field DOES NOT Contain $x

I want to find an SQL query to find rows where field1 does not contain $x. How can I do this?

24 Oct at 23:24

How to use Class<T> in Java?

There's a good discussion of Generics and what they really do behind the scenes over at [this question](https://stackoverflow.com/questions/31693/differences-in-generics), so we all know that `Vector<...

23 May at 12:18

How to do INSERT into a table records extracted from another table

I'm trying to write a query that extracts and transforms data from a table and then insert those data into another table. Yes, this is a data warehousing query and I'm doing it in MS Access. So basica...

16 Sep at 16:26