View FCPrivateBatteryStatus.m
#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);
View Add Web Tab.py
# coding: utf-8
from Foundation import *
from QuartzCore import *
from UIKit import *
import console
WKWebView = ObjCClass('WKWebView')
@on_main_thread
View pascal2.c
/*
* Pascal2.c
*
* Pascals Triangle in C
*
* See notes below.
* To run:
gcc -std=c99 pascal2.c -o pascal2 && ./pascal2 10
*/
View pascal.c
/*
* Pascals Triangle in C
*
* Hacker News: http://news.ycombinator.com/item?id=3428984
*
*/
#include <stdio.h>
#include <stdlib.h>
View NSData+JWUtil.m
//--------------------------------------------------------------------------------
// NSData+JWUtil
// Provide a rangeOfData:options:range: method for pre-4.0 iOS.
//--------------------------------------------------------------------------------
@interface NSData (JWUtil)
- (NSRange)rangeOfDataX:(NSData *)dataToFind options:(NSDataSearchOptions)mask range:(NSRange)searchRange;
@end
//--------------------------------------------------------------------------------
// NSData+JWUtil