Skip to content

Instantly share code, notes, and snippets.

View jocile's full-sized avatar
🎯
Focusing

Jocilé Serra jocile

🎯
Focusing
View GitHub Profile
@jocile
jocile / Variaveis.java
Last active April 7, 2021 19:32
Exemplos de variáveis Java
public class Variaveis {
public static void main(String[] args) throws Exception {
//exemplos de tipos de variáveis
byte v1 = 30;
short v2 = 60;
int v3 = 50;
long v4 = 6254358487L;
float f1 = 54.84f;
double d1 = 54.43;
@jocile
jocile / git-script-comentado.sh
Last active June 15, 2021 23:39
Script de comandos Git
#!/usr/bin/env bash
while true; do
clear
echo '================================================
Mini script Git do site
1)Status dos arquivos
2)Adicionar todos os arquivos modificados
@jocile
jocile / OptionalExample.java
Created January 1, 2022 14:42
optional example
‎‎​
@jocile
jocile / ComparableExample.java
Created May 19, 2022 21:36
Collection Implementations
package com.jocile.example.colletions;
/**
* This is a domain class that implements Comparable by defining an ordering rule.
* For an outer class it is indicated to implement Comparator.
*
* @see ComparableExampleList implements this example list
*/
public class ComparableExample implements Comparable<ComparableExample> {
private final String name;
@jocile
jocile / LogicCompareExamples.java
Created May 19, 2022 21:43
Logic Compare Examples
package com.jocile.example.compare;
/**
* examples of logical operators
*/
public class LogicCompareExamples {
public static void main(String[] args) {
compareInt(10, 20);
compareFloat(14.5f, 3.5f);
@jocile
jocile / Cat.java
Last active May 21, 2022 13:49
Input output characters and files examples
package com.jocile.example.io;
import java.io.Serializable;
/**
* This class is used in the object serialization example.
*
* @see ObjectIoExample
*/
public class Cat implements Serializable {
@jocile
jocile / LinkedListDoublyExemple.java
Created May 19, 2022 21:46
Linked lists examples
package com.jocile.example.linkedlist;
/**
* Dynamically doubly linked list
*/
public class LinkedListDoublyExemple<T> {
private NodeD<T> primeiroNo;
private NodeD<T> ultimoNo;
private int tamanhoLista = 0;
@jocile
jocile / Algoz.java
Created May 21, 2022 13:59
Java challenges
import java.io.IOException;
import java.util.Scanner;
/**
* Ramsay: "(...) você vence se conseguir adivinhar quem eu sou e por que estou torturando você."
Theon deve pensar rápido e adivinhar quem é seu algoz! Entretanto, Ramsay já decidiu o que ele irá fazer depois que Theon der sua resposta.
Theon pode dizer que seu algoz é alguma dentre N pessoas. Considere que as pessoas são numeradas de 1 a N. Se Theon responder que seu algoz é a pessoa i, Ramsay irá atingi-lo Ti vezes.
<?php
/** Carrega automaticamente uma classe quando instanciada
* @package bibliotecaphp
* @method __autoload
* @version 2
* @pattern MVC Controller
* @author PHP POO
* @param string $classe
* @date - 21/02/2012