Questions

How to convert a unix timestamp (seconds since epoch) to Ruby DateTime?

How do you convert a Unix timestamp (seconds since epoch) to Ruby DateTime?

3 Jun at 21:7

plot different color for different categorical levels using matplotlib

I have this data frame `diamonds` which is composed of variables like `(carat, price, color)`, and I want to draw a scatter plot of `price` to `carat` for each `color`, which means different `color` h...

keytool error bash: keytool: command not found

I have tried to execute keytool from Java bin directory but I get an error with warning bash: keytool: command not found. ``` root@xxxxxx]# keytool -genkey -alias mypassword -keyalg RSA bash: keytoo...

10 Jun at 10:28

Python way to clone a git repository

Is there a Python way without using a subprocess to clone a git repository? I'm up for using any sort of modules you recommend.

18 Mar at 18:55

Fastest way to iterate over all the chars in a String

In Java, what would the fastest way to iterate over all the chars in a String, this: ``` String str = "a really, really long string"; for (int i = 0, n = str.length(); i < n; i++) { char c = str....

17 Jan at 14:24

Easy way to test an LDAP User's Credentials

Is there an easy way to test the credentials of a user against an LDAP instance? I know how to write a Java program that would take the 'User DN' and password, and check it against the LDAP instance....

27 Apr at 02:3

How to use find command to find all files with extensions from list?

I need to find all image files from directory (gif, png, jpg, jpeg). ``` find /path/to/ -name "*.jpg" > log ``` How to modify this string to find not only .jpg files?

24 Oct at 10:7

npm install hangs

This is my `package.json`: ``` { "name": "my-example-app", "version": "0.1.0", "dependencies": { "request": "*", "nano": "3.3.x", "async": "~0.2" } } ``` Now, when I open the cmd and run `...

1 Jun at 14:59

Is there a way to put multiple projects in a git repository?

For some reason, I only have to use. But I have including `java` projects, `PHP scripts` and `Android` apps projects. Now my problem is, I have to put them to different inside the repository I use ...

13 Sep at 15:13

Is it possible to apply CSS to half of a character?

A way to style one of a character. (In this case, half the letter being transparent) - - - Below is an example of what I am trying to obtain. ![x](https://i.stack.imgur.com/SaH8v.png) Does a...

16 Dec at 05:11

Why Does OAuth v2 Have Both Access and Refresh Tokens?

Section 4.2 of the draft OAuth 2.0 protocol indicates that an authorization server can return both an `access_token` (which is used to authenticate oneself with a resource) as well as a `refresh_token...

How can I get the client's IP address in ASP.NET MVC?

I'm totally new to the ASP.NET MVC stack, and I was wondering what happened to the simple Page object and the Request ServerVariables object? Basically, I want to to pull out the client PC's IP addre...

8 Mar at 20:14

PowerShell: Run command from script's directory

I have a PowerShell script that does some stuff using the script’s current directory. So when inside that directory, running `.\script.ps1` works correctly. Now I want to call that script from a diff...

19 Jun at 13:40

Control the dashed border stroke length and distance between strokes

Is it possible to control the length and distance between dashed border strokes in CSS? This example below displays differently between browsers: ``` div { border: dashed 4px #000; padding: 20px...

9 Jul at 11:21

How do you implement a re-try-catch?

Try-catch is meant to help in the exception handling. This means somehow that it will help our system to be more robust: try to recover from an unexpected event. We suspect something might happen wh...

18 Oct at 06:57

How do I get monitor resolution in Python?

What is the simplest way to get monitor resolution (preferably in a tuple)?

18 May at 01:44

Passing HTML input value as a JavaScript Function Parameter

I am new to JavaScript, and I'm trying to figure out how to pass user-inputted values as a parameter to a JavaScript function. Here is my code: ``` <body> <h1>Adding 'a' and 'b'</h1> <form> a: <inp...

28 Jan at 05:41

what is this value means 1.845E-07 in excel?

I am reading the excel sheet from C# by using interop services. My sheet has one of cell value as 0.00. but run time when I am checking the value of that cell in C# code I am getting "1.845E-07" this ...

7 Nov at 08:55

Ignore python multiple return value

Say I have a Python function that returns multiple values in a tuple: ``` def func(): return 1, 2 ``` Is there a nice way to ignore one of the results rather than just assigning to a temporary ...

10 Jan at 22:12

Get user profile picture by Id

I'm now working on a web application which is mostly based of facebook graph api. I hold some data about users - actually , the possible public data available - such as name and id. I also know that a...

17 Dec at 05:4

Add Insecure Registry to Docker

I have a docker 1.12 running on CentOS. I am trying to add insecure registry to it and things mentioned in documentation just don't work. The system uses `systemd` so I created a `/etc/systemd/system/...

27 Dec at 12:9

How to get the directory of the currently running file?

In nodejs I use [__dirname](http://nodejs.org/api/globals.html#globals_dirname) . What is the equivalent of this in Golang? I have googled and found out this article [http://andrewbrookins.com/tech/g...

19 Jul at 23:12

How can I dismiss the on screen keyboard?

I am collecting user input with a `TextFormField` and when the user presses a `FloatingActionButton` indicating they are done, I want to dismiss the on screen keyboard. How do I make the keyboard go ...

26 Dec at 09:26

Cannot authenticate into mongo, "auth fails"

I've created an admin user for mongo using these directions: [http://docs.mongodb.org/manual/tutorial/add-user-administrator/](http://docs.mongodb.org/manual/tutorial/add-user-administrator/) From t...

8 Aug at 16:33

How to uncheck checkbox using jQuery Uniform library

I have a problem with unchecking a `checkbox`. Have a look at [my jsFiddle](http://jsfiddle.net/r87NH/), where I am attempting: ``` $("#check2").attr("checked", true); ``` I use [uniform](http://p...

16 Jan at 15:54