This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use PDL::Graphics::Prima::Simple; | |
| line_plot $time, $temp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| ############################# | |
| # Getting the Forecast Data # | |
| ############################# | |
| use PDL; | |
| use Time::Piece; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sub build_state_func { | |
| my $state_var | |
| return sub { | |
| # work with state here | |
| } | |
| } | |
| ... | |
| *globref = build_state_func(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use warnings; | |
| use Prima qw(Application Buttons Label); | |
| my $window = Prima::Window->create(); | |
| $window->insert(Label => | |
| text => 'test', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use warnings; | |
| sub my_plot { | |
| croak("Expected key/value pairs, but got an odd number of arguments to pot()") | |
| if @_ % 2 == 1; | |
| print "About to plot!\n"; | |
| PDL::Graphics::Prima::Simple::default_plot(@_); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use warnings; | |
| use PDL; | |
| use PDL::Graphics::Prima; | |
| use Prima qw(Application InputLine IniFile); | |
| use PDL::FFT; | |
| my $wDisplay = Prima::MainWindow->create( | |
| text => 'FFT Envelope analysis', | |
| size => [800, 800], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use warnings; | |
| use threads qw(yield); | |
| use threads::shared qw(cond_wait); | |
| my $N_threads = 4; | |
| # Allocate the shared memory outside the threads | |
| my @data :shared; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| C:\Windows\system32>cpan PDL::Graphics::Prima | |
| CPAN: CPAN::SQLite loaded ok (v0.199) | |
| Database was generated on Fri, 06 Jul 2012 16:57:19 GMT | |
| Running install for module 'PDL::Graphics::Prima' | |
| Running make for D/DC/DCMERTENS/PDL-Graphics-Prima-0.08.tar.gz | |
| CPAN: Digest::SHA loaded ok (v5.61) | |
| CPAN: Compress::Zlib loaded ok (v2.034) | |
| Checksum for C:\strawberry\cpan\sources\authors\id\D\DC\DCMERTENS\PDL-Graphics-Prima-0.08.tar.gz ok | |
| CPAN: Archive::Tar loaded ok (v1.76) | |
| CPAN: File::Temp loaded ok (v0.22) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| use PDL; | |
| use PDL::Image2D; | |
| use PDL::Fit::Gaussian; | |
| use Prima; | |
| use PDL::Graphics::Prima::Simple -sequential; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/perl | |
| # based on http://poe.perl.org/?POE_Cookbook/Gtk_Interfaces | |
| # | |
| # This sample program creates a very simple Prima counter. Its | |
| # interface consists of two widgets: A counter label and a button | |
| # to reset that counter. | |
| use warnings; | |
| use strict; | |
| # Prima support is enabled if the Prima module is used before POE itself. |