一、通过js实现页面加载完毕执行代码的方式与jquery的区别 1、通过jquery的方式可以 让多个方法被执行,而通过window.onload的方式只能执行最后一个, 因为最后一次注册的方法会把前面的方法覆盖掉 1、 window.onload需要等待页面的所有元素资源比如说img里的图片一些连...
分类:
Web程序 时间:
2015-09-09 22:50:22
阅读次数:
300
import?urllib
import?string
import?re
def?getHtml(url):
page=urllib.urlopen(url)
html=page.read()
return?html
def?getPic(html):
imgre=re.compile(r‘src=".+?\.jpg"?data-big-img‘)
imglist...
分类:
编程语言 时间:
2015-09-09 17:45:55
阅读次数:
200
直接上代码:#include
using namespace cv;#include
using namespace std;template
int _get_hog(vector &hist, const Mat &img, const int nbins = 8, const bool need_n...
分类:
其他好文 时间:
2015-09-09 13:34:43
阅读次数:
128
function getmap(){if(!navigator.geolocation) throw "Geolocation not supported";var image=document.createElement("img");navigator.geolocation.getCurren...
分类:
Web程序 时间:
2015-09-08 19:54:25
阅读次数:
311
最近做游戏发现,为了节省HTTP请求,把很多组动画放到了一张图片上,也就是传说中的雪碧图,但是用drawImage从图片上截取一部分绘制在canvas上时会非常慢。我的图片尺寸为5000*7000 ctx.drawImage( img,0,0,100,100,0,0,100,100 )居然会耗时 ....
分类:
Web程序 时间:
2015-09-08 18:10:42
阅读次数:
189
#!/usr/bin/envpython
#coding=utf-8
‘‘‘
@这个脚本会将指定网页中的壁纸图片下载到本地
‘‘‘
importurllib
importre
defget_html_info(url):
‘‘‘@获取网页源代码‘‘‘
html=urllib.urlopen(url)
html_info=html.read()
returnhtml_info
defget_img(info):
‘‘‘@获取通过正则表..
分类:
编程语言 时间:
2015-09-08 15:36:21
阅读次数:
229
先进入fastboot文件所在目录连接硬件命令fastboot devices删除recover、boot,system同理Fastboot erase recovery重刷,boot,system同理Fastboot flash recovery cn170.img只需将boot.img和syst...
分类:
移动开发 时间:
2015-09-08 12:20:31
阅读次数:
226
背景项目需要自己构造一个URI Scheme,但是不知道URI是什么,以及Scheme的命名方式,所以找了以下资料。资料URL非常好理解,因为很常见,它是用于网络上定位互联网上Web资源的,如网上的某个图片,某个mp3或某个H5页面的地址。举例:http://www.baidu.com/img/bd...
分类:
Web程序 时间:
2015-09-08 01:46:10
阅读次数:
211
下载地址:https://github.com/tuupola/jquery_lazyload用法:头部引用body引用修改 HTML 代码中需要延迟加载的 IMG 标签调用$("img.lazy").lazyload();参数说明名称默认值说明containerwindow父容器。延迟加载父容器中...
分类:
Web程序 时间:
2015-09-07 21:07:10
阅读次数:
214
在写js时,里面有很多的单引号和双引号,可以直接转义 imgHmtl?+=?‘<dl>‘+
??????‘<dt><img?src="‘+objUrl+‘"?id="img"?/></dt>‘+
??????‘<dd?onclick="delImg(this,?"‘+ident+‘"...
分类:
Web程序 时间:
2015-09-07 14:29:46
阅读次数:
175