- Copy this file to your machine
- open cmd in the folder you pasted the file
- Run the below command in cmd to setup your a server
setup.bat 26.220.184.112 pewpewdojo-server
import { useCallback, useEffect, useMemo, useReducer } from 'react'; | |
import { io, Socket } from 'socket.io-client'; | |
export enum SocketStatus { | |
CONNECTING = 'CONNECTING', | |
CONNECTED = 'CONNECTED', | |
DISCONNECTED = 'DISCONNECTED', | |
ERROR = 'ERROR', | |
RECONNECT = 'RECONNECT', | |
CONNECT_ERROR = 'CONNECT_ERROR', |
{ | |
"semi": true, | |
"tabWidth": 2, | |
"useTabs": false, | |
"printWidth": 100, | |
"singleQuote": true, | |
"trailingComma": "all", | |
"jsxSingleQuote": true, | |
"jsxBracketSameLine": true, | |
"arrowParens": "always", |
type Equal<L, R> = L extends R ? true : false; | |
type GreaterThan<L, R, C extends number[] = []> = L extends R | |
? false | |
: C["length"] extends L | |
? false | |
: C["length"] extends R | |
? true | |
: GreaterThan<L, R, [...C, 1]>; | |
interface INode<V extends number | null, L, R> { |
Write-Output "Teste teste" >> teste.txt |
function Write-Log { | |
param( | |
[Parameter()] | |
[ValidateNotNullOrEmpty()] | |
[string]$Message, | |
[Parameter()] | |
[ValidateNotNullOrEmpty()] | |
[ValidateSet("Info", 'Warn', 'Error', 'Success')] | |
[string]$Type = 'Info' |
function Download-File { | |
param ( | |
[string]$Url, | |
[string]$File | |
) | |
Write-Host "Downloading $Url to $File" | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
Invoke-WebRequest -Uri $url -OutFile $File | |
} |
use poise::serenity_prelude::{self as serenity}; | |
extern crate dotenv; | |
use dotenv::dotenv; | |
struct Data {} | |
type Error = Box<dyn std::error::Error + Send + Sync>; | |
type Context<'a> = poise::Context<'a, Data, Error>; |
// Atividade 1 do livro - Pg126 | |
// O problema consiste em elaborar um cadastro para 20 livros, contendo as seguintes informações: código, título, autor, área, ano e editora. Desenvolver um menu com as seguintes opções: | |
// 1. Cadastrar os livros. | |
// 2. Imprimir as informações dos livros. | |
// 3. Pesquisar livros por código. | |
// 4. Ordenar os livros por ano. | |
// 5. Sair do programa. | |
// No Quadro 11, temos o programa para o problema descrito. Na solução, empregamos o conceito de struct para criar a ficha do livro, vetor de struct para armazenar as informações dos 20 livros, | |
// o método de pesquisa sequencial para efetuar a busca de um livro por código e o método de ordenação da bolha para classificar os livros de acordo com o ano. |