Test iOS app on device without apple developer program or jailbreak
How can I test an iOS application on my iPod Touch without registering for the Apple Developer Program or jailbreaking my iPod? Neither is a viable option at the moment. I'd like to test on the devi...
- Modified
- 24 Apr at 14:48
Bash - How to remove all white spaces from a given text file?
I want to remove all the white spaces from a given text file. Is there any shell command available for this ? Or, how to use `sed` for this purpose? I want something like below: > $ cat hello.txt | se...
What is the difference between NULL, '\0' and 0?
In C, there appear to be differences between various values of zero -- `NULL`, `NUL` and `0`. I know that the ASCII character `'0'` evaluates to `48` or `0x30`. The `NULL` pointer is usually defined...
Best C/C++ Network Library
I haven't done work in C/C++ for a little bit and was just wondering what people's favorite cross platform libraries are to use. I'm looking for something that is a good quick and dirty library as ...
- Modified
- 23 Sep at 03:27
Find and remove objects in an array based on a key value in JavaScript
I have been trying several approaches on how to find an object in an array, where ID = var, and if found, remove the object from the array and return the new array of objects. ``` [ {"id":"88","n...
- Modified
- 13 Jan at 00:34
Python speed testing - Time Difference - milliseconds
What is the proper way to compare 2 times in Python in order to speed test a section of code? I tried reading the API docs. I'm not sure I understand the timedelta thing. So far I have this code: ``...
- Modified
- 19 Apr at 23:8
Reverse of JSON.stringify?
I'm stringyfing an object like `{'foo': 'bar'}` How can I turn the string back to an object?
- Modified
- 16 Dec at 09:24
Sort in descending order in PySpark
I'm using PySpark (Python 2.7.9/Spark 1.3.1) and have a dataframe GroupObject which I need to filter & sort in the descending order. Trying to achieve it via this piece of code. ``` group_by_dataframe...
- Modified
- 13 May at 19:4
Check if a div exists with jquery
Yes, I know this has been asked a lot. But, it confuses me, since the results on google for this search show different methods (listed below) ``` $(document).ready(function() { if ($('#DivID').le...
Running multiple async tasks and waiting for them all to complete
I need to run multiple async tasks in a console application, and wait for them all to complete before further processing. There's many articles out there, but I seem to get more confused the more I r...
- Modified
- 5 Feb at 07:21
Get Substring - everything before certain char
I'm trying to figure out the best way to get everything before the - character in a string. Some example strings are below. The length of the string before - varies and can be any length ``` 223232...
ps command doesn't work in docker container
I want to do a ps command in a docker container derived from Debian official Docker hub repository: ``` $ docker run -ti debian:wheezy /bin/bash root@51afd6b09af8:/# ps bash: ps: command not found ``...
How can I alias a default import in JavaScript?
Using ES6 modules, I know I can alias a named import: ``` import { foo as bar } from 'my-module'; ``` And I know I can import a default import: ``` import defaultMember from 'my-module'; ``` I'd lik...
- Modified
- 3 Oct at 18:16
How can I check if a scrollbar is visible?
Is it possible to check the `overflow:auto` of a div? ``` <div id="my_div" style="width: 100px; height:100px; overflow:auto;" class="my_class"> * content </div> ``` ``` $('.my_class').live...
- Modified
- 26 Oct at 17:34
Browserslist: caniuse-lite is outdated. Please run next command `npm update caniuse-lite browserslist`
Recently, when I compile my scss files I get an error. The error message says: > Browserslist: caniuse-lite is outdated. Please run next command `npm update caniuse-lite browserslist` First, as the me...
- Modified
- 12 Sep at 14:36
How do I calculate someone's age in Java?
I want to return an age in years as an int in a Java method. What I have now is the following where getBirthDate() returns a Date object (with the birth date ;-)): ``` public int getAge() { long ...
Firebase (FCM) how to get token
It's my first time using FCM. I download a sample from [firebase/quickstart-android](https://github.com/firebase/quickstart-android) and I install the FCM Quickstart. But I can't get any token from th...
- Modified
- 3 Aug at 11:24
What is the difference between String.slice and String.substring?
Does anyone know what the difference is between these two methods? ``` String.prototype.slice String.prototype.substring ```
- Modified
- 17 Apr at 18:26
Insert at first position of a list in Python
How can I insert an element at the first index of a list? If I use `list.insert(0, elem)`, does `elem` modify the content of the first index? Or do I have to create a new list with the first elem and ...
Transport endpoint is not connected
FUSE is (every 2 - 3 days) giving me this `Transport endpoint is not connected` error on my mount point and the only thing that seems to fix it is rebooting. I currently have my mount points setup l...
How do I do a Date comparison in Javascript?
I would like to compare two dates in javascript. I have been doing some research, but all I can find is how to return the current date. I want to compare 2 separate dates, not related to today. How...
- Modified
- 31 Jan at 07:15
How do I get the list of keys in a Dictionary?
I only want the Keys and not the Values of a Dictionary. I haven't been able to get any code to do this yet. Using another array proved to be too much work as I use remove also.
- Modified
- 30 Jun at 07:53
How to display line numbers in 'less' (GNU)
What is the command to make [less](https://linux.die.net/man/1/less) display line numbers in the left column?
appcompat-v7:21.0.0': No resource found that matches the given name: attr 'android:actionModeShareDrawable'
When attempting to use the latest appcompat-v7 support library in my project, I get the following error: ``` /Users/greg/dev/mobile/android_project/app/build/intermediates/exploded-aar/com.android.su...
- Modified
- 16 Dec at 18:7
Executing an EXE file using a PowerShell script
I'm trying to execute an EXE file using a PowerShell script. If I use the command line it works without a problem (first I supply the name of the executable and series of parameters to invoke it): ``...
- Modified
- 11 Jul at 23:7