﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>IT博客-duckuu</title><link>http://www.cnitblog.com/duckuu/</link><description>    
    duckuu的学习空间</description><language>zh-cn</language><lastBuildDate>Wed, 29 Apr 2026 05:58:31 GMT</lastBuildDate><pubDate>Wed, 29 Apr 2026 05:58:31 GMT</pubDate><ttl>60</ttl><item><title>精妙SQL语句整理</title><link>http://www.cnitblog.com/duckuu/archive/2006/12/18/20725.html</link><dc:creator>duckuu的学习空间</dc:creator><author>duckuu的学习空间</author><pubDate>Mon, 18 Dec 2006 02:44:00 GMT</pubDate><guid>http://www.cnitblog.com/duckuu/archive/2006/12/18/20725.html</guid><wfw:comment>http://www.cnitblog.com/duckuu/comments/20725.html</wfw:comment><comments>http://www.cnitblog.com/duckuu/archive/2006/12/18/20725.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/duckuu/comments/commentRss/20725.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/duckuu/services/trackbacks/20725.html</trackback:ping><description><![CDATA[
		<table border="0" cellpadding="2" cellspacing="2" width="605">
				<tbody>
						<tr align="center">
								<td height="30">精妙SQL语句整理</td>
						</tr>
						<tr align="center">
								<td height="30">来源：http://www.dwww.cn/new/200610171741543002.html <br /></td>
						</tr>
						<tr>
								<td style="" valign="top">
										<div class="content">
												<p>一、基础 <br /><br />1、说明：创建数据库 <br />CREATE DATABASE database-name <br />2、说明：删除数据库 <br />drop database dbname <br />3、说明：备份sql server <br />--- 创建 备份数据的 device <br />USE master <br />EXEC sp_addumpdevice 'disk', 'testBack', 'c:mssql7backupMyNwind_1.dat' <br />--- 开始 备份 <br />BACKUP DATABASE pubs TO testBack <br />4、说明：创建新表 <br />create table tabname(col1 type1 [not null] [primary key],col2 type2 [not null],..) <br />根据已有的表创建新表： <br />A：create table tab_new like tab_old (使用旧表创建新表) <br />B：create table tab_new as select col1,col2… from tab_old definition only <br />5、说明：删除新表 <br />drop table tabname <br />6、说明：增加一个列 <br />Alter table tabname add column col type <br />注：列增加后将不能删除。DB2中列加上后数据类型也不能改变，唯一能改变的是增加varchar类型的长度。 <br />7、说明：添加主键： Alter table tabname add primary key(col) <br />说明：删除主键： Alter table tabname drop primary key(col) <br />8、说明：创建索引：create [unique] index idxname on tabname(col….) <br />删除索引：drop index idxname <br />注：索引是不可更改的，想更改必须删除重新建。 <br />9、说明：创建视图：create view viewname as select statement <br />删除视图：drop view viewname <br />10、说明：几个简单的基本的sql语句 <br />选择：select * from table1 where 范围 <br />插入：insert into table1(field1,field2) values(value1,value2) <br />删除：delete from table1 where 范围 <br />更新：update table1 set field1=value1 where 范围 <br />查找：select * from table1 where field1 like ’%value1%’ ---like的语法很精妙，查资料! <br />排序：select * from table1 order by field1,field2 [desc] <br />总数：select count as totalcount from table1 <br />求和：select sum(field1) as sumvalue from table1 <br />平均：select avg(field1) as avgvalue from table1 <br />最大：select max(field1) as maxvalue from table1 <br />最小：select min(field1) as minvalue from table1 <br />11、说明：几个高级查询运算词 <br />A： UNION 运算符 <br />UNION
运算符通过组合其他两个结果表（例如 TABLE1 和 TABLE2）并消去表中任何重复行而派生出一个结果表。当 ALL 随 UNION
一起使用时（即 UNION ALL），不消除重复行。两种情况下，派生表的每一行不是来自 TABLE1 就是来自 TABLE2。 <br />B： EXCEPT 运算符 <br />EXCEPT 运算符通过包括所有在 TABLE1 中但不在 TABLE2 中的行并消除所有重复行而派生出一个结果表。当 ALL 随 EXCEPT 一起使用时 (EXCEPT ALL)，不消除重复行。 <br />C： INTERSECT 运算符 <br />INTERSECT 运算符通过只包括 TABLE1 和 TABLE2 中都有的行并消除所有重复行而派生出一个结果表。当 ALL 随 INTERSECT 一起使用时 (INTERSECT ALL)，不消除重复行。 <br />注：使用运算词的几个查询结果行必须是一致的。 <br />12、说明：使用外连接 <br />A、left outer join： <br />左外连接（左连接）：结果集几包括连接表的匹配行，也包括左连接表的所有行。 <br />SQL: select a.a, a.b, a.c, b.c, b.d, b.f from a LEFT OUT JOIN b ON a.a = b.c <br />B：right outer join: <br />右外连接(右连接)：结果集既包括连接表的匹配连接行，也包括右连接表的所有行。 <br />C：full outer join： <br />全外连接：不仅包括符号连接表的匹配行，还包括两个连接表中的所有记录。 <br /><br />二、提升 <br /><br />1、说明：复制表(只复制结构,源表名：a 新表名：b) (Access可用) <br />法一：select * into b from a where 1&lt;&gt;1 <br />法二：select top 0 * into b from a <br /><br />2、说明：拷贝表(拷贝数据,源表名：a 目标表名：b) (Access可用) <br />insert into b(a, b, c) select d,e,f from b; <br /><br />3、说明：跨数据库之间表的拷贝(具体数据使用绝对路径) (Access可用) <br />insert into b(a, b, c) select d,e,f from b in ‘具体数据库’ where 条件 <br />例子：..from b in '"&amp;Server.MapPath(".")&amp;"data.mdb" &amp;"' where.. <br /><br />4、说明：子查询(表名1：a 表名2：b) <br />select a,b,c from a where a IN (select d from b ) 或者: select a,b,c from a where a IN (1,2,3) <br /><br />5、说明：显示文章、提交人和最后回复时间 <br />select a.title,a.username,b.adddate from table a,(select max(adddate) adddate from table where table.title=a.title) b <br /><br />6、说明：外连接查询(表名1：a 表名2：b) <br />select a.a, a.b, a.c, b.c, b.d, b.f from a LEFT OUT JOIN b ON a.a = b.c <br /><br />7、说明：在线视图查询(表名1：a ) <br />select * from (SELECT a,b,c FROM a) T where t.a &gt; 1; <br /><br />8、说明：between的用法,between限制查询数据范围时包括了边界值,not between不包括 <br />select * from table1 where time between time1 and time2 <br />select a,b,c, from table1 where a not between 数值1 and 数值2 <br /><br />9、说明：in 的使用方法 <br />select * from table1 where a [not] in (‘值1’,’值2’,’值4’,’值6’) <br /><br />10、说明：两张关联表，删除主表中已经在副表中没有的信息 <br />delete from table1 where not exists ( select * from table2 where table1.field1=table2.field1 ) <br /><br />11、说明：四表联查问题： <br />select * from a left inner join b on a.a=b.b right inner join c on a.a=c.c inner join d on a.a=d.d where ..... <br /><br />12、说明：日程安排提前五分钟提醒 <br />SQL: select * from 日程安排 where datediff('minute',f开始时间,getdate())&gt;5 <br /><br />13、说明：一条sql 语句搞定数据库分页 <br />select top 10 b.* from (select top 20 主键字段,排序字段 from 表名 order by 排序字段 desc) a,表名 b where b.主键字段 = a.主键字段 order by a.排序字段 <br /><br />14、说明：前10条记录 <br />select top 10 * form table1 where 范围 <br /><br />15、说明：选择在每一组b值相同的数据中对应的a最大的记录的所有信息(类似这样的用法可以用于论坛每月排行榜,每月热销产品分析,按科目成绩排名,等等.) <br />select a,b,c from tablename ta where a=(select max(a) from tablename tb where tb.b=ta.b) <br /><br />16、说明：包括所有在 TableA 中但不在 TableB和TableC 中的行并消除所有重复行而派生出一个结果表 <br />(select a from tableA ) except (select a from tableB) except (select a from tableC) <br /><br />17、说明：随机取出10条数据 <br />select top 10 * from tablename order by newid() <br /><br />18、说明：随机选择记录 <br />select newid() <br /><br />19、说明：删除重复记录 <br />Delete from tablename where id not in (select max(id) from tablename group by col1,col2,...) <br /><br />20、说明：列出数据库里所有的表名 <br />select name from sysobjects where type='U' <br /><br />21、说明：列出表里的所有的 <br />select name from syscolumns where id=object_id('TableName') <br /><br />22、说明：列示type、vender、pcs字段，以type字段排列，case可以方便地实现多重选择，类似select 中的case。 <br />select
type,sum(case vender when 'A' then pcs else 0 end),sum(case vender when
'C' then pcs else 0 end),sum(case vender when 'B' then pcs else 0 end)
FROM tablename group by type <br />显示结果： <br />type vender pcs <br />电脑 A 1 <br />电脑 A 1 <br />光盘 B 2 <br />光盘 A 2 <br />手机 B 3 <br />手机 C 3 <br /><br />23、说明：初始化表table1 <br /><br />TRUNCATE TABLE table1 <br /><br />24、说明：选择从10到15的记录 <br />select top 5 * from (select top 15 * from table order by id asc) table_别名 order by id desc <br /><br />三、技巧 <br /><br />1、1=1，1=2的使用，在SQL语句组合时用的较多 <br /><br />“where 1=1” 是表示选择全部 “where 1=2”全部不选， <br />如： <br />if @strWhere !='' <br />begin <br />set @strSQL = 'select count(*) as Total from [' + @tblName + '] where ' + @strWhere <br />end <br />else <br />begin <br />set @strSQL = 'select count(*) as Total from [' + @tblName + ']' <br />end <br /><br />我们可以直接写成 <br />set @strSQL = 'select count(*) as Total from [' + @tblName + '] where 1=1 安定 '+ @strWhere <br /><br />2、收缩数据库 <br />--重建索引 <br />DBCC REINDEX <br />DBCC INDEXDEFRAG <br />--收缩数据和日志 <br />DBCC SHRINKDB <br />DBCC SHRINKFILE <br /><br />3、压缩数据库 <br />dbcc shrinkdatabase(dbname) <br /><br />4、转移数据库给新用户以已存在用户权限 <br />exec sp_change_users_login 'update_one','newname','oldname' <br />go <br /><br />5、检查备份集 <br />RESTORE VERIFYONLY from disk='E:dvbbs.bak' <br /><br />6、修复数据库 <br />ALTER DATABASE [dvbbs] SET SINGLE_USER <br />GO <br />DBCC CHECKDB('dvbbs',repair_allow_data_loss) WITH TABLOCK <br />GO <br />ALTER DATABASE [dvbbs] SET MULTI_USER <br />GO <br /><br />7、日志清除 <br />SET NOCOUNT ON <br />DECLARE @LogicalFileName sysname, <br />@MaxMinutes INT, <br />@NewSize INT <br /><br /><br />USE tablename -- 要操作的数据库名 <br />SELECT @LogicalFileName = 'tablename_log', -- 日志文件名 <br />@MaxMinutes = 10, -- Limit on time allowed to wrap log. <br />@NewSize = 1 -- 你想设定的日志文件的大小(M) <br /><br />-- Setup / initialize <br />DECLARE @OriginalSize int <br />SELECT @OriginalSize = size <br />FROM sysfiles <br />WHERE name = @LogicalFileName <br />SELECT 'Original Size of ' + db_name() + ' LOG is ' + <br />CONVERT(VARCHAR(30),@OriginalSize) + ' 8K pages or ' + <br />CONVERT(VARCHAR(30),(@OriginalSize*8/1024)) + 'MB' <br />FROM sysfiles <br />WHERE name = @LogicalFileName <br />CREATE TABLE DummyTrans <br />(DummyColumn char (8000) not null) <br /><br /><br />DECLARE @Counter INT, <br />@StartTime DATETIME, <br />@TruncLog VARCHAR(255) <br />SELECT @StartTime = GETDATE(), <br />@TruncLog = 'BACKUP LOG ' + db_name() + ' WITH TRUNCATE_ONLY' <br /><br />DBCC SHRINKFILE (@LogicalFileName, @NewSize) <br />EXEC (@TruncLog) <br />-- Wrap the log if necessary. <br />WHILE @MaxMinutes &gt; DATEDIFF (mi, @StartTime, GETDATE()) -- time has not expired <br />AND @OriginalSize = (SELECT size FROM sysfiles WHERE name = @LogicalFileName) <br />AND (@OriginalSize * 8 /1024) &gt; @NewSize <br />BEGIN -- Outer loop. <br />SELECT @Counter = 0 <br />WHILE ((@Counter &lt; @OriginalSize / 16) AND (@Counter &lt; 50000)) <br />BEGIN -- update <br />INSERT DummyTrans VALUES ('Fill Log') <br />DELETE DummyTrans <br />SELECT @Counter = @Counter + 1 <br />END <br />EXEC (@TruncLog) <br />END <br />SELECT 'Final Size of ' + db_name() + ' LOG is ' + <br />CONVERT(VARCHAR(30),size) + ' 8K pages or ' + <br />CONVERT(VARCHAR(30),(size*8/1024)) + 'MB' <br />FROM sysfiles <br />WHERE name = @LogicalFileName <br />DROP TABLE DummyTrans <br />SET NOCOUNT OFF <br /><br />8、说明：更改某个表 <br />exec sp_changeobjectowner 'tablename','dbo' <br /><br />9、存储更改全部表 <br /><br />CREATE PROCEDURE dbo.User_ChangeObjectOwnerBatch <br />@OldOwner as NVARCHAR(128), <br />@NewOwner as NVARCHAR(128) <br />AS <br /><br />DECLARE @Name as NVARCHAR(128) <br />DECLARE @Owner as NVARCHAR(128) <br />DECLARE @OwnerName as NVARCHAR(128) <br /><br />DECLARE curObject CURSOR FOR <br />select 'Name' = name, <br />'Owner' = user_name(uid) <br />from sysobjects <br />where user_name(uid)=@OldOwner <br />order by name <br /><br />OPEN curObject <br />FETCH NEXT FROM curObject INTO @Name, @Owner <br />WHILE(@@FETCH_STATUS=0) <br />BEGIN <br />if @Owner=@OldOwner <br />begin <br />set @OwnerName = @OldOwner + '.' + rtrim(@Name) <br />exec sp_changeobjectowner @OwnerName, @NewOwner <br />end <br />-- select @name,@NewOwner,@OldOwner <br /><br />FETCH NEXT FROM curObject INTO @Name, @Owner <br />END <br /><br />close curObject <br />deallocate curObject <br />GO <br /><br /><br />10、SQL SERVER中直接循环写入数据 <br />declare @i int <br />set @i=1 <br />while @i&lt;30 <br />begin <br />insert into test (userid) values(@i) <br />set @i=@i+1 <br />end <br /><br />小记存储过程中经常用到的本周，本月，本年函数 <br />Dateadd(wk,datediff(wk,0,getdate()),-1) <br />Dateadd(wk,datediff(wk,0,getdate()),6) <br /><br />Dateadd(mm,datediff(mm,0,getdate()),0) <br />Dateadd(ms,-3,dateadd(mm,datediff(m,0,getdate())+1,0)) <br /><br />Dateadd(yy,datediff(yy,0,getdate()),0) <br />Dateadd(ms,-3,DATEADD(yy, DATEDIFF(yy,0,getdate())+1, 0)) <br /><br />上面的SQL代码只是一个时间段 <br />Dateadd(wk,datediff(wk,0,getdate()),-1) <br />Dateadd(wk,datediff(wk,0,getdate()),6) <br />就是表示本周时间段. <br />下面的SQL的条件部分,就是查询时间段在本周范围内的: <br />Where Time BETWEEN Dateadd(wk,datediff(wk,0,getdate()),-1) AND Dateadd(wk,datediff(wk,0,getdate()),6) <br />而在存储过程中 <br />select @begintime = Dateadd(wk,datediff(wk,0,getdate()),-1) <br />select @endtime = Dateadd(wk,datediff(wk,0,getdate()),6) </p>
												<p>最后，再补充一些：</p>
												<p>分组group</p>
												<p>　　常用于统计时，如分组查总数：<br />select gender,count(sno) <br />from students<br />group by gender<br />(查看男女学生各有多少)</p>
												<p>　　注意：从哪种角度分组就从哪列"group by"</p>
												<p>　　对于多重分组，只需将分组规则罗列。比如查询各届各专业的男女同学人数 ，那么分组规则有：届别(grade)、专业(mno)和性别(gender)，所以有"group by grade, mno, gender"</p>
												<p>select grade, mno, gender, count(*)<br />from students<br />group by grade, mno, gender</p>
												<p>　　通常group还和having联用，比如查询1门课以上不及格的学生，则按学号(sno)分类有：</p>
												<p>select sno,count(*) from grades <br />where mark&lt;60<br />group by sno<br />having count(*)&gt;1 </p>
												<p>　　6.UNION联合</p>
												<p>　　合并查询结果，如：</p>
												<p>SELECT * FROM students<br />WHERE name like ‘张%’<br />UNION [ALL]<br />SELECT * FROM students<br />WHERE name like ‘李%’</p>
												<p>　　7.多表查询</p>
												<p>　　a.内连接</p>
												<p>select g.sno,s.name,c.coursename <br />from grades g JOIN students s ON g.sno=s.sno<br />JOIN courses c ON g.cno=c.cno<br />(注意可以引用别名)<br />b.外连接<br />b1.左连接<br />select courses.cno,max(coursename),count(sno) <br />from courses LEFT JOIN grades ON courses.cno=grades.cno <br />group by courses.cno</p>
												<p>　　左连接特点：显示全部左边表中的所有项目，即使其中有些项中的数据未填写完全。</p>
												<p>　　左外连接返回那些存在于左表而右表中却没有的行，再加上内连接的行。</p>
												<p>　　b2.右连接</p>
												<p>　　与左连接类似</p>
												<p>　　b3.全连接</p>
												<p>select sno,name,major <br />from students FULL JOIN majors ON students.mno=majors.mno</p>
												<p>　　两边表中的内容全部显示</p>
												<p>　　c.自身连接</p>
												<p>select c1.cno,c1.coursename,c1.pno,c2.coursename <br />from courses c1,courses c2 where c1.pno=c2.cno</p>
												<p>　　采用别名解决问题。</p>
												<p>　　d.交叉连接</p>
												<p>select lastname+firstname from lastname CROSS JOIN firstanme</p>
												<p>　　相当于做笛卡儿积</p>
										</div>
								</td>
						</tr>
				</tbody>
		</table>
<img src ="http://www.cnitblog.com/duckuu/aggbug/20725.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/duckuu/" target="_blank">duckuu的学习空间</a> 2006-12-18 10:44 <a href="http://www.cnitblog.com/duckuu/archive/2006/12/18/20725.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>配置debian</title><link>http://www.cnitblog.com/duckuu/archive/2006/12/11/20360.html</link><dc:creator>duckuu的学习空间</dc:creator><author>duckuu的学习空间</author><pubDate>Mon, 11 Dec 2006 08:41:00 GMT</pubDate><guid>http://www.cnitblog.com/duckuu/archive/2006/12/11/20360.html</guid><wfw:comment>http://www.cnitblog.com/duckuu/comments/20360.html</wfw:comment><comments>http://www.cnitblog.com/duckuu/archive/2006/12/11/20360.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/duckuu/comments/commentRss/20360.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/duckuu/services/trackbacks/20360.html</trackback:ping><description><![CDATA[好麻烦, 安装完了先设置ip: /etc/network/interface, 设置静态ip:<br /><br /># 启动系统激活设备.<br /># Loop回环地址.<br />auto lo<br />iface lo inet loopback<br /><br /># 启动系统激活设备.<br /># 网卡eth0设置为Static类型.<br />auto eth0<br />iface eth0 inet static<br /><br /># 指定IP地址.子网掩码.广播.网关.<br />address 192.168.0.1<br />netmask 255.255.255.0<br />network 192.168.0.0<br />broadcast 192.168.0.255<br />gateway 192.168.0.1<br /><br />完了以后可以执行/etc/init.d/下的networking restart重新启动服务, 或者ifconfig eth0 down/up来搞. <br />DNS服务器: etc/resolv.conf<br />再配置source.list, 在/etc/apt/下面. <br /><br />设置中文环境可以用命令: dpkg-reconfigure locales, 选择中文GB2312, 其实选en:U也挺好的. <br /><br />常用apt命令: <br />apt-setup 设置Apt源.可选择列表或者手工导入<br />apt-get update 系统软件包更新<br />apt-get upgrade 更新所有软件包并且自动升级成最新<br />apt-get dist-upgrade 更新软件包并解决软件依赖关系<br />apt-cache search keyword 查找指定软件包信息<br />apt-cache show package_name 详细显示指定软件包的信息<br />apt-get install 安装指定软件包<br />apt-get remove 移除指定软件包<br /><br /><br /><img src ="http://www.cnitblog.com/duckuu/aggbug/20360.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/duckuu/" target="_blank">duckuu的学习空间</a> 2006-12-11 16:41 <a href="http://www.cnitblog.com/duckuu/archive/2006/12/11/20360.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Mootools中文文档</title><link>http://www.cnitblog.com/duckuu/archive/2006/12/05/20086.html</link><dc:creator>duckuu的学习空间</dc:creator><author>duckuu的学习空间</author><pubDate>Tue, 05 Dec 2006 03:23:00 GMT</pubDate><guid>http://www.cnitblog.com/duckuu/archive/2006/12/05/20086.html</guid><wfw:comment>http://www.cnitblog.com/duckuu/comments/20086.html</wfw:comment><comments>http://www.cnitblog.com/duckuu/archive/2006/12/05/20086.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cnitblog.com/duckuu/comments/commentRss/20086.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/duckuu/services/trackbacks/20086.html</trackback:ping><description><![CDATA[

		<a target="" class="" title="" href="www.mootools.net">
				<img src="http://www.mootools.net/images/logo.png">
		</a>
		<br>&nbsp;&nbsp; 相信很多人知道prototype, 相对于<a href="http://prototype.conio.net/">prototype</a>, <a target="_blank" class="" title="mootools" href="http://www.mootools.net">mootools</a>更为轻便, 提供了可以选择的src <a href="http://mootools.net/download/release">download</a>, 而且集成了很多用prototype+scriptaculous实现的特效. 关于mootools的介绍, 有一段英文写的不错: <br><font face="Verdana">&nbsp;&nbsp;&nbsp; mootools is a very compact, modular, Object-Oriented javascript
framework. Its unique design makes it extremely crossbrowser, easy to
use, and a snap to extend with your own code. It comes with a choice of
more than fifteen scripts, plugins and addons, including Effects
(moo.fx) Ajax (moo.ajax), Dom Navigator (moo.dom), Drag and Drop,
Sortable lists, cookies Manager and many more. All the previous moo
scripts have been made better, reorganized and extended to fully take
advantage of the new architecture, even if it retains full
compatibility with scripts written prototype-style. One of the big
differences is The Element Extension: mootools infact, makes it
possible for you to extend HTML elements with your own methods, to make
your life easier, and your coding style alot cooler.<br><br>mootools的中文文档(正在翻译, 还没有完成, 谁想和我一起翻译请联系我, 呵呵): <a href="http://www.rootshell.be/%7Educkuu/Moo-js.html">http://www.rootshell.be/~duckuu/Moo-js.html</a><br>mootools的英文文档: <a href="http://docs.mootools.net">http://docs.mootools.net</a><br><br>mootools的quick guide: </font><a href="http://clientside.cnet.com/examples/mootools-primer/">Mootools Primer/Tutorial</a><br>参考：JavaScript中国社区，<a href="http://jsfox.cn" target="_blank" title="JavaScript中国社区">http://jsfox.cn</a><img src ="http://www.cnitblog.com/duckuu/aggbug/20086.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/duckuu/" target="_blank">duckuu的学习空间</a> 2006-12-05 11:23 <a href="http://www.cnitblog.com/duckuu/archive/2006/12/05/20086.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>linux下各个分区下都有什么东西??</title><link>http://www.cnitblog.com/duckuu/archive/2006/07/29/14411.html</link><dc:creator>duckuu的学习空间</dc:creator><author>duckuu的学习空间</author><pubDate>Sat, 29 Jul 2006 08:07:00 GMT</pubDate><guid>http://www.cnitblog.com/duckuu/archive/2006/07/29/14411.html</guid><wfw:comment>http://www.cnitblog.com/duckuu/comments/14411.html</wfw:comment><comments>http://www.cnitblog.com/duckuu/archive/2006/07/29/14411.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/duckuu/comments/commentRss/14411.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/duckuu/services/trackbacks/14411.html</trackback:ping><description><![CDATA[整理整理吧，刚开始了解，比较弱：<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">\proc\<br />    \proc\modules  系统已经加载的模块<br /><br /><br /></span></div><br /><br /><br /><img src ="http://www.cnitblog.com/duckuu/aggbug/14411.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/duckuu/" target="_blank">duckuu的学习空间</a> 2006-07-29 16:07 <a href="http://www.cnitblog.com/duckuu/archive/2006/07/29/14411.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>linux下ip设置的两种方法</title><link>http://www.cnitblog.com/duckuu/archive/2006/07/27/14273.html</link><dc:creator>duckuu的学习空间</dc:creator><author>duckuu的学习空间</author><pubDate>Thu, 27 Jul 2006 03:25:00 GMT</pubDate><guid>http://www.cnitblog.com/duckuu/archive/2006/07/27/14273.html</guid><wfw:comment>http://www.cnitblog.com/duckuu/comments/14273.html</wfw:comment><comments>http://www.cnitblog.com/duckuu/archive/2006/07/27/14273.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/duckuu/comments/commentRss/14273.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/duckuu/services/trackbacks/14273.html</trackback:ping><description><![CDATA[ <br />    挺弱的，大家不要笑话。<br />    第一种方法，用ifconfig命令，最简单的办法：<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">#ifconfig eth0 192.168.1.6</span></div>    ifconfig命令最常用的办法就是这样的：<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">#ifconfig eth0 192.168.1.6 netmask 255.255.255.0 broadcast 192.168.1.255</span></div>    如果有多块网卡，那么网卡一般是eth0,eth0:0,eth0:1...<br />    网卡的物理地址也是可以改的，用这个命令：<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">#ifconfig eth0 hw ether **:**:**:**:**:**</span></div>    执行这个命令时，系统可能会提示你网卡busy，所以要先把eth0给down了：<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">#ifconfig eth0 down</span></div>    执行完了别忘了给它up。改网卡物理地址的语句可以加在/etc/rc.d/init.d/的network中，不同的系统可能不太一样。debian下面在什么地方加这条语句，我回头再问问。<br />    <br />    另外一种办法就是修改配置文件，debian下面是修改/etc/network/interfaces，进去里面，就什么都可以修改啦。但是不能在这里修改物理地址，关于物理地址的配置文件，我还没找到...<br /><br />    还有，修改DNS的设置，配置文件在这里：/etc/resolv.conf，进去就知道啦。<br /><br /><hr size="2" width="100%" /><font size="2">Linux 网络接口配置文件及相关工具 (v0.1b)：<a href="http://www.linuxsir.org/main/?q=node/224#7">http://www.linuxsir.org/main/?q=node/224#7</a><br /></font><font size="2">debian参考手册：<a href="http://qref.sourceforge.net/">http://qref.sourceforge.net/</a><br />debian快速参考手册：<br /><a target="" class="" title="" href="http://www.debian.org/doc/manuals/quick-reference/quick-reference.zh-cn.html#contents">http://www.debian.org/doc/manuals/quick-reference/quick-reference.zh-cn.html#contents</a><br /><br />一个有点意思的blog，有空去看看，海豚：<a href="http://www.kdolphin.com/category/2/7/">http://www.kdolphin.com/category/2/7/</a></font><br /><img src ="http://www.cnitblog.com/duckuu/aggbug/14273.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/duckuu/" target="_blank">duckuu的学习空间</a> 2006-07-27 11:25 <a href="http://www.cnitblog.com/duckuu/archive/2006/07/27/14273.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Samba简易配置</title><link>http://www.cnitblog.com/duckuu/archive/2006/07/24/14132.html</link><dc:creator>duckuu的学习空间</dc:creator><author>duckuu的学习空间</author><pubDate>Mon, 24 Jul 2006 12:54:00 GMT</pubDate><guid>http://www.cnitblog.com/duckuu/archive/2006/07/24/14132.html</guid><wfw:comment>http://www.cnitblog.com/duckuu/comments/14132.html</wfw:comment><comments>http://www.cnitblog.com/duckuu/archive/2006/07/24/14132.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/duckuu/comments/commentRss/14132.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/duckuu/services/trackbacks/14132.html</trackback:ping><description><![CDATA[
		<br />记下来，免得下次又忘！<br /><br />Samba的配置文件：/etc/samba/smb.conf<br />简易配置：<br /><span style="color: rgb(0, 0, 0);"><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">[global]<br />    log file = /var/log/samba/log.%m<br /><br />[tmp] <br />    comment = Temporary file space <br />    path = /tmp <br />    read only = no <br />    public = yes<br /></span></div><br /></span>检验smb.conf配置是否正确：<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">#testparm</span></div>启动服务：（livebird说，init.d目录下面是启动时执行的命令，巨牛！）<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">#/etc/init.d/samba restart</span></div>创建用户：<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">#touch /etc/samba/smbpasswd<br />#smbpasswd -a duckuu</span></div>这样就可以啦！这些都是samba的最简单的配置，最简单的命令，先搞这么点，以后用到再搞！<br /><br />今天又刚学一招，在linux下mount上windows的共享文件夹，用smbmount：<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">#smbmount //192.168.1.6/Downloads /mnt/win/</span></div>这样就mount上我F盘的Downloads啦！可以播放里面的×片！<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">#mplayer /mnt/win/xxx.avi</span></div><br />不过没有声音！奶奶的，livebird告诉我，用这个：<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">#mplayer -ao oss /mnt/win/xxx.avi</span></div>-ao是选择音频，oss是open sound system<br /><br /><hr size="2" width="100%" /><font size="2">欲知samba更多：<br /><a target="" class="" title="" href="http://www.linuxfocus.org/ChineseGB/March2002/article177.shtml">http://www.linuxfocus.org/ChineseGB/March2002/article177.shtml</a><br />O'Reilly 线上书籍：<a href="http://www.oreilly.com/catalog/samba/chapter/book/index.html">http://www.oreilly.com/catalog/samba/chapter/book/index.html</a></font><br /><img src ="http://www.cnitblog.com/duckuu/aggbug/14132.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/duckuu/" target="_blank">duckuu的学习空间</a> 2006-07-24 20:54 <a href="http://www.cnitblog.com/duckuu/archive/2006/07/24/14132.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>High Train to Tibet</title><link>http://www.cnitblog.com/duckuu/archive/2006/07/21/13993.html</link><dc:creator>duckuu的学习空间</dc:creator><author>duckuu的学习空间</author><pubDate>Fri, 21 Jul 2006 14:47:00 GMT</pubDate><guid>http://www.cnitblog.com/duckuu/archive/2006/07/21/13993.html</guid><wfw:comment>http://www.cnitblog.com/duckuu/comments/13993.html</wfw:comment><comments>http://www.cnitblog.com/duckuu/archive/2006/07/21/13993.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/duckuu/comments/commentRss/13993.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/duckuu/services/trackbacks/13993.html</trackback:ping><description><![CDATA[Jul 6th 2006 | BEIJING<br />From <em>The Economist</em> print edition<br /><h2><font size="3">Tibet is linked to the rest of China</font></h2>AT LONG last, or so Chinese officials have been crowing, the remote
Himalayan vastness of Tibet has been connected to the railway network.
Modernity, they proudly and not uncontroversially say, has arrived in
this backward region in the form of an engineering miracle that has
laid tracks on land gripped year-round by ice, a railway line at higher
altitude than any other in the world.<br /><img src="http://www.economist.com/images/20060708/CAS938.gif" /><br />The launch on July 1st of the first passenger train services to Lhasa,
the Tibetan capital, has been covered by the Chinese media with hoopla
only comparable to that surrounding the country's first launch of a man
into space three years ago. President Hu Jintao attended the send-off
from Golmud in the neighbouring province of Qinghai. As with China's
space launches, the foreign media were kept well away (some were
grudgingly allowed onto a train that arrived in Lhasa two days after
the first one had successfully arrived). Tibetan exiles had been
protesting that the train would unleash a flood of Chinese immigrants
and destroy their environment and culture. China did not want that kind
of coverage on what was, not coincidentally, the Communist Party's 85th
birthday.<br /><br /><p>The 1,142 km (710 mile) Golmud-Lhasa line certainly sounds
impressive. It took five years to build, at a cost of an official $4
billion. It traverses oxygen-starved, earthquake-prone terrain that for
most of the way is over 4,000 metres (13,120 feet) above sea level and
rises to 5,072 metres—not far off the altitude of Mount Everest's base
camp. Carriages are sealed and individual oxygen supplies are provided
for passengers. About half of the route is across permafrost, which
poses particular challenges because of the danger of subsidence caused
by melting at the surface in summer. To keep things safely frozen,
cooling systems have been installed in the ground. To add to all that,
crossing points have had to be built for migratory Tibetan antelopes,
an endangered species. </p><p>Connecting the last rail-free region of China to the railway network
has been a mission of enormous political importance to a leadership
bent on quashing any notion of Tibet's separateness. But the railway is
unlikely to prove either the economic godsend to Tibet that Chinese
accounts portray it as, or the harbinger of mass immigration that
critics of Chinese rule in Tibet fear. </p><p>Only one or two freight trains a day in each direction are currently
planned. Most goods will therefore continue to be transported by truck
along the four highways that connect Lhasa to the rest of China. The
single-track rail link is circuitous and connects the region to the
more prosperous parts of China via hundreds of kilometres of the most
backward areas of China's west. A more direct connection would have
cost even more to build. <br /></p><img src="http://www.economist.com/images/20060708/CAS024.gif" /><br />Zhang Chengyao, of the Chinese Academy of Social Sciences, says the
railway's main contribution will be to Tibet's tourism industry. The
plan is to run three passenger trains a day each way, each able to
carry around 900 people. For many, approaching Tibet gradually by train
will be preferable to flying in, as it will allow more time to
acclimatise and reduce the chance of altitude sickness. But demand
could be affected by the limited capacity of the Potala Palace, the
historic residence of the Dalai Lamas, Tibet's spiritual leaders. This
amazing tourist attraction has increased its daily ticket quota in
response to an expected increase in visitor numbers, but media reports
say many travellers will still be turned away.<br /><br /><p>Even without the railway, tourism—the mainstay of Tibet's
economy—has been booming, thanks to growing interest among China's
newly affluent urbanites. This has helped to promote average annual
economic growth of around 12% in the past five years (see chart).
Tibet's government forecasts that the same rate of growth will
continue, implicitly suggesting that it does not expect the railway to
make a big difference. As the economy grows, migrants will surely
continue to come. But many will continue to bargain for cheap deals on
buses. </p><br /><img src ="http://www.cnitblog.com/duckuu/aggbug/13993.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/duckuu/" target="_blank">duckuu的学习空间</a> 2006-07-21 22:47 <a href="http://www.cnitblog.com/duckuu/archive/2006/07/21/13993.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>这里不错啊！</title><link>http://www.cnitblog.com/duckuu/archive/2006/07/21/13974.html</link><dc:creator>duckuu的学习空间</dc:creator><author>duckuu的学习空间</author><pubDate>Fri, 21 Jul 2006 09:44:00 GMT</pubDate><guid>http://www.cnitblog.com/duckuu/archive/2006/07/21/13974.html</guid><wfw:comment>http://www.cnitblog.com/duckuu/comments/13974.html</wfw:comment><comments>http://www.cnitblog.com/duckuu/archive/2006/07/21/13974.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/duckuu/comments/commentRss/13974.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/duckuu/services/trackbacks/13974.html</trackback:ping><description><![CDATA[first！<img src ="http://www.cnitblog.com/duckuu/aggbug/13974.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/duckuu/" target="_blank">duckuu的学习空间</a> 2006-07-21 17:44 <a href="http://www.cnitblog.com/duckuu/archive/2006/07/21/13974.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>