This file contains hidden or 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
| * | |
| { | |
| font-family:'Helvetica Neue Light', HelveticaNeue-Light, 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
| font-size: 14px; | |
| font-weight:normal; | |
| font-style: normal; | |
| color: #333333; | |
| text-align: justify; | |
| } |
This file contains hidden or 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
| /* http://paulirish.com/2012/box-sizing-border-box-ftw/ */ | |
| /* apply a natural box layout model to all elements */ | |
| * { | |
| -moz-box-sizing: border-box; | |
| -webkit-box-sizing: border-box; | |
| box-sizing: border-box; | |
| } |
This file contains hidden or 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
| <?php | |
| //ref: http://php.net/manual/en/function.gettext.php | |
| // Set language to German | |
| putenv('LC_ALL=de_DE'); | |
| setlocale(LC_ALL, 'de_DE'); | |
| // Specify location of translation tables | |
| bindtextdomain("myPHPApp", "./locale"); |
This file contains hidden or 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
| // instantiate the singleton only when it's needed, put it's instantiation code inside another constructor function like this: | |
| var Singleton =(function(){ | |
| var instantiated; | |
| function init (){ | |
| // all singleton code goes here | |
| return { | |
| publicWhatever:function(){ | |
| alert('whatever') | |
| }, |
This file contains hidden or 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
| //The following are facades for jQuery's $.ajax(): | |
| $.get( url, data, callback, dataType ); | |
| $.post( url, data, callback, dataType ); | |
| $.getJSON( url, data, callback ); | |
| $.getScript( url, callback ); | |
| //These are translated behind the scenes to: | |
| // $.get() | |
| $.ajax({ |
This file contains hidden or 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
| var s_prim = "foo"; | |
| var s_obj = new String(s_prim); | |
| console.log(typeof s_prim); // Logs "string" | |
| console.log(typeof s_obj); // Logs "object" | |
| //---------------- | |
| s1 = "2 + 2"; // creates a string primitive | |
| s2 = new String("2 + 2"); // creates a String object |
This file contains hidden or 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
| encodeURI() | |
| Use encodeURI when you want a working URL. | |
| Ex: | |
| encodeURI("http://www.google.com/a file with spaces.html"); // produces http://www.google.com/a%20file%20with%20spaces.html | |
| Note: Don't call encodeURIComponent since it would destroy the URL and return | |
| http%3A%2F%2Fwww.google.com%2Fa%20file%20with%20spaces.html | |
This file contains hidden or 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
| - (void)tableView:(UITableView *)theTableView | |
| didSelectRowAtIndexPath:(NSIndexPath *)newIndexPath { | |
| [theTableView deselectRowAtIndexPath:[theTableView indexPathForSelectedRow] animated:NO]; | |
| UITableViewCell *cell = [theTableView cellForRowAtIndexPath:newIndexPath]; | |
| if (cell.accessoryType == UITableViewCellAccessoryNone) { | |
| cell.accessoryType = UITableViewCellAccessoryCheckmark; | |
| // Reflect selection in data model | |
| } else if (cell.accessoryType == UITableViewCellAccessoryCheckmark) { | |
| cell.accessoryType = UITableViewCellAccessoryNone; |
This file contains hidden or 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
| // in the AppDelegate.m, add the following code to the method application:didFinishLaunchingWithOptions | |
| NSURL *ubiq = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil]; | |
| if (ubiq) { | |
| NSLog(@"iCloud access at %@", ubiq); | |
| // TODO: Load document... | |
| } else { | |
| NSLog(@"No iCloud access"); | |
| } |
This file contains hidden or 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
| <html ng-app="myApp"> | |
| <head> | |
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script> | |
| <script type="text/javascript" ng:autobind src="http://code.angularjs.org/1.0.2/angular.js"></script> | |
| <link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/themes/redmond/jquery-ui.css" rel="stylesheet" /> | |
| <script type="text/javascript"> | |
| function MyController() { | |
| this.years = "1950"; |