2024年4月记录(Statement执行多次查询,maven-shade-plugin和maven-assembly-plugin,CAS验证)

1.(转) 操作系统——MBR与显存

https://www.cnblogs.com/hawkJW/p/13651701.html

2.Statement执行多次查询

在Java中,使用JDBC的Statement对象来执行SQL语句进行数据库查询时,可以通过以下步骤进行:

  1. 加载数据库驱动。

  2. 创建数据库连接。

  3. 创建Statement对象。

  4. 执行查询并处理结果。

  5. 关闭Statement对象和数据库连接。

以下是执行多次查询的示例代码:

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
 
public class MultipleQueriesExample {
    public static void main(String[] args) {
        String url = "jdbc:mysql://localhost:3306/your_database";
        String user = "your_username";
        String password = "your_password";
 
        try {
            // Step 1: Load the driver
            Class.forName("com.mysql.cj.jdbc.Driver");
 
            // Step 2: Establish a connection
            try (Connection conn = DriverManager.getConnection(url, user, password);
                 // Step 3: Create a statement
                 Statement statement = conn.createStatement()) {
 
                // Step 4: Execute queries
                String query1 = "SELECT * FROM your_table WHERE condition1";
                String query2 = "SELECT * FROM your_table WHERE condition2";
 
                // Execute query 1
                ResultSet rs1 = statement.executeQuery(query1);
                // Process results of query 1
                while (rs1.next()) {
                    // Retrieve by column name
                    int id = rs1.getInt("id");
                    String name = rs1.getString("name");
                    // ...
                }
                rs1.close();
 
                // Execute query 2
                ResultSet rs2 = statement.executeQuery(query2);
                // Process results of query 2
                while (rs2.next()) {
                    // Retrieve by column name
                    int id = rs2.getInt("id");
                    String name = rs2.getString("name");
                    // ...
                }
                rs2.close();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

JDBC定义了接口,又定义了使用方式

 mybatis示例:

 mybatis每次请求先释放ResultSet,再释放Statement

释放Statement

org.apache.ibatis.executor.SimpleExecutor#doUpdate

org.apache.ibatis.executor.keygen.Jdbc3KeyGenerator#processBatch

释放ResultSet

3.maven-shade-plugin和maven-assembly-plugin打包插件

Java选手必看打包插件:maven-shade-plugin和maven-assembly-plugin - 墨天轮

4.原来PCIe这么简单,一定要看!

原来PCIe这么简单,一定要看! 来源:内容来自公众号「Linux阅码场」,作者:木叶 ,谢谢。硬盘是大家都很熟悉的设备,一路走来,从HDD到SSD,从... - 雪球

5.CAS 入门实战

org.jasig.cas.client.validation.AbstractCasProtocolUrlBasedTicketValidator#retrieveResponseFromServer

org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator#validate

https://blog.51cto.com/wuyongyin/5321466

6.破解

Some keys for testing - jetbra.in

JETBRA.IN CHECKER | IPFS

7.内核使用内存保护机制https://www.baidu.com/s?wd=linux%E5%BA%95%E5%B1%82%E5%A6%82%E4%BD%95%E9%99%90%E5%88%B6%E7%94%A8%E6%88%B7%E6%80%81%E8%AE%BF%E9%97%AE%E5%86%85%E6%A0%B8%E6%80%81&ie=utf-8

内含详细的帮助文件(英文),解决各种授权出问题的情况 没分的请到网盘下载: http://www.400gb.com/file/54873134 PCS7 v8.0, TIA Poprtal, WinCC and key9999 Problems with new ALM v5 Simatic IT Business Objects Enterprise signed keys Official FAQ FastCopy keys v3.0 1843 keys v2013.12.25 add some info for Simatic Net v12 //MD5: 0ade8808e789e6e704e66b0877c1c04f *Sim_EKB_Install_2013_12_25.exe v2013.12.10 add some info for Simocode v12 // MD5: 10a0c74548ba89b80e98f2664289ba79 v2013.12.02 add some info for PDM v8.1 v2013.12.01 add some info for Softnet Security Client v4.0 v2013.05.26 add some info for WinCC v7.2 v2013.03.08 fix 1 key for TIA Portal v12 v2013.03.03 add TIA Portal v12, S7-Technology, fix Unicode bug for some new keys folder v2013.03.01_test add TIA Portal v12 with some bug for all Unicode version from v2012.10.12 v2013.01.21 fix bug with PID v11.0 keys, add some info for D7-SYS v8.0 v2012.10.12 add Chinese language (possible Cyryllic chars in the European interfaces :) ASCII > Unicode v2012.09.29 add some info for Easy Motion v11.0, SinuTrain 4.4 v2012.07.29 add some info for PID v11.0 *but with error :( v2012.07.23 add some info for Simotion Scout v4.3 v2012.07.19 add some info for Telecontrol Server Basic v2.0 and fix comment bug v2012.07.18 add some info for PDM v6.1. v2012.03.08 add some info for PCS7 v8.0. v2012.02.26 add some info forWinCC Flexible 2008 SP3, Simatic Net v8.1. Fixed bug of euristic engine. v2012.01.26 add some info for Simatic Net v8.1 14/05/2011 add some info for TIA Portal V11 15/02/2011 This internal version for testing add some keys 11/10/2010 add some info for.... 10/10/2010 add one info for "SIK/ SIMATIC S5 PMC IE V7.0" ("A9S5IE70") 09/09/2010 add some info for WinCC DowntimeMonitor, WinAC, fix bug for comp and Virtual Machine with 1 HardDisk partition 09/05/2010 add keys for WinCC Flexible 2008 SP2 options v1.3, Sinaut, fixed one ALM v5 bug 20/04/2010 add some keys Safety Matrix, PCS7 powerrate, PCS7 CFC AS RT SIFPZASRPX9999A 20/03/2010 add some keys, "opt
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值