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
#!/usr/bin/env bash | |
set -au | |
# Check cellar dir | |
cellarDir=$(brew --prefix)/Cellar | |
if [ ! -d "$cellarDir" ]; then | |
echo "Not found. brew package path $cellarDir :(" | |
echo | |
exit 1 |
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
public class Euler { | |
public static void main(String[] args) { | |
print(euler(1, 2, 2)); | |
print(euler(1, 2, 1)); | |
print(euler(1, 2, 0.1)); | |
print(euler(1, 2, 0.01)); | |
print(euler(1, 2, 0.001)); | |
print(euler(1, 2, 0.0001)); | |
print(euler(1, 2, 0.00001)); |
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
public class Collatz36 { | |
public static void main(String[] args) { | |
int groupIndex = 0; | |
int smallestGroupNumber = 0; | |
int biggestGroupNumber = 0; | |
for (int n = 101; n < 1000000; n++) { | |
int stepIndex = 0; | |
int step = n; | |
while (stepIndex < 37 && step != 1) { |
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
import java.util.Arrays; | |
public class Main { | |
private char[] digits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}; | |
private char[] operators = {'+', '*'}; | |
private char[] basement = {'$', '_', '_', '_', '_', '_', '_', '_'}; | |
private int basementPointer = 0; | |
private char basementBottom = '$'; | |
private char basementPlaceholder = '_'; |
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
public class Main { | |
private char[] digits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}; | |
private char[] operators = {'+', '*'}; | |
private char[] basement = {'$', '_', '_', '_', '_', '_', '_', '_'}; | |
private int basementPointer = 0; | |
private char basementBottom = '$'; | |
private char basementPlaceholder = '_'; | |
private char[] word = {'3', '4', '+', '6', '2', '+', '*'}; |