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
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] == "_"): |
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
# 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 |
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
# https://www.beecrowd.com.br/judge/pt/problems/view/1168 | |
n = int(input()) | |
ledsByValue = { | |
"0": 6, | |
"1": 2, | |
"2": 5, | |
"3": 5, | |
"4": 4, |
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
# 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: |
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
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 |
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
// 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)) { |
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
module.exports = { | |
root: true, | |
parser: '@typescript-eslint/parser', | |
parserOptions: { | |
ecmaVersion: 2020, | |
sourceType: 'module', | |
ecmaFeatures: { | |
jsx: true | |
} | |
}, |
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
declare module 'react-rating-stars-component' { | |
import * as React from 'react' | |
interface StarRatingComponentProps { | |
onChange: (rating: number) => void; | |
} | |
declare class StarRatingComponent extends React.Component< | |
StarRatingComponentProps | |
> { } |
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
name: Tests | |
on: | |
push: | |
pull_request: | |
branches: [ $default-branch ] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest |
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
export type Product = { | |
id: number; | |
name: string; | |
price: number; | |
description: string; | |
imageUri: string; | |
} | |
export type OrderLocationData = { | |
latitude: number; |