Exercise to help us discover all the concepts living in our organization, and our systems
Get everyone in a room and discover the...
- Nouns - entities
- Verbs - events
| #0: Given an input, accounts, write a function to produce the given output. Feel free to ask questions | |
| accounts = [ | |
| ["John", "[email protected]", "[email protected]"], | |
| ["John", "[email protected]"], | |
| ["John", "[email protected]", "[email protected]"], | |
| ["Mary", "[email protected]"] | |
| ] | |
| Output: [ |
| Open iTerm. | |
| Go to iTerm > Preferences... > Profiles > Keys | |
| Under Profile Shortcut Keys, click the + sign. | |
| Type your key shortcut (option-b, option-f, option-d, option-left, etc.) | |
| For Action, choose Send Escape Sequence. | |
| Write b, d or f in the input field. |
| def next_permutation(nums): | |
| ''' | |
| brute force: | |
| - generate all permutations, loop and find the matching, return the next | |
| - time: O(N^2 * N!) + O(N) [printing/string/char concatenation is the N^2] | |
| procedure: | |
| 1. find largest increasing suffix | |
| 2. get pivot | |
| 3. find pivot's right-most successor in suffix |
| #!/usr/bin/env python | |
| """ | |
| Very simple HTTP server in python. | |
| Usage:: | |
| ./dummy-web-server.py [<port>] | |
| Send a GET request:: | |
| curl http://localhost |
| #!/usr/bin/env python | |
| """ | |
| Very simple HTTP server in python. | |
| Usage:: | |
| ./simple_server.py [<port>] | |
| Send a GET request:: | |
| curl http://localhost |
The purpose of design is to allow you to do design later, and it's primary goal is to reduce the cost of change.
| function add(a, b) { | |
| return a + b; | |
| } | |
| const cases = [ | |
| // [a, b], expectedAnswer | |
| [[1, 2], 3], // 3 | |
| [[5, 5], 10],// 10 | |
| [[-1, 2], 1], // 1 | |
| [[1, 1], 2] |
| /* | |
| ******************************************************************************** | |
| Golang - Asterisk and Ampersand Cheatsheet | |
| ******************************************************************************** | |
| Also available at: https://play.golang.org/p/lNpnS9j1ma | |
| Allowed: | |
| -------- | |
| p := Person{"Steve", 28} stores the value |
$ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>$ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>