carbon-based lifeform. virgo supercluster
I saw this one in a supermarket in New York.
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 city you were raised in */ public class JediName { private static String capitalize(String s){ return s.substring(0,1).toUpperCase() + s.substring(1,s.length()).toLowerCase(); } private static String sub(String s, int begin, int end){ return s.substring(begin, (s.length()>=end)?end:s.length()); } public static String generate(String firstName, String lastName, String city, String mother ){ String jediFirstName = capitalize(sub(lastName, 0, 3) + sub(firstName, 0,2)); String jediLastName = capitalize(sub(mother,0,2)+ sub(city,0,3)); return jediFirstName + " " + jediLastName; } } |
I used inline conditional expression ()?: to avoid raise a IndexOutOfBoundsException when the string is to small to cut the proper size we want.
And a example of how to use it:
public class JediNameTester { public static void main(String args[]){ String myJediName = JediName.generate("Pedro", "Madeira", "Fortaleza", "Maria"); System.out.println(myJediName); } } |
My jedi name is Siljo Iruba. :)
Fifth version of my My Free Charset, now staring a char version of a Imperial Storm Trooper from the George Lucas’ Star Wars universe.
Bellow it with the complete suit.
And how without helmet.
Ps: Notice that due to a mistake in my counting, I had to jump the version number 4.
Um desenho que eu fiz a pedido do Hildeberto para fazer uma camisa do CEJUG para ele usar no Javapolis, que tem como tema desse ano o Star Wars.
Outras versões:
Ganhei dois jogos antigos originais com caixa e tudo.
Joguinhos novos
O da esquerda é o Jedi Knight, Dark Forces 2. Eu adoro jogos dentro do ambiente do Star Wars. Eu cheguei a jogar o demo desse jogo a muito, muito tempo atrás. O da direita é o Warcraft 2, um jogo que eu sempre quis ter o original porque eu adoro essa capa dele. E o melhor de tudo é que é uma versão brasileira, dublada em português que eu procurava a algum tempo. Eu não consigo nem calcular quantas horas eu já passei jogando Warcraft 2. Agora eu vou poder finalizar o jogo vendo todos os vÃdeos e jogando em português.
O próximo passo é fazer eles rodarem no Linux. Acho que com o Cedega isso não vai ser problema.
Valeu Italo!