乙個例子,每日自動更新norton病毒庫的
bat檔案
dir e:/software/symantec/viruslib/sy*.exe
pause
ftp -s:cescript.txt
rem "e:/software/symantec/viruslib/symcdefsx86.exe" /q
copy e:/software/symantec/viruslib/symcdefsx86.exe e:/software/symantec/viruslib/symcdefsx86_yesterday.exe
del /q "e:/software/symantec/viruslib/symcdefsx86.exe"
ftp指令碼檔案
open ftp.symantec.com
anonymous
nobody@spammer.com
手寫乙個單例
在面試過程中,經常會碰見讓自己寫乙個單列,在這邊寫兩個僅供參考 第一種,也是最簡單的,使用靜態方法建立唯一的例項,餓漢式 public class demo 提供乙個獲取例項的靜態方法 public static user getusr public static void main string ...
乙個彙編簡單樣例
int i,m u 0 for i 1 ireturn m u a0,n a1 i a0,s1 m max lw s1,0 a0 m u 0 addi s0,zero,l i l slt to,s0,a1 ibeq to,zero,exit sll t1,so,2 i 4 int 4位元組 add ...
貼上乙個mock小樣例
主要關於什麼時候用retun value,什麼時候用side effect class account list a 1,2,3,4,5,6,7,8,9 defget account self return len self.list a def mock get account side effe...