<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[intcpu]]></title><description><![CDATA[Obsidian digital garden]]></description><link>intcpu.github.io</link><image><url>intcpu.github.io/site-lib/media/favicon.png</url><title>intcpu</title><link>intcpu.github.io</link></image><generator>Webpage HTML Export plugin for Obsidian</generator><lastBuildDate>Sat, 07 Nov 2026 14:50:33 GMT</lastBuildDate><atom:link href="intcpu.github.io/site-lib/rss.xml" rel="self" type="application/rss+xml"/><pubDate>Sat, 07 Nov 2026 14:50:32 GMT</pubDate><copyright><![CDATA[intcpu]]></copyright><ttl>60</ttl><dc:creator>intcpu</dc:creator><item><title><![CDATA[时间序列建模标准]]></title><description><![CDATA[<img src="intcpu.github.io/数算的笔记/量化交易/attachments/20260921020318000.png" target="_self">]]></description><link>intcpu.github.io/数算的笔记/量化交易/时间序列建模标准.html</link><guid isPermaLink="false">数算的笔记/量化交易/时间序列建模标准.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Thu, 28 Apr 2022 09:43:41 GMT</pubDate><enclosure url="intcpu.github.io/数算的笔记/量化交易/attachments/20260921020318000.png" length="0" type="image/png"/><content:encoded>&lt;figure&gt;&lt;img src="intcpu.github.io/数算的笔记/量化交易/attachments/20260921020318000.png"&gt;&lt;/figure&gt;</content:encoded></item><item><title><![CDATA[20260921020318000]]></title><description><![CDATA[<img src="intcpu.github.io/数算的笔记/量化交易/attachments/20260921020318000.png" target="_self">]]></description><link>intcpu.github.io/数算的笔记/量化交易/attachments/20260921020318000.html</link><guid isPermaLink="false">数算的笔记/量化交易/attachments/20260921020318000.png</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Sun, 20 Sep 2026 18:03:18 GMT</pubDate><enclosure url="intcpu.github.io/数算的笔记/量化交易/attachments/20260921020318000.png" length="0" type="image/png"/><content:encoded>&lt;figure&gt;&lt;img src="intcpu.github.io/数算的笔记/量化交易/attachments/20260921020318000.png"&gt;&lt;/figure&gt;</content:encoded></item><item><title><![CDATA[数算的笔记]]></title><description><![CDATA[<a data-href="数据分析基础概念" href="intcpu.github.io/数算的笔记/量化交易/数据分析基础概念.html" class="internal-link" target="_self" rel="noopener nofollow">数据分析基础概念</a><br><a data-href="开源产品收藏单" href="intcpu.github.io/数算的笔记/互联网开发/开源产品收藏单.html" class="internal-link" target="_self" rel="noopener nofollow">开源产品收藏单</a><br><a data-href="linux常用命令" href="intcpu.github.io/数算的笔记/服务器/linux常用命令.html" class="internal-link" target="_self" rel="noopener nofollow">linux常用命令</a><br><a data-href="内部网络安全信息概要" href="intcpu.github.io/数算的笔记/其他/内部网络安全信息概要.html" class="internal-link" target="_self" rel="noopener nofollow">内部网络安全信息概要</a>
所有笔记由Markdown格式书写编辑，使用 Obsidian + Webpage HTML Export 导出整站HTML，再由 Git 推送 intcpu.github.io直接访问
<br> <a data-tooltip-position="top" aria-label="https://intcpu.github.io/site-lib/rss.xml" rel="noopener nofollow" class="external-link is-unresolved" href="https://intcpu.github.io/site-lib/rss.xml" target="_self">RSS</a>]]></description><link>intcpu.github.io/index.html</link><guid isPermaLink="false">index.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Wed, 23 Sep 2026 05:53:00 GMT</pubDate></item><item><title><![CDATA[linux常用命令]]></title><description><![CDATA[搜索当前文件夹下非.log文件中含有wapblacklist.conf字符串的find . -type f -name "*.*"| grep -v ".log" |xargs grep -Hn "wapblacklist.conf"
监视系统1803进程调用strace -p 1803
路由跟踪traceroute spider.item.wireless.api
php命令行执行函数/app/php/bin/php -r 'phpinfo();'
/app/php/bin/php -r 'var_dump(curl_version());'
解决一般curl解析DNS超时的问题 curl_setopt($ch, CURLOPT_DNS_USE_GLOBAL_CACHE, 1); curl_setopt($ch, CURLOPT_DNS_CACHE_TIMEOUT, 600); curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
php重启kill -SIGUSR2 `cat /app/php/var/run/php-fpm.pid`
重复请求接口1000次for((i=1;i&lt;=1000;i++)) do result=$(curl -s "https://api-rebate.test.com/v2/ext/rebate/shareChain/kid?itemId=A0005810670&amp;skuId=pop8008663456&amp;flow=1&amp;userId=72204654298&amp;parentKid=&amp;merchantId=80001341&amp;itemUrl=http%3A%2F%2Fitem.m.gome.com%2Fproduct-A0005810670-pop8008663456.html&amp;distributorId=&amp;callfrom=11"); echo $result" " &gt;&gt; 20161208.log; done
机器卡：1、查看CPU利用率与负载（top、vmstat、sar）
2、查看磁盘、Inode利用率与I/O负载（df、iostat、iotop、sar、dstat） （磁盘瓶颈会有各种问题）
3、查看内存利用率（free、vmstat） （交换空间瓶颈会导致进程卡死，cpu却空闲，需要清理swap及内存）
4、查看TCP连接状态（netstat、ss）
5、查看CPU与内存占用最高的10个进程（top、ps）
6、查看网络流量（ifconfig、iftop、iptraf）
7、sar -n DEV 2 100 （看网络是否流量过大，超过网卡限制，一般不会)
sar：sar -n 查网络 DEV（网络接口）、EDEV（网络错误统计）、SOCK（套接字）、FULL（显示其它3个参数所有） 两秒采集网卡一次，共100次 -A：所有报告的总和 -u：输出CPU使用情况的统计信息 -v：输出inode、文件和其他内核表的统计信息 -d：输出每一个块设备的活动信息 -r：输出内存和交换空间的统计信息 -b：显示I/O和传送速率的统计信息 -a：文件读写情况 -c：输出进程统计信息，每秒创建的进程数 -R：输出内存页面的统计信息 -y：终端设备活动情况 -w：输出系统交换活动信息
IFACE：网络接口的名字 rxpck/s：每秒钟接收的数据包 txpck/s：每秒钟发送的数据包 rxbyt/s：每秒钟接收的字节数 txbyt/s：每秒钟发送的字节数 rxcmp/s：每秒钟接收的压缩数据包 txcmp/s：每秒钟发送的压缩数据包 rxmcst/s：每秒钟接收的多播数据包
]]></description><link>intcpu.github.io/数算的笔记/服务器/linux常用命令.html</link><guid isPermaLink="false">数算的笔记/服务器/linux常用命令.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Mon, 31 Oct 2016 15:32:43 GMT</pubDate></item><item><title><![CDATA[数据分析基础概念]]></title><description><![CDATA[两点分布：伯努利分布 ，是 或者 不是 超几何分布： 统计学上一种离散概率分布。描述从有限N个物件（其中包含M个指定种类的物件）中抽出n个物件，成功抽出该指定种类的物件的次数（不放回）,称为超几何分布 二项分布： 是n个独立的成功/失败试验中成功的次数的离散概率分布，其中每次试验的成功概率为p。这样的单次成功/失败试验又称为伯努利试验。实际上，当n=1时，二项分布就是伯努利分布 泊松分布： 的参数λ是单位时间(或单位面积)内随机事件的平均发生次数。 泊松分布适合于描述单位时间内随机事件发生的次数 均匀分布
指数分布
正态分布 标准正态分布
# 方差
func Variance(v []float64) float64 { var res float64 = 0 var m = Mean(v) var n int = len(v) for i := 0; i &lt; n; i++ { res += (v[i] - m) * (v[i] - m) } return res / float64(n-1)
}
# 标准差
func Std(v []float64) float64 { return math.Sqrt(Variance(v))
}
协方差：两个变量的总体的误差，这与只表示一个变量误差的方差不同。如果两个变量的变化趋势一致，也就是说如果其中一个大于自身的期望值，另外一个也大于自身的期望值，那么两个变量之间的协方差就是正值。如果两个变量的变化趋势相反，即其中一个大于自身的期望值，另外一个却小于自身的期望值，那么两个变量之间的协方差就是负值
是信号与其经过时间平移的信号之间的协方差
也叫序列相关，是一个信号于其自身在不同时间点的互相关。非正式地来说，它就是两次观察之间的相似度对它们之间的时间差的函数。它是找出重复模式（如被噪声掩盖的周期信号），或识别隐含在信号谐波频率中消失的基频的数学工具。它常用于信号处理中，用来分析函数或一系列值，如时域信号。
趋势是时间序列在某一方向上持续运动，现象是在较长时期内受某种根本性因素作用而形成的总的变动趋势。上图中可以看到从2014年2月到2014年4月，余额宝的申购资金一路下降，这是一个明显的趋势。
许多时间序列中包含季节变化，现象是在一年内随着季节的变化而发生的有规律的周期性变动。上图中肉眼很难看出时间序列随季节变化，第 3 小结将通过时间序列分解（STL）来展示序列中的季节变化。
时间序列的一个最重要特征是序列相关性，又称为自相关性。上图中可以看到，数据之间存在一定的正相关与负相关。例如某天的数据上升，它的前一天或者后一天也上升或者下降。自相关性是时间序列可以预测未来的前提（序列中存在的规律），如果没有自相关性，就变成了白噪声（无规律）。
它是时间序列中除去趋势、季节变化和自相关性之后的剩余随机扰动。由于时间序列存在不确定性，随机噪声总是夹杂在时间序列中，致使时间序列表现出某种震荡式的无规律运动
时间序列分析的核心就是挖掘该时间序列中的自相关性]]></description><link>intcpu.github.io/数算的笔记/量化交易/数据分析基础概念.html</link><guid isPermaLink="false">数算的笔记/量化交易/数据分析基础概念.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Thu, 28 Apr 2022 10:41:23 GMT</pubDate></item><item><title><![CDATA[内部网络安全信息概要]]></title><description><![CDATA[单独电脑，不涉及任何个人信息
启用“开机密码”和“硬盘锁”
随机高强度密钥
全盘加密
隐藏磁盘 使用多重代理（虚拟机或网络）
使用【加密】代理（软件或网络） 使用【开源】软件
使用安全DNS 多余且危险的 BIOS ：网络唤醒 只保留“硬盘启动” 禁掉ME（Management Engine 和 PSP（Platform Security Processor）
VirtualBox
定期回滚快照
可变文件：共享目录保存 或 持久硬盘(write-through、independent-persistent)
虚拟机分类：代理虚拟机、tor虚拟机、日常虚拟机、敏感虚拟机、特殊账号虚拟机 选Linux发行版做物理系統：FreeBSD 或 OpenBSD(默认最安全)https://www.openbsd.org/
注重安全选: https://zh.wikipedia.org/wiki/%E8%BD%BB%E9%87%8F%E7%BA%A7Linux%E5%8F%91%E8%A1%8C%E7%89%88
保守型： CentOS
【不要】注册“独立域名”
【不要】搭建“自己的 Server”
【全然不同】的网名
注册的【全过程】都要走【匿名网络】
【不要】填写真实的个人信息
使用虚拟号码
账户内网或深网专用
dm-crypt(LUKS)全盘加密：/boot【之外】全盘加密
VeraCrypt：全盘加密 文件加密 多重加密 隐藏卷 key file(软件 视频 图片)
开启防火墙：禁止对外监听端口
虚拟机网络：NAT 模式 host-only模式(internal 模式) 避免用无线网络
设置家用路由器:相互不可见
操作敏感帐号，要【全程走】匿名网络Tor 【全程】HTTPS
【不同】身份的帐号，要使用【不同】（各自独立）的匿名网络环境
不同账号不同虚拟机
选择Firefox浏览器 国际ESR(长期支持)版本 meek插件 NoScript、HTTPS Everywhere、禁用Flash 或者 【Tor Browser】整套打包
浏览器【专用】:每个浏览器专用一个wen网站
修改User Agent
浏览器指纹测试：https://browserleaks.com/canvas
释放真真假假的【个人信息】
【行文风格】变化
“上线时间”尽量【随机化】
禁用手机任何操作
【专用的】物理系统中运行密码生成器
【专用的】物理系统中操作“重置密码的邮箱”
密码分级：不重要的口令、重要但少用的口令、重要且频繁使用的口令
KeePassX：开源密码管理器
]]></description><link>intcpu.github.io/数算的笔记/其他/内部网络安全信息概要.html</link><guid isPermaLink="false">数算的笔记/其他/内部网络安全信息概要.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Thu, 14 Feb 2019 11:42:51 GMT</pubDate></item><item><title><![CDATA[linux增加swap分区]]></title><description><![CDATA[安装Linux的时候，不知道swap空间分配多少比较好，所以会随便分配一个，在真正使用的时候，比如安装Oracle10g会要求很大的swap空间，发现swap空间不够，增加swap空间大小：以下的操作都要在root用户下进行，首先先建立一个分区，采用dd命令比如dd if=/dev/zero of=/swap bs=1M count=1024
这样就会创建/home/swap这么一个分区文件。文件的大小是512000个block，一般情况下1个block为1K，所以这里空间是512M。接着再把这个分区变成swap分区。/sbin/mkswap /swap
再接着使用这个swap分区。使其成为有效状态。/sbin/swapon /swap
现在再用free -m命令查看一下内存和swap分区大小，就发现增加了512M的空间了。不过当计算机重启了以后，发现swap还是原来那么大，新的swap没有自动启动，还要手动启动。那我们需要修改/etc/fstab文件，增加如下一行
vim /etc/fstab
···
/swap swap swap defaults 0 0
机器自动启动以后swap空间也增大了]]></description><link>intcpu.github.io/数算的笔记/服务器/linux增加swap分区.html</link><guid isPermaLink="false">数算的笔记/服务器/linux增加swap分区.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Thu, 14 Dec 2017 18:07:48 GMT</pubDate></item><item><title><![CDATA[ubuntu14.04文件夹大小示意]]></title><description><![CDATA[文件夹统计命令：
du -sh / : 查看当前目录总共占的容量。而不单独列出各子项占用的容量
du -lh --max-depth=1 / : 查看当前目录下一级子文件和子目录占用的磁盘容量。
]]></description><link>intcpu.github.io/数算的笔记/服务器/ubuntu14.04文件夹大小示意.html</link><guid isPermaLink="false">数算的笔记/服务器/ubuntu14.04文件夹大小示意.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Sun, 10 Dec 2017 15:10:51 GMT</pubDate></item><item><title><![CDATA[SVN自动导出上传]]></title><description><![CDATA[@echo off
::导出SVN部分
echo ==============================================================
echo ==============================================================
echo ==============================================================
echo ======1,输入本次发版bug号，多个以^|分割
echo ======2,在弹出的svn搜索框中选中需要导出的文件，导出到svnExport.bat所在文件夹
echo ======3,确认是否上传
echo ==============================================================
echo ==============================================================
echo ============================================================== echo 请输入本次打包发版的bug号：
set /p bugs=
TortoiseProc /command:log /path:"D:\WWW\GomeWireless\cdn\live" /findtype:1 /findregex /findstring:"%bugs%"
TortoiseProc /command:log /path:"D:\WWW\GomeWireless\wap\branches\app-common" /findtype:1 /findregex /findstring:"%bugs%"
set _DIR=备份文件夹\%DATE:~0,4%%DATE:~5,2%%DATE:~8,2%\%TIME:~0,2%%TIME:~3,2%%TIME:~6,2%
xcopy /e /y /i "./app" "./%_DIR%"
rd /s /q "./app"
xcopy /e /y /i "./GomeWireless\cdn\live" "./app\cdn"
xcopy /e /y /i "./GomeWireless\wap\branches\app-common" "./app\htdocs\app-common"
rd /s /q "./GomeWireless" call:upLoad
pause
exit ::上传部分 :upLoad
echo 是否上传到打包服务器,退出请按Ctrl+C(y/n)?
set /p isUp= if %isUp%==y (
echo 上传中...
psftp 10.1.1.1 -l www -pw 123456 &lt; appUpload.txt
echo 上传结束!
) else if %isUp%==Y (
echo 请使用小写字母y
) else (
echo 未上传
)
call:upLoad
GOTO:EOF
]]></description><link>intcpu.github.io/数算的笔记/互联网开发/SVN自动导出上传.html</link><guid isPermaLink="false">数算的笔记/互联网开发/SVN自动导出上传.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Fri, 28 Oct 2016 17:46:15 GMT</pubDate></item><item><title><![CDATA[数据结构之线性表之顺序表及PHP代码实现]]></title><description><![CDATA[什么是线性表 线性表就是关系中的一对一的关系，如果是一对多就用树来表示，如果多对多就用网状来表示。 简单表示 one&lt;--&gt;two&lt;--&gt;three&lt;--&gt;four 特征(理论，可忽略)： 有且只有一个“首”元素
有且只有一个“尾”元素
除"首"元素外，其余元素都有唯一的后继元素。
除"尾"元素外，其余元素都有唯一的前驱元素。 线性表的两种存储结构 顺序表，即线性表用顺序存储结构保存数据，数据是连续的。
链表，即线性表用链式存储结构保存数据，数据不连续。 顺序表的常见操作顺序表主要有以下常见操作，我们一般用数组来保存数据
初始化
思路：将数组的长度length设为0
求顺序表的长度
思路：获取数组的length值
插入元素
思路：分两种情况，一种是插入位置在数组的末尾，这种情况与添加元素相同。另一种情况是插入位置在数组的开始，这时候被插入元素的后续元素都要依次向后移动一位，也就是说整个数组都会移动
删除元素
思路：同样分两种情况，一种是删除位置在数组的末尾，不用移动任何元素，因此时间复杂度为O(1);另一种情况是删除位置在数组的开始，这时被删除元素的后续元素都要依次向前移动一位
按序号查找元素
思路：因为顺序表的存储地址是连续的，所以第n个元素的地址公式为：(n-1)*单元存储长度，不用移动任何元素
按关键字查找元素
PHP版线性表代码实现注： 在PHP中线性表一个数组就能实现相应功能，理论知识大于实用性，看下面这段PHP版线性表实现&lt;?php
/* *文件名：linearList.php * 功能：数据结构线性表的顺序存储实现 * author:黎锦焕 * @copyright:www.drw1314.com
*/
class linearList { private $arr; private $length; const MAXSIZE = 100; /* *构造函数，判断空表还是飞空表，并且进行实例化 * @param array $arr 输入的数组 * @param int $n 输入数组的长度 * @ruturn void; */ function __construct($arr, $n) { if ($n &gt; self::MAXSIZE) { echo '对不起，数组的长度' . $n . '超出了内存空间!' . self::MAXSIZE; } else if ($n &lt; 0) { echo '异常，长度不能为负数。'; } else if ($n == 0) { echo '&lt;br/&gt;....你创建了一张空表，数组长度为0....&lt;br/&gt;&lt;br/&gt;'; $this-&gt;arr = $arr; $this-&gt;length = $n; } else { echo '&lt;br/&gt;....成功创建一张表....&lt;br/&gt;&lt;br/&gt;'; $this-&gt;arr = $arr; $this-&gt;length = $n; } } /* *按位查找，返回查找到的值 * @ruturn string; * @param int $n 查找的位置 */ function findValue($n) { if ($n &gt; $this-&gt;length || $n &lt; 1) { return '输入的位置' . $n . '不正确，请在1到' . $this-&gt;length . '的范围内'; } return '你要找的第' . $n . '位的值为' . $this-&gt;arr[$n - 1]; } /* *按值查找，返回查找到的位置 * @ruturn string; * @param int $n 查找的值 */ function findSite($n) { for ($i = 0; $i &lt; $this-&gt;length; $i++) { if ($this-&gt;arr[$i] == $n) { $b = $i + 1; return '你要找的值' . $n . '对应的位置为' . $b; } else { $v = false; } } if (!$v) { return '你所找的值' . $n . '不存在'; } } /* *在选定的位置处插入某个值 * @ruturn array; * @param int $i 插入位置 * @param int $v 插入的值 */ function insertValue($i, $v) { if ($i &lt; 1 || $i &gt; self::MAXSIZE) { echo '插入的位置' . $i . '不正确，请在1到' . self::MAXSIZE . '的范围内'; return; } for ($h = $this-&gt;length; $h &gt;= $i; $h--) { $this-&gt;arr[$h] = $this-&gt;arr[$h - 1]; } if ($i &gt; $this-&gt;length) { $this-&gt;arr[$this-&gt;length] = $v; } else { $this-&gt;arr[$i - 1] = $v; } $this-&gt;length++; return $this-&gt;arr; } /* *在选定的位置删除某个值 * @ruturn array; * @param int $i 位置 */ function deleteValue($i) { if ($i &lt; 1 || $i &gt; $this-&gt;length) { echo '选定的位置' . $i . '不正确，请在1到' . $this-&gt;length . '的范围内'; return; } for ($j = $i; $j &lt; $this-&gt;length; $j++) { $this-&gt;arr[$j - 1] = $this-&gt;arr[$j]; } unset($this-&gt;arr[$this-&gt;length - 1]); $this-&gt;length--; return $this-&gt;arr; } function __destruct() { if ($this-&gt;length == 0) { echo '&lt;br/&gt;...销毁一张空表...&lt;br/&gt;'; } else { echo '&lt;br/&gt;...成功销毁一张表..&lt;br/&gt;'; } }
}
//下面是使用案例
$arr = array( 10, 125, 123, 1, 4
);
$n = 5;
$linearList = new linearList($arr, $n);
echo $linearList-&gt;findValue(5) . '&lt;br/&gt;';
echo $linearList-&gt;findSite(4) . '&lt;br/&gt;';
echo '&lt;pre&gt;';
print_r($linearList-&gt;insertValue(20, 300));
echo '&lt;/pre&gt;';
echo '&lt;pre&gt;';
print_r($linearList-&gt;deleteValue(1));
echo '&lt;/pre&gt;'; 结果 ....成功创建一张表....
你要找的第5位的值为4
你要找的值4对应的位置为5 Array
( [0] =&gt; 10 [1] =&gt; 125 [2] =&gt; 123 [3] =&gt; 1 [4] =&gt; 4 [5] =&gt; 300
) Array
( [0] =&gt; 125 [1] =&gt; 123 [2] =&gt; 1 [3] =&gt; 4 [4] =&gt; 300
) ...成功销毁一张表..
注： 想起来以前做的一个项目:
用户创建有序的课程： 课程1
课程2
课程3
课程4
按照一般做法，把这些课程信息存在一张课程表中，用一个字段比如 sort 用来标识当前课程的排序，取出的时候SQL ： order by sort ASC
遇到问题来了：在页面上显示的时候，允许用户拖动任一课程到任一位置，那么我们怎么改变表中的排序字段值能使拖动后的排序仍然正确显示在页面上 顺序表对上面这个问题解决起来挺麻烦，看下一章：线性表之链表
]]></description><link>intcpu.github.io/数算的笔记/互联网开发/数据结构之线性表之顺序表及PHP代码实现.html</link><guid isPermaLink="false">数算的笔记/互联网开发/数据结构之线性表之顺序表及PHP代码实现.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Tue, 08 Mar 2016 13:26:36 GMT</pubDate></item><item><title><![CDATA[数据结构之线性表之链表及PHP代码实现]]></title><description><![CDATA[
上章的问题： 用户创建有序的课程： 课程1
课程2
课程3
课程4 按照一般做法，把这些课程信息存在一张课程表中，用一个字段比如 sort 用来标识当前课程的排序，取出的时候SQL ： order by sort ASC
遇到问题来了：在页面上显示的时候，允许用户拖动任一课程到任一位置，那么我们怎么改变表中的排序字段值能使拖动后的排序仍然正确显示在页面上 这个问题很容易遇到：因为惯性思维，order by sort ASC顺手就来了,所以在遇到拖动排序的需求时，问题就来了，虽然通过计算前后，后面排序全部更新来达到目的，但显然做的很不开心，觉得不应该是这个样子，如果你知道链表，那么就不存在问题了链表的存储结构单链表中的每个结点都包含一个“数据域”和一个“指针域”。“数据域”中包含当前结点的数据，“指针域”包含下一节点的存储地址，头指针head是指向开始结点的，结束结点没有后继结点，所以结束结点的指针域为空，即null。链表的常用操作
插入结点到表头
思路：将head头指针的next指针给新增结点的next，然后将整个新增结点给head头指针的next
插入结点到表尾
思路：插入方法与插入到表头一样，只不过多一个步骤就是通过head头指针循环找到终端结点
插入结点(1≤i≤ListLength(L))
思路：插入方法与插入到表头一样，多循环查找当前结点的动作
删除结点
思路：同插入结点一样
查找结点
思路：与插入结点和删除结点方法类似
获取链表长度
思路：不像顺序表是连续存储的，获取表的长度非常容易。在链表中，数据不是连续存储的，因此需要循环遍历才能求得链表的长度
PHP链表示意代码&lt;?php
// $Id:$
//链表节点
class node { public $id; //节点id public $name; //节点名称 public $next; //下一节点 public function __construct($id, $name) { $this-&gt;id = $id; $this-&gt;name = $name; $this-&gt;next = null; }
}
//单链表
class singelLinkList { private $header; //链表头节点 //构造方法 public function __construct($id = null, $name = null) { $this-&gt;header = new node($id, $name, null); } //获取链表长度 public function getLinkLength() { $i = 0; $current = $this-&gt;header; while ($current-&gt;next != null) { $i++; $current = $current-&gt;next; } return $i; } //添加节点数据 public function addLink($node) { $current = $this-&gt;header; while ($current-&gt;next != null) { if ($current-&gt;next-&gt;id &gt; $node-&gt;id) { break; } $current = $current-&gt;next; } $node-&gt;next = $current-&gt;next; $current-&gt;next = $node; } //删除链表节点 public function delLink($id) { $current = $this-&gt;header; $flag = false; while ($current-&gt;next != null) { if ($current-&gt;next-&gt;id == $id) { $flag = true; break; } $current = $current-&gt;next; } if ($flag) { $current-&gt;next = $current-&gt;next-&gt;next; } else { echo "未找到id=" . $id . "的节点！&lt;br&gt;"; } } //获取链表 public function getLinkList() { $current = $this-&gt;header; if ($current-&gt;next == null) { echo ("链表为空!"); return; } while ($current-&gt;next != null) { echo 'id:' . $current-&gt;next-&gt;id . ' name:' . $current-&gt;next-&gt;name . "&lt;br&gt;"; if ($current-&gt;next-&gt;next == null) { break; } $current = $current-&gt;next; } } //获取节点名字 public function getLinkNameById($id) { $current = $this-&gt;header; if ($current-&gt;next == null) { echo "链表为空!"; return; } while ($current-&gt;next != null) { if ($current-&gt;id == $id) { break; } $current = $current-&gt;next; } return $current-&gt;name; } //更新节点名称 public function updateLink($id, $name) { $current = $this-&gt;header; if ($current-&gt;next == null) { echo "链表为空!"; return; } while ($current-&gt;next != null) { if ($current-&gt;id == $id) { break; } $current = $current-&gt;next; } return $current-&gt;name = $name; }
}
$lists = new singelLinkList();
$lists-&gt;addLink(new node(5, 'eeeeee'));
$lists-&gt;addLink(new node(1, 'aaaaaa'));
$lists-&gt;addLink(new node(6, 'ffffff'));
$lists-&gt;addLink(new node(4, 'dddddd'));
$lists-&gt;addLink(new node(3, 'cccccc'));
$lists-&gt;addLink(new node(2, 'bbbbbb'));
$lists-&gt;getLinkList();
echo "&lt;br&gt;-----------删除节点--------------&lt;br&gt;";
$lists-&gt;delLink(5);
$lists-&gt;getLinkList();
echo "&lt;br&gt;-----------更新节点名称--------------&lt;br&gt;";
$lists-&gt;updateLink(3, "222222");
$lists-&gt;getLinkList();
echo "&lt;br&gt;-----------获取节点名称--------------&lt;br&gt;";
echo $lists-&gt;getLinkNameById(5);
echo "&lt;br&gt;-----------获取链表长度--------------&lt;br&gt;";
echo $lists-&gt;getLinkLength();
?&gt; 运行结果 id:1 name:aaaaaa
id:2 name:bbbbbb
id:3 name:cccccc
id:4 name:dddddd
id:5 name:eeeeee
id:6 name:ffffff
-----------删除节点--------------
id:1 name:aaaaaa
id:2 name:bbbbbb
id:3 name:cccccc
id:4 name:dddddd
id:6 name:ffffff
-----------更新节点名称--------------
id:1 name:aaaaaa
id:2 name:bbbbbb
id:3 name:222222
id:4 name:dddddd
id:6 name:ffffff
-----------获取节点名称--------------
ffffff
-----------获取链表长度--------------
5 注:计算机的内存存储设计就是链表结构，可见链表应用范围之广]]></description><link>intcpu.github.io/数算的笔记/互联网开发/数据结构之线性表之链表及PHP代码实现.html</link><guid isPermaLink="false">数算的笔记/互联网开发/数据结构之线性表之链表及PHP代码实现.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Tue, 08 Mar 2016 16:46:32 GMT</pubDate></item><item><title><![CDATA[公共 DNS 服务器 IP 地址]]></title><link>intcpu.github.io/数算的笔记/其他/公共 DNS 服务器 IP 地址.html</link><guid isPermaLink="false">数算的笔记/其他/公共 DNS 服务器 IP 地址.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Wed, 09 Nov 2016 16:51:12 GMT</pubDate></item><item><title><![CDATA[程序运行速度测试-秒表功能]]></title><description><![CDATA[&lt;?php
//秒表
class T { private static $watch = array(); private static $times = array(); function __construct() { $this-&gt;reset(); } //初始化 public function reset() { self::$watch = array(); self::$times = array(); return self::$watch[] = self::nowTime(); } //计时 public function t($key = null) { $time = self::nowTime(); $last = end(self::$watch); $times = sprintf("%.6f", ($time - $last)); if (empty($key) || is_int($key) || (is_numeric($key) &amp;&amp; (intval($key) - $key === 0))) { self::$times[] = $times; self::$watch[] = $time; } else { self::$times[$key] = $times; self::$watch[$key] = $time; } return $time; } //显示所有点 public function end($key = null) { self::t($key); //打印执行时间 var_export(self::$times); //打印时间点 //var_export(self::$watch); return self::$times; } //获取现在时间 private function nowTime() { $time = explode(' ', microtime()); return sprintf("%.6f", ($time[0] + $time[1])); }
} function is_prime_a($num) { for ($i = 2; $i &lt; $num; $i++) { if ($num % $i == 0) { return false; } } return true;
}
function is_prime_b($num) { $upper = intval(sqrt($num)); for ($i = 2; $i &lt;= $upper; $i++) { if ($num % $i == 0) { return false; } } return true;
}
//保存素数表
function prime_table_a($max) { $prime_table = array(2); for ($i = 2; $i &lt; $max; $i++) { //偶数一定不是素数 if ($i % 2 != 0 &amp;&amp; is_prime_b($i)) { $prime_table[] = $i; } } return $prime_table;
} //另一种更快的方法保存素数表
function prime_table_b($max) { $prime_table = array(); $upper = intval(sqrt($max)); for ($i = 2; $i &lt;= $max; $i++) { $is_prime = true; for ($j = 2; $j &lt;= $upper; $j++) { if ($i != $j &amp;&amp; $i % $j === 0) { $is_prime = false; break; } } if ($is_prime) { $prime_table[] = $i; } } return $prime_table;
} $t = new T();
is_prime_a(100000);
$t-&gt;t();
is_prime_b(100000);
$t-&gt;t();
prime_table_a(100000);
$t-&gt;t('prime_table_a(100000)');
prime_table_b(100000);
$t-&gt;end('prime_table_b(100000)');
//结果
array (
0 =&gt; '0.002560',
1 =&gt; '0.000402',
'prime_table_a(100000)' =&gt; '0.343349',
'prime_table_b(100000)' =&gt; '0.503071',
)
]]></description><link>intcpu.github.io/数算的笔记/互联网开发/程序运行速度测试-秒表功能.html</link><guid isPermaLink="false">数算的笔记/互联网开发/程序运行速度测试-秒表功能.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Tue, 15 Mar 2016 12:20:50 GMT</pubDate></item><item><title><![CDATA[zookeeper安装]]></title><description><![CDATA[wget http://mirror.bit.edu.cn/apache/zookeeper/zookeeper-3.4.11/zookeeper-3.4.11.tar.gz
tar -zxf zookeeper-3.4.11.tar.gz
cd zookeeper-3.4.11/
cp conf/zoo_sample.cfg conf/zoo.cfg ]]></description><link>intcpu.github.io/数算的笔记/互联网开发/zookeeper安装.html</link><guid isPermaLink="false">数算的笔记/互联网开发/zookeeper安装.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Wed, 11 Apr 2018 17:10:31 GMT</pubDate></item><item><title><![CDATA[SVN本机自动更新及双机同步更新解决]]></title><description><![CDATA[svn本机自动更新(简单使用)：cd /home/svn/passport/hooks
vi post-commit 输入以下文本：
#!/bin/sh
svn update /var/www/
源目录： svn://192.168.3.5/edu
目标目录: svn://192.168.1.254/edu_35如果目标目录存在相同的项目，请先清除，重新建立空项目，比如：
1.254建目录：mkdir /data/svn/edu_35
svnadmin create /data/svn/edu_35 2.启动254上的svn
svnserve -d -r /data/svn/
3.在3.5执行： cd /data/svndata/taobaotop/hooks cp pre-revprop-change.tmpl pre-revprop-change vi pre-revprop-change
把 pre-revprop-change最后一行改成 exit0
然后 chmod 755 pre-revprop-change
4.把3.5上的/data/svndata/taobaotop/conf目录打个包，发到254的同样路径，覆盖解压，注意权限文件authz（此例中应修改覆盖后的authz中edu为edu_35）
5.在从机上执行 #svnsync init 目标地址 源地址
svnsync init svn://192.168.1.254/edu_35svn://127.0.0.1/edu`
中途会问你主机的root密码及svn的用户名密码，填入即可。然后显示：
Copied properties for revision0.（复制版本 0 的属性。）6.初始化完成后，执行以下进行同步
svnsync sync svn://192.168.1.254/edu_35
7.为了能够在主机更新时，从机自动同步，需要在主机做些操作。
在主机/hooks/下建立/修改post-commit脚本，在其中增加一行，内容如下：
svnsync syncsvn://192.168.1.254/edu_35 --sync-username testname --sync-password 123456 --source-username testname--source-password 123456第二天同步失败，提示版本库被锁，需要删除SVN仓库修订号0 svn:sync-lock的保护，在254上执行如下命令：
svn propdel svn:sync-lock --revprop -r 0svn://127.0.0.1/edu_35]]></description><link>intcpu.github.io/数算的笔记/互联网开发/SVN本机自动更新及双机同步更新解决.html</link><guid isPermaLink="false">数算的笔记/互联网开发/SVN本机自动更新及双机同步更新解决.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Wed, 24 Dec 2014 09:46:38 GMT</pubDate></item><item><title><![CDATA[PHP素数判定算法]]></title><description><![CDATA[素数定义
除了能被1和它本身整除而不能被其他任何数整除的数 直接根据定义计算素数
根据素数定义 只需要用2到n-1去除n，如果都除不尽，则n是素数，否则，只要其中有一个数能整除则n不是素数
&lt;?php
function is_prime($num) { for ($i = 2; $i &lt; $num; $i++) { if ($num % $i == 0) { return false; } } return true;
}
]]></description><link>intcpu.github.io/数算的笔记/互联网开发/PHP素数判定算法.html</link><guid isPermaLink="false">数算的笔记/互联网开发/PHP素数判定算法.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Wed, 09 Mar 2016 16:19:30 GMT</pubDate></item><item><title><![CDATA[服务器使用nginx负载均衡]]></title><description><![CDATA[负载怎么做：
软件和硬件都能实现
软件一般用nginx 硬件昂贵，一般不推荐使用实现的原理：
nginx:
内置的策略有加权轮询，ip hash ,通过配置选取
扩展的策略主要的也都是hash，如：url；也有根据服务器响应速度做自适应负载的，在网络情况复杂时可以考虑加权轮询适用性强，如无特殊要求，基本就用这一个，原理：每次选取权重最高的服务器，每台服务器有一个初始权重值，每请求一次权重减一，当所有服务器都使用时恢复初始值ip hash 遇到企业及高校这种相同出口IP不能实现均衡效果]]></description><link>intcpu.github.io/数算的笔记/服务器/服务器使用nginx负载均衡.html</link><guid isPermaLink="false">数算的笔记/服务器/服务器使用nginx负载均衡.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Sun, 20 Mar 2016 15:19:20 GMT</pubDate></item><item><title><![CDATA[nginx linux 日志分析]]></title><description><![CDATA[日志分析:日志格式：
log_format u '^=^ [$time_local] ^=^ $http_x_forwarded_for ^=^ $remote_addr ^=^ $remote_user ^=^ $http_user_agent ^=^ $upstream_addr ^=^ $status ^=^ $body_bytes_sent ^=^ $http_cookie ^=^ $request_time ^=^ $upstream_response_time ^=^ $http_host ^=^ $request ^=^ $http_referer ^=^ $uid_got ^=^ $uid_set'; log_format access '^=^ [$time_local] ^=^ $http_x_forwarded_for ^=^ $remote_addr ^=^ $remote_user ^=^ $http_user_agent ^=^ $upstream_addr ^=^ $status ^=^ $body_bytes_sent ^=^ - ^=^ $request_time ^=^ $upstream_response_time ^=^ $http_host ^=^ $request ^=^ $http_referer ^=^ $uid_got ^=^ $uid_set';
#访问次数大于100的IP
awk -F '\\^=\\^' '{print $3}' gome_wap.access.log | sort | uniq -c | sort -nr | grep -v '-' | awk '{if($1&gt;100){print $1" "$2}}' #访问次数大于100的url
awk -F '\\^=\\^' '{print $14}' gome_wap.access.log | sort | uniq -c | sort -nr | grep -v '-' | awk '{if($1&gt;100){print $1" "$3}}' #访问次数前50的的ip+url
awk -F '\\^=\\^' '{print $3" "$14}' gome_wap.access.log | sort | uniq -c | sort -nr | awk '{print $2" "$4}' | awk -F '\\?' '{print $1}' | sort | uniq -c | sort -nr |head -n 10 #一般看页面访问IP Top10
cat gome_wap.access.log |grep 'login.html'|awk '{print $5}' |sort |uniq -c |sort -rn |head -n10 #看NGINX主要访问信息
awk -F '\\^=\\^' '{str = ""; {for(i=3;i&lt;=6;i++) str =str" "$i; print str $14 $15;}}' gome_wap.access.log #服务器访问页面TOP10
awk -F '\\^=\\^' '{print $14}' gome_wap.access.log | awk '{print $2}' | sort | uniq -c | sort -nr | head -n 10 #服务器访问来源页面TOP10
awk -F '\\^=\\^' '{print $15}' gome_wap.access.log | sort | uniq -c | sort -nr | head -n 10 #服务器访问IP TOP10
awk -F '\\^=\\^' '{print $4}' gome_wap.access.log | sort | uniq -c | sort -nr | head -n 10 #服务器真实访问IP TOP 10
awk -F '\\^=\\^' '{print $3}' gome_wap.access.log | sort | uniq -c | sort -nr | head -n 10 #某IP访问服务器页面TOP10
cat gome_wap.access.log | grep '113.108.215.113'| awk -F '\\^=\\^' '{print $14}' | awk '{print $2}'| sort | uniq -c | sort -nr| head -n 10 #访问服务器top10的IP所访问的页面排行
awk -F '\\^=\\^' '{print $3}' gome_wap.access.log | sort | uniq -c | sort -nr | head -n 10 | awk '{print $2}' | grep -v '-' | xargs -i grep {} gome_wap.access.log | awk -F '\\^=\\^' '{print $14}' | awk '{print $2}' |awk -F '?' '{print $1}' | sort | uniq -c | sort -nr | more #访问服务器top10的IP所访问的页面数大于50的:
awk -F '\\^=\\^' '{print $3}' gome_wap.access.log | sort | uniq -c | sort -nr | head -n 10 | awk '{print $2}' | grep -v '-' | xargs -i grep {} gome_wap.access.log | awk -F '\\^=\\^' '{print $14}' | awk '{print $2}' |awk -F '?' '{print $1}' | sort | uniq -c | sort -nr | awk '{if($1&gt;50){print $2}}' #访问服务器top100的IP各自所访问的页面数大于50的:
awk -F '\\^=\\^' '{print $3}' gome_wap.access.log | sort | uniq -c | sort -nr | head -n 100 | awk '{print $2}' | grep -v '-' | xargs -i grep {} gome_wap.access.log | awk -F '\\^=\\^' '{print $3 $14}' | awk -F '\\?' '{print $1}' | sort | uniq -c | sort -nr | awk '{if($1&gt;50){print $1" "$2" "$4}}' #访问服务器数大于100的IP所访问的页面数大于30的:
awk -F '\\^=\\^' '{print $3}' gome_wap.access.log | sort | uniq -c | sort -nr | grep -v '-' | awk '{if($1&gt;100){print $2}}' | xargs -i grep {} gome_wap.access.log | awk -F '\\^=\\^' '{print $3 $14}' | awk -F '\\?' '{print $1}' | sort | uniq -c | sort -nr | awk '{if($1&gt;30){print $1" "$2" "$4}}'
]]></description><link>intcpu.github.io/数算的笔记/互联网开发/nginx linux 日志分析.html</link><guid isPermaLink="false">数算的笔记/互联网开发/nginx linux 日志分析.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Fri, 28 Oct 2016 17:06:34 GMT</pubDate></item><item><title><![CDATA[VIM护眼色(放在colors目录下)]]></title><description><![CDATA[" local syntax file - set colors on a per-machine basis:
" vim: tw=0 ts=4 sw=4
" Vim color file
" Maintainer: Steven Vertigan &lt;steven@vertigan.wattle.id.au&gt;
" Last Change: 2006 Sep 23
" Revision #5: Switch main text from white to black for easier contrast,
" fixed some problems with terminal backgrounds. set background=light
set number
"hi clear
if exists("syntax_on") syntax reset
endif
let g:colors_name = "mycolor"
hi Normal guibg=#99cc99 guifg=Black
hi LineNr guibg=#003366 guifg=#99ccff ctermbg=7777 ctermfg=blue
set cursorline
hi CursorLine cterm=NONE ctermbg=darkred ctermfg=white guibg=#66cc99 guifg=black
]]></description><link>intcpu.github.io/数算的笔记/互联网开发/VIM护眼色(放在colors目录下).html</link><guid isPermaLink="false">数算的笔记/互联网开发/VIM护眼色(放在colors目录下).md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Sun, 20 Nov 2016 18:10:21 GMT</pubDate></item><item><title><![CDATA[mogodb一般操作]]></title><description><![CDATA[启动
/usr/bin/mongod
或者：
nohup /usr/bin/mongod -f /etc/mongodb.conf &amp;关闭：
kill -15 pid日志：
tailf /var/log/mongodb/mongodb.log编辑配置：
vi /etc/mongodb.conf进入mongo：
mongo
mongo 127.0.0.1mongo备份：
mongodump -h 127.0.0.1 -d xeqm -o /mnt/hgfs/xeqm/
mongo恢复：
mongorestore -h 127.0.0.1 -d xeqm --directoryperdb /mnt/hgfs/xeqm/xeqm
MongoDB 查询数据的语法格式如下：
db.qm_shiju.find()
操作 格式 范例 RDBMS中的类似语句
等于 {:} db.col.find({"by":"菜鸟教程"}).pretty() where by = '菜鸟教程'
小于 {:{lt:50}}).pretty() where likes &lt; 50
小于或等于 {:{lte:50}}).pretty() where likes &lt;= 50
大于 {:{gt:50}}).pretty() where likes &gt; 50
大于或等于 {:{gte:50}}).pretty() where likes &gt;= 50
不等于 {:{ne:50}}).pretty() where likes != 50
模糊查询：
db.qm_shiju.find({"juzi": {$regex:/.枫.落.*/i}})查询执行时间：
db.qm_shiju.find({"juzi": {$regex:/.枫.落.*/i}}).explain("executionStats")]]></description><link>intcpu.github.io/数算的笔记/互联网开发/mogodb一般操作.html</link><guid isPermaLink="false">数算的笔记/互联网开发/mogodb一般操作.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Sun, 27 Nov 2016 18:09:21 GMT</pubDate></item><item><title><![CDATA[jenkins-java安装配置]]></title><description><![CDATA[java安装wget http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz?AuthParam=1483585194_142e78bfcee77122b0d5c1ab53b2c3fa
mv jdk-8u111-linux-x64.tar.gz\?AuthParam\=1483585194_142e78bfcee77122b0d5c1ab53b2c3fa jdk-8u111-linux-x64.tar.gz
mkdir /usr/server/jvm
tar zxvf jdk-8u111-linux-x64.tar.gz -C /usr/server/jvm/
mv /usr/server/jvm/jdk1.8.0_111 /usr/server/jvm/jdk
vi ~/.bashrc 在末尾添加
export JAVA_HOME=/usr/server/jvm/jdk
export JRE_HOME={JAVA_HOME}/lib:{JAVA_HOME}/bin:$PATH
source ~/.bashrc
java -version
jenkins安装cd /soft
wget https://mirrors.tuna.tsinghua.edu.cn/jenkins/war-stable/2.32.1/jenkins.war
mkdir /usr/server/jenkins
cp jenkins.war /usr/server/jenkins/
nohup java -jar /usr/server/jenkins/jenkins.war --httpPort=8080 &amp; 访问
<a rel="noopener nofollow" class="external-link is-unresolved" href="http://192.168.112.128:8080/" target="_self">http://192.168.112.128:8080/</a>
Configure Global Security 设置jenkins可登录账户，及账户权限，也可都取消选择，不登录即可使用]]></description><link>intcpu.github.io/数算的笔记/互联网开发/jenkins-java安装配置.html</link><guid isPermaLink="false">数算的笔记/互联网开发/jenkins-java安装配置.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Wed, 04 Jan 2017 10:46:32 GMT</pubDate></item><item><title><![CDATA[IANA保留IP地址]]></title><description><![CDATA[# From IANA IPv4 Special-Purpose Address Registry
# http://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
# Updated 2013-05-22 0.0.0.0/8 # RFC1122: "This host on this network"
10.0.0.0/8 # RFC1918: Private-Use
100.64.0.0/10 # RFC6598: Shared Address Space
127.0.0.0/8 # RFC1122: Loopback
169.254.0.0/16 # RFC3927: Link Local
172.16.0.0/12 # RFC1918: Private-Use
192.0.0.0/24 # RFC6890: IETF Protocol Assignments
192.0.2.0/24 # RFC5737: Documentation (TEST-NET-1)
192.88.99.0/24 # RFC3068: 6to4 Relay Anycast
192.168.0.0/16 # RFC1918: Private-Use
192.18.0.0/15 # RFC2544: Benchmarking
198.51.100.0/24 # RFC5737: Documentation (TEST-NET-2)
203.0.113.0/24 # RFC5737: Documentation (TEST-NET-3)
240.0.0.0/4 # RFC1112: Reserved
255.255.255.255/32 # RFC0919: Limited Broadcast # From IANA Multicast Address Space Registry
# http://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml
# Updated 2013-06-25 224.0.0.0/4 # RFC5771: Multicast/Reserved
]]></description><link>intcpu.github.io/数算的笔记/其他/IANA保留IP地址.html</link><guid isPermaLink="false">数算的笔记/其他/IANA保留IP地址.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Wed, 09 Nov 2016 15:47:38 GMT</pubDate></item><item><title><![CDATA[桌面自动点击]]></title><description><![CDATA[desk.py# -*- coding: utf-8 -*- import autopy
import time
def clickDesk(): while True: autopy.mouse.click() time.sleep(180)
clickDesk()
desk.vbs:Set ws = CreateObject("Wscript.Shell")
ws.run "D:\Python\python.exe E:\LINUX\desk.py",vbhide
]]></description><link>intcpu.github.io/数算的笔记/其他/桌面自动点击.html</link><guid isPermaLink="false">数算的笔记/其他/桌面自动点击.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Sun, 08 Jan 2017 15:21:03 GMT</pubDate></item><item><title><![CDATA[VIM 常用命令]]></title><description><![CDATA[VIM 常用命令：#自动注释
doc_f [TAB]
doc_fg [TAB] #缩进转空格
:retab! #高亮当前单词
&lt;SHIFT-*&gt; #清除行尾空格
,T
:%s/\s\+$//g #将window换行符转换为unix换行符
,M
:%s/\r//g #删除到行尾
d$ #删除到文件结尾
dG #vim启动页
:Startify #自动带有php说明头
:e *.php #文件列表树插件
:NERDTreeToggle #搜索当前单词
,sw
:execute "vimgrep ".expand("&lt;cword&gt;")." %"&lt;CR&gt;:copen&lt;CR&gt; #搜索上一次搜索单词
,sf
:execute 'vimgrep /'.@/.'/g %'&lt;CR&gt;:copen&lt;CR&gt; #复制当前选择内容到命令行区
//
y/&lt;C-R&gt;"&lt;CR&gt; #容易搜索
&lt;Plug&gt;(easymotion-prefix) #取消高亮
&lt;space&gt;
:noh #搜索模式下，当前搜索词的个数和所有行数
,sn
:%s///gn #插件安装
:VundleInstall
]]></description><link>intcpu.github.io/数算的笔记/互联网开发/VIM 常用命令.html</link><guid isPermaLink="false">数算的笔记/互联网开发/VIM 常用命令.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Wed, 20 Jul 2016 17:38:28 GMT</pubDate></item><item><title><![CDATA[sublime个人PHP开发配置]]></title><description><![CDATA[一. 配置php编译环境
Sublime Text 3\Data\Packages 目录下新建 PHP.sublime-build 文件，内容如下：{ "cmd": ["D:\\web\\php\\php.exe", "$file"], "file_regex": "^(...*?):([0-9]*):?([0-9]*)", "path": "D:\\web\\php\\", "selector": "source.php"
}
二. 添加主题install package
zenburn
三. 扩展插件
侧边栏加强：SideBarEnhancements
php自动注释： DocBlockr
匹配$的语法高亮：WordHighlight
等号自动对齐：Alignment
sublime使用代理、安装各种插件：Package Control 按Ctrl+`调出console import urllib.request,os; pf = 'Package Control.sublime-package'; ipp =sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/'+ pf.replace(' ','%20')).read())
四.汉化
按下Ctrl+Shift+P调出命令面板
输入install 调出 Install Package 选项并回车，然后在列表中选中要安装的插件
然后在弹出的命令界面，输入Chinese，选择ChineseLocalization(回车或者鼠标单击击)
五. 添加函数跳转F3和等号自动对齐F2 首选项-&gt;按键绑定-用户，添加这句话： [ { "keys": ["f2"], "command": "alignment" }, { "keys": ["f3"], "command": "goto_definition" }
] 常用插件：
Emmet Emmet 提供了一种非常简练的语法规则，然后立刻生成对应的 HTML 结构或者 CSS 代码，同时还有多种实用的功能帮助进行前端开发。
Sublime?Linter——代码校验插件，支持多种语言；
HTML5HTML5 bundle;
Alignment 代码对齐；
Bracket?Highlighter 括号高亮匹配；
Git 整合 Git 功能的插件；
jQuery 智能提示jQuery代码；
LESS LESS 代码高亮；
Js?Format JavaScript代码格式化；
Tag HTML/XML标签缩进、补全和校验；
LiveReload 即时刷新页面；
Pretty JSON JSON美化；
Can I Use 查询 CSS 属性兼容性；
Coffee?Script Coffee?Script 代码高亮、校验和编译等；
Color?Picker 跨平台取色器插件；
六. 修改默认配置
首选项-&gt; 配置-用户，添加以下： "auto_close_tags": false, //标签自动闭合 -- 写html最烦这个自动标签 "auto_complete": true, //提示并自动完成 -- 默认也是这个 "auto_complete_commit_on_tab": false, //用了这个提示的内容不能用enter选择 只能用tab -- 不习惯 "auto_indent": true, //自动缩进 "auto_match_enabled": false, //自动匹配引号 //"color_scheme": "Packages/theme/Notepad++.tmTheme", //选择主题，将Notepad++.tmTheme放在Sublime Text 3/Data/Packages/theme/目录下 "default_encoding": "UTF-8", //默认字符 "fallback_encoding": "UTF-8", // 编码时不能自动检测编码时，将自动检测ASCII, UTF-8 和 UTF-16 "font_face": "Courier New", //字体 -- notepad默认字体 "font_size": 15, //字号 "highlight_line": true, //突出显示光标所在行 "line_padding_bottom": 1, //下行距 "line_padding_top": 1, //上行距 "tab_completion": false, //tab自动选择并完成---最烦的 覆盖了缩进 "update_check": false, //不检查更新 "word_separators": "./\\()\"'-:,.;&lt;&gt;~!@#%^&amp;*|+=[]{}`~?",//单词匹配$号，与WordHighlight插件一起使用能双击选择PHP带$的变量,并高亮其他相同单词 "word_wrap": true //自动换行
七. 注册—– BEGIN LICENSE —–
TwitterInc
200 User License
EA7E-890007
1D77F72E 390CDD93 4DCBA022 FAF60790
61AA12C0 A37081C5 D0316412 4584D136
94D7F7D4 95BC8C1C 527DA828 560BB037
D1EDDD8C AE7B379F 50C9D69D B35179EF
2FE898C4 8E4277A8 555CE714 E1FB0E43
D5D52613 C3D12E98 BC49967F 7652EED2
9D2D2E61 67610860 6D338B72 5CF95C69
E36B85CC 84991F19 7575D828 470A92AB
—— END LICENSE ——
七. Notepad++.tmTheme内容如下：&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Notepad++&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;array&gt; &lt;dict&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;background&lt;/key&gt; &lt;string&gt;#CBF0CC&lt;/string&gt; &lt;key&gt;caret&lt;/key&gt; &lt;string&gt;#000080&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#000080&lt;/string&gt; &lt;key&gt;invisibles&lt;/key&gt; &lt;string&gt;#BFBFBF&lt;/string&gt; &lt;key&gt;lineHighlight&lt;/key&gt; &lt;string&gt;#E8E8FF&lt;/string&gt; &lt;key&gt;selection&lt;/key&gt; &lt;string&gt;#ACE0FF&lt;/string&gt; &lt;key&gt;selectionBorder&lt;/key&gt; &lt;string&gt;#C2E8FF&lt;/string&gt; &lt;key&gt;inactiveSelection&lt;/key&gt; &lt;string&gt;#C2E8FF&lt;/string&gt; &lt;key&gt;findHighlight&lt;/key&gt; &lt;string&gt;#FFFF00&lt;/string&gt; &lt;key&gt;findHighlightForeground&lt;/key&gt; &lt;string&gt;#000000&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Comment&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;comment&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#008000&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;String&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;string&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#8000FF&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;JS String&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;string.js&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#808080&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Number&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;constant.numeric&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#FF0000&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Built-in constant&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;constant.language&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#916319&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;User-defined constant&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;constant.character, constant.other&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#644511&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Variable&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;variable&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#000000&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Keyword&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;keyword&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#000000&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Storage&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;storage&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#000080&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Class name&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;entity.name.class&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#291FB7&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Inherited class&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;entity.other.inherited-class&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#CC4C07&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Function name&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;entity.name.function&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#0000FF&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Function argument&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;variable.parameter&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#C96916&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Tag name&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;entity.name.tag&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#0000FF&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Tag attribute&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;entity.other.attribute-name&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#FF0000&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Library function&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;support.function&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#0000FF&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Class Variable&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;variable.other, variable.js, punctuation.separator.variable&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#000080&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Language Constant&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;constant.language&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#000090&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Keyword Operator&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;keyword.operator, declaration.function.operator, meta.preprocessor.c.include&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#8000FF&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Meta Brace&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;punctuation.section.embedded -(source string source punctuation.section.embedded), meta.brace.erb.html&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#F02A1D&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Invalid&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;invalid&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#EB291C&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Normal Variable&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#735DE5&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Function Call&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;meta.function-call&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#0000FF&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Keyword Control&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;keyword.control&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#0000FF&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;!-- HTML -------------------------------------------------- --&gt; &lt;!-- HTML Brackets --&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;HTML: Tag Punctuation&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;punctuation.definition.tag&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#0000FF&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;!-- CSS -------------------------------------------------- --&gt; &lt;!-- Number Color &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;?? css additional-constants&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;meta.property-value support.constant.named-color.css, meta.property-value constant&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#000000&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt;--&gt; &lt;!-- CSS3 Selector - :before, :after etc. --&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;? Meta.tag.inline&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;declaration.tag.inline, declaration.tag.inline entity, source entity.name.tag, source entity.other.attribute-name, meta.tag.inline, meta.tag.inline entity&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#FF8000&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;!-- !important tag --&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Keyword&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;keyword&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#FF0000&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;CSS: Selectors #ID&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;entity.other.attribute-name.id.css&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#0080FF&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;CSS: Selectors Elements&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;entity.name.tag.css&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#0000FF&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;CSS: Selectors .ClassName&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;entity.other.attribute-name.class.css&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#FF0000&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;CSS: Selectors :PseudoClass&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;entity.other.attribute-name.pseudo-class.css&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#FF8000&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;CSS: Property Value&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;support.constant.property-value.css&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#000000&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;CSS: Property Keyword&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;support.type.property-name.css&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#8080C0&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;CSS: Property Colours&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;constant.other.rgb-value.css&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;fontStyle&lt;/key&gt; &lt;string&gt;&lt;/string&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#000000&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;!-- php --&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;PHP: Strings Double-Quoted&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;string.quoted.double.php&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#808080&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;PHP: Strings Single-Quoted&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;string.quoted.single.php&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#808080&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Embedded Source&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;text source, string.unquoted.heredoc, source source&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;background&lt;/key&gt; &lt;string&gt;#CBF0CC&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;!-- JavaScript --&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;JavaScript - String&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;string.quoted.single.js, string.quoted.double.js&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#808080&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;!-- bracket highlighting --&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Bracket Curly&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;bracket.curly&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#000000&lt;/string&gt; &lt;key&gt;background&lt;/key&gt; &lt;string&gt;#FFFF99&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Bracket Tag&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;bracket.tag&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#000000&lt;/string&gt; &lt;key&gt;background&lt;/key&gt; &lt;string&gt;#FFFFCC&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Bracket Round&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;bracket.round&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#000000&lt;/string&gt; &lt;key&gt;background&lt;/key&gt; &lt;string&gt;#FFFF99&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Bracket Square&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;bracket.square&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#000000&lt;/string&gt; &lt;key&gt;background&lt;/key&gt; &lt;string&gt;#FFFF99&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Bracket Angle&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;bracket.angle&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#000000&lt;/string&gt; &lt;key&gt;background&lt;/key&gt; &lt;string&gt;#FFFF99&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Bracket Quote&lt;/string&gt; &lt;key&gt;scope&lt;/key&gt; &lt;string&gt;bracket.quote&lt;/string&gt; &lt;key&gt;settings&lt;/key&gt; &lt;dict&gt; &lt;key&gt;foreground&lt;/key&gt; &lt;string&gt;#000000&lt;/string&gt; &lt;key&gt;background&lt;/key&gt; &lt;string&gt;#FFFFCC&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;/array&gt; &lt;key&gt;uuid&lt;/key&gt; &lt;string&gt;57E9F1F4-9556-47AF-A24D-61BFA4E53138&lt;/string&gt;
&lt;/dict&gt;
&lt;/plist&gt;
]]></description><link>intcpu.github.io/数算的笔记/互联网开发/sublime个人PHP开发配置.html</link><guid isPermaLink="false">数算的笔记/互联网开发/sublime个人PHP开发配置.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Sun, 20 Nov 2016 17:33:18 GMT</pubDate></item><item><title><![CDATA[PHP-PDO静态调用类]]></title><description><![CDATA[&lt;?php
/** * pdos PDO静态调用支持类 * * 支持insert delete update select query * * //简单使用PDO查询，并返回所有结果 * $a = pdos::select('test_blog')-&gt;where(array('user_id'=&gt;2))-&gt;exec()-&gt;getAll(); * * //删除,并返回是否执行成功 * $b = pdos::delete('test_blog')-&gt;where(array('user_id'=&gt;1))-&gt;exec()-&gt;isTrue(); * * //插入 * $pdo = pdos::insert('test_blog',array('user_id'=&gt;1,'blog'=&gt;'内容2'))-&gt;exec(); * $c = $pdo-&gt;insertId();//获取插入ID * * //更新,不返回有效使用 * $pdo = pdos::update('test_blog',array('blog'=&gt;'blog值'))-&gt;where(array('user_id'=&gt;2))-&gt;exec(); * $d = $pdo-&gt;updateNum();//获取受影响行数 * * //PDO复杂查询使用方法 * $pdo = pdos::select('test_blog b','u.user_id,u.user_name,b.blog_id,b.blog') * -&gt;join('test_user u')-&gt;on(array('b.user_id'=&gt;'u.user_id')) * -&gt;where(array('u.user_id'=&gt;'IN 1,2,3','b.blog_id'=&gt;'&gt;= 158','u.user_name'=&gt;'LIKE a')) * -&gt;group('u.user_id')-&gt;order('b.blog_id DESC')-&gt;limit(0,5); * * $pdo-&gt;exec(); //执行并返回当前PDO封装对象 * $e = $pdo-&gt;getSql(); //获取预处理SQL * $f = $pdo-&gt;getArr();//获取预处理数组 * $g = $pdo-&gt;getOne(); //获取第一行第一列 * $h = $pdo-&gt;getRow(); //获取第一行 * $i = $pdo-&gt;getAll(); //获取所有行 * $j = $pdo-&gt;selectNum();//获取结果集的数目 * * //使用自定义预处理SQL查询(SQL与上面链式操作一样) * $sql = 'SELECT u.user_id,u.user_name,b.blog_id,b.blog FROM test_blog b * LEFT JOIN test_user u ON b.user_id = u.user_id * WHERE u.user_id IN (?, ?, ?) AND b.blog_id &gt;= ? AND u.user_name LIKE ? * GROUP BY u.user_id ORDER BY b.blog_id DESC LIMIT ?,?'; * $k = pdos::query($sql, array(1, 2, 3, 158, 'a', 0, 5))-&gt;getAll(); * * //事务： * $pdo = pdos::insert('test_blog',array('user_id'=&gt;2,'blog'=&gt;'内容2')); * $pdo-&gt;begin(); * $m = $pdo-&gt;exec()-&gt;isTrue(); * $m ? $pdo-&gt;commit() : $pdo-&gt;rollback(); * * var_dump($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k,$m); * * @version 1.0 * @author &lt;cd&gt;chendong@yolo24.com * @createtime 2016-06-24 * */
class pdos
{ /** * 增删改查静态入口 * * @version 1.0 2016-06-28 * @author chendong@yolo24.com */ static public function __callStatic($func, $param) { $database = array('select'=&gt;1, 'insert'=&gt;0, 'delete'=&gt;0, 'update'=&gt;0, 'query'=&gt;0); if(isset($database[$func])) { $pdo = new PDO_LIB($database[$func]); return call_user_func_array(array(&amp;$pdo, $func), $param); } else { return false; } }
} /** * PDO_LIB PDO封装库 * * 1,需要database.php有统一配置 * 2,支持多服务器 * 3,支持读写分离 * *一般使用配置database.php： * array( * 'db_type' =&gt; 'mysql', // 数据库类型 * 'db_host' =&gt; '10.126.53.37',// 数据库服务器地址 * 'db_name' =&gt; 'gome_wap', // 数据库名 * 'db_user' =&gt; 'root', // 数据库用户名 * 'db_pwd' =&gt; 'root', // 数据库密码 * 'db_port' =&gt; '7308', // 数据库端口 * 'db_prefix' =&gt; 'wap_', // 数据库表前缀 //因表名配置不统一,暂时不起作用 * ); * * 多台数据库服务器使用配置： * array( * $database1, * $database2, * $database3, * ...... * ) * * 主从使用配置: * array( * //主服务器组 * ayyay( * $database1, * ...... * ), * //从服务器组 * array( * $database3, * ...... * ) * ) * * 4,资源单例连接 * 5,支持链式操作 * 6,支持事务 * 7,除了query操作原生SQL，全部使用预处理 * 8,除了增删改查，支持联表查询 * 9,支持查询中使用&gt; &lt; != = &gt;= &lt;= IN LIKE * 10,支持group * 11,有限度的支持OR * @version 1.0 * @author &lt;cd&gt;chendong@yolo24.com * @createtime 2016-06-27 */
class PDO_LIB
{ static private $_pdos; static private $_pre = ''; private $_pdo; private $_stmt; private $_config; private $_open_rw; private $_sql = ''; private $_data = array(); private $_isTrue = false; private $_result = false; //实例化PDO public function __construct($is_main = 0) { $this-&gt;config(); $is_main = $this-&gt;_open_rw ? $is_main : 0; if (!isset(self::$_pdos[$is_main])) { $num = count($this-&gt;_config[$is_main]); $index = mt_rand(0, $num-1); $config = $this-&gt;_config[$is_main][$index]; $dsn = $config['db_type'] .':host='.$config['db_host'].';port='.$config['db_port'].';dbname='.$config['db_name'].';charset=utf8'; $opts = array( //PDO::ATTR_ERRMODE =&gt; PDO::ERRMODE_EXCEPTION,//设置抛出错误 PDO::ATTR_AUTOCOMMIT =&gt; 1, //开启自动提交 PDO::ATTR_TIMEOUT =&gt; 60, //设置超时时间 PDO::ATTR_PERSISTENT =&gt; false, //持久连接;虽然非常高效,但容易引起问题：表锁、事物阻塞、闲置连接无限循环,故不开启 PDO::MYSQL_ATTR_USE_BUFFERED_QUERY =&gt; true, //开启mysql缓冲查询，使用多重查询结果很重要 PDO::ATTR_EMULATE_PREPARES =&gt; false, //不开启本地预处理，交给mysql转义，防止5.4以下部分版本bug PDO::MYSQL_ATTR_INIT_COMMAND =&gt; 'set names utf8' , //设置提交及结果字符集编码，同时防止部分php版本对dsn设置不完全生效 PDO::ATTR_DEFAULT_FETCH_MODE =&gt; PDO::FETCH_ASSOC, //设置fetchAll结果集为关联索引数组 ); self::$_pdos[$is_main] = new PDO_GOME($dsn, $config['db_user'], $config['db_pwd'], $opts); //前缀不统一,暂不启用 //if (!empty($config['db_prefix'])) //{ // self::$_pre = $config['db_prefix']; //} } $this-&gt;_pdo = &amp; self::$_pdos[$is_main]; } /** * 组合数据库配置 */ private function config() { $this-&gt;_open_rw = false; if (isset($config[0])) { if (isset($config[0][0])) { $this-&gt;_config = $config; $this-&gt;_open_rw = true; //开启主从,读写分离 } else { $this-&gt;_config = array($config,$config); } } else { $config = Config::get('database'); $this-&gt;_config = array(array($config), array($config)); } } public function begin() { return $this-&gt;_pdo-&gt;beginTransaction(); } public function commit() { return $this-&gt;_pdo-&gt;commit(); } public function rollback() { return $this-&gt;_pdo-&gt;rollback(); } /** * 增加一条记录 * str $table 表名 * arr $param array('字段名1'=&gt;'字段值1', '字段名2'=&gt;'字段值2'); * @version 1.0 2016-06-24 * @author chendong@yolo24.com */ public function insert($table = '', $param = array()) { $this-&gt;_sql .= 'INSERT INTO '. self::$_pre . $table .' ('; $values = 'VALUES ('; foreach ($param as $key =&gt; $val) { $this-&gt;_sql .= '`'.$key . '`, '; $values .= '?, '; $this-&gt;_data[] = $val; } $this-&gt;_sql = rtrim($this-&gt;_sql, ', ') . ') ' . rtrim($values, ', ') . ');'; return $this; } /** * 删除记录 * $table 表名 * @version 1.0 2016-06-24 * @author chendong@yolo24.com */ public function delete($table = '') { $this-&gt;_sql .= 'DELETE FROM '. self::$_pre . $table . ' '; return $this; } /** * 更新记录 * str $table 表名 * arr $param array('字段名1'=&gt;'字段值1', '字段名2'=&gt;'字段值2'); * @version 1.0 2016-06-24 * @author chendong@yolo24.com */ public function update($table = '', $param = array()) { $this-&gt;_sql .= 'UPDATE '. self::$_pre . $table .' SET '; foreach ($param as $key =&gt; $val) { $this-&gt;_sql .= '`' . $key . '` = ?, '; $this-&gt;_data[] = $val; } $this-&gt;_sql = rtrim($this-&gt;_sql, ', ') . ' '; return $this; } /** * 查询 * str $table 表名 * mixed $param array('字段名1', '字段名2') | '字段名,字段名' | 不传默认*; * @version 1.0 2016-06-24 * @author chendong@yolo24.com */ public function select($table = '', $param = array()) { $this-&gt;_sql .= 'SELECT '; if (is_string($param)) { $this-&gt;_sql .= $param .' '; } elseif (empty($param)) { $this-&gt;_sql .= '* '; } else { $this-&gt;_sql .= implode(',', $param) . ' '; } $this-&gt;_sql .= 'FROM '. self::$_pre . $table .' '; return $this; } /** * 使用自定义预处理SQL * @version 1.0 2016-06-27 * @author chendong@yolo24.com */ public function query($sql, $param) { $this-&gt;_sql = $sql; $this-&gt;_data = $param; return $this-&gt;exec(); } /** * order by * str $by '字段名 DESC' | '字段名 ASC' * @version 1.0 2016-06-27 * @author chendong@yolo24.com */ public function where($param = array()) { $this-&gt;_sql .= 'WHERE '; if($param) { foreach ($param as $key =&gt; $val) { $this-&gt;whereStr($key, $val); $this-&gt;_sql .= 'AND '; } $this-&gt;_sql = rtrim($this-&gt;_sql, 'AND ') .' '; } else { $this-&gt;_sql .= '1 '; } return $this; } /** * order by * str $by '字段名 DESC' | '字段名 ASC' * @version 1.0 2016-06-27 * @author chendong@yolo24.com */ public function andOr($param = array()) { if($param) { $this-&gt;_sql .= 'AND ( '; foreach ($param as $key =&gt; $val) { $this-&gt;whereStr($key, $val); $this-&gt;_sql .= 'OR '; } $this-&gt;_sql = rtrim($this-&gt;_sql, 'OR ') .' ) '; } return $this; } /** * 支持 != = &gt; &lt; IN LIKE &gt;= &lt;= * @version 1.0 2016-06-27 * @author chendong@yolo24.com */ private function whereStr($key, $val) { $arr = array('&gt;', '&lt;', '!', '='); $first = strtoupper(substr($val,0,1)); if(in_array($first, $arr) || strtoupper(substr($val,0,3)) == 'IN ' || strtoupper(substr($val,0,5)) == 'LIKE ') { $index = strpos($val, ' '); $this-&gt;_sql .= $key .' '.substr($val, 0, $index).' '; $value = substr($val, ++$index); if($first == 'I') { $this-&gt;_sql .= '('; $arr = explode(',', $value); foreach ($arr as $k =&gt; $v) { $this-&gt;_sql .= '?, '; $this-&gt;_data[] = $v; } $this-&gt;_sql = rtrim($this-&gt;_sql, ', ') .') '; } else { $this-&gt;_sql .= '? '; $this-&gt;_data[] = $value; } } else { $this-&gt;_sql .= $key .' = ? '; $this-&gt;_data[] = $val; } } /** * group by * str $by '字段名' * @version 1.0 2016-06-27 * @author chendong@yolo24.com */ public function group($by) { $this-&gt;_sql .= 'GROUP BY '. $by .' '; return $this; } /** * order by * str $by '字段名 DESC' | '字段名 ASC' * @version 1.0 2016-06-27 * @author chendong@yolo24.com */ public function order($by) { $this-&gt;_sql .= 'ORDER BY '. $by .' '; return $this; } /** * limit * @version 1.0 2016-06-27 * @author chendong@yolo24.com */ public function limit($start, $num) { $this-&gt;_sql .= 'LIMIT ?,? '; $this-&gt;_data[] = $start; $this-&gt;_data[] = $num; return $this; } /** * join * @version 1.0 2016-06-27 * @author chendong@yolo24.com */ public function join($table='', $param = array(), $place = 'LEFT') { $this-&gt;_sql .= $place .' JOIN '. self::$_pre . $table .' ON '; if($param) { foreach($param as $key=&gt;$val) { $this-&gt;whereStr($key, $val); $this-&gt;_sql .= 'AND '; } $this-&gt;_sql = rtrim($this-&gt;_sql, 'AND ') .' '; } return $this; } /** * join * @version 1.0 2016-06-27 * @author chendong@yolo24.com */ public function on($param = array()) { if($param) { foreach ($param as $key =&gt; $val) { $this-&gt;_sql .= $key .' = '. $val .' AND '; } $this-&gt;_sql = rtrim($this-&gt;_sql, 'AND ') .' '; } return $this; } /** * 执行sql * @version 1.0 2016-06-27 * @author chendong@yolo24.com */ public function exec() { try { $this-&gt;_stmt = $this-&gt;_pdo-&gt;prepare($this-&gt;_sql); $this-&gt;_isTrue = $this-&gt;_stmt ? $this-&gt;_stmt-&gt;execute($this-&gt;_data) : false; } catch (PDOException $e) { $this-&gt;log('query error : ' . $e-&gt;getMessage()); $this-&gt;_isTrue = false; } return $this; } /** * 输出上一次执行是否成功 * @version 1.0 2016-06-28 * @author chendong@yolo24.com */ public function isTrue() { return $this-&gt;_isTrue; } /** * 返回上一条insert的SQL的自增id * @version 1.0 2016-06-27 * @author chendong@yolo24.com */ public function insertId() { return $this-&gt;_isTrue ? intval($this-&gt;_pdo-&gt;lastInsertId()) : 0; } /** * 返回上一条SQL的影响行数 * @version 1.0 2016-06-27 * @author chendong@yolo24.com */ public function updateNum() { return $this-&gt;_isTrue ? intval($this-&gt;_stmt-&gt;rowCount()) : 0; } /** * 结果集总数 * @version 1.0 2016-06-24 * @author chendong@yolo24.com */ public function selectNum() { return $this-&gt;_isTrue ? $this-&gt;_pdo-&gt;query("SELECT FOUND_ROWS()")-&gt;fetchColumn() : 0; } /** * 返回select的一行结果集 * @version 1.0 2016-06-27 * @author chendong@yolo24.com */ public function getRow() { $result = $this-&gt;getAll(); $result = $result ? $result[0] : false; return $result; } /** * 返回select的所有结果集 * @version 1.0 2016-06-27 * @author chendong@yolo24.com */ public function getAll() { if (empty($this-&gt;_result) &amp;&amp; $this-&gt;_isTrue &amp;&amp; strtoupper(substr($this-&gt;_sql, 0, 6) == 'SELECT')) { $this-&gt;_result = $this-&gt;_stmt-&gt;fetchAll(); } return $this-&gt;_result; } /** * 按sql获取第一条数据的第一列到值 * @version 1.0 2016-06-27 * @author chendong@yolo24.com */ public function getOne() { $result = $this-&gt;getRow(); $result = $result ? reset($result) : false; return $result; } /** * 输出SQL * @version 1.0 2016-06-28 * @author chendong@yolo24.com */ public function getSql() { return $this-&gt;_sql; } /** * 输出预处理的数组 * @version 1.0 2016-06-28 * @author chendong@yolo24.com */ public function getArr() { return $this-&gt;_data; } /** * 记录日志 * @version 1.0 2016-06-27 * @author chendong@yolo24.com */ function log($str) { file_put_contents(LOG_PATH . '/pdo_error.log', date('Y-m-d H:i:s').' '.$str . "\n", FILE_APPEND); }
} /** * PDO_GOME PDO类重载优化 * 1,优化两次开启事务 * 2,防止暴露连接信息 * * @version 1.0 * @author &lt;cd&gt;chendong@yolo24.com * @createtime 2016-06-24 */
class PDO_GOME extends PDO
{ private $transactionCounter = 0; //防止两次开启事务报错 public function __construct($dsn, $user='', $pwd='', $opts=array()) { //暂时改变php的异常处理，防止暴露连接信息 set_exception_handler(array(__CLASS__, 'exception_handler')); parent::__construct($dsn, $user, $pwd, $opts); restore_exception_handler(); } public static function exception_handler($e) { $error = $e-&gt;getMessage(); file_put_contents(LOG_PATH . '/pdo_error.log', date('Y-m-d H:i:s').' '.$error . "\n", FILE_APPEND); exit('ERROR:'.$error); } function beginTransaction() { if (!$this-&gt;transactionCounter++) { return parent::beginTransaction(); } return $this-&gt;transactionCounter &gt;= 0; } function commit() { if (!--$this-&gt;transactionCounter) { return parent::commit(); } return $this-&gt;transactionCounter &gt;= 0; } function rollback() { if ($this-&gt;transactionCounter &gt;= 0) { $this-&gt;transactionCounter = 0; return parent::rollback(); } $this-&gt;transactionCounter = 0; return false; }
}
]]></description><link>intcpu.github.io/数算的笔记/互联网开发/PHP-PDO静态调用类.html</link><guid isPermaLink="false">数算的笔记/互联网开发/PHP-PDO静态调用类.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Wed, 20 Jul 2016 17:45:26 GMT</pubDate></item><item><title><![CDATA[Jekyll博客创建]]></title><description><![CDATA[
jekyll模板大全: <a rel="noopener nofollow" class="external-link is-unresolved" href="http://jekyllthemes.org/" target="_self">http://jekyllthemes.org/</a><br>
用了这个： <a rel="noopener nofollow" class="external-link is-unresolved" href="http://jekyllthemes.org/themes/guovz-pithy/" target="_self">http://jekyllthemes.org/themes/guovz-pithy/</a><br>
模板GITHUB地址：<a rel="noopener nofollow" class="external-link is-unresolved" href="https://github.com/guovz/jekyll-pithy" target="_self">https://github.com/guovz/jekyll-pithy</a> <br>
下载rubyinstaller： <a rel="noopener nofollow" class="external-link is-unresolved" href="http://rubyinstaller.org/downloads/" target="_self">http://rubyinstaller.org/downloads/</a> 安装 rubyinstaller-2.2.4-x64.exe gem update --system 报错：<br>
Errno:: ECONNABORTED: An established connection was aborted by the software in your host machine. - SSL_connect (<a rel="noopener nofollow" class="external-link is-unresolved" href="https://api.rubygems.org/specs.4.8.gz" target="_self">https://api.rubygems.org/specs.4.8.gz</a>) 连接一个代理 gem update --system Updating rubygems-update
Fetching: rubygems-update-2.6.1.gem (100%)
Successfully installed rubygems-update-2.6.1
Parsing documentation for rubygems-update-2.6.1
Installing ri documentation for rubygems-update-2.6.1
Installing darkfish documentation for rubygems-update-2.6.1
Done installing documentation for rubygems-update after 1 seconds
Parsing documentation for rubygems-update-2.6.1
Done installing documentation for rubygems-update after 0 seconds
Installing RubyGems 2.6.1
RubyGems 2.6.1 installed
Parsing documentation for rubygems-2.6.1
Installing ri documentation for rubygems-2.6.1
=== 2.6.1 / 2016-02-28
......
RubyGems system software updated gem install jekyll
gem install markdown
gem install kramdown
cd jekyll-pithy-master
######问题1：
jekyll build --watch<br>
Dependency Error: Yikes! It looks like you don't have jekyll-paginate or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- jekyll-paginate' If you run into trouble, you can find helpful resources at <a rel="noopener nofollow" class="external-link is-unresolved" href="http://jekyllrb.com/help/" target="_self">http://jekyllrb.com/help/</a>!
######解决1：
gem install jekyll-paginate
Fetching: jekyll-paginate-1.1.0.gem (100%)
Successfully installed jekyll-paginate-1.1.0
Parsing documentation for jekyll-paginate-1.1.0
Installing ri documentation for jekyll-paginate-1.1.0
Done installing documentation for jekyll-paginate after 0 seconds
1 gem installed jekyll build --watch<br>
Dependency Error: Yikes! It looks like you don't have D:/WEB/zhuanye.github.io/_plugins/i18n_filter.rb or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- i18n' If you run into trouble, you can find helpful resources at <a rel="noopener nofollow" class="external-link is-unresolved" href="http://jekyllrb.com/help/" target="_self">http://jekyllrb.com/help/</a>!
######解决2：
gem install i18n
Fetching: i18n-0.7.0.gem (100%)
Successfully installed i18n-0.7.0
Parsing documentation for i18n-0.7.0
Installing ri documentation for i18n-0.7.0
Done installing documentation for i18n after 1 seconds
1 gem installed
#######问题3：
Deprecation: You are using 'enable_coderay', use syntax_highlighter: coderay in your configuration file.
Deprecation: You are using 'kramdown.coderay' in your configuration, please use 'syntax_highlighter_opts' instead.
Deprecation: You are using 'coderay_line_numbers'. Normalizing to line_numbers.
######解决3：
_config.yml 这一段修改： highlighter: 'rouge'
kramdown:
input: GFM
syntax_highlighter: syntax_highlighter_opts
coderay:
line_numbers: nil
#####关于本地查看：jekyll serve --trace
Configuration file: D:/WEB/zhuanye.github.io/_config.yml
Source: D:/WEB/zhuanye.github.io
Destination: D:/WEB/zhuanye.github.io/_site
Incremental build: disabled. Enable with --incremental
Generating...
done in 1.157 seconds.
Please add the following to your Gemfile to avoid polling for changes:
gem 'wdm', '&gt;= 0.1.0' if Gem.win_platform?
Auto-regeneration: enabled for 'D:/WEB/zhuanye.github.io'
Configuration file: D:/WEB/zhuanye.github.io/_config.yml<br>
Server address: <a rel="noopener nofollow" class="external-link is-unresolved" href="http://127.0.0.1:4000/" target="_self">http://127.0.0.1:4000/</a>
Server running... press ctrl-c to stop.
<br> 访问 <a rel="noopener nofollow" class="external-link is-unresolved" href="http://127.0.0.1:4000/" target="_self">http://127.0.0.1:4000/</a> 就能看到效果 ，ctrl-c终止命令 ]]></description><link>intcpu.github.io/数算的笔记/互联网开发/Jekyll博客创建.html</link><guid isPermaLink="false">数算的笔记/互联网开发/Jekyll博客创建.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Tue, 01 Mar 2016 13:14:06 GMT</pubDate></item><item><title><![CDATA[nginx及PHP错误日志分析Top10]]></title><description><![CDATA[#####分析nginx错误日志TOP10：awk -F " client: " '{print $1}' edu_error.log |sort |uniq -c |sort -nr | awk 'str = ""; {for(i=7;i&lt;=NF;i++) str =str" "$i; print str}' | sort | uniq -c | sort -nr | head -n 10
#####分析PHP错误日志TOP10：awk 'str = ""; {for(i=4;i&lt;=NF;i++) str =str" "$i; print str}' php_errors.log-20160224 |sort | uniq -c |sort -nr | head -n 10
]]></description><link>intcpu.github.io/数算的笔记/互联网开发/nginx及PHP错误日志分析Top10.html</link><guid isPermaLink="false">数算的笔记/互联网开发/nginx及PHP错误日志分析Top10.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Wed, 24 Feb 2016 15:41:36 GMT</pubDate></item><item><title><![CDATA[排序算法运行时间比较：冒泡，选择，插入，快速，居然快速最慢]]></title><description><![CDATA[&lt;?php
//秒表
class T { private static $watch = array(); private static $times = array(); function __construct() { $this-&gt;reset(); } //初始化 public function reset() { self::$watch = array(); self::$times = array(); return self::$watch[] = self::nowTime(); } //计时 public function t($key = null) { $time = self::nowTime(); $last = end(self::$watch); $times = sprintf("%.6f", ($time - $last)); if (empty($key) || is_int($key) || (is_numeric($key) &amp;&amp; (intval($key) - $key === 0))) { self::$times[] = $times; self::$watch[] = $time; } else { self::$times[$key] = $times; self::$watch[$key] = $time; } return $time; } //显示所有点 public function end($key = null) { self::t($key); //打印执行时间 var_export(self::$times); //打印时间点 //var_export(self::$watch); return self::$times; } //获取现在时间 private function nowTime() { $time = explode(' ', microtime()); return sprintf("%.6f", ($time[0] + $time[1])); }
} $arr = array();
for ($k = 1000; $k &gt; 0; $k--) { $arr[] = $k;
} #冒泡一:找出右边最大的,从右推
function mao_rr($arr) { $count = count($arr); for ($j = $count; $j &gt; 0; $j--) { for ($i = 0; $i &lt; $j; $i++) { if ($arr[$i] &lt; $arr[$i - 1]) { $tmp = $arr[$i - 1]; $arr[$i - 1] = $arr[$i]; $arr[$i] = $tmp; } } } return $arr;
} #冒泡二：找出左边最小的，从右推
function mao_lr($arr) { $count = count($arr); for ($i = 0; $i &lt; $count; $i++) { for ($j = $count - 1; $j &gt; $i; $j--) { if ($arr[$j] &lt; $arr[$j - 1]) { $tmp = $arr[$j - 1]; $arr[$j - 1] = $arr[$j]; $arr[$j] = $tmp; } } }
}
#冒泡三：找出左边最小的，从左推
function mao_ll($arr) { $len = count($arr); //该层循环控制 需要冒泡的轮数 for ($i = 1; $i &lt; $len; $i++) { //该层循环用来控制每轮 冒出一个数 需要比较的次数 for ($k = 0; $k &lt; $len - $i; $k++) { if ($arr[$k] &gt; $arr[$k + 1]) { $tmp = $arr[$k + 1]; $arr[$k + 1] = $arr[$k]; $arr[$k] = $tmp; } } } return $arr;
} #选择排序
function select_sort($arr) {
//实现思路 双重循环完成，外层控制轮数，当前的最小值。内层 控制的比较次数 //$i 当前最小值的位置， 需要参与比较的元素 for ($i = 0, $len = count($arr); $i &lt; $len - 1; $i++) { //先假设最小的值的位置 $p = $i; //$j 当前都需要和哪些元素比较，$i 后边的。 for ($j = $i + 1; $j &lt; $len; $j++) { //$arr[$p] 是 当前已知的最小值 if ($arr[$p] &gt; $arr[$j]) { //比较，发现更小的,记录下最小值的位置；并且在下次比较时， // 应该采用已知的最小值进行比较。 $p = $j; } } //已经确定了当前的最小值的位置，保存到$p中。 //如果发现 最小值的位置与当前假设的位置$i不同，则位置互换即可 if ($p != $i) { $tmp = $arr[$p]; $arr[$p] = $arr[$i]; $arr[$i] = $tmp; } } //返回最终结果 return $arr;
} #插入排序
function insert_sort($arr) { //区分 哪部分是已经排序好的 //哪部分是没有排序的 //找到其中一个需要排序的元素 //这个元素 就是从第二个元素开始，到最后一个元素都是这个需要排序的元素 //利用循环就可以标志出来 //i循环控制 每次需要插入的元素，一旦需要插入的元素控制好了， //间接已经将数组分成了2部分，下标小于当前的（左边的），是排序好的序列 for ($i = 1, $len = count($arr); $i &lt; $len; $i++) { //获得当前需要比较的元素值。 $tmp = $arr[$i]; //内层循环控制 比较 并 插入 for ($j = $i - 1; $j &gt;= 0; $j--) { //$arr[$i];//需要插入的元素; $arr[$j];//需要比较的元素 if ($tmp &lt; $arr[$j]) { //发现插入的元素要小，交换位置 //将后边的元素与前面的元素互换 $arr[$j + 1] = $arr[$j]; //将前面的数设置为 当前需要交换的数 $arr[$j] = $tmp; } else { //如果碰到不需要移动的元素 //由于是已经排序好是数组，则前面的就不需要再次比较了。 break; } } } //将这个元素 插入到已经排序好的序列内。 return $arr;
} #快速排序
function quick_sort($arr) { //先判断是否需要继续进行 $length = count($arr); if ($length &lt;= 1) { return $arr; } //如果没有返回，说明数组内的元素个数 多余1个，需要排序 //选择一个标尺 //选择第一个元素 $base_num = $arr[0]; //遍历 除了标尺外的所有元素，按照大小关系放入两个数组内 //初始化两个数组 $left_array = array(); //小于标尺的 $right_array = array(); //大于标尺的 for ($i = 1; $i &lt; $length; $i++) { if ($base_num &gt; $arr[$i]) { //放入左边数组 $left_array[] = $arr[$i]; } else { //放入右边 $right_array[] = $arr[$i]; } } //再分别对 左边 和 右边的数组进行相同的排序处理方式 //递归调用这个函数,并记录结果 $left_array = quick_sort($left_array); $right_array = quick_sort($right_array); //合并左边 标尺 右边 return array_merge($left_array, array($base_num), $right_array);
} $a = new T();
$r1 = mao_rr($arr); $a-&gt;t('mao_rr'); $r2 = mao_lr($arr); $a-&gt;t('mao_lr'); $r3 = mao_ll($arr);
$a-&gt;t('mao_ll'); $r4 = select_sort($arr);
$a-&gt;t('select_sort'); $r5 = insert_sort($arr);
$a-&gt;t('insert_sort'); $r6 = quick_sort($arr);
$a-&gt;t('quick_sort'); $a-&gt;end('end'); /**
array (
'mao_rr' =&gt; '0.191135',
'mao_lr' =&gt; '0.191332',
'mao_ll' =&gt; '0.210612',
'select_sort' =&gt; '0.099830',
'insert_sort' =&gt; '0.129572',
'quick_sort' =&gt; '0.233171',
'end' =&gt; '0.000044',
) array (
'mao_rr' =&gt; '0.191214',
'mao_lr' =&gt; '0.188379',
'mao_ll' =&gt; '0.200358',
'select_sort' =&gt; '0.101432',
'insert_sort' =&gt; '0.128911',
'quick_sort' =&gt; '0.236354',
'end' =&gt; '0.000043',
) array (
'mao_rr' =&gt; '0.190474',
'mao_lr' =&gt; '0.187710',
'mao_ll' =&gt; '0.204319',
'select_sort' =&gt; '0.101409',
'insert_sort' =&gt; '0.129628',
'quick_sort' =&gt; '0.233277',
'end' =&gt; '0.000042',
) */
]]></description><link>intcpu.github.io/数算的笔记/互联网开发/排序算法运行时间比较：冒泡，选择，插入，快速，居然快速最慢.html</link><guid isPermaLink="false">数算的笔记/互联网开发/排序算法运行时间比较：冒泡，选择，插入，快速，居然快速最慢.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Wed, 06 Apr 2016 15:45:28 GMT</pubDate></item><item><title><![CDATA[开源产品收藏单]]></title><description><![CDATA[
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/php-beast" rel="noopener nofollow" class="external-link is-unresolved" title="php-beast" href="https://www.oschina.net/p/php-beast" target="_self">PHP 源码加密模块 php-beast [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/phpscrew" rel="noopener nofollow" class="external-link is-unresolved" title="PHP Screw" href="https://www.oschina.net/p/phpscrew" target="_self">PHP源文件加密工具 PHP Screw [推荐]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/seaslog" rel="noopener nofollow" class="external-link is-unresolved" title="SeasLog" href="https://www.oschina.net/p/seaslog" target="_self">PHP日志扩展 SeasLog [推荐] [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/jsond" rel="noopener nofollow" class="external-link is-unresolved" title="JSOND" href="https://www.oschina.net/p/jsond" target="_self">一个更优的PHP JSON解析器 JSOND [推荐]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/tclip" rel="noopener nofollow" class="external-link is-unresolved" title="Tclip" href="https://www.oschina.net/p/tclip" target="_self">php图片裁剪 Tclip [国产]</a> <br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/php-yaf" rel="noopener nofollow" class="external-link is-unresolved" title="Yaf" href="https://www.oschina.net/p/php-yaf" target="_self">PHP框架 Yaf [推荐] [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/codeigniter" rel="noopener nofollow" class="external-link is-unresolved" title="CodeIgniter" href="https://www.oschina.net/p/codeigniter" target="_self">PHP 的 MVC 框架 CodeIgniter</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/laravel" rel="noopener nofollow" class="external-link is-unresolved" title="Laravel" href="https://www.oschina.net/p/laravel" target="_self">PHP开发框架 Laravel [推荐]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/yii2" rel="noopener nofollow" class="external-link is-unresolved" title="Yii2" href="https://www.oschina.net/p/yii2" target="_self">PHP 框架 Yii2</a> <br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/swoole-server" rel="noopener nofollow" class="external-link is-unresolved" href="https://www.oschina.net/p/swoole-server" target="_self">PHP 的异步并行 C 扩展 Swoole</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/swoole" rel="noopener nofollow" class="external-link is-unresolved" title="Swoole Framework" href="https://www.oschina.net/p/swoole" target="_self">PHP高级Web开发框架 Swoole Framework [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/swooledistributed" rel="noopener nofollow" class="external-link is-unresolved" title="SwooleDistributed" href="https://www.oschina.net/p/swooledistributed" target="_self">Swoole 分布式通讯框架 SwooleDistributed [推荐] [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/workerman" rel="noopener nofollow" class="external-link is-unresolved" title="Workerman" href="https://www.oschina.net/p/workerman" target="_self">高性能 PHP socket 框架 Workerman [推荐] [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/swoft" rel="noopener nofollow" class="external-link is-unresolved" title="Swoft" href="https://www.oschina.net/p/swoft" target="_self">高性能 PHP 微服务框架 Swoft [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/workerman" rel="noopener nofollow" class="external-link is-unresolved" title="Workerman" href="https://www.oschina.net/p/workerman" target="_self">高性能 PHP socket 框架 Workerman [推荐] [国产]</a> <br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/ip2region" rel="noopener nofollow" class="external-link is-unresolved" title="ip2region" href="https://www.oschina.net/p/ip2region" target="_self">IP 到地名映射库 ip2region [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/touclick" rel="noopener nofollow" class="external-link is-unresolved" title="touclick" href="https://www.oschina.net/p/touclick" target="_self">点触验证 touclick [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/phpsms" rel="noopener nofollow" class="external-link is-unresolved" title="phpsms" href="https://www.oschina.net/p/phpsms" target="_self">php短信发送库 phpsms</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/clickheat" rel="noopener nofollow" class="external-link is-unresolved" title="ClickHeat" href="https://www.oschina.net/p/clickheat" target="_self">网站热图生成工具 ClickHeat [推荐]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/hyperdown" rel="noopener nofollow" class="external-link is-unresolved" title="HyperDown" href="https://www.oschina.net/p/hyperdown" target="_self">PHP Markdown 解析器 HyperDown [推荐] [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/phpchart" rel="noopener nofollow" class="external-link is-unresolved" title="phpChart" href="https://www.oschina.net/p/phpchart" target="_self">PHP图表库 phpChart</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/magentoc" rel="noopener nofollow" class="external-link is-unresolved" title="MagentoC" href="https://www.oschina.net/p/magentoc" target="_self">Magento中文定制版 MagentoC [国产]</a>|购物车系统<br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/yii-wechat" rel="noopener nofollow" class="external-link is-unresolved" title="Yii-wechat" href="https://www.oschina.net/p/yii-wechat" target="_self">Yii 的微信模块 Yii-wechat [推荐] [国产]</a> <br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/xunsearch" rel="noopener nofollow" class="external-link is-unresolved" title="XunSearch" href="https://www.oschina.net/p/xunsearch" target="_self">迅搜全文搜索引擎 XunSearch [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/phalapi" rel="noopener nofollow" class="external-link is-unresolved" title="PhalApi" href="https://www.oschina.net/p/phalapi" target="_self">轻量级PHP后台接口开发框架 PhalApi [推荐] [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/sequoiadb" rel="noopener nofollow" class="external-link is-unresolved" title="SequoiaDB" href="https://www.oschina.net/p/sequoiadb" target="_self">企业级分布式NoSQL数据库 SequoiaDB [推荐] [国产]</a> <br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/rediswebadmin" rel="noopener nofollow" class="external-link is-unresolved" href="https://www.oschina.net/p/rediswebadmin" target="_self">Redis 数据管理工具 RedisWebAdmin</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/zabbix" rel="noopener nofollow" class="external-link is-unresolved" title="zabbix" href="https://www.oschina.net/p/zabbix" target="_self">分布式系统监视 zabbix [推荐]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/phpmyadmin" rel="noopener nofollow" class="external-link is-unresolved" title="phpMyAdmin" href="https://www.oschina.net/p/phpmyadmin" target="_self">MySQL管理工具 phpMyAdmin [推荐]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/mysqlmtop" rel="noopener nofollow" class="external-link is-unresolved" title="MySQL MTOP" href="https://www.oschina.net/p/mysqlmtop" target="_self">MySQL企业监控系统 MySQL MTOP [推荐] [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/cobub-razor" rel="noopener nofollow" class="external-link is-unresolved" title="Cobub Razor" href="https://www.oschina.net/p/cobub-razor" target="_self">移动应用统计 Cobub Razor [推荐] [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/osa" rel="noopener nofollow" class="external-link is-unresolved" title="OSA" href="https://www.oschina.net/p/osa" target="_self">开放的运维管理系统 OSA [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/walle-web" rel="noopener nofollow" class="external-link is-unresolved" title="Walle" href="https://www.oschina.net/p/walle-web" target="_self">web上线部署系统工具 Walle [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/falcon" rel="noopener nofollow" class="external-link is-unresolved" title="Falcon" href="https://www.oschina.net/p/falcon" target="_self">Web服务器文件安全监控平台 Falcon [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/ushahidi" rel="noopener nofollow" class="external-link is-unresolved" title="Ushahidi" href="https://www.oschina.net/p/ushahidi" target="_self">开源报警平台 Ushahidi</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/bugtrace" rel="noopener nofollow" class="external-link is-unresolved" title="BugTrace" href="https://www.oschina.net/p/bugtrace" target="_self">开源缺陷跟踪软件 BugTrace [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/osa-minitor" rel="noopener nofollow" class="external-link is-unresolved" title="OSA监控精灵" href="https://www.oschina.net/p/osa-minitor" target="_self">OSA监控精灵 [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/webshare" rel="noopener nofollow" class="external-link is-unresolved" title="WebShare" href="https://www.oschina.net/p/webshare" target="_self">webFTP资源管理器webFTP资源管理器 WebShare</a> <br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/grapesjs" rel="noopener nofollow" class="external-link is-unresolved" title="GrapesJS" href="https://www.oschina.net/p/grapesjs" target="_self">Web 模板编辑器 GrapesJS [推荐]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/diquick" rel="noopener nofollow" class="external-link is-unresolved" title="DiQuick" href="https://www.oschina.net/p/diquick" target="_self">Web前端框架 DiQuick [国产]</a> <br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/startblog" rel="noopener nofollow" class="external-link is-unresolved" title="Startblog" href="https://www.oschina.net/p/startblog" target="_self">跨平台的 Markdown 博客系统 Startblog [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/maupassant" rel="noopener nofollow" class="external-link is-unresolved" title="maupassant" href="https://www.oschina.net/p/maupassant" target="_self">基于 PHP 的个人博客模板 maupassant [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/Gitblog" rel="noopener nofollow" class="external-link is-unresolved" title="Gitblog" href="https://www.oschina.net/p/Gitblog" target="_self">Markdown 博客系统 Gitblog [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/fcontex" rel="noopener nofollow" class="external-link is-unresolved" title="fcontex" href="https://www.oschina.net/p/fcontex" target="_self">博客平台和内容管理系统 fcontex [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/moell-blog" rel="noopener nofollow" class="external-link is-unresolved" title="moell blog" href="https://www.oschina.net/p/moell-blog" target="_self">支持 markdown 的简易博客 moell blog [国产]</a> <br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/ngoos" rel="noopener nofollow" class="external-link is-unresolved" title="NGOOS" href="https://www.oschina.net/p/ngoos" target="_self">TYPO3 中文版 NGOOS [推荐] [国产]</a>|公益平台<br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/eduwind" rel="noopener nofollow" class="external-link is-unresolved" title="EduWind" href="https://www.oschina.net/p/eduwind" target="_self">在线教育专业建站工具 EduWind [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/gxcms" rel="noopener nofollow" class="external-link is-unresolved" title="光线CMS" href="https://www.oschina.net/p/gxcms" target="_self">智能影视站系统 光线CMS [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/linger" rel="noopener nofollow" class="external-link is-unresolved" title="Linger" href="https://www.oschina.net/p/linger" target="_self">PHP 图片分享系统 Linger [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/phpems" rel="noopener nofollow" class="external-link is-unresolved" title="PHPems" href="https://www.oschina.net/p/phpems" target="_self">在线模拟考试系统 PHPems [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/we_questionnaire" rel="noopener nofollow" class="external-link is-unresolved" title="We_Questionnaire" href="https://www.oschina.net/p/we_questionnaire" target="_self">移动端问卷调查 We_Questionnaire [推荐] [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/ecjia-daojia" rel="noopener nofollow" class="external-link is-unresolved" title="ECJia到家" href="https://www.oschina.net/p/ecjia-daojia" target="_self">O2O 的移动电商系统 ECJia到家 [国产]</a> <br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/bagecms" rel="noopener nofollow" class="external-link is-unresolved" title="BageCms" href="https://www.oschina.net/p/bagecms" target="_self">网站内容管理系统 BageCms [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/corethink" rel="noopener nofollow" class="external-link is-unresolved" title="零云" href="https://www.oschina.net/p/corethink" target="_self">轻量级WEB产品开发框架 零云 [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/fircms" rel="noopener nofollow" class="external-link is-unresolved" title="FirCMS" href="https://www.oschina.net/p/fircms" target="_self">基于 Yii 开发的 CMS 系统 FirCMS [国产]</a> <br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/makingware" rel="noopener nofollow" class="external-link is-unresolved" title="Makingware" href="https://www.oschina.net/p/makingware" target="_self">Magento 中文版本 Makingware [推荐] [国产]</a>|企业级电子商务<br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/Haidao" rel="noopener nofollow" class="external-link is-unresolved" title="海盗云商" href="https://www.oschina.net/p/Haidao" target="_self">开源电子商务网店程序 海盗云商 [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/ecmos" rel="noopener nofollow" class="external-link is-unresolved" title="ECMOS" href="https://www.oschina.net/p/ecmos" target="_self">基于 ecmall 深度定制的商城系统 ECMOS [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/wemall" rel="noopener nofollow" class="external-link is-unresolved" title="WeMall" href="https://www.oschina.net/p/wemall" target="_self">微信商城云平台 WeMall [国产]</a> <br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/api-admin" rel="noopener nofollow" class="external-link is-unresolved" title="ApiAdmin" href="https://www.oschina.net/p/api-admin" target="_self">专注于API的管理后台 ApiAdmin [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/openbiz-cubi" rel="noopener nofollow" class="external-link is-unresolved" title="Openbiz Cubi" href="https://www.oschina.net/p/openbiz-cubi" target="_self">一体化办公软件 Openbiz Cubi [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/ibos" rel="noopener nofollow" class="external-link is-unresolved" title="IBOS" href="https://www.oschina.net/p/ibos" target="_self">基于Yii的协同办公管理系统 IBOS [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/open-x" rel="noopener nofollow" class="external-link is-unresolved" title="ONES" href="https://www.oschina.net/p/open-x" target="_self">开源企业管理软件 ONES [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/xapi-manager" rel="noopener nofollow" class="external-link is-unresolved" title="xApi Manager" href="https://www.oschina.net/p/xapi-manager" target="_self">基于 Laravel 5.4 接口管理平台 xApi Manager [国产]</a> <br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/goemphp" rel="noopener nofollow" class="external-link is-unresolved" title="GoEmPHP" href="https://www.oschina.net/p/goemphp" target="_self">Go 嵌入 PHP 脚本 GoEmPHP [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/php-ml" rel="noopener nofollow" class="external-link is-unresolved" title="PHP-ML" href="https://www.oschina.net/p/php-ml" target="_self">PHP 机器学习库 PHP-ML [推荐]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/ohsce" rel="noopener nofollow" class="external-link is-unresolved" title="OHSCE" href="https://www.oschina.net/p/ohsce" target="_self">高可靠性的 PHP 通信框架 OHSCE [推荐] [国产]</a>|硬件串口读取 <br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/opencc" rel="noopener nofollow" class="external-link is-unresolved" title="OpenCC" href="https://www.oschina.net/p/opencc" target="_self">中文简繁转换项目 OpenCC [推荐] [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/phc" rel="noopener nofollow" class="external-link is-unresolved" title="phc" href="https://www.oschina.net/p/phc" target="_self">PHP编译器 phc</a>|PHP编译可执行程序<br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/yii-chinese" rel="noopener nofollow" class="external-link is-unresolved" title="yii-chinese" href="https://www.oschina.net/p/yii-chinese" target="_self">中文编码集合类库 yii-chinese [国产]</a><br>
<a data-tooltip-position="top" aria-label="https://www.oschina.net/p/phpchinesetopinyin" rel="noopener nofollow" class="external-link is-unresolved" title="PHPChineseToPinyin" href="https://www.oschina.net/p/phpchinesetopinyin" target="_self">PHP 汉字转拼音类 PHPChineseToPinyin [国产]</a> ]]></description><link>intcpu.github.io/数算的笔记/互联网开发/开源产品收藏单.html</link><guid isPermaLink="false">数算的笔记/互联网开发/开源产品收藏单.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Tue, 15 Aug 2017 17:44:55 GMT</pubDate></item><item><title><![CDATA[rust安装]]></title><description><![CDATA[export all_proxy=socks5://127.0.0.1:1080
brew install rust
# 更新源
cargo update
# rust自动补全和语法分析
cargo install racer
# 格式化
cargo install rustfmt
# 保证最新
rustup self update
]]></description><link>intcpu.github.io/数算的笔记/服务器/rust安装.html</link><guid isPermaLink="false">数算的笔记/服务器/rust安装.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Mon, 21 Sep 2026 04:20:50 GMT</pubDate></item><item><title><![CDATA[redis安装脚本]]></title><description><![CDATA[mkdir -p /app/soft
cd /app/soft
sudo wget http://download.redis.io/releases/redis-3.2.11.tar.gz
sudo tar zxvf redis-3.2.11.tar.gz
cd redis-3.2.11/src
sudo make
sudo make test
sudo make PREFIX=/app/redis install
sudo mkdir -p /app/redis/etc
sudo mkdir -p /app/redis/logs
sudo mkdir -p /app/redis/data
sudo cp /app/soft/redis-3.2.11/redis.conf /app/redis/etc/6379.conf
sudo cp /app/soft/redis-3.2.11/utils/redis_init_script /etc/init.d/redis
sudo sed -i "s/EXEC=\/usr\/local\/bin\/redis-server/EXEC=\/app\/redis\/bin\/redis-server/g" /etc/init.d/redis
sudo sed -i "s/CLIEXEC=\/usr\/local\/bin\/redis-cli/CLIEXEC=\/app\/redis\/bin\/redis-cli/g" /etc/init.d/redis
sudo sed -i "s/CONF=\"\/etc\/redis/CONF=\"\/app\/redis\/etc/g" /etc/init.d/redis
sudo sed -i "s/daemonize no/daemonize yes/g" /app/redis/etc/6379.conf
sudo sed -i "s/bind 127.0.0.1/bind 0.0.0.0/g" /app/redis/etc/6379.conf
sudo service redis start
sudo rm -rf /app/soft/redis-3.2.11*
]]></description><link>intcpu.github.io/数算的笔记/互联网开发/redis安装脚本.html</link><guid isPermaLink="false">数算的笔记/互联网开发/redis安装脚本.md</guid><dc:creator><![CDATA[intcpu]]></dc:creator><pubDate>Thu, 28 Dec 2017 14:08:15 GMT</pubDate></item></channel></rss>