Keystore change passwords
I currently have a keystore, with a particular password that only I should know. I now need to give access to that keystore to someone else, so I would like to either: 1) Change the password, so I ca...
Why must wait() always be in synchronized block
We all know that in order to invoke [Object.wait()](http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html#wait%28%29), this call must be placed in synchronized block, otherwise an [IllegalMon...
- Modified
- 27 May at 08:0
Get generic type of java.util.List
I have; ``` List<String> stringList = new ArrayList<String>(); List<Integer> integerList = new ArrayList<Integer>(); ``` Is there a (easy) way to retrieve the generic type of the list?
Most efficient way to remove special characters from string
I want to remove all special characters from a string. Allowed characters are A-Z (uppercase or lowercase), numbers (0-9), underscore (_), or the dot sign (.). I have the following, it works but I su...
- Modified
- 2 Dec at 12:33
How to use NSURLConnection to connect with SSL for an untrusted cert?
I have the following simple code to connect to a SSL webpage ``` NSMutableURLRequest *urlRequest=[NSMutableURLRequest requestWithURL:url]; [ NSURLConnection sendSynchronousRequest: urlRequest returni...
- Modified
- 12 Sep at 15:53
How to clone ArrayList and also clone its contents?
How can I clone an `ArrayList` and also clone its items in Java? For example I have: ``` ArrayList<Dog> dogs = getDogs(); ArrayList<Dog> clonedList = ....something to do with dogs.... ``` And I wo...
- Modified
- 24 Aug at 16:1
SQL Server Text type vs. varchar data type
I have variable length character data and want to store in SQL Server (2005) database. I want to learn some best practices about how to choose TEXT SQL type or choose VARCHAR SQL type, pros and cons i...
- Modified
- 13 Sep at 20:44
Best way to implement keyboard shortcuts in a Windows Forms application?
I'm looking for a best way to implement common Windows keyboard shortcuts (for example +, +) in my [Windows Forms](http://en.wikipedia.org/wiki/Windows_Forms) application in C#. The application has a...
- Modified
- 7 Feb at 11:45
What are some uses of template template parameters?
I've seen some examples of C++ using template template parameters (that is templates which take templates as parameters) to do policy-based class design. What other uses does this technique have?
- Modified
- 8 Aug at 19:6
How to use sed to replace only the first occurrence in a file?
I would like to update a large number of C++ source files with an extra include directive before any existing #includes. For this sort of task, I normally use a small bash script with sed to re-write ...
- Modified
- 19 Nov at 14:0
Why does PEP-8 specify a maximum line length of 79 characters?
Why in this millennium should Python [PEP-8](http://www.python.org/dev/peps/pep-0008/) specify a [maximum line length](https://www.python.org/dev/peps/pep-0008/#maximum-line-length) of 79 characters? ...
- Modified
- 25 Jun at 17:7
How do I send a file as an email attachment using Linux command line?
I've created a script that runs every night on my Linux server that uses `mysqldump` to back up each of my MySQL databases to .sql files and packages them together as a compressed .tar file. The next ...
- Modified
- 21 Jun at 10:52
How to get query parameters from URL in Angular 5?
I'm using angular 5.0.3, I would like to start my application with a bunch of query parameters like `/app?param1=hallo¶m2=123`. Every tip given in [How to get query params from url in Angular 2?](...
- Modified
- 23 Jan at 14:33
What is the best way to delete a component with CLI
I tried using "ng destroy component foo" and it tells me "The destroy command is not supported by Angular-CLI" How do we properly delete components with Angular CLI?
- Modified
- 28 Dec at 02:54
How to make ConstraintLayout work with percentage values?
With a Preview 1 of Android Studio 2.2 Google released a new layout in its support library: [ConstraintLayout](https://developer.android.com/reference/android/support/constraint/ConstraintLayout.html)...
- Modified
- 21 May at 06:21
What is the syntax for a multiline string literal?
I'm having a hard time figuring out how string syntax works in Rust. Specifically, I'm trying to figure out how to make a multiple line string.
How to show an empty view with a RecyclerView?
I am used to put an special view inside the layout file as [described in the ListActivity documentation](http://developer.android.com/reference/android/app/ListActivity.html) to be . This view has the...
- Modified
- 29 Aug at 18:43
Check if a string contains a number
Most of the questions I've found are biased on the fact they're looking for letters in their numbers, whereas I'm looking for numbers in what I'd like to be a numberless string. I need to enter a stri...
How can I return camelCase JSON serialized by JSON.NET from ASP.NET MVC controller methods?
My problem is that I wish to return camelCased (as opposed to the standard PascalCase) JSON data via [ActionResult](http://msdn.microsoft.com/en-us/library/system.web.mvc.actionresult%28v=vs.108%29.as...
- Modified
- 5 Feb at 08:35
Check, using jQuery, if an element is 'display:none' or block on click
I want to check and sort elements that are hidden. Is it possible to find all elements with attribute `display` and value `none`?
How can I display an image from a file in Jupyter Notebook?
I would like to use an [IPython notebook](http://ipython.org/notebook.html) as a way to interactively analyze some genome charts I am making with Biopython's [GenomeDiagram](http://biopython.org/DIST/...
- Modified
- 9 Oct at 09:22
How do I make a single legend for many subplots?
I am plotting the same type of information, but for different countries, with multiple subplots with Matplotlib. That is, I have nine plots on a 3x3 grid, all with the same for lines (of course, diffe...
- Modified
- 28 Aug at 16:21
Tips for debugging .htaccess rewrite rules
Many posters have problems debugging their RewriteRule and RewriteCond statements within their `.htaccess` files. Most of these are using a shared hosting service and therefore don't have access to t...
- Modified
- 20 Jun at 09:12
Add regression line equation and R^2 on graph
I wonder how to add regression line equation and R^2 on the `ggplot`. My code is: ``` library(ggplot2) df <- data.frame(x = c(1:100)) df$y <- 2 + 3 * df$x + rnorm(100, sd = 40) p <- ggplot(data = df...
- Modified
- 23 Mar at 12:37
How are glob.glob()'s return values ordered?
I have written the following Python code: ``` #!/usr/bin/python # -*- coding: utf-8 -*- import os, glob path = '/home/my/path' for infile in glob.glob( os.path.join(path, '*.png') ): print infil...