Archive for the ‘Software’ Category

Fixing a WindowsError in Qooxdoo’s generate.py

divendres, juny 24th, 2011

eyeOS 2.5 uses Qooxdoo  1.3. For my project I needed to include the SVG contrib by Marc Puts, so I checked if there was an easy way to do this in eyeOS.

A step in this process is calling generate.py, which is quite simple but wouldn’t finish on my laptop. Well, it happened to be a bug with a very quick patch. I sent a bug report and it has been fixed for trunk and branch 1.4.x.

Under certain circumstances generate.py can't finish its job.

I tried to build an app with
generate.py build
where build is a job defined in our (eyeOS) custom config.json

It failed with the message "global name 'WindowsError' is not defined".
The program was attempting to copy some files and the destination folder's
owner was somebody with higher privileges.

The affected file is qooxdoo-sdk/tool/pylib/misc/copytool.py
line 82:
   except WindowsError:
     try:
       os.chmod(targetPath, stat.S_IWUSR)

WindowsError is a subclass of OSError, as stated in
http://docs.python.org/library/exceptions.html#exceptions.WindowsError
"it's raised when a Windows-specific error occurs or when the error number does
not correspond to an errno value"

I suggest changing WindowsError for OSError.

I'm running Fedora 14 (2.6.35.13-92.fc14.i686)
Python 2.7 (r27:82500, Sep 16 2010, 18:03:06) 

Steps to reproduce
1. get a working qooxdoo app
2. set its owner to somebody but yourself (e.g. chown apache:apache -R myApp/ )
3. run generate.py

Mozilla Download Links plugin for Wordpress

dijous, abril 15th, 2010

Mozilla has a project called Mozilla Community Sites to help communities on building their websites. MCS is distributed in different flavours: Drupal, phpBB, MediaWiki and Wordpress.

I’m developing a Wordpress plug-in to ease the writing of articles about new versions of Mozilla software. The user may write the string [ mdl]product-version[/mdl] and it’ll be expanded  to a title and download links for all platforms, as follows.

mdl screenshot

You can download it below. The subversion web interface isn’t configured yet, so for now nobody can follow the development.

http://eduard-gamonal.net/wp-content/plugins/downloads-manager/img/icons/winzip.gif download: Mozilla Download Links 1.0 (7.47KB)
added: 14/04/2010
clicks: 508
description: First version of Mozilla Download Links plugin for Wordpress.

Please, keep in mind that the plug-in is not finished. There are some pending tasks like encapsulating all the code in a class or reducing the number of hardcoded parameters.

If you wish to use the plug-in, you may want to change some details in the code, like the $preurl and $posturl variables, or you may want to remove the urlencode() function  that wraps $link. This may be configurable via the Wordpress Control Panel in future versions.

LG KU990 viewty without shutter sound

dimecres, octubre 14th, 2009

Two weeks ago I bought an LG KU990 viewty on eBay. It was locked (Vodafone), so at first I had to unlock it, obviously. After that, my techie sense wanted me to make some research on Java apps and capabilites of the device. I found that I could connect it to my computer and access the core file systems, and I could edit them! :D

One of the worst things of this device is the shutter sound of the camera. When the user turns the camera on, the autofocus and the shutter will make a noise to alert everybody around the user that a picture is going to be taken. So, let’s get rid off that sound:

We’ll use the mobile phone on Windows with its drivers installed and a tool called EFS Media Builder, that you can find with an easy and quick search. Follow this tutorial with screenshots to learn how to connect your phone and access the core files. The tutorial itself is about how to make a back-up of the firmware and anyway, you should do it first and it shows how to reach the core files.

Once you’re in, with EFS File Explorer, go to TOTO/media/sounds/default sounds/ and rename the 6 files with a name like “shutter*” to something like “shutter*.bak”. Refresh, rename TOTO to LGAPP again, and disconnect. Now turn on your device and enjoy your silent camera.

Sage rocks!

divendres, juliol 3rd, 2009

When I studied some Calculus at uni, we had to use Maple. Maple is a good software, but it isn’t free and it’s obscenely expensive. By that time I knew a project called Sage; it was difficult to install and use and I trashed the package.

This afternoon, at Jornades de programari lliure, William Stein (associate professor of Mathematics at the University of Washington) made a short course about Sage, a free open source mathematical software. It’s been very pleasant, entertaining, and very interesting. With just a few indications we understood the basis of Sage and made some light algebra, 2D and 3D graphics. Indications are available here.

(més…)

Java plug-in for Firefox 3.5 and GNU/Linux

dijous, juliol 2nd, 2009

The Java plug-in for Firefox 3.5 is, as usual, a nightmare for GNU/Linux users. I’m in love with Debian, but I wanted Firefox, so I installed it. I got the flash plugin and some add-ons, but Java… There was no way to have it working.

Just look at the magic:

First of all, check you have JRE installed and where is it. I do that with

debian:/usr/lib/jvm/java-gcj/jre# update-alternatives –config java

Hi ha 4 alternatives que proveeixin «java».

Selecció     Alternativa
———————————————–
1    /usr/bin/gij-4.3
*+        2    /usr/lib/jvm/java-gcj/jre/bin/java
3    /usr/lib/jvm/java-6-sun/jre/bin/java
4    /usr/bin/gij-4.2

Premeu retorn per a mantenir l’opció per defecte[*], o introduïu un número de selecció: 3
Using ‘/usr/lib/jvm/java-6-sun/jre/bin/java’ to provide ‘java’.
debian:/usr/lib/jvm/java-gcj/jre#

I chose the third option, but please get your favourite flavour. Keep in mind that my Firefox is in /home/edu/firefox .

(més…)


Entra