« October 2007 | Main | December 2007 »
November 26, 2007
PHP JSON support
omar kilani - projects - php-json
Posted by pj at 11:13 AM | Comments (0)
November 21, 2007
SQL for checking event overlap
$sql = sprintf("select d.diary_entry_id, from_unixtime(d.start_date) as start_time, from_unixtime(d.end_date) as end_time, concat(u.forename,' ',u.surname) as user_name from diary_entry d, diary_user_entry due, user u, diary_entry_status des where ( (d.start_date between %s and %s) or (d.end_date between %s and %s) or ((%s between d.start_date and d.end_date) and (%s between d.start_date and d.end_date)) or ((d.start_date between %s and %s) and (d.end_date between %s and %s)) ) and d.diary_entry_id = due.diary_entry_id and due.user_id in(%s) and due.end_date is null and due.user_id = u.user_id and due.accepted_flag = 1 and d.diary_entry_id = des.diary_entry_id and des.end_date is null and des.diary_entry_status_type_id != 3 order by u.surname", $module['start_date'], $module['end_date'], $module['start_date'], $module['end_date'], $module['start_date'], $module['end_date'], $module['start_date'], $module['end_date'], $module['start_date'], $module['end_date'], $r['user_id']);
Errmmm.. Except that..
if(($r['date_absent_from']) && ($r['to_date'])){ $where = array(); $where[] = sprintf("( (%d <= (a.date_absent_from + 86400)) and (%d >= a.date_absent_from) )", $r['date_absent_from'], $r['to_date']); }
Posted by pj at 10:49 AM | Comments (0)
November 15, 2007
Jython FTP Client
I've lashed together the following in Jython:
To compile:
/Users/paulhollands/jython2.2.1/jythonc -j ftp_upload.jar --all ftp_upload.py
Posted by pj at 05:09 PM | Comments (0)
November 14, 2007
FTP Python Library
18.8 ftplib -- FTP protocol client
Posted by pj at 08:34 PM | Comments (0)
Jython FTP example
import snpsftp
ftp = snpsftp.SnpsFTP('10.254.1.26','userid','password')
ftp.setmode('BINARY')
ftp.mput('file')
ftp.close
Posted by pj at 08:27 PM | Comments (0)
Jyhon applet example
Something has gone wrong loading this applet.
Posted by pj at 08:19 PM | Comments (0)
November 13, 2007
Java FTP reviewed
Java FTP client libraries reviewed - Java World
Posted by pj at 09:49 PM | Comments (0)
November 12, 2007
Parsing mail messages with PHP
PHP: Mailparse Functions - Manual
Posted by pj at 08:27 PM | Comments (0)