Archive for the ‘Software’ Category

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…)

FAT32 with SD cards on GNU/Linux or GParted: FAT32 grayed out

dissabte, maig 2nd, 2009

If you are a GNU/Linux user, you may have forgotten that there is a lot of people behaving in a strange way, like using NTFS or FAT32. At least, I sometimes do. Today I got a pendrive already formatted (FAT32) and, when I plugged it in, I pretended to delete its contents. Debian told me «I can’t: it’s read only». It wasn’t read only, though. It had been  auto-mounted with standard methods. Since I wanted to delete all contents, I reckoned I could format it. Okay, it’s not one of the best practices because it’s a SD card and has a writing limit, but I just use it once a month.

debian:/home/edu# gparted

I umount /dev/sdf in order to format it, and… fat32 is grayed out. I can just use ext2, ext3, swap and reiserfs.

What nobody told me is that I need the dosfstools package:

debian:/home/edu# apt-get install dosfstools

And after that, everything worked fine. I now own a fat32 formatted 1Gb device.

PROLOG: introducció a la programació lògica – 2

dilluns, abril 13th, 2009

Avís: article orientat a estudiants d’Enginyeries en Informàtica de la FIBUPC. Basat en les explicacions a classe del professor Enric Rodríguez.

La programació lògica es cursa en les assignatures d’«introducció a la lògica» i a «lògica per a la informàtica». La utilitat directa per un fíber és: calcular respostes pel concurs «Cifras y letras» o trobar una manera de resoldre el problema de missioners i caníbals. També es fa servir per calcular horaris de l’ACB o els mateixos de la FIB.

Problema de concatenació

Inducció per concatenació:

concat([], L, L).
concat([X|Y1], Y2, [X|Y3]) :- concat(Y1, Y2, Y3).

Vegem que si L1, L2 són llistes i L3 és una variable, aleshores la consulta

edu@debian:~$ prolog
GNU Prolog 1.3.0
By Daniel Diaz
Copyright (C) 1999-2007 Daniel Diaz
| ?- concat(L1, L2, L3)

instancia (unifica) L3 amb la concatenació de L1 i L2.

Cas base

L1 és la llista buida []. Per la primera clàusula, tenim que L3 queda instanciada a L2, de manera que L3 s’instancia correctament.

Cas inductiu

Suposem que la llista L1 té almenys un element, és a dir, és de la forma [X | Y1]. Y1 amb longitud n+1. Aleshores, per hipòtesi d’inducció, la consulta

| ?- concat(Y1, L2, L3)

on Y3 és una variable, instancia Y3 a la concatenació de Y1 i Y2. Y1 té longitud n.
Per la segona clàusula, la consulta

| ?- concat([X|Y1], L2, L3).

instancia L3 a [X|Y3], que és la concatenació de X, Y1, Y2. Per tant, L3 queda instanciada correctament.


Entra