Warning: mysql_connect() [function.mysql-connect.php]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/waterwav/public_html/weblog/includes/weblog.php on line 44
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/waterwav/public_html/weblog/includes/weblog.php on line 337
Warning: Invalid argument supplied for foreach() in /home/waterwav/public_html/weblog/includes/functions.php on line 66
Warning: Variable passed to each() is not an array or object in /home/waterwav/public_html/weblog/includes/functions.php on line 111 x-log
Unless otherwise expressly stated, all original material of whatever nature created by Andreas Jaggi and included in this weblog is licensed under a Creative Commons License.
9.08.2008
Opera 9.25 vs Safari JavaScript syntax error forgiveness
The following definition of an Array works without problems in Safari (and probably Firefox too), but triggers an (legitimate) error in Opera 9.25:
var myArray = [
1.2,
2.3,
3.4,
];
The error is triggered by the superfluous comma after the last element of the Array. It may be argued for both behaviors, but I would prefer all Browsers accepting such an Array definition also since in other languages (C, Python, PHP) such a redundant comma does not cause any trouble.
PyS60 Emulation Library, unlike the Nokia Emulator, this one also works on Mac OS X and Linux!
Wlan Scanning module for PyS60. There is also an extended GSM location module to get more information (Technology used, Name of Operator, Network Mode, …) than with the Nokia one.
Erlang processes don't share memory, so there is no need to lock the memory while it is being used. Where there are locks, there are keys that can get lost. What happens when you lose your keys? You panic and don't know what to do. That's what happens in software systems when you lose your keys and your locks go wrong.
Distributed software systems with locks and keys always go wrong.
Heute jedenfalls: um meine Linksammlung in Zukunft besser vor Spammern zu schützen, habe ich Scuttle ein bisschen erweitert:
Zuerst wurde eine E-Mail-Benachrichtigung eingebaut, wenn sich ein neuer User registriert. So können Spammer nicht mehr tagelang unbemerkt ihr Unwesen treiben. → scuttle-email-notification.diff
Dann habe ich einen Filter eingebaut, damit sich Spammer nicht mehr mit freexxx, pornlinks oder texaspoker registrieren können. → scuttle-reasonableusernames.diff
Und zum Schluss gibt's noch einen Adminbereich wo Spammer bequem ausgewählt und mitsammt ihrer Links und Tags gelöscht werden können. → scuttle-admin.diff
Um den Adminbereich nutzen zu können muss in der Datenbank noch ein Feld uAdmin vom Typ TINYINT(1) zur Tabelle sc_users hinzugefügt werden. Danach dieses einfach auf 1 setzen um einen Benutzer zum Administrator zu machen.
Da es mir gestern Abend etwas langweilig war, habe ich mich ein bisschen im C Programmieren geübt, schliesslich sollte ich darin fit sein wenn ich im Herbst mein Semesterprojekt beginne.
Dabei ist ein kleines Programm entstanden, das den HTTP-Header einer Website ausgibt: httphead.c
Seit gestern haben hier die Spam-Kommentare massiv zugenommmen
(sprich 40-50 anstelle von 0-10 pro Tag). Zudem werden sie nicht mehr
über den ganzen Tag verteilt abgegeben sondern fast alle innerhalb der
gleichen 5-10 Minuten.
Glücklicherweise habe ich schon vor einiger Zeit meinen "naiven" Badword-Filter durch einen Bayes'schen Spamfilter ersetzt, der bisher alle(!) Spam-Kommentare erkannt und markiert hat.
Aber es ist trotzdem ärgerlich immer die als Spam markierten
Kommentare zu löschen (momentant habe ich noch nicht genügend Vertrauen
in den Filter als dass ich ihn die Spam-Kommentare automatisch löschen
lasse).
Da die Anzahl der hier vorhandenen Kommentare nicht gerade enorm
ist, habe ich um den Spamfilter zu trainieren auch noch die Seiten
meines spamgeplagtenWikis hinzugenommen. Auch dort funktioniert die Spamerkennung nach anfänglichen Schwierigkeiten (False-positives) problemlos.
Dieses "Wundermittel gegen den Spam" habe ich nicht etwa selber entwickelt sondern ich habe einfach die Spam Filter Klasse von PHPClasses.org an meine Bedürfnisse angepasst.
Allen Spamgeplagten kann ich den Einsatz eines Bayes'schen Spamfilters sehr empfehlen!
Since this weblog received about 100 spam comments last week, i implemented a simple spam-filter based on a badwords list.
If a comments text contains more than four occurences of the following
words, it won't get added and the user is redirected to the mainpage.
Thanks to very specific spam content, it only needs a small list of badwords to detect the spam.
texas
holdem
casino
poker
This is just a simple anti-spam mechanism, but for now it works perfect and i hope it remains so for a long time :-)