01 2018 档案
摘要:doBefore(){ ServetRequestAttrbtes attributes = (ServetRequestAttrbtes)RequestContextHolder.getHttpattributes(); HttpServletRequest request = attributes.getRequest(); }
阅读全文
摘要:# encoding:utf-8 import urllib import os def Schedule(a,b,c): ''''' a:已经下载的数据块 b:数据块的大小 c:远程文件的大小 ''' per = 100.0 * a * b / c if per > 100 : per = 100 print '...
阅读全文
摘要:function GetDistance( lat1, lng1, lat2, lng2){ var radLat1 = lat1 * Math.PI / 180.0 var radLat2 = lat2 * Math.PI / 180.0 var a = (lat1 - lat2) * Math.PI / 180.0; var b = (lng1 - ln...
阅读全文
摘要:from multiprocessing import Process, Pool import time import subprocess def task(msg): print 'hello, %s' % msg time.sleep(1) def test_pool(): pool = Pool(processes=4) for x in ran...
阅读全文
摘要:import threading import subprocess import time def need_thread(func, *args, **kwargs): def fun(): print "sub:" + str(threading.current_thread().ident) time.sleep(1) sub...
阅读全文
摘要:import subprocess import os import sys import platform def fock_new(func): def inner(*args, **kwargs): if 'Linux'.__eq__(platform.system()): print "main process start" ...
阅读全文
摘要:s = (function S(){ var bean; function get(){ if(bean){ return bean }else{ bean = T(); return bean; ...
阅读全文
摘要:import urllib url = "http://www.baidu.com" try: status = urllib.urlopen(url).code print status except: print {'result': 'false', 'msg': 'URL cannot access'}
阅读全文
摘要:import socket print socket.gethostname()
阅读全文
摘要:.heart{ animation:heart 1s ease infinite; } @keyframes heart { 0% {opacity:0.1;} 100%{opacity:1;} }
阅读全文

浙公网安备 33010602011771号