일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- sprintf
- Android
- Clojure
- design pattern
- async
- ChromeTab
- template
- web
- coroutines
- Functional
- haskell
- traits
- type_traits
- Reflect
- ranges
- SHA512
- Observer
- WebView
- SHA1
- kotlin
- program
- sha256
- Scala
- c++
- Chrono
- go
- stringprintf
- AES
- RAII
- CustomTab
- Today
- Total
목록연습장 (8)
프로그래밍 검색 블로그
1234567891011121314bool someThing(std::string& out){ out = "a";}int main(){ std::string str; if(someThing(str)){ cout
1부터 10까지 원소들에 대해서2를 곱하고곱한 원소들에 대해서 10보다 큰 원소들만 추려내어제곱근을 구해서 출력한다. 하스켈1show $ map sqrt $ filter (>10) $ map (*2) [1..10]cs 코틀린1(1..10).map { it * 2 }.filter { it > 10 }.map { Math.sqrt(it.toDouble()) } .forEach(::println)cs C++ 1234567#define lambda1(__TYPE__,__CODE_BLOCK__) [=](__TYPE__ $0){return __CODE_BLOCK__;} cout
하스켈 1[(a, b, c) | c >= [=](int b){ return view::iota(b, c) >>= [=](int a){ return yield_if(a*a + b*b == c*c, std::make_tuple(a,b,c)); }; }; };Colored by Color Scriptercs
12345678910111213141516171819202122232425262728293031323334 //bool is_prime(unsigned long long v){// for(unsigned long long i = 2; i
123456789101112templatestruct fibonacci{ static const unsigned long long value = fibonacci::value + fibonacci::value;};templatestruct fibonacci{ static const unsigned long long value = 1LL;};templatestruct fibonacci{ static const unsigned long long value = 0LL;};Colored by Color Scriptercs 테스트1234567891011121314#include using namespace std;int main(){ cout
최대공약수 12345678templatestruct gcd{ static const unsigned long long value = gcd::value;};templatestruct gcd{ static const unsigned long long value = L;};Colored by Color Scriptercs 최소공배수12345templatestruct lcm{ static const unsigned long long value = (L * R) / gcd::value;}; Colored by Color Scriptercs 테스트123456#include using namespace std;int main(){ cout
123456789101112templatestruct binary{ static const unsigned long long value = binary::value + 2 * binary::value;};templatestruct binary{ static const unsigned long long value = 1;};templatestruct binary{ static const unsigned long long value = 0;};Colored by Color Scriptercs 테스트 123456789101112131415161718#include using namespace std;int main(){ cout
123456789templatestruct factorial{ static const unsigned long long value = N * factorial::value;};templatestruct factorial{ static const unsigned long long value = 1;}; Colored by Color Scriptercs 테스트1234567891011121314#include using namespace std;int main(){ cout