Questions

ssh: The authenticity of host 'hostname' can't be established

When i ssh to a machine, sometime i get this error warning and it prompts to say "yes" or "no". This cause some trouble when running from scripts that automatically ssh to other machines. Warning Mes...

18 Dec at 11:28

Regular expression for matching HH:MM time format

I want a regexp for matching time in HH:MM format. Here's what I have, and it works: ``` ^[0-2][0-3]:[0-5][0-9]$ ``` This matches everything from 00:00 to 23:59. However, I want to change it so 0:...

24 Sep at 03:14

Convert pandas data frame to series

I'm somewhat new to pandas. I have a pandas data frame that is 1 row by 23 columns. I want to convert this into a series? I'm wondering what the most pythonic way to do this is? I've tried `pd.Serie...

20 Oct at 21:5

Any way to write a Windows .bat file to kill processes?

Every time I turn on my company-owned development machine, I have to kill 10+ processes using the Task Manager or any other process management app just to get decent performance out of my IDE. Yes, t...

10 Jul at 16:55

Get index of selected option with jQuery

I'm a little bit confused about how to get an index of a selected option from a HTML `<select>` item. On [this](http://www.theextremewebdesigns.com/blog/jquery-get-selected-index-jquery-get-selected-...

25 May at 17:40

How to convert a set to a list in python?

I am trying to convert a set to a list in Python 2.6. I'm using this syntax: ``` first_list = [1,2,3,4] my_set=set(first_list) my_list = list(my_set) ``` However, I get the following stack trace: ...

9 Jan at 22:14

Add icon to submit button in twitter bootstrap 2

I want to use the twitter bootstrap icons on my form input submit buttons. The examples on [http://twitter.github.com/bootstrap/base-css.html#icons](http://twitter.github.com/bootstrap/base-css.html...

Deserializing a JSON into a JavaScript object

I have a string in a Java server application that is accessed using AJAX. It looks something like the following: ``` var json = [{ "adjacencies": [ { "nodeTo": "graphnode2", ...

23 May at 19:41

Unable to load script from assets index.android.bundle on windows

I'm trying to run my first React Native project for first time on my device (Android 4.2.2). And I get: > unable to load script from assets index.android.bundle Commands that I used: 1. cd (proj...

22 Aug at 18:27

libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

I'm programming an app in swift and when I run the test app on the iPhone simulator everything works, but then I try to swipe right, which is a gesture that I added for it to go to the next Page(View ...

18 Oct at 17:11

How to change the session timeout in PHP?

I would like to extend the session timeout in php I know that it is possible to do so by modifying the php.ini file. But I don't have access to it. So is it possible to do it only with php code?

27 Mar at 14:25

Running a script inside a docker container using shell script

I am trying to create a shell script for setting up a docker container. My script file looks like: ``` #!bin/bash docker run -t -i -p 5902:5902 --name "mycontainer" --privileged myImage:new /bin/bas...

6 Jan at 12:20

Tool for comparing 2 binary files in Windows

I need a tool to compare 2 binaries. The files are quite large. Some freeware or trial tools I found on the Internet are not convenient to use for large files. Can you recommend me some tools?

2 Oct at 12:27

'router-outlet' is not a known element

I have a mvc 5 project with a angular frontend . I wanted to add routing as described in this tutorial [https://angular.io/guide/router](https://angular.io/guide/router). So in my `_Layout.cshtml` I a...

How do I fix the npm UNMET PEER DEPENDENCY warning?

I'm on Windows 10, with Node 5.6.0 and npm 3.6.0. I'm trying to install angular-material and mdi into my working folder. errors with: ``` +-- angular@1.5.0 +-- UNMET PEER DEPENDENCY angular-animate...

How do I delete multiple rows in Entity Framework (without foreach)

I want to delete several items from a table using Entity Framework. There is no foreign key / parent object, so I can't handle this with `OnDeleteCascade`. Right now I'm doing this: ``` var widgets = ...

10 Feb at 16:12

Set date input field's max date to today

I just have a simple line of code like this: ``` <input type='date' min='1899-01-01' max='2000-01-01'></input> ``` Is there a simple way to set the max date to "today" instead of 2000-01-01? Or do ...

8 Aug at 14:51

Can I create links with 'target="_blank"' in Markdown?

Is there a way to create a link in Markdown that opens in a new window? If not, what syntax do you recommend to do this? I'll add it to the markdown compiler I use. I think it should be an option.

jQuery get the image src

I hope when I click the button, I can get the specific img src and show the img src in the div class `img-block` block. ``` <button class="button">Click</button> <div class="img1"> <img src="im...

15 Jul at 03:47

Android - How To Override the "Back" button so it doesn't Finish() my Activity?

I currently have an Activity that when it gets displayed a Notification will also get displayed in the Notification bar. This is so that when the User presses home and the Activity gets pushed to the...

CSS: stretching background image to 100% width and height of screen?

I have an image called myImage.jpg. This is my CSS: ``` body { background-image:url("../images/myImage.jpg"); background-repeat: no-repeat; background-size: 100% 100%; } ``` For some re...

5 Apr at 22:14

How to append elements into a dictionary in Swift?

I have a simple Dictionary which is defined like: ``` var dict : NSDictionary = [ 1 : "abc", 2 : "cde"] ``` Now I want to add an element into this dictionary: `3 : "efg"` How can I append `3 : "ef...

8 Jul at 15:16

Change an image with onclick()

I want to change an image to some other image when i click on the object. the code is stacked in the following order: ``` <li><img><some text></img></li> <li><img><some text></img></li> <li><img><some...

24 Jan at 07:13

Maximum execution time in phpMyadmin

When I try to execute (some) queries in phpMyadmin I get this error > Fatal error: Maximum execution time of 60 seconds exceeded in C:\xampp\phpmyadmin\libraries\dbi\mysql.dbi.lib.php on line 140 ...

Neither BindingResult nor plain target object for bean name available as request attribute

I'm just learning the ropes of Spring 3's annotation fu and I've stumbled upon the newb's nightmare exception. Would appreciate any help. here's the form jsp code: ``` <form:form method="POST" acti...

22 Mar at 17:9