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
| NSUserDefaults* def = [NSUserDefaults standardUserDefaults]; | |
| for(NSString* key in @[@"pastDevicesKey", @"SessionIdHistory", @"UserIdHistory"]) | |
| { | |
| id obj = [def objectForKey:key]; | |
| // These must be NSData. | |
| if ([obj isKindOfClass:[NSString class]]) | |
| { | |
| NSLog(@"Removed dodgy %@ key from NSUSerDefaults", key); |
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
| using UnityEngine; | |
| using System.Collections; | |
| public class LoadMain : MonoBehaviour | |
| { | |
| static int i = 0; | |
| void OnEnable() | |
| { | |
| if(i++ == 0) |
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
| @interface FBLogin : NSObject | |
| +(FBSDKLoginManager*) Instance; | |
| @end | |
| @implementation FBLogin | |
| +(FBSDKLoginManager*) Instance { | |
| static FBSDKLoginManager* instance = nil; | |
| if(instance == nil) |
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
| class Renderer { | |
| public: | |
| void Cube(Mat44 transform, Canvas canvas) { | |
| // bunch of OpenGL calls. | |
| } | |
| // Overload without a texture. | |
| void cube(Mat44 transform) { |
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
| Parser.prototype.interpret = function(input, offset, depth, parent, linenumber) { | |
| depth = depth || 0; | |
| offset = offset || 0; | |
| parent = parent || null; | |
| var PAREN_START = '('; | |
| var PAREN_END = ')'; | |
| var CHAIN = '.'; | |
| var COMMA = ','; | |
| var ALIAS = '='; | |
| var NEWLINE = '\n'; |
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
| console.clear(); | |
| function f(x) { | |
| return 3 + Math.pow(x, 2); | |
| } | |
| var w = 2; | |
| var h = 4; |
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
| console.clear(); | |
| var g = []; | |
| // Adjacency list representation of a graph | |
| g[0] = [1, 3]; | |
| g[1] = [0, 2]; | |
| g[2] = [1, 3, 4]; | |
| g[3] = [0, 2, 4]; | |
| g[4] = [2, 3]; |
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
| console.clear(); | |
| var n = 9; // Group modulo | |
| var out = " "; | |
| for(var i = 0; i < n; ++i) { | |
| out += Pad(i) + " "; | |
| } |
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
| Final: | |
| 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 |
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
| class Portfolio extends Composite { | |
| public function __construct() { | |
| parent::__construct(); | |
| $this->addChild( | |
| new Storage(), | |
| new Template("../views/head.html"), | |
| new Menu( |
NewerOlder