Posted in May 27, 2011 ¬ 05:31h.cpf_Comments Off
As with everything in Boost::Python, it might not always be obvious how to best extract certain types to C++ One thing to remember is that most (if not all) C++ types are supported by boost::python::extract So, to extract a std::string object from python, it’s best to use the extract function again: std::string tmp; tmp = [...]
Read the rest of this entry »
Posted in December 26, 2010 ¬ 17:07h.cpf_Comments Off
Simple cron script to check the status of some init.d daemon/script and restart it if necessary, shown in the example with postgresql, but should work with about any init.d script. #!/bin/sh SCRIPT=postgresql /etc/init.d/$SCRIPT status if [ "$?" != "0" ]; then /etc/init.d/$SCRIPT start fi
Read the rest of this entry »
Posted in December 14, 2010 ¬ 18:20h.cpf_Comments Off
When working with boost::python, it’s quickly noticeable the lack of documentation involved in integrating Python in a C++ application, however using boost::python is a lot easier then using the normal Python/C API so it’s recommended to whomever considers using Python in a C++ application. Tricky The downside of it is the lack of examples, and [...]
Read the rest of this entry »
Posted in February 28, 2010 ¬ 18:51h.cpf_Comments Off
When using flash and lightbox (and lookalikes) it’s a common issue that the flash movie which should be under the lightbox pops out of there (often in weird places and not 100%) So, an elegant way to solve this in Javascript would be to have the flash moved or disappeared. Hide it (display none) Using [...]
Read the rest of this entry »
Posted in November 13, 2008 ¬ 16:37h.cpf_Comments Off
As I’m all about python, and pythonic is the way I speak any coding language, I had a challenge in finding a way to dynamically implement new variables in a class. Unlike python, in which this is very simply done by: class MyClass: def __init__(self): self.newvar = ‘value’ self.newvar2 = ‘bla’ It’s quite the challenge [...]
Read the rest of this entry »
Posted in October 29, 2008 ¬ 17:39h.cpf_Comments Off
So, you’re here on some quest to solve an issue where you do any amount of insert queries through MySQLdb but it doesn’t appear in the database? Well, I had exactly that issue. Took me ages to figure out why after moving an app to another server (with by design the same database, except for [...]
Read the rest of this entry »
Posted in December 19, 2007 ¬ 07:31h.cpf_Comments Off
Sorry for the late idleness, I’ve been quite busy elsewhere. Nonetheless, there’s some nice work going on with the android platform, again. This time someone has published his current work status in creating a Netbeans plugin to emulate the Android OS. Screenshots are found here: http://picasaweb.google.com/joerg.ruethschilling/AndroidPluginForNetbeans I’m definitely using that one when it’s out there, [...]
Read the rest of this entry »
Posted in December 9, 2007 ¬ 09:33h.cpf_Comments Off
The creator of DroidDraw is certainly busy, for he published another tutorial concerning how-to in certain graphical aspects of Android. This time, it’s about how Android widgets work. Be sure to read it, it’s literally a 2 minute read to knowing the deal with Android widgets, great summary.
Read the rest of this entry »
Posted in December 5, 2007 ¬ 21:26h.cpf_Comments Off
I’ve mentioned droiddraw earlier in this blog. Since then, the developer of the only gui building program for android at the moment has been quite busy, and been following “Release early, release often” cycles. He’s also made a tutorial on how to use the gui builder, certainly worth your time! I’m expecting a great deal [...]
Read the rest of this entry »
Posted in December 3, 2007 ¬ 19:56h.cpf_Comments Off
Today I saw a post concerning about the seeing impaired people who could use android for the best, if only there was some sort of screen reader software running on Android. Something was said about not being able to implement that because of certain security reasons, but that probably referred to independent software reading what [...]
Read the rest of this entry »