Skip to content

Instantly share code, notes, and snippets.

View washingtonsoares's full-sized avatar
🎯
Focusing

Washington Soares washingtonsoares

🎯
Focusing
View GitHub Profile
while True:
try:
text = input()
shortcuts = []
resultText = ""
for i in range(len(text)):
currentChar = text[i]
if (currentChar == "_"):
if (len(shortcuts) > 0 and shortcuts[-1] == "_"):
# https://www.beecrowd.com.br/judge/pt/problems/view/1222
while True:
try:
wordsLength, maxLinesPerPage, maxCharPerLine = map(int, input().split(" "))
shortStory = input()
lines = 0
pages = 0
# https://www.beecrowd.com.br/judge/pt/problems/view/1168
n = int(input())
ledsByValue = {
"0": 6,
"1": 2,
"2": 5,
"3": 5,
"4": 4,
# https://www.beecrowd.com.br/judge/pt/problems/view/1024
n = int(input())
for _ in range(n):
text = input()
text2 = ""
# first step
for char in text:
n = int(input())
results = []
for x in range(n):
value, actual, convertTo = input().split(" ")
valueAsNumber = int(value)
if (valueAsNumber < -1000 or valueAsNumber > 1000):
results.append("Valores invalidos")
continue
// https://letsbuildui.dev/articles/building-a-dropdown-menu-component-with-react-hooks
import { useState, useEffect, RefObject } from 'react';
export const useDetectOutsideClick = (ref: RefObject<HTMLElement>, initialState: boolean) => {
const [isActive, setIsActive] = useState(initialState);
useEffect(() => {
const pageClickEvent = (event: MouseEvent) => {
// If the active element exists and is clicked outside of
if (ref.current !== null && !ref.current.contains(event.target as Node)) {
@washingtonsoares
washingtonsoares / .eslintrrc.js
Created July 18, 2021 21:49
Eslint + Prettier
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
declare module 'react-rating-stars-component' {
import * as React from 'react'
interface StarRatingComponentProps {
onChange: (rating: number) => void;
}
declare class StarRatingComponent extends React.Component<
StarRatingComponentProps
> { }
name: Tests
on:
push:
pull_request:
branches: [ $default-branch ]
jobs:
tests:
runs-on: ubuntu-latest
export type Product = {
id: number;
name: string;
price: number;
description: string;
imageUri: string;
}
export type OrderLocationData = {
latitude: number;