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
private static int[] intersect_int_array(int[] array1, int[] array2) { | |
java.util.Arrays.sort(array1); | |
java.util.Arrays.sort(array2); | |
IntList res = new IntList(); | |
for(int index2 = 0, index1 = 0; index2 < array2.length && index1 < array1.length; ) { | |
if (array1[index1] > array2[index2]) { | |
index2 ++; | |
} else if (array2[index2] > array1[index1]) { | |
index1 ++; |
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
require 'cgi' | |
require 'digest/md5' | |
require 'net/https' | |
require 'uri' | |
module Jekyll | |
class GistTag < Liquid::Tag | |
def initialize(tag_name, text, token) | |
super | |
@text = text |
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
open 192.168.100.98 | |
Anonymous | |
bin | |
prompt | |
cd code\CN | |
pwd | |
get xxx.jar | |
get yyy.jar |
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
echo %PATH% | |
@echo off | |
@echo ======================================================== | |
@echo 从ftp上下载最新code jar包,并上传到svn | |
@echo ======================================================== | |
set DOWNLOAD_HOME=.\ | |
set ENV_HOME=C:\apache-tomcat-5.5.23\webapps\TestCase | |
if exist DOWNLOAD_HOME goto :update else goto :fail |
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
@echo off | |
net stop "Tomcat5" | |
ping 127.0.0.1 -n 5 | |
net start "Tomcat5" | |
@echo "Tomcat restart..." |
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
repos = WScript.Arguments.Item(0) | |
rev = WScript.Arguments.Item(1) | |
svnlook = WScript.Arguments.Item(2) | |
hudson = WScript.Arguments.Item(3) | |
Set shell = WScript.CreateObject("WScript.Shell") | |
Set uuidExec = shell.Exec(svnlook & " uuid " & repos) | |
Do Until uuidExec.StdOut.AtEndOfStream | |
uuid = uuidExec.StdOut.ReadLine() |
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
SET REPOS=%1 | |
SET REV=%2 | |
SET CSCRIPT=C:\WINDOWS\system32\cscript.exe | |
SET VBSCRIPT=E:\Document\hooks\post-commit-hook-hudson.vbs | |
SET SVNLOOK=E:\opt\Subversion\bin\svnlook.exe | |
SET HUDSON=http://xxx.x.x.xxx/hudson/job/code%E6%9E%84%E5%BB%BA%E5%92%8C%E5%8D%95%E5%85%83%E6%B5%8B%E8%AF%95/ | |
"%CSCRIPT%" "%VBSCRIPT%" "%REPOS%" %REV% "%SVNLOOK%" "%HUDSON%" |
NewerOlder