The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,854 other subscribers

Archive for 2012

Anyone with a C#, Delphi or FreePascal implementation of the PRESENT Ultra-Lightweight Block Cipher encryption?

Posted by jpluimers on 2012/03/06

A short while ago a paper got published on PRESENT: An Ultra-Lightweight Block Cipher by Andrey Bogdanov et al becoming ISO standard 29192-2:2012.

Is there anyone that has a C#, Delphi or FreePascal implementation with unit tests?

–jeroen

Posted in .NET, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Delphi, Development, Software Development | 13 Comments »

#WordPress Editor #keyboard #shortcuts

Posted by jpluimers on 2012/03/05

Both the WordPress Visual editor and HTML editor accept keyboard shortcuts. The built in WordPress Visual editor is based on TinyMCE where some of the shortcuts come from.

Since I’m a keyboard guy, I collected some information on keyboard shortcuts over time, and below is a table with what I collected for both editors.

That, combined with distraction free writing really gives WordPress a boost.

Most of the shortcut keys use the modifier keys ALT plus SHIFT.

Note that on a Mac, you will have to use the “command” key in stead of the “CTRL” key.

Visual Editor

You can see what these shortcuts do in the WordPress Visual Editor support page.

Function Shortcut Keys Alternative Shortcut Keys
Undo CTRL + z
Redo CTRL + y
Headers (H1, H2, H3, …, H6) CTRL + 1 … 6
Paragraph CTRL + 7
Format CTRL + 8 (doesn’t work on a Mac)
Address CTRL + 9
Bold ALT + SHIFT + b CTRL + b
Italic ALT + SHIFT + i CTRL + i
Underline CTRL + u
Strike through with red (delete) ALT + SHIFT + d
Align left ALT + SHIFT + l
Align center ALT + SHIFT + c
Align right ALT + SHIFT + r
Blockquote ALT + SHIFT + q
Unquote/outdent ALT + SHITF + w (doesn’t work on a Mac)
Code ALT + SHIFT + c (doesn’t work, is “align center”)
Unordered List (ul) ALT + SHIFT + u
Ordered List (ol) ALT + SHIFT + o
List item (li) ALT + SHIFT + l (doesn’t work, is “align left”)
A Hyperlink (a) ALT + SHIFT + a
Line break SHIFT + Enter
Read more ALT + SHIFT + t
Next page ALT + SHIFT + p
Media insert (image/video/…) ALT + SHIFT + m (on a Mac, it also inserts a Ã)
ins ALT + SHIFT + s (doesn’t work on a Mac)
del ALT + SHIFT + d (doesn’t work on a Mac)
Distraction free writing ALT + SHIFT + g
Enable “Kitchen Sink” Toolbar ALT + SHIFT + z
View HTML code ALT + SHIFT + e (doesn’t work on a Mac)
Advanced Editor ALT + SHIFT + v (doesn’t work)
Spell check ALT + SHIFT + n
Rich Editor Help ALT + SHIFT + h
  • Unused ALT + SHIFT + letter combinations: f, y, j, k, x.

HTML editor (don’t work on a Mac)

Though the sources I used (see bullets below) indicate the below table should work, they don’t.

So: no HTML shortcuts on Mac or PC, which is a shame.

The only reason I use the HTML editor once in a while are these:

Function Shortcut Keys Alternative Shortcut Keys
Bold ALT + SHIFT + b
Italic ALT + SHIFT + i
Strikethrough ALT + SHIFT + d
Blockquote ALT + SHIFT + q
Code ALT + SHIFT + c
Unordered List ALT + SHIFT + u
Ordered List ALT + SHIFT + o
A Hyperlink ALT + SHIFT + a
Read more ALT + SHIFT + t
View HTML code ALT + SHIFT + e
Headers (H1, H2, H3, …) Ctrl + corresponding number
Insert date/time ALT + SHIFT + s
Insert IMG URL ALT + SHIFT + m
List Item (li) Alt + SHIFT + l
Publish the Post Alt + SHIFT + p
Redo CTRL + y
Undo CTRL+z

–jeroen

via:

Posted in Keyboards and Keyboard Shortcuts, Power User, SocialMedia, WordPress | 1 Comment »

Windows 8 Consumer Preview ISO formats: Microsoft, please do this the same for Visual Studio 11 (#VS11 #W8)

Posted by jpluimers on 2012/03/02

Hopefully they will add Visual Studio 2011 ISOs (no, not the current ones that still download the prerequisites in the background) like they did with the Windows 8 Consumer Preview ISOs:

English

64-bit (x64) Download (3.3 GB) Sha 1 hash — 1288519C5035BCAC83CBFA23A33038CCF5522749
32-bit (x86) Download (2.5 GB) Sha 1 hash — E91ED665B01A46F4344C36D9D88C8BF78E9A1B39
Product Key DNJXJ-7XBW8-2378T-X22TX-BKG7J

–jeroen

via: Windows 8 Consumer Preview ISO formats.

Posted in .NET, Development, Power User, Software Development, Visual Studio 11, Visual Studio and tools, Windows, Windows 8 | 2 Comments »

Zo moet het dus niet: Zorg en Zekerheid zet relatienummer niet meer op polisblad (gemiste kans voor @zorgenzekerheid)

Posted by jpluimers on 2012/03/02

Verminderen van lastendruk is leuk, maar het is natuurlijk niet de bedoeling dat gegevens die op een verzekeringspas ineens niet meer op de polis staan.

Zorg en Zekerheid krijgt het toch voor elkaar: op het polisblad van 2012 staat het relatienummer niet meer vermeld, alleen het BSN nummer.

Als curator van mijn broer doe ik vrijwel al zijn administratie, dus ook het aanmelden van een vakantiekamp voor mensen met een verstandelijke beperking.

Die willen graag het relatienummer weten (en het BSN nummer geven gaat mij wat ver: hoewel ik de organisatoren vertrouw, ben ik bij mijn broer nog huiveriger voor identiteitsdiefstal dan voor mijzelf).

Die verzekeringspas (waar beide nummers op staan) is al een jaar of 3 oud, dus wat lastiger electronisch terug te vinden dan het polisblad.

Dank Zorg en Zekerheid dat jullie het voor elkaar krijgen om dit soort dingen moeilijker te maken!

–jeroen (die gelukkig vrijwel alles met een Fujitsu ScanSnap S510 gescand heeft met betekenisvolle bestandsnamen en voor Everything)

Posted in About, LifeHacker, Opinions, Personal | Leave a Comment »

version v3.3.4.14431 of Beyond Compare released by Scooter Software

Posted by jpluimers on 2012/03/02

About a week ago, version v3.3.4.14431 of Beyond Compare was release by Scooter Software.

For me, this is the ultimate comparison tool as it runs on Windows and Linux natively or under WINE on Mac OS.

It has a massive change list:

-----------------------------------
v3.3.4.14431      February 24, 2012
-----------------------------------

- Notable Changes
  - Fixed context menus on newer versions of Konqueror, Thunar, and Nautilus.
  - FILE-REPORT (and TEXT-REPORT, etc.) commands will now accept a saved file
    compare session name instead of a pair of files.  E.g., "file-report
    layout:side-by-side output-to:printer MySession".

- Archives
  - Fixed extracting files where a single deflate block contains more than 1MB
    of data.
  - Fixed zips showing non-existent files if a zip contained another zip and
    the outer one had additional data after the archive comment.
  - Attempting to extract a file from a zip using an unsupported compression
    algorithm now shows that as an error.
  - Split up zip error messages for "Error during extraction" and "Unsupported
    compression algorithm".

- Data Compare
  - Fixed "Extract HTML table(s)" handling of UTF-16 files.

- File Formats
  - OpenOffice default character encoding is now UTF-8.
  - Fixed "COBOL Source" format to include "Identifier" definition.
  - "Picture Files" format added CUT, GED, MSK, PFR, and TUB to mask, removed
    PAL.

- File Views
  - Fixed saving files with paths between 247-259 characters long.
  - Fixed foreground selection coloring when using white on blue system colors.
  - Added key accelerators to "Save changes" dialog.

- Folder Compare
  - Long file operations will now keep Windows from going to sleep due to
    inactivity.
  - Using "Compare to" to open a file view and then using "Next/Previous
    Difference Files" now closes the file view.

- FTP
  - Fixed support for FTP listings with filenames containing Chinese
    month/year characters.
  - Fixed parsing Comau C5G FTP listings.

- Home View
  - When editing a session, dropped files/folders are ignored unless they're
    on a path edit.
  - Expand All and Collapse All commands now affect the shared and auto-saved
    sessions nodes.
  - Fixed behavior when using "Collapse All" hides the currently selected
    session.

- Linux
  - Fixed context menus on newer versions of Konqueror, Thunar, and Nautilus.
  - Fixed Folder Compare crash when performing rules-based comparisons.
  - Fixed clicking the "Next Difference Files" link on the message panel when
    using "Next Difference" at the end of a comparison.
  - Fixed various comboboxes incorrectly allowing editing.

- Misc
  - Fixed menu checkboxes not showing on Vista and Windows 7 when using the
    Classic Theme.
  - Dropping files/folders onto a path edit no longer changes the edit if the
    drop results in a new view.
  - Added "RE Examples" buttons to Grammar Item dialog.
  - Improved Open/Save dialog handling of file type options.

- Options
  - "Customize Commands" dialog's "Default" command now checks to see if
    shortcut is already in use.

- Picture Compare
  - "Difference Offset", "Flip", and "Rotate" are now persistent session
    settings.
  - Fixed handling of DIB, MSK, and RLE bitmap files.

- Registry Compare
  - Fixed loading .reg files with a '\' before hex data.
  - Fixed loading .reg files with a ']' in a key name.

- Scripting
  - FILE-REPORT (and TEXT-REPORT, etc.) commands will now accept a saved file
    compare session name instead of a pair of files.  E.g., "file-report
    layout:side-by-side output-to:printer MySession".
  - LOG command will now create the target folder if it doesn't exist.
  - Fixed support for STRIKEOUT-RIGHT-ORPHANS in TEXT-REPORT command.

–jeroen

via: Beyond Compare ChangeLog

Posted in *nix, Power User, Windows, Windows 7, Windows 8, Windows Server 2003, Windows Server 2008, Windows Vista, Windows XP | Leave a Comment »

VMware workstation will re-create different vmnet1 and vmnet8 when updating from 8.0.1 to 8.0.2

Posted by jpluimers on 2012/03/01

Sometimes you have a DUH moment.

I just had was one: I upgraded VMware Workstation to 8.0.2 a couple of days ago.
Today one the less frequently used development virtual machines would not see the SQL Server 2000 alias it could find before.

Reasons:

  1. the ALIAS cannot be found through DHCP, so it was in the HOSTS table on the development virtual machine.
  2. the subnet of vmnet1 and vmnet8 got changed because the VMware update actually is performed ad a complete reinstall.

I blogged about the SQL Server 2000 alias last week, but in fact the work had been more than 2 months ago, so it took me a while to add up reasons 1 and 2 and find out the answer was in fact 3:

Reset the VMware vmnet1 and vmnet8 to the subnets they were before, and everything works fine and all is dandy again.

–jeroen

Posted in Power User, VMware | Leave a Comment »

Solution for Visual Studio 2010 VB.NET errors “Type ‘MyProject.My.MySettings’ is not defined.” and “MyProject’ is not a member of [Defalut]” #VS2010

Posted by jpluimers on 2012/02/29

(Note the WordPress bug: you cannot have <Default> in a topic title, but having it in the text is fine, hence the [Default] in the title).

When porting some projects from .NET 1.x to .NET 4.x, I got these two errors:

Error 17 Type 'MyProject.My.MySettings' is not defined.
Error 18 'MyProject' is not a member of '<Default>'.

Both errors in the file ...\My Project\Settings.Designer.vb relative to the MyProject.vbproj file.

This was not the result of something like this Visual Studio 2005 bug, but of how the designer generated files are not being regenerated when you change the root namespace only in the MyProject.vbproj file, not through the IDE.

Steps to reproduce:

  1. Create a MyProject class library in VB.NET
  2. In the MyProject.vbproj, change the RootNameSpace into MyNameSpace.MyProject.vbproj
  3. Build

Lesson learned: when using text compare tools, some .vbproj changes should be propagated through the IDE, not through your favourite text compare tool.

When you change it in the IDE, it regenerates the *.Designer.vb files to reflect the changed namespace.

The solution is simple, in the IDE follow these steps:

  1. In the Project Options change the RootNameSpace to a dummy
  2. Build your project
  3. Chante the RootNameSpace to what you want
  4. Build your project

–jeroen

via: type “my.mysettings” “is not defined.” – Google Search.

Posted in .NET, Development, Software Development, VB.NET | Leave a Comment »

P/Invoke: usually you need CharSet.Auto (via: .NET Column: Calling Win32 DLLs in C# with P/Invoke)

Posted by jpluimers on 2012/02/28

I don’t do P/Invoke often, and somehow I have trouble remembering the value of CharSet to pass with DllImport.

In short, pass CharSet.Auto unless you P/Invoke a function that is specific to CharSet.Ansi or CharSet.Unicode. The default is CharSet.Ansi, which you usually don’t want:

when Char or String data is part of the equation, set the CharSet property to CharSet.Auto. This causes the CLR to use the appropriate character set based on the host OS. If you don’t explicitly set the CharSet property, then its default is CharSet.Ansi. This default is unfortunate because it negatively affects the performance of text parameter marshaling for interop calls made on Windows 2000, Windows XP, and Windows NT®.

The only time you should explicitly select a CharSet value of CharSet.Ansi or CharSet.Unicode, rather than going with CharSet.Auto, is when you are explicitly naming an exported function that is specific to one or the other of the two flavors of Win32 OS. An example of this is the ReadDirectoryChangesW API function, which exists only in Windows NT-based operating systems and supports Unicode only; in this case you should use CharSet.Unicode explicitly.

–jeroen

via: .NET Column: Calling Win32 DLLs in C# with P/Invoke.

Posted in .NET, Ansi, C#, Delphi, Development, Encoding, Prism, Software Development, Unicode | 3 Comments »

won’t work on a ThinkPad W701: DisplayPort Adapter Cables 45J7915, 57Y4393 Compatibility – ThinkPad W700/W701

Posted by jpluimers on 2012/02/27

Dang this won’t work:

The ThinkPad W700/W701 DisplayPort is a DisplayPort-only source, not a Dual-Mode source, and thus cannot support the DisplayPort adapter cables.

See also this PDF:

ThinkPad W701, W701ds Multiple Monitor Configurations
Boost productivity, view more data
** DisplayPort to Single-Link DVI (45J7915) or VGA (57Y4393) monitor cables are not supported on the W701 DisplayPort

–jeroen

via: DisplayPort Adapter Cables 45J7915, 57Y4393 Compatibility – ThinkPad W700/W701.

Posted in Power User, ThinkPad, W701 | Leave a Comment »

ThinkPad W701 with 32GB of memory via: forum.thinkpads.com • Newer 8G memory sticks in a W700, W701, W500, W510 ?

Posted by jpluimers on 2012/02/27

Just as a mental note: it is possible to put 32GB of memory in a ThinkPad W701:

for a while now, 32GB on 2x W701

–jeroen

via: forum.thinkpads.com • Newer 8G memory sticks in a W700, W701, W500, W510 ?.

Posted in Power User, ThinkPad, W701 | Leave a Comment »