ITeye博客

2010 年文章归档

共 36 篇文章

sql 备忘

MySQL5.1: create table score( 考号 char(6), 考场 char(2), 单位 varchar(20), 总名次 integer, 校名次 integer, 姓名 varchar(10), 性别 varchar(2), 语文 numeric(5,1), 数学 numeric(5,1), 物理 numeric(5,1), 化学 numeric(5,1), 外语 numeric(5,1), 政治 numeric(5,1) ); insert into score values('040001', '1', 'shihe', 964, 219, 'dong', '…

2010-12-28 21:19 · mysql/sybase · SQL · SUN

jdbc addbatch

jdbc addBatch方法: Statememt stmt=conn.createStatement(); stmt.addBatch("insert into ....."); stmt.addBatch("insert into ....."); stmt.addBatch("insert into ....."); stmt.executeBatch(); stmt.close(); PreparedStatement ps=conn.prepareStatement("insert Into biao values(?,?)"); ps.setInt(1,61); ps.setI…

2010-12-20 22:47 · mysql/sybase · JDBC

Creating a Thread Pool with Java

As you can see, a thread pool is a useful way to limit the amount of threads that a Java program will be using. This article presented a complete thread pool that can be used with Java. This thread pool can easily become the starting point for any application that you create, which requires a threa…

2010-12-19 22:08 · java · Java · UP · thread

WEB开发一些注意点

web.xml 的加载顺序是:context-param -> listener -> filter -> servlet ,而同个类型之间的实际程序调用的时候的顺序是根据对应的 mapping 的顺序进行调用的。

2010-12-13 13:34 · 备忘录 · XML · Web · Servlet

crontab 格式意义

crontab文件每个条目中各个域的意义和格式: 第1列分钟1~5 9 第2列小时1~2 3(0表示子夜) 第3列日1~3 1 第4列月1~1 2 第5列星期0~6(0表示星期天) 第6列要运行的命令 下面是crontab的格式: 分 时 日 月 星期 要运行的命令 这里有crontab文件条目的一些例子: 30 21 * * * /apps/bin/cleanup.sh 上面的例子表示每晚的21:3 0运行/apps/bin目录下的cleanup.sh。 45 4 1,10,22 * * /apps/bin/backup.sh 上面的例子表示每月1、1 0、2 2日的4 : 4 5运行/a…

2010-12-13 10:25 · linux · F#

Flex 国际化参考

做一个记录和mx.utils.StringUtil.substitute()包做个记录: Using this class, the example above would look more like this: receivedMessage=At %time%, you received a message from %userName%. // then in your code trace(ResourceStringUtil.getResoureceStringWithTokens("receivedMessage", {time: "11:49", userName: "Mim…

2010-11-29 16:59 · ActionScript3/Flex4 · Flex · UP

最短的IE判定

<script type="text/javascript"> alert([1,2]);//相当于alert([1,2].toString()); --这在IE与非IE上都相同,都会弹出"1,2" alert([1,]);//相当于alert([1,].toString());--在非IE的标准浏览器上,js引擎会自动删除最后的",",所以在IE上会弹出"1,",而在非IE上会弹出"1" alert(+[1,]);//根据上面的解释,这一句在IE上相当于alert(+"1,"),而在非IE上相当于alert(+"1"),正号的作用在于试图将字符串转换为数字,"1,"当然不是数字,而"1"可…

2010-11-14 16:50 · javascript · HTML · 浏览器 · Firefox · JavaScript · IE

Learn how to create a simple virtual layout in Flex 4

This post goes over the basics of writing a very simple custom layout that supports virtualization in spark. It assumes that you have already built a custom layout that handles the real (non-virtual) case and are comfortable doing so. The main difference between a virtual and non-virtual layout is …

2010-11-13 14:30 · ActionScript3/Flex4 · REST · Flex · Flash · performance

深入理解Flash Player重绘

Flash Player 会以SWF内容的帧频速度来刷新需要变化的内容,而这个刷新的过程,我们通常称为“重绘(redraw)”,相信即便是初级的菜鸟也知道,只要使用的是Debug版本的Flash Player, 右键菜单里就会有“Show Redraw Regions (显示重绘区域)” 这个选项,当此选项打开的时候,我们就能清楚地看到此刻场景内被重绘的区域。 那么什么情况下会发生重绘呢? 1、最常见的是情况就是舞台上的可视组件在形状、位置、状态(alpha, scale...)发生改变的时候会触发Flash Player 的重绘。 2、当一个DisplayObject的层级(ChildIn…

2010-10-12 22:00 · ActionScript3/Flex4 · 浏览器 · Flash · 活动 · QQ

AlivePDF本地生成PDF

直接上例子吧 ,本来想用html布局生成pdf的,没成功。。。 <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:groe_org="org.groe.html.*" minWidth="955" minHeight="600"> <fx:Declarations> </f…

2010-09-29 10:07 · ActionScript3/Flex4 · HTML · Flex · Flash · Adobe · F#

Cookie的工作原理和Cookie协议

遵循Netscape cookie草案的完整的Set-Cookie 头: Set-Cookie:customer=huangxp; path=/foo; domain=.ibm.com; expires= Wednesday, 19-OCT-05 23:12:40 GMT; [secure] Set-Cookie的每个属性解释如下: Customer=huangxp 一个"名称=值"对,把名称customer设置为值"huangxp",这个属性在Cookie中必须有。 path=/foo 控制哪些访问能够触发cookie 的发送。如果没有指定path,cookie 会在所有对此站点的HTTP…

2010-09-18 11:51 · javascript · 浏览器 · 网络协议 · 工作 · IBM · Web

Flex 备忘

1. 读取从swf传进来的参数 var first_name : String = FlexGlobals.topLevelApplication.parameters.firstname; 2. FXG使用fill对图形本体进行上色,使用stroke对图形边框进行上色,而fill(填充)和stroke(画笔)有三种上色方法: fill — SolidColor(色块),RadialGradient(径向渐变),LinearGradient(线性渐变)。 stroke — SolidColorStroke(实线),RadialGradientStroke(径向渐变),LinearGradie…

2010-09-10 11:15 · ActionScript3/Flex4 · ActionScript · Flex · Flash · 360 · JavaScript

Understanding Custom Flex Component Development

I’ve been refining my custom Flex component development for a while but I still smile when I come across someone’s definition of the basics that makes what I’ve already learned even more understandable. I came across Mike Nimer’s post about slides from the Flex Camp in Chicago and after reading thr…

2010-09-02 22:57 · ActionScript3/Flex4 · Flex · UP · Adobe · WordPress · IE

Flex Component Life Cycle

The lifecycle of component in flex is certainly somewhat similar to the old V2 framework where you create a component holder, craetechildren, set-sizes and dispatch events. Following four methods plays a role for component rendering commitProperties() measure() layoutChrome() updateDisplayList() He…

2010-09-02 22:39 · ActionScript3/Flex4 · Flex · UP · Adobe · WordPress

MySQL Limit操作

select * from table LIMIT 5,10; #返回第6-15行数据 select * from table LIMIT 5; #返回前5行 select * from table LIMIT 0,5; #返回前5行 性能优化:基于MySQL5.0中limit的高性能,我对数据分页也重新有了新的认识. 1. Select * From cyclopedia Where ID>=( Select Max(ID) From ( Select ID From cyclopedia Order By ID limit 90001 ) As tmp ) limit 100; 2. S…

2010-07-23 23:07 · mysql/sybase · ASP · SQL · MySQL

JBoss-4.2.3GA配置MySQL数据库连接池

1.将mysql的JDBC驱动放到的JBOSS_HOME\server\default\lib 下 2.把JBOSS_HOME\docs\examples\jca\mysql-ds.xml 复制到JBOSS_HOME\server\default\deploy目录下,修改mysql-ds.xml文件 <jndi-name>MySqlDS</jndi-name> <use-java-context>false</use-java-context> <connection-url>jdbc:mysql://localhost:3306/synnex</connection-url> <drive…

2010-07-23 10:30 · java · SQL Server · Java · SQL · MySQL · JBoss

javascript资源收集

http://dmitrysoshnikov.com/ecmascript/chapter-1-execution-contexts/ ecma262 http://www.stubbornella.org/content/2009/03/27/reflows-repaints-css-performance-making-your-javascript-slow/ Reflow和Repaint http://dev.opera.com/articles/view/efficient-javascript/ http://dean.edwards.name/weblog/2006/06/ag…

2010-07-15 22:45 · javascript · CSS · Blog · 正则表达式 · JavaScript · Opera

winodw.onload

/* * (c)2006 Jesse Skinner/Dean Edwards/Matthias Miller/John Resig * Special thanks to Dan Webb's domready.js Prototype extension * and Simon Willison's addLoadEvent * * For more info, see: * http://www.thefutureoftheweb.com/blog/adddomloadevent * http://dean.edwards.name/weblog/2006/06/again/ * ht…

2010-07-15 22:42 · javascript · C · Safari · prototype · webkit · IE

了解 NoSQL 的必读资料

NoSQL 是非关系型数据存储的广义定义。它打破了长久以来关系型数据库与 ACID 理论大一统的局面。NoSQL 数据存储不需要固定的表结构,通常也不存在 连接 操作。在大数据存取上具备关系型数据库无法比拟的性能优势。该术语在 2009 年初得到了广泛认同。 当今的应用体系结构需要数据存储在 横向伸缩性 上能够满足需求。而 NoSQL 存储就是为了实现这个需求。Google 的 BigTable 与 Amazon 的 Dynamo 是非常成功的商业 NoSQL 实现。一些开源的 NoSQL 体系,如Facebook 的 Cassandra , Apache 的 HBase ,也得到了广泛认同…

2010-06-30 14:09 · 备忘录 · 数据结构 · Cassandra · HBase · NoSQL · 互联网

svn插件导致eclipse崩溃

从 http://subclipse.tigris.org/update_1.6.x/ 安装好svn插件后,在导入svn项目时就会造成eclipse崩溃。我的环境是eclipse 3.5,网上说是把subclipse的接口改为纯java就OK了,可是试了不行,后来网上找到说是装了Subversion命令行造成,于是卸载掉Subversion果然OK。。。

2010-06-10 10:19 · java · Java · Eclipse · SVN · subversion