Questions

How to list branches that contain a given commit?

How can I query git to find out which branches contain a given commit? `gitk` will usually list the branches, unless there are too many, in which case it just says "many (38)" or something like that. ...

30 Oct at 08:46

jQuery Date Picker - disable past dates

I am trying to have a date Range select using the UI date picker. in the from/to field people should not be able to view or select dates previous to the present day. This is my code: ``` $(function...

Staging Deleted files

Say I have a file in my git repository called `foo`. Suppose it has been deleted with `rm` (not `git rm`). Then git status will show: ``` Changes not staged for commit: deleted: foo ``` How do ...

10 Feb at 09:40

Unknown Column In Where Clause

I have a simple query: ``` SELECT u_name AS user_name FROM users WHERE user_name = "john"; ``` I get `Unknown Column 'user_name' in where clause`. Can I not refer to `'user_name'` in other parts o...

25 Jul at 14:14

How to generate a range of numbers between two numbers?

I have two numbers as input from the user, like for example `1000` and `1050`. How do I generate the numbers between these two numbers, using a sql query, in seperate rows? I want this: ``` 1000 1...

15 Sep at 20:44

How do I create and read a value from cookie with javascript?

How can I create and read a value from a cookie in JavaScript?

7 Jul at 04:49

Javascript array search and remove string?

I have: ``` var array = new Array(); array.push("A"); array.push("B"); array.push("C"); ``` I want to be able to do something like: `array.remove("B");` but there is no remove function. How do I ...

20 Mar at 18:48

Display number always with 2 decimal places in <input>

I have a float value for the ng-model that I would like to always display with 2 decimal places in the `<input>`: ``` <input ng-model="myNumb" step ="0.01" type="number"> ``` This works for most c...

1 Apr at 22:4

Is putting a div inside an anchor ever correct?

I've heard that putting a block element inside a inline element is a HTML sin: ``` <a href="http://example.com"> <div> What we have here is a problem. You see, an anchor element i...

13 Jun at 19:46

git add remote branch

I want to add a remote, and a branch of that remote. I did `git remote add <newname> <url>`, then I did `git fetch --all` but `git branch -a` is not showing any branch of the remote. My .git/config i...

29 Jun at 17:43

Ping all addresses in network, windows

Is it possible in windows cmd line to check all of the network addresses (with ping or similar) to see which ones are taken/ have active devices: ie. something that does something like the following:...

4 Dec at 22:44

How should I read a file line-by-line in Python?

In pre-historic times (Python 1.4) we did: ``` fp = open('filename.txt') while 1: line = fp.readline() if not line: break print(line) ``` after Python 2.1, we did: ``` for line in...

29 Aug at 13:23

How to skip iterations in a loop?

I have a loop going, but there is the possibility for exceptions to be raised inside the loop. This of course would stop my program all together. To prevent that I catch the exceptions and handle them...

22 Oct at 14:32

Use a loop to plot n charts Python

I have a set of data that I load into python using a pandas dataframe. What I would like to do is create a loop that will print a plot for all the elements in their own frame, not all on one. My data ...

4 Oct at 19:53

How do I output an ISO 8601 formatted string in JavaScript?

I have a `Date` object. `title` ``` <abbr title="2010-04-02T14:12:07">A couple days ago</abbr> ``` I've tried the following: ``` function isoDate(msSinceEpoch) { var d = new Date(msSinceEpoc...

25 Mar at 19:26

jQuery Set Cursor Position in Text Area

How do you set the cursor position in a text field using jQuery? I've got a text field with content, and I want the users cursor to be positioned at a certain offset when they focus on the field. Th...

20 Mar at 13:5

Get second child using jQuery

``` $(t).html() ``` returns ``` <td>test1</td><td>test2</td> ``` I want to retrieve the second `td` from the `$(t)` object. I searched for a solution but nothing worked for me. Any idea how to g...

22 Jan at 09:32

How to set relative path to current folder?

Lets say I am currently at: `http://example.com/folder/page.html` Is it possible to create a relative link on this page that points to `http://example.com/folder/` without specifying `folder` anywher...

8 Apr at 17:29

The simplest way to resize an UIImage?

In my iPhone app, I take a picture with the camera, then I want to resize it to 290*390 pixels. I was using this method to resize the image : ``` UIImage *newImage = [image _imageScaledToSize:CGSiz...

5 Aug at 20:9

How can I initialize a String array with length 0 in Java?

The Java Docs for the method `String[] java.io.File.list(FilenameFilter filter)` includes this in the returns description: > The array will be empty if the directory is empty or if no names were acce...

3 Nov at 08:11

How to set upload_max_filesize in .htaccess?

I have try to put these 2 lines ``` php_value post_max_size 30M php_value upload_max_filesize 30M ``` In my root `.htaccess` file but that brings me "internal server error" message. php5 is running o...

3 Jun at 05:27

How can you create pop up messages in a batch script?

I need to know how to make popup messages in batch scripts using VBScript or KiXtart or any other external scripting/programming language. I have zero clue about this... had no starting point even. I...

18 Sep at 14:59

Triggering change detection manually in Angular

I'm writing an Angular component that has a property `Mode(): string`. I would like to be able to set this property programmatically not in response to any event. The problem is that in the absence ...

24 Mar at 14:59

How to completely uninstall Android Studio from windows(v10)?

I have already seen [this](https://stackoverflow.com/questions/17625622/how-to-completely-uninstall-android-studio?noredirect=1&lq=1) question. But that's for Mac OS. I am using windows. Every time I ...

23 May at 12:10

How to delete the last row of data of a pandas dataframe

I think this should be simple, but I tried a few ideas and none of them worked: ``` last_row = len(DF) DF = DF.drop(DF.index[last_row]) #<-- fail! ``` I tried using negative indices but that also ...

14 Feb at 05:28