This file contains hidden or 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
Do this... | ...when you see this message | |
---|---|---|
⌘B Build | ...<some long message>. Build again to continue. | |
⌘⇧K Clean | ...received multiple target ended messages for target ID... | |
⌘⇧K Clean | ...targetID (174) not found in _activeTargets... | |
File > Packages > Resolve Package Versions | ...unable to load transferred PIF: The workspace contains multiple references with the same GUID PACKAGE:1YZON8U0E6OSQJJ6SVU... | |
Close and reopen project (Clean will fail) | ...unknown error while handling message: unknownSession(handle: S0)... | |
Restart Xcode (Clean will fail) | ...unknown error while handling message: MsgHandlingError(message: unable to initiate PIF transfer session (operation in progress?)) | |
Restart Xcode | Clean failed. | |
Quit the Simulator and re-run test/s | Failed to establish communication with the test runner. (Underlying Error: Simulator indicated unix domain socket for testmanagerd at path [...]/com.apple.testmanagerd.unix-domain.socket, but no file was found at that path.) |
This file contains hidden or 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
let stream = CGDisplayStream(display: CGDirectDisplayID(), outputWidth: 1, outputHeight: 1, pixelFormat: Int32(kCVPixelFormatType_32BGRA), properties: nil, handler: { (status, time, surface, update) in | |
// do nothing | |
}) |
This file contains hidden or 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
https://youtu.be/-C-JoyNuQJs?t=39m45s | |
When I put the reference implementation onto the website I needed to | |
put a software license on it. | |
And I looked at all the licenses that were available, and there were a lot | |
of them. And I decided that the one I liked the best was the MIT License, | |
which was a notice that you would put on your source and it would say, | |
"you're allowed to use this for any purpose you want, just leave the | |
notice in the source and don't sue me." |
This file contains hidden or 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
# create an UDP server using nc on port 11090 | |
nc -ul 11090 | |
# check whether an UDP server is listening on 11190 | |
nc -vz -u <hostname> 11090 | |
# send a packet to the UDP server | |
echo -n "hello" | nc -4u -w1 <hostname> 1118 |
This file contains hidden or 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 xcrun swift -i | |
import Foundation | |
import Darwin.ncurses | |
initscr() // Init window. Must be first | |
cbreak() | |
noecho() // Don't echo user input | |
nonl() // Disable newline mode | |
intrflush(stdscr, true) // Prevent flush |
This file contains hidden or 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 swift | |
// Run this command line tool as a dynamic script or compile a binary | |
// using the following command: | |
// swiftc -sdk `xcrun --show-sdk-path` LocateMe.swift | |
import Cocoa | |
import CoreLocation | |
extension String { |
This file contains hidden or 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 xcrun swift | |
import Foundation | |
struct Teammate { | |
let name: String | |
let weighting: Int | |
} | |
let teammates = [ |