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 WshShell = WScript.CreateObject("WScript.Shell"); | |
WshShell.Run("control mmsys.cpl"); | |
wait("サウンド") | |
WshShell.SendKeys("{DOWN " + | |
WScript.Arguments.item(0) + | |
"}%{s}{TAB 3}{ENTER}"); | |
WshShell.Run('restart.bat TrayVolume.exe "C:\\Program Files (x86)\\TrayVolume\\TrayVolume.exe"'); |
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
REM @echo off | |
tasklist | findstr %1 | |
if errorlevel 1 goto START | |
if errorlevel 0 taskkill /f /im %1 | |
:START | |
start "" %2 |
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
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<script type="text/javascript" src="./flashobject.js"> | |
</script> | |
<style type="text/css"> | |
/* hide from ie on mac \*/ | |
html { |
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 blockNo = '47662'; | |
var now = new Date(); | |
location.href = 'http://www.data.jma.go.jp/obd/stats/etrn/view/hourly_s1.php?block_no=' | |
+ blockNo | |
+ '&year=' | |
+ now.getFullYear() | |
+ '&month=' | |
+ (now.getMonth() + 1) | |
+ '&day=' | |
+ (now.getDate() - 1).toString() |
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
class Person | |
include Comparable | |
attr_reader :name , :age | |
def initialize(name,age) | |
@name = name | |
@age = age | |
end | |
def <=>(other) | |
cmp = @age <=> other.age | |
if cmp != 0 |
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
data List a = Nil | |
| Cons a (List a) | |
deriving Show | |
xs = Cons 1 (Cons 2 (Cons 3 Nil)) | |
reduceList f z Nil = z | |
reduceList f z (Cons x xs) = f x (reduceList f z xs) | |
idList = reduceList Cons Nil |
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
fact'cps n k | n == 0 = k 1 | |
| otherwise = fact'cps (n-1) (\x -> k (n * x)) |
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
fib n | n == 0 = 0 | |
| n == 1 = 1 | |
| otherwise = fib (n-1) + fib (n-2) | |
fib'cps n k | n <= 1 = k n | |
| otherwise = fib'cps (n-1) $ \x -> | |
fib'cps (n-2) $ \y -> | |
k $ x + y |
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
-- 普通の足し算、かけ算、引き算 | |
add x y = x + y | |
mul x y = x * y | |
sub x y = x - y | |
-- x y の値を元に計算を行い、その結果に対して関数 k を適用する。 | |
add'cps x y k = k $ x + y | |
mul'cps x y k = k $ x * y | |
sub'cps x y k = k $ x - y |
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
foldr3' _ z [] p k _ = k z | |
foldr3' f'cps z (x:xs) p k k' | |
| p x = k' x | |
| otherwise = f'cps x (foldr3' f'cps z xs p k k') $ \y -> k y | |
main = do print $ foldr3' (\x y k -> k $ x ++ y) [] | |
[[1,2],[3,4],[5,6]] (== []) id id | |
print $ foldr3' (\x y k -> k $ x ++ y) [] | |
[[1,2],[3,4],[],[5,6]] (== []) id id |