Category: tagged

  • Excel sort by length of string

    I received a question today on how to sort a list of strings which was actually rather simple to accomplish.

    The following list is the original sorting:

    • caca
    • cocacola
    • ca
    • cacacacacola
    • c
    • cacacacacacacaac
    • cacaa

    The requested list after sorting should look like this:

    • c
    • ca
    • caca
    • cacaa
    • cocacola
    • cacacacacola
    • cacacacacacacaac

    What I first did was to create a separate column to contain the length of each cell. There is a function in Excel which easily calculates the length of a string: LEN(). Now I had two columns, the first unsorted string column and the second length (of the first column string) column. As you probably have realised by now it was a simple matter of sorting the second column instead of the first for the strings to sort by length.

    If interested in seeing it I have attached the test sheet for you to play around with:

    Length String Sorting

  • What is a Kill-Bit?

    After booting up Windows XP I encountered an automatic update notification. During the progress I noticed an update named something like “…kill-bit ActiveX…” which I could not identify what was for and therefore looked it up.

    The Kill-Bit appears to be something as simple as a registry entry to disable vulnerable ActiveX controls or COM objects so they can no longer be loaded in Internet Explorer or other applications based on the MSHTML rendering engine.

  • Virtualmin scheduled backups strftime usage

    I have been using Virtualmin for several years which is one of the greatest modules for Webmin allowing simple set-up and management of virtual hosts. Inside the “Scheduled Backup” feature I came across the “Do strftime-style time substitutions on file or directory name” check box but never actually properly made use of it:

    Virtualmin Scheduled Backup

    I came across a project which required very frequent backups and to distinguish each backup from another I decided to give it a shot. The strftime function uses standard POSIX conversion specifications which very easily lets you build powerful combinations of date and time.

    As an example you can use the following string:

    /backup_%Y_%m_%d_%H.%M

    which would leave a directory with the following name:

    Now each backup will be created with a different name instead of simply overwriting the previous one.

  • AVG 8 LinkScanner crashes Firefox

    After upgrading to the latest version of the free anti virus application from AVG I encountered constant crashes of Firefox. It seems that AVG 8 includes a utility called LinkScanner which marks whether a website is supposedly a threat or safe upon using a search engine:

    AVG LinkScanner ThreatAVG LinkScanner No Threat
    I am not the biggest fan of these utilities as many false positives arise plus the user ends up losing his own
    criteria and relies solely on the utility’s advice instead of thinking and evaluating each site by himself. Nevertheless it may be suitable for complete beginners as a helping hand.

    Firefox did start to behave erratically after the AVG upgrade from version 7.5 to 8 so there was no real doubt about why it was happening, so I immediately disabled the LinkScanner component within the AVG user interface. This seemed to be the only part that could affect the browsers somehow:

    AVG LinkScanner disabled

    Firefox stopped crashing and all was fine again. There was just a little thing that kept nagging me. The little red exclamation mark by the clock in the traybar kept displaying now. It was not possible to know whether there was an update waiting or any other issue as the exclamation sign was on constantly. I ended up turning LinkScanner on again just to remove the exclamation.

    Back to Firefox crashing…!

    Until today when I again got so tired of the continuous crashes that I finally searched for the problem and located a very simple solution to it.

    Simply leave the LinkScanner component running so you do not get the annoying exclamation mark. Now launch Firefox and go to Tools > Add-ons and disable the AVG add-on. This would disable the AVG 8 LinkScanner component without interfering with anything else on your PC.

  • Home and End keys in PuTTY

    I wondered why sometimes the Home and End keys work as expected during a SSH session via PuTTY and some other times it just writes tildes (~) instead. When writing long commands it is a real annoyance having to press down the left arrow to get back to the beginning of the command.

    A simple solution which worked for me was to change the Terminal-type String under the Connection > Data tab from the default “xterm” to simply “linux”:

    PuTTY Terminal Type String

    Now you should be able to use your Home and End keys to easily move the cursor back and forth during a SSH session using PuTTY.