- 浏览: 37554 次
-
最新评论
-
jwnest:
注释还是很重要的,假设你需要去维护别人的代码或者该bug,如果 ...
你写注释吗? -
visualcatsharp:
黑暗浪子 写道我是不是要把《clean code》里关于com ...
你写注释吗? -
visualcatsharp:
ozzzzzz 写道visualcatsharp ...
你写注释吗? -
黑暗浪子:
我是不是要把《clean code》里关于comment那一章 ...
你写注释吗? -
ozzzzzz:
visualcatsharp 写道ozzzzzz 写道java ...
你写注释吗?
文章列表
你会发现 ROR有多么的神奇记住下面的几个文件,用javascript_include_tag "prototype"来使用 prototype.js 用javascript_include_tag "effects" 来使用 effects.js
- 2006-09-15 12:51
- 浏览 820
- 评论(0)
create table products (id int not null auto_increment,title varchar(100) not null,description text not null,image_url varchar(200) not null,price decimal(10,2) not null,date_available datetime not null,primary key (id));在config\database.yml文件中,你可以找到数据库连接的参数。方便而安全。以上的SQL语名创建了表products,在ROR中,以下的语句就会产 ...
- 2006-09-01 09:57
- 浏览 1007
- 评论(0)
>rails demo >cd demo>ruby script/server http://localhost:3000 further more,create a controllerdemo> ruby script/generate controller SayYou’ll find it in the file app/controllers/say_controller.rb class SayController < ApplicationControllerend then,create an action and name ...
- 2006-08-27 10:43
- 浏览 1061
- 评论(0)
Rails is a Model-View-Controller framework. Rails accepts incomingrequests from a browser, decodes the request to find a controller, andcalls an action method in that controller. The controller then invokes aparticular view to display the results back to the user. The good news isthat Rails takes ca ...
- 2006-08-27 10:38
- 浏览 746
- 评论(0)
The value returned by a Rubymethod is the value of the last expression evaluated, so we can get rid ofthe temporary variable and the return statement altogether.Prefixing a method name with self. (as we do on line 5) makes it a classmethod: it can be called on the class generally.Instance variables a ...
- 2006-08-27 10:37
- 浏览 578
- 评论(0)
A symbol looks like a variable symbolsname, but it’s prefixed with a colon. Examples of symbols include :action,:line_items, and :id. You can think of symbols as string literals that aremagically made into constants. Alternatively, you can consider the colonto mean “thing named” so :id is “the thing ...
- 2006-08-27 10:35
- 浏览 749
- 评论(0)
from http://rubycn.ce-lab.net/面向对象的脚本语言RubyRuby是何方神圣?Ruby是一种功能强大的面向对象的脚本语言,她可以使您方便快捷地进行面向对象编程.Ruby使文本处理和系统管理变得简单,与Perl非常相似.一句话:简单明了,扩展性强,移植性好.Ruby的几大亮点: 语法简单 垃圾回收 可移植性 动态载入 完全免费 正则表达式 走向世界的Ruby松本行弘"Matz"(Matsumoto Yukihiro)是Ruby语言的发明人,他从1993年起便开始着手Ruby的研发工作。他一直想发明一种语言 ...
- 2006-08-27 10:33
- 浏览 1141
- 评论(0)