Fredrik Holmström on Sep 20th, 2008Setting up mod_wsgi for apache on Windows
I just installed mod_wsgi on my windows (yeah yeah, I know…) laptop, it turned out to be amazingly easy but I figured I’d put up notes on how to do it here anyways.
Head over to http://adal.chiriliuc.com/mod_wsgi/ and fetch the latest (at the time of this writing it was revision_1018_2.3) apache module for your combination of […]
Fredrik Holmström on Sep 20th, 2008Javascript-OO & Python-DuckTyping in PHP5.3
With the introduction of closures in PHP5.3 my mind has been working a lot trying to find new (ab-)uses for them, first out is a combination of javascript and python oo - honestly this object model is nicer then the standard PHP one.
This allows for changing objects methods during runtime, proper duck-typing, monkey-patching and a […]
Fredrik Holmström on Sep 19th, 2008Styled checkboxes & radiobuttons with jQuery
Updated
Added support for hover, mousedown events
Merged radize into checkize, so only call checkize from now on
Pre-loads images
Added support for “show_input” that will display the input boxes also (in FF&Safari, only input boxes in IE) - useful for debugging.
So, time for another small jQuery extension I wrote up - for myself this time, it’s for styling […]
Fredrik Holmström on Sep 19th, 2008Selenium Video
If you don’t know what Selenium is, you really should check it out - a good introduction is this video put up on railscasts.com: http://railscasts.com/episodes/116-selenium while parts of it is rails-specific it’s a nice introduction to what Selenium is and what it can do for you.
Fredrik Holmström on Sep 18th, 2008PHP 5.3 and closures
<?php
function test() { return function() { echo “foo”; }; }
test()(); // fails
$func = test(); $func(); // works
Why, oh why!
Fredrik Holmström on Sep 17th, 2008jQuery / Javascript - Customizeable Ajax pageination
Download: http://totmacher.eu/jquery_pageinate/jquery_pageinate_v0.1.zip (I forgot to add the download link at first, my bad).
So another jQuery/Javascript request came up from the same irc-channel - this time it’s about Ajax pagination. As with my last example the “serverside” of things is simulated with two .php-files (posts.php, server.php). The pagination is *very* customizable through the use of callbacks. […]
Fredrik Holmström on Sep 17th, 2008pQuery - Messing with the DOM from PHP
You can download the complete source-code + example here
So, this is a small pet-project I managed to get running with a decent API last night, it’s YAPTE (Yet Another PHP Templating Engine), but bare with me for a few minutes. My huge gripe with using PHP as a template language, embedding it within the html, […]
Fredrik Holmström on Sep 12th, 2008jQuery / Javascript autocomplete checkbox-selection with memory
Edit: Fixed a small bug that would cause it to fetch to many results on slow connections, demo6.zip
So yeah, a messy title on this post - but I couldn’t really find a good way to explain this. It’s just an example I wrote up for a mate on IRC that asked for “an auto-complete Ajax […]
Fredrik Holmström on Sep 12th, 2008Generic dispatching in python
Edit: I figured this had to have been done by someone at some point in the python community, i was right: http://pypi.python.org/pypi/simplegeneric. Very nice implementation indeed, go check it out if you like what you see here.
So, a bit more black-magic in python - this time implementing generic dispatching / functions, or at least - […]
Fredrik Holmström on Sep 11th, 2008Prototype based programming in python
Revision #2:
I updated my code with some more bells and whistles, also removing the double-underscore-method/attributes and operator overloading as some people commented so “nicely” on.
prototype.py
class Object(object):
def __init__(self):
self._parent = None
self._methods = {}
def […]