See what the Stackoverflow community is most excited about today.
Date: 2017-12-08
-
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
-
What is a correct mime type for docx, pptx etc?
tags: excel, ms-word, ms-office, powerpoint, mime-types
729 votes, 4 answers and 390715 views
\r\n For older *.doc documents this was enough:\n\nheader("Content-Type: application/msword");\r\nWhat mime type should I use for new docx documents? Also for pptx and xlsx documents?\r\n
-
What does “fatal error: unexpectedly found nil while unwrapping an Optional value” mean?
tags: swift, exception, optional
219 votes, 6 answers and 153192 views
\r\n My Swift program is crashing with EXC_BAD_INSTRUCTION and this error. What does it mean, and how do I fix it?\r\n fatal error: unexpectedly found nil while unwrapping an Optional value\r\nThis post is ...\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
-
iPhone: How to get current milliseconds?
tags: iphone, time
183 votes, 15 answers and 190690 views
\r\n What is the best way to get the current system time milliseconds?\r\n
-
Command Line Tools not working - OS X El Capitan/macOS Sierra/macOS High Sierra
tags: osx, macos-sierra, osx-elcapitan, macos-high-sierra
421 votes, 8 answers and 153919 views
\r\n I just upgraded from Yosemite to El Capitan (and replicated the problem upgrading from El Capitan to Sierra), and when I try to type for example git status inside a terminal, I get the following error:...\r\n
-
Do HttpClient and HttpClientHandler have to be disposed?
tags: c#, .net-4.5, idisposable, using, dotnet-httpclient
216 votes, 8 answers and 63686 views
\r\n System.Net.Http.HttpClient and System.Net.Http.HttpClientHandler in .NET Framework 4.5 implement IDisposable (via System.Net.Http.HttpMessageInvoker).\n\nThe using statement documentation says:\r\n As a ...\r\n
-
getWidth() and getHeight() of View returns 0
tags: java, android, android-layout, getter
330 votes, 8 answers and 216966 views
\r\n I am creating all of the elements in my android project dynamically. I am trying to get the width and height of a button so that I can rotate that button around. I am just trying to learn how to work ...\r\n
-
ReactJS Two components communicating
tags: reactjs
222 votes, 10 answers and 83009 views
\r\n I just got started with ReactJS and am a little stuck on a problem that I have.\n\nMy application is essentially a list with filters and a button to change the layout.\nAt the moment I'm using three ...\r\n
-
What are “named tuples” in Python?
tags: python, tuples, namedtuple
595 votes, 9 answers and 191298 views
\r\n Reading the changes in Python 3.1, I found something... unexpected:\r\n The sys.version_info tuple is now a named tuple:\r\nI never heard about named tuples before, and I thought elements could either be ...\r\n