This file contains hidden or 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 | |
set baseDir="C:\baseDir" | |
echo %baseDir% | |
TortoiseProc /command:update /path:%baseDir% | |
set RESULT=%ERRORLEVEL% |
This file contains hidden or 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
#!/bin/sh | |
sum=0 | |
while read line | |
do | |
sum=`expr $sum + $line` | |
done < num.txt |
This file contains hidden or 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 totalCount = 0; | |
var interval = 30000; | |
var delay = 3500; | |
var eachInterval = 1500; | |
function ajaxPolling(){ | |
$.ajax({ | |
url: "target url" | |
success:function(data){ | |
var eachCount = 0; |
This file contains hidden or 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
find dir -name '*.php' -print0 | xargs -0 -n1 -P8 php -l |
This file contains hidden or 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
#!/bin/sh | |
FILES=`find $1 -name \*.php` | |
for file in $FILES | |
do | |
php -l $file | |
done |
This file contains hidden or 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
foldr (+) 4 [1, 2, 3] -- 1 + (2 + (3 + 4)) == 10 | |
foldl (+) 1 [2, 3, 4] -- ((1 + 2) + 3) + 4 == 10 | |
1 + (2 + (3 + 4)) | |
(+) 1 (2 + (3 + 4)) | |
(+) 1 ((+) 2 ((+) 3 4)) | |
((1 + 2) + 3) + 4 | |
(+) ((1 + 2) + 3) 4 |
This file contains hidden or 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
elementAt :: [a] -> Int -> a | |
elementAt xs d = xs !! (d - 1) |
This file contains hidden or 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
myButLast :: [a] -> a | |
-- myButLast [] = | |
-- myButLast (x:y:[]) = x | |
myButLast [x,y] = x | |
myButLast (_:x:xs) = myButLast (x:xs) |
This file contains hidden or 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
myLast :: [a] -> Maybe a | |
myLast [] = Nothing | |
myLast (x:[]) = Just x | |
myLast (x:xs) = myLast xs | |
{- | |
myLast :: [a] -> a | |
-- myLast [] = | |
myLast (x:[]) = x | |
myLast (x:xs) = myLast xs |
This file contains hidden or 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
;; 1.1.2 | |
(define size 2) | |
(* 5 size) | |
(define pi 3.14159) | |
(define radius 10) | |
(* pi (* radius radius)) |