From djgoku at gmail.com Sun Oct 9 11:26:09 2011 From: djgoku at gmail.com (Jonathan Otsuka) Date: Sun, 9 Oct 2011 13:26:09 -0500 Subject: [Kc] Working with JSON and JQuery Message-ID: <91B07EFD-1AC7-45D7-BECF-E7DD1F7B7757@gmail.com> I am currently working on a project that I am querying a mysql database and building a JSON object. That object is then being queried with $.getJSON (jquery) and builds HTML tables on the fly. I am not sure my JSON object is the most efficiently structured and if I am doing too much on the client side to build these tables. The pages don't seem to be slow to build/generate the tables just this is my first time using JSON and jquery. Would someone on tuesday be able to maybe look at what I have and maybe give me some pointers? Jonathan Otsuka From amoore at mooresystems.com Sun Oct 9 11:42:20 2011 From: amoore at mooresystems.com (Andrew Moore) Date: Sun, 9 Oct 2011 13:42:20 -0500 Subject: [Kc] Working with JSON and JQuery In-Reply-To: <91B07EFD-1AC7-45D7-BECF-E7DD1F7B7757@gmail.com> References: <91B07EFD-1AC7-45D7-BECF-E7DD1F7B7757@gmail.com> Message-ID: Jonathan - I'd be happy to help you out, and I'll bet we can get some tips from other folks, too. If you bring what you have on Tuesday evening, that will give us something to talk about. In the meantime, I've found that if I'm building pretty simple tables to display data that it's often easier to use a jquery table plugin. jqgrid is one: slickgrid is another, but I think there are probably a dozen or more. Good luck! -Andy On Sun, Oct 9, 2011 at 1:26 PM, Jonathan Otsuka wrote: > I am currently working on a project that I am querying a mysql database and building a JSON object. That object is then being queried with $.getJSON (jquery) and builds HTML tables on the fly. > > I am not sure my JSON object is the most efficiently structured and if I am doing too much on the client side to build these tables. The pages don't seem to be slow to build/generate the tables just this is my first time using JSON and jquery. > > Would someone on tuesday be able to maybe look at what I have and maybe give me some pointers? > > Jonathan Otsuka > _______________________________________________ > kc mailing list > kc at pm.org > http://mail.pm.org/mailman/listinfo/kc > From amoore at mooresystems.com Tue Oct 11 11:53:49 2011 From: amoore at mooresystems.com (Andrew Moore) Date: Tue, 11 Oct 2011 13:53:49 -0500 Subject: [Kc] October KCPM meeting tonight 7pm Barley's in Shawnee Message-ID: Hi Gang - Sort of late notice this month, but tonight is the 2nd Tuesday of October. That means it's time to head out to Barley's in Shawnee at 7pm to talk shop and enjoy a pint of beer. Jonathan said he'd bring out some questions about a recent project of his, and I'm sure we can come up with a few other topics. I'll grab a high-top table in the back around 7pm. Let me know if you're coming or hoping to come so I can gauge how many chairs to secure. See you tonight! -Andy From stephenclouse at gmail.com Tue Oct 11 13:08:07 2011 From: stephenclouse at gmail.com (Stephen Clouse) Date: Tue, 11 Oct 2011 15:08:07 -0500 Subject: [Kc] October KCPM meeting tonight 7pm Barley's in Shawnee In-Reply-To: References: Message-ID: I will be a bit late this evening but I am planning to show. -- Stephen Clouse -------------- next part -------------- An HTML attachment was scrubbed... URL: From funkyshu at dark-linux.com Mon Oct 17 14:42:25 2011 From: funkyshu at dark-linux.com (John Judd) Date: Mon, 17 Oct 2011 16:42:25 -0500 Subject: [Kc] some stuff I talked a little about at the last meeting Message-ID: https://metacpan.org/module/File::Slurp https://metacpan.org/module/File::Slurp::Unicode One of my favorite modules... and its unicode brother my $file_contents = read_file('somefile'); doesn't get much easier than that but if you DO use 'open' 'close' etc... http://search.cpan.org/~pjf/autodie-2.10/lib/autodie forces ancient built-ins throw exceptions rather return true or false... no more silent failures (mostly) https://metacpan.org/module/Throwable::Error very cool exception class that provides accessors 'message' and 'stacktrace' (that provides both of those) but will stringify to the message. By extending the class you can very easily add more accessors. for instances, if for some reason you wanted to know the user who just crashed you awsome app: package MyApp::Error use moose; extends 'Throwable::Error'; has 'user_id' => ( is => 'ro' isa => 'Int', ); Then in you app. (i usually pull my exception class in via a role, then delegate the classes methods/accessors) try { #SOMETHING AWFUL HAPPENED $some_object->fail_method(); } catch { $self->throw( { message => $_, user_id => $self->user->id } ); }; http://mojolicio.us/perldoc/ojo fun one-liner stuff with mojolicious http://mojolicio.us/perldoc/Mojo/UserAgent some really nifty method chains in mojo's reimplementation of useragent... the dom stuff should make web scraping a breeze, especially for one-off stuff or site monitors, etc.. I know there were some more modules i mentioned but I can't think of them at the moment. JQUERY stuff: http://datatables.net/ provides easy searchable, filterable, sortable tables by just passing it a hash (json) https://github.com/RobertFischer/JQuery-PeriodicalUpdater/ decaying, non-blocking ajax poller... so you can provide for instance a min and max polling interval and a rate of decay So you can tell it to poll every second for 2 requests then step to 2 seconds for two requests, then 3... and so on up to a max of 10 (for instance). And you can set a maximum number of polls... Also it doesn't trigger the callback function you define unless the results of the last poll are different than the current one. -- John -------------- next part -------------- An HTML attachment was scrubbed... URL: From davidnicol at gmail.com Wed Oct 19 07:58:05 2011 From: davidnicol at gmail.com (David Nicol) Date: Wed, 19 Oct 2011 09:58:05 -0500 Subject: [Kc] untie or unoverload an array from within its class? Message-ID: thinking (out loud) about lazy sort utilities. Given an invocation something like makelazysortedarray ( my @Sorted, @Unsorted); # presume "cmp" for comparison function which would work behind the scenes with a (\@@) protoype, and work by either tying @{$_[0]} or blessing $_[0] into an overloaded class (which in turn ties, so there's no advantage there) when the sort is complete, @{$_[0]} could be untied with "untie" and then get the complete remaining list assigned to it, or for an overload situation, $_[0] = [ @CompleteSortedList ] would also work. Am I right? -- "I am waiting for the war to make the world safe for anarchy" -- Lawrence Ferlinghetti -------------- next part -------------- An HTML attachment was scrubbed... URL: From davidnicol at gmail.com Mon Oct 24 07:14:54 2011 From: davidnicol at gmail.com (David Nicol) Date: Mon, 24 Oct 2011 09:14:54 -0500 Subject: [Kc] Anyone need an experienced software engineer? Message-ID: Looks like this competent professional is looking for his next near-term gig. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay at jays.net Wed Oct 26 20:31:56 2011 From: jay at jays.net (Jay Hannah) Date: Wed, 26 Oct 2011 22:31:56 -0500 Subject: [Kc] KC inactive? Message-ID: <8A002756-1CE6-4ED3-A5C8-E30C2B08C676@jays.net> Why are y'all inactive in our XML file? This means you're not listed on www.pm.org at all... j $ svn ann perl_mongers.xml > a 756 robert 18 leon KansasCity.pm 18 leon 18 leon Kansas City 18 leon Missouri 18 leon 18 leon United States of America 18 leon North America 726 gabor -94.778666 726 gabor 38.998483 18 leon 726 gabor 18 leon 18 leon 526 jhannah Andy Moore 679 gabor amooremooresystems.com 18 leon 115 leon http://kc.pm.org/ 18 leon 19990120 18 leon $ svn log -r756 ------------------------------------------------------------------------ r756 | robert | 2011-07-23 02:01:15 -0500 (Sat, 23 Jul 2011) | 2 lines set status=gone for groups who did not have an active website and didn't notice when their DNS was disabled for several weeks ------------------------------------------------------------------------ From jay.hannah at iinteractive.com Wed Oct 26 20:44:49 2011 From: jay.hannah at iinteractive.com (Jay Hannah) Date: Wed, 26 Oct 2011 22:44:49 -0500 Subject: [Kc] KC inactive Message-ID: FYI, this is support ticket # 102318. j ------------------------------- Andy: Looks like you got caught in a sweep for old websites, and then kansascity.pm.org got cancelled but everyone uses kc.pm.org probably, so you didn't notice? I know your list is active (I'm on it). Can you update your website please? Thanks, jhannah Omaha.pm Perl Monger Group Leader FAQ: http://groups.pm.org/faq.html From amoore at mooresystems.com Thu Oct 27 04:19:38 2011 From: amoore at mooresystems.com (Andrew Moore) Date: Thu, 27 Oct 2011 06:19:38 -0500 Subject: [Kc] KC inactive? In-Reply-To: <8A002756-1CE6-4ED3-A5C8-E30C2B08C676@jays.net> References: <8A002756-1CE6-4ED3-A5C8-E30C2B08C676@jays.net> Message-ID: I don't know. I've never edited that file. I don't really know anything about it. I can edit the kc.pm.org site to make it more obvious we're active, but how do I fix whatever XML file that is? Thanks, -Andy On Wed, Oct 26, 2011 at 10:31 PM, Jay Hannah wrote: > Why are y'all inactive in our XML file? This means you're not listed on www.pm.org at all... > > j > > > > > $ svn ann perl_mongers.xml ?> a > ? 756 ? ? robert ? ? ? > ? ?18 ? ? ? leon ? ? ? ? ? ? ? KansasCity.pm > ? ?18 ? ? ? leon ? ? ? ? ? ? ? > ? ?18 ? ? ? leon ? ? ? ? ? ? ? ? ? ? ? Kansas City > ? ?18 ? ? ? leon ? ? ? ? ? ? ? ? ? ? ? Missouri > ? ?18 ? ? ? leon ? ? ? ? ? ? ? ? ? ? ? > ? ?18 ? ? ? leon ? ? ? ? ? ? ? ? ? ? ? United States of America > ? ?18 ? ? ? leon ? ? ? ? ? ? ? ? ? ? ? North America > ? 726 ? ? ?gabor ? ? ? ? ? ? ? ? ? ? ? -94.778666 > ? 726 ? ? ?gabor ? ? ? ? ? ? ? ? ? ? ? 38.998483 > ? ?18 ? ? ? leon ? ? ? ? ? ? ? > ? 726 ? ? ?gabor ? ? ? ? ? ? ? > ? ?18 ? ? ? leon ? ? ? ? ? ? ? > ? ?18 ? ? ? leon ? ? ? ? ? ? ? > ? 526 ? ?jhannah ? ? ? ? ? ? ? ? ? ? ? Andy Moore > ? 679 ? ? ?gabor ? ? ? ? ? ? ? ? ? ? ? amooremooresystems.com > ? ?18 ? ? ? leon ? ? ? ? ? ? ? > ? 115 ? ? ? leon ? ? ? ? ? ? ? http://kc.pm.org/ > ? ?18 ? ? ? leon ? ? ? ? ? ? ? 19990120 > ? ?18 ? ? ? leon ? ? ? > > > $ svn log -r756 > ------------------------------------------------------------------------ > r756 | robert | 2011-07-23 02:01:15 -0500 (Sat, 23 Jul 2011) | 2 lines > > set status=gone for groups who did not have an active website and didn't notice when their DNS was disabled for several weeks > ------------------------------------------------------------------------ > > > _______________________________________________ > kc mailing list > kc at pm.org > http://mail.pm.org/mailman/listinfo/kc >