From clmf8 at yahoo.com Mon May 3 15:34:30 2004 From: clmf8 at yahoo.com (Sam Feltus) Date: Mon Aug 2 21:28:38 2004 Subject: [Classiccity-pm] Re: Classiccity-pm Digest, Vol 11, Issue 1 In-Reply-To: <200405011700.i41H0SX27564@mail.pm.org> Message-ID: <20040503203430.36980.qmail@web12502.mail.yahoo.com> Why not just force everyone to use English and forget Unicode??? :) Sam the Gardener classiccity-pm-request@mail.pm.org wrote: Send Classiccity-pm mailing list submissions to classiccity-pm@mail.pm.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.pm.org/mailman/listinfo/classiccity-pm or, via email, send a message with subject or body 'help' to classiccity-pm-request@mail.pm.org You can reach the person managing the list at classiccity-pm-owner@mail.pm.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Classiccity-pm digest..." Today's Topics: 1. More Unicode Gotchas (Shawn Boyette) 2. nevermind (Shawn Boyette) ---------------------------------------------------------------------- Message: 1 Date: Fri, 30 Apr 2004 19:36:17 -0400 From: Shawn Boyette Subject: [Classiccity-pm] More Unicode Gotchas To: classiccity-pm@mail.pm.org Message-ID: <20040430233617.GA10167@fornax.collapsar.net> Content-Type: text/plain; charset=us-ascii I just spent an hour wrestling with this. Learn from my pain. http://use.perl.org/~mdxi/journal/18570 -- Shawn Boyette mdxi@collapsar.net ------------------------------ Message: 2 Date: Fri, 30 Apr 2004 19:40:07 -0400 From: Shawn Boyette Subject: [Classiccity-pm] nevermind To: classiccity-pm@mail.pm.org Message-ID: <20040430234007.GB10167@fornax.collapsar.net> Content-Type: text/plain; charset=us-ascii Nevermind. That whole journal entry and the problem it detailed was based on a flawed assumption. Nothing to see here! -- Shawn Boyette mdxi@collapsar.net ------------------------------ _______________________________________________ Classiccity-pm mailing list Classiccity-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/classiccity-pm End of Classiccity-pm Digest, Vol 11, Issue 1 ********************************************* --------------------------------- Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/classiccity-pm/attachments/20040503/fbab94ae/attachment.htm From keith-classiccitypm at ledfords.us Wed May 19 08:44:16 2004 From: keith-classiccitypm at ledfords.us (Keith Ledford) Date: Mon Aug 2 21:28:38 2004 Subject: [Classiccity-pm] sort example Message-ID: <20040519134416.GA6228@ledfords.us> Hello all! The list has been quite lately so I thought I would post a script I wrote last week. At work we keep all of our customer data in a postgresql database. The tables that are used in the script are: accounts accountdivisions accountsites site_pm_audit As you can tell we have accounts that have divisions that have sites. Each site is assigned a program manager. We are starting to track the "state" of the site with a red/yellow/green status indicator. That status is stored in the site_pm_audit table, along with a timestamp and some notes. This is status is a big help for our Network Operations Center as they can quickly tell the mood of the site. As with all data, management wanted a report via email each week that would list the information for each site. They also like the reports to be in MS Excel with summary data at the top of the spreadsheet. So far this is a very basic perl script that will use a couple of perl modules. It didn't take long to come up with the first version which sent a spreadsheet that had the summary and then the sites listed below sorted by the program manager, account, division, site, reverse sort on status. I am doing a selectall_hashref to get the data from our database. The data being returned is in a data structure like: %result_set => { site_id => { program_manager => "Some Name" account => "Some Account" division => "Some Division" site => "Some Site" current_status => "Status" last_update => "Time of update" notes => "Some Notes" } } Management liked the first version, but of course had some changes to make. They wanted the detail data to be sorted in decreasing status order. This is where it started to get interesting. We are storing the text of the status in the site_pm_audit table so I could not sort via reverse alpha (yellow would be before red). I also did not want to make any database changes because that would also mean UI changes. So I started hunting around and found a snippet of code that sparked an idea. My sort was done by using for my $curr_row ( sort { $$a{program_manager} cmp $$b{program_manager} || $$a{account} cmp $$b{account} || $$a{division} cmp $$b{division} || $$a{site} cmp $$b{site} || $$b{current_status} cmp $$a{current_status} } values %$result_set) { but I needed to edit the way that $$b{current_status} cmp $$a{current_status} was returning the data. The end result is: for my $curr_row ( sort { do {if ( $$a{current_status} eq 'Red' && $$b{current_status} ne 'Red') { -1; } elsif ($$b{current_status} eq 'Red' && $$a{current_status} ne 'Red') { 1; } else { $$b{current_status} cmp $$a{current_status} } } || $$a{program_manager} cmp $$b{program_manager} || $$a{account} cmp $$b{account} || $$a{division} cmp $$b{division} || $$a{site} cmp $$b{site} } values %$result_set) { I am sure Mark or Darrell will respond with some other way that is more efficient but, I this works and looks like typical perl. I have attached a copy of the script for you to look over. If you have any suggestions or comments let me know. Enjoy! (** Mike Rylander helped **) -- Keith Ledford -------------- next part -------------- A non-text attachment was scrubbed... Name: Site_Status_Report.pl Type: application/x-perl Size: 4576 bytes Desc: not available Url : http://mail.pm.org/pipermail/classiccity-pm/attachments/20040519/7f1c83e9/Site_Status_Report.bin From markh at markh.com Fri May 21 10:01:15 2004 From: markh at markh.com (Mark Hazen) Date: Mon Aug 2 21:28:38 2004 Subject: [Classiccity-pm] sort example In-Reply-To: <20040519134416.GA6228@ledfords.us> References: <20040519134416.GA6228@ledfords.us> Message-ID: <20040521150115.GC7954@archon.thehazens.net> Wow Keith, I just wanted to say, quite cool! I've never done a multiple field sort in Perl before, and it hadn't even crossed my mind that it was possible (I usually rely on my backend db's for that work). Just goes to show that all things are possible in Perl though, I s'pose.... :) Very cool! -mh. ---- . _+m"m+_"+_ Mark Hazen d' Jp qh qh Jp O O O Yb Yb dY dY O "Y5m2Y" " even the mightiest wave starts out as a ripple. "Y_ why make waves when it's easier to nurture ripples? From darrell at golliher.net Wed May 26 12:29:38 2004 From: darrell at golliher.net (Darrell Golliher) Date: Mon Aug 2 21:28:38 2004 Subject: [Classiccity-pm] Perl CMS? Message-ID: <20040526172938.GA24078@golliher.net> Do you guys know of perl based alternatives to Zope or Plone? -Darrell From pkeck at uga.edu Sun May 30 00:07:20 2004 From: pkeck at uga.edu (Paul Keck) Date: Mon Aug 2 21:28:39 2004 Subject: [Classiccity-pm] bricolage In-Reply-To: <20040519134416.GA6228@ledfords.us> References: <20040519134416.GA6228@ledfords.us> Message-ID: <20040530050720.GC22319@uga.edu> If Darrell is still a subscriber to The Perl Journal he may have seen it already, but in the News section Bricolage is mentioned as a Perl CMS. It uses HTML::Mason and mod_perl. http://www.bricolage.cc/ -- Paul Keck pkeck@uga.edu http://www.arches.uga.edu/~pkeck University of Georgia http://www.uga.edu/ucns/telecom EITS Network Engineering mailto:pkeck@ediacara.org --Opinions mine.-- Go fighting anomalocaridids!!! From nhruby at uga.edu Sun May 30 14:44:27 2004 From: nhruby at uga.edu (nathan r. hruby) Date: Mon Aug 2 21:28:39 2004 Subject: [Classiccity-pm] Perodic Table of Operators Message-ID: Blatantly stolen from Slashdot, but some folks don't read it and some others may not be checking up on the world this fine Holiday weekend: http://www.ozonehouse.com/mark/blog/code/PeriodicTable.html Does give validity to the "perl is just executable punctuation" argument :) -n -- ------------------------------------------- nathan hruby uga enterprise information technology services production systems support metaphysically wrinkle-free -------------------------------------------