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
// Sample solution for the following Code100 task: | |
// https://gist.github.com/codepo8/0c671bfebd4d3ab38e222c5fc247d819?utm_medium=email&_hsmi=288717159&utm_content=288717159&utm_source=hs_email | |
const input = [ | |
0,0,0,121,231,143,195,118,216,195,54,223,195,182,216,121,231, | |
143,0,0,0,3,15,30,97,155,183,49,153,179,1,157,187,3,207,30,0,0,0 | |
]; | |
const toBin = value => (value >>> 0).toString(2).padStart(8, '0').split('').map(c => (c === '1') ? '😄' : '🍾').join(''); |
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
// Based on: https://gist.github.com/codepo8/31b9ad820c03916941c294c404831829 | |
const input = { | |
"cols": 30, | |
"sine": [ | |
"-0.93", "-0.60", "-0.33", "-0.13", "0.00", | |
"0.00", "-0.13", "-0.33", "-0.60", "-0.93" | |
], | |
"parts": ["💻", "💖"] | |
}; |
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 input = { | |
"columns": 80, | |
"padChar": "·", | |
"events": [ | |
{ "name": "Code 100", "location": "Zagreb, Croatia", "date": "29.11.2023" }, | |
{ "name": "LIVE", "date": "ongoing" }, | |
{ "name": "Coffee With Developers", "location": "various", "date": "ongoing"} , | |
{ "name": "World Congress","location": "Berlin, Germany", "date":"17-19.07.2024" } | |
] | |
}; |
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
# don't forget to update below variables to point to your Keycloak instance, main realm, and admin user | |
export KEYCLOAK_URL="http://localhost:8080" | |
export KEYCLOAK_MAIN_REALM=master | |
export KEYCLOAK_USER=lb | |
export KEYCLOAK_PASSWORD=*** | |
# get the access token | |
access_token=$(curl --silent \ | |
-d "client_id=admin-cli" \ | |
-d "username=$KEYCLOAK_USER" \ |
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
// Get the queue from https://github.com/swarup260/Learning_Algorithms/blob/master/data_structure/Queue.js | |
const { Queue } = require('./queue.js') | |
let graphAdj; | |
var visited; | |
let queue; | |
const initGraph = (maxVertice) => { | |
visited = new Array(maxVertice); |