Skip to content

Instantly share code, notes, and snippets.

View jeffersonchaves's full-sized avatar
😎
Focusing

Jefferson Chaves jeffersonchaves

😎
Focusing
  • Instituto Federal do Paraná - IFPR
  • Foz do Iguaçu - PR
View GitHub Profile
<?php
$lista = [30];
$count = 0;
for ($i = 0; $i < 30; $i++) {
$lista[] = rand(1, 15);
}
print "Digite um numero: ";
<?php
$numeroDaMega = [];
$numerosDaMegaOrdenados = [];
$todosDiferentes = true;
$contador = 0;
do {
$todosDiferentes = true;
package database;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class ConnectionFactory {
private static Connection connection;
@jeffersonchaves
jeffersonchaves / curl.md
Created September 2, 2021 13:12 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

package app;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@jeffersonchaves
jeffersonchaves / gist:3f0a74db2af7ffc4f70cf7346bd7a999
Created September 16, 2021 18:18
Servlet Base Path Snippet
String getBaseUrl(HttpServletRequest request) {
String baseUrl = request.getRequestURL().substring(0, request.getRequestURL().length() - request.getRequestURI().length()) + request.getContextPath();
return baseUrl;
}
programa
{
funcao inicio()
{
inteiro tamanho_tabua = 5
inteiro tamanho_tabua_cm = tamanho_tabua * 100
inteiro tamanho_pedaco_cm = 45
inteiro numero_pedacos = 0

#Python Flask Introdução

Esta é uma breve introdução ao framework Flask e pode servir como um tutorial prático para dar os primeiros passos com o Flask.

Irei mostrar como instalar o Flask de modo bem simples e também mostrar o “Hello World!” com Flask, além de uma breve noção do que vem a ser esse tal de Fask…

O que é Flask ?

Flask é um micro-framework para Python, segundo a documentação…

@jeffersonchaves
jeffersonchaves / Lista Python.md
Created November 16, 2021 13:10
Lista Python