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

Archive for June, 2013

Some great Delphi XE4 iOS push notification demos by Luis Felipe González Torres done in English by Anders Ohlsson

Posted by jpluimers on 2013/06/20

On the blog from Embarcadero MVP Luis Felipe González Torres are some great Delphi XE4 iOS demos.

However, the blog is Spanish (that’s probably why he is not on DelphiFeeds), so if you do not understand that you had to live with the Google Translate versions of the pages.

Until CodeRage Mobile that is: Anders Ohlsson gave a English presentation:

Creating Apple Push Notification Services (APNS) for your Mobile Applications

iOS supports the Apple Push Notification Services (APNS) This session will show you how to create a push notification services as part of your mobile application. APNS is service for sending information to iOS and OSX devices. This session will show you how to create server and device applications that create notifications containing the device token and JSON payload property list.

via CodeRage Mobile – Conference Sessions.

Basically he covered these Spanish blog posts where you can download the source code (Google translation in parenthesis):

  1. Delphi XE4 iOS. Adicionando soporte a Notificaciones Remotas (Video y Código Fuente) |.
    (Delphi XE4 iOS. Adding support for Notifications Remote (Video and Source) |)
  2. Delphi XE4 iOS. Flexibilizando el Soporte a Push Notification. Solucíon mas elegante! |.
    (Delphi XE4 iOS. Easing the Push Notification Support. More elegant solution! |)
  3. Delphi iOS XE4. Apple Push Notification. Capturando la notificación cuando la aplicación no se está ejecutando. |.
    (XE4 iOS Delphi. Apple Push Notification. Capturing the notification when the application is not running. |)
  4. Delphi iOS XE4. Apple Push. Configuración del Ambiente (Muy importante) |.
    (XE4 iOS Delphi. Apple Push. Environment Settings (important) |)

Important things:

–jeroen

Posted in Delphi, Delphi XE4, Development, FireMonkey, iOS, Software Development | Leave a Comment »

DIPP allows you to remove conditional directives from Delphi source code (via StackOverflow)

Posted by jpluimers on 2013/06/20

Cool to know that DIPP is able to strip directives from Delphi source code:

The freeware program DIPP from Delphi Inspiration can remove conditionals.

http://www.yunqa.de/delphi/doku.php/products/dipp/index

Even though DIPP does not support post-Delphi-2007 language enhancements, it usually does a very good job.

–jeroen

via: Delphi: Is there a tool that can remove conditional directives for particular conditional symbols? – Stack Overflow.

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

CodeRage Mobile day 2 QA

Posted by jpluimers on 2013/06/19

I had a bit of trouble getting into CodeRage Mobile: somehow the confirmation email never reached the pluimers.com servers. After retrying today, @EmbarcaderoTech sent a GotoMeeting link that worked.

Later I will try to trace back about the mail issue (:

I’m in now, and since I usually loose the QA information, here is a dump of the QA for today so far.

Will try to find time for post editing and getting the URLs clickable.

Welcome to CodeRage Mobile! Read the rest of this entry »

Posted in Delphi, Delphi XE4, Development, FireMonkey, JavaScript/ECMAScript, jQuery, OS X FMX, Scripting, Software Development | Leave a Comment »

Is there a Google Reader replacement that keeps ALL Google Reader history?

Posted by jpluimers on 2013/06/19

A while ago, I posted Google Reader alternatives: did you make a choice yet? indicating this about Feedly:

PRO: GR imported posts contains all history (even from blog feeds that are now defunct)

Well, I was proven wrong by this Feedly posting about the migration to their own cloud: [IMPORTANT] Preparing to be upgraded to the new feedly cloud | Building Feedly.

The one part we did not migrate from google reader is your history (too much data) so you have to expect that you are starting from a blank history and your unread counts will be reset. This is a one time issue.

Is there any Google Reader replacement that imports full history?

–jeroen

Posted in About, Google, GoogleReader, Personal, Power User | Tagged: , , | Leave a Comment »

Vintage Dave is working on a new multithreaded memory manager for Delphi that does not have a global lock

Posted by jpluimers on 2013/06/19

The comment thread at via [WayBack] The Oracle at Delphi » Give in to the ARC side (now at [WayBackplace 1 and [WayBack] 2) is very interesting.

So soon after writing a StackOverflow [WayBackanswer on Delphi Memory Managers yesterday, [WayBack] this one by [WayBack] David M (aka vintagedave) caught my eye:

This is unannounced at the moment, but I am working on a new memory manager which does not have a global lock, and is designed for multithreaded usage, including cases where memory is allocated in one thread and freed in another, and many threads are allocating and freeing at once. It also uses a more secure design than FastMM4, which may be important for world-facing code, eg web servers. It’s a personal project which I have not yet announced, but if you are interested (Allen, Guenther, others) please feel free to contact me at vintagedave@gmail.com.

I wonder if it is better than the multithreaded Delphi memory managers I mentioned in the answer:

As a side note:

One of the reasons for using FastMM is the excellent debugging capabilities. It looks like – though not free – DDDebug extends this a lot!

I found it in Wanted: live leak detection for FastMM – DelphiFeeds.com and [WayBackTURBU Tech » Blog Archive » Wanted: live leak detection for FastMM.

–jeroen

via The Oracle at Delphi » Give in to the ARC side.

Posted in Delphi, Delphi XE4, Development, FastMM, Software Development | Tagged: , , , , | 9 Comments »

Samples Environment for Microsoft Chart Controls – Release: Samples for Chart Control – .NET Framework 4

Posted by jpluimers on 2013/06/19

I hadn’t done Charting for a while, but these got going very quickly:

Samples Environment for Microsoft Chart Controls – Release: Samples for Chart Control – .NET Framework 4.

There are example downloads for ASP.NET and WinForms requiring .NET 4 or higher.

In addition, these starting points also proved to be really helpful:

Since my objective was adding charts to an existing WinForms business app, this was the namespace at hand: System.Windows.Forms.DataVisualization.Charting Namespace ().

If you are at .NET 3.5, then start at DataVisualization.Charting.Chart simple example – C# – Snipplr Social Snippet Repository.

–jeroen

Posted in .NET, .NET 4.0, .NET 4.5, ASP.NET, C#, C# 3.0, C# 4.0, Development, Software Development, VB.NET, Visual Studio 2010, WinForms | Leave a Comment »

Delphi XE2: Update 4 is not the final update… Be sure to check out HotFix 1

Posted by jpluimers on 2013/06/18

When at clients, I often see Delphi XE2 only updated until Delphi XE2 Update 4 (sometimes not even Update 3 is installed, which means you can run into Strange Format result in Delphi XE2 when using Currency data types).

Update 4 is the latest update offered by the ‘check for updates’. But the actual latest update is CodeCentral ID: 28881, RAD Studio XE2 Update 4 Hotfix for FireMonkey and C++.

The final ISO does include this update, so if you ever need to re-install, do it from CodeCentral ID: 28882, Delphi XE2 and C++Builder XE2 ISO (includes Update 4 Hotfix).

You can check which updates you have installed in the Help -> About box of Delphi:

  • RAD Studio XE2 Update 4:
    version 16.0.4429.46931;
    Delphi XE2 and C++ Builder XE2 Update 4
  • RAD Studio XE2 Update 4 hotfix 1:
    version 16.0.4504.48759;
    Delphi XE2 and C++ Builder XE2 Update 4 HotFix1
    Delphi XE2 and C++ Builder XE2 Update 4

So be aware: sometimes the HotFix is only recognizable as the version number, not the version text.

Though HotFix is advertised as FireMonkey and C++ update, it also includes some Delphi fixes and makes sure you don’t get the below error messages from IDE Fix Pack 5.1 for 2009-XE3.

As a matter of fact, shortly after releasing, the author Andreas Hausladen posted IDE Fix Pack 5.1 for XE2 requires XE2 Hotfix 1.

Andreas Hausladen releases new versions of the IDE Fix Pack at irregular intervals. Watch the release page. Currently it is at version 5.3: IDE Fix Pack 5.3 and for Delphi XE2 it indicates “IDE Fix Pack 5.3 for XE2+UP4+Hotfix1”.

While installing the Hotfix 1, you can get messages like these:

---------------------------
Embarcadero RAD Studio XE2
---------------------------
Error
Error applying patch to file C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\lib\win64\release\IdSSLOpenSSLHeaders.dcu.  It has probably been updated by other means, and can no longer be modified by this patch.  For more information contact your patch vendor.
---------------------------
Abort   Retry   Ignore
---------------------------

The reason is that the installer thought it had enough disk space, but the dynamic swap file growth of Windows systems decreased the disk space after the initialler estimate.

Make sure you have at lease 4 gigabytes of disk space free before installing RAD Studio XE2 Update 4 Hotfix 1.

These are the error messages you can get: Read the rest of this entry »

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

C#/.NET/LINQ: DotNetStat: netstat.exe with TCP ports grouped by host

Posted by jpluimers on 2013/06/18

A lot of people have written .NET equivalents of netstat code. Basically there are two starting points:

I adapted the first, made the output very much like the built-in Windows netstat, and added some LINQ code to demonstrate grouping and ordering.

Now you get grouped output like this:

Distinct Remote Address:Port pairs by Remote Address:
107.20.249.140   443
107.20.249.78    443
127.0.0.1        6421, 19872
192.168.1.81     17500, 61678
199.47.218.159   443
199.47.219.148   80
199.47.219.160   443
23.21.220.140    443
23.23.127.94     443

The code below is part of the DotNetStat example.

It demonstrates a few important LINQ aspects beyond the LINQ Query Expressions (C# Programming Guide) intro and 101 LINQ Samples in C#.:

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, Development, Jon Skeet, Software Development | Leave a Comment »

Google Chrome – how to quickly get Google search information about a term on a page: drag & drop

Posted by jpluimers on 2013/06/17

Great tip:

While reading online, have you ever seen a word or phrase that you wanted to learn more about? Next time, just highlight the term(s) and then drag it to your tabstrip to the right or left of your current tab — a new tab will open with search results for the highlighted text.

You can find other tab tricks like this here: http://goo.gl/lSilD #chrometip

–jeroen

via: Google Chrome – Google+.

Posted in Chrome, Google, Power User | Leave a Comment »

Retina MacBook Pro: extending battery life by disabling the discrete NVIDIA GeForce GT 650M graphics

Posted by jpluimers on 2013/06/14

One of the big differences between my old 13-inch MacBook Air and (fairly new) 15-inch Retina MacBook Pro was the predictability of battery usage.

The MacBook Air lasts between 4-5 hours. The Retina MacBook anywhere between 3-5 hours.

I finally found out the cause: Chrome, Remote Desktop and VMware Fusion will often (VMware fusion immediately) switch to the  discrete NVIDIA GeForce GT 650M graphics. Which uses a lot more battery (but less memory) than the integrated Intel HD 4000. Though both can drive the retina display at 2800×1600 (see Retina MacBook Pro Pushes the Limits of its Graphics Capabilities – Mac Rumors) the latter is better suited for the road warrior.

But still having the need for Chrome, Remote Desktop and VMware Fusion, I wanted a way to block switching to discrete graphics.

Luckily, quite a few sites describe how to do that:

The all come down to installing gfxCardStatus by cody krieger.

Steps to force integrated graphics: Read the rest of this entry »

Posted in Apple, Mac, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, Power User | 3 Comments »