摘要: <?xml version="1.0" encoding="utf-8"?> <!-- Simple example to demonstrate the DateTimeAxis class. --> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> import mx.collections.ArrayCollection; import mx.charts.chartClasses.IAxi 阅读全文
posted @ 2009-11-30 19:22 zhwj184 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 编译和连接程序 MySQL中有一个特殊的脚本,叫做mysql_config. 它会为你编译MySQL客户端,并连接到MySQL服务器提供有用的信息.你需要使用下面两个选项. 1. --libs 选项 - 连接MySQL客户端函数库所需要的库和选项. $ mysql_config --libs 2. --cflags 选项 - 使用必要的include文件的选项等等. $ mysql_config --cflags 你需要将上面两个选项加入到对源文件的编译命令中. 所以,要编译上面的程序,要使用下面的命令: $ g++ -o output-file $(mysql_config ... 阅读全文
posted @ 2009-11-24 19:12 zhwj184 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 首先设置mysql的编码为utf8在linux下修改3个my.cnf的1个/etc/mysql/my.cnf文件找到客户端配置[client] 在下面添加default-character-set=utf8 默认字符集为utf8在找到[mysqld] 添加default-character-set=utf8 默认字符集为utf8init_connect='SET NAMES utf8' (设定连接mysql数据库时使用utf8编码,以让mysql数据库为utf8运行)查看mysql编码都设置为utf8后,从文件导数据导数据表中,文件中文正常,编码也是utf8,发现在mysql查 阅读全文
posted @ 2009-11-11 18:54 zhwj184 阅读(90) 评论(0) 推荐(0) 编辑
摘要: spring中已经很好的封装了任务调度模块,spirng中quartz包能够很方便的提供这一功能,使用也非常方便,首先新建一个任务类,在任务类中建一个任务方法,import org.apache.log4j.Logger;public class TJob { private Logger logger = Logger.getLogger(this.getClass().getName()); public void doAuth(){ logger.info("开始进行任务调度,验证信息:"); System.out.println("开始进行任务... 阅读全文
posted @ 2009-11-07 15:26 zhwj184 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 1.从http://www.jython.org/Project/installation.html下载jython安装文件,运行命令“java -jar jython_installer-2.5.0.jar,jython即安装成功. 2.把jython安装目录加入到系统环境变量,在java工程中加入jython安装目录下的jython.jar即可在java中使用jython了。 下面是我的实例,一个是在java中运行test.py脚本,一个是直接在java中直接运行python命令。 import org.python.util.PythonInterpreter;import org.p. 阅读全文
posted @ 2009-10-29 12:50 zhwj184 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 1.在创建表的同时创建索引 CREATE TABLE material(id INT NOT NULL, name char(40) NOT NULL, resistance INT, INDEX index1(id,name), UNIQUE INDEX index2(name)) 第一个索引,名为index1,由id和name两个字段组成。第二个索引只包含name,并指明name字段的值必须是唯一的。2.插入数据,可以通过其他某个表中的数据填充新表以插入新数据 INSERT INTO foods(name,fat) SELECT food_name, fat_grams FROM reci 阅读全文
posted @ 2009-10-26 21:16 zhwj184 阅读(102) 评论(0) 推荐(0) 编辑
摘要: <?xml version="1.0"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <!--[CDATA[ import mx.collections.ArrayCollection; [Bindable] public var data1:ArrayCollection=new ArrayCollection([{date:"10月1日", all:4001.87}, {date:" 阅读全文
posted @ 2009-10-18 11:30 zhwj184 阅读(155) 评论(0) 推荐(0) 编辑
摘要: <?xml version="1.0"?><!-- Simple example to demonstrate the DateTimeAxis class. --><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <!--[CDATA[ import mx.collections.ArrayCollection; [Bindable] public var stockDataAC:ArrayCollectio 阅读全文
posted @ 2009-10-18 10:36 zhwj184 阅读(214) 评论(0) 推荐(0) 编辑
摘要: jfreechart0.9版本的在生成图表后出现ChartDeleter没有序列化问题的解决方法,错误信息如下2009-09-01 16:53:52,066 [] ERROR encoder.EncryptCookieEncoderImpl - Failed to encode cookie statejava.io.NotSerializableException: org.jfree.chart.servlet.ChartDeleter at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:115... 阅读全文
posted @ 2009-10-15 14:30 zhwj184 阅读(314) 评论(0) 推荐(0) 编辑
摘要: ibatis出现这个错误需要把头部<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-config-2.dtd"> 改为<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN" "http://ibatis.apache.org/dtd 阅读全文
posted @ 2009-10-10 17:34 zhwj184 阅读(459) 评论(0) 推荐(0) 编辑