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
start with an array of unlimited size all intialized to 0and the curser point to 0. | |
with a input stream and output stream. | |
>: move cursor to next position | |
<: move cursor to last position | |
+: add 1 to current position | |
-: minus 1 to current position | |
[: if current position is 0, jump to paired ], otherwise execute next line | |
]: if current position is non-0, scroll back to paired [, otherwise execute next line | |
.: output current position to the output stream (usually ASCII encoding) |
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
package com; | |
import java.lang.invoke.MethodHandles; | |
public abstract class TestStatic { | |
private static Class classInstance = MethodHandles.lookup().lookupClass(); | |
public Class getClassInstance() { | |
return classInstance; | |
} |
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
『to U』 Bank Band with Salyu | |
https://www.youtube.com/watch?v=6iDgE2a45SI | |
日文歌詞: | |
ike no mizu ga kagami mitai ni sora no ao no iro wo maneteru | |
池の水が鏡みたいに空の蒼の色を真似てる | |
池塘中的水彷彿鏡子一般,映照著天空那一片蔚藍 |
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
def parallelExecute(List<Closure> executions) { | |
def results = [] | |
def threads = [] | |
executions.collect { execution -> | |
def th = new Thread({ | |
results.add(execution()) | |
}) | |
threads.add(th) | |
} | |
threads.each { it.start() } |
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
question 1 | |
When were we chosen? (1:4-5,11) | |
我們什麼時候被上帝揀選為聖徒? | |
A 我們信的時候 When we believed | |
B 我們受洗的時候 When we were baptized | |
C 我們受聖靈的時候 When we received the Spirit | |
D 我們悔改的時候 When we repented(悔改) | |
E! 上帝創立世界以前 Before the foundation of the world | |
question 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
package test; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
/** | |
* Created by sansword on 2017/1/28. | |
*/ | |
public class ForEachPerformanceTest { |
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
#!/bin/sh | |
echo "edit this file before you execute it!!" | |
echo "make sure keytool and openssl commands are in PATH" | |
read -p "Contiune?" ANS | |
read -p "give me CN(www.xxx.com.tw)" CN | |
read -s -p "give me default password(length >= 8)" PASS | |
set -e | |
# Edit these arguments |
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
Compares methods to literate over a list: | |
The following codes all do the same things: | |
Given a list of ticket, | |
1. put ticket into a map. | |
2. count the number of ticket which status is BOUGNT, initial an AtomicInteger with the count of bought tickets. |
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
根據題目分析,先按照餘數分類: | |
假設答案為 N | |
mod 1,3,7,9 餘 0 ........ (1) | |
mod 2,4,5,8 餘 1 ........ (2) | |
mod 6 餘 3 .............. (3) | |
lcm(3,7,9) = 63 ......... (4), by (1) | |
lcm(2,4,5,8) = 40 ....... (5), by (2) | |
N ≡ 0 mod 63 ..... (6), by (4) |
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
/*jslint indent: 4 */ | |
/*global | |
jQuery: false, | |
alert: false, | |
window: false, | |
queryNext: false, | |
*/ | |
/** | |
* dump fortune of each day using javascript. |
NewerOlder