Questions

How to commit a change with both "message" and "description" from the command line?

I can push commits to GitHub via `git` (on the command line, not the Mac app). When I push commits directly from the GitHub web interface (e.g. quickly fixing a typo), I have the chance to "comment" t...

29 Dec at 00:26

The name 'InitializeComponent' does not exist in the current context

If I create a new project in Visual Studio 2010 SP1 and select "WPF Application" and tries to build the generated application, I get the error > The name 'InitializeComponent' does not exist in the c...

Is it possible to import modules from all files in a directory, using a wildcard?

With ES6, I can import several exports from a file like this: ``` import {ThingA, ThingB, ThingC} from 'lib/things'; ``` However, I like the organization of having one module per file. I end up wit...

23 Aug at 02:22

Mime type for WOFF fonts?

What mime type should WOFF fonts be served as? I am serving truetype (ttf) fonts as `font/truetype` and opentype (otf) as `font/opentype`, but I cannot find the correct format for WOFF fonts. I have...

4 Jan at 21:32

How do you give iframe 100% height

I'm trying ``` <iframe height="100%" ...> ``` but it still doesn't resize it. When i try the height in pixles it works. edit: 100% seems to be working on IE but not firefox

11 Mar at 11:55

What is $@ in Bash?

I reckon that the handle `$@` in a shell script is an array of all arguments given to the script. Is this true? I ask because I normally use search engines to gather information, but I can't google fo...

28 May at 14:8

Unzip files programmatically in .net

I am trying to programatically unzip a zipped file. I have tried using the `System.IO.Compression.GZipStream` class in .NET, but when my app runs (actually a unit test) I get this exception: > Syst...

24 Sep at 13:56

html/css buttons that scroll down to different div sections on a webpage

Can someone help me I'm searching for `css/html` code example: I have a webpage with 3 buttons(top, middle, bottom) each specified to 1 div section on my page, lets say my first div section is in the...

26 Dec at 07:6

Boolean operators && and ||

According to the [R language definition](https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Operators), the difference between `&` and `&&` (correspondingly `|` and `||`) is that the former ...

Adding a method to an existing object instance in Python

I've read that it is possible to add a method to an existing object (i.e., not in the class definition) in Python. I understand that it's not always good to do so. But how might one do this?

6 Feb at 13:43

undefined reference to `WinMain@16'

When I try to build a program using `Eclipse CDT`, I get the following: > /mingw/lib/libmingw32.a(main.o):main.c:(.text+0x106): undefined reference to `WinMain@16 Why is that? And, how can I solve...

10 Oct at 11:38

How to change collation of database, table, column?

The database is `latin1_general_ci` now and I want to change collation to `utf8mb4_general_ci`. Is there any setting in PhpMyAdmin to change collation of database, table, column? Rather than changing...

23 Nov at 23:44

Chrome/jQuery Uncaught RangeError: Maximum call stack size exceeded

I am getting the error "Uncaught RangeError: Maximum call stack size exceeded" on chrome. here is my jQuery function ``` $('td').click(function () { if ($(this).context.id != null && $(this)....

Equation for testing if a point is inside a circle

If you have a circle with center `(center_x, center_y)` and radius `radius`, how do you test if a given point with coordinates `(x, y)` is inside the circle?

23 Jun at 15:30

PHP: Fastest way to handle undefined array key

in a very tight loop I need to access tens of thousands of values in an array containing millions of elements. The key can be undefined: In that case it shall be legal to return NULL without any error...

18 Dec at 21:46

jQuery UI: Datepicker set year range dropdown to 100 years

Using the Datepicker the year drop down by default shows only 10 years. The user has to click the last year in order to get more years added. How can we set the initial range to be 100 years so that ...

Where is Java's Array indexOf?

I must be missing something very obvious, but I've searched all over and can't find this method.

25 Feb at 00:14

How to create EditText with rounded corners?

How to create an `EditText` that has rounded corners instead of the default rectangular-shaped corners?

node.js require all files in a folder?

How do I require all files in a folder in node.js? need something like: ``` files.forEach(function (v,k){ // require routes require('./routes/'+v); }}; ```

5 May at 15:32

jQuery AJAX Character Encoding

I'm currently coding a French website. There's a schedule page, where a link on the side can be used to load another day's schedule. Here's the JS I'm using to do this: ``` <script type="text/javasc...

12 Feb at 10:42

Error inflating class fragment

I get the Error ``` Unable to start activity ComponentInfo{de.androidbuch.activiti/de.androidbuch.activiti.task.Activity}: android.view.InflateException: Binary XML file line #11: Error inflating c...

Extract hostname name from string

I would like to match just the root of a URL and not the whole URL from a text string. Given: ``` http://www.youtube.com/watch?v=ClkQA2Lb_iE http://youtu.be/ClkQA2Lb_iE http://www.example.com/12xy45...

4 Apr at 14:4

Concatenate two PySpark dataframes

I'm trying to concatenate two PySpark dataframes with some columns that are only on one of them: ``` from pyspark.sql.functions import randn, rand df_1 = sqlContext.range(0, 10) +--+ |id| +--+ | 0| ...

Chrome net::ERR_INCOMPLETE_CHUNKED_ENCODING error

For the past two months, I have been receiving the following error on Chrome's developer console: ``` net::ERR_INCOMPLETE_CHUNKED_ENCODING ``` Symptoms: - - - Server environment: - - - This i...

How can I easily convert DataReader to List<T>?

I have data in a `DataReader` which I want to be converted to a `List<T>`. What is a possible simple solution for this? For e.g. in CustomerEntity class, I have CustomerId and CustomerName properties...

7 Sep at 15:4