Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
function Track(src, spriteLength, audioLead) { | |
var track = this, | |
audio = document.createElement('audio'); | |
audio.src = src; | |
audio.autobuffer = true; | |
audio.load(); | |
audio.muted = true; // makes no difference on iOS :( | |
/* This is the magic. Since we can't preload, and loading requires a user's | |
input. So we bind a touch event to the body, and fingers crossed, the |
public class OAuthActivity extends Activity { | |
public static String OAUTH_URL = "https://github.com/login/oauth/authorize"; | |
public static String OAUTH_ACCESS_TOKEN_URL = "https://github.com/login/oauth/access_token"; | |
public static String CLIENT_ID = "YOUR_CLIENT_ID"; | |
public static String CLIENT_SECRET = "YOUR_CLIENT_SECRET"; | |
public static String CALLBACK_URL = "http://localhost"; | |
@Override |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/usr/bin/python | |
import ftplib | |
session = ftplib.FTP('example.com','username','password') | |
file = open('cup.mp4','rb') # file to send | |
session.storbinary('STOR '+'cup.mp4', file) # send the file | |
file.close() # close file and FTP | |
session.quit() |
/* | |
使用方法: | |
1. 将XML转为JS对象: | |
JXParser.xml2Json(xml); | |
2. 将JS对象或JSON字符串转为XML: | |
JXParser.xml2Json(xml); | |
*/ |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.util.List; | |
import org.apache.poi.hwpf.HWPFDocument; | |
import org.apache.poi.hwpf.extractor.WordExtractor; | |
import org.apache.poi.xwpf.usermodel.XWPFDocument; | |
import org.apache.poi.xwpf.usermodel.XWPFParagraph; | |
public class DocReader { |
/* | |
* Copyright (c) 2010 Apple Inc. All rights reserved. | |
*/ | |
function characterNeedsScoreMultiplier(e) { | |
if (!e || e.length === 0) | |
return !1; | |
var t = e.charCodeAt(0); | |
return t > 11904 && t < 12031?!0 : t > 12352 && t < 12543?!0 : t > 12736 && t < 19903?!0 : t > 19968 && t < 40959?!0 : t > 44032 && t < 55215?!0 : t > 63744 && t < 64255?!0 : t > 65072 && t < 65103?!0 : t > 131072 && t < 173791?!0 : t > 194560 && t < 195103?!0 : !1 | |
} | |
function domDistance(e, t, n) { |
// VSCode: Place your settings in this file to overwrite the default settings | |
{ | |
"http.proxy": "http://user:pass@proxy.com:8080", | |
"https.proxy": "http://user:pass@proxy.com:8080", | |
"http.proxyStrictSSL": false | |
} |