/**饿汉模式 */public class EagerSingleton { private
static EagerSingleton eagerSingleton=new EagerSingleton(); private
EagerSingleton() { supe...
分类:
其他好文 时间:
2014-05-17 01:16:23
阅读次数:
246
一、日期转换为字符串1.日期以特定的格式输出: //
创建日期并转换为yyyy-MM-dd格式_(MM一定要大写,以免与hh:mm:ss中的mm冲突) SimpleDateFormat sdf = new
SimpleDateFormat("yyyy-MM-dd"); String dat...
分类:
编程语言 时间:
2014-05-17 00:05:30
阅读次数:
331
(1)查看用户的连接状况select username,sid,serial# from
v$session------------------------------------------如下结果:username sid
serial#-----------------------------...
分类:
其他好文 时间:
2014-05-16 23:44:56
阅读次数:
367
// popupWindow自适应大小 popupWindow = new
PopupWindow(view, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); //
设置PopupWindow的大小(宽度和高度) // 高度和宽度为屏幕的...
1.安装soap扩展2.安装openssL3.代码执行function
issure($sn){//通过soap链接接口 进行确认是否是正确的sn码 try{ $client = new
SoapClient("https://112.122.122.22/gethtcpro.asmx?wsdl",...
分类:
Web程序 时间:
2014-05-16 22:29:01
阅读次数:
435
public static string GetHttpResponse(string url) {
string content = ""; // Create a new HttpWebRequest object.Make sure that // a
default proxy is se....
分类:
其他好文 时间:
2014-05-16 21:43:22
阅读次数:
360
轨道力学中二体问题下求解兰伯特方程需要解决一个迭代问题。这是一个老外写的,有很多注释,相信大家应该能看懂,经实际检测,切实可用function
[v1,v2]=solve_lambert(r1,r2,t,GM,lw,N,branch)%This routine implements a new
al...
分类:
其他好文 时间:
2014-05-16 20:36:40
阅读次数:
1531
string strPatten = "(src|href)=(.*?)[>| ]";
string strContent = " "; Regex reg = new Regex(strPatten); foreach (Match match
in...
分类:
其他好文 时间:
2014-05-16 20:00:47
阅读次数:
266
辗转相除,又名欧几里德算法(Euclidean
algorithm)乃求两个正整数之最大公约数的算法。此处用函数的递归调用编写了一个小程序:int gcd(int a,int b){ if(a%b==0)
return b; else return gcd(b,a%b)...
分类:
其他好文 时间:
2014-05-14 10:20:27
阅读次数:
241
检测浏览器是否支持WebSocket var WebSocketsExist = true;
try { var dummy = new WebSocket("ws://localhost:8989/test"); } catch (ex) { try
{ ...
分类:
Web程序 时间:
2014-05-14 09:29:12
阅读次数:
401