Pour lancer mysql dans le terminal
/usr/local/mysql/bin/mysql --host=127.0.0.1 --user=root --password=
use "Atlant 2007_08_04_2008"
mardi 16 juin 2009
mardi 26 mai 2009
Ubuntu 9.04 sur MacosX
Premier essai avec Parallel Desktop 4. L'installation se passe bien mais les Parallels tools sont incompatibles ce qui est pénible. En plus Parallel ne communique pratiquement pas. Ils sont nuls.
Je veux tenter vmware mais découvre VirtualBox 2.2.2 gratuit. Je tente et ça marche plutôt pas mal !
Voici un résumé:
Chargement de la version 32bits de Ubuntu 9.04
Création d'un disque virtuel dans virtualbox et définir le lecteur optique comme étant sur l'image disque iso précédemment chargée
Lancement de l'installation et redémarrage
Lors de la configuration de la machine virtuelle, le seul point important est de ne pas activer les effets 3D sur les paramètres d'affichage.
Installer les additions via le menu Périphérique -> Installer les additions invités
Voir ici:
http://www.commentcamarche.net/faq/sujet-7576-virtualbox-installer-les-additions-client-dans-ubuntu
Ensuite j'ai voulu mettre à jour Openoffice en 3.1
Désintaller la 3.0:
sudo apt-get remove openoffice*
sudo aptitude purge openoffice.org-core
(Je ne comprends pas ce que je fais mais ça a marché)
Charger la distribution Debian de OpenOffice
La décompacter
ouvrir un terminal et aller dans le dossier de la distribution par cd et faire un glisser-déposé du dossier de la distribution:
Taper:
sudo dpkg -i DEBS/*.deb
sudo dpkg -i DEBS/desktop-integration/*.deb
Il y a un problème car l'environnement java JRE n'est pas présent ce qui empêche d'installer des extensions.
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
Pour que le sudo ne demande plus de mot de passe:
sudo visudo
Mettre sans commentaire
%sudo ALL=NOPASSWD: ALL
ctrl X pour sauver
sudo adduser toto sudo
avec toto l'utilisateur
après je fais sudo -u toto
(ca ne marche pas toujours, je ne comprends pas pourquoi)
Pour monter un dossier partagé mgi dans le dossier '/home/mgi/Bureau/Mount'
Il faut d'abord le déclarer dans la configuration de VirtualBox
puis :
sudo mount -t vboxsf mgi '/home/mgi/Bureau/Mount'
C'est là où c'est intéressant que le sudo ne demande pas le mot de passe car je mets cette commande dans /etc/rc.local et au démarrage, le dossier est directement accessible.
Je veux tenter vmware mais découvre VirtualBox 2.2.2 gratuit. Je tente et ça marche plutôt pas mal !
Voici un résumé:
Chargement de la version 32bits de Ubuntu 9.04
Création d'un disque virtuel dans virtualbox et définir le lecteur optique comme étant sur l'image disque iso précédemment chargée
Lancement de l'installation et redémarrage
Lors de la configuration de la machine virtuelle, le seul point important est de ne pas activer les effets 3D sur les paramètres d'affichage.
Installer les additions via le menu Périphérique -> Installer les additions invités
Voir ici:
http://www.commentcamarche.net/faq/sujet-7576-virtualbox-installer-les-additions-client-dans-ubuntu
Ensuite j'ai voulu mettre à jour Openoffice en 3.1
Désintaller la 3.0:
sudo apt-get remove openoffice*
sudo aptitude purge openoffice.org-core
(Je ne comprends pas ce que je fais mais ça a marché)
Charger la distribution Debian de OpenOffice
La décompacter
ouvrir un terminal et aller dans le dossier de la distribution par cd et faire un glisser-déposé du dossier de la distribution:
Taper:
sudo dpkg -i DEBS/*.deb
sudo dpkg -i DEBS/desktop-integration/*.deb
Il y a un problème car l'environnement java JRE n'est pas présent ce qui empêche d'installer des extensions.
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
Pour que le sudo ne demande plus de mot de passe:
sudo visudo
Mettre sans commentaire
%sudo ALL=NOPASSWD: ALL
ctrl X pour sauver
sudo adduser toto sudo
avec toto l'utilisateur
après je fais sudo -u toto
(ca ne marche pas toujours, je ne comprends pas pourquoi)
Pour monter un dossier partagé mgi dans le dossier '/home/mgi/Bureau/Mount'
Il faut d'abord le déclarer dans la configuration de VirtualBox
puis :
sudo mount -t vboxsf mgi '/home/mgi/Bureau/Mount'
C'est là où c'est intéressant que le sudo ne demande pas le mot de passe car je mets cette commande dans /etc/rc.local et au démarrage, le dossier est directement accessible.
lundi 11 mai 2009
Deep sleep
Activate: sudo pmset -a hibernatemode 1
Desactivate: sudo pmset -a hibernatemode 0
The content of RAM is here:/var/vm/sleepimage
To erase it:
sudo rm /var/vm/sleepimage
Desactivate: sudo pmset -a hibernatemode 0
The content of RAM is here:/var/vm/sleepimage
To erase it:
sudo rm /var/vm/sleepimage
mardi 5 mai 2009
Nombre aléatoire normal sur Excel
How to Calculate a Random Number from a Normal Distribution
Remember that the NORMINV function returns a value given a probability:
NORMINV(probability, mean, standard_dev)
Also, remember that RAND() function returns a random number between 0 and 1. That is, RAND() generates random probabilities. Therefore, it seems logical that you could use the NORMINV function to calculate a random number from a normal distribution, using this formula:
=NORMINV(RAND(), mean, standard_dev)
However, Jerry W. Lewis -- a former Excel MVP and a professional statistician -- offers a stern comment about this approach. "Using NORMINV(RAND(),...) to generate Normal variates is totally unacceptable prior to Excel XP, and is only marginal in XP. This is because of inadequacies in NORMINV and in the tails of NORMDIST itself."
"NORMINV prior to Excel XP produced a very un-normal fraction of values around 6 million standard deviations from the mean," Jerry wrote. "This is due to inaccuracies in the implementation of NORMDIST and NORMINV. Excel XP brought those values into a less obviously wrong location, but otherwise did little to improve the situation. NORMINV in Excel 2003 is a decent implementation."
Instead, Jerry recommends the Box-Muller method described here: http://mathworld.wolfram.com/Box-MullerTransformation.html
This method, he wrote, is limited only by the inadequacies of the RAND() function prior to Excel 2003, which had unacceptable autocorrelation.
The Box-Muller approach suggests that Excel users should use this formula to calculate a random number from a normal distribution:
=SQRT(-2*LN(RAND()))*SIN(2*PI()*RAND())
The Box-Muller method is mathematically exact, Jerry writes, if implemented with a perfect uniform random number generator and infinite precision.
Remember that the NORMINV function returns a value given a probability:
NORMINV(probability, mean, standard_dev)
Also, remember that RAND() function returns a random number between 0 and 1. That is, RAND() generates random probabilities. Therefore, it seems logical that you could use the NORMINV function to calculate a random number from a normal distribution, using this formula:
=NORMINV(RAND(), mean, standard_dev)
However, Jerry W. Lewis -- a former Excel MVP and a professional statistician -- offers a stern comment about this approach. "Using NORMINV(RAND(),...) to generate Normal variates is totally unacceptable prior to Excel XP, and is only marginal in XP. This is because of inadequacies in NORMINV and in the tails of NORMDIST itself."
"NORMINV prior to Excel XP produced a very un-normal fraction of values around 6 million standard deviations from the mean," Jerry wrote. "This is due to inaccuracies in the implementation of NORMDIST and NORMINV. Excel XP brought those values into a less obviously wrong location, but otherwise did little to improve the situation. NORMINV in Excel 2003 is a decent implementation."
Instead, Jerry recommends the Box-Muller method described here: http://mathworld.wolfram.com/Box-MullerTransformation.html
This method, he wrote, is limited only by the inadequacies of the RAND() function prior to Excel 2003, which had unacceptable autocorrelation.
The Box-Muller approach suggests that Excel users should use this formula to calculate a random number from a normal distribution:
=SQRT(-2*LN(RAND()))*SIN(2*PI()*RAND())
The Box-Muller method is mathematically exact, Jerry writes, if implemented with a perfect uniform random number generator and infinite precision.
mercredi 15 avril 2009
Thunderbird 2.0.0.21, opening attachment
Each time an attachment is opened and click again, it is loaded again and a new copy of the attachment appears even if it was already present. Not fun
mardi 14 avril 2009
Parallel 4 does not find the bootcamp partition
A conflict seems to occur between Macfuse and the NTFS-3G component and Parallel. Both cannot be run at the same time. Unmout the bootcamp volume before to use it in parallel.
To do that, select the partition and use cmd-E. If the partition is normal seen because its name bagins with ., use it on the latteral bar.
Back to the configuration, save the configuration and its run again
To do that, select the partition and use cmd-E. If the partition is normal seen because its name bagins with ., use it on the latteral bar.
Back to the configuration, save the configuration and its run again
TimeMachine
From MacFixIt
Possible reasons and fixes for Time Machine slowdowns
Time Machine has been a great backup solution that has for the most part worked quite well; however it has not been without its glitches. Despite the majority of initial problems being addressed by Apple, there will be times when the backup process seems to just hang or stall out, without giving any apparent errors or notifications.
To easily check out Time Machine logs and track down problems and exactly what Time Machine is doing, download the "Time Machine Buddy" widget, which will display the TM logs in the dashboard.
Hanging may also prevent other operating system functionality, causing spinning beachballs and the inability to shut down when the backups are going. This type of behavior usually indicates the system resources are not accessible to the system when the system is expecting them to be. For instance, if an external drive is not responding as it should, the system may hang while it waits for a response from the drive. There are several reasons why a Time Machine drive may suddenly be inaccessible:
Drive malfunction.
If the drive is making clicking sounds, or doesn't appear properly either on the Desktop or in Disk Utility, then there may be a problem with the drive. For external drives, low power to the drive can cause the system to hang.
Volume corruption.
While the disk may be fine, if the formatting or partitioning of the drive has problems, then the drive will not be properly accessible by the system.
Drives being put to sleep.
The energy-saver setting to put drives to sleep whenever possible can cause them to go into a state where they won't wake up properly. This depends on the drive itself, but while the system waits for the drive, you can experience a hang.
For drive errors, you can try running Disk Utility to check for and repair errors on the drive, or you can more thoroughly do this with third-party disk utility software such as "Disk Warrior," "Drive Genius," "Disk Tools Pro," or "Tech Tool Pro." Checking both the boot drive and the Time Machine drive for errors is recommended.
Beyond drive-specific issues, there can be incompatibilities both with other system resources and third-party applications, which can cause Time Machine slowdowns. If you have antivirus software running, many times this can interfere with Time Machine's functions, especially if you have live scanning or "on-access" scanning enabled. Turning off these settings in the antivirus software may help this situation. Additionally, if you have spotlight enabled for the Time Machine drive (it is enabled by default), it can sometimes endlessly try to index the drive. As such, you can try adding the Time Machine drive to Spotlight's privacy list, and then remove it to restart indexing.
A similar thing can also be done in the terminal, which will ensure the spotlight stores are deleted and started anew:
Open Terminal
Type the following command and include a space after the command:
mdutil -E -i off
Drag the Time Machine disk to the Terminal window to enter the full path to the disk, such as the following:
mdutil -E -i off /Volumes/TMDisk/
Ensuring a space is between the "off" and the drive path, press enter
Repeat this command, changing the "off" to "on" in order to enable spotlight on the drive again.
Finally, if you are backing up over a network (especially a wireless network), backups can be slow by nature. At 54Mb, speeds of most wireless connections, you will run at a maximum of 6MB per second, which translates to 14 hours for a 300GB backup when running at optimal conditions. Given network overhead and other interferences, this can easily double and result in the backup taking a day or two. For the initial backup to a networked device, you might try plugging in the Ethernet connection, which should be at least double the speed, but up to 20 times faster than wireless.
An additional fix for slow backups can be to restart Time Machine on the drive by removing it and re-adding it in the Time Machine preferences. Doing this seems to clear various bottlenecks in Time Machine and start backups running at faster speeds again.
Possible reasons and fixes for Time Machine slowdowns
Time Machine has been a great backup solution that has for the most part worked quite well; however it has not been without its glitches. Despite the majority of initial problems being addressed by Apple, there will be times when the backup process seems to just hang or stall out, without giving any apparent errors or notifications.
To easily check out Time Machine logs and track down problems and exactly what Time Machine is doing, download the "Time Machine Buddy" widget, which will display the TM logs in the dashboard.
Hanging may also prevent other operating system functionality, causing spinning beachballs and the inability to shut down when the backups are going. This type of behavior usually indicates the system resources are not accessible to the system when the system is expecting them to be. For instance, if an external drive is not responding as it should, the system may hang while it waits for a response from the drive. There are several reasons why a Time Machine drive may suddenly be inaccessible:
Drive malfunction.
If the drive is making clicking sounds, or doesn't appear properly either on the Desktop or in Disk Utility, then there may be a problem with the drive. For external drives, low power to the drive can cause the system to hang.
Volume corruption.
While the disk may be fine, if the formatting or partitioning of the drive has problems, then the drive will not be properly accessible by the system.
Drives being put to sleep.
The energy-saver setting to put drives to sleep whenever possible can cause them to go into a state where they won't wake up properly. This depends on the drive itself, but while the system waits for the drive, you can experience a hang.
For drive errors, you can try running Disk Utility to check for and repair errors on the drive, or you can more thoroughly do this with third-party disk utility software such as "Disk Warrior," "Drive Genius," "Disk Tools Pro," or "Tech Tool Pro." Checking both the boot drive and the Time Machine drive for errors is recommended.
Beyond drive-specific issues, there can be incompatibilities both with other system resources and third-party applications, which can cause Time Machine slowdowns. If you have antivirus software running, many times this can interfere with Time Machine's functions, especially if you have live scanning or "on-access" scanning enabled. Turning off these settings in the antivirus software may help this situation. Additionally, if you have spotlight enabled for the Time Machine drive (it is enabled by default), it can sometimes endlessly try to index the drive. As such, you can try adding the Time Machine drive to Spotlight's privacy list, and then remove it to restart indexing.
A similar thing can also be done in the terminal, which will ensure the spotlight stores are deleted and started anew:
Open Terminal
Type the following command and include a space after the command:
mdutil -E -i off
Drag the Time Machine disk to the Terminal window to enter the full path to the disk, such as the following:
mdutil -E -i off /Volumes/TMDisk/
Ensuring a space is between the "off" and the drive path, press enter
Repeat this command, changing the "off" to "on" in order to enable spotlight on the drive again.
Finally, if you are backing up over a network (especially a wireless network), backups can be slow by nature. At 54Mb, speeds of most wireless connections, you will run at a maximum of 6MB per second, which translates to 14 hours for a 300GB backup when running at optimal conditions. Given network overhead and other interferences, this can easily double and result in the backup taking a day or two. For the initial backup to a networked device, you might try plugging in the Ethernet connection, which should be at least double the speed, but up to 20 times faster than wireless.
An additional fix for slow backups can be to restart Time Machine on the drive by removing it and re-adding it in the Time Machine preferences. Doing this seems to clear various bottlenecks in Time Machine and start backups running at faster speeds again.
Inscription à :
Articles (Atom)