Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts

Tuesday, November 3, 2015

Trying to get source code of a webpage in PERL

use strict;
use warnings;
use LWP::Simple;

print "ExaCodigo\tEctCodigo\tExcCodigo\tTUSS\tSQL";

open(IN,'db')or die $!;

while(<IN>){
    chomp;
    my($ExaCodigo,$EctCodigo,$ExcCodigo)=split (/\t/,$_);
    my $link = "http\:\/\/conmedhsaude.com.br\/tuss.php\?c\=\&e\=$ExcCodigo\&p=\&q\=\&consultar\=";
    my $page = get($link) or die "cannot retrieve code\n";
    $page =~ s/\n//g;
    my $TUSS = $1 if ($page =~ /\sTUSS:\s(\d+)\<\/span\>\s+/);
    unless($TUSS) { $TUSS = 'null' }
    print "$ExaCodigo\t$EctCodigo\t$ExcCodigo\t$TUSS\tinsert into ExameCodigoTipo ExaCodigo      values ($TUSS) where ExaCodigo = $ExaCodigo and EctCodigo = $EctCodigo\n";

}
close(IN); _________________________________________________________________________________
DB 16 1 28061144 23 1 28040350 26 1 28061098 33 1 28050037 44 1 28150082 48 1 28060156 64 1 28061608 65 1 28061667 66 1 28061594 67 1 28061748 69 1 28050070 75 1 28060725 77 1 28060229 81 1 28061756 89 1 28060342 90 1 28100140 102 1 28060423
_________________________________________________________________________________ HTML

<input type="text" id="c" name="c" value="" style="margin-left:40px;" />                    Código AMB:<input type="text" id="e" name="e" value="28040481" style="margin-left:40px;" />                    Descrção TUSS: <input type="text" id="p" name="p" value="" style="margin-left:28px;" />                    Descrção AMB: <input type="text" id="q" name="q" value="" style="margin-left:25px;" />                 <input name="consultar" type="submit" class="botao" value="" style="border:none;" >                        </form>            </div> <div class='linhaguia'></div>             <div class="guiaitemsup">                        <div class="guiaitem">             <span class="nome">Código TUSS: 40304361</span>                <span class="esp"><span class="tit2">Descrição TUSS: HEMOGRAMA COM CONTAGEM DE PLAQUETAS OU FRACOES (ERITROGRAM</span></span>                <span class="end"><b>Código do grupo TUSS: </b>40308<br><b>Grupo TUSS: </b>MEDICINA LABORATORIAL  - IMUNOLOGIA<br><b>Código AMB: </b>28040481<br><b>Descrição AMB: </b>HEMOGRAMA COMPLETO (ERITOGRAMA+LEUCOGRAMA+AVALIACAO DE PLAQ<br></span>            </div>            </div>                                                     <div class="clear"></div> <div id='paginacao'><p class="MyriadCH"><span paginacaobot >1</span></p></div>                     </div>                        <div id="lateral">     <div class="clear"></div>    <!-- <a href="http://177.21.147.100:8086/mvautorizadorguias/" title="Autorizador" target="_blank" class="latitem latitemautorizador" ></a> -->    <a href="http://201.59.94.100:8086/mvautorizadorguias/" title="Autorizador" target="_blank" class="latitem latitemautorizador" ></a>    <a href="tuss.php" title="TUSS" class="latitem latitemtuss" ></a>    <a href="trabalheconosco.php" title="Trabalhe Conosco" class="latitem latitemtrabalhe" ></a>        <a href="perguntasfrequentes.php" title="Perguntas Frequentes" class="latitem latitemperguntas" ></a>    <a href="faleconosco.php" title="Central de Atendimento" class="latitem latitematend" ></a>    <a href="linksuteis.php" title="Links Úteis" class="latitem latitemtels" ></a> <a href="commaissaude.php" title="Com + Saúde" class="latitem latitemprevent" ></a>    <a href="imagens/redecredenciada.pdf" title="Rede Credenciada" target="_blank" class="latitem latitemrede" ></a>    <br><br>       <!-- <div id="abramgeans">        <a href="http://www.abramge.com.br/" target="_blank">        <img src="imagens/site/abramge.png" class="abramge">        </a>            <a href="http://www.ans.gov.br/" target="_blank">        <img src="imagens/site/ans.png" class="ans">        </a>    </div>-->    <div class="clear"></div></div>                        <div class="clear"></div>        </div> <div class="linha"></div> <div id="rodape"> <div class="central">     <a href="http://www.taticaweb.com.br/" class="taticaweb" target="_blank"></a>            <div id="abramgeans1" style="float: left;margin: -9px 0 0 0;">                <a href="http://www.abramge.com.br/" target="_blank">                <img src="imagens/site/abramge.png" class="abramge" width="58" height="41">                </a>                            <a href="http://www.ans.gov.br/" target="_blank">                <img src="imagens/site/ans.png" class="ans" width="" height="39">            </a>       </div>        <div class="rodapeatend">         <span class="cat">Central de Atendimento:</span><span class="tel">(24)4009-4545 | (24)4009-4519</span>         <span class="cat">Central de Vendas:</span><span class="tel">(24)4009-8803</span><br />            <span class="cat" style="padding-top:12px; margin-left:-98px;">SAC:</span><span class="tel">0800-0302015

_________________________________________________________________________________
OUTPUT
ExaCodigo EctCodigo ExcCodigo TUSS SQL

23 1 28040350 null insert into ExameCodigoTipo ExaCodigo values (null) where ExaCodigo = 23 and EctCodigo = 1
26 1 28061098 null insert into ExameCodigoTipo ExaCodigo values (null) where ExaCodigo = 26 and EctCodigo = 1
33 1 28050037 null insert into ExameCodigoTipo ExaCodigo values (null) where ExaCodigo = 33 and EctCodigo = 1
44 1 28150082 null insert into ExameCodigoTipo ExaCodigo values (null) where ExaCodigo = 44 and EctCodigo = 1
48 1 28060156 null insert into ExameCodigoTipo ExaCodigo values (null) where ExaCodigo = 48 and EctCodigo = 1
64 1 28061608 null insert into ExameCodigoTipo ExaCodigo values (null) where ExaCodigo = 64 and EctCodigo = 1
65 1 28061667 null insert into ExameCodigoTipo ExaCodigo values (null) where ExaCodigo = 65 and EctCodigo = 1
66 1 28061594 null insert into ExameCodigoTipo ExaCodigo values (null) where ExaCodigo = 66 and EctCodigo = 1
67 1 28061748 null insert into ExameCodigoTipo ExaCodigo values (null) where ExaCodigo = 67 and EctCodigo = 1
69 1 28050070 null insert into ExameCodigoTipo ExaCodigo values (null) where ExaCodigo = 69 and EctCodigo = 1
75 1 28060725 null insert into ExameCodigoTipo ExaCodigo values (null) where ExaCodigo = 75 and EctCodigo = 1
77 1 28060229 null insert into ExameCodigoTipo ExaCodigo values (null) where ExaCodigo = 77 and EctCodigo = 1
81 1 28061756 null insert into ExameCodigoTipo ExaCodigo values (null) where ExaCodigo = 81 and EctCodigo = 1
89 1 28060342 40306631 insert into ExameCodigoTipo ExaCodigo values (40306631) where ExaCodigo = 89 and EctCodigo = 1 

 

Monday, September 10, 2012

Perl - [ Create INDEX.HTML ]

 #!/usr/bin/perl
use strict;
use warnings;

&Usage if $#ARGV<0;

my $REGEX = shift;

print "
<html>
    <head>
        <title></title>
        </head>
        <body>
                <center><h1></h1></center>

                                                        ";
foreach my $file (glob ("*.html")){

        my $text = $file;
        $text =~ s/\.$REGEX.*//g;

        print "\t\t<a href=\"$file\">$text</a><br/>\n";
}
print "
        </body>

</html>

";

sub Usage(){

    print "\nUsage: perl CreatePageIndex.pl fastq > index.html\n";
        exit(1);
}

----------------------------------------------------------------------------------------------------

-bash-4.0$ ll
total 2356
-rw-r--r-- 1 andre users 326585 2012-09-10 10:57 Phix.sort.bam.html.html
-rw-r--r-- 1 andre users 350366 2012-09-10 10:57 polipo11p.sort.bam.html.html
-rw-r--r-- 1 andre users 336857 2012-09-10 10:57 polipo17p.sort.bam.html.html
-rw-r--r-- 1 andre users 345978 2012-09-10 10:57 polipo45p.sort.bam.html.html
-rw-r--r-- 1 andre users 342493 2012-09-10 10:57 tumor11t.sort.bam.html.html
-rw-r--r-- 1 andre users 344666 2012-09-10 10:57 tumor17t.sort.bam.html.html
-rw-r--r-- 1 andre users 351703 2012-09-10 10:57 tumor45t.sort.bam.html.html
-bash-4.0$perl CreatePageIndex.pl

Usage: perl CreatePageIndex.pl fastq > index.html

-bash-4.0$ perl CreatePageIndex.pl sort

<html>
    <head>
        <title></title>
        </head>
        <body>
                <center><h1></h1></center>

                                                                        <a href="Phix.sort.bam.html.html">Phix</a><br/>
                <a href="polipo11p.sort.bam.html.html">polipo11p</a><br/>
                <a href="polipo17p.sort.bam.html.html">polipo17p</a><br/>
                <a href="polipo45p.sort.bam.html.html">polipo45p</a><br/>
                <a href="tumor11t.sort.bam.html.html">tumor11t</a><br/>
                <a href="tumor17t.sort.bam.html.html">tumor17t</a><br/>
                <a href="tumor45t.sort.bam.html.html">tumor45t</a><br/>

        </body>

</html>

Sunday, May 13, 2012

HTML BASIC TAG



TAG
<html></html>
Inicia/termina um documento em HTML.
<head></head>
Define a àrea de cabeçalho, com elementos não visualisáveis na página.
<body></body>
Define a área visível do documento.
CABEÇALHO
<title></title>
Coloca o nome da página na barra de título da janela.
ATRIBUTOS DO CORPO
<body bgcolor=?>
Cor de fundo.
<body text=?>
Cor de texto.
<body link=?>
Cor das links.
<body vlink=?>
Cor das links previamente visitadas.
<body alink=?>
Cor da link activa.
TEXTO
<b></b>
Texto carregado.
<i></i>
Texto em itálico.
<tt></tt>
Texto estilo máquina de escrever, monoespaçamento.
<font size=?></font>
Tamanho das letras.
<font color=?></font>
Cor das letras.
<font face=?></font>
Define a fonte utilizada.
LINKS
<a href="URL"></a>
Cria uma hiperligação.
<a href="mailto:EMAIL"></a>
Cria uma link para o envio de correio.
<a name="NOME"></a>
Cria um 'alvo' dentro de uma página.
<a href="#NAME"></a>
Faz a ligação a um 'alvo' presente dentro da mesma página.
FORMATAÇÃO
<p></p>
Define a área de um parágrafo.
<p align=?>
Alinhamento de um parágrafo.
<br>
Insere uma quebra de linha.
<div align=?>
'Tag' genérico utilizado para formatar blocos de texto.
GRAFISMO
<img src="FICHEIRO">
Insere uma imagem.
<img src="FICHEIRO" align=?>
Alinha uma imagem em relação ao resto do texto.
<img src="FICHEIRO" border=?>
Define a borda da imagem.
<hr>
Insere uma linha horizontal.
TABELAS
<table></table>
Cria uma tabela.
<tr></tr>
Linha de uma tabela
<td></td>
Célula individual numa linha.
ATRIBUTOS DAS TABELAS
<table border=#>
Borda à volta de cada célula.
<table cellspacing=#>
Espaço entre as células.
<table cellpadding=#>
Margem interior das células.
<table width=# or %>
Largura da tabela - em pixels ou percentagem.
<tr align=?> or <td align=?>
Alinhamento horizontal do conteúdo das células.quot;left", "center" ou "right")
<tr valign=?> or <td valign=?>
Alinhamento vertical do conteúdo das células.("top", "middle" ou "bottom")
<td colspan=#>
Numero de colunas 'percorridas' por uma célula.
<td rowspan=#>
Numero de linhas 'percorridas' por uma célula.
FRAMES
<frameset></frameset>
Define o conjunto de frames. Surge antes de <body> num documento com frames.
<frameset rows="valor,valor">
Define as linhas num conjunto de frames. Valor pode ser em pixels, percentagem ou * (o resto / proporção).
<frameset cols="valor,valor">
Define as colunas num conjunto de frames. Valor pode ser em pixels, percentagem ou * (o resto / proporção).
<frame>
Define uma unica frame. Surge dentro de <frameset>.
<noframes></noframes>
Área onde é inserido o conteúdo visivel em browsers que não suportam o uso de frames.
ATRIBUTOS DE UMA FRAME
<frame src="URL">
Especifica o documento HTML a ser exibido na frame.
<frame name="nome">
Dá um nome à frame de modo a poder ser 'linkada' a partir de outras frames.
<frame scrolling=VALOR>
Define se a frame tem barra de scroll. VALOR pode ser "yes", "no" ou "auto".
<frame noresize>
Impede o visitante de redimensionar a frame.



font : http://www.truquesedicas.com/tutoriais/html/00007a.htm

Sunday, May 6, 2012

Installing MySQL + Apache + PHP + phpMyAdmin | Linux - Like

$sudo su 

#apt-get update

#apt-get -f install mysql-server
Do you want to continue [Y/n]? Y

#apt-get -f install apache2
Do you want to continue [Y/n]? Y

#apt-get -f install php5
Do you want to continue [Y/n]? Y

#apt-get -f install php5-mysql
Do you want to continue [Y/n]? Y

#apt-get -f install phpmyadmin
Do you want to continue [Y/n]? Y

#cp -R usr/share/phpmyadmin/ /var/www/
#chown www-data.www-data /var/www/phpmyadmin

access : http://127.0.0.1
access : http://127.0.0.1/phpmyadmin

Attention. 
Read all instructions during installation.
NOTEsame password for all software.

Share this page.

Saturday, February 25, 2012

For beginners CSS / HTML

vim  /html/webCSS1.html
vim /html/style/style.css 


file - webCSS1.html


<html>
    <head>
        <title> Metodo 3 </title> 
        <link rel="stylesheet" type="text/css" href="style/style.css" />    
    </head>


    <body>
        <h1>Using css style</h1> 
    </body>
</html>

file - style.css 


body{
    background-color : #B0E2FF;
}

open the file "webCSS1.html" in your browser.
see your page .
=)

HTML - Tables

<html>
     <head>
         <title>Tables HTML</title>
     </head>

     <body>

        <table border = "1" width="60%">
            <tr>
                <td>Cell 1  HTML</td>
                <td>Cell 2  TABLES</td>
            </tr>
            <tr>
                <td>Cell 3  ANDRE L S</td>
                <td>Cell 4  COMMAND LINE</td>
            </tr>
        </table>
     </body>
</html>

will look like this in the browser:


Cell 1 HTML Cell 2 TABLES
Cell 3 ANDRE L S Cell 4 COMMAND LINE

HMTL - link / Attributes

<html>

     <head>
        <title> Attributes </title>
     </head>

     <body>

        <p style="background-color:#00688B;">Line Attributes</p>
        <p>Background-color</p>
        <body style="background-color:#6CA6CD;">
        <hr/>
        <p>Links</p>
        <a href="http://www.youtube.com/">Click here go to Youtube</a><br/>
        <a href="http://www.ufpa.br/dicas/htm/htm-cor2.htm">Click here go to Table Colors HTML</a><br/>

        <p><a href="#intro">Link to Introduction</a></p>
        <p><a href="#text">Link to Text</a></p>
        <hr/>

        <p>Images</p>
        <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1OHrugD5-ua5qNZ_zX2VUK2rvQkwT2MCljLLaSleFRvKCndU7PtbUIqHqXPXmpFAjHF-dEDN1sTLVeQdWpMrDgTL2xQL0NVBQ6y2IC2A39c2rZJO0xjkj_YvnO_X4lmINivmEOPPCQ4o/s1600/ciencia_da_computacao_c2.gif"/>
        <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1OHrugD5-ua5qNZ_zX2VUK2rvQkwT2MCljLLaSleFRvKCndU7PtbUIqHqXPXmpFAjHF-dEDN1sTLVeQdWpMrDgTL2xQL0NVBQ6y2IC2A39c2rZJO0xjkj_YvnO_X4lmINivmEOPPCQ4o/s1600/ciencia_da_computacao_c2.gif" width="250px" height="250px" />
        <p>Gifs</p>
        <img src="http://www.reinodosgifs.net/galeriadegifs/emoticons_msn/06.gif"/>
     
        <h1 id="intro">Introduction</h1>
        <p>Text text text text</p>

        <h1 id="text">Text</h1>
        <p>Text text text text</p>

    </body>

</html>

will look like this in the browser:


Line Attributes
Background-color

Links
Click here go to Youtube
Click here go to Table Colors HTML
Link to Introduction
Link to Text

Images

 Gifs

Introduction

Text text text text

Text

Text text text text

HTML - For beginners

Example.html 

<html>
     <head>
        <title> Tags </title>
     </head>
     <body>
         <p>Some Tags</p><hr/>
        <strong>Stronger emphasis.</strong><br/>
        <small>This should be in small.</small><br/>
        <p>used for paragraphs.</p>
        <em>Emphasis text.</em></br>
        <h1>Heading</h1>
        <h2>Subhead</h2>
        <h3>Sub-subhead</h3>
        <hr/>
     </body>
</html>

Will look like this in the browser:

Some Tags

Stronger emphasis.
This should be in small.

used for paragraphs.
Emphasis text.

Heading 

Subhead

Sub-subhead