Sunday, September 14, 2008

HTML frames automatic refresh

<script type="text/javascript">
top.frames['frame1'].location.reload();
top.frames['frame2'].location.reload();
</script>

<html>
<frameset rows="50%,50%">
<frame src="TestResults.html" name="frame2">
<frame src="Hem-1.0/nunit-logs/results-nunit_32.xml" name="frame1">
<frame src="Hem-1.0/nunit-logs/results-nunit_64.xml" name="frame1">
</frameset>
</html>

Sunday, June 8, 2008

Registry (Windows autologon, colors)

  • How to do it trough the registry:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
    String Value: DefaultUserName=domain/Administrator
    String Value: DefaultPassword=up...
    String Value: AutoAdminLogon=1

    also possible is DefaultUserName=username


  • If you have a color problem from Remove server client (Ubuntu):

    XP Mode with 32 bit color + integration is possible!
    I found an easier way to get 24 bit colors with integration on here.
    1. Run regedit in XP.
    2. Navigate to [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services].
    3. Add a DWORD Value named "ColorDepth" w/o parenthesis.
    4. Right-click it, modify, then put "4" in the Value data.
    5. Restart XP mode / Reboot
  • Friday, May 30, 2008

    SVN survival kit

    > Hello, somehow when I update the repository, another username/password is being use.

    Tortoise SVN | Settings | Saved Data | Authentication Data | Clear

    That will clear the stored information, and you will be prompted for
    it the next time it's needed.

  • Other useful commands:
    - svn list svn://whatever.com
    - svn status --show-updates --verbose | sort -k 2rn | less
    - svn log --verbose --limit 10
    - svn status -u (same as --show-updates, svn status usually doesn't check the repository, except when using -u, it just add a * when a file needs updating)
    - delete directory
    - - svn delete directory
    - - svn ci -m " " directory

  • tagging
    - svn copy -m " " svn://192.168.0.1/seng/trunk/ svn://192.168.0.1/seng/tags/2.4/
    - svn move -m " " svn://192.168.0.1/seng/tags/2.4/trunk svn://192.168.0.1/seng/tags/2.4/2.4.0.a1








  • Status values
    A: Resource is scheduled for Addition
    D: Resource is scheduled for Deletion
    M: Resource has local Modifications
    C: Resource has Conflicts (changes have not been completely merged between the repository and working copy version)
    X: Resource is eXternal to this working copy (may come from another repository). See «svn:externals»
    ?: Resource is not under version control
    !: Resource is missing or incomplete (removed by another tool than Subversion)
    ~: Something is messed up
  • Sunday, May 25, 2008

    /MP C++ compilation option in VS2008

    "Multi-processor" compilation.
    Not a default, need to be added manually to the command line options.

    Thursday, May 8, 2008

    Windows admin Survival kit

  • C:\> FOR %f IN (dir c:\tmp\*.*) DO toto.exe %f param2

  • tracert.exe

  • C:\Windows\System32\drivers\etc\hosts

  • To change program that start when Windows starts

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
    RunOnce
    RunServices
    RunServicesOnce

    If what you are looking for is not there, you can check also: HKEY_CURRENT_USER
    .
  • Wednesday, April 23, 2008

    To disable the PC board speaker

    - "gestionnaire de peripheriques",
    - afficher les peripheriques caches
    - "beep", right click, "disable"

    Thursday, April 10, 2008

    MySQL survival kit





  • To start it:
    C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin>mysqld-nt.exe
    You can also start it as a service
    On Vista, the db file is:
    C:\ProgramData\MySQL\MySQL Server 5.1\data\ibdata1
  • To see the tables:
    mysql -u root
    > use mysql
    > show tables

    > CREATE TABLE cumul_bench (
    id int(11) NOT NULL auto_increment,
    test_desc varchar(100) default '',
    tstamp datetime NOT NULL default '0000-00-00 00:00:00',
    PRIMARY KEY (id)
    ) TYPE=MyISAM;

    > show tables

    > SHOW COLUMNS FROM cumul_bench
  • regex in mysql


  • WHERE cat_id REGEXP '^10.{6}$'    (start with a 10, followed by 6 digits)


    • Enable query log  in  /etc/mysql/my.cnf   (affects performances)
      • [mysqld]
      • general_log      = on
      • general_log_file = /var/log/mysql/query.log

    •