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 mapValues(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| result[key] = fn(obj[key], key); | |
| return result; | |
| }, {}); | |
| } | |
| function pick(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| if (fn(obj[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
| // Old Java | |
| button.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { | |
| @Override | |
| public boolean onPreferenceClick(Preference preference) { | |
| //TODO: Downloadd everything | |
| 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
| table { // it would be better to use a class | |
| overflow-x: auto; // allow horizontal scrolling if needed | |
| display: block; | |
| } | |
| //////////////// | |
| <head> | |
| <title> Database</title> |
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
| <style> | |
| .light-gray-button { | |
| padding: 5px 15px; | |
| border: 2px solid transparent; | |
| border-radius: 3px; | |
| text-align: center; | |
| cursor: pointer; | |
| user-select: none; | |
| white-space: nowrap; | |
| color: #fff; |