Skip to content

Latest commit

 

History

History
97 lines (43 loc) · 4.91 KB

2017-11-27.md

File metadata and controls

97 lines (43 loc) · 4.91 KB

Trending in Stackoverflow

See what the Stackoverflow community is most excited about today.

Date: 2017-11-27

  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. Why is [] faster than list()?

    tags: python, performance, list, instantiation, literals

    543 votes, 5 answers and 60291 views

    \r\n I recently compared the processing speeds of [] and list() and was surprised to discover that [] runs more than three times faster than list(). I ran the same test with {} and dict() and the results ...\r\n

  3. Create a GUID in Java

    tags: java, guid

    244 votes, 6 answers and 235692 views

    \r\n What are some of the best ways to create a GUID in Java?\r\n

  4. Android DialogFragment vs Dialog

    tags: android, android-fragments, android-dialog, android-dialogfragment

    194 votes, 6 answers and 109231 views

    \r\n Google recommends that we use DialogFragment instead of a simple Dialog by using Fragments API, but it is absurd to use an isolated DialogFragment for a simple Yes-No confirmation message box. What is ...\r\n

  5. Using curl to upload POST data with files

    tags: file, curl, post, file-upload

    242 votes, 6 answers and 349384 views

    \r\n I would like to use cURL to not only send data parameters in HTTP POST but to also upload files with specific form name. How should I go about doing that ?\n\nHTTP Post parameters:\n\nuserid = 12345\n...\r\n

  6. How to deal with SettingWithCopyWarning in Pandas?

    tags: python, parsing, pandas, dataframe

    197 votes, 7 answers and 177963 views

    \r\n Background\n\nI just upgraded my Pandas from 0.11 to 0.13.0rc1. Now, the application is popping out many new warnings. One of them like this:\n\nE:\FinReporter\FM_EXT.py:449: SettingWithCopyWarning: A ...\r\n

  7. Why do we usually use || not |, what is the difference?

    tags: java, bitwise-operators

    182 votes, 27 answers and 61299 views

    \r\n I'm just wondering why we usually use logical OR || between two booleans not bitwise OR |, though they are both working well.\n\nI mean, look at the following:\n\nif(true | true) // pass\nif(true | ...\r\n

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

  9. How to get the number of elements in a list in Python?

    tags: python, list

    1295 votes, 8 answers and 1981356 views

    \r\n items = []\nitems.append("apple")\nitems.append("orange")\nitems.append("banana")\n\n# FAKE METHOD::\nitems.amount() # Should return 3\r\nHow do I get the number of elements in the list?\r\n

  10. Remove accents/diacritics in a string in JavaScript

    tags: javascript, diacritics

    191 votes, 25 answers and 120099 views

    \r\n How do I remove accentuated characters from a string? \nEspecially in IE6, I had something like this:\n\naccentsTidy = function(s){\n var r=s.toLowerCase();\n r = r.replace(new RegExp(/\s/g),"");\n ...\r\n