private void txtMaxCount_TextChanged(object sender, EventArgs e) { //替换非数字 this.txtMaxCount.Text = Regex.Replace(this.txtMaxCount.Text, @"[^\d]*", "") ...
经常忘记 static 代码块 反正如果你有调用(进入到) 他的类中他就执行.. a.java: public class a { public static void main(String[] args) { b.fun(); } } b.java: public class b { stati ...
分类:
编程语言 时间:
2021-06-05 18:04:20
阅读次数:
0
方法: 1、定义临时变量 2、不用定义临时变量 3、使用位运算符 public class SwapTest { public static void main(String[] args) { int num1 = 10; int num2 = 20; //方式一:定义临时变量的方式 //推荐使用 ...
分类:
编程语言 时间:
2021-06-05 18:02:27
阅读次数:
0
一、数组扁平化 有数组:let arr = [[2, 3, 1],[4, 3, 6, 5],[6, 2, 4, 9, [4, 11, 12, [12, 13, [10], 15]]], 20]1. reduce //若值为数组则递归遍历,否则concat function flatten(arr) ...
分类:
编程语言 时间:
2021-06-05 17:40:20
阅读次数:
0
namespace TestQuestionaire { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void bt_ok_Click(object sender, Eve ...
总纲:循序渐进、不急不躁、找到根因 1、Attributerror: Session object has no attribute 'watchers' 出现场景:在Jenkins用例编写时,出现以上问题提示。 程序之前都是正常的,周五升级了uiautomator2、weditor、pytest的 ...
分类:
其他好文 时间:
2021-06-04 19:23:03
阅读次数:
0
现有对象obj和空对象copy,想将obj的每一项都复制到copy对象中 let obj = { name:'aaa', age: 18 } let copy = {} 方法1:使用for...in... for(let key in obj){ copy[key] = obj[key] } con ...
分类:
其他好文 时间:
2021-06-04 19:11:44
阅读次数:
0
类型转换 publicclassdemo06 { publicstaticvoidmain(String[] args) { inti=128; byteb= (byte)i;//内存溢出 byte 最大值127 //低 高 //byte,short,char,int,long,float,doub ...
分类:
其他好文 时间:
2021-06-04 19:00:16
阅读次数:
0
Hello World 随便建一个文件夹,存放代码 新建一个java文件 文件后缀名.java Hello 【注意点】系统没有显示文件后缀名,需要手动打开 编写代码 public class Hello{ public static void main(String[] args){ System. ...
分类:
其他好文 时间:
2021-06-04 18:59:52
阅读次数:
0
单例模式 https://www.cnblogs.com/restartyang/articles/7770856.html 定义:保证一个类只有一个实例,并提供一个访问它的全局访问点 适用场景: 当一个类只有一个实例而客户可以从一个众所周知的访问点访问它时 频繁访问数据库或文件的对象。 需要频繁实 ...
分类:
其他好文 时间:
2021-06-03 18:07:15
阅读次数:
0