Questions

What is the difference between float and double?

I've read about the difference between double precision and single precision. However, in most cases, `float` and `double` seem to be interchangeable, i.e. using one or the other does not seem to affe...

How do I return to an older version of our code in Subversion?

I'm working on a project with a friend and I want to return to an older version of our code and set it to be the current. How do I do it? I'm using "anksvn" on vs08. I have the version that I want o...

14 Dec at 08:14

Deserialize a List<T> object with Gson?

I want to transfer a list object via Google Gson, but I don't know how to deserialize generic types. What I tried after looking at [this](https://stackoverflow.com/questions/2496494/library-to-encode-...

18 Dec at 17:34

Remove last character of a StringBuilder?

When you have to loop through a collection and make a string of each data separated by a delimiter, you always end up with an extra delimiter at the end, e.g. ``` for (String serverId : serverIds) { ...

10 Jul at 17:32

Protect .NET code from reverse engineering?

Obfuscation is one way, but it can't protect from breaking the piracy protection security of the application. How do I make sure that the application is not tampered with, and how do I make sure that ...

Convert object array to hash map, indexed by an attribute value of the Object

# Use Case The use case is to convert an array of objects into a hash map based on string or function provided to evaluate and use as the key in the hash map and value as an object itself. A common...

1 Oct at 04:51

Is it not possible to stringify an Error using JSON.stringify?

## Reproducing the problem I'm running into an issue when trying to pass error messages around using web sockets. I can replicate the issue I am facing using `JSON.stringify` to cater to a wider a...

How can I create an object based on an interface file definition in TypeScript?

I have defined an interface like this: ``` interface IModal { content: string; form: string; href: string; $form: JQuery; $message: JQuery; $modal: JQuery; $submits: JQuer...

25 Apr at 15:21

The type or namespace name could not be found

I have a `C#` solution with several projects in `Visual Studio 2010`. One is a test project (I'll call it ""), the other is a `Windows Forms Application` project (I'll call it ""). There is also a th...

Defining custom attrs

I need to implement my own attributes like in `com.android.R.attr` Found nothing in official documentation so I need information about how to define these attrs and how to use them from my code.

Dynamically change color to lighter or darker by percentage CSS

We have a big application on the site and we have a few links which are, let's say blue color like the blue links on this site. Now I want to make some other links, but with lighter color. Obviously I...

23 Nov at 15:38

Save bitmap to location

I am working on a function to download an image from a web server, display it on the screen, and if the user wishes to keep the image, save it on the SD card in a certain folder. Is there an easy way ...

13 Mar at 16:32

Is there a simple, elegant way to define singletons?

There seem to be many ways to define [singletons](http://en.wikipedia.org/wiki/Singleton_pattern) in Python. Is there a consensus opinion on Stack Overflow?

7 Feb at 19:44

When to use RabbitMQ over Kafka?

I've been asked to evaluate RabbitMQ instead of Kafka but found it hard to find a situation where a message queue is more suitable than Kafka. Does anyone know use cases where a message queue fits bet...

23 Sep at 00:12

Android Studio - How to Change Android SDK Path

When I open from , the SDK Path displayed is: ``` \android-studio\sdk ``` I want to change this path. How do I do it?

27 Feb at 16:59

Execute the setInterval function without delay the first time

It's there a way to configure the `setInterval` method of javascript to execute the method immediately and then executes with the timer

2 May at 06:21

grep a tab in UNIX

How do I `grep` tab (\t) in files on the Unix platform?

16 Feb at 04:47

Pretty printing XML in Python

What is the best way (or are the various ways) to pretty print XML in Python?

21 Jun at 13:45

Resizing an iframe based on content

I am working on an iGoogle-like application. Content from other applications (on other domains) is shown using iframes. How do I resize the iframes to fit the height of the iframes' content? I've t...

30 Mar at 12:10

How to convert a Kotlin source file to a Java source file

I have a Kotlin source file, but I want to translate it to Java. How can I convert Kotlin to Java source?

23 Apr at 05:36

How do I create test and train samples from one dataframe with pandas?

I have a fairly large dataset in the form of a dataframe and I was wondering how I would be able to split the dataframe into two random samples (80% and 20%) for training and testing. Thanks!

10 Jun at 17:24

Lodash - difference between .extend() / .assign() and .merge()

In the [Lodash](http://www.lodash.com) library, can someone provide a better explanation of [merge](http://lodash.com/docs#merge) and [extend / assign](http://lodash.com/docs#assign). Its a simple ...

21 Mar at 14:21

How do you use the ? : (conditional) operator in JavaScript?

What is the `?:` (question mark and colon operator aka. conditional or "ternary") operator and how can I use it?

27 Jan at 16:15

How to pass a function as a parameter in Java?

In Java, how can one pass a function as an argument of another function?

28 Jan at 15:39

How can I stage and commit all files, including newly added files, using a single command?

How can I stage and commit all files, including newly added files, using a single command?

25 Sep at 20:24