See what the Stackoverflow community is most excited about today.
Date: 2017-10-21
-
Key existence check in HashMap
tags: java, hashmap
208 votes, 9 answers and 281372 views
\r\n Is checking for key existence in HashMap always necessary?\n\nI have a HashMap with say a 1000 entries and I am looking at improving the efficiency.\nIf the HashMap is being accessed very frequently, ...\r\n
-
node.js require() cache - possible to invalidate?
tags: node.js
224 votes, 13 answers and 85603 views
\r\n From the node.js documentation:\r\n Modules are cached after the first time they are loaded. This means (among other things) that every call to require('foo') will get exactly the same object returned, ...\r\n
-
How to clone git repository with specific revision/changeset?
tags: git, git-clone, revision
224 votes, 11 answers and 268810 views
\r\n How can I clone git repository with specific revision, something like I usually do in Mercurial:\n\nhg clone -r 3 /path/to/repository\r\n
-
How to mkdir only if a dir does not already exist?
tags: shell, scripting, ksh, aix, mkdir
1071 votes, 11 answers and 606189 views
\r\n I am writing a shell script to run under the KornShell (ksh) on AIX. I would like to use the mkdir command to create a directory. But the directory may already exist, in which case I do not want to do ...\r\n
-
How do you perform wireless debugging in Xcode 9 with iOS 11, Apple TV 4K, etc?
tags: ios, xcode, debugging, ios11, xcode9
194 votes, 11 answers and 36928 views
\r\n Wireless debugging was recently added as a feature in Xcode 9, iOS 11, and tvOS 11. Apple TV 4K doesn't have a USB port, so it requires wireless debugging. How do you perform this wireless debugging ...\r\n
-
Visual Studio 2017 error: Unable to start program, An operation is not legal in the current state
tags: asp.net, asp.net-core, visual-studio-2017
181 votes, 10 answers and 44921 views
\r\n After fresh installation of Visual Studio 2017 I tried to run .NET Core Web project and when trying to run it on Chrome I am getting this error:\r\n Unable to start program, An operation is not legal ...\r\n
-
restrict edittext to single line
tags: android, android-edittext
191 votes, 20 answers and 167411 views
\r\n possible duplicate : android-singleline-true-not-working-for-edittext\n\n<EditText \n android:id="@+id/searchbox" \n android:layout_width="fill_parent"\n android:layout_height="wrap_content"\n ...\r\n
-
How to do paging in AngularJS?
tags: angularjs, pagination
222 votes, 20 answers and 368795 views
\r\n I have a dataset of about 1000 items in-memory and am attempting to create a pager for\nthis dataset, but I'm not sure on how to do this.\n\nI'm using a custom filter function to filter the results, and ...\r\n
-
How to obtain the number of CPUs/cores in Linux from the command line?
tags: linux, bash, cpu
223 votes, 13 answers and 192823 views
\r\n I have this script, but I do not know how to get the last element in the printout:\n\ncat /proc/cpuinfo | awk '/^processor/{print $3}'\r\nThe last element should be the number of CPUs, minus 1.\r\n
-
tags: html, css
666 votes, 15 answers and 865988 views
\r\n Is there any way to disable a link using CSS?\n\nI have a class called current-page and want links with this class to be disabled so that no action occurs when they are clicked.\r\n