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
getFormErrors(form: AbstractControl) { | |
if (form instanceof UntypedFormControl) { | |
// Return FormControl errors or null | |
return form.errors ?? null; | |
} | |
if (form instanceof UntypedFormGroup) { | |
const groupErrors = form.errors; | |
// Form group can contain errors itself, in that case add'em | |
const formErrors = groupErrors ? { groupErrors } : {}; | |
Object.keys(form.controls).forEach(key => { |
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
[ | |
// Dhivehi comma | |
{ | |
"key": "alt+[Comma]", | |
"when": "isMac && inputFocus", | |
"command": "type", | |
"args": { | |
"text": "،" | |
} | |
}, |
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
gregorian_y | gregorian_m | gregorian_d | hijri_y | hijri_m | |
---|---|---|---|---|---|
1983 | 2 | 14 | 1403 | 5 | |
1989 | 11 | 30 | 1410 | 5 | |
1990 | 7 | 23 | 1411 | 1 | |
1991 | 2 | 14 | 1411 | 8 | |
1991 | 5 | 16 | 1411 | 11 | |
1995 | 6 | 29 | 1416 | 2 | |
1995 | 7 | 29 | 1416 | 3 | |
1997 | 3 | 10 | 1417 | 11 | |
1999 | 8 | 12 | 1420 | 5 |
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
<?php | |
function ordinal(int $i): string | |
{ | |
// $numberFormatter = new \NumberFormatter('en_US', \NumberFormatter::ORDINAL); | |
// return $numberFormatter->format($i); | |
$asString = (string) ($i % 100); | |
$asString = str_pad($asString, 2, "0", STR_PAD_LEFT); // Pad zero |
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
{ | |
"domains": [ | |
{ | |
"name": "Cecilia Garden", | |
"location": "Wolvendom, Windwail Highland", | |
"region": "Mondstadt", | |
"type": "weapon_ascension_mats", | |
"rewards": { | |
"sun": ["w_tile", "w_tooth", "w_shackle"], | |
"mon": ["w_tile"], |