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

Archive for the ‘Development’ Category

Interesting: Introducing FLAC.js: A Pure JavaScript FLAC Decoder — Official.fm Labs

Posted by jpluimers on 2012/06/18

Interesting: Introducing FLAC.js: A Pure JavaScript FLAC Decoder — Official.fm Labs.

–jeroen

Posted in Development, JavaScript/ECMAScript, Power User, Scripting, Software Development | Leave a Comment »

CloudFlare: CDN and more from the makers of the HoneyPot project

Posted by jpluimers on 2012/06/15

The CloadFlare network is built by some of the people behind the HoneyPot project.

This sounds very interesting; is on my “todo” list. I’m anxious to see their business model, and how they finance their free entry level subscription. Do their subscription plans cross-financen?

  • CloudFlare CDN

    Distribute your content around the world so it’s closer to your visitors (speeding up your site).

  • CloudFlare optimizer

    Web pages with ad servers and third party widgets load snappy on both mobile and computers.

  • CloudFlare security

    Protect your website from a range of online threats from spammers to SQL injection to DDOS.

  • CloudFlare analytics

    Get insight into all of your website’s traffic including threats and search engine crawlers.

  • CloudFlare apps

    CloudFlare apps makes installing web apps on your site fast, safe and one-click simple.

–jeroen

Posted in Development, Power User, Software Development, Web Development | Leave a Comment »

.NET Enums enumerated: System.ArgumentException was unhandled by user code Message=An item with the same key has already been added.

Posted by jpluimers on 2012/06/13

All .NET languages have a cool feature: enumerated types, for instance enum in C#Enum in VB.NET, or the enum in the  Oxygene language of Delphi Prism. You can even specify the underlying integral type.

It allows you to name values, which can make your code very readable.

It also allows you to assign an integer to each of those values, which allows you to map them to existing integers in the ‘real’ world. This is both a powerful and potentially uncool feature of enums (the other uncool feature is that though you can have bitflags in Enums, most .NET languages don’t have a Set type. You need Set Extensions to do things like Set operations on Card Suit bitflags using C# extension methods).

Because of my background in the 80s in MuSimp and Turbo Pascal, I’ve done quite a bit of enums and sets in the past, hence the mentioned C# enum extension methods mentioned above. While writing this article I also found out Extending’ the Enum Class to Validate the Enum Values with the Flags Attribute that mentions quite a bit of stuff that is complementary to my code and what you will see below.

The risk of assigning integer values on C# enum is that you can assign the same integer value to multiple enum elements.

For instance, this code will fail: Read the rest of this entry »

Posted in .NET, C#, C# 2.0, C# 3.0, C# 4.0, Development, Prism, Software Development, VB.NET | Leave a Comment »

SQL Server 2000 Reporting Services: copying the .RDL from your server (via: SQL Server Forums – Copy .rdl from ReportServer)

Posted by jpluimers on 2012/06/12

With old installations like Reporting Services 2000, you will often see that a few the reports on the server don’t match the ones in your version control system.

That’s why you sometimes want to download the .RDL files.

User nsaini shows on the SQLTeam forum:

It is easy …..

  1. Go to Report on Report Manager,
  2. Click properties of report,
  3. under the report definition you will see Edit and Update link…
  4. if you click on Edit you can open or Save the RDL files.

Tara Kizer shows how you get into the report manager: through this URL http://yourserver/reports

Easy :)

There are similar steps for SQL Server 2005 and SQL Server 2008.

If you have to do many of them, you can use Reporting Services Scripter to do it.

Even easier :)

–jeroen

via: SQL Server Forums – Copy .rdl from ReportServer.

Posted in Database Development, Development, Reporting Services, SQL Server, SQL Server 2000 | Leave a Comment »

Programmatic alternatives to Windows-L keyboard shortcut (SwitchUser / LockWorkstation)

Posted by jpluimers on 2012/06/07

On Windows, the keyboard shortcut [WayBackWindows-L will lock your workstation and when [WayBackFast User Switching is enabled – and when your (corporate) policies allow it – shows your Switch User screen.

First of all, there is [WayBackTSDISCON (which I found thanks to [WayBackthis thread). It is meant to disconnect a terminal services session, but when you are logged in on the console, it just locks your workstation.

It is small (about 20 kilobyte) and [WayBackhas been there since Windows 2000.

Then there is the [WayBackLockWorkStation function that does the same.

Lot’s of people think you can call LockWorkStation using rundll32.exe. As per Raymond Chen: [WayBack] (404) Don’t do that: it has a different parameter count and different calling convention than [Archive.isrundll32.exe expects (note that in Raymond’s article, the last link is broken).

So now you all go upvote [WayBack] the TSDISCON answer and downvote the ruldll32.exe LockWorkStation answers on this [WayBackSuperUser.com question.

–jeroen

PS: [WayBackRob van der Woude published a list of Terminal Server commands including TSDISCON.

Posted in Development, Power User, Scripting, Software Development, Windows, Windows 7, Windows 8, Windows Vista, Windows XP | Leave a Comment »

There are reasons why Delphi is not C++ (via: Entropy Overload: One-liner RAII in Delphi)

Posted by jpluimers on 2012/06/06

There was a nice short discussion on Entropy Overload where Ivan Levanshew seemed to want to be Delphi way more C++ and Barry Kelly explains why Delphi isn’t C++.

Both Delphi and C++ are great languages, but both have weaknesses too. It is good that their individual strengths complement each other, and their weaknesses don’t crossover too much.

Ivan Levashew said…

It’s XE2 now, and there is still no proper RAII despite Delphi runtime already having all the required functionality for years. Variants copying and destruction is an example.

It’s a pity. Read the rest of this entry »

Posted in C++, Delphi, Delphi XE2, Development, Software Development | 1 Comment »

.NET/C#: reading/writing Excel workbooks and worksheets

Posted by jpluimers on 2012/06/06

Basically there are many ways to read/write Excel workbooks and worksheets:

  1. Use the open source EPPlus .NET assembly (which is based on ExcelPackage)
  2. Use the open source ExcelLibrary which seems to be derived from PHP ExcelWriter
  3. Use OleDB to read/write Excel with either the JET (Office <= 2003) or ACE (Office +> 2007) drivers
  4. Use COM/OleAutomation/Interop/VSTO

The latter is used by many many people, and has two big drawbacks:

  • it requires Excel to be installed
  • it is painfully slow

The others can run server side as they do not require Excel to be installed. They are also much faster.

I’ve used OleDB, and it is sort of OK, but hard work.

EPPlus is much faster and versatile and seems to be the most active open source project.

–jeroen

Posted in .NET, .NET 4.5, ASP.NET, C#, Development, Excel, Office, Software Development | 2 Comments »

Some links on the Delphi compiler and the LLVM Compiler Infrastructure Project

Posted by jpluimers on 2012/06/05

A long while ago I read about Embarcadero Discussion Forums: Barry Kelly on LLVM … I think it was 2010, the thread is gone now (probably because the Embarcadero forum index does not go back more than one year), but the title still shows up at Google search: Barry+Kelly+on+LLVM

Barry Kelly is one of the Delphi compiler engineers, so it got me thinking and made me archive some links (I wish I had archived the content as well as the Wayback Machine didn’t archive some defunct links.)

Today Paweł Głowacki presents the Mac and Mobile Development for Windows Developers event and indicated future Delphi compiler platform targets like ARM will indeed make use of the The LLVM Compiler Infrastructure Project..

(if you still want to come: you are welcome, there are a few spots left; The event is June 5, 2012 at 9:30 AM – 1:30 PM
at the High Tech Campus Eindhoven Conference Center, The Strip).

Delphi leveraging LLVM for ARM is important in more than a few ways: Read the rest of this entry »

Posted in Delphi, Development, FireMonkey, OS X FMX, Software Development | 10 Comments »

Glyphs are apparently a designer term for icons that are not colorful. Get them at TheNounProject.com – via Scott Hanselman

Posted by jpluimers on 2012/06/05

Scott’s blog posts usually contain a truckload of side information in between the main topic.

He was discussing the new ‘designed’ look of Visual Studio 11 (the mantra: just give it a shot, and then tell how you like it; I like the new look and feel very much).

And he also mentioned a site of monochrome Glyphs I hadn’t seen before:

Glyphs are apparently a designer term for icons that are not colorful. You can see a lot of glyphs at http://thenounproject.com

Those glyphs are awesome!

–jeroen

via: Change Considered Harmful? – The New Visual Studio Look and Feel – Scott Hanselman.

Posted in Development, Software Development, User Experience (ux), Visual Studio 11, Visual Studio and tools | Leave a Comment »

Searchable UTF8 Unicode Characters

Posted by jpluimers on 2012/05/31

Brilliant: site where you can Search UTF8 Unicode Characters.

If you know part of the name of a Unicode character, you can now try and find it, then copy/paste it from that site.

Edit: 20160403: that site disappeared, but this one works: Unicode Character Search and Shapecatcher.com: Unicode Character Recognition still works.

–jeroen

Posted in Development, Encoding, Power User, Software Development, Unicode, UTF-8, UTF8 | Leave a Comment »