Most Popular

1500 questions
1393
votes
42 answers

How to create a .gitignore file

I need to add some rules to my .gitignore file. However, I can't find it in my project folder. Isn't it created automatically by Xcode? If not, what command allows me to create one?
Luca
  • 20,399
  • 18
  • 49
  • 70
1391
votes
6 answers

Difference between JOIN and INNER JOIN

Both these joins will give me the same results: SELECT * FROM table JOIN otherTable ON table.ID = otherTable.FK vs SELECT * FROM table INNER JOIN otherTable ON table.ID = otherTable.FK Is there any difference between the statements in performance…
driis
  • 161,458
  • 45
  • 265
  • 341
1390
votes
16 answers

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?
Ravi Ram
  • 24,078
  • 21
  • 82
  • 113
1388
votes
28 answers

How to count lines in a document?

I have lines like these, and I want to know how many lines I actually have... 09:16:39 AM all 2.00 0.00 4.00 0.00 0.00 0.00 0.00 0.00 94.00 09:16:40 AM all 5.00 0.00 0.00 4.00 0.00 0.00 0.00 0.00 …
Alucard
  • 16,628
  • 7
  • 24
  • 23
1387
votes
21 answers

What does "static" mean in C?

I've seen the word static used in different places in C code; is this like a static function/class in C# (where the implementation is shared across objects)?
David
1387
votes
26 answers

How and when to use ‘async’ and ‘await’

From my understanding one of the main things that async and await do is to make code easy to write and read - but is using them equal to spawning background threads to perform long duration logic? I'm currently trying out the most basic example.…
Dan Dinu
  • 32,492
  • 24
  • 78
  • 114
1387
votes
21 answers

How can I permanently enable line numbers in IntelliJ?

How can I permanently enable line numbers in IntelliJ IDEA?
t
1386
votes
44 answers

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 layout. The activity that gets launched for the result…
Chrispix
  • 17,941
  • 20
  • 62
  • 70
1385
votes
32 answers

What should be in my .gitignore for an Android Studio project?

What files should be in my .gitignore for an Android Studio project? I've seen several examples that all include .iml but IntelliJ docs say that .iml must be included in your source control.
respectTheCode
  • 42,348
  • 18
  • 73
  • 86
1384
votes
32 answers

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 (not git rm), and my Git status looks like this: # deleted: file1.txt # deleted: file2.txt # deleted: file3.txt # deleted: file4.txt How do I remove these files…
Codebeef
  • 43,508
  • 23
  • 86
  • 119
1383
votes
17 answers

window.onload vs $(document).ready()

What are the differences between JavaScript's window.onload and jQuery's $(document).ready() method?
Vaibhav Jain
  • 33,887
  • 46
  • 110
  • 163
1383
votes
35 answers

jQuery Get Selected Option From Dropdown

Usually I use $("#id").val() to return the value of the selected option, but this time it doesn't work. The selected tag has the id aioConceptName html code
William Kinaan
  • 28,059
  • 20
  • 85
  • 118
1381
votes
55 answers

How can I create a two dimensional array in JavaScript?

I have been reading online and some places say it isn't possible, some say it is and then give an example and others refute the example, etc. How do I declare a 2 dimensional array in JavaScript? (assuming it's possible) How would I access its…
Diego
  • 16,830
  • 8
  • 34
  • 46
1381
votes
25 answers

Running shell command and capturing the output

I want to write a function that will execute a shell command and return its output as a string, no matter, is it an error or success message. I just want to get the same result that I would have gotten with the command line. What would be a code…
Silver Light
  • 44,202
  • 36
  • 123
  • 164