Questions

Make the size of a heatmap bigger with seaborn

I create a heatmap with seaborn ``` df1.index = pd.to_datetime(df1.index) df1 = df1.set_index('TIMESTAMP') df1 = df1.resample('30min').mean() ax = sns.heatmap(df1.iloc[:, 1:6:], annot=True, linewid...

12 Aug at 14:6

How to add New Column with Value to the Existing DataTable?

I have One DataTable with 5 Columns and 10 Rows. Now I want to add one New Column to the DataTable and I want to assign DropDownList value to the New Column. So the DropDownList value should...

Can multiple different HTML elements have the same ID if they're different elements?

Can multiple HTML elements have the same ID if they're of different element types? Is a scenario like this valid? Eg: ``` div#foo span#foo a#foo ```

28 Aug at 12:21

Changing fonts in ggplot2

Once upon a time, I changed my `ggplot2` font using `windowsFonts(Times=windowsFont("TT Times New Roman"))`. Now, I can't get it off of this. In trying to set `family=""` in `ggplot2` `theme()`, I can...

5 Jan at 21:41

How to set default vim colorscheme

The latest upgrade of Ubuntu made my vim colorscheme unusable. I know how to set it manually (`:colo evening`, for example), but I want to set the default for all vim sessions. I see reference in othe...

20 Sep at 07:4

How does the ARM architecture differ from x86?

Is the x86 Architecture specially designed to work with a keyboard while ARM expects to be mobile? What are the key differences between the two?

28 May at 03:4

How do you create a UIImage View Programmatically - Swift

I'm trying to create a UIImage View programmatically, I have a new view and I tried doing this ``` let imageName = "yourImage.png" yourview.backgroundColor = UIColor.colorWithPatternImage(UIImage(nam...

26 Oct at 02:59

How to list files in an android directory?

Here's my code so far: ``` String path = Environment.getExternalStorageDirectory().toString()+"/Pictures"; AssetManager mgr = getAssets(); try { String list[] = mgr.lis...

28 Jan at 02:40

How to position a div in bottom right corner of a browser?

I am trying to place my div with some notes in the position of the screen which will be displayed all time. I used following css for it: ``` #foo { position: fixed; bottom: 0; right:...

1 Aug at 18:28

What is stability in sorting algorithms and why is it important?

I'm very curious, why stability is or is not important in sorting algorithms?

Dockerfile: Output of RUN instruction into a Variable

I am writing a dockerfile and want to put the output of the "ls" command into a variable as shown below: ``` $file = ls /tmp/dir ``` Here, "dir" only has one file inside it. The following RUN inst...

7 May at 21:59

sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 74 supplied

``` def insert(array): connection=sqlite3.connect('images.db') cursor=connection.cursor() cnt=0 while cnt != len(array): img = array[cnt] print(array[cnt]) ...

31 May at 08:53

How to set DateTime to null

Using C#. I have a string `dateTimeEnd`. If the string is in right format, I wish to generate a `DateTime` and assign it to eventCustom.DateTimeEnd of type ``` public Nullable<System.DateTime> Date...

27 May at 08:32

PyTorch: How to get the shape of a Tensor as a list of int

In numpy, `V.shape` gives a tuple of ints of dimensions of V. In tensorflow `V.get_shape().as_list()` gives a list of integers of the dimensions of V. In pytorch, `V.size()` gives a size object, but...

19 Oct at 08:59

Convert base class to derived class

Is it possible in C# to explicitly convert a base class object to one of it's derived classes? Currently thinking I have to create a constructor for my derived classes that accept a base class object ...

14 Jul at 20:21

'foo' was not declared in this scope c++

I'm just learning c++ (first day looking at it since I took a 1 week summer camp years ago) I was converting a program I'm working on in Java to C++: ``` #ifndef ADD_H #define ADD_H #define _USE_MAT...

8 Jun at 18:4

setting the id attribute of an input element dynamically in IE: alternative for setAttribute method

I'm looking at dynamically setting the ID attribute of HTML Input elements which are created dynamically in my application. My implementation works fine with the setAttribute method in Firefox. Any i...

5 Feb at 18:6

Import/Index a JSON file into Elasticsearch

I am new to Elasticsearch and have been entering data manually up until this point. For example I've done something like this: ``` $ curl -XPUT 'http://localhost:9200/twitter/tweet/1' -d '{ "user...

28 Sep at 15:55

pandas: find percentile stats of a given column

I have a pandas data frame my_df, where I can find the mean(), median(), mode() of a given column: ``` my_df['field_A'].mean() my_df['field_A'].median() my_df['field_A'].mode() ``` I am wondering is ...

28 Jun at 01:26

How to combine paths in Java?

Is there a Java equivalent for [System.IO.Path.Combine()](http://msdn.microsoft.com/en-us/library/system.io.path.combine.aspx) in C#/.NET? Or any code to accomplish this? This static method combines ...

22 Aug at 08:53

Get IP address of visitors using Flask for Python

I'm making a website where users can log on and download files, using the [Flask micro-framework](http://flask.pocoo.org/) (based on [Werkzeug](http://werkzeug.pocoo.org/)) which uses Python (2.6 in m...

25 Jan at 16:42

React Native: JAVA_HOME is not set and no 'java' command could be found in your PATH

I've followed step by step the official [Getting Started](https://facebook.github.io/react-native/docs/getting-started.html). I started from a clean linux install and installed everything required as ...

17 Jan at 10:31

Python Hexadecimal

How to convert decimal to hex in the following format (at least two digits, zero-padded, without an 0x prefix)? Input: `255` Output:`ff` Input: `2` Output: `02` I tried `hex(int)[2:]` but...

8 May at 20:23

jQuery Popup Bubble/Tooltip

I'm trying to make a "bubble" that can popup when the `onmouseover` event is fired and will stay open as long as the mouse is over the item that threw the `onmouseover` event OR if the mouse is moved ...

30 May at 14:50

error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65

I've build a react-native application and suddenly I get this error message on my terminal during run of the command react-native run-ios. The same code work fine 10 minutes ago and suddenly I get thi...

19 Mar at 07:46