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
| ón __todhchaí__ impórtaigh roinnt |
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
| /** | |
| * As described in 'updates' in the nodes | |
| */ | |
| void CHART::do_cell(int i, int k) { | |
| Rule r; | |
| Category A, B, C; | |
| int A_included, B_included; |
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
| array2string(a : ARRAY[G]) : STRING is | |
| local | |
| k : INTEGER | |
| do | |
| Result := "<< " | |
| from | |
| k := a.lower | |
| until | |
| k = a.upper | |
| loop |
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
| #!/usr/bin/env ruby | |
| def y(n) | |
| case n | |
| when 0 then 1 | |
| when 1 then 0 | |
| when 2 then -4 | |
| when 3 then 0 | |
| else y(n - 4) | |
| end |
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[] countLetters(String input) { | |
| int[] results = new int[26]; | |
| for (int i = 0; i < input.length(); i++) { | |
| int cur = input.toLowerCase().charAt(i); | |
| if (cur >= 'a' && cur <= 'z') {results[cur - 'a']++;} | |
| } | |
| return results; | |
| } |
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
| bool has_left_recursion(Grammar g) { | |
| for (vector<Rule>::iterator i = g.rules.begin(); i != g.rules.end(); ++i) { | |
| if (i->mother == i->dtrs.front()) return true; | |
| } | |
| return false; | |
| } |
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
| #!/usr/bin/env ruby | |
| puts ARGV.map {|x| x += '@tcd.ie'}.join(', ') |
NewerOlder