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
# See: https://regex101.com/r/pIx6E8/10 | |
(?xm)^ # every line | |
U\+([[:xdigit:]]{4,6}) # [1]codepoint | |
\t # separator | |
(k[a-zA-Z0-9_]+) # [2]field key | |
\t # separator | |
(.*) # [3]field value |
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
##### | |
# on a machine with Rust installed | |
##### | |
$ ldd ./target/debug/hello | |
linux-vdso.so.1 (0x00007ffefb7f4000) | |
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9e6e25b000) | |
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f9e6e053000) | |
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9e6de36000) | |
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f9e6dc1f000) |
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 TruffautSupport | |
let layerHosting = """ | |
/* Layer Backed View */ | |
view.wantsLayer = true | |
// this view is now a layer-backed view | |
// the layer hierarchy is considered private and | |
// should NEVER be modified (add or remove sublayers) | |
/* Layer Hosting View */ |
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)drawRect:(NSRect)rect | |
{ | |
// Drawing code here. | |
CGContextRef context = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; | |
CGContextSetTextMatrix(context, CGAffineTransformIdentity); | |
NSAttributedString *str = [[NSAttributedString alloc ] | |
initWithString:@"学习 Core Text. Learning Core Text. 中华人民共和国。" | |
attributes:[NSDictionary dictionaryWithObjectsAndKeys:[NSFont fontWithName:@"Adobe Song Std" size:24.0f], (NSString *)kCTFontAttributeName, [NSNumber numberWithBool:YES], (NSString *)kCTVerticalFormsAttributeName, nil]]; | |
CFAttributedStringRef attrString = (CFAttributedStringRef)str; | |
CTFramesetterRef framesetter = CTFramesetterCreateWithAttributedString(attrString); |
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/bash | |
## Environments | |
# Exit the build pass if any command returns a non-zero value | |
#set -o errexit | |
# Echo commands | |
set -x |
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
protobuf | |
protobuf-2.6.0 | |
protobuf-2.6.1 | |
protobuf-master |
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
[1/49] Compiling /swift.org/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/core/linux/x86_64/Swift.o | |
FAILED: cd /swift.org/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/core && /usr/local/bin/cmake -E make_directory /swift.org/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/core/linux/x86_64 && /usr/local/bin/cmake -E make_directory /swift.org/build/Ninja-ReleaseAssert/swift-linux-x86_64/./lib/swift/linux/x86_64 && /swift.org/swift/utils/line-directive /swift.org/swift/stdlib/public/core/Algorithm.swift /swift.org/swift/stdlib/public/core/ArrayBody.swift /swift.org/swift/stdlib/public/core/ArrayBuffer.swift /swift.org/swift/stdlib/public/core/ArrayBufferProtocol.swift /swift.org/swift/stdlib/public/core/ArrayCast.swift /swift.org/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/core/8/Arrays.swift /swift.org/swift/stdlib/public/core/ArrayType.swift /swift.org/swift/stdlib/public/core/Assert.swift /swift.org/swift/stdlib/public/core/AssertCommon.swift /swift.org/sw |
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
.PHONY: docker | |
.PHONY: build | |
.PHONY: test | |
docker: | |
docker run -it \ | |
-v /Users/eyeplum/Projects/swift.org/:/swift.org \ | |
eyeplum/swift-foundation-dev \ | |
/bin/bash |
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
[84/269] CompileC: CoreFoundation/NumberDate.subproj/CFBigNumber.c | |
FAILED: mkdir -p `dirname ../build/Ninja-DebugAssert/foundation-linux-x86_64/Foundation/CoreFoundation/NumberDate.subproj/CFBigNumber.c.o`; /swift.org/build/Ninja-DebugAssert/llvm-linux-x86_64/bin/clang -fcolor-diagnostics -fdollars-in-identifiers -fblocks -fobjc-runtime=macosx-10.11 -fintegrated-as -fPIC --target=x86_64-linux-gnu -g -O0 -Ibootstrap/common/usr/include -Ibootstrap/common/usr/local/include -Ibootstrap/x86_64-linux-gnu/usr/include -Ibootstrap/x86_64-linux-gnu/usr/local/include -I../build/Ninja-DebugAssert/foundation-linux-x86_64/Foundation -I../build/Ninja-DebugAssert/foundation-linux-x86_64 -I../build/Ninja-DebugAssert/foundation-linux-x86_64/Foundation/usr/lib/swift -I../build/Ninja-DebugAssert/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation -I../build/Ninja-DebugAssert/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation -I../build/Ninja-DebugAssert/foundation-linux-x86_64/Foundation/usr/lib/swi |
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
private func createDisplayLink() { | |
CVDisplayLinkCreateWithActiveCGDisplays(&displayLink) | |
guard let displayLink = displayLink else { | |
return | |
} | |
let callback: CVDisplayLinkOutputCallback = { (_, _, _, _, _, userInfo) -> CVReturn in | |
let myView = Unmanaged<MyView>.fromOpaque(COpaquePointer(userInfo)).takeUnretainedValue() | |
dispatch_async(dispatch_get_main_queue()) { | |
myView.update() |
NewerOlder