摘要: html5自动弹出软键盘的方法<pre> <textarea placeholder="说点什么......" autofocus="autofocus"></textarea></pre> 阅读全文
posted @ 2019-11-14 13:24 newmiracle宇宙 阅读(1781) 评论(0) 推荐(0)
摘要: css关于body的默认滑动机制 大家都知道 body里面只要高度超出了原来的高度就可以滚动要取消这个机制 只能设置height:100% overflow:hidden就能取消了 阅读全文
posted @ 2019-11-14 13:24 newmiracle宇宙 阅读(281) 评论(0) 推荐(0)
摘要: PHP关于access_token失效问题 有时候PHP设置了缓存 明明就是没有过期 但却提示失效这情况一般就是1 多个appid和secrete 生成的access_token互相覆盖了 所以 这种情况必须要区分2 看看代码是不是多个地方生成access_token 当生成新的access_tok 阅读全文
posted @ 2019-11-14 13:23 newmiracle宇宙 阅读(897) 评论(0) 推荐(0)
摘要: PHP array_multisort实现二维数组排序 参数中的数组被当成一个表的列并以行来进行排序 - 这类似 SQL 的 ORDER BY 子句的功能。第一个数组是要排序的主要数组。数组中的行(值)比较为相同的话,就会按照下一个输入数组中相应值的大小进行排序,依此类推。 第一个参数是数组,随后的 阅读全文
posted @ 2019-11-14 13:23 newmiracle宇宙 阅读(372) 评论(0) 推荐(0)
摘要: PHP路径指定web路径的方法直接在/前面加.就是代表web路径了 不是按照文件路径来算了 <pre>./Public/uploads/suolutu/' . $suijishu . '_' . time() . '.jpg'</pre> 但函数不能识别 所以用DIR获取当前位置 来获取绝对地址 最 阅读全文
posted @ 2019-11-14 13:23 newmiracle宇宙 阅读(457) 评论(0) 推荐(0)
摘要: php strpos注意的地方<pre> $pos = strpos('paihangbang2864195', strval(2864195)); </pre> 类型必须一致 不然没办法获取 不知道为什么 PHP自动类型转化不管用了。。 阅读全文
posted @ 2019-11-14 13:22 newmiracle宇宙 阅读(161) 评论(0) 推荐(0)
摘要: css3软键盘不盖住输入框的方法 弹出软键盘的时候 最外面的容器高度就发生了变化 要减去软键盘高度了<pre>var bodyheight bodyheight = $('body').height(); var bodywidth = $('body').width(); $('.p6a inpu 阅读全文
posted @ 2019-11-14 13:22 newmiracle宇宙 阅读(354) 评论(0) 推荐(0)
摘要: 阿里云云盘扩容方法 https://help.aliyun.com/document_detail/25452.html?&utm_campaign=sys&utm_medium=system&utm_source=sys_email&msctype=email&mscareaid=cn&mscsi 阅读全文
posted @ 2019-11-14 13:22 newmiracle宇宙 阅读(1089) 评论(0) 推荐(0)
摘要: php不断的切换前端链接方法 防止攻击 swoole写法 每分钟生成一次url后缀 返回到客户端让他们更新 //定时器要写在WorkerStart这个里面哦$ws->on('WorkerStart', function ($serv, $worker_id) { /*1分钟更新一次url 防止ddo 阅读全文
posted @ 2019-11-14 13:21 newmiracle宇宙 阅读(401) 评论(0) 推荐(0)
摘要: mysql cpu使用率过高解决方法 1 mysql查看正在运行的语句 并且查看运行最多的mysql语句 MySQL 打开 general log 后,所有的查询语句都会记录在 general log 文件,文件为只读方式,但这样general log文件会非常大,所以默认是关闭的。但有时需要查错等 阅读全文
posted @ 2019-11-14 13:20 newmiracle宇宙 阅读(4380) 评论(0) 推荐(0)
摘要: linux mysql内存使用率<pre>free -m | sed -n '2p' | awk '{print "used mem is "$3"M,total mem is "$2"M,used percent is "$3/$2*100"%"}' </pre>释放所有缓存<pre>echo 3 阅读全文
posted @ 2019-11-14 13:19 newmiracle宇宙 阅读(126) 评论(0) 推荐(0)
摘要: 关于swoole 定时器有时候无法清除的解决方法 有时候start里面写个定时器 有时候你关闭进程的时候 发现定时器还是可以进行 目前只有重启服务器才可以 清除 还有就是ps -ef | grep php 找到对应的PHP程序清除 阅读全文
posted @ 2019-11-14 13:18 newmiracle宇宙 阅读(409) 评论(0) 推荐(0)
摘要: css 完美垂直居中解决方案兼容ie8以上等其他浏览器 <pre><!DOCTYPE html><html><head> <title>DIV水平垂直居中 </title> <meta http-equiv="Content-Type" content="text/html; charset=utf 阅读全文
posted @ 2019-11-14 13:17 newmiracle宇宙 阅读(2447) 评论(0) 推荐(0)
摘要: PHP微信授权登录用于多个域名的方法appid和 回调地址换下就好了 <pre><!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta http-equiv="Pragma" content="no-cache"> <me 阅读全文
posted @ 2019-11-14 13:16 newmiracle宇宙 阅读(373) 评论(0) 推荐(0)
摘要: 首先说下 先看 按照ab 每秒请求的结果 看看 都有每秒能请求几个 如果并发量超出你请求的个数 会这样 所以一般图片和代码服务器最好分开 还有看看io瓶ding 和有没有延迟的PHP代码执行 0 先修改内核参数 <pre>1、调整同时打开文件数量 ulimit -n 204802、TCP最大连接数( 阅读全文
posted @ 2019-11-14 13:15 newmiracle宇宙 阅读(16256) 评论(0) 推荐(0)
摘要: 网站提示“访问网站包含恶意软件”怎么申诉移除http://jingyan.baidu.com/article/c1465413922aa50bfcfc4c39.html看这个贴一下站长工具地址https://www.google.com/webmasters/tools/home?hl=zh-TW& 阅读全文
posted @ 2019-11-14 13:15 newmiracle宇宙 阅读(259) 评论(0) 推荐(0)
摘要: php修改网站默认编码网站如果header 不指定utf8默认 不是utf8 所以输入中文显示会乱码 一般都是apache不是不是utf8 打开 apache 配置文件 httpd.conf 加个 AddDefaultCharset UTF-8 默认编码就行 这样传到客户端的编码默认都是utf8了 阅读全文
posted @ 2019-11-14 13:13 newmiracle宇宙 阅读(498) 评论(0) 推荐(0)
摘要: html5不能播放视频的方法H5不能播放视频的方法 格式工厂转换成 AVC 注意音频流 采样率和比特率 设置低一点 不然播放会卡住 还有点击播放必须要click 不要用touchstart没效果的 阅读全文
posted @ 2019-11-14 13:12 newmiracle宇宙 阅读(1023) 评论(0) 推荐(0)
摘要: jquery each循环遍历完再执行的方法 因为each是异步的 所以要加计数器. var eachcount=0; <pre> $(".emptytip").each(function(){ eachcount++ console.log(eachcount); if(eachcount>=$( 阅读全文
posted @ 2019-11-14 13:11 newmiracle宇宙 阅读(564) 评论(0) 推荐(0)
摘要: mysql找出重复数据的方法<pre>select openid,count(openid) from info group by openid,jichushezhi_id HAVING count(openid)>1</pre> 阅读全文
posted @ 2019-11-14 13:11 newmiracle宇宙 阅读(1178) 评论(0) 推荐(0)
摘要: PHP判断数组下标有没有存在的方法<pre>if(!empty($token['errcode'])){ print_r($token['errmsg']); exit();}</pre> 这样就不会报错了 阅读全文
posted @ 2019-11-14 13:10 newmiracle宇宙 阅读(1643) 评论(0) 推荐(0)
摘要: jquery each循环遍历完再执行的方法 因为each是异步的 所以要加计数器. var eachcount=0; <pre> $(".emptytip").each(function(){ eachcount++ console.log(eachcount); if(eachcount>=$( 阅读全文
posted @ 2019-11-14 13:10 newmiracle宇宙 阅读(2318) 评论(1) 推荐(0)
摘要: mysql General error: 1366 Incorrect string value: '\xF0\x9F\x91\x8D\xF0\x9F...' for column 'dianpumiaoshu' at row 1 解决方法 因为传入了emoji表情 曾经考虑过过滤 但是行不通 所以 阅读全文
posted @ 2019-11-14 13:09 newmiracle宇宙 阅读(1156) 评论(0) 推荐(0)
摘要: php swoole异步处理mysql <pre>//创建websocket服务器对象,监听0.0.0.0:9509端口//异步测试$ws = new swoole_websocket_server("0.0.0.0", 9600); $ws->set(array( 'worker_num' => 阅读全文
posted @ 2019-11-14 13:08 newmiracle宇宙 阅读(475) 评论(0) 推荐(0)
摘要: jquery手指触摸滑动放大图片的方法(比较靠谱的方法) <pre><!DOCTYPE html><html lang="zh-cn"><head> <title>touch.js demo</title> <meta charset="utf-8" /> <meta name="viewport" 阅读全文
posted @ 2019-11-14 13:08 newmiracle宇宙 阅读(830) 评论(0) 推荐(0)
摘要: PHP yaf显示错误提示 1就是配置文件的那个错误 <pre>error_reporting(E_ALL);</pre> 2init.php文件的<pre>function yofErrorHandler($errno, $errstr, $errfile, $errline, $sql = '' 阅读全文
posted @ 2019-11-14 13:07 newmiracle宇宙 阅读(400) 评论(0) 推荐(0)
摘要: php Yaf_Loader::import引入文件报错的解决方法 改下配置文件就行<pre>yaf.use_spl_autoload=1</pre> 也可以PHP动态修改 毕竟打开影响性能<pre> ini_set('yaf.use_spl_autoload',0);</pre> 阅读全文
posted @ 2019-11-14 13:07 newmiracle宇宙 阅读(580) 评论(0) 推荐(0)
摘要: PHP实现开发者模式出现该公众号提供的服务出现故障 请稍后再试解决方法 仔细检查下有没有echo等输出的代码 echo没有输出东西 就是报这个信息 所以调试信息都必须写入日记 阅读全文
posted @ 2019-11-14 13:06 newmiracle宇宙 阅读(352) 评论(0) 推荐(0)
摘要: css3 input placeholder颜色修改方法<pre> input::-webkit-input-placeholder { /* placeholder颜色 */ color: #0d4123; } </pre> 阅读全文
posted @ 2019-11-14 13:05 newmiracle宇宙 阅读(534) 评论(0) 推荐(1)
摘要: php编辑器notepad++ 推荐一款非常好看主题和字体1、主题名称:Obsidian 2、字体字号:Courier New 10 3、设置方法:设置 语言格式设置 选择主题,同时勾选“使用全局字体”“使用全局字体大小” 阅读全文
posted @ 2019-11-14 13:04 newmiracle宇宙 阅读(637) 评论(0) 推荐(0)
摘要: php获取PHP执行的时间 <pre> //程序运行时间 $starttime = explode(' ',microtime()); //代码区域 //程序运行时间 $endtime = explode(' ',microtime()); $thistime = $endtime[0]+$endt 阅读全文
posted @ 2019-11-14 13:04 newmiracle宇宙 阅读(1259) 评论(0) 推荐(0)
摘要: php [poolwww] seemsbusy (youmayneedto increasepm.start_servers, or pm.min/max_spare_servers)错误解决方法修改php-fpm.conf配置文件 pm.max_children = 1024 ; The numb 阅读全文
posted @ 2019-11-14 13:03 newmiracle宇宙 阅读(3813) 评论(0) 推荐(0)
摘要: PHP failed to ptrace(PEEKDATA) pid 13659: Input/output error错误解决方法 现在改linux内核文件打开限制<pre>ulimit -SHn 51200</pre> 再修改nginx.conf配置文件<pre>worker_rlimit_no 阅读全文
posted @ 2019-11-14 13:03 newmiracle宇宙 阅读(272) 评论(0) 推荐(0)
摘要: PHP failed to ptrace(PEEKDATA) pid 13659: Input/output error错误解决方法 现在改linux内核文件打开限制<pre>ulimit -SHn 51200</pre> 再修改nginx.conf配置文件<pre>worker_rlimit_no 阅读全文
posted @ 2019-11-14 13:03 newmiracle宇宙 阅读(1575) 评论(0) 推荐(0)
摘要: jquery倒计时代码<pre> <span id="day_show">0天</span> <strong id="hour_show">0时</strong> <strong id="minute_show">0分</strong> <strong id="second_show">0秒</st 阅读全文
posted @ 2019-11-14 13:02 newmiracle宇宙 阅读(700) 评论(0) 推荐(0)
摘要: php sublime常用插件 1 Sublime Text的默认设置是不开启显示编码的,如果想开启,可通过菜单Perference → Settings – User,在打开的配置文件里 ,在大括号后面,增加以下内容:// Display file encoding in the status b 阅读全文
posted @ 2019-11-14 13:02 newmiracle宇宙 阅读(868) 评论(0) 推荐(0)
摘要: 利用python实现微信小程序游戏跳一跳详细教程 1 先安装python 然后再安装pip <a href="http://newmiracle.cn/wp-content/uploads/2018/01/pip901.zip">pip901</a> 解压压缩包,打开命令行,执行python set 阅读全文
posted @ 2019-11-14 13:01 newmiracle宇宙 阅读(585) 评论(0) 推荐(0)
摘要: PHP curl下载图片的方法 <pre> <?php $images = [ 'http://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKPkia3rxjuBoSQ1sUSmqYXDazibuIp8p2CCialBPjeYvcNJgky9P7hmlnDKgzX91utE 阅读全文
posted @ 2019-11-14 13:01 newmiracle宇宙 阅读(1152) 评论(0) 推荐(0)
摘要: css3自定义移动端滚动条<pre>/*定义滚动条宽 高度是根据内容设置的高度决定的*/::-webkit-scrollbar{ width: 5px;} /*定义滚动条轨道 内阴影+圆角*/::-webkit-scrollbar-track{ -webkit-box-shadow: inset 0 阅读全文
posted @ 2019-11-14 13:01 newmiracle宇宙 阅读(1387) 评论(0) 推荐(0)
摘要: php判断是不是https的方法<pre> public function is_https() { if (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') { return true; } elseif ( 阅读全文
posted @ 2019-11-14 13:00 newmiracle宇宙 阅读(788) 评论(0) 推荐(0)
摘要: PHP获取图片每个像素点<pre> $i = imagecreatefromjpeg("test.jpg"); //图片路径 for ($x = 0; $x < imagesx($i); $x++) { for ($y = 0; $y < imagesy($i); $y++) { $rgb = im 阅读全文
posted @ 2019-11-14 13:00 newmiracle宇宙 阅读(1071) 评论(0) 推荐(0)
摘要: nginx跨域解决方案Access to Font at 'http://47.104.86.187/yinjiatoupiao2/iconfont/iconfont.woff' from origin 'http://wxserver.knowway.cn' has been blocke 改ng 阅读全文
posted @ 2019-11-14 12:59 newmiracle宇宙 阅读(559) 评论(0) 推荐(0)
摘要: PHP 导出微信公众号粉丝的方法 先 user/get 获取关注者列表 然后user/info 根据openid读取信息 以上方法认证的订阅号支持 阅读全文
posted @ 2019-11-14 12:59 newmiracle宇宙 阅读(487) 评论(0) 推荐(0)
摘要: jquery.eraser制作擦涂效果 <pre><!DOCTYPE html><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta charset="utf-8" /> < 阅读全文
posted @ 2019-11-14 12:58 newmiracle宇宙 阅读(325) 评论(0) 推荐(0)
摘要: <pre><!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Document</title><style>.wrap{ position:absolute; width: 400px; border:1px solid 阅读全文
posted @ 2019-11-14 12:57 newmiracle宇宙 阅读(1196) 评论(0) 推荐(0)
摘要: CSS3解决字母不换行的方法 <pre>word-wrap: break-word;</pre> 阅读全文
posted @ 2019-11-14 12:57 newmiracle宇宙 阅读(229) 评论(0) 推荐(0)
摘要: css3 preserve-3d 的理解 <pre><!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8"> <title>转换模块-正方体</title> <style> * { margin: 0; padding: 0; /*去 阅读全文
posted @ 2019-11-14 12:57 newmiracle宇宙 阅读(1273) 评论(0) 推荐(0)
摘要: javascript JSMpeg.js 播放视频解决不用全屏也能播放(也支持自动播放哦) 缺陷就是 因为采用的是 MPEG1解码器 所以清晰度有点低 做直播可以考虑下 如果要清晰度高点 可以采取序列帧播放 前面图片加载好 后面边播放边加载 具体看http://newmiracle.cn/?p=28 阅读全文
posted @ 2019-11-14 12:56 newmiracle宇宙 阅读(8647) 评论(0) 推荐(0)
摘要: linux写系统服务的方法 2.1 首先编写demo程序:hello.c<pre>#include <stdio.h> # chkconfig: 2345 10 90 main() { FILE *fp; char a[] = "Hello world!"; fp=fopen("hhh.txt"," 阅读全文
posted @ 2019-11-14 12:56 newmiracle宇宙 阅读(832) 评论(0) 推荐(0)
摘要: mysql connect refuse解决方法 1 因为连接数太多my.cnf配置文件 下面2个改大一点就好了 <pre>max_user_connectionmax_connections</pre> 2 还有服务器内存不够用的情况 阅读全文
posted @ 2019-11-14 12:55 newmiracle宇宙 阅读(1953) 评论(0) 推荐(0)
摘要: jquery微信浏览器阻止页面拖动<pre>function bodyScroll(event) { event.preventDefault();} document.body.addEventListener('touchmove', bodyScroll, false); /*有些页面可能会影 阅读全文
posted @ 2019-11-14 12:54 newmiracle宇宙 阅读(267) 评论(0) 推荐(0)
摘要: 关闭redis持久化功能持久化会报如下信息 会影响硬盘写入性能 所以没什么用 就关掉吧 修改redis配置文件,redis.conf 第115行左右。 1.注释掉原来的持久化规则 <pre>#save 900 1#save 300 10#save 60 10000</pre> 2.设置为空 <pre 阅读全文
posted @ 2019-11-14 12:53 newmiracle宇宙 阅读(4198) 评论(0) 推荐(0)
摘要: ios jquery css('left')无法读取属性解决的方法 <pre>$(this).position().left因为display:none状态下是读取不了 $(this).offset().left</pre> 阅读全文
posted @ 2019-11-14 12:53 newmiracle宇宙 阅读(161) 评论(0) 推荐(0)
摘要: linux cmake安装方法 OpenCV 2.2以后的版本需要使用Cmake生成makefile文件,因此需要先安装cmake;还有其它一些软件都需要先安装cmake 1.在linux环境下打开网页浏览器,输入网址:<a title="http://www.cmake.org/cmake/res 阅读全文
posted @ 2019-11-14 12:52 newmiracle宇宙 阅读(1623) 评论(0) 推荐(0)
摘要: linux下升级python版本 下载python最新版本2.7.13并编译安装 <pre>wget https://www.python.org/ftp/python/2.7.12/Python-2.7.13.tar.xzxz -d Python-2.7.13.tar.xztar xf Pytho 阅读全文
posted @ 2019-11-14 12:52 newmiracle宇宙 阅读(1460) 评论(0) 推荐(0)
摘要: 查版本gcc --version 需>4.8python 2.7+cmake --version numpy 以上是必须的 linux下安装opencv3.0<pre>https://sourceforge.net/projects/opencvlibrary/files/opencv-unix/3 阅读全文
posted @ 2019-11-14 12:51 newmiracle宇宙 阅读(336) 评论(0) 推荐(0)
摘要: Linux下安装numpy1 下载下载源码包<pre>下载地址 https://pypi.python.org/pypi/numpy/1.10.2wget https://pypi.python.org/packages/3d/82/a8e9227167dca4301d4d7a61977a50d12 阅读全文
posted @ 2019-11-14 12:51 newmiracle宇宙 阅读(4423) 评论(0) 推荐(0)
摘要: python Tesseract安装方法 EXE可执行文件地址:http://download.csdn.net/download/whatday/7740469;下载tesseract-ocr-setup-3.02.02.exe安装包,安装成功后会在相应磁盘下有Tesseract-OCR文件夹 设 阅读全文
posted @ 2019-11-14 12:50 newmiracle宇宙 阅读(922) 评论(0) 推荐(0)
摘要: php session获取不到的解决方法 因为sesson数据是存在服务器端的硬盘一般临时空间不足 /tmp/ 1 这个需要清空下系统盘就可以了2 你可以在空间充足的地方mkdir 文件夹——你可以使用的文件夹,例如:mkdir /home/username/tmp 为了是设置生效,需要设置环境变量 阅读全文
posted @ 2019-11-14 12:50 newmiracle宇宙 阅读(1190) 评论(0) 推荐(1)
摘要: 1.1 获取安装包并解压<pre>wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.bz2tar -jxvf gcc-4.8.2.tar.bz2</pre>1.2 下载供编译需求的依赖项这个神奇的脚本文件会帮我们下载、配置、安装依赖库,可 阅读全文
posted @ 2019-11-14 12:50 newmiracle宇宙 阅读(221) 评论(0) 推荐(0)
摘要: 查看redis占用内存大小的方法 <pre>redis-cli auth 密码info</pre><pre># Memory used_memory:13490096 //数据占用了多少内存(字节 byte) used_memory_human:12.87M //数据占用了多少内存(带单位的,可读性 阅读全文
posted @ 2019-11-14 12:49 newmiracle宇宙 阅读(15763) 评论(0) 推荐(0)
摘要: PHP判断是否为手机端的方法 private function ismobile() { // 如果有HTTP_X_WAP_PROFILE则一定是移动设备 if (isset($_SERVER['HTTP_X_WAP_PROFILE'])) { return true; } //此条摘自TPM智能切 阅读全文
posted @ 2019-11-14 12:49 newmiracle宇宙 阅读(2926) 评论(0) 推荐(0)
摘要: PHP 打印调用函数入口地址(堆栈)<pre> private function print_stack_trace() { $array = debug_backtrace(); //print_r($array);//信息很齐全 unset($array[0]); foreach ($array 阅读全文
posted @ 2019-11-14 12:48 newmiracle宇宙 阅读(477) 评论(0) 推荐(0)
摘要: javascript获取上传图片的大小 <pre><input id="file" type="file"> <input id="Button1" type="button" value="button" onclick="check()"> <script> window.check=funct 阅读全文
posted @ 2019-11-14 12:47 newmiracle宇宙 阅读(429) 评论(0) 推荐(0)
摘要: html5 svg实现不规则形状图片触发事件<pre><!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title></head> <body><svg xmlns="http://www.w 阅读全文
posted @ 2019-11-14 12:46 newmiracle宇宙 阅读(1471) 评论(0) 推荐(0)
摘要: php imagick设置图片圆角的方法 <pre>header('Content-Type: image/png'); $image = new Imagick('http://static.codeweblog.com/uploads/user/29/58387_100.jpg');$image 阅读全文
posted @ 2019-11-14 12:46 newmiracle宇宙 阅读(1354) 评论(0) 推荐(0)
摘要: mysql group by分组查询后 查询个数2个方法随便你选 <pre>select count(distinct colA) from table1;</pre><pre>select count(*) from (select colA from table1 group by colA) 阅读全文
posted @ 2019-11-14 12:45 newmiracle宇宙 阅读(3309) 评论(0) 推荐(1)
摘要: php imagick svg转成jpg <pre> public function svgtojpg() { $image = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 阅读全文
posted @ 2019-11-14 12:45 newmiracle宇宙 阅读(883) 评论(0) 推荐(0)
摘要: svg自适应写法<pre><!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title></head> <body> <div style="width:30%; height:3.6rem; 阅读全文
posted @ 2019-11-14 12:45 newmiracle宇宙 阅读(4973) 评论(0) 推荐(0)
摘要: php debug_backtrace方法跟踪代码调用<pre>function string 当前的函数名,参见: __FUNCTION__。line integer 当前的行号。参见: __LINE__。file string 当前的文件名。参见: __FILE__。class string 当 阅读全文
posted @ 2019-11-14 12:43 newmiracle宇宙 阅读(292) 评论(0) 推荐(0)
摘要: jquery 数字滚动方法用的是countUp.js这个插件 target = 目标元素的 ID;startVal = 开始值;endVal = 结束值;decimals = 小数位数,默认值是0;duration = 动画延迟秒数,默认值是2; 1先初始化 <pre> var options = 阅读全文
posted @ 2019-11-14 12:43 newmiracle宇宙 阅读(611) 评论(0) 推荐(0)
摘要: mysql select自增变量(包括读取当前第几行) SET @rownum =0;select id,@rownum := @rownum +1 as i from ceshi order by dd desc,id desc; 变量是直接输出在结果集的 SET @rownum =0; @row 阅读全文
posted @ 2019-11-14 12:42 newmiracle宇宙 阅读(2363) 评论(0) 推荐(0)
摘要: php imagick蒙版做法<pre> $image = new \Imagick(); $image->readImage(__DIR__ . '/mengban.png'); $watermark = new \Imagick(); $watermark->readImage(__DIR__ 阅读全文
posted @ 2019-11-14 12:41 newmiracle宇宙 阅读(476) 评论(0) 推荐(0)
摘要: mysql update获取主键<pre>SET @update_id := 0;UPDATE mobantestinfo1 SET info2 = 'value', id = (SELECT @update_id := id)WHERE info1 = '23a' LIMIT 1; SELECT 阅读全文
posted @ 2019-11-14 12:41 newmiracle宇宙 阅读(1516) 评论(0) 推荐(0)
摘要: mysql用find_in_set代替like搜索提高性能 <pre>SELECT * from mobantestinfo1 where find_in_set('33',info2); </pre> ps 常用于 tag搜索 阅读全文
posted @ 2019-11-14 12:40 newmiracle宇宙 阅读(1242) 评论(0) 推荐(0)
摘要: php ffmpeg视频和序列帧转化 <pre>$cmd=shell_exec("ffmpeg -i ".__DIR__ . "/shipin1.mp4 -r 25 -q:v 2 ".__DIR__ . "/testxulie/%03d.jpg"); print_r($cmd); exit(); $ 阅读全文
posted @ 2019-11-14 12:39 newmiracle宇宙 阅读(818) 评论(0) 推荐(0)
摘要: sublime3中运行python文件 tools->build system->new build stystem 粘贴下面代码{"cmd":["python.exe", "-u", "$file"],"path":"C:/Users/csq/AppData/Local/Programs/Pyth 阅读全文
posted @ 2019-11-14 12:38 newmiracle宇宙 阅读(247) 评论(0) 推荐(0)
摘要: jquery mobiscroll移动端日期选择控件(无乱码) <pre><!DOCTYPE html><html lang="en"><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, i 阅读全文
posted @ 2019-11-14 12:37 newmiracle宇宙 阅读(525) 评论(0) 推荐(0)
摘要: php+mysql 实现无限极分类<pre>id name pid path 1 电脑 0 0 2 手机 0 0 3 笔记本 1 0-1 4 超级本 3 0-1-3 5 游戏本 3 0-1-3</pre> 这种方式,假设我们要查询电脑下的所有后代分类,只需要一条sql语句: <pre>select 阅读全文
posted @ 2019-11-14 12:36 newmiracle宇宙 阅读(434) 评论(0) 推荐(0)
摘要: javascript canvas 生成图片的方法 先生成base64格式的图片 然后ajax传到后台 写入服务器文件夹即可<pre><!DOCTYPE HTML><html> <body> <canvas id="myCanvas"> your browser does not support t 阅读全文
posted @ 2019-11-14 12:36 newmiracle宇宙 阅读(614) 评论(0) 推荐(0)
摘要: php 开启微信公众号开发者模式<pre><?php/** * wechat php test */header('Content-type:text');//define your token//定义TOKEN密钥define("TOKEN", "weixin");//实例化微信对象$wechat 阅读全文
posted @ 2019-11-14 12:35 newmiracle宇宙 阅读(458) 评论(0) 推荐(0)
摘要: PHP对象继承<?php class foo{ public function printItem($string) { echo 'Foo: ' . $string . PHP_EOL; } public function printPHP() { echo 'PHP is great.' . P 阅读全文
posted @ 2019-11-14 12:34 newmiracle宇宙 阅读(145) 评论(0) 推荐(0)
摘要: jquery layui的巨坑 layui 模块不能写在ajax里 因为 layui只能执行一次 第二次会没效果 再执行需要刷新页面再执行 阅读全文
posted @ 2019-11-14 12:33 newmiracle宇宙 阅读(663) 评论(0) 推荐(0)
摘要: phpexcel导出数字带E的解决方法 excel之所以带E 是因为按照数字格式来显示了(数字过长的时候) 数字左边或者右边加空格就变成字符串了 那么excel就会按照字符串格式来显示了 就不会带E了 阅读全文
posted @ 2019-11-14 12:33 newmiracle宇宙 阅读(1629) 评论(0) 推荐(0)
摘要: 1 输入地址获取经纬度 http://lbs.qq.com/tool/getpoint/2 修改url https://apis.map.qq.com/uri/v1/marker?marker=coord:39.892326,116.342763;title:超好吃冰激凌;addr:手帕口桥北铁路道 阅读全文
posted @ 2019-11-14 12:32 newmiracle宇宙 阅读(946) 评论(1) 推荐(0)
摘要: jssdk分享报错解决方法 一般都是参数传错了 阅读全文
posted @ 2019-11-14 12:32 newmiracle宇宙 阅读(226) 评论(0) 推荐(0)
摘要: jquery手机端横屏判断方法<pre>$(function() { var bodywidth = $('body').width(); var bodyheight = $('body').height(); if (bodywidth >= bodyheight) { /*横屏*/ } els 阅读全文
posted @ 2019-11-14 12:31 newmiracle宇宙 阅读(820) 评论(0) 推荐(0)
摘要: PHP创建文件命名中文乱码解决的方法 <pre>iconv('utf-8', 'gbk', $dir); </pre> 因为系统环境是gbk 所以里面的字符也要gbk 编码一致才不会乱码 ps 请不要重复执行2次 不然会乱码 阅读全文
posted @ 2019-11-14 12:29 newmiracle宇宙 阅读(627) 评论(0) 推荐(0)
摘要: javascript 字符串转化成函数执行<pre>function func_abc(){ alert('a');}var str = "func_abc";eval(str+"()");//执行func_abc()函数</pre> 阅读全文
posted @ 2019-11-14 12:29 newmiracle宇宙 阅读(3309) 评论(0) 推荐(0)
摘要: PHP Notice: Undefined index:解决方法 PHP Notice: Undefined index: 解决方法 <pre> if (empty(swoole_get_local_ip()['eth1'])) { } else { }</pre> 加个exmpty就可以了 阅读全文
posted @ 2019-11-14 12:28 newmiracle宇宙 阅读(362) 评论(0) 推荐(0)
摘要: windows下载安装swoole的方法先安装Cygwin 选择163镜像(速度非常快) add url http://mirrors.163.com/cygwin/ 然后安装gcc php pcre-devel autoconf模块 如图下 选择安装的软件包,这里需要安装gcc、php、php开发 阅读全文
posted @ 2019-11-14 12:28 newmiracle宇宙 阅读(598) 评论(0) 推荐(0)
摘要: jquery判断手指滑动方向 <pre> /*判断哪个滑动方向还是自己改下 要么上下 要么左右*/ var startX; var startY; $(".shanghua").on("touchstart", function(e) { // 判断默认行为是否可以被禁用 if (e.cancela 阅读全文
posted @ 2019-11-14 12:26 newmiracle宇宙 阅读(366) 评论(0) 推荐(0)
摘要: javascript监听手机返回键 <pre> if (window.history && window.history.pushState) { $(window).on('popstate', function() { var hashLocation = location.hash; var 阅读全文
posted @ 2019-11-14 12:26 newmiracle宇宙 阅读(299) 评论(0) 推荐(0)
摘要: html5 点击播放video的方法<pre> <video videosrc="{$vo.shipinurl}" controls="" x5-playsinline="" playsinline="" webkit-playsinline="" poster=""> </video> var v 阅读全文
posted @ 2019-11-14 12:22 newmiracle宇宙 阅读(4850) 评论(0) 推荐(0)
摘要: <pre>php 5.5使用 array_column的方法</pre> <pre> public function array_column($input, $columnKey, $indexKey = null) { $columnKeyIsNumber = (is_numeric($colu 阅读全文
posted @ 2019-11-14 12:22 newmiracle宇宙 阅读(286) 评论(0) 推荐(0)
摘要: mysql并发量过大造成 update语句更新错误 在同一字段的时候更新的时候 如果并发量太大 就会更新错误 这个时候只能用 swoole 消息队列更新 阅读全文
posted @ 2019-11-14 12:21 newmiracle宇宙 阅读(1343) 评论(0) 推荐(0)
摘要: html5 微信真机调试方法 vConsolehttps://blog.csdn.net/weixin_36934930/article/details/79870240 阅读全文
posted @ 2019-11-14 12:05 newmiracle宇宙 阅读(640) 评论(0) 推荐(0)
摘要: jquery设置html5音量的方法<pre> setTimeout(function() { alert(1); $('#music1')[0].volume = 0; setTimeout(function() { alert(2); $('#music1')[0].volume = 1; }, 阅读全文
posted @ 2019-11-14 12:04 newmiracle宇宙 阅读(1014) 评论(0) 推荐(0)
摘要: PHP防止客户端多次点击 第一种用ip判断 第二种就是用 用户名第三种就是cookie仅限 H5第四种 用swoole 用swoole id 阅读全文
posted @ 2019-11-14 12:04 newmiracle宇宙 阅读(816) 评论(0) 推荐(0)
摘要: jQuery 触发事件 移动端和pc端的区别 <pre>mousedown event.pageXmousemove event.pageXmouseup event.pageXtouchstart event.originalEvent.touches[0].pageX & event.origi 阅读全文
posted @ 2019-11-14 12:02 newmiracle宇宙 阅读(452) 评论(0) 推荐(0)