词汇:self

n. 自己,自我;本质;私心

相关场景

Don't let your once-motivated self down.
>> A bit of moti
You started your book with boredom and a really good idea. You devoted hours and days to the words that build up your world. Don't let your once-motivated self down. Don't let all that time go to waste. Finish it.
你带着无聊和一个好主意开始写这本书。你花费了数小时和数天的时间来构建你的世界。不要让曾经有动力的自己失望。不要浪费那么多时间。完成它。
>> 10 reasons to keep writing your book.
She shoots some self-portraits by her Polaroid, mandatory grimace.
>> 这个杀手不太冷Léon: The Professional Movie Script
FRODO has a sudden moment of SELF REALISATION and releases GOLLUM, horrified at his VIOLENCE.
>> 指环王3:王者归来The Lord of the Rings: The Return of the King Movie Script
PIPPIN looks up at him, unnerved. GANDALF gives him a small self-deprecating smile . . .
>> 指环王3:王者归来The Lord of the Rings: The Return of the King Movie Script
Kill him!) [Legolas shoots the Uruk again. It stumbles and then throws it self and the torch at the bombs. An enormous explosion is set off, blowing away a large part of the wall. Rock, debris and bodies are thrown up. Aragorn is also thrown back by the force of the explosion and on the ground, knocked out. Théoden looks on in shock as the Uruk-hai streams in past the Deeping Walls.] THÉODEN Brace the Gate! Hold them! Stand firm!
>> 指环王2:双塔奇兵The Lord of the Rings: The Two Towers Movie Script
[Frodo looks at up him with bloodshot eyes. He smiles at Sméagol and looks at Sam. Sméagol raises a fist in self-congratulation and dances around. He then picks up one of the rabbits and snaps the rabbit's back in front of Frodo.] SMÉAGOL They are young. They are tender. They are nice. Yes they are! Eat them! Eat them!
>> 指环王2:双塔奇兵The Lord of the Rings: The Two Towers Movie Script
32.猴子补丁Monkey Patching and refinement:
Active Support的问题; module OnlySpace ONLY_SPACE_UNICODE_RE= %r/\A[[:space:]]*\z/
def self.only_space?(str) if str.ascii_only? !str.bytes.any {|b| !32 && !b.between?(9,13)} else ONLY_SPACE_UNICODE_RE === str end end
>> Effective Ruby
31. eval; instance_eval定义的是单例方法;:
def glass_case_of_emotion x="I'm in a " + __method__.to_s.tr('_',' ') binding; binding 可以获得当前的临时域并把这个临时域封装到Binding对象中作为返回结果。这个指定的上下文是eval方法的第二个参数; eval("x", glass_case_of_emotion); class_eval很像是重新打开类,实际上是被定义在Module里面,only被模块和类使用。= moudle_eval; instance_eval访问实例变量;class_eval定义实例方法。 class Widget attr_accessor(:name, :quantity) def initialize(&block) instance_eval(&block) if block end ;;; w= Widget.new do |widget| widget.name= "Elbow Grease" ; @quantity = 0; end ; instance_exec, class_exec, moudle_exec; only accept 代码块, no string; object.instance_eval("@#{name} = DEFAULT")
module Reset def self.reset_var (object, name) object.instance_exec("@#{name}.to_sym") do |var| const = self.class.const_get(:DEFAULT); instance_variable_set(var, const) end ...
>> Effective Ruby
29.钩子方法中执行super方法:
def self.inherited(subclass) { super; handlers << subclass};
>> Effective Ruby
28. 模块和类的钩子方法:
Ruby的hook在类和模块的级别实现元编程。在类和模块中定义方法-单例方法。混合引入模块时,ruby都会调用钩子方法included or extended;这个钩子可以看作是一个,通知通知当前模块即将要被扩展到另一个类中。代理的方法只是重定向了。interited; method_added method_removed method_undefined 实例方法;singleton_method_added singleton_method_remove singleton_mothod_undefined 可以被用于模块方法或类方法。这些方法只接受一个symbol ,方法名; Triggers singleton_method_removed(:hello) class << self; remove_mothod(hello);end
>> Effective Ruby
24. block and ensure:
分配-使用-释放;file = File.open(file_name, 'w'_...file.close;因为又垃圾回收的原因,中途发生异常也会被回收资源,但是你不确定什么时候会被回收,所以你如果能及时处理,那更好。那么就算需要begin。。。ensure file.close if file end;也可以通过 File.open(file_name, 'w') do |file| ...end,这种block的方式。块执行晚后文件会被关闭。将资源管理简单化。 简单化的资源管理,也衍生出一个 传block给方法的问题,可以用class Lock def self.acquire ; lock =new ; lock.exclusive_lock!; if block_given? yield(lock) else lock # Act more like Lock::new. end ensure if block_given? # ...end end end; 没有绑定块时候,Lock::acquire 。。。; 类方法上使用块和ensure语句将资源管理的逻辑抽离出来。
>> Effective Ruby
15.优先使用实例变量:
@@开头的变量是类变量,bind在类上。; 单例模式;private_class_method(:new, :dup, :clone) def self.instance @@single ||= new; 其实类方法是一个假象,类方法实际上是一个类的对象的实例方法。Singleton模块作为Ruby标准库的一部分;require('singleton'); class Configuration include(Singleton) end;
>> Effective Ruby
9.setter:
setter方法时候需要指定接受者;attr_accessor attr_write; self.first = ...;调用非setter方法,不需要显式指定接收者;
>> Effective Ruby
One of the things that we must do is that we must be involved in working on achieving self mastery. You must work on yourself continuously. Never be satisfied with yourself, always know that as you invest the effort and time on you.That's the greatest ability that human beings have above animals.
>> Motivate yourself in the morning
Find 3 to 5 resources(books or DVD...). Learn just enough that you can actually practice and self correct or self edit as you practice , so the learning becomes a way of getting better at noticing when you're making a mistake and doing something a little different .
>> 20 hours and 4 steps to rapid skill acquisition
2:
Learn enough to self-correct.
>> 20 hours and 4 steps to rapid skill acquisition
Low motivation, low self-esteem. high anxiety: the block goes up. the filter goes up. the input can not get in.both getting comprehensible input, one makes progress, the other doesn't. One is open to the input, the other is closed.
>> comprehensible input - One way only one way to acquire a language
If the student isn't motivated, if self-esteem is low, if anxiety is high , if the student is on the defensive, if the student thinks the language class is a place where his weaknesses will be revealed. he may understand the input, but it won't penetrate. It won't reach those parts of the brain that do language acquisition. A block keeps it out. We call this block the affective filter.
>> comprehensible input - One way only one way to acquire a language
Motivation; Self-esteem(higher).anxiety(lower to zero)
>> comprehensible input - One way only one way to acquire a language
Will, full of self-loathing, raises his hand to strike her.
>> Good Will Hunting (1997)Movie Script
INT. WILL'S APARTMENT -- NIGHT Will sits alone in his one room apartment, reading. A closer look reveals he is reading a self-help PSYCHOLOGY BOOK. Will is flipping through the book at about a page per second. He shakes his head and smiles. Upon finishing the book, he throws it in a nearby WASTEBASKET. Push in on the back of the book where a SMILING PSYCHOLOGIST is pictured.
>> Good Will Hunting (1997)Movie Script
WILL:
There is a lengthy legal precedent, Your Honor, going back to 1789, whereby a defendant may claim self- defense against an agent of the government where the act is shown to be a defense against tyranny, a defense of liberty-- The Judge interrupts to address the prosecutor.
>> Good Will Hunting (1997)Movie Script
Presenting your royal highness, our illustrious King Julien XIII, self-proclaimed lord of the lemurs, et cetera. Hooray, everybody.
>> Madagascar (2005)Movie Script
many insecure people have a defense mechanism to protect their own self-esteem, so when they come across successful people, they tend to gather all the evidence they can to prove that other's success was just luck.
许多缺乏安全感的人有一种防御机制来保护自己的自尊,所以当他们遇到成功的人时,他们倾向于收集所有能证明别人的成功只是运气的证据。
>> Experience in learning English