See what the Stackoverflow community is most excited about today.
Date: 2017-12-23
-
How to undo the most recent commits in Git?
tags: git, git-commit, git-reset, git-revert
16144 votes, 73 answers and 5776941 views
\r\n I committed by accident the wrong files into Git, but I haven't pushed the commit to the server yet.\n\nHow can I undo those commits from Git?\r\n
-
How to split a delimited string in Ruby and convert it to an array?
tags: arrays, ruby, string, split
189 votes, 5 answers and 236993 views
\r\n I have a string\n\n"1,2,3,4"\n\nand I'd like to convert it into an array:\n\n[1,2,3,4]\r\nHow?\r\n
-
How do I delete (unset) an exported environment variable?
tags: linux, environment-variables, unset
967 votes, 3 answers and 547486 views
\r\n Before installing gnuplot I set the environment variable GNUPLOT_DRIVER_DIR = /home/gnuplot/build/src.\n\nDuring the installation something went wrong; now I want to remove the GNUPLOT_DRIVER_DIR ...\r\n
-
How can Python iterate over dictionaries with 'for' loops using only the dict keys?
tags: python, python-2.7, dictionary, key, iteration
1657 votes, 12 answers and 2233477 views
\r\n I am a bit puzzled by the following code:\n\nd = {'x': 1, 'y': 2, 'z': 3} \nfor key in d:\n print key, 'corresponds to', d[key]\r\nWhat I don't understand is the key portion. How does Python recognize ...\r\n
-
Folder structure for a Node.js project
tags: node.js
293 votes, 5 answers and 154547 views
\r\n I notice that Node.js projects often include folders like these:\r\n /libs, /vendor, /support, /spec, /tests\r\nWhat exactly do these mean? What's the different between them, and where should I include ...\r\n
-
How to squash commits in git after they have been pushed?
tags: git, squash
338 votes, 5 answers and 128141 views
\r\n This gives a good explanation of squashing multiple commits:\n\nhttp://git-scm.com/book/en/Git-Branching-Rebasing\n\nbut it does not work for commits that have already been pushed. How do I squash the ...\r\n
-
SQL query to select dates between two dates
tags: sql, sql-server, tsql, datetime, sql-server-2005
184 votes, 19 answers and 1195748 views
\r\n I have a start_date and end_date. I want to get the list of dates in between these two dates. Can anyone help me pointing the mistake in my query.\n\nselect Date,TotalAllowance \nfrom Calculation \nwhere ...\r\n
-
jQuery - Detect value change on hidden input field
tags: jquery, event-handling, field, onchange, hidden
202 votes, 7 answers and 195647 views
\r\n I have a hidden text field whose value gets updated via an AJAX response.\n\n\r\nWhen this value changes, I would like to fire an AJAX ...\r\n
-
What are Unwind segues for and how do you use them?
tags: ios, ios6, uistoryboard
516 votes, 6 answers and 203747 views
\r\n iOS 6 and Xcode 4.5 has a new feature referred to as "Unwind Segue":\r\n Unwind segues can allow transitioning to existing instances of scenes in a storyboard\r\nIn addition to this brief entry in Xcode ...\r\n
-
What's the difference between implementation and compile in gradle
tags: android, android-studio, gradle, build.gradle, gradle-plugin
203 votes, 2 answers and 30005 views
\r\n After updating to Android Studio 3.0 and creating a new project, I noticed that in build.gradle there is a new way to add new dependencies instead of compile there is implementation and instead of ...\r\n