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
| static boolean isPalindrome(String s) { | |
| StringBuilder sb = new StringBuilder(); | |
| for (char c : s.toCharArray()) { | |
| if (Character.isLetter(c)) { | |
| sb.append(c); | |
| } | |
| } | |
| String forward = sb.toString().toLowerCase(); | |
| String backward = sb.reverse().toString().toLowerCase(); | |
| return forward.equals(backward); |
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
| static boolean isPrime(int number) { | |
| if (number < 3) return true; | |
| if (number % 2 == 0) return false; | |
| for (int i = 3; i * i <= number; i += 2) { | |
| if (number % i == 0) { | |
| return false; | |
| } | |
| } | |
| return true; | |
| } |
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 static int fibonacci(int n) { | |
| if (n <= 1) return n; | |
| else return fibonacci(n-1) + fibonacci(n-2); | |
| } |
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
| Function GetURL(cell As Range, Optional default_value As Variant) | |
| 'Lists the Hyperlink Address for a Given Cell | |
| 'If cell does not contain a hyperlink, return default_value | |
| If (cell.Range("A1").Hyperlinks.Count <> 1) Then | |
| GetURL = default_value | |
| Else | |
| GetURL = cell.Range("A1").Hyperlinks(1).Address | |
| End If | |
| End Function |
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
| ["AIF", "WLN", "ERD", "OTC"], | |
| ["INITIO", "ACARA", "ACARID", "ACARINE", "ACAROID", "ACE", "ACENTRIC", "ACETAL", "ACETATE", "ACETIC", "ACID", "ACIDIC", "ACINAR", "ACINI", "ACLINIC", "ACNE", "ACRID", "ACRIDINE", "ADIT", "ADLAND", "ADNATE", "ADO", "ADORAL", "ADORATION", "ADORN", "AEON", "EON", "FORTIORI", "ACRATIC", "ALANINE", "ALAR", "ALATE", "ALCID", "ALDOL", "ALE", "ALEC", "ALFOIL", "ALIEN", "ALIENATE", "ALIENATION", "ALIENOR", "ALOE", "ALOFT", "ALONE", "ALOW", "ALT", "ALTAR", "ANA", "ANACLITIC", "ANAL", "ANANDA", "ANCIEN", "ANCIENT", "AND", "ANDANTE", "ANDANTINO", "ANDIRON", "ANECDATA", "ANELE", "ANENT", "ANEW", "ANI", "ANILINE", "ANION", "ANIONIC", "ANOA", "ANODAL", "ANODIC", "ANOINT", "ANOLE", "ANON", "ANT", "ANTACID", "ANTE", "ANTENATAL", "ANTI", "ANTIC", "ANTICLINE", "ANTICLINAL", "ANTIWAR", "ANTLION", "ANTRA", "ANTRAL", "AORTA", "AORTIC", "ARACARI", "ARANCINI", "ARANEID", "ARATIONAL", "ARC", "ARCANA", "ARCANE", "ARF", "ARID", "ARIEL", "ARIL", "ARNICA", "AROID", "ART", "ARTEL", "ARTELI", "ARTIC", "ARTICLE |
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
| "use strict" | |
| /* | |
| const fs = require('fs') | |
| const https = require("https") | |
| const url = require("url") | |
| const path = require('path') | |
| const args = process.argv.slice(2) | |
| */ |
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
| var asciimoji = function(text, options, userDictionary) { | |
| "use strict"; | |
| function getRandomInt(min, max) { | |
| return Math.floor(Math.random() * (max - min + 1)) + min; | |
| } | |
| var o = options || { | |
| prefix: "(", | |
| suffix: ")" |
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
| /*#topmenu, #blue_engine_oet_translation, .pad-10, .pad-20 {*/ | |
| /* display: none;*/ | |
| /*}*/ | |
| #helpme, #blue_engine_oet_last_words, .grey22, .storyboard { | |
| display: none; | |
| } | |
| th, td { | |
| border: 1px solid #666666; |
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
| <p:log id="log" /> | |
| <p:resizable for="log" /> | |
| <script> | |
| $(function() { | |
| $("#log").css("word-wrap", "break-word") | |
| $(".ui-log-header").dblclick(function() { | |
| $(".ui-log-content").toggle() | |
| }) | |
| }) | |
| </script> |
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
| function isRTL(s){ | |
| var ltrChars = 'A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8\u0300-\u0590\u0800-\u1FFF'+'\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF', | |
| rtlChars = '\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC', | |
| rtlDirCheck = new RegExp('^[^'+ltrChars+']*['+rtlChars+']'); | |
| return rtlDirCheck.test(s); | |
| }; |