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
| <?xml version="1.0"?> | |
| <root> | |
| <item> | |
| <name>Underscore and backlash settings FILCO jp layout</name> | |
| <identifier>private.filco_jp_backslash_underscore</identifier> | |
| <autogen> | |
| __KeyToKey__ | |
| KeyCode::JIS_UNDERSCORE, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, | |
| KeyCode::JIS_UNDERSCORE | |
| </autogen> |
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
| const RESOLUTIONS = [ | |
| {text: 'year', short: 'y', get: (d) => d.getFullYear(), set: (d, v) => d.setFullYear(v) }, | |
| {text: 'month', short: 'm', get: (d) => d.getMonth(), set: (d, v) => d.setMonth(v) }, | |
| {text: 'day', short: 'd', get: (d) => d.getDate(), set: (d, v) => d.setDate(v) }, | |
| {text: 'hour', short: 'h', get: (d) => d.getHours(), set: (d, v) => d.setHours(v) }, | |
| {text: 'minute', short: 'mi', get: (d) => d.getMinutes(), set: (d, v) => d.setMinutes(v) } | |
| ]; | |
| class DateHelper { | |
| timeAgoInWords(date1, {brief, skip, limit} = {}) { |
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
| // here is an example of bad implementation that breaks encapsulation AND is hard to extend | |
| class MyService { | |
| void doSomethingWith(MyInterface instance) { | |
| if(instance instanceof FirstImpl) { | |
| doSomething((FirstImpl) instance); | |
| } else if (instance instanceof SecondImpl) { | |
| doSomethingElse((SecondImpl) instance); | |
| } else { | |
| defaultBehaviour(instance); | |
| } |
OlderNewer