Skip to content

Latest commit

 

History

History
97 lines (43 loc) · 4.98 KB

2017-12-05.md

File metadata and controls

97 lines (43 loc) · 4.98 KB

Trending in Stackoverflow

See what the Stackoverflow community is most excited about today.

Date: 2017-12-05

  1. 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

  2. How to check sbt version?

    tags: sbt

    221 votes, 6 answers and 68347 views

    \r\n How do I check which version of sbt I'm running?\n\nI have the bash file set up that uses sbt-launch.jar, and it works, but \n\n$ sbt version\r\nonly shows the "project version" (0.1) and \n\n$ sbt --...\r\n

  3. 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

  4. Catch multiple exceptions in one line (except block)

    tags: python, exception, exception-handling

    1664 votes, 7 answers and 370139 views

    \r\n I know that I can do:\n\ntry:\n # do something that may fail\nexcept:\n # do this if ANYTHING goes wrong\r\nI can also do this:\n\ntry:\n # do something that may fail\nexcept IDontLikeYouException:\n #...\r\n

  5. How to convert string to lowercase in Python?

    tags: python, string, unicode, uppercase, lowercase

    1202 votes, 7 answers and 1360115 views

    \r\n Is there any way to convert an entire user inputted string from uppercase, or even part uppercase to lowercase? \n\nE.g. Kilometers --> kilometers.\r\n

  6. How to add an image to the “drawable” folder in Android Studio?

    tags: android, android-studio, android-drawable

    183 votes, 21 answers and 442152 views

    \r\n I need to add an image to the res/drawable folder...\n\nWhen I choose new > image asset, it comes out a dialog to choose Asset Type...\n\nHow can I add an image to res/drawable folder?\r\n

  7. How to initialize List object in Java?

    tags: java, list

    251 votes, 11 answers and 821884 views

    \r\n I can not initialize a List as in the following code:\n\nList supplierNames = new List();\nsupplierNames.add("sup1");\nsupplierNames.add("sup2");\nsupplierNames.add("sup3");\n...\r\n

  8. Easiest way to read from and write to files

    tags: c#, .net, string, file, file-io

    183 votes, 9 answers and 298461 views

    \r\n There are a lot of different ways to read and write files (text files, not binary) in C#. \n\nI just need something that is easy and uses the least amount of code, because I am going to be working with ...\r\n

  9. Is there a difference between “throw” and “throw ex”?

    tags: c#, .net, exception, exception-handling

    305 votes, 9 answers and 133237 views

    \r\n There are some posts that asks what the difference between those two are already.\n(why do I have to even mention this...)\n\nBut my question is different in a way that I am calling "throw ex" in another ...\r\n

  10. What are the uses of the exec command in shell scripts?

    tags: shell, unix, exec

    182 votes, 2 answers and 204064 views

    \r\n Can anyone explain what are the uses of the exec command in shell scripting with simple examples?\r\n