Questions

Can anyone explain what JSONP is, in layman terms?

I know `JSONP` is `JSON` with padding. I understand what JSON is, and how to use it with [jQuery.getJSON()](http://api.jquery.com/jQuery.getJSON). However, I do not understand the concept of the `ca...

1 May at 06:8

Why should I use core.autocrlf=true in Git?

I have a Git repository that is accessed from both Windows and OS X, and that I know already contains some files with CRLF line-endings. As far as I can tell, there are two ways to deal with this: 1...

23 May at 12:10

How to remove files and directories quickly via terminal (bash shell)

From a terminal window: When I use the `rm` command it can only remove files. When I use the `rmdir` command it only removes empty folders. If I have a directory nested with files and folders within ...

8 Nov at 02:27

Select element based on multiple classes

I have a style rule I want to apply to a tag when it has classes. Is there any way to perform this without JavaScript? In other words: ``` <li class="left ui-class-selector"> ``` I want to apply my ...

7 Jan at 09:12

Iterating over all the keys of a map

Is there a way to get a list of all the keys in a Go language map? The number of elements is given by `len()`, but if I have a map like: ``` m := map[string]string{ "key1":"val1", "key2":"val2" }; `...

19 Jul at 23:5

How to set a value for a span using jQuery

How to set a value for a `<span>` tag using jQuery… For example… Below is my `<span>` tag: ``` <span id="submittername"></span> ``` In my jQuery code: ``` jQuery.noConflict(); jQuery(document).r...

24 Feb at 22:44

urllib and "SSL: CERTIFICATE_VERIFY_FAILED" Error

I am getting the following error: ``` Exception in thread Thread-3: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, i...

Does swift have a trim method on String?

Does swift have a trim method on String? For example: ``` let result = " abc ".trim() // result == "abc" ```

17 Nov at 18:57

How to convert a selection to lowercase or uppercase in Sublime Text

I have several strings selected in a file in Sublime Text and I want to convert them all to lowercase. How can I convert them all to lowercase in Sublime Text?

17 Oct at 20:43

How to get the primary IP address of the local machine on Linux and OS X?

I am looking for a command line solution that would return me the primary (first) IP address of the localhost, other than 127.0.0.1 The solution should work at least for Linux (Debian and RedHat) and...

11 Aug at 15:7

AngularJS : How to watch service variables?

I have a service, say: ``` factory('aService', ['$rootScope', '$resource', function ($rootScope, $resource) { var service = { foo: [] }; return service; }]); ``` And I would like to use ...

29 Sep at 12:1

How can you debug a CORS request with cURL?

How can you debug [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) requests using [cURL](https://en.wikipedia.org/wiki/CURL)? So far I couldn't find a way to "simulate" the prefligh...

2 Oct at 16:48

How can you sort an array without mutating the original array?

Let's suppose I wanted a sort function that returns a sorted copy of the inputted array. I naively tried this ``` function sort(arr) { return arr.sort(); } ``` and I tested it with this, which show...

11 Feb at 15:38

How do I initialize an empty array in C#?

Is it possible to create an empty array without specifying the size? For example, I created: ``` String[] a = new String[5]; ``` Can we create the above string array without the size?

7 May at 14:7

How do I verify/check/test/validate my SSH passphrase?

I think I forgot the passphrase for my SSH key, but I have a hunch what it might be. How do I check if I'm right?

28 Apr at 23:24

What are Makefile.am and Makefile.in?

These two files are mostly seen in open source projects. What are they for, and how do they work?

10 Nov at 11:58

Joining two lists together

If I have two lists of type string (or any other type), what is a quick way of joining the two lists? The order should stay the same. Duplicates should be removed (though every item in both links are...

22 Nov at 03:10

How to get last items of a list in Python?

I need the last 9 numbers of a list and I'm sure there is a way to do it with slicing, but I can't seem to get it. I can get the first 9 like this: ``` num_list[0:9] ```

23 Nov at 11:59

What is the best workaround for the WCF client `using` block issue?

I like instantiating my WCF service clients within a `using` block as it's pretty much the standard way to use resources that implement `IDisposable`: ``` using (var client = new SomeWCFServiceClient(...

17 Dec at 15:23

SQL to find the number of distinct values in a column

I can select all the distinct values in a column in the following ways: - `SELECT DISTINCT column_name FROM table_name;`- `SELECT column_name FROM table_name GROUP BY column_name;` But how do I get ...

5 Apr at 21:38

How to identify unused CSS definitions from multiple CSS files in a project

A bunch of CSS files were pulled in and now I'm trying to clean things up a bit. How can I efficiently identify unused CSS definitions in a whole project?

How do you force Visual Studio to regenerate the .designer files for aspx/ascx files?

Sometimes when I'm editing page or control the .designer files stop being updated with the new controls I'm putting on the page. I'm not sure what's causing this to happen, but I'm wondering if there...

Template not provided using create-react-app

When I type the `create-react-app my-app` command in my terminal, it appears to work - downloading all libraries successfully etc. At the end of that process however I get a message that a `template w...

5 Dec at 05:12

What is mapDispatchToProps?

I was reading the documentation for the Redux library and it has this example: > In addition to reading the state, container components can dispatch actions. In a similar fashion, you can define a fun...

What is the difference between asynchronous programming and multithreading?

I thought that they were basically the same thing — writing programs that split tasks between processors (on machines that have 2+ processors). Then I'm reading [this](https://msdn.microsoft.com/en-us...