"UNPROTECTED PRIVATE KEY FILE!" Error using SSH into Amazon EC2 Instance (AWS)
I've created a new linux instance on Amazon EC2, and as part of that downloaded the `.pem` file to allow me to SSH in. When I tried to `ssh` with: ``` ssh -i myfile.pem <public dns> ``` I got: ``` @@...
- Modified
- 11 Jul at 17:46
Best way to use multiple SSH private keys on one client
I want to use multiple private keys to connect to different servers or different portions of the same server (my uses are system administration of server, administration of Git, and normal Git usage w...
Getting all file names from a folder using C#
I wanted to know if it is possible to get all the names of text files in a certain folder. For example, I have a folder with the name Maps, and I would like to get the names of all the text files in...
- Modified
- 16 May at 20:58
Calculating arithmetic mean (one type of average) in Python
Is there a built-in or standard library method in Python to calculate the arithmetic mean (one type of average) of a list of numbers?
How can I convert a hex string to a byte array?
Can we convert a hex string to a byte array using a built-in function in C# or do I have to make a custom method for this?
jQuery: Get selected element tag name
Is there an easy way to get a tag name? For example, if I am given `$('a')` into a function, I want to get `'a'`.
- Modified
- 12 Apr at 14:44
How to handle the `onKeyPress` event in ReactJS?
How can I make the `onKeyPress` event work in ReactJS? It should alert when `enter (keyCode=13)` is pressed. ``` var Test = React.createClass({ add: function(event){ if(event.keyCode == 1...
- Modified
- 7 Apr at 18:15
What is the easiest/best/most correct way to iterate through the characters of a string in Java?
Some ways to iterate through the characters of a string in Java are: 1. Using StringTokenizer? 2. Converting the String to a char[] and iterating over that. What is the easiest/best/most correct wa...
When is the @JsonProperty property used and what is it used for?
This bean 'State' : ``` public class State { private boolean isSet; @JsonProperty("isSet") public boolean isSet() { return isSet; } @JsonProperty("isSet") public vo...
Confirm deletion in modal / dialog using Twitter Bootstrap?
I have an HTML table of rows tied to database rows. I'd like to have a "delete row" link for each row, but I would like to confirm with the user beforehand. Is there any way to do this using the Twit...
- Modified
- 18 Sep at 14:45
Bootstrap Center Vertical and Horizontal Alignment
I have a page where only form exists and I want form to be placed in the center of the screen. ``` <div class="container"> <div class="row justify-content-center align-items-center"> <form> ...
- Modified
- 14 Jul at 19:3
mysql_config not found when installing mysqldb python interface
I am trying to get a Python script to run on the linux server I'm connected to via ssh. The script uses mysqldb. I have all the other components I need, but when I try to install mySQLdb via setuptool...
- Modified
- 19 Sep at 22:35
How to effectively work with multiple files in Vim
I've started using Vim to develop Perl scripts and am starting to find it very powerful. One thing I like is to be able to open multiple files at once with: ``` vi main.pl maintenance.pl ``` and ...
What causes a TCP/IP reset (RST) flag to be sent?
I'm trying to figure out why my app's TCP/IP connection keeps hiccuping every 10 minutes (exactly, within 1-2 seconds). I ran Wireshark and discovered that after 10 minutes of inactivity the other en...
- Modified
- 30 Oct at 18:40
A quick and easy way to join array elements with a separator (the opposite of split) in Java
See [Related .NET question](https://stackoverflow.com/questions/455438/opposite-of-string-split-with-separators-net) I'm looking for a quick and easy way to do exactly the opposite of split so that ...
How to exit from Python without traceback?
I would like to know how to I exit from Python without having an traceback dump on the output. I still want want to be able to return an error code but I do not want to display the traceback log. I...
How can I exclude directories from grep -R?
I want to traverse all subdirectories, except the "node_modules" directory.
How to add a set path only for that batch file executing?
Basically, I know I can go through my control panel and modify the path variable. But, I'm wondering if there is a way to through batch programming have a temporary path included? That way it is only ...
- Modified
- 7 Feb at 13:26
Access to the path is denied when saving image
I'm trying to save an image to a folder in .NET C# but I get this exception: ``` Access to the path 'C:\inetpub\wwwroot\mysite\images\savehere' is denied.The error occured at mscorlib because at Sy...
Push commits to another branch
Is it possible to commit and push changes from one branch to another. Assume I commited changes in and want to push them to . From , is it valid to do: ``` git push origin **BRANCH2** ``` And th...
- Modified
- 7 Jul at 12:29
JavaScript seconds to time string with format hh:mm:ss
I want to convert a duration of time, i.e., number of seconds to colon-separated time string (hh:mm:ss) I found some useful answers here but they all talk about converting to x hours and x minutes fo...
- Modified
- 1 May at 15:26
Remove a fixed prefix/suffix from a string in Bash
I want to remove the prefix/suffix from a string. For example, given: ``` string="hello-world" prefix="hell" suffix="ld" ``` How do I get the following result? ``` "o-wor" ```
- Modified
- 8 Feb at 05:47
jQuery get the rendered height of an element?
How do you get the rendered height of an element? Let's say you have a `<div>` element with some content inside. This content inside is going to stretch the height of the `<div>`. How do you get the ...
Difference between binary semaphore and mutex
Is there any difference between a binary semaphore and mutex or are they essentially the same?
- Modified
- 12 Sep at 02:5