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
+(UIImage *)thumbnailForImage:(UIImage *)image withSize:(CGSize)size{ | |
CGImageRef sourceImage = [image CGImage]; | |
const char *byteData = malloc(CGImageGetBytesPerRow(sourceImage) * 75); | |
if(malloc == NULL) return nil; | |
CGBitmapInfo info = CGImageGetBitmapInfo(sourceImage); | |
CGContextRef context = CGBitmapContextCreate(byteData, 75, 75,CGImageGetBitsPerComponent(sourceImage), CGImageGetBytesPerRow(sourceImage), CGImageGetColorSpace(sourceImage), info); | |
CGContextDrawImage(context, CGRectMake(0,0,size.width, size.height), sourceImage); | |
CGImageRef destImage = CGBitmapContextCreateImage(context); | |
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
--- server.orig.js 2009-01-07 22:07:48.000000000 -0500 | |
+++ server.js 2009-01-07 22:08:56.000000000 -0500 | |
@@ -103 +103 @@ Twitter.serverController = SC.Object.cre | |
- if (json && json.parseJSON) json = json.parseJSON() ; | |
+ if (json && SC.json) json = SC.json.decode(json) ; | |
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
numberToList :: Integer -> [Integer] | |
numberToList x | |
| x == 0 = [] | |
| x < 10 = [x] | |
| otherwise = (numberToList left) ++ (numberToList right) | |
where left = x `div` 10 | |
right = x `mod` 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
div#container, table#timeline, td.status-body > div{ | |
width: 100% !important; | |
} | |
div.wrapper{ | |
padding-left: 0px !important; | |
padding-right: 0px !important; | |
} | |
tr.status > td{ |
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
var myValue = Number.NaN; | |
console.log("Is NAN: " + isNaN(myValue)); // returns "Is NAN: true" | |
console.log("Type: " + typeof myValue); // returns "Type: number" |
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 <Cocoa/Cocoa.h> | |
@interface SSKVOFix : NSObject { | |
NSMutableDictionary *kvo; | |
} | |
@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
25d24 | |
> -(void)setSuspended:(BOOL)suspended; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.stevestreza.iTunesBackup</string> | |
<key>Nice</key> | |
<integer>12</integer> | |
<key>OnDemand</key> | |
<true/> |
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> | |
int main (int argc, const char * argv[]) { | |
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; | |
// insert code here... | |
NSDictionary *immutable = [[NSDictionary alloc] init]; | |
NSMutableDictionary *mutable = [[NSMutableDictionary alloc] init]; | |
NSLog(@"Classnames: %@ and %@",[immutable className], [mutable className]); |
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
<!-- your HTML --> | |
<div id="galleryContainer"> | |
<ul class="galleria" id="gallery1"> | |
your content here | |
</ul> | |
<ul class="galleria" id="gallery2"> | |
your content here | |
</ul> | |
<ul class="galleria" id="gallery3"> | |
your content here |
OlderNewer