You are looking at posts in the category Programming.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jul | ||||||
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Posted on July 23rd, 2008 by Skaber.
Categories: Programming, Linux, mozilla.
A few days passed since my first post about issues relating image quality and memory consumption in X. I gathered a few people here at Révolution Linux to do some QA on my builds integrating my Mozilla framework modifications. Unfortunately, it seemed like intensive browsing and image viewing of scaled images led to some issues with my previous patches. One of these was caused by interlaced images which wouldn’t completely render. This was actually a bug in a Thebes function which would tell me that an image had done being uncompressed while that wasn’t the case. To support interlaced images, a new flag was added to indicate that an image had not completed its several decompression passes.
Next, there was a very light glitch when scrolling in upscaled images. This was caused by how I implemented scaling and memory usage reduction. I was creating subimages first and then scaling these to fit their destination rectangle. I now proceed with scaling before selecting subimages.
As my update section was explaining, I give users more flexibility of when to manipulate images and use GDK’s bilinear interpolation to increase image quality or when to limit memory usage by a single preference variable.
Finally, this new patch should be considered the final version for bug 395260. It also could be considered a first step toward 372462 resolution. Joe is currently refactoring the whole nsThebesImage code for the Gecko 1.9.1 release and I would expect him to port my GDK manipulations to its future code.
Thin client users, enjoy a more stable Mozilla environment. Here’s a precompiled version of my patch. Feel free to try it and please report any weird behavior with image rendering.
Download my patched Firefox 3.0.1 build (x86-linux)
Download my patched Firefox 3.0.1 build (x86-win32)
Download the patch only
Posted on July 8th, 2008 by Skaber.
Categories: Programming, Linux, mozilla.
The lastest Firefox release, version 3.0, relays on the Gecko as a layout engine and libpr0n for image decompression. The underlying Cairo framework greatly improves the code portability and increases the rendering on supported platforms. Cairo is used in several projects and sounds very promising with the eventual support of glitz to benefit of 3d hardware acceleration.Thebes is the C++ code used to wrap the Cairo framework in Mozilla. It uses ImageSurfaces which get decompressed image data from libpr0n. The current design of these surfaces is to send a full pixmap (decompressed images) to X without any limitation. Then, the underlying Cairo surfaces can be painted and the Mozilla application’s memory freed. The actual image data is kept as a pixmap in X’s memory. This choice of storing the pixmaps in X instead of in the application’s memory can increase the performances when rendering image: the new visible data does not need to transfered on every scrolling event.
On the other hand, storing pixmaps in X might not be the best solution to optimize the speed of image rendering. Considering that the full pixmap needs to be transfered between the application and X, rendering the first visible frame will be slower. Also, using unlimited memory in X may steal the available ressources for other applications.
Posted on May 27th, 2008 by Skaber.
Categories: Programming, Linux.
Here are some pretty straight forward steps to quickly get a development environment based on the Eclipse IDE. The tools in this environment are
Note: Mozilla has great documentation to help building any of their application. Please have a look there before posting any question. The #developers irc.mozilla.org channel is also a good start.
This tutorial assumes you’re using Ubuntu or a similar distro.
Build and configure Firefox
1. Install required tools and Firefox dependencies
sudo apt-get install cvs distcc eclipse eclipse-cdt libcurl4-openssl-dev distccmon-gnome
sudo apt-get build-dep firefox
Posted on February 25th, 2008 by Skaber.
Categories: Projects, Programming.
The Java community is loaded with tons of applications and tools to cover every aspect of a large computer software development cycle. Our latest project, soon to be covered in a later post, uses the tools listed below. The quantity of available options requires a deep analysis of a project’s needs to find the suitable combination of tools that will positively help development.
Tools
Maven : build management and configuration - http://maven.apache.org
Hibernate : database object-relational mapping http://www.hibernate.org
Struts : web applications development - http://struts.apache.org
CruiseControl : build automation - http://cruisecontrol.sourceforge.net
Subversion : version control system - http://subversion.tigris.org
Trac : issue tracking system - http://trac.edgewall.org
JUnit : java unit test framework - http://www.junit.org
Hadoop : load-balance operations - http://hadoop.apache.org/core
Eclipse plugins
SQL Explorer : database management - http://eclipsesql.sourceforge.net
Subclipse : team source synchronisation - http://subclipse.tigris.org
Maven : http://maven.apache.org/eclipse-plugin.html
Hibernate-Tools : http://www.hibernate.org/255.html
Documentation
Project structure :
http://www.onjava.com/pub/a/onjava/2006/03/29/maven-2-0.html
http://java.sun.com/blueprints/code/projectconventions.html
SVN management (tags and branches) :
http://svnbook.red-bean.com/en/1.1/ch04.html
Installing Oracle on Solaris :
http://www.dbspecialists.com/presentations/oracle920solaris.html
Posted on February 24th, 2008 by Skaber.
Categories: Programming.
By default, Hibernate seems to map CHAR(%n) database fields to java.lang.String. It causes no problem when querying a database without comparing this field, but unfortunately, the query may fail if the String does not containt %n chars. To avoid any problem, I suggest using VARCHAR(%n) fields where %n is the max size that can have your string. If you prefer to keep CHAR(%n) fields, probably for performance matters, refer to the hibernate documentation to specify a type such as “type=CharArray’” in your mapping.
The consequence of automatically mapping a database chararray field to a String object in java causes the impossibility of using this field in WHERE clauses.
Posted on February 7th, 2008 by Skaber.
Categories: Programming.
I personnally hate the task of configuring Oracle as a DBMS. Unfortunately, many business use it since it has proven it’s stability, performance and scalability. Oracle is a good DBMS except for the IT guys who need to install it.
We were given a clean Sparc Sunblade 1000 running a brand new install of Solaris 10. The only requirement for our project was to configure Oracle to run a dedicated database server. Since we’ll eventually need high performance and probably load-balance this database between several servers, Oracle seemed the perfect solution.
First and second attempts to install an Oracle 11g database failed miserably with an out of memory error. The DBMS install would succeed but we were unable to create a new database.
Browsing the web lead to this blog post explaining our bug :
Solaris 10/Oracle: Fixing ORA-27102: out of memory Error
We had to increase the available memory for the privileged user section using this command:
prctl -n project.max-shm-memory -r -v 10G -i project 3
Good luck
Posted on July 28th, 2007 by Skaber.
Categories: Programming.
We’ve implemented the Smack API provided by Ignite Realtime which integrates a Java version of Google’s C++ Jingle library. The audio sessions over XMPP works almost out of the box using Jingle. As we needed video integration in one of our university project, we considered developing additional classes to support video format. After some nice hours of coding, we now have successfully accomplished this duty and we can post the source here with informations on how to get video working.
So here are the general steps to take to get a video session established between two parties. Please note that the way the libraries do not currently allow a simultaneous video and audio session. We might work on that in the next days.
1 - You need a XMPP server. Unfortunately, there are some differences in the Jingle integration of Google and Ignite Realtime. While we are able to connect to the GTalk server using Smack API, it is not possible to directly use Smack’s Jingle to create audio-video sessions with other GTalk users. The best thing is to use Ignitime Realtime’s Openfire application.
2 - Create users and add manage their rosters. Once the server is up, add several users via the web administration interface (http://localhost:9090). Then, the best thing is to use a XMPP client such as Ignite Realtime’s Spark application and add the users you want to be able to communicate with.
3 - Open Eclipse and get projects to compile. While this can seem quite easy for some people, it can be very painful for others. You will need 2 projects in your Eclipse workspace: the Jingle project available from a subdirectory in the Smack library and the project provided here. Both projects need a reference to smack.jar and smackx.jar. Jingle will also need to have all the jars in it’s /lib and /build/merge.
4 - Install JMF (link), open the JMF registry editor application once the installation complete. You will then have to hit detect devices to have any usb webcam found. Unfortunately for mac users, it seems like the iSight camera doesn’t get detected by the application. We have used a regular USB logitech camera for our successful tests.
5 - You will need two computers, one to act as a client and one as a server. The AVManager class has can be run has an application. The server waits for an XMPP Jingle session request while the client immediately tries to establish a connection with the first available contact on it’s roster.
Download files:
Video Jinglle Library
replace your /jingle/source/org/jivesoftware/smackx/jingle/mediaimpl/jmf
from the Smack’s 3.0.4+ source code.
CommClient project
Posted on May 22nd, 2007 by Skaber.
Categories: Projects, Programming.
Yesterday I had to find a way to compile libjingle for an eventual use in our university project. So here are a few of the requirements needed to build libjingle and then execute the few examples included in the library. The distro used to compile libjingle is Ubuntu Feisty 7.04.
First you need to install these libraries from the Synaptic Package Manager :
There are probably a few other libraries missing from the list above, you only need
LibJingle can be configure using the parameter –with-ilbc=/usr/local/
You should then be able to make libjingle.
Finally, you can execute the application call in the subfolder talk/examples/call which allows to make a vocal connection with other google talk users.
Good Luck ! If you are running in any problem, make sure you have the listed versions of the files written above.