Archive for the ‘Development’ Category
Posted by jpluimers on 2012/08/16
If anyone knows a better solution than string search/replace, please let me know:
I’m required to write a tool that can handle the below XML fragment that is not well formed as it contains XML declarations in the middle of the stream.
The company already has these kinds files in use for a long time, so there is no option to change the format.
There is no source code available that does the parsing, and the platform of choice for new tooling is .NET 4 or newer preferably with C#.
This is how the fragments look like: Read the rest of this entry »
Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, C#, C# 2.0, C# 3.0, C# 4.0, Development, Software Development, XML, XML/XSD | Leave a Comment »
Posted by jpluimers on 2012/08/15
A few weeks ago, Bill Karwin did a must watch webinar on the prevention SQL Injection titled “SQL Injection Myths and Fallacies“.
Bill Karwin (twitter, new blog, old blog, Amazon) is famous for much work in the SQL database community, including InterBase/Firebird, mySQL, Oracle and many more.
He also:
Anyway, his webinar is awesome. Be sure to get the slides, watch the replay, and read the questions follow up.
Watching it you’ll get a better understanding of defending against SQL injection.
A few very valuable points he made: Read the rest of this entry »
Posted in .NET, .NET 3.5, .NET 4.5, .NET ORM, ASP.NET, Batch-Files, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C++, Cloud Development, COBOL, CommandLine, Database Development, Delphi, Delphi for PHP, Delphi x64, Delphi XE2, Development, EF Entity Framework, F#, Firebird, FireMonkey, History, InterBase, iSeries, Java, JavaScript/ECMAScript, Jet OLE DB, LINQ, LLBLGen, MEF, Microsoft Surface, Mobile Development, PHP, PowerShell, Prism, Scripting, SharePoint, SilverLight, Software Development, SQL, SQL Server, SQL Server 2000, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, SQL Server 7, VB.NET, VBS, Visual Studio 11, Visual Studio 2002, Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools, Web Development, Windows Azure, WinForms, WPF, XAML, xCode/Mac/iPad/iPhone/iOS/cocoa | 1 Comment »
Posted by jpluimers on 2012/08/14
Last week I posted an in depth answer on StackOverflow.com about the memory allocation difference in Delphi and Fortran, or more accurately in two different kinds of languages.
You have:
- column major order (not only used in Fortran and other science centric languages, but also in the shading languages GLSL and HLSL that can be used in FireMonkey)
- row major order (used in most other languages, for instance Delphi, C, etc)
A very important aspect is the order of for optimized loops. For column major order, the optimum is inside out (as the inner arrays/records are in consecutive memory locations), but for row major order, it is the exact inverse.
One of the consequences is that in Fortran it is a very fast operation to pass an array of inner fields as parameter to a method.
This is what I wrote: Read the rest of this entry »
Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi for PHP, Delphi x64, Delphi XE, Delphi XE2, Development, Fortran, Software Development | 4 Comments »
Posted by jpluimers on 2012/08/12
Emile Nijssen, Dutch student Electronics at the Delft University of Technology wrote an interesting English 8.5W Core i3-based desktop computer abstract of a Dutch series of post getting a Desktop setup running far under 10W.
Though about 2 years old, they are immensely useful as not many people have thoroughly researched all that, and the info is still very applicable on more today’s hardware.
I got there because I was looking for some real world usage of VMP3203 DC/DC converters at 5V output that you can really well priced on DealExtreme (the PDF of the “datasheet” seems offline, but there is a Google cache of it).
If you can read/translate Dutch, this is the series (be sure to read the comments, as those contain about 25% of the info):
- Teaser: Core i3 desktopsysteem @ 10W idle… – mux’ blog.
- 10W core i3 systeem – de voorbereidingen – mux’ blog.
- 10W i3 systeem – de treinreis – mux’ blog.
- 10W i3 systeem – undervolten en hardwaremods! – mux’ blog.
- 10W i3-systeem: nu voor maar 8.5W! – mux’ blog.
He even won a prize of EUR 2500 with this design!
Great work!
–jeroen
Posted in Development, Electronics Development | Leave a Comment »
Posted by jpluimers on 2012/08/09
A while ago, I needed a way to defer settings to environment variables in a .NET application written in C#.
The easiest way to do this is to keep the same syntax as for expanding environment variables in batch files: use the %ENVIRONMENTVARIABLE% syntax (not the delayed expansion !ENVIRNMENTVARIABLE! syntax).
The reason is that there is a Windows API function ExpandEnvironmentStrings that handles all the expansion magic.
Don’t P/Invoke that function yourself, as there is already a very nice Environment.ExpandEnvironmentVariables wrapper since the .NET framework 1.1 that handles all the gory details for you (like marshalling the strings, making sure that lpDst contains enough space for the expansion).
–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/08/08
CodeRush has a nice refactoring to extract a C# string into a resource.
There is a small glitch that when you press undo after that, and there was no string file in your project, then the empty resource file is not always saved.
Upon building your project, you will get an error like this:
---------------------------
Microsoft Visual Studio
---------------------------
The item 'Resources.resx' does not exist in the project directory. It may have been moved, renamed or deleted.
---------------------------
OK
---------------------------
The Resources.resx file is not visible in your Solution Explorer, so you cannot delete it there.
You have to manually edit your .csproj file and remove the Resources.resx reference there.
I’ve had this happen only a couple of times, and cannot yet reproduce this. Until I can reproduce, this is a workaround to remedy the effects.
–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/08/07
Now that the there are RadStudio XE3 demos available at SourceForge.net Repository – [radstudiodemos] Index of /branches/RadStudio_XE3, and a post on a Delphi Event in New Zeeland rumours of an eminent Delphi/RAD Studio XE3 version start to raise.
It is fun to watch the activity stats on the SourceForge project RAD Studio Demo Code and correlate them to the Delphi release and update dates.
I made PNG images of two graphs. Click on them to enlarge, or click on the links to get to the statistics pages.
Note that when the span is wide enough, activity gets summed to the start of the month (first picture).
Project statistics graphs
Correlation
The real fun is the correlation with the Delphi Release Dates – Delphi Programming and the Delphi update dates from the Delphi Registered User Downloads.:
| Year-Month |
Date |
Delphi/
RAD Studio
version |
Release/Update |
| 2009-12 |
2009-12-14 |
2010 |
Update 4/5 |
| 2010-08 |
2010-08-30 |
XE |
Release |
| 2011-07;2011-08 |
2011-09-02 |
XE2 |
Release |
| 2011-11 |
2011-11-01 |
XE2 |
Update 2 |
| 2012-04 |
2012-05-18 |
XE2 |
Update 4 + Hotfix |
| 2012-07 |
2012-??-?? |
XE3? |
Release? |
–jeroen
via: RAD Studio Demo Code | Free software downloads at SourceForge.net.
Posted in Delphi, Delphi 2010, Delphi XE, Delphi XE2, Development, Software Development | 5 Comments »
Posted by jpluimers on 2012/08/02
Your CodeRush SolutionCache folder (which is in your roaming profile, how bad!) can grow to multi-gigabyte proportions as it is not auto-cleaned.
This can lead to very long times for doing logon/logoff in a corporate network.
Mike Christian describes how to clean it.
Note that as of a few versions ago, the AssemblyCache is now a subfolder inside the SolutionCache folder.
Another reason to clean it is when CodeRush starts acting weird.
–jeroen
via: The Curly Brace: How to Clear DevExpress CodeRush Assembly and Solution Cache.
Posted in .NET, C#, Development, Software Development, VB.NET, Visual Studio 11, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2012/08/01
Computing on not so common platforms it so much fun, especially when you can use familiar tools for it.
A couple of years ago, I did a fun project with an USB WebCam, a Pololu USB servo controller, two servo motors, a servo relay and a laser pointer. The device would point the laser pointer at the biggest moving object in the WebCam view, and flash the laser pointer at it.
All code was C# running on Windows.
Basically there are two classes on “small” devices that run .NET code (apart from smartphones and tablets):
- Raspberry Pi:
Mini devices with more than a couple of megabytes memory running a kind of regular .NET Framework.
- Arduino:
Micro devices with maximum of a couple of dozen kilobytes memory (a megabyte if you are really lucky) running the .NET Micro Framework
This might be a chance to lift it to a new level and embed everything in one device (:
The cool thing about the .NET Micro Framework is that you can do real time stuff.
–jeroen
via:
Posted in .NET, Arduino, Development, Hardware Development, Raspberry Pi, Software Development | 2 Comments »
Posted by jpluimers on 2012/07/31
Close to 5 months after SQL Server 2012 got released to manufacturing, SQL Server 2008 R2 Service Pack 2 became available last week (July 26th, 2012).
A few links:
–jeroen
Posted in Database Development, Development, SQL Server, SQL Server 2008 R2, SQL Server 2012 | Leave a Comment »