A Curious Animal
Bla, bla, bla, ..., (evolution) , ..., blog, blog, blog, ...
Bla, bla, bla, ..., (evolution) , ..., blog, blog, blog, ...
Fri, 8 Jan, 2010
Probably you could think PSP is not the best device to read PDF files and also it is not intended to do so, better to play some game like Need For Speed :) Yes, I know but I'm "a curious animal" and use my PSP more read than other thing.
Some time ago I update my PSP, now runs 5.50 GEN-D firmware version, and since then Bookr doens't works, the nasty 8002014C error appears on my screen.
Well, don't ask my why but if you want to use bookr too the version that works for me is Bookr for firmware 1.0.
See bookr in action:
Fri, 1 Jan, 2010
If you, like me, loves Drupal then this post is for you.
Not much so say here, simply another site pointing to MyDrupal post that collects a bunch of nice tutorials classified depending on the user level skill (beginner, intermediate, developer):
http://mydrupal.com/drupal-tutorials
Tue, 22 Dec, 2009
Recently I was working on a AS3 project and surprisingly the handler assigned on a Sprite subclass for mouse DOUBLE_CLICK events never is fired.
If you arrive here and are in the same situation like me, then the next link is for you: http://actionscript3.blogs2k.com/2009/01/17/ActionScript%203%20-%20no-double-click-at-all%20-AS3.
If you go to first comment you could read that:
In order for the DOUBLE_CLICK event to be captured, the MovieClip, or Sprite in this case, you must first have the doubleClickEnabled property set to true.
Take also into account probably you must play too with the 'mouseChildren' property and that could be a problem when you work with some kind of scene graph objects.
Finally I would like to note one of the solutions commented to emulate the double click using simple the click event and getTimer().
const CLICK_TIME:int = 300;
var doubleTimer:int;
addEventListener(MouseEvent.CLICK, handleMouseClick);
function handleMouseClick(e:MouseEvent):void {
if (e.type == MouseEvent.CLICK) {
if (getTimer() - doubleTimer < CLICK_TIME) {
// execute code or dispatch event here
}
doubleTimer = getTimer();
}
}
Thu, 15 Oct, 2009
This post is a mini tutorial on how to create an application based on NetBeans Platform that uses the WorldWind Java virtual globe.
Before to continue, you need to have some knowledge about NetBeans Platform, WWJ and JOGL.
NetBeans Platform, similar to Eclipse RCP, is a platform which offers a set of basic functions and functionallities that are common in almost all project. The most clear examples of applications developed with these platforms are NetBeans IDE and Eclipse IDE themselves.
In the case of NetBeans Platform some features that likes me are:
WordlWind Java is a Java API to create and work with a virtual globe, something common on these days and not so easy to implement.
In contrast to WorldWind .NET which is a desktop application, WWJ is only an API, a set of classes you can use to create your own based application.
One impotant thing is WWJ works thanks to JOGL (Java binding for OpenGL API), which is a Java API to work with OpenGL and that uses a native library implementation depending on your system.
Nice question. Ok, if we can say there is any problem it will be: how to create a NetBeans module which includes the JOGL JAR files and also the native libraries so my application will be portable?
Follow the next steps and you will see there is not problem to achieve that.
Here is the list of software and versions I'm using for this example:
Install NetBeans if you don't have installed. Download WWJ and JOGL and uncompress it at some place.
Ok next is the important part of this article. The basic idea is to create a new NetBeans Platform application with two library modules, containing required JAR files for JOGL and WorldWindJava:
Select the worlwind.jar file from WWJ folder. This will create a module into your NB platform application with the next folder structure:
Select the jogl.jar and gluegen.jar files from JOGL folder. In addition to the previous step, here we need to include the native libraries JOGL needs to run. To do that you must to create a folder called release/modules/lib and copy the native libraries.
In the above image you can se the *.so files which corresponds only to the Linux native libraries. To make your application portable to other systems you must need to copy here the required *.dll or any other files.
This module will contain the code to create a TopComponent window which will show the WWJ virtual globe:
What you need to do now is to set the dependecies among the modules. WWJ module depends on JOGL one and your previous normal module will depend on WWJ and JOGL, because it will show a window with the virtual globe.
Right-click on the module name and select New > Window Component. In the next wizard step select for Position the value editor. Press next and select a name for your TopComponent class (and an icon if desired).
Open the code of your TopComponent and in the init() method add the next lines:
Model model = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
WorldWindowGLCanvas wwj = new WorldWindowGLCanvas();
wwj.setModel(model);
setLayout(new BorderLayout());
add(wwj, BorderLayout.CENTER);
You will need to import the required packages from WWJ module, which you must set as a dependency previously.
If you have followed the above steps the result you must get must be something similar to:
In addition and the benefit of use these approach is your applciation, once build a ZIP distribution, will run on different machines thanks to the native libraries attached in the 'lib' folder.
Please, feel free to set any comments you think, ideas and suggestions.
Fri, 2 Oct, 2009
I would like to have written this post some time ago but time is not something I have in exces.
This post starts when my friend Johann let me know the creation of the GeoToolkit project, a fork of GeoTools, started by one of the originals GeoTools authors. Take a look at project's history to know more details about the reasons.
Next is a simple example showing how to reproject coordinates from WSG84(EPSG:4326) to EPSG:3068 that, for those interested, I used in a program to render CityGML files in a Java 3D viewer called pTolemy3D.
public static boolean translate(GeneralDirectPosition source, GeneralDirectPosition target) {
CRSAuthorityFactory factory = AuthorityFactoryFinder.getCRSAuthorityFactory("EPSG", null);
try {
ProjectedCRS projSource = factory.createProjectedCRS("3068");
GeodeticCRS projTarget = factory.createGeographicCRS("4326");
// NOTE: This is another way to create the right projection:
// ProjectedCRS proj = (ProjectedCRS) CRS.decode("EPSG:3068");
// System.out.println("Orig: " + projSource);
// System.out.println("Target: " + projTarget);
MathTransform transform = CRS.findMathTransform(projSource, projTarget);
// System.out.println("Transform: " + transform);
try {
transform.transform(source, target);
return true;
// System.out.println("Point Source: " + psource);
// System.out.println("Point Target: " + ptarget);
} catch (MismatchedDimensionException ex) {
Logger.getLogger(GeoUtil.class.getName()).log(Level.SEVERE, null, ex);
} catch (TransformException ex) {
Logger.getLogger(GeoUtil.class.getName()).log(Level.SEVERE, null, ex);
}
} catch (NoSuchAuthorityCodeException ex) {
Logger.getLogger(GeoUtil.class.getName()).log(Level.SEVERE, null, ex);
} catch (FactoryException ex) {
Logger.getLogger(GeoUtil.class.getName()).log(Level.SEVERE, null, ex);
}
return false;
}
Not so much, but hope it will be useful for someone and hope more users start to use GeoToolkit.
Sat, 19 Sep, 2009
Sometimes you need to remember a command line tool, refresh some concepts about a programming language, etc. Because this I want to post here two nice a very useful tools: technical posters and reference cards.
I point only to two sites, but if you spend some time to find a bit more you could find other nice sites with great docs.
No doubt to put your comment and attach other sites with documentation (like scribd).
Recent comments
7 weeks 4 days ago
15 weeks 5 hours ago
1 year 2 days ago
1 year 21 weeks ago
1 year 21 weeks ago