#region 生成随机字符串 /// <summary> /// 生成随机字符串 /// </summary> /// <param name="length">字符串的长度</param> /// <returns></returns> public static string CreateRa ...
#region Unicode 转中文 /// <summary> /// Unicode 转中文 /// </summary> /// <param name="text"></param> /// <returns></returns> public static string UnicodeT ...
经常忘记 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
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
一、概念 正则表达式是一种文本处理工具,通常用来检索、替换某个符合规则或者模式的文本。 二、字符串中的使用 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