正则表达式很好用但是不好记,为方便以后查询做个记录 public static class ValidatorHelper { #region 验证输入字符串为数字(带小数) /// <summary> /// 验证输入字符串为带小数点正数 /// </summary> /// <param nam ...
WPF的设计理念是:数据驱动,UI与逻辑松耦合 一、传统的CLR属性 public class Person { private string _Name; public string Name { get { return _Name; } set { _Name = value; } } } 二 ...
简介 对cmp的理解能力 常规题 code #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; struct Student{ int idx; int n ...
分类:
其他好文 时间:
2021-06-28 21:01:31
阅读次数:
0
一:普通方式、 1、keySet(): Map<String, Object> map = new HashMap<>(); map.put("name", "张三"); map.put("age", 20); for (String key : map.keySet()) { String val ...
分类:
编程语言 时间:
2021-06-28 20:40:37
阅读次数:
0
Given an integer array nums and an integer k, return the kth largest element in the array. Note that it is the kth largest element in the sorted order ...
分类:
其他好文 时间:
2021-06-28 20:35:29
阅读次数:
0
编写重载模板 1 #include <iostream> 2 #include <sstream> 3 #include <string> 4 using namespace std; 5 6 template <typename T> 7 string debug_rep(const T &t) ...
分类:
编程语言 时间:
2021-06-28 20:25:45
阅读次数:
0
Java面向对象复习 1.类像一个模板。 2.好的编程习惯会让代码看上去更清爽,易读,容易维护 比如类的第一个字母大写。 3.属性的类型可以是基本类型,比如int整数,float 浮点数 也可以是类类型,比如String 字符串。 4.属性名称一般来说,都是小写,比如name。 如果有多个单词组成, ...
分类:
编程语言 时间:
2021-06-28 19:50:59
阅读次数:
0
FileReader读取文件 查看文件的相对路径 示例一:查看文件的相对路径 package com.dreamcold.io; import java.io.File; public class Demo01 { public static void main(String[] args) { F ...
分类:
编程语言 时间:
2021-06-28 19:39:13
阅读次数:
0
throw 抛异常 throw new Exception('参数只能是数字') try...catch 异常 try { //抛异常的代码 } catch (Exception $e) { echo $e->getMessage(); } 实例 /src/TestException.php (抛异 ...
分类:
其他好文 时间:
2021-06-28 19:30:58
阅读次数:
0
1.需求 如果需要在集合中匹配出某个元素的序列,并返回这个元素在集合中出现的次数。 2.线性方式 在没有更好的算法策略之前,我们通常实现的方式如下: 1 List<string> dataList = new List<string>() { "张三","李四", "李四", "李四", "李四", ...
分类:
编程语言 时间:
2021-06-28 19:25:54
阅读次数:
0