Sunday, November 29, 2009

How Eulder Did it



Euler, you are so amazing. You are not human being. Are you ET or is there any gods on you? The theorems and proofs you provided two hundred years ago are so elegant, they are the outstanding work only God can make. Anyway, you are not alone. You are one of the brightest stars in the history of human.

Saturday, November 28, 2009

Discworld·Sourcery

    特里·普拉切特(1948-),英国著名幻想小说家,有“幻想小说家超级巨星”之称。




 普拉切特自一九八三年开始创作供成人阅读的“碟形世界” (TheDiscworld)系列,以讽刺、幽默的笔调塑造了一个神奇却又真实的幻想世界,目前已经完成三十多本,但故事还在继续……该系列已被翻译成三十多种文字,作者本人也因此获得“英国最佳幻想小说奖”,并因其“为文学做出的贡献”于一九九八年在英国女王的生日庆典上被授予英帝国的“四等勋爵士”称号。




 特里·普拉切特是当代最著名的幽默奇幻作家,同时也是英语文坛最具影响力的讽刺作家之一。被人誉为“笔锋犀利、擅于讽刺的J·R·R·托尔金”。深受读者推崇的“碟形世界”系列奇幻小说是普拉切特的代表作品,为他赢得了世界声誉。该系列从1983年《魔法的颜色》问世算起,到2006年,共出版了36部长篇小说,其中多部被改编成了漫画、动画、舞台剧、电视剧、广播剧、桌面游戏和电脑游戏等。截至2007年2月,普拉切特的作品在全球累计销售5000万册。现在大陆出版了的只有四本:〈魔法的色彩〉〈异光〉〈平等权利〉〈死神学徒〉(来自百度百科)

    新的一期《科幻世界·译文版》的长篇小说是《碟形世界·大法》


Tuesday, November 24, 2009

敏感词


QQ新头像.

SharePoint AllowUnsafeUpdates

 Today I meet a problem related with the AllowUnsafeUpdates. I found there is a greate artical about it. http://hristopavlov.wordpress.com/2008/05/16/what-you-need-to-know-about-allowunsafeupdates/

In short here is how to deal with AllowUnsafeUpdates:
1) Don’t update SharePoint objects from your code behind on GET requests as if you do so your code will be exploitable via a cross-site scripting. If you understand the consequences of doing this and still want to do it then read below about how to use the AllowUnsafeUpdates property.
2) If your code is processing a POST request then make sure you call SPUtility.ValidateFormDigest() before you do anything else. This will ensure that the post request is validated (that it is not a cross-site scripting attack) and after that you will not have to worry about AllowUnsafeUpdates, because its default value will be “true” after the form digest is validated. To find out more about this read the second part of this article.

The Microsoft idea behind introducing the AllowUnsafeUpdates property is to protect YOU from cross-site scripting attacks. The way this works is that if your application is running in an HTTPContext (i.e. it’s a web part for instance) and the request is a GET request then SharePoint will refuse to do any changes unless the value of AllowUnsafeUpdates is set to true and by default it will be false for GET requests. If you try to do any updates to lists, webs or any SharePoint objects that require an SPSite to be created first, and if you don’t set AllowUnsafeUpdates to true you will get this exception:
System.Exception: Microsoft.SharePoint.SPException: The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again. —> System.Runtime.InteropServices.COMException (0×8102006D): The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.
It is important to understand that if you are writing a class library for example, your code will behave differently when called from a web application and when called from a rich client. Actually if the HTTPContext.Current is null then AllowSafeUpdates will be always true. This is the case in rich clients where no cross-scripting is possible as there are simply no web requests.
Usually when you create your own SPSite or SPWeb objects, i.e. when you are not getting them from the SPContext (such as SPContext.Web), and when you try to update anything such as web or list properties, list items metadata etc, you may get the exception listed above. This is a clear indication that AllowUnsafeUpdates of the SPWeb is false and this is preventing you from doing the update. This problem is resolved easily by setting the AllowUnsafeUpdates of the parent web object to true. Still sometimes even after you have done this you may still be getting the same error.  This is typically caused by one of the the following reasons:
A) You have set the AllowUnsafeUpdate to true for the wrong SPWeb
You have to be careful because sometimes the ParentWeb of an object is not the same instance of the web you have retrieved the object from. For example when you go initialWeb.Lists[listId] you would expect that the returned list’s ParentWeb instance is the same as you initialWeb. However this is not the case. So if somewhere later in your code you go list.ParentWeb.UpdateSomething() this will not work because you have never set the AllowUnsafeUpdates property of list.ParentWeb. You have set it for your initialWeb but even that this is the same web as the list’s parent web both are different instances. Usually you see the error and then you go and investigate in Reflector whether this is the same instance or not. Alternatively you could use another more generic and clever way to deal with almost any similar situation described in the following post:
http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2008/05/15/when-allowunsafeupdates-doesn-t-work.aspx
The author suggests that you can set the HttpContent.Current to null before you do your updates and then reassign its initial preserved value when done. This will work great but remember to set the HTTPContent to null as early as possible. In the post above probably SharePoint uses the site.RootWeb to do the updates to the site scoped features and the RootWeb’s AllowUnsafeUpdates hasn’t been set to true explicitly.
B) The AllowUnsafeUpdates gets reset to false sometimes after you have set it to true
If we have a look at how the property is managed it turns out that it is stored in the request object associated with every SPWeb (which is actually a COM object)

[SharePointPermission(SecurityAction.Demand, UnsafeSaveOnGet = true)]
private void SetAllowUnsafeUpdates(bool allowUnsafeUpdates)
{
     this.Request.SetIgnoreCanary(allowUnsafeUpdates);
}
This actually means that every time the request is reset, the property will be also reset to its default value. The m_Request member is modified when a new web is created, when the web is disposed or when the SPWeb.Invalidate() method is called.

internal void Invalidate()
{
   if (this.m_Request != null)
   {
      if (this.m_RequestOwnedByThisWeb)
      {
         SPRequestManager.Release(this.m_Request);
      }

      this.m_Request = null;
   }

   this.m_bInited = false;
   this.m_bPublicPropertiesInited = false;
   this.m_Url = null;
}
So any operation that calls SPWeb.Invalidate() will reset AllowUnsafeUpdate to its default value. And for code running under HTTPContext, i.e. web applications, this default value for a GET request will be false. I’ve looked up for you all legitimate cases for which Invalidate() is being called by the SharePoint object model. These cases are:
1) When the Name or the ServerRelativeUrl properties of the SPWeb are changed and then Update() is called. In this case the AllowUnsafeUpdate is reset because with the change of these properties the URL of the web will change and logically the request object will change as it will now point to a different URL.
2) When any object that implements ISecurable (those are SPWeb, SPList and SPListItem) breaks or reverts their role definition inheritance. This means every time you call SPRoleDefinitionCollection.BreakInheritance(), BreakRoleInheritance(), ResetRoleInheritance() or set the value of HasUniquePerm the AllowUnsafeUpdates property of the parent web will reset to its default value and you may need to set it back to true in order to do further updates to the same objects.
3) In many cases when an exception is caught by the SharePoint object model when you try to retrieve any sort of data the AllowUnsafeUpdates of the parent web will be reset to false as a precaution to protect against potential exploits. In those cases however the objects will be in unknown state anyway after the request has been reset and the exception is re-thrown so they are of no practical interest.
And finally it is also good to mention that you may get another related exception when trying to update your SharePoint objects and that is:
System.Exception: Microsoft.SharePoint.SPException: Cannot complete this action.Please try again. —> System.Runtime.InteropServices.COMException (0×80004005): Cannot complete this action.
This usually happens when some updates have been made to an object (usually SPSite, SPWeb or SPList) that may be clashing with your changes and SharePoint refuses to do the update. To recover from this situation you simply need to create fresh copies of the SPSite and the SPWeb objects and do the updates on the objects retrieved from the fresh copies. And of course don’t forget to set the AllowUnsafeUpdates to true for the freshly created SPWeb if required.

Sunday, November 22, 2009

手机的悲剧


前天跟哈密瓜同学吃饭,期间提到了手机的问题。她说要去买个新的手机,我给予了相应的回应。结果第二天早上一起来,在我睡眼惺忪的时候,想看看地球上的时间,发现我那英俊潇洒,任劳任怨,意志坚强,思想正确,一直默默无闻工作的Nokia 6120c终于抵挡不住滚滚经济大潮的席卷,抵御不住资产阶级自由化的腐蚀,愤然罢工了。在送往工会研究学习一番,工会领导语重心长的对我说,要要交218的学习费用,给它洗洗脑,这要再过一两天,他就能重返工作岗位了。为了社会的和谐发展,我忍痛的出了一次血。在与同志们分别的这段日子,我借了另外的一个悲剧手机--每发一条短信就要重启一次。

Sunday, November 15, 2009

Everyday word 20091115

filthy adj.肮脏的;污秽的,下流的;淫秽的,(天气)寒冷潮湿的;恶劣的;糟糕的, adv.富得流油的,
spasm n.痉挛, 抽搐,(能量、行为等的)突发, 发作, 阵发,

twitch vt. & vi.(使)抽动; (使)颤动; (使)抽搐,
scent n.气味, 香味,香水,(动物的)臭迹, 遗臭,vt.(动物等)嗅出…的气味, 嗅出…的存在,察觉到(坏事等的)存在; 
alluring adj.诱惑的, 迷人的,
prostitute n.卖淫者;妓女;男妓;娼妓, vi.滥用才能;糟蹋自己 ,卖淫;出卖肉体,
prole n.穷人
swarm n.蜂群, 一大群(蜜蜂等昆虫); 一大群一大批(向同方向移动的人),vi.密集, 云集, 挤满,成群地移动,蜜蜂或其他飞行昆虫成群地飞来飞去,
tacit adj.缄默的,不说话的,暗示的,不言而喻的,不明言的,默许的,

debauchery n.道德败坏,淫荡,放荡,淫逸,
furtive adj.(指行动)偷偷摸摸的, (指人)鬼鬼祟祟的,
promiscuity n.混杂;混乱,(男女的)乱交,
eroticism n.色情,性爱倾向,性的兴奋,性欲亢进,
celibacy n.独身生活,
ideology n.思想(体系), 思想意识, 意识形态;观念形态,
imbecility n.愚笨;低能,弱智,愚蠢行为,
clasp vt.抱紧;紧紧拥抱,握紧;攥紧;抓紧,vt. & vi.扣紧;扣住;扣牢,n.(包、皮带或首饰的)扣子,扣环 
coarse adj.粗的, 粗糙的,不精制的,粗野的, 粗鲁的,粗鲁无礼的,粗俗的(尤指涉及性的),

nostril n.鼻孔,
scuffle n.扭打, 混战,vi.
ingrained adj.(指习惯、字迹等)牢固的, 极难除掉的,

Use the ASP.NET 3.5 Chart on MOSS 2007

The ASP.NET 3.5 has new component that is used to display the Chart. But you can not use it directly on MOSS 2007. Before you use it, you should do some configuration firstly.
1. AppSettings section:
<add key="ChartImageHandler" value="Storage=memory;Timeout=20;Url=/_layouts/Images/tempImages/ "/>

You also can use the File mode.You can create a folder named tempImages under 12/template/Images

2. System.Web - httpHandlers section   
<add path="ChartImg.axd" verb="GET,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>


Saturday, November 14, 2009

这个坏人很有型


这位很帅的绅士,叫安东尼。霍普金斯,是《沉默的羔羊》中那个食人博士的扮演者。就是这么一位看似应该扮演英雄人物的家伙,却创造了一个电影史上的经典坏蛋,更确切的说,是让人会感到害怕的坏蛋,犹如平湖百晓生的兵器谱中的小李飞刀一般,位列前茅。与绝大多数的满脸横肉,眼光阴郁的银幕坏蛋不一样,这位同学心思缜密,学识渊博,爱好美食,彬彬有礼,但下手绝对够狠够辣,更可怕的是他在心理学上的极高造诣。他能活活的把同监人士给说死,颇有孔明同学的遗风。影片对他人物的烘托,很大一部分是从他人的口中描述。与很多传统的坏人形象不同,这位同学给人的是心理上的压迫。曾有这么一个故事(未经考证),有一次安同学开车和人相撞了,安同学很友好的表示要赔钱,但事主还到法院去告他,说他会吃人。电影演到他这个份上,被人告应该很开心。

阿甘正传

今晚看了《阿甘正传》。万恶资本主义的电影又一次给了感动。看似浮华喧嚣的背后,总是有着人性的光辉在闪耀着。中国电影应该感到庆幸,相比与中国足球在世界足坛的地位,中国电影在世界影坛的位置还是要比国足高的。中国足球都不一定能够赢的了金胖子的球队,当中国电影还是能超越金胖子的电影。

Wednesday, November 11, 2009

Everyday word 20091111




faction n.组织中的小派别; 派系

martial adj.军队的; 军事的; 战争的


harsh adj.刺耳的, 刺眼的, 粗糙的严厉的, 严酷的


cordial adj.热诚的, 热情友好的


boycott vt.抵制; 拒绝参加


lowbrow adj.(文学作品或电视节目等)粗俗的, 低级趣味的


dissuade vt.劝(某人)勿做某事; 劝阻

hypothesis n.假说, 假设, 前提

encroach vi.侵犯; 侵占; 侵害


surveillance n.盯梢, 监视


demarcate v. 划分界线


trench n.深沟, 地沟战壕


erection n.建立; 建造竖立物, 建筑物


gin n.杜松子酒, 荷兰酒


reprimand n.训斥, 惩戒 vt.申斥, 惩戒, 谴责

美剧中的脏口


Original Link http://item.feedsky.com/~feedsky/zoan/~7293032/292221585/5267182/1/item.html 

一.优雅骂人


1. Stop complaining! 别发牢骚!



2. You make me sick! 你真让我恶心!



3. What’s wrong with you? 你怎么回事?



4. You shouldn’t have done that! 你真不应该那样做!


5. You’re a jerk! 你是个废物/混球!



6. Don’t talk to me like that! 别那样和我说话!



7. Who do you think you are? 你以为你是谁? 8. What’s your problem? 你怎么回事啊?



9. I hate you! 我讨厌你!



10. I don’t want to see your face! 我不愿再见到你!



11. You’re crazy! 你疯了!



12. Are you insane/crazy/out of your mind? 你疯了吗?(美国人绝对常用!)



13. Don’t bother me. 别烦我。



14. Knock it off. 少来这一套。



15. Get out of my face. 从我面前消失!



16. Leave me alone. 走开。



17. Get lost.滚开!



18. Take a hike! 哪儿凉快哪儿歇着去吧。



19. You piss me off. 你气死我了。



20. It’s none of your business. 关你屁事!



21. What’s the meaning of this? 这是什么意思?



22. How dare you! 你敢!



23. Cut it out. 省省吧。



24. You stupid jerk! 你这蠢猪!



25. You have a lot of nerve. 脸皮真厚。



26. I’m fed up. 我厌倦了。



27. I can’t take it anymore. 我受不了了!(李阳老师常用)



28. I’ve had enough of your garbage. 我听腻了你的废话。



29. Shut up! 闭嘴!



30. What do you want? 你想怎么样?



31. Do you know what time it is? 你知道现在都几点吗?



32. What were you thinking? 你脑子进水啊?



33. How can you say that? 你怎么可以这样说?



34. Who says? 谁说的?



35. That’s what you think! 那才是你脑子里想的!



36. Don’t look at me like that. 别那样看着我。



37. What did you say? 你说什么?



38. You are out of your mind. 你脑子有毛病!



39. You make me so mad.你气死我了啦。



40. Drop dead. 去死吧!



41. Fuck off. 滚蛋。



42. Don’t give me your shit. 别跟我胡扯。



43. Don’t give me your excuses/ No more excuses. 别找借口。



44. You’re a pain in the ass. 你这讨厌鬼。



45. You’re an asshole. 你这缺德鬼。



46. You bastard! 你这杂种!



47. Get over yourself. 别自以为是。



48. You’re nothing to me. 你对我什么都不是。



49. It’s not my fault. 不是我的错。



50. You look guilty. 你看上去心虚。



51. I can’t help it. 我没办法。



52. That’s your problem. 那是你的问题。



53. I don’t want to hear it. 我不想听!



54. Get off my back. 少跟我罗嗦。



55. Give me a break. 饶了我吧。



56. Who do you think you’re talking to? 你以为你在跟谁说话?



57. Look at this mess! 看看这烂摊子!



58. You’re so careless. 你真粗心。



59. Why on earth didn’t you tell me the truth? 你到底为什么不跟我说实话?



60. I’m about to explode! 我肺都快要气炸了!



61. What a stupid idiot! 真是白痴一个!



62. I’m not going to put up with this! 我再也受不了啦!



63. I never want to see your face again! 我再也不要见到你!



64. That’s terrible. 真糟糕!



65. Just look at what you’ve done! 看看你都做了些什么!



66. I wish I had never met you. 我真后悔这辈子遇到你!



67. You’re a disgrace. 你真丢人!



68. I’ll never forgive you! 我永远都不会饶恕你!



69. Don’t nag me! 别在我面前唠叨!



70. I’m sick of it. 我都腻了。



71. You’re son of bitch! 婊子养的!



72. Stop screwing/ fooling/ messing around! 别鬼混了!



73. Mind your own business! 管好你自己的事!



74. You’re just a good for nothing bum! 你真是一个废物!/ 你一无是处!



75. You’ve gone too far! 你太过分了!



76. I loathe you! 我讨厌你!



77. I detest you! 我恨你!



78. Get the hell out of here! 滚开!



79. Don’t be that way! 别那样!



80. Can’t you do anything right? 成事不足,败事有余。



81. You’re impossible. 你真不可救药。



82. Don’t touch me! 别碰我!



83. Get away from me! 离我远一点儿!



84. Get out of my life. 我不愿再见到你。/ 从我的生活中消失吧。



85. You’re a joke! 你真是一个小丑!



86. Don’t give me your attitude. 别跟我摆架子。



87. You’ll be sorry. 你会后悔的。



88. We’re through. 我们完了!



89. Look at the mess you’ve made! 你搞得一团糟!



90. You’ve ruined everything. 全都让你搞砸了。



91. I can’t believe your never. 你好大的胆子!



92. You’re away too far. 你太过分了。



93. I can’t take you any more! 我再也受不了你啦!



94. I’m telling you for the last time! 我最后再告诉你一次!



95. I could kill you! 我宰了你!



96. That’s the stupidest thing I’ve ever heard! 那是我听到的最愚蠢的事!(比尔?盖茨常用)



97. I can’t believe a word you say. 我才不信你呢!



98. You never tell the truth! 你从来就不说实话!



99. Don’t push me ! 别逼我!



100. Enough is enough! 够了够了!



101. Don’t waste my time anymore. 别再浪费我的时间了!



102. Don’t make so much noise. I’m working. 别吵,我在干活。



103. It’s unfair. 太不公平了。



104. I’m very disappointed. 真让我失望。



105. Don’t panic! 别怕!



106. What do you think you are doing? 你知道你在做什么吗?



107. Don’t you dare come back again! 你敢再回来!



108. You asked for it. 你自找的。



109. Nonsense! 鬼话!



二.粗话骂人


1. dork 呆子,呆瓜;当一个人做了某些傻事的时候,就可以骂他dork,虽然是呆子的意思,但实际上并不是说他智力低下,有时在情侣间,一方做错了某事,也咳说dork来责怪他,有“真傻”的意思。



2. nerd/geek 讨厌鬼 nerd表示“讨厌的人”也有“蠢货”的意思,和dork类似;geek是“讨厌鬼”,两个词的用法大同小异。



3. dammit 该死,真***;直接说damn也可以,另外还常说damn it all!见鬼!真糟糕! 真气死人!



4. fuck ***;这个词是英语骂人里最重的一个,而且很不雅观,不建议(经常)使用,特别是女孩子,会让人觉得很没教养。She is the first one who speak out “fuck” from her little pink tone. 这是很经典的一本小说Summer Sister里的一句话,形容了女主角之一的性格。



5. dirty… 脏的、卑鄙的、下流的、猥的;只是这一个词还不能称之为骂人,但后面接上一些词就不同了,例如dirty lier 卑鄙的骗子(今年Oscar获奖影片Chicago中女主角愤怒至极,开枪的一瞬间喊的就是U dirty lier!);还有一个很恶心,但很常用的组合就是dirty asshole,关于它的中文翻译是什么我就不在这里详述了,ass是什么hole是什么,像中文一样那么一组合,自然就知道骂的是什么了。



6. bitch 泼妇,妇,贱人;这是英语骂人Top10里唯一一个分公、母的,是不是由于妇女解放运动才有这个词的呢,呵呵,开玩笑。但现在英语里仿佛雌雄分的越来越清楚了,大家在动物等词的前面加上了he/she来区分雌雄,例如用she-dog,she-cat形容母的。如果想用分雌雄的词骂男的,只能用jackass了,意思是“公驴;笨蛋;傻瓜”例如:The silly jackass!这个蠢驴!



7. phycho 神经病;形容一个人的行为反常,不正常的令人讨厌的意思。美语里还常说freak,意思是怪人、行为怪异。



8. shit 狗屁,胡说八道;用于表示惊奇、愤怒或极其不高兴等情感,是很常用的脏字。 eg. You big shit!你这个大笨蛋!



9. dense/stupid/foolish 傻瓜;dense是笨的理解力慢的、笨脑瓜的,stupid和dense意思很类似,但平时更常用stupid,因为stupid只是说人做了傻事,并没有贬低他人智商的意思,但是dense和foolish就有智障的意思了。



10.bastard 混蛋, 讨厌鬼;很常用的一个词,原来的意思是“私生子”,现在俚语里当“混蛋”用,但有时两个朋友开玩笑的时候也可当“家伙”来理解,并不一定是骂人哦。



三.其他


1. I’m so fed up with your BS. Cut the crap.



我受够了你的废话, 少说废话吧.



美女 (美国的女人) 是不喜欢说 f*** 这个不雅的字的, 所以她们就说 shoot, 或是 BS (=Bull s***) 来表示她们还是很有气质的. “Cut your crap.” 是当你听到对方废话连篇, 讲个不停时, 你就可以说, “Cut the crap.” 相当于中文里的废话少话.



2. Hey! wise up! 放聪明点好吗?



当别人作了什么愚蠢的事时, 你可以说, “Don’t be stupid” 或是 “Don’t be silly.” 但是这是非常不礼貌的说法. 比较客气一点的说法就是, wise up! 它就相当于中文里的放聪明点. 你也可以用坚酸刻薄的语气说. Wise up, please. 然后故意把 please 的尾音拉得长长的.



也有人会说, Hey! grow up. 意思就是你长大一点好不好? 例如有人二十岁了却还不会自己补衣服, 你就可以说 Hey! grow up. 这根 wise up 是不是也差不多呢?



3. Put up or shut up.



要吗你就去做, 不然就给我闭嘴. (转自-读我)



有些人就是出那张嘴, 只会出意见, 此时就可以说, Put up or shut up. 要注意的是, Put up 字典上是查不到”自己去做” 的意思, 但是见怪不怪, 很多笔记本上的用法都是字典上查不到的. 比方说今天你在写程式, 有人明明不懂却喜欢在一旁指挥你, 这时候你就可以说, Put up or shut up.



有时为了要加强 shut up 的语气, 老美会把它说成, shut the f*** up. 这句话常在二人火气很大时的对话中可以听到, 例如电影 The house on the haunted hill 女主角身陷鬼屋之中, 其它人又七嘴八舌时, 她就很生气地说了一句, shut the f*** up.



这句话也让我想到一句成语, walk the walk, talk the talk, 也就是说到就要作到, 有点像是中文里知行要合一的意思, 或是只说, walk the talk 也可以.



4. You eat with that mouth?



你是用这张嘴吃饭的吗?



别人对你说脏话, 你就回敬他这一句, 言下之意, 就是你的嘴那么脏, 你还用这张嘴吃饭. 还有一种说法, “You kiss your Momma with that mouth?” 就是说你也是用这脏嘴亲你妈妈的吗? 所以下次记得如果有老美对你说脏话, 记得不要再 Fxxx 回去, 保持风度, 说一句, “You eat with that mouth?” 就扯平了



5. You are dead meat.



你死定了.



我们说你完蛋了, 可以说 “You are dead.” 或是像这样说 “You are dead meat.” 意思都是一样的, 比如说你跟别人说过不淮碰我的东西, 但有人他就是老爱用你的东西, 下次要是再被你抓到, 你就可以说, “You are dead meat.”



6. Don’t you dare!



How dare you!



你好大的胆子啊!



这句话跟中文里 “你好大的胆子” 是一样, 可以在二种场合说, 第一种是很严肃的场合, 比如说小孩子很调皮, 讲又讲不听, 父母就会说, “Don’t you dare!” 那意思就是这个小孩要当心点, 不然等会就要挨打了. 另一种场合是开玩笑, 比如有人跟你说我跟某网友约会去了, 你说 “Don’t you dare?” 就有点开玩笑的语气. (你不怕被恐龙给吃了吗?)



Dare 在英文里还有许多有趣的用法, 例如, “You dare me.” 或是 “I double dare you.” 还有一种游戏叫 Truth or Dare, 就是现在酒吧里非常流行的“真心话大冒险”啦。



7. Don’t push me around.



不要摆布我.



这个词很有意思, 把你推来推去, 作摆布解释, 如果有人指挥你一下作这个一下作那个, 你就可以用这一句 Hey! Don’t push me around. 通常当我讲 “Don’t push me around.”时, 我还会想到一个字 bossy. Bossy 就是说像是老板一样, 喜欢指挥别人. 例如, “You are so bossy. I don’t like that.”



这句话也可以单讲, “Don’t push me.” 或是 “Don’t push me any further.” 还有一句根push 有关的成语, 叫 push the button, 意思就是, 指使, 操纵. 例如, “I know why you are doing this, someone is pushing your button!”



8. Are you raised in the barn?



你是不是乡下长大的啊?



这句话是形容一个人没教养, 但是是比较开玩笑的语气. 比如说有人坐没坐像, 你就可以对他说这一句. Barn 原指谷仓. 我翻成乡下比较能跟中文的意思结合. 老美常用 barn 或是 backyard 来形容一个人没有教养或是没有文化, 像是那天在电视上听到一句, “No backyard language in my house.” 就是说, 在我的家里不准讲粗话.



9. You want to step outside?



You want to take this outside?



你想要外面解决吗?



老美跟我们一样, 要是二个人一言不合吵起来了, 可能就有人要说这一句了. 指的就是要不要出去打架啦. 还有一些我听过类似的用法, 例如, “Do you want to pick a fight?”你要挑起争端吗? 或是 “This means war.” 这就意谓着跟我宣战.



10. You and what army?



You and who else?



你和哪一路的人马啊?



要是有人跟你说 “Do you want to step outside?”, 就回他这一句吧. 意思是说, 是喔… 那你找了多少人马要来打架啊? 有时候电视里出现这句对白的时候, 还会打出一排军队的计算机动画, 非常地有意思.



还有一句话也很好玩, 叫 “Who’s side are you on?” 这就是在快要打架时, 你问人家说,你到底是站在哪一边的?

Saturday, November 7, 2009

LAMP and WordPress Installation and Configuration

Linux and Apache and MySQL and PHP and WordPress

  • sudo apt-get install apache2
  • sudo apt-get install php
  • sudo apt-get install libapache2-mod-php5
  • sudo /etc/init.d/apache2 restart (The previous four steps is for installing the Apache and PHP)
  • sudo apt-get install mysql-server
  • sudo apt-get install libapache2-mod-auth-mysql
  • sudo apt-get install php5-mysql
  • sudo /etc/init.d/apache2 restart(These four steps are for installing the MySQL)
  • sudo ls /etc/apache2/mods-enabled (make sure that there are files php5.conf and php5.load, if not, sudo a2enmod php5)
  • Now you can install the wordpress now, but we can inatll the phpMyAdmin which would make your admin work more easier.
  • Download the phpMyAdmin package from its site, and unpackage it under the /var/www as /var/www/phpMyAdmin
  • sudo cp /var/www/phpmyadmin/config.sample.inc.php /var/www/phpmyadmin/config.inc.php
  • Edit this file ./var/www/phpmyadmin/config.inc.php
  • Find the "blowfish_sercet" and fill any charater after it.
  • Edit the file /etc/php5/apache2/php.ini
    • Add extension=php5-mcrypt.so
  • sudo chmod -R 777 /var/www/
  • Install the wordpress, Upackage under the /var/www as /var/www/wordpress
  • mysql -u youraccount -p in the shell
  • create database yourdatabasename ;
  • GRANT ALL PRIVILEGES ON wordpress.* TO hello@localhost IDENTIFIED BY ‘666666′
  • FLUSH PRIVILEGES
  • exit
  • Now you can access the http://localhost/wordpress, then you would be guided to config.