03 June 2010

Mount a samba share on unix

sudo smbmount //server_address/directory /home/share -o username=,password=,uid=1000,mask=000

02 June 2010

Resize images on MAC by command-line

sips -s format jpeg --resampleWidth 800 *.JPG

it will resize all the JPG of the current directory to 800px width

04 May 2010

GPS: gpsd and google earth ?

how to use a gps with google earth on unix (ubuntu) ?

first we need gpsd: http://gpsd.berlios.de/
start the gps: gpsd -N -n -D 2 /dev/ttyUSB1
good tools to undertsand gpsd and your gps are:
gpsprof -f cycle (synchro)
xgps (check if it works)
gpsmon (display what the gps return - sirf or nmea (start a line with $GPRMC) - or change the config of the gps)

My gps does not return NMEA data but SiRF
(try to change to nmea with gpsctl -n)

so, I had to create fake/virtual serial port and use gpspipe to translate SiRF to NMEA.
Socat does the job and even better, you can execute a command to redirect in the serial port:

sudo apt-get install socat
socat -d -d pty,raw,echo=0 "exec:gpspipe -r,pty,raw,echo=0"
> it will give you the name of the port, example: /dev/pts/6

Then I have used a python script GEgpsd to read NMEA data and update a kml file:
http://www2.warwick.ac.uk/fac/sci/csc/people/computingstaff/jaroslaw_zachwieja/gegpsd/

You can then open a kml file with googleearth, where the file generated by GEgpsd is linked and says to be refreshed.

That's it .. thanks for this awesome free tools.

01 March 2010

sfSslRequirementPlugin symfony 1.4 quick fix

Maybe not the best solution, but if you want to make it works quickly,
just add

$actionName = strtolower($actionName);

in lib/action/sfSslRequirementActionMixin.class.php

line 65 in method sslRequired();

25 February 2010

position element form symfony

$this->widgetSchema->moveField('name', sfWidgetFormSchema::FIRST);
$this->widgetSchema->moveField('title', sfWidgetFormSchema::AFTER, 'name');

13 October 2009

Plugin for Silverstipe

Release of a silverstripe module : SSDropDownMenu
http://code.google.com/p/ssdropdownmenu/
css menu and ddsmoothmenu

03 October 2009

These : Systèmes multi-agents

Mon projet de recherche de DEA sur les sytèmes multi-agents.

http://docs.google.com/fileview?id=0B2LXMvSKtt9VNDEwNzc1N2EtNTE1YS00NzFmLWFlYjktNzdhNjQwNjg4OTJm&hl=en

L'Intelligence Artificielle Distribuée (IAD) est apparue vers la fin des années 1970. Hewitt, confronté à un problème de résolution de théorèmes, proposa une solution en 1977 avec des entités actives appelées « acteurs » et considéra la résolution comme une confrontation de points de vue.
D'un autre côté, Erman (1980) élabora l'idée du tableau noir (" blackboard ") avec le projet HERSAY II. Le tableau noir est un emplacement réservé pour la transition des informations entre les différents agents. Chaque agent peut venir le consulter.
C'est donc à partir de ces premières réalisations que sont apparus des modèles, composés de « petits » programmes – appelés entités –, certes intelligents, mais aussi capables de communiquer et de s’organiser en un système plus complexe et interagissant avec l’environnement.
Ces systèmes sont appelés systèmes multi-agents (SMA) : chaque agent est une entité, l'ensemble des agents forme un tout. Ces ensembles illustrent l' idée sous jacente du philosophe Blaise Pascal que « Le tout est plus que la somme des parties ».