terça-feira, 31 de julho de 2012

Forgive me if I speak bluntly - The Day Earth Stood Still

The Day Earth Stood Still 


Klaatu: I am leaving soon, and you will forgive me if I speak bluntly. The universe grows smaller every day, and the threat of aggression by any group, anywhere, can no longer be tolerated. There must be security for all — or no one is secure... This does not mean giving up any freedom except the freedom to act irresponsibly.
Your ancestors knew this when they made laws to govern themselves — and hired policemen to enforce them. We of the other planets have long accepted this principle. We have an organization for the mutual protection of all planets — and for the complete elimination of aggression. A sort of United Nations on the Planetary level... The test of any such higher authority, of course, is the police force that supports it. For our policemen, we created a race of robots — Their function is to patrol the planets — in space ships like this one — and preserve the peace. In matters of aggression we have given them absolute power over us. This power can not be revoked. At the first sign of violence they act automatically against the aggressor. And the penalty for provoking their action is too terrible to risk.
The result is that we live in peace, without arms or armies, secure in the knowledge that we are free from aggression and war — free to pursue more profitable enterprises. Now, we do not pretend to have achieved perfection, but we do have a system, and it works. I came here to give you these facts. It is no concern of ours how you run your own planet, but if you threaten to extend your violence, this Earth of yours will be reduced to a burned-out cinder. Your choice is simple: join us and live in peace, or pursue your present course and face obliteration. We shall be waiting for your answer. The decision rests with you.

domingo, 15 de julho de 2012

INDCEP - Melhorias

Veja bem,

fiz melhorias interessantes no site http://www.indcep.com.br
Agora é possível avaliar qualquer endereço do planeta.
Antes só era possível votar em endereços do Brasil.
Creio que agora ficou bem melhor.

That's all folks!

sábado, 14 de julho de 2012

PHP - Exemplo do uso de classe e array

Veja bem,

Este é um exemplo muito simples de como trabalhar com classes no PHP.

Olho no lance.

<?php
$arrEstadoString = explode("|", "AM|SP|RJ|");
$arrEstadoObetos = array();

//Criação do array de objetos.............................................

for ($i=0;$i<count($ arrEstadoString ) ;$i++)
{
   $EstadoObjeto = new Estado();
   $EstadoObjeto->sigla = $arrEstadoSring[$i];
   $arrEstadoObjetos[$i] = $EstadoObjeto;
}

//Imprimindo o conteúdo do array.....................................
for ($i=0;$i<count($ arrEstadoObjetos ) ;$i++)
{
   echo $arrEstadoObjetos[$i]->sigla;
}

// Fim.


class Estado
{
    public $sigla;


?>

Et voilà!

quarta-feira, 4 de julho de 2012

Editor PHP

Veja bem,

Você está procurando um editor PHP?

Minha sugestão: phpDesigner8.

Preço: U$39 (Personal Use)
http://www.mpsoftware.dk/buy.php

That's all folks.

terça-feira, 3 de julho de 2012

The Pyramid Code - EP5- A New Chronology.

Integration Services - Sincronização entre duas tabelas de diferentes bancos de dados.

Veja bem,

Se você está tarado para usar o replicatedo SQLServer para sincronizar duas tabelas de bancos diferentes, controle-se!

Ao invés disso, utilize o integration service, é bem mais elegante. Usar replicate para sincronizar tabelas de bases diferentes é o mesmo que assassinar uma mosca usando um asteróide.

Ao invés disso, veja este exemplo


There are situations where a SQL Server DBA needs to keep two different tables in sync. Usually, the DBA needs to keep a copy of a table in a in a data warehouse repository that is used as a solution for archiving and/or reporting.
SQL Server provides a robust method for keeping data synchronized across databases using Replication but there are situations when all we need is just to keep an online copy of a single table for archiving or reporting purposes and we would prefer to do not tinker into SQL Server replication.
This post is divided into two parts: Part I explains how to update a destination table with the information that is added into a source table while Part II explains how to replicate any change that happens in existing records in the source table into destination. Please, take into account this is just another way of doing this, there are many other possibilities but the one listed here is probably one of the fastest to implement and modify on-demand.
This procedure is based on the following scenario: A “table A” on “database A” is periodically replicated using SSIS into “table B” on “database B”. “Table A” is updated with new records and we need to copy those records into “table B” too. Our final implementation will look like this in SQL Server Business Intelligence Development Studio:


http://blogs.msdn.com/b/jorgepc/archive/2010/12/07/synchronize-two-tables-using-sql-server-integration-services-ssis-part-i-of-ii.aspx

That's folks!


segunda-feira, 2 de julho de 2012

JQuery - Como capturar o ENTER

Veja bem,

Este código funciona perfeitamente:


 $('input').keydown( function(e) {
        var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;
        if(key == 13) {
            e.preventDefault();
            var inputs = $(this).closest('form').find(':input:visible');
            inputs.eq( inputs.index(this)+ 1 ).focus();
        }
    });

* Informação  retirada do  site stackoverflow
http://stackoverflow.com/a/6128623

And that's all folks.