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
// | |
// NSCondition-WaitUntilDate-Example.m | |
// NSConditionExample | |
// | |
// Created by Prachi Gauriar on 12/23/2013. | |
// Copyright (c) 2013 Prachi Gauriar. | |
// | |
// 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 |
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
// | |
// QLCDispatchAsyncWithCompletionAndTimeout.m | |
// Blocks-WaitUntilDate | |
// | |
// Created by Prachi Gauriar on 12/23/2013. | |
// Copyright (c) 2013 Prachi Gauriar. | |
// | |
// 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 |
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
// | |
// main.m | |
// ReverseString | |
// | |
// Created by Prachi Gauriar on 3/23/2014. | |
// Copyright (c) 2014 Prachi Gauriar. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <URLMock/UMKTestUtilities.h> |
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
#!/bin/sh | |
plutil -convert json -r -o - - | python -m json.tool |
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
// | |
// SynchronousSubworkflowTask.h | |
// SynchronousSubworkflowTask | |
// | |
// Created by Prachi Gauriar on 1/5/2015. | |
// Copyright (c) 2015 Prachi Gauriar. All rights reserved. | |
// | |
#import <Task/Task.h> |
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 Foundation | |
/// Example error | |
enum MyError : Error { | |
case error1 | |
} | |
/// Boxes error in a struct | |
struct ErrorBox<BoxedError: Error> { |
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 Foundation | |
extension Calendar { | |
func startOfNextDay(for date: Date) -> Date? { | |
let start = startOfDay(for: date) | |
return self.date(byAdding: .day, value: 1, to: start) | |
} | |
func endOfDay(for date: Date) -> Date? { |
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 Foundation | |
struct DoubleItem : Codable { | |
var name: String | |
var price: Double | |
} | |
struct DecimalItem : Codable { | |
var name: String | |
var price: Decimal |
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 Foundation | |
public enum Result<Value> { | |
case success(Value) | |
case failure(Error) | |
} | |
// Parent Protocol | |
public protocol Handler { |
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
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP | |
* frame #0: 0x0000000185297568 libsystem_kernel.dylib`mach_msg_trap + 8 | |
frame #1: 0x00000001852973e0 libsystem_kernel.dylib`mach_msg + 72 | |
frame #2: 0x0000000107482710 libdispatch.dylib`_dispatch_mach_send_and_wait_for_reply + 644 | |
frame #3: 0x0000000107482bbc libdispatch.dylib`dispatch_mach_send_with_result_and_wait_for_reply + 56 | |
frame #4: 0x0000000185407d7c libxpc.dylib`xpc_connection_send_message_with_reply_sync + 196 | |
frame #5: 0x00000001857135a8 CoreFoundation`__78-[CFPrefsPlistSource sendRequestNewDataMessage:toConnection:retryCount:error:]_block_invoke + 24 | |
frame #6: 0x0000000185741ed4 CoreFoundation`CFPREFERENCES_IS_WAITING_FOR_SYSTEM_CFPREFSD + 48 | |
frame #7: 0x00000001857134ec CoreFoundation`-[CFPrefsPlistSource sendRequestNewDataMessage:toConnection:retryCount:error:] + 256 | |
frame #8: 0x0000000185711640 CoreFoundation`-[CFPrefsPlistSource handleErrorReply:fromMessageSettingKey:toValue:retryCount: |
OlderNewer