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
/* Copyright 2003-2005 H. Peter Anvin - All Rights Reserved | |
* | |
* Permission is hereby granted, free of charge, to any person | |
* obtaining a copy of this software and associated documentation | |
* files (the "Software"), to deal in the Software without | |
* restriction, including without limitation the rights to use, | |
* copy, modify, merge, publish, distribute, sublicense, and/or | |
* sell copies of the Software, and to permit persons to whom | |
* the Software is furnished to do so, subject to the following | |
* conditions: |
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
// AFSerialization.h | |
// | |
// Copyright (c) 2013 AFNetworking (http://afnetworking.com) | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
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
#import "GPUImageFilterGroup.h" | |
@class GPUImageSaturationFilter; | |
@class GPUImageGaussianBlurFilter; | |
@class GPUImageSolidColorGenerator; | |
@class GPUImageAlphaBlendFilter; | |
typedef enum { | |
GPUImageIOSImageEffectTypeLight, | |
GPUImageIOSImageEffectTypeExtraLight, |
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
function sedmv | |
set ls_flags "-1" | |
set perform_changes yes | |
# the last arg is the pattern. save it, remove it, process flags | |
set pattern $argv[-1] | |
set -e argv[-1] | |
if test $pattern = "" |
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
class Foo { | |
subscript(idxs: Int...) -> Int { | |
get { | |
return idxs.reduce(1, combine: *) | |
} | |
} | |
subscript(idxs: Array<Int>) -> Int { | |
get { | |
return idxs.reduce(1, combine: *) | |
} |
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
func curry<A,B>(fun: (A)->B, arg: A) -> (() -> B) { | |
return { return fun(arg) } | |
} | |
func curry<A,B,C>(fun: (A,B)->C, arg: A) -> ((B) -> C) { | |
return { return fun(arg, $0) } | |
} | |
func square(i: Int) -> Int { return i * i } | |
let sq2 = curry(square, 2) |
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
func onlyIfFoo(str: String, stmt: @auto_closure () -> Any) { | |
if (str == "foo") { | |
stmt() | |
} | |
} | |
onlyIfFoo("bar", println("bar")) | |
onlyIfFoo("foo", println("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
import SpriteKit | |
let arr: SKShapeNode[] = [] | |
let node: SKShapeNode = SKShapeNode() | |
contains(arr, node) |
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
- (void)viewDidLoad | |
{ | |
self.formatter = [NSNumberFormatter new]; | |
self.formatter.numberStyle = NSNumberFormatterCurrencyStyle; | |
self.formatter.partialStringValidationEnabled = YES; | |
self.textField.delegate = self; | |
self.textField.text = [self.formatter editingStringForObjectValue:self.number]; | |
} |
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
> choco install -debug -verbose -y mpv.portable | |
Chocolatey is running on Windows v 6.3.9600.0 | |
Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old". | |
Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old". | |
Command line: "C:\ProgramData\chocolatey\choco.exe" install -debug -verbose -y mpv.portable | |
Received arguments: install -debug -verbose -y mpv.portable | |
NOTE: Hiding sensitive configuration data! Please double and triple | |
check to be sure no sensitive data is shown, especially if copying |
OlderNewer