Skip to content

Latest commit

 

History

History
97 lines (43 loc) · 5.04 KB

2017-11-11.md

File metadata and controls

97 lines (43 loc) · 5.04 KB

Trending in Stackoverflow

See what the Stackoverflow community is most excited about today.

Date: 2017-11-11

  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. Getting a map() to return a list in Python 3.x

    tags: python, list, python-3.x, map-function

    267 votes, 7 answers and 162121 views

    \r\n I'm trying to map a list into hex, and then use the list elsewhere. In python 2.6, this was easy:\n\nA: Python 2.6:\n\n>>> map(chr, [66, 53, 0, 94])\n['B', '5', '\x00', '^']\r\nHowever, on Python 3....\r\n

  3. Why is this C++ code faster than my hand-written assembly for testing the Collatz conjecture?

    tags: c++, performance, assembly, optimization, x86

    631 votes, 11 answers and 105535 views

    \r\n I wrote these two solutions for Project Euler Q14, in assembly and in C++. They are the same identical brute force approach for testing the Collatz conjecture. The assembly solution was assembled with\n...\r\n

  4. Best way to create enum of strings?

    tags: java, enums

    267 votes, 7 answers and 323378 views

    \r\n What is the best way to have a enum type represent a set of strings?\n\nI tried this:\n\nenum Strings{\n STRING_ONE("ONE"), STRING_TWO("TWO")\n}\r\nHow can I then use them as Strings?\r\n

  5. Using Node.JS, how do I read a JSON object into (server) memory?

    tags: javascript, json, node.js

    315 votes, 7 answers and 268850 views

    \r\n Background\n\nI am doing some experimentation with Node.js and would like to read a JSON object, either from a text file or a .js file (which is better??) into memory so that I can access that object ...\r\n

  6. Use a list of values to select rows from a pandas dataframe [duplicate]

    tags: python, pandas

    269 votes, 1 answers and 203075 views

    \r\n Possible Duplicate:\n how to filter the dataframe rows of pandas by “within”/“in”? \r\nLets say I have the following pandas dataframe:\n\ndf = DataFrame({'A' : [5,6,3,4], 'B' : [1,...\r\n

  7. How do I remove/delete a virtualenv?

    tags: python, virtualenv, virtualenvwrapper, virtualenv-commands

    227 votes, 8 answers and 186002 views

    \r\n I created an environment with the following command: virtualenv venv --distribute\n\nI cannot remove it with the following command: rmvirtualenv venv -\nThis is part of virtualenvwrapper as mentioned in ...\r\n

  8. How to print a class or objects of class using print()?

    tags: python, class, printing, object

    312 votes, 8 answers and 378615 views

    \r\n I am learning the ropes in Python. When I try to print an object of class Foobar using the print() function, I get an output like this:\n\n<main.Foobar instance at 0x7ff2a18c>\r\nIs there a way ...\r\n

  9. uncaught syntaxerror unexpected token U JSON

    tags: json

    193 votes, 9 answers and 173124 views

    \r\n I get this error "uncaught syntaxerror unexpected token U" when I run my page in chrome. And in firefox I get, "JSON.parse: unexpected character". I'm returning the json data from a php file and the ...\r\n

  10. Python Time Seconds to h:m:s

    tags: python

    268 votes, 7 answers and 178860 views

    \r\n I have a function that returns information in seconds, but I need to store that information in hours:minutes:seconds. Is there an easy way to convert the seconds to this format in python?\r\n