Strategy::V1::HTMLFormatter
<html>
<head>
<title>Monthly Report</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
/* | |
* In the following 6 digit number: | |
* 283910 | |
* 91 is the greatest sequence of 2 consecutive digits. | |
* | |
* In the following 10 digit number: | |
* 1234567890 | |
* 67890 is the greatest sequence of 5 consecutive digits. | |
* | |
* Complete the solution so that it returns the greatest sequence |
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
export const messages = { | |
allDay: 'Todo el día', | |
previous: '<', | |
next: '>', | |
today: 'Hoy', | |
month: 'Mes', | |
week: 'Semana', | |
day: 'Día', | |
agenda: 'Agenda', | |
date: 'Fecha', |
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
// 1-basic | |
console.log('++++++++++++++++++++++++++++++++++++++++++++++++++'); | |
const count = (() => { | |
let currentValue = 0; | |
return () => currentValue += 1; | |
})(); | |
console.log('count:', count()); //1 | |
console.log('count:', count()); //2 | |
console.log('count:', count()); //3 |
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 capitalize = str => ( | |
str.replace(/\w\S*/g, txt => | |
txt.charAt(0) | |
.toUpperCase() + txt.substr(1).toLowerCase()) | |
); | |
const users = [{ | |
id: 1, name: 'joalbert', surname: 'gonzález' | |
}]; |
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
// array to hash for search | |
const users = []; | |
const products = []; | |
const elem = 10; | |
const keyBy = (arr, key) => arr.reduce((acc, el) => { | |
//console.log('acc', acc); | |
//console.log('acc[el]', el); | |
//console.log('acc[el[key]]', el[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
# https://womanonrails.com/functional-programming-ruby | |
proc1 = Proc.new { |number| number % 3 == 0 } | |
proc2 = Proc.new { |number| number % 3 == 1 } | |
case 3 | |
when proc1 then p 'proc1' | |
when proc2 then p 'proc2' | |
else | |
p 'not a proc' | |
end |
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
# By: https://github.com/Docker-Hub-frolvlad | |
FROM alpine:3.11 | |
# This hack is widely applied to avoid python printing issues in docker containers. | |
# See: https://github.com/Docker-Hub-frolvlad/docker-alpine-python3/pull/13 | |
ENV PYTHONUNBUFFERED=1 | |
RUN echo "**** install Python ****" && \ | |
apk add --no-cache python3 && \ |