Skip to content

Instantly share code, notes, and snippets.

View marcogbarcellos's full-sized avatar

Marco Barcellos marcogbarcellos

  • Toronto
View GitHub Profile
  1. atraso em voo - dano moral - Cancelamento de voo e chegada ao destino com atraso - voo nacional
[
  {
    "rate": 10,
    "whyDoesItApplyToTheCase": "Esta jurisprudência é altamente relevante para o caso, pois trata diretamente de dano moral decorrente de cancelamento de voo internacional com atraso significativo na chegada ao destino. A extensão do atraso (mais de doze horas) e a caracterização do dano moral são pontos centrais que se alinham com os fatos apresentados nos casos 2 e 3, onde passageiros buscam indenização por transtornos e perdas.",
    "whyDoesItApplyToTheSpecificTopic": "A jurisprudência aborda o Título 2: Cancelamento de voo nacional com dano moral, e também se alinha com o Título 1: Atraso em voo nacional gerando dano moral, ao reconhecer o dano moral em situações de atraso considerável. A menção a 'valor compatível com a extensão do dano' reforça a Tese 1 e Tese 2, pois o passageiro busca compensação pelos transtornos sofridos.",
    "jurisprudence_index": "JURISPRUDENCIA_INDE
  • browser looks for the DNS cache
  • browser ask the OS to find the ip
  • OS makes a DNS lookup to find the ip and gives to the browser * Looks for the closest DNS Server to find the IP, if it's not there the DNS Server looks for another DNS Server until finds it
  • OS caches the IP
  • browser opens a tcp connection( If it's HTTPS this step is waay more complicated)
  • browser sends an http request
  • browser receives an http response and may close the connection or reuse for more requests.
  • browser checks what kind of response se he receives: 3xx redirect or conditional, 401 authorization required, 4xx and 5xx errors or 2xx "good" responses
  • If cacheable, browser caches response
@marcogbarcellos
marcogbarcellos / LinkedList.js
Created February 8, 2017 03:52
Linked List Operations on javascript
function Node(value){
this.value = value;
this.next = null;
}
function LinkedList() {
this.start = null;
this.length = 0;
}
LinkedList.prototype.push = function (val) {
@marcogbarcellos
marcogbarcellos / fibonnacci.js
Created February 7, 2017 17:03
Returns the value of the Nth value of the fibonnacci sequence.
function fibonnacci(n) {
if (n === 0) {
return 0;
}
else if (n === 1) {
return 1;
}
else {
return fibonnacci(n-1)+fibonnacci(n-2);
}
@marcogbarcellos
marcogbarcellos / nextSmallestButLargerPalindrome.js
Last active February 11, 2017 03:47
Given a number, find the next palindrome on which this next palindrome is larger than the given number.
//We can check that the Recursive Version of Palindrome is way faster...
function palindromeRecursive(n) {
var nArr = n.split('');
if(nArr.length <= 1) {
return true;
}
else {
if(nArr[0] === nArr[nArr.length-1]){
return palindromeRecursive(n.slice(1, nArr.length-1));
} else {
@marcogbarcellos
marcogbarcellos / BinarySearchTree.js
Last active February 14, 2021 19:55
Creating, manipulating and calculating distance between nodes inside a Binary Search Tree
function Node(value){
this.value = value;
this.left = null;
this.right = null;
}
function BinarySearchTree() {
this.root = null;
}
BinarySearchTree.prototype.push = function (val) {