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 2014

How to edit a table (created by Lotus Notes) in the email reply (in Gmail)? (via: Web Applications Stack Exchange)

Posted by jpluimers on 2014/03/05

I worked around this using the WordPress editor, but in case I ever need it again, here are some more possibilities to try:

How to edit a table (created by Lotus Notes) in the email reply (in Gmail)? – Web Applications Stack Exchange.

–jeroen

Posted in GMail, Google, Power User, SocialMedia, WordPress | Leave a Comment »

Time for a new “-goto cleanup;+goto fail;” T-Shirt; The Story of the GnuTLS Bug (via: existential type crisis)

Posted by jpluimers on 2014/03/05

A new *n*x bug got discovered in TLS certificate handling that is similar to the recently discovered iOS and OS X “goto fail” security issue.

This time the fix is performing a few replacements linke this:

-goto cleanup;
+goto fail;

Plus one addition:

+fail: // ADDED
+ result = 0;

Applications depending on GnuTLS are affected (there are other libraries providing TLS like OpenSSL), which are many.

Two must-do things:

  • Closely watch the Linux, BDS, other *n*x and application security updates, as exploits will be available soon
  • Read via: existential type crisis : The Story of the GnuTLS Bug as it explains the bug, tracks down the cause, and talks about “lessons to learn”.

I’m with Jan Wildeboer here and updates should get in very soon: Read the rest of this entry »

Posted in Communications Development, Development, Internet protocol suite, Power User, Security, TCP, TLS | Tagged: , , | Leave a Comment »

Brilliant: JSONView (via: Chrome Web Store, there is a FireFox extension too)

Posted by jpluimers on 2014/03/05

Thanks Michael Panzer – Google+! I agree it should be available out of the box.

Brilliant way to view JSON and test for validity.

JSONView

Validate and view JSON documents

JSONView port for Chrome.

Original firefox extension is here: http://benhollis.net/software/jsonview/ Read the rest of this entry »

Posted in Communications Development, Development, Internet protocol suite, JavaScript/ECMAScript, JSON, REST, Scripting, Software Development, TCP | Tagged: , | Leave a Comment »

PowerShell: Do not take a shortcut while testing NULL values.

Posted by jpluimers on 2014/03/05

A while ago I found a blog post explaining how to shortcut testing NULL values with PowerShell.

Do not do that!

I agree with the quote on the blog:

One thing you may not forget is that Powershell is a lot more friendly for NULL values than C#, so don’t forget to check your objects for NULL values. In Powershell this is very clean and easy to do.

But it is also easy to get wrong:

To see if a variable is null, simply check:

If (!$Variable) {some action}

Conversely, to verify if the variable has any value:

If ($Variable) {some action}

Just a few examples. Now quess the outcome for all of them.

$a=$null;  if ($a) {"'$a' has VALUE"} else {"'$a' is NULL"}
$a=$false; if ($a) {"'$a' has VALUE"} else {"'$a' is NULL"}
$a=0;      if ($a) {"'$a' has VALUE"} else {"'$a' is NULL"}
$a='';     if ($a) {"'$a' has VALUE"} else {"'$a' is NULL"}
$a="";     if ($a) {"'$a' has VALUE"} else {"'$a' is NULL"}
$a=1;      if ($a) {"'$a' has VALUE"} else {"'$a' is NULL"}

Now take an educated guess on the outcome. Read the rest of this entry »

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

Quick Tip: Automating your Mac’s wifi power (on off through script) via: BrettTerpstra.com

Posted by jpluimers on 2014/03/04

Interesting commands around networksetup -setairportpower en0 : power off and on your WiFi.

–jeroen

via: [Wayback/Archive] Quick Tip: Automating your Mac’s wifi power – BrettTerpstra.com.

Posted in Apple, Hardware, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, Network-and-equipment, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User, WiFi | Leave a Comment »

ViaProtect Gives A Basic Look At Where Android Apps Are Sending Your Data (via: Android Police)

Posted by jpluimers on 2014/03/04

Interesting:

viaProtect (public preview) – Android Apps on Google Play.

–jeroen

via:

Posted in Android Devices, Power User | Leave a Comment »

One of the niceses PowerShell 3.0 new features: Simpler Where Filter Syntax

Posted by jpluimers on 2014/03/04

You can check out which PowerShell you have by executing the $Host.Version or $PSVersionTable.PSVersion on a line. You can even switch versions by applying the PowerShell -version switch on the command-line and they will both change.

One of the great features of the new PowerShell 3.0 features (besides New and Improved PowerShell 3.0 Cmdlets) is a simplified Where Filter Syntax.

So: this is how I get the PowerShell version information the easy way from a command prompt:

PowerShell $PSVersionTable.PSVersion

–jeroen

via:

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

How to setup and use a SQL Server alias

Posted by jpluimers on 2014/03/03

Just in case I need this ever again: How to setup and use a SQL Server alias.

Posted in Database Development, Development, SQL, SQL Server, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012 | Leave a Comment »

Delphi Predefined Conditionals on iOS: IOS, MACOS, MACOS32, POSIX and POSIX32 (via: Conditional compilation (Delphi) – RAD Studio)

Posted by jpluimers on 2014/03/03

Just a reminder to Self after reading Predefined Conditions in Conditional compilation (Delphi) – RAD Studio.

On iOS, these conditional symbols are defined:

  • IOS
  • MACOS
  • MACOS32
  • POSIX
  • POSIX32

For the (x86 based) iOS simulator, CPU386 and CPUX86 are defined.

For iOS physical devices, CPUARM is defined.

For OS X and the iOS Simulator, ALIGN_STACK is defined as some parameters (including Extended) require to be aligned on 16-byte boundaries. For explanation, see the Mac OS X Stack Alignment article by Eli Boling, as well as PC_MAPPED_EXCEPTIONS and UNDERSCOREIMPORTNAME (sometimes een PIC).

–jeroen

via: Predefined Conditions in Conditional compilation (Delphi) – RAD Studio.

Posted in Delphi, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development | Leave a Comment »

Delphi types that cannot be used for TypeInfo

Posted by jpluimers on 2014/03/03

When writing the Spring4D unit tests for GetTypeSize to include as many TTypeKind values, I came across a few types that either did not compile, or were not supported by TypeInfo. I listed them below as I could not find them in the documentation.

I included a test named Test_EnsureAllTTypeKindsCoveredByCallsTo_Test_GetTypeSize_ that verifies that all TTypeKind values except tkUnknown are covered. So future extensions of TTypeKind will make the tests fail.

As a side issue, I really wanted to know if tkUnknown could be emitted by the compiler. It can sort of, for instance by defining discontiguous enumerations, but are incompatible with TypeInfo as well.

Types that do not compile at all: Read the rest of this entry »

Posted in Agile, Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, DUnit, Software Development, Unit Testing | 2 Comments »