See what the Stackoverflow community is most excited about today.
Date: 2017-10-31
-
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
-
Does Python's time.time() return the local or UTC timestamp?
tags: python, time, timezone
307 votes, 6 answers and 559073 views
\r\n Does time.time() in the Python time module return the system's time or the time in UTC?\r\n
-
Get type name without full namespace in C#
tags: c#, namespaces, typeof
194 votes, 6 answers and 88948 views
\r\n I have the following code:\n\nreturn "[Inserted new " + typeof(T).ToString() + "]";\r\nBut\n\n typeof(T).ToString()\r\nreturns the full name including namespace\n\nIs there anyway to just get the class name (...\r\n
-
tags: postgresql, auto-increment
409 votes, 7 answers and 421839 views
\r\n I'm switching from MySQL to PostgreSQL and was wondering how I can do autoincrement values. I saw in the PostgreSQL docs a datatype "serial", but I get syntax errors when using it (in v8.0).\r\n
-
What are First and Second Level caching in Hibernate?
tags: nhibernate, hibernate
190 votes, 7 answers and 143669 views
\r\n Can anyone explain in simple words what First and Second Level caching in Hibernate are?\r\n
-
How do I commit case-sensitive only filename changes in Git?
tags: git, case-sensitive, git-commit, git-config
657 votes, 9 answers and 127170 views
\r\n I have changed a few files name by de-capitalize the first letter, as in Name.jpg to name.jpg. Git does not recognize this changes and I had to delete the files and upload them again. Is there a way ...\r\n
-
Throw away local commits in git
tags: git
752 votes, 9 answers and 396483 views
\r\n Due to some bad cherry-picking, my local git repository is currently 5 commits ahead of the origin, and not in a good state. I want to get rid of all these commits and start over again.\n\nObviously, ...\r\n
-
I ran into a merge conflict. How can I abort the merge?
tags: git, version-control, git-merge, merge-conflict-resolution, git-conflict-resolution
1601 votes, 9 answers and 898815 views
\r\n I used git pull and had a merge conflict. I know that the other version of the file is good and that mine is bad so all my changes should be abandoned. How do I do this?\n\nunmerged: _widget.html.erb\n\n...\r\n
-
Does swift have a trim method on String?
tags: string, swift, trim
228 votes, 12 answers and 97853 views
\r\n Does swift have a trim method on String? For example:\n\nlet result = " abc ".trim()\n// result == "abc"\r\n
-
Remove specific characters from a string in python
tags: python, string, immutability
293 votes, 22 answers and 688416 views
\r\n I'm trying to remove specific characters from a string using python. This is the code I'm using right now. Unfortunately it appears to do nothing to the string.\n\nfor char in line:\n if char in " ?.!/...\r\n