Skip to content

Latest commit

 

History

History
97 lines (43 loc) · 5.01 KB

2017-12-09.md

File metadata and controls

97 lines (43 loc) · 5.01 KB

Trending in Stackoverflow

See what the Stackoverflow community is most excited about today.

Date: 2017-12-09

  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 can I open multiple files using “with open” in Python?

    tags: python, file-io

    400 votes, 4 answers and 137935 views

    \r\n I want to change a couple of files at one time, iff I can write to all of them. I'm wondering if I somehow can combine the multiple open calls with the with statement:\n\ntry:\n with open('a', 'w') as a ...\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. getWidth() and getHeight() of View returns 0

    tags: java, android, android-layout, getter

    330 votes, 8 answers and 216966 views

    \r\n I am creating all of the elements in my android project dynamically. I am trying to get the width and height of a button so that I can rotate that button around. I am just trying to learn how to work ...\r\n

  5. What is the correct way to check for string equality in JavaScript?

    tags: javascript, string

    510 votes, 8 answers and 618852 views

    \r\n What is the correct way to check for equality between Strings in JavaScript?\r\n

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

  7. How can I select an element in a component template?

    tags: angular, typescript, angular2-components

    230 votes, 10 answers and 239345 views

    \r\n Does anybody know how to get hold of an element defined in a component template? Polymer makes it really easy with the $ and $$.\n\nI was just wondering how to go about it in Angular 2.\n\nTake the ...\r\n

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

    tags: python, list

    1306 votes, 10 answers and 2000694 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

  9. Accessing the web page's HTTP Headers in JavaScript

    tags: javascript, http, http-headers

    320 votes, 12 answers and 410740 views

    \r\n How do I access a page's HTTP response headers via JavaScript?\n\nRelated to this question, which was modified to ask about accessing two specific HTTP headers.\r\n Related:\n How do I access the HTTP ...\r\n

  10. What is the difference between statically typed and dynamically typed languages?

    tags: programming-languages, static-typing, dynamic-typing

    554 votes, 13 answers and 234373 views

    \r\n I hear a lot that new programming languages are dynamically typed but what does it actually mean when we say a language is dynamically typed vs. statically typed?\r\n