上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 60 下一页

2018年2月21日

js压缩图片并上传,不失真,保证图片清晰度

摘要: mobileBUGFix.mini.js /* jpeg_encoder_basic.js for android jpeg压缩质量修复 */ function JPEGEncoder(a){function I(a){var c,i,j,k,l,m,n,o,p,b=[16,11,10,16,24, 阅读全文

posted @ 2018-02-21 15:30 星河赵 阅读(46177) 评论(1) 推荐(1)

2018年2月18日

Python使用filetype精确判断文件类型 (文件类型获取)

摘要: filetype.py Small and dependency free Python package to infer file type and MIME type checking the magic numbers signature of a file or buffer. This i 阅读全文

posted @ 2018-02-18 17:08 星河赵 阅读(35617) 评论(1) 推荐(3)

2018年2月17日

js中将文件的base64转换成file并上传到服务器

摘要: ** * @param base64Codes * 图片的base64编码 */ function sumitImageFile(base64Codes){ var form=document.forms[0]; var formData = new FormData(form); //这里连带form里的其他参数也一起提... 阅读全文

posted @ 2018-02-17 16:03 星河赵 阅读(32727) 评论(5) 推荐(2)

2018年2月16日

js图片转base64并压缩

摘要: /* 2015-09-28 上传图片*/ function convertImgToBase64(url, callback, outputFormat){ var canvas = document.createElement('CANVAS'); var ctx = canvas.getContext('2d'); var img... 阅读全文

posted @ 2018-02-16 16:40 星河赵 阅读(969) 评论(0) 推荐(0)

html5调用手机相机并压缩、上传

摘要: 使用input file[camera]属性调用相机 简直So easy! 只需要这么一条简单的代码,在手机浏览器点击就可以打开相机了。 capture是什么?其实就是对打开方式的设置。 魅族MX5测试结果: 谷歌浏览器可以打开相机和摄像功能,其他方式均为相机、图库、文件管理器等混合选择项。 自带浏 阅读全文

posted @ 2018-02-16 14:17 星河赵 阅读(3417) 评论(0) 推荐(0)

python 将base64字符串还原成图片保存

摘要: import os,base64 strs='''/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFhEYIx8lJCIfIiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCIoOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O... 阅读全文

posted @ 2018-02-16 14:05 星河赵 阅读(1008) 评论(0) 推荐(0)

2018年2月14日

xadmin 问题总结

摘要: pip install django-import-export 阅读全文

posted @ 2018-02-14 14:39 星河赵 阅读(171) 评论(0) 推荐(0)

2018年2月8日

Django教程:[33]从数据库生成模型

摘要: 在使用django做网站的时候,有时候我们的数据库来自一个已有的数据库,如何整合这个数据库呢? django提供了方便的方法来整合已有数据库,下面我们看看具体的方法: 1.先来设置数据库:在网站文件夹下面,里面有settings文件,我们打开它 2.修改数据库这几个基本信息,通过这个配置,我们的dj 阅读全文

posted @ 2018-02-08 16:05 星河赵 阅读(295) 评论(0) 推荐(0)

2018年2月6日

Docker 常用命令

摘要: 1.删除镜像 docker images 展示所有镜像 2.查看当前运行的docker运行的进程 docker ps 3.删除images docker rmi 0ba3eaa6a50d 、 4.docker 建立镜像 docker build -t mfor . (mfor为镜像的名字 .代表为当 阅读全文

posted @ 2018-02-06 16:48 星河赵 阅读(174) 评论(0) 推荐(0)

2018年1月26日

js中如何判断一个字符串包含另外一个字符串?

摘要: Jquery 判断当前完整的url是否包含指定的字符串 阅读全文

posted @ 2018-01-26 18:03 星河赵 阅读(569) 评论(0) 推荐(0)

上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 60 下一页

导航