This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myVar = setInterval(function(){ window.scrollBy(0, 300) }, 800); | |
clearTimeout(myVar); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************************* | |
* * | |
* EJBCA: The OpenSource Certificate Authority * | |
* * | |
* This software is free software; you can redistribute it and/or * | |
* modify it under the terms of the GNU Lesser General Public * | |
* License as published by the Free Software Foundation; either * | |
* version 2.1 of the License, or any later version. * | |
* * | |
* See terms of license at gnu.org. * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cn.liveworks.dev.util; | |
import org.springframework.beans.BeansException; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.ApplicationContextAware; | |
/** | |
* must have this config | |
* <bean id="auth_contextApplicationContextProvider" | |
* class="com.wangyin.ssoclient.sso.util.ApplicationContextProvider"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function comparever(var1, var2){ | |
var iret = 0; | |
var var1splitlist = var1.split("."); | |
//var ver1splitlen = ver1split.length; | |
var var2splitlist = var2.split("."); | |
var comparelen = var1splitlist.length > var2splitlist.length ? var1splitlist.length : var2splitlist.length; | |
for(var n=0; n<comparelen; n++){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BOOL CWyPassEdit::IsAdministrator() | |
{ | |
//判断是否管理员模式 | |
BOOL bIsElevated = FALSE; | |
HANDLE hToken = NULL; | |
UINT16 uWinVer = LOWORD(GetVersion()); | |
uWinVer = MAKEWORD(HIBYTE(uWinVer),LOBYTE(uWinVer)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void IDispatchInvoke() | |
{ | |
// TODO: Add your implementation code here | |
::CoInitialize(NULL); // COM 初始化 | |
CLSID clsid; // 通过 ProgID 得到 CLSID | |
HRESULT hr = ::CLSIDFromProgID(L"Ctrl.1", &clsid); | |
//ASSERT(SUCCEEDED(hr)); // 如果失败,说明没有注册组件 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static { | |
if (Security.getProvider("BC") == null) { | |
Security.addProvider(new BouncyCastleProvider()); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.out.println(new BigInteger(16 * 8, new Random()).toString(16)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
## repo default configuration | |
## | |
from __future__ import print_function | |
REPO_URL = 'https://gerrit.googlesource.com/git-repo' | |
REPO_REV = 'stable' | |
# Copyright (C) 2008 Google Inc. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static boolean readInnerZipFile(String oriZipFile,String | |
innerZipFileEntryName, String outZipFileEntryName) { | |
ZipFile innerZipFile = null; | |
try { | |
innerZipFile = new ZipFile(oriZipFile); | |
Enumeration entries = innerZipFile.entries(); | |
ZipEntry entryIn = null; | |
while (entries.hasMoreElements()) { | |
ZipEntry entry = entries.nextElement(); | |
// System.out.println(entry); |
NewerOlder