Questions

What is tail recursion?

Whilst starting to learn lisp, I've come across the term . What does it mean exactly?

Remove tracking branches no longer on remote

Is there a simple way to delete all tracking branches whose remote equivalent no longer exists? Example: Branches (local and remote) - - - - - Locally, I only have a master branch. Now I need to ...

13 Aug at 13:38

How do I remedy "The breakpoint will not currently be hit. No symbols have been loaded for this document." warning?

A C# desktop application (on the Visual Studio Express edition) worked, but then it didn't work 5 seconds later. I tried the following: - - - - I have two Windows Forms projects in the solution. One ...

Can't bind to 'ngModel' since it isn't a known property of 'input'

I have this simple input in my component which uses `[(ngModel)]` : ``` <input type="text" [(ngModel)]="test" placeholder="foo" /> ``` And I get the following error when I launch my app, even if the ...

25 Apr at 04:43

How can I display a JavaScript object?

How do I display the content of a JavaScript object in a string format like when we `alert` a variable? The same formatted way I want to display an object.

Comments in Markdown

How do you write a comment in Markdown, i.e. text that is not rendered in the HTML output? I found nothing on the [Markdown project](http://daringfireball.net/projects/markdown/).

21 Dec at 07:54

How can I delete all of my Git stashes at once?

How can I delete all of my [Git](https://en.wikipedia.org/wiki/Git) stashes at once? Specifically I mean, with typing in one command.

7 Jan at 09:22

Undo working copy modifications of one file in Git?

After the last commit, I modified a bunch of files in my working copy, but I want to undo the changes to one of those files, as in reset it to the same state as the most recent commit. However, I onl...

11 Jan at 10:49

How do I commit case-sensitive only filename changes in Git?

I have changed a few files name by de-capitalize the first letter, as in `Name.jpg` to `name.jpg`. Git does not recognize this changes and I had to delete the files and upload them again. Is there a ...

Static methods in Python?

Can I define a [static method](https://en.wikipedia.org/wiki/Method_(computer_programming)#Static_methods) which I can call directly on the class instance? e.g., ``` MyClass.the_static_method() ```

29 Nov at 00:11

Abort Ajax requests using jQuery

Is it possible that using jQuery, I that I have not yet received the response from?

8 Jul at 00:24

How does Git handle symbolic links?

If I have a file or directory that is a symbolic link and I commit it to a Git repository, what happens to it? I would assume that it leaves it as a symbolic link until the file is deleted and then i...

27 Oct at 10:1

Looping through the content of a file in Bash

How do I iterate through each line of a text file with [Bash](https://en.wikipedia.org/wiki/Bash_(Unix_shell))? With this script: ``` echo "Start!" for p in (peptides.txt) do echo "${p}" done ``...

29 May at 19:47

How can I remove a commit on GitHub?

I "accidentally" pushed a commit to GitHub. Is it possible to remove this commit? I want to revert my GitHub repository as it was before this commit.

How to do case insensitive search in Vim

I'd like to search for an upper case word, for example COPYRIGHT in a file. I tried performing a search like: ``` /copyright/i # Doesn't work ``` but it doesn't work. I know that in Perl, if I ...

2 Apr at 12:50

How can I count all the lines of code in a directory recursively?

We've got a PHP application and want to count all the lines of code under a specific directory and its subdirectories. We don't need to ignore comments, as we're just trying to get a rough idea. ``` w...

7 Apr at 23:39

Who is listening on a given TCP port on Mac OS X?

On Linux, I can use `netstat -pntl | grep $PORT` or `fuser -n tcp $PORT` to find out which process (PID) is listening on the specified TCP port. How do I get the same information on Mac OS X?

12 Dec at 12:30

What do two question marks together mean in C#?

Ran across this line of code: ``` FormsAuth = formsAuth ?? new FormsAuthenticationWrapper(); ``` What do the two question marks mean, is it some kind of ternary operator? It's hard to look up in Go...

3 Apr at 11:10

How to exit from PostgreSQL command line utility: psql

What command or short key can I use to exit the PostgreSQL command line utility `psql`?

18 Oct at 08:41

Detach (move) subdirectory into separate Git repository

I have a [Git](http://en.wikipedia.org/wiki/Git_%28software%29) repository which contains a number of subdirectories. Now I have found that one of the subdirectories is unrelated to the other and shou...

1 Aug at 08:25

Inserting multiple rows in a single SQL query?

I have multiple set of data to insert at once, say 4 rows. My table has three columns: `Person`, `Id` and `Office`. ``` INSERT INTO MyTable VALUES ("John", 123, "Lloyds Office"); INSERT INTO MyTable ...

17 Oct at 13:25

How to detect a mobile device using jQuery

Is there a way to detect whether or not a user is using a mobile device in jQuery? Something similar to the CSS `@media` attribute? I would like to run a different script if the browser is on a handhe...

Why should text files end with a newline?

I assume everyone here is familiar with the adage that all text files should end with a newline. I've known of this "rule" for years but I've always wondered — why?

12 Nov at 19:49

What's the difference between the atomic and nonatomic attributes?

What do `atomic` and `nonatomic` mean in property declarations? ``` @property(nonatomic, retain) UITextField *userName; @property(atomic, retain) UITextField *userName; @property(retain) UITextField ...

What is the difference between venv, pyvenv, pyenv, virtualenv, virtualenvwrapper, pipenv, etc?

Python 3.3 includes in its standard library the new package `venv`. What does it do, and how does it differ from all the other packages that match the regex `(py)?(v|virtual|pip)?env`?