<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tomorrow Man</title>
	<atom:link href="http://blog.s777n.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.s777n.net</link>
	<description>born@80s,  live@beijing,  work@chinadaily</description>
	<lastBuildDate>Tue, 25 Oct 2011 10:14:58 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>nginx php 大文件上传的配置</title>
		<link>http://blog.s777n.net/nginx-php-upload-large-files/</link>
		<comments>http://blog.s777n.net/nginx-php-upload-large-files/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 05:42:37 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[web服务器]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[client_max_body_size]]></category>
		<category><![CDATA[file_uploads]]></category>
		<category><![CDATA[max_execution_time]]></category>
		<category><![CDATA[upload_max_filesize]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=275</guid>
		<description><![CDATA[今天改客户的一个需求，要上传大文件，按以往经验，在php.ini中设置以下几处：
file_uploads on  开启上传
upload_max_filesize 128m  上传文件最大值
post_max_size 128m  PHP的POST的最大值
由于文件大，上传时间可能会长，还需设置以下：
max_execution_time 1800   页面运行时间 0为无限制
max_input_time 1800  接受数据时间
memory_limit 128m php单页面占用内存
设置好后，测试，依然不能上传大文件。
在nginx.conf中查看，看到 client_max_body_size 8m;  修改为128m，测试，OK！
]]></description>
		<wfw:commentRss>http://blog.s777n.net/nginx-php-upload-large-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>设置MySQL数据同步（单向&amp;双向）</title>
		<link>http://blog.s777n.net/mysqlmasterslave/</link>
		<comments>http://blog.s777n.net/mysqlmasterslave/#comments</comments>
		<pubDate>Thu, 16 Jun 2011 06:44:53 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[数据库]]></category>
		<category><![CDATA[网海拾贝]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=271</guid>
		<description><![CDATA[转自:http://www.koven.org/archives/203.html
设置MySQL数据同步（单向&#038;双向）
一、准备服务器
由于MySQL不同版本之间的(二进制日志)binlog格式可能会不一样，因此最好的搭配组合是Master的MySQL版本和Slave的版本相同或者更低，Master的版本肯定不能高于Slave版本。
本文中，我们假设主服务器(以下简称Master)和从服务器(以下简称Slave)的版本都是5.0.27，操作系统是RedHat Linux 9。
假设同步Master的主机名为：A(IP:192.168.0.1)，Slave主机名为：B(IP:192.168.0.2)，2个MySQL的basedir目录都是/usr/local/mysql，datadir都是：/var/lib/mysql。
二、设置同步服务器
1、设置同步Master
修改 my.cnf 文件，在
# Replication Master Server (default)
# binary logging is required for replication
添加如下内容：
log-bin=/var/log/mysql/updatelog
server-id = 1
binlog-do-db=test
binlog-ignore-db=mysql
重启MySQL,创建一个MySQL帐号为同步专用
GRANT REPLICATION SLAVE,RELOAD,SUPER, ON *.* TO back@192.168.0.2 IDENTIFIED BY &#39;back&#39; ;
FLUSH PRIVILEGES ;
2、设置同步Slave
修改my.cnf文件，添加
server-id = 2
master-host = 192.168.0.1
master-user = back
master-password = back
master-port = 3306
replicate-ignore-db=mysql
replicate-do-db=test
重启MySQL
3、启动同步
在主服务器A MySQL命令符下：
show master status;
显示（当然这个是我机器的情况，你的不可能跟我一样哈，只是个例子）：
+------------------+----------+-------------------+------------------+
&#124; File &#124; Position &#124; Binlog_Do_DB &#124; Binlog_Ignore_DB &#124;
+------------------+----------+-------------------+------------------+
&#124; updatelog.000028 &#124; 313361 &#124; test [...]]]></description>
		<wfw:commentRss>http://blog.s777n.net/mysqlmasterslave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>更改服务器环境（mysql更改数据库路径，停用apache)</title>
		<link>http://blog.s777n.net/chgwebserver/</link>
		<comments>http://blog.s777n.net/chgwebserver/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 06:30:08 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[web服务器]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=265</guid>
		<description><![CDATA[更改已安装apache和mysql的服务器环境，变更为nginx
笔记：
1、更改已有mysql的数据库文件路径：
停止mysql服务
/usr/local/mysql/bin/mysqladmin -u root -p shutdown
拷贝或者转移数据库文件至你的新文件夹

cp -rpf /usr/local/mysql/var/* /data/mysql/
chown -R mysql:mysql /data/mysql

修改my.cnf
vi /etc/my.cnf
socket         = /data/mysql/mysql/mysql.sock 或 /tmp/mysql.sock(默认)
修改MySQL启动脚本
vi /etc/init.d/mysqld
修改datadir=/data/mysql
重启

/etc/init.d/mysqld restart
reboot

2、停用apache
查看运行的程序 ps -ef
停止apache

/usr/local/apache/bin/apachectl stop
或 service httpd stop

停用开机启动命令：chkconfig
或者修改 /etc/rc.d/rc.local
3、按照http://blog.s777n.net/centos5-nginx-php-mysql/ 来下载安装包进行安装(省略mysql的编译安装)。
查看用户 /etc/passwd
]]></description>
		<wfw:commentRss>http://blog.s777n.net/chgwebserver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>很忙很忙</title>
		<link>http://blog.s777n.net/mangmangmang/</link>
		<comments>http://blog.s777n.net/mangmangmang/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 00:58:25 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=263</guid>
		<description><![CDATA[瞎忙活
]]></description>
		<wfw:commentRss>http://blog.s777n.net/mangmangmang/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VMware Workstation 7 虚拟机安装MacOs雪豹snow leopard 10.6 笔记</title>
		<link>http://blog.s777n.net/vmware7-macos10/</link>
		<comments>http://blog.s777n.net/vmware7-macos10/#comments</comments>
		<pubDate>Sat, 11 Sep 2010 04:25:51 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[其他]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[MAC OS X Snow Leopard 10.6]]></category>
		<category><![CDATA[VMware Workstation 7.0]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=256</guid>
		<description><![CDATA[在win7 32位安装成功。
工具：
VMware Workstation 7.0
MAC OS X Snow Leopard 10.6
Darwin或Rebel EFI引导光盘ISO镜像文件
VMDRIVERS(虚拟机声卡显卡驱动)
安装：
1、确保你的cpu支持虚拟化技术，并且在BIOS中打开虚拟技术VT
2、安装VM，新建虚拟机。选择操作系统：Other->FreeBSD 64-bit，内存1G+，硬盘15G+。
3、创建完成后，在Hardware中，选择CD/DVD，点击Advanced，设置为SCSI，删除软驱，关闭VM，在你创建的虚拟机目录下找到.vmx的文件，记事本编辑，将guestOS = &#34;freebsd-64&#34; 修改为：guestOS = &#34;darwin10&#34; ，此步必须！！！否则将无法安装！
4、用光驱加载Rebel EFI引导系统，直到提示插入mac系统盘，再加载macos10，完成后不管提示失败成功，再将光驱再加载Darwin，关闭重启。
5、启动后，安装VMTOOLS（在Darwin中）
6、将VMDRIVERS解压，并把此文件夹设为虚拟机的共享文件夹（在虚拟机中Options设置Shard folders）。
7、去虚拟机中将驱动文件拷贝后，安装声卡（EnsoniqAudioPCI 2.mpkg）显卡(先加压vmsvga2.pkg.zip)驱动。
ok，完成
]]></description>
		<wfw:commentRss>http://blog.s777n.net/vmware7-macos10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>mysql中utf8编码的中文字段按拼音排序</title>
		<link>http://blog.s777n.net/orderbychinesefieldutf8/</link>
		<comments>http://blog.s777n.net/orderbychinesefieldutf8/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 09:36:30 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[数据库]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=254</guid>
		<description><![CDATA[如果在mysql中使用字符集为utf8，想要对中文字段用order by chinese_field 排序，那么出来的顺序并不是按照拼音排序的，不是我们想要的结果。
解决方法：
1、改变字符编码为gbk。  DD
2、不想改变编码的话，可以用如下方法：
对中文字段使用gbk编码排序：
SELECT * FROM table ORDER BY CONVERT( chinese_field USING gbk ) ;
当然这需要你安装mysql时安装了gbk字符集，不然会报错：#1115 - Unknown character set: &#39;gbk&#39;
]]></description>
		<wfw:commentRss>http://blog.s777n.net/orderbychinesefieldutf8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>打起精神乃～</title>
		<link>http://blog.s777n.net/gogogo/</link>
		<comments>http://blog.s777n.net/gogogo/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 04:51:48 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=252</guid>
		<description><![CDATA[    “你好，我是Bear Grylls，现在我将示范如何在穷山恶水中求生存，我将面临长达一周的挑战，如果缺乏正确求生技巧，你在这些地方将活不过一天……”。看完了《Man VS. Wild》荒野求生1-4季，被bear的超强的求生技能和顽强乐观的意志深深打动。
    当你迷失荒野，首先要克服孤独恐惧，然后评估环境和自身，寻找水源和食物，并学会制造火源、构建栖息的场所，辨明方向，最终回到文明社会。
    然而，迷失在文明社会，如何求生……
    一切都是建立在意志力之上！
    快，打起精神来～
]]></description>
		<wfw:commentRss>http://blog.s777n.net/gogogo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>我决定，不登船了，把机会留给你们</title>
		<link>http://blog.s777n.net/2012/</link>
		<comments>http://blog.s777n.net/2012/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 04:51:01 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=250</guid>
		<description><![CDATA[不用表扬我，也不要仰望我。对于只会编程和炒鸡蛋的我来说，末日之后没法养活自己。不如在最后时刻欣赏一下天地毁灭和你们厮杀上船的情景。想到这，我很欣慰，很期待。 
]]></description>
		<wfw:commentRss>http://blog.s777n.net/2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>contos配置使用rsync同步文件</title>
		<link>http://blog.s777n.net/contos-rsync/</link>
		<comments>http://blog.s777n.net/contos-rsync/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 09:14:08 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=239</guid>
		<description><![CDATA[在centos 5 下配置rsync笔记。
安装：
yum install -y rsync xinetd
查看安装：
rpm -ql rsync
修改：

vi /etc/xinetd.d/rsync
disable=no


重启xinetd 设置自动启动:

/etc/init.d/xinetd restart
chkconfig xinetd on

创建rsyncd.conf 输入内容：

pid file = /var/run/rsyncd.pid
# 监听端口
port = 873
# 所属用户和组
uid = root
gid = root
use chroot = yes
# 只读，禁止使用rsync上传
read only = yes
# 限制rsync的IP范围
hosts allow=x.x.x.x/255.255.255.0 x.x.x.x/255.255.255.0
hosts deny=*
# 客户端的最大连接数
max connections = 5
# 定义服务器的欢迎信息
motd file = /etc/rsyncd.motd
# 日志文件的位置和格式
log file = /var/log/rsyncd.log
log format = %t %a %m %f [...]]]></description>
		<wfw:commentRss>http://blog.s777n.net/contos-rsync/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>阿里巴巴的零知识证明</title>
		<link>http://blog.s777n.net/alibaba0/</link>
		<comments>http://blog.s777n.net/alibaba0/#comments</comments>
		<pubDate>Wed, 12 May 2010 01:43:56 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[网海拾贝]]></category>
		<category><![CDATA[哈米尔顿回路]]></category>
		<category><![CDATA[零知识证明]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=235</guid>
		<description><![CDATA[[转自:http://songshuhui.net/archives/36968.html 奥卡姆剃刀 发表于 2010-04-25 14:10]
战争中你被俘了，敌人拷问你情报。你是这么想的：如果我把情报都告诉他们，他们就会认为我没有价值了，就会杀了我省粮食，但如果我死活不说，他们也会认为我没有价值而杀了我。怎样才能做到既让他们确信我知道情报，但又一丁点情报也不泄露呢？
这的确是一个令人纠结的问题，但阿里巴巴想了一个好办法，当强盗向他拷问打开山洞石门的咒语时，他对强盗说：“你们离我一箭之地，用弓箭指着我，你们举起右手我就念咒语打开石门，举起左手我就念咒语关上石门，如果我做不到或逃跑，你们就用弓箭射死我。”
强盗们当然会同意，因为这个方案不仅对他们没有任何损失，而且还能帮助他们搞清楚阿里巴巴到底是否知道咒语这个问题。阿里巴巴也没损失，因为处于一箭之地的强盗听不到他念的咒语，不必担心泄露了秘密，而且他确信自己的咒语有效，也不会发生被射死的杯具。
强盗举起了右手，只见阿里巴巴的嘴动了几下，石门果真打开了，强盗举起了左手，阿里巴巴的嘴动了几下后石门又关上了。强盗还是有点不信，说不准这是巧合呢，他们不断地换着节奏举右手举左手，石门跟着他们的节奏开开关关，最后强盗们想，如果还认为这只是巧合，自己未免是个傻瓜，那还是相信了阿里巴巴吧。
“零知识证明”说的是示证者向验证者表明他知道某种秘密，不仅能使验证者完全确信他的确知道这个秘密，同时还保证一丁点秘密也不泄露给验证者。阿里巴巴的这个方案，就是认证理论“零知识证明”的一个重要协议。
除了被俘后如何靠情报保命这个问题，零知识证明在社会领域中还有着很多应用场合。例如你证明了一个世界级的数学难题，但在发表出来之前，总是要找个泰斗级的数学家审稿吧，于是你将证明过程发给了他，他看懂后却动了歪心思，他把你的稿子压住，把你的证明用自己的名义发表，他名利双收，你郁闷至死，你去告他也没用，因为学术界更相信的是这位泰斗，而不是你这个无名之辈。
这并不是天方夜谭，而是学术界常见的难题，前些年有个博士生告他的泰斗级导师剽窃他的成果，但除了令师生关系恶化外没有任何效果，最后他使出了撒手锏，称他在给导师审阅的论文的关键公式中，故意标错了一个下标，而这会导致整个推导失败。学术委员会一查果真如此，但还是有倾向于泰斗的声音，有人说那是泰斗的笔误，只不过让你发现了而矣，并不能证明那公式就是你推导出来的。
这个博士生故意标错下标，不能说他没有心眼，但他没有把“零知识证明”理论用好，以致于落到这种地步。“零知识证明”早在1986年就被A.Fiat和A.Shamir用数学的方法给出了解决方案，并在同年申请了美国专利，但由于该理论可能被用于军事领域，专利局被军方密令搁置，6个月后，军方命令：“该申请发表后会有害于国家安全……所有美国人的研究未经许可而泄露将会被判刑罚款”。看来军方认为作者肯定是美国人了，但作者实际上是在美国申请专利的以色列人，研究也是在以色列的大学里做的，军方这个命令摆了个大乌龙，虽然两天后撤消了，但已经成为了学术界的笑柄。
这个笑柄也说明了一个问题，即“零知识证明”非常重要。基于数学的推理虽然非常复杂，但思路却很简单，上述的阿里巴巴方案就是其中之一。其它的一些方案，也都是像这样遵循着分割和选择（Cut and Chose）协议的。
例如图论中有个哈米尔顿回路（Hamiltonian Cyclic）问题，说的是多个顶点的全连通图，若有一条通路通过了所有顶点，且每个顶点只通过一次，那这就是哈米尔顿回路。如果顶点较多的话，即使用计算机穷举计算很难找出这条回路，因为通路的可能性真在是太多了。
如果松鼠会贴了一张全连通图（命名为A图）悬赏哈米尔顿回路，而且任命我（奥卡姆剃刀）作为评审官，你幸运的找到了一条，那该怎么办呢，将结果直接发给我吗？千万不要，因为保不齐我会将你的成果让给了我的亲信。那你该怎么办呢？应该这么办：
1、你将A图的顶点搞乱了，并生成一张新图，只是顶点的位置变了，而新图顶点之间的连线关系与A图是完全一致的。这时，新图中每个顶点与A图中每个顶点的对应关系你是清楚的，而且新图中的哈米尔顿回路你也是知道的。
2、你将这张新图发给我，没错，就是仅仅一张新图，上面并没有画着你发现的牛B回路。
3、我收到后，对你提出两个问题中的一个：一是证明新图就是从A图变形过来的，所有顶点和连线的关系完全一致，二是画出新图中的哈米尔顿回路。
4、如果你真的找到了A图的哈米尔顿回路，这两个问题当然都能轻松回答。需要注意的是：你只需要回答第3步的其中一个问题，千万不要两个问题一并回答，否则我就知道你关于A图的哈米尔顿回路了，你就SB了。
5、我还是不相信你，因为有可能你只是将A图变了形，却根本不知道A图的哈米尔顿回路，而我在第3步时恰好要求你证明新图就是从A图变形过来的，你当然能证明。或者有可能你找了个你知道哈米尔顿回路的图，但这张图跟A图一点关系都没有，而我在第3步恰好要求你画出这张图的哈米尔顿回路。
6、我要求你从第1步开始重复这个验证过程，随着次数的增加，第5步那种巧合的可能性就越来越低，如果你多次能回答对第3步中的问题，那我还不相信你已经找到了A图的哈米尔顿回路，那我就是一个傻瓜。
7、为了表明我不是傻瓜，我在松鼠会群博里宣布你找到了A图的哈米尔顿回路，而这时我并没有看到你所画的A图的哈米尔顿回路。
回到你证明了世界级的数学难题的问题，你可以用这种分割和选择协议来进行零知识证明，来保护你的权利。你公开声称你解决了这个数学难题后，验证者会给你出一个其它的题，而能做出这道题的前提条件是已经解决了那个数学难题，否则的话无解，而且这个条件是学术界所公认的，这个题就是所谓的平行问题。不出所料，你靠着已经解开数学难题的基础把这个平行问题做出来了，但验证者还是不信，他又出了一道平行问题，你又做出来了，多次较量后，验证者就确信了你已经解决了那个数学难题，虽然他并没有看到具体的解法。
大家已经看出来了，零知识证明需要示证者和验证者的密切配合，但如果你只是一个数学界的无名之辈，即使你宣称你解决了数学难题，也不会有人跟你配合着玩零知识证明，那你该怎么办呢？
我告诉你一个可以在法庭上都能当作有效证据的招数，你将证明打印好，选择一个最可靠最权威的邮政公司，把它寄给自己，当你收到这个扣着邮戳的包裹后，不要打开，把它放好，然后就可以把证明寄给数学泰斗。如果他用自己的名义发表了，不必着急，等他依靠其影响力把这个证明炒热后再出手，你上法庭控告他，他当然不承认，在法庭上你将那个没开封的包裹拿出来，上面清清楚楚地盖着时间戳，这就证明了你包裹里的证明是发生在那个时间戳之前的，加上之后的你邮给泰斗论文的邮件存根，和泰斗以自己名义发表论文的时间，三者就构成了一个完整的证据链，泰斗灰头土脸名声扫地，而你大获全胜名利双收。
]]></description>
		<wfw:commentRss>http://blog.s777n.net/alibaba0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ECMS指定栏目指定时间点击排行 &amp;&amp; mysql时间函数</title>
		<link>http://blog.s777n.net/ecms-mysql-datatime/</link>
		<comments>http://blog.s777n.net/ecms-mysql-datatime/#comments</comments>
		<pubDate>Thu, 06 May 2010 05:48:32 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[其他]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[ecms]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=227</guid>
		<description><![CDATA[ecms下需要显示指定栏目30天以内的文章点击排行，查资料，最终实现：
[html][e:loop={'select * from [!db.pre!]ecms_news Where checked=1 AND newstime>=(UNIX_TIMESTAMP()-86400*30) AND classid in (103,55,56,34,35,91,92) ORDER BY onclick DESC, id DESC LIMIT 10&#8242;,10,24,0}]
]]></description>
		<wfw:commentRss>http://blog.s777n.net/ecms-mysql-datatime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql建库建表编码不一致的问题，以及相关数据库操作</title>
		<link>http://blog.s777n.net/mysql-operations/</link>
		<comments>http://blog.s777n.net/mysql-operations/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 08:44:29 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[数据库]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=223</guid>
		<description><![CDATA[新建了一个库，默认编码。
再导入utf8编码的表和数据。
读取乱码，查了半天，修改php页面，改sql文件的编码，还是解决不了，最后竟然是建库的时候没有设置utf8的编码。记录之
建库:
CREATE DATABASE IF NOT EXISTS mydbname default charset utf8 COLLATE utf8_general_ci;
另记录相关数据库操作：
导入sql文件
mysql -h localhost -u root -p mydbname < data.sql;
导出sql
mysqldump -h localhost -u root -p --default-character-set=utf8 mydbname > data.sql;
建表:
DROP TABLE IF EXISTS `mytablename`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `mytablename` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `int10` int(10) [...]]]></description>
		<wfw:commentRss>http://blog.s777n.net/mysql-operations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux开启FMS服务器的debug功能</title>
		<link>http://blog.s777n.net/fms-debug/</link>
		<comments>http://blog.s777n.net/fms-debug/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 10:11:15 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[其他]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[FlashMediaServer]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=217</guid>
		<description><![CDATA[开启FMS服务器的debug功能：
fms的程序调试是很头疼的事情，开启debug之后，就可以在日志中查到你trace的信息。
编辑 fms安装目录/conf/_defaultRoot_/_defaultVHost_/Application.xml
[xml]
        
                
                
              [...]]]></description>
		<wfw:commentRss>http://blog.s777n.net/fms-debug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>全站页面变灰，对青海玉树地震遇难同胞深切哀悼！</title>
		<link>http://blog.s777n.net/421condolences/</link>
		<comments>http://blog.s777n.net/421condolences/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 14:04:00 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=201</guid>
		<description><![CDATA[新华网北京4月20日电 国务院决定，为表达全国各族人民对青海玉树地震遇难同胞的深切哀悼，2010年4月21日举行全国哀悼活动，全国和驻外使领馆下半旗志哀，停止公共娱乐活动。
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;玉树大地震给玉树人民带来灾难，举国悲痛，在此谨以个人之哀思，沉痛悼念遇难同胞，同时为生者祈福…… ——TomorrowMan

&#160;
&#160;
&#160;
&#160;
&#160;
&#160;
&#160;
&#160;
&#160;
&#160;
&#160;
&#160;
&#160;
&#160;
&#160;
&#160;
&#160;
&#160;
&#160;
css页面变灰：
[html]
html {filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); }
[/html]
使用nginx使所有网站变灰色：
1、重新编译Nginx，增加http_sub_module模块：
wget http://nginx.org/download/nginx-0.8.35.tar.gz
tar zxvf nginx-0.8.35.tar.gz
cd nginx-0.8.35
./configure --user=www --group=www --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module
make &#038;&#038; make install
pkill -9 nginx
/usr/local/webserver/nginx/sbin/nginx
2、在nginx.conf配置文件的http {...}大括号内增加以下两行：
[html]sub_filter  &#39;&#39;  &#39;
html {filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); }
&#39;;
sub_filter_once on;[/html]
保存重启：

/usr/local/webserver/nginx/sbin/nginx -s reload
3、解决含有Flash的页面仍显示彩色或变花, 将Flash改为JS输出：
[javascript]

 


[/javascript]
内容转自http://blog.s135.com/post/441/
]]></description>
		<wfw:commentRss>http://blog.s777n.net/421condolences/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>centos5.3 安装 FlashMediaServer3.5 笔记</title>
		<link>http://blog.s777n.net/centos5-flashmediaserver3/</link>
		<comments>http://blog.s777n.net/centos5-flashmediaserver3/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 06:06:48 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[其他]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[Centos5]]></category>
		<category><![CDATA[FlashMediaServer]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=198</guid>
		<description><![CDATA[fms3.5 在centos5.3上安装成功，记录以下过程。
下载安装包，从adobe官网下载的最新版本的开发版，注册个帐号即可。
上传到服务器，解压安装：
tar -xzf FlashMediaServer3_5.tar.gz
cd FMS_3_5_1_r516
./installFMS -platformWarnOnly
注：-platformWarnOnly 忽略操作系统平台。
根据提示输入回车，阅读安装协议，Ctrl+C跳过。
输入 y 开始安装.
输入注册码.1373-5047-2985-0514-5175-0098
回车.
Default [/opt/adobe/fms]:
输入你的安装地址，或者输入默认的/opt/adobe/fms
Default [1935,80]:
FMS服务器监听端口:如果已经有服务占用80端口.只输入1935.否则冲突fms启动不了.
Default [1111]:
远程管理的端口 输入默认1111即可.
Please enter the administrative username:
设置你的管理员帐号和密码:
Default user [nobody]:
运行FMS的用户.输入默认nobody即可.
Do you want to install apache? (y/n)     Default [y]:
是否apache.不安装输入n.
Do you want the Adobe Flash Media Server service to run as a
daemon? (y/n) Default [y]:
以守护进程运行 y 
Do you want to start the Adobe Flash [...]]]></description>
		<wfw:commentRss>http://blog.s777n.net/centos5-flashmediaserver3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>如何买卖美国上市的公司股票?</title>
		<link>http://blog.s777n.net/domestic-trade-nasdaq/</link>
		<comments>http://blog.s777n.net/domestic-trade-nasdaq/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 15:29:55 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[网海拾贝]]></category>
		<category><![CDATA[NASDAQ]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=187</guid>
		<description><![CDATA[美股开户网（有中文界面） http://www.firstrade.com/
港股开户 海通证券-大福证券
转一个如何在国内买卖美国上市的公司股票的文章，美国最近发狠了，改天赶紧开一个账户去。
[日期：2007-01-21] 来源：法制日报
一、交易流程简述 
    公司完成反向并购后，经公司核对确认，境内股东即可换领美国上市公司股票；公司确定合适的美国交易商后，持股人根据交易商要求提供身份证明（护照或身份证等）和收入证明（银行月结账单、水电瓦斯账单等），并填写相关开户表格，完成证券交易账户的开设；交易限制取消后，若卖出股票则需在所持股票背面签名（此签名必须本人亲笔书写，且与正面内容相符），再以 航空快递 方式寄至交易商处，存入交易账户；在开市时间内向交易商下达交易指令；成交后，交易商将资金电汇至股东指定银行账户，同时扣除相应佣金和费用。
二、如何在美国开设证券交易账户
    （一）开户基本保障及条件：
    1、开户年龄需满 18 岁
    2、没有最低开户金额限制
    3、美国以外的人买卖价差不课税（即免征所得税）
    4、有资产保障；每个证券账户至少有 2500 万美元以上的保障，分别为美国证券投资人保护协会（ SIPC ）所提供的 50 万美元基本保险及其他保险公司所承包的保障。
    5、不需额外开立美金银行账户及证券集保账户，该账户兼具证券户、集保户及银行功能。
一般来说，投资人只要拥有国内商业银行外币 ( 美金 ) 或其账户及具备开户的基本条件，只要在美国券商 [ 中文网络 ] 下载开户表格，填具以下四项标件后，邮寄至美国券商处即完成开户手续。
    ? [...]]]></description>
		<wfw:commentRss>http://blog.s777n.net/domestic-trade-nasdaq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>contos5.3 svn独立服务端(不使用apche,不编译berkeley-db)安装笔记</title>
		<link>http://blog.s777n.net/contos-svn/</link>
		<comments>http://blog.s777n.net/contos-svn/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 04:30:47 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=174</guid>
		<description><![CDATA[1.从http://subversion.tigris.org/downloads/获取subversion安装文件subversion-1.6.9.tar.gz subversion-deps-1.6.9.tar.gz
cd /data0/software
wget &#34;http://subversion.tigris.org/downloads/subversion-1.6.9.tar.gz&#34;
wget &#34;http://subversion.tigris.org/downloads/subversion-deps-1.6.9.tar.gz&#34;
2.解压

tar xfvz subversion-1.6.9.tar.gz
tar xfvz subversion-deps-1.6.9.tar.gz
cd subversion-1.6.9
3.编译安装
(以svnserve方式运行，不加apache编译参数。以fsfs格式存储版本库，不编译berkeley-db)
./configure --prefix=/usr/local/svn --without-berkeley-db
make &#038;&#038; make install
3.测试安装
/usr/local/svn/bin/svnserve --version
4.建立svn版本库：
mkdir -p /usr/local/svn/data
/usr/local/svn/bin/svnadmin create /usr/local/svn/data
5.修改svn版本库配置文件版本库：
# vi /usr/local/svn/data/conf/svnserve.conf
内容修改为:
[general]
anon-access = none
auth-access = write
password-db = /usr/local/svn/data/conf/passwd
authz-db = /usr/local/svn/data/conf/authz
realm = repos
6.加用户
vi /usr/local/svn/data/conf/passwk
admin = 123
7.配置svn用户访问权限：
vi /usr/local/svn/data/conf/authz.conf
建立启动svn的用户
useradd svn
passwd svn
chown -R svn:svn /usr/local/svn/data
8.启动svn(加入开机启动vi /etc/rc.local)
su - svn -c &#34;/usr/local/svn/bin/svnserve -d --listen-port 9999 -r /usr/local/svn/data&#34;
9.测试
telnet your-svn-ip 9999 
若不通设置iptables：
vi /etc/sysconfig/iptables
-A [...]]]></description>
		<wfw:commentRss>http://blog.s777n.net/contos-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>服务器配置(svn+nginx+ROR+php...) &amp;&amp; svn独立服务器配置</title>
		<link>http://blog.s777n.net/svn-ror-codeigniter/</link>
		<comments>http://blog.s777n.net/svn-ror-codeigniter/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 02:01:34 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[网海拾贝]]></category>
		<category><![CDATA[ROR]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=165</guid>
		<description><![CDATA[本文转载两篇关于svn的安装记录
服务器配置（svn + mysql + nginx + ROR + php + php-fpm + CodeIgniter） 转自http://hi.baidu.com/ninanlin
一 、 安装centos 5.3(需要添加gcc的支持，注意不要打开selinux, 太烦人的东西)
二 、 配置yum(需要root权限)
修改/etc/yum.repos.d/CentOS-Base.repo，将镜象站点地址改为在中国的镜象站点地址(cn99速度还不错)。步骤如下：
cd /etc/yum.repos.d/
cp CentOS-Base.repo CentOS-Base.repo.bak
vi CentOS-Base.repo
内容如下:
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror [...]]]></description>
		<wfw:commentRss>http://blog.s777n.net/svn-ror-codeigniter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php使用mcrypt进行des加密，和java或c#保持结果一致。</title>
		<link>http://blog.s777n.net/php-mcrypt_cbc/</link>
		<comments>http://blog.s777n.net/php-mcrypt_cbc/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 06:12:44 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[mcrypt_cbc]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=132</guid>
		<description><![CDATA[项目中用到php进行des加密，和java系统进行通讯，结果加密出来的结果不一致。在网上搜寻未果，找到一个aes的加密，大同小异，参考php文档，修改后如下，已进行测试。
和java主要差异在于补位。
[php]

[/php]
测试：
[php]
$str = &#39;12345678&#8242;;
$key = &#39;1234abcd&#39;;
$crypt = new DES($key);
$mstr = $crypt->encrypt($str);
$str = $crypt->decrypt($mstr);
echo  $str.&#39;  &#39;.$mstr;
[/php]
]]></description>
		<wfw:commentRss>http://blog.s777n.net/php-mcrypt_cbc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Windows压缩tar.gz格式</title>
		<link>http://blog.s777n.net/windows_tar-gz/</link>
		<comments>http://blog.s777n.net/windows_tar-gz/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 13:13:28 +0000</pubDate>
		<dc:creator>TomorrowMan</dc:creator>
				<category><![CDATA[Windows相关]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[7-zip]]></category>

		<guid isPermaLink="false">http://blog.s777n.net/?p=130</guid>
		<description><![CDATA[windows常用rar，linux用gz，总是很麻烦。
介绍一下在windows下使用7-zip压缩tar.gz。
1.打包成tar格式
在要打包的文件上右键 -> &#34;添加到压缩档案&#34;  -> &#34;压缩格式&#34; -> Tar
2.继续制作tar.gz
在第1步的tar文件上右键 -> &#34;添加到压缩档案&#34;  -> &#34;压缩格式&#34; -> GZip
ok，压缩出来的就是tar.gz
]]></description>
		<wfw:commentRss>http://blog.s777n.net/windows_tar-gz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

