摘要:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Threading; using System.Timers; namespace TestJobs { class Progra... 阅读全文
摘要:
//去除非数字 var clearNoNum = function (item) { if (item!=null && item!=undefined) { //先把非数字的都替换掉,除了数字和. item = item.replace(/[^\d.]/g, ""); //必须保证第一个为数字而不是... 阅读全文
摘要:
当年面试一家公司,面试官问我:一个int类型的数组怎么获取里面第二大的数字? 给了我一张纸和一支笔让我写一个方法,我想了想便写了一个方法: 然后问我能不能优化一下你的代码,我当然回答可以了,尴尬的就是我想了半天也想不出来,当时脑子一片空白........; 最后无奈的说:可以优化,但是我现在想不到! 阅读全文
摘要:
创建一个学生类: 创建一个处理数据的类: 运行: 结果stu中的int类型数据增加1,string类型数据追加字符"123"; 阅读全文
摘要:
引用添加Json.Net 引用命名空间 using Newtonsoft.Json //读取自定目录下的json文件 StreamReader sr = new StreamReader(@"D:\xxx.json"); string json = sr.ReadToEnd(); //json文件转 阅读全文
摘要:
//字符串转bytes var ebytes = System.Text.Encoding.Default.GetBytes(keyWord); //bytes进行base64加密 var strBase64 = Convert.ToBase64String(ebytes); //base64字符转 阅读全文
摘要:
引用命名空间 using System.Drawing;using System.Drawing.Drawing2D;using System.Drawing.Imaging;using System.IO; 生成方法 /// <summary>生成验证码 /// </summary> /// <r 阅读全文