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
@interface TestAppledoc | |
- (void)testAppledoc:(NSNumber*)please; | |
@end | |
@implementation TestAppledoc | |
/// Pass a value <= 0 to crash the generation. | |
- (void)testAppledoc:(NSNumber*)please; | |
@end |
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 <stdlib.h> | |
#include <stdio.h> | |
#import <AppKit/AppKit.h> | |
void recycle(const char *filename) | |
{ | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
NSString *path = [[NSString alloc] initWithUTF8String:filename]; | |
NSString *folder = [path stringByDeletingLastPathComponent]; |
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 strutils, os | |
{.passL: "-framework AppKit".} | |
{.emit: """ | |
#import <AppKit/AppKit.h> | |
// Returns zero on success, non zero on failure. | |
int macosxNimRecycle(const char *filename) | |
{ | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] 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
#!/bin/sh | |
TESTDIR="testdir" | |
CURRDIR=`pwd` | |
COUNT=10 | |
rm log | |
for iteration in `seq 1 $COUNT`; do | |
cd "${CURRDIR}" | |
rm -Rf $TESTDIR && mkdir $TESTDIR && cd $TESTDIR && \ |
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 <AppKit/AppKit.h> | |
#import <math.h> | |
// Returns -1 on failure, or length of the sound which started to play. | |
double playAif(const char *filename) | |
{ | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
NSString *path = [[NSString alloc] initWithUTF8String:filename]; | |
NSSound *sound = [[NSSound alloc] | |
initWithContentsOfFile:path byReference:YES]; |
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 os | |
const | |
whisky = true | |
when isMainModule: | |
let path = "todelete" | |
let filename = "todelete" / "something" | |
var temp: TFile | |
createDir(path) |
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 os | |
const | |
whisky = true | |
proc nested(path, filename: string) = | |
when whisky: | |
for kind, sub_path in walkDir(path): | |
case kind | |
of pcFile: |
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
if (let m = input =~ re"abc"; m.isMatch): | |
echo m[0] | |
else: | |
echo m[1] # error: 'm' not declared | |
... let's suppose we have ... | |
if (let m = input =~ re"abc"; m.isMatch): | |
echo m[0] | |
elif (let c = f(); c): |
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> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<style type="text/css"> | |
span {font-family: monospace} | |
span.b1 {font-weight: bold; background-color: #DDDDDD} | |
span.b2 {font-weight: bold; background-color: #f5d4B5} | |
.b1 a:link {color: blue} | |
.b1 a:visited {color: rgb(85, 26, 139)} | |
.b2 a:link {color: #b26b2d} | |
.b2 a:visited {color: #8a411b} |
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 strutils | |
proc process(filename: string) = | |
var | |
input: TFile | |
lineBuf = newString(100) | |
gcCount = 0 | |
totalBaseCount = 0 | |
input = open(filename) |