将python文件保存在python  安装文件夹的tmp文件夹中,
如: e:"Python25"tmp中,右击该文件,选择Edit with Idle选项,
在 Python Shell-> File-> Open 打开文件,弹出一个新的窗口,
选择 Run-> Run Module,会运行并得出结果.
posted @ 2008-07-29 13:39 mill2002 阅读(17) | 评论 (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 阅读(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 阅读(43) | 评论 (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 阅读(1280) | 评论 (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 阅读(50) | 评论 (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 阅读(49) | 评论 (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)编辑

1.从WWW.CNBLOGS.COM上COPY一个RSS文件,保存为.XML后缀的文件,如ask.xml,将其
   保存到书中代码文件夹CH13/REFACTOR/FEEDS中.

2.打开RSSReader_refactored_local.htm文件,在
    <script>
   function createRSSReader() {
      var options = { rssFeeds: [
      "feeds/dave.xml", "feeds/eric.html"
      ] };

      var rssReader = new RSSReader('rssReader', options );
   }

</script>

的options数组中加入上述的文件,即"feeds/ask.xml"

3. 好象RSSReader_refactored_local.htm文件中的select的option

posted @ 2007-01-31 20:01 mill2002 阅读(74) | 评论 (0)编辑

刚才试的方法:右上角的site ->Stylesheet Editor,在其中的
/* GENERAL */
/* style for module titles */
.Head   {
 }
进行设定.这样所有的模板容器都改了.

偶以前没有办法时,做法是自己上传一个模板容器,如k-dnnBlue(它是模仿DNN中的DNN-Blue的),然后将其中的
k-dnnBlue.ascx,container.css,container.xml这三个文件进行一些修改.
如在k-dnnBlue.ascx中;对<dnn:TITLE runat="server" id="dnnTITLE" />就增加了
CssClass="ContainerCrystalTitle".
变成了 <dnn:TITLE runat="server" id="dnnTITLE" CssClass="ContainerCrystalTitle"/>

而在container.css中加入了 ContainerCrystalTitle的定义,如
.ContainerCrystalTitle
{
    font-family: Tahoma, Arial, Helvetica;
    font-size:  11px;
    font-weight: Bold;
    color:#FFFFFF
}

并在container.xml中加入
  <Object>
  <Token>[TITLE]</Token>
  <Settings>
   <Setting>
    <Name>CssClass</Name>
    <Value>ContainerCrystalTitle</Value>
   </Setting>
  </Settings>
  </Object>
这样就硬是更改了Title的样式.偶也是没有办法.

 

 

posted @ 2006-08-26 22:21 mill2002 阅读(128) | 评论 (0)编辑

 how to compile source code of "Data Structures & Algorithm Analysis in Java" writen by Weiss
    Another question:How to demo the examples under  folder of DataStructures?

    a) put a build.xml file in the folder the source code in
    b) type 'ant' in command line
    c) i just made a one copy of build.xml from another place and put it in same folder of source code.
             only one thing about 'property name="srcdir" value="src"'  is to be concerned.
    d) when compiling source code of the folder named Miscellaneous, first i copied all of the source code into
             folder named src,then type ant in command line and appeared 36 errors which of them displays
             [javac] K:\game\tutorial\CodeWin\src\Concordance2.java:3: package DataStructures does not exist
             [javac] import DataStructures.*;
      This indicates the source code of Miscellaneous needs package named DataStructures.
      Then i copy folder of DataStructures into folder of src and type ant again,this time show
           'Success'

     要在命令行中run the examples under folder of DataStructures,note a sentence of 'package DataStructure;' in the source code file, so must tell  java.exe find some class (such as LinkedList) under folder of DataStructure. in Command Line,should type "java DataStructures/LinkedList",if entry the DataStructures by command of 'cd DataStructures' and then type 'java LinkedList' you will see the followings:
     K:\game\tutorial>cd codewin/DataStructures
     K:\game\tutorial\CodeWin\DataStructures>java LinkedList
     Exception in thread "main" java.lang.NoClassDefFoundError: LinkedList (wrong nam
        e: DataStructures/LinkedList)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
     
    Aug.11th,2006

posted @ 2006-08-12 15:59 mill2002 阅读(150) | 评论 (0)编辑

1.Developing Games in Java, written by David Brackeen,url: www.brackeen.com
   book all src:X:\game
   Usage:
   in command line,type java SpriteTest1,for example and a sprite can be seen on screen.
   in terminal look like this,x:\game\ch02src>java SpriteTest1 <Enter>
 
   If u want to compile java file with Ant,enter the ch02src and just type ant in command line.

   Before using j2sdk1.4.2 and ant-1.4.1,system parameters should be setted first.
   like these:
   ANT_HOME      x:\ant
   JAVA_HOME    x:\j2sdk1.4.2

 

posted @ 2006-01-17 15:57 mill2002 阅读(95) | 评论 (2)编辑

Interacting with the Demo's(http://rossum.sourceforge.net/)

  The illustration at the left shows the Floor Plan for the Trinity College Fire-Fighting Home Robot Contest. The Server (simulator) reads the floor plan at start up. By default, the Server runs with a Graphical User Interface (GUI). If you are running time trials or wish to treat the Server as a background process, you can suppress the GUI by adjusting options in the RP1 properties file (see the Users's Guide for more details.)

The simulated robot in the lower-left section of the display was uploaded by the client application when it connected to the Server. Although the Server provides a virtual world, the inhabitants of that world are provided by the client applications. The red circle with the letter "F" indicates the target, a candle representing the fire which the robot contestant is to extinguish. The green "homeplate" represents the home placement, the robot's starting position.

posted @ 2006-01-15 15:51 mill2002 阅读(112) | 评论 (0)编辑

首先弄一个空白模块,以便安装到dotnetnuke中了解模块的运作情况.
1)打开VS2003,在VB中新建web项目Blog.Player,属性设置参考'博客园 - 二十四画生的Blog - 建立单独的解决方案来开发DNN模块'
2)删除Global.asax,web.config,style.css文件,偶在后来安装空白模块时,出现的3个出错信息与这些文件有关
3)增加dotnetnuke.dll引用
4)增加两个WEB控件,分别为Player.ascx及EditPlayer.ascx,其中
    Player.ascx.vb,Player.ascx.vb的类继承DotNetNuke.Entities.Modules.PortalModuleBase
    在Player.ascx,EditPlayer.ascx的inherits="Blog.Player.Player"及="Blog.Player.EditPlayer"
5)在Player.ascx.vb的Page_init()方法中增加
      MyBase.Actions.Add(GetNextActionID, "Edit", "", URL:=EditUrl( ), secure:=Security.SecurityAccessLevel.Edit, Visible:=True)
        这样就在Player.ascx控件中建立了到EditPlayer.ascx控件的链接.

Faq

1. Version issue
  Open store module in vs2003 and eleven warnings appear as follows:

Warning: Can't copy the dependent item "DotNetNuke, Version=3.1.1.31421, Culture=neutral" of project
"DotNetNuke.Store.WebControls" to running directory,because it will rewrite reference of “DotNetNuke, Version=3.1.1.1034, Culture=neutral”.

Where can I download DotNetNuke, Version=3.1.1.31421? How to deal with these warnings?

DNN STORE ROADMAP
Updated: November 22, 2005

Version 1
- Reviews (partially completed)
- Full Localization Support

Version 2+
- Gateways: Deploying mulitiple files with same name
- Order Summary Printing (include StoreInfo)
- Help Admin (currently hidden, what does it include?)
- Address/Profile Security
- Admin Grid Sorting (Products, Categories, etc)
- CSS Style Uniformity
- Date-based Pricing
- Also Bought
- Wishlist Module
- Store Search
- Order Fulfillment (search new orders/mark as "shipped" + email conf.)
- Templated Order Confirmation Emails

My Plan
- learn to how to 支持网银支付

posted @ 2005-12-24 20:01 mill2002 阅读(483) | 评论 (6)编辑

How to design skin for dnn

a) design container
    <td colspan="4"><div runat="server" id="ContentPane"></div></td> because container should have a space for
   content of container,so "ContentPane" ought to be writen as above mentioned.

Reference links:
1.     D:\DRIVERS\develop\language\dotnet\portal\DotNetNuke\articals\blogs\全家福_chengulv\博客园 - 全家福 - DotNetNuke系列文 章-       Skin 與 Container 設計介紹.htm

Debug
    1.when custom design skin is wrong,to take it place with correct skin can fix problem.
   用好的SKIN文件覆盖掉自定的SKIN,就可使DNN恢复!!!!!!!!!!

    error info:
    1.The resource cannot be found
http://localhost/dnn31/Default.aspx?tabid=52&error=The+Controls+collection+cannot+be+modified+because+the+control+contains+code+blocks+
(i.e.+%3c%25+...+%25%3e).&content=0

answer to the error: A)There is a wrong with html file. There is no dnn token shown in design area in dreamweaver.
                               B)when upload the skin zip file,there is no signs of registration of control in ASP.NET custom control file
 

posted @ 2005-10-15 14:42 mill2002 阅读(279) | 评论 (2)编辑

solution to this problem:"'清除密码(L)" in IE
the procedure:
选择菜单的工具(T--Internet选项(O),在出现的窗口中选择内容属性页。点击自动完成(U按钮,出现的界面如图所示。

 

按钮清除密码(L就是用来清除已被记住的项目的。

posted @ 2005-09-11 20:13 mill2002 阅读(263) | 评论 (5)编辑
搜索asp相关书籍,关键词
inurl:asp filetype:chm
其中inurl表明下载地址中包含asp,filetype表明文件名是chm格式,你也可以指定pdf或者doc,ppt,zip,rar等
posted @ 2005-09-04 18:49 mill2002 阅读(134) | 评论 (0)编辑