Propagate all arguments in a Bash shell script
I am writing a very simple script that calls another script, and I need to propagate the parameters from my current script to the script I am executing. For instance, my script name is `foo.sh` and ca...
- Modified
- 17 Sep at 12:33
Regex Email validation
I use this ``` @"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$" ``` regexp to validate the email `([\w\.\-]+)` - this is for the first-level domain (many letters and numbers, also point and hyphen) `([\...
- Modified
- 23 Sep at 07:33
Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.
I'm trying to install PhoneGap and I'm getting the following error: > Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions. ### Err...
Markdown to create pages and table of contents?
I started to use markdown to take notes. I use to view my markdown notes and its beautiful. But as my notes get longer I find it difficult to find what I want. I know markdown can create tables, b...
- Modified
- 28 Apr at 15:36
What does set -e mean in a bash script?
I'm studying the content of this file that the script executes before that package is unpacked from its Debian archive (.deb) file. The script has the following code: ``` #!/bin/bash set -e # Autom...
How to define the basic HTTP authentication using cURL correctly?
I'm learning Apigility ([Apigility docu -> REST Service Tutorial](https://www.apigility.org/documentation/intro/first-rest-service)) and trying to send a POST request with basic authentication via cUR...
- Modified
- 22 Sep at 07:58
Git Push Error: insufficient permission for adding an object to repository database
When I try to push to a shared git remote, I get the following error: `insufficient permission for adding an object to repository database` Then I read about a fix here: [Fix](http://parizek.com/?p=1...
How can I extract a predetermined range of lines from a text file on Unix?
I have a ~23000 line SQL dump containing several databases worth of data. I need to extract a certain section of this file (i.e. the data for a single database) and place it in a new file. I know both...
- Modified
- 27 Apr at 14:54
Any way to clear python's IDLE window?
I know there's a similar topic about python console, but I do not know if they are the same. I tried system("clear") and it didn't work here. How do I clear python's IDLE window?
- Modified
- 19 Apr at 00:42
How do I use installed packages in PyCharm?
In , I've added the Python environment `/usr/bin/python`. However, ``` from gnuradio import gr ``` fails as an . However, it works fine in the Python interpreter from the command line. GNURadio w...
Import Maven dependencies in IntelliJ IDEA
I just imported a project from subversion to IntelliJ IDEA 11 - it's a maven project. But I have a problem in maven library dependencies so that I can't include all maven dependencies automatically - ...
- Modified
- 23 Sep at 01:45
Best practices for API versioning?
Are there any known how-tos or best practices for web service REST API versioning? I have noticed that [AWS does versioning by the URL of the endpoint](http://docs.aws.amazon.com/AmazonSimpleDB/lates...
- Modified
- 30 Jun at 13:51
Type or namespace name does not exist
I have a WCF Data Service project built with Visual Studio 2010, which was working fine. All of a sudden, it didn't compile anymore. It was giving me messages like: > Error 7 The type or namespace n...
- Modified
- 2 Jun at 09:49
Get the current time in C
I want to get the current time of my system. For that I'm using the following code in C: ``` time_t now; struct tm *mytime = localtime(&now); if ( strftime(buffer, sizeof buffer, "%X", mytime) ) { ...
Using awk to print all columns from the nth to the last
This line worked until I had whitespace in the second field. ``` svn status | grep '\!' | gawk '{print $2;}' > removedProjs ``` is there a way to have awk print everything in $2 or greater? ($3, $...
Initial size for the ArrayList
You can set the initial size for an ArrayList by doing ``` ArrayList<Integer> arr=new ArrayList<Integer>(10); ``` However, you can't do ``` arr.add(5, 10); ``` because it causes an out of bounds...
- Modified
- 2 Sep at 15:5
Is there a Max function in SQL Server that takes two values like Math.Max in .NET?
I want to write a query like this: ``` SELECT o.OrderId, MAX(o.NegotiatedPrice, o.SuggestedPrice) FROM Order o ``` But this isn't how the `MAX` function works, right? It is an aggregate function s...
- Modified
- 30 Jun at 11:46
No connection could be made because the target machine actively refused it 127.0.0.1:3446
I'm using the WCF4.0 template -[REST](http://en.wikipedia.org/wiki/Representational_State_Transfer). I'm trying to make a method that uploads a file using a stream. The problem always occur at ``` S...
- Modified
- 19 Nov at 06:8
How do you do a deep copy of an object in .NET?
I want a true deep copy. In Java, this was easy, but how do you do it in C#?
- Modified
- 4 Dec at 06:5
Pandas read in table without headers
Using pandas, how do I read in only a subset of the columns (say 4th and 7th columns) of a .csv file with no headers? I cannot seem to be able to do so using `usecols`.
How can I list ALL grants a user received?
I need to see all grants on an Oracle DB. I used the TOAD feature to compare schemas but it does not shows temptable grants etc. so there's my question: How can I list all grants on a Oracle DB?
keytool error Keystore was tampered with, or password was incorrect
I am getting following error while generating certificates on my local machine. ``` C:\Users\abc>keytool -genkey -alias tomcat -keyalg RSA Enter keystore password: keytool error: java.io.IOException:...
What's the "Content-Length" field in HTTP header?
What does it mean? 1. Byte count of encoded content string with encoding specified in header. 2. Character count of content string. Especially in case of `Content-Type: application/x-www-form-url...
- Modified
- 12 May at 10:34
How to check if a string contains only digits in Java
In Java for String class there is a method called matches, how to use this method to check if my string is having only digits using regular expression. I tried with below examples, but both of them re...