Since iOS 9 UIApplication.sharedApplication().statusBarHidden
is deprecated. Use UIApplication.sharedApplication().statusBarFrame.size == CGSizeZero
instead.
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
Object.prototype.extend = function (object) { | |
var Constructor = object.initialize; | |
Constructor.prototype = Object.create(this.prototype); | |
Object.keys(object).forEach(function (key) { | |
if (key !== "initialize") { | |
Constructor.prototype[key] = object[key]; | |
} | |
}); |
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
module Main where | |
import Prelude hiding (until) | |
-- import System.CPUTime | |
-- 2.1 Semantic Domains | |
type Time = Double | |
type Behavior a = Time -> a | |
type Event a = (Time, a) | |
-- type Events a = [Event a] |
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
#!/usr/bin/env runhaskell | |
import Data.Either (either) | |
import Network.HTTP (simpleHTTP, getRequest, rspBody) | |
main :: IO () | |
main = simpleHTTP (getRequest "http://www.wikipedia.org/") >>= print . either show rspBody |
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
#ifndef ENDIAN_H | |
#define ENDIAN_H | |
#ifndef LITTLE_ENDIAN | |
#define LITTLE_ENDIAN 0 | |
#endif | |
#ifndef BIG_ENDIAN | |
#define BIG_ENDIAN 1 | |
#endif |
For some strange reason, JavaScript code folding in TextMate is limited to functions; leaving out JSON, simple statements delimited by brackets, and arrays.
In order to change this behaviour, open up the Bundle Editor (Bundles → Bundle Editor → Show Bundle Editor). From the dropdown menu in the top left corner select 'Languages', expand 'JavaScript' (click the triangle) and choose the JavaScript Language Grammar (the item with the L next to it). Find 'foldingStartMarker' and 'foldingStopMarker' in the list on the right and replace their values with:
foldingStartMarker = '\{\s*$|\[\s*$|\(\s*$';
foldingStopMarker = '^\s*}|^\s*]|^\s*)';
NewerOlder