<?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>Kimi&#039;s Blog</title>
	<atom:link href="http://kimi-n.com/feed" rel="self" type="application/rss+xml" />
	<link>http://kimi-n.com</link>
	<description>命 运 自 己 主 宰！</description>
	<lastBuildDate>Tue, 03 Jan 2012 05:14:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>杭州&#8220;回游&#8221;记</title>
		<link>http://kimi-n.com/%e6%9d%ad%e5%b7%9e%e5%9b%9e%e6%b8%b8%e8%ae%b0</link>
		<comments>http://kimi-n.com/%e6%9d%ad%e5%b7%9e%e5%9b%9e%e6%b8%b8%e8%ae%b0#comments</comments>
		<pubDate>Mon, 02 Jan 2012 17:17:54 +0000</pubDate>
		<dc:creator>Kimi</dc:creator>
				<category><![CDATA[记忆]]></category>
		<category><![CDATA[随笔]]></category>
		<category><![CDATA[HDU]]></category>
		<category><![CDATA[ZUCC]]></category>
		<category><![CDATA[回游]]></category>
		<category><![CDATA[延安路]]></category>
		<category><![CDATA[杭州]]></category>
		<category><![CDATA[聚会]]></category>

		<guid isPermaLink="false">http://kimi-n.com/%e6%9d%ad%e5%b7%9e%e5%9b%9e%e6%b8%b8%e8%ae%b0</guid>
		<description><![CDATA[说了很久的杭州之行终于在元旦不负众望的成行。为了避开高峰期，选择在30号就偷偷地开溜，30号早上和教研室一个同学一起杀向南京南站，一路顺畅到达南京南站（有地铁就是爽，杭州的公交累死哥了。鄙视一下杭州的地铁，建了好几年都没建好）。在车站先长了一次见识，原来动车和高铁票是可以免费领取传说中铁路专供的“5100”矿泉水，想想我是浪费了多少瓶啊。动车一路飞驰，2个半小时到达了杭州城站。喔，好熟悉的气息啊。城站边“永和大王”草草解决午饭，登上537公交去往萧山驻地。初上公交，后面的人刷了一下公交卡，“嘟”，瞬间感觉自己又回到了半年多前的岁月。还没缓过神，耳边传来“因为心动，所以新动，心动传播——杭州移动电视”，太亲切啦！！！沿途小小回味了一下杭州的风景。 到达萧山驻地，通告了一帮朋友和同学，小憩之后，又杀回了市区。跟王峰相约在游泳馆见面，快6点了，哪里吃饭呢？既然来到游泳馆了，怎能不去白鹿呢？就白鹿吧，拿了号，说要等30分钟，等就等呗，反正没事，坐着聊聊。聊聊近况，工作怎样，学习怎样，爱情怎样，各种怎样……这小子竟然有女朋友了，而且还是一个刚大二的小MM，而且貌似关系还比较复杂。。。。。不知不觉等到位子，坐下后点菜，必点曲目西湖醋鱼来一个，干炸响铃来一个，蛋黄鸡翅来一份，又点了牛蛙和生菜，两瓶啤酒。嗯嗯，味道不错，赞！边吃边聊。吃完饭，送我到公交站。分别之时，我习惯性地摆了摆手，这小子伸手说握下手，好吧，工作的人就是不一样。回到萧山，上会小网，洗洗睡觉。 第二天早上，睡到9点多，起床后，驻地附近闲逛了一下。吃完午饭，杀回市区，去ZUCC见一下以前的班主任唐老师。本来准备坐公交到武林门附近，然后游8去ZUCC，发现游8不是一般的挤，游8依然不减当年风采啊。好吧，果断打车。后来发现，打车是一个更错误的选择，不仅打不到车，而且市区巨堵。12月31号，市区各大商场疯狂打折，所以市民们疯狂大血拼，通宵购物，那种情景，大家可以想象一下。好不容易打到一辆车，路上广播里说，上塘高架都堵到瓜山了，好吧，瓜山啊！！出杭州城了，有木有！！一路堵到ZUCC，下车，ZUCC还是那样，木有变化，顺利找到唐老师办公室。一进门，看到唐老师又在辅导学生微积分，好吧，果然敬业，都年末了，还辅导学生。向唐老师汇报了一些最近的情况，聊了聊以后的想法。之后又来一个同学，我们和唐老师天南海北地聊。招呼以前同学晚上一起吃饭聚聚，谁知道各种没空啊，出差的，回家的，堵在路上的，公司突发事故的……最终只招呼了部分同学来。本来准备去市区吃的，考虑到市区堵得那个惨样，再加上人不多，那就学校附近找个地方聚聚吧。点了几个菜，我觉着不够，唐老师一个劲地说够了，我又多点了两个。吃着吃着，发现没有菜了，叫来服务员，加了三四个。再吃，又不够了，再加三四个。吃完饭，像我这种住萧山这么远的，只好先回了，告别同学和唐老师，打车去城站做直达萧山的车。到达驻地，感觉每天这么来回市区萧山的奔，实在是太累，而且还浪费时间，于是决定去市区住。在网上订房，元旦期间，订房那是相当困难，便宜的满房，有房的又贵，咋办呢？突然想起来，格林豪泰有个什么998特价房，99块8任意房型住一晚，普通会员可凭身份证享受一次，恩，不错，找了一圈，只有彭埠附近还有空，好吧就那里了。果断订下一个双标，正好小熊也到杭州了，可以两个人一起住。 第三天早上，早早起床，收拾好东西去往彭埠，开好房间，坐B1去市区。B1那简直就是重灾区啊，完全沦陷了。pass了四辆，第五辆来了，嗯，有点空位，可以勉强上一只脚，踩上一只脚，后面人猛推我一把，喔耶，终于上来了。一路上根本不用扶把手就能够站得很稳，下沙的同学应该可以明白那样的场景。晃晃悠悠来到杭州大厦站（想想现在在南京，地铁到市区灰常方便，再次鄙视一下杭州的地铁），下车之后回望一下B1，我去，整个车基本空了！！！好吧，都是来延安路这里血拼的。杭州大厦基本都是奢侈品，太贵了，不适合我这种，还是去百大和银泰看看吧。进到百大，我天……人山人海。百大里逛来逛去，又到银泰逛来逛去，期间各种试穿，各种心动，但是，最终还是没有行动。好吧，鄙视自己一下。姜赟姐姐来电话，说中午一起吃饭，好的，聚聚呗，正好瞧瞧她刚出生的宝宝。开车在百大下接到我，额，宝宝呢？原来宝宝被带去湖州了，好吧，没看成。正好，哥的红包也省了。七拐八拐来到一个“新开元酒店”，哎哟，这酒店看上去不错。落座后聊聊近况，边吃边侃。嗯，口味不错，清淡又不失口感。 下午，姐夫送我到浙大玉泉，与jj、居启、timmy、毛毛、black等人在此相聚。旁观了一会他们打球，期间black同学又多了一个称号——“black elephant”，啊哈哈。然后去到jj寝室，参观了一下，那个好啊，让我羡慕了一下，毛毛很鄙视的说：“这也叫好？我们杭电比这个好多了。”额……好吧。一帮人决定去人类已经无法阻止的“海底捞”，打车吧，又是各种纠结，难打呀。好不容易打到车，杀到涌金广场。等了一会，timmy同学把他女人预订的位子给拿了过来，把我们拿的号给了她，好吧，对不住了。一群人吃得热火朝天，期间各种海聊，各种搞笑。“组织”的人聚在一起，果然乐趣无穷啊。嗯嗯，这种感觉好。吃完饭，该散了。timmy陪女朋友去，我们一帮人都要去黄龙附近转车，一起公交吧。公交上，我们读研的一帮人无意识地各种聊，剩下两个工作的静静地站在一边。小熊说这现象好诡异，很多同学聚会都会发生。好吧，难道是木有共同语言了么？到黄龙，大家分别。我，小熊，毛毛一起坐B1去往下沙方向，毛毛本来要回学校，但被我们在彭埠强行拉下。三个人住双标房，两张床合并成一张，三个人睡正好够宽敞。期间，各种搞笑，各种“基情”，哈哈哈，可怜的毛毛。 第四天早上，不知不觉睡到10点多，本来还信誓旦旦的说要去西溪湿地玩玩，看来是没时间了，去市区再玩玩吧。第二乐章吃饭，一直听说这家餐厅，这次终于来了。吃完饭，杭大、百大、银泰继续逛。不知不觉快四点了，我得去火车南站准备回南京了。小熊和毛毛送我到公交站。挥手告别后，上车，找到一个位子，打个盹吧，不想一个小盹一打，竟然都到火车南站了。网购专窗口取票，看着旁边排着长长的队伍买票的人，意识到原来春运快来了，快过年了。取完票，时间还早，找个地方解决一下晚饭吧。吃完饭，排队候车，上车后继续打盹，一睁眼，都到苏州了，原来一觉睡了两个小时。9点半到达南京，匆匆走向地铁站，刷卡进站，上车，新街口换乘，很快到下马坊，走到寝室，打电话通知大家平安到达。至此，杭州之行圆满结束。 在杭州四天时间，木有去任何景点，我知道这种时候景点都是重灾区，人满为患，去了不是看风景，而是看人头。再说，大学四年，杭州的主要景点也都基本逛遍了，短时间内应该不会有啥大变化吧。杭州期间，感谢各位杭州同学的招待，在此不一一@了。 好吧，就记到这吧，睡了睡了。]]></description>
			<content:encoded><![CDATA[<p>说了很久的杭州之行终于在元旦不负众望的成行。为了避开高峰期，选择在30号就偷偷地开溜，30号早上和教研室一个同学一起杀向南京南站，一路顺畅到达南京南站（有地铁就是爽，杭州的公交累死哥了。鄙视一下杭州的地铁，建了好几年都没建好<img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-thumbsdown" alt="太差了" src="http://kimi-n.com/wp-content/uploads/2012/01/wlEmoticon-thumbsdown.png" />）。在车站先长了一次见识，原来动车和高铁票是可以免费领取传说中铁路专供的“5100”矿泉水，想想我是浪费了多少瓶啊。动车一路飞驰，2个半小时到达了杭州城站。喔，好熟悉的气息啊。城站边“永和大王”草草解决午饭，登上537公交去往萧山驻地。初上公交，后面的人刷了一下公交卡，“嘟”，瞬间感觉自己又回到了半年多前的岁月。还没缓过神，耳边传来“因为心动，所以新动，心动传播——杭州移动电视”，太亲切啦！！！<img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-openmouthedsmile" alt="大笑" src="http://kimi-n.com/wp-content/uploads/2012/01/wlEmoticon-openmouthedsmile.png" />沿途小小回味了一下杭州的风景。</p>
<p>到达萧山驻地，通告了一帮朋友和同学，小憩之后，又杀回了市区。跟王峰相约在游泳馆见面，快6点了，哪里吃饭呢？既然来到游泳馆了，怎能不去白鹿呢？就白鹿吧，拿了号，说要等30分钟，等就等呗，反正没事，坐着聊聊。聊聊近况，工作怎样，学习怎样，爱情怎样，各种怎样……这小子竟然有女朋友了，而且还是一个刚大二的小MM，而且貌似关系还比较复杂。。。。。不知不觉等到位子，坐下后点菜，必点曲目西湖醋鱼来一个，干炸响铃来一个，蛋黄鸡翅来一份，又点了牛蛙和生菜，两瓶啤酒。嗯嗯，味道不错，赞！边吃边聊。吃完饭，送我到公交站。分别之时，我习惯性地摆了摆手，这小子伸手说握下手，好吧，工作的人就是不一样。回到萧山，上会小网，洗洗睡觉。</p>
<p>第二天早上，睡到9点多，起床后，驻地附近闲逛了一下。吃完午饭，杀回市区，去ZUCC见一下以前的班主任唐老师。本来准备坐公交到武林门附近，然后游8去ZUCC，发现游8不是一般的挤，游8依然不减当年风采啊。好吧，果断打车。后来发现，打车是一个更错误的选择，不仅打不到车，而且市区巨堵。12月31号，市区各大商场疯狂打折，所以市民们疯狂大血拼，通宵购物，那种情景，大家可以想象一下。好不容易打到一辆车，路上广播里说，上塘高架都堵到瓜山了，好吧，瓜山啊！！出杭州城了，有木有！！一路堵到ZUCC，下车，ZUCC还是那样，木有变化，顺利找到唐老师办公室。一进门，看到唐老师又在辅导学生微积分，好吧，果然敬业，都年末了，还辅导学生<img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-thumbsup" alt="太棒了" src="http://kimi-n.com/wp-content/uploads/2012/01/wlEmoticon-thumbsup.png" />。向唐老师汇报了一些最近的情况，聊了聊以后的想法。之后又来一个同学，我们和唐老师天南海北地聊。招呼以前同学晚上一起吃饭聚聚，谁知道各种没空啊，出差的，回家的，堵在路上的，公司突发事故的……最终只招呼了部分同学来。本来准备去市区吃的，考虑到市区堵得那个惨样，再加上人不多，那就学校附近找个地方聚聚吧。点了几个菜，我觉着不够，唐老师一个劲地说够了，我又多点了两个。吃着吃着，发现没有菜了，叫来服务员，加了三四个。再吃，又不够了，再加三四个。吃完饭，像我这种住萧山这么远的，只好先回了，告别同学和唐老师，打车去城站做直达萧山的车。到达驻地，感觉每天这么来回市区萧山的奔，实在是太累，而且还浪费时间，于是决定去市区住。在网上订房，元旦期间，订房那是相当困难，便宜的满房，有房的又贵，咋办呢？突然想起来，格林豪泰有个什么998特价房，99块8任意房型住一晚，普通会员可凭身份证享受一次，恩，不错，找了一圈，只有彭埠附近还有空，好吧就那里了。果断订下一个双标，正好小熊也到杭州了，可以两个人一起住。</p>
<p>  <span id="more-217"></span>
<p>第三天早上，早早起床，收拾好东西去往彭埠，开好房间，坐B1去市区。B1那简直就是重灾区啊，完全沦陷了。pass了四辆，第五辆来了，嗯，有点空位，可以勉强上一只脚，踩上一只脚，后面人猛推我一把，喔耶，终于上来了。一路上根本不用扶把手就能够站得很稳，下沙的同学应该可以明白那样的场景。晃晃悠悠来到杭州大厦站（想想现在在南京，地铁到市区灰常方便，再次鄙视一下杭州的地铁），下车之后回望一下B1，我去，整个车基本空了！！！好吧，都是来延安路这里血拼的。杭州大厦基本都是奢侈品，太贵了，不适合我这种，还是去百大和银泰看看吧。进到百大，我天……人山人海。百大里逛来逛去，又到银泰逛来逛去，期间各种试穿，各种心动，但是，最终还是没有行动。好吧，鄙视自己一下。姜赟姐姐来电话，说中午一起吃饭，好的，聚聚呗，正好瞧瞧她刚出生的宝宝。开车在百大下接到我，额，宝宝呢？原来宝宝被带去湖州了，好吧，没看成。正好，哥的红包也省了。七拐八拐来到一个“新开元酒店”，哎哟，这酒店看上去不错。落座后聊聊近况，边吃边侃。嗯，口味不错，清淡又不失口感。</p>
<p>下午，姐夫送我到浙大玉泉，与jj、居启、timmy、毛毛、black等人在此相聚。旁观了一会他们打球，期间black同学又多了一个称号——“black elephant”，啊哈哈。然后去到jj寝室，参观了一下，那个好啊，让我羡慕了一下，毛毛很鄙视的说：“这也叫好？我们杭电比这个好多了。”额……好吧。一帮人决定去人类已经无法阻止的“海底捞”，打车吧，又是各种纠结，难打呀。好不容易打到车，杀到涌金广场。等了一会，timmy同学把他女人预订的位子给拿了过来，把我们拿的号给了她，好吧，对不住了。一群人吃得热火朝天，期间各种海聊，各种搞笑。“组织”的人聚在一起，果然乐趣无穷啊。嗯嗯，这种感觉好。吃完饭，该散了。timmy陪女朋友去，我们一帮人都要去黄龙附近转车，一起公交吧。公交上，我们读研的一帮人无意识地各种聊，剩下两个工作的静静地站在一边。小熊说这现象好诡异，很多同学聚会都会发生。好吧，难道是木有共同语言了么？到黄龙，大家分别。我，小熊，毛毛一起坐B1去往下沙方向，毛毛本来要回学校，但被我们在彭埠强行拉下。三个人住双标房，两张床合并成一张，三个人睡正好够宽敞。期间，各种搞笑，各种“基情”，哈哈哈，可怜的毛毛<img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-rollingonthefloorlaughing" alt="捧腹大笑" src="http://kimi-n.com/wp-content/uploads/2012/01/wlEmoticon-rollingonthefloorlaughing.png" />。</p>
<p>第四天早上，不知不觉睡到10点多，本来还信誓旦旦的说要去西溪湿地玩玩，看来是没时间了，去市区再玩玩吧。第二乐章吃饭，一直听说这家餐厅，这次终于来了。吃完饭，杭大、百大、银泰继续逛。不知不觉快四点了，我得去火车南站准备回南京了。小熊和毛毛送我到公交站。挥手告别后，上车，找到一个位子，打个盹吧，不想一个小盹一打，竟然都到火车南站了。网购专窗口取票，看着旁边排着长长的队伍买票的人，意识到原来春运快来了，快过年了。取完票，时间还早，找个地方解决一下晚饭吧。吃完饭，排队候车，上车后继续打盹，一睁眼，都到苏州了，原来一觉睡了两个小时。9点半到达南京，匆匆走向地铁站，刷卡进站，上车，新街口换乘，很快到下马坊，走到寝室，打电话通知大家平安到达。至此，杭州之行圆满结束。</p>
<p>在杭州四天时间，木有去任何景点，我知道这种时候景点都是重灾区，人满为患，去了不是看风景，而是看人头。再说，大学四年，杭州的主要景点也都基本逛遍了，短时间内应该不会有啥大变化吧。杭州期间，感谢各位杭州同学的招待，在此不一一@了。</p>
<p>好吧，就记到这吧，睡了睡了。</p>
]]></content:encoded>
			<wfw:commentRss>http://kimi-n.com/%e6%9d%ad%e5%b7%9e%e5%9b%9e%e6%b8%b8%e8%ae%b0/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>幽默搞笑，有关程序员的笑话</title>
		<link>http://kimi-n.com/some-jokes-about-programmer</link>
		<comments>http://kimi-n.com/some-jokes-about-programmer#comments</comments>
		<pubDate>Thu, 16 Sep 2010 05:50:52 +0000</pubDate>
		<dc:creator>Kimi</dc:creator>
				<category><![CDATA[娱乐]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[程序员]]></category>

		<guid isPermaLink="false">http://kimi-n.com/%e5%b9%bd%e9%bb%98%e6%90%9e%e7%ac%91%ef%bc%8c%e6%9c%89%e5%85%b3%e7%a8%8b%e5%ba%8f%e5%91%98%e7%9a%84%e7%ac%91%e8%af%9d</guid>
		<description><![CDATA[1、一个合格的程序员是不会写出 诸如 “摧毁地球” 这样的程序的，他们会写一个函数叫 “摧毁行星”而把地球当一个参数传进去。 2、Borland说我很有前途，Sun笑了；Sun说我很有钱，IBM笑了；IBM说我很专业，Sybase笑了；Sybase说我数据库很牛，Oracle笑了；Oracle说我是开放的，Linux笑了；Linux说我要打败Unix，微软笑了；微软说我的系统很稳定，我们都笑了。 3、一程序员告老还乡，想安度晚年，于是决定在书法上有所造诣。省略数字……，准备好文房4宝，挥起毛笔在白纸上郑重的写下：Hello World 4、一位程序员去海边游泳，由于水性不佳，游不回岸了，于是他挥着手臂，大声求.救：“F1，F1！” 5、这个世界上只有10种人：懂得二进制的和不懂得二进制的。 6、真正的程序员喜欢兼卖爆米花，他们利用CPU散发出的热量做爆米花，可以根据米花爆裂的速度听出正在运行什么程序。 7、小沈阳版程序员~~~ （个人认为这个最搞）      程序员其实可痛苦的了&#8230;&#8230;需求一做一改，一个月就过去了；嚎~      需求再一改一调，一季度就过去了；嚎~      程序员最痛苦的事儿是啥，知道不？就是，程序没做完，需求又改了；      程序员最最痛苦的事儿是啥，知道不？ 就是，系统好不容易做完了，方案全改了；       程序员最最最痛苦的事儿是啥，知道不？ 就是，系统做完了，狗日的客户跑了；      程序员最最最最最痛苦的事儿是啥，知道不？ 就是，狗日的客户又回来了,程序给删没了！   8、程序员的祝福      祝大家在以后的日子里. 男生象Oracle般健壮; 女生象win7般漂亮; 桃花运象IE中毒般频繁; 钱包如Gmail容量般壮大, 升职速度赶上微软打补丁 ， 追女朋友像木马一样猖獗， 生活像重装电脑后一样幸福， 写程序敲代码和聊天一样有激情。 9、从以下对白可见,未来天才程序员的思维模式! 某日,老师在课堂上想考考学生们的智商,就问一个男孩: “树上有十只鸟,开枪打死一只,还剩几只?” 男孩反问:“是无声手枪，还是其他没有声音的枪么?” “不是.” “枪声有多大?” “80~100分贝.” “那就是说会震的耳朵疼?” “是.” “在这个城市里打鸟犯不犯法?” ‘不犯.” “您确定那只鸟真的被打死啦?” “确定.”老师已经不耐烦了,”拜托,你告诉我还剩几只就行了,OK?” “OK.鸟里有没有聋子?” [...]]]></description>
			<content:encoded><![CDATA[<p>1、一个合格的程序员是不会写出 诸如 “摧毁地球” 这样的程序的，他们会写一个函数叫 “摧毁行星”而把地球当一个参数传进去。<br />
2、Borland说我很有前途，Sun笑了；Sun说我很有钱，IBM笑了；IBM说我很专业，Sybase笑了；Sybase说我数据库很牛，Oracle笑了；Oracle说我是开放的，Linux笑了；Linux说我要打败Unix，微软笑了；微软说我的系统很稳定，我们都笑了。<br />
3、一程序员告老还乡，想安度晚年，于是决定在书法上有所造诣。省略数字……，准备好文房4宝，挥起毛笔在白纸上郑重的写下：Hello World<br />
4、一位程序员去海边游泳，由于水性不佳，游不回岸了，于是他挥着手臂，大声求.救：“F1，F1！”<br />
5、这个世界上只有10种人：懂得二进制的和不懂得二进制的。<br />
6、真正的程序员喜欢兼卖爆米花，他们利用CPU散发出的热量做爆米花，可以根据米花爆裂的速度听出正在运行什么程序。<br />
7、小沈阳版程序员~~~ <strong>（个人认为这个最搞）<br />
</strong>     程序员其实可痛苦的了&#8230;&#8230;需求一做一改，一个月就过去了；嚎~<br />
     需求再一改一调，一季度就过去了；嚎~<br />
     程序员最痛苦的事儿是啥，知道不？就是，程序没做完，需求又改了；<br />
     程序员最最痛苦的事儿是啥，知道不？ 就是，系统好不容易做完了，方案全改了； <br />
     程序员最最最痛苦的事儿是啥，知道不？ 就是，系统做完了，狗日的客户跑了；<br />
     程序员最最最最最痛苦的事儿是啥，知道不？ 就是，狗日的客户又回来了,程序给删没了！</p>
<p><span id="more-205"></span> <br />
8、程序员的祝福<br />
     祝大家在以后的日子里. 男生象Oracle般健壮; 女生象win7般漂亮; 桃花运象IE中毒般频繁; 钱包如Gmail容量般壮大, 升职速度赶上微软打补丁 ， 追女朋友像木马一样猖獗， 生活像重装电脑后一样幸福， 写程序敲代码和聊天一样有激情。<br />
9、从以下对白可见,未来天才程序员的思维模式!<br />
某日,老师在课堂上想考考学生们的智商,就问一个男孩: “树上有十只鸟,开枪打死一只,还剩几只?”<br />
男孩反问:“是无声手枪，还是其他没有声音的枪么?”<br />
“不是.”<br />
“枪声有多大?”<br />
“80~100分贝.”<br />
“那就是说会震的耳朵疼?”<br />
“是.”<br />
“在这个城市里打鸟犯不犯法?”<br />
‘不犯.”<br />
“您确定那只鸟真的被打死啦?”<br />
“确定.”老师已经不耐烦了,”拜托,你告诉我还剩几只就行了,OK?”<br />
“OK.鸟里有没有聋子?”<br />
“没有.”<br />
“有没有鸟智力有问题，呆傻到听到枪响不知道飞的？”<br />
“没有，智商都在200以上！”<br />
“有没有关在笼子里的?”<br />
“没有.”<br />
“边上还有没有其他的树,树上还有没有其他鸟?”<br />
“没有.” “方圆十里呢?” “就这么一棵树!”<br />
“有没有残疾或饿的飞不动的鸟?”<br />
“没有,都身体倍棒.”<br />
“算不算怀孕肚子里的小鸟?”<br />
“都是公的.”<br />
“都不可能怀孕?”<br />
“………,决不可能.”<br />
“打鸟的人眼里有没有花?保证是十只?”<br />
“没有花,就十只.” 老师脑门上的汗已经流下来了,<br />
下课铃响起,但男孩仍继续问:“有没有傻的不怕死的?”<br />
“都怕死.”<br />
“有没有因为情侣被打中,自己留下来的?”<br />
“笨蛋,之前不是说都是公的嘛!”<br />
“同志可不可以啊!”<br />
“………….,性取向都很正常!”<br />
“会不会一枪打死两只?”<br />
“不会.”<br />
“一枪打死三只呢?”<br />
“不会.”<br />
“四只呢?”<br />
“更不会!”<br />
“五只呢?”<br />
“绝对不会!!!”<br />
“那六只总有可能吧?”<br />
“除非你他妈的是猪生的才有可能!一枪只能打死一只！”<br />
“…好吧,那么所有的鸟都可以自由活动么?”<br />
“完全可以.”<br />
“它们受到惊吓起飞时会不会惊慌失措而互相撞上?”<br />
“不会,每只鸟都装有卫星导航系统,而且可以自动飞行.”<br />
“恩,如果您的回答没有骗人,”学生满怀信心的回答,“打死的鸟要是挂在树上没掉下来,那么就剩一只,如果掉下来,就一只不剩.”<br />
老师推推眼镜，强忍着要昏倒的感觉，颤抖地说道：“你可以去当程序员了……”</p>
]]></content:encoded>
			<wfw:commentRss>http://kimi-n.com/some-jokes-about-programmer/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>一个虽然很SB，但却很难玩的小游戏——蠢蛋测试</title>
		<link>http://kimi-n.com/the-moron-test</link>
		<comments>http://kimi-n.com/the-moron-test#comments</comments>
		<pubDate>Sat, 04 Sep 2010 16:26:30 +0000</pubDate>
		<dc:creator>Kimi</dc:creator>
				<category><![CDATA[娱乐]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[game]]></category>

		<guid isPermaLink="false">http://kimi-n.com/?p=203</guid>
		<description><![CDATA[晚上，有人传给我一个小游戏，一看文件名字“蠢蛋测试”，我就以为又是那种很无聊的游戏，所以就没去理他，接过来就扔在那边没去管它。后来无聊了，就打开它看看什么东西，不玩不知道，原来还是蛮难的，说说是蠢蛋测试，其实它就是一款考验你各种基本能力的游戏。 这个游戏原名就叫“The moron test”，原来是iphone上的一个游戏，然后被网友原样移植到了Windows中。各位可以测试一下，看自己能不能快速通关噢！ 游戏点这下载：The Moron Test。游戏需要.net framework2.0支持。传送门：.net framework2.0。]]></description>
			<content:encoded><![CDATA[<p>晚上，有人传给我一个小游戏，一看文件名字“蠢蛋测试”，我就以为又是那种很无聊的游戏，所以就没去理他，接过来就扔在那边没去管它。后来无聊了，就打开它看看什么东西，不玩不知道，原来还是蛮难的，说说是蠢蛋测试，其实它就是一款考验你各种基本能力的游戏。</p>
<p>这个游戏原名就叫“The moron test”，原来是iphone上的一个游戏，然后被网友原样移植到了Windows中。各位可以测试一下，看自己能不能快速通关噢！</p>
<p>游戏点这下载：<a href="http://kimi-n.com/uploads/The moron test.rar" target="_blank">The Moron Test</a>。游戏需要.net framework2.0支持。传送门：<a href="http://download.microsoft.com/download/5/6/7/567758a3-759e-473e-bf8f-52154438565a/dotnetfx.exe" target="_blank">.net framework2.0</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://kimi-n.com/the-moron-test/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>杂碎</title>
		<link>http://kimi-n.com/2010-8-12</link>
		<comments>http://kimi-n.com/2010-8-12#comments</comments>
		<pubDate>Thu, 12 Aug 2010 14:51:00 +0000</pubDate>
		<dc:creator>Kimi</dc:creator>
				<category><![CDATA[随笔]]></category>
		<category><![CDATA[杂谈]]></category>
		<category><![CDATA[考研]]></category>
		<category><![CDATA[高温]]></category>

		<guid isPermaLink="false">http://kimi-n.com/%e6%9d%82%e7%a2%8e</guid>
		<description><![CDATA[      在我的再三强烈要求下，老爸老妈勉强同意我回学校。8月8号（突然发现这日子不错^_^）那天老爸亲自开车，老妈压车送我来学校。一路上没啥好说的，一马平川。在半路上，看到一辆“别摸我”（BMW）从我们车旁超了过去，老爸惊叹了一下：“宝马啊！”，不知道当时我脑子是怎么想的，随口就来了一句：“看他不爽，上去撞它一下。”囧。因此被老爸教育了一通。-_-&#124;&#124;       到学校之后发现很多考研的同学都在了，真刻苦啊。哥哥好歹也在家享受了一个月，这些个兄弟们根本就没回家啊。二话不说，第二天一早便也积极的开始投入战斗。刚开始两天还好，气候算不上凉爽但也还不算很热。家里面，爷爷奶奶、老爸老妈仍然不放心的每天一两个电话的询问：“热啊？受得了吗？”，我都以“还行还行”来回答。到了这两天，气温又回升了，今天最高温索性就飙到了摄氏39，简直就不让人活了。据说高温还要持续个几天，忍着吧。用红毛的话说“考研是很锻炼意志力的”。      昨天晚上跟振江和敬哥去打了一个多小时的羽毛球，那个累啊。红毛去游泳了所以没能双打，我跟振江打敬哥，2 对1，谁让敬哥强呢。后来来了几个人主动提出跟我们打，好吧，那就打呗。打了好长一段时间，累趴下了——长时间不打球的后果。话说回家的时候信誓旦旦的说每天要去打球或者跑步啥的，到最后根本就没兑现，只是偶尔去打了场羽毛球，还是被虐的。看来以后还得多运动运动，身体这玩意太重要了。            今天下午，热得实在受不了了，本来打算不去教室看书，在寝室里给自己放半天假的。但经过了激烈的思想斗争后还是决定去了。到了教室才发现，那个热啊，根本没法定下心来看书。算了，到图书馆去找找看，说不定还能找个位置。跟小熊、军奇三人跑到图书馆。刚进图书馆的大厅，哇！那个爽啊！太凉快了！二楼自修室是不用想了，肯定人满为患。三楼阅览室看看吧，恩，不错，找到三个位置。终于可以舒舒服服的看书啦。坐在我旁边的那个女的在那绣十字绣，我当时心里就在想：“同学，图书馆资源这么紧张，您跑过来享受着冷气，却在那绣十字绣，不觉得有点浪费吗？让出来给其他人看看书也是好的啊！”算了，不管我的事，看书吧。突然那女的向我跟小熊说话了，问我们是不是考研的，还让小熊不要看课本了，直接看资料。聊了才知道，原来她是上一届的，刚刚考了工商的研究生，现在是在陪同学（说是同学，我们一致认为是男朋友，不然大热天的不在家好好呆着，陪同学考研干嘛！）在学校复习考研。请教了几个比较关心的问题后继续看书。大概3点半吧，阅览室清场了，被请了出来。我靠，去哪呢？不会让我在回教室去看书吧。抱着一丝侥幸的心理，跟小熊他们到二楼的自修室里去转了一圈，发现几个空位置，火速抢下。哈哈。不错不错，继续看书。有冷气的地方感觉就是不一样，看书效率高多了，哪像在教室里，光顾着擦汗了，哪还看什么书啊！跟小熊合计了一下，明早早点起，到图书馆去抢个位置，明天一天就泡在里面了。嗯嗯。想想都觉得舒服。      杜老弟学校的事情总算是落实下来，也算是家里的一块大石头落地了吧。全家人为了他可是操了一个月的心呐。虽然只是个大专，但还不错吧。没办法，高考成绩在那呢，也只能这样了。他说过两天想去看世博，让我陪他去。好，去就去吧，反正我也还没去呢。吃住在他三叔家搞定，也好，省得哥以后再花钱住宾馆。     就写这么多吧，洗澡洗衣服去咯。。。。]]></description>
			<content:encoded><![CDATA[<p>      在我的再三强烈要求下，老爸老妈勉强同意我回学校。8月8号（突然发现这日子不错^_^）那天老爸亲自开车，老妈压车送我来学校。一路上没啥好说的，一马平川。在半路上，看到一辆“别摸我”（BMW）从我们车旁超了过去，老爸惊叹了一下：“宝马啊！”，不知道当时我脑子是怎么想的，随口就来了一句：“看他不爽，上去撞它一下。”囧。因此被老爸教育了一通。-_-||</p>
<p>      到学校之后发现很多考研的同学都在了，真刻苦啊。哥哥好歹也在家享受了一个月，这些个兄弟们根本就没回家啊。二话不说，第二天一早便也积极的开始投入战斗。刚开始两天还好，气候算不上凉爽但也还不算很热。家里面，爷爷奶奶、老爸老妈仍然不放心的每天一两个电话的询问：“热啊？受得了吗？”，我都以“还行还行”来回答。到了这两天，气温又回升了，今天最高温索性就飙到了摄氏39，简直就不让人活了。据说高温还要持续个几天，忍着吧。用红毛的话说“考研是很锻炼意志力的”。</p>
<p>     昨天晚上跟振江和敬哥去打了一个多小时的羽毛球，那个累啊。红毛去游泳了所以没能双打，我跟振江打敬哥，2 对1，谁让敬哥强呢。后来来了几个人主动提出跟我们打，好吧，那就打呗。打了好长一段时间，累趴下了——长时间不打球的后果。话说回家的时候信誓旦旦的说每天要去打球或者跑步啥的，到最后根本就没兑现，只是偶尔去打了场羽毛球，还是被虐的。看来以后还得多运动运动，身体这玩意太重要了。  </p>
<p><span id="more-197"></span>         今天下午，热得实在受不了了，本来打算不去教室看书，在寝室里给自己放半天假的。但经过了激烈的思想斗争后还是决定去了。到了教室才发现，那个热啊，根本没法定下心来看书。算了，到图书馆去找找看，说不定还能找个位置。跟小熊、军奇三人跑到图书馆。刚进图书馆的大厅，哇！那个爽啊！太凉快了！二楼自修室是不用想了，肯定人满为患。三楼阅览室看看吧，恩，不错，找到三个位置。终于可以舒舒服服的看书啦。坐在我旁边的那个女的在那绣十字绣，我当时心里就在想：“同学，图书馆资源这么紧张，您跑过来享受着冷气，却在那绣十字绣，不觉得有点浪费吗？让出来给其他人看看书也是好的啊！”算了，不管我的事，看书吧。突然那女的向我跟小熊说话了，问我们是不是考研的，还让小熊不要看课本了，直接看资料。聊了才知道，原来她是上一届的，刚刚考了工商的研究生，现在是在陪同学（说是同学，我们一致认为是男朋友，不然大热天的不在家好好呆着，陪同学考研干嘛！）在学校复习考研。请教了几个比较关心的问题后继续看书。大概3点半吧，阅览室清场了，被请了出来。我靠，去哪呢？不会让我在回教室去看书吧。抱着一丝侥幸的心理，跟小熊他们到二楼的自修室里去转了一圈，发现几个空位置，火速抢下。哈哈。不错不错，继续看书。有冷气的地方感觉就是不一样，看书效率高多了，哪像在教室里，光顾着擦汗了，哪还看什么书啊！跟小熊合计了一下，明早早点起，到图书馆去抢个位置，明天一天就泡在里面了。嗯嗯。想想都觉得舒服。</p>
<p>     杜老弟学校的事情总算是落实下来，也算是家里的一块大石头落地了吧。全家人为了他可是操了一个月的心呐。虽然只是个大专，但还不错吧。没办法，高考成绩在那呢，也只能这样了。他说过两天想去看世博，让我陪他去。好，去就去吧，反正我也还没去呢。吃住在他三叔家搞定，也好，省得哥以后再花钱住宾馆。</p>
<p>    就写这么多吧，洗澡洗衣服去咯。。。。</p>
]]></content:encoded>
			<wfw:commentRss>http://kimi-n.com/2010-8-12/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PhotoShop靠边，强人只喜欢在Excel上作画</title>
		<link>http://kimi-n.com/draw-in-excel-not-photoshop</link>
		<comments>http://kimi-n.com/draw-in-excel-not-photoshop#comments</comments>
		<pubDate>Sat, 10 Jul 2010 11:37:02 +0000</pubDate>
		<dc:creator>Kimi</dc:creator>
				<category><![CDATA[娱乐]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[ps]]></category>
		<category><![CDATA[牛人]]></category>

		<guid isPermaLink="false">http://kimi-n.com/?p=184</guid>
		<description><![CDATA[今天在人人上看到有人分享这个视频，感觉太犀利了……]]></description>
			<content:encoded><![CDATA[<p>今天在人人上看到有人分享这个视频，感觉太犀利了……</p>
<p><object style="width: 480px; height: 400px;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://player.youku.com/player.php/sid/XMTU0NTQ4NTUy/v.swf" /><embed style="width: 480px; height: 400px;" type="application/x-shockwave-flash" width="480" height="400" src="http://player.youku.com/player.php/sid/XMTU0NTQ4NTUy/v.swf"></embed></object><a href="http://v.youku.com/v_show/id_XMTU0NTQ4NTUy.html"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://kimi-n.com/draw-in-excel-not-photoshop/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>C#中常用JS语句</title>
		<link>http://kimi-n.com/the-common-js-in-csharp</link>
		<comments>http://kimi-n.com/the-common-js-in-csharp#comments</comments>
		<pubDate>Fri, 28 May 2010 05:50:54 +0000</pubDate>
		<dc:creator>Kimi</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://kimi-n.com/?p=167</guid>
		<description><![CDATA[有时候在开发中，经常输出一些js与客户端实现交互，虽然说是c#的其实好多js的，需要的朋友可以收藏下。 1. 输出语句 document.write(&#8220;&#8221;); 输出语句 2.JS中的注释为// 3.传统的HTML文档顺序是:document-&#38;gt;html-&#38;gt;(head,body) 4.一个浏览器窗口中的DOM顺序是:window-&#38;gt;(navigator,screen,history,location,document) 5.得到表单中元素的名称和值:document.getElementById(&#8220;表单中元素的ID號&#8221;).name(或value) 6.一个小写转大写的JS: document.getElementById(&#8220;output&#8221;).value = document.getElementById(&#8220;input&#8221;).value.toUpperCase(); 7.JS中的值类型:String,Number,Boolean,Null,Object,Function 8.JS中的字符型转换成数值型:parseInt(),parseFloat() 9.JS中的数字转换成字符型:(&#8220;&#8221; 变量) 10.JS中的取字符串长度是:(length) 11.JS中的字符与字符相连接使用 號. 12.JS中的比较操作符有:==等于,!=不等于,&#38;gt;,&#38;gt;=,&#38;lt;.&#38;lt;= 13.JS中声明变量使用:var来进行声明 14.JS中的判断语句结构:if(condition){}else{} 15.JS中的循环结构:for([initial expression];[condition];[upadte expression]) {inside loop} 16.循环中止的命令是:break 17.JS中的函数定义:function functionName([parameter],&#8230;){statement[s]} 18.当文件中出现多个form表单时.可以用document.forms[0],document.forms[1]来代替. 19.窗口:打开窗口window.open(), 关闭一个窗口:window.close(), 窗口本身:self 20.状態栏的设置:window.status=&#8221;字符&#8221;; 21.弹出提示信息:window.alert(&#8220;字符&#8221;); 22.弹出確认框:window.confirm(); 23.弹出输入提示框:window.prompt(); 24.指定当前显示链接的位置:window.location.href=&#8221;URL&#8221; 25.取出窗体中的所有表单的数量:document.forms.length 26.关闭文档的输出流:document.close(); 27.字符串追加连接符: = 28.创建一个文档元素:document.createElement(),document.createTextNode() 29.得到元素的方法:document.getElementById() 30.设置表单中所有文本型的成员的值为空: var form = window.document.forms[0] for (var i = [...]]]></description>
			<content:encoded><![CDATA[<p>有时候在开发中，经常输出一些js与客户端实现交互，虽然说是c#的其实好多js的，需要的朋友可以收藏下。<br />
1. 输出语句 document.<a href="http://kimi-n.com/tag/write" class="st_tag internal_tag" rel="tag" title="标签 write 下的日志">write</a>(&#8220;&#8221;); 输出语句<br />
2.JS中的注释为//<br />
3.传统的HTML文档顺序是:document-&amp;gt;html-&amp;gt;(head,body)<br />
4.一个浏览器窗口中的DOM顺序是:window-&amp;gt;(navigator,screen,history,location,document)<br />
5.得到表单中元素的名称和值:document.getElementById(&#8220;表单中元素的ID號&#8221;).name(或value)<br />
6.一个小写转大写的JS: document.getElementById(&#8220;output&#8221;).value = document.getElementById(&#8220;input&#8221;).value.toUpperCase();<br />
7.JS中的值类型:String,Number,Boolean,Null,Object,Function<br />
8.JS中的字符型转换成数值型:parseInt(),parseFloat()<br />
9.JS中的数字转换成字符型:(&#8220;&#8221; 变量)<br />
10.JS中的取字符串长度是:(length)<br />
11.JS中的字符与字符相连接使用 號.<br />
12.JS中的比较操作符有:==等于,!=不等于,&amp;gt;,&amp;gt;=,&amp;lt;.&amp;lt;=<br />
13.JS中声明变量使用:var来进行声明<br />
14.JS中的判断语句结构:if(condition){}else{}<br />
15.JS中的循环结构:for([initial expression];[condition];[upadte expression]) {inside loop}<br />
16.循环中止的命令是:break<br />
17.JS中的函数定义:function functionName([parameter],&#8230;){statement[s]}<br />
18.当文件中出现多个form表单时.可以用document.forms[0],document.forms[1]来代替.<br />
19.窗口:打开窗口window.open(), 关闭一个窗口:window.close(), 窗口本身:self<br />
20.状態栏的设置:window.status=&#8221;字符&#8221;;<br />
<span id="more-167"></span>21.弹出提示信息:window.alert(&#8220;字符&#8221;);<br />
22.弹出確认框:window.confirm();<br />
23.弹出输入提示框:window.prompt();<br />
24.指定当前显示链接的位置:window.location.href=&#8221;URL&#8221;<br />
25.取出窗体中的所有表单的数量:document.forms.length<br />
26.关闭文档的输出流:document.close();<br />
27.字符串追加连接符: =<br />
28.创建一个文档元素:document.createElement(),document.createTextNode()<br />
29.得到元素的方法:document.getElementById()<br />
30.设置表单中所有文本型的成员的值为空:<br />
var form = window.document.forms[0]<br />
for (var i = 0; i<br />
if (form.elements.type == &#8220;text&#8221;){<br />
form.elements.value = &#8220;&#8221;;<br />
}<br />
}<br />
31.复选按钮在JS中判断是否选中:document.forms[0].checkThis.checked (checked属性代表为是否选中返回TRUE或FALSE)<br />
32.单选按钮组(单选按钮的名称必须相同):取单选按钮组的长度document.forms[0].groupName.length<br />
33.单选按钮组判断是否被选中也是用checked.<br />
34.下拉列表框的值:document.forms[0].selectName.options[n].value (n有时用下拉列表框名称加上.selectedIndex来確定被选中的值)<br />
35.字符串的定义:var myString = new String(&#8220;This is lightsword&#8221;);<br />
36.字符串转成大写:string.toUpperCase(); 字符串转成小写:string.toLowerCase();<br />
37.返回字符串2在字符串1中出现的位置:String1.indexOf(&#8220;String2&#8243;)!=-1则说明没找到.<br />
38.取字符串中指定位置的一个字符:StringA.charAt(9);<br />
39.取出字符串中指定起点和终点的子字符串:stringA.substring(2,6);<br />
40.数学函数:Math.PI(返回圆周率),Math.SQRT2(返回开方),Math.max(value1,value2)返回两个数中的最在值,Math.pow(value1,10)返回value1的十次方,Math.round(value1)四舍五入函数,Math.floor(Math.random()*(n 1))返回隨机数<br />
41.定义日期型变量:var today = new Date();<br />
42.日期函数列表:dateObj.getTime()得到时间,dateObj.getYear()得到年份,dateObj.getFullYear()得到四位的年份,dateObj.getMonth()得到月份,dateObj.getDate()得到日,dateObj.getDay()得到日期几,dateObj.getHours()得到小时,dateObj.getMinutes()得到分,dateObj.getSeconds()得到秒,dateObj.setTime(value)设置时间,dateObj.setYear(val)设置年,dateObj.setMonth(val)设置月,dateObj.setDate(val)设置日,dateObj.setDay(val)设置星期几,dateObj.setHours设置小时,dateObj.setMinutes(val)设置分,dateObj.setSeconds(val)设置秒 [注意:此日期时间从0开始计]<br />
43.FRAME的表示方式: [window.]frames[n].ObjFuncVarName,frames["frameName"].ObjFuncVarName,frameName.ObjFuncVarName<br />
44.parent代表父亲对象,top代表最顶端对象<br />
45.打开子窗口的父窗口为:opener<br />
46.表示当前所属的位置:this<br />
47.当在超链接中调用JS函数时用:(<a href="http://kimi-n.com/tag/javascript" class="st_tag internal_tag" rel="tag" title="标签 javascript 下的日志">javascript</a>:)来开头后面加函数名<br />
48.在老的浏览器中不执行此JS:&lt;!&#8211; //&#8211;&gt;<br />
49.引用一个文件式的JS:&lt;script src=&#8221;aaa.js&#8221; type=&#8221;text/javascript&#8221;&gt;&lt;/script&gt; 50.指定在不支持脚本的浏览器显示的HTML:&lt;noscript&gt;&lt;/noscript&gt; 51.当超链和onCLICK事件都有时,则老版本的浏览器转向a.html,否则转向b.html.例:&lt;a onclick=&#8221;location.href=&#8217;b.html&#8217;;return false&#8221; href=&#8221;a.html&#8221;&gt;dfsadf&lt;/a&gt; 52.JS的內建对象有:Array,Boolean,Date,Error,EvalError,Function,Math,Number,Object,RangeError,ReferenceError,RegExp,String,SyntaxError,TypeError,URIError 53.JS中的换行:\n 54.窗口全屏大小:&lt;script type=&#8221;text/javascript&#8221;&gt;// &lt;![CDATA[<br />
function fullScreen(){ this.moveTo(0,0);this.outerWidth=screen.availWidth;this.outerHeight=screen.availHeight;}window.maximize=fullScreen;<br />
// ]]&gt;&lt;/script&gt;<br />
55.JS中的all代表其下层的全部元素<br />
56.JS中的焦点顺序:document.getElementByid(&#8220;表单元素&#8221;).tabIndex = 1<br />
57.innerHTML的值是表单元素的值:如<br />
&lt;p id=&#8221;para&#8221;&gt;&#8221;how are &lt;em&gt;you&lt;/em&gt;&#8221;&lt;/p&gt;<br />
,则innerHTML的值就是:how are &lt;em&gt;you&lt;/em&gt;<br />
58.innerTEXT的值和上面的一样,只不过不会把&lt;em&gt;这种標记显示出来.<br />
59.contentEditable可设置元素是否可被修改,isContentEditable返回是否可修改的状態.<br />
60.isDisabled判断是否为禁止状態.disabled设置禁止状態<br />
61.length取得长度,返回整型数值<br />
62.addBehavior()是一种JS调用的外部函数文件其扩展名为.htc<br />
63.window.focus()使当前的窗口在所有窗口之前.<br />
64.blur()指失去焦点.与FOCUS()相反.<br />
65.select()指元素为选中状態.<br />
66.防止用户对文本框中输入文本:onfocus=&#8221;this.blur()&#8221;<br />
67.取出该元素在页面中出现的数量:document.all.tags(&#8220;div(或其它HTML標记符)&#8221;).length<br />
68.JS中分为两种窗体输出:模態和非模態.window.showModaldialog(),window.showModeless()<br />
69.状態栏文字的设置:window.status=&#8217;文字&#8217;,默认的状態栏文字设置:window.defaultStatus = &#8216;文字.&#8217;;<br />
70.添加到收藏夹:external.AddFavorite(&#8220;<a href="http://www.dannyg.com&quot;;,&quot;jaskdlf">http://www.dannyg.com&#8221;;,&#8221;jaskdlf</a>&#8220;);<br />
71.JS中遇到脚本错误时不做任何操作:window.onerror = doNothing; 指定错误句柄的语法为:window.onerror = handleError;<br />
72.JS中指定当前打开窗口的父窗口:window.opener,支持opener.opener&#8230;的多重继续.<br />
73.JS中的self指的是当前的窗口<br />
74.JS中状態栏显示內容:window.status=&#8221;內容&#8221;<br />
75.JS中的top指的是框架集中最顶层的框架<br />
76.JS中关闭当前的窗口:window.close();<br />
77.JS中提出是否確认的框:if(confirm(&#8220;Are you sure?&#8221;)){alert(&#8220;ok&#8221;);}else{alert(&#8220;Not Ok&#8221;);}<br />
78.JS中的窗口重定向:window.navigate(&#8220;<a href="http://www.sina.com.cn">http://www.sina.com.cn</a>&#8220;;);<br />
79.JS中的打印:window.print()<br />
80.JS中的提示输入框:window.prompt(&#8220;message&#8221;,&#8221;defaultReply&#8221;);<br />
81.JS中的窗口滚动条:window.scroll(x,y)<br />
82.JS中的窗口滚动到位置:window.scrollby<br />
83.JS中设置时间间隔:setInterval(&#8220;expr&#8221;,msecDelay)或setInterval(funcRef,msecDelay)或setTimeout<br />
84.JS中的模態显示在IE4 行,在NN中不行:showModalDialog(&#8220;URL&#8221;[,arguments][,features]);<br />
85.JS中的退出之前使用的句柄:function verifyClose(){event.returnValue=&#8221;we really like you and hope you will stay longer.&#8221;;}} window.=verifyClose;<br />
86.当窗体第一次调用时使用的文件句柄:onload()<br />
87.当窗体关闭时调用的文件句柄:onunload()<br />
88.window.location的属性: protocol(http:),hostname(<a href="http://www.example.com),port(80),host(www.example.com:80),pathname(&quot;/a/a.html&quot;),hash(&quot;#giantGizmo">www.example.com),port(80),host(www.example.com:80),pathname(&#8220;/a/a.html&#8221;),hash(&#8220;#giantGizmo</a>&#8220;,指跳转到相应的锚记),href(全部的信息)<br />
89.window.location.reload()刷新当前页面.<br />
90.window.history.back()返回上一页,window.history.forward()返回下一页,window.history.go(返回第几页,也可以使用访问过的URL)<br />
91.document.write()不换行的输出,document.writeln()换行输出<br />
92.document.body.noWrap=true;防止链接文字折行.<br />
93.变量名.charAt(第几位),取该变量的第几位的字符.<br />
94.&#8221;abc&#8221;.charCodeAt(第几个),返回第几个字符的ASCii码值.<br />
95.字符串连接:string.concat(string2),或用 =进行连接<br />
96.变量.indexOf(&#8220;字符&#8221;,起始位置),返回第一个出现的位置(从0开始计算)<br />
97.string.lastIndexOf(searchString[,startIndex])最后一次出现的位置.<br />
98.string.match(regExpression),判断字符是否匹配.<br />
99.string.replace(regExpression,replaceString)替换现有字符串.<br />
100.string.split(分隔符)返回一个数组存储值.<br />
101.string.substr(start[,length])取从第几位到指定长度的字符串.<br />
102.string.toLowerCase()使字符串全部变为小写.<br />
103.string.toUpperCase()使全部字符变为大写.<br />
104.parseInt(string[,radix(代表进制)])强制转换成整型.<br />
105.parseFloat(string[,radix])强制转换成浮点型.<br />
106.isNaN(变量):测试是否为数值型.<br />
107.定义常量的关键字:const,定义变量的关键字:var<br />
108.从iframe中跳出：parent.location.href=&#8221;index.html&#8221; &lt;/em&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://kimi-n.com/the-common-js-in-csharp/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>随便谈谈</title>
		<link>http://kimi-n.com/sui-bian-tan-tan</link>
		<comments>http://kimi-n.com/sui-bian-tan-tan#comments</comments>
		<pubDate>Thu, 20 May 2010 14:10:19 +0000</pubDate>
		<dc:creator>Kimi</dc:creator>
				<category><![CDATA[随笔]]></category>
		<category><![CDATA[忙]]></category>
		<category><![CDATA[杂谈]]></category>
		<category><![CDATA[程序员]]></category>
		<category><![CDATA[纠结]]></category>
		<category><![CDATA[高考]]></category>

		<guid isPermaLink="false">http://kimi-n.com/%e9%9a%8f%e4%be%bf%e8%b0%88%e8%b0%88</guid>
		<description><![CDATA[好久没发日志了，感觉最近的事情好多啊。那天大致的盘算了一下，从现在开始到学期末要做的事情实在是太多了，大大小小加起来不下于10件。首先是一堆公选课的论文，然后就是很纠结的几个大作业，再然后就是软考和即将到来的期末考试。谈到期末考试，虽然这学期要考试的科目很少，但一门网络估计就够哥受的。这学期的网络老师真是对他无语了，上课嘛一点激情没的，听着就想睡觉；课程设计嘛，人啊不出现的，就让两个研究生带着，那两学长自己还搞不明白什么东西，更别说辅导我们了。用Timmy的话说“上学期的操作系统，前半学期坐在后排导致上课没听懂多少，后半学期坐到前排（沙发的位置）感觉还不错，听懂了不少，最后考试也还考了个80几。这学期网络课堂堂课坐沙发，还是没听懂什么。”囧。估计考试要纠结了。 前几天为了.NET的大作业跟Timmy讨论了很长时间，还熬夜coding了两个晚上。第二天整个人累得跟什么似的，完全虚了。我想，这就是我后半辈子要过的生活吗？天呐！地啊！╮(╯▽╰)╭程序员的生活难道真的就是这样的吗？不过回过头来想想，现在这社会什么行业不辛苦啊，每个行业都有每个行业的特色嘛。（但熬夜这个特色哥有点受不鸟）貌似纠结完.NET，还要纠结J2EE。%&#62;_&#60;% 下午吃晚饭前，跟KC聊了很长时间，他很纠结他已经纠结了很长时间的事情。他说他还是不死心，不甘心就这么放下MC（为了营造和谐世界，就不说实名了，用代号吧！），他说他还要再搏一搏。作为兄弟，我当然支持他也希望他能成功。但我还是劝他不要冲动，最好能缓慢的把事情进行下去，这样对大家都好。他说他不想再等了，他不想再这样浑浑噩噩的混下去，早点做个了断也早点让自己摆脱这种生活。他说他所作的一些重大决定很大程度上是为了MC，现在却落空了。哎，怎么说呢？这种事情本来就很难说的，况且他是一个这么纠结的人，也做过那么多纠结的事。所以这种事情就让他自己去纠结吧，哥们只能在后方做做精神支援了。 其实感情这东西我一直认为是要慢慢来的。Timmy他们老是开玩笑的跟我说让我快点找个女朋友，我认为这事情不要慌，慢慢来，遇到合适的以后再慢慢培养，这样才好嘛！ 快要高考了，想想高考已经3年了，时间过的真快啊！今年两个弟弟要高考，不知道这两个小家伙准备的怎么样了。估计两个人都很紧张吧，要补很多因上学期攻美术单招而落下的课程。五一回家的时候，遇到杜弟了，跟他谈了谈，他自己也认识到了紧迫感，他跟我说他一定会努力的。老弟们，加油吧！相信你们会顺利的！]]></description>
			<content:encoded><![CDATA[<p>好久没发日志了，感觉最近的事情好多啊。那天大致的盘算了一下，从现在开始到学期末要做的事情实在是太多了，大大小小加起来不下于10件。首先是一堆公选课的论文，然后就是很纠结的几个大作业，再然后就是软考和即将到来的期末考试。谈到期末考试，虽然这学期要考试的科目很少，但一门网络估计就够哥受的。这学期的网络老师真是对他无语了，上课嘛一点激情没的，听着就想睡觉；课程设计嘛，人啊不出现的，就让两个研究生带着，那两学长自己还搞不明白什么东西，更别说辅导我们了。用Timmy的话说“上学期的操作系统，前半学期坐在后排导致上课没听懂多少，后半学期坐到前排（沙发的位置）感觉还不错，听懂了不少，最后考试也还考了个80几。这学期网络课堂堂课坐沙发，还是没听懂什么。”囧。估计考试要纠结了。</p>
<p>前几天为了.NET的大作业跟Timmy讨论了很长时间，还熬夜coding了两个晚上。第二天整个人累得跟什么似的，完全虚了。我想，这就是我后半辈子要过的生活吗？天呐！地啊！╮(╯▽╰)╭程序员的生活难道真的就是这样的吗？不过回过头来想想，现在这社会什么行业不辛苦啊，每个行业都有每个行业的特色嘛。（但熬夜这个特色哥有点受不鸟）貌似纠结完.NET，还要纠结J2EE。%&gt;_&lt;%</p>
<p>下午吃晚饭前，跟KC聊了很长时间，他很纠结他已经纠结了很长时间的事情。他说他还是不死心，不甘心就这么放下MC（为了营造和谐世界，就不说实名了，用代号吧！），他说他还要再搏一搏。作为兄弟，我当然支持他也希望他能成功。但我还是劝他不要冲动，最好能缓慢的把事情进行下去，这样对大家都好。他说他不想再等了，他不想再这样浑浑噩噩的混下去，早点做个了断也早点让自己摆脱这种生活。他说他所作的一些重大决定很大程度上是为了MC，现在却落空了。哎，怎么说呢？这种事情本来就很难说的，况且他是一个这么纠结的人，也做过那么多纠结的事。所以这种事情就让他自己去纠结吧，哥们只能在后方做做精神支援了。</p>
<p> <span id="more-164"></span>
<p>其实感情这东西我一直认为是要慢慢来的。Timmy他们老是开玩笑的跟我说让我快点找个女朋友，我认为这事情不要慌，慢慢来，遇到合适的以后再慢慢培养，这样才好嘛！</p>
<p>快要高考了，想想高考已经3年了，时间过的真快啊！今年两个弟弟要高考，不知道这两个小家伙准备的怎么样了。估计两个人都很紧张吧，要补很多因上学期攻美术单招而落下的课程。五一回家的时候，遇到杜弟了，跟他谈了谈，他自己也认识到了紧迫感，他跟我说他一定会努力的。老弟们，加油吧！相信你们会顺利的！</p>
]]></content:encoded>
			<wfw:commentRss>http://kimi-n.com/sui-bian-tan-tan/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>根据数据库中宁波公园的经纬度信息在Google地图上标出每个公园的位置并连线</title>
		<link>http://kimi-n.com/draw-garden-location-on-google-map</link>
		<comments>http://kimi-n.com/draw-garden-location-on-google-map#comments</comments>
		<pubDate>Thu, 06 May 2010 14:36:44 +0000</pubDate>
		<dc:creator>Kimi</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[jsp]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://kimi-n.com/?p=139</guid>
		<description><![CDATA[数据库中含有宁波一些公园的详细信息，包括经纬度。要求将经纬度信息读取出来并调用Google Map的API服务在地图上标识出这些公园的位置。刚开始时想通过一个函数将一个buffer流写如到一个xml中并保存的，但JavaScript中调用时可能是事先预读入了，所以每次执行时都提示错误，只有当第二次这个xml真正存在时执行才会有用。为了这个问题纠结了很久结果还是不行，于是采用老师今天课堂上展示的成品中用的方法，果然奏效了。-_-&#124;&#124; 运行效果图： draw.jsp: ?View Code JAVA&#60;%@ page language=&#34;java&#34; contentType=&#34;text/html; charset=utf-8&#34; pageEncoding=&#34;utf-8&#34;%&#62; &#60;%@page import = &#34;java.util.*&#34;%&#62; &#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#34;&#62; &#60;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&#62; &#60;head&#62; &#60;title&#62;Airport Locator&#60;/title&#62; &#60;/head&#62; &#60;body&#62; &#60;script type=&#34;text/javascript&#34; src=&#34;js/jquery-1.2.6.min.js&#34;&#62;&#60;/script&#62; &#60;script src=&#34;http://maps.google.com/maps?file=api&#38;v=2&#38;key=ABQIAAAATmoH83Ly9iQx1uFnEHAlDBTwM0brOpm-All5BF6PoaKBxRWWERS1Yg55rmr66zkZ8YxvBZy71GJpEw&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62; &#60;style&#62; #map &#123; border: 1px solid #000000; height: 600px; width: 1000px; &#125; &#160; &#60;/style&#62; &#60;script type=&#34;text/javascript&#34;&#62; //&#60;![CDATA[ var [...]]]></description>
			<content:encoded><![CDATA[<p>数据库中含有宁波一些公园的详细信息，包括经纬度。要求将经纬度信息读取出来并调用Google Map的API服务在地图上标识出这些公园的位置。刚开始时想通过一个函数将一个buffer流写如到一个xml中并保存的，但JavaScript中调用时可能是事先预读入了，所以每次执行时都提示错误，只有当第二次这个xml真正存在时执行才会有用。为了这个问题纠结了很久结果还是不行，于是采用老师今天课堂上展示的成品中用的方法，果然奏效了。-_-||<br />
运行效果图：<br />
<a href="http://kimi-n.com/wp-content/uploads/2010/05/gardenmap.jpg" rel="lightbox[139]"><img class="aligncenter size-medium wp-image-148" title="gardenmap" src="http://kimi-n.com/wp-content/uploads/2010/05/gardenmap.jpg" alt="" width="300" height="174" /></a><br />
draw.<a href="http://kimi-n.com/tag/jsp" class="st_tag internal_tag" rel="tag" title="标签 jsp 下的日志">jsp</a>:</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p139code3'); return false;">View Code</a> JAVA</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p1393"><td class="code" id="p139code3"><pre class="java" style="font-family:monospace;"><span style="color: #339933;">&lt;%</span>@ page language<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;java&quot;</span> contentType<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/html; charset=utf-8&quot;</span> pageEncoding<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;utf-8&quot;</span><span style="color: #339933;">%&gt;</span>
<span style="color: #339933;">&lt;%</span>@page <span style="color: #000000; font-weight: bold;">import</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;java.util.*&quot;</span><span style="color: #339933;">%&gt;</span>
<span style="color: #339933;">&lt;!</span>DOCTYPE html <span style="color: #000000; font-weight: bold;">PUBLIC</span> <span style="color: #0000ff;">&quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;</span> <span style="color: #0000ff;">&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>html xmlns<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://www.w3.org/1999/xhtml&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>head<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>title<span style="color: #339933;">&gt;</span>Airport Locator<span style="color: #339933;">&lt;/</span>title<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>head<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>body<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;js/jquery-1.2.6.min.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAATmoH83Ly9iQx1uFnEHAlDBTwM0brOpm-All5BF6PoaKBxRWWERS1Yg55rmr66zkZ8YxvBZy71GJpEw&quot;</span>
      type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>style<span style="color: #339933;">&gt;</span>
	#map <span style="color: #009900;">&#123;</span>
		border<span style="color: #339933;">:</span>		1px solid #000000<span style="color: #339933;">;</span>
		height<span style="color: #339933;">:</span>		600px<span style="color: #339933;">;</span>
		width<span style="color: #339933;">:</span>		1000px<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #339933;">&lt;/</span>style<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
    <span style="color: #666666; font-style: italic;">//&lt;![CDATA[</span>
        var map<span style="color: #339933;">;</span>
    	var markers <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        var point <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        var i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">ready</span><span style="color: #009900;">&#40;</span>function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>GBrowserIsCompatible<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #666666; font-style: italic;">// Initialize the map.</span>
				map <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> GMap2<span style="color: #009900;">&#40;</span>document.<span style="color: #006633;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;map&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				map.<span style="color: #006633;">addControl</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> GLargeMapControl<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				map.<span style="color: #006633;">setCenter</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> GLatLng<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">29.873519444400</span>,<span style="color: #cc66cc;">121.554127777800</span><span style="color: #009900;">&#41;</span>, <span style="color: #cc66cc;">13</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                map.<span style="color: #006633;">addControl</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> GMapTypeControl<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                $.<span style="color: #006633;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>type<span style="color: #339933;">:</span><span style="color: #0000ff;">&quot;GET&quot;</span>,url<span style="color: #339933;">:</span><span style="color: #0000ff;">&quot;writexml.jsp&quot;</span>,dataType<span style="color: #339933;">:</span><span style="color: #0000ff;">&quot;xml&quot;</span>,
					success<span style="color: #339933;">:</span>function<span style="color: #009900;">&#40;</span>data,textStatus<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
						$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;marker&quot;</span>,data<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">each</span><span style="color: #009900;">&#40;</span>function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
							<span style="color: #666666; font-style: italic;">// Attributes for each marker.</span>
	            			var lat <span style="color: #339933;">=</span> parseFloat<span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;lat&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	            			var lng <span style="color: #339933;">=</span> parseFloat<span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;lng&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	            			point<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> GLatLng<span style="color: #009900;">&#40;</span>lat,lng<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	            			var html <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;html&quot;</span>,<span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                        <span style="color: #666666; font-style: italic;">//alert(&quot;Hello&quot;);</span>
	            			<span style="color: #666666; font-style: italic;">// Create the marker.</span>
	            			var marker <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> GMarker<span style="color: #009900;">&#40;</span>point<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	            			i <span style="color: #339933;">=</span> i<span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
					        GEvent.<span style="color: #006633;">addListener</span><span style="color: #009900;">&#40;</span>marker, <span style="color: #0000ff;">&quot;click&quot;</span>, function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
								marker.<span style="color: #006633;">openInfoWindowHtml</span><span style="color: #009900;">&#40;</span>html<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	            			map.<span style="color: #006633;">addOverlay</span><span style="color: #009900;">&#40;</span>marker<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
						<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                        var polyline <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> GPolyline<span style="color: #009900;">&#40;</span>point, <span style="color: #0000ff;">&quot;#FF0000&quot;</span>, <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                        map.<span style="color: #006633;">addOverlay</span><span style="color: #009900;">&#40;</span>polyline<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span>,
&nbsp;
					error<span style="color: #339933;">:</span>function<span style="color: #009900;">&#40;</span>XMLHTTPRequest,textStatus,errorThrow<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
						alert<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;There was an error retrieving the marker information.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		$<span style="color: #009900;">&#40;</span>document.<span style="color: #006633;">body</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">unload</span><span style="color: #009900;">&#40;</span>function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>GBrowserIsCompatible<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				GUnload<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #666666; font-style: italic;">//]]&gt;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;map&quot;</span><span style="color: #339933;">&gt;&lt;/</span>div<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>body<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>html<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p><span id="more-139"></span><br />
writexml.jsp(通过此文件动态构造xml):</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p139code4'); return false;">View Code</a> JAVA</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p1394"><td class="code" id="p139code4"><pre class="java" style="font-family:monospace;"><span style="color: #339933;">&lt;%</span>@page contentType<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/xml;charset=UTF-8&quot;</span><span style="color: #339933;">%&gt;</span>
<span style="color: #339933;">&lt;%</span>@page <span style="color: #000000; font-weight: bold;">import</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;java.util.*&quot;</span><span style="color: #339933;">%&gt;</span>
<span style="color: #339933;">&lt;%</span>@page language <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;java&quot;</span> <span style="color: #000000; font-weight: bold;">import</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;java.sql.*&quot;</span><span style="color: #339933;">%&gt;</span>
<span style="color: #339933;">&lt;%</span>
            <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> DBDriver<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;com.microsoft.jdbc.sqlserver.SQLServerDriver&quot;</span><span style="color: #339933;">;</span>
            <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> DBLocation<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=test&quot;</span><span style="color: #339933;">;</span>
            <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> DBUser<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;sa&quot;</span><span style="color: #339933;">;</span>
            <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> DBPwd<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;sa&quot;</span><span style="color: #339933;">;</span>
            <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> see <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">try</span><span style="color: #009900;">&#123;</span>
                    <span style="color: #000000; font-weight: bold;">Class</span>.<span style="color: #006633;">forName</span><span style="color: #009900;">&#40;</span>DBDriver<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aconnection+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Connection</span></a> conn <span style="color: #339933;">=</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adrivermanager+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">DriverManager</span></a>.<span style="color: #006633;">getConnection</span><span style="color: #009900;">&#40;</span>DBLocation, DBUser, DBPwd<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                    <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astatement+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Statement</span></a> stmt <span style="color: #339933;">=</span> conn.<span style="color: #006633;">createStatement</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> sql_query <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;select longitude,latitude,gardenname,gardenplace from YL_Garden&quot;</span><span style="color: #339933;">;</span>
                    <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aresultset+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">ResultSet</span></a> rs <span style="color: #339933;">=</span> stmt.<span style="color: #006633;">executeQuery</span><span style="color: #009900;">&#40;</span>sql_query<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    out.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt;markers&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #000000; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span>rs.<span style="color: #006633;">next</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
                    <span style="color: #009900;">&#123;</span>
                        see<span style="color: #339933;">=</span>rs.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;latitude&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        out.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt;marker lat=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">+</span> see <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span> &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        see<span style="color: #339933;">=</span>rs.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;longitude&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        out.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;lng=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">+</span> see <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        out.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt;html&gt;&lt;![CDATA[&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        see<span style="color: #339933;">=</span>rs.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;gardenname&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        out.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>see <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;&lt;br/&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        see<span style="color: #339933;">=</span>rs.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;gardenplace&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        out.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>see <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;]]&gt;&lt;/html&gt;&lt;/marker&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>
                    out.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt;/markers&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    rs.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    stmt.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    conn.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                 <span style="color: #009900;">&#125;</span>
                <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    e.<span style="color: #006633;">printStackTrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
<span style="color: #339933;">%&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://kimi-n.com/draw-garden-location-on-google-map/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>编写数据库存储过程实现商品出库</title>
		<link>http://kimi-n.com/sql-procedure-poppro</link>
		<comments>http://kimi-n.com/sql-procedure-poppro#comments</comments>
		<pubDate>Mon, 26 Apr 2010 14:30:44 +0000</pubDate>
		<dc:creator>Kimi</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[procedure]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://kimi-n.com/?p=129</guid>
		<description><![CDATA[数据库的表结构如下 存储过程ap_popWhpro脚本： ?View Code SQLalter procedure ap_popWhpro @pro_id int, @wh_id int, @num int, @sum money output as begin declare @pos1 int, @pos2 int, @totNum int, @curNum int, @curPrice money, --@sum money, @sqlCmd nvarchar&#40;200&#41;, @fldNum varchar&#40;10&#41;, @fldPrice varchar&#40;10&#41; select @pos1 = pos1, @pos2 = pos2, @totNum = totNum from whproduct where pro_id = @pro_id and wh_id [...]]]></description>
			<content:encoded><![CDATA[<p>数据库的表结构如下<br />
<a href="http://kimi-n.com/wp-content/uploads/2010/04/whproduct.jpg" rel="lightbox[129]"><img src="http://kimi-n.com/wp-content/uploads/2010/04/whproduct-300x270.jpg" alt="" title="whproduct" width="300" height="270" class="aligncenter size-medium wp-image-130" /></a><br />
存储过程ap_popWhpro脚本：</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p129code7'); return false;">View Code</a> SQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p1297"><td class="code" id="p129code7"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">alter</span> procedure ap_popWhpro
	@pro_id		int<span style="color: #66cc66;">,</span>
	@wh_id		int<span style="color: #66cc66;">,</span>
	@num		int<span style="color: #66cc66;">,</span>
	@sum		money	output
<span style="color: #993333; font-weight: bold;">as</span>
begin
	declare
		@pos1		int<span style="color: #66cc66;">,</span>
		@pos2		int<span style="color: #66cc66;">,</span>
		@totNum		int<span style="color: #66cc66;">,</span>
		@curNum		int<span style="color: #66cc66;">,</span>
		@curPrice	money<span style="color: #66cc66;">,</span>
		<span style="color: #808080; font-style: italic;">--@sum		money,</span>
		@sqlCmd		nvarchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">200</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
		@fldNum		varchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
		@fldPrice	varchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #993333; font-weight: bold;">select</span> @pos1 <span style="color: #66cc66;">=</span> pos1<span style="color: #66cc66;">,</span> @pos2 <span style="color: #66cc66;">=</span> pos2<span style="color: #66cc66;">,</span> @totNum <span style="color: #66cc66;">=</span> totNum
		<span style="color: #993333; font-weight: bold;">from</span> whproduct
		<span style="color: #993333; font-weight: bold;">where</span> pro_id <span style="color: #66cc66;">=</span> @pro_id <span style="color: #993333; font-weight: bold;">and</span> wh_id <span style="color: #66cc66;">=</span> @wh_id
	<span style="color: #993333; font-weight: bold;">if</span> @totNum &amp;lt; @num 	begin 		<span style="color: #993333; font-weight: bold;">return</span> <span style="color: #66cc66;">-</span><span style="color: #cc66cc;">1</span> 	end 	<span style="color: #993333; font-weight: bold;">set</span> @sum <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> 	while @num &amp;gt; <span style="color: #cc66cc;">0</span>
	begin
		<span style="color: #993333; font-weight: bold;">if</span> @pos1&amp;gt;<span style="color: #cc66cc;">8</span>
		begin
			<span style="color: #993333; font-weight: bold;">set</span> @pos1 <span style="color: #66cc66;">=</span> @pos1 % <span style="color: #cc66cc;">8</span>
		end
		<span style="color: #993333; font-weight: bold;">set</span> @fldNum <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'num'</span> <span style="color: #66cc66;">+</span> Convert<span style="color: #66cc66;">&#40;</span>varchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> @pos1<span style="color: #66cc66;">&#41;</span>
		<span style="color: #993333; font-weight: bold;">set</span> @fldPrice <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'price'</span> <span style="color: #66cc66;">+</span> Convert<span style="color: #66cc66;">&#40;</span>varchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> @pos1<span style="color: #66cc66;">&#41;</span>
		<span style="color: #993333; font-weight: bold;">set</span> @sqlCmd <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'select @curNum = '</span> <span style="color: #66cc66;">+</span> @fldNum <span style="color: #66cc66;">+</span> <span style="color: #ff0000;">',@curPrice = '</span><span style="color: #66cc66;">+</span> @fldPrice <span style="color: #66cc66;">+</span><span style="color: #ff0000;">' from whproduct where pro_id = @pro_id and wh_id = @wh_id'</span>
		exec sp_executesql @sqlCmd<span style="color: #66cc66;">,</span> N<span style="color: #ff0000;">'@curNum int output,@curPrice int output,@wh_id int, @pro_id int'</span><span style="color: #66cc66;">,</span>@curNum output<span style="color: #66cc66;">,</span>@curPrice output<span style="color: #66cc66;">,</span>@wh_id<span style="color: #66cc66;">,</span> @pro_id
		<span style="color: #993333; font-weight: bold;">if</span> @curNum &amp;lt; @num
		begin
			<span style="color: #993333; font-weight: bold;">set</span> @num <span style="color: #66cc66;">=</span> @num <span style="color: #66cc66;">-</span> @curNum
			<span style="color: #993333; font-weight: bold;">set</span> @pos1 <span style="color: #66cc66;">=</span> @pos1 <span style="color: #66cc66;">+</span> <span style="color: #cc66cc;">1</span>
			<span style="color: #993333; font-weight: bold;">set</span> @sum <span style="color: #66cc66;">=</span> @sum <span style="color: #66cc66;">+</span> @curPrice<span style="color: #66cc66;">*</span>@curNum
			<span style="color: #993333; font-weight: bold;">set</span> @sqlCmd <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'update whProduct set '</span> <span style="color: #66cc66;">+</span> @fldNum <span style="color: #66cc66;">+</span> <span style="color: #ff0000;">' = 0 '</span> <span style="color: #66cc66;">+</span> <span style="color: #ff0000;">', totNum = totNum - '</span> <span style="color: #66cc66;">+</span> Convert<span style="color: #66cc66;">&#40;</span>varchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> @curNum<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">+</span> <span style="color: #ff0000;">'where pro_id = @pro_id and wh_id = @wh_id'</span>
		end
		else
		begin
			<span style="color: #993333; font-weight: bold;">set</span> @sqlCmd <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'update whProduct set '</span> <span style="color: #66cc66;">+</span> @fldNum <span style="color: #66cc66;">+</span> <span style="color: #ff0000;">' = '</span> <span style="color: #66cc66;">+</span> Convert<span style="color: #66cc66;">&#40;</span>varchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> @curNum <span style="color: #66cc66;">-</span> @num<span style="color: #66cc66;">&#41;</span>
					<span style="color: #66cc66;">+</span> <span style="color: #ff0000;">', totNum = totNum - '</span> <span style="color: #66cc66;">+</span> Convert<span style="color: #66cc66;">&#40;</span>varchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> @num<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">+</span> <span style="color: #ff0000;">'where  pro_id = @pro_id and wh_id = @wh_id'</span>
			<span style="color: #993333; font-weight: bold;">set</span> @num <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span>
			<span style="color: #993333; font-weight: bold;">set</span> @sum <span style="color: #66cc66;">=</span> @sum <span style="color: #66cc66;">+</span> @curPrice<span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#40;</span>@curNum <span style="color: #66cc66;">-</span> @num<span style="color: #66cc66;">&#41;</span>
			<span style="color: #993333; font-weight: bold;">set</span> @pos1 <span style="color: #66cc66;">=</span> @pos1 <span style="color: #66cc66;">+</span> <span style="color: #cc66cc;">1</span>
		end
		exec sp_executesql @sqlCmd<span style="color: #66cc66;">,</span> N<span style="color: #ff0000;">'@wh_id int, @pro_id int'</span><span style="color: #66cc66;">,</span> @wh_id<span style="color: #66cc66;">,</span> @pro_id
	end
	<span style="color: #993333; font-weight: bold;">set</span> @sqlCmd <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'update whProduct set pos1 = '</span> <span style="color: #66cc66;">+</span> Convert<span style="color: #66cc66;">&#40;</span>varchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> @pos1<span style="color: #66cc66;">-</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">+</span> <span style="color: #ff0000;">'where  pro_id = @pro_id and wh_id = @wh_id'</span>
	exec sp_executesql @sqlCmd<span style="color: #66cc66;">,</span> N<span style="color: #ff0000;">'@wh_id int, @pro_id int'</span><span style="color: #66cc66;">,</span> @wh_id<span style="color: #66cc66;">,</span> @pro_id
end</pre></td></tr></table></div>

<p>执行存储过程的脚本：</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p129code8'); return false;">View Code</a> SQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p1298"><td class="code" id="p129code8"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">select</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">from</span> whproduct
&nbsp;
declare
	@total	money
execute ap_popWhpro <span style="color: #cc66cc;">1001</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">102</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">20</span><span style="color: #66cc66;">,</span>@total output
<span style="color: #993333; font-weight: bold;">select</span> @total totalmoney
&nbsp;
<span style="color: #993333; font-weight: bold;">select</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">from</span> whproduct</pre></td></tr></table></div>

<p>执行效果：<a href="http://kimi-n.com/wp-content/uploads/2010/04/ap_popWhpro.jpg" rel="lightbox[129]"><img class="aligncenter size-full wp-image-131" title="ap_popWhpro" src="http://kimi-n.com/wp-content/uploads/2010/04/ap_popWhpro.jpg" alt="" width="500" height="200" /></a><br />
第一排是执行前表中的数据，第二排是出库商品的总金额，第三排是执行后表的数据</p>
]]></content:encoded>
			<wfw:commentRss>http://kimi-n.com/sql-procedure-poppro/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Little Red Riding Hood</title>
		<link>http://kimi-n.com/little-red-riding-hood</link>
		<comments>http://kimi-n.com/little-red-riding-hood#comments</comments>
		<pubDate>Mon, 26 Apr 2010 04:22:03 +0000</pubDate>
		<dc:creator>Kimi</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[write]]></category>

		<guid isPermaLink="false">http://kimi-n.com/?p=127</guid>
		<description><![CDATA[I am a little girl. My name was Little Red Riding Hood. I often wear a red cap. So they call me little red riding. Today, my grandma is ill. Mother asked me go to visit her and bring some cakes and some other foods. Mother told me do not leave the path. I wore [...]]]></description>
			<content:encoded><![CDATA[<p>I am a little girl. My name was Little Red Riding Hood. I often wear a red cap. So they call me little red riding. Today, my grandma is ill. Mother asked me go to visit her and bring some cakes and some other foods. Mother told me do not leave the path. I wore my red cap and start my way.</p>
<p>On the way, I met a wolf, he said hello to me very friendly, I said hello to him too.</p>
<p>”Hi, little red riding hood, where are you going? Why you are alone?” He asked</p>
<p>”My grandma was ill, I go to visit her and bring her some foods, she will become well by eating these foods.” I said.</p>
<p>“Where is your grandma’s house?” asked he</p>
<p>“Not too far, just near the forest.”</p>
<p>“Oh! It’s good. I am going there too. Why don’t we go there together?” said he.</p>
<p>“Ok!”</p>
<p>He was very happy on our way. Suddenly, I realized that he is a bad man, mother have told me that he did a lot of bad things such as eat little babies. Maybe today I would be eaten by him. I should get rid of him by some ways.</p>
<p>I said to him:”Mr. Wolf. There are so many beautiful flowers, can you pick some for me taking to my grandma, she may be very happy after seeing these flowers.”</p>
<p>He said:”Eh. You do it. I will look after your things.”</p>
<p>“I am a little girl. I am very tired after walking so far. I am asking you to help me. ”</p>
<p>“Ok! But you should stay here without going anywhere.”</p>
<p>After he entered the forest. I ran away very quickly. When he found I have run away, he shouted at me. He asked me to stop and he will eat me if he reaches me. On the way, I saw a hunter, I asked him help me. He asked me to go to grandma’s home and hide somewhere. I ran to grandma’s home and hid in the cupboard with grandma. The hunter putted on my grandma’s clothes dressed him in her cap, laid himself in bed. The wolf came very soon. He shouted:” Open the door now.” The hunter got up and went to open the door. The wolf did not recognize that he is not my grandma and got in straight. He said: “Tell me where the little girl is, I will eat both of you. Or I will eat you first then find her and eat.” To his surprised, the “grandma” behind him said:”Put up your hands, and get down on your knees. I will kill you! I am a hunter!” ”Bang!” The wolf was killed by the hunter.</p>
<p>We get out of the cupboard and said thanks to him. Then he said BYEBYE to us and leaved away with the dead wolf. Grandma gets well after ate the foods.</p>
<p>What an interesting day!</p>
]]></content:encoded>
			<wfw:commentRss>http://kimi-n.com/little-red-riding-hood/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->

