Questions

How to prevent favicon.ico requests?

I don't have a favicon.ico, but my browser always makes a request for it. Is it possible to prevent the browser from making a request for the favicon from my site? Maybe some META-TAG in the HTML head...

29 Aug at 08:1

nvm keeps "forgetting" node in new terminal session

## Upon using a new terminal session in OS X, nvm forgets the node version and defaults to nothing: `$ nvm ls`: ``` .nvm v0.11.12 v0.11.13 ``` I have to keep hitting `nvm use v.0.11.1...

9 Nov at 13:41

How to append text to an existing file in Java?

I need to append text repeatedly to an existing file in Java. How do I do that?

13 Aug at 20:37

How to concatenate a std::string and an int

I thought this would be really simple, but it's presenting some difficulties. If I have ``` std::string name = "John"; int age = 21; ``` How do I combine them to get a single string `"John21"`?

17 May at 14:39

Can you get the number of lines of code from a GitHub repository?

In a GitHub repository you can see “language statistics”, which displays the of the project that’s written in a language. It doesn’t, however, display how many lines of code the project consists of. ...

10 Nov at 13:54

Rename a file in C#

How do I rename a file using C#?

23 Jan at 10:2

MongoDB vs. Cassandra

I am evaluating what might be the best migration option. Currently, I am on a sharded MySQL (horizontal partition), with most of my data stored in JSON blobs. I do not have any complex SQL queries (a...

How do I get the current GPS location programmatically in Android?

I need to get my current location using GPS programmatically. How can i achieve it?

18 Jul at 06:33

How to decompile DEX into Java source code?

How can one decompile Android DEX (VM bytecode) files into corresponding Java source code?

When to use single quotes, double quotes, and backticks in MySQL

I am trying to learn the best way to write queries. I also understand the importance of being consistent. Until now, I have randomly used single quotes, double quotes, and backticks without any real t...

28 Apr at 10:14

How do I run Redis on Windows?

How do I run Redis on Windows? The Redis download page just seems to offer *nix options. Can I run Redis natively on Windows?

12 Sep at 20:31

What is the purpose of the single underscore "_" variable in Python?

What is the meaning of `_` after `for` in this code? ``` if tbh.bag: n = 0 for _ in tbh.bag.atom_set(): n += 1 ```

Check if a user has scrolled to the bottom (not just the window, but any element)

I'm making a pagination system (sort of like Facebook) where the content loads when the user scrolls to the bottom. I imagine the best way to do that is to find when the user is at the bottom of the p...

11 Feb at 07:7

How to import CSV file data into a PostgreSQL table

How can I write a stored procedure that imports data from a CSV file and populates the table?

10 Apr at 20:58

How to get the last value of an ArrayList

How can I get the last value of an ArrayList?

25 Mar at 18:21

How to delete the contents of a folder?

How can I delete the contents of a local folder in Python? The current project is for Windows, but I would like to see *nix also.

10 Dec at 15:53

Sorting 1 million 8-decimal-digit numbers with 1 MB of RAM

I have a computer with 1 MB of RAM and no other local storage. I must use it to accept 1 million 8-digit decimal numbers over a TCP connection, sort them, and then send the sorted list out over anothe...

30 Mar at 06:49

SQL injection that gets around mysql_real_escape_string()

Is there an SQL injection possibility even when using `mysql_real_escape_string()` function? Consider this sample situation. SQL is constructed in PHP like this: ``` $login = mysql_real_escape_strin...

4 Jun at 09:43

Simple way to repeat a string

I'm looking for a simple commons method or operator that allows me to repeat some string times. I know I could write this using a for loop, but I wish to avoid for loops whenever necessary and a simp...

5 Nov at 12:42

How to add a browser tab icon (favicon) for a website?

I've been working on a website and I'd like to add a small icon to the browser tab. How can I do this in HTML and where in the code would I need to place it (e.g. header)? I have a `.png` logo file t...

29 Aug at 08:1

What is the difference between Cygwin and MinGW?

I want to make my C++ project cross platform, and I'm considering using Cygwin/MinGW. But what is the difference between them ? Another question is whether I will be able to run the binary on a syste...

21 Feb at 21:57

How can I echo a newline in a batch file?

How can you you insert a newline from your batch file output? I want to do something like: ``` echo hello\nworld ``` Which would output: ``` hello world ```

15 Sep at 15:2

How do I count the NaN values in a column in pandas DataFrame?

I want to find the number of `NaN` in each column of my data.

17 Jul at 06:40

What is the intended use of the optional "else" clause of the "try" statement in Python?

What is the intended use of the optional `else` clause of the `try` statement?

22 Mar at 18:15

How do I protect Python code from being read by users?

I am developing a piece of software in Python that will be distributed to my employer's customers. My employer wants to limit the usage of the software with a time-restricted license file. If we distr...