October 2015
« Oct    




« Voorgaande Artikelen

Query SQLite database from unrooted Android device

Wednesday, October 22nd, 2014

To quickly test your SQLite database while developing an Android app, it can be useful to use the sqlite3 command line command to query the database. However, it is not easy to get to the SQLite file: you cannot just download it from your device, nor can you mount the right directory to your development […]

Python Snack: How to log only error to stdout in CherryPy

Thursday, April 24th, 2014

Started working with Python, which is extremely easy and a joy to work in. It also has great libraries and tools you can use. So, also started using CherryPy to power the XML API I am working on. While debugging it throws out a lot of messages on stdout, of which the access messages I […]

How to ditch PHP, part 2: diving into Python

Saturday, December 14th, 2013

Case Study In part 1 we defined our limits and the requirements needed to replace PHP. We gave Python a first look and found out it is quite easy to use it in Apache. To get a good feeling of what Python can do and how to build a Real World site, I decided to […]

How to ditch PHP, part 1: Introduction

Saturday, December 7th, 2013

Introduction Yes, you read it correctly. After years (approximately 13) of using PHP as my go-to tool for web development, I decided to ditch it. It was becoming more and more of a nuisance and when I got more into C# and Java development lately, PHP started to really feel like a incoherent mess. I […]

Android custom AlertDialog

Monday, January 7th, 2013

For our Snøg Android app, I was browsing the web, figuring out how to add the UnlockBar I wrote to a Dialog, to create a slide-to-OK dialog. I reckoned this would be a simple case of extending the Dialog or AlertDialog class, build it and be done with  it. Well I was wrong. There is […]

iOS vs Android Development, Round 1: Getting Started

Wednesday, October 31st, 2012

This week, I took up porting our Snøg Avalanche Buddy to iPhone. To do so, I had to learn quite some things. This post will touch all the troubles I have encountered and I try to compare it to developing an app in Android. Development Machine The first hurdle to take is getting your development machine. Android […]

C#.NET snack: sign data with RSA

Tuesday, July 10th, 2012

Create keys: var csp = new RSACryptoServiceProvider(keyStrength); var privateKey = csp.ExportCspBlob(true); var publicKey = csp.ExportCspBlob(false); Sign data: var csp = new RSACryptoServiceProvider(); csp.Clear(); csp.ImportCspBlob(File.ReadAllBytes(privateKeyFile)); var sig = csp.SignData(data, new SHA1CryptoServiceProvider()); Verify data: csp.Clear(); csp.ImportCspBlob(File.ReadAllBytes(publicKeyFile)); if (csp.VerifyData(data, new SHA1CryptoServiceProvider(), sig)) {     Console.WriteLine(“Data is OK”); } else {     Console.WriteLine(“Data is not OK”); }

Copy JVC Everio .MOD files on Linux

Monday, June 4th, 2012

I patched a little Python script to correctly copy .MOD/.MOI files to MPEG-2, including the aspect ratio bug in the format: http://blog.friesoft.nl/files/sdcopy.py. It is tested and works on Ubuntu 12.04.

Adobe Flex snack: Error #2048: Security sandbox violation

Tuesday, May 22nd, 2012

If you are building a Adobe Flex application that uses sockets, you have to send the policy-file-request, or crossdomain.xml. A lot of info available on it, except that you need to send a null character at the end of it.

Javascript snack: enable both click and doubleclick events on one element

Thursday, May 10th, 2012

HTML defines onClick and onDblClick event handlers on all elements. However, if you want to enable both on the same element, something goes wrong. the onClick event gets fired twice! And that is not what we want, so here’s a little Javascript to fix that: // use these functions to enable *both* onclick and // […]

« Voorgaande Artikelen