Why is python setup.py saying invalid command 'bdist_wheel' on Travis CI?
My Python package has a `setup.py` which builds fine locally on Ubuntu Trusty and on a fresh Vagrant Ubuntu Trusty VM when I provision it like this: ``` sudo apt-get install python python-dev --force...
Check if an array contains any element of another array in JavaScript
I have a target array `["apple","banana","orange"]`, and I want to check if other arrays contain any one of the target array elements. For example: ``` ["apple","grape"] //returns true; ["apple",...
- Modified
- 21 Jul at 06:29
Permission denied (publickey) when deploying heroku code. fatal: The remote end hung up unexpectedly
I'm attempting to deploy my code to heroku with the following command line: ``` git push heroku master ``` but get the following error: ``` Permission denied (publickey). fatal: The remote end hun...
- Modified
- 14 Jan at 17:48
C# loop - break vs. continue
In a C# (feel free to answer for other languages) loop, what's the difference between `break` and `continue` as a means to leave the structure of the loop, and go to the next iteration? Example: ``` f...
- Modified
- 7 Jul at 20:59
How can I compare numbers in Bash?
I'm unable to get numeric comparisons working: ``` echo "enter two numbers"; read a b; echo "a=$a"; echo "b=$b"; if [ $a \> $b ]; then echo "a is greater than b"; else echo "b is greater tha...
Func vs. Action vs. Predicate
With real examples and their use, can someone please help me understand: 1. When do we need a Func<T, ..> delegate? 2. When do we need an Action<T> delegate? 3. When do we need a Predicate<T> delegat...
How do I convert an existing callback API to promises?
I want to work with promises but I have a callback API in a format like: ### 1. DOM load or other one time event: ``` window.onload; // set to callback ... window.onload = function() { }; ``` ...
- Modified
- 2 Oct at 14:8
Git for beginners: The definitive practical guide
Ok, after seeing [this post by PJ Hyett](https://stackoverflow.com/questions/315911/git-for-beginners-the-definitive-practical-guide/2678236#2678236), I have decided to skip to the end and go with [Gi...
- Modified
- 23 May at 12:34
Xcode 7 error: "Missing iOS Distribution signing identity for ..."
I tried to upload my App to iTunes Connect resp. AppStore and got the following error: > Failed to locate or generate matching signing assetsXcode attempted to locate or generate matching signing asse...
- Modified
- 3 Dec at 14:1
Is there a way to get version from package.json in nodejs code?
Is there a way to get the version set in `package.json` in a nodejs app? I would want something like this ``` var port = process.env.PORT || 3000 app.listen port console.log "Express server listening...
- Modified
- 1 Jul at 15:46
git add only modified changes and ignore untracked files
I ran "git status" and listed below are some files that were modified/or under the heading "changes not staged for commit". It also listed some untracked files that I want to ignore (I have a ".gitign...
How do I save a stream to a file in C#?
I have a `StreamReader` object that I initialized with a stream, now I want to save this stream to disk (the stream may be a `.gif` or `.jpg` or `.pdf`). Existing Code: ``` StreamReader sr = new Str...
How do I update/upgrade pip itself from inside my virtual environment?
I'm able to update pip-managed packages, but how do I update pip itself? According to `pip --version`, I currently have pip 1.1 installed in my virtualenv and I want to update to the latest version. ...
- Modified
- 13 Dec at 10:19
How to check whether a string contains a substring in Ruby
I have a string variable with content: ``` varMessage = "hi/thsid/sdfhsjdf/dfjsd/sdjfsdn\n" "/my/name/is/balaji.so\n" "call::myFunction(int const&)\n" ...
How do I get extra data from intent on Android?
How can I send data from one activity (intent) to another? I use this code to send data: ``` Intent i=new Intent(context,SendMessage.class); i.putExtra("id", user.getUserAccountId()+""); i.putExtra(...
- Modified
- 22 Nov at 11:48
How to sleep for five seconds in a batch file/cmd
Windows's Snipping tool can capture the screen, but sometimes I want to capture the screen after five seconds, such as taking an image being displayed by the webcam. (Run the script and smile at the c...
- Modified
- 15 Jun at 15:51
Addressing localhost from a VirtualBox virtual machine
I have a local test/development server (HTTP, of course), listening to port 8000. I'm working on Linux, so to test the page on Internet Explorer 6, 7, 8, etc. I run a virtual machine using VirtualBox...
- Modified
- 19 Aug at 06:37
What is a 'workspace' in Visual Studio Code?
For example, Visual Studio Code talks about [applying settings at the user level vs the workspace level](https://code.visualstudio.com/docs/getstarted/settings). On the one hand, - - The page referen...
- Modified
- 22 Oct at 20:10
How do you write multiline strings in Go?
Does Go have anything similar to Python's multiline strings: ``` """line 1 line 2 line 3""" ``` If not, what is the preferred way of writing strings spanning multiple lines?
How can I delete all local Docker images?
I recently started using Docker and never realized that I should use `docker-compose down` instead of `ctrl-c` or `docker-compose stop` to get rid of my experiments. I now have a large number of unnee...
- Modified
- 31 Aug at 12:52
How can I print a circular structure in a JSON-like format?
I have a big object I want to convert to JSON and send. However it has circular structure, so if I try to use `JSON.stringify()` I'll get: > TypeError: Converting circular structure to JSON or > TypeE...
- Modified
- 14 Feb at 17:45
How to remove all duplicates from an array of objects?
I have an object that contains an array of objects. ``` obj = {}; obj.arr = new Array(); obj.arr.push({place:"here",name:"stuff"}); obj.arr.push({place:"there",name:"morestuff"}); obj.arr.push({plac...
- Modified
- 1 Dec at 16:20
Count(*) vs Count(1) - SQL Server
Just wondering if any of you people use `Count(1)` over `Count(*)` and if there is a noticeable difference in performance or if this is just a legacy habit that has been brought forward from days gone...
- Modified
- 4 Jan at 09:43
How can I get the assembly file version
In `AssemblyInfo` there are two assembly versions: 1. AssemblyVersion: Specify the version of the assembly being attributed. 2. AssemblyFileVersion: Instructs a compiler to use a specific version nu...
- Modified
- 9 Jul at 15:26