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
object StringProducer { | |
fun produce(): String? { | |
return "abc" | |
} | |
} | |
fun main() { | |
StringProducer.produce()?.let { | |
println(it) | |
} ?: run { |
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
/** | |
* ε¨[range]θε΄ε ηζδΈδΈͺζ£ηιζΊζ° | |
* @param range θε΄ | |
* @return ιζΊζ° | |
*/ | |
static int randomNum(int range) { | |
// η¨ε½εζΆι΄ζ³ηζιζΊζ°η§ε | |
time_t seed = time(0); | |
// ε°ιζΊζ°η§εε‘«εε°ιζΊζ°ηζε¨ιι’ | |
srand(seed); |
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
pthread_cond_t *condv = nullptr; | |
pthread_mutex_t *mlock = nullptr; | |
static data *phead = nullptr; | |
static void initLock() { | |
condv = new pthread_cond_t; | |
mlock = new pthread_mutex_t; | |
pthread_mutex_init(mlock, nullptr); | |
pthread_cond_init(condv, nullptr); |
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
Java 29 hrs 6 mins βββββββββββββββββββββ 72.5% | |
Groovy 3 hrs 49 mins βββββββββββββββββββββ 9.5% | |
C 3 hrs 37 mins βββββββββββββββββββββ 9.0% | |
Text 1 hr 5 mins βββββββββββββββββββββ 2.7% | |
Bash 36 mins βββββββββββββββββββββ 1.5% |