come with me, on the way I'll explain.
Duke Mom
No trackbacks yet.
Getting enviroment information on Android
16 March, 2010 - 10:18 am
Tags: Android, Eclipse, Java, programming, who am i, whoami
Posted in english | 3 comments
This is a simple program I wrote called Who Am I that shows informations about the device which it is running. Which can be useful for developers and maybe advanced users.
Download:
WhoAmI.tar.bz2 – Eclipse project. It’s configured for Android platform 4 (1.6) but should work without problems in newer Android platform versions.
WhoAmI.apk – Application installation Android [...]
The Caps Lock Java Socket Server
27 February, 2010 - 9:39 pm
Tags: caps lock, Java, programming, socket, upcase
Posted in english | No comments
Here is a simple server for those who are starting studying sockets or just needs a simple socket server example for reuse while writing your own behavior.
Features:
A client should enter a string and the server would answer the same string, with each symbol in up case, when possible.
Default port at 8080.
One client at time.
No multi [...]
Beware the locale
22 February, 2010 - 5:16 pm
Tags: development, i18n, Java, JUnit, locale, programming, String, teste unitário, toString, unit testing
Posted in english | No comments
Today I was programming a toString method for a class widely used in a application, using the very useful String.format that provides a C’s like printf formatter.
@Override
public String toString() {
return String.format("VO[a: %.1f, b: %.1f, c: %.1f]", a, b, a+b);
}
%.1f means a float with one digit precision after the dot separator. The code [...]
Java Font List
5 January, 2010 - 6:10 pm
Tags: AWT, fonts, Java, JVM, Larabie, Larabie Fonts, programming
Posted in english | Comments Off
Here’s a program that lists fonts available in your JVM. You can also set the environment variable JAVA_FONTS to specify the font directory.
import java.awt.GraphicsEnvironment;
public class ListFonts {
public static void main(String args[]){
GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
for(String font:e.getAvailableFontFamilyNames()){
System.out.println(font);
}
}
}
By using pipes you can count how many fonts you have:
java ListFonts|wc -l
On my Ubuntu machine here I got 556 because [...]
Tiled TMX Map Loader for Pygame
I’m using the Tiled Map Editor for a while, I even wrote that tutorial about it. It’s a general purpose tile map editor, written in Java but now migrating to C++ with Qt, that can be easily used with my set of free pixelart tiles.
A map done with Tiled is stored in a file with [...]
Cabeça-de-Radar
7 December, 2009 - 6:40 pm
Tags: arte, cabeça de radar, CC-BY-SA, creative commons, homem cabeça de radar, Inkscape, SVG, vetorial
Posted in português | 3 comments
Acho que levei uma multa ontem. Eram duas da manhã, uma rua vazia. Vi um flash. Conferi hoje e vi aqui havia sim um radar lá.
Fiz esse desenho pra expressar minha frustração.
Código-fonte: cabeca_radar.svg
Iracema Guardiã
19 November, 2009 - 4:03 pm
Tags: arte, creative commons, escultura, Inkscape, Iracema, Iracema Guardiã, Vetorização, Zenon Barreto
Posted in português | 3 comments
Vetorização a partir desta foto da estátua Iracema Guardiã de Zenon Barreto.
Código-fonte: iracema_guardia.svg
Java: Accessing Private Members
14 November, 2009 - 4:27 am
Tags: Class, Douglas Adams, Field, getclass, getDeclaredField, Hack, Hacking, Java, Life, Object, Object-Oriented Programming, OOP, Reflection
Posted in english | 3 comments
Using reflection to change the accessibility of a private object field and access it at runtime.
import java.lang.reflect.Field;
class Life {
private int meaning = 42;
}
class Hack {
public static void main(String args[]){
Life life = new Life();
[...]
Jedi Name
8 November, 2009 - 5:47 pm
Tags: Java, Jedi, joke, programming, star wars
Posted in english | No comments
A simple Java class that calculates your Jedi name based on your first, last name, mother’s maiden name and the city you grew up.
/*
Jedi first name: 1st 3 letters of last name + 1st 2 letters of first name
Jedi last name: 1st 2 letters of mother’s maiden name + 1st 3 letters of [...]
The Fork Bomb Tattoo
22 October, 2009 - 9:43 am
Tags: aesthetics, art, computação, computer science, Dereka, fork bomb, forkbomb, Freedom of Tattoo, geek, hacker, Linux, nerd, philosophical, philosophy, tattoo, tatuagem, unix
Posted in english | 6 comments
I thought about these two problems my entire life.
Graphical arts have a significant role in everything I do. I always expressed my feelings thorough graphical drawings. First on paper, so notebooks, then walls and others surfaces like the computer screen. But the possibility of transform my body, my own skin in a art canvas always [...]














15 May, 2008 - 11:11 am
ola tudo bem??
eu sei que vc hoje não esta falando
e peço perdão por isso
mas preciso de ajuda
do notebook
mas estou com problemas
quero comprar um notebook da amazon
modelo AMZ A 201
mas não sei o que tem dentro
ex:marca e modelo de de placa mãe, marca e modelo de memoria ram,
e de todo o resto eu preciso muito saber é muito importante pra mim
vc pode me ajudar
por favor
desde ja agradeço muito
15 May, 2008 - 11:16 am
eu de novo se voce achar alguma informação quanto a isso
vc pode me mandar por e-mail
us.souza29@gmail.com
muito obrigado
4 August, 2008 - 4:09 pm
thats cute.