Skip to content

Instantly share code, notes, and snippets.

max = { a, b |
if (a > b) ^a else ^b
}
min = { a, b |
if (a < b) ^a else ^b
}
#NSPointerArray {
- fold: lambda {
i = 0
max = { a, b |
if (a > b) ^a else ^b
}
min = { a, b |
if (a < b) ^a else ^b
}
#NSPointerArray {
- fold: lambda {
i = 0
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
#import <objc/message.h>
#define BOXER_PREFIX "Boxer_"
#define BlockImp imp_implementationWithBlock
@interface Boxer : NSObject {
@protected
void *_ptr; // Points to the boxed value
#import "TQBoxedObject.h"
static int funPtrTest(long num) {
NSLog(@"Function ptr called %ld", num);
return 321;
}
int main() {
CGRect rect = {1,2,3,4};
double dbl = 1.2345;
nsapp = NSApplication sharedApplication
nsapp setActivationPolicy: 0
menuBar = NSMenu new
appMenuItem = NSMenuItem new
menuBar addItem: appMenuItem
nsapp setMainMenu: menuBar
appMenu = NSMenu new
quitMenuItem = NSMenuItem alloc initWithTitle: "Quit " .. (NSProcessInfo processInfo processName)
nsapp = NSApplication sharedApplication
\ Create the menubar
menuBar = NSMenu new
appMenuItem = NSMenuItem new
menuBar addItem: appMenuItem
nsapp setMainMenu: menuBar
\ Add the Application menu & the quit item
appMenu = NSMenu new
nsapp = NSApplication sharedApplication
\ Create the menubar
menuBar = NSMenu new
appMenuItem = NSMenuItem new
menuBar addItem: appMenuItem
nsapp setMainMenu: menuBar
\ Add the Application menu & the quit item
appMenu = NSMenu new
{__GLIFunctionDispatchRec="accum"^?"alpha_func"^?"are_textures_resident"^?"array_element"^?"begin"^?"bind_texture"^?"bitmap"^?"blend_func"^?"call_list"^?"call_lists"^?"clear"^?"clear_accum"^?"clear_color"^?"clear_depth"^?"clear_index"^?"clear_stencil"^?"clip_plane"^?"color3b"^?"color3bv"^?"color3d"^?"color3dv"^?"color3f"^?"color3fv"^?"color3i"^?"color3iv"^?"color3s"^?"color3sv"^?"color3ub"^?"color3ubv"^?"color3ui"^?"color3uiv"^?"color3us"^?"color3usv"^?"color4b"^?"color4bv"^?"color4d"^?"color4dv"^?"color4f"^?"color4fv"^?"color4i"^?"color4iv"^?"color4s"^?"color4sv"^?"color4ub"^?"color4ubv"^?"color4ui"^?"color4uiv"^?"color4us"^?"color4usv"^?"color_mask"^?"color_material"^?"color_pointer"^?"copy_pixels"^?"copy_tex_image1D"^?"copy_tex_image2D"^?"copy_tex_sub_image1D"^?"copy_tex_sub_image2D"^?"cull_face"^?"delete_lists"^?"delete_textures"^?"depth_func"^?"depth_mask"^?"depth_range"^?"disable"^?"disable_client_state"^?"draw_arrays"^?"draw_buffer"^?"draw_elements"^?"draw_pixels"^?"edge_flag"^?"edge_flag_pointer"^?"ed
char str[] = "abcdefg";
for(int i = 0, j = strlen(str)-1; i < j; ++i, --j) {
str[i] = str[i] ^ str[j];
str[j] = str[j] ^ str[i];
str[i] = str[i] ^ str[j];
}
@fjolnir
fjolnir / request
Created July 27, 2012 08:37
ios 6 map api response
en_JPcom.apple.Maps 6.0.10A5355d+**Starbucks tokyo2$)*Àg≈µøA@1ñƒn∂Cía@9Êâ—√¿›A@Añflñ·%ôa@H
b˜º†Û„∂óß>∫·‡◊◊Ó˙ìÆpxÄ≤≠
 
yelp_RestaurantsPriceRange2yelp_RestaurantsReservationsyelp_GoodForKidsyelp_RestaurantsDeliveryyelp_natural_category_1yelp_natural_category_2‚JPÍ 8∑4”A@7L`π§va@Úen-US