- node.js
- Installation paths: use one of these techniques to install node and npm without having to sudo.
- Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes
- Felix's Node.js Guide
- Creating a REST API using Node.js, Express, and MongoDB
- Node Cellar Sample Application with Backbone.js, Twitter Bootstrap, Node.js, Express, and MongoDB
- JavaScript Event Loop
- Node.js for PHP programmers
This file contains hidden or 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
| 93Vj5a8FJaIuac1a+4oPo+RSZZBDSVBb |
This file contains hidden or 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
| - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { | |
| // setup initial state (e.g. before animation) | |
| cell.layer.shadowColor = [[UIColor blackColor] CGColor]; | |
| cell.layer.shadowOffset = CGSizeMake(10, 10); | |
| cell.alpha = 0; | |
| cell.layer.transform = CATransform3DMakeScale(0.5, 0.5, 0.5); | |
| cell.layer.anchorPoint = CGPointMake(0, 0.5); | |
| // define final state (e.g. after animation) & commit animation | |
| [UIView beginAnimations:@"scaleTableViewCellAnimationID" context:NULL]; |
This file contains hidden or 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
| CGRect frame = CGRectMake(0.0f, 0.0f, diameter, diameter); | |
| UIImage *newImage = nil; | |
| UIGraphicsBeginImageContextWithOptions(frame.size, NO, [UIScreen mainScreen].scale); | |
| { | |
| CGContextRef context = UIGraphicsGetCurrentContext(); | |
| CGContextSaveGState(context); | |
| UIBezierPath *imgPath = [UIBezierPath bezierPathWithOvalInRect:frame]; | |
| [imgPath addClip]; |
This file contains hidden or 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 "UIControl+AD_SafeUIControl.h" | |
| #import <objc/runtime.h> | |
| @implementation UIControl (AD_SafeUIControl) | |
| - (void)AD_sendAction:(SEL)action to:(id)target forEvent:(UIEvent *)event | |
| { | |
| if (![target respondsToSelector:action]) { | |
| return; | |
| } | |
| [self AD_sendAction:action to:target forEvent:event]; | |
| } |
This file contains hidden or 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
| -(void)snapUIImage | |
| { | |
| int s = 1; | |
| UIScreen* screen = [ UIScreen mainScreen ]; | |
| if ( [ screen respondsToSelector:@selector(scale) ] ) | |
| s = (int) [ screen scale ]; | |
| const int w = self.frame.size.width; | |
| const int h = self.frame.size.height; | |
| const NSInteger myDataLength = w * h * 4 * s * s; |
This file contains hidden or 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
| /* | |
| _ooOoo_ | |
| o8888888o | |
| 88" . "88 | |
| (| -_- |) | |
| O\ = /O | |
| ____/`---'\____ | |
| .' \\| |// `. | |
| / \\||| : |||// \ | |
| / _||||| -:- |||||- \ |