Mysql Migration Toolkit : UTF8 conversion issue

Mysql Migration Toolkit has an issue with varchar different from varchar(255) : it considers that it is not useful to force utf8 for these fields !

Here is a solution, found here :

Dans la fenêtre “Source Database”, activer le bouton “Advanced” et compléter le champ “Connection string” avec :
jdbc:jtds:sqlserver://server:1433/database;user=user;password=password;useUnicode=true;domain=

Dans la fenêtre “Target Database”, activer le bouton “Advanced” et compléter le champ “Connection string” avec :
jdbc:mysql://server:3306/?user=user&password=password&useServerPrepStmts=false&useUnicode=true

,en remplaçant bien sur “server” et “database” par leurs valeurs respectives.

Ensuite, ne pas modifier les options qui permettent de changer l’encodage des caractères : les valeurs par défaut font l’affaire. Et voilà !

tolerant php strtotime

If you want to enlarge strtotime php function to be tolerant about funny date (especially in mail header), here is a little function :

function strtotime_tolerant($time)
{
$datetime_header = strtotime($time) ;
if ($datetime_header === false)
{
if (preg_match(‘/(Wen, .*)/’, $time))
{
$time = (preg_replace(‘/(Wen,) (.*)/’, ‘Wed, ${2}’, $time));
}
if (preg_match(‘/(Sut, .*)/’, $time))
{
$time = (preg_replace(‘/(Sut,) (.*)/’, ‘Sat, ${2}’, $time));
}
if (preg_match(‘/(Tues, .*)/’, $time))
{
$time = (preg_replace(‘/(Tues,) (.*)/’, ‘Tue, ${2}’, $time));
}
if (preg_match(‘/(.* \d\d:\d\d:\d\d) (.\d{4})/’, $time, $matches))
{
$time = $matches[1].’ ‘.$matches[2];
}

if (preg_match(‘/(.* \d\d:\d\d:\d\d) (\d{4})/’, $time))
{
$preg_time = (preg_replace(‘/(.* \d\d:\d\d:\d\d) (\d{4})/’, ‘${1} +${2}’, $time));
}
if (preg_match(‘/(.* \d\d:\d\d:\d\d) (UT)$/’, $time))
{
$preg_time = (preg_replace(‘/(.* \d\d:\d\d:\d\d) (UT)$/’, ‘${1} ${2}C’, $time));
}
if (preg_match(‘/(.* \d\d:\d\d:\d\d) (CEDT)$/’, $time))
{
$preg_time = (preg_replace(‘/(.* \d\d:\d\d:\d\d) (CEDT)$/’, ‘${1} +0200’, $time));
}
if (preg_match(‘/(.* \d\d:\d\d:\d\d) (.0060)/’, $time))
{
$preg_time = (preg_replace(‘/(.* \d\d:\d\d:\d\d) (.0060)/’, ‘${1} +0100’, $time));
}

if(isset($preg_time))
{
$time = $preg_time;
}
}

return strtotime($time);
}

blink css property in IE

IE doesn’t support blinking property :

text-decoration: blink;

You can achieve this effect with (compatible FX and IE) :

.blinking_zone
{
visibility: expression((Math.floor(new Date().getTime()/500)%2)?”visible”:”hidden”);
text-decoration: blink;
}

Set free PDF, allow copy, paste, print and whatever

Somehow, manuel’s writer, vendor material’s author, think the best way to discribe their product is to lock documentation and information in a vault, protected by a user registration, and to only let them read it, no printing, coping and pasting (I’m developing solution involving writing 32bits registers, I don’t feel like typing all thoses down).
To bad, that’s not the way I conceive it: so lets unlock a PDF, and on-line though: here

Just upload, and download the new cracked/unlocked, freed PDF.

Cabine téléphonique

Réflexion du jour : pourquoi est-ce que les cabines téléphoniques d’Orange ne sont-elles pas gratuites, au moins vers les fixes en France ?

Une majorité de foyer ont des box permettant des appels illimités au chaud (ou au frais) vers un nombre incalculable de destination. Et on ne peut pas passer un coup de phone gratuitement dans une cabine qui sent l ‘urine ou dans lequel vous pourrez expérimenter la notion d’effet de serre en direct ?

J’offre donc ce coup marketing à Orange : mettez en place une grande campagne de réhabilitation de vos cabines (qui sont complétement délaissées) avec une offre d’appels gratuits vers les fixes. Votre image de marque va grimper, pour un prix tout à fait modéré.
Bonus track : pourquoi est-ce que les fixes ne sont pas directement classés dans la catégorie numéro vert ?

Taskbar, status bar, takstray on both screen with extended desktop (dual monitor)

Ubuntu 9.04, two screen, but still one taskbar, and tasktray….

Solution: Right click on a bar, add New Panel, add New Panel, etc,… as many time as needed to reach the other screen. Remove the usless extra one.

Right click add to Panel on the new taskbar: Window Selector.

Reorganize all you applet, sound etc…

Now you’ve got a wonderful one meter long desktop, with taskbar linked to the display desktop.

Dual monitor on Ubuntu 9.04 on Acer X1700

Dual monitor (HDMI and DVI, two LG22W) on Acer X1700 seems to be a problem with the open source drivers.

To get them working (extended desktop, not mirror) just follow the guide:

  1. Run the following commands:
    Code:
    wget --no-check-certificate https://www2.ati.com/drivers/linux/ati-driver-installer-9-5-x86.x86_64.run
    chmod 755 ati-driver-installer-9-5-x86.x86_64.run
    sudo ./ati-driver-installer-9-5-x86.x86_64.run --buildandinstallpkg Ubuntu/9.04
    sudo aticonfig --initial -f
  2. Reboot the system
  3. Use System > Preferences > Display to detach the monitors from each other, and set the proper resolution
  4. Log out, and back into the system

Source