Highest scored questions

27528 votes
26 answers
2.0m views

In this C++ code, sorting the data (before the timed region) makes the primary loop ~6x faster: #include <algorithm> #include <ctime> #include <iostream> int main() { // ...
GManNickG's user avatar
  • 507k
27212 votes
105 answers
16.7m views

I accidentally committed the wrong files to Git but haven't pushed the commit to the server yet. How do I undo those commits from the local repository?
20359 votes
41 answers
13.4m views

Failed Attempts to Delete a Remote Branch: $ git branch -d remotes/origin/bugfix error: branch 'remotes/origin/bugfix' not found. $ git branch -d origin/bugfix error: branch 'origin/bugfix' not found....
14046 votes
37 answers
3.7m views

What are the differences between git pull and git fetch?
Pablo Fernandez's user avatar
13133 votes
51 answers
3.5m views

What functionality does the yield keyword in Python provide? For example, I'm trying to understand this code1: def _get_child_candidates(self, distance, min_dist, max_dist): if self._leftchild and ...
Alex. S.'s user avatar
  • 148k
12255 votes
51 answers
13.6m views

How do I remove a specific value from an array? Something like: array.remove(value); Constraints: I have to use core JavaScript. Frameworks are not allowed.
Walker's user avatar
  • 136k
12032 votes
41 answers
6.4m views

How can I rename a local branch which has not yet been pushed to a remote repository? Related: Rename master branch for both local and remote Git repositories How do I rename both a Git local and ...
Forrest's user avatar
  • 129k
11654 votes
40 answers
4.0m views

There are many "standards" for the JSON content type: application/json application/x-javascript text/javascript text/x-javascript text/x-json Which one do I use, and where? I assume ...
Oli's user avatar
  • 241k
11618 votes
39 answers
6.4m views

I mistakenly added files to Git using the command: git add myfile.txt I have not yet run git commit. How do I undo this so that these changes will not be included in the commit?
oz10's user avatar
  • 160k
10263 votes
26 answers
1.1m views

After reading Hidden Features and Dark Corners of C++/STL on comp.lang.c++.moderated, I was completely surprised that the following snippet compiled and worked in both Visual Studio 2008 and G++ 4.4. ...
9962 votes
55 answers
9.6m views

How do I force an overwrite of local files on a git pull? My local repository contains a file of the same filename as on the server. error: Untracked working tree file 'example.txt' would be ...
Jakub Troszok's user avatar
9798 votes
64 answers
4.1m views

Can I use comments inside a JSON file? If so, how?
Michael Gundlach's user avatar
9577 votes
30 answers
2.0m views

What are the stack and heap? Where are they located physically in a computer's memory? To what extent are they controlled by the OS or language run-time? What is their scope? What determines their ...
mattshane's user avatar
  • 95.7k
8953 votes
9 answers
816k views

Why do certain random strings produce colors when entered as background colors in HTML? For example, bgcolor="chucknorris" produces a red background: <body bgcolor="chucknorris"> ...
user456584's user avatar
  • 89.5k
8882 votes
47 answers
9.6m views

How do I check out the remote test branch? I can see it with git branch -r. I tried: git checkout test, which does nothing git checkout origin/test gives * (no branch)
Juri Glass's user avatar
  • 92.4k

15 30 50 per page
1
2 3 4 5
1610568