Questions

How to install gem from GitHub source?

I would like to install gem from the latest GitHub source. How do I do this?

6 Jul at 10:18

Where Is Machine.Config?

I want to apply a change so That I can use Server GC settings for my C# 3.5 app - I can do that by editing the `machine.config` file. The only problem is I do not know where that is. How can I find ...

18 Mar at 10:51

Are HTTP cookies port specific?

I have two HTTP services running on one machine. I just want to know if they share their cookies or whether the browser distinguishes between the two server sockets.

23 Oct at 08:55

Timeout on a function call

I'm calling a function in Python which I know may stall and force me to restart the script. How do I call the function or what do I wrap it in so that if it takes longer than 5 seconds the script ca...

What is the difference between IQueryable<T> and IEnumerable<T>?

What is the difference between `IQueryable<T>` and `IEnumerable<T>`? --- See also [What's the difference between IQueryable and IEnumerable](https://stackoverflow.com/questions/2433306/whats-the-...

How do I tokenize a string in C++?

Java has a convenient split method: ``` String str = "The quick brown fox"; String[] results = str.split(" "); ``` Is there an easy way to do this in C++?

4 Apr at 18:4

Cannot install packages inside docker Ubuntu image

I installed Ubuntu 14.04 image on docker. After that, when I try to install packages inside the ubuntu image, I'm getting unable to locate package error: ``` apt-get install curl Reading package li...

2 Jul at 15:45

React "after render" code?

I have an app where I need to set the height of an element (lets say "app-content") dynamically. It takes the height of the "chrome" of the app and subtracts it and then sets the height of the "app-co...

24 Oct at 21:41

How can I Install a Python module within code?

I need to install a package from [PyPI](https://en.wikipedia.org/wiki/Python_Package_Index) straight within my script. Is there maybe some module or `distutils` (`distribute`, `pip`, etc.) feature whi...

23 Feb at 05:30

If strings are immutable in .NET, then why does Substring take O(n) time?

Given that strings are immutable in .NET, I'm wondering why they have been designed such that `string.Substring()` takes O(`substring.Length`) time, instead of `O(1)`? i.e. what were the tradeoffs, i...

Remove all unused resources from an android project

I want to remove all unused layouts, strings, drawables, colors, etc from my Android res directory. Are there any tools that will give me a list of files and I can remove from my repository and elemen...

6 Feb at 16:14

How to list all tags along with the full message in git?

I want git to list all tags along with the full annotation or commit message. Something like this is close: ``` git tag -n5 ``` This does exactly what I want except that it will only show up to the...

27 Feb at 04:15

C# getting the path of %AppData%

C# 2008 SP1 I am using the code below: ``` dt.ReadXml("%AppData%\\DateLinks.xml"); ``` However, I am getting an exception that points to the location of where my application is running from: > Co...

3 Feb at 17:16

How to add percent sign to NSString

I want to have a percentage sign in my string after a digit. Something like this: 75%. How can I have this done? I tried: ``` [NSString stringWithFormat:@"%d\%", someDigit]; ``` But it didn't work...

22 Apr at 19:55

Adding a parameter to the URL with JavaScript

In a web application that makes use of AJAX calls, I need to submit a request but add a parameter to the end of the URL, for example: Original URL: > [http://server/myapp.php?id=10](http://server/m...

What does the 'static' keyword do in a class?

To be specific, I was trying this code: ``` package hello; public class Hello { Clock clock = new Clock(); public static void main(String args[]) { clock.sayTime(); } } ``` B...

How can I check MySQL engine type for a specific table?

My MySQL database contains several tables using different storage engines (specifically myisam and innodb). How can I find out which tables are using which engine?

13 Jul at 19:39

Why doesn't Java offer operator overloading?

Coming from C++ to Java, the obvious unanswered question is why didn't Java include operator overloading? Isn't `Complex a, b, c; a = b + c;` much simpler than `Complex a, b, c; a = b.add(c);`? Is t...

7 Mar at 23:42

How to safely call an async method in C# without await

I have an `async` method which returns no data: ``` public async Task MyAsyncMethod() { // do some stuff async, don't return any data } ``` I'm calling this from another method which returns some...

How to convert String to long in Java?

I got a simple question in Java: How can I convert a `String` that was obtained by `Long.toString()` to `long`?

19 Mar at 08:44

PHP multidimensional array search by value

I have an array where I want to search the `uid` and get the key of the array. ## Examples Assume we have the following 2-dimensional array: ``` $userdb = array( array( 'uid' => '100...

22 May at 07:56

node.js hash string?

I have a string that I want to hash. What's the easiest way to generate the hash in node.js? The hash is for versioning, not security.

21 Feb at 17:50

Where does the .gitignore file belong?

Does the .gitignore file belong in the .git folder structure somewhere or in the main source files?

20 May at 16:41

What is href="#" and why is it used?

On many websites I see links that have `href="#"`. What does it mean? What is it used for?

8 Sep at 13:30

How do you disable viewport zooming on Mobile Safari?

I've tried all three of these to no avail: ``` <meta name=”viewport” content=”width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;” /> <meta name=”viewport” content=”width=devi...