Skip to content

Instantly share code, notes, and snippets.

public class Sales {
public static void main(String[] args) {
float[] allSales = new float[24];
int division;
Scanner input = new Scanner(System.in);
for (division = 0; division < 6; division++) {
Sales.readData(input, allSales, division);
}
- (CVPixelBufferRef) pixelBufferFromCGImage:(CGImageRef) image {
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:YES], kCVPixelBufferCGImageCompatibilityKey,
[NSNumber numberWithBool:YES], kCVPixelBufferCGBitmapContextCompatibilityKey,
nil];
CVPixelBufferRef pxbuffer = NULL;
int width = 640;
int height = 480;
@ashwinb
ashwinb / run_simulator_binary.sh
Created February 3, 2011 07:53
Wrapper script to run iPhone simulator binaries on the command line
#!/bin/bash
# We need to tell DYLD where to find the libraries. The library paths are
# built into the binary as absolute paths, so when that does not work DYLD
# looks into these environment variables. The reason we need so many
# DYLD_LIBRARY_PATHs is because some frameworks link against their private
# .dylibs which we need to find correctly as well.
export SDK=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk
export FWK=$SDK/System/Library/Frameworks
@ashwinb
ashwinb / gist:809161
Created February 3, 2011 07:14
compilation
ashwin@mac:[~/Documents/Applications/tester] =>make
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -o tester -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -mmacosx-version-min=10.5 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40200 -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -fvisibility=hidden -gdwarf-2 -framework Foundation -framework CoreFoundation -framework Foundation -framework UIKit main.m
@ashwinb
ashwinb / main.m
Created February 3, 2011 06:28
error_text
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -o tester -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=20000 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -framework Foundation -framework UIKit main.m
main.m: In function 'main':
main.m:9: warning: format not a string literal and no format arguments
main.m:10: warning: implicit declaration of function 'notify_post'
Undefined symbols:
".objc_class_name_NSAutoreleasePool", referenced from:
literal-pointer@__OBJC@__cls_refs@NSAutoreleasePool in ccdKkhTK.o
".objc_class_name_UIDevice", referenced from:
literal-pointer@__OBJC@__cls_refs@UIDevice in ccdKkhTK.o
".objc_class_name_NSString", referenced from: