Questions

Eclipse HotKey: how to switch between tabs?

How can I switch between opened windows in Eclipse? There is +, but it's asking me which one I want, but I want switch it like tabs in browser or window in operating system (/+) without file-selection...

26 Aug at 18:19

How to force child div to be 100% of parent div's height without specifying parent's height?

I have a site with the following structure: ``` <div id="header"></div> <div id="main"> <div id="navigation"></div> <div id="content"></div> </div> <div id="footer"></div> ``` The navigation ...

3 Jan at 20:20

HTML5 Local storage vs. Session storage

Apart from being non persistent and scoped only to the current window, are there any benefits (performance, data access, etc) to Session Storage over Local Storage?

How do I log a Python error with debug information?

I am printing Python exception messages to a log file with `logging.error`: ``` import logging try: 1/0 except ZeroDivisionError as e: logging.error(e) # ERROR:root:division by zero ``` Is...

23 May at 15:16

How can I create a keystore?

What are the steps to create a keystore for android? I need to use google maps in my app and I don't know what steps I missed. Please provide me with the specific detailed steps (I didn't understand ...

13 Nov at 16:4

How do I get the current username in .NET using C#?

How do I get the current username in .NET using C#?

2 Oct at 15:31

Proper way to initialize a C# dictionary with values

I am creating a dictionary in a C# file with the following code: ``` private readonly Dictionary<string, XlFileFormat> FILE_TYPE_DICT = new Dictionary<string, XlFileFormat> { ...

18 Aug at 10:54

How to state in requirements.txt a direct github source

I've installed a library using the command ``` pip install git+git://github.com/mozilla/elasticutils.git ``` which installs it directly from a Github repository. This works fine and I want to have t...

21 Dec at 18:37

Difference between @Mock and @InjectMocks

What is the difference between `@Mock` and `@InjectMocks` in Mockito framework?

23 Feb at 15:54

How to iterate over the keys and values with ng-repeat in AngularJS?

In my controller, I have data like: `$scope.object = data` Now this data is the dictionary with keys and values from `json`. I can access the attribute with `object.name` in the template. Is there a...

29 Oct at 10:29

Why does python use 'else' after for and while loops?

I understand how this construct works: ``` for i in range(10): print(i) if i == 9: print("Too big - I'm giving up!") break else: print("Completed successfully") ``` But I...

12 Aug at 03:54

What does the Java assert keyword do, and when should it be used?

What are some to understand the key role of assertions?

11 Jul at 08:37

How to use executables from a package installed locally in node_modules?

How do I use a local version of a module in `node.js`. For example, in my app, I installed coffee-script: ``` npm install coffee-script ``` This installs it in `./node_modules` and the coffee comma...

25 Mar at 11:47

What is the difference between char, nchar, varchar, and nvarchar in SQL Server?

What is meant by `nvarchar`? What is the difference between `char`, `nchar`, `varchar`, and `nvarchar` in SQL Server?

27 Jun at 05:43

What is the difference between Amazon SNS and Amazon SQS?

When would I use SNS versus SQS, and why are they always coupled together?

jQuery: Get selected element tag name

Is there an easy way to get a tag name? For example, if I am given `$('a')` into a function, I want to get `'a'`.

How can I break out of multiple loops?

Given the following code (that doesn't work): ``` while True: # Snip: print out current state while True: ok = get_input("Is this ok? (y/n)") if ok.lower() == "y": break 2 # Th...

Authentication versus Authorization

What's the difference in context of web applications? I see the abbreviation "auth" a lot. Does it stand for -entication or -orization? Or is it both?

How do I find files that do not contain a given string pattern?

How do I find out the in the current directory which do contain the word `foo` (using `grep`)?

7 Mar at 13:18

How to check if a number is a power of 2

Today I needed a simple algorithm for checking if a number is a power of 2. The algorithm needs to be: 1. Simple 2. Correct for any ulong value. I came up with this simple algorithm: ``` private bo...

9 Jan at 17:21

Determine a user's timezone

Is there a standard way for a web server to be able to determine a user's timezone within a web page? Perhaps from an HTTP header or part of the `user-agent` string?

How do I prevent Conda from activating the base environment by default?

I recently installed anaconda2 on my Mac. By default Conda is configured to activate the base environment when I open a fresh terminal session. I want access to the Conda commands (i.e. I want the pat...

26 Mar at 04:30

How can I remove the debug banner in Flutter?

I'm using `flutter screenshot` and I expected the screenshot to not have a banner, but it has. Note that I get a `not supported for emulator` message for profile and release mode.

Divide a number by 3 without using *, /, +, -, % operators

How would you divide a number by 3 without using `*`, `/`, `+`, `-`, `%`, operators? The number may be signed or unsigned.

14 Nov at 19:58

Removing multiple classes (jQuery)

Is there any better way to rewrite this: ``` $('element').removeClass('class1').removeClass('class2'); ``` I cannot use `removeClass();` as it would remove ALL classes, which I don't want.

28 Dec at 08:3