See what the Stackoverflow community is most excited about today.
Date: 2017-12-12
-
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
-
IntelliJ: Never use wildcard imports
tags: settings, intellij-idea
338 votes, 5 answers and 87761 views
\r\n Is there a way to tell IntelliJ never to use wildcard imports?\nUnder 'Settings > Code Style > Imports', I can see that you can specify the 'class count' prior to IntelliJ using wildcard imports. ...\r\n
-
Why is JsonRequestBehavior needed?
tags: c#, .net, asp.net-mvc, asp.net-mvc-3, security
303 votes, 5 answers and 131137 views
\r\n Why is Json Request Behavior needed?\n\nIf I want to restrict the HttpGet requests to my action I can decorate the action with the [HttpPost] attribute\n\nExample:\n\n[HttpPost]\npublic JsonResult Foo()\n{\n ...\r\n
-
Detect if I am in release or debug mode in android
tags: java, android
217 votes, 6 answers and 61386 views
\r\n How can I detect I am in Release mode or Debug mode in android?\r\n
-
How to check if a file exists in Go?
tags: file, go, standard-library
221 votes, 6 answers and 104355 views
\r\n Go's standard library does not have a function solely intended to check if a file exists or not (like Python's os.path.exists). What is the idiomatic way to do it?\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
-
Create an empty list in python with certain size
tags: python, list
208 votes, 7 answers and 516350 views
\r\n I want to create an empty list (or whatever is the best way) that can hold 10 elements.\n\nAfter that I want to assign values in that list, for example this is supposed to display 0 to 9:\n\ns1 = list();\n...\r\n
-
Can I write a CSS selector selecting elements NOT having a certain class?
tags: html, css, css-selectors
392 votes, 8 answers and 251846 views
\r\n I would like to write a CSS selector rule that selects all elements that don't have a certain class. For example, given the following HTML:\n\n\n <body class="...\r\n
-
How to cherry-pick multiple commits
tags: git, git-rebase, cherry-pick
476 votes, 8 answers and 207685 views
\r\n I have two branches. Commit a is the head of one, while the other has b, c, d, e and f on top of a. I want to move c, d, e and f to first branch without commit b. Using cherry pick it is easy: ...\r\n
-
What is the difference between state and props in React?
tags: javascript, reactjs
204 votes, 8 answers and 63952 views
\r\n I was watching a Pluralsight course on React and the instructor stated that props should not be changed. I'm now reading an article (uberVU/react-guide) on props vs. state and it says \r\n Both props ...\r\n