Estava dando uma olhadinha no Forum Nokia e encontrei um artigo feito por Felipe Andrade mostrando uma animação feita em Python. A animação é simples mas é legal. Abaixo segue o link do artigo:
Posts Tagged / Códigos
Mexendo Nas Cores Das Janelas e Fontes Do Dialog
Primeiramente temos que criar um arquivo chamado .dialogrc no $HOME, dentro desse arquivo insira o código:
# ————————————-
# Krix Apolinário
# 31 de julho de 2007
# krix@krix.com.br
# ————————————-
# Tema “Black” para Dialog
# ————————————-
# $HOME/.dialogrc
# —————————
# screen
use_shadow = OFF
use_colors = ON
screen_color = (WHITE,BLACK,ON)
# box
dialog_color = (WHITE,BLACK,OFF)
title_color = (WHITE,BLACK,OFF)
border_color = (WHITE,BLACK,OFF)
# button
button_active_color = (BLACK,WHITE,OFF)
button_inactive_color = (WHITE,BLACK,OFF)
button_key_active_color = (BLACK,WHITE,OFF)
button_key_inactive_color = (WHITE,BLACK,OFF)
button_label_active_color = (BLACK,WHITE,OFF)
button_label_inactive_color = (WHITE,BLACK,OFF)
# input
inputbox_color = (WHITE,BLACK,ON)
inputbox_border_color = (WHITE,BLACK,ON)
# Menu box
menubox_color = (WHITE,BLACK,OFF)
menubox_border_color = (WHITE,BLACK,OFF)
# Menu window
item_color = (WHITE,BLACK,OFF)
item_selected_color = (BLACK,WHITE,OFF)
tag_color = (WHITE,BLACK,OFF)
tag_selected_color = (BLACK,WHITE,OFF)
tag_key_color = (WHITE,BLACK,OFF)
tag_key_selected_color = (BLACK,WHITE,OFF)
check_color = (WHITE,BLACK,OFF)
check_selected_color = (BLACK,WHITE,OFF)
uarrow_color = (WHITE,BLACK,ON)
darrow_color = (WHITE,BLACK,ON)
Onde ON ou OFF indica o “brilho” da cor.
Ai é só brincar com mudança de cores….
:wq!
Script Simples Para Saber o Tipo de Triângulo!
Na universidade na cadeira de Desenvolvimento, criávamos muitos scripts simples como o que mostrarei abaixo.
Ele está comentado já para facilitar o entendimento dos IF e ELSIF.
Basta colocar num arquivo dar permissão e executar…
Muito simples de fazer e mais ainda executar!
#!/usr/bin/perl -w # RECEBIMENTO DE DADOS. print "Entre com o valor de cada lado do triângulo:n"; print "Lado 1:n"; $v1 = ; chomp $v1; print "Lado 2:n"; $v2 = ; chomp $v2; print "Lado 3:n"; $v3 = ; chomp $v3; # O COMPRIMENTO DE UM LADO DO TRIÃNGULO É SEMPRE MENOR QUE A SOMA DOS OUTROS DOIS. if ( ( $v1 > ( $v2 + $v3 ) ) and ( $v2 > ( $v1 + $v3 ) ) and ( $v3 > ( $v1 + $v2 ) ) ) { print "Não é um triângulo.n"; } # NENHUM LADO DE UM TRIANGULO PODE SER ZERO. elsif ( ( $v1 == 0 ) or ( $v2 == 0 ) or ( $v3 == 0 ) ) { print "Nenhuma lado de um triângulo pode ser zero.n"; } # SENDO TODOS OS LADOS IGUAIS EH UM TRIANGULO EQUILATERO. elsif ( $v1 == $v2 and $v1 == $v3 and $v2 == $v3 ) { print "Ele é um triângulo equilatero.n"; } # TENDO DOIS LADOS IGUAIS SERÁ UM TRIANGULO ISOSCELES. elsif ( ( $v1 == $v2 and $v1 != $v3 ) or ( $v1 == $v3 and $v1 != $v2 ) or ( $v2 == $v3 and $v2 != $v1 ) ) { print "Ele é um triângulo isósceles.n"; } # TENDO TODOS OS LADOS DIFERENTES SERÁ ESCALENO. else { print "Ele é um triângulo escaleno.n"; } |