清明诗三首

清明不见雨纷纷
路上行人亦断魂
已恨陵园郊外远
又逢车马阻前程

一日清明几处哀
合家老幼奔陵台
纸钱供果虽丰盛
还望黄泉寄语来

(代母书)
衣物犹存未忍翻
心伤往事泪无干
毕生辛苦老来伴
化作遗容入梦难

2008-4-20 13:50:29

小学生造句

1.题目:一边……一边……
小朋友写:他一边脱衣服,一边穿裤子。
老师批语:他到底是要脱还是要穿啊?

2.题目:其中
小朋友写:我其中的一只左脚受伤了。
老师批语:你是蜈蚣吗?

3.题目:陆陆续续
小朋友写:下班了,爸爸陆陆续续的回家了。
老师批语:你到底有几个爸爸呀?

4.题目:难过
小朋友写:我家门前有条水沟很难过。
老师批语:老师更难过。

5.题目:又……又……
小朋友写:我的妈妈又矮又高又胖又瘦。
老师批语:你的妈妈是变形金刚吗?

6.题目:你看
小朋友写:你看什么看!没看过啊?
老师批语:没看过……

7.题目:欣欣向荣
小朋友写:欣欣向荣荣告白。
老师批语:连续剧不要看太多了!

8.题目:好吃
小朋友写:好吃个屁。
老师批语:有些东西是不能吃的。

9.题目:天真
小朋友写:今天真热。
老师批语:你真天真。

10.题目:果然
小朋友写:昨天我吃水果,然后喝凉水。
老师批语:是词组,不能分开的。

11.题目:先……再……,例题:先吃饭,再洗澡。
小朋友写:先生,再见!
老师批语:想象力超过了地球人的智慧。

12.题目:况且
小朋友写:一列火车经过,况且况且况且况且况且况。
老师批语:我死了算了。

ZT: Top 10 DOS Batch tips (Yes, DOS Batch…)

转自:http://weblogs.asp.net/jgalloway/archive/2006/11/20/top-10-dos-batch-tips-yes-dos-batch.aspx

PowerShell’s great. I’m fired up about the opportunity to use .NET objects from simple scripts. I’ll admit I’m still getting up to speed with it, but I’m totally sold on PowerShell.

However, it’s not installed on a lot of servers I work with, and I still do a lot of my “clumsy developer attempting DBA and network admin” tasks from DOS Batch files. You can do quite a bit with DOS Batch – the silly fact is the my most popular posts (by a huge margin) are some batch scripts to allow running IE7 and IE6 on the same computer.

So, by way of tribute to the dying art of the DOS Batch file, I present my top ten batch file tricks:

  1. Use PUSHD / POPD to change directories
    Read Scott Hanselman’s writeup on PUSHD. The basic idea is that it keeps a stack, so at the simplest level you can do something like this:

    PUSHD “C:\Working Directory\” ::DO SOME WORK POPD

    That allows you to call the batch file from any directory and return to the original directory when you’re done. The cool thing is that PUSHD can be nested, so you can move all over the place within your scripts and just POPD your way out when you’re done.

  2. Call FTP scripts
    This sample prompts for the username and password, but they can of course be hardcoded if you’re feeling lucky.

    set FTPADDRESS=ftp.myserver.com set SITEBACKUPFILE=FileToTransfer.zip set /p FTPUSERNAME=Enter FTP User Name: set /p FTPPASSWORD=Enter FTP Password: CLS > script.ftp USER >>script.ftp ECHO %FTPUSERNAME% >>script.ftp ECHO %FTPPASSWORD% >>script.ftp ECHO binary >>script.ftp ECHO prompt n :: Use put instead of get to upload the file >>script.ftp ECHO get %SITEBACKUPFILE% >>script.ftp ECHO bye FTP -v -s:script.ftp %FTPADDRESS% TYPE NUL >script.ftp DEL script.ftp
  3. Read from the registry
    You can make creative use of the FOR command to read from and parse a registry value (see my previous post for more info).

    FOR /F “tokens=2* delims= ” %%A IN (‘REG QUERY “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL” /v SQL2005’) DO SET SQLINSTANCE=%%B
  4. Run SQL Commands
    You can call OSQL (or SQLCMD on servers with SQL 2005 installed) to execute SQL commands:

    osql -E -d master -Q “BACKUP DATABASE [%DATABASENAME%] TO DISK = N’D:\DataBase\Backups\%DATABASENAME%_backup’ WITH INIT , NOUNLOAD , NAME = N’%DATABASENAME% backup’, NOSKIP , STATS = 10, NOFORMAT”
  5. Check if a file or folder exists
    I used this to do a quick and dirty check to see if a Windows Hotfix had been installed in my IE7 Standalone scripts:

    IF EXIST %SystemRoot%\$NtUninstallKB915865$\ GOTO KB_INSTALLED ECHO Installing Hotfix (KB915865) to allow tab support START /D “%~dp0/Installation/Update/” xmllitesetup.exe
  6. Pause execution for a number of seconds
    There are different ways to do this from within a batch file, all with their tradeoffs. I use a ping to an invalid IP address with a timeout. The best way to do this is to find an invalid IP address and then pint it, but 1.1.1.1 is a pretty safe bet:

    ECHO Waiting 15 seconds PING 1.1.1.1 -n 1 -w 15000 > NUL
  7. Use defaults for optional parameters
    It’s not really easy to check for a missing parameter. You have to use something like “IF dummy==%1dummy”, which will only be true if %1 is empty. So, for example, here we’re allowing a user to supply an application path via the third parameter, and defaulting it if it’s missing. By the way, beware the IF syntax. The line spacing makes a difference, so this is one that I just copy and paste to avoid figuring it out every time.

    IF dummy==dummy%3 ( SET APPLICATIONPATH=”C:\Program Files\MyApp\” ) ELSE ( SET APPLICATIONPATH = %3 )
  8. Process each file matching a pattern in a directory
    I previously posted a script which iterates all files named *.bak in a directory and restores them on the local instance of SQL Server. Here’s an excerpt:

    PUSHD %BACKUPDIRECTORY% FOR %%A in (*.bak) do CALL :Subroutine %%A POPD GOTO:EOF :Subroutine set DBNAME=%~n1 ::RUN SOME OSQL COMMANDS TO RESTORE THE BACKUP GOTO:EOF
  9. Use batch parameter expansion to avoid parsing file or directory info
    Batch file parameters are read as %1, %2, etc. DOS Command Extensions – available on Windows 2000 and up – add a lot of automatic parsing and expansion that really simplifies reading filenames passed in as parameters. I originally put this at the top of the list, but I moved it because I figured the insane syntax would drive people off. I wrote a simple batch script that shows some examples. I think that makes it a little more readable. Stick with me, I think this is one of the best features in DOS batch and is worth learning.

    First, here’s the batch file which just echos the processed parameters:

    @echo off echo %%~1 = %~1 echo %%~f1 = %~f1 echo %%~d1 = %~d1 echo %%~p1 = %~p1 echo %%~n1 = %~n1 echo %%~x1 = %~x1 echo %%~s1 = %~s1 echo %%~a1 = %~a1 echo %%~t1 = %~t1 echo %%~z1 = %~z1 echo %%~$PATHATH:1 = %~$PATHATH:1 echo %%~dp1 = %~dp1 echo %%~nx1 = %~nx1 echo %%~dp$PATH:1 = %~dp$PATH:1 echo %%~ftza1 = %~ftza1

    Now we’ll call it, passing in “C:\Windows\Notepad.exe” as a parameter:

    C:\Temp>batchparams.bat c:\windows\notepad.exe %~1 = c:\windows\notepad.exe %~f1 = c:\WINDOWS\NOTEPAD.EXE %~d1 = c: %~p1 = \WINDOWS\ %~n1 = NOTEPAD %~x1 = .EXE %~s1 = c:\WINDOWS\NOTEPAD.EXE %~a1 = –a—— %~t1 = 08/25/2005 01:50 AM %~z1 = 17920 %~$PATHATH:1 = %~dp1 = c:\WINDOWS\ %~nx1 = NOTEPAD.EXE %~dp$PATH:1 = c:\WINDOWS\ %~ftza1 = –a—— 08/25/2005 01:50 AM 17920 c:\WINDOWS\NOTEPAD.EXE

    As I said, the syntax is completely crazy, but it’s easy to look them up – just type HELP CALL at a DOS prompt; it gives you this:

    %~1 – expands %1 removing any surrounding quotes (“)
    %~f1 – expands %1 to a fully qualified path name
    %~d1 – expands %1 to a drive letter only
    %~p1 – expands %1 to a path only
    %~n1 – expands %1 to a file name only
    %~x1 – expands %1 to a file extension only
    %~s1 – expanded path contains short names only
    %~a1 – expands %1 to file attributes
    %~t1 – expands %1 to date/time of file
    %~z1 – expands %1 to size of file
    %~$PATH:1 – searches the directories listed in the PATH environment variable and expands %1 to the fully qualified name of the first one found. If the environment variable name is not defined or the file is not found by the search, then this modifier expands to the empty string
    The modifiers can be combined to get compound results:

    %~dp1 – expands %1 to a drive letter and path only
    %~nx1 – expands %1 to a file name and extension only
    %~dp$PATH:1 – searches the directories listed in the PATH environment variable for %1 and expands to the drive letter and path of the first one found.
    %~ftza1 – expands %1 to a DIR like output line

    In the above examples %1 and PATH can be replaced by other valid values. The %~ syntax is terminated by a valid argument number. The %~ modifiers may not be used with %*

  10. Learn from the masters
    By far, my favorite resource for DOS Batch trickery is the Batch Files section of Rob van der Woude’s Scripting Pages. He’s got some good PowerShell resources, too.

老友重聚

一大学老友因差至京,小聚。

开篇·喝酒

水煮牛蛙热气腾
二锅头里感情深
笑谈常引当年事
感慨不离故旧情

中场·打电话

金陵别后久无闻
各散东西十四春
今日千里传音至
几人犹能辨阿旻

剧终·结语

意气风发聚港航
朝夕共处乐四方
一生好景君须记
最是同学少年郎

于2008-10-31 23:09:45

几个笑话

1、一饿狼觅食,听到有女人在训孩子:再哭就把你扔出去喂狼!孩子哭一夜,狼在门外痴痴等至天亮,长叹一声:骗子,女人都是骗子!
2.一犯人被执行枪决 ,由于子弹是劣质的,第一枪没放出,接着又放了第二枪…第三枪…这时犯人哭了:大哥你掐死我吧,太他妈吓人了!
3.一老太太看完黑人百米赛后,抹着眼泪说:吓死人!几个挖煤的跪成一排被枪毙,没瞄准就开了枪,娃儿们吓得那个跑呀,绳子都拦不住哇!
4、黄先生热爱革命,为纪念红军,给儿子取名为’军’, 一天送儿子上课,见公交 8路进站, 于是冲儿子大喊:黄军快跑,八路来了!~~~
5、一只小熊去山里创业,农夫给了他一把镰刀,木匠给了他一把锤子, 小熊来到山里遇到老虎,吓得把镰刀、锤子举在头顶,老虎说:没看出来,就你这熊样还是个党员来!
6、农夫挑担大粪,老外看到后问:大爷,这酱多少钱一斤? 农夫不语,老外用手沾了点放进嘴里,心想:你不告诉我多少钱一斤,我也不告诉你你的酱都臭了。

再见IBM

从IBM离职一月多了,才想起来在这里记上一笔。

从1/7/2007到12/16/2012,将近6年的工作时间,是本人迄今为止待得最长的一家公司,说没有一点感情是假的,但要说一定有多少美好的回忆,却似乎也谈不上 ——工作很平淡,本人很努力,成绩还可以。

话说离职的那天,办手续经过前台,IBM的Logo很大,蓝色的,一如既往的稳重,突然想留个影。看着埋头盯着屏幕的前台MM,犹豫了半天,终于没有好意思请她帮忙,自己忙乱地自拍了一个,结果头在,Logo不见。

暖气双管异程并联

家里的暖气有点不热,研究了一下,觉得是网上说的这种连接方式。不过郁闷的是我的第一组恰好没装回水阀门,他这里推荐的看来是用不上了。老实说,实在不知道这管里的水到底是怎么决定流向的,压力,冷热,唉,还是物理没学好呀,呵呵。

【图】暖气串联和并联_伊宁汗青_新浪博客_我喜欢用户的收集_我喜欢网
http://www.woxihuan.com/111827519/1346024495121311.shtml

 2.双管异程并联


双管异程并联的特点是管道行程较短、每一组散热器均可以单独控制(散热器前端进回水处加控制阀门)、温度比较均匀、系统的水流平衡较单管串联会有大幅度的提高,然而这种系统还是有一定的局限性。每组散热器的水流量不同,前端散热器的回水因为离主管道比较近,回的比较快,而后端回水就较慢,可能造成末端暖气不热或不够热的现象。不过没有关系,可以通过阀门调节来解决问题,在系统工作状态下把前端暖气的回水阀门依次稍关掉一些,以确保系统平衡,让末端暖气慢慢热起来。

唐多令

第一次看到刘过的唐多令,就颇觉喜欢。尤其是那一句“旧江山,浑是新愁”,直白浅显,却让人感喟深长。遂动了学写一首的念头。沉吟数日,得此一阙,可以闺怨名之,乃代妇人言,亦“为赋新诗强说愁”也。

长夜月如钩
孤星挂北楼
正三更,露冷花柔
独坐小园伤心事
杯中酒
正凝愁

曾许共白头
而今万事休
叹十年,爱恨情仇
欲展当年鸿雁看
心方动
泪先流

于2009-6-7

附:唐多令
作者:刘过
安远楼小集①,侑觞歌板之姬黄其姓者②,乞词于龙洲道人,为赋此糖多令,同柳阜之、刘去非、石民瞻、周嘉仲、陈孟参、孟容,时八月五日也。

   芦叶满汀洲。寒沙带浅流。二十年、重过南楼。柳下系舟犹未稳,能几日、又中秋。
   黄鹤断矶头③。故人今在不④。旧江山、浑是新愁。欲买桂花同载酒,终不是、少年游。