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
class BooleanClass { | |
void ifTrue(_ trueHandler: () -> Void, else falseHandler: () -> Void) | |
} | |
class TrueBooleanClass { | |
void ifTrue(_ trueHandler: () -> Void, else falseHandler: () -> Void) { | |
trueHandler() | |
} | |
} |
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 FooImages { | |
static let images = [UIImage(named:"foo1"), UIImage(named:"foo1")] | |
} |
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.cpp | |
// CppTargetActionOutlets | |
// | |
// Created by Uli Kusterer on 07.04.17. | |
// Copyright © 2017 Uli Kusterer. All rights reserved. | |
// | |
#include <iostream> | |
#include <functional> |
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/Foundation.h> | |
#import <objc/runtime.h> | |
#include <functional> | |
@class ObjCObject; | |
template<class p1type,class p2type> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd"> | |
<dictionary title="AppleScriptPropertyTest Terminology" xmlns:xi="http://www.w3.org/2003/XInclude"> | |
<xi:include href="file://localhost/System/Library/ScriptingDefinitions/CocoaStandard.sdef" xpointer="xpointer(/dictionary/suite)"/> | |
<suite name="AppleScriptPropertyTest Suite" code="ASPT" description="AppleScriptPropertyTest Suite"> | |
<cocoa name="ULIAppleScriptPropertyTestSuite"/> | |
<class-extension description="The App" extends="application"> | |
<cocoa class="NSApplication"/> | |
<property name="boogaloo" code="ACTV" description="App's boogaloo prop." type="boolean"> |
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
<html> | |
<head> | |
<title>Streaming - Back Soon</title> | |
</head> | |
<body bgcolor="#00ff00"> | |
<div id="message" style="font-size: 80pt; font-family: Helvetica; font-weight: bold; color: white; text-shadow: 2px 2px #000000;"> | |
Back in <span id="timer">5:00</span> minutes | |
</div> | |
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/Foundation.h> | |
int main(int argc, char *argv[]) { | |
@autoreleasepool { | |
int* __nullable foo = NULL; | |
int& fooRef = *foo; | |
} | |
return 0; | |
} |
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
struct eat_char_fcn | |
{ | |
eat_char_fcn( struct eat_char_fcn (*inFun)( char currCh, xml_reader& reader, vector<shared_ptr<node>>& nod, attribute* att ) ) : function(inFun) {} | |
struct eat_char_fcn operator()( char currCh, xml_reader& reader, vector<shared_ptr<node>>& nod, attribute* att ) { return function(currCh,reader,nod,att); } | |
explicit operator bool() { return function != nullptr; } | |
struct eat_char_fcn (*function)( char currCh, xml_reader& reader, vector<shared_ptr<node>>& nod, attribute* att ); | |
}; |
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
You can specify the underlying name for a C function the linker/compiler should actually use. If you use an existing | |
function's name, it will just let you refer to it with your prototype's name. If you define the function, it'll give | |
it that name. It even complains if a function of that name already exists. Tested with clang on a Mac, but AFAIK also | |
works in GCC. You can even use special characters in your function names, like you can do in assembly. |