- 浏览: 730714 次
- 性别:
- 来自: 上海
-
文章分类
最新评论
-
一剪梅:
关于您对于 hasRolePermission 用法的解释, ...
OFBIZ安全性技术(翻译) -
沈寅麟:
数据模型资源手册卷3中文版出版了 -
donaldjohn:
恭喜恭喜, 预祝大卖
数据模型资源手册卷3中文版出版了 -
成大大的:
OFBiz电商实战百度网盘下载:http://pan.baid ...
OFBiz入门实训教程 -
成大大的:
OFBiz电商实战百度网盘下载:http://pan.baid ...
OFBiz促销码生成解释
hsqldb自带的例子。看看就一切ok了,万事不求人啊。
There is a copy of Testdb.java in the directory src/org/hsqldb/sample of your HSQLDB distribution.
There is a copy of Testdb.java in the directory src/org/hsqldb/sample of your HSQLDB distribution.
java 代码
- 1. /* Copyright (c) 2001-2005, The HSQL Development Group
- 2. * All rights reserved.
- 3. *
- 4. * Redistribution and use in source and binary forms, with or without
- 5. * modification, are permitted provided that the following conditions are met:
- 6. *
- 7. * Redistributions of source code must retain the above copyright notice, this
- 8. * list of conditions and the following disclaimer.
- 9. *
- 10. * Redistributions in binary form must reproduce the above copyright notice,
- 11. * this list of conditions and the following disclaimer in the documentation
- 12. * and/or other materials provided with the distribution.
- 13. *
- 14. * Neither the name of the HSQL Development Group nor the names of its
- 15. * contributors may be used to endorse or promote products derived from this
- 16. * software without specific prior written permission.
- 17. *
- 18. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- 19. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- 20. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- 21. * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG,
- 22. * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- 23. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- 24. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- 25. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- 26. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- 27. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- 28. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- 29. */
ruby 代码
- package org.hsqldb.sample;
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.ResultSet;
- import java.sql.ResultSetMetaData;
- import java.sql.SQLException;
- import java.sql.Statement;
- /**
- * Title: Testdb
- * Description: simple hello world db example of a
- * standalone persistent db application
- *
- * every time it runs it adds four more rows to sample_table
- * it does a query and prints the results to standard out
- *
- * Author: Karl Meissner karl@meissnersd.com
- */
- public class Testdb {
- Connection conn; //our connnection to the db - presist for life of program
- // we dont want this garbage collected until we are done
- public Testdb(String db_file_name_prefix) throws Exception { // note more general exception
- // Load the HSQL Database Engine JDBC driver
- // hsqldb.jar should be in the class path or made part of the current jar
- Class.forName("org.hsqldb.jdbcDriver");
- // connect to the database. This will load the db files and start the
- // database if it is not alread running.
- // db_file_name_prefix is used to open or create files that hold the state
- // of the db.
- // It can contain directory names relative to the
- // current working directory
- conn = DriverManager.getConnection("jdbc:hsqldb:"
- + db_file_name_prefix, // filenames
- "sa", // username
- ""); // password
- }
- public void shutdown() throws SQLException {
- Statement st = conn.createStatement();
- // db writes out to files and performs clean shuts down
- // otherwise there will be an unclean shutdown
- // when program ends
- st.execute("SHUTDOWN");
- conn.close(); // if there are no other open connection
- }
- //use for SQL command SELECT
- public synchronized void query(String expression) throws SQLException {
- Statement st = null;
- ResultSet rs = null;
- st = conn.createStatement(); // statement objects can be reused with
- // repeated calls to execute but we
- // choose to make a new one each time
- rs = st.executeQuery(expression); // run the query
- // do something with the result set.
- dump(rs);
- st.close(); // NOTE!! if you close a statement the associated ResultSet is
- // closed too
- // so you should copy the contents to some other object.
- // the result set is invalidated also if you recycle an Statement
- // and try to execute some other query before the result set has been
- // completely examined.
- }
- //use for SQL commands CREATE, DROP, INSERT and UPDATE
- public synchronized void update(String expression) throws SQLException {
- Statement st = null;
- st = conn.createStatement(); // statements
- int i = st.executeUpdate(expression); // run the query
- if (i == -1) {
- System.out.println("db error : " + expression);
- }
- st.close();
- } // void update()
- public static void dump(ResultSet rs) throws SQLException {
- // the order of the rows in a cursor
- // are implementation dependent unless you use the SQL ORDER statement
- ResultSetMetaData meta = rs.getMetaData();
- int colmax = meta.getColumnCount();
- int i;
- Object o = null;
- // the result set is a cursor into the data. You can only
- // point to one row at a time
- // assume we are pointing to BEFORE the first row
- // rs.next() points to next row and returns true
- // or false if there is no next row, which breaks the loop
- for (; rs.next(); ) {
- for (i = 0; i < colmax; ++i) {
- o = rs.getObject(i + 1); // Is SQL the first column is indexed
- // with 1 not 0
- System.out.print(o.toString() + " ");
- }
- System.out.println(" ");
- }
- } //void dump( ResultSet rs )
- public static void main(String[] args) {
- Testdb db = null;
- try {
- db = new Testdb("db_file");
- } catch (Exception ex1) {
- ex1.printStackTrace(); // could not start db
- return; // bye bye
- }
- try {
- //make an empty table
- //
- // by declaring the id column IDENTITY, the db will automatically
- // generate unique values for new rows- useful for row keys
- db.update(
- "CREATE TABLE sample_table ( id INTEGER IDENTITY, str_col VARCHAR(256), num_col INTEGER)");
- } catch (SQLException ex2) {
- //ignore
- //ex2.printStackTrace(); // second time we run program
- // should throw execption since table
- // already there
- //
- // this will have no effect on the db
- }
- try {
- // add some rows - will create duplicates if run more then once
- // the id column is automatically generated
- db.update(
- "INSERT INTO sample_table(str_col,num_col) VALUES('Ford', 100)");
- db.update(
- "INSERT INTO sample_table(str_col,num_col) VALUES('Toyota', 200)");
- db.update(
- "INSERT INTO sample_table(str_col,num_col) VALUES('Honda', 300)");
- db.update(
- "INSERT INTO sample_table(str_col,num_col) VALUES('GM', 400)");
- // do a query
- db.query("SELECT * FROM sample_table WHERE num_col < 250");
- // at end of program
- db.shutdown();
- } catch (SQLException ex3) {
- ex3.printStackTrace();
- }
- } // main()
- } // class Testdb
发表评论
-
优化数据库前,可以问自己的10个问题
2009-12-25 13:17 992在 优化你的数据库时,你可能没有用到这些细节的优点。以 ... -
Sequoia(基于JDBC的数据库集群中间件)用户手册
2008-12-30 08:54 3499http://haha8.runsky.com/forum/s ... -
优秀的开源MySql开发/管理软件集合
2008-12-01 12:32 2147MySql是目前应用最广泛 ... -
MySQL和Postgres的比较
2008-08-27 12:10 1871我使用哪个数据库:Post ... -
Navicat 管理mysql不错
2007-11-14 08:58 1724Navicat 管理mysql不错 javaeye上附 ... -
Derby入门
2007-09-21 22:01 1329http://www.blogjava.net/mrzha ... -
Hsqldb初学
2007-09-15 01:22 4287java 代码 用了一下Hsqldb,感觉很精 ... -
org_myoodb_tools_classes 类图
2007-09-03 10:09 1127... -
myoodb_exception类图
2007-09-03 10:08 1232... -
面向对象的DBMS
2007-08-31 14:06 28601.数据库技术的发展 从60年代至今的30年中,信 ... -
org_myoodb_base相关类图
2007-08-29 17:06 1138... -
myoodb -objects类图
2007-08-29 10:29 1217动物的图 -
myoodb_extensions
2007-08-27 18:04 1168collectable 集合 Collectable ... -
myoodb例子的功能简单介绍
2007-08-24 16:45 1943# MyOODB - all database ... -
myoodb快速指南(翻译)
2007-08-21 13:48 2851myoodb快速指南 myoodb是一个面向对象的数据库,他 ...
相关推荐
<property name="JDBC.Driver" value="org.hsqldb.jdbcDriver"/> <property name="JDBC.ConnectionURL" value="jdbc:hsqldb:data/tutorial"/> <property name="JDBC.Username" value="sa"/> <property name="...
这个数据集提供了2010年至2021年间加拿大各省的家庭支出与收入数据,这些数据根据人口统计和地理指标进行了分类。每行代表了年份(REF_DATE)、省份(GEO)以及编码后的支出或收入类型的唯一组合(COORDINATE)。以下是该数据集的关键特点及包含的列信息: 关键特点: 支出数据:家庭支出按照收入五分位数和支出类别进行分类。 收入数据:家庭收入值根据家庭类型、较年长成年人的年龄组别和收入水平细分。 地理位置匿名化:为了保护隐私,原始的地理位置标识符被替换为如“Province 1”这样的标签。 时间序列:涵盖了超过十年的财务数据(2010–2021),适合用于纵向经济和社会趋势分析。 包含的列: REF_DATE:记录年份(2010–2021) GEO:省份标签(例如,“Province 1”) Statistic:度量类型(例如,平均家庭支出) Before-tax household income quintile:税前家庭收入水平分组 Household expenditures, summary-level categories:支出类别 UOM:计量单位 COORD
1.【锂电池剩余寿命预测】GRU门控循环单元锂电池剩余寿命预测(Matlab完整源码和数据) 2.数据集:NASA数据集,已经处理好,B0005电池训练、测试; 3.环境准备:Matlab2023b,可读性强; 4.模型描述:GRU门控循环单元在各种各样的问题上表现非常出色,现在被广泛使用。 5.领域描述:近年来,随着锂离子电池的能量密度、功率密度逐渐提升,其安全性能与剩余使用寿命预测变得愈发重要。本代码实现了GRU门控循环单元在该领域的应用。 6.作者介绍:机器学习之心,博客专家认证,机器学习领域创作者,2023博客之星TOP50,主做机器学习和深度学习时序、回归、分类、聚类和降维等程序设计和案例分析,文章底部有博主联系方式。从事Matlab、Python算法仿真工作8年,更多仿真源码、数据集定制私信。
2000-2024年各省专利侵权案件结案数数据 1、时间:2000-2024年 2、来源:国家知识产权J 3、指标:专利侵权案件结案数 4、范围:31省 5、用途:可用于衡量知识产权保护水平
- 使用`<div>` 容器组织游戏界面,包含得分显示、游戏画布和操作按钮 - 支持三种游戏模式选择(一般模式、困难模式、无敌模式) - 移动端和桌面端兼容,提供触摸和键盘两种控制方式 2. CSS样式 : - 采用Flex布局实现页面居中显示 - 使用Grid布局实现方向按钮的排列 - 定义了游戏容器的阴影、圆角等视觉效果 - 为按钮添加了hover效果和过渡动画 3. JavaScript逻辑 : - 使用Canvas API实现游戏渲染 - 实现了蛇的移动、食物生成、碰撞检测等核心游戏逻辑 - 支持三种游戏模式,不同模式对应不同的游戏速度和规则 - 使用localStorage保存最高分记录 - 实现随机颜色生成,使游戏更具趣味性 代码整体结构清晰,功能完整,具有良好的可扩展性和可维护性。
台区终端电科院送检文档
内容概要:本文详细介绍了一个基于强化学习(RL)的飞机升阻力特性预测模型的实现过程。首先,定义了飞机空气动力学环境,包括状态空间、动作空间以及目标——预测升力系数(Cl)和阻力系数(Cd)。接着,通过生成模拟数据并进行预处理,创建了用于训练的数据集。然后,构建了一个神经网络代理模型,用于联合编码状态和动作,并预测升阻力系数。最后,实现了PPO算法来训练强化学习代理,使其能够根据当前状态选择最优动作,并通过不断迭代提高预测精度。文中还提供了完整的代码实现和详细的注释。 适合人群:航空航天领域的研究人员、机器学习工程师、对强化学习感兴趣的开发者。 使用场景及目标:适用于需要预测飞机升阻力特性的应用场景,如飞行器设计优化、性能评估等。目标是通过强化学习方法提升预测模型的准确性,从而为实际工程提供可靠的理论支持和技术手段。 其他说明:本文不仅涵盖了模型的设计与实现,还包括了数据生成、预处理等多个环节,有助于读者全面理解整个建模过程。同时,提供的代码可以作为研究和开发的基础,方便进一步扩展和改进。
cmock ut aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
lsm6d datasheet
风力发电机传动机构的设计(增速器)
genesys-zu(5ev)配置petalinux(从安装到嵌入)
django自建博客app
Android项目原生java语言课程设计,包含LW+ppt
幼儿园预防肺结核教育培训课件资料
STM32F103RCT6单片机控制气泵和电磁阀的开关 1、气泵和电磁阀的开和关均为开关量,实现控制方法有多种,比如继电器,但是继电器动作有噪声且体积较大,更好的方法为使用mos管。 2、mos管的选型:mos管选择主要注意两个参数即可,一是导通的电流,二是耐压值,并且常用NMOS管,根据要求,气泵和电磁阀供电电压为12V,所以选择的mos管耐压值要大于12V,这里选用耐压值为30V的MOS管,并且导通电流为5.8A。
因文件较多,数据存放网盘,txt文件内包含下载链接及提取码,永久有效。失效会第一时间进行补充。样例数据及详细介绍参见文章:https://blog.csdn.net/T0620514/article/details/146916073
将 Windows 系统中 “C:\windows\fonts” 目录下的所有字体文件
智能量测终端最新标准
滑道式提升机及其控制电路的设计.zip
资源内项目源码是来自个人的毕业设计,代码都测试ok,包含源码、数据集、可视化页面和部署说明,可产生核心指标曲线图、混淆矩阵、F1分数曲线、精确率-召回率曲线、验证集预测结果、标签分布图。都是运行成功后才上传资源,毕设答辩评审绝对信服的保底85分以上,放心下载使用,拿来就能用。包含源码、数据集、可视化页面和部署说明一站式服务,拿来就能用的绝对好资源!!! 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、大作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.txt文件,仅供学习参考, 切勿用于商业用途。