See what the Stackoverflow community is most excited about today.
Date: 2017-11-21
-
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 an idiomatic way of representing enums in Go?
tags: enums, go, genetics
286 votes, 4 answers and 140558 views
\r\n I'm trying to represent a simplified chromosome, which consists of N bases, each of which can only be one of {A, C, T, G}.\n\nI'd like to formalize the constraints with an enum, but I'm wondering what ...\r\n
-
TypeScript Converting a String to a number
tags: typescript
222 votes, 7 answers and 180902 views
\r\n Anyone a suggestion on how to convert a string to a number in TypeScript?\n\nvar aNumber : number = "1"; // --> Error\n\n// Could this be done?\nvar defaultValue = 0;\nvar aNumber : number = "1".toInt32(...\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
-
Heroku + node.js error (Web process failed to bind to $PORT within 60 seconds of launch)
tags: node.js, heroku
232 votes, 9 answers and 74709 views
\r\n I have my first node.js app (runs fine locally) - but I am unable to deploy it via heroku (first time w/ heroku as well). The code is below. SO doesn't let me write so much code, so I would just say ...\r\n
-
How do you perform wireless debugging in Xcode 9 with iOS 11, Apple TV 4K, etc?
tags: ios, xcode, debugging, ios11, xcode9
218 votes, 13 answers and 45155 views
\r\n Wireless debugging was recently added as a feature in Xcode 9, iOS 11, and tvOS 11. Apple TV 4K doesn't have a USB port, so it requires wireless debugging. How do you perform this wireless debugging ...\r\n
-
Search all the occurrences of a string in the entire project in Android Studio
tags: android, search, intellij-idea, android-studio
416 votes, 9 answers and 206831 views
\r\n This may be a really stupid question, but I just can't figure it out. I've just started using Android Studio (IntelliJ), and I now look for the feature to find the occurrence of a string in any of the ...\r\n
-
How to trigger event in JavaScript?
tags: javascript, events, javascript-events, triggers, addeventlistener
385 votes, 10 answers and 457809 views
\r\n I have attached an event to a text box using addEventListener. It works fine. My problem arose when I wanted to trigger the event programmatically from another function. \n\nHow can I do it?\r\n
-
Is it possible to preview stash contents in git?
tags: git, git-stash
331 votes, 10 answers and 43088 views
\r\n I often put work away for later, then other stuff comes along, and a few weeks later, I want to inspect the stash, and find out what changes it would make if I applied it to working tree in its ...\r\n
-
How to use putExtra() and getExtra() for string data
tags: android, android-intent
226 votes, 12 answers and 501248 views
\r\n Can someone please tell me how exactly to use getExtra() and putExtra() for Intent. Actually I have a string variable say str, which stores some string data. Now I want to send this data from one ...\r\n