Saturday, December 26, 2009

ImageMagick

  • Windows7 / VisualStudio 2008 , To build it, get:
  • ftp://ftp.imagemagick.org/pub/ImageMagick/windows/ImageMagick-windows.zip unzip
    When you open, build, and run: VisualMagick/configure/configure.sln
    you get: VisualMagick/VisualStaticMT.sln
    Now you can build ImageMagick.
    To build a release of an exe using ImageMagick, I ran into VisualStudio libraries conflicts using STATIC_MAGICK. I built the "dynamic" ImageMagick using configure, and then I could have it to work fairly easily.
  • To convert pictures using the command line:
    C:\tools\ImageMagick-6.5.8\VisualMagick\bin>convert "C:\Users\x\Downloads\2010-05-16 16.05.43.jpg" -resize 10% toto.jpg
  • Ubuntu
  • $tar xvfz ImageMagick.tar.gz
    $ cd ImageMagick-6.6.3-1
    $ ./configure
    $ make
    $ sudo make install
    ImageMagick-6.7.8-8/utilities/convert DSC_6093.JPG   -resize 40%   out2.jpg

Monday, December 7, 2009

Axis2 Web Service (Tomcat v6)

These are informations that complements
http://people.apache.org/~ruchithf/hw-axis2/
http://www.roseindia.net/webservices/axis2/axis2-client.shtml

  • Install Tomcat6/Axis2 1.5.1 (Axis2 servlet)
    Tomcat configuration on Windows:
    C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0\conf\server.xml
  • Install eclipse-jee-galileo-SR1-win32.zip (version 3.5)
    (to be able to build "Dynamic Web Project")
  • install "Service Archive Wizard - Eclipse Plug-in" (aar generation). You can get it from the axis2 page: download/tools

  • Do File/New/"Dynamic Web Project"
    (Target Runtime: "Apache Tomcat v6.0")
  • New Package
  • New ws Class
  • Create a file services.xml in WebContent/META-INF (that is what will be exposed as service features).
  • Create the aar file:
    File/New/Others/AxisServerArchiver
    - "Class File Location": C:\EclipseWorkSpace\MyWs\build\classes\
    - do "not include .class only"
    - Next
    - Skip WSDL
    - Next
    - Next
    - Set the service XML file: "c:\eclipseworkspace\myws\webcontent\meta-inf\services.xml"
    - Next
    - "Ouput file location": C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis2\WEB-INF\services
    - WARNING: on Windows 7, eventhough I enter this path, the aar file ends up in
    C:\Users\lefla\AppData\Local\VirtualStore
    not sure why, must be a privilege problem. I have to copy the aar file in the correct folder afterwards.

    Restart Tomcat

    if you did:

    public String echo(String value) {
    return "Hello : " + value;
    }

    You should see the wsdl generated when click on your service from:
    http://127.0.0.1:8082/axis2/services/listServices
    (need to "view source" on the blank page on Chrome browser)

    and also you should see the echo response (with "null" as parameter)
    < ns:echoResponse >
    < ns:return > Hello : null < /ns:return >
    < /ns:echoResponse >
    http://127.0.0.1:8080/axis2/services/myws/echo

  • If you want a Java client for the Axis WS:
    The following command creates the two stubs java files for the client:
    (if you use the -t option, it also generates the client java test source code)
    C:\tmp>wsdl2java -uri http://127.0.0.1:8080/axis2/services/myws?wsdl -o client

  • If you want to use a JSP to connect to the WS
    You can create a new "Dynamic Web Project"
    Reuse the same stub files as in the Java client above in your project
    I had to add httpcore-4.0.jar and berkeleydb-1.5.0.jar (sleepycat collections classes) to the project WebContent/WEB-INF/lib.
    Put your .jsp files in WebContent
    Once done, you can right-click "Export" as a WAR file and put it in
    C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0\webapps\MyJspProject.war
    You have to remove the folder MyJspProject in
    C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0\webapps
    before restarting Tomcat.
    Look at
    C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0\logs\localhost.20xx-xx-xx.log to debug

  • Please note the typo in the ruchithf apache tutorial. According to the original echo(String value) command, the associated client instruction should be:
    request.setValue("Hello world");
    and not:
    request.setParam0("Hello world");
  • Tuesday, November 10, 2009

    Some Java Application Servers and Application Frameworks

  • Application Servers, JSP enabled (javax.servlet container):
    • TomCat from Apache Servlet container, no EJBs (Approx 6 Megabytes)
    • Jetty no EJBs, light, run on Android
    • JBoss from RedHat JSP, Servlets and EJBs
    • Blazix from Desiderata Soft JSP, Servlets and EJBs (1.5 Megabytes)
    • WebLogic from BEA Systems JSP, Servlets and EJBs (Approx 40 Megabytes)
    • WebSphere from IBM JSP, Servlets and EJBs (Approx 100 Megabytes)
    • GlassFish from Sun/Oracle JSP, Servlets and EJBs
  • Application Frameworks
    • Spring - for the Java platform and .NET Framework - alternative to, replacement for, or even addition to the EJB model. - light weight
    • Tapestry - builds upon the standard Java Servlet API - integrates with any kind of backend, including JEE, Spring and Hibernate. - successor of HiveMind - light weight
    • Hibernate - many Java frameworks use Hibernate as a persistence layer, which can generate a database schema at runtime capable of persisting the necessary information. This allows the application designer to design business objects without needing to explicitly define a database schema. - Hibernate is an object-relational mapping (ORM) library for the Java language, providing a framework for mapping an object-oriented domain model to a traditional relational database. Hibernate solves object-relational impedance mismatch problems by replacing direct persistence-related database accesses with high-level object handling functions. - Hibernate's primary feature is mapping from Java classes to database tables (and from Java data types to SQL data types). Hibernate also provides data query and retrieval facilities. Hibernate generates the SQL calls and relieves the developer from manual result set handling and object conversion, keeping the application portable to all supported SQL databases, with database portability delivered at very little performance overhead. - Hibernate can use the XML file or the annotation to maintain the database schema.
    • Struts - cleanly separate the model (application logic that interacts with a database) from the view (HTML pages presented to the client) and the controller (instance that passes information between view and model). Struts provides the controller (a servlet known as ActionServlet) and facilitates the writing of templates for the view or presentation layer (typically in JSP, but XML/XSLT and Velocity are also supported). - face competititon from "light weight" MVC frameworks such as Spring MVC, Stripes, Wicket, MyFaces and Tapestry
    • JBoss Seam - managed by Gavin King, initiator of Hibernate - Seam combines the two frameworks Enterprise JavaBeans (EJB3) and JavaServer Faces (JSF).
    • See also: - java-source.net
  • Saturday, October 24, 2009

    Apache 2 on Ubuntu


  • install sudo apt-get install apache2 sudo apt-get install apache2ctl apache2ctl start
  • Document root
    DocumentRoot value is set in the file:
    /etc/apache2/sites-available/default

    Note that, by default, the value is /var/www/

  • config
    /etc/apache2

  • logs
    /var/log/apache2
  • to check that nothing else is running on port 80
  • lsof -i:80    (including docker publish)
  • Saturday, October 10, 2009

    Your time is limited

    "Your time is limited, so don't waste it living someone else's life. Don't be trapped by dogma — which is living with the results of other people's thinking. Don't let the noise of others' opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary."
    ...........................................................................Steve Jobs delivered on June 12, 2005 at Stanford

    Wednesday, September 30, 2009

    mysql on Ubuntu







  • mysql -h 192.168.50.93 -P 3307 -u legui -p     (warning, you need "-p")
  • mysql --host 192.168.0.145 --port 3307 --user=search_wip -pxxxxxxxx
  • show databases 
  • use xx


  • Install
    sudo apt-get install mysql-client
    sudo apt-get install mysql-server
    Add this source to your sources.list:
    deb http://security.ubuntu.com/ubuntu hardy-security main
    do an apt-get update

  • If the mysql runs on 192.168.0.11
    sudo vi /etc/mysql/my.cnf
    then
    # skip-external-locking
    bind-address = 192.168.0.11
  • it prints this at restart:
    * Checking for corrupt, not cleanly closed and upgrade needing tables.
    It is not an error, it just says that "mysql is" Checking for...
  • to start
    sudo /etc/init.d/mysql start
    (don't forget the sudo, otherwise it fails and not very explicit in the error)
  • Enable firewall mysql ports to be open using
    sudo firestarter
    or if the server doesn't have kde
    sudo /sbin/iptables -A INPUT -i eth0 -s 192.168.0.20/24 -p tcp --destination-port 3306 -j ACCEPT
  • If running a jdbc access from the same machine on Ubuntu, do this first
    mysql -u root -p
    mysql> GRANT ALL ON GG.* TO 'root'@'192.168.0.11';
    or
    mysql> GRANT ALL ON test.* TO 'root'@'192.168.0.11' IDENTIFIED BY 'password' WITH GRANT OPTION;
    mysql> FLUSH PRIVILEGES;
    mysql> commit;
    From phpmysql, you should see a user with the following privileges:
    root 192.168.0.11 global ALL PRIVILEGES Oui
  • You can then connect through DbVisualizer (not putting the db name yet). You can then create the db
    mysql> CREATE DATABASE GG;
    mysql> CREATE TABLE j_2 ( Id int AUTO_INCREMENT PRIMARY KEY, Date Date, Myint integer, Url varchar(255) );
    mysql> commit;
    etc
  • log
    /var/log/mysql/mysql.log
  • helpful
    SHOW DATABASES;
    SHOW GRANTS FOR 'root'@localhost;
    SELECT * FROM j_3 INTO OUTFILE '/toto.txt';
  • Note: This one is a good post:
    http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html




  • To use phpmyadmin
    you need a root password:

    mysql -u root

    >UPDATE mysql.user SET Password=PASSWORD('admin') WHERE User='root'
    >FLUSH PRIVILEGES;

    Also, don't forget to create the link
    sudo ln -s /usr/share/phpmyadmin/ phpmyadmin

    /var/www/phpmyadmin/libraries$ vi config.inc.php
    $cfg['PmaAbsoluteUri'] = 'localhost/phpmyadmin/';
    $cfg['Servers'][$i]['host'] = '192.168.0.5';
    $cfg['Servers'][$i]['password'] = 'mypassword';

    Also, you may want to add the line (it seems it is 3600 sec by default)
    /etc/phpmyadmin$ vi config.inc.php
    $cfg['LoginCookieValidity'] = 10000000;

  • About export/import
    Export:
    mysql -u root -p
    mysql> use test
    mysql> select * from jg_seeds_3 INTO OUTFILE '/tmp/jg_seeds_3.txt'
    Import:
    $ sudo mysqlimport -u root -p GG /tmp/jg_seeds_3.txt
    -> password (mysql pw)
    Please note that the file base name jg_seeds_3 has to match the table name in GG. The file extension (txt here doesn't matter). Put the input file in /tmp since mysql user has all privileges on the folder and all its parents.
  • mysql dump
  • dump:
    mysqldump -h bo-sql-lb-master.be.p1.canon -u bill -p --max_allowed_packet=1073741824 --lock-tables=false stats_fr tb_popu > popu-all.sql
    load:
    mysql -h hostname -u user --password=password databasename < filename

    Fedora admin survival kit

  • Network config
    /usr/bin/system-config-network

    /etc/rc.d/init.d/
    /etc/sysconfig/network

    files in /etc/sysconfig/network-scripts/*

  • Upgrade from Fedora 5 to Fedora 10:
    I get the error: Error enabling swap device hdb3: No such file or directory
    The /etc/fstab on your upgrade partition does not reference a valid swap partition.

    What I did is rename hdb3 by sdb3 in fstab. Then the install worked fine.
    After that, I had to change in /etc/X11/xorg.conf: Driver "i810" to Driver "vesa"

    After that I start having applications that crashed with different errors. I started to be tired of this upgrade, I decided to re-install totally. The Fedora10 installer froze when it asked me for license, no keyboard, mouse inactive (eventhough it was active in the first screen of the installer). I said OK, let's give Ubuntu a try... Using Ubuntu 8.04 I finally could install without issue, no video configuration to change, no application crashing, Ubuntu works for me.
  • Monday, September 7, 2009

    free.fr

  • PagePerso propose MySql and PostgreSQL but these have to be used from the free.fr server, cannot be accessed directly from the outside.
  • When using the db url jdbc:postgresql://sql.Free.fr/esicdtek:5432
    it seems it is not using the server name at all
  • if you want to put a public machine on your personal freebox LAN, I recommend putting the public machine on your main subnet and using a new router to create a subnet with all the other machines. See
    http://www.sangoma.com/support/tutorials/tcp_ip.html
  • Tuesday, September 1, 2009

    SSII

  • Regie: Délégation de personnel chez le client
  • Forfait: Projets que la SSII traite chez elle
  • Infogerence: cas particulier d'outsourcing, correspond aussi bien à la maintenance du parc, qu'à la gestion de projets, qu'à la sécurité informatique et même aux formations.
  • Thursday, August 13, 2009

    Heritrix 1

      About Heritrix binaries:
    • To start the Heritrix server at 127.0.0.1:8080, just right click the project on Eclipse and run it.
    • The ARC Writer crawl output goes to:
      C:\tools\Heritrix\archive-crawler\heritrix\jobs
    • Unzip IAH-20090813141952-00000-stutzmann.arc.gz with 7zip
    • run perl C:\tools\Heritrix\ArcExtractor\ArcExtractor.pl
      You get crawled files with names changed, but extensions preserved
    • change in bin/heritrix: JAVA_OPTS=" -Xmx512M"
    • You can shut down through the web interface: http://127.0.0.1:8080/
      About the dev version on Vista:
    • I build the heritrix-1.15.4.jar on Windows using "maven dist" (version 1.0.2). I get a build error that is actually related to the tests (C:\Users\toto\.maven\cache\maven-test-plugin-1.6.2\plugin.jelly), but if you comment out the tests in project.xml, the jar is fine (heritrix-1.15.4.jar in C:\tools\Heritrix\archive-crawler\heritrix\target). I had to use jdk 1.5 because jdk 1.6 would not work because of tools.jar
    • I copy the jar to a Linux heritrix 1.14.3 binary install and rename the existing heritrix-1.14.3.jar to *.old
    • I run it on Linux doing:
      "bin/heritrix --bind=/ --admin=LOGIN:PASSWORD"
    • Note that if you add a writer in the jar file, you can choose it from the web interface from:
      "Profiles", edit your profile, "Modules", and writer
      About Maven (need maven 1.0.2 for Heritrix):
    • to display all the targets:
      maven -g > toto.txt
    • List of targets are in project.xml, see "build" target
    • "dist:" postgoals are described in maven.xml
    • To add a jar like mysql, you need to add it to project.properties and project.xml

    Tuesday, July 7, 2009

    Java survival kit

    - Java2 (1998)
    - Java5 (2004): Generics and enum
    - Java6 (2006)
    • Web Services
    • All developers get first-class support for writing XML web service client applications. No messing with the plumbing: You can expose your APIs as .NET interoperable web services with a simple annotation. Not your style? Want to handle the XML directly? Knock yourself out: Java SE 6 adds new parsing and XML to Java object-mapping APIs, previously only available in Java EE platform implementations or the Java Web Services Pack.
    - Java8 (LTS, 2014 )
    Java11 (LTS  2018)

      Java17 (LTS.  2021)

        - annotations

        - alternatives
          - alternatives (works with "java" and "javac")
        /usr/bin/update-alternatives --config java
        /usr/bin/update-alternatives --install

        http://askubuntu.com/questions/56104/how-can-i-install-sun-oracles-proprietary-java-jdk-6-7-8-or-jre

        - To switch from open-jdk to Sun Hotspot JDK on ubuntu:
          sudo update-alternatives --set    java    /usr/lib/jvm/jdk1.7.0_67/bin/java

        - other notes
        • keywords const and goto are reserved, even though they are not currently used
        • // @formatter:off

        • JAVA_HOME when using Java11
          • in .bash_profile:       export JAVA_HOME=$(/usr/libexec/java_home)


        .

        Monday, July 6, 2009

        Apache HTTP server on vista

        I installed apache_2.2.11-win32-x86-openssl-0.9.8i.msi on Vista on port 8080 for myself. Then, from the apache console, it tells me that there is no service, and the "start" button is disabled. The way I had to start it, is from the MS console: httpd.exe. When I start it, a Vista pop-up asks me if I want to open the firewall for this process. That's the way I start it.
        It also starts from the menu /Control Apache Server/Start Apache in Console.
        Could not start it from the "Apache Server Monitor"
        Ah also, I had to go through the security vista nightmare to add files in htdocs in Program Files.

        Friday, June 5, 2009

        Google search functions


        • Google cache for a URL:

        {-inurl:(htm|html|php) intitle:"index of" +"last modified" +"parent directory" +description +size +(wma|mp3) "DIGG"}

        Thursday, April 30, 2009

        Use a SonyEricsson phone as a modem for your PC

      • Plug your USB telephone cable into your PC, the telephone not being plugged in.
      • Start SonyEricsson PC Suite 4.0.
      • Plug the USB cable into the K800 phone
      • Don't select neither "File transfer" nor "Phone mode" on the phonee
      • Click on "connect" on the PC Suite window in the internet tab, you are done.
      • Tuesday, March 10, 2009

        Posix thread

        #include 
        #include 
        #include 
        
        void my_routine(void * arg)
        {
        printf("\n hello \n");
        }
        
        int main(int argc, char* argv[])
        {
        pthread_t th;
        pthread_attr_t attr;
        
        pthread_attr_init(&attr);
        
        int rc = pthread_create(&th, (void *)&args, (void *)my_routine, NULL);
        
        return 0;
        }
        

        Monday, March 2, 2009

        C++ survival kit

      • If you don't want somebody to instanciate your class, set the constructor private

      • Operator precedence
        http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Operator_precedence

      • Operator overloading:
        Complex Complex::operator+( Complex &other ) {
        return Complex( re + other.re, im + other.im );
        }
        


      • Dummy template
        // ---------------------------------------
        class MyPairClass
        {
        int pair_1;
        int pair_2;
        };
        
        // ---------------------------------------
        template < class T, int i > class MyTemplate
        {
        public:
        T* testFunc(T* pl);
        };
        
        template < class T, int i >
        T* MyTemplate::testFunc(T* p1) 
        {
        return p1;
        };
        
        // ---------------------------------------
        void myTemplateFunc()
        {
        
        MyPairClass * myPairClass = new MyPairClass();
        MyTemplate < MyPairClass, 2 >  myList;
        myList.testFunc(myPairClass);
        }
        


      • Access to class members
        The default access to class members (members of a class type declared using the class keyword) is private; the default access to global struct and union members is public. For either case, the current access level can be changed using the public, private, or protected keyword.

      • const array size
        const int maxarray = 255;
        char store_char[maxarray];  // allowed in C++; not allowed in C
        
      • Saturday, February 28, 2009

        Simple samba smb.conf (seen as \\server\everybody from Windows)

        [global]

        workgroup = WORKSPACE
        server string = %h server (Samba, Ubuntu)

        log file = /var/log/samba/log.%m
        syslog = 0
        security = share

        # name of the share
        [everybody]
        comment = Samba server
        path = /home/toto/everybody
        public = yes
        writeable = yes
        browseable = yes
        user = toto
        .

        Friday, February 27, 2009

        Ubuntu / Debian Survival Kit


        • Install / Packages 
          • instal .deb
            • sudo dpkg -i nomachine_5.1.26_1_amd64.deb
          • install LAMP on a fresh Ubuntu
          sudo tasksel install lamp-server
          • If you want to use the "Gnome classic" desktop instead of Unity from Ubuntu 14:
          sudo apt-get install gnome-session-fallback then reboot, and you will get the gnome icon in the user login part
          • Font: FreeSans 16 is not bad for firefox
          • dpkg -l |grep emacs (list installed packages)
          • alien (package conversions: rpm, tgz, etc). Usually not working for me when trying to convert Debian packages
          • To install a Debian package (read dpkg before, since it can mess up your config)
            sudo dpkg -i mysql-workbench-gpl-5.2.33b-1ubu1010-amd64.deb
          • aptitude install mysql-workbench
          • search:
            • apt-cache search libtool
            • or aptitude search libtool
        • Network
          • ip adress   (ifconfig is obsolete, see "ip" command)
          • restart network interface:
            • ifdown eth0
            • ifup eth0
          • Network, command line (dhcp/static)
            sudo vi /etc/network/interfaces
          • If your network is disabled, first right click on the network icon and enable connections (sometimes these get disabled at reboot)
          • NetworkManager
          • look at your /etc/resolv.conf, the first line will tell you if the network management of your machine is done through the NetworkManager server. You need to start it in case of failure: sudo /etc/init.d/network-manager restart The other network management way is sudo /etc/init.d/networking
          • If your IP is static, you need to specify your DNS servers manually
            /etc/resolv.conf, should look like this:
            search mydomain.example
            nameserver 212.27.40.254
          • # dns google nameserver 8.8.8.8 Note that resolv.conf is overwritten with another dns nameserver when going through DHCP
            To know what is the dns of a specific network interface
            nmcli device show eth0
          • Network config:
            sudo apt-get install gnome-network-admin
            network-admin (do not use sudo, otherwise, everything is grayed out)
            sudo /etc/init.d/networking restart
            (you need to use this command when you go on standby and come back on, the networking get a new IP address throuch DHCP in this case)
          • WIFI
            • To use WIFI, you need to stop firestarter. So better stop apache and samba also while you use WIFI. RPCbind port 111 remains open. If you really want to close this port too (you don't have to):
              /etc/init.d/portmap stop
            • Also, at some point NetworkManager was not working anymore, not sure why. I could not use WIFI anymore. I installed wicd and it worked fine. Useful commands to trouble shoot WIFI on Ubuntu are:
              lshw, sudo iwlist scan
              Note that when login identification is required on a web site, the WIFI connection will show alternate "connected"/"disconnected" on wicd until you login.
              wicd 1.7.0 shows "wrong password" for WPA2 (Ubuntu 10.04 LTS). Seems working with wicd 1.6. Just use the regular wifi icon on the tray.
            • wifi not working after Ubuntu suspend
              • sudo nmcli nm sleep false
            • list wifi connections
              • sudo nmcli dev wifi list
          • firewall: "sudo firestarter"
          • When using wireshark, do not forget to use sudo, otherwise, it does not see any network interface. There is no snoop on ubuntu
          • tcpdump -n -A -p -i lo host 127.0.0.1 and port 8086
          • tcpdump -n -A -p -i eth0  host 192.168.0.202 and port 8080 |grep GET
          • tcpdump -n -A -p -i lo host 127.0.0.1 and dst port  8080
          • tcpdump -n -A -p -i eth0 host 192.168.0.195 and port 12501 |grep kWords --color=auto
          • tcpdump -n -A -p -i eth0 host 192.168.4.101 and port 12560 |grep kWords --color=auto
          • sudo tcpdump -n -A -p -i bond1  host   10.64.113.173 and port 8080 |grep GET
          • tcpdump -n -A -p -i em2  host 192.168.4.188 and port 8384 |grep solr
          • tcpdump -n -A -p -i em1 |grep 10\.1\.65\.208
          • (proxy / threesint2) tcpdump -n -A -p -i bond1  host 10.64.114.35 and port 8080 |grep GET              (can be run from threesint2, not from docker)
          • [proxy vv157]# tcpdump -n -A -p -i eth1  host  10.64.115.157 and port 8080 |grep "siteId=" --color
          • some packets are filtered by tcpdump (local machine)

        • Flush RAM / Clear memory cache
          x14:/data/data_ref/DE# echo "1" > /proc/sys/vm/drop_caches
          x14:/data/data_ref/DE# echo "0" > /proc/sys/vm/drop_caches
          x14:/data/data_ref/DE# free -m

        • Config / Settings / Display
          • Need a .profile file to specify to exec .bashrc See dot files
          • compiz settings:  sudo ccsm &
          • BUG Ubuntu: "Display settings" not taken into account when using nvidia driver:
            • pkill -9 -f gnome-settings-daemon
        • Services
          • sudo service "equivalent to" sudo /etc/init.d/serviceName (start|stop|rerstart)
          • see /etc/inetd.conf : services made available by this machine over the net - see System/Administration/Services to disable samba for example
          • dpkg -S /sbin/init   - is either "upstart" or  "systemd"
            • systemd => /etc/init.d
            • upstart => /etc/init
          • service --status-all
          • initctl list
          • remove a service started at boot time
            • update-rc.d -f  hbase-master  remove
            • see also    "ls -al /etc/rc*.d/"
          • some services (updatedb / mlocate) are started from
            • /etc/cron.daily     (/etc/cron.*)
            • the way to disable this services seems to be:
              • /etc/cron.daily#   chmod -x mlocate
        • version
          cat /etc/lsb-release
          cat /etc/issue

        • CPU temperature
          • "sensors" to get processor temperature
          • The following gets the BIOS info but the system freezes shortly after that:
            - "sudo modprobe i8k force=1" to be able to use i8kctl on vostro. A folder /proc/i8ctl is created (and disappear after reboot). Seems disabled after reboot.
            - "i8kctl" to display infos
        • boot
          • /etc/rc.local
          • /etc/fstab for boot time mounts
        • To mount a remote directory on my machine:
          vi /etc/fstab (add the my_folder line)
          mkdir /mnt/my_folder
          ln -s /mnt/my_folder /my_folder
          mount -a
          df
          exportfs
        • alias
          alias h='history 50'
          alias l.='ls -ald .*'
          alias ll='ls -l'
          alias ls='ls --color=auto'
        • To get colors when using vi
          • apt-get install vim
        • To acces an NT machine file system
          from the "Places" Ubuntu file explorer:
          smb://192.168.0.22/
        • unmount Sony-Ericsson:
          sudo eject /media/PHONE
        • If mouse and keyboard are frozen at login
          sudo apt-get update
          sudo reboot
          or plug a USB mouse
        • alsa force-reload       (restart audio device)
        .

        Sunday, January 18, 2009

        Linguistics

        Anaphora / ellipsis resolution

          - anaphora resolution
          The music stopped, and that upset everyone

          - ellipsis resolution

        Toponymy
        Studies place names

        .

        Friday, January 16, 2009

        About BTree

        Hash clusters were introduced in Oracle 7 as an alternative way of indexing
        a table. Instead of randomly storing rows in arbitrary table blocks and
        using indexes to locate them (using a B-tree search), hash cluster rows are
        stored according to the key values. Each row's location is derived by its
        key value.
        .

        Wednesday, January 14, 2009

        OO survival kit

        If one has:
        class MyImplement : public MyInterface

        If the destructor of MyInterface is not virtual, then the destructor of MyImplement is not called in this case:

        MyInterface * myInterface = new MyImplement();
        delete myInterface;
        .

        Tuesday, January 13, 2009

        GAC / .NET SDK

        gacutil to manipulate the Global Assembly Cache can be found in
        C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin

        At first I tried to install the .NET SDK, but it was telling me that it was installed already. It is actually installed with Visual Studio. When you start the VisualStudio Command Prompt, the path to it is set already.