Questions

How to do SQL Like % in Linq?

I have a procedure in SQL that I am trying to turn into Linq: ``` SELECT O.Id, O.Name as Organization FROM Organizations O JOIN OrganizationsHierarchy OH ON O.Id=OH.OrganizationsId where OH.Hierarchy...

What are the differences between json and simplejson Python modules?

I have seen many projects using `simplejson` module instead of `json` module from the Standard Library. Also, there are many different `simplejson` modules. Why would use these alternatives, instead o...

19 Nov at 18:0

How to create a temporary directory/folder in Java?

Is there a standard and reliable way of creating a temporary directory inside a Java application? There's [an entry in Java's issue database](http://bugs.java.com/bugdatabase/view_bug.do?bug_id=473541...

JSON datetime between Python and JavaScript

I want to send a datetime.datetime object in serialized form from Python using [JSON](http://en.wikipedia.org/wiki/JSON) and de-serialize in JavaScript using JSON. What is the best way to do this?

13 Dec at 20:34

What requests do browsers' "F5" and "Ctrl + F5" refreshes generate?

Is there a standard for what actions and + trigger in web browsers? I once did experiment in IE6 and Firefox 2.x. The refresh would trigger a HTTP request sent to the server with an `If-Modified-Si...

Python idiom to return first item or None

I'm calling a bunch of methods that return a list. The list may be empty. If the list is non-empty, I want to return the first item; otherwise, I want to return `None`. This code works: ``` def mai...

11 Mar at 01:32

Difference between ref and out parameters in .NET

What is the difference between `ref` and `out` parameters in .NET? What are the situations where one can be more useful than the other? What would be a code snippet where one can be used and another c...

1 Mar at 15:52

How do you detect the host platform from Dart code?

For UI that should differ slightly on and , i.e. on , there must be a way to detect which one the app is running on, but I couldn't find it in the docs. What is it?

26 Dec at 09:27

Unable to load script from assets index.android.bundle on windows

I'm trying to run my first React Native project for first time on my device (Android 4.2.2). And I get: > unable to load script from assets index.android.bundle Commands that I used: 1. cd (proj...

22 Aug at 18:27

How to make inline plots in Jupyter Notebook larger?

I have made my plots inline on my Ipython Notebook with "`%matplotlib inline`." Now, the plot appears. However, it is very small. Is there a way to make it appear larger using either notebook setti...

Command to get time in milliseconds

Is there a shell command in Linux to get the time in milliseconds?

28 Mar at 23:11

Scatter plot with different text at each data point

I am trying to make a scatter plot and annotate data points with different numbers from a list. So, for example, I want to plot `y` vs `x` and annotate with corresponding numbers from `n`. ``` y = [2...

CreateElement with id?

I'm trying to modify this code to also give this div item an ID, however I have not found anything on google, and idName does not work. I read something about , however it seems pretty complicated for...

23 Feb at 23:21

Disabled form inputs do not appear in the request

I have some disabled inputs in a form and I want to send them to a server, but Chrome excludes them from the request. Is there any workaround for this without adding a hidden field? ``` <form acti...

7 Jul at 12:35

Why are C# 4 optional parameters defined on interface not enforced on implementing class?

I noticed that with the optional parameters in C# 4 if you specify an optional parameter on an interface you have to make that parameter optional on any implementing class: ``` public interface MyI...

onClick to get the ID of the clicked button

How do find the id of the button which is being clicked? ``` <button id="1" onClick="reply_click()"></button> <button id="2" onClick="reply_click()"></button> <button id="3" onClick="reply_click()"><...

9 Apr at 09:45

How can I "disable" zoom on a mobile web page?

I am creating a mobile web page that is basically a big form with several text inputs. However (at least on my Android cellphone), every time I click on some input the whole page zooms there, obscuri...

10 Jul at 12:20

.NET 3.5 JIT not working when running the application

The following code gives different output when running the release inside Visual Studio, and running the release outside Visual Studio. I'm using Visual Studio 2008 and targeting .NET 3.5. I've also t...

9 Jan at 09:22

JavaScript hashmap equivalent

As made clear in update 3 on [this answer](https://stackoverflow.com/questions/367440/javascript-associative-array-without-tostring-etc#367454), this notation: ``` var hash = {}; hash[X] ``` does not...

System.currentTimeMillis vs System.nanoTime

## Accuracy Vs. Precision What I would like to know is whether I should use or when updating my object's positions in my game? Their change in movement is directly proportional to the elapsed t...

9 Dec at 02:31

Can you call Directory.GetFiles() with multiple filters?

I am trying to use the `Directory.GetFiles()` method to retrieve a list of files of multiple types, such as `mp3`'s and `jpg`'s. I have tried both of the following with no luck: ``` Directory.GetFil...

15 Jan at 02:45

How to compare different branches in Visual Studio Code

How do I compare two different branches in Visual Studio Code? Is it possible?

18 May at 16:7

Defining array with multiple types in TypeScript

I have an array of the form: `[ 1, "message" ]`. How would I define this in TypeScript?

23 Oct at 20:15

TypeError: Missing 1 required positional argument: 'self'

I have some code like: ``` class Pump: def __init__(self): print("init") def getPumps(self): pass p = Pump.getPumps() print(p) ``` But I get an error like: ``` Traceback...

NodeJS - What does "socket hang up" actually mean?

I'm building a web scraper with Node and Cheerio, and for a certain website I'm getting the following error (it only happens on this one website, no others that I try to scrape. It happens at a diff...

8 Jun at 07:53