目录

我的学习分享

记录精彩的程序人生

正则表达式:必须要有一个小写字母,一个大写字母和一个数字,并且是8-16位

public static boolean isMobileNO(String mobiles) { Pattern pattern = Pattern.compile("^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[A-Za-z0-9]{8,16}$"); Matcher matcher = pattern.matcher(mobiles); boolean b = matcher.matches(); return b; } ———————————————— 版权声明:本文为CSDN博主「super果」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/qq_35841348/article/details/80735251

GridLayout布局动态添加控件时以从左向右的顺序添加

import java.awt.*; import java.applet.Applet; public class ButtonGrid extends Applet { public void init() { contentPane.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); setLayout(new GridLayout(0,2)); add(new Button("1")); add(new Button("2")); add(new Button("3")); add(new Button("4")); add(new Button("5")); add(new Button("6")); } } 要点: 设置容器的组件方向为LEFT_TO_RIGHT 实例化GridLayout时,第一个参数设置为0

JTattoo 有更新!

官网:http://www.jtattoo.net/ JTattoo consists of several different Look and Feels for Swing applications. All of them enables developers to improve their application with an excellent user interface. So JTattoo opens desktop applications the door to end users who are unfortunate with the Look and Feels shipped with the standard JDK. to release 1.3. Source code is now available! to release 1.6.0 The TextureLookAndFeel! License agreement (GPL / LGPL / Apache License)! to release 1.6.12 Removed s....

acuiconflux 有更新!

创建钱包过程 ConfluxPortal1 Create Password Secret Backup Phrase Confirm your Secret Backup Phrase Congratulations 进入主界面 ConfluxPortal2 20200717 总结密码的作用: 1 使用AES对称加密算法保护保存在本地的助记词或私钥(所以必须让用户设定一个密码) 2 方便用户操作在需要助记词或密码时,比如转账操作需要私钥签名,这时不需要用户直接提供私钥,用户只需提供密码即可) 3 导出助记词或私钥(因保存在本地的助记词或私钥已经加密,故需密码解密后导出) 货币接口 public interface Coin { // 名称 public String getName(); // 简称 public String getSymbol(); // 返回某个地址的账户余额 public void balanceOf(/* address _owner */); // 转账 public void transfer(/* address _to....

Howto use wait and progress cursors

https://performance.netbeans.org/howto/wait-cursors.html

Optimization of java.awt.Component's initialization

https://performance.netbeans.org/responsiveness/improving/postinit_of_comps.html

How Wizards Work (Geertjan Wielenga) 有更新!

https://blogs.oracle.com/geertjan/how-wizards-work-part-1:-introduction Introduction Wizards can be used for three things: To create a project template. This type of wizard is made available by the New Project wizard after registration in the layer.xml file (e.g., Web Application wizard). To create a file template. This type of wizard is made available by the New File wizard after registration in the layer.xml file: the template can consist of a single file (e.g., New Servlet wizard) the temp....

Tom Wheeler's sample: how wizards work

WizardExampleSuite20070202.zip NetBeans Wizards Example Fri Feb 2 12:04:47 EST 2007 Someone asked on the NetBeans developer mailing list about a tutorial that shows how wizards work; specifically, how you handle validation and store input values between screens. I was not aware of a tutorial covering this in detail, so in the meantime, I wrote a NetBeans 5.5 example suite that illustrates these concepts. It's kind of a first draft, but maybe I will write a corresponding tutorial soon. After laun....

NetBeans Wizard Module Tutorial

https://platform.netbeans.org/tutorials/nbm-wizard.html Creating the Module Project We begin by working through the New Module Project wizard. At the end of it, we will have a basic source structure, with some default files, that every NetBeans module requires. Choose File > New Project (Ctrl+Shift+N). Under Categories, select NetBeans Modules. Under Projects, select Module. Click Next. In the Name and Location panel, type DemoWizard in the Project Name field. Change the Project Location to a....

How to Create a Dynamic Wizard

https://dzone.com/articles/nb-how-to-create-dynamic-wizard You've created some kind of Java desktop application on top of the NetBeans Platform for recording & analyzing plants (which is a realistic scenario in Mexico). So, somewhere along the line you create a wizard where a new plant can be defined: If a plant is not marked as being "healthy", the second panel needs to appear, where details about the disease can be filled in: Then, when Next is clicked, a final panel provides a summary r....

ToolbarWithOverflow 有更新!

org.openide.awt.ToolbarWithOverflow ToolbarWithOverflow provides a component which is useful for displaying commonly used actions. It adds an overflow button when the toolbar becomes too small to show all the available actions. org.openide.awt.Toolbar org-openide-loaders.jar import java.awt.Component; import java.awt.Insets; import java.util.logging.Logger; import javax.swing.AbstractButton; import javax.swing.JButton; import javax.swing.JComponent; import javax.swing.JToolBar; import javax.swi....

【acuistock】开发日志 有更新!

一款股票行情软件,主要有3种类型的窗口 股票列表(可以根据各种条件筛选) 具体某一个股票信息(分时、k线、盘中信息) 其他(跟股票无关信息,例如聊天窗口) acuistock面向A股,核心数据结构包括 Stock(静态信息和动态信息) 股票市场 market 股票代码 code 股票名字 name 上市时间 listTime 是否退市 delisting 上市时间戳 listTimestamp DataSet(K线) 分时 明确一下本地磁盘缓存到底起什么作用,如果有用,考虑用derby替换掉,如果没用,就从代码中清掉 fetchStockFromCache 没什么用 fetchDatasetFromCache 没什么用 getLastChartFrameId 有点用,只是保留了最后打开的ChartFrame的id,这个其实也没必要非要持久化到磁盘 综上,目前这个磁盘缓存真的意义不大,可以去掉 明确使用FTAPI作为唯一数据源,简化程序设计 这个可以在代码上做一些调整,首先由于目前不支持多数据源,可以将DataProvider简化为一个。 去掉股票代码切换 因为可以在股票列表....

POI操作Excel--设置单元格对齐方式

设置单元格的对齐方式 1.注意: 1.如果每个单元格(cell)的样式都不一样,必须每个单元格都创建一个CellStyle,否则不生效; 2.day03关闭流的方式, 采用了JDK 7的try(),,写在try括号里的资源会自动关闭。 /** * 设置对齐方式 */ @Test public void setAlignment() { // 创建Excel工作簿 Workbook workbook = new XSSFWorkbook(); // 创建sheet Sheet sheet = workbook.createSheet(WorkbookUtil.createSafeSheetName("第一页?")); // 创建行和单元格并设置对齐方式 generateRowAndCell(sheet, workbook, 0, 0, HorizontalAlignment.CENTER, VerticalAlignment.CENTER); generateRowAndCell(sheet, workbook, 1, 0, HorizontalAlignment.LEFT, Verti....

Uniswap v2白皮书翻译,揭秘那些值得关注的新功能和行业亮点

该技术白皮书解释了Uniswap v2核心合约背后的一些设计决策。它涵盖了合约的新功能,包括ERC20之间的任意对,强化的价格预言系统,允许其他合约在给定时间间隔内,估计时间加权平均价格;“互换交易”(flash swaps),使交易者能够在之前获取资产并用于其他地方,在交易的后期付款,以及将来可以开启的协议费。它还会重新设计合约以减少攻击面。 此外,本例白皮书描述了Uniswap v2核心合约的机制,包括存储流动性提供者资金的配对合约以及用于实例化配对合约的工厂合约。 简介 Uniswap v1是在以太坊区块链上的智能合约的链上系统,基于“不变产品公式” [1]实现了自动流动性协议。每对Uniswap v1对都存储两个资产的合并储备,并为这两个资产提供流动性,从而保持了储备产品不能减少的不变性。交易者为交易支付30个基点的费用,该费用由流动性提供者支付。合约不可升级。 Uniswap v2是基于相同公式的新实现,具有一些非常令人希望的新功能。最重要的是,它支持创建任意ERC20 / ERC20对,而不是仅支持ERC20和ETH之间的对。它还提供了一个标准化的价格预言,该价格预言在每个....

NetBeans Parsing API

Parsing API defines contract between parsers registerred for diferent languages and the rest of IDE. It is language neutral and it supports language embeddings. The basic Parsing API constructs are Source, Snapshot and Embedding. Source identificates some concrete file or document. There is always at most one Source for one FileObject. Snapshot represents some concrete content of Source, and it is immutable. And Embedding represents some part of Snapshot written in different language. Embedding ....

JavaCC官方入门指南-概述 有更新!

https://www.cnblogs.com/suhaha/p/11733487.html 一、前言   在最开始使用JavaCC的时候,从网上查询了许多资料,但是网上的资料水平是参差不齐的,走了许多弯路,不得已自己查阅了英文版官网文档。令我伤心的是最后我回过头来再看那些博客资料时,发现其实他们写的都是没错的,只不过某些地方少了必要的讲解,以至于新手刚接触的时候是持续懵逼的。   不管怎样,下面内容是对官方文档的翻译,加上一些自己的理解。   官方文档连接:https://www.engr.mun.ca/~theo/JavaCC-Tutorial/javacc-tutorial.pdf   这里所翻译的部分是JavaCC的入门知识,通过由浅入深的几个小例子,可以循序渐进的一步步了解JavaCC技术。 二、 JavaCC概述   JavaCC全称为Java Compiler Compiler,它是一个生成器,用于生成词法分析器(lexical analysers)和语法分析器(parsers)。它可以通过读取一个词法和语法描述文件(即词法和语法描述是写在同一个文件中的),来生成一个ja....

windows下使用tail命令

tail.zip tail -f xxx.txt 

Solidity Language Grammar

https://solidity.readthedocs.io/en/v0.6.10/grammar.html // Copyright 2020 Gonçalo Sá <goncalo.sa@consensys.net> // Copyright 2016-2019 Federico Bond <federicobond@gmail.com> // Licensed under the MIT license. See LICENSE file in the project root for details. // This grammar is much less strict than what Solidity currently parses // to allow this to pass with older versions of Solidity. grammar Solidity; sourceUnit : (pragmaDirective | importDirective | structDefinition | enumDefiniti....

NetBeans Lexer API

词法分析器模块定义LexerAPI,以提供对各种输入源的token序列的访问。 API入口点是TokenHierarchy类,其静态方法为给定的输入源提供其实例。 输入源 TokenHierarchy可以被创建为不可变的输入源(CharSequence或java.io.Reader),也可以被创建为可变的输入源(典型的如javax.swing.text.Document) 对于可变输入源,词法分析器框架会自动对token层次结构中的token进行更新,并对底层文本输入进行后续更改。层次结构的token始终反映给定时间的输入文本。 TokenSequence和Token TokenHierarchy.tokenSequence()允许迭代Token实例列表。 Token带有Token标识TokenId(由Token.id()返回)和表示为CharSequence(由Token.text()返回)的文本(也称为Token主体)。 TokenUtilities包含许多与Token文本操作有关的有用方法,例如TokenUtilities.equals(CharSequence text,Obj....

【acuiconflux】NetBeans Project Type Module Tutorial

https://platform.netbeans.org/tutorials/nbm-projecttype.html This tutorial demonstrates how to create a new project type in a NetBeans Platform application.