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
extern crate rand; | |
use rand::Rng; | |
use std::io; | |
// From "Practical Programs for the BBC Computer and Acorn ATOM" | |
// (c) David Johnson-Davies | |
// Sigma Technical Press 1983 | |
// Silver Dollar Game | |
// http://www.acornatom.nl/atom_plaatjes/boeken/pracprog/pp.htm |
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 <dlfcn.h> | |
NSDictionary *FCPrivateBatteryStatus() | |
{ | |
static mach_port_t *s_kIOMasterPortDefault; | |
static kern_return_t (*s_IORegistryEntryCreateCFProperties)(mach_port_t entry, CFMutableDictionaryRef *properties, CFAllocatorRef allocator, UInt32 options); | |
static mach_port_t (*s_IOServiceGetMatchingService)(mach_port_t masterPort, CFDictionaryRef matching CF_RELEASES_ARGUMENT); | |
static CFMutableDictionaryRef (*s_IOServiceMatching)(const char *name); |
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
# coding: utf-8 | |
from Foundation import * | |
from QuartzCore import * | |
from UIKit import * | |
import console | |
WKWebView = ObjCClass('WKWebView') | |
@on_main_thread |
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
/* | |
* Pascal2.c | |
* | |
* Pascals Triangle in C | |
* | |
* See notes below. | |
* To run: | |
gcc -std=c99 pascal2.c -o pascal2 && ./pascal2 10 | |
*/ |
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
/* | |
* Pascals Triangle in C | |
* | |
* Hacker News: http://news.ycombinator.com/item?id=3428984 | |
* | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> |
NewerOlder