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,860 other subscribers

Archive for July, 2015

Marktplaats zonder topadvertenties – Chrome Web Store

Posted by jpluimers on 2015/07/31

Marktplaats zonder topadvertenties – Chrome Web Store.

Posted in Power User | Leave a Comment »

Never underestimate the inability for people in charge to understand how tech works.

Posted by jpluimers on 2015/07/31

LOL:

Never underestimate the inability for people in charge to understand how tech works.

as commented by Asbjørn Heid.

–jeroen

via: Als Folge der spanischen Leistungsschutzgeldgesetzes hat Google in Spanien….

Posted in Fun, Quotes | Leave a Comment »

logparser – Wikipedia, the free encyclopedia

Posted by jpluimers on 2015/07/31

Thanks to Sebastian Gingter for pointing me at Logparser:

Logparser […] powerful, versatile tool that provides universal query access to text-based data such as log files, XML files and CSV files, as well as key data sources on the Windows operating system such as the Event Log, the Registry, the file system, and Active Directory. The results of the input query can be custom-formatted in text based output, or they can be persisted to more specialty targets like SQL, SYSLOG, or a chart.

Common use:

$ logparser [options] [SQL expression]

–jeroen

via logparser – Wikipedia, the free encyclopedia.

Posted in Development, IIS, Power User, Windows, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2 | Leave a Comment »

Delphi: turn off column or line block selection mode – via: Default IDE Shortcut Keys; Delphi Programming

Posted by jpluimers on 2015/07/30

The Default IDE Shortcut Keys – Delphi Programming was a good starting point to find out how to disable column or line blocks.

Since the table there is incomplete (even the Embarcadero documentation is wrong as some shortcuts can turn on and off a mode), here are the relevant shortcuts keys:

Ctrl + O + C Turns on/off blockcolumn selection mode Delphi 5 and up
Ctrl + O + K Turns on/off block selection mode Delphi 5 and up
Ctrl + O + L Selects current line (and turns off block selection mode) Delphi 5 and up

This is especially useful when the block selection is stuck (this happens every now and then: it’s a known bug).

–jeroen

Posted in Delphi, Delphi 10 Seattle, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | 6 Comments »

Repeating the same expression multiple in RegEx search, and replace it only one time – via: Stack Overflow

Posted by jpluimers on 2015/07/29

I’m really really glad that Lucas Trzesniewski has answered this:

While most regex flavours have roughly a similar syntax for the basic features, there is not a clear standard as to the syntax of the replacement strings. Some tools use \1 for referencing strings, others use $1 and so on.

As you use Notepad++, you should know it uses the boost library for its regex implementation, and it uses the Boost-Extended format string for the replacement pattern.

In particular, the placeholder for the nth capture group is $n.

And my comment:

Thanks a lot for that. I found a bit more information about back references and capture groups in various libraries on regular-expressions.info/replacebackref.html.

on my question: Read the rest of this entry »

Posted in Development, RegEx, Software Development | Leave a Comment »

As of Visual Studio 2012, the option “Find Shelveset” is hard to find – via: Stack Overflow

Posted by jpluimers on 2015/07/28

Shelving work into a shelveset is easy in Visual Studio. Until Visual Studio 2010 it was easy to find the shelveset.

As of Visual Studio 2012 this is much more difficult. To get the shelveset back in Visual Studio 2012 and up:

  1. Go to the “Team Explorer” pane
  2. Click the “Home” icon
  3. Choose “Pending Changes”
  4. Click the topmost “Actions” item
  5. In the pop-up menu, click “Find Shelvesets”
  6. Type a search phrase

–jeroen

via: Can anybody find the TFS “Unshelve” option in Visual Studio 2012? – Stack Overflow.

Posted in .NET, Development, Software Development, Visual Studio 11, Visual Studio 2010, Visual Studio 2013, Visual Studio 2014, Visual Studio and tools | Leave a Comment »

security – How do I view the contents of a PFX file on Windows? – Super User

Posted by jpluimers on 2015/07/27

Dumping any kind of certificate file gives you access to more details than the Windows UI usually shows you.

This is especially handy when checking out errors or issues (which can be very difficult to track down).

For binary PFX files, the certutil and openssl commands come in very handy:

Some options to view PFX file details:Open a command prompt and type: certutil -dump Install OpenSSL and use the commands to view the details, such as: openssl pkcs12 -info -in unverified.

OpenSSL is a separate download (from my OpenSSL category of articles, see Some command-line tips for OpenSSL and file format pfx, p12, cer, crt, key, etc. conversion of certificates, keys) to get it.

CertUtil now ships with Windows by default (it wasn’t in the Windows XP era, I’m not sure about Windows Server 2003).

Here is the CertUtil help for dumping certificate information;

Dump certificate file information CertUtil [Options] [-dump] [File] Options: [-f] [-silent] [-split] [-p Password] [-t Timeout]

Note:

  • the [-v] option is not listed, but does work; it will give a more verbose dump.
  • [-dump] also works other certificate file extensions like .p7b files.

Here is the OpenSSL help for dumping pkcs12 information:

openssl pkcs12 [-export] [-chain] [-inkey filename] [-certfile filename] [-name name] [-caname name] [-in filename] [-out filename] [-noout] [-nomacver] [-nocerts] [-clcerts] [-cacerts] [-nokeys] [-info] [-des | -des3 | -idea | -aes128 | -aes192 | -aes256 | -camellia128 | -camellia192 | -camellia256 | -nodes] [-noiter] [-maciter | -nomaciter | -nomac] [-twopass] [-descert] [-certpbe cipher] [-keypbe cipher] [-macalg digest] [-keyex] [-keysig] [-password arg] [-passin arg] [-passout arg] [-rand files] [-CAfile file] [-CApath dir] [-CSP name]

DESCRIPTION

The pkcs12 command allows PKCS#12 files sometimes referred to as PFX files to be created and parsed. PKCS#12 files are used by several programs including Netscape, MSIE and MS Outlook.

COMMAND OPTIONS

There are a lot of options the meaning of some depends of whether a PKCS#12 file is being created or parsed. By default a PKCS#12 file is parsed. A PKCS#12 file can be created by using the -export option see below.

PARSING OPTIONS

-in filenameThis specifies filename of the PKCS#12 file to be parsed. Standard input is used by default.

-infooutput additional information about the PKCS#12 file structure, algorithms used and iteration counts.

and the OpenSSL help for dumping pkcs7 information:

openssl pkcs7 [-inform PEM|DER] [-outform PEM|DER] [-in filename] [-out filename] [-print_certs] [-text] [-noout] [-engine id]

DESCRIPTION

The pkcs7 command processes PKCS#7 files in DER or PEM format.

COMMAND OPTIONS

-inform DER|PEM; This specifies the input format. DER format is DER encoded PKCS#7 v1.5 structure.PEM the default is a base64 encoded version of the DER form with header and footer lines.

-print_certs; prints out any certificates or CRLs contained in the file. They are preceded by their subject and issuer names in one line format.

-text; prints out certificates details in full rather than just subject and issuer names.

Notes:

  • do not forget the -inform DER option to specify a binary .p7b file.
  • the -text option gives you more verbose information

via OpenSSL: Documents, pkcs71.

–jeroen

via:

Posted in CertUtil, OpenSSL, PKI, Power User, Public Key Cryptography, Security, Windows | Leave a Comment »

How men and women see…

Posted by jpluimers on 2015/07/25

DX posted the “how women see fasteners” variation on “how men see colours“:

How women see fasteners

How women see fasteners

via DX Photos from posts.

Posted in Fun | Leave a Comment »

Saving MMC files as MSC and prevent the “save console settings” dialog.

Posted by jpluimers on 2015/07/24

Two tricks when creating MSC files that contain the snap-in configuration of the MMC (Management Console).

Normally you do this once:

  1. Start MMC
  2. Add some snap-ins
  3. Save your configuration as an MSC file

And then when you need that particular configuration, each time:

  1. Open the MSC file
  2. Perform some actions
  3. Close the MMC
  4. Answer No to this question:

---------------------------
Microsoft Management Console
---------------------------
Save console settings to [filename].msc?
---------------------------
Yes No Cancel
---------------------------

The trick around this last question is:

Read the rest of this entry »

Posted in Power User, Windows, Windows 7, Windows 8, Windows 8.1, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista, Windows XP | Leave a Comment »

Example of xsd2code only handling xsd annotations for attributes, not for elements, types and other places where they can be used in an XSD.

Posted by jpluimers on 2015/07/22

See the gist below:

Example of xsd2code only handling xsd annotations for attributes, not for elements, types and other places where they can be used in an XSD.

Steps to reproduce:

  1. Install xsd2code and Visual Studio.
  2. Put all these files in one directory.
  3. Run `generate-C#-from-XSD-annotations.bat`.
  4. Diff `annotations.xsd.exe.cs` and `annotations.xsd2code.exe.cs`.
  5. Observe only 1 spot in `annotations.xsd2code.exe.cs` has the annotations converted to C# comments.

Gist: Example of xsd2code only handling xsd annotations for attributes, not for elements, types and other places where they can be used in an XSD. Steps to reproduce.

Read the rest of this entry »

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Development, Software Development, XML, XML/XSD, XSD | Leave a Comment »