将python文件保存在python 安装文件夹的tmp文件夹中,
如: e:"Python25"tmp中,右击该文件,选择Edit with Idle选项,
在 Python Shell-> File-> Open 打开文件,弹出一个新的窗口,
选择 Run-> Run Module,会运行并得出结果.
posted @
2008-07-29 13:39 mill2002 阅读(25) |
评论 (0) |
编辑
Windows 的文件类型关联
如无法打开RUBY文件时:
> assoc .rb
File association not found for extension .rb
如果没有关联,则给它一个相关的文件类型:
> assoc .rb=rbFile
接着测试文件类型是否存在:
> ftype rbFile
File type 'rbFile' not found or no open command associated with it.
如果不存在,则手动建立:
> ftype rbFile="E:"Program Files"Windows NT"Accessories"wordpad.exe" "%1" %*
wordpad.exe(写字板)的路径自己定的.
最后,把 .rb加入环境变量PATHEXT中。如:
PATHEXT=.COM; .EXE; .BAT; .WSH; .rb
posted @
2008-06-05 11:56 mill2002 阅读(47) |
评论 (0) |
编辑
posted @
2008-05-13 09:13 mill2002 阅读(74) |
评论 (1) |
编辑
Migrating to Rails 2.0.2
Action View
1)1.2
new.rhtml
---------
<%= form_tag :action => 'create' %>
<%= render :partial => 'form' %>
<%= submit_tag 'Create' %>
<%= end_form_tag %>
<%= link_to 'Back', :action => 'index' %>
=========================================
_form.rhtml
-----------
<%= error_messages_for 'author' %>
<p><label for="author_first_name">First name</label><br/>
<%= text_field 'author', 'first_name' %></p>
<p><label for="author_last_name">Last name</label><br/>
<%= text_field 'author', 'last_name' %></p>
============================================
********************************************
1)2.0.2
new.html.erb
------------
(on redflag.heroku.com/books)
<h1>New book</h1>
<%= error_messages_for :book %>
<% form_for(@book) do |f| %>
<p>
<b>Name</b><br />
<%= f.text_field :name %>
</p>
<p>
<b>Publisher</b><br />
<%= f.text_field :publisher %>
</p>
<p>
<b>Url</b><br />
<%= f.text_field :url %>
</p>
<p>
<%= f.submit "Create" %>
</p>
<% end %>
<%= link_to 'Back', books_path %>
posted @
2008-05-09 08:17 mill2002 阅读(47) |
评论 (0) |
编辑