Skip to content

Content classified under "Software"

Page 17 of 21

Braindump: Use a Decorator to Time your Python Function

July 4, 2014Category: Software
In the programs I write these days I use timing methods to profile the code, mainly because I find it easier to split and sum deltas based on functions. For example, I have a script that loads an XML file, parses it into a relational-ish layout, and uploads the layout into a database. Therefore, I…

Braindump: Save State on Activity Rotation Lifecycle - Android

July 1, 2014Category: Software
Now I'm trying to write a (more complex) Hello World application for Android following a bunch of internet resources . I've read that an Activity has a life cycle (create/start/stop/resume/pause/destroy). This makes sense, because most UI elements (also in other frameworks) can be viewed as… APIs

May 15, 2014Category: Software
Multipool is a multi-coin mining pool, capable of dynamically switching between currencies, to maximise the profitability. They offer an API which allows nice access to their data. Unfortunately, I've found that it's quite difficult to find what's what, so I've decided to document it. Below you'll…

Insert in PostgreSQL in (Almost) Constant Time

May 15, 2014Category: Software
One of the things I did was to write a script to insert records in a PostgreSQL database. The records have with a quite simple structure: id - char(20) content - XML field aside - XML field I was working with a sample of 10,000 entries out of 40 million and the script went through several…

PostgreSQL: Call a Stored Procedure for Every Row

May 13, 2014Category: Software
I guess that newbies in PostgreSQL like me have first question when they create a store procedure: How do I call it? The answer is simple; you just execute Then, usually immediately the second question pops up: I wrote a procedure which I need to call for each row in a table. How do I do that? The…

Formless Step in FormWizard

May 7, 2014Category: Software
Sometimes you'd need to show a purely informational page as part of a FormWizard. As far as I could see, there are two solutions to the problem: If the info is something like a summary, you have it available in the "success" page (the one after the wizard is finished) Alternatively, you can make it…

Create Data Once in a FormWizard

May 6, 2014Category: Software
At one of the sites I'm building I need to walk users through a registration process: Select a supported tool Generate an ID Create a configuration based on the previous two steps To do this, I chose to use a FormWizard with three steps, one for each of the above. The problem then becomes to…

Drawing QR-Code on Browser in Javascript

May 2, 2014Category: Software
In my quest to make the pages of one site a bit more mobile-friendly, I've got the idea to provide a QR-Code for an unique identifier generated for users. This is part of a wizard and the end-product is: QR Code in JavaScript To reach this outcome, I've started by looking for a QR javascript snippet…

Copy Text to Clipboard in HTML Page using JavaScript

May 1, 2014Category: Software
I've got a problem on one of my sites: I have a unique identifier displayed on one page, which I need to make it easy After looking online, I've found three approaches using only JS. Clipboard.js Clipboard.js is a new (September 2015) approach which uses only JS to copy the text transparently…

Send POST to server via python-requests

April 15, 2014Category: Software
The other day I've had a question asked: How do you send a form data to a server and get the reply? My solution involves python-requests : r.text contains the reply HTML page, which then needs to be processed via e.g. python's DOM processing module or BeautifulSoup (if you're looking for…

All categories