freesky1002
freesky1002 · 共 19 篇文章
产生dao 和 manager 的 配置
<configuration> <genericCore>true</genericCore> <!-- Set to false if you want Java files generated for your DAOs and Managers --> <fullSource>false</fullSource> <!-- Set to true if you've "full-sourced" your project and changed org.appfuse to your package name --> </configuration>
2008-06-16 22:51 · APPFUSE · 评论(0)
class_eval &&
class Foo1 end def Foo1.foo puts "foo" end class Foo2 def self.foo puts "foo" end end class Foo3 end class << Foo3 def foo puts "foo" end end class Foo4 class << self def foo puts "foo" end end end class Foo5 end Foo5.class_eval do def self.foo puts "foo" end end class Foo6 end Foo6.instance_eval d…
2008-04-02 11:53 · RUBY · 评论(0)
rails生成导航栏
<ul> <li><a href="/">home</a></li> <%= s = "" url = request.path.split('?') #remove extra query string parameters levels = url[0].split('/') #break up url into different levels levels.each_with_index do |level, index| unless level.blank? if index == levels.size-1 || (level == levels[levels.size-2] …
2008-04-01 13:47 · RAILS · 评论(0)
三种Select helper
select:<wbr></wbr> select(object, method, choices, options = {}, html_options = {}) 在ActionView::Helpers::FormOptionsHelper中定义 object是一個實體化變數,這裡很明顯的就是要擺上model物件嘛! method則是object的一個屬性,也是資料表中的對應欄位 choices就是要被選的選項,可以是陣列或者是雜湊(Hash) options與html_options則是一些選項在這邊來舉個例子吧 <%= select("project", "teacher_id",…
2007-11-23 11:26 · 评论(0)
structs格式化时间
把 xml 代码 format.date = {0,date,MM/dd/yyyy} format.time = {0,date,MM/dd/yyyy ha} format.percent = {0,number,##0.00'%'} format.currency = {0,number,$##0.00} 加入 ApplicationResources*.properties 中 s:text name="format.date" s:param value="person.birthDate"
2007-11-23 11:19 · STRUCTS2 · 评论(0)
生成自定义主键
ruby 代码 class Enterprise < ActiveRecord::Base # 当创建前调用auto_id 方法: before_create :auto_id # auto_id通过调用empno_next方法设置name def auto_id self.name = empno_next end # 通过重数据库中读出最大的ID # 但是如果是复合ID?下次解决。。(思路。。增加字段) def empno_next num = ActiveRecord::Base.connection.select_value('select max(name)+1 from ente…
2007-11-23 11:04 · RAILS · 评论(0)
Tomcat的中文乱码
A.request.setCharacterEncoding("gb2312"); B.type = new String(type.getBytes("ISO8859-1"), "GB2312"); C.在Tomcat的配置文件Server.xml中的Connector标签中加入“URIEncoding=UTF-8”属性; D.conf\web.xml 指定多个Encoding参数; E.编写一个filter,处理Post提交的编码问题;
2007-11-23 10:56 · IDE · 评论(0)
NetBean 性能配置
总的来说,如果你懒得想这些,采用下面的配置比较不错: netbeans_default_options="-J-Xms32m -J-Xmx256m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled --fontsize 12"
2007-11-23 10:51 · IDE · 评论(0)
Maven proxySet
-DproxySet=true -DproxyHost=69.147.76.64 -DproxyPort=80 -U
2007-11-23 10:50 · TOOL · 评论(0)
request.getParameterValues
<form name="checkform" method="post" action="getvalue.jsp"> 你希望学习哪些程式语言:<br> <input type="checkbox" name="langtype" value="JSP">JSP <input type="checkbox" name="langtype" value="PHP">PHP <input type="checkbox" name="langtype" value="PERL">PERL <input type="submit" name="b1" value="送出"> </form> java…
2007-11-23 10:41 · JAVA · 评论(0)
String和Int之间的相互转化
String和Int之间的相互转化: a1=Integer.parseInt(s1); s1=Integer.toString(a1); Object只能分步转换,先转换为string,然后通过Integer来转换成int类型
2007-11-23 10:39 · JAVA · 评论(0)
IDEA 中文问题解决方案
1、操作界面相关的中文问题 点击菜单File => Settings或快捷键(Crtl+Alt+S),在弹出的设置面板选择IDESetting => Appearance(在Appearance对话框中,将Font的Name设置为dialog.plain,然后保存。 2、编辑器里的中文问题 点击File => Settings或快捷键(Crtl+Alt+S),在弹出的设置面板选择Colors &Fonts(F) 在Colors & Fonts对话框中,在Scheme name的后右点击Save as...按钮,输入你想要的名称NewColorFont,创建一个新的颜色和字体方案。再将NewC…
2007-11-23 10:38 · IDE · 评论(0)
how to get login user info
request.getRemoteUser() SecurityContext context = SecurityContextHolder.getContext(); ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- In order to log the user in automatically afte…
2007-11-23 10:33 · APPFUSE · 评论(0)
marquee基本语法的全解释
基本语法 <marquee> ... </marquee> 移动属性的设置 ,这种移动不仅仅局限于文字,也可以应用于图片,表格等等 方向 <direction=#> #=left, right ,up ,down<marquee direction=left>从右向左移!</marquee> <wbr></wbr> 方式 <bihavior=#> #=scroll, slide, alternate <marquee behavior=scroll>一圈一圈绕着走!</marquee> <marquee behavior=slide>只走一次就歇了!</marquee> <marquee b…
2007-11-23 10:29 · HTML · 评论(0)
table 不变形的方案
在CSS中定义 table-layout:fixed .td {overfloew:hidden} 用%来定义宽度 增加 nowrap 属性
2007-11-23 10:25 · CSS · 评论(0)