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
program tanque_cilindrico | |
implicit none | |
!Declaração de vars e constantes | |
real , parameter :: pi = 3.14159 | |
real :: diametro = 16.0 ! 16 metros | |
real :: raio = 0.0 | |
real :: altura = 15.0 ! 15 metros | |
real :: volume, volume_20 |
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
PROGRAM exemplos_de_funcoes | |
REAL :: x, y | |
INTEGER :: z | |
!----------------------------------------------------------------------- | |
! Valor absoluto de x | |
! Tipos de argumento(s) : INTEGER or REAL | |
! Tipo de retorno : O mesmo do argumento | |
print *, 'Valor absoluto de x' | |
x = -50.58 |
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 pandas as pd | |
sales = [('account', ['Jones LLC', 'Alpha Co', 'Blue Inc', 'Mega Corp']), | |
('Total Sales', [150, 200, 75, 300]), | |
('Country', ['US', 'UK', 'US', 'US'])] | |
df = pd.DataFrame.from_items(sales) | |
indices = [True, False, True, True] | |
df[indices] |
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
$(document).ready(function() { | |
$('#submit_item').click(function() { | |
var item = $('#item').val(); | |
$.post("demo/process", { | |
"item": item | |
}, function(data) { | |
console.log(data.result); |
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
function solveform() { var y=document.y1; var U=y.volts.value; var R=y.ohms.value; var i=y.ampers.value; var P=y.watts.vale; if (i && R){P=Math.pow(i, 2)*R; U=R*i;} else if (i && U){P=i*U; R=U/i;} else if (U && R){P=Math.pow(U,2)/R; i=U/R;} else if (P && i){U=P/i; R=P/Math.pow(i,2);} else if (P && U){i=P/U; R=Math.pow(U,2)/P;} else if (i && U){P=U*i; R=U/i;} else if (P && R){U=Math.sqrt(P*R); i=Math.sqrt(P/R);} y.ampers.value=i; y.volts.value=U; y.watts.value=P; y.ohms.value=R; U=R=i=P=0; document.y1.reset.focus(); } |
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
<html> | |
<head> | |
<title>Applet Lei de Ohm</title> | |
</head> | |
<body> | |
<h1>Lei de Ohm</h1> | |
<style> input:focus { background-color:#9ACD32; } </style><script language="JavaScript"> function solveform() { var y=document.y1; var U=y.volts.value; var R=y.ohms.value; var i=y.ampers.value; var P=y.watts.value; if (i && R){P=Math.pow(i, 2)*R; U=R*i;} else if (i && U){P=i*U; R=U/i;} else if (U && R){P=Math.pow(U,2)/R; i=U/R;} else if (P && i){U=P/i; R=P/Math.pow(i,2);} else if (P && U){i=P/U; R=Math.pow(U,2)/P;} else if (i && U){P=U*i; R=U/i;} else if (P && R){U=Math.sqrt(P*R); i=Math.sqrt(P/R);} y.ampers.value=i; y.volts.value=U; y.watts.value=P; y.ohms.value=R; U=R=i=P=0; document.y1.reset.focus(); } </script><br /> <center> | |
<form name="y1"> | |
<table bgcolor="#b0c4de" border="3" cellpadding="5" cellspacing=""><tbody> |
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
! Original from: http://ww2.odu.edu/~agodunov/computing/programs/book2/Ch05/rk4n.f90 | |
program main | |
!--------------------------------------------------------------------- | |
! Solver for a system of n first-order Ordinary Differential Equations | |
! Initial value problem. | |
! Method: calls 4th-order Runge-Kutta | |
! Can be used for solving a system of n/2 second order ODE | |
! There are two examples | |
! example 1: Physics - projectile motion in the (x,y) plane | |
! example 2: Biology - |
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
program teste_logico | |
implicit none | |
real t | |
! Suponha uma escala de temperaturas que indique o padrão para estações do ano | |
! t abaixo de 10 graus Inverno | |
! t entre 11 e 15 graus Primavera | |
! t entre 16 e 25 graus Outono |
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 -*- | |
""" | |
___________________________-> Python - Hidroweb <-______________________________ | |
Autor: Arthur Alvin 25/04/2015 | |
afmalvim@gmail.com | |
Modificação: Jean Favaretto 16/07/2015 | |
jeanfavaretto@gmail.com |
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
program op_aritmetica | |
! Este programa efetua um cálculo aritmético | |
! | |
implicit none | |
! declaração de variáveis | |
integer :: a, b, c | |
! atribuindo valores | |
a = 5 |