msgbartop
msgbarbottom

01 mar 12 Find

Lister dans le répertoire toto/ tous les fichiers crées il y a -40 minutes

find toto/ -type f -mmin -40 -exec ls -rtla {} \;

Une fois qu’on aura vérifié que ça donne le bon résultat, on pourra effacer les fichiers en question remplacer le

-exec ls {}

par

-exec rm {}

Tags:

21 fév 12 Mismach entre 32 et 64 bits

Voici un extrait des problèmes après compilation de mon programme gcc

toto.o, file was built for i386 which is not the architecture being linked (x86_64)

C’est un problème entre du 32 et 64 bits.
Voici comment j’ai résolu le problème:

export CPPFLAGS=-m64
export CXXFLAGS=-m64
export LDFLAGS=-m64

faites attention car ça peut écraser ces variables si elles ont été définies…
ne pas oublier que
que le mode verbose de CPP peut apporter pas mal d’aide
export CPPVERBOSE=1

21 fév 12 Créer un compte iTunes App Store sans carte bancaire

Quand j’ai eu mon mac sous Lion je me suis dit que c’était quand même abusé de devoir mettre mon numéro de carte de crédit simplement pour récupérer Xcode (qui en plus est gratos).
Voici un lien permettant d’ouvrir un compte iTunes sans carte de crédit (merci gabriel)

Créer un compte iTunes App Store sans carte bancaire.

Cela dit j’ai pas testé et j’ai mis comme un c.. mon numéro de carte de crédit. J’attends vos feed-back.

01 fév 12 Divers SHELL

Comparer le contenu de 2 répertoires (dir1 & did 2). On peut utiliser rsync mais en fait le plus simple est d’utiliser diff:

diff -rq dir1 dir2
 
-r  --recursive  Recursively compare any subdirectories found
-q  --brief  Output only whether files differ

Tags:

27 jan 12 Some CERN ROOT stuff

  • Find the maximum x abscissa of a variable from a tuple:
  • Sampler0->Draw("E") (event if there is no display)
    double *b = Sampler0->GetV1()
    TMath::MaxElement(#entries,b)
  • You have a 3D histo and you are looking at which bins correspond the global bin N :
  • int x,y,z ; 
    histo->GetBinXYZ(N,x,y,z)

    24 oct 11 Configuration plein écran Ubuntu sous VirtualBox

    J’ai installé VirtualBox sur un portable (DELL E6410) sous Windows7 (avec cette def : 1600×900). J’ai voulu tester 2 machines Linux : la CernVM (qui je crois est une redhat) et la dernière Ubuntu 11.10. Ces deux versions de Linux ne posent pas réellement de problème d’install.

    Le soucis que j’ai eu est l’impossibilité de passer en mode plein écran avec la Ubuntu. J’étais limité à 800×600 ce qui était assez frustrant. Après avoir pas mal joué avec le /etc/X11/xorg.conf j’ai finalement décidé de récupérer celui de la cernVM, que je vous fournis ici en cadeau.

    Section "ServerLayout"
    	Identifier     "Default Layout"
    	Screen         "Default Screen" 0 0
    	InputDevice    "vboxmouse" "CorePointer"
    	InputDevice    "Default Keyboard" "CoreKeyboard"
    EndSection
     
    Section "Module"
    	Load  "extmod"
    	Load  "dbe"
    	Load  "dri"
    	Load  "glx"
    	Load  "freetype"
    EndSection
     
    Section "InputDevice"
    	Identifier  "vboxmouse"
    	Driver      "vboxmouse"
    	Option	    "CorePointer"
    	Option	    "Protocol" "auto"
    	Option	    "Buttons" "5"
    	Opvtion	    "ZAxisMapping" "4 5"
    	Option	    "Device" "/dev/input/mice"
    EndSection
     
    Section "InputDevice"
     
        # Option      "XkbLayout" "de"
    	Identifier  "Default Keyboard"
    	Driver      "kbd"
    	Option	    "XkbLayout" "fr"
    EndSection
     
    Section "Monitor"
    	Identifier   "Configured Monitor"
    	ModeLine     "1920x1200" 193.2 1920 2048 2256 2592 1200 1201 1204 1242 -hsync +vsync
    	ModeLine     "1920x1050" 168.0 1920 2040 2248 2576 1050 1051 1054 1087 -hsync +vsync
    	ModeLine     "1600x1200" 161.0 1600 1704 1880 2160 1200 1201 1204 1242 -hsync +vsync
    	ModeLine     "1680x1050" 147.1 1680 1784 1968 2256 1050 1051 1054 1087 -hsync +vsync
    	ModeLine     "1400x1050" 122.6 1400 1488 1640 1880 1050 1051 1054 1087 -hsync +vsync
    	ModeLine     "1440x900" 106.5 1440 1520 1672 1904 900 901 904 932 -hsync +vsync
    	ModeLine     "1280x1024" 108.9 1280 1360 1496 1712 1024 1025 1028 1060 -hsync +vsync
    	ModeLine     "1280x800" 83.5 1280 1344 1480 1680 800 801 804 828 -hsync +vsync
    	ModeLine     "1280x700" 72.4 1280 1336 1472 1664 700 701 704 725 -hsync +vsync
    	ModeLine     "1024x768" 64.1 1024 1080 1184 1344 768 769 772 795 -hsync +vsync
    EndSection
     
    Section "Device"
    	Identifier  "Configured Video Device"
    	Driver      "vboxvideo"
    EndSection
     
    Section "Screen"
    	Identifier "Default Screen"
    	Device     "Configured Video Device"
    	Monitor    "Configured Monitor"
    	SubSection "Display"
     
      #CERNVM_DISPLAY_MODE#
    		Viewport   0 0
    		Depth     24
    		Modes    "1920x1200"
    	EndSubSection
    EndSection
     
    Section "DRI"
    	Mode         0666
    EndSection

    Commentaire nouveau
    Finalement cette configuration n’etait pas si bonne que ca … j’ai décidé d’updater la carte graphique (c’est décris sur cette page)

    sudo add-apt-repository ppa:ubuntu-x-swat/x-updates 
    sudo apt-get update
    sudo apt-get install nvidia-current 
    sudo apt-get install nvidia-settings

    Tags: , ,

    19 juil 11 Modifier le clavier azerty en qwerty sur windows

    Alors voila, lorsque on fait une installation Windows en français et qu’on veut utiliser un clavier qwerty et ben on est eu… enfin pas si on tombe sur cette page :)

    Description du problème
    Dans Windows(7) en bas à droite du bureau on peut modifier clavier azerty FR en clavier qwerty EN mais impossible de sélectionner de manière définitive et donc on est obligé sans cesse de faire cette opération.
    Pour configurer votre clavier de manière définitive il faut passer par l’éditeur de registre (regedit).

    Voici comment faire (merci Roland)
    lancer regedit (Démarrez -> Exécuter -> regedit)
    Aller dans

    HKEY_CURRENT_USER

    puis

    keyboard layout

    et enfin

    Preload

    Sur la droite supprimer la ligne qui correspond au clavier francais à savoir 0000040C
    et le tour est joué.

    Pour faire cette configuration aussi au démarrage de votre session

    HKEY_USERS

    puis

    .Default

    et enfin

    keyboard layout

    Sur la droite supprimer la ligne qui correspond au clavier francais à savoir 0000040C
    et le tour est joué.

    Tags: , , ,

    17 déc 09 Grid

    First of all you can have a look onto this web page (also this web page http://www.apc.univ-paris7.fr/APCMediaWiki/UtiliserGap -in french-, merci Tristan).

    I give here some useful  commands to submit jobs onto the grid.

    voms-proxy-init -valid=1000:00 --voms superbvo.org

    WMS: Workload Management System

    Definition of WMS took from Italian Grid Page

    The Workload Management System (WMS) is a software subsystem of the gLite suite which is responsible for distributing and managing tasks across computing and storage resources available on a Grid.

    To know the WMS for YOURVO

    lcg-infosites --vo YOURVO wms

    It should be something like:

    https://TOTO.TOTO:7443/glite_wms_wmproxy_server

    To send test job using a particular WMS

    glite-wms-job-submit -a -e https://TOTO.TOTO:7443/glite_wms_wmproxy_server -o out test.jdl

    Job status

    glite-wms-job-status JobId

    To retrieve job

    glite-wms-job-output JobId

    To copy a file on your SE

    lcg-cr -d YOUR_SE --vo your_vo file:`pwd`/YOUR_FILE -l lfn:/YOUR_LFC_DATAZONE/YOUR_FILE

    If you want to run on 64 bits WNs, used this following line in your jdl

    Requirements = (other.GlueHostArchitecturePlatformType == "x86_64");

    If you want to run on SL5 machines, used this following line in your jdl

    Requirements = (other.GlueHostOperatingSystemRelease >= 5.0);

    To retrieve a file from a SE, you need first of all to get the GUID of the file:
    First of all you can have a look onto this web page (also this web page http://www.apc.univ-paris7.fr/APCMediaWiki/UtiliserGap -in french-, merci Tristan).

    I give here some useful commands to submit jobs onto the grid.

    voms-proxy-init -valid=1000:00 --voms superbvo.org

    WMS: Workload Management System

    Definition of WMS took from Italian Grid Page

    The Workload Management System (WMS) is a software subsystem of the gLite suite which is responsible for distributing and managing tasks across computing and storage resources available on a Grid.

    To know the WMS for YOURVO

    lcg-infosites --vo YOURVO wms

    It should be something like:

    https://TOTO.TOTO:7443/glite_wms_wmproxy_server

    To send test job using a particular WMS

    glite-wms-job-submit -a -e https://TOTO.TOTO:7443/glite_wms_wmproxy_server -o out test.jdl

    Job status

    glite-wms-job-status JobId

    To retrieve job

    glite-wms-job-output JobId

    To copy a file on your SE

    lcg-cr -d YOUR_SE --vo your_vo file:`pwd`/YOUR_FILE -l lfn:/YOUR_LFC_DATAZONE/YOUR_FILE

    If you want to run on 64 bits WNs, used this following line in your jdl

    Requirements = (other.GlueHostArchitecturePlatformType == "x86_64");

    If you want to run on SL5 machines, used this following line in your jdl

    Requirements = (other.GlueHostOperatingSystemRelease >= 5.0);

    To retrieve a file from a SE you need to have first of all the GUID:

    lcg-lg --vo superbvo.org lfn:/grid/superbvo.org/dadoun/data/ppsim5GeVaa-2.m_1.cm.root

    guid:891376c7-75d6-475d-be6e-54dc8fbc7087
    And then

    lcg-cp --vo superbvo.org guid:891376c7-75d6-475d-be6e-54dc8fbc7087 file:`pwd`/ppsim5GeVaa-2.m_1.cm.root

    Tags: ,

    17 août 09 Mes plugins WordPress

    Tags: ,

    27 avr 09 « Non-PDF special ignored! »

    J’utilise TeXShop sur mon mac pour editer et compiler mes fichiers TeX .
    Lorsque je lançais la compile, j’avais :
    « Non-PDF special ignored! »
    et aucun graphique sur mon document de sortie.
    J’ai rajouté ca au début de mon fichier TeX:
    %!TEX TS-program = latex
    et dans préferences composition selectionné:
    Latex dans format par défaut
    et
    Tex+DVI dans script par défaut
    voily

    Tags: , ,

    Switch to our mobile site