This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typeof NaN === 'number' // true | |
Infinity === 1/0 // true | |
0.1 + 0.2 === 0.3 // false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Are you using the BASH shell? | |
echo $SHELL # /bin/bash | |
# | |
# Day-to-day shortcuts for the BASH shell | |
# --------------------------------------- | |
# | |
# up/down arrows => View your command history | |
# | |
# tab => Auto-complete file and directory names from ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Show all tags | |
git tag | |
# Create tag | |
git tag <tag_name> <branch_name - default is current branch> | |
# Checkout a tag | |
git checkout <tag_name> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Method Signature | |
// | |
- (BOOL)searchFor:(NSString *)string | |
direction:(BOOL)forward | |
caseSensitive:(BOOL)caseFlag | |
wrap:(BOOL)wrapFlag | |
// Selector (Method Name) | |
// | |
searchFor:direction:caseSenstitive:wrap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Local Branch | |
# ============ | |
# Create | |
git branch my_feature | |
git checkout -b my_feature | |
# Delete | |
git branch -d my_feature | |
# Remote Branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <typeinfo> | |
using namespace std; | |
int myNumber = 5; | |
const char *name1 = typeid(int).name(); // i on gcc, int on VSC++ | |
const char *name2 = typeid(myNumber).name(); // i on gcc, int on VSC++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Uncomment to disable assertions. | |
// NDEBUG macro must be defined before #include <assert.h> | |
// #define NDEBUG | |
#include <assert.h> | |
int main (int argc, char * const argv[]) { | |
int *goodInteger = new int(2); | |
int *badInteger = NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> // printf function | |
class SuperClass | |
{ | |
public: | |
SuperClass(int foo) | |
{ | |
printf("SuperClass constructor fired with value %d\n", foo); | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
// Class Definition | |
// | |
class MyClass | |
{ | |
public: | |
void print(int value1, int value2 = 200); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// A quick and dirty fix to issue #51 | |
// | |
- (void)applicationDidFinishLaunching:(UIApplication *)application | |
{ | |
CGRect windowFrame = [ [ UIScreen mainScreen ] bounds ]; | |
CGRect webViewFrame = [ [ UIScreen mainScreen ] applicationFrame ]; | |
webViewFrame.origin = windowFrame.origin; | |
self.window = [ [ [ UIWindow alloc ] initWithFrame:windowFrame ] autorelease ]; |
OlderNewer