from http://forum.java.sun.com/thread.jspa?threadID=700253&messageID=4063642
it says:
// create calendar instance :: now
Calendar calendar = Calendar.getInstance();
int lastDateofThisMonth = calendar.getActualMaximum(Calendar.DATE);
Just check this one and understand how to expand
// create calendar instance :: now
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.YEAR,2000);
// month 0 is january
calendar.set(Calendar.MONTH,1);
int lastDateofMonth = calendar.getActualMaximum(Calendar.DATE);
System.out.println(lastDateofMonth);
Tuesday, March 20, 2007
get the last day in a month in java
Monday, March 19, 2007
sound on gentoo
it seems i installed a generic kernel. at default, no device configed for the sound.
when i wanna use ALSA, but can't emerge alsa-driver cause couldn't download a patch for my kernel.
so i use "emerge alsa-utils", after that, run "alsaconf", after a reboot manually, everything with the sound are work well.
:)
when i wanna use ALSA, but can't emerge alsa-driver cause couldn't download a patch for my kernel.
so i use "emerge alsa-utils", after that, run "alsaconf", after a reboot manually, everything with the sound are work well.
:)
Sunday, March 18, 2007
triangle_strip,triangle_fan,triangle_list
看了一下psp sdk里对sceGuDrawArray中prim这个参数的值的描述,始终对“3 vertices for the first primitive, 1 for every following”这句话的后半句理解不能!
void sceGuDrawArray ( int prim,
int vtype,
int count,
const void * indices,
const void * vertices
)
Draw array of vertices forming primitives.
Available primitive-types are:
* GU_POINTS - Single pixel points (1 vertex per primitive)
* GU_LINES - Single pixel lines (2 vertices per primitive)
* GU_LINE_STRIP - Single pixel line-strip (2 vertices for the first primitive, 1 for every following)
* GU_TRIANGLES - Filled triangles (3 vertices per primitive)
* GU_TRIANGLE_STRIP - Filled triangles-strip (3 vertices for the first primitive, 1 for every following)
* GU_TRIANGLE_FAN - Filled triangle-fan (3 vertices for the first primitive, 1 for every following)
* GU_SPRITES - Filled blocks (2 vertices per primitive)
在看了
http://hankfiles.pcvsconsole.com/answer.php?file=87
后才恍然大悟原来是这个意思,似乎的确是sdk文档上没说清楚。
triangle_strip:就是前3个点组成一个简单图形(这里不就是3角形嘛),第4个点和其之前2个点组成又一个简单图形,以此类推。
triangle_fan:就是前3个点组成一个简单图形,第4个点和其之前一个点以及第一个点组成又一个简单图形,以此类推。
triangle_list:哈哈,见图。。。。。
void sceGuDrawArray ( int prim,
int vtype,
int count,
const void * indices,
const void * vertices
)
Draw array of vertices forming primitives.
Available primitive-types are:
* GU_POINTS - Single pixel points (1 vertex per primitive)
* GU_LINES - Single pixel lines (2 vertices per primitive)
* GU_LINE_STRIP - Single pixel line-strip (2 vertices for the first primitive, 1 for every following)
* GU_TRIANGLES - Filled triangles (3 vertices per primitive)
* GU_TRIANGLE_STRIP - Filled triangles-strip (3 vertices for the first primitive, 1 for every following)
* GU_TRIANGLE_FAN - Filled triangle-fan (3 vertices for the first primitive, 1 for every following)
* GU_SPRITES - Filled blocks (2 vertices per primitive)
在看了
http://hankfiles.pcvsconsole.com/answer.php?file=87
后才恍然大悟原来是这个意思,似乎的确是sdk文档上没说清楚。
triangle_strip:就是前3个点组成一个简单图形(这里不就是3角形嘛),第4个点和其之前2个点组成又一个简单图形,以此类推。
triangle_fan:就是前3个点组成一个简单图形,第4个点和其之前一个点以及第一个点组成又一个简单图形,以此类推。
triangle_list:哈哈,见图。。。。。
同步opera blog(http://my.opera.com/jojomclntosh)
install realplayer on gentoo
Friday, 16. March 2007, 02:51:16
realplayer, gentoo, Linux
1st step:
#emerge ca-certificates
2nd step:
#emerge realplayer
Friday, 16. March 2007, 02:51:16
realplayer, gentoo, Linux
1st step:
#emerge ca-certificates
2nd step:
#emerge realplayer
Wednesday, March 14, 2007
Monday, March 12, 2007
nullpx,一个困扰了半天的问题
使用spring的JasperReportsHtmlView和JasperReportsPdfView,产生报表,pdf格式完全正常,html格式却总是不能显示一个叫nullpx的image。昏倒!
在用ireport做报表模板后用html preview时完全正常,看了一下页面代码,发觉他使用的image不是nullpx,而是px,其实就是一个像素点的图片。看样子这个图片在显示html时是不能少的了。
没有办法之下只能把这个px文件copy到webroot下面改名为nullpx,到此这个问题算是解决了。晕~~~!
Subscribe to:
Posts (Atom)