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
// https://github.com/laclefyoshi/test_featurefu/blob/master/src/test/java/org/saekiyoshiyasu/OperationTest.java | |
// assertEquals(expected, actual, delta) | |
assertEquals(evaluator("(== a b)", 1.2, 1.3), 0.0, 0); // false == 0.0 | |
assertEquals(evaluator("(== a b)", 2.5, 2.5), 1.0, 0); // true == 1.0 | |
assertEquals(evaluator("(!= a b)", 1.2, 1.3), 1.0, 0); | |
assertEquals(evaluator("(> a b)", 1.3, 1.3), 0.0, 0); | |
assertEquals(evaluator("(< a b)", 2.3, 2.5), 1.0, 0); | |
assertEquals(evaluator("(>= a b)", 1.3, 1.3), 1.0, 0); | |
assertEquals(evaluator("(<= a b)", 2.3, 2.5), 1.0, 0); | |
assertEquals(evaluator("(max a b)", 1.2, 1.3), 1.3, 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
tell application "iTunes" | |
activate | |
set newPreset to make new EQ preset | |
set name of newPreset to "Perfect" | |
set band 1 of newPreset to 3 | |
set band 2 of newPreset to 6 | |
set band 3 of newPreset to 9 | |
set band 4 of newPreset to 7 | |
set band 5 of newPreset to 6 | |
set band 6 of newPreset to 5 |
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
tell application "iTunes" | |
activate | |
set newPreset to make new EQ preset | |
set name of newPreset to "Eargasm Explosion" | |
set band 1 of newPreset to 3 | |
set band 2 of newPreset to 6 | |
set band 3 of newPreset to 9 | |
set band 4 of newPreset to 7 | |
set band 5 of newPreset to 6 | |
set band 6 of newPreset to 5 |
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
$ say -v \? | |
Agnes en_US # Isn't it nice to have a computer that will talk to you? | |
Albert en_US # I have a frog in my throat. No, I mean a real frog! | |
Alex en_US # Most people recognize me by my voice. | |
Bad News en_US # The light you see at the end of the tunnel is the headlamp of a fast approaching train. | |
Bahh en_US # Do not pull the wool over my eyes. | |
Bells en_US # Time flies when you are having fun. | |
Boing en_US # Spring has sprung, fall has fell, winter's here and it's colder than usual. | |
Bruce en_US # I sure like being inside this fancy computer | |
Bubbles en_US # Pull the plug! I'm drowning! |
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 msg = new SpeechSynthesisUtterance() | |
undefined | |
> msg | |
SpeechSynthesisUtterance {onboundary: null, onmark: null, onresume: null, onpause: null, onerror: null…} | |
lang: "" | |
onboundary: null | |
onend: null | |
onerror: null | |
onmark: null |
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
$ ./scalastyle.sh Documents/Projects/scala/URLHandle.scala | |
/Volumes/Macintosh HD/Users/yoshiyasu/Documents/Projects/scala/URLHandle.scala:45:2:warning: Whitespace at end of line | |
/Volumes/Macintosh HD/Users/yoshiyasu/Documents/Projects/scala/URLHandle.scala:35:16:warning: Avoid using null | |
/Volumes/Macintosh HD/Users/yoshiyasu/Documents/Projects/scala/URLHandle.scala:47:3:warning: Regular expression matched 'println' | |
/Volumes/Macintosh HD/Users/yoshiyasu/Documents/Projects/scala/URLHandle.scala:55:3:warning: Regular expression matched 'println' | |
/Volumes/Macintosh HD/Users/yoshiyasu/Documents/Projects/scala/URLHandle.scala:14:15:warning: Public method must have explicit type | |
/Volumes/Macintosh HD/Users/yoshiyasu/Documents/Projects/scala/URLHandle.scala:32:15:warning: Public method must have explicit type |
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
(defun flymake-scalastyle-init () | |
(let* ((temp-file (flymake-init-create-temp-buffer-copy | |
'flymake-create-temp-inplace)) | |
(local-file (file-relative-name | |
temp-file | |
(file-name-directory buffer-file-name)))) | |
(list "~/.local/bin/scalastyle.sh" (list local-file)))) | |
(add-to-list 'flymake-allowed-file-name-masks | |
'("\\.scala\\'" flymake-scalastyle-init)) | |
(add-hook 'scala-mode-hook |
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 | |
java -jar ~/.local/src/scalastyle-batch_2.10-0.3.2/scalastyle-batch_2.10.jar \ | |
--config ~/.local/src/scalastyle-batch_2.10-0.3.2/scalastyle_config.xml "$1" \ | |
| python -c \ | |
'import re | |
format = re.compile(r"^(\S+) +file=(.+?) +message=(.+?) +line=(\d+) +column=(\d+)$") | |
while True: | |
s = "" | |
try: |
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
$ java -jar ~/.local/src/scalastyle-batch_2.10-0.3.2/scalastyle-batch_2.10.jar \ | |
--config ~/.local/src/scalastyle-batch_2.10-0.3.2/scalastyle_config.xml \ | |
Documents/Projects/scala/URLHandle.scala | |
warning file=/Volumes/Macintosh HD/Users/yoshiyasu/Documents/Projects/scala/URLHandle.scala message=Header does not match expected text line=1 | |
warning file=/Volumes/Macintosh HD/Users/yoshiyasu/Documents/Projects/scala/URLHandle.scala message=Whitespace at end of line line=46 column=2 | |
warning file=/Volumes/Macintosh HD/Users/yoshiyasu/Documents/Projects/scala/URLHandle.scala message=Avoid using null line=36 column=16 | |
warning file=/Volumes/Macintosh HD/Users/yoshiyasu/Documents/Projects/scala/URLHandle.scala message=Regular expression matched 'println' line=48 column=3 | |
warning file=/Volumes/Macintosh HD/Users/yoshiyasu/Documents/Projects/scala/URLHandle.scala message=Regular expression matched 'println' line=56 column=3 | |
warning file=/Volumes/Macintosh HD/Users/yoshiyasu/Documents/Projects/scala/URLHandle.scala mes |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<property> | |
<name>jobTracker</name> | |
<value>master.saekiyoshiyasu.org:8021</value> | |
</property> | |
<property> | |
<name>nameNode</name> | |
<value>hdfs://master.saekiyoshiyasu.org:8020</value> | |
</property> |