将python文件保存在python  安装文件夹的tmp文件夹中,
如: e:"Python25"tmp中,右击该文件,选择Edit with Idle选项,
在 Python Shell-> File-> Open 打开文件,弹出一个新的窗口,
选择 Run-> Run Module,会运行并得出结果.
posted @ 2008-07-29 13:39 mill2002 阅读(11) | 评论 (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 阅读(41) | 评论 (0)编辑
     摘要:   阅读全文
posted @ 2008-05-13 09:13 mill2002 阅读(70) | 评论 (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 阅读(39) | 评论 (0)编辑
当短工吗?不知干什么好,其实一年赚的钱够用了.只是怎么在网上赚到钱
需要一些方法,网上赌博之类违法的事,俺不干.
唉,慢慢想吧!

posted @ 2008-05-07 13:56 mill2002 阅读(34) | 评论 (1)编辑
赠人玫瑰,手留余香

     |-->  开窍 -->  |
     ^                   v
     | <-- 归窍  <-- |

电脑能给你有个机会成为唐吉哥德式的人物,挑战整个世界,反过来也一样,
你将承受整个世界的压力。悠着点...

posted @ 2008-05-06 11:09 mill2002 阅读(19) | 评论 (0)编辑
祝各位五一节快乐!

已找到开发和部署Rails应用的最佳环境www.heroku.com ,  这是为Rails开发者
提供的在线RoR开发与部署环境(程序员杂志04期---高昂)。偶是很激动的,如
需邀请的,请留下邮件地址。

www.heroku.com

Ruby on Rails Platform
-Build and deploy any Rails app
-No setup or configuration
-Full Ruby and Rails runtime environment
-Edit code right in your browser
-Work locally with Git and a full API
-Elastic scaling built on EC2
-Never think about servers or hosting again

为方便大家交流,偶成立了“在线RoR开发与部署环境heroku” 小组。请来捧场:)
posted @ 2008-05-01 16:12 mill2002 阅读(1274) | 评论 (57)编辑
 
posted @ 2008-04-29 15:45 mill2002 阅读(27) | 评论 (0)编辑
     摘要: rss reader开发资料1)<<ajax in action>>书中 ch13/refactor/下的内容, 如要增加自己的rss feed,可在RSSReader_refactored.htm 中的 rssFeeds数组添加,如添加本blog的feed: http://www.cnblogs.com/mill2002/rss 则为: function createRS... 阅读全文
posted @ 2008-04-15 19:19 mill2002 阅读(49) | 评论 (0)编辑
在命令提示符中使用antlr
进入到有ANTLR源文件所在文件夹中,如模拟计数器的源文件calc.g在j:/temp/calc中
1)在 j:> 时,键入 cd temp/calc 回车
2)j:\temp\calc> 下,键入 java antlr.Tool calc.g 回车
   会生成多个文件
3)编译示例中自带的Calc.java文件,如键入:
   javac Calc.java 回车
   会生成 Calc.class 文件
4)运行Calc.class 文件,如键入:
   java Calc 回车
   则光标在第一格闪烁,如键入:4+2;(不能少此分号;)
   输出结果为:<+ 4 2>
              value is :6.0


posted @ 2008-01-15 19:56 mill2002 阅读(48) | 评论 (0)编辑
if can't use ruby in command line,choose a way from "Instant Rails": I-->Rails Application-->Open Ruby Console Window.
posted @ 2007-11-24 16:55 mill2002 阅读(17) | 评论 (0)编辑