Using group by feature of list builder
-groupby { values { "Day" { { groupby time_stamp } { orderby time_stamp,desc} } } }
The list is { groupby_name { { groupby column } { orderby column,order } } }
Add this to the query as any other filter with template::list::filter_where_clauses.
You can pass as many lists in to the values parameters of group by as columns you want to group on. If you add the listfilters tag to your ADP file, it will show the available grouping options as filters. Make sure you add groupby:optional in ad_page_contract.
Another trick is to hide the column when it is used to grouping. Just dynamically set the hide_p paramter for the list element that is in groupby.
06:05 PM, 10 Jun 2005 by Dave Bauer Permalink | Comments (0)
Replace annoying ^M characters in Emacs
^M = C-q C-m
Resulating in this sequence:
M-%
Query replace: C-q C-m with: C-q C-j
07:02 AM, 10 Jun 2005 by Malte Sussdorff Permalink | Comments (0)
del.icio.us [refresh.dk]
09:44 AM, 08 Jun 2005 by Ben Koot Permalink | Comments (4)
No need for daemontools on MacOS X Tiger
Just copy/paste the following into a file called org.openacs.OpenACS.plist.
################# COPY BELOW ###########################
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTD
s/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.openacs.OpenACS</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/var/lib/aolserver/openacs/etc/daemontools/run</string>
</array>
<key>ServiceDescription</key>
<string>OpenACS Service</string>
<key>UserName</key>
<string>ncarroll</string>
<key>GroupName</key>
<string>web</string>
</dict>
</plist>
################# COPY ABOVE ###########################
Then use the command below to start up the service:
$sudo launchctl load /Library/LaunchDaemons/org.openacs.OpenACS.plist
And the command below to stop the service:
sudo launchctl unload /Library/LaunchDaemons/org.openacs.OpenACS.plist
Couldn't be simpler.
07:31 AM, 08 Jun 2005 by Nick Carroll Permalink | Comments (1)
PostgreSQL Launchd on Tiger
Creating a PostgreSQL Launchd file allows your system to start up postmaster when your Mac boots.
This tip shows you how to create this file.
Use a text editor such as emacs to create the PostgreSQL Launchd file:
$ emacs /Library/LaunchDaemons/org.postgresql.PostgreSQL.plist
Copy and paste the following into the file.
################# COPY BELOW ###########################
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.postgresql.PostgreSQL</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/usr/local/pgsql/bin/pg_ctl</string>
<string>-D</string>
<string>/usr/local/pgsql/data</string>
<string>-l</string>
<string>/usr/local/pgsql/data/server.log</string>
<string>start</string>
</array>
<key>ServiceDescription</key>
<string>PostgreSQL Server</string>
<key>UserName</key>
<string>postgres</string>
<key>GroupName</key>
<string>web</string>
</dict>
</plist>
################# COPY BELOW ###########################
Next reboot your Mac and check to see if postmaster started up.
Or you can try the following commands:
$ sudo launchctl load /Library/LaunchDaemons/org.postgresql.PostgreSQL.plist
$ sudo launchctl start org.postgresql.PostgreSQL
04:37 PM, 07 Jun 2005 by Nick Carroll Permalink | Comments (1)
Emac Tricks -- auto-logging your shell buffer
03:28 PM, 06 Jun 2005 by Eric Wolfram Permalink | Comments (0)
Debugging trick
tail -f /path/to/aolserver-error.log |grep "--"
Then while I'm working on OpenACS, I use ns_log Notice "--myvar: $myvar" to see pseudo-breakpoints in the code.
11:14 PM, 04 Jun 2005 by Jade Rubick Permalink | Comments (0)
| June 2005 | ||||||
| S | M | T | W | T | F | S |
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | ||
Request notifications