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?
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...
- Modified
- 23 May at 18:34
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...
- Modified
- 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.
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....
- Modified
- 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....
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?
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 `...
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 ...
- Modified
- 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...
- Modified
- 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...
- Modified
- 11 Mar at 23:50
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...
- Modified
- 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...
- Modified
- 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...
- Modified
- 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...
How do I get monitor resolution in Python?
What is the simplest way to get monitor resolution (preferably in a tuple)?
- Modified
- 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...
- Modified
- 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 ...
- Modified
- 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 ...
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...
- Modified
- 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/...
- Modified
- 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...
- Modified
- 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 ...
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...
- Modified
- 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...