Most Popular
1500 questions
1371
votes
9 answers
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 now need to rebase my local branch RB onto…
Damir
- 54,277
- 94
- 246
- 365
1371
votes
18 answers
How can I disable ARC for a single file in a project?
I am using ARC successfully in my project. However, I have encountered a few files (e.g., in unit tests and mock objects) where the rules of ARC are a little more fragile right now. I recall hearing that there was a way to disable ARC on a per-file…
casademora
- 67,775
- 17
- 69
- 78
1371
votes
43 answers
How can I remove duplicate rows?
I need to remove duplicate rows from a fairly large SQL Server table (i.e. 300,000+ rows).
The rows, of course, will not be perfect duplicates because of the existence of the RowID identity field.
MyTable
RowID int not null identity(1,1) primary…
Seibar
- 68,705
- 38
- 88
- 99
1371
votes
11 answers
How do I print an exception in Python?
How do I print the error/exception in the except: block?
try:
...
except:
print(exception)
TIMEX
- 259,804
- 351
- 777
- 1,080
1368
votes
32 answers
How to sort an array of integers correctly
Trying to get the highest and lowest value from an array that I know will contain only integers seems to be harder than I thought.
var numArray = [140000, 104, 99];
numArray = numArray.sort();
console.log(numArray)
I'd expect this to show 99,…
peirix
- 36,512
- 23
- 96
- 126
1365
votes
8 answers
What is the purpose of the "role" attribute in HTML?
I keep seeing role attributes in some people's work. I use it too, but I'm not sure about its effect.
For example:
Header stuff in here
Or:
Facebook…
jeroen
- 13,760
- 3
- 16
- 10
1364
votes
46 answers
Can't execute jar- file: "no main manifest attribute"
I have installed an application and when I try to run it (it's an executable jar) nothing happens. When I run it from the command line with:
java -jar "app.jar"
I get the following message:
no main manifest attribute, in "app.jar"
Normally, if I…
Ewoud
- 13,845
- 5
- 18
- 23
1363
votes
20 answers
Trim string in JavaScript
How do I remove all whitespace from the start and end of the string?
Vinod
- 31,933
- 35
- 96
- 119
1363
votes
18 answers
Filename too long in Git for Windows
I'm using Git-1.9.0-preview20140217 for Windows. As I know, this release should fix the issue with too long filenames. But not for me.
Surely I'm doing something wrong: I did git config core.longpaths true and git add . and then git commit.…
Papa Mufflon
- 17,558
- 5
- 27
- 35
1362
votes
29 answers
Recommended way to embed PDF in HTML?
What is the recommended way to embed PDF in HTML?
iFrame?
Object?
Embed?
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 flushing it.
Daniel Silveira
- 41,125
- 36
- 100
- 121
1361
votes
22 answers
Asynchronous vs synchronous execution. What is the difference?
What is the difference between asynchronous and synchronous execution?
tush1r
- 19,443
- 14
- 36
- 35
1360
votes
14 answers
Altering a column: null to not null
I have a table that has several nullable integer columns. This is undesirable for several reasons, so I am looking to update all nulls to 0 and then set these columns to NOT NULL. Aside from changing nulls to 0, data must be preserved.
I am looking…
Karmic Coder
- 17,569
- 6
- 32
- 42
1360
votes
8 answers
Where and why do I have to put the "template" and "typename" keywords?
In templates, where and why do I have to put typename and template on dependent names?
What exactly are dependent names anyway?
I have the following code:
template // Tail will be a UnionNode too.
struct UnionNode :…
MSalters
- 173,980
- 10
- 155
- 350
1359
votes
27 answers
How to get the current working directory in Java?
I want to access my current working directory using Java.
My code:
String currentPath = new java.io.File(".").getCanonicalPath();
System.out.println("Current dir:" + currentPath);
String currentDir = System.getProperty("user.dir");
…
Qazi
- 13,791
- 3
- 15
- 19
1358
votes
18 answers
How can I list the tables in a SQLite database file that was opened with ATTACH?
What SQL can be used to list the tables, and the rows within those tables in an SQLite database file – once I have attached it with the ATTACH command on the sqlite3 command line tool?
izb
- 50,101
- 39
- 117
- 168