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> | |
| int sum (int n) { | |
| if (n <= 0) | |
| return 0; | |
| else | |
| return n + sum(n - 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 java.math.BigInteger; | |
| public class Hanoi { | |
| private static final BigInteger ONE = new BigInteger("1"); | |
| private static BigInteger DISK_MOVE_COUNTER = new BigInteger("0"); | |
| private static int STACK_COUNT = 0; | |
| private static int CURRENT_BIGGEST_DISK = 0; | |
| public static void main(String[] args) { |
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
| [alias] | |
| make-master = !git checkout master && cp -a _site/. . | |
| commit-develop-and-master = !git commit $1 \"$2\" && git make-master && git add . && git commit $1 \"$2\" | |
| push-origin-all-checkout-develop = !git push origin --all && git checkout develop |
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
| private void logAllValuesInCursor(Cursor cursor) { | |
| if (cursor.moveToFirst()) { | |
| do { | |
| logAllValuesInCurrentCursor(cursor); | |
| } while (cursor.moveToNext()); | |
| } else { | |
| Log.e("test_file", "cursor is empty"); | |
| } | |
| } |
NewerOlder