1 using System;
  2 using System.Collections.Generic;
  3 using System.Linq;
  4 using System.Text;
  5 using System.Data;
  6 using System.Security.Cryptography;
  7
  8 namespace HRPOWER.BLL
  9 {
 10     /// <summary>
 11     /// 业务逻辑层基类
 12     /// </summary>
 13     public class BaseClass
 14     {
 15         /// <summary>
 16         /// 屏幕宽度
 17         /// </summary>
 18         private static Decimal WidthPercent;
 19
 20         /// <summary>
 21         /// 屏幕高度
 22         /// </summary>
 23         private static Decimal HeightPercent;
 24
 25
 26         /// <summary>
 27         /// 根据列名字符串数组,创建自定义DataTable
 28         /// </summary>
 29         /// <param name="sList">列名字符串数组</param>
 30         /// <returns>DataTable</returns>
 31         public static DataTable CreateSelfDataTable(String[] sList)
 32         {
 33             DataTable _dtSelf = new DataTable();
 34
 35             foreach (String s in sList)
 36             {
 37                 _dtSelf.Columns.Add(s);
 38             }
 39             _dtSelf.AcceptChanges();
 40
 41             return _dtSelf;
 42         }
 43         /// <summary>
 44         /// 消息提示,默认为OK按键的Information提示信息
 45         /// </summary>
 46         /// <param name="sMessage">提示信息</param>
 47         /// <param name="sTitle">信息标题</param>
 48         /// <returns>DialogResult</returns>
 49         public static System.Windows.Forms.DialogResult DialogMessage(String sMessage, String sTitle)
 50         {
 51             return DialogMessage(sMessage,
 52                                  sTitle,
 53                                  System.Windows.Forms.MessageBoxButtons.OK,
 54                                  System.Windows.Forms.MessageBoxIcon.Information);
 55         }
 56         /// <summary>
 57         /// 消息提示,默认为OK按键的Information提示信息
 58         /// </summary>
 59         /// <param name="sMessage">提示信息</param>
 60         /// <param name="sTitle">信息标题</param>
 61         /// <param name="mbbButtons">MessageBoxButtons枚举</param>
 62         /// <returns>DialogResult</returns>
 63         public static System.Windows.Forms.DialogResult DialogMessage(String sMessage,
 64                                                                       String sTitle,
 65                                                                       System.Windows.Forms.MessageBoxButtons mbbButtons)
 66         {
 67             return DialogMessage(sMessage, sTitle, mbbButtons, System.Windows.Forms.MessageBoxIcon.Information);
 68         }
 69         /// <summary>
 70         /// 消息提示,默认为OK按键的Information提示信息
 71         /// </summary>
 72         /// <param name="sMessage">提示信息</param>
 73         /// <param name="sTitle">信息标题</param>
 74         /// <param name="mbbButtons">MessageBoxButtons枚举</param>
 75         /// <param name="mbiIcon">MessageBoxIcon枚举</param>
 76         /// <returns>DialogResult</returns>
 77         public static System.Windows.Forms.DialogResult DialogMessage(String sMessage,
 78                                                                       String sTitle,
 79                                                                       System.Windows.Forms.MessageBoxButtons mbbButtons,
 80                                                                       System.Windows.Forms.MessageBoxIcon mbiIcon)
 81         {
 82             return System.Windows.Forms.MessageBox.Show(sMessage, sTitle, mbbButtons, mbiIcon);
 83         }
 84         /// <summary>
 85         /// 加密一个字符串
 86         /// </summary>
 87         /// <param name="vStringToEncrypt">待要去加密的字符串</param>
 88         /// <returns>返回一个加密后的字符串</returns>
 89         public static String Encrypt(String vStrToEncrypt)
 90         {
 91             byte[] key = { };
 92             byte[] IV = { 10, 20, 30, 40, 50, 60, 70, 80 };
 93             byte[] inputByteArray;
 94             String vEncryptKey = "!@#$1234";
 95             try
 96             {
 97                 key = System.Text.Encoding.UTF8.GetBytes(vEncryptKey.Substring(0, 8));
 98                 DESCryptoServiceProvider des = new DESCryptoServiceProvider();
 99                 inputByteArray = System.Text.Encoding.UTF8.GetBytes(vStrToEncrypt);
100                 System.IO.MemoryStream ms = new System.IO.MemoryStream();
101                 CryptoStream cs = new CryptoStream(ms, des.CreateEncryptor(key, IV), CryptoStreamMode.Write);
102                 cs.Write(inputByteArray, 0, inputByteArray.Length);
103                 cs.FlushFinalBlock();
104
105                 return Convert.ToBase64String(ms.ToArray());
106             }
107             catch (System.Exception ex)
108             {
109                 throw ex;
110             }
111         }
112         /// <summary>
113         /// 对一进行加密的字符串进行解密
114         /// </summary>
115         /// <param name="vStringToDecrypt">待要去解密的字符串</param>
116         /// <returns>返回一个明文</returns>
117         public static String Decrypt(String vStrToDecrypt)
118         {
119             vStrToDecrypt = vStrToDecrypt.Trim().Replace(" ", "+");   //process blank char for the encrypt method.
120             byte[] key = { };
121             byte[] IV = { 10, 20, 30, 40, 50, 60, 70, 80 };
122             byte[] inputByteArray = new byte[vStrToDecrypt.Length];
123             String vDecryptKey = "!@#$1234";
124             try
125             {
126                 key = System.Text.Encoding.UTF8.GetBytes(vDecryptKey.Substring(0, 8));
127                 DESCryptoServiceProvider des = new DESCryptoServiceProvider();
128                 inputByteArray = Convert.FromBase64String(vStrToDecrypt);
129
130                 System.IO.MemoryStream ms = new System.IO.MemoryStream();
131                 CryptoStream cs = new CryptoStream(ms, des.CreateDecryptor(key, IV), CryptoStreamMode.Write);
132                 cs.Write(inputByteArray, 0, inputByteArray.Length);
133                 cs.FlushFinalBlock();
134
135                 System.Text.Encoding encoding = System.Text.Encoding.UTF8;
136                 return encoding.GetString(ms.ToArray());
137             }
138             catch (System.Exception ex)
139             {
140                 throw ex;
141             }
142         }
143         /// <summary>
144         /// 定义一个操作类型
145         /// ADD表示新增,EDIT表示修改,DEL表示删除
146         /// </summary>
147         public enum OperationType
148         {
149             ADD = 0,
150             EDIT = 1,
151             DEL = 2
152         }
153
154         /// <summary>
155         /// 定义照片类型
156         /// </summary>
157         public enum PictureSize
158         {
159             /// <summary>
160             /// 一代身份证
161             /// </summary>
162             ID_CARD1 = 1,
163
164             /// <summary>
165             /// 驾驶证
166             /// </summary>
167             DRIVER_CARD = 2,
168
169             /// <summary>
170             /// 护照
171             /// </summary>
172             PASSPORT_CARD = 3,
173
174             /// <summary>
175             /// 二代身份证
176             /// </summary>
177             ID_CARD2 = 4,
178
179             /// <summary>
180             /// 二代身份证背面,或类似尺寸证件的拍照使用
181             /// </summary>
182             ID_CARD2_BOTTOM = 5,
183
184             /// <summary>
185             /// 台胞证
186             /// </summary>
187             TAIWAN_CARD = 6,
188
189             /// <summary>
190             /// 港澳通行证
191             /// </summary>
192             HKMACAO_CARD = 7,
193
194             /// <summary>
195             /// 广东省居住证
196             /// </summary>
197             RESIDENCE_CARD = 9,
198
199             /// <summary>
200             /// 军官证
201             /// </summary>
202             ARMY_CARD = 103,
203
204             /// <summary>
205             /// 户口本
206             /// </summary>
207             HOUSEHOLD_CARD = 106
208         }
209
210         /// <summary>
211         /// 定义照片颜色类型
212         /// </summary>
213         public enum PictureColor
214         {
215             /// <summary>
216             /// 黑白照
217             /// </summary>
218             WHITEBLACK = 0,
219             /// <summary>
220             /// 彩色照
221             /// </summary>
222             FULLCOLOR = 1
223         }
224
225         /// <summary>
226         /// 定义绑定控件数据员类型
227         /// </summary>
228         public enum DataSourceType
229         {
230             /// <summary>
231             /// 表示DataTable形式的数据员
232             /// </summary>
233             DataCollection = 0,
234             /// <summary>
235             /// 表示Items形式数据员
236             /// </summary>
237             DataItems = 1
238         }
239         /// <summary>
240         /// 加载一个“请选择”值到Combobox控件
241         /// </summary>
242         /// <param name="dtSource">Combobox控件数据源</param>
243         /// <param name="sValue">ValueMember字段</param>
244         /// <param name="sDisplay">DisplayMember字段</param>
245         /// <returns></returns>
246         public static DataTable LoadInvalidValueToCombobox(DataTable dtSource, String sValue, String sDisplay)
247         {
248             DataRow _drNew = dtSource.NewRow();
249             _drNew[sValue] = 0;
250             _drNew[sDisplay] = "请选择";
251             dtSource.Rows.InsertAt(_drNew, 0);
252             dtSource.AcceptChanges();
253
254             return dtSource;
255         }
256         /// <summary>
257         /// 加载一个“全部单位”值到Combobox控件
258         /// </summary>
259         /// <param name="dtSource">Combobox控件数据源</param>
260         /// <param name="sValue">ValueMember字段</param>
261         /// <param name="sDisplay">DisplayMember字段</param>
262         /// <returns></returns>
263         public static DataTable LoadInvalidValueToCombobox1(DataTable dtSource, String sValue, String sDisplay)
264         {
265             DataRow _drNew = dtSource.NewRow();
266             _drNew[sValue] = 0;
267             _drNew[sDisplay] = "全部单位";
268             dtSource.Rows.InsertAt(_drNew, 0);
269             dtSource.AcceptChanges();
270
271             return dtSource;
272         }
273
274         /// <summary>
275         /// 验证字符串是否为正整数
276         /// </summary>
277         /// <param name="str"></param>
278         /// <returns></returns>
279         public static bool IsNumeric(string str)
280         {
281             System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex(@"^[0-9]*[1-9][0-9]*$");
282             return reg1.IsMatch(str);
283         }
284         /// <summary>
285         /// 验证字符串是否为0或正浮点类型
286         /// </summary>
287         /// <param name="str"></param>
288         /// <returns></returns>
289         public static bool isDouble(String str)
290         {
291             //正则表达式验证,返回一个bool类型
292             bool isReturn = false;
293
294             try
295             {
296                 System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex(@"^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$");
297                 if (reg1.IsMatch(str) == true || IsNumeric(str) == true) isReturn = true; ;
298             }
299             catch
300             {
301                 isReturn = false;
302             }
303
304             return isReturn;
305         }
306         /// <summary>
307         /// 验证固定电话号码
308         /// </summary>
309         /// <param name="str"></param>
310         /// <returns></returns>
311         public static bool isTel(String str)
312         {
313             System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex(@"^(\d{3,4}-)?\d{7,8}$");
314             return reg1.IsMatch(str);
315
316         }
317         /// <summary>
318         /// 验证手机号码
319         /// </summary>
320         /// <param name="str"></param>
321         /// <returns></returns>
322         public static bool isMobile(String str)
323         {
324             System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex(@"^[1][3-8]\d{9}$");
325             return reg1.IsMatch(str);
326
327         }
328         /// <summary>
329         /// 验证数字
330         /// </summary>
331         /// <param name="str"></param>
332         /// <returns></returns>
333         public static bool isNumber(String str)
334         {
335             System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex(@"^\d+$");
336             return reg1.IsMatch(str);
337
338         }
339         /// <summary>
340         /// 验证邮政编码
341         /// </summary>
342         /// <param name="str"></param>
343         /// <returns></returns>
344         public static bool isPost(String str)
345         {
346             System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex(@"^\d{6}$");
347             return reg1.IsMatch(str);
348
349         }
350         /// <summary>
351         /// 验证邮件地址
352         /// </summary>
353         /// <param name="str"></param>
354         /// <returns></returns>
355         public static bool isEmail(String str)
356         {
357             System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex(@"^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$");
358             return reg1.IsMatch(str);
359
360         }
361
362         /// <summary>
363         /// 验证IP地址
364         /// </summary>
365         /// <param name="str"></param>
366         /// <returns></returns>
367         public static bool isIP(String str)
368         {
369             return System.Text.RegularExpressions.Regex.IsMatch(str,
370                                                                 @"^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}$");
371         }
372
373         /// <summary>
374         /// 验证输入字符串只能为数字或字母
375         /// </summary>
376         /// <param name="str"></param>
377         /// <returns></returns>
378         public static bool IsNumberOrChar(String str)
379         {
380             return System.Text.RegularExpressions.Regex.IsMatch(str, "^([0-9]|[A-Z]|[a-z])+$");
381         }
382
383         //object类型转十进制
384         public static decimal ConvertoDecimal(object o)
385         {
386             decimal number = 0;
387             try
388             {
389                 if (o != null && o.ToString() != "")
390                     number = Convert.ToDecimal(o);
391
392             }
393             catch
394             {
395                 number = 0;
396             }
397
398             return number;
399         }
400
401         //判断是否字符串是否为日期类型
402         public static DateTime isDataTime(string strDate)
403         {
404             DateTime dtDate;
405
406             if (DateTime.TryParse(strDate, out dtDate))
407             {
408                 return Convert.ToDateTime(strDate);
409             }
410             else
411             {
412                 return Convert.ToDateTime("1753-1-1");
413             }
414
415         }
416
417
418         /// <summary>
419         /// 生成GUID码
420         /// </summary>
421         /// <returns></returns>
422         public static string getGUID()
423         {
424             System.Guid guid = new Guid();
425             guid = Guid.NewGuid();
426             string str = guid.ToString();
427             return str;
428         }
429         /// <summary>
430         /// 判断文件夹是否存在,不存在就创建
431         /// </summary>
432         /// <param name="sFileFolder">文件夹路径</param>
433         /// <returns>文件夹路径</returns>
434         public static string GetFileFolder(String sFileFolder)
435         {
436             if (!System.IO.Directory.Exists(sFileFolder))
437             {
438                 System.IO.Directory.CreateDirectory(sFileFolder);
439             }
440             return sFileFolder;
441         }
442         /// <summary>
443         /// 生成一个错误日志
444         /// </summary>
445         /// <param name="sErrMsg">错误信息</param>
446         public static void LogErrorLog(string sErrMsg)
447         {
448             String _sFolder = System.Configuration.ConfigurationManager.AppSettings["Error_Log"];
449
450             _sFolder = GetFileFolder(_sFolder);
451             String _sFile = String.Format("{0}{1}.txt", _sFolder, DateTime.Now.ToString("yyyyMMdd"));
452
453             System.IO.FileInfo _fiFile = new System.IO.FileInfo(_sFile);
454             System.IO.StreamWriter _swTxt;
455
456             if (!_fiFile.Exists)
457             {
458                 _swTxt = _fiFile.CreateText();
459             }
460             else
461             {
462                 _swTxt = _fiFile.AppendText();
463             }
464
465             _swTxt.WriteLine(String.Format("{0}-----{1}", DateTime.Now.ToString("HH:mm:ss"), sErrMsg));
466             _swTxt.Close();
467         }
468
469         Boolean isFind = false;                 //查找文件是否找到标识位
470         /// <summary>
471         /// 查找指定文件,返回查找文件路径
472         /// </summary>
473         /// <param name="sFileName">待查找的文件名</param>
474         /// <returns>返回查找文件路径</returns>
475         public static String SearchFile(String sFileName)
476         {
477             System.IO.DriveInfo[] driList = System.IO.DriveInfo.GetDrives();
478             BaseClass _bc = new BaseClass();
479
480             String _sFileName = String.Empty;
481
482             foreach (System.IO.DriveInfo dri in driList)
483             {
484                 _sFileName = _bc.FindFile(dri.RootDirectory, sFileName);
485                 String _tmp = _sFileName.Substring(_sFileName.LastIndexOf(@"\") + 1);
486
487                 if (_tmp == sFileName)
488                 {
489                     break;
490                 }
491             }
492
493             return _sFileName;
494         }
495
496         private String FindFile(System.IO.DirectoryInfo diDirectory, String sFileName)
497         {
498             String sFindFile = String.Empty;
499             try
500             {
501                 foreach (System.IO.FileInfo fi in diDirectory.GetFiles())
502                 {
503                     if (fi.Name == sFileName)
504                     {
505                         sFindFile = fi.FullName;
506                         isFind = true;
507                         break;
508                     }
509                 }
510
511                 foreach (System.IO.DirectoryInfo di in diDirectory.GetDirectories())
512                 {
513                     if (!isFind)
514                         sFindFile = FindFile(di, sFileName);
515                     else
516                         break;
517                 }
518             }
519             catch
520             {
521                 throw new System.IO.FileNotFoundException("文件不能找到");
522             }
523
524             return sFindFile;
525         }
526         /// <summary>
527         /// 根据屏幕分辨率自动调整控件位置与大小
528         /// </summary>
529         /// <param name="cContainer">要调整的控件</param>
530         /// <param name="ScreenWidth">当前显示器分辨率宽度</param>
531         /// <param name="ScreenHeight">当前显示器分辨率高度</param>
532         public static void AutoChangeControlSizeByScreen(System.Windows.Forms.Control cContainer,
533                                                          int ScreenWidth,
534                                                          int ScreenHeight)
535         {
536             cContainer.SuspendLayout();
537             //显示屏大于1280或1024不处理
538             if (ScreenWidth > 1280 || ScreenHeight > 1024)
539             {
540                 WidthPercent = 1;
541                 HeightPercent = 1;
542             }
543             else
544             {
545                 WidthPercent = Math.Round((decimal)ScreenWidth / 1280, 4);
546                 HeightPercent = Math.Round((decimal)ScreenHeight / 1024, 4);
547             }
548             //处理传过来控件本身等比缩放
549             cContainer.Left = (int)Math.Ceiling((decimal)cContainer.Left * WidthPercent);
550             cContainer.Top = (int)Math.Ceiling((decimal)cContainer.Top * HeightPercent);
551             cContainer.Width = (int)Math.Ceiling((decimal)cContainer.Width * WidthPercent);
552             cContainer.Height = (int)Math.Ceiling((decimal)cContainer.Height * HeightPercent);
553             ChangeControl(cContainer);
554             cContainer.ResumeLayout();
555         }
556
557         private static void ChangeControl(System.Windows.Forms.Control cContainer)
558         {
559             foreach (System.Windows.Forms.Control c in cContainer.Controls)
560             {
561                 c.Left = (int)Math.Ceiling((decimal)c.Left * WidthPercent);
562                 c.Top = (int)Math.Ceiling((decimal)c.Top * HeightPercent);
563                 c.Width = (int)Math.Ceiling((decimal)c.Width * WidthPercent);
564                 c.Height = (int)Math.Ceiling((decimal)c.Height * HeightPercent);
565                 c.Font = new System.Drawing.Font("微软雅黑", c.Font.Size * (float)((HeightPercent + WidthPercent) / 2));
566
567                 if (c.HasChildren)
568                 {
569                     ChangeControl(c);
570                 }
571             }
572         }
573
574         /// <summary>
575         /// 统一设置字体为微软雅黑12pt
576         /// </summary>
577         /// <param name="cContainer">要调整的控件</param>
578         public static void ChangeFont(System.Windows.Forms.Control cContainer)
579         {
580             foreach (System.Windows.Forms.Control c in cContainer.Controls)
581             {
582                 c.Font = new System.Drawing.Font("微软雅黑", 12);
583                 if (c.HasChildren) ChangeFont(c);
584             }
585         }
586
587         /// <summary>
588         /// 判断文件夹是否存在,不存在创建
589         /// 同时返回文件夹路径
590         /// </summary>
591         /// <param name="sFolderPath">文件夹绝对路径</param>
592         /// <returns></returns>
593         public static String IsFolderExist(String sFolderPath)
594         {
595             if (System.IO.Directory.Exists(sFolderPath) == false)
596             {
597                 System.IO.Directory.CreateDirectory(sFolderPath);
598             }
599             return sFolderPath;
600         }
601
602         /// <summary>
603         /// 导出Excel的文件名称
604         /// </summary>
605         /// <param name="titleName">导出标题名称</param>
606         /// <param name="suffixName">导出序列号(SN)</param>
607         /// <returns></returns>
608         public static String ExcelFileName(String titleName, String suffixName)
609         {
610             String strName;
611             if (String.IsNullOrEmpty(suffixName))
612             {
613                 strName = DateTime.Now.ToString("yyyyMMdd_HHmmss") + "_" + titleName;
614             }
615             else
616             {
617                 strName = DateTime.Now.ToString("yyyyMMdd_HHmmss") + "_" + titleName + "_" + suffixName;
618             }
619             return strName;
620         }
621
622         /// <summary>
623         /// 导出Excel的文件名称
624         /// </summary>
625         /// <param name="titleName">导出标题名称</param>
626         /// <returns></returns>
627         public static String ExcelFileName(String titleName)
628         {
629             return ExcelFileName(titleName, String.Empty);
630         }
631     }
632 }

View Code

新增:

1、字符串转数组

 /// <summary>/// 包含“,”的字符串转数组/// </summary>/// <param name="str"></param>/// <returns></returns>public string[] mArray(string str){string[] mMsg;if (str.IndexOf(',') != -1){mMsg = str.Split(',');}else{mMsg = new string[1];mMsg[0] = str;}return mMsg;}

View Code

2、自定义数组

/// <summary>
/// 根据列名字符串数组,创建自定义DataTable
/// </summary>
/// <param name="sList">列名字符串数组</param>
/// <returns>DataTable</returns>
public static DataTable CreateSelfDataTable(String[] sList)
{
DataTable _dtSelf = new DataTable();  foreach (String s in sList)
{
_dtSelf.Columns.Add(s);
}
_dtSelf.AcceptChanges();  return _dtSelf;
} 

View Code

3、临时创建一个表

  private static DataTable CreatTable(){DataTable dtSource = new DataTable();dtSource.Columns.Add("NAME", typeof(string));dtSource.Columns.Add("DisMembers", typeof(string));//一百万行数据for (int i = 0; i < 1000000; i++){DataRow dr = dtSource.NewRow();dr["NAME"] = i;dr["DisMembers"] = i;dtSource.Rows.Add(dr);}dtSource.AcceptChanges();return dtSource;}

View Code

转载于:https://www.cnblogs.com/markli/p/5525527.html

WinForm BaseClass类常用通用方法相关推荐

  1. java的知识点15——String基础、String类和常量池、String类常用的方法、字符串相等的判断、组合模式

    String基础 1. String类又称作不可变字符序列. 2. String位于java.lang包中,Java程序默认导入java.lang包下的所有类. 3. Java字符串就是Unicode ...

  2. java map常用类及其方法_Day50.Map类常用的方法 -Java常用类、集合#、IO

    Day50.Map类常用的方法 -Java常用类.集合#.IO Day50.Map类常用的方法 -Java常用类.集合#.IO Map类常用的方法 . 总结: 常用方法 添加: put(Object ...

  3. java String类常用的方法

    package Day0310.Demo02;public class StringTest02 {public static void main(String[] args) {System.out ...

  4. Vector3类常用的方法

    Vector3类 在Unity中,和向量有关的类有Vector2.Vector3.Vector4,分别对应不同维度的向量,其中 Vector3的使用最为广泛. 1.成员变量和方法 Vector3类的常 ...

  5. Python 类常用各种方法及区别

    Python中至少有三种比较常见的方法类型,即实例方法,类方法.静态方法.它们是如何定义的呢?如何调用的呢?它们又有何区别和作用呢?且看下文. 首先,这三种方法都定义在类中.下面我先简单说一下怎么定义 ...

  6. 处理String类常用的方法1

    public class Dome{public static void main(String[] args) {char[] ch=new char[] {'你','你','你'};String ...

  7. File类常用的方法以及

    File类和流无关,不能完成文件的读取 File是文件和目录路径名的抽象表示形式--代表的是硬盘上的Directory(目录)和file(文件) public static void main(Str ...

  8. FIle类常用工具方法整理(持续更新)

    1.递归遍历一个目录,获取所有文件名(也可以取到绝对路径) public static void traverse(String filePath, List<String> files) ...

  9. GO 语言常用工具类-通用方法集合

    GO 语言常用工具类-通用方法集合 github: https://github.com/gitstliu/go-commonfunctions 1. PanicHandler 通用Panic处理器 ...

最新文章

  1. pandas读取文件
  2. 熔断,限流,降级 一些理解
  3. Map字符串类型去掉空格处理
  4. C++中用new和不用new定义类的对象的区别解答
  5. linux 搜索 空格,如何在Linux中搜索带有空格的模式的文件
  6. 阿里云安全肖力:从RSA2019看安全技术发展的十个机遇
  7. Quest Recovery Manager for Active Directory的使用(一)
  8. 【亚伦博客】反方观点: 下载不是偷窃
  9. IM开发通信协议基础知识(一)---TCP、UDP、HTTP、SOCKET
  10. php 调用redfish,Huawei iBMC 通过redfish接口设置KVM key登录html5远程控制台操作记录
  11. 【工业大数据】35页PPT讲解:工业大数据特点、价值及其计算
  12. 迭代法动态生成谢尔宾斯基三角形
  13. java 发送邮件 ip被网易拉黑,发信IP或者发件人地址被网易加入了黑名单,原因如下及解决方法!...
  14. 常见的化学测试有哪些?--CPSIA、ROHS、REACH、FDA检测、加州65
  15. 产品设计思维导图模板
  16. hyper-v上安装群晖DSM5提示格式化磁盘失败解决方法
  17. 前端导出Excel并下载到本地
  18. jdk历史版本下载地址
  19. 弄懂了采矿业与碳中和的逻辑,就读懂了矿区无人驾驶的千亿市场
  20. react-native入门之手势响应系统

热门文章

  1. 代码质量静态检查工具
  2. 人工智能时代企业获客仅需一键即可完成拓客操作,批量获取信息
  3. Cannot create a generic array of ArrayListDog
  4. Origin_正态检验以及频率统计
  5. Arduino—— 4*4按键
  6. 手机的这些功能,你有了解过吗?
  7. python正则表达式,向前向后查找与回溯引用
  8. S32K3定时器(STMPIT)使用——基于MCAL
  9. 林曦讲座 | 关于“无用之美”的11个闪光
  10. 订货管理系统的6大特色功能