经常忘记 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
create database zuoye; -- 创建数据库 use zuoye; -- 使用数据库 #创建几个库表 create table Student -- 学生表 ( Sno char(3) NOT NULL Primary key , -- 学号 ,设为主键,不允许空值 Sname c ...
分类:
数据库 时间:
2021-06-05 17:46:33
阅读次数:
0
1.学生信息处理 代码如下: (全部手敲了一遍累到自己了,就没有加很多注释.....) 1 #include <stdio.h> 2 #include <string.h> 3 #define N 3 4 typedef struct student{ 5 int num; //学号 6 char ...
分类:
其他好文 时间:
2021-06-05 17:45:16
阅读次数:
0
通过stat函数获取文件的大小,单位bytes;无需将文件读入内存,可以计算大文件; #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <stdio.h> int stat(const char *pa ...
分类:
编程语言 时间:
2021-06-05 17:44:27
阅读次数:
0
一、概念 正则表达式是一种文本处理工具,通常用来检索、替换某个符合规则或者模式的文本。 二、字符串中的使用 1.通过String的matches()方法可以验证一个字符串是否匹配某个正则表达式(返回值,boolean),常用于检查某个字符串是否符合特定规则。 2.split()方法可以将字符串从正则 ...
分类:
编程语言 时间:
2021-06-05 17:43:19
阅读次数:
0
WPF public void DataGridBinDingTime(){ List<string> times = new List<string>(); string time = _startTime.SelectedValue.ToString(); string[] arr = time ...
分类:
其他好文 时间:
2021-06-05 17:34:23
阅读次数:
0
一、int、string、list这些基本类型的大小比较都是基于如下方法实现:__lt__;__gt__;__le__;__ge__;__eq__;__nq__,同理,类要实现比较功能需要实现这些方法 二、使用装饰器functools.total_ordering可以简化上诉实现的方法 三、实例: ...
分类:
其他好文 时间:
2021-06-04 19:54:04
阅读次数:
0
namespace TestQuestionaire { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void bt_ok_Click(object sender, Eve ...
思路:把每一个k阶看成一个3*3的网格,计算出点到每层(0,0)的距离,递归求出下一阶n-1的距离。 #include"stdio.h" #include"math.h" #include"string.h" #include"iostream" #include"algorithm" using ...
分类:
其他好文 时间:
2021-06-04 19:40:06
阅读次数:
0