From enobacon at gmail.com Wed Aug 5 19:02:43 2009 From: enobacon at gmail.com (Seven till Seven) Date: Wed, 5 Aug 2009 19:02:43 -0700 Subject: [Pdx-pm] How to Lie Like a Geek -- August meeting next week Message-ID: <200908051902.43830.enobacon@gmail.com> see http://pdx.pm.org/kwiki/ Wed. August 12th, 6:53pm at FreeGeek -- 1731 SE 10th Ave. How to Lie Like a Geek speaker: Michael Schwern Geeks have a special relationship with The Truth. Nothing is more important than correcting a falsehood, no matter how small, and nothing is more odious than not telling The Truth. Unfortunately, in speaking The Whole Truth and Nothing But The Truth, the meaning is often mangled and the end result is the opposite, a lie. We?ll examine some ways geeks lie while telling The Truth, to themselves and to others, and hopefully achieve better communications, easier to understand interfaces and maybe some personal enlightenment. Some examples include: Lies by omission, lies by precision, lies by irrelevancy, lies by design, lies with statistics and that most dangerous of words ?should? as in ?the user should have realized?. There will be cake. http://tinyurl.com/mermtx Plus: Rakudo euler_bench update ? benchmarking Perl 6. http://github.com/notbenh/euler_bench/tree As always, the meeting will be followed by social hour at the LuckyLab. -- http://pdx.pm.org From keithl at kl-ic.com Fri Aug 7 14:14:19 2009 From: keithl at kl-ic.com (Keith Lofstrom) Date: Fri, 7 Aug 2009 14:14:19 -0700 Subject: [Pdx-pm] Browser window height, javascript, jquery Message-ID: <20090807211419.GB7889@gate.kl-ic.com> I want to make my wydiwys presentation tool autoscale single images to the browser window. I want to fill as much of the window as I can, while preserving the image aspect ratio. The math is easy, but learning the pixel height of the inside of the browser window is surprisingly difficult. I am using javascript and jQuery with the webslide pages. Right now, I am scaling the image to 100% height, querying it to see what the height turns out to be, then rescaling down if it slops over on width. Which joggles the display if the browser window is tall and narrow. It would be nicer to know how big the window is, do the math, and display the image correctly the first time. I'm pretty new to all this, and a lousy programmer. Can anyone suggest some browser-independent(*) code that will provide the height of the inside bounding box, and perhaps explain a little bit of how it works and what might break it? Keith (*) Okay, screw the really old browsers, but assume IE7/8, Firefox 2/3, Chrome, Safari, etc. jQuery is cool because it provides a cross platform API, but I haven't found a function that does what I want. (ObRelevance) Most of wydiwys is written in Perl. -- Keith Lofstrom keithl at keithl.com Voice (503)-520-1993 KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon" Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs From jaleto at gmail.com Fri Aug 7 14:54:57 2009 From: jaleto at gmail.com (Jonathan Leto) Date: Fri, 7 Aug 2009 14:54:57 -0700 Subject: [Pdx-pm] Browser window height, javascript, jquery In-Reply-To: <20090807211419.GB7889@gate.kl-ic.com> References: <20090807211419.GB7889@gate.kl-ic.com> Message-ID: <9aaadf9c0908071454w2f64716dua3e1b483bf83ae8f@mail.gmail.com> Howdy, The first google result for "jquery scale image" is http://www.ollicle.com/eg/jquery/imagefit/ , which says it is "a jQuery plugin which scales images to fit their parent container." Looks like it could be what you want, but I have never tried it. Good luck Duke, On Fri, Aug 7, 2009 at 2:14 PM, Keith Lofstrom wrote: > I want to make my wydiwys presentation tool autoscale single > images to the browser window. ?I want to fill as much of the > window as I can, while preserving the image aspect ratio. > The math is easy, but learning the pixel height of the inside > of the browser window is surprisingly difficult. > > I am using javascript and jQuery with the webslide pages. ?Right > now, I am scaling the image to 100% height, querying it to see > what the height turns out to be, then rescaling down if it slops > over on width. ?Which joggles the display if the browser window > is tall and narrow. ? It would be nicer to know how big the window > is, do the math, and display the image correctly the first time. > > I'm pretty new to all this, and a lousy programmer. ?Can anyone > suggest some browser-independent(*) code that will provide the > height of the inside bounding box, and perhaps explain a little > bit of how it works and what might break it? > > Keith > > (*) Okay, screw the really old browsers, but assume IE7/8, Firefox > 2/3, Chrome, Safari, etc. ?jQuery is cool because it provides a cross > platform API, but I haven't found a function that does what I want. > > (ObRelevance) Most of wydiwys is written in Perl. > > -- > Keith Lofstrom ? ? ? ? ?keithl at keithl.com ? ? ? ? Voice (503)-520-1993 > KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon" > Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list at pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list > -- Jonathan Leto jonathan at leto.net http://leto.net From keithl at kl-ic.com Fri Aug 7 18:11:55 2009 From: keithl at kl-ic.com (Keith Lofstrom) Date: Fri, 7 Aug 2009 18:11:55 -0700 Subject: [Pdx-pm] Browser window height, javascript, jquery In-Reply-To: <20090807211419.GB7889@gate.kl-ic.com> References: <20090807211419.GB7889@gate.kl-ic.com> Message-ID: <20090808011155.GB8224@gate.kl-ic.com> On Fri, Aug 07, 2009 at 02:14:19PM -0700, Keith Lofstrom wrote: > I want to make my wydiwys presentation tool autoscale single > images to the browser window. I want to fill as much of the > window as I can, while preserving the image aspect ratio. > The math is easy, but learning the pixel height of the inside > of the browser window is surprisingly difficult. Thanks for all the replies. Subject to more testing, it was indeed a simple $(window).height() that did it, in combination with a style sheet containing padding and margin set to zero (otherwise the image plus margins are too big, causing the scroll bars to pop up). Here are the relevant lines of the style sheet: body { padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px; width: 100%; height: 100%; } The new wydiwys.js is at http://server-sky.com/wydiwys Here are the relevant lines: .... $(window).resize( function(){ scale() }); ... $(document).ready(function(){ scale(); ... function scale() { var WindowHeight = $(window).height(); var WindowWidth = $(window).width(); var WindowAspect = WindowWidth/WindowHeight; $('img').each(function(){ // OK, only one img, but this is easy var ImageHeight = $(this).height(); var ImageWidth = $(this).width(); var ImageAspect = ImageWidth/ImageHeight; if( ImageAspect < WindowAspect ) { // wide image $(this).height( WindowHeight ) ; $(this).width( WindowHeight*ImageAspect ); } else { // tall image $(this).height( WindowWidth/ImageAspect ); $(this).width ( WindowWidth ) ; } }); } I have noticed a little weirdness from firefox - sometimes it seems to be sending the image height to the image width, resulting in a square image, but when that happens I just reload the slide. A debugging mystery I will solve after the conference. BTW, I also figured out how to preload my static images. I think... Keith -- Keith Lofstrom keithl at keithl.com Voice (503)-520-1993 KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon" Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs From schwern at pobox.com Fri Aug 7 19:29:58 2009 From: schwern at pobox.com (Michael G Schwern) Date: Fri, 07 Aug 2009 19:29:58 -0700 Subject: [Pdx-pm] How to Lie Like a Geek -- August meeting next week In-Reply-To: <200908051902.43830.enobacon@gmail.com> References: <200908051902.43830.enobacon@gmail.com> Message-ID: <4A7CE326.20705@pobox.com> Seven till Seven wrote: > see http://pdx.pm.org/kwiki/ > > Wed. August 12th, 6:53pm at FreeGeek -- 1731 SE 10th Ave. > > How to Lie Like a Geek > speaker: Michael Schwern Things are still up in the air but there's a good chance I will be called out of town by $client for work next week to help with their launch. Could someone prep something to cover if that does happen? -- Insulting our readers is part of our business model. http://somethingpositive.net/sp07122005.shtml From schwern at pobox.com Mon Aug 10 23:56:54 2009 From: schwern at pobox.com (Michael G Schwern) Date: Mon, 10 Aug 2009 23:56:54 -0700 Subject: [Pdx-pm] How to Lie Like a Geek -- August meeting next week In-Reply-To: <4A7CE326.20705@pobox.com> References: <200908051902.43830.enobacon@gmail.com> <4A7CE326.20705@pobox.com> Message-ID: <4A811636.5080005@pobox.com> Michael G Schwern wrote: > Seven till Seven wrote: >> see http://pdx.pm.org/kwiki/ >> >> Wed. August 12th, 6:53pm at FreeGeek -- 1731 SE 10th Ave. >> >> How to Lie Like a Geek >> speaker: Michael Schwern > > Things are still up in the air but there's a good chance I will be called out > of town by $client for work next week to help with their launch. Could > someone prep something to cover if that does happen? Yep, I got called out of town. I'm going to be away on business in San Francisco as of tomorrow morning for at least a week. So someone else will have to step up, sorry. -- Defender of Lexical Encapsulation From herda05 at gmail.com Tue Aug 11 13:51:32 2009 From: herda05 at gmail.com (Daniel Herrington) Date: Tue, 11 Aug 2009 13:51:32 -0700 Subject: [Pdx-pm] Accessing File::Monitor attribute Message-ID: <4A81D9D4.7080700@gmail.com> All, I'm new to classes in perl and I've hit a roadblock using the File::Monitor class. From the doc for File::Monitor http://search.cpan.org/~andya/File-Monitor-0.10/lib/File/Monitor/Object.pm : The state of the monitored file or directory at the time of the last scan can be queried. Before scan is called these methods will all return undef. The following methods return the value of the corresponding field from "stat" in perlfunc. For example: my $modified = $object->mtime; Now I've instantiated my object as per the instructions: use File::Monitor; use File::Monitor::Object; my $wFileMonitor = File::Monitor->new(); $wFileMonitor->watch($wFile); $wFileMonitor->scan; my $modified = $wFileMonitor->mtime But I get the following error: Can't locate object method "mtime" via package "File::Monitor" at /home/workspace/watchFile.pl line 65. I know it's getting lost in the reference to mtime, but I'm at a loss on how to access it. The doc simply refers to $object->mtime and my read of it says that $wFileMonitor should be $object. thanks, -- Daniel B. Herrington Director of Field Services Robert Mark Technologies dherrington at robertmarktechnologies.com o: 651-769-2574 m: 503-358-8575 -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmb32 at cornell.edu Tue Aug 11 15:31:04 2009 From: rmb32 at cornell.edu (Robert Buels) Date: Tue, 11 Aug 2009 15:31:04 -0700 Subject: [Pdx-pm] Accessing File::Monitor attribute In-Reply-To: <4A81D9D4.7080700@gmail.com> References: <4A81D9D4.7080700@gmail.com> Message-ID: <4A81F128.9010503@cornell.edu> Not such great documentation. From what I can tell, watch() returns a monitoring object, and you call mtime on that. Here's a demo. run it like demo.pl filename to watch a file for modifications for 10 seconds. Rob #!/usr/bin/perl use strict; use File::Monitor; use File::Monitor::Object; my $monitor = File::Monitor->new(); my $filewatcher = $monitor->watch($ARGV[0]); print $filewatcher->mtime, "\n"; my $n = 10; while($n--) { $monitor->scan; sleep 1; print $filewatcher->mtime, "\n"; } Daniel Herrington wrote: > All, > > I'm new to classes in perl and I've hit a roadblock using the > File::Monitor class. From the doc for File::Monitor > http://search.cpan.org/~andya/File-Monitor-0.10/lib/File/Monitor/Object.pm > : > The state of the monitored file or directory at the time of the last > scan can be queried. Before scan is called these methods will all return > undef. The following methods return the value of the corresponding field > from "stat" in perlfunc. > For example: > > my $modified = $object->mtime; > > Now I've instantiated my object as per the instructions: > > use File::Monitor; use File::Monitor::Object; my $wFileMonitor = > File::Monitor->new(); $wFileMonitor->watch($wFile); $wFileMonitor->scan; > my $modified = $wFileMonitor->mtime > > But I get the following error: > Can't locate object method "mtime" via package "File::Monitor" at > /home/workspace/watchFile.pl line 65. > > I know it's getting lost in the reference to mtime, but I'm at a loss on > how to access it. The doc simply refers to $object->mtime and my read of > it says that $wFileMonitor should be $object. > thanks, > > -- > Daniel B. Herrington > Director of Field Services > Robert Mark Technologies > dherrington at robertmarktechnologies.com > o: 651-769-2574 > m: 503-358-8575 > > > ------------------------------------------------------------------------ > > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list at pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list -- Robert Buels Bioinformatics Analyst, Sol Genomics Network Boyce Thompson Institute for Plant Research Tower Rd Ithaca, NY 14853 Tel: 503-889-8539 rmb32 at cornell.edu http://www.sgn.cornell.edu From herda05 at gmail.com Wed Aug 12 01:17:06 2009 From: herda05 at gmail.com (Daniel Herrington) Date: Wed, 12 Aug 2009 01:17:06 -0700 Subject: [Pdx-pm] Accessing File::Monitor attribute In-Reply-To: <4A81F128.9010503@cornell.edu> References: <4A81D9D4.7080700@gmail.com> <4A81F128.9010503@cornell.edu> Message-ID: <4A827A82.9000101@gmail.com> Robert, Thanks, that did it. Actually, I'm doing multiple files, so I had to make $monitor and array and the same with $filewatcher. What you provided got me over the hump though. Dan H. Robert Buels wrote: > Not such great documentation. From what I can tell, watch() returns a > monitoring object, and you call mtime on that. > > Here's a demo. run it like demo.pl filename to watch a file for > modifications for 10 seconds. > > Rob > > > > #!/usr/bin/perl > use strict; > > use File::Monitor; > use File::Monitor::Object; > my $monitor = File::Monitor->new(); > my $filewatcher = $monitor->watch($ARGV[0]); > print $filewatcher->mtime, "\n"; > my $n = 10; > while($n--) { > $monitor->scan; > sleep 1; > print $filewatcher->mtime, "\n"; > } > > > > > > Daniel Herrington wrote: >> All, >> >> I'm new to classes in perl and I've hit a roadblock using the >> File::Monitor class. From the doc for File::Monitor >> http://search.cpan.org/~andya/File-Monitor-0.10/lib/File/Monitor/Object.pm >> : >> The state of the monitored file or directory at the time of the last >> scan can be queried. Before scan is called these methods will all >> return undef. The following methods return the value of the >> corresponding field from "stat" in perlfunc. >> For example: >> >> my $modified = $object->mtime; >> >> Now I've instantiated my object as per the instructions: >> >> use File::Monitor; use File::Monitor::Object; my $wFileMonitor = >> File::Monitor->new(); $wFileMonitor->watch($wFile); >> $wFileMonitor->scan; my $modified = $wFileMonitor->mtime >> >> But I get the following error: >> Can't locate object method "mtime" via package "File::Monitor" at >> /home/workspace/watchFile.pl line 65. >> >> I know it's getting lost in the reference to mtime, but I'm at a loss >> on how to access it. The doc simply refers to $object->mtime and my >> read of it says that $wFileMonitor should be $object. >> thanks, >> >> -- >> Daniel B. Herrington >> Director of Field Services >> Robert Mark Technologies >> dherrington at robertmarktechnologies.com >> o: 651-769-2574 >> m: 503-358-8575 >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Pdx-pm-list mailing list >> Pdx-pm-list at pm.org >> http://mail.pm.org/mailman/listinfo/pdx-pm-list > > -- Daniel B. Herrington Director of Field Services Robert Mark Technologies dherrington at robertmarktechnologies.com o: 651-769-2574 m: 503-358-8575 From enobacon at gmail.com Wed Aug 12 13:18:58 2009 From: enobacon at gmail.com (Seven till Seven) Date: Wed, 12 Aug 2009 13:18:58 -0700 Subject: [Pdx-pm] tonight's meeting: euler_bench, GSoC, Parrot, cake ... Message-ID: <200908121318.59052.enobacon@gmail.com> see http://pdx.pm.org/kwiki/ Wed. August 12th, 6:53pm at FreeGeek -- 1731 SE 10th Ave. Schwern has committed a "lie of rescheduling", so thus concludes his talk for tonight. In his stead, Ben, Jonathan, and other Euler Bench participants will be giving a tour of the Euler Bench project and how you can contribute. http://github.com/notbenh/euler_bench/tree Euler Bench is a collection of Project Euler (http://projecteuler.net/) solutions and tools for making speed comparisons between different algorithms and language implementations. This is a great method/excuse for learning about algorithms and for learning new languages - particularly Perl 6. We'll also have GSoC updates from Jonathan, and the latest news on Parrot/Rakudo/cake. As always, the meeting will be followed by social hour at the LuckyLab. -- http://pdx.pm.org From kevin at scaldeferri.com Wed Aug 12 14:26:05 2009 From: kevin at scaldeferri.com (Kevin Scaldeferri) Date: Wed, 12 Aug 2009 14:26:05 -0700 Subject: [Pdx-pm] tonight's meeting: euler_bench, GSoC, Parrot, cake ... In-Reply-To: <200908121318.59052.enobacon@gmail.com> References: <200908121318.59052.enobacon@gmail.com> Message-ID: <3EEDA7C3-859F-4E9C-97E9-10E65909E1AF@scaldeferri.com> For those who may have missed previous sessions, can someone resend info on getting parrot / rakudo installed before the meeting so we're ready to participate? -kevin On Aug 12, 2009, at 1:18 PM, Seven till Seven wrote: > see http://pdx.pm.org/kwiki/ > > Wed. August 12th, 6:53pm at FreeGeek -- 1731 SE 10th Ave. > > Schwern has committed a "lie of rescheduling", so thus concludes his > talk for tonight. > > > In his stead, Ben, Jonathan, and other Euler Bench participants will > be > giving a tour of the Euler Bench project and how you can contribute. > > http://github.com/notbenh/euler_bench/tree > > Euler Bench is a collection of Project Euler (http:// > projecteuler.net/) > solutions and tools for making speed comparisons between different > algorithms and language implementations. This is a great method/ > excuse > for learning about algorithms and for learning new languages - > particularly Perl 6. > > We'll also have GSoC updates from Jonathan, and the latest news on > Parrot/Rakudo/cake. > > > As always, the meeting will be followed by social hour at the > LuckyLab. > -- > > http://pdx.pm.org > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list at pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list From chromatic at wgz.org Wed Aug 12 14:30:02 2009 From: chromatic at wgz.org (chromatic) Date: Wed, 12 Aug 2009 14:30:02 -0700 Subject: [Pdx-pm] tonight's meeting: euler_bench, GSoC, Parrot, cake ... In-Reply-To: <3EEDA7C3-859F-4E9C-97E9-10E65909E1AF@scaldeferri.com> References: <200908121318.59052.enobacon@gmail.com> <3EEDA7C3-859F-4E9C-97E9-10E65909E1AF@scaldeferri.com> Message-ID: <200908121430.02254.chromatic@wgz.org> On Wednesday 12 August 2009 14:26:05 Kevin Scaldeferri wrote: > For those who may have missed previous sessions, can someone resend > info on getting parrot / rakudo installed before the meeting so we're > ready to participate? Start with these instructions: http://rakudo.org/how-to-get-rakudo If that gives you trouble, stop by #perl6 on irc.freenode.net. -- c From exodist7 at gmail.com Mon Aug 17 22:53:33 2009 From: exodist7 at gmail.com (Chad Granum) Date: Mon, 17 Aug 2009 22:53:33 -0700 Subject: [Pdx-pm] RTDevSys, Infrastructure for RT projects Message-ID: <40ce9e660908172253h2c6833b1u6490eeed2368e593@mail.gmail.com> Hello all, This is just to send out word that I have published the code for the RT deployment system that I developed at OpenSourcery (www.opensourcery.com) for our RT projects. RTDevSys was designed to wrap around the RT deployment process and allow for easy management, creation, and maintenance of RT deployments. It is used to create an RT project, put in place all the plugins and workflows (initialdata stuff), take care of testing, and ultimately deployment. One of the biggest benefits, you can use it to develop version tracked migrations against specific workflows, and deploy them against both test and production instances of RT. Here are places it can be found: http://search.cpan.org/~exodist/RTDevSys-0.03/ http://github.com/exodist/RTDevSys Manual can be found here (Work in progress): http://search.cpan.org/~exodist/RTDevSys-0.03/lib/RTDevSys/Manual.pm If you combine it with this plugin, http://github.com/exodist/RTx-NNID then you can even maintain copies of a subset (or even all) objects that have been stored in the database in code files. This is useful because you have a way to make any changes you want in code, test them, and deploy them. This plugin really is a defining feature for RTDevSys. Any questions please ask, I havn't even covered a portion of the functionality here yet. Remaining notes: * Currently only works w/ postgresql (easy to fix I am sure) * Most features were designed for specific problems to be solved, some may need have holes. * RTDevSys is by no means complete, but it is still feature rich, I am putting it out here for patches, improvements, suggestions, and ideas. -Chad Granum (OpenSourcery) P.S. Feedback would be much appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: