Questions

How can I know if a branch has been already merged into master?

I have a git repository with multiple branches. How can I know which branches are already merged into the master branch?

31 Jan at 15:27

Tab key == 4 spaces and auto-indent after curly braces in Vim

How do I make [vi](http://en.wikipedia.org/wiki/Vi)-[Vim](http://en.wikipedia.org/wiki/Vim_%28text_editor%29) never use tabs (converting spaces to tabs, bad!), makes the tab key == 4 spaces, and autom...

How can I use grep to show just filenames on Linux?

How can I use [grep](https://linux.die.net/man/1/grep) to show just file-names (no in-line matches) on Linux? I am usually using something like: ``` find . -iname "*php" -exec grep -H myString {} \; `...

31 Mar at 16:14

How can I get a list of user accounts using the command line in MySQL?

I'm using the MySQL command-line utility and can navigate through a database. Now I need to see a list of user accounts. How can I do this? I'm using MySQL version 5.4.1.

5 Aug at 20:10

Convert JavaScript String to be all lowercase

How can I convert a JavaScript string value to be in all lowercase letters? Example: `"Your Name"` to `"your name"`

8 Dec at 21:57

Determine whether an array contains a value

I need to determine if a value exists in an array. I am using the following function: ``` Array.prototype.contains = function(obj) { var i = this.length; while (i--) { if (this[i] ==...

1 Jul at 11:39

How to align content of a div to the bottom

Say I have the following CSS and HTML code: ``` #header { height: 150px; } ``` ``` <div id="header"> <h1>Header title</h1> Header content (one or multiple lines) </div> ``` The header sectio...

19 Apr at 10:51

How can I output MySQL query results in CSV format?

Is there an easy way to run a MySQL query from the Linux command line and output the results in [CSV](http://en.wikipedia.org/wiki/Comma-separated_values) format? Here's what I'm doing now: ``` mysql ...

6 Aug at 10:18

Best way to convert string to bytes in Python 3?

[TypeError: 'str' does not support the buffer interface](https://stackoverflow.com/questions/5471158/typeerror-str-does-not-support-the-buffer-interface) suggests two possible methods to convert a str...

Passing parameters to a Bash function

I am trying to search how to pass parameters in a Bash function, but what comes up is always how to pass parameter from the . I would like to pass parameters within my script. I tried: ``` myBackupFun...

27 May at 10:44

Create Generic method constraining T to an Enum

I'm building a function to extend the `Enum.Parse` concept that - - So I wrote the following: ``` public static T GetEnumFromString<T>(string value, T defaultValue) where T : Enum { if (string.Is...

13 Apr at 00:37

Removing duplicates in lists

How can I check if a list has any duplicates and return a new list without duplicates?

How do I diff the same file between two different commits on the same branch?

In Git, how could I compare the same file between two different commits (not contiguous) on the same branch (master for example)? I'm searching for a feature like the one in [Visual SourceSafe](http...

19 Apr at 11:48

Check if table exists in SQL Server

I would like this to be the ultimate discussion on how to check if a table exists in SQL Server 2000/2005 using SQL Statements. Here are two possible ways of doing it. Which one is the standard/best w...

Message "Support for password authentication was removed. Please use a personal access token instead."

I got this error on my console when I tried to use `git pull`: > remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please ...

Strange OutOfMemory issue while loading an image to a Bitmap object

I have a `ListView` with a couple of image buttons on each row. When the user clicks the list row, it launches a new activity. I have had to build my own tabs because of an issue with the camera layou...

How do I reformat HTML code using Sublime Text 2?

I've got some poorly-formatted HTML code that I'd like to reformat. Is there a command that will automatically reformat HTML code in Sublime Text 2 so it looks better and is easier to read?

How can I permanently enable line numbers in IntelliJ?

How can I permanently enable line numbers in IntelliJ IDEA?

27 Mar at 01:26

JavaScriptSerializer - JSON serialization of enum as string

I have a class that contains an `enum` property, and upon serializing the object using `JavaScriptSerializer`, my json result contains the integer value of the enumeration rather than its `string` "na...

What are the differences between NP, NP-Complete and NP-Hard?

What are the differences between , and ? I am aware of many resources all over the web. I'd like to read your explanations, and the reason is they might be different from what's out there, or there ...

What is the maximum value for an int32?

I can never remember the number. I need a memory rule.

17 Jul at 08:0

How do I create multiline comments in Python?

How do I make multi-line comments? Most languages have block comment symbols like: ``` /* */ ```

9 Apr at 08:5

How to extend an existing JavaScript array with another array, without creating a new array

There doesn't seem to be a way to extend an existing JavaScript array with another array, i.e. to emulate Python's `extend` method. I want to achieve the following: ``` >>> a = [1, 2] [1, 2] >>> b =...

15 Oct at 17:49

Removing multiple files from a Git repo that have already been deleted from disk

I have a Git repo that I have deleted four files from using `rm` ( `git rm`), and my Git status looks like this: ``` # deleted: file1.txt # deleted: file2.txt # deleted: file3.txt #...

24 Jun at 06:12

In Python, how do I determine if an object is iterable?

Is there a method like `isiterable`? The only solution I have found so far is to call ``` hasattr(myObj, '__iter__') ``` But I am not sure how fool-proof this is.

12 Nov at 01:38