I found this great Delphi XE5 Android Bluetooth YouTube video, byBjörn Hansen, from back in September last year after the launch of Delphi XE5. it shows you how to use Delphi to create an Android app that uses Bluetooth to connect to a lighting control system. The developer includes the source code for the example that also includes a Android Bluetooth Delphi interface unit version of the…
Printing from an Android device using FireMonkey
August 16, 2013
Author: J T403
Printing from an Android device requires a little bit more setup than in iOS where you simply connect to an AirPrint capable printer (like my Epson XP-400). However, Android printing appears to work with any Wifi printer (or PC connected printer), so its more…
Setting Text Parameters in FireMonkey
February 5, 2013
Author: Сергей
One of small but rather useful new features of FireMonkey introduced in XE3 version is the FMX.Types.ITextSettings interface. Often we need to change some parameters of an output text for a component, which class is not known a priori. For example, a…
YAML and Remote Code Execution
February 4, 2013
Author: Craig Stuntz
YAML’s security risks are in no way limited to Rails or Ruby. YAML documents should be treated as executable code and firewalled accordingly. Deserializing arbitrary types is user-controlled, arbitrary code execution.
It’s Not Just Ruby
A few weeks ago, I had a need to parse Jasmine’s jasmine.yml in some C# code. I spent some time looking at existing YAML…
Author: Craig Stuntz
HTML input elements have a placeholder attribute which you can use to show a bit of text to prompt the end user. Although you can make an editable div by using the contenteditable attribute, it will not support the placeholder attribute. I needed to do…
Installing Sonar for Delphi
November 22, 2012
Author: Miguel Angel Oliver
On15th of November the HTML5 Builder QA Team was in the VLCTesting where welearned very good experiences and shared knowledge, amongst this was the software Sonar,Right now in HTML5 Builder we are not using that tool but we…
Why Won't Visual Studio Step Into This Code?
March 30, 2011
Author: Craig Stuntz
I helped another developer debug an interesting problem this morning. Let’s see if you can spot the problem. The code in question looked something like this simplified version containing only enough code to show the problem:
public void Execute()
{
DoStuff(); // breakpoint 1
}
public IEnumerable<Coordinate> DoStuff()
{
…
Troubleshooting Entity Framework Connection Strings
August 13, 2010
Author: Craig Stuntz
In an application which uses the Entity Framework, you may see the following error at runtime:
MetadataException: Unable to load the specified metadata resource
The cause of this error is a missing or malformed Entity Framework connection string. In…
In LINQ, Don't Use Count() When You Mean Any()
April 21, 2010
Author: Craig Stuntz
If you have a list, array, or query in a C#/LINQ application and need to check and see if the list is empty, the correct way to do this is to use the Any() extension method:
if (q.Any())
{
Similarly, you can check to see if any elements in the list…
A Math Primer for Gentry's Fully Homomorphic Encryption
April 8, 2010
Author: Craig Stuntz
A couple of weeks ago, I wrote What Is Homomorphic Encryption, and Why Should I Care? In that post, I promised to share my C# implementation of the algorithm from Craig Gentry’s CACM article. Before I can do that, though, I need to explain some of the math involved.
Perhaps surprisingly, it’s actually very simple. (I say “surprisingly” because much of…