class String def has_one_in?(string_Arr) has = false string_Arr.each { |word| has= self.include?(word) if has break end } has endenddef decode_subject(sub) if sub.include?("B?") encode_str = sub.match(/=\?(.*
等待今天宿舍的小八提出來要考 DBA ,這個勾起了我的思緒。To be a DBA or to be a Programmer it's a questions。其實我個人比較傾向去做程式設計,可是綜合考慮到我的性格,感覺自己做DBA更合適一點。下午看了一下 Oracle Certified Administrator
#靜態方法的4種寫法class Test def Test.StaticMethod1 puts "Test.StaticMethod1" end def self.StaticMethod2 puts "Test.StaticMethod2" end class << Test def StaticMethod3 puts "Test.StaticMethod3" end end class << self
2006初,我接到了公司分配的一個遺留項目,讓我負責一個基於C/S的系統的伺服器端。其實是系統是基於HTTP協議的,因為負責用戶端的同事對於伺服器端編程不甚瞭解,雖然使用PHP對熟悉C++的他來說是駕輕就熟,但是在進一步實現更多的功能和更高的效能上就捉襟見肘了。項目是在非常突然的情況下交給我的,因為該同事在用戶端上有更多的事情要做。我在分析了他的資料庫結構和PHP原始碼之後,決定按照與用戶端的通訊協議重寫他的伺服器端。為了能應付老闆苛刻的時間限制,我打算使用正在學習的Ruby on Rails。
It's pretty rare I recommend new blogs to follow on Ruby Inside. Not because I don't like them - I link to their posts all the time! - but because it's hard to tell if a new blog is going to keep going and be worth your while.Well, the Ruby
今天被人投訴說 blog 多日未更新,影響了閱讀情緒,偶趕緊開動起來 ^_^# Part oneaFile = File.new("C:\\1.txt","w") aFile.puts "the 1" aFile.puts "the 2"aFile.close # Part twoaFile = File.new("C:\\2.txt","w") puts "the 1" puts "the