Archive for July, 2012
Posted by jpluimers on 2012/07/26
While reviewing some client’s code, I noticed they were generating and parsing XML and HTML by hand (do not ever do that yourself!).
Before refactoring this into something that uses libraries that properly understand XML and HTML, I needed to assess some of the risks.
A major risk is to get the escaping (and unescaping) of XML and HTML right.
Time to finally organize some of my links on escaping HTML and XML that I had in my favourites list.
The starting point is the List of XML and HTML character entity references on Wikipedia. It is readable, complete and lists both kinds of escapes.
XML escapes
The official W3C text that describes XML escaping is hard to read.
There are only 5 predefined XML entities for characters that can (some must) be escaped. This table is derived from the Wikipedia article.
HTML escapes
Read the rest of this entry »
Posted in " quot, & amp, > gt, < lt, ' apos, ASCII, Development, Encoding, HTML, Power User, SocialMedia, Software Development, Unicode, Web Development, WordPress, XML, XML escapes, XML/XSD | 1 Comment »
Posted by jpluimers on 2012/07/25
Boy I wish Visual Studio had a “Step into first property or operator” command. You can only do this through the context menu, and that is awfully cumbersome to use.
Just look at the context menu at the end of the post to see why.
Luckily, the option below it is “Step over properties and operators”, which you can easily disable. I usually have it disabled, so for me it is the way to temporarily enable it when I want to skip properties and operators.
If you don’t then you get this message when tracing into properties (or operators)
:
[Microsoft Visual Studio]
Your step-into request resulted in an automatic step-over of a property or operator.
This behavior can be overridden in the context menu for the line being executed by choosing 'Step Into Specific' or by unchecking the option 'Step over properties and operators'.
Do you want to continue being notified when an automatic step-over happens?
[Yes] [No]
–jeroen

Posted in .NET, Development, Software Development, Visual Studio 11, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2012/07/24
a quick follow up:
- the Contacts database is more than half a gigabyte, with about 3500 contacts
- even though I had no running apps, data storage space was steadily decreasing till less than half a megabyte
- I have disabled all of the accounts sync features
- I have uninstalled the LinkedIn and FaceBook apps
- I have turned off WiFi, Bluetooth and Data connection (so it cannot sync, unless over USB)
- I have moved a couple of application from memory to SD card
- I am trying to export the various portions of the contacts DB to VCF on the SD card like described here
- a few people have contacted me to assist. Thanks!
Boy I wish I had shell access to this device.
Being able to do simple things like “du / -s | less” or “df” would be soo nice.
Will follow up with more results when I have them.
–jeroen
via: Android help needed: App that cleans up the Contacts mess that the LinkedIn app left behind « The Wiert Corner – irregular stream of Wiert stuff.
Posted in About, Android Devices, Personal, Power User | 1 Comment »
Posted by jpluimers on 2012/07/24
A long time ago, I wrote about the Reflector debacle and the URLs how it used to update. Since then Reflector 6.8.2.5 came out. No newer free versions will be released, and RedGate randomized parts of the URLs to make it harder to upgrade if you do not have version 6.5.0.135 around (if you really want you can go around that too).
So I’ve been using some alternatives for a while: ILSpy by SharpDevelop (open source), dotPeek by JetBrains and JustDecompile by Telerik (both closed source).
There are more (monoflector, Kaliro App Explorer, Dotnet IL Editor, Dis#, StackOverflow threads and various sites describing more) but I discuss the ones I used. Read the rest of this entry »
Posted in .NET, Development, Reflection, Software Development | 10 Comments »
Posted by jpluimers on 2012/07/24
Please don’t do your code like this:
internal bool blnMDACResult = true;
internal bool CheckMDACisOK(string eenMDAC, string strAdoDllPath)
{
FileVersionInfo AdoVersionInfo;
try
{
AdoVersionInfo = FileVersionInfo.GetVersionInfo(strAdoDllPath);
AdoDllVersion = new Version(AdoVersionInfo.ProductMajorPart, AdoVersionInfo.ProductMinorPart, AdoVersionInfo.ProductBuildPart, AdoVersionInfo.ProductPrivatePart);
switch (eenMDAC)
{
case "2.6":
case "2,6":
// MDAC 2.6 - 2.60.6526.0
Version MinimumVersion = new Version(2, 60, 6526, 0);
blnMDACResult = AdoDllVersion.CompareTo(MinimumVersion) >= 0;
break;
case "2.7":
case "2,7":
// MDAC 2.7 - 2.70.7713.0
Version MinimumVersion = new Version(2, 70, 7713, 0);
blnMDACResult = AdoDllVersion.CompareTo(MinimumVersion) >= 0;
break;
case "2.8":
case "2,8":
// MDAC 2.8 - 2.80.1022.0
Version MinimumVersion = new Version(2, 80, 1022, 0);
blnMDACResult = AdoDllVersion.CompareTo(MinimumVersion) >= 0;
break;
default:
// 2.9 and up
string numberDecimalSeparator = Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator;
double dMinVersion = ConvertAppl.ToDouble(eenMDAC.Replace(".", numberDecimalSeparator));
double dVersion = ConvertAppl.ToDouble(AdoDllVersion.Major + ".".Replace(".", numberDecimalSeparator) + AdoDllVersion.Minor);
if (dVersion > dMinVersion)
blnMDACResult = true;
else
blnMDACResult = false;
break;
}
}
catch
{
// Something went wrong, let's assume the version is ok. (trial on error)
blnMDACResult = true;
return blnMDACResult;
}
return blnMDACResult;
}
–jeroen
Posted in .NET, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2012/07/23
It seems LinkedIn doesn’t react to my tweet for help, so maybe you can provide me (paid) with a custom build of Contact Remover Plus.
This is my problem: https://twitter.com/jpluimers/status/225625536976793600
The LinkedIn Android app has created dozens of LinkedIn links and photo links to many of my contacts.
This renders many functions on my phone unusable:
- loading the native People app takes minutes
- Contacs cannot be synced my Google account any more
- making a backup fails
- I cannot edit contacts in the Android People app any more
- calling a phone number usually takes more than 30 seconds, often more than a minute
- etc.
I tried to count this for one particular contact with the “Contact Remover” App: His contact has so many pages of photos and LinkedIn links that I cannot count them any more. They are at least dozens, probably more than 100 of each.
I’m using an HTC Sensation phone with a regular Android 4 firmware.
With Android development, I haven’t don’t anything yet with the Contacts API yet, and don’t have the time to do so in short term.
I’m willing to pay for an App that:
- removes all LinkedIn links for all contacts
- removes all LinkedIn photos for all contacts
Anyone?
–jeroen
Posted in About, Android Devices, Development, LinkedIn, Personal, Power User, SocialMedia, Software Development | 6 Comments »
Posted by jpluimers on 2012/07/23
A couple of months ago, I created a nice post listing all #WordPress Editor #keyboard #shortcuts for both Windows and Mac OS X.
As of a few days ago, WordPress.com changed their Alt-Shift shortcuts into Alt shortcuts.
For instance, Alt-Shift-d (strike through) is now Alt-d, thereby blocking the original Alt-d (which for most browsers on Windows brings you to the address bar).
They violate one of the basic GUI principles: keep existing keyboard shortcuts as they are.
On Windows based browsers that means: keep Alt and Ctrl based shortcuts. Alt-Shift, Ctrl-Shift and Ctrl-Alt-Shift shortcuts are OK.
I haven’t tested WordPress on my MacBook air yet (as I don’t think the end-users should be the WordPress.com beta testers, though they probably think the world at large is a big beta-test garden).
I have asked WordPress.com to change the shortcuts back to what they were.
–jeroen
via: #WordPress Editor #keyboard #shortcuts « The Wiert Corner – irregular stream of Wiert stuff.
Posted in Keyboards and Keyboard Shortcuts, Power User, SocialMedia, WordPress | Leave a Comment »
Posted by jpluimers on 2012/07/23
I had a bit different experience getting the Tomato Shibby firmware loaded on one of my Asus RT-N66U routers than the description from Guide to Install Tomato firmware on Asus RT-N66U nor this Video of the Asus Routers Rescue Mode Tutorial.
Somehow, the Asus Firmware Restoration Utility kept indicating “The wireless router is not in rescue mode”, no matter what I did.
This might be due to that I run VMware Workstation with some virtual LAN adapters on most of my machines.
Or not: the web-interface on the Asus RT N66U would not get into the firmware restoration mode either.
This worked though:
- pull the power plug on the RT N66U
- press and hold the reset button
- insert the power plug on the RT N66U
- wait for the power led to slowly blink
- release the reset button
- wait a few minutes for the modem to become stable
- in the mean time set your PC to these IPv4 settings: – host = 192.168.1.100 – mask = 255.255.255.0
- start your web-browser
- point your web-browser to http://192.168.1.1 (it will time out, don’t worry)
- press the power button to turn off the router
- wait a few seconds
- press the power button to turn on the router now your router gets into rescue mode
- refresh your browser so it goes to http://192.168.1.1 again
- upload your Tomato firmware
–jeroen
via: Guide to Install Tomato firmware on Asus RT-N66U / RT-N16 / RT-N12 B1 / RT-N12 C1 / RT-N10U router 韌體教學 | Moonlight Knight.
Posted in *nix, ASUS RT-N66U, Internet, Network-and-equipment, Power User, TomatoUSB | 2 Comments »
Posted by jpluimers on 2012/07/20
It runs on OS X, Windows and Linux:
JAuth is a reference desktop client for the google authenticator. Intended
as an alternative to the iPhone Google Authenticator app and similar.
And it comes with installers in addition to source code.
Interesting.
–jeroen
via: mclamp/JAuth · GitHub.
Posted in *nix, Apple, Google, GoogleAuthenticator, Mac, Mac OS X / OS X / MacOS, Power User, Windows | Leave a Comment »