Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    • Archives

    • Recent comments

    Windows XP Home Edition: gpedit.msc (group policy) editing via registry

    15th November 2007

    It is possible to install gpedit.msc snap-in for MMC in Windows XP Home Edition. I found the list of necessary files on pagesperso-orange.fr (in French), which also had the archive of all the necessary (again, French) files and the installation batch-file.

    Warning: you proceed at your own risk. If you do not know what you are doing – please don’t :)

    Download (original) French gpedit-pour-xp-home.zip.

    Download English gpedit for windows xp home.zip (also in 7zip archive).

    Here are instructions for manual MMC snap-in installation. Original French-version archive had a batch file which does installation automatically, which I also added to the English archive (gpedinst.bat). But you must manually verify that batch file fits your system before running it! It might be safer to follow the instructions manually.

    • Put these files:

      appmgmts.dll
      appmgr.dll
      fde.dll
      fdeploy.dll
      gpedit.msc
      gpedit.dll
      gptext.dll

      into %SystemRoot%\system32 folder (most often it’s just c:\windows\system32)

    • put these files:

      system.adm
      inetres.adm
      conf.adm

      into %SystemRoot%\system32\GroupPolicy\ADM\ (create if this folder doesn’t exist)

    • finally, run these commands one by one in the CMD window:

      regsvr32 gpedit.dll
      regsvr32 fde.dll
      regsvr32 gptext.dll
      regsvr32 appmgr.dll
      regsvr32 fdeploy.dll

    That should make gpedit.msc callable as Start -> Run -> gpedit.msc.

    Other language versions of the necessary files can be retrieved from corresponding-language installations of WinXP Professional; English version can also be downloaded directly from Microsoft website ( e.g. here , or search for “Group Policy ADM Files” at microsoft.com). Also, you can extract necessary files from available Windows distributions: just don’t forget, that “filename.dl_” is a compressed version of “filename.dll”, and can be uncompressed by using XP-bundled extract command.

    See also this comment for alternative gpedit installation (get the file from badongo first), and also this comment for one more explanation of manual installation.

    Geeks corner:

    1. a comprehensive list of the “Group Policy/User Configuration/Administrative Templates” settings in Windows XP Home Edition
    2. an extremely comprehensive Excel sheet, which maps numerous *.adm-file options to their registry equivalents – Group Policy Settings Reference (PolicySettings.xls). This file is for Windows 2000, Windows XP, and Windows 2003

    Disclaimer: I do not know if modifying (e.g. by adding gpedit) your WinXP HE is a violation of any EULAs. It’s your own responsibility to check this out and comply with any such regulations. Also, be advised that modifying any settings using gpedit.msc on WinXP HE may render some parts of the OS inoperable (in my opinion). You have been warned!

    Share

    Posted in how-to, Links, Notepad, Software | 91 Comments »

    Useful Python looping techniques

    26th September 2007

    These are all excerpts from the Python documentation.

    To synchronously and simultaneously loop over two sequences:

    1. questions = ['name', 'quest', 'favourite colour']
    2. answers = ['Lancelot', 'the holy grail', 'blue']
    3.  
    4. for q, a in zip(questions, answers):
    5.     print 'What is your %s?  It is %s.' % (q, a)

    To loop over a sequence with both key and value:
    Read the rest of this entry »

    Share

    Posted in Programming, Python | No Comments »

    How to sort Python dict (dictionary)

    26th September 2007

    Sample script (copypasted from Well House Consultants training course):
    click the PLAIN TEXT header for copy-pasteable version

    1. #!/usr/local/bin/python
    2.  
    3. author = {"php":"Rasmus Lerdorf",\
    4.     "perl":"Larry Wall",\
    5.     "tcl":"John Ousterhout",\
    6.     "awk":"Brian Kernighan",\
    7.     "java":"James Gosling",\
    8.     "parrot":"Simon Cozens",\
    9.     "python":"Guido van Rossum"}
    10.  
    11. langs = author.keys()
    12. langs.sort()
    13.  
    14. for language in langs:
    15.     print language,"is the child of",author[language]

    You can also define the Python ksort() function similar to that found in PHP:
    Read the rest of this entry »

    Share

    Posted in Programming, Python | 1 Comment »

    dotProject 2.0.4/2.1.2/2.1.3 on shared hosting

    22nd January 2007

    Update: the same solution seems to still apply to dotProject 2.1.2; the post instructions have been modified for dP 2.1.2.

    Update 2: fsmullin suggested a method to fix a similar error in index_table.php, the files_count_max cannot be found error when you click the FILES tab/menu item. His suggestion is now incorporated into the post.

    Update 3: this post is still relevant for dotProject 2.1.3.

    In one of my recent posts about project management software I stated the desire to extensively test dotProject 2.0.4. However, many shared hosting providers appear incompatible with dotProject: the right to CREATE TEMPORARY TABLES in MySQL is not granted, but is needed by dotProject.

    Here’s sample error (2.0.4):

    query failed(CREATE TEMPORARY TABLE tasks_sum SELECT task_project, COUNT(distinct task_id) AS total_tasks,
    SUM(task_duration * task_percent_complete * IF(task_duration_type = 24, 8.0, task_duration_type))/
    SUM(task_duration * IF(task_duration_type = 24, 8.0, task_duration_type)) AS project_percent_complete FROM `tasks` GROUP BY task_project)

    For 2.1.2, sample error would be:

    Table ‘tasks_total’ doesn’t exist

    I tried looking for solutions, and here’s what I found…
    Read the rest of this entry »

    Share

    Posted in PHP, Programming, Software, Web | 10 Comments »

    HTTP caching: universal approach and sample code

    9th December 2006

    As described in my previous post, there are some rather simple mechanisms to enable visitor’s browser to cache content, and avoid unnecessary load on your servers. In this post I’ll take a look at some parts of the practical implementation of the caching mechanism on the server, using PHP.
    Read the rest of this entry »

    Share

    Posted in PHP, Programming, Web | 1 Comment »

    Gallery2 AdSense: no module?

    1st October 2006

    If you ever need to add AdSense units to your Gallery2 installation, and find no module for this – try following the text below. I compiled it from several sources (primary menalto.com Gallery2 forum), and did everything written here myself here.

    Primary source of information was this post, but I recommend that you follow instructions here.

    To add AdSense to your Gallery2 sidebar (when using the Matrix theme as a sample): Read the rest of this entry »

    Share

    Posted in CMS, Programming, Web | 3 Comments »

    IE (Internet Explorer) margin doubling bug fixes

    27th September 2006

    In Internet Explorer for Windows (tested with version 6 SP2), if you write CSS code similar to this:

    1. #floatbox
    2. {
    3.   float: left;
    4.   width: 150px;
    5.   height: 150px;
    6.   margin-left: 100px;
    7. }

    and put your “floatbox” inside a container (such as DIV), you will actually see 200px of the left margin instead of the expected 100px. This problem is known as “IE margin-doubling bug”.

    In this post I collected solutions you can use to avoid this problem. The solution I’d recommend is at the end.
    Read the rest of this entry »

    Share

    Posted in Notepad, Programming, Web, XHTML/CSS | 2 Comments »