If you read the slightly older post and look at its screenshot and do some thinking – you might like me wonder this: given a bunch of JSON with multiple selections which can be modified in JavaScript using a form.. wait, modified using a form? One of the nice things about json is you can …
Continue reading Modifying JSON using a formOpen Source
Crap that’s happening in the open source world.
PHP has this really neat function, json_encode(). It can take an object of whatever type, including my own class with child arrays/classes, and make a valid JSON string out of it. I was going to write this function myself but I found PHP already has it. There’s one concern I have about it – it …
Continue reading Scary json_encode()I got to implementing one of the primary use cases for OSTD – user uploads a template .pot file and gets a bunch of .po files with as many translated strings as possible. From a design point of view this isn’t a big deal: parse the .pot into a data structure, make a query per …
Continue reading Translating template filesI think I mentioned earlier how I almost started writing a website in C and quickly realised that wasn’t the right tool for the job, and switched entirely to PHP. For the work I did today I needed a good set of data structures: A set of files Each with a set of english strings …
Continue reading I knew there was a good reason I liked CIn the last year I’ve had to use CPAN several times. Perl people are all fancy and insist on all the perl modules to have unit tests. Commendable, except when it doesn’t work. At least half of the times I used CPAN the unit tests failed. CPAN smarty pants decides not to install modules that …
Continue reading Some more evidence why unit tests are uselessNew post added to Linux Stuff: Filtering spam into a folder on Slackware/Sendmail using SpamAssassin.
Continue reading Filtering spam into a folder on Slackware/Sendmail using SpamAssassinNew post added to Linux Stuff: Changing the first day of the week in Slackware Linux.
Continue reading Changing the first day of the week in Slackware LinuxI have this silly little website called Linux Stuff, where I post things I learn about Linux that I think might be useful for other people as well. When a new article is posted I get an email about it, piece of cake using the PHP mail() function. For some reason (I already forgot why) …
Continue reading Linux Stuff notifications on this wordpress blogEver since I learned how CGI works (a couple of lifetimes ago) I was bothered by the fact that the source code is accessible by the web server, and by extension – by anyone on the internet. If your CGI module is properly loaded and configured then Apache will execute the files rather than display …
Continue reading Looking at .inc files on an Apache serverIf someone updates a po file with 100 translations – I need to figure out whether each translation is already in the database, and if not – insert it. The result looks like this (more about “looks” later): This is just a snippet. I am concerned that running an SQL query like this: “SELECT Translation.TranslatedString …
Continue reading Number of SQL queries per page