Zephyrrr 的个人资料Zephyrrr's Blog照片日志列表 工具 帮助

订阅源

正在加载...正在加载...
作者 
作者 
作者 
作者 
作者 
作者 
作者 
作者 
作者 
作者 
作者 
作者 
作者 
第 1 张,共 25 张

Zephyrrr's Blog

About movie, coding and others

Lock in NHibernate

为了Initialize Lazy-Load Proxy,先要Lock一下。但Lock了以后,再Update,就不提交到数据库去了。(为了不新建连接,Initialize和Update用的同一个Session)。 只能Lock了以后再Evict。 搞不懂这么设计为了什么,还是bug。暂且这样。
8月14日

Subversion 支持 目录权限了

太土了,才知道。不过也一直没需要有权限。

具体设置见http://bbs.iusesvn.com/thread-6-1-1.html

如有需要,下载Subversion

8月13日

Crank 2: High Voltage(怒火攻心2)

笑死我了,口味很重。

8月4日

Windows 窗体 扩展设计时支持

还是MSDN最权威,见http://msdn.microsoft.com/zh-cn/library/37899azc%28VS.80%29.aspx。其他都是谣言。

没工夫慢慢看,自己够用了就行。用中出现了一些小问题。

  1. 设计时的程序目录是IDE目录("…\Common 7\IDE\”),所以配置文件,私有程序集可能会出现找不到的情况。没找到很好的办法,配置文件就拷过去,程序集用AppDomain..AssemblyResolve 事件在程序中载入。
  2. 如果需要添加控件,不能用反射来直接创建控件(不会保存到*.Designer.cs里),而应该用
  3. IDesignerHost h = (IDesignerHost)GetService(typeof(IDesignerHost));

    Label label = (Label)h.CreateComponent(typeof(Label));

    来创建。删除时同样用 h.DestroyComponent(label);

  4. 如何从Component得到主窗体:(component.Site.GetService(typeof(IDesignerHost)) as IDesignerHost).RootComponent as Form
3月12日

How to: Create Custom Configuration Sections Using ConfigurationSection

You can extend the standard set of ASP.NET configuration settings with XML configuration elements of your own. To do this, you must create your own configuration section handler.

The handler must be a .NET Framework class that implements the System.Configuration..::.ConfigurationSection class.

Note:

In the .NET Framework versions 1.0 and 1.1, a configuration section handler had to implement the System.Configuration..::.IConfigurationSectionHandler interface, which is now deprecated. However, a code example exists in How to: Create Custom Configuration Sections Using IConfigurationSectionHandler.

The section handler interprets and processes the settings defined in XML configuration elements within a specific portion of a Web.config file and returns an appropriate configuration object based on the configuration settings. The configuration object that the handler class returns can be any data structure; it is not limited to any base configuration class or configuration format. ASP.NET uses the configuration object to read and write to your custom configuration element.

To create a custom configuration section handler
  1. Create a public class that inherits the System.Configuration..::.ConfigurationSection class, as illustrated in the following code example.

    Visual Basic

    Copy Code

    Imports System
    Imports System.Collections
    Imports System.Text
    Imports System.Configuration
    Imports System.Xml
    
    Namespace MyConfigSectionHandler
    
        Public Class MyHandler
            Inherits ConfigurationSection
    
            Public Sub New()
            End Sub
    
            ' Add declarations for child elements and attributes like this:
            '<ConfigurationProperty("<propertyName>", <named parameters>)> _
            'Public Property MyAttrib1() As <type>
            '    Get
            '        Return CStr(Me("<propertyName>"))
            '    End Get
            '    Set(ByVal value As <type>)
            '        Me("<propertyName>") = value
            '    End Set
            'End Property
    
        End Class
    End Namespace
    
    

    C#

    Copy Code

    using System;
    using System.Collections;
    using System.Text;
    using System.Configuration;
    using System.Xml;
    
    namespace MyConfigSectionHandler
    {
        public class MyHandler : ConfigurationSection
        {
            public MyHandler()
            {
            }
    
            // Add declarations for child elements and attributes like this:
            // [ConfigurationProperty("<propertyName>", <named parameters>)]
            // public <type> <PropertyName>
            // {
            //     get { return (<type>)this["<propertyName>"]; }
            //     set { this["<propertyName>"] = value; }
            // }
        }
    }
    
    
  2. Add your own code to perform the configuration work that you desire.

    For example, you can replace the commented code with the following code that obtains the values from your custom section.

    Visual Basic

    Copy Code

    Imports System
    Imports System.Collections
    Imports System.Text
    Imports System.Configuration
    Imports System.Xml
    
    Namespace MyConfigSectionHandler
    
        Public Class MyHandler
            Inherits ConfigurationSection
    
            Public Sub New()
            End Sub
    
            Public Sub New(ByVal attribVal As String)
                MyAttrib1 = attribVal
            End Sub
    
            <ConfigurationProperty("myAttrib1", DefaultValue:="Clowns", IsRequired:=True)> _
            <StringValidator(InvalidCharacters:="~!@#$%^&*()[]{}/;'\|\\", MinLength:=1, MaxLength:=60)> _
            Public Property MyAttrib1() As String
                Get
                    Return CStr(Me("myAttrib1"))
                End Get
                Set(ByVal value As String)
                    Me("myAttrib1") = value
                End Set
            End Property
    
            <ConfigurationProperty("myChildSection")> _
            Public Property MyChildSection() As MyChildConfigElement
                Get
                    Return CType(Me("myChildSection"), MyChildConfigElement)
                End Get
                Set(ByVal value As MyChildConfigElement)
                    Me("myChildSection") = CType(value, MyChildConfigElement)
                End Set
            End Property
        End Class
    
        Public Class MyChildConfigElement
            Inherits ConfigurationElement
    
            Public Sub New()
            End Sub
    
            Public Sub New( _
            ByVal a1 As String, ByVal a2 As String)
                MyChildAttribute1 = a1
                MyChildAttribute2 = a2
            End Sub
    
            <ConfigurationProperty("myChildAttrib1", DefaultValue:="Zippy", IsRequired:=True)> _
            <StringValidator(InvalidCharacters:="~!@#$%^&*()[]{}/;'\|\\", MinLength:=1, MaxLength:=60)> _
            Public Property MyChildAttribute1() As String
                Get
                    Return CStr(Me("myChildAttrib1"))
                End Get
                Set(ByVal value As String)
                    Me("myChildAttrib1") = value
                End Set
            End Property
    
            <ConfigurationProperty("myChildAttrib2", DefaultValue:="Michael Zawondy", IsRequired:=True)> _
            <StringValidator(InvalidCharacters:="~!@#$%^&*()[]{}/;'\|\\", MinLength:=1, MaxLength:=60)> _
            Public Property MyChildAttribute2() As String
                Get
                    Return CStr(Me("myChildAttrib2"))
                End Get
                Set(ByVal value As String)
                    Me("myChildAttrib2") = value
                End Set
            End Property
    
        End Class
    End Namespace
    
    

    C#

    Copy Code

    using System;
    using System.Collections;
    using System.Text;
    using System.Configuration;
    using System.Xml;
    
    namespace MyConfigSectionHandler
    {
        public class MyHandler : ConfigurationSection
        {
            public MyHandler()
            {
            }
    
            public MyHandler(String attribVal)
            {
                MyAttrib1 = attribVal;
            }
    
            [ConfigurationProperty("myAttrib1", DefaultValue = "Clowns", IsRequired = true)]
            [StringValidator(InvalidCharacters = "~!@#$%^&*()[]{}/;'\"|\\", MinLength = 1, MaxLength = 60)]
            public String MyAttrib1
            {
                get
                { return (String)this["myAttrib1"]; }
                set
                { this["myAttrib1"] = value; }
            }
    
            [ConfigurationProperty("myChildSection")]
            public MyChildConfigElement MyChildSection
            {
                get
                { return (MyChildConfigElement)this["myChildSection"]; }
                set
                { this["myChildSection"] = value; }
            }
        }
    
        public class MyChildConfigElement : ConfigurationElement
        {
            public MyChildConfigElement()
            {
            }
    
            public MyChildConfigElement(String a1, String a2)
            {
                MyChildAttribute1 = a1;
                MyChildAttribute2 = a2;
            }
    
            [ConfigurationProperty("myChildAttrib1", DefaultValue = "Zippy", IsRequired = true)]
            [StringValidator(InvalidCharacters = "~!@#$%^&*()[]{}/;'\"|\\", MinLength = 1, MaxLength = 60)]
            public String MyChildAttribute1
            {
                get
                { return (String)this["myChildAttrib1"]; }
                set
                { this["myChildAttrib1"] = value; }
            }
    
            [ConfigurationProperty("myChildAttrib2", DefaultValue = "Michael Zawondy", IsRequired = true)]
            [StringValidator(InvalidCharacters = "~!@#$%^&*()[]{}/;'\"|\\", MinLength = 1, MaxLength = 60)]
            public String MyChildAttribute2
            {
                get
                { return (String)this["myChildAttrib2"]; }
                set
                { this["myChildAttrib2"] = value; }
            }
        }
    }
    
    

    This example uses the declarative model. The System.Configuration..::.ConfigurationSection class can also be implemented using the programmatic model. For an example, see the System.Configuration..::.ConfigurationSection class overview topic, and Classes Used to Create Custom Section Handlers.

    For the purposes of comparison, this example is similar to the code in How to: Create Custom Configuration Sections Using IConfigurationSectionHandler. However, inheriting from the System.Configuration..::.ConfigurationSection class allows for finer control of your section handler. For example, the configuration file in the next procedure allows for a child element called myChildSection for which the preceding code declares a ConfigurationProperty and defines as a class derived from ConfigurationElement. Additionally, the encapsulation of collection functionality in the ConfigurationElementCollection class allows you to easily create collection elements that can employ add, remove, and clear elements in a configuration file. For more information and examples, see ConfigurationElementCollection.

To add a custom section handler to an ASP.NET configuration file
  1. Add a sectionGroup element and a section element to your Web.config file inside the configSections element, as illustrated in the following code example. It is this declaration that associates the custom section handler with the section name.

    Note:

    Nesting a section element in a sectionGroup is optional, but it is recommended to help better organize configuration data.

    You can add the section-handler declaration in a different configuration file than the one where you add your custom configuration elements, providing that the configuration file where the section handler is declared is higher in the configuration file hierarchy. For more information, see ASP.NET Configuration File Hierarchy and Inheritance.

    The type attribute of the section element must match the manifest of the assembly or there will be a configuration error. The assembly file itself must be in the same ASP.NET application directory as the Web.config file that defines it.

    Copy Code

    <configuration>
    
    <!-- Configuration section-handler declaration area. -->
      <configSections>
        <sectionGroup name="myCustomGroup">
          <section 
            name="myCustomSection" 
            type="MyConfigSectionHandler.MyHandler, MyCustomConfigurationHandler, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" 
            allowLocation="true" 
            allowDefinition="Everywhere"
          />
        </sectionGroup>
          <!-- Other <section> and <sectionGroup> elements. -->
      </configSections>
    
      <!-- Configuration section settings area. -->
    
    </configuration>
  2. Add your custom configuration elements in the configuration section settings area of your Web.config file.

    Copy Code

    <configuration>
    
    <!-- Configuration section-handler declaration area. -->
    
      <!-- Configuration section settings area. -->
      <myCustomGroup>
        <myCustomSection myAttrib1="Clowns">
          <myChildSection 
              myChildAttrib1="Zippy" 
              myChildAttrib2="Michael Zawondy "/>
        </myCustomSection>
      </myCustomGroup>
    
      <!-- Other configuration settings, like <system.web> -->
    
    </configuration>

To programmatically access your custom configuration data
  • Obtain an instance of your custom configuration object and use the GetSection method or the GetSection method to populate it.

    The following example of an ASPX page works with the previous examples to enumerate the attributes and child elements of the custom configuration section.

    C#

    Copy Code

    <%@ Page Language="C#" %>
    
    <script runat="server">
        protected void Button1_Click(object sender, EventArgs e)
        {
            MyConfigSectionHandler.MyHandler config =
                (MyConfigSectionHandler.MyHandler)System.Configuration.ConfigurationManager.GetSection(
                "myCustomGroup/myCustomSection");
            
            StringBuilder sb = new StringBuilder();
    
            sb.Append("<h2>Attributes in the myCustomSection Element:</h2>");
            sb.AppendFormat("myAttrib1 = {0}<br/>", config.MyAttrib1.ToString());
            sb.Append("<h2>Attributes in the myChildSection Element:</h2>");
            sb.AppendFormat("myChildAttrib1 = {0}<br/>", config.MyChildSection.MyChildAttribute1.ToString());
            sb.AppendFormat("myChildAttrib2 = {0}<br/>", config.MyChildSection.MyChildAttribute2.ToString());
    
            Label1.Text = sb.ToString();
            Label1.Visible = true;
        }
    </script>
    
    <html  >
    <head runat="server">
        <title>Untitled Page</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        
        <h1>Enumerate MyCustomSection</h1>
        <asp:Label ID="Label1" runat="server" 
            Text="" />
        <br />
        <asp:Button ID="Button1" runat="server" 
            Text="Get Custom Config Info" 
            OnClick="Button1_Click" />
    
        </div>
        </form>
    </body>
    </html>
    

Enterprise Library

  1. Introduction: http://msdn2.microsoft.com/en-us/library/aa480453.aspx
  2. Homepage: http://msdn2.microsoft.com/zh-cn/practices/default.aspx
  3. Community: http://www.codeplex.com/entlib

Data Access Application Block

Sample 1

  • Database db = DatabaseFactory.CreateDatabase();
  • DbCommand dbCommand = db.GetStoredProcCommand("GetProductsByCategory");
  • db.AddInParameter(dbCommand, "CategoryID", DbType.Int32, 7);
  • DataSet productDataSet = db.ExecuteDataSet(dbCommand);

Should know

  • Dabasebase
  • DatabaseFactory
  • DbComand

Sample 2

  • Database.ExecuteReader,Database.ExecuteDataSet,Databse.ExecuteScalar,Database.ExecuteNonQuery
  • Databse.GetStoredProcCommand, Database.GetSqlStringCommand
  • DbCommad.AddInParameter, DbCommand.AddOutParameter, AddOutParameter.GetParameterValue

Transaction

  • using (DbConnection connection = db.CreateConnection())
  • {
  •      connection.Open();
  •      DbTransaction transaction = connection.BeginTransaction();
  •      transaction.Commit(); (transaction.Rollback();)
  • }

 

Security Application Block

authenticate: use MembershipProvider which is integrated in .Net

  • bool authenticated = Membership.ValidateUser(username, password);
  • IIdentity identity = new GenericIdentity(username, Membership.Provider.Name);

Token:

  • IToken token = ISecurityCacheProvider.SaveIdentity(this.identity);
  • IIdentity savedIdentity = ISecurityCacheProvider.GetIdentity(this.token);
  • ISecurityCacheProvider.ExpireIdentity(this.token);

Priciple and authorize: (Roles is integrated in .Net)

  • string[] roles = Roles.GetRolesForUser(identity);
  • IPrincipal principal = new GenericPrincipal(new GenericIdentity(identity), roles);
  • bool authorized = this.ruleProvider.Authorize(principal, rule);
  • principal.IsInRole(role1);

Profile: (also in integrated in .Net)

  • ProfileBase userProfile = ProfileBase.Create(this.identity.Name);
  • userProfile["FirstName"] = this.profile.FirstName;
  • userProfile.Save();

Caching Application Block

CacheManager productsCache = CacheFactory.GetCacheManager();
Product product = new Product(id, name, price);
productsCache.Add(product.ProductID, product, CacheItemPriority.Normal, null, new SlidingTime(TimeSpan.FromMinutes(5)));
product = (Product) productsCache.GetData(id);

productsCache.Flush();

productsCache.Remove(id);

Expiration: Absolute, Sliding, Extended format, File dependency
Scavenging: Low, Normal, High, or Not Removable

 

Cryptography Application Block
// String encrypt and decrypt
string encryptedContentsBase64 = Cryptographer.EncryptSymmetric("symmProvider", "SensitiveData");
readableString = Cryptographer.DecryptSymmetric("symmProvider", encryptedContentsBase64);

// byte encrypt and decrypt
byte[] valueToEncrypt = Encoding.Unicode.GetBytes("password");
byte[] encryptedContents = Cryptographer.EncryptSymmetric("symmProvider", valueToEncrypt);
// Clear the byte array memory that holds the password.
Array.Clear(valueToEncrypt, 0, valueToEncrypt.Length);

byte[] decryptedContents = Cryptographer.DecryptSymmetric("symmProvider", encryptedContents);
string plainText = (new UnicodeEncoding()).GetString(decryptedContents);

// Obtaining a Hash Value
byte[] valueToHash = (new UnicodeEncoding()).GetBytes("password");
byte[] generatedHash = Cryptographer.CreateHash("hashProvider", valueToHash);
// Clear the byte array memory.
Array.Clear(valueToHash, 0, valueToHash.Length);

// CompareHash
// generatedHash contains a hash value for a previously hashed string.
byte[] stringToCompare = (new UnicodeEncoding()).GetBytes("TestValue");
bool comparisonSucceeded = Cryptographer.CompareHash("hashProvider", stringToCompare, generatedHash);

 

Exception Handling Application Block

Exception Handlers

  • Wrap handler. This exception handler wraps one exception around another.
    Replace handler. This exception handler replaces one exception with another.
  • Logging handler. This exception handler formats exception information, such as the message and the stack trace. Then the logging handler gives this information to the Enterprise Library Logging Application Block so that it can be published.
    Fault Contract Exception Handler. This exception handler is designed for use at Windows Communication Foundation (WCF) service boundaries, and generates a new Fault Contract from the exception.

Exception Policies

  • Base policy. This policy logs the exception and rethrows the original exception.
  • Secure policy. This policy logs the exception, replaces the original exception with a custom exception, and throws the new exception.
  • Expressive policy. This policy wraps the original exception inside another exception and throws the new exception.

 

  • Logging Policy
  • Replace Policy
  • Wrap Policy
  • Propagate Policy

Logging Application Block

  • LogEntry logEntry = new LogEntry();
    Logger.Write(logEntry);
  • Dictionary<string, object> dictionary = new Dictionary<string, object>();
    ManagedSecurityContextInformationProvider informationHelper = new ManagedSecurityContextInformationProvider();   
    informationHelper.PopulateDictionary(dictionary);
  • using (new Tracer("Log Category"))
    {
      // Perform processing to be timed here
    }
  • if (Logger.ShouldLog(logEntry))
    if (Logger.GetFilter<CategoryFilter>().ShouldLog(logEntry))

Validation Application Block

  • public class Customer
    {
        [StringLengthValidator(0, 20)]
        public string CustomerName;

         [SelfValidation]            
         public void CheckTemperature(ValidationResults results){}
      }

  • Customer myCustomer = new Customer("A name that is too long");
    ValidationResults r = Validation.Validate<Customer>(myCustomer);
    // Validator<Customer> validator = ValidationFactory.CreateValidator<Customer>(customerRuleSetCombo.Text);
    // ValidationResults results = validator.Validate(customer);
    if (!r.IsValid)
    {
        throw new InvalidOperationException("Validation error found.");
    }
  • ValidatorComposition(CompositionType.And, CompositionType.Or)
    ContainsCharactersValidator
    DateTimeRangeValidator
    DomainValidator
    EnumConversionValidator
    NotNullValidator
    ObjectCollectionValidator
    ObjectValidator
    PropertyComparisonValidator
    RangeValidator
    RegexValidator
    RelativeDateTimeValidator
    StringLengthValidator
    TypeConversionValidator
  • Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WinForms.ValidationProvider provider
    form.ValidateChildren();
    类似于ErrorProvider的使用方式(Extender,在每个控件上都有扩展属性)
    provider.RuleName
    provider.SetPerformValidation(control, bool)
    provider.SetSourcePropertyName(congrol, sourcePropertyName)
    provider.SetValidatedProperty(control, validatedPropertyName)
  • You can also specify an instance of the ErrorProvider class for the control. If you do this, the validation errors that result if the validation fails are sent to the error provider as a properly formatted error message.

12月26日

Invasion

烂片一部,才看了30分钟就不看了,真是浪费了Nicol Kidman。不过好像Nicol也经常接烂片的。

12月23日

色, 戒

8.0/10。

看了2遍,一遍影院一遍DVD。
在影院看的时候,偌大的影厅里只有我一个人,空旷却看的压抑。但只为王佳芝郁闷,为她爱的人却没勇气去爱她反而要把她拉进一个爬不出来的深坑里,为王这个美好的东西受到一次次的破坏而压抑。易先生? 很正常。

以为看DVD版的时候会更压抑,因为sm型的ml。可是我却看的很舒心,就像看一般的爱情电影,感觉到王和易的感情在一次次的升温发展,感到他们之间真诚、抑制、唯一的感情。以为要失望,因为看的太顺利了。可是在最后王出钻石店后,在镜头里看到三轮车上的风车,看到骑三轮车的男子,听到那么舒缓的音乐的时候,却一下子崩溃了。

电影让我们看到了很多平常看不到的美好事物,可是到最后却总是要把它们撕的粉碎,然后世界又似乎从没发生过这一切一样,仍旧一样的运转。只是,又多了一个可以让我们怀念的故事。

12月20日

Ran

8/10。残酷的黑泽明。从头到尾没有一个人有一丝一毫的希望,即使是瞎子也让他一个人独自留在这个残酷的战乱年代。无论是尔虞我诈还是潜心拜佛,无论是增多功名还是无欲无求,无论是口是心非还是诚实直率,都免不了同样的结局。

12月11日

Man From Earth

实在是忍不住要在这里喊一下,这部电影太好看了。
 
一堆人在一个有壁炉的房间里jjww,竟然就能jjww个90分钟而让人觉得意犹未尽心满意足心领神会心神向往心有不甘心有灵犀一点通。强烈会看第二遍。
 

片尾的音乐也好听的很,不过goo不到清晰版的。贴一张Chantelle Duncan的照片以示欣慰。

5月7日

Movie Movie and Movies

1) The Silence of the Lambs. 8/10, 剧情演员皆不错,经典。
< >
2)16 Blocks. 6/10, 为了看Bruce Willis,可惜已老又无老的气质。

3) K-PAX. 7.5/10,看过小说,也为了看Kevin Spacey,可惜总没有小说的感觉。

4)Borat。 8/10。很奇特的一部电影,很好玩。

5)Dial M for Murder。 7.5/10, Hitchcock的又一部电影,还行。超级喜欢Grace Kelly。

6)Princess Bride。7.5/10,很典型的一个爱情童话,虽然很普通却还是很好看。

7) Miller's Crossing. 7.5/10. 又一部黑帮片,还不错。

8)Delicatessen。7/10, 称作超现实作品,但不知道在讲什么东西。偶尔有几个镜头很搞笑。

9)Efter Brylluppet。 7/10, 很难评论。

10) Good Will Hunting. 7/10,没感觉。

11)The Wizard of Oz。 8/10,又是一个很简单的故事,却单纯的很好看。

12)The Science of Sleep. 7/10,又一部很搞p的电影,想想应该有看Eternal Sunshine Of The Spotless Mind的感觉,却没兴趣再看一遍。可能演员看着碍眼。

13)The Lives Of Others。7/10,没体验没感觉。

14) Office Space。 6.5/10,看Rachel Green,看完后Rachel出场很少,剧情倒很白开。

15)Deep Red。7.5/10,很好看的恐怖片,引用一个词语,“很风格化”。

16)Climates。 8.5/10,又一部连续看2遍的电影,一举一动丝丝入扣,特别是女主角的表演。
Iklimler的评论 from douban:
女人啊,你為什麼哭泣?
  
  因為你的憂傷,男人不懂,你的快樂,男人也不懂,所以你嘲笑他,你蔑視他,你拒絕他,但你卻不能不愛他。於是你說服自己相信他的承諾和謊言,你回到他的身邊,但你得到了什麼?從男人身上,你也許得到了片刻的歡愉,之後卻是無盡的憂傷,而你的快樂,只能從你自己而來。
  
  愛情如氣候。
  
  今天明明還在承受太陽的暴怒,轉身已是冰天雪地,並要逆著刺骨的冷獨行。季節的變化如何大,說穿了不過是大自然的規律,週而復始,年年如是。多少年過去了,我們自以為習慣了四季的更替,但是當置身漫天風雪之中,我們的悽惶始終不減。
  
  其實有時我們只是想逃離孤寂而已。
  
  但為什麼回到他身邊,你還是要忍受無邊的寂寞?還是要孤身佇立在冰雪之中?他是在你身邊,但他真的是和你在一起嗎?他不是承諾會改變,會令你快樂嗎?你回到他的懷中只一晚而已,一切馬上回復原狀,你向他訴說你昨晚的夢,夢中你在青綠的草地上滑翔,滑過一個個小丘,然後你看見已逝的母親和你招手,在夢中你是如此快樂,你說的時候笑得那麼天真,在兩個小時之中我都不曾見過。你看著窗外,還沉浸在快樂中,他低沉的聲音突然把你驚醒:「現在幾點了?不要耽擱了上班的時間.我和你去吃早餐吧。」你怔怔地看著他,驀然明白:眼前這個人根本沒有改變,也不會改變。夏天時,你們在烈日下分開,這半年裡你掉過許多眼淚,終於你振作起來,但結果,你還是回到了原點,彷彿一切從沒發生過,你們依舊是那一雙貌合神離的情侶,從一開始你的掙扎和眼淚就注定要枉費在這個自私的男人身上。
  
  可是你要知道,雖然他隱瞞了這半年裡和那個女人的事,但當他跟你說要令你快樂的時候,也許他不是存心欺騙你,不過是你們對於寂寞的理解太不同而已。他只是不想孤獨一人,卻不明白你更不能忍受兩個人的寂寞。他的確思念你,當他在陌生的城市尋到你的身影,他是快樂的,玻璃和風雪後的你很朦朧,但你的猩紅帽子卻出奇地鮮艷。他偷偷地跟著你,卻失去了你的蹤跡,正在徬徨著,你卻一下子從回憶的迷霧中蹦出來,站在他面前。他看著你笑了,你的臉無比鮮亮,但他好像沒有留意到,你頭上頂的帽子竟是暗紅的。他給你帶來照片,為你買了小禮物,你裝作不為所動,卻為了前事躲在車廂哭。他來認錯了,求你回到他身邊,然而在你回去後,他也醒悟了:在現實裡,原來你對他而言仍一如以往地沉悶,只是他的回憶和渴望把你美化了。
  
  於是你們又一次失望,關係彷如雞肋,你們再為了割捨與否陷入痛苦……週而復始,又是一個愛情的循環。

17)Perfume The Story Of A Murderer。7/10,还买了小说,可惜看了电影也没继续看书的动力了,并不是个太精彩的故事。

18)Central Station。 7/10,也没太大感觉。

19)Cool Hand Luke。7.5/10,又一部越狱电影,略显冗长沉闷。

20) High Noon。 8/10,又一部很好看的西部片,很男人。

21)It's A Wonderful Life。7.5/10,黑白片看起来还是很有味道。

22)Monty Python and the Holy Grail。8.5/10,70年代就拍出的很现在一样无厘头的电影,有创意。差不多的还有 Monty Python's The Life of Brian。不过一部就够。

23) The Treasure Of The Sierra Madre。8/10,又出西部片,同样好看。

24) Étudiante, L'. 7/10,为了看Sophie Marceau,可惜男主角实在看着不爽。

25)Breaking And Entering。7/10,为什么总是看Jude Law不顺眼。

26)The Last King of Scotland。7.5/10,Forest Whitaker的表演真是不错,可惜剧情比Hotel Rwanda相比并没什么突破。

27)The World Is Not Enough. 7/10,又是为了看Sophie Marceau,顺便看看Pierce Brosnan。

28) 门徒. 6.5/10,没太大意思,随便看看。

29)M。 7.5/10,剧情很流畅的黑白犯罪片。

30) In The Heat Of The Night。7.5/10,犯罪+种族。

31)Little Children。7/10。不太明白。

32)图雅的婚事。7.5/10。终于讲出一个完整故事的中国电影。

33) The Fountain。8/10,很精彩的带点科幻色彩的爱情故事

3月18日

Kimi's new beginning

换个东家,终于有个好开局。
2月21日

新片一箩筐

0. Stranger Than Fiction( 奇幻人生): 8.0/10。

 

1. Volver( 回归): 7.5/10

 

2. Casino Royale(皇家赌场): 7.0/10

 

3. The Departed( 无间行者): 6.5/10

 

4. Babel( 通天塔): 7.5/10

 

5. Click( 神奇遥控器): 6.5/10

 

6. Children of Men(人类之子): 6.0/10

 

7. The Queen( 女王): 7.5/10

 

8. Happy Feet( 快乐的大脚): 6.5/10

 

9. The Black Dahlia( 黑色大丽花): 7.0/10

 

10. The Devil Wears Prada(时尚女魔头): 6.0/10

 

11. Flags of Our Fathers( 父辈的旗帜): 7.0/10

 

12. El Laberinto del Fauno( 潘恩的迷宫): 7.5/10

 

13. The Prestige( 致命魔术): 7.0/10

 

14. United.93( 颤慄航班93): 7.0/10

 

1月10日

The Elephant Man(象人) - David Lynch directed

David Lynch导演,却发现一点不像David Lynch的风格。

Lucía y el sexo(露茜亚的情人) - 西班牙情色片


稍微有点复杂的人物关系。喜欢情节有点搞的需要去思考的电影,特别是一时半会还搞不清楚的,例如这部电影中的那个海边的洞。
 
有时间重看一遍。

Blade Runner(银翼杀手) - 80年代科幻片

80年代的科幻片,今天看来在特效上已经毫无起眼甚至有点粗糙。在情节上似乎也不太引人入胜,不过听说原著更加吸引。大概如“银河系漫游指南”,书中有另外一个世界。

The Sea Inside(深海长眠) - 沉重的电影

谈论安乐死的一部电影,又牵涉到了生命的意义。太沉重了,无语。

Memento(记忆碎片) - 著名电影

很喜欢有创新性结构的电影,例如深爱的"Mulholland Drive",所以在一个比较空的周末,又找来了这部n久前看过的电影重温了一遍。
 
重看还是很扣人心弦。

Hotel Rwanda(卢旺达饭店) - 惨绝人寰的大屠杀

有点类似与“辛德勒名单”的一个故事,只不过发生在卢旺达内战期间。同样是战争的A要对B进行种族灭绝,A中有杰出人士A0为了保护B而进行的斗争。
 
战争很令人讨厌,令人厌恶。但比正常的战争更让人不能忍受的有目的的对平民的屠杀,如果这种屠杀是全民的行动时,那就更加让人感到痛恨。

Life Is Beautiful(美丽人生) - 又一部很好的意大利电影

意大利电影总让人耳目一新。说话说个不停的人物,古老的石头房子,这些却又让人感觉似曾相识。
 
前半部是一部很俗套却又百看不厌的爱情故事,偶遇美女,擦出火花,环境不许,坚持不懈,终成眷属。
 
在后半部中,则看到了更多的男人的责任。对孩子,即使在再艰难的环境中,也要给孩子一个良好的心理环境;对妻子,即使在再危险的情况下,也要互报平安互相支持。总是给爱的人一个乐观向上的环境,时时如此,异常难得。
 
不喜欢罗罗嗦嗦说话很多的男人,但对这部电影中的主人公,却多了一份敬仰。