摘要:
nil? empty? blank?的区别1nil?:check if it exists and that it is valid.In ruby,all classes inherit from the Object class.nil? is a method of Object.跟其他语言不同的是,其他语言会把nil当成是null,但是nil在ruby中指向的是一个class NilClass。所以nil.nil?=truecool_people = {:conan_the_destroyer => "man", :red_sonja => " 阅读全文
摘要:
手把手教你学习ROR-3.asset的那些事1 What is asset pipeline?Asset pipeline is the whole process of how Rails handle with css,javascript and image...2 How to use asset pipeline?A enable/disable asset pipelineThe asset pipeline is a core feature pf Rails.So you can just use it.And you also can disabled it.It can b 阅读全文
摘要:
手把手教你学习ROR-2.View中的locals,as,object,layout以及FormHelperhttp://api.rubyonrails.org/classes/ActionView/PartialRenderer.html1 locals,objects,as在partial中的使用locals:In a template for Advertise#accoutthat means:render “advertiser/_account.html.erb” with @buyer passed in as the local variable accountas:用于更换名 阅读全文
摘要:
手把手教你学习ROR-1.Haml1 What is Haml?Haml是对传统XHTML的生成方式的另一种表现形式。Haml让你撇开臃肿丑陋的模板,将它们以优雅整洁的代码代替。2 How to get Haml?Standard GemMost people will just want the standard stable Haml gem. To install this:gem install hamlPre-Release GemTo get the latest and greatest Haml goodness, you can install the prerelease 阅读全文
摘要:
建个随笔,以后看看能留下几种英文原文:10 Programming Languages That Will Change The IT World 这里要说的都是革新,说这些的目的就是要保持关注最新技术。如果你是一个程序员,想要探寻未来技术,那这篇文章就是你的必读之选。我们这里列出了 10 种编程语言,10 种将会改变 IT 世界工作方式的编程语言。这些语言已经在开始改变 IT 界的景象。看看吧: Dart 语言 这种语言由谷歌制造,用来替代 Javascript,弥补 Javascript 在 web 应用中大量使用时出现的缺点。对于 Dart 语言,谷歌的希望是,它将成为 web 编... 阅读全文
摘要:
VLC is not supposed to be run as root. Sorry. – SolutionbySYED ALAMinLINUX,TROUBLESHOOTINGSToday i captured one tutorial using recordmydesktop utility on my backtrack and decided to view it but unfortunately backtrack 5 Linux didn’t include a good media player to do entertainmentwhen you get bored w 阅读全文