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
/** | |
* Calcula a potência de um número bigInt | |
* O JS não suporta números inteiros maiores que 2^53-1 | |
* e BigInts não podem ser usados com o operador **, por isso | |
* essa função foi criada | |
*/ | |
function bigIntPower(base: number|bigint, exponent: number) { | |
let result = 1n | |
const bigBase = BigInt(base) | |
for (let i = 0; i < exponent; i++) { |
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
/** | |
* Calcula a potência de um número bigInt | |
* O JS não suporta números inteiros maiores que 2^53-1 | |
* e BigInts não podem ser usados com o operador **, por isso | |
* essa função foi criada | |
*/ | |
function bigIntPower(base: number|bigint, exponent: number) { | |
let result = 1n | |
const bigBase = BigInt(base) | |
for (let i = 0; i < exponent; i++) { |
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
class Codename { | |
constructor (parser) { | |
this._parser = parser | |
return this | |
} | |
parse (version) { | |
this._version = version || '0.0.0' | |
const [major, minor, patch] = this._version.split('.') | |
this._major = (this._parser.major) ? (this._parser.major[major] || major) : major |
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
{ | |
"operation": "add_node", | |
"name": "harper-edge", | |
"host": "harper-edge", | |
"port": 62344, | |
"subscriptions": [ | |
{ | |
"channel": "default:sensor_data", | |
"subscribe": true, | |
"publish": false |
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
{ | |
"operation": "add_node", | |
"name": "harper-edge", | |
"host": "harper-edge", | |
"port": 62344, | |
"subscriptions": [] | |
} |
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
services: | |
harper-edge: | |
image: harperdb/harperdb | |
container_name: harper-edge | |
ports: | |
- "9900:9925" | |
- "9901:9926" | |
- "62000:62344" | |
environment: | |
- HDB_ADMIN_USERNAME=admin |
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
services: | |
harper-edge: | |
image: harperdb/harperdb | |
container_name: harper-edge | |
ports: | |
- "9900:9925" | |
- "9901:9926" | |
- "62000:62344" | |
environment: | |
- HDB_ADMIN_USERNAME=admin |
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
/** | |
* Esse código funciona usando o código de cada caractere digitado e realizando a modificação para outro caractere de acordo com o número da chave | |
* Para entender melhor de onde vem os números de cada alfabeto, veja o código abaixo | |
*/ | |
// const alphabet = 'abcdefghijklmnpqrstuvwxyz' | |
// const capital = alphabet.toUpperCase() | |
// for (let i = 0; i < alphabet.length; i++) { | |
// console.log(alphabet[i], alphabet.charCodeAt(i)) | |
// // a 97 |
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
helm install \ | |
--create-namespace \ | |
-n database \ | |
--set env.ADMIN_USERNAME=harperdb \ | |
--set env.ADMIN_PASSWORD=harperdb \ | |
harperdb ./harperdb |
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
--- | |
# Source: harperdb/templates/persistentVolumeClaim.yaml | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: harperdb-data | |
namespace: database | |
spec: | |
resources: | |
requests: |
NewerOlder