I hereby claim:
- I am PadraigK on github.
- I am padraig (https://keybase.io/padraig) on keybase.
- I have a public key whose fingerprint is CF1A 2C80 34ED 2A2A 8BD9 BD70 85D7 D932 29A7 0242
To claim this, I am signing this object:
| (ns bird-watcher) | |
| (def last-week [0 2 5 3 7 8 4]) | |
| (defn today [birds] | |
| (last birds)) | |
| (defn safe-last-index [v] | |
| (if (empty? v) | |
| nil ; or some appropriate value |
| diff --git a/generated-builtin/Projection.swift b/generated-builtin/Projection.swift | |
| index 6f259ab..2141aa9 100644 | |
| --- a/generated-builtin/Projection.swift | |
| +++ b/generated-builtin/Projection.swift | |
| @@ -24,12 +24,12 @@ public struct Projection: Equatable, Hashable, GodotVariant { | |
| public var z: Vector4 | |
| public var w: Vector4 | |
| public enum Planes: Int { | |
| - case planeNear = 0 // PLANE_NEAR | |
| - case planeFar = 1 // PLANE_FAR |
| // Example of wrapping `UIApplication.keyboardDidShowNotification` payload | |
| struct KeyboardDidShowPayload { | |
| let keyboardFrameBegin: CGRect? | |
| let keyboardFrameEnd: CGRect? | |
| } | |
| extension NotificationWrapper where Payload == KeyboardDidShowPayload { | |
| @MainActor static let keyboardDidShow: Self = .init( | |
| name: UIApplication.keyboardDidShowNotification, |
| func makeOrReuse<T : IdentifierCellView>(_ cellType: T.Type, tableView: NSTableView) -> T | |
| func makeOrReuse<T : IdentifierCellView>(tableView: NSTableView) -> T | |
| // IMHO: The first signature is vastly superior even though the first argument is unncessary. | |
| // Think about the call sites | |
| let cell = makeOrReuse(ImageExportOptionCells.Toggle.self, tableView: tableView) |
| /* | |
| Instead of this... | |
| CGFloat minConstant = -60.0f; | |
| CGFloat maxConstant = self.actionViewDefaultBottomConstraintConstant; | |
| CGFloat stuckConstant = maxConstant - distanceToBottom; | |
| // :chefpoop: | |
| actionViewBottomContraintConstant = fminf(maxConstant, fmaxf(minConstant, stuckConstant)); | |
| */ |
| Please go to | |
| https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/apps/[APP_ID]/promocodes/versions | |
| (with [APP_ID] set properly) | |
| and email us the JSON ([email protected]) |
I hereby claim:
To claim this, I am signing this object:
| func rangeOfPixelsForRow(row: Int) -> Range<Int> | |
| { | |
| return row * imageSize.width..(row+1)*imageSize.width | |
| } | |
| func rangeOfPixelsForColumn(column: Int) -> StridedRangeGenerator<Int> | |
| { | |
| return (column..imageSize.height*imageSize.width).by(imageSize.width) | |
| } |
| CGColorSpaceRef cs = CGColorSpaceCreateDeviceRGB(); | |
| CGContextRef bmContext = CGBitmapContextCreate(NULL, width, height, 8, 4 * width, cs, (CGBitmapInfo) kCGImageAlphaNoneSkipLast); | |
| CGContextDrawImage(bmContext, (CGRect){.origin.x = 0.0f, .origin.y = 0.0f, .size.width = width, .size.height = height}, imageRep); | |
| CGColorSpaceRelease(cs); | |
| RGBAPixel *pixels = (RGBAPixel*)CGBitmapContextGetData(bmContext); | |
| // Outputting the first 10 pixels on different hardware (iPad Air, iPhone 5, Simulator) gives slightly differing pixel values. | |
| // I am confuse. |