See what the Stackoverflow community is most excited about today.
Date: 2017-11-17
-
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
-
Javascript regex multiline flag doesn't work
tags: javascript, regex
220 votes, 4 answers and 65943 views
\r\n I wrote a regex to fetch string from html, but it seems the multiline flag doesn't work.\n\nthis is my pattern and I want to get the text in h1 tag.\n\nvar pattern= /
.*<...\r\n -
What does “fatal error: unexpectedly found nil while unwrapping an Optional value” mean?
tags: swift, exception, optional
210 votes, 5 answers and 146358 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 to unstash only certain files?
tags: git, git-stash
204 votes, 5 answers and 79064 views
\r\n I stashed my changes. Now I want to unstash only some files from the stash. How can I do this?\r\n
-
Can I get JSON to load into an OrderedDict in Python?
tags: python, json, load, ordereddictionary
284 votes, 5 answers and 71244 views
\r\n Ok so I can use an OrderedDict in json.dump. That is, an OrderedDict can be used as an input to JSON.\n\nBut can it be used as an output? If so how? In my case I'd like to load into an OrderedDict so I ...\r\n
-
tags: css, css3, flexbox
251 votes, 6 answers and 184676 views
\r\n Is there a more flexbox-ish way to right-align "Contact" than to use position: absolute?\n\n\r\n\r\n.main { display: flex; }\r\n.a, .b, .c { background: #efefef; border: 1px solid #999; }\r\n.b { flex: 1; text-...\r\n
-
How to access the correct
this
inside a callback?tags: javascript, callback, this
656 votes, 6 answers and 173495 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
-
Python unittest - opposite of assertRaises?
tags: python, unit-testing
224 votes, 6 answers and 51882 views
\r\n I want to write a test to establish that an Exception is not raised in a given circumstance. \n\nIt's straightforward to test if an Exception is raised ...\n\nsInvalidPath=AlwaysSuppliesAnInvalidPath()\n...\r\n
-
The use of Swift 3 @objc inference in Swift 4 mode is deprecated?
tags: swift, swift4, xcode9-beta
254 votes, 6 answers and 35487 views
\r\n Briefly, while using Xcode 9 Beta, I have run into the following warning:\r\n The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address deprecated @objc inference warnings, test ...\r\n
-
Do I commit the package-lock.json file created by npm 5?
tags: node.js, git, npm, version-control, lockfile
239 votes, 3 answers and 52701 views
\r\n npm 5 was released today and one of the new features include deterministic installs with the creation of a package-lock.json file.\n\nIs this file supposed to be kept in source control?\n\nI'm assuming it'...\r\n