This file contains 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
/** | |
* A Least Recently Used (LRU) cache with Time-to-Live (TTL) support. Items are kept in the cache until they either | |
* reach their TTL or the cache reaches its size and/or item limit. When the limit is exceeded, the cache evicts the | |
* item that was least recently accessed (based on the timestamp of access). Items are also automatically evicted if they | |
* are expired, as determined by the TTL. | |
* An item is considered accessed, and its last accessed timestamp is updated, whenever `has`, `get`, or `set` is called with its key. | |
* | |
* Implement the LRU cache provider here and use the lru-cache.test.ts to check your implementation. | |
* You're encouraged to add additional functions that make working with the cache easier for consumers. | |
*/ |
This file contains 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 copySheets() { | |
sheetIDsToUpdate = [ | |
// [sourceID, destID] | |
["source_google_sheets_id", "dest_google_sheets_id"] | |
] | |
for (let i = 0; i < sheetIDsToUpdate.length; i++) { | |
sourceID = sheetIDsToUpdate[i][0] | |
destID = sheetIDsToUpdate[i][0] |
This file contains 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
version: '3.7' | |
services : | |
postgres: | |
image: postgres:latest | |
volumes: | |
- infra-postgres:/var/lib/postgresql/data | |
ports: | |
- "5432:5432" | |
environment: | |
POSTGRES_USER: postgres |
This file contains 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
version: "3" | |
services: | |
zookeeper: | |
image: 'bitnami/zookeeper:latest' | |
ports: | |
- '2181:2181' | |
environment: | |
- ALLOW_ANONYMOUS_LOGIN=yes | |
kafka: | |
image: 'bitnami/kafka:latest' |
This file contains 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
:set number | |
:set autoindent | |
:set tabstop=4 | |
:set shiftwidth=4 | |
:set smarttab | |
:set softtabstop=4 | |
:set mouse=a | |
call plug#begin() |
This file contains 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
// Formally, the abstract factory pattern is defined as defining an interface to create families of related or dependent objects | |
// without specifying their concrete classes. | |
public interface IEngine { | |
void start(); | |
} | |
public class F16Engine implements IEngine { | |
@Override |
This file contains 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
/* | |
###################################################################### | |
####################### THE BIG INT ########################## | |
*/ | |
const int base = 1000000000; | |
const int base_digits = 9; | |
struct bigint { | |
vector<int> a; | |
int sign; | |
/*<arpa>*/ |