See what the Stackoverflow community is most excited about today.
Date: 2017-12-03
-
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
-
git reset --hard HEAD leaves untracked files behind
tags: git
346 votes, 6 answers and 94024 views
\r\n When I run git reset --hard HEAD, it's supposed to reset to a pristine version of what you pulled, as I understand it. Unfortunately, it leaves files lying around, as a git status shows a big list of ...\r\n
-
tags: windows
322 votes, 6 answers and 126641 views
\r\n What is the equivalent of /dev/null in Windows?\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
-
Difference between FragmentPagerAdapter and FragmentStatePagerAdapter
tags: android, android-fragments, android-viewpager, fragmentpageradapter, fragmentstatepageradapter
258 votes, 7 answers and 72353 views
\r\n What is the difference between FragmentPagerAdapter and FragmentStatePagerAdapter?\n\nAbout FragmentPagerAdapter Google's guide says:\r\n This version of the pager is best for use when there are a ...\r\n
-
How to access the correct
this
inside a callback?tags: javascript, callback, this
670 votes, 7 answers and 178812 views
\r\n I have a constructor function which registers an event handler:\n\n\r\n\r\nfunction MyConstructor(data, transport) {\r\n this.data = data;\r\n transport.on('data', function () {\r\n alert(this.data);\r...\r\n
-
How to check file size in python?
tags: python
454 votes, 7 answers and 341112 views
\r\n I am writing a Python script in Windows. I want to do something based on the file size. For example, if the size is greater than 0, I will send an email to somebody, otherwise continue to other things....\r\n
-
tags: c#, linq, group-by
686 votes, 8 answers and 771680 views
\r\n Let's suppose if we have a class like\n\nclass Person { \n internal int PersonID; \n internal string car ; \n}\r\nNow I have a list of this class: List persons;\n\nNow this list can have ...\r\n
-
How to set different label for launcher rather than activity title?
tags: android, label, android-manifest, titlebar, launcher
242 votes, 8 answers and 82483 views
\r\n This question has been asked before - but with no satisfying answer at all! So I'm trying it again.\n\nI want to give my application launcher icon (the one that is displayed on the startscreen!) a ...\r\n