View prall.js
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
const { performance } = require("perf_hooks"); | |
const { setTimeout } = require("timers/promises"); | |
function timeit(start, end) { | |
console.log(`Execution time: ${start - end} ms.`); | |
} | |
async function parallelPromises(promiseA, promiseB, promiseC) { | |
const start = performance.now(); | |
const results = [await promiseA, await promiseB, await promiseC]; |
View tcp_server.py
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
from socketserver import TCPServer, StreamRequestHandler | |
ADDRESS = "", 3000 | |
class EchoHandler(StreamRequestHandler): | |
"""Responde requisições repetindo o que foi recebido.""" | |
def handle(self): | |
# Usar b'' cria strings binárias, já codificadas como ASCII |
View docker-compose.yml
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
version: "3.7" | |
services: | |
db: | |
environment: | |
POSTGRES_PASSWORD: postgres | |
image: postgres:alpine | |
ports: | |
- "5432:5432" | |
volumes: | |
- ./docker/db/pgdata:/var/lib/postgresql/data |
View linked-list.js
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
/* eslint-env node, mocha */ | |
const { expect } = require('chai') | |
const LinkedList = require('../src/linked-list'); | |
describe('Linked List', () => { | |
it('Creates empty Linked Lists', () => { | |
const list = new LinkedList(); | |
expect(list).to.be.instanceOf(LinkedList); | |
expect(list.head).to.be.null; | |
}); |
View chatbot.sql
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
CREATE TABLE problemas ( | |
id INT AUTO_INCREMENT PRIMARY KEY, | |
problema_1 VARCHAR(100) NOT NULL, | |
problema_2 VARCHAR(100), | |
problema_3 VARCHAR(100), | |
problema_4 VARCHAR(100), | |
problema_5 VARCHAR(100), | |
problema_6 VARCHAR(100), | |
problema_7 VARCHAR(100), | |
problema_8 VARCHAR(100), |
View preprova.sql
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
/* exercicios 1 e 2 */ | |
CREATE TABLE clientes ( | |
id INT AUTO_INCREMENT PRIMARY KEY, | |
nome VARCHAR(64) NOT NULL, | |
endereco VARCHAR(256), | |
cidade VARCHAR(128), | |
telefone VARCHAR(13) NOT NULL, | |
rg VARCHAR(13), | |
inscricao DATE NOT NULL, | |
fidelidade INT DEFAULT 0 |
View ViewsRenderedSelection.php
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
<?php | |
namespace Drupal\views_selection_rendered_widget\Plugin\EntityReferenceSelection; | |
use Drupal\views\Plugin\EntityReferenceSelection\ViewsSelection; | |
/** | |
* Plugin implementation of the 'selection' entity_reference. | |
* |
View gist:f7eb80dea1dd96821baf7f6c296883f9
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
1. "category" | |
Type of data: Text | |
Contains null values: False | |
Unique values: 159 | |
Longest value: 18 characters | |
Most common values: Product Design (3531x) | |
Tabletop Games (3179x) | |
Shorts (3154x) | |
Documentary (3047x) |
View RouteSubscriber.php
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
<?php | |
namespace Drupal\mail_login_rpc\Routing; | |
use Drupal\Core\Routing\RouteSubscriberBase; | |
use Symfony\Component\Routing\RouteCollection; | |
/** | |
* Swaps default rpc login controller with ours. | |
*/ |
NewerOlder