Questions

How to see the changes between two commits without commits in-between?

How do you make `git diff` only show the difference between two commits, excluding the other commits in-between?

3 Nov at 16:40

Why shouldn't I use PyPy over CPython if PyPy is 6.3 times faster?

I've been hearing a lot about the [PyPy](http://en.wikipedia.org/wiki/PyPy) project. They claim it is 6.3 times faster than the [CPython](http://en.wikipedia.org/wiki/CPython) interpreter on [their si...

30 Sep at 20:14

What is bootstrapping?

I keep seeing "bootstrapping" mentioned in discussions of application development. It seems both widespread and important, but I've yet to come across even a poor explanation of what bootstrapping ac...

10 Aug at 12:16

How should I unit test multithreaded code?

I have thus far avoided the nightmare that is testing multi-threaded code since it just seems like too much of a minefield. I'd like to ask how people have gone about testing code that relies on thre...

21 Dec at 18:22

Convert all strings in a list to integers

How do I convert all strings in a list to integers? ``` ['1', '2', '3'] ⟶ [1, 2, 3] ```

22 Feb at 07:25

Convert Array to Object

What is the best way to convert: ``` ['a','b','c'] ``` to: ``` { 0: 'a', 1: 'b', 2: 'c' } ```

10 Mar at 14:18

How do I "Add Existing Item" an entire directory structure in Visual Studio?

I have a free standing set of files not affiliated with any C# project at all that reside in a complicated nested directory structure. I want to add them in that format to a different directory in an...

12 Dec at 22:19

Rename column SQL Server 2008

I am using SQL Server 2008 and Navicat. I need to rename a column in a table using SQL. ``` ALTER TABLE table_name RENAME COLUMN old_name to new_name; ``` This statement doesn't work.

In C#, should I use string.Empty or String.Empty or "" to intitialize a string?

In C#, I want to initialize a string value with an empty string. How should I do this? What is the right way, and why? ``` string willi = string.Empty; ``` or ``` string willi = String.Empty; ``...

12 Jan at 00:11

Order of items in classes: Fields, Properties, Constructors, Methods

Is there an official C# guideline for the order of items in terms of class structure? Does it go: - - - - - I'm curious if there is a hard and fast rule about the order of items? I'm kind of all o...

What is 'Currying'?

I've seen references to curried functions in several articles and blogs but I can't find a good explanation (or at least one that makes sense!)

How to get distinct values from an array of objects in JavaScript?

Assuming I have the following: ``` var array = [ {"name":"Joe", "age":17}, {"name":"Bob", "age":17}, {"name":"Carl", "age": 35} ] ``` What is the best way to be abl...

Vertically align text within a div

The code below (also available as [a demo on JS Fiddle](http://jsfiddle.net/9Y7Cm/3/)) does not position the text in the middle, as I ideally would like it to. I cannot find any way to vertically cent...

26 Jun at 09:16

Pull request vs Merge request

What is the difference between a Pull request and a Merge request? In GitHub, it's a Pull Request while in GitLab, for example, it's a Merge Request. So, is there a difference between both of these?

14 Aug at 17:45

How to convert existing non-empty directory into a Git working directory and push files to a remote repository

1. I have a non-empty directory (eg /etc/something) with files that cannot be renamed, moved, or deleted. 2. I want to check this directory into git in place. 3. I want to be able to push the state o...

10 Sep at 06:46

How to use double or single brackets, parentheses, curly braces

I am confused by the usage of brackets, parentheses, curly braces in Bash, as well as the difference between their double or single forms. Is there a clear explanation?

25 May at 18:24

SQL update query using joins

I have to update a field with a value which is returned by a join of 3 tables. Example: ``` select im.itemid ,im.sku as iSku ,gm.SKU as GSKU ,mm.ManufacturerId as ManuId ,mm.Man...

Include another HTML file in a HTML file

I have 2 HTML files, suppose `a.html` and `b.html`. In `a.html` I want to include `b.html`. In JSF I can do it like that: ``` <ui:include src="b.xhtml" /> ``` It means that inside `a.xhtml` file, ...

15 Jun at 21:33

Adding a favicon to a static HTML page

I have a few static pages that are just pure HTML, that we display when the server goes down. How can I put a favicon that I made (it's 16x16px and it's sitting in the same directory as the HTML file;...

29 Aug at 08:1

How do I compare two string variables in an 'if' statement in Bash?

I'm trying to get an `if` statement to work in [Bash](http://en.wikipedia.org/wiki/Bash_%28Unix_shell%29) (using [Ubuntu](http://en.wikipedia.org/wiki/Ubuntu_%28operating_system%29)): ``` #!/bin/bash...

17 Jan at 15:4

How to get parameter value from query string?

How can I define a route in my routes.jsx file to capture the `__firebase_request_key` parameter value from a URL generated by Twitter's single sign on process after the redirect from their servers? ...

27 Nov at 20:31

Are 'Arrow Functions' and 'Functions' equivalent / interchangeable?

Arrow functions in ES2015 provide a more concise syntax. - - Examples: Constructor function ``` function User(name) { this.name = name; } // vs const User = name => { this.name = name; }; ...

Setting Authorization Header of HttpClient

I have an HttpClient that I am using for a REST API. However I am having trouble setting up the Authorization header. I need to set the header to the token I received from doing my OAuth request. I sa...

4 Jun at 18:31

What is the difference between @Inject and @Autowired in Spring Framework? Which one to use under what condition?

I am going through some blogs on SpringSource and in one of the blogs, author is using `@Inject` and I suppose he can also use `@Autowired`. Here is the piece of code: `@Inject private CustomerOrder...

How do I send a POST request with PHP?

Actually I want to read the contents that come after the search query, when it is done. The problem is that the URL only accepts `POST` methods, and it does not take any action with `GET` method... I...

22 Sep at 17:53