How can I grep recursively, but only in files with certain extensions?
I'm working on a script to [grep](https://en.wikipedia.org/wiki/Grep) certain directories: ``` { grep -r -i CP_Image ~/path1/; grep -r -i CP_Image ~/path2/; grep -r -i CP_Image ~/path3/; grep -r -i CP...
- Modified
- 20 Jun at 09:29
How do I terminate a script?
How do I exit a script early, like the `die()` command in PHP?
- Modified
- 20 Jun at 06:47
SOAP vs REST (differences)
I have read articles about the differences between SOAP and REST as a web service communication protocol, but I think that the biggest advantages for REST over SOAP are: 1. REST is more dynamic, no...
- Modified
- 5 Mar at 19:10
Recommended way to embed PDF in HTML?
What is the recommended way to embed PDF in HTML? - - - What does Adobe say itself about it? In my case, the PDF is generated on the fly, so it can't be uploaded to a third-party solution prior to...
How to get the identity of an inserted row?
How am I supposed to get the `IDENTITY` of an inserted row? I know about `@@IDENTITY` and `IDENT_CURRENT` and `SCOPE_IDENTITY`, but don't understand the implications or impacts attached to each. Can s...
- Modified
- 25 Oct at 14:35
How to rebase local branch onto remote master
I have a cloned project from a master branch from remote repository `remote_repo`. I create a new branch and I commit to that branch. Other programmers pushed to `remote_repo` to the master branch. I ...
- Modified
- 29 Jul at 15:36
How do I set/unset a cookie with jQuery?
How do I set and unset a cookie using jQuery, for example create a cookie named `test` and set the value to `1`?
- Modified
- 1 Jul at 11:21
\d less efficient than [0-9]
I made a comment yesterday on an answer where someone had used `[0123456789]` in a regex rather than `[0-9]` or `\d`. I said it was probably more efficient to use a range or digit specifier than a cha...
- Modified
- 24 Aug at 15:32
How do I find the location of my Python site-packages directory?
How do I find the location of my `site-packages` directory?
- Modified
- 8 Nov at 10:7
How can I do a line break (line continuation) in Python?
Given: ``` e = 'a' + 'b' + 'c' + 'd' ``` How do I write the above in two lines? ``` e = 'a' + 'b' + 'c' + 'd' ```
- Modified
- 9 Apr at 08:53
What are some examples of commonly used practices for naming git branches?
I've been using a local git repository interacting with my group's CVS repository for several months, now. I've made an almost neurotic number of branches, most of which have thankfully merged back i...
- Modified
- 18 Dec at 00:58
GitHub relative link in Markdown file
Is there a way to create a URL anchor, `<a>`, link from within a Markdown file, to another file within the same repository and branch (aka a link relative to the current branch)? For example, in the ...
- Modified
- 9 Apr at 14:27
How do you use bcrypt for hashing passwords in PHP?
Every now and then I hear the advice "Use bcrypt for storing passwords in PHP, bcrypt rules". But what is `bcrypt`? PHP doesn't offer any such functions, Wikipedia babbles about a file-encryption uti...
- Modified
- 13 Apr at 17:1
Display number with leading zeros
How do I display a leading zero for all numbers with less than two digits? ``` 1 → 01 10 → 10 100 → 100 ```
- Modified
- 9 Apr at 09:44
How to remove item from array by value?
Is there a method to remove an item from a JavaScript array? Given an array: ``` var ary = ['three', 'seven', 'eleven']; ``` I would like to do something like: ``` removeItem('seven', ary); ``` ...
- Modified
- 29 Sep at 12:45
How do I create a constant in Python?
How do I declare a constant in Python? In Java, we do: ``` public static final String CONST_NAME = "Name"; ```
How can I merge two commits into one if I already started rebase?
I am trying to merge 2 commits into 1, so I followed [“squashing commits with rebase” from git ready](http://www.gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html). I ran ``` git r...
Can't execute jar- file: "no main manifest attribute"
I have installed an application, when I try to run it (it's an executable jar) nothing happens. When I run it from the commandline with: > java -jar "app.jar" I get the following message: > no mai...
- Modified
- 18 Apr at 11:50
Which characters are valid in CSS class names/selectors?
What characters/symbols are allowed within the class selectors? I know that the following characters are , but what characters are ? ``` ~ ! @ $ % ^ & * ( ) + = , . / ' ; : " ? > < [ ] \ { } | ` # ``...
- Modified
- 31 Dec at 01:25
Why do people write #!/usr/bin/env python on the first line of a Python script?
I see these at the top of Python files: ``` #!/usr/bin/env python ``` ``` #!/usr/bin/env python3 ``` It seems to me that the files run the same without that line.
How can I get jQuery to perform a synchronous, rather than asynchronous, Ajax request?
I have a JavaScript widget which provides standard extension points. One of them is the `beforecreate` function. It should return `false` to prevent an item from being created. I've added an Ajax ca...
- Modified
- 22 May at 13:4
Get a list from Pandas DataFrame column headers
I want to get a list of the column headers from a Pandas DataFrame. The DataFrame will come from user input, so I won't know how many columns there will be or what they will be called. For example, i...
Difference Between Select and SelectMany
I've been searching the difference between `Select` and `SelectMany` but I haven't been able to find a suitable answer. I need to learn the difference when using LINQ To SQL but all I've found are sta...
- Modified
- 24 Nov at 23:47
Get the name of an object's type
Is there a equivalent of 's `class.getName()`?
- Modified
- 19 Apr at 11:23