2023年5月26日
摘要:
9.1 模块的概念 一个平台模块包含: 一个包集合; 可选地包含资源文件和像本地库这样的其他文件; 一个有关模块中可访问的包的列表; 一个有关这个模块依赖的所有其他模块的列表; 平台模块系统的优点: 1)强封装:可控制可访问的包,无须操心维护不想开放的代码; 2)可靠的配置:可避免 类路径中常见的类
阅读全文
posted @ 2023-05-26 17:57
bruce_he
阅读(144)
推荐(0)
2023年5月23日
摘要:
使用 Java 运行 JavaScript 脚本 当前版本: JDK:17 测试程序: public class EngineTest { public static void main(String[] args) throws ScriptException, NoSuchMethodExcep
阅读全文
posted @ 2023-05-23 10:11
bruce_he
阅读(3901)
推荐(1)
2023年5月22日
摘要:
本章将介绍三种用于处理代码的技术: 脚本 API:可调用脚本语言,如 JavaScript、Groovy、Ruby等; 编译器 API:应用程序内部编译 Java 代码; 注解处理器:可在包含注解的 Java 源代码和类文件上进行操作; 8.1 Java 平台的脚本机制 8.1.1 获取脚本引擎 /
阅读全文
posted @ 2023-05-22 13:45
bruce_he
阅读(97)
推荐(0)
2023年5月15日
摘要:
如下方式针对单个模块化,如 core java 的课程代码。更方便的可以通过 maven 管理 1. 下载对应的 jar 包 2. 将下载的 jar 包放入 lib 目录下 3. 添加 Libraries,File -> Project Structure -> Libraries -> "+",添
阅读全文
posted @ 2023-05-15 13:24
bruce_he
阅读(106)
推荐(0)
2023年5月11日
摘要:
4.1 连接到服务器 4.1.2 Java 连接到服务器 var s = new Socket("time-a.nist.gov", 13); InputStream inStream = s.getInputStream(); 4.1.2 socket timeout // 方式一: var s
阅读全文
posted @ 2023-05-11 11:23
bruce_he
阅读(37)
推荐(0)
2023年5月8日
摘要:
数据库一次 Connection 连接,不同 cursor 的最简洁代码: import pymysql class Database(object): connection = None def __init__(self): if not Database.connection: Databas
阅读全文
posted @ 2023-05-08 16:29
bruce_he
阅读(127)
推荐(0)
2023年5月6日
摘要:
1、String String对象是不可变的,即一旦一个 String 对象被创建以后,包含在这个对象中的字符序列是不可改变的,直至这个对象被销毁。 那么我们new一个String对象,比如 String a = new String("A") String a2 = new String("A")
阅读全文
posted @ 2023-05-06 17:59
bruce_he
阅读(37)
推荐(0)
2023年5月5日
摘要:
链接: https://blog.csdn.net/csdntoast/article/details/50639819 1 获取本机的IP地址: private static String getIpAddress() throws UnknownHostException { InetAddre
阅读全文
posted @ 2023-05-05 11:02
bruce_he
阅读(239)
推荐(0)
2023年3月21日
摘要:
本书源码(下载对应版本的代码):https://horstmann.com/corejava/index.html Java 17 API 文档:https://docs.oracle.com/javase/17/docs/api 配套视频讲解(卷一):https://space.bilibili.
阅读全文
posted @ 2023-03-21 13:19
bruce_he
阅读(168)
推荐(0)
2023年3月3日
摘要:
6.1 TimeLine 1. A duration is the difference between two instants. 2. Measuring the running time of an algorithm: Instant start = Instant.now(); runAl
阅读全文
posted @ 2023-03-03 14:56
bruce_he
阅读(51)
推荐(0)
2023年2月24日
摘要:
5.1 JDBC API 1. JDBC (Java Database Connectivity) is an API for interacting with a database in Java. 2. Each database vendor produces a driver that tr
阅读全文
posted @ 2023-02-24 14:17
bruce_he
阅读(82)
推荐(0)
2023年2月12日
摘要:
场景:使用 sqlalchemy+pandas 1. 'OptionEngine' object has no attribute 'execute' import pandas as pd from sqlalchemy import create_engine, text engine = cr
阅读全文
posted @ 2023-02-12 09:12
bruce_he
阅读(7781)
推荐(0)
2023年2月10日
摘要:
3.1 XML Introduction An XML document is made up of elements. An element can have attributes (key/value pairs) and child nodes. Child nodes can be elem
阅读全文
posted @ 2023-02-10 10:31
bruce_he
阅读(47)
推荐(0)
2023年2月7日
摘要:
链接:https://blog.csdn.net/qq_36631076/article/details/77006007 Java 的四个输入法:BufferedReader、InputStreamReader、Scanner 和 System.in。 1 System.in System.in
阅读全文
posted @ 2023-02-07 16:40
bruce_he
阅读(1007)
推荐(0)
2023年2月4日
摘要:
12.1 pytest 框架 12.1.1 简介 1. 框架的使用程度:pytest > unittest > RF 框架 > 无框架的 关键字驱动 > 数据驱动 > 线性脚本 pytest 在线文档:https://docs.pytest.org/en/7.2.x/ 2. pytest 相比较于
阅读全文
posted @ 2023-02-04 13:08
bruce_he
阅读(49)
推荐(0)