Questions

What is the LD_PRELOAD trick?

I came across a reference to it recently on [proggit](http://www.reddit.com/r/programming/comments/7o8d9/tcmalloca_faster_malloc_than_glibcs_open_sourced/c06wjka) and (as of now) it is not explained. ...

23 May at 11:54

What's the difference between Invoke() and BeginInvoke()

Just wondering what the difference between `BeginInvoke()` and `Invoke()` are? Mainly what each one would be used for. EDIT: What is the difference between creating a threading object and calling i...

Missing XML comment for publicly visible type or member

I am getting this warning: "Missing XML comment for publicly visible type or member". How to solve this?

20 Aug at 11:5

How to use GROUP BY to concatenate strings in MySQL?

Basically the question is how to get from this: to this:

How do you launch the JavaScript debugger in Google Chrome?

When using Google Chrome, I want to debug some JavaScript code. How can I do that?

SQL Server Escape an Underscore

How do I escape the underscore character? I am writing something like the following where clause and want to be able to find actual entries with _d at the end. ``` Where Username Like '%_d' ```

6 Jul at 21:5

How to convert an Object {} to an Array [] of key-value pairs in JavaScript

I want to convert an object like this: ``` {"1":5,"2":7,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0} ``` into an array of key-value pairs like this: ``` [[1,5],[2,7],[3,0],[4,0]...

29 Oct at 18:8

Angular - Use pipes in services and components

In AngularJS, I am able to use filters (pipes) inside of services and controllers using syntax similar to this: ``` $filter('date')(myDate, 'yyyy-MM-dd'); ``` Is it possible to use pipes in service...

20 Dec at 09:11

React - uncaught TypeError: Cannot read property 'setState' of undefined

I am getting the following error > Uncaught TypeError: Cannot read property 'setState' of undefined even after binding delta in the constructor. ``` class Counter extends React.Component { cons...

20 Jan at 17:11

How can I update state.item[1] in state using setState?

I'm creating an app where the user can design his own form. E.g. specify name of the field and details of which other columns that should be included. The component is available as a [JSFiddle](http:/...

13 Dec at 14:21

One DbContext per web request... why?

I have been reading a lot of articles explaining how to set up Entity Framework's `DbContext` so that only one is created and used per HTTP web request using various DI frameworks. Why is this a good...

Download a file from NodeJS Server using Express

How can I download a file that is in my server to my machine accessing a page in a nodeJS server? I'm using the ExpressJS and I've been trying this: ``` app.get('/download', function(req, res){ v...

What is the cleanest way to ssh and run multiple commands in Bash?

I already have an ssh agent set up, and I can run commands on an external server in Bash script doing stuff like: ``` ssh blah_server "ls; pwd;" ``` Now, what I'd really like to do is run a lot of lo...

20 Jun at 09:12

Sum a list of numbers in Python

Given a list of numbers such as: ``` [1, 2, 3, 4, 5, ...] ``` How do I calculate their total sum: ``` 1 + 2 + 3 + 4 + 5 + ... ``` How do I calculate their pairwise averages: ``` [(1+2)/2, (2+3)/2, (...

15 Aug at 06:35

Text inset for UITextField?

I would like to inset the of a `UITextField`. Is this possible?

4 Dec at 06:3

How to set java_home on Windows 7?

I went to the Environment Variables in 'System' in the control panel and made two new variables, one for user variables and one for system variables. Both were named JAVA_HOME and both pointing to > ...

How to send HTTP request in Java?

In Java, How to compose an HTTP request message and send it to an HTTP web server?

26 Nov at 14:40

Saving image from PHP URL

I need to save an image from a PHP URL to my PC. Let's say I have a page, `http://example.com/image.php`, holding a single "flower" image, nothing else. How can I save this image from the URL with a n...

12 Aug at 06:30

Copy/duplicate database without using mysqldump

Without local access to the server, is there any way to duplicate/clone a MySQL db (with content and without content) into another without using `mysqldump`? I am currently using MySQL 4.0.

21 Dec at 06:40

Can an AWS Lambda function call another

I have 2 Lambda functions - one that produces a quote and one that turns a quote into an order. I'd like the Order lambda function to call the Quote function to regenerate the quote, rather than just ...

Convert Django Model object to dict with all of the fields intact

How does one convert a django Model object to a dict with of its fields? All ideally includes foreign keys and fields with editable=False. Let me elaborate. Let's say I have a django model like the...

Difference between := and = operators in Go

What is the difference between the `=` and `:=` operators, and what are the use cases for them? They both seem to be for an assignment?

5 May at 12:13

What exactly does the "u" do? "git push -u origin master" vs "git push origin master"

I'm apparently terrible at using git, despite my best attempts to understand it. From [kernel.org](http://www.kernel.org/pub/software/scm/git/docs/git-push.html) for `git push`: > -u--set-upstreamF...

18 Apr at 01:55

How to test if string exists in file with Bash?

I have a file that contains directory names: `my_list.txt` : ``` /tmp /var/tmp ``` I'd like to check in Bash before I'll add a directory name if that name already exists in the file.

10 Apr at 20:52

Change application's starting activity

I have created the meat and guts of my application but I want to add a different activity that will be the starting point (sort of a log-in screen). Couple questions: - 1 I have a fairly decent hand...

7 May at 21:31