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
-- first approach: | |
-- sadly this causes a deep nested hierarchy where "go" calls "openCard" | |
-- which calls "go", eventually running out of memory. | |
on openCard | |
wait 5 seconds | |
go next | |
end openCard | |
-- second approach: | |
-- idle gets called periodically by HyperCard, but you don't have control over |
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
#include "cppwrapper.h" | |
#include "buff.hpp" | |
extern "C" void buff_deinit( buff* _this ) | |
{ | |
delete _this; | |
} | |
extern "C" buff* buff_init( int type, double amount, double max_amount, double start_angle, double relative_angle, double max_distance, double bleedthrough, bool permanent ) | |
{ |
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
#include <string> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdio.h> | |
#include <malloc/malloc.h> | |
class JollyRoger | |
{ | |
public: |
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 | |
// ProtocolImplementations | |
// | |
// Created by Uli Kusterer on 07/09/15. | |
// Copyright (c) 2015 Uli Kusterer. All rights reserved. | |
// | |
#import <Foundation/Foundation.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/Foundation.h> | |
int main(int argc, char *argv[]) { | |
@autoreleasepool { | |
NSString *str = [[NSString alloc] initWithBytes: "\0\r" length: 2 encoding: NSASCIIStringEncoding]; | |
NSLog(@"len = %zu \"%@\"", str.length, str); | |
} | |
} |
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
#include <stdio.h> | |
void (^blockreturner(void))( int a, int b ) | |
{ | |
return ^(int a, int b){ printf("%d %d\n",a,b); }; | |
} | |
int main(int argc, char *argv[]) { | |
blockreturner()( 1, 2 ); |
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
#include <iostream> | |
#include <string> | |
#include <vector> | |
using namespace std; | |
vector<string> components_separated_by_string( const string& s, const string& delimiter ) | |
{ | |
if( s.size() == 0 ) | |
return vector<string>(); |
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> | |
#include <iostream> | |
@interface ULIFoo : NSObject | |
@end | |
@implementation ULIFoo | |
-(id) init |
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
// | |
// ViewController.swift | |
// SwiftTableTestIOS | |
// | |
import UIKit | |
class ViewController: UITableViewController { | |
// These enum cases should be in the order the user should see the items in: |
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
@protocol TellARCAboutVoidReturn | |
-(void) performSelector: (SEL)inAction withObject: (id)inSender; | |
@end | |
... | |
[(id<TellARCAboutVoidReturn>)receiver performSelector: @selector(someVoidAction:) withObject: theSender]; |