I hereby claim:
- I am krzak on github.
- I am krzyzanowskim (https://keybase.io/krzyzanowskim) on keybase.
- I have a public key whose fingerprint is BA96 CBDD 1862 7D9A 6884 AA0A 979E 4B03 DFFE 30C6
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
### Keybase proof | |
I hereby claim: | |
* I am krzyzanowskim on github. | |
* I am krzyzanowskim (https://keybase.io/krzyzanowskim) on keybase. | |
* I have a public key whose fingerprint is BA96 CBDD 1862 7D9A 6884 AA0A 979E 4B03 DFFE 30C6 | |
To claim this, I am signing this object: |
// I found that when intagrate C API, something strange happending with function declarations | |
struct testswitf | |
{ | |
int (*va_args)(int *I) | |
}; | |
// end with strange error | |
// <unknown>:0: error: file.h:100: expected ')' | |
// <unknown>:0: note: file.h:100: to match this '(' |
import Foundation | |
class Foo { | |
let length = 255 | |
// !!! not like this because self.length can't be used here | |
// var arrayConstantLength = [Byte](count:self.length, repeatedValue:0) | |
// but like this (with lazy I can use self.length constant) | |
lazy var arrayConstantLength:[Byte] = { |
// Playground - noun: a place where people can play | |
import Foundation | |
/** Protocol and extensions for integerFromBitsArray. Bit hakish for me, but I can't do it in any other way */ | |
protocol Initiable { | |
init(_ v: Int) | |
init(_ v: UInt) | |
} |
let array = ["P","Q","R","S","T","P","R","A","T","B","C","P","P","P","P","P","C","P","P","J"] | |
let unique = array.reduce([String](), combine: { (array, value) -> [String] in | |
var result = array | |
if (!contains(array, value)) { | |
result.append(value) | |
} | |
return result | |
}) |
// Marcin Krzyżanowski | |
#import <CommonCrypto/CommonCryptor.h> | |
@interface NSData (AES) | |
- (NSData *)AES128EncryptWithKey:(NSString *)key iv:(NSString *)iv; | |
@end | |
@implementation NSData (AES) |
// Playground - noun: a place where people can play | |
import Foundation | |
func numberOfBits(bytes:[Byte]) -> Int { | |
if (bytes.count == 0) { | |
return 0; | |
} | |
var toRemove = 0; |
class Foo { | |
var some:String = "string" | |
func One() { | |
func Nested(weakSelf:Foo) { | |
if (weakSelf.some == "integer") { // no error | |
} | |
} | |
// Version 6.3 (6D532l) | |
protocol Proto { | |
init() | |
} | |
struct S1: Proto { | |
init() {} | |
} |