* Visite o ALJUG - http://aljug.blogspot.com - Noticias sobre a comunidade java alagoana e do mundo * Visite o blog Mundo Gamificado www.mundogamificado.com.br - E vamos mudar o mundo! *

segunda-feira, 9 de maio de 2011

Assigning a color to integer

Hi everyone,
today I'll give an example of color assign a colorto a number when you are developing a program that has the need to present positive or negative numbers just think how to makethese numbers have something visual to identify them and I had thisproblem when he was developing a data management system, forexample in a month was July and the following month he was 8 thenwent up a point and wanted this one point is shown in green andsome data presented if negative data that shows up in red. go towork. First let's make a method that returns the desired value.

public String Comparação(){} //comparing number data

Let's go inside the body of logic, as I said it is a method of strings, I'll have to do the conversion with parseInt. I'll put something visual, such as JOptionPane.

String Numero = JOptionPane.showInputDialog("Digite um número");
int numero = Interger.parseInt(Numero);

And I keep doing logic with the if.

if(numero < 0)
{
Numero = "< html >< font color=\"red\" >" + Numero + "< / font >< / html>";
}else{
Numero = "< html>< font color=\"green\">" + Numero + "< / font>< / html>";
}


See that I needed to put the html tag to help. And in the end I put the return Number;

Ready now can test.

Until the next post.

Atribuindo cor a um inteiro

E ai pessoal, hoje eu vou dá um exemplo de cor atribuir uma cor a um número, quando você estiver desenvolvendo um programa que tem a necessidade de apresentar números positivos ou negativos logo pensamos como fazer com que esses números tenha algo visual para identifica-lós e eu tive esse problema quando estava desenvolvendo um sistema de gerenciamento de dados, por exemplo em um mês tinha 7 e no mês seguinte tinha 8 então subiu 1 ponto e queria que esse 1 ponto mostra-se na cor verde e se algum dado apresenta-se dados negativos que mostra-se na cor vermelha. vamos ao trabalho. Primeiro vamos fazer um método que retorne o valor desejado.

public String Comparação(){} //Comparar dados numéricos

Dentro vamos passar o body da lógica, como eu disse que é um método do tipo string, terei que fazer a conversão com o parseInt. Vou colocar algo visual, por exemplo, JOptionPane.

String Numero = JOptionPane.showInputDialog("Digite um número");
int numero = Interger.parseInt(Numero);

e continuo fazendo a lógica com o if.

if(numero < 0)
{
Numero = "< html >< font color=\"red\" >" + Numero + "< / font >< / html>";
}else{
Numero = "< html>< font color=\"green\">" + Numero + "< / font>< / html>";
}

Note que precisei colocar tag de html para auxiliar. E no final coloco o return Numero;

Pronto já pode testar.

Até o próximo post.




domingo, 1 de maio de 2011

Facilitating Knowledge Required - Project Management

Hello EveryBody,

Today I am posting an idea I had in class project management, when the teacher started talking about the life cycle of a project and the chapters of the PMBOK, as well as several emerging ideas about what to do on a day-to-day work also stop to think about my life easier, not decorate, but to really learn and follow. It was in one part he spoke in Scope, Time, Human Resources, Quality, Integration, Communication, Costs, Risk and Procurement.

So, in thought, I have to invent something not to forget it, and did the idea that I already shared my twitter and I will now share here on the blog.

All (Scope), demand hours (time) with people (HR) is a good product (quality) where everyone joins the team (integration) to talk (communication) on prices (costs) and unanticipated (Risk) to buy (Acquisition !)

I hope I helped you with my idea, until next time!

Facilitando o Obrigatório Saber - Gestão de Projetos

Olá pessoall,

Estou hoje postando uma ideia que tive na aula de gestão de projeto, quando o professor começou a falar do ciclo de vida de um projeto e dos capítulos do PmBok, além de surgir várias ideias sobre o que fazer no dia-a-dia no trabalho também parei para pensar em facilitar a minha vida, sem decorar, mas para aprender realmente e seguir. Foi em uma parte que ele falou em:
Escopo,Tempo,Recursos Humanos,Qualidade,Integração,Comunicação,Custos,Riscos e Aquisição.

Ai em pensei, tenho que inventar algo para não esquecer disso, e surgiu a ideia que já compartilhei no meu twitter e vou agora compartilhar aqui no blog.

Tudo(Escopo), demanda horas(Tempo) com pessoas(RH) sendo um produto bom(Qualidade) aonde junta todos da equipe(Integração) para se falar(Comunicação) sobre preços(Custos) e imprevistos(Riscos) para comprar(Aquisição)!

Espero te ajudado com minha ideia, até a próxima!