A Pen by Nguyen Quoc Anh on CodePen.
A Pen by Nguyen Quoc Anh on CodePen.
A Pen by Nguyen Quoc Anh on CodePen.
A Pen by Nguyen Quoc Anh on CodePen.
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
| <!-- App --> | |
| <div id="app"> | |
| <component :is="state.view"> | |
| <h1>{{ state.view }}</h1> | |
| <p> | |
| See <a href="http://timrijkse.nl" target="_blank">timrijkse.nl</a> for more articles.<br> | |
| Follow me on <a href="http://twitter.com/timrijkse" target="_blank">twitter</a> | |
| </p> | |
| </component> |
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: | |
| ``` | |
| private string foo; | |
| public string getFoo() { | |
| return this.foo; | |
| } | |
| private v setFoo(foo) { | |
| this.foo = foo |
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 fib (n) | |
| (labels ((calc-fib (n a b) | |
| (if (= n 0) | |
| a | |
| (calc-fib (- n 1) b (+ a b))))) | |
| (calc-fib n 0 1))) |
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/python | |
| def fibonacci(n, f_1=0, f_2=1): | |
| return fibonacci(n - 1, f_2, f_1 + f_2) if n > 1 else f_1 |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <inttypes.h> | |
| int main(int argc, char *argv[]) | |
| { | |
| if (argc < 2) { | |
| printf("Need 1 param"); | |
| return 1; |
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
| import threading | |
| COUNT = 1000000 | |
| NUM_THREAD = 8 | |
| THREAD_RANGE = 125000 | |
| def print_num(start, end): | |
| for i in range(start, end): | |
| print(i) |
OlderNewer