Skip to content

Instantly share code, notes, and snippets.

View Icaro-Lima's full-sized avatar
🏅
Working from home

Ícaro Lima Icaro-Lima

🏅
Working from home
View GitHub Profile
{
"basics": {
"name": "John Doe",
"label": "Programmer",
"image": "",
"email": "john@gmail.com",
"phone": "(912) 555-4321",
"url": "https://johndoe.com",
"summary": "A summary of John Doe…",
"location": {
@Icaro-Lima
Icaro-Lima / UFCG-ControleAcadêmico.js
Last active November 16, 2021 15:56
Coloque os códigos e turmas que você quer se matricular e deixe o script no console do navegador. Quando abrir a página de matrícula aperte enter. O script deve apenas marcar os checkboxes das disciplinas. Não esqueça de deixar o seu joinha ⭐️!
/**
* @author Ícaro Lima <icaro.lima@ccc.ufcg.edu.br>
*/
let quero = [
{ cod:1411290, turma:1 },
{ cod:1109053, turma:3 },
{ cod:1411316, turma:1 },
{ cod:1114222, turma:1 },
{ cod:1411192, turma:1 },
#include <bits/stdc++.h>
using namespace std;
struct Vector {
int x, y;
Vector() : x(0), y(0) { }
Vector(int x, int y) : x(x), y(y) { }
@Icaro-Lima
Icaro-Lima / Node.cpp
Last active January 30, 2018 23:44
A simple C / C++ Queue implementation (in my case for CUDA).
#include "Node.h"
Node::Node(int v) {
value = v;
next = nullptr;
}
@Test
public void testTDG() {
// Configurar aqui!
final int TESTS_COUNT = 10000;
final int OPERATIONS_COUNT = 1000;
final int MAX_SIZE_INCLUSIVE = 31;
final int MAX_ELEMENT_VALUE = 27; // [0, X).
Random rand = new Random();
for (int t = 0; t < TESTS_COUNT; t++) {
@Test
public void testTDG() throws StackOverflowException, StackUnderflowException {
Random rand = new Random();
final boolean DEBUG = false;
final int COUNT_TESTS = 1000;
final int MAX_OPERATIONS = 1000;
final int MAX_INTEGER = 20;
for (int t = 0; t < COUNT_TESTS; t++) {
@Override
@Test
public void testTDG() {
Random rand = new Random();
final boolean DEBUG = false;
final int COUNT_TESTS = 1000;
final int MAX_OPERATIONS = 1000;
final int MAX_INTEGER = 20;
@Test
public void testTDG() {
Random rand = new Random();
final int COUNT_TESTS = 1000;
final int MAX_OPERATIONS = 1000;
for (int t = 0; t < COUNT_TESTS; t++) {
int operations = rand.nextInt(MAX_OPERATIONS);
ArrayList<Integer> arrayList = new ArrayList<>();
#include <bits/stdc++.h>
using namespace std;
#define MAX_JUMP 15
struct Node {
int level;
vector< pair<int, int> > neigh;
};
@Icaro-Lima
Icaro-Lima / Autômato_Finito_Determinístico.cpp
Created November 21, 2017 07:43
Implementação de um Autômato Finito Determinístico (AFD)
#include <bits/stdc++.h>
using namespace std;
int main() {
int states_count;
printf("Me diga o número de estados: ");
scanf("%d", &states_count);
int initial_state;