<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Study in Nature</title>
	<atom:link href="http://physicstheory.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://physicstheory.wordpress.com</link>
	<description>Trace my daily thoughts</description>
	<lastBuildDate>Fri, 19 Aug 2011 21:16:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='physicstheory.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Study in Nature</title>
		<link>http://physicstheory.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://physicstheory.wordpress.com/osd.xml" title="Study in Nature" />
	<atom:link rel='hub' href='http://physicstheory.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Setup smtp client for gmail in asp.net 4</title>
		<link>http://physicstheory.wordpress.com/2011/08/19/setup-smtp-client-for-gmail-in-asp-net-4/</link>
		<comments>http://physicstheory.wordpress.com/2011/08/19/setup-smtp-client-for-gmail-in-asp-net-4/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 21:15:57 +0000</pubDate>
		<dc:creator>umbriel47</dc:creator>
		
		<guid isPermaLink="false">http://physicstheory.wordpress.com/2011/08/19/setup-smtp-client-for-gmail-in-asp-net-4/</guid>
		<description><![CDATA[Asp.net 4 provides a nice feature that you can setup you smtp client for those providers requiring ssl secure connection. Taking gmail for an example, if you are setting the smtp through web.config file at the root of your website, it should look like this: &#60;configuration&#62; &#8230;&#8230; &#160;&#160;&#160; &#60;system.net&#62; &#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;mailSettings&#62; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;smtp deliveryMethod=&#8221;Network&#8221; from=&#8221;name [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=54&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Asp.net 4 provides a nice feature that you can setup you smtp client for those providers requiring ssl secure connection. Taking gmail for an example, if you are setting the smtp through web.config file at the root of your website, it should look like this:</p>
<p>&lt;configuration&gt;</p>
<p>&#8230;&#8230;<br /> &nbsp;&nbsp;&nbsp; &lt;system.net&gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;mailSettings&gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;smtp deliveryMethod=&#8221;Network&#8221; from=&#8221;name &amp;lt;yourname@gmail.com&amp;gt;&#8221;&gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>&lt;network enableSsl=&#8221;true&#8221; host=&#8221;smtp.gmail.com&#8221; password=&#8221;yourpassword&#8221; userName=&#8221;</strong><a href="mailto:username@gmail.com"><strong>username@gmail.com</strong></a><strong>&#8221; port=&#8221;587&#8243;/&gt;<br /></strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/smtp&gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/mailSettings&gt;<br /> &nbsp;&nbsp;&nbsp; &lt;/system.net&gt;<br /> &lt;/configuration&gt;</p>
<p>So the <strong>enableSsl=&#8221;true&#8221;</strong> allows the SSL connection and you need to write out explicitly the right port number, 587&nbsp;in this case (I tried 465 or leave it blank. In both cases, the smtp doesn&#8217;t work properly.).</p>
<p>A quick reminder: you can always set the deliveryMethod = &#8220;SpecifiedPickupPlace&#8221; to send email to local folder during development time</p>
<div class="PoweredByWebStory" style="margin-top:15px;margin-bottom:10px;"><a target="_blank" href="http://sns.juziyue.com/webinvite.php?u=27288"><img src="http://image.juziyue.com/WebStoryLogo24.png" alt="菊子曰" style="border:0;" /></a>&nbsp;今天你<a target="_blank" href="http://sns.juziyue.com/webinvite.php?u=27288">菊子曰</a>了么？</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/physicstheory.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/physicstheory.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/physicstheory.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/physicstheory.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/physicstheory.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/physicstheory.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/physicstheory.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/physicstheory.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/physicstheory.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/physicstheory.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/physicstheory.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/physicstheory.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/physicstheory.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/physicstheory.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=54&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://physicstheory.wordpress.com/2011/08/19/setup-smtp-client-for-gmail-in-asp-net-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9be1dd6249af072e593896b67721c090?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">umbriel</media:title>
		</media:content>

		<media:content url="http://image.juziyue.com/WebStoryLogo24.png" medium="image">
			<media:title type="html">菊子曰</media:title>
		</media:content>
	</item>
		<item>
		<title>putty + xming 实现远程linux系统图形界面程序启动</title>
		<link>http://physicstheory.wordpress.com/2011/07/18/putty-xming-%e5%ae%9e%e7%8e%b0%e8%bf%9c%e7%a8%8blinux%e7%b3%bb%e7%bb%9f%e5%9b%be%e5%bd%a2%e7%95%8c%e9%9d%a2%e7%a8%8b%e5%ba%8f%e5%90%af%e5%8a%a8/</link>
		<comments>http://physicstheory.wordpress.com/2011/07/18/putty-xming-%e5%ae%9e%e7%8e%b0%e8%bf%9c%e7%a8%8blinux%e7%b3%bb%e7%bb%9f%e5%9b%be%e5%bd%a2%e7%95%8c%e9%9d%a2%e7%a8%8b%e5%ba%8f%e5%90%af%e5%8a%a8/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 02:12:52 +0000</pubDate>
		<dc:creator>umbriel47</dc:creator>
		
		<guid isPermaLink="false">http://physicstheory.wordpress.com/2011/07/18/putty-xming-%e5%ae%9e%e7%8e%b0%e8%bf%9c%e7%a8%8blinux%e7%b3%bb%e7%bb%9f%e5%9b%be%e5%bd%a2%e7%95%8c%e9%9d%a2%e7%a8%8b%e5%ba%8f%e5%90%af%e5%8a%a8/</guid>
		<description><![CDATA[由于模拟程序在服务器上运行，在家工作时需要不时检查结果输出情况，输出文件很大不方便下载下来。一个办法是直接在服务器端调用作图软件（这里我用的是gnuplot）。以前为了做到这个，不得不装上cygwin来模拟linux环境，不仅软件本身很大，慢而且不稳定。在不支持鼠标中间键的笔记本上复制粘贴也比较麻烦。最近学习到可以用xming实现同样的功能（详细的介绍请参考这里）。 一下的介绍基于上面的文章，主要是自己做个总结，方便自己找。 windows上远程调用linux端GUI程序的原理是在windows端启用一个x server, 然后将linux端的程序的显示forward给x server。由于linux管理显示及输入的都是通过一个统一的Server，所以本地和远程显示只是Server的地址不同，本质上并没有区别。 下载安装xming之后，启动。在windows 任务栏（时间显示旁边）可以看到一个X样的图标，说明server已经启动了。鼠标移上去可以看到 xming Server:0，记住这个数字。 启动putty，在左侧catagory: 选择Connection &#8211;&#62; SSH &#8211;&#62; X11，选上Enable X11 forwarding，在X display location里输入: localhost:0. 然后回到Session，建立连接就可以了。 这样做之后感觉反应速度比cygwin快，而且用鼠标右键就可以复制了。。。（老笔记本终于可以往窗口里复制粘贴了）<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=53&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>由于模拟程序在服务器上运行，在家工作时需要不时检查结果输出情况，输出文件很大不方便下载下来。一个办法是直接在服务器端调用作图软件（这里我用的是gnuplot）。以前为了做到这个，不得不装上cygwin来模拟linux环境，不仅软件本身很大，慢而且不稳定。在不支持鼠标中间键的笔记本上复制粘贴也比较麻烦。最近学习到可以用xming实现同样的功能（详细的介绍请参考<a href="http://hi.baidu.com/mooncold/blog/item/8e0dfddc4f29a3a4cd11663a.html/cmtid/0f278f82283e2c9ef603a61a">这里</a>）。</p>
<p>一下的介绍基于上面的文章，主要是自己做个总结，方便自己找。</p>
<p>windows上远程调用linux端GUI程序的原理是在windows端启用一个x server, 然后将linux端的程序的显示forward给x server。由于linux管理显示及输入的都是通过一个统一的Server，所以本地和远程显示只是Server的地址不同，本质上并没有区别。</p>
<p>下载安装xming之后，启动。在windows 任务栏（时间显示旁边）可以看到一个X样的图标，说明server已经启动了。鼠标移上去可以看到 xming Server:0，记住这个数字。</p>
<p>启动putty，在左侧catagory: 选择Connection &#8211;&gt; SSH &#8211;&gt; X11，选上Enable X11 forwarding，在X display location里输入: localhost:0.</p>
<p>然后回到Session，建立连接就可以了。</p>
<p>这样做之后感觉反应速度比cygwin快，而且用鼠标右键就可以复制了。。。（老笔记本终于可以往窗口里复制粘贴了）</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/physicstheory.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/physicstheory.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/physicstheory.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/physicstheory.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/physicstheory.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/physicstheory.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/physicstheory.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/physicstheory.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/physicstheory.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/physicstheory.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/physicstheory.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/physicstheory.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/physicstheory.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/physicstheory.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=53&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://physicstheory.wordpress.com/2011/07/18/putty-xming-%e5%ae%9e%e7%8e%b0%e8%bf%9c%e7%a8%8blinux%e7%b3%bb%e7%bb%9f%e5%9b%be%e5%bd%a2%e7%95%8c%e9%9d%a2%e7%a8%8b%e5%ba%8f%e5%90%af%e5%8a%a8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9be1dd6249af072e593896b67721c090?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">umbriel</media:title>
		</media:content>
	</item>
		<item>
		<title>天平称球问题</title>
		<link>http://physicstheory.wordpress.com/2011/07/04/%e5%a4%a9%e5%b9%b3%e7%a7%b0%e7%90%83%e9%97%ae%e9%a2%98/</link>
		<comments>http://physicstheory.wordpress.com/2011/07/04/%e5%a4%a9%e5%b9%b3%e7%a7%b0%e7%90%83%e9%97%ae%e9%a2%98/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 19:38:35 +0000</pubDate>
		<dc:creator>umbriel47</dc:creator>
				<category><![CDATA[Maths]]></category>

		<guid isPermaLink="false">http://physicstheory.wordpress.com/2011/07/04/%e5%a4%a9%e5%b9%b3%e7%a7%b0%e7%90%83%e9%97%ae%e9%a2%98/</guid>
		<description><![CDATA[前段时间在朋友日志里看到这个问题：12个小球，有一个质量和其他11个不一样，一架天平，没有砝码，称3次找出这个不一样的小球。下面是我今天上午想出的一个解法，看下去之前大家也可以自己先想想。 =================&#160;&#160;&#160; 疲倦的分割线&#160;&#160; ================== 将正常小球记作N，不正常的记作A。 引理1：已知一个小球是N，A在两个小球之中，只需要一次就可以称出A。方法如下： 两个待选小球中任取一个和N比较，若平衡，则剩下那个是A，否则取出那个是A。 &#160; 那么以下方法可以3步称出小球： 1. 取两组R, L 各四个小球称。不失一般性，标记为 R{1,2,3,4}; L{5,6,7,8}; 若R和L一样，记作R=L，则剩下的集合S{9,10,11,12}中含有A，R，L构成标准组；取{9,10}与{1,2}比较，若相等，则A属于{11,12}，否则属于{9,10}，由引理，一步可以称出。 若R != L，假设 R&#62;L (R比L重)。**交换{1, 2, 3} &#60;&#8211;&#62; {5, 6, 7}，若平衡不变，即仍有R&#62;L，则A属于{4,8} (问题一步可以解决)。否则A属于{1,2,3,5,6,7}。其实这里故意绕了一下，这样的话是解不出来的，我们其实可以从这一步利用S = {9，10,11,12}是标准组得出更多的结论(知道A属于{1,2,3}或者{5,6,7}并且A是较重或者较轻)。 从**处开始：交换{1,2,3}&#160;&#60;&#8211;&#62; {5, 6, 7}，并用{9,10,11}代替{1,2,3}，此时R&#8217;={5,6,7,4}; L&#8217;={9,10,11,8};S&#8217;={1,2,3,12} 若仍有R&#8217;&#62;L&#8217;，则A属于{4,8} (问题一步可以解决)。 若R&#8217; = L&#8217; 则A属于替换下天平的三个球，即{1,2,3}并且A较重（因为A来自于R)。{5,6,7}中任选两个比较即可。 若R&#8217; &#60; L&#8217; 则A属于{5,6,7}且A较轻（因为A来自于L）。{1,2,3}中任选两个比较即可。 技巧的关键就是，通过交换天平两边的部分小球来进一步缩小A的范围，同时用标准组的球进行替换，设立比较的标准可以制造更多的不同结果（可能出现的结果越多，对于根据结果分类帮助更大）。 不过我不知道解法是否唯一。 大胆的进一步推测，因为第一步称只能产生2个结果，第二步通过轮换产生3个结果，第二步之后知道轻重，用2分法就可以比较快的得到答案。所以可以猜测，当总的小球数介于 [ 2*3*2^n, 2*3*2^(n+1) ) 时，用 (n+2)步就可以称出。不过我还没想到好的证明方法。 &#160; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=52&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>前段时间在朋友日志里看到这个问题：12个小球，有一个质量和其他11个不一样，一架天平，没有砝码，称3次找出这个不一样的小球。下面是我今天上午想出的一个解法，看下去之前大家也可以自己先想想。</p>
<p>=================&nbsp;&nbsp;&nbsp; 疲倦的分割线&nbsp;&nbsp; ==================</p>
<p>将正常小球记作N，不正常的记作A。</p>
<p>引理1：已知一个小球是N，A在两个小球之中，只需要一次就可以称出A。方法如下：</p>
<p>两个待选小球中任取一个和N比较，若平衡，则剩下那个是A，否则取出那个是A。</p>
<p>&nbsp;</p>
<p>那么以下方法可以3步称出小球：</p>
<p>1. 取两组R, L 各四个小球称。不失一般性，标记为 R{1,2,3,4}; L{5,6,7,8};</p>
<p>若R和L一样，记作R=L，则剩下的集合S{9,10,11,12}中含有A，R，L构成标准组；取{9,10}与{1,2}比较，若相等，则A属于{11,12}，否则属于{9,10}，由引理，一步可以称出。</p>
<p>若R != L，假设 R&gt;L (R比L重)。**交换{1, 2, 3} &lt;&#8211;&gt; {5, 6, 7}，若平衡不变，即仍有R&gt;L，则A属于{4,8} (问题一步可以解决)。否则A属于{1,2,3,5,6,7}。其实这里故意绕了一下，这样的话是解不出来的，我们其实可以从这一步利用S = {9，10,11,12}是标准组得出更多的结论(知道A属于{1,2,3}或者{5,6,7}并且A是较重或者较轻)。</p>
<p>从**处开始：交换{1,2,3}&nbsp;&lt;&#8211;&gt; {5, 6, 7}，并用{9,10,11}代替{1,2,3}，此时R&#8217;={5,6,7,4}; L&#8217;={9,10,11,8};S&#8217;={1,2,3,12}</p>
<p>若仍有R&#8217;&gt;L&#8217;，则A属于{4,8} (问题一步可以解决)。</p>
<p>若R&#8217; = L&#8217; 则A属于替换下天平的三个球，即{1,2,3}并且A较重（因为A来自于R)。{5,6,7}中任选两个比较即可。</p>
<p>若R&#8217; &lt; L&#8217; 则A属于{5,6,7}且A较轻（因为A来自于L）。{1,2,3}中任选两个比较即可。</p>
<p>技巧的关键就是，通过交换天平两边的部分小球来进一步缩小A的范围，同时用标准组的球进行替换，设立比较的标准可以制造更多的不同结果（可能出现的结果越多，对于根据结果分类帮助更大）。</p>
<p>不过我不知道解法是否唯一。</p>
<p>大胆的进一步推测，因为第一步称只能产生2个结果，第二步通过轮换产生3个结果，第二步之后知道轻重，用2分法就可以比较快的得到答案。所以可以猜测，当总的小球数介于 [ 2*3*2^n, 2*3*2^(n+1) ) 时，用 (n+2)步就可以称出。不过我还没想到好的证明方法。</p>
<p> &nbsp;</p>
<div class="PoweredByWebStory" style="margin-top:15px;margin-bottom:10px;"><a target="_blank" href="http://sns.juziyue.com/webinvite.php?u=27288"><img src="http://image.juziyue.com/WebStoryLogo24.png" alt="菊子曰" style="border:0;" /></a>&nbsp;本文用<a target="_blank" href="http://sns.juziyue.com/webinvite.php?u=27288">菊子曰</a>发布</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/physicstheory.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/physicstheory.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/physicstheory.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/physicstheory.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/physicstheory.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/physicstheory.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/physicstheory.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/physicstheory.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/physicstheory.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/physicstheory.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/physicstheory.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/physicstheory.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/physicstheory.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/physicstheory.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=52&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://physicstheory.wordpress.com/2011/07/04/%e5%a4%a9%e5%b9%b3%e7%a7%b0%e7%90%83%e9%97%ae%e9%a2%98/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9be1dd6249af072e593896b67721c090?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">umbriel</media:title>
		</media:content>

		<media:content url="http://image.juziyue.com/WebStoryLogo24.png" medium="image">
			<media:title type="html">菊子曰</media:title>
		</media:content>
	</item>
		<item>
		<title>仙剑五</title>
		<link>http://physicstheory.wordpress.com/2011/06/16/%e4%bb%99%e5%89%91%e4%ba%94/</link>
		<comments>http://physicstheory.wordpress.com/2011/06/16/%e4%bb%99%e5%89%91%e4%ba%94/#comments</comments>
		<pubDate>Thu, 16 Jun 2011 21:31:56 +0000</pubDate>
		<dc:creator>umbriel47</dc:creator>
		
		<guid isPermaLink="false">http://physicstheory.wordpress.com/2011/06/16/%e4%bb%99%e5%89%91%e4%ba%94/</guid>
		<description><![CDATA[仙剑五今天预发售，在某种程度上再现了apple的状态。据说服务器被挤爆了，不得不停机维护了一段时间。昨天发布了距今为止最长的一段宣传动画。总的说来画面也是意料之中，3D人物，细致的场景制作，有城市，有山水，有魔幻。人物运动都是程式化的，想来也不太可能让衣袂飘飘做的动态处理。战斗画面略有失望，感觉气场不够大，打击时候出现的那些圈圈点点似乎小气了一些。倒是背景音乐里面那一段笛子让我想起了轩辕剑三里三人的时光。还不知道剧情，没空看也没想看，因为游戏还是值得期待的。到不了宣传里说的什么16年的期待，不过最近好的中国风单机RPG却是越来越少了，也许古剑还能算上一个。 &#160;本文用菊子曰发布<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=51&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>仙剑五今天预发售，在某种程度上再现了apple的状态。据说服务器被挤爆了，不得不停机维护了一段时间。昨天发布了距今为止最长的一段宣传动画。总的说来画面也是意料之中，3D人物，细致的场景制作，有城市，有山水，有魔幻。人物运动都是程式化的，想来也不太可能让衣袂飘飘做的动态处理。战斗画面略有失望，感觉气场不够大，打击时候出现的那些圈圈点点似乎小气了一些。倒是背景音乐里面那一段笛子让我想起了轩辕剑三里三人的时光。还不知道剧情，没空看也没想看，因为游戏还是值得期待的。到不了宣传里说的什么16年的期待，不过最近好的中国风单机RPG却是越来越少了，也许古剑还能算上一个。</p>
<div class="PoweredByWebStory" style="margin-top:15px;margin-bottom:10px;"><a target="_blank" href="http://sns.juziyue.com/webinvite.php?u=27288"><img src="http://image.juziyue.com/WebStoryLogo24.png" alt="菊子曰" style="border:0;" /></a>&nbsp;本文用<a target="_blank" href="http://sns.juziyue.com/webinvite.php?u=27288">菊子曰</a>发布</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/physicstheory.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/physicstheory.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/physicstheory.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/physicstheory.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/physicstheory.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/physicstheory.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/physicstheory.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/physicstheory.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/physicstheory.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/physicstheory.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/physicstheory.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/physicstheory.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/physicstheory.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/physicstheory.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=51&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://physicstheory.wordpress.com/2011/06/16/%e4%bb%99%e5%89%91%e4%ba%94/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9be1dd6249af072e593896b67721c090?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">umbriel</media:title>
		</media:content>

		<media:content url="http://image.juziyue.com/WebStoryLogo24.png" medium="image">
			<media:title type="html">菊子曰</media:title>
		</media:content>
	</item>
		<item>
		<title>Wave length constraint in &#8220;black-hole&#8221; jet breakup</title>
		<link>http://physicstheory.wordpress.com/2011/05/09/wave-length-constraint-in-black-hole-jet-breakup/</link>
		<comments>http://physicstheory.wordpress.com/2011/05/09/wave-length-constraint-in-black-hole-jet-breakup/#comments</comments>
		<pubDate>Mon, 09 May 2011 21:45:50 +0000</pubDate>
		<dc:creator>umbriel47</dc:creator>
				<category><![CDATA[M.P.C.A.B]]></category>
		<category><![CDATA[Physics]]></category>

		<guid isPermaLink="false">http://physicstheory.wordpress.com/?p=48</guid>
		<description><![CDATA[In last week&#8217;s colloquium, the speaker talked about the black hole merge simulation. At the end, he roughly mentioned that if there exists an extra 5th dimension, the black hole can break up in higher dimensions&#8230;(I may misunderstand this part, so correct me please). Simulation shows that a jet (cylinder) of black hole with the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=48&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In last week&#8217;s colloquium, the speaker talked about the black hole merge simulation. At the end, he roughly mentioned that if there exists an extra 5th dimension, the black hole can break up in higher dimensions&#8230;(I may misunderstand this part, so correct me please). Simulation shows that a jet (cylinder) of black hole with the axis direction along the extra dimension is non-stable and breaks up into self-similar cascading beads. Although the real break up may not be possible because the cosmic sensor prohibits naked singularities and thus topological change of black hole, but the dynamics is pretty much like a rayleigh-plateau instability in liquid jet. The latter can be observed in your daily life as you open the tap and let the water run down. You will notice that with some condition, the jet will break up into beads. However, when black hole is concerned, there is a fundamental difference as I think. The water jet breaks up because the beads possess less surface energy comparing to cylinder. However, for black hole, since the entropy is proportional to the surface area, thus the beads should retain larger surface area comparing to the cylinder. I did a simple calculation by assuming that a cylinder (height h and radius r) breaks up into N identical spheres ( or circles in 2D, so the wave length \lambda is about h/N ) and calculate the surface area in both cylinder and beads cases, then compare the results. The result shows that for liquid, roughly speaking, to reduce surface area, we require r/ \lambda &lt; 1; while for black hole, we need r/\lambda &gt; 1. To conclude, in water breakup, long wave length is preferred; in black hole and in higher dimensions, short wave length is preferred.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/physicstheory.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/physicstheory.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/physicstheory.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/physicstheory.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/physicstheory.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/physicstheory.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/physicstheory.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/physicstheory.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/physicstheory.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/physicstheory.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/physicstheory.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/physicstheory.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/physicstheory.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/physicstheory.wordpress.com/48/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=48&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://physicstheory.wordpress.com/2011/05/09/wave-length-constraint-in-black-hole-jet-breakup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9be1dd6249af072e593896b67721c090?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">umbriel</media:title>
		</media:content>
	</item>
		<item>
		<title>没钱花</title>
		<link>http://physicstheory.wordpress.com/2011/05/07/%e6%b2%a1%e9%92%b1%e8%8a%b1/</link>
		<comments>http://physicstheory.wordpress.com/2011/05/07/%e6%b2%a1%e9%92%b1%e8%8a%b1/#comments</comments>
		<pubDate>Sat, 07 May 2011 18:39:17 +0000</pubDate>
		<dc:creator>umbriel47</dc:creator>
				<category><![CDATA[胡思乱想]]></category>

		<guid isPermaLink="false">http://physicstheory.wordpress.com/?p=45</guid>
		<description><![CDATA[经常看到电视里面演的，有人赚了好多好多钱，但是年纪大了，就开始怀念以前的生活。这几天确实觉得这样经常扳着手指花钱的日子未尝不是一件幸福的事情。真 到了没什么都不用想的时候是不是真的就因为什么都来得容易这种开心和幸福就没有了呢？真不知道。也许痛苦确实往往不是来自于没有选择，而是选择太多吧。幸 福的日子也就在扳手指间慢慢扳出来了。<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=45&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>经常看到电视里面演的，有人赚了好多好多钱，但是年纪大了，就开始怀念以前的生活。这几天确实觉得这样经常扳着手指花钱的日子未尝不是一件幸福的事情。真 到了没什么都不用想的时候是不是真的就因为什么都来得容易这种开心和幸福就没有了呢？真不知道。也许痛苦确实往往不是来自于没有选择，而是选择太多吧。幸 福的日子也就在扳手指间慢慢扳出来了。</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/physicstheory.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/physicstheory.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/physicstheory.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/physicstheory.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/physicstheory.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/physicstheory.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/physicstheory.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/physicstheory.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/physicstheory.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/physicstheory.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/physicstheory.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/physicstheory.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/physicstheory.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/physicstheory.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=45&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://physicstheory.wordpress.com/2011/05/07/%e6%b2%a1%e9%92%b1%e8%8a%b1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9be1dd6249af072e593896b67721c090?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">umbriel</media:title>
		</media:content>
	</item>
		<item>
		<title>MS SQL 2008笔记之万事开头难(4)</title>
		<link>http://physicstheory.wordpress.com/2011/03/15/ms-sql-2008%e7%ac%94%e8%ae%b0%e4%b9%8b%e4%b8%87%e4%ba%8b%e5%bc%80%e5%a4%b4%e9%9a%be4/</link>
		<comments>http://physicstheory.wordpress.com/2011/03/15/ms-sql-2008%e7%ac%94%e8%ae%b0%e4%b9%8b%e4%b8%87%e4%ba%8b%e5%bc%80%e5%a4%b4%e9%9a%be4/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 18:41:20 +0000</pubDate>
		<dc:creator>umbriel47</dc:creator>
				<category><![CDATA[Computer Science]]></category>

		<guid isPermaLink="false">http://physicstheory.wordpress.com/2011/03/15/ms-sql-2008%e7%ac%94%e8%ae%b0%e4%b9%8b%e4%b8%87%e4%ba%8b%e5%bc%80%e5%a4%b4%e9%9a%be4/</guid>
		<description><![CDATA[介绍基本的DML （data manipulation language） &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; Select / change data 1. select data: select [xxx] from [yyy] distinct col: select distinct [xxx], [zzz] from: get rid of duplicated rows top n / top n percent&#160;(only show first several results from the select statement): n percent will round to integer using a ceiling rule, i.e. 6*10% = [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=41&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>介绍基本的DML （data manipulation language）</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Select / change data</p>
<p>1. select data:</p>
<p><font color="#008080">select [xxx] from [yyy]</font></p>
<p><font color="#008080">distinct col: select distinct [xxx], [zzz] from</font>: get rid of duplicated rows</p>
<p><font color="#008080">top n / top n percent</font>&nbsp;(only show first several results from the select statement): n percent will round to integer using a ceiling rule, i.e. 6*10% = 1.</p>
<p><font color="#008080">set rowcount n</font>&nbsp;(0, default value &#8212; all rows)</p>
<p><font color="#008080">as</font>&nbsp;key word &#8212; aliasing (as is optional)</p>
<p>&#8220;<font color="#008080">+</font>&#8220;: combine two strings</p>
<p><font color="#008080">order by [xxx] desc/ asc</font></p>
<p><font color="#008080">where clause (logical order: not &gt; and &gt; or)</font></p>
<p><font color="#008080">where [xxx] like (wild cards)</font></p>
<p><font color="#008080">functions on string: lower, upper, etc.&nbsp;</font></p>
<p><font color="#008080">select &#8230; into [tmp_table] from &#8230;</font></p>
<p></p>
<p>2. insert / update / delete data:</p>
<p>(*reminder: primary key doesn&#8217;t allow null values)</p>
<p><font color="#008080">(1) insert (into) [table] (cols) values (vals1), (vals2)&nbsp;</font></p>
<p>(*note: values shoule be consistent with each column)</p>
<p><font color="#008080">(2) update [table] set [column] = xx</font></p>
<p><font color="#008080">where [col] = / between / not in / in &#8230;</font></p>
<p>(*note: between includes two ends)</p>
<p><font color="#008080">(3) delete from [table] where&#8230;</font></p>
<p>3. transactions: (explicite / implicite)</p>
<p>batch different statement in one transaction and if one of them fails, all the changes get rolled back.</p>
<p><font color="#008080">begin tran</font></p>
<p><font color="#008080">[statements]</font></p>
<p><font color="#008080">&#8230;</font></p>
<p><font color="#008080">commit tran</font></p>
<p><font color="#008080">use of rollback / cube</font></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/physicstheory.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/physicstheory.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/physicstheory.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/physicstheory.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/physicstheory.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/physicstheory.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/physicstheory.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/physicstheory.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/physicstheory.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/physicstheory.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/physicstheory.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/physicstheory.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/physicstheory.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/physicstheory.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=41&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://physicstheory.wordpress.com/2011/03/15/ms-sql-2008%e7%ac%94%e8%ae%b0%e4%b9%8b%e4%b8%87%e4%ba%8b%e5%bc%80%e5%a4%b4%e9%9a%be4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9be1dd6249af072e593896b67721c090?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">umbriel</media:title>
		</media:content>
	</item>
		<item>
		<title>MS SQL 2008笔记之万事开头难(3)</title>
		<link>http://physicstheory.wordpress.com/2011/03/14/ms-sql-2008%e7%ac%94%e8%ae%b0%e4%b9%8b%e4%b8%87%e4%ba%8b%e5%bc%80%e5%a4%b4%e9%9a%be3/</link>
		<comments>http://physicstheory.wordpress.com/2011/03/14/ms-sql-2008%e7%ac%94%e8%ae%b0%e4%b9%8b%e4%b8%87%e4%ba%8b%e5%bc%80%e5%a4%b4%e9%9a%be3/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 01:08:03 +0000</pubDate>
		<dc:creator>umbriel47</dc:creator>
				<category><![CDATA[Computer Science]]></category>

		<guid isPermaLink="false">http://physicstheory.wordpress.com/2011/03/14/ms-sql-2008%e7%ac%94%e8%ae%b0%e4%b9%8b%e4%b8%87%e4%ba%8b%e5%bc%80%e5%a4%b4%e9%9a%be3/</guid>
		<description><![CDATA[上一节介绍了基本的数据类型，这一节介绍 View in SQL &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; View is a set of pre-defined SQL statements. It provides the interface between the user and database so that the user only has limited accessiblity to certain columns and a view can combine different columns from different tables and the user doesn&#8217;t need to know the underline structure of these [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=39&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>上一节介绍了基本的数据类型，这一节介绍 View in SQL</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>View is a set of pre-defined SQL statements. It provides the interface between the user and database so that the user only has limited accessiblity to certain columns and a view can combine different columns from different tables and the user doesn&#8217;t need to know the underline structure of these tables.</p>
<p>1. create / drop a view, (alias, filter, Order by and top(100) percent etc.)</p>
<p><font color="#008080">create view xxx</font></p>
<p><font color="#008080">as</font></p>
<p><font color="#008080">[statements]</font></p>
<p><font color="#008080">drop view xxx</font></p>
<p>2. create index on a view (PK (primary key) is an index by default)</p>
<p>3. view encryption: hide the definition of a view (remember to backup your original definition other wise you can&#8217;t modify the view after encryption).</p>
<p><font color="#008080">create view xxx with encryption</font></p>
<p>4. schema binding: you will get an warning if you are trying to change the underline table structure (it just gives out waring but not halts the process).</p>
<p><font color="#008080">create view xxx with schema binding</font></p>
<p>5. update a view, if the base table is only one single table. [with check option], with this option, the insertion which doesn&#8217;t match view&#8217;s filter (like where) will not be executed.</p>
<p><font color="#008080">create view xxx</font></p>
<p><font color="#008080">as &#8230;</font></p>
<p><font color="#008080">with check option</font></p>
<p>6. grant permission on views</p>
<p><font color="#008080">grant select on xxx to guest</font></p>
<p><font color="#008080">revoke select on xxx from guest</font></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/physicstheory.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/physicstheory.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/physicstheory.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/physicstheory.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/physicstheory.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/physicstheory.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/physicstheory.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/physicstheory.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/physicstheory.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/physicstheory.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/physicstheory.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/physicstheory.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/physicstheory.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/physicstheory.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=39&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://physicstheory.wordpress.com/2011/03/14/ms-sql-2008%e7%ac%94%e8%ae%b0%e4%b9%8b%e4%b8%87%e4%ba%8b%e5%bc%80%e5%a4%b4%e9%9a%be3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9be1dd6249af072e593896b67721c090?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">umbriel</media:title>
		</media:content>
	</item>
		<item>
		<title>MS SQL 2008笔记之万事开头难（2）</title>
		<link>http://physicstheory.wordpress.com/2011/03/13/ms-sql-2008%e7%ac%94%e8%ae%b0%e4%b9%8b%e4%b8%87%e4%ba%8b%e5%bc%80%e5%a4%b4%e9%9a%be%ef%bc%882%ef%bc%89/</link>
		<comments>http://physicstheory.wordpress.com/2011/03/13/ms-sql-2008%e7%ac%94%e8%ae%b0%e4%b9%8b%e4%b8%87%e4%ba%8b%e5%bc%80%e5%a4%b4%e9%9a%be%ef%bc%882%ef%bc%89/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 03:04:11 +0000</pubDate>
		<dc:creator>umbriel47</dc:creator>
				<category><![CDATA[Computer Science]]></category>

		<guid isPermaLink="false">http://physicstheory.wordpress.com/2011/03/13/ms-sql-2008%e7%ac%94%e8%ae%b0%e4%b9%8b%e4%b8%87%e4%ba%8b%e5%bc%80%e5%a4%b4%e9%9a%be%ef%bc%882%ef%bc%89/</guid>
		<description><![CDATA[以下没有什么技术含量，只是列出一些基本的要点提示。掌握这些基础知识是必要的： &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- For the following, I am just listing some points of SQL with some notes. This may actually be easier for review purpose: 1. Tables: works as the element in RDMS (relational database management system). Each table contains one or more columns. We could build relationships between different columns within one table or between [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=38&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>以下没有什么技术含量，只是列出一些基本的要点提示。掌握这些基础知识是必要的：</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>For the following, I am just listing some points of SQL with some notes. This may actually be easier for review purpose:</p>
<p>1. <font color="#FF0000">Tables</font>: works as the element in RDMS (relational database management system). Each table contains one or more columns. We could build relationships between different columns within one table or between different through <font color="#FF0000">foreign key constraint</font>.</p>
<p>2. Data type: as in every language, MS SQL contains several data types:</p>
<p>* <font color="#FF0000">char, nchar, varchar, nvarchar</font>. The prefix n- corresponds to unicode, takes double spaces for each characters ( 2 bytes comparing to 1 bytes). Each type here takes size as its parameter, like char(10) (default char() is one character). var- means the length can change with actual content.</p>
<p>* <font color="#FF0000">int, bigint, smallint, tinyint, decimal/numeric, float, real, money, smallmoney</font>: int (-2^31 ~ 2^31-1), bigint(-2^63~2^63-1), smallint( -2^15, 2^15-1), tinyint(0~255), decimal(precision(-38, 38), scale), float()/real-float with given number of digits. money (-922 tri &#8211; 922 tri) without currency info. smallmoney(-200000, 200000)</p>
<p>* <font color="#FF0000">date, datetime, datetime2, smalldatetime, datetimeoffset, time</font>: datetime2 (to 0.1 ms) has higher precision than datetime</p>
<p>* <font color="#FF0000">geometry, geography</font>:</p>
<p>* <u><font color="#FF0000">uniqueidentifier, rowversion</font></u>:</p>
<p>* <font color="#FF0000"><u>binary, varbinary</u>, bit, image (binary info.)<font color="#303030">:</font></font> <font color="#303030">var- variable size of binary data.</font></p>
<p>* <font color="#FF0000">xml</font><font color="#303030">:</font></p>
<p><font color="#303030">3. Use Microsoft Visual Studio / DBMS to create database (?? what&#8217;s the use of identity specification ??)</font></p>
<p><font color="#303030">4. Add <font color="#FF0000">foreign key relationship</font> through table designer (the parent column needs to be primary key) &#8212; the relationship can be viewed graphically from</font> <font color="#FF0000">database diagrams</font></p>
<p><font color="#303030">5. calculated column: we can add calculated column by:</font></p>
<p><font color="#000080">alter table xxx add &#8220;calculated column&#8221; as [formula]</font></p>
<p><font color="#303030">drop a column:</font></p>
<p><font color="#000080">alter table xxx drop column &#8220;column&#8221;</font></p>
<p><font color="#303030">we can create the calculated column as persisted, in which case this column actually takes one space on hard drive and when queried, the data is grabbed from there directly without real calculation. This is useful when the data is deterministic and saves you time:</font></p>
<p><font color="#000080">alter table xxx add &#8220;persisted column&#8221; as [formula]</font> <font color="#309860">persisted</font></p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/physicstheory.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/physicstheory.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/physicstheory.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/physicstheory.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/physicstheory.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/physicstheory.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/physicstheory.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/physicstheory.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/physicstheory.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/physicstheory.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/physicstheory.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/physicstheory.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/physicstheory.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/physicstheory.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=38&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://physicstheory.wordpress.com/2011/03/13/ms-sql-2008%e7%ac%94%e8%ae%b0%e4%b9%8b%e4%b8%87%e4%ba%8b%e5%bc%80%e5%a4%b4%e9%9a%be%ef%bc%882%ef%bc%89/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9be1dd6249af072e593896b67721c090?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">umbriel</media:title>
		</media:content>
	</item>
		<item>
		<title>MS SQL 2008笔记之万事开头难（1）</title>
		<link>http://physicstheory.wordpress.com/2011/02/24/ms-sql-2008%e7%ac%94%e8%ae%b0%e4%b9%8b%e4%b8%87%e4%ba%8b%e5%bc%80%e5%a4%b4%e9%9a%be%ef%bc%881%ef%bc%89/</link>
		<comments>http://physicstheory.wordpress.com/2011/02/24/ms-sql-2008%e7%ac%94%e8%ae%b0%e4%b9%8b%e4%b8%87%e4%ba%8b%e5%bc%80%e5%a4%b4%e9%9a%be%ef%bc%881%ef%bc%89/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 23:18:04 +0000</pubDate>
		<dc:creator>umbriel47</dc:creator>
				<category><![CDATA[Computer Science]]></category>

		<guid isPermaLink="false">http://physicstheory.wordpress.com/2011/02/24/ms-sql-2008%e7%ac%94%e8%ae%b0%e4%b9%8b%e4%b8%87%e4%ba%8b%e5%bc%80%e5%a4%b4%e9%9a%be%ef%bc%881%ef%bc%89/</guid>
		<description><![CDATA[这玩意儿，光安装就把我折腾的够呛。 一般来说有两个版本可以用，一个是express版，说是适用于学习和小型数据库的管理操作。另一个是enterprise evaluation，包括所有的功能，不过只能免费试用180天，所以。。。也是用来学习的。 今天就只说说安装。如果从来没有安装过，那就选全新安装(stand-alone installation)。期间会检查各种你应该装没有装的东西。忽略所有的warning，只看failed的项目，然后如实装上就可以了。我自己又不得不装了microsoft power shell 和 visual studio 2008 sp1。 重点来了：折腾完这些，就在Server configuration (服务器配置) 那里卡住了，怎么弄都说我的用户名密码invalid云云。在google上转了半天，发现这个错误主要来自两个原因（都和错误信息没有什么关系）： 1. 密码需要设置为强密码（Strong password）。多强叫强？我也不知道。从结果看用数字和字母（我只用了小写字母）就通过了~。 2. 用户名的问题。我是用默认的administrative的账号登陆的xp，然后至少我没有办法把这个用户作为Server client的用户，其他随便起的名字也不行。一个解决办法是打开Control panel，新建一个用户，选择limited access （不知道administrative行不行）。然后在MS SQL的Server configuration里面选择所有账户使用相同用户名密码，之后选择浏览 （browser），在分组和computer用户下面的框里搜索自己之前建立的用户（应该可以找到结果），添加进去就可以了。 以后一路无险，应该算是安装完成了。。。<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=37&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>这玩意儿，光安装就把我折腾的够呛。</p>
<p>一般来说有两个版本可以用，一个是express版，说是适用于学习和小型数据库的管理操作。另一个是enterprise evaluation，包括所有的功能，不过只能免费试用180天，所以。。。也是用来学习的。</p>
<p>今天就只说说安装。如果从来没有安装过，那就选全新安装(stand-alone installation)。期间会检查各种你应该装没有装的东西。忽略所有的warning，只看failed的项目，然后如实装上就可以了。我自己又不得不装了microsoft power shell 和 visual studio 2008 sp1。</p>
<p>重点来了：折腾完这些，就在Server configuration (服务器配置) 那里卡住了，怎么弄都说我的用户名密码invalid云云。在google上转了半天，发现这个错误主要来自两个原因（都和错误信息没有什么关系）：</p>
<p>1. 密码需要设置为强密码（Strong password）。多强叫强？我也不知道。从结果看用数字和字母（我只用了小写字母）就通过了~。</p>
<p>2. 用户名的问题。我是用默认的administrative的账号登陆的xp，然后至少我没有办法把这个用户作为Server client的用户，其他随便起的名字也不行。一个解决办法是打开Control panel，新建一个用户，选择limited access （不知道administrative行不行）。然后在MS SQL的Server configuration里面选择所有账户使用相同用户名密码，之后选择浏览 （browser），在分组和computer用户下面的框里搜索自己之前建立的用户（应该可以找到结果），添加进去就可以了。</p>
<p>以后一路无险，应该算是安装完成了。。。</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/physicstheory.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/physicstheory.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/physicstheory.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/physicstheory.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/physicstheory.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/physicstheory.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/physicstheory.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/physicstheory.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/physicstheory.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/physicstheory.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/physicstheory.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/physicstheory.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/physicstheory.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/physicstheory.wordpress.com/37/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=physicstheory.wordpress.com&amp;blog=1440524&amp;post=37&amp;subd=physicstheory&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://physicstheory.wordpress.com/2011/02/24/ms-sql-2008%e7%ac%94%e8%ae%b0%e4%b9%8b%e4%b8%87%e4%ba%8b%e5%bc%80%e5%a4%b4%e9%9a%be%ef%bc%881%ef%bc%89/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9be1dd6249af072e593896b67721c090?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">umbriel</media:title>
		</media:content>
	</item>
	</channel>
</rss>
