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
load = function() { | |
load.getScript("http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"); | |
load.tryReady(0); //用来等待jQuery类库加载 | |
} | |
//以下代码用来动态加载任何js代码 | |
load.getScript = function(filename) { | |
var script = document.createElement('script') | |
script.setAttribute("type","text/javascript") | |
script.setAttribute("src", filename) |
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 loadMoreLink; | |
var loadingImg; | |
load = function() { | |
load.getScript("http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"); | |
load.tryReady(0); //用来等待jQuery类库加载 | |
} | |
//以下代码用来动态加载任何js代码 | |
load.getScript = function(filename) { |
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 loadMoreLink; | |
var loadingImg; | |
load = function() { | |
load.getScript("https://code.jquery.com/jquery-1.12.4.min.js"); | |
load.tryReady(0); //用来等待jQuery类库加载 | |
} | |
//以下代码用来动态加载任何js代码 | |
load.getScript = function(filename) { |
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
@implementation MySharedThing | |
+ (id)sharedInstance | |
{ | |
DEFINE_SHARED_INSTANCE_USING_BLOCK(^{ | |
return [[self alloc] init]; | |
}); | |
} | |
@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
var loadMoreLink; | |
var loadingImg; | |
load = function() { | |
load.getScript("http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"); | |
load.tryReady(0); //用来等待jQuery类库加载 | |
} | |
//以下代码用来动态加载任何js代码 | |
load.getScript = function(filename) { |
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
-(void)zoomToFitMapAnnotations:(MKMapView*)mapView | |
{ | |
if([mapView.annotations count] == 0) | |
return; | |
CLLocationCoordinate2D topLeftCoord; | |
topLeftCoord.latitude = -90; | |
topLeftCoord.longitude = 180; | |
CLLocationCoordinate2D bottomRightCoord; |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import urllib2 | |
import urllib | |
from urllib2 import * | |
import re | |
import sys | |
ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz' |
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
platform :ios | |
pod 'AFNetworking', '~> 1.0RC1' | |
#pod 'SDURLCache', '~> 1.2' | |
pod do |s| | |
s.name = 'SDURLCache' | |
s.version = '1.2a' | |
s.platform = :ios | |
s.summary = 'URLCache subclass with on-disk cache support on iPhone/iPad.' | |
s.homepage = 'https://github.com/rs/SDURLCache' |
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
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; | |
[nc addObserver:self selector:@selector(keyboardWillShow:) name: | |
UIKeyboardWillShowNotification object:nil]; | |
[nc addObserver:self selector:@selector(keyboardWillHide:) name: | |
UIKeyboardWillHideNotification object:nil]; | |
tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self | |
action:@selector(didTapAnywhere:)]; |
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
if(window.location&&window.location.href){ | |
if(window.location.href.split("/")[2].search('kankan.com')>0){ | |
document.domain="kankan.com"; | |
}else{ | |
document.domain="xunlei.com"; | |
} | |
} | |
var G_DAPCTRL = null; |
OlderNewer