I hereby claim:
- I am geovanisouza92 on github.
- I am geovanisouza92 (https://keybase.io/geovanisouza92) on keybase.
- I have a public key whose fingerprint is 8B5C C25C D7BC 4E02 EF4D 1C58 2BD4 9AD7 EF5B 8C6A
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
async function forEachSerial(cb, arr) { | |
await arr.reduce(async (prevPromise, value) => { | |
await prevPromise; | |
return cb(value); | |
}, Promise.resolve()); | |
} | |
async function forEachParallel(cb, arr) { | |
await Promise.all(arr.map(cb)); | |
} |
/* eslint-disable @typescript-eslint/no-non-null-assertion */ | |
type Job = { | |
id: number; | |
code: string; | |
name: string; | |
jobType: string; | |
status: string; | |
publicationType: string; | |
recruiterId: number; |
Nesse modelo, as atualizações são transmitidas por websockets (socket.io) e focadas nas abas/janelas dos usuários da mesma empresa.
export function LoginForm() { | |
const { register, handleSubmit, formState: { isDirty } } = useForm(); | |
useBeforeUnload((event) => { | |
if (isDirty) event.preventDefault(); | |
}); | |
const login = (data) => console.log(data); | |
return ( |
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const cookieParser = require('cookie-parser'); | |
const passport = require('passport'); | |
const LocalStrategy = require('passport-local').Strategy; | |
const { Strategy: JwtStrategy, ExtractJwt } = require('passport-jwt'); | |
const FacebookStrategy = require('passport-facebook'); | |
const GoogleStrategy = require('passport-google-oidc'); | |
const { MultiSamlStrategy } = require('passport-saml'); |
Vantagem: a página é carregada já com dados, logo, se o usuário está com uma máquina mais modesta ou internet mais lenta, vai evitar loading/spinner.
import {run} from '@cycle/xstream-run' | |
import {makeDOMDriver, div, input, button, label} from '@cycle/dom' | |
import {makeLocalStorageDriver} from 'cyclejs-storage' | |
import Collection from '@cycle/collection' | |
import xs from 'xstream' | |
import debounce from 'xstream/extra/debounce' | |
import dropRepeats from 'xstream/extra/dropRepeats' | |
import pairwise from 'xstream/extra/pairwise' | |
import delay from 'xstream/extra/delay' | |
import concat from 'xstream/extra/concat' |
const Benchmark = require('benchmark'); | |
const suite = new Benchmark.Suite(); | |
const A = Array(3).fill(null).map((_, index) => index + 1); | |
const B = A.map((a) => [a, a * -1]); | |
suite | |
.add('cartesianProduct_gen', function () { for (const _ of cartesianProduct_gen(B.slice())) { } }) | |
.add('cartesianProduct_loop', function () { for (const _ of cartesianProduct_loop(...B.slice())) { } }) | |
.add('cartesianProduct_genLoop', function () { for (const _ of cartesianProduct_genLoop(B.slice())) { } }) |
interface Buildable<T> { | |
build(): T; | |
} | |
type HasSawThickness = { sawThickness: number }; | |
type HasDirection = { direction: "horizontal" | "vertical" }; | |
type HasWidth = { width: number }; | |
type HasHeight = { height: number }; | |
type HasPhase = { phase: number }; |