上一页 1 2 3 4 5 6 7 8 9 10 ··· 22 下一页
摘要: doBefore(){ ServetRequestAttrbtes attributes = (ServetRequestAttrbtes)RequestContextHolder.getHttpattributes(); HttpServletRequest request = attributes.getRequest(); } 阅读全文
posted @ 2018-01-22 21:41 413Xiaol 阅读(3998) 评论(0) 推荐(0) 编辑
摘要: # 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 '... 阅读全文
posted @ 2018-01-17 22:43 413Xiaol 阅读(953) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2018-01-14 20:15 413Xiaol 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2018-01-14 20:13 413Xiaol 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2018-01-14 20:11 413Xiaol 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 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" ... 阅读全文
posted @ 2018-01-11 20:43 413Xiaol 阅读(452) 评论(0) 推荐(0) 编辑
摘要: s = (function S(){ var bean; function get(){ if(bean){ return bean }else{ bean = T(); return bean; ... 阅读全文
posted @ 2018-01-02 20:18 413Xiaol 阅读(121) 评论(0) 推荐(0) 编辑
摘要: import urllib url = "http://www.baidu.com" try: status = urllib.urlopen(url).code print status except: print {'result': 'false', 'msg': 'URL cannot access'} 阅读全文
posted @ 2018-01-02 20:16 413Xiaol 阅读(5165) 评论(0) 推荐(0) 编辑
摘要: import socket print socket.gethostname() 阅读全文
posted @ 2018-01-02 20:15 413Xiaol 阅读(3442) 评论(0) 推荐(0) 编辑
摘要: .heart{ animation:heart 1s ease infinite; } @keyframes heart { 0% {opacity:0.1;} 100%{opacity:1;} } 阅读全文
posted @ 2018-01-02 20:14 413Xiaol 阅读(1736) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 22 下一页