This version of the page http://bogdan.org.ua/categories/notepad/ (0.0.0.0) stored by archive.org.ua. It represents a snapshot of the page as of 2008-01-27. The original page over time could change.
Notepad » Autarchy of the Private Cave

Autarchy of the Private Cave

Science, Society, Programming and Hobbies

  • Exits

  • Categories

    • *nix
    • Affiliate programs
    • Artificial Intelligence
      • Agents
      • Robotics
    • Hardware
    • Humour
    • Life
    • Links
    • Misc
    • Movies
    • Notepad
    • Personal
    • Programming
      • Ada
      • OS
      • PHP
      • Python
      • XHTML/CSS
    • Science
      • Bioinformatics
    • Society
    • Software
    • Web
      • CMS
      • WordPress PlugIns
    • Welfare
  • Recommended

  • Archives

    • December 2007
    • November 2007
    • October 2007
    • September 2007
    • August 2007
    • July 2007
    • June 2007
    • May 2007
    • April 2007
    • March 2007
    • February 2007
    • January 2007
    • December 2006
    • November 2006
    • October 2006
    • September 2006
    • August 2006
    • July 2006
    • June 2006
  • Quasi-random

  • RSS

    • Entries RSS
    • Comments RSS
    • Notepad

      • Ultimate boot CD - diagnostic, testing, and recovery utilities collection
      • Today, using memtest86, system speed test, hddspeed and some other DOS utilities for diagnosing and testing PC hardware, I decided to put together my own simple bootable utility CD disk. ...

      • Windows XP Home Edition: gpedit.msc (group policy) editing via registry
      • A comprehensive list of the "Group Policy/User Configuration/Administrative Templates" settings in Windows XP Home Edition. There's also an extremely comprehensive Excel sheet, which maps numerous *.adm-file options to their registry equivalents ...

      • DNS troubles?
      • Today my blog's domain bogdan.org.ua isn't resolving to IP address from several worldwide locations. The trouble seems to be with XName, as running nslookup using ns?.xname.org gives me this: DNS server ...

      • Useful Python looping techniques
      • These are all excerpts from the Python documentation. To synchronously and simultaneously loop over two sequences: [python] questions = ['name', 'quest', 'favourite colour'] answers = ['Lancelot', 'the holy grail', 'blue'] for q, a in zip(questions, ...

      • How to sort Python dict (dictionary)
      • Sample script (copypasted from Well House Consultants training course): click the PLAIN TEXT header for copy-pasteable version [python] #!/usr/local/bin/python author = {"php":"Rasmus Lerdorf",\ "perl":"Larry Wall",\ "tcl":"John Ousterhout",\ ...

    • Subscribe

    • Web Hosting

      Host-I-can

      ebound-host

      bluehost

      HostGator
    • Earn and spend



      Buy me a book!

    • Exits

    • Visitors' track

    • Ratings

    • Meta

      • Register
      • Login
      • Backlinking blogs

    Archive for the 'Notepad' Category

    Short miscellaneous notes

    Ultimate boot CD - diagnostic, testing, and recovery utilities collection

    21st December 2007

    Today, using memtest86, system speed test, hddspeed and some other DOS utilities for diagnosing and testing PC hardware, I decided to put together my own simple bootable utility CD disk. But first, I did some searching to find if something similar exists.

    It does exist - Ultimate boot CD. That CD has numerous freeware testing and diagnosing utilities which will help you - if you are up to some good old (read “small fast”) DOS utilities. And not that old, actually - modern hardware is supported.

    The only modification I’ll do to the Ultimate boot CD will be adding freeware Biew bin/hex viewer/editor. Surely, more utils to come - with original size of just 115MB, there’s plenty of room to add extensions. You can even extend the CD image with non-free software, like Partition Magic.

    Digg ThisPowered by Gregarious (37)

    Posted in Hardware, Notepad, Links | No Comments »

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

    15th November 2007

    A comprehensive list of the “Group Policy/User Configuration/Administrative Templates” settings in Windows XP Home Edition.

    There’s also 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.

    It’s actually possible to install gpedit.msc snap-in for MMC in Windows XP Home Edition. I found the list of necessary files on some French site, which also had the archive of all necessary (French) files and the installation batch-file (look for “gpedit pour xp home.zip”, or go here; it’s easy to figure out what to do even if you do not understand French, but do know what gpedit.msc is for). Other language versions of the necessary files can be retrieved from corresponding-language installations of WinXP Professional; English version can also be downloaded from microsoft.com (look for “ADMFiles”, “ADM Files for XP SP2″ or similar).

    Disclaimer: I do not know if modifying (enhancing) your WinXP HE in such a way 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.

    Digg ThisPowered by Gregarious (37)

    Posted in Notepad, Software, Links | No Comments »

    DNS troubles?

    1st October 2007

    Today my blog’s domain bogdan.org.ua isn’t resolving to IP address from several worldwide locations. The trouble seems to be with XName, as running nslookup using ns?.xname.org gives me this:

    DNS server handling your query: ns1.xname.org
    DNS server’s address: 87.98.164.164#53

    ** server can’t find bogdan.org.ua: SERVFAIL

    It’s rather strange that all the other domains I have on XName are functioning properly.

    I can’t figure out the reason behind the problem; will keep trying to resolve as soon as possible.

    Update: this is in fact XName-related problem: they are again under DDoS attack.

    The other domains I have at XName might have stayed unaffected thanks to the secondary nameservers; it might have been just the question of the difference in sync times, that caused bogdan.org.ua to expire earlier than other domains.

    It’s a great pity that DDoS attack organizers cannot (yet) be reliably tracked and then punished. Attacking a free web service cannot be explained other than by mental sickness or noticeable loss of profit by some entities…

    Digg ThisPowered by Gregarious (37)

    Posted in Notepad | No Comments »

    Useful Python looping techniques

    26th September 2007

    These are all excerpts from the Python documentation.

    To synchronously and simultaneously loop over two sequences:

    PLAIN TEXT
    PYTHON:
    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 »

    Digg ThisPowered by Gregarious (37)

    Posted in Programming, Python, Notepad | 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

    PLAIN TEXT
    PYTHON:
    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 »

    Digg ThisPowered by Gregarious (37)

    Posted in Programming, Python, Notepad | No Comments »

    PHP proxy

    19th September 2007

    PHP proxy is simple but good. I converted it into a proxy-function for one of my projects.

    Do pay attention to the comments, especially these two:

    I had issues with this script (and others) returning 0 for the bytesTotal in flash. Basically, the Content-Length header was absent from the response. By simply adding
    header("Content-length: ".strlen($response)) before the echo, it resolved the issue. I don't know if there is a more appropriate fix to account for character encoding, etc, but it seems to work.

    @Schimmi: Well, if you can add some checks there (like who is referring your script) and allow the access to whitelisted clients (served from your domain)... I think, you can totally make it used applications from same-domain....So it would not be open to world. Yeah above script doesn't have those things.

    Digg ThisPowered by Gregarious (37)

    Posted in Programming, PHP, Notepad, Links | No Comments »

    Using Cytoscape from behind an HTTP proxy which requires authentication (authorization)

    14th September 2007

    Cytoscape 2.5.1 supports proxies, including HTTP proxies, but there is no support for HTTP proxies requiring authentication/authorization. It's easy to use Cytoscape in the authentication-requiring proxy scenario; below is one possible method.

    Note, that exactly the same method can be used to allow any software, which supports proxies but not proxies with authentication, to be able to access the internet.
    Read the rest of this entry »

    Digg ThisPowered by Gregarious (37)

    Posted in Science, Bioinformatics, Notepad, Software | No Comments »

    MySQL - Python: good MySQLdb tutorial (examples)

    7th September 2007

    Andy Dustman gave a presentation on Python and MySQL at the MySQL Users Conference 2005, Santa Clara, CA. The presentation is an excellent collection of examples for those who use the MySQLdb Python module.
    Read the rest of this entry »

    Digg ThisPowered by Gregarious (37)

    Posted in Programming, Python, Notepad, Links | No Comments »

    Date and time in Python scripts

    7th September 2007

    Here's an excellent description of various methods to handle date and time in Python scripts.

    Digg ThisPowered by Gregarious (37)

    Posted in Programming, Python, Notepad, Links | No Comments »

    Slackware Linux + ATI video drivers: extremely slow fgl_glxgears problem solution

    13th August 2007

    I had just installed the latest ATI video drivers for Linux onto my Slackware 11 (with kernel 2.4.33.3); I have Radeon Mobility X600 with 64MiB of non-shared memory.

    Running glxgears, I got ~2050 FPS (glxgears window focused) and ~4900 FPS (console window focused, glxgears window out of focus).

    But running fgl_glxgears yielded values as low as 1 FPS! As fgl_glxgears is much more similar to the real-world game visuals, it's apparent that no game will be playable at e.g. 0.2 FPS.

    Also, there were numerous repetitions of a single error in the console window:

    FGLTexMgr: open of shared memory object failed (Function not implemented) __FGLTexMgrCreateObject: __FGLTexMgrSHMmalloc failed! fglX11AllocateManagedSurface: __FGLTexMgrCreateObject failed!

    I found the solution which worked perfectly for me:
    Read the rest of this entry »

    Digg ThisPowered by Gregarious (37)

    Posted in Notepad, Misc, *nix | 2 Comments »

    Check rw-mounted linux filesystem without reboot

    25th June 2007

    If you happen to need to check your linux filesystem, which is mounted read-write, and for some reason you do not want to reboot, then the simple sequence of commands listed below should help you. Note, that the commands provided put you into single-user mode, which kills web-server and mysql daemon.

    So, running e2fsck on a live (mounted) filesystem isn't recommended - and f2sck asks if you really want to check the rw-mounted FS (be sure to answer 'n'o). If the FS you want to check is root (/), you cannot also re-mount it read-only - unless first you go to single-user mode:

    init 1

    Now you can re-mount your FS read-only:

    mount -o ro,remount /dev/cobd0

    (/dev/cobd0 is my device, replace it for your device when repeating step-by-step).
    Filesystem is now read-only, and it's safe to run e2fsck:

    e2fsck -D -C 0 -f -t -v /dev/cobd0

    e2fsck options are optional:
    -D: optimize directory structure
    -C 0: show progress
    -f: force check (use if you get "volume is clean" with no check)
    -t: e2fsck timing statistics
    -v: verbose mode

    Finally, return to your previous user mode:

    init 3

    Digg ThisPowered by Gregarious (37)

    Posted in OS, Notepad, *nix | No Comments »

    I’m selling banners-network (.com, .net, .org) domains

    6th June 2007

    ... on eBay. I wonder when will finally PayPal allow accepting payments for people registered as the residents of Ukraine. It's fairly discriminating to be unable to use PayPal, thus loosing a good percentage of potential buyers.

    Update: didn't sell. Now I'm asking 120$ for the bundle of all three domains:
    banners-network.com
    banners-network.net
    banners-network.org

    or will sell each one for 50$.

    On purchase agreement (when buying all three domains), I may setup the domains to point to your IP - so no need to wait until the payment is cleared. When payment is cleared, the domains will be transferred to your account. Payment options are: direct to-Visa payment, check, wire transfer (SWIFT). Other payment options are negotiable.

    Digg ThisPowered by Gregarious (37)

    Posted in Web, Notepad | No Comments »

    Radical Alternative to caching: On-the-fly Content-Regeneration

    23rd May 2007

    Refreshing my scarce knowledge of Apache's mod-rewrite, I read through the mod_rewrite guide, and found an extremely interesting section, titled

    On-the-fly Content-Regeneration

    Here's the theoretical problem:

    1. we are building a high-traffic site with lots of once-per-(hour|day) updated items
    2. we have a CMS with just all the features we need, but it's really CPU/DB-consuming and slow (does it sound familiar? )
    3. there's a need to serve static files

    And here's the 'radical alternative' solution:

    1. install the CMS of choice
    2. tweak the CMS's output layer to both produce/write to disk (or update) static HTML files, and to dump those same pages directly to browser
    3. use the "On-the-fly Content-Regeneration" mod_rewrite rules set

    This is it, in short. The "On-the-fly Content-Regeneration" will read the static files if they exist, or will query the CMS, which will create/update the static files and output the necessary page. You can also setup a cron-job to remove all static files older than XX minutes, to force content refresh.

    Below is the copy of "On-the-fly Content-Regeneration" from the mod_rewrite guide.
    Read the rest of this entry »

    Digg ThisPowered by Gregarious (37)

    Posted in Programming, CMS, Web, Notepad, Links | No Comments »

    toonel.net: JZlib-compressing proxy with Java client

    22nd May 2007

    Came across toonel.net project. It's free for private, non-commercial use.
    Citing the site:

    toonel.net is an experiment in a technique for conserving network bandwidth. If you are paying a fee based on the amount of data you transfer (e.g. 3G/GPRS/DSL/CDMA) and have monthly download limit, or if you have narrowband connection (e.g. dialup modem) then you are most likely to appreciate the service toonel.net offers. There are number of toonel.net client application packages. All solutions are 100% Java based and therefore this service can be used on any platform with an installed Java Runtime Environment, including mobile phones.

    toonel.net: what it is good for?

    • expensive transports (e.g. GPRS, CDMA…)
    • narrowband or slow connections (e.g. dial-up)
    • stretching download limits

    Why toonel.net is different?

    • cross platform
    • built from open source components
    • allows to compress virtually any traffic

    As soon as I switch to some java-enabled personal communication device, (and if toonel.net will still exist by that time ), I would definitely try it. Or if I switch to some speedy but traffic-limited internet-access provider.

    Digg ThisPowered by Gregarious (37)

    Posted in Web, Notepad, Links | No Comments »

    Nonanticipatory: definition

    5th May 2007

    Nonanticipatory (system or predictor) is a (system or predictor) where the output y(t) at some specific instant t0 only depends on the input x(t) for values of t less than or equal to t0. Therefore these kinds of (systems or predictors) have outputs and internal states that depend only on the current and previous input values.

    In simpler words, nonanticipatory systems can "take into account" only past and present, and cannot base their behaviour/decisions on future expectations.

    Nonanticipatory systems are also known as causal systems.

    Reference and further reading: article at answers.com.

    Digg ThisPowered by Gregarious (37)

    Posted in Science, Notepad, Artificial Intelligence | No Comments »

    mod_rewrite cheat sheet

    2nd May 2007

    There is an excellent mod_rewrite cheat sheet.
    I have been using it for over a year now, as from time to time there's a need to try to remember how to use mod_rewrite (e.g. in the case of no-www Class B web-site).

    To help preserve this useful bit of information, and for the cases of the original article inaccessible, below is a link to the cheat sheet stored on my server.
    Read the rest of this entry »

    Digg ThisPowered by Gregarious (37)

    Posted in Programming, Web, Notepad, Links | No Comments »

    How to find absolute path on a web-server (using PHP)

    30th April 2007

    When using PHP, the simplest way to find the absolute path of your files/folders on the server is by creating a simple path.php file with the following contents (click on the "Plain text" box header for copy-pasting):

    PLAIN TEXT
    PHP:
    1. <?php
    2. echo realpath(dirname(__FILE__));
    3. ?>

    Put the new file anywhere in the web-accessible folder on your server,
    then just access that file from your favourite web-browser - and you'll have the absolute path shown to you.

    Alternatively, you may use the following code:

    PLAIN TEXT
    PHP:
    1. <?php
    2. echo getcwd();
    3. ?>

    This also should display the absolute path on your server.

    Digg ThisPowered by Gregarious (37)

    Posted in Programming, Web, PHP, Notepad | No Comments »

    Ukrainian PrivatBank launches WordPress blog

    16th April 2007

    PrivatBank is one of the largest Ukrainian banks, and is very active in the field of e-commerce.

    Today I came across their new blog, which is a WordPress-powered one.
    From the first glance I'd say that it's here where PrivatBank now publishes the news - before the blog launch, news were published on the privatbank's website. The main and only difference appears to be in comments - now visitors can comment on those news, and even get response.

    I wonder how many "comment-responders" PrivatBank had to hire to launch this blog . Or is that tech-support which was given one more duty?

    Digg ThisPowered by Gregarious (37)

    Posted in Web, Notepad, Links | 1 Comment »

    Does background-image display on top of background-color?

    10th April 2007

    Yes, it should.
    Read the rest of this entry »

    Digg ThisPowered by Gregarious (37)

    Posted in Notepad, XHTML/CSS | No Comments »

    Regular blog updates delayed until mid-April

    2nd April 2007

    Being heavily loaded with work, and with a number of tasks overdue, I'll temporally stop regular updates of this blog until approximately 23rd of April. However, if something emergent occurs, I'll post it here. If not - await a bunch of posts in late April!

    Digg ThisPowered by Gregarious (37)

    Posted in Notepad | No Comments »

    « Previous Entries
     
    Close
    • del.icio.us
    • Digg
    • Furl
    • Netscape
    • Yahoo! My Web
    • StumbleUpon
    • Google Bookmarks
    • Technorati
    • BlinkList
    • Newsvine
    • ma.gnolia
    • reddit
    • Windows Live
    • Tailrank
    E-mail It