What's the best way to parse a JSON response from the requests library?
I'm using the python [requests module](https://requests.readthedocs.io/) to send a RESTful GET to a server, for which I get a response in JSON. The JSON response is basically just a list of lists. Wh...
- Modified
- 24 Mar at 12:31
What does bundle exec rake mean?
What does `bundle exec rake db:migrate` mean? Or just `bundle exec rake <command>` in general? I understand that `bundle` takes care of maintaining things in the Gemfile. I know what the word "exec"...
- Modified
- 24 Dec at 21:59
How can I write to the console in PHP?
Is it possible write a string or log into the console? ## What I mean Just like in JSP, if we print something like `system.out.println("some")`, it will be there at the console, not at a page.
Copy a table from one database to another in Postgres
I am trying to copy an entire table from one database to another in Postgres. Any suggestions?
- Modified
- 11 Oct at 19:44
How to display a Yes/No dialog box on Android?
Yes, I know there's AlertDialog.Builder, but I'm shocked to know how difficult (well, at least not programmer-friendly) to display a dialog in Android. I used to be a .NET developer, and I'm wonderin...
- Modified
- 17 May at 21:24
Android: View.setID(int id) programmatically - how to avoid ID conflicts?
I'm adding TextViews programmatically in a for-loop and add them to an ArrayList. How do I use `TextView.setId(int id)`? What Integer ID do I come up with so it doesn't conflict with other IDs?
- Modified
- 24 Apr at 14:36
Automatic vertical scroll bar in WPF TextBlock?
I have a `TextBlock` in WPF. I write many lines to it, far exceeding its vertical height. I expected a vertical scroll bar to appear automatically when that happens, but it didn't. I tried to look for...
Why avoid increment ("++") and decrement ("--") operators in JavaScript?
One of the [tips for jslint tool](http://www.jslint.com/lint.html) is: > `++``--` The `++` (increment) and `--` (decrement) operators have been known to contribute to bad code by encouraging excessive...
- Modified
- 1 Feb at 03:37
In C#, what happens when you call an extension method on a null object?
Does the method get called with a null value or does it give a null reference exception? ``` MyObject myObject = null; myObject.MyExtensionMethod(); // <-- is this a null reference exception? ``` I...
- Modified
- 11 May at 08:47
Can I automatically increment the file build version when using Visual Studio?
I was just wondering how I could increment the build (and version?) of my files using Visual Studio (2005). If I look up the properties of say `C:\Windows\notepad.exe`, the Version tab gives "File ...
- Modified
- 25 Sep at 21:7
Simple example of threading in C++
Can someone post a simple example of starting two (Object Oriented) threads in C++. I'm looking for actual C++ thread objects that I can extend run methods on (or something similar) as opposed to ca...
- Modified
- 13 Aug at 19:23
Node update a specific package
I want to update my Browser-sync . How can I achieve this? My current version of Browser-sync does not have the Browser-sync GUI :( ``` ├─┬ browser-sync@1.9.2 │ ├── browser-sync-client@1.0.2 ```
- Modified
- 30 Mar at 20:37
Declaring static constants in ES6 classes?
I want to implement constants in a `class`, because that's where it makes sense to locate them in the code. So far, I have been implementing the following workaround with static methods: ``` class M...
- Modified
- 18 Sep at 16:59
Content Security Policy "data" not working for base64 Images in Chrome 28
In this simple example, I'm trying to set a CSP header with the meta http-equiv header. I included a base64 image and I'm trying to make Chrome load the image. I thought the `data` keyword should do ...
- Modified
- 9 Dec at 10:31
NameError: global name 'xrange' is not defined in Python 3
I am getting an error when running a python program: ``` Traceback (most recent call last): File "C:\Program Files (x86)\Wing IDE 101 4.1\src\debug\tserver\_sandbox.py", line 110, in <module> Fil...
- Modified
- 28 Jun at 21:13
How is AngularJS different from jQuery
I only know one js library and that is [jQuery](http://jquery.com/). But my other coders in the group are changing [AngularJS](http://angularjs.org/) as their default library in new project. I don't ...
- Modified
- 6 Sep at 22:59
Equivalent of jQuery .hide() to set visibility: hidden
In jQuery, there are `.hide()` and `.show()` methods which sets the CSS `display: none` setting. Is there an equivalent function which would set the `visibility: hidden` setting? I know I can use ...
- Modified
- 28 Nov at 21:39
jQuery - multiple $(document).ready ...?
Question: If I link in two JavaScript files, both with `$(document).ready` functions, what happens? Does one overwrite the other? Or do both `$(document).ready` get called? For example, ``` <script...
- Modified
- 6 Nov at 17:22
How to set space between listView Items in Android
I tried to use marginBottom on the listView to make space between listView Item, but still the items are attached together. Is it even possible? If yes, is there a specific way to do it? My code is ...
- Modified
- 19 Nov at 15:27
val() doesn't trigger change() in jQuery
I'm trying to trigger the `change` event on a text box when I change its value with a button, but it doesn't work. Check [this fiddle](https://jsfiddle.net/ergec/9z7h2upc/). If you type something in ...
Convert seconds to Hour:Minute:Second
I need to convert seconds to "Hour:Minute:Second". For example: "685" converted to "00:11:25" How can I achieve this?
Is it possible to create a remote repo on GitHub from the CLI without opening browser?
I created a new local Git repository: ``` ~$ mkdir projectname ~$ cd projectname ~$ git init ~$ touch file1 ~$ git add file1 ~$ git commit -m 'first commit' ``` I know it's no big deal to just fir...
- Modified
- 29 May at 05:40
Remove a JSON attribute
if I have a JSON object say: ``` var myObj = {'test' : {'key1' : 'value', 'key2': 'value'}} ``` can I remove 'key1' so it becomes: ``` {'test' : {'key2': 'value'}} ```
- Modified
- 2 Aug at 19:39
What database does Google use?
Is it Oracle or MySQL or something they have built themselves?
- Modified
- 2 Sep at 22:52
What is a "span" and when should I use one?
Recently I've gotten suggestions to use `span<T>`'s in my code, or have seen some answers here on the site which use `span`'s - supposedly some kind of container. But - I can't find anything like that...
- Modified
- 9 Apr at 12:19