Pages

Google Ads

Tuesday, November 30, 2010

Lendo códigos de barra com Android

Amigo leitor,

A cada dia eu gosto mais do Sistema Operacional Android e do meu Motorola Milestone.

Desde que comprei meu celular eu instalei o programa Barcode Scanner e achei fantástico.

Pesquisando um pouco sobre código de barra com o Android encontrei muita coisa boa e gostaria de compartilhar.

O Motorola Milestone com o Android 2.1 e o Barcode Scanner lê QR Code e código de barras.

Links interessantes:

http://livroandroid.blogspot.com/2009/10/lendo-codigos-de-barra-com-android.html

http://www.baixaki.com.br/tecnologia/5068-como-instalar-aplicativos-no-android.htm

http://code.google.com/p/zxing/

http://qrcode.kaywa.com/


Faça o teste:

Teste 01 - URL

qrcode

Teste 02 - Texto
qrcode

Tuesday, November 23, 2010

Componente Date Picker no Android - Form de Data no Android

Amigo leitor,

Sempre que posso eu brinco com o meu Android 2.1 e faço programas para ele.

Resolvi compartilhar um link importante para quem precisa fazer um form com um campo de data no Android.

http://developer.android.com/resources/tutorials/views/hello-datepicker.html


Segui esse tutorial e ficou bem bacana.

Wednesday, November 17, 2010

Desenvolvimento WEB (Java) - Campo Multi Select com Filtro

Amigo leitor,

Você já precisou criar um formulário com um campo multi select? Se a resposta é sim acredito que este post pode ajudá-lo.

Vivemos em um mundo de colaboração e aproveito para compartilhar algumas coisas interessantes:

Exemplo de uma página com um Formulário com Multi Select e com o tratamento em uma JSP.

Exemplo muito bacana de um campo multi select com filtro usando jQuery

Outros exemplos de Campo Multi Select usando jQuery:

Outros links:

Friday, November 12, 2010

Como instalar VPN Checkpoint no Linux Ubuntu 10.04

Amigo leitor,

Você usa Linux Ubuntu 10.04 e precisa conectar na VPN Checkpoint da sua empresa ou do seu cliente?

Se a resposta for sim, você vai amar esse post.

Espero que você tenha tido sorte de encontrar esse post rapidamente, ele vai poupar muito do seu precioso tempo. Caso contrário você já devia estar pensando em desistir de instalar a VPN Checkpoint no Linux e pensando em voltar para o Windows.

Existe um client VPN chamado SNX que conecta com a VPN Checkpoint via linha de comando.

Abaixo o passo a passo de como instalar e utilizar o SNX.

1) Acesse sua VPN via https://dominiodavpndocliente ou IP da VPN

2) Faça o download do SNX (Command Line) para o Linux disponível no endereço acima (https://dominiodavpndocliente), se tua empresa não tiver essa opção você vai precisar encontrar o instalador do SNX na internet ou com o Gerente de Segurança da Informação responsável pela VPN, uma opção é o próprio site da Checkpoint.

3) Instale o pacote (#./snx_install.sh)

Para facilitar a sua vida eu coloquei o SNX Cliente para Linux e a lib compactada em um mesmo arquivo. Para baixar clique aqui

4) Para conectar a VPN digite no terminal:

# snx -s dominiodavpndocliente -u usuario

Exemplo:

# snx -s vpn.professorcoruja.com - caio.souza

Se ocorrer um erro ao tentar se conectar, instale a biblioteca chamada libstdc++5

Para instalar a libstdc++5

wget http://ftp.us.debian.org/debian/pool/main/g/gcc-3.3/libstdc++5_3.3.6-18_i386.deb

sudo dpkg -i libstdc++5_3.3.6-18_i386.deb


5) Conectar e Desconectar a VPN

Exemplo:

# snx -s vpn.professorcoruja.com -u caio.souza

Check Point's Linux SNX
build 800005004
Please enter your password:

SNX - connected.

Session parameters:
===================
Office Mode IP : 175.30.201.1
DNS Server : 175.29.0.21
Secondary DNS Server: 175.29.0.22
DNS Suffix : vpn.professorcoruja.com
Timeout : 8 hours

# snx -d
SNX - Disconnecting...
done.

Boa sorte, espero que este post tenha ajudado.

No mundo de Business Intelligence VPN é fundamental e usar no linux é melhor ainda.

Obs1.: Faça os testes acompanhado do responsável pela segurança da VPN. Outra dica algumas vezes é preciso configurar o seu usuário de VPN para conectar via Linux, muitas vezes a pessoa que cria o seu usuário não coloca a permissão do seu usuário conectar via linux, confirme isso com ele.

Obs2.: O comando strace te ajuda na hora de entender todos os passos de sua conexão com a VPN.

Exemplo:

# strace snx -s vpn.professorcoruja.com -u caio.souza

Link para download do SNX Checkpoint for Linux

Tuesday, November 09, 2010

Pentaho Aggregation Designer Overview

The Pentaho Aggregation Designer simplifies the creation and deployment of aggregate tables that improve the performance of your Pentaho Analysis (Mondrian) OLAP cubes. Pentaho Analysis is a pure, relational OLAP engine that works solely with the data stored in your relational database rather than providing its own multidimensional data storage model. This simplifies deployment and data management, but places limitations on performance when working with very large data sets (fact tables with more than 10 million records and/or cubes with a high cardinality of levels and members). To improve performance in these scenarios, Pentaho Analysis supports aggregate tables. Aggregate tables coexist with the base fact table and contain pre-aggregated measures built from the fact table. This improves performance by enabling the Mondrian engine to fulfill certain summary level queries from the smaller aggregate table versus aggregating a large number of individual facts from the base fact table.

The Pentaho Aggregation Designer provides you with a simple interface that allows you to create
aggregate tables from levels within the dimensions you specify. Based on these selections, the
Aggregation Designer generates the Data Definition Language (DDL) for creating the aggregate
tables, the Data Manipulation Language (DML) for populating them, and an updated Mondrian
schema which references the new aggregate tables. If you are unfamiliar with aggregate table
design concepts, the Aggregation Designer also includes an intelligent adviser that evaluates the
structure and cardinality of your OLAP cube and recommends some initial aggregate tables to
create for improving performance.

PAD - Installation Instructions

The pad-open-1.0-xx.zip file contains all the libraries and script files necessary to run Pentaho
Aggregation Designer. To install the Pentaho Aggregation Designer, unzip this file into a directory of your choice.

To launch the Aggregation Designer on Windows...

Run the startaggregationdesigner.bat script located in the root of your installation directory.

To launch the Aggregation Designer on Linux...
Run the startaggregationdesigner.sh script located in the root of your installation directory.

CAUTION: Place your JDBC driver JARs in the Drivers directory. Once in this directory, the drivers are added to the classpath automatically when the Pentaho Aggregation Designer starts.

Source: Pentaho

If you want to learn more about it, please visit the link below:
http://blog.professorcoruja.com/2010/11/melhore-performance-de-seus-cubos-olap.html

Monday, November 08, 2010

Criando Uma Caixa Para Exibir Códigos HTML - Blogger

Amigo leitor,

Encontrei um post bacana explicando como colocar códigos dentro do blog.

Eu testei e funcionou.

Link:

http://www.noticiaeblog.com/2010/03/criando-uma-caixa-para-exibir-codigos.html

Melhore a performance de seus Cubos OLAP criando tabelas Agregadas no Pentaho usando o PAD (Pentaho Aggregation Designer)

Amigo leitor,

Um tempo atrás fiz a documentação "Melhore a performance de seus Cubos OLAP criando tabelas Agregadas no Pentaho" e gostaria de compartilhar.

Para acessar o link Google Docs desta documentação, clique aqui.


O que são tabelas agregadas?

Tabelas agregadas são tabelas sumarizadas que armazenam dados em níveis mais elevados do que quando foram inicialmente capturados e armazenados.


Por que eu preciso criar tabelas agregadas?

Cria-se tabelas agregadas com o objetivo de aumentar a performance de um cubo OLAP.

Como criar tabelas agregadas no Pentaho?

A forma mais fácil e rápida para se criar tabelas agregadas no Pentaho é utilizar o PAD (Pentaho Aggregation Designer).

O que é o PAD (Pentaho Aggregation Designer)?

Uma ferramenta gráfica desenvolvida em Java para a criação de tabelas agregadas.



Onde eu faço a descarga/download do PAD (Pentaho Aggregation Designer)?

Até o momento a versão mais recente e estável do PAD é a versão 1.2.0.

Para baixar, clique no link abaixo:

http://sourceforge.net/projects/mondrian/files/aggregation%20designer/1.2.0-stable/pad-ce-1.2.0-stable.tar.gz/download

Outras versões do PAD encontram-se no link abaixo:

http://sourceforge.net/projects/mondrian/files/

Como configurar o Mondrian para reconhecer as tabelas agregadas?

É necessário informar ao Mondrian OLAP Server que as tabelas agregadas existem, para isso adicione as linhas abaixo no arquivo Mondrian.properties localizado em pentaho-solutions\system\mondrian (BI Server 3.5)

mondrian.rolap.aggregates.Use=true
mondrian.rolap.aggregates.Read=true

Feito isso, reinicie o BI Server.

Como habilitar o log MDX e SQL no BI Server 3.5?

Quando uma consulta MDX é executada, o Mondrian transforma essa consulta MDX em uma consulta SQL. Em alguns casos você precisa de mais detalhes, como por exemplo saber se o Mondrian está usando as tabelas agregadas.

Para isso:

Edite o arquivo log4j.xml localizado na pasta \tomcat\webapps\pentaho\WEB-INF\classes

Descomente as linhas abaixo:





<!-- ========================================================= -->
<!-- Special Log File specifically for Mondrian -->
<!-- ========================================================= -->


<appender name="MONDRIAN" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="mondrian.log"/>
<param name="Append" value="false"/>
<param name="MaxFileSize" value="500KB"/>
<param name="MaxBackupIndex" value="1"/>

<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
</layout>
</appender>

<category name="mondrian">
<priority value="DEBUG"/>
<appender-ref ref="MONDRIAN"/>
</category>



<!-- ========================================================= -->
<!-- Special Log File specifically for Mondrian MDX Statements -->
<!-- ========================================================= -->

<appender name="MDXLOG" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="mondrian_mdx.log"/>
<param name="Append" value="false"/>
<param name="MaxFileSize" value="500KB"/>
<param name="MaxBackupIndex" value="1"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
</layout>
</appender>

<category name="mondrian.mdx">
<priority value="DEBUG"/>
<appender-ref ref="MDXLOG"/>
</category>


<!-- ========================================================= -->
<!-- Special Log File specifically for Mondrian SQL Statements -->
<!-- ========================================================= -->


<appender name="SQLLOG" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="mondrian_sql.log"/>
<param name="Append" value="false"/>
<param name="MaxFileSize" value="500KB"/>
<param name="MaxBackupIndex" value="1"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
</layout>
</appender>

<category name="mondrian.sql">
<priority value="DEBUG"/>
<appender-ref ref="SQLLOG"/>
</category>





Se você quer que o SQL também seja mostrado, adicione a linha abaixo no arquivo mondrian.properties localizado no arquivo pentaho-solutions\system\mondrian

mondrian.rolap.generate.formatted.sql=true

Reinicie o servidor e procure pelos arquivos mondrian.log, mondrian_sql.log e mondrian_mdx.log na pasta /tomcat/bin.

Como analisar se a query realmente está sendo realizada no PostgreSQL?

Uma das formas é habilitar o log do PostgreSQL caso o seu DW (Data Warehouse) seja o PostgreSQL.
log_statement = all

Adicione a linha abaixo no arquivo postgresql.conf
log_statement = 'all' (linha provável: 354)

Reiniciar o posgres

Links relacionados

Sim, abaixo os links encontrados:

http://mondrian.pentaho.com/documentation/schema.php

http://sourceforge.net/projects/mondrian/files/

http://julianhyde.blogspot.com/2008/10/pentaho-20-brings-good-things.html

http://www.willgorman.com/?p=30

http://diethardsteiner.blogspot.com/2009/07/tutorial-aggregated-tables-for-mondrian_6998.html

Os textos abaixo em inglês foram extraídos do arquivo Pentaho_ce_aggregation_designer_UG_v1.0.pdf (Documentação da Pentaho sobre o PAD)

Pentaho Aggregation Designer Overview

The Pentaho Aggregation Designer simplifies the creation and deployment of aggregate tables that improve the performance of your Pentaho Analysis (Mondrian) OLAP cubes. Pentaho Analysis is a pure, relational OLAP engine that works solely with the data stored in your relational database rather than providing its own multidimensional data storage model. This simplifies deployment and data management, but places limitations on performance when working with very large data sets (fact tables with more than 10 million records and/or cubes with a high cardinality of levels and members). To improve performance in these scenarios, Pentaho Analysis supports aggregate tables. Aggregate tables coexist with the base fact table and contain pre-aggregated measures built from the fact table. This improves performance by enabling the Mondrian engine to fulfill certain summary level queries from the smaller aggregate table versus aggregating a large number of individual facts from the base fact table.


The Pentaho Aggregation Designer provides you with a simple interface that allows you to create

aggregate tables from levels within the dimensions you specify. Based on these selections, the

Aggregation Designer generates the Data Definition Language (DDL) for creating the aggregate

tables, the Data Manipulation Language (DML) for populating them, and an updated Mondrian

schema which references the new aggregate tables. If you are unfamiliar with aggregate table

design concepts, the Aggregation Designer also includes an intelligent adviser that evaluates the

structure and cardinality of your OLAP cube and recommends some initial aggregate tables to

create for improving performance.


PAD - Installation Instructions

The pad-open-1.0-xx.zip file contains all the libraries and script files necessary to run Pentaho
Aggregation Designer. To install the Pentaho Aggregation Designer, unzip this file into a directory of your choice.

To launch the Aggregation Designer on Windows...

Run the startaggregationdesigner.bat script located in the root of your installation directory.

To launch the Aggregation Designer on Linux...
Run the startaggregationdesigner.sh script located in the root of your installation directory.

CAUTION: Place your JDBC driver JARs in the Drivers directory. Once in this directory, the drivers are added to the classpath automatically when the Pentaho Aggregation Designer starts.