Skip to content

Instantly share code, notes, and snippets.

@Qiki
Qiki / gist:62bb114f98048684faf0e0691cd6140b
Created September 29, 2016 15:48
another way of ajax
//
//
//
//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='';
//(function(Worker) {
// if (!Worker) {
// console.log('Web Worker not found.')
// return;
// }
//
// var postMessage = Worker.prototype.postMessage;
//
// Worker.prototype.postMessage = function(data) {
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.
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
CGFloat height = CGRectGetHeight(scrollView.frame);
CGFloat contentYoffset = scrollView.contentOffset.y;
CGFloat distanceFromBottom = scrollView.contentSize.height - contentYoffset;
git checkout -b release upstream/next-release
git checkout -b test_brack_pr
git remote add brack git@github.com:brack/stagestores.ios.git
git fetch brack
git merge brack/cmshost
http://nshipster.com/cggeometry/
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,我们就不管了
#ifdef DEBUG
@interface AFHTTPClient (Cheating)
@property (nonatomic, assign) BOOL allowsInvalidSSLCertificate;
@end