public class Singleton { //单例设计模式,禁止指令重排可以加volatile private static Singleton singleton = null; private void Singleton() { System.out.println(Thread.cu ...
分类:
其他好文 时间:
2019-10-04 18:43:51
阅读次数:
106
1 /// <summary> 2 /// 提供计时器服务 3 /// </summary> 4 public class TimerService 5 { 6 private static TimerService _Instance = null; 7 8 public static Timer... ...
分类:
其他好文 时间:
2019-10-03 12:33:07
阅读次数:
108
private static string[] picAdd = new string[10]; private void button21_Click_1(object sender, EventArgs e) { Thread InvokeThread = new Thread(new Thre... ...
分类:
编程语言 时间:
2019-09-30 09:32:58
阅读次数:
118
package dijkstra; import java.util.ArrayList; public class Dijkstra { private static int N = 1000; /*private static int[][] Graph = { { 0, 1, 5, N, N,... ...
分类:
编程语言 时间:
2019-09-25 17:34:58
阅读次数:
107
1 import java.text.ParseException; 2 import java.text.SimpleDateFormat; 3 import java.util.Date; 4 5 public class DateUtil { 6 7 private static Simple... ...
分类:
编程语言 时间:
2019-09-24 21:14:31
阅读次数:
473
public class RedisPoolFactory { private static HashMap poolFactory = new HashMap(); public static JedisPool getPool(String hostname, int port) { Strin... ...
分类:
其他好文 时间:
2019-09-22 14:55:58
阅读次数:
81
// 自写逻辑,遍历所有匹配的子字符串坐标 private static void forMatchIdx(String str1, String str2) { char[] arr1 = str1.toCharArray(); char[] arr2 = str2.toCharArray(); ...
分类:
编程语言 时间:
2019-09-12 12:54:45
阅读次数:
71
<1>首先需要注册个第三方的账户,比如秒嘀科技等,然后拿到三个参数值:QUERAY_PATH ACCOUNT_SID AUTH_TOKEN<2>编写获取验证码类getMessage.java private static final String QUERAY_PATH="xxxx"; privat ...
分类:
移动开发 时间:
2019-09-10 18:13:23
阅读次数:
110
class SingLeton{ private static SingLeton inntleton = null; private ArrayList stlit = null; //私有构造函数 private SingLeton() { } public static SingLeton s ...
分类:
其他好文 时间:
2019-09-10 18:04:21
阅读次数:
74
一个简单的servlet例子,实现图片的上传功能,上传的图片给 ?HttpServletResponse 对象 public class BackGroundLogoServlet extends HttpServlet{ private static final Logger m_logger=L ...
分类:
Web程序 时间:
2019-09-10 18:03:56
阅读次数:
99