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
grammar gittex; | |
DOC_B : '\\BEGIN' | '\\begin'; | |
DOC_E : '\\END'| '\\end'; | |
TITLE_B : '\\TITLE' | '\\title'; | |
HEADING : '#'; | |
NEW_LINE : '\\\\'; | |
END_LINE : ('\n' | '\r'); | |
PARA_B : '\\PARB' | '\\parb'; | |
PARA_E : '\\PARE' | '\\pare'; |
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 - http://www.freecodeformat.com/java-format.php |
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
public static void printHollowBox(int size, String outside, String inside) { | |
for (int i = 0; i < size; i++) { | |
System.out.print(outside); | |
} | |
System.out.println(); | |
for (int i = 0; i < size - 2; i++) { | |
System.out.print(outside); | |
for (int j = 0; j < size - 2; j++) { | |
System.out.print(inside); | |
} |
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
public static int[][] addMatrix(int[][] array1, int[][] array2, int size) { | |
int[][] sum = new int[size][size]; | |
int i, j = 0; | |
for (i = 0; i < size; i++) { | |
for (j = 0; j < size; j++) { | |
sum[i][j] = array1[i][j] + array2[i][j]; | |
} | |
} | |
return sum; | |
} |
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
public static int counterInc(int commands) { | |
System.out.println("Command number " + commands + " completed"); | |
commands++; | |
return commands; | |
} |