Alter embed URL letter case to fix your broken MS-Office-file embeds in WordPress

  1. Problem: I just notice that a lot of my WordPress OneDrive embeds are broken (not sure since when).
  2. Root cause:
    1. Upon comparing the embed URLS in WordPress posts with what embed URLS sharing with OneDrive results in, it appears that the letter case in the embed URLs has been changed to all uppercase, pointing to resources that do not exist (doh!).
    2. Not sure who is to blame for altering the case:
      1. WordPress,
      2. OneDrive (note there is also the transition from “skydrive” to “onedrive”),
      3. Windows Live Writer? The latter hardly, since I did not touch these posts.
  3. Solution:
    1. Given that, while “cid=” seems all uppercase, “resid=” all lowercase, but “authkey=” is mixed case , there is not easy case change operation you could do locally to restore the original try.
    2. So you have to find the original files you embedded (not trivial from the URL which does not contain even a hint of the file name or extension) and re-embed it through sharing with OneDrive.

Line chart of GINI coefficients for select economies since 1980

select-gini-coefficients-excel-chart

Based on this Dataset from the World Bank, a bit more recent than the Wikipedia Chart currently.

Categories: Charts Tags: , ,

How to unstick the ALT key in KRDC RDP sessions

  1. Problem: Periodically, when switching back to my KRDC Windows-session, it turns out that the ALT-key got stuck.
  2. Workaround: I have not found another workaround yet but, using the “Window with green arrows”icon in the top floating menu  image,   to switch to window mode and back to full screen.
Categories: e-infrastructure Tags: , , , ,

Getting Eclipse CDT to spell check non-source files

  1. Problem:
    1. Using Eclipse Luna CDT, with C/C++ spelling engine, to document C and C++ code in Doxygen (Eclox plugin), image
    2. Spell check works for inline Doxygen documentation. My API-level code comments in *.[ch](pp)* files gets spell-checked alright (Well…:
      1. I had  to download a decent dictionary to avoid recommendation like this one: image. I am using the aspell dictionaries from here and here.  This is before a restart/recheck:image
      2. I still do not know how to teach the C++ spell check engine that a newline does not start a new sentence: image
      3. The oft-referred to menu: Edit / Spell check does not show up for me: image
    3. However, spell check ignores my standalone *.dox files with high-level documentation.
  2. What I have tried:
    1. Telling Eclipse about the*.dox file type: image
    2. Associating *.dox files with the Doxyfile editor: image. Fail. This tool from the Eclox plugin seems to help only with the editing of the Doxygen config file. image
    3. Associating *.dox files with C/C++-editor: image Fail: has no effect.
  3. Workaround:
    1. Terrible, but since a similar question is still open on stackoverflow): If you can (*.dox requires all comments to be within c-style comments anyway), rename your *.dox files to *.dox.cpp. Terrible, but works: image
    2. A bit less terrible if you mange to store your standalone *.dox files as *.dox.cpp permanently do this if you get your Doxygen to handle these extensions.
    3. What is nice to see is that the spell-checker  recognizes Doxygen’s built-in reserved words (as opposed to my custom-defined Doxygen-commands). image
  4. Other things to try:
    1. I could not get Hunspell4Eclipse to work, despite going to considerable trouble getting the marketplace into my Eclipse installation
    2. I have not tried eSpell.

Bringing method documentation back into synch by using Textpad command line to jump to GrepWin matched line in file

  1. Objective: is checking, in one simple result window, multi-line matches of method signatures and their Doxygen comments from a multi-module, multi-directory C++ codebase, in order to spot  inconsistencies, i.e. where code and documentation  are out f synch: image
  2. image
  3. All this short of having to write a Parser or buying a tool like Atomineer Pro Documentation  (which does look like it is “right on the money”, but, as it turned out to my surprise, also far short of getting this to work in Eclipse or on a Bash command line with Grep and Perl, ack  (doesn’t do multi-line matches!), ag, or what-not.  grepWin is free, has an easy-to-use, versatile interface, and proves, once again, to be a powerful little tool.
  4. A a sample (in reality not cut off, of course), 2 methods with their comments showing here: image
  5. And I am only a click away from correcting errors I spot in my preferred editor that grepWin  can link in “Settings””C:\Program Files (x86)\TextPad 7\TextPad.exe” %path%(%line%,0)
  6. image
  7. Some grepWin quirk I do not understand:
    1. Why does the “Search” button do nothing when I select radio button “Regex” instead of “Text Search”, but does the expected regex match against file and directory name when I select the latter? image

How to output a list of installed programs on Windows with PowerShell

A vanilla script, but including all Win32_Product class properties – a quick search found only a very basic version how to do this in PowerShell:

# to write a installed program listing to a CSV file - just adapt the output dir below
Get-WmiObject -Class Win32_Product |`
foreach{
$AssignmentType = $_.AssignmentType
$Caption = $_.Caption
$Description = $_.Description
$IdentifyingNumber = $_.IdentifyingNumber
$InstallDate = $_.InstallDate
$InstallDate2 = $_.InstallDate2
$InstallLocation = $_.InstallLocation
$InstallState = $_.InstallState
$HelpLink = $_.HelpLink
$HelpTelephone = $_.HelpTelephone
$InstallSource = $_.InstallSource
$Language = $_.Language
$LocalPackage = $_.LocalPackage
$Name = $_.Name
$PackageCache = $_.PackageCache
$PackageCode = $_.PackageCode
$PackageName = $_.PackageName
$ProductID = $_.ProductID
$RegOwner = $_.RegOwner
$RegCompany = $_.RegCompany
$SKUNumber = $_.SKUNumber
$Transforms = $_.Transforms
$URLInfoAbout = $_.URLInfoAbout
$URLUpdateInfo = $_.URLUpdateInfo
$Vendor = $_.Vendor
$WordCount = $_.WordCount
$Version = $_.Version

$Name | Select-Object `
@{n="AssignmentType";e={$AssignmentType}},
@{n="Caption";e={$Caption}},
@{n="Description";e={$Description}},
@{n="IdentifyingNumber";e={$IdentifyingNumber}},
@{n="InstallDate";e={$InstallDate}},
@{n="InstallDate2";e={$InstallDate2}},
@{n="InstallLocation";e={$InstallLocation}},
@{n="InstallState";e={$InstallState}},
@{n="HelpLink";e={$HelpLink}},
@{n="HelpTelephone";e={$HelpTelephone}},
@{n="InstallSource";e={$InstallSource}},
@{n="Language";e={$Language}},
@{n="LocalPackage";e={$LocalPackage}},
@{n="Name";e={$Name}},
@{n="PackageCache";e={$PackageCache}},
@{n="PackageCode";e={$PackageCode}},
@{n="PackageName";e={$PackageName}},
@{n="ProductID";e={$ProductID}},
@{n="RegOwner";e={$RegOwner}},
@{n="RegCompany";e={$RegCompany}},
@{n="SKUNumber";e={$SKUNumber}},
@{n="Transforms";e={$Transforms}},
@{n="URLInfoAbout";e={$URLInfoAbout}},
@{n="URLUpdateInfo";e={$URLUpdateInfo}},
@{n="Vendor";e={$Vendor}},
@{n="WordCount";e={$WordCount}},
@{n="Version";e={$Version}}
}| Export-Csv c:\temp\installed-programs.csv -NoTypeInformation

Output:

image

image

Yet another couple of glitches solved in setting up Outlook 2013 with Gmail IMAP for GoogleApps

  1. I googled and followed this useful guide. However, a couple of glitches remained:
  2. Connection to Incoming mail server fails if you really just put your username:
    1. put instead of  username@companygoogledomain.com:
    2. image
  3. Test send of email message through outgoing server fails if you just followed instructions:
    1. image
    2. Click on button: “More” / tab: “Outgoing Server” / do check box “My outgoing server requires authentication ”  and log on (I now prefer to be explicit, after the initial mixup of usernames for incoming and outgoing), enter your full user@compgoogledomain.com and password. No need to enable SPA, though.
    3. image
  4. Viola  image Smile(and quousque tandem…, sigh Sad smile).

A little addendum about data types to the +N(“comment”) in-cell formula comment trick in Excel

    1. You are relying with this well-documented trick on the fact that addition of 0 will altering a numeric value.
    2. However, what is not mentioned: not all work in Excel involves the number data type.
      1. Try adding your comment or zero to a string data type, and you will get a #VALUE error.
      2. Boolean, however, works also, since – as you can see when you have Excel evaluate your formula – if  you try adding 0 to a Boolean data type, Excel casts the prior Boolean FALSE to 0 or TRUE to 1, and casts the result of your addition (of 0 = nothing) back to the same initial Boolean for further evaluation. excel-evaluate-fromula-w-n-comment boolean
      3. So just put your +N()-comments in those part of your formula that involve either number or Boolean data type, and avoid adding to strings, for example:

=IF(
    OR(
        ISBLANK(
            [Related issues]
        ),
        (            ISERR(
                FIND(
                    #,
                    [Related issues]
                )
            ) )
    ) +
    N(
        do nothing if no related task in col:related issues
    ),
    ,
    IF(
        NOT(
            ISERR(
                FIND(
                    ,,
                    [Related issues]
                )
            )
        ) +
        N(
            do nothing if no 2nd value in col:related issues
        ),
        CONCATENATE(
            MID(
                MID(
                    [Related issues],
                    FIND(
                        ,,
                        [Related issues]
                    ) + 2,
                    LEN(
                        [Related issues]
                    ) 
                    FIND(
                        ,,
                        [Related issues]
                    ) + 1 +
                    N(
                        extracted the 2nd value from col:related issues
                    )
                ),
                FIND(
                    #,
                    MID(
                        [Related issues],
                        FIND(
                            ,,
                            [Related issues]
                        ) + 2,
                        LEN(
                            [Related issues]
                        ) 
                        FIND(
                            ,,
                            [Related issues]
                        ) + 1
                    )
                ) + 1,
                4
            ) +
            N(
                extracted the 4# of id of related issue
            ),
            MID(
                MID(
                    [Relatedissues],
                    FIND(
                        ,,
                        [Relatedissues]
                    ) + 2,
                    LEN(
                        [Relatedissues]
                    ) 
                    FIND(
                        ,,
                        [Relatedissues]
                    ) + 1
                ),
                FIND(
                     ,
                    MID(
                        [Related issues],
                        FIND(
                            ,,
                            [Related issues]
                        ) + 2,
                        LEN(
                            [Related issues]
                        ) 
                        FIND(
                            ,,
                            [Related issues]
                        ) + 1
                    )
                ) + 1,
                2 +
                N(
                    appended to or from to the 4# of id of related issue
                )
            )
        ),
       
    )
)

    1. This splits, extracts and copies values from a none to multi-value column for better sortability: image