See what the Stackoverflow community is most excited about today.
Date: 2017-12-18
-
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
-
tags: c++, c, gcc, cmake
254 votes, 3 answers and 246503 views
\r\n In a GCC compiled project,\r\nhow to run cmake for each target type (debug/release)?\nhow to specify debug and release C/C++ flags using cmake?\nhow to express that the main executable will be compiled ...\r\n
-
Error while installing json gem 'mkmf.rb can't find header files for ruby'
tags: ruby, json, gem
184 votes, 7 answers and 114074 views
\r\n For context, it on a remote server which has a firewall. I'm setting up my environment through a proxy. I have ruby 1.8.7. When I try to gem install..\n\nsudo gem install --http-proxy <host address&...\r\n
-
How to iterate over files in a directory with Bash?
tags: bash, for-loop, filenames
204 votes, 4 answers and 279300 views
\r\n I need to write a script that starts my program with different arguments, but I'm new to Bash. I start my program like this:\n\n./MyProgram.exe Data/data1.txt [Logs/data1_Log.txt].\n\nHere is the ...\r\n
-
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
-
Insert text with single quotes in PostgreSQL
tags: postgresql, insert, special-characters, quotes, stringescapeutils
209 votes, 5 answers and 178137 views
\r\n I have a table test(id,name).\n\nI need to insert values like: user's log, 'my user', customer's.\n\n insert into test values (1,'user's log');\n insert into test values (2,''my users'');\n insert into ...\r\n
-
Converting a Pandas GroupBy object to DataFrame
tags: python, pandas, dataframe, group-by, multi-index
204 votes, 6 answers and 215112 views
\r\n I'm starting with input data like this\n\ndf1 = pandas.DataFrame( { \n "Name" : ["Alice", "Bob", "Mallory", "Mallory", "Bob" , "Mallory"] , \n "City" : ["Seattle", "Seattle", "Portland", "Seattle", "...\r\n
-
What's the difference between implementation and compile in gradle
tags: android, android-studio, gradle, build.gradle, gradle-plugin
197 votes, 2 answers and 28469 views
\r\n After updating to Android Studio 3.0 and creating a new project, I noticed that in build.gradle there is a new way to add new dependencies instead of compile there is implementation and instead of ...\r\n
-
R function for testing if a vector contains a given element
tags: r, vector, r-faq
351 votes, 8 answers and 387787 views
\r\n In R, how do you test a vector to see if it contains a given element?\r\n
-
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