Skip to content

Instantly share code, notes, and snippets.

# Samuel Santos samueltcsantos

Created April 30, 2014 21:15
Javascript conversor cambial.
View alg001.html
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
 Alg002
Created February 18, 2015 11:59
Algoritmo para verificar se o ano é bissexto.
View bissexto.txt
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
 algoritmo "bissexto" // Função : Bissexto - Um ano é bissexto se ele for divisível por 400 ou se ele // for divisível por 4 e não por 100. // Bissexto: 1980, 1984, 1988, 1992, 1996 e 2000. // 1900 não foi bissexto, mas 1600 foi // Autor : Samuel T. C. Santos // Data : 18/02/2015 // Seção de Declarações var ano : inteiro
Created November 10, 2014 15:16
Converter metros para centímetros em Visualg.
View conversor.alg
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
 algoritmo "metroParaCentimetros" // Autor : Samuel T. C. Santos // Data : 16/06/2014 // Seção de Declarações // Função : Faça um Programa que converta metros para centímetros. var metros, centimetros : real inicio // Seção de Comandos
Created April 20, 2014 01:54
JOptionPane exemplo de utilização
View Main.java
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
 package app; import javax.swing.JOptionPane; import controllers.GerenciadorDeConta; /** * @author Samuel T. C. Santos * * @see {https://github.com/samueltcsantos/javaoo/tree/master/dev}
Created November 10, 2014 16:10
Converter metros para centímetros em Java.
View Conversor.java
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
 import java.util.Scanner; /** * @author Samuel T. C. Santos * @version 09.11.2014 * * Exemplo de execução (Use virgula e não ponto!): * Metros? 2,36 * 236,0 cm *
Created November 10, 2014 16:06
Converter metros para centímetros em Python.
View conversor.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
 # -*- coding: utf-8 -*- ''' Autor: Samuel T. C. Santos Data: 09.11.2014 ''' metros = float (input('Metros? ')) centimetros = metros * 100;
Created May 6, 2014 21:07
Criando diretorio com java
View JavaIO.java
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
 package com.java.io; import java.io.File; /** * Classe para manipulacao de arquivos em Java. * * - ler/escrever/mover/renomear arquivos * - criar/apagar/mover/renomear diretórios * - listar diretorios
Created November 10, 2014 16:28
Converter metros para centímetros em Javascript/NodeJS.
View conversor.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
 /** * Author : Samuel T. C. Santos * version : 10.11.2014 * * Javascript e NodeJS nao tem o proposito de ler dados da entrada * em linha de comando, por isso, vamos apenas declarar * as variaveis e inicializar-las com um valor. */ var metros = 0.88,
Last active July 30, 2022 15:44
Robot for automation
View robot.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
 import pyautogui class Robot: ''' A base class to any robot. ''' def __init__(self): ''' Initializing the robot ''' self.pyautogui = pyautogui self.ONE_SECOND = 1 self.MAX_RETRIES = 5
Created July 13, 2015 02:55
Exercício Conta Bancária
View ExemploContaBancaria.java
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
 package alp; import java.util.Scanner; /** * Escreva um algoritmo que, para uma conta bancária, leia o seu número, * o saldo, o tipo de operação a ser realizada (depósito ou retirada) * e o valor da operação. Após, determine e mostre o novo saldo. * * Se o novo saldo ficar negativo, deve ser mostrada, também, a mensagem “conta estourada”.