Main page

Override CSS properties in IE (Internet Explorer)


This should be used only as last resource in all other things failed.

th.sorted a, th.sortable a {
background-position: right;
background-repeat: no-repeat;
margin-right: 20px;
#margin-right: 0px; /* ie only override margin-right */
#padding-right: 10px; /* ie only */
display: block;
width: 100%;
}

Properties that start by "#..." will be read by IE only. I believe this works at least with IE6 and IE7.
Posted by Bruno Cardoso | 0 comments | Edit

PL/SQL: Loop to manually insert records into table



DECLARE
v_Counter BINARY_INTEGER := 1;
v_Field VARCHAR2(50) := 'ABCDEFGHIJK';
BEGIN
WHILE v_Counter <= 450000 LOOP
INSERT INTO TEST_TABLE VALUES (v_Field, v_Field, v_Field, v_Field, v_Field, v_Field, v_Field, v_Field, v_Field, v_Field);
v_Counter := v_Counter + 1;
END LOOP;
END;
Posted by Bruno Cardoso | 0 comments | Edit

Firefox Add-on: FaviconizeTab


Minimize the size of tabs in Firefox by showing only the favicon. Great for when you want to have some tabs permanently open.

https://addons.mozilla.org/en-US/firefox/addon/3780
Posted by Bruno Cardoso | 0 comments | Edit

Firefox Tip: Disable history.back with the backspace key


Many times I lost the content of forms because the browser decided to go back one page when I pressed the backspace key.

To disable this function, in the address field type "about:config". Accept the warning and then look for the property browser.backspace_action and change the value to "2".

Now Firefox will scroll up in the page when you press backspace instead of going back one page. Much more safer!
Posted by Bruno Cardoso | 0 comments | Edit

Java: Using System Properties in Spring XML



<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:/spring/system.properties" />
<property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
</bean>

The location property is optional but it is useful if you want to have default values.

After this you can use any System property in your Spring XML files using ${property_name} instead of hard-coded values.

You can read more about PropertyPlaceholderConfigurer here.
Posted by Bruno Cardoso | 0 comments | Edit

Windows Processes and Ports


Simple way to know which ports are being used by your processes:

Open a command line and type:
netstat -b
Posted by Bruno Cardoso | 0 comments | Edit

Salários de gestores


Capitalismo no seu melhor!

É bom não deixar cair esta notícia no esquecimento.



Posted by Bruno Cardoso | 0 comments | Edit

SyntaxHighlighter


SyntaxHighlighter is a fully functional self-contained code syntax highlighter developed in JavaScript. To get an idea of what SyntaxHighlighter is capable of, have a look at the demo page.

The project was started in 2004 and since then has gained a lot of acceptance. Version 2.0 is the new page in history of the project representing a near complete rewrite, clean up, optimization, standard compliance and new features.


This Javascript library is really useful to display highlighted code in the web browser. Here is an example using Java code:

public class HelloWorld {

public static void main(String[] args) {
System.out.println("Hello World!");
}
}

http://alexgorbatchev.com/wiki/SyntaxHighlighter

Note: If you want to use this library in blogger with the line breaks converted turned on you need to type this line in your configurations:
SyntaxHighlighter.config.bloggerMode = true;

You can read about it here.
Posted by Bruno Cardoso | 0 comments | Edit

Java no Google App Engine


Para os menos atentos, o Google lançou recentemente o suporte para Java do seu serviço Google App Engine.

Tenho andado a brincar com aquilo mas não tem corrido tão bem como eu poderia esperar. O meu objectivo inicial era colocar uma simples webapp que usasse Spring + Tiles mas não demorou muito a apareceram as primeiras dificuldades.

Segundo a equipa do GAE o servidor de desenvolvimento que é disponibilizado para o Eclipse emula o servidor de produção do GAE mas a verdade é que eu já tinha a minha webapp pronta e funcionar em desenvolmento, e no entanto, quando fiz upload para produção encontrei um problema com o Tiles.

O problema é descrito neste thread:
http://groups.google.com/group/google-appengine-java/browse_thread/thread/5a6b05c1123f9bba/d2a46bacf10b65ab

Felizmente após contactar a equipa do Tiles consegui resolver o problema usando uma versão mais actualizada da libraria 2.0.x do Tiles. Penso que a versão 2.1.x não funciona com o Spring por isso ainda não a uso.

Ultrapassado esse problema avançei para a parte de persistência de dados e fiz um pequeno e simples form para inserir dados numa tabela. Agora deparo-me com um novo problema descrito neste thread:

http://groups.google.com/group/google-appengine-java/browse_thread/thread/54aadf8164be7bf0/28ea7676c0068a2f

Basicamente o problema prende-se com o mecanismo de auto-binding das taglibs de form do Spring com os objectos Java. Num outro thread encontrei uma possível solução para o problema mas ainda terei que a testar. Será um pouco frustante não poder usar uma das melhores e mais simples vantangens do Spring.

Além disto também parece que não é permitido usar DI (injecção de dependencias) via annotations dentro da sandbox do GAE. Portanto todas as configuraçõs têm que ser feitas em XML. Não é que isso me chateie muito mas mais uma vez mostra o quanto restrito é o ambiente do GAE.

Concluíndo, após apenas algumas horas a brincar com isto e sem ainda ter feito nada de especial noto que é dificil usar librarias externas dentro do ambiente GAE por causa de todas as restrições que são feitas a nível do acesso das classes dentro do JRE.

Não sei se isto acontece apenas por ser uma "early release" ou se será algo para se manter mas se for para se manter acho que limita bastante a programação das aplicações. A ver vamos como isto evoluiu.
Posted by Bruno Cardoso | 0 comments | Edit

March 21st - World Poetry Day


Sad night, the weeper of starwind sky
Take me where the shimmering lights are fading out
Through the shadows of hate and through the fires of grace
I followed the voice in the night, beautiful as black sky,
but nothing I found
Posted by Bruno Cardoso | 1 comments | Edit

Book Review: Java Message Service by O'Reilly




I like to understand well the technologies I use in my work. This allows me to have control over them and predict problems and benefits a certain architecture decision may cause.

Because of this I start reading a couple weeks ago the book "Java Message Service" by O'Reilly. I'm about to finish it, about 20 pages to go so I decided to write here a little review about it.

I think it's a wonderful book for anyone that is approaching the technology for the first time. It's very easy to read and the author gives really simple and clean examples through out the book about each subject. The book is from 2001 so it only covers JMS API 1.0.2 but as afar as I know there hasn't been that many changes in version 1.1 (latest version). The book approaches both messaging models: publish/subscribe and point-to-point. It also talks about transactions, message persistence and tips to create a solid program.

The book give little attention to more advanced problems so you probably won't learn much if you are already experienced with JMS but if you are new to the technology I believe this is the right book for you.
Posted by Bruno Cardoso | 0 comments | Edit

... the Internet


Posted by Bruno Cardoso | 0 comments | Edit

HermesJMS





HermesJMS is an extensible console that helps you interact with JMS providers making it easy to browse or seach queues and topics, copy messages around and delete them. It fully integrates with JNDI letting you discover administered objects stored, create JMS sessions from the connection factories and use any destinations found. Many providers include a plugin that uses the native API to do non-JMS things like getting queue depths (and other statistics) or finding queue and topic names.


http://www.hermesjms.com/
Posted by Bruno Cardoso | 0 comments | Edit

Interview with the JavaFX team




Posted by Bruno Cardoso | 0 comments | Edit

Parleys.com - JavaFX videos


Parleys.com has two nice apresentations ideal for anyone getting the first steps into JavaFX.



Posted by Bruno Cardoso | 0 comments | Edit

Display Tag Library - Table sorting/exporting



Overview
The display tag library is an open source suite of custom tags that provide high-level web presentation patterns which will work in an MVC model. The library provides a significant amount of functionality while still being easy to use.


What can I do with it?
Actually the display tag library can just... display tables! Give it a list of objects and it will handle column display, sorting, paging, cropping, grouping, exporting, smart linking and decoration of a table in a customizable XHTML style.


The tables in the sample images below were generated from lists using the tag:




http://displaytag.sourceforge.net/
Posted by Bruno Cardoso | 0 comments | Edit

Ubuntu Pocket Guide and Reference





The ultimate Ubuntu book!

Ubuntu Pocket Guide and Reference is now available! Written by award-winning author Keir Thomas, Ubuntu Pocket Guide and Reference is a totally unique and concise guide for everyday Ubuntu use.

* Focuses on core competencies and background knowledge needed to be an expert Ubuntu user;
* Readable, accessible, and easy to understand—even if you've never used Linux before;
* 100% new and original! Written from the ground-up to cover Ubuntu 8.04 and 8.10.

"A great resource covering Ubuntu from A to Z without all the extra fluff"
Ryan Troy, administrator, Ubuntuforums.org



I might just give Ubuntu another try thanks to this book.

http://www.ubuntupocketguide.com/
Posted by Bruno Cardoso | 0 comments | Edit

Javapassion.com - JavaFX Online Course




30th Jan 2009 starts another online course given by Sang Shin at JavaPassion.com.

This time the subject will be JavaFX.

http://www.javapassion.com/javafx/
Posted by Bruno Cardoso | 0 comments | Edit

PuTTY Connection Manager


PuTTY Connection Manager is a free PuTTY Client Add-on for Windows platforms which goal is to provide a solution for managing multiple PuTTY instances.





http://puttycm.free.fr/
Posted by Bruno Cardoso | 0 comments | Edit

"Prós e Contras" e "Corredor do Poder"


"Prós e Contras" e "Corredor do Poder" são dois exemplos de programas de debate televisivo que, pessoalmente, gosto de ver. Infelizmente nem sempre o tempo me permite que os consiga acompanhar, portanto, fiquei bastante contente ao descobrir à uns tempos atrás que é possível ver todos os debates já feitos através do site do canal de televisão, neste caso, a RTP1.

Ficam aqui os links para quem estiver interessado:

"Prós e Contras"
"Corredor do Poder"
Posted by Bruno Cardoso | 0 comments | Edit

Java4k Games


Kevin Glass made already two submissions for the Java4k 2009 Contest that use a simple physics engine.





Click on each image to check out the games.
Posted by Bruno Cardoso | 0 comments | Edit

Java4K 2009 - Games Contest





What is Java4K?
The Java4K competition is a game programmer competition. The goal of the competition is to create the best game possible in Java. So what's the catch? There is a 4KB limit! That means maximum of 4096 bytes! You can read the competition rules for more details on this.

But why 4KB, and not 8KB or 6KB? The answer to that question is simple. 4KB is the smallest unit of file possible on most operating systems, if you create a file that contains only one character (or one byte) it takes up 4KB on the disk. Along with that fact, mere 4KB seem to be just the right size, anything more and it would matter if you had a good artist doing your graphics or if you had 10x more time than the other developers. 4KB seems to be limitating enough, in other words it's a perfect fit for 1 person to work on, it wouldn't be practical for a large team, consisting of programmers and artists, to work on a 4KB game, it makes it more fair.

If you're interested in creating a game and submitting it into the Java4K competition then we recommend you visit the Java 4K Wiki Page, which should help you understand the fundamentals, and the JavaGaming.org forums, where most of the 4K developers hang out at. You'll also need to create an account on this site to submit your game.

Short History
This all started back in 2002 when Lloyd Lee (aka mlk) hosted the first contest (2002-2003), which was hosted at JGO (JavaGaming.org) forums and also Sun Microsystem Java forums. A year later the contest was held again, but this time Matt Campbell (aka woogley) managing it. He put up the site javaunlimited.net, where the contest was hosted three times in a row; 2004-2005, 2005-2006 and 2006-2007. Once it became clear that Matt was not going to manage the 2007-2008 competition, then Java4K.com website was kick-started by Arni Arent (aka appel) and Joakim Johnsson (aka jojoh) in December 2007.
Posted by Bruno Cardoso | 0 comments | Edit

Google Tech Talks




Google Tech Talks is a channel in YouTube full with very interesting videos about many different subjects.

Here is an example:

Applets Reloaded: the New Java Plug-In

Posted by Bruno Cardoso | 0 comments | Edit

Redhotchess.com




Redhotchess.com is a great website to play correspondence chess against players all over the world. As a non-subscriber you get to play up to 6 games simultaneously.

Features
Red Hot Chess supports turn-based online chess with thousands of people from all over the globe. You choose who and when you play. Games don't have to be finished in one sitting - your opponent doesn't even have to be online as you make your moves. You can also play multiple simultaneous games.

* An active chess community with over 100,000 members.
* All boards viewable online, so there is no need to set up a conventional board for your games.
* Quick start options for new users, either use a wizard to find suitable opponents after registration or offer a game to anyone using the 'open invite' feature.
* Feature-rich interface including an interactive analysis board for experimentation with lines or reviewing the game history.
* Optional email notifications when it is your turn to move, each including a quick link direct to your board.
* Private notebook for each player in every game.
* Over the board messaging system, chat to your opponents as you move.
* Blitz chess microsite available to all members for fast paced games.
* Chess tournaments in a variety of formats.
* Chess clans allowing team play in challenge and league formats.
Posted by Bruno Cardoso | 0 comments | Edit

Physics Invaders


I'm a huge fan of physic engines applied to games so I find this new version of the classic "Space Invaders" really awesome.



Check it out here
Posted by Bruno Cardoso | 0 comments | Edit

JCalendar - Java date chooser


JCalendar is a Java date chooser bean for graphically picking a date. JCalendar is composed of several other Java beans, a JDayChooser, a JMonthChooser and a JYearChooser. All these beans have a locale property, provide several icons (Color 16x16, Color 32x32, Mono 16x16 and Mono 32x32) and their own locale property editor. So they can easily be used in GUI builders. Also part of the package is a JDateChooser, a bean composed of an IDateEditor (for direct date editing) and a button for opening a JCalendar for selecting the date.



Check the demo or visit the website.
Posted by Bruno Cardoso | 0 comments | Edit

VLC media player




In my opinion, VLC is by far the best media player out there. It's simple, it's pratical, it can read most times of media without the need of extra codecs. Also, it's available for most operative systems.

Give it a try
Posted by Bruno Cardoso | 0 comments | Edit

Recommended Firefox add-on: Screengrab




Screengrab! is an extension for Firefox that makes it easy to save a web-page as an image. With it, you can save anything that you can see in a browser window - from a small selection, to a complete page.

Basically Screengrab! let’s you take what you want from a web-page: the entire scrollable document, just the visible bit, or a draggable selection. Screengrab will even save just the contents of an individual frame.


Go here...
Posted by Bruno Cardoso | 0 comments | Edit
Next Pages | Previous Pages
Copyright 2006-2009 Bruno Cardoso. Some rights reserved. Design by Bruno Cardoso