不知道为什么spotlight突然坏了。重建索引 也没用。现在连做个加法都不OK了。只能。。。。用alfred了!
快捷键设置成一样,感觉好多了。一个星期没法用,感觉效率都降低了很多!
其实以前在windows上,我用的是launchy。就特别觉得好用,然后到了mac后,用spotlight,虽然 很多人一直说alfred好用,但那时候在试用下来,感觉我要的功能其实spotlight一样。而且打开速度还是spotlight更快。。。。
只是这次,突然不能用了。所以。哎~~
膘叔的简单人生
不知道为什么spotlight突然坏了。重建索引 也没用。现在连做个加法都不OK了。只能。。。。用alfred了!
快捷键设置成一样,感觉好多了。一个星期没法用,感觉效率都降低了很多!
其实以前在windows上,我用的是launchy。就特别觉得好用,然后到了mac后,用spotlight,虽然 很多人一直说alfred好用,但那时候在试用下来,感觉我要的功能其实spotlight一样。而且打开速度还是spotlight更快。。。。
只是这次,突然不能用了。所以。哎~~
jqweui是一个偷懒的基于Weui的组件,1.0的时候已经部分支持rem。所以用的还是比较多的。特别是我对它的部分组件有了一些扩展。而且它还有一些奇技淫巧。
1、如何通过函数来动态调整picker的内容。
默认情况下,picker/select在初始化的时候值已经固定了。这时候你其实是没有办法调整的,但不代表没有办法。虽然 API里没有提供,读了源码后你就能发现。其实你可以这样:
$('#xxx').val('').data('weui-select',false).select({
title: "其他值",
items: ["1","2"]
});
记得有一个恶心的地方,items里的值不能是数字!!!
2、添加清除功能,默认的select/picker在选择后就不能清除了(当然你可以在items的第一个值设置为空)。所以我简单的扩展了一下:https://github.com/lihongxun945/jquery-weui/issues/443。
无非就是加个文字,加个清除等等。。
3、picker/select在使用的时候,有时候会显示一个软键盘而无法删除和隐藏。这时候的解决办法其实就是在input上面加上onfocus="this.blur()"即可!
因为用了pjax,所以URL在请求的时候都是被自动加了?pjax-container=xxxxx,但请求完pjax后,location的pushState又会去掉这个pjax-container。所以要解决签名问题,其实就是在签名的时候把pjax-container去掉
因此jssdk()->config(xxx)的时候,先在前面加入jssdk()->setUrl(Url::to([''],true))->config('')...问题解决!
就是这么简单!
不多说上图
[2017-10-13 08:52:28]{"router":"site/test","process_time":1.05578303337,"include_files":110}
[2017-10-13 08:52:29]{"router":"site/test","process_time":1.65018391609,"include_files":110}
[2017-10-13 08:52:30]{"router":"site/test","process_time":2.24326276779,"include_files":110}
[2017-10-13 08:52:31]{"router":"site/test","process_time":2.83484601974,"include_files":110}
[2017-10-13 08:52:32]{"router":"site/test","process_time":3.45267605782,"include_files":110}
[2017-10-13 08:52:43]{"router":"site/test","process_time":0.045606136322,"include_files":110}
[2017-10-13 08:52:43]{"router":"site/test","process_time":0.0466020107269,"include_files":110}
[2017-10-13 08:52:44]{"router":"site/test","process_time":0.0419600009918,"include_files":110}
[2017-10-13 08:52:44]{"router":"site/test","process_time":0.0458340644836,"include_files":110}
[2017-10-13 08:52:44]{"router":"site/test","process_time":0.0436880588531,"include_files":110}
navicat是个好软件,mariadb也是,不过,默认的mariadb在查看的时候可能会是乱码(特别是debian 9,默认没有mysql,只有mariadb了)
[mysqld]下增加character-set-server=utf8
[client]下增加default-character-set=utf8
[mysql] 下增加default-character-set=utf8
如果还是无效。。则尝试在mysqld下再增加:
[mysqld]
init_connect='SET collation_connection = utf8_unicode_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake
dcloud更新失败有几个原因:
原来的数据库是N年前的,默认字符集是latin1,但是有一些旧代码中,连接参数写的是UTF8,于是就这样。。。DB字符集为latin1,连接UTF8,存到数据库也是UTF8,wj但查看的时候显示是???
为了标准统一,于是使用mysqldump -uxx -p database a b c d e > dump.sql,将部分表先导出来
然后修改导出sql的charset=latin1;改为charset=utf8;
至此,操作完成。简单粗暴
-------EOF--
deeka说,如果有200G呢。目前我是停机处理的。因为要处理的数据也不是很多。如果不是因为升级换库的时候出现不能访问我也不会这么做。
但好象也没有特别好的方案。因为直接alter的时候也是各种不正常。才dump的
说实话,在datatables里,我觉得这个回复挺重要的!https://datatables.net/forums/discussion/33723/new-user-help-columns-vs-columndefs-for-client-side-rendering-of-ajax-data
Hi,
I'm a beginner with DataTables. I'm trying to use DataTables AJAX to pull records from the server (an ASP.NET MVC app.) Each record coming from the server has name, address line 1, address line 2, city, state, zip. I want my table to combine and format all those fields into one column on the client.
My questions are:
1. Would I use columns.render, or columnDefs.render?
2. Do I need both columns and columnDefs?
3. Do I need to specify either the table column name (e.g., NameAndAddress) in "columns", or do I need to list each field coming back from the server?
4. How do I use "targets"? Does "targets" refer to the column in the displayed table, or the column under "columns"?
Thanks for your help. I've been though the documentation a few times and I'm still confused about columns vs. columnDefs.
"columns" & "columnsDefs" ultimately serve the same purpose.
The differences being:
"targets" takes a single string or int value, or array of previous two to denote which columns this configuration is for. I suggest using column class instead of column # in the event you want to use ColReorder extension.
Here are examples of how I have configured columns in my application.
<th class="actionsCol no-print">Actions</th>
<th class="StatusCol">Status</th>
<th class="IsFinalCol">Final<br>Plan</th>
<th class="VrsnCol">Vrsn</th>
<th class="CutCntCol">Cut<br>Cnt</th>
<th class="CarCntCol">Car<br>Cnt</th>
"columnDefs": [
{
// This is for the Action column icons
"targets": 'actionsCol',
"sorting": false,
"orderable": false,
"type":"html",
"width": "8%",
className: "dt_nowrap_col no-print",
"render": function (data, type, row) {
return $.jqote(yv.templates.action_icons, data);
}
},
{
"targets": ['IsFinalCol','CutCntCol','CarCntCol','VrsnCol','StatusCol'],
"width": "5%"
},
etc
]
datatables现在也开始逐步用的多了。虽然用起来复杂了一点,但好歹还能减少一些开发量
纯转,勿喷,主要还是有时候会忘记。虽然-x -d -H -o 之类的都记得。。。原文来自:http://blog.51yip.com/linux/1049.html
-a/--append 上传文件时,附加到目标文件
-A/--user-agent <string> 设置用户代理发送给服务器
- anyauth 可以使用“任何”身份验证方法
-b/--cookie <namename=string/file> cookie字符串或文件读取位置
- basic 使用HTTP基本验证
-B/--use-ascii 使用ASCII /文本传输
-c/--cookie-jar <file> 操作结束后把cookie写入到这个文件中
-C/--continue-at <offset> 断点续转
-d/--data <data> HTTP POST方式传送数据
--data-ascii <data> 以ascii的方式post数据
--data-binary <data> 以二进制的方式post数据
--negotiate 使用HTTP身份验证
--digest 使用数字身份验证
--disable-eprt 禁止使用EPRT或LPRT
--disable-epsv 禁止使用EPSV
-D/--dump-header <file> 把header信息写入到该文件中
--egd-file <file> 为随机数据(SSL)设置EGD socket路径
--tcp-nodelay 使用TCP_NODELAY选项
-e/--referer 来源网址
-E/--cert <cert[:passwd]> 客户端证书文件和密码 (SSL)
--cert-type <type> 证书文件类型 (DER/PEM/ENG) (SSL)
--key <key> 私钥文件名 (SSL)
--key-type <type> 私钥文件类型 (DER/PEM/ENG) (SSL)
--pass <pass> 私钥密码 (SSL)
--engine <eng> 加密引擎使用 (SSL). "--engine list" for list
--cacert <file> CA证书 (SSL)
--capath <directory> CA目录 (made using c_rehash) to verify peer against (SSL)
--ciphers <list> SSL密码
--compressed 要求返回是压缩的形势 (using deflate or gzip)
--connect-timeout <seconds> 设置最大请求时间
--create-dirs 建立本地目录的目录层次结构
--crlf 上传是把LF转变成CRLF
-f/--fail 连接失败时不显示http错误
--ftp-create-dirs 如果远程目录不存在,创建远程目录
--ftp-method [multicwd/nocwd/singlecwd] 控制CWD的使用
--ftp-pasv 使用 PASV/EPSV 代替端口
--ftp-skip-pasv-ip 使用PASV的时候,忽略该IP地址
--ftp-ssl 尝试用 SSL/TLS 来进行ftp数据传输
--ftp-ssl-reqd 要求用 SSL/TLS 来进行ftp数据传输
-F/--form <namename=content> 模拟http表单提交数据
-form-string <namename=string> 模拟http表单提交数据
-g/--globoff 禁用网址序列和范围使用{}和[]
-G/--get 以get的方式来发送数据
-h/--help 帮助
-H/--header <line>自定义头信息传递给服务器
--ignore-content-length 忽略的HTTP头信息的长度
-i/--include 输出时包括protocol头信息
-I/--head 只显示文档信息
从文件中读取-j/--junk-session-cookies忽略会话Cookie
- 界面<interface>指定网络接口/地址使用
- krb4 <级别>启用与指定的安全级别krb4
-j/--junk-session-cookies 读取文件进忽略session cookie
--interface <interface> 使用指定网络接口/地址
--krb4 <level> 使用指定安全级别的krb4
-k/--insecure 允许不使用证书到SSL站点
-K/--config 指定的配置文件读取
-l/--list-only 列出ftp目录下的文件名称
--limit-rate <rate> 设置传输速度
--local-port<NUM> 强制使用本地端口号
-m/--max-time <seconds> 设置最大传输时间
--max-redirs <num> 设置最大读取的目录数
--max-filesize <bytes> 设置最大下载的文件总量
-M/--manual 显示全手动
-n/--netrc 从netrc文件中读取用户名和密码
--netrc-optional 使用 .netrc 或者 URL来覆盖-n
--ntlm 使用 HTTP NTLM 身份验证
-N/--no-buffer 禁用缓冲输出
-o/--output 把输出写到该文件中
-O/--remote-name 把输出写到该文件中,保留远程文件的文件名
-p/--proxytunnel 使用HTTP代理
--proxy-anyauth 选择任一代理身份验证方法
--proxy-basic 在代理上使用基本身份验证
--proxy-digest 在代理上使用数字身份验证
--proxy-ntlm 在代理上使用ntlm身份验证
-P/--ftp-port <address> 使用端口地址,而不是使用PASV
-Q/--quote <cmd>文件传输前,发送命令到服务器
-r/--range <range>检索来自HTTP/1.1或FTP服务器字节范围
--range-file 读取(SSL)的随机文件
-R/--remote-time 在本地生成文件时,保留远程文件时间
--retry <num> 传输出现问题时,重试的次数
--retry-delay <seconds> 传输出现问题时,设置重试间隔时间
--retry-max-time <seconds> 传输出现问题时,设置最大重试时间
-s/--silent静音模式。不输出任何东西
-S/--show-error 显示错误
--socks4 <host[:port]> 用socks4代理给定主机和端口
--socks5 <host[:port]> 用socks5代理给定主机和端口
--stderr <file>
-t/--telnet-option <OPTOPT=val> Telnet选项设置
--trace <file> 对指定文件进行debug
--trace-ascii <file> Like --跟踪但没有hex输出
--trace-time 跟踪/详细输出时,添加时间戳
-T/--upload-file <file> 上传文件
--url <URL> Spet URL to work with
-u/--user <user[:password]>设置服务器的用户和密码
-U/--proxy-user <user[:password]>设置代理用户名和密码
-v/--verbose
-V/--version 显示版本信息
-w/--write-out [format]什么输出完成后
-x/--proxy <host[:port]>在给定的端口上使用HTTP代理
-X/--request <command>指定什么命令
-y/--speed-time 放弃限速所要的时间。默认为30
-Y/--speed-limit 停止传输速度的限制,速度时间'秒
-z/--time-cond 传送时间设置
-0/--http1.0 使用HTTP 1.0
-1/--tlsv1 使用TLSv1(SSL)
-2/--sslv2 使用SSLv2的(SSL)
-3/--sslv3 使用的SSLv3(SSL)
--3p-quote like -Q for the source URL for 3rd party transfer
--3p-url 使用url,进行第三方传送
--3p-user 使用用户名和密码,进行第三方传送
-4/--ipv4 使用IP4
-6/--ipv6 使用IP6
-#/--progress-bar 用进度条显示当前的传送状态
[root@krlcgcms01 mytest]# curl -o home.html http://blog.51yip.com
2,用-O(大写的),后面的url要具体到某个文件,不然抓不下来。我们还可以用正则来抓取东西[root@krlcgcms01 mytest]# curl -O http://blog.51yip.com/wp-content/uploads/2010/09/compare_varnish.jpg
[root@krlcgcms01 mytest]# curl -O http://blog.51yip.com/wp-content/uploads/2010/[0-9][0-9]/aaaaa.jpg
3,模拟表单信息,模拟登录,保存cookie信息[root@krlcgcms01 mytest]# curl -c ./cookie_c.txt -F log=aaaa -F pwd=****** http://blog.51yip.com/wp-login.php
[root@krlcgcms01 mytest]# curl -D ./cookie_D.txt -F log=aaaa -F pwd=****** http://blog.51yip.com/wp-login.php
-c(小写)产生的cookie和-D里面的cookie是不一样的。 [root@krlcgcms01 mytest]# curl -b ./cookie_c.txt http://blog.51yip.com/wp-admin
[root@krlcgcms01 mytest]# curl -C -O http://blog.51yip.com/wp-content/uploads/2010/09/compare_varnish.jpg
7,传送数据,最好用登录页面测试,因为你传值过去后,curl回抓数据,你可以看到你传值有没有成功[root@krlcgcms01 mytest]# curl -d log=aaaa http://blog.51yip.com/wp-login.php
[root@krlcgcms01 mytest]# curl -f http://blog.51yip.com/asdf
curl: (22) The requested URL returned error: 404
[root@krlcgcms01 mytest]# curl http://blog.51yip.com/asdf
<HTML><HEAD><TITLE>404,not found</TITLE>
。。。。。。。。。。。。
[root@krlcgcms01 mytest]# curl -e http://localhost http://blog.51yip.com/wp-login.php
[root@krlcgcms01 mytest]# curl -x 24.10.28.84:32779 -o home.html http://blog.51yip.com
11,比较大的东西,我们可以分段下载[root@krlcgcms01 mytest]# curl -r 0-100 -o img.part1 http://blog.51yip.com/wp-
content/uploads/2010/09/compare_varnish.jpg
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 101 100 101 0 0 105 0 --:--:-- --:--:-- --:--:-- 0
[root@krlcgcms01 mytest]# curl -r 100-200 -o img.part2 http://blog.51yip.com/wp-
content/uploads/2010/09/compare_varnish.jpg
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 101 100 101 0 0 57 0 0:00:01 0:00:01 --:--:-- 0
[root@krlcgcms01 mytest]# curl -r 200- -o img.part3 http://blog.51yip.com/wp-
content/uploads/2010/09/compare_varnish.jpg
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 104k 100 104k 0 0 52793 0 0:00:02 0:00:02 --:--:-- 88961
[root@krlcgcms01 mytest]# ls |grep part | xargs du -sh
4.0K one.part1
112K three.part3
4.0K two.part2
[root@krlcgcms01 mytest]# curl -s -o aaa.jpg http://blog.51yip.com/wp-content/uploads/2010/09/compare_varnish.jpg
[root@krlcgcms01 mytest]# curl -# -O http://blog.51yip.com/wp-content/uploads/2010/09/compare_varnish.jpg
######################################################################## 100.0%
14,通过ftp下载文件[zhangy@BlackGhost ~]$ curl -u 用户名:密码 -O http://blog.51yip.com/demo/curtain/bbstudy_files/style.css
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
101 1934 101 1934 0 0 3184 0 --:--:-- --:--:-- --:--:-- 7136
[zhangy@BlackGhost ~]$ curl -O ftp://用户名:密码@ip:port/demo/curtain/bbstudy_files/style.css
15,通过ftp上传[zhangy@BlackGhost ~]$ curl -T test.sql ftp://用户名:密码@ip:port/demo/curtain/bbstudy_files/