战争!

12月26日,印度孟买遭受连环恐怖袭击,125死,327受伤。

小时候看新闻看报道,看到非洲的儿童瘦骨嶙峋,却挺着个大肚子觉得很恶心。

生大后看新闻看报道,看到非州的儿童满身苍蝇,要用马尿来洗面觉得很痛心。

这一切都是战争惹的祸! 我反对战争,画面上的战士个个英姿飒爽。但谁会想到医院里、废墟中的凄凉。

我试过实弹射击,子佳节又重阳弹的威力岂会像映画般让你受了伤还能再站起来。

我爱听上几代人讲他们的故事,因为他们亲历其境,不只是好奇,也是为了居安思危。

前晚我还在争论休假的事宜,但在数千里外,却有人要与家人阴阳相隔。远方战火没有让我身边人的消失,但岁月终有一日会让他们离开。

感恩节,我不是教徒,但也应该感恩。感恩生于和平的年代,感恩我有明天和身边的一切, 感恩战争在远方,更祈祷远方没有战争!

如果遠方有戰爭
如果遠方有戰爭, 我應該掩耳或是坐起來,
慚愧地傾聽?
應該掩鼻,或該深呼吸
難聞的焦味?
我的耳朵應該
聽你喘息著愛情或是聽榴彈
宣揚真理?
格言,勳章,補給
能不能餵飽無饜的死亡?
如果有戰爭煎一個民族,在遠方
有戰車狠狠犁過春泥
有嬰孩在號啕,向母親的屍體
號啕一個盲啞的明天
如果有尼姑在火葬自己
寡慾的脂肪炙響絕望
燒曲的四肢抱住涅槃
為了一個無效的手勢

--- 余光中《如果远方有战争》节选

Posted in Sun 世界 | Leave a comment

George Carlin has gone!

喜欢这位大师级的笑匠, 并不因为他出名的七大粗口字 (Seven Dirty Words). 更多喜欢的是他的talk show中说话直率, 敢批评, 言语粗俗中带出智慧. 

如果想领略他在台上的风采, 可以到"http://www.youtube.com/results?search_query=George+Carlin"浏览关于他的video. 虽然粗言秽语,  但句句入骨. 

Posted in Sun 生活 | Leave a comment

BizUnit Tips

In these days, I'm researching how to use BizUnit for unit testing BizTalk. I found some problems of the BizUnit 2.0 which on codeplex.

One is the Xml validation, the ver 2.0 used an old Xml schema validation of .net 1.1. But, I'm so lucky, I found out a patch in the Internet, just replace the XmlValidationStep.cs in ValidationSteps directory. Here is the solution, bizunit xmlvalidationstep using net 2-0 schema validation.

And the other one is the BizTalk Soap Pipeline calling. So many people said, they will use the HttpRequestResponseStep or HttpPostStep to test the web service. But I don't think so, because we need to know which method we call and which message type it use.

I checked the codeplex, and found SOAPHttpRequestResponseStep. It has a couple parameters, WebServiceWSDLURL, ServiceName, WebMethod, InputMessageTypeName, MessagePayLoad. That is enough.

Set all the parameters correct and run the unit test. Oooooops! Has error. It said xxxxxxx xmlns="xxxxx" was not expected. What happened?

Let's check the code. You will find

serializer = new XmlSerializer(assembly.GetType(msgTypeName), defNamespace);

The problem is here, I think. b/s i'm not good at Serializer/Deserializer the xml from/to object. but I can say,
I remake this line and the SOAPHttpRequestResponseStep can run well, I don't know.
And of course, The test data xml must without the soap:envelope, soap:header and soap:body. :)
Good luck, if you want to use bizunit.
I will keep on research the BizUnit and Orchestration Profile in next few days. You anyone has interested in this topic,
feel free to ask me in the below comment. :P

Posted in Sun 技术 | Tagged , , , , | Leave a comment

T-Back! T-Back!

T-Back!!! Free T-Back. 夏天到了. 要Free T-Back

Posted in Sun 世界 | Leave a comment

Careful The using Statement

"Defines a scope, outside of which an object or objects will be disposed."
--MSDN

using Statement is a very useful, it can dispose object after using at once.

i always put it to open/close the Database connection. :P In last few days, i assigned a task, convert the ui control to a customer class. I must loop all the controls and calculate their position and size. What a crazy! Because of I'm afraid the performance going bad during i looping the controls. So, i use the using statement.

using(UserControl userControl = Screen.Controls[i] as UserControl)
{
...
}

Oh, shxt! The nightmare comes. The controls which on screen disappear one by one! I guess maybe something wrong after generating the controls at first. but I wrong. The using statement makes the userControl which referenced from UI control to null, so the UI Control is null too.

Ah, i'm so stupid. :(

Posted in Sun 技术 | Tagged , , | Leave a comment

巴丝日报-A1頭條: 阿G后悔 "好傻好天真"

[本报专讯]近日新派武侠片《七星伴月》剧照泄漏事件越演越烈,多名当事人因不满剧照外泄但仍未能提高自己的人气而深感不忿。继续以罢半夜凉初透工或割脉以示抗东篱把酒黄昏后议。

G小姐 ”很傻很天真“

日前,以生病为名罢半夜凉初透工的阿G在记招过程中表示,当初认为剧照不会外泄,觉得自己“好傻,好天真,早知如此,当初应该影多几张”。碍于合约问题,阿G表明不会再就电影剧情发表任何评论,希望大家在电影正式上映时多多捧场。

绝世武功电影再现

有记者试图追问阿G在电影中的角色会使出哪一派的招式,阿G只是鬼马地将食指放在唇边作状收声。记者只好不了了之。记者后来询问武术界前辈,有双面人之称的双面人,前辈指出,阿G其实已经暗示,她将会使出失传已久的“含、吹、赖、啜、咬”。

Posted in Sun 世界 | Tagged , , | Leave a comment

Writing in Windows Live Writer

I had tried it when it was beta version. It was very suck at that time.

And now, it's so cool. Fast, Convenient and Easy to use. I can write without open the browse and login to yo2. :P

Posted in Sun 生活 | Leave a comment

Life was destined by... the God? myself?

"I have noticed even people who claim everything is predestined, and that we can do nothing to change it, look before they cross the road." -- Stephen Hawking

 

Yup, that's true, if the life was destined by the God that why we don't cross the road directly. But, on the other hand, we find we always plough on the waves, we don't get any results whatever we do.

I think this is a very good question, not only for me, is for everyone.

Posted in Sun 生活 | Tagged | Leave a comment

Walkthrough: Show a print modal dialog in Report Viewer before Printing

if you have read this artical "Walkthrough: Printing a Local Report without Preview" in Microsoft MSDN". Then you will know the PrintPage Event will be trigged by the content printed to file, printer or screen.

After you click the print button, the screen will be printed direcrtly without any notice.

So, if you want do something before the printing like me. You'd better to subscript the BeginPrint Event in code. Let's see how to do this.

First, make a judgment of what action trigs this event by e.PrinAction.



if (e.PrintAction == PrintAction.PrintToPrinter){...}

i need to show a modal dialog for confirm to print the screen or not, then,
write this in my code.

printDlg = new PrintDialog();if (printDlg.ShowDialog()!= DialogResult.OK){e.Cancel = true;}

Finish! Enjoy

Posted in Sun 技术 | Tagged , , | Leave a comment

Error VSP1394 : Could not start profile monitor

When attempting to run a load test in VSTS will aborted by itselft and with the error:

Error VSP1394 : Could not start profile monitor

After stop the aspnet_wp.exe, it works, very strange, may be the aspnet_wp holds a performance monitor.

Posted in Sun 技术 | Leave a comment