Questions

Transpose list of lists

Let's take: ``` l = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] ``` The result I'm looking for is ``` r = [[1, 4, 7], [2, 5, 8], [3, 6, 9]] ``` and not ``` r = [(1, 4, 7), (2, 5, 8), (3, 6, 9)] ```

15 Apr at 16:13

How do you convert an entire directory with ffmpeg?

How do you convert an entire directory/folder with ffmpeg via command line or with a batch script?

8 Sep at 09:48

Not equal <> != operator on NULL

Could someone please explain the following behavior in SQL? ``` SELECT * FROM MyTable WHERE MyColumn != NULL (0 Results) SELECT * FROM MyTable WHERE MyColumn <> NULL (0 Results) SELECT * FROM MyTable...

9 Oct at 12:24

Ignore mapping one property with Automapper

I'm using Automapper and I have the following scenario: Class OrderModel has a property called 'ProductName' that isn't in the database. So when I try to do the mapping with: ``` Mapper.CreateMap<Ord...

How to create a sub array from another array in Java?

How to create a sub-array from another array? Is there a method that takes the indexes from the first array such as: ``` methodName(object array, int start, int end) ``` I don't want to go over mak...

10 Dec at 12:44

Print commit message of a given commit in git

I need a plumbing command to print the commit message of one given commit - nothing more, nothing less.

28 Jul at 20:36

How to restore the permissions of files and directories within git if they have been modified?

I have a git checkout. All the file permissions are different than what git thinks they should be therefore they all show up as modified. Without touching the content of the files (just want to modif...

8 Jan at 16:46

Put icon inside input element in a form

How do I put an icon inside a form's input element? ![Screenshot of a web form with three inputs which have icons in them](https://i.stack.imgur.com/V0Tjp.png) Live version at: [Tidal Force theme](h...

23 Jun at 07:52

How to store arbitrary data for some HTML tags

I'm making a page which has some interaction provided by javascript. Just as an example: links which send an AJAX request to get the content of articles and then display that data in a div. Obviously ...

23 May at 12:26

Setting WPF image source in code

I'm trying to set a WPF image's source in code. The image is embedded as a resource in the project. By looking at examples I've come up with the below code. For some reason it doesn't work - the image...

11 Jan at 07:3

How can I handle the warning of file_get_contents() function in PHP?

I wrote a PHP code like this ``` $site="http://www.google.com"; $content = file_get_content($site); echo $content; ``` But when I remove "http://" from `$site` I get the following warning: > Warni...

Count the items from a IEnumerable<T> without iterating?

``` private IEnumerable<string> Tables { get { yield return "Foo"; yield return "Bar"; } } ``` Let's say I want iterate on those and write something like processing #n of...

22 Feb at 17:23

What's the best way to build a string of delimited items in Java?

While working in a Java app, I recently needed to assemble a comma-delimited list of values to pass to another web service without knowing how many elements there would be in advance. The best I could...

21 Apr at 20:5

What is the purpose of "pip install --user ..."?

From `pip install --help`: ``` --user Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python documentat...

25 Feb at 18:58

"Uncaught TypeError: a.indexOf is not a function" error when opening new foundation project

I've created a new Foundation 5 project through bash, with `foundation new my-project`. When I open the index.html file in Chrome an `Uncaught TypeError: a.indexOf is not a function` error is shown in...

No acceptable C compiler found in $PATH when installing python

I'm trying to install a new Python environment on my shared hosting. I follow the steps written in [this post](https://stackoverflow.com/questions/1534210/use-different-python-version-with-virtualenv)...

26 Sep at 14:9

Postgres - FATAL: database files are incompatible with server

After restarting my MacBook Pro I am unable to start the database server: ``` could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix dom...

29 Jun at 03:35

Populating Spring @Value during Unit Test

I'm trying to write a Unit Test for a simple bean that's used in my program to validate forms. The bean is annotated with `@Component` and has a class variable that is initialized using ``` @Value("...

14 Jan at 15:3

ssh: connect to host github.com port 22: Connection timed out

I am under a proxy and I am pushing in to git successfully for quite a while. Now I am not able to push into git all of a sudden. I have set the RSA key and the proxy and double checked them, with no ...

23 Mar at 17:13

MySQL Cannot Add Foreign Key Constraint

So I'm trying to add Foreign Key constraints to my database as a project requirement and it worked the first time or two on different tables, but I have two tables on which I get an error when trying ...

20 Mar at 21:55

What's the difference between a Future and a Promise?

What's the difference between `Future` and `Promise`? They both act like a placeholder for future results, but where is the main difference?

1 Aug at 11:7

Downloading MySQL dump from command line

I am moving away from Linode because I don't have the Linux sysadmin skills necessary; before I complete the transition to a more noob-friendly service, I need to download the contents of a MySQL data...

How to use `subprocess` command with pipes

I want to use `subprocess.check_output()` with `ps -A | grep 'process_name'`. I tried various solutions but so far nothing worked. Can someone guide me how to do it?

7 Jan at 21:53

Secure random token in Node.js

In [this question](https://stackoverflow.com/questions/8838624/nodejs-send-email-on-registration/8842959#8842959) Erik needs to generate a secure random token in Node.js. There's the method `crypto.ra...

List of zeros in python

How can I create a `list` which contains only zeros? I want to be able to create a zeros `list` for each `int` in `range(10)` For example, if the `int` in the range was `4` I will get: ``` [0,0,0,0]...

15 Dec at 23:50