blogjava-凯发k8网页登录http://www.blogjava.net/davidxu/以用户角度出发,你就已经成功一半了.zh-cnsat, 08 apr 2023 22:22:42 gmtsat, 08 apr 2023 22:22:42 gmt60放个音乐盒http://www.blogjava.net/davidxu/archive/2006/03/03/33338.html一凡@ito一凡@itothu, 02 mar 2006 17:07:00 gmthttp://www.blogjava.net/davidxu/archive/2006/03/03/33338.html

2006-03-03 01:07
]]>
年尾,年初好多事干呀http://www.blogjava.net/davidxu/archive/2006/01/27/29310.html一凡@ito一凡@itofri, 27 jan 2006 12:00:00 gmthttp://www.blogjava.net/davidxu/archive/2006/01/27/29310.htmlhttp://www.blogjava.net/davidxu/comments/29310.htmlhttp://www.blogjava.net/davidxu/archive/2006/01/27/29310.html#feedback0http://www.blogjava.net/davidxu/comments/commentrss/29310.htmlhttp://www.blogjava.net/davidxu/services/trackbacks/29310.html1.promatic enterprise application kickstart项目
   说实在,由于这段时间比较忙,还没放多少时间上去,真难为白衣老大以及几位team worker了:)
 

2.各个开源的新版本还没有时间研究
   
   
3.说要加强的东西还没安排
   oracle

4.新一年的开源工具好象可以用上场了
   bi tools
   ( 刚修改了,估计1.2版本在2006 1q release,等了我好久)
    (2.0版本简单介绍) 
  
 
还有好多电子没看呢:)
不管怎样,年还是要过,happy new year!


2006-01-27 20:00
]]>
birt 2.0 is now available....占个头位,宣传一下http://www.blogjava.net/davidxu/archive/2006/01/27/29305.html一凡@ito一凡@itofri, 27 jan 2006 08:58:00 gmthttp://www.blogjava.net/davidxu/archive/2006/01/27/29305.htmlhttp://www.blogjava.net/davidxu/comments/29305.htmlhttp://www.blogjava.net/davidxu/archive/2006/01/27/29305.html#feedback10http://www.blogjava.net/davidxu/comments/commentrss/29305.htmlhttp://www.blogjava.net/davidxu/services/trackbacks/29305.htmlwhat is birt

birt is an open source, eclipse-based reporting system that integrates with your application to produce compelling reports for both web and pdf.

birt provides core reporting features such as report layout, data access and scripting. the current released version is 2.0. please try birt and tell us what you think by filling bugs reports & enhancement requests through bugzilla as explained on the page.

blogjava-凯发k8网页登录

  • new birt viewer
  • javascript/java events and report debugging
  • runtime data source property binding
  • chart builder and svg output
  • templates
  • libraries
  • xml oda
  • url builder
  • multi-pass aggregate, sorting and filtering
  • improved report performance and pdf fidelity
  • dynamic parameters/cascading parameters
  • expression builder
  • importing of style sheets
  • report xml editor
  • passing of external object to custom data sources
  • stored procedures
  • clob/blob support

new and notable features within birt 2.0:


project home:

new report viewer [截图]

the viewer also supports data extraction to csv format [截图]

export to csv [截图]


它的report designer 还独立出来(不用依赖eclipse)直接打开 birt.exe 就ok.


个人感觉进步了不少,但负责地说一句,应用到实际项目中我猜想还会有不少的问题,还请大家抱学习的态度。

马上小试了一下,发现之前好几点疑问都可以不用担心了,基本解决掉了:
1.ajax的分页
  只要自定义好报表
/grid的宽以及高,实现css分页,初步感觉效果还不错(有待实际应用)

2.导出excel
      支持export to csv(虽然有中文乱码问题),另外当报表没有dataset(静态报表)时好象导不出.

3.birt and pojos as datasources example
      http:
//tools.osmosis.gr/blog/archives/2005/06/birt_and_object.html

4.更人性化,提供四个servlet
 a. 
/frameset?__report=test.rptdesign   (工具条,目录导航,分页操作)
    b.
/preview?__report=test.rptdesign (工具条,目录导航,分页操作)

    c.
/run?__report=test.rptdesign
    d.
/download?__report=test.rptdesign



2006-01-27 16:58
]]>
了解jasperreport ,让web报表跑得更好http://www.blogjava.net/davidxu/archive/2005/11/28/jasperreportskills.html一凡@ito一凡@itomon, 28 nov 2005 12:35:00 gmthttp://www.blogjava.net/davidxu/archive/2005/11/28/jasperreportskills.htmlhttp://www.blogjava.net/davidxu/comments/20946.htmlhttp://www.blogjava.net/davidxu/archive/2005/11/28/jasperreportskills.html#feedback6http://www.blogjava.net/davidxu/comments/commentrss/20946.htmlhttp://www.blogjava.net/davidxu/services/trackbacks/20946.html一、为什么是jasperreport
         很简单两点:
    1 免费
    2 在大多数开源产品中最能满足本人/公司的需求.
       如果要一句话总结那么就是 "适合就好!" ,其次再想插一句"其实jasperreport可以做得更好,只是缺少大家去发现。" 

             在erp软件开发中一套强大易用的报表工具还是相当重要的地位,在这里我只针对一些日常业务报表.
              jasperreport ireport 报表套装在普通的报表中已做得很不错:流水账式的,分组报表都可以轻松实现.在这里提出的是一些相对特别以及少用到的报表设计问题.
             当前版本 : 1.1.0
                                 : 0.5.2

二、问题与解决
           
1.操作
        初用ireport 设计报表(特别是早期的版本)感觉还是比较原始,相对于 类似于在 dreamweaver中画table 式的设计还是有点差距.但新版本(0.5.2)中也有不小的改善,增加了很多快速对齐,格式化的工具栏以及快捷操作方式.通过结合这些操作还算是方便了不少.

2.分页
           刚接触jasper report ,无论是看其官方的example还是自己动手设计报表,  html view 总给人很深的印象:"怎么字体那么小,而且实际打印一下,分页功能并没真正实现"
        经过客户一轮的抗义,最终还是下定决心去修补一下,
  其实jasper report 原理还是挺简单:
    它默认的分页方式是能过一轮的高度计算,再用两个
就以为了事了.
<table>
<tr>
 
<td>
   
<table>
    
   
table>
   
<br/> 
   
<br/>
   
<table>
    
   
table>
 
td>
tr>
table>


       凯发天生赢家一触即发官网的解决方案:
       好在jasperreport还提供了很好的扩展方案.它允许我们自定义分页方式(就是说在两页/table之间能让我们放自己的代码),自己定义betweenpageshtml 就ok了,可以能过css定义分页.在这里,我就直接改它代码算了.大家可以自己选择.
    
net.sf.jasperreports.engine.export.jrhtmlexporter


pageend 
{page-break-after:always}

 

if (betweenpageshtml == null)
                        
{
                            writer.write(
""pageend\">");   // 原来是两个

                        }
 else
                        
{
                            writer.write(betweenpageshtml);
                        }

3. 打印
      分页解决后可以发现当报表预览时真的能一页一页分得很好.却又发现了一个问题.报表明显不能满一张a4张大小(ireport 设计选择的是a4纸张),疑惑了一际子,其实不能算是bug.
   ireport 报表属性中明显(21 * 29.7 cm) 一张a4纸的大小,为什么html出来的效果却明显小的那么多了.其实这与计算机的分辨率有关
   计算机中的分辨率,普遍是72 象素/英寸,而打印机普通是300象素/英寸.
   jasperreport 与ireport 默认单位是px,我猜想如果用cm做单位的话可以解决这个问题.但在这里我们的做法是尽量加大报表设计时的宽度与高度.另一个要注意的是记得将所有页边距设为0,因为这些设置在打印的时候已在ie/浏览器中设定了,不用重复.
   
4.分栏
      以前没多注意,但刚用ireport新版本时可以发现在报表属性设计的时候可以设置栏.这下子如果当报表主体部分列数不多时实现分栏显示,以节省纸张.

5.斑马线式显示报表主体
   
有时我们想让报表更美化,让用户更方便地观看数据,可以设置两种色相隔.这种效果在jasperreport 中的example中有demo一下,大家如果想学习可以下载看看.

6.交叉报表

   关于jasperreport的交叉报表设计网上还是有不小的讨论,而真正实现的不多.我观察过大多用jasperreport实现都是伪交叉报表.并不是真正实现真正的动态行与列.
   其实在jaspert report下载包中还是有个交叉报表的实现example(crosstabs),只不过据我了解,现在ireport还不能实现设计.只能通过手工写jrxml文件实现.本人小试一下,还是挺不错的.
 

三、待研究
 通过继承net.sf.jasperreports.engine.export.jrhtmlexporter ,还是能扩展不小的功能.例如用css格式化,可以大大减小代码量,动态列/可设列宽度大大增强我们的报表功能.
 现本人初部实现100%宽度,不再用jasperreport中hardcode列度等等,以下三点还有待时间去跟进:)

1.动态列
 
2.可设列宽度

3.css设计
  


 

2005-11-28 20:35
]]>
[ec] extreme table 版本跟进发布区http://www.blogjava.net/davidxu/archive/2005/08/27/11316.html一凡@ito一凡@itosat, 27 aug 2005 07:09:00 gmthttp://www.blogjava.net/davidxu/archive/2005/08/27/11316.htmlhttp://www.blogjava.net/davidxu/comments/11316.htmlhttp://www.blogjava.net/davidxu/archive/2005/08/27/11316.html#feedback20http://www.blogjava.net/davidxu/comments/commentrss/11316.htmlhttp://www.blogjava.net/davidxu/services/trackbacks/11316.html说明
是个很不错的table tag,打算记录底它的版本发布 change log :)


它的roadmap :

以往本blog介绍:



我们从这里开始:

[]
- by 官方
  • able to mix the columntag and the columnstag. will need to use the method
    model.getcolumnhandler().addautogeneratecolumn(column);
  • every attribute of every tag will accept an el expression
  • will accept a set for the collection now


部分使用说明 --by david xu

1  table 新增加var属性,支持定义bean name (可选择),可以不用${collectionname.membername}这样难以理解的语法.
    用官方的话就是
    "added tabletag var attribute. used (optionally) as the name of the variable to hold the current bean. "
  

<ec:table
    collection
="humanlist"
    action
="${pagecontext.request.contextpath}/index.jsp"
    imagepath
="${pagecontext.request.contextpath}/images/table/*.gif"
    cellpadding
="1"
    savefiltersort
="true"
    var
="human"
    title
="我的第一个tag table">
ec:table>
$
{human.name} 取得



[1.0.1-m2]
1.0.1-m2 release  by 官方

1. things that changed and need to be aware of:

  • the columntag exportable attribute has been removed
    • replaced with the viewsallowed and the viewsdenied attributes (see items 3 and 4)
  • changed cell interface
    • new interface ->public void init(basemodel model, column column);
    • matches the view interface for consistency
    • the rowcount is part of the new row bean. can retrieve the rowcount by doing a model.getrowhandler().getrow().getrowcount()
  • changed view interface
    • new interface -> public void body(basemodel model, column column);
    • matches the cell interface for consistency
    • can get the column position by doing column.isfirstcolumn() and column.islastcolumn()
  • new tabletag attributes to replace the deprecated collection attribute
    • the collection attribute has been deprecated in favor of three new attributes. the attributes are call tableid, items, and var
    • read the for more information
  • moved the element back on the cell for the filtercell.
    • if you modified the htmlview, and specifically the filter row, then remove the element in the view.

2. new rowtag with cooresponding row bean

  • able to do row level javascript onmouseover, onmouseout, and onclick
  • ability to do row level highlighting. see stylesheet change (below) for proper formating.
  • moved the stylesheet class attribute from the column () to the row ()

3. new columntag attribute viewsallowed

  • can specify whether the column should be used for the current view. the views include html, pdf, xls, csv, plus any custom views.
  • if you specify a given view (or views), then only that view (or views) will use the column
  • for example you can specify viewsallowed="pdf" which will use the column for the pdf export, but not any other export or default html view
  • replaces the columntag exportable attribute

4. new columntag attribute viewsdenied

  • can specify whether the column should not be used for the current view. the views include html, pdf, xls, csv, plus any custom views
  • if you specify a given view (or views), then only that view (or views) will not use the column
  • for example you can specify viewsdenied="html" which will not use the column for the html view, but will for all the exports
  • replaces the columntag exportable attribute

5. enhancements

  • every attribute of every tag will accept an el expression
  • will accept a set for the collection now
  • confirmed to work with a rowsetdynaclass (if send as list)
  • able to mix the columntag and the columnstag. will need to use the method model.getcolumnhandler().addautogeneratecolumn(column);
  • improved the default stylesheet
    • my initial intentions were to just change the stylesheet to work with the row highlighting, but i ended up tweaking it enough that now it just works better. for instance if you have some filters turned off then it seamlessly flows with the statusbar because it no longer uses cellspacing. if you use the new stylesheet be sure to remove the table.cellspacing=2 from your extremecomponents.properties file.

6. bugs fixed

  • fixed rows displayed bug
    • the rows displayed was not working correctly with the show all under certain conditions
    • can set the median and max values in the extremecomponents.properties. the default values are table.medianrowsdisplayed=50 and table.maxrowsdisplayed=100, respectively

部分使用说明 --by david xu
1、tabletag 的改动
      collection attribute
不再赞成使用,可以使用tableid, items, and var 取而代之

<ec:table 
    items
="customerlist"
        tableid
="customer"
        var
="customer"
    title
="customerlist"
        …………

>
…………
ec:table>


2、columntag 新属性的用法viewallowed,viewsdenied
      支持view包括:
html, pdf, xls, csv以及自定的view

     viewsallowed="pdf"    //说明:只允许在pdf view 中
      viewsallowed="html,xls" //也可以用,分隔

3、 cell interface 的改动
       通过model.getrowhandler().getrow().getrowcount() 返回 rowcount
4、新增rowtag 
    
<ec:row highlightrow="true" onclick="alert('david')" >
   
<ec:column/>
   
<ec:column/>
   
<ec:column/>
   …………
ec:row>

5、set ,rowsetdynaclass 的支持
<%
    list customerlist 
= new arraylist();
    lazydynabean temp 
= new lazydynabean();
    temp.set(
"code""001");
    temp.set(
"name""david xu");
    customerlist.add(temp);
    request.setattribute(
"customerlist", customerlist); 
%>

   …………
  …………


6、totalling columns
<ec:table
        totaltitle
="合计"
>      
   
<ec:column property="salary" showtotal="true"/>
ec:table>



new and noteworthy 1.0.1-m3

this build represents a massive refacoring of the handler code and includes a new limit package. i believe the state of the code is the best it has ever been and in general has really gone to a new level. this was initially sparked by a refactoring of the pagination (now limit) and rows displayed features but then trickled down into the handler code and also resulted in a new limit and limitfactory.

be sure to give yourself time to move to this release as you will need to fix your custom cells and views. i had to move some classes to different packages as things changed internally. the changes will make working with the extremetable much easier and were unavoidable.

1. things that changed and need to be aware of:

  • the show all is no longer an option in the rows displayed droplist. it was confusing as the median and max rows would sometimes appear and sometimes go away. it was way to buggy also...you could filter the rows, select show all, and the hit clear. at that point you would display all the rows.
  • the basemodel moved from the base package to the core package as there is no base package left.
  • the limit, collectionofbeans, currentcollectionbean moved to the basemodel.
  • org.extremecomponents.table.base.modelutils --> (moved) org.extremecomponents.table.core.exportfilterutils
  • the tabletag attribute rowsdisplayed="0" no longer has any meaning. if you would like to show all the rows then remove the pagination with the tabletag attribute showpagination="false". the reason for the change is because the rows displayed was reworked and the meaning dropped. also, i could tell from code examples that many people were confused by the attribute and its meaning as both the showpagination="false" and rowsdisplayed="0" were used together. i would prefer one clear way to display all the rows.

2. limit and limitfactory

basically you just build a limit object and it self populates with everything that you need to figure out the sorting, filtering, rowstart, rowend, page, currentrows and totalrows. you used to have to deal with strings and maps versus now you work with simple intuitive objects and ints. i also use the limit object internally with a different factory.

this is all you have to do:

 limit limit = limitfactory.createinstanceoflimit(request, tableid);
 limitfactory.setlimitfilterandsortattr(limit);
 //once you know the total rows
 limitfactory.setlimitpageandrowattr(limit, default_rows_displayed, totalrows);

the example demonstrates how to work in a controller (spring) or action (struts).

then in your jsp set the callbacks to point to the limitcallback.

3. enhancements

  • if you hard coded in any of the filter parameters then be sure to look at the tablecontants class to see how they changed. the url is more of a code than something you can read now.

4. bugs fixed

  • fixed the fop errors messages associated with the pdf export view.
  • if the filter is invoked with no filter criteria the table no longer tries to match empty results. the effect before was the table would show no results, and now just remains the same.
  • removed org.extremecomponents.table.tag.tabletagextrainfo


2005-08-27 15:09
]]>
excel 简明操作 http://www.blogjava.net/davidxu/archive/2005/08/27/11291.html一凡@ito一凡@itosat, 27 aug 2005 03:30:00 gmthttp://www.blogjava.net/davidxu/archive/2005/08/27/11291.htmlhttp://www.blogjava.net/davidxu/comments/11291.htmlhttp://www.blogjava.net/davidxu/archive/2005/08/27/11291.html#feedback3http://www.blogjava.net/davidxu/comments/commentrss/11291.htmlhttp://www.blogjava.net/davidxu/services/trackbacks/11291.html第一章 总体说明... 2

前言... 2

操作界面... 2

第二章 实例操作... 2

成绩单实例... 2

第三章 其它补充... 2

    格式化... 3

    打印... 5

 

ms设计的office套装每一个都有其专注,每一方面都为用户着想,不能不赞,人家赚钱是为用户想到最好!!

excel这是一个用于建立与使用电子报表(表格)的实用程序,以表格的形式来储存数据,支持一整套函数操作,方便统计以及打印。
     无论是财务部门制作工资表还是教师职工制作学生成绩表,无需很强的电脑操作能力,都能快速制表.
pay.gif

mark.gif


先了解一些概念:
工作簿: excel中定义一个excel文件就是一个工作簿,工作簿中可以放n张有相关的工作表。
工作表: 若干个工作表组成一个工作簿(excel文件),工作表之间可以使用特定的方法相互引用数据.
             如下图:最下面的sheet1 sheet2等就是一个一个工作表,可能通过双击将其改名,以及右键新增加工作表.

表格通常一个工作表中至少包含一个表格,表格可由表头,列(excel中以a、b、c等字母表示),行(excel中以1、2、3数字表示)组成.
单元:单元是最小的单位,单元选定的行与列组成.
          例如a列的第一行就是a1单元,b列的第六行就是b6单元

函数: excel中提供一整套函数公式方便用户进行数据统计与运算. 如average(d3:d8) 意指统计d3-d8的平均分.

如下图可以直观地了对其有个大概的了解:
exceltable.gif

实例操作

1、制作表头
选择范围,设置单元格属性

newexcel.gif

对齐全并单元格
unitecell.gif

在 [对齐]标签中[合并单元格]操作,并在字体中设置加粗,输入"学生成绩表" 效果如下:

btitle.gif

2、输入行头,以及相关的基础数据
点击单元(cell)分别录入相关的数据,太简单,这里跳过:)

tabledemo.gif

3、函数使用

这里主要学习的是函数的使用,以其中averaeg为例说明

a.点选要录入的单元

b.插入函数
function.jpg

c.选择要进行平均分的单元
function[2].gif

ok,这样就完成了统计语文平均成绩的工作.
观察一下上面的函数公司为 =average(c3,c4,c5,c6,c7,c8) 
其实如果我们熟悉相关的函数,可以在输入框中直接输入 =average(c3:c8) 也达到同样的效果.

第三章
其它补充
1.格式化
文字竖着来
有时候我们要将一些文字格式化成竖起来的效果,excel操作也挺简单
exceltext.gif


2.
设置打印顶端标题行
有时候表格太长,打印出来后会分页,然而我们行头是不变,希望它能在每一页的页头都能打出来.
第一页:


page1.gif

第二页:
page2.gif

这种情况我们就要设置顶端标题行:

具体操作:
文件- 页面属性 - 工作表 -顶端标题行- 然后点击选择每二行(在这里第二行是顶端标题行)

excelthead.gif




2005-08-27 11:30
]]>
[other] office "办公三剑客"http://www.blogjava.net/davidxu/archive/2005/08/27/11177.html一凡@ito一凡@itosat, 27 aug 2005 02:47:00 gmthttp://www.blogjava.net/davidxu/archive/2005/08/27/11177.htmlhttp://www.blogjava.net/davidxu/comments/11177.htmlhttp://www.blogjava.net/davidxu/archive/2005/08/27/11177.html#feedback0http://www.blogjava.net/davidxu/comments/commentrss/11177.htmlhttp://www.blogjava.net/davidxu/services/trackbacks/11177.html本人帮亲戚朋友装机不下十台,
使用者从大的三四十岁到小的十来岁都有,基本上目的都很明确————学习,工作需要。
我估计随着社会发展,电脑普及率会更高,到时装机可能会象现在菜市场一样:)
   关于信息化的话题可能说上n天也说不完,今天就不扯得太远,主要介绍一下office "办公三剑客",
注意这边说的不是网页制作有三剑客(dw,fw,flash),而是微软公司的office软件中的word,excel,powerpoint。
因为家里有弟弟妹妹们还在读初中、高中,了解到他们的课程中早有计算机
这门课,听说还是学网页制作等的,哈,听来有点搞笑,不懂得为什么这样设计课程!
    个人认为,现在中小学生最需要学习的计算机技能其实应该与实际社会需求相吻合,就是办公软件的应用,原因很简单,
这些东西不管对于个人还是以后工作都是必修课。
    有幸出生在信息化的时代,感受过信息化给予我以及我的工作带来的好处,体验过身边朋友的需要,
    在这里以我个人经验,总结一下,主打三个:
   
    文档编写--word
    表格制作--excel
    演示,课件制作--powerpoint
   
注:文章部分是前时间为家里一些朋友写的,现在拿出来与大家分享一下。
   本文介绍的是一些基础,也是实用的东西,适合对这方面了解甚少的朋友:)
  
 
  
  
  
  
   powerpoint 实操指南
  
  


2005-08-27 10:47
]]>
window 文本操作软件使用说明http://www.blogjava.net/davidxu/archive/2005/08/26/11180.html一凡@ito一凡@itofri, 26 aug 2005 02:53:00 gmthttp://www.blogjava.net/davidxu/archive/2005/08/26/11180.htmlhttp://www.blogjava.net/davidxu/comments/11180.htmlhttp://www.blogjava.net/davidxu/archive/2005/08/26/11180.html#feedback2http://www.blogjava.net/davidxu/comments/commentrss/11180.htmlhttp://www.blogjava.net/davidxu/services/trackbacks/11180.html阅读全文

2005-08-26 10:53
]]>
[bi] 部分商业智能及报表工具一览http://www.blogjava.net/davidxu/archive/2005/08/20/bireporttools.html一凡@ito一凡@itosat, 20 aug 2005 04:44:00 gmthttp://www.blogjava.net/davidxu/archive/2005/08/20/bireporttools.htmlhttp://www.blogjava.net/davidxu/comments/10580.htmlhttp://www.blogjava.net/davidxu/archive/2005/08/20/bireporttools.html#feedback4http://www.blogjava.net/davidxu/comments/commentrss/10580.htmlhttp://www.blogjava.net/davidxu/services/trackbacks/10580.html一、 microsoft office web components

officecomponents.gif

spreadsheets
excel.gif 

charts
chart.gif

二、open source

1 、pentaho
project home page:

凯发k8网页登录

2、operni


凯发k8网页登录

演示:             用户:tomcat  密码:shallow
介绍: http://openi.sourceforge.net/open_source_bi-openi_story.pdf


3、jasperreports
project home page:
jasperreports[1].png


4、eclipse birt project
project home page:

5、jfreechar
project home page:

其它相关 :生xsl ,pdf
jakarta poi   
itext 
fop 

后注:本站将不定期发布相关的应用文章:)





2005-08-20 12:44
]]>
三个小tipshttp://www.blogjava.net/davidxu/archive/2005/08/18/10458.html一凡@ito一凡@itothu, 18 aug 2005 11:21:00 gmthttp://www.blogjava.net/davidxu/archive/2005/08/18/10458.htmlhttp://www.blogjava.net/davidxu/comments/10458.htmlhttp://www.blogjava.net/davidxu/archive/2005/08/18/10458.html#feedback0http://www.blogjava.net/davidxu/comments/commentrss/10458.htmlhttp://www.blogjava.net/davidxu/services/trackbacks/10458.html小小的tips记录一下:

一、取回mysql root管理员密码
         [1] 跳过mysql的访问控制
              进入cmd命令行       
              c:\mysql\bin > mysqld-nt --skip-grant-tables&
             这样任何人都可以在以管理员的身份进入mysql,为修改root密码提供前提条件.
         [2] 控制台进入mysql
               c:\mysql\bin>mysql
               mysql> select * from mysql.user;          //查用户表
               mysql> update mysql.user set password=password('david') where user='root';
               mysql>commit;
               重启mysql服务即可用刚才我们设置的'david'密码登录了:)
     
二、用jsp文件存放css
        通常我们有这样的需要,在css中定义图片以及一些htc文件,
然而在编写过程中,我们的代码总会象这样:
background: #66a1d5  center left repeat;

form input.rootcalendar 
{
    width
: 65px;
    behavior
: url(/uploads/image/js/calendar.htc)
}


       使用相对路径的形式,这样做有一个限制,就是调用文件的路径一定是固定的.
然而当比较深入的文件调用时,就会找不到相应的图片或相关的资源.
       好在jstl  给我们提供了一种凯发天生赢家一触即发官网的解决方案.然而要求css放到jsp中这样的需要就来了,应用挺简单
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
//原来的css代码
………………
………………
………………
background: #66a1d5  center left repeat;

………………
………………
………………
………………
………………

其它页面中调用
<link rel="stylesheet" href=""/css/style.jsp"/>" type="text/css">

 
三、日期时间函数
        1、oracel 版
        [1]取当月的日子数:
               
select to_char(last_day(sysdate),'dd') from dual
//如本月(8月) - 31日
               

        [2]extract的应用(取年月日)

select extract(year from sysdate) from dual;
//本年 2005
select extract(month from sysdate) from dual;
//本月 8月份
select extract(day from sysdate) from dual; 
//本日 18日


        2、 mysql 版

(本文未完!!)


2005-08-18 19:21
]]>
网站地图