Questions

How to convert local time string to UTC?

How do I convert a datetime to a ? I'm sure I've done this before, but can't find it and SO will hopefully help me (and others) do that in future. : For example, if I have `2008-09-17 14:02:00` in...

9 Mar at 11:7

Keras input explanation: input_shape, units, batch_size, dim, etc

For any Keras layer (`Layer` class), can someone explain how to understand the difference between `input_shape`, `units`, `dim`, etc.? For example the doc says `units` specify the output shape of a...

What is the difference between FragmentPagerAdapter and FragmentStatePagerAdapter?

What is the difference between `FragmentPagerAdapter` and `FragmentStatePagerAdapter`? About `FragmentPagerAdapter` Google's guide says: > This version of the pager is best for use when there are a ...

Do HttpClient and HttpClientHandler have to be disposed between requests?

[System.Net.Http.HttpClient](http://msdn.microsoft.com/en-us/library/hh193681.aspx) and [System.Net.Http.HttpClientHandler](http://msdn.microsoft.com/en-us/library/system.net.http.httpclienthandler.as...

@RequestParam vs @PathVariable

What is the difference between `@RequestParam` and `@PathVariable` while handling special characters? `+` was accepted by `@RequestParam` as space. In the case of `@PathVariable`, `+` was accepted...

24 Oct at 06:40

How to find the length of a string in R

How to find the length of a string (i.e., number of characters in a string) without splitting it in R? I know how to find the length of a list but not of a string. And what about Unicode strings? How ...

5 Jan at 21:26

How do I avoid the specification of the username and password at every git push?

I `git push` my work to a remote Git repository. Every `push` will prompt me to input `username` and `password`. I would like to avoid it for every push, but how to configure to avoid it?

28 Apr at 13:38

How to create an HTTPS server in Node.js?

Given an SSL key and certificate, how does one create an HTTPS service?

How to convert OutputStream to InputStream?

I am on the stage of development, where I have two modules and from one I got output as a `OutputStream` and second one, which accepts only `InputStream`. Do you know how to convert `OutputStream` to ...

25 Oct at 20:23

How to configure Visual Studio to use Beyond Compare

I would like to configure Visual Studio to open Beyond Compare by default as the diff tool. How can I do this?

8 Feb at 16:2

How to get current time in milliseconds in PHP?

`time()` is in seconds - is there one in milliseconds?

6 Nov at 10:51

Oracle: If Table Exists

I'm writing some migration scripts for an Oracle database, and was hoping Oracle had something similar to MySQL's `IF EXISTS` construct. Specifically, whenever I want to drop a table in MySQL, I do s...

13 Dec at 12:59

Public Fields versus Automatic Properties

We're often told we should protect encapsulation by making getter and setter methods (properties in C#) for class fields, instead of exposing the fields to the outside world. But there are many times ...

byte + byte = int... why?

Looking at this C# code: ``` byte x = 1; byte y = 2; byte z = x + y; // ERROR: Cannot implicitly convert type 'int' to 'byte' ``` The result of any math performed on `byte` (or `short`) types is im...

30 May at 09:15

Relative paths in Python

I'm building a simple helper script for work that will copy a couple of template files in our code base to the current directory. I don't, however, have the absolute path to the directory where the te...

27 May at 21:43

What is the standard exception to throw in Java for not supported/implemented operations?

In particular, is there a standard `Exception` subclass used in these circumstances?

3 Mar at 17:10

Regular expression to match balanced parentheses

I need a regular expression to select all the text between two outer brackets. Example: `START_TEXT(text here(possible text)text(possible text(more text)))END_TXT` `^ ^` Result: `(text here(possible t...

19 Apr at 12:33

Can a Byte[] Array be written to a file in C#?

I'm trying to write out a `Byte[]` array representing a complete file to a file. The original file from the client is sent via TCP and then received by a server. The received stream is read to a byt...

19 Dec at 16:57

How can I iterate over an enum?

I just noticed that you can not use standard math operators on an `enum` such as `++` or `+=`. So what is the best way to iterate through all of the values in a C++ `enum`?

17 Mar at 00:4

Preserving order with LINQ

I use LINQ to Objects instructions on an ordered array. Which operations shouldn't I do to be sure the order of the array is not changed?

11 Aug at 17:41

When do you use POST and when do you use GET?

From what I can gather, there are three categories: 1. Never use GET and use POST 2. Never use POST and use GET 3. It doesn't matter which one you use. Am I correct in assuming those three cases?...

17 Jan at 20:23

Datatables: Cannot read property 'mData' of undefined

I have an issue with `Datatables`. I also went through [this link](http://datatables.net/forums/discussion/20273/uncaught-typeerror-cannot-read-property-mdata-of-undefined) which didn't yield any resu...

9 Jun at 19:8

How to define Gradle's home in IDEA?

I am trying to import a Gradle project into IntelliJ, and when I get to the `Gradle Home` textbox, it is not automatically populated, nor will typing in the path of `Gradle Home` result in a valid loc...

2 Jan at 08:34

Why am I suddenly getting a "Blocked loading mixed active content" issue in Firefox?

This morning, upon upgrading my Firefox browser to the latest version (from 22 to 23), some of the key aspects of my back office (website) stopped working. Looking at the Firebug log, the following e...

How to round float numbers in javascript?

I need to round for example `6.688689` to `6.7`, but it always shows me `7`. My method: ``` Math.round(6.688689); //or Math.round(6.688689, 1); //or Math.round(6.688689, 2); ``` But result always...

5 Jun at 01:13