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 s_ajaxListener = new Object(); | |
//s_ajaxListener.tempOpen = XMLHttpRequest.prototype.open; | |
//s_ajaxListener.tempSend = XMLHttpRequest.prototype.send; | |
// | |
//XMLHttpRequest.prototype.open = function(a,b) { | |
// if (!a) var a=''; | |
// if (!b) var b=''; |
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
//(function(Worker) { | |
// if (!Worker) { | |
// console.log('Web Worker not found.') | |
// return; | |
// } | |
// | |
// var postMessage = Worker.prototype.postMessage; | |
// | |
// Worker.prototype.postMessage = function(data) { |
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
CGRectInset(self.view.bounds, 8.0, 0.0) | |
Description | |
Returns a rectangle that is smaller or larger than the source rectangle, with the same center point. | |
A rectangle. The origin value is offset in the x-axis by the distance specified by the dx parameter and in the y-axis by the distance specified by the dy parameter, and its size adjusted by (2*dx,2*dy), relative to the source rectangle. If dx and dy are positive values, then the rectangle’s size is decreased. If dx and dy are negative values, the rectangle’s size is increased. |
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
Reasoning behind this particular convention is that the pointer belongs to the instance and not the class. If you were to declare multiple variables on a single line, you'd expect each variable to have its own pointer like so: | |
NSArray *array1, *array2, *array3; | |
So we need to declare like this NSArray *array1 |
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
CGFloat height = CGRectGetHeight(scrollView.frame); | |
CGFloat contentYoffset = scrollView.contentOffset.y; | |
CGFloat distanceFromBottom = scrollView.contentSize.height - contentYoffset; | |
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
git checkout -b release upstream/next-release |
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
git checkout -b test_brack_pr | |
git remote add brack git@github.com:brack/stagestores.ios.git | |
git fetch brack | |
git merge brack/cmshost |
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
http://nshipster.com/cggeometry/ | |
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
row = [];// outer array | |
for (product in productsArray) { | |
innerArray = []; // inner array | |
if (product.image is large) { | |
array add product; | |
} else if (product image is small) { | |
把row 数组的最后一个拿出来,看看 | |
如果只有一个,还是large image,我们就不管了 |
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
#ifdef DEBUG | |
@interface AFHTTPClient (Cheating) | |
@property (nonatomic, assign) BOOL allowsInvalidSSLCertificate; | |
@end | |
NewerOlder