view release on metacpan or search on metacpan
lib/Catalyst/Plugin/CachedUriForAction.pm view on Meta::CPAN
my $i = -1;
if ( defined $n_args ) { # the non-slurpy case
Carp::croak "Wrong number of args+captures for path '$action' (need ".@$extra_parts.") in uri_for_action"
if ( @$captures + @_ ) != @$extra_parts;
# and now since @$extra_parts is exactly the same length as @$captures and @_ combined
# iterate over those arrays and use a cursor into @$extra_parts to interleave its elements
for ( @$captures ) { ( $uri .= uri_encode_utf8 $_ ) .= $extra_parts->[ ++$i ] }
for ( @_ ) { ( $uri .= uri_encode_utf8 $_ ) .= $extra_parts->[ ++$i ] }
} else {
# in the slurpy case, the size of @$extra_parts is determined by $n_caps alone since $n_args was undef
# and as we checked above @$captures alone has at least length $n_caps
# so we will need all of @$captures to cover @$extra_parts, and may then still have some of it left over
# so iterate over @$extra_parts and use a cursor into @$captures to interleave its elements
for ( @$extra_parts ) { ( $uri .= uri_encode_utf8 $captures->[ ++$i ] ) .= $_ }
# and then append the rest of @$captures, and then everything from @_ after that
for ( ++$i .. $#$captures ) { ( $uri .= '/' ) .= uri_encode_utf8 $captures->[ $_ ] }
for ( @_ ) { ( $uri .= '/' ) .= uri_encode_utf8 $_ }
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Plugin/Session/Store/BerkeleyDB.pm view on Meta::CPAN
$manager->txn_do(sub {
my ($key, $value) = ("", "");
# find out what we need to delete
my %to_delete;
my $all = $db->db_cursor;
while( 0 == $all->c_get( $key, $value, DB_NEXT ) ){
if($key =~ /^expires:(.+)$/){
$to_delete{$1} = 1 if time > $value;
}
}
# then delete all of those
$all = $db->db_cursor;
while( 0 == $all->c_get( $key, $value, DB_NEXT ) ){
my ($name, $id) = split /:/, $key;
$all->c_del() and warn "bye, $key" if $to_delete{$id};
};
});
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/View/CSV.pm view on Meta::CPAN
__PACKAGE__->config ( sep_char => ",", suffix => "csv" );
1;
# Return a CSV view from a controller:
$c->stash ( columns => [ qw ( Title Date ) ],
cursor => $c->model ( "FilmDB::Film" )->cursor,
current_view => "CSV" );
# or
$c->stash ( columns => [ qw ( Title Date ) ],
data => [
[ "Dead Poets Society", "1989" ],
lib/Catalyst/View/CSV.pm view on Meta::CPAN
L<Catalyst::View::CSV> provides a L<Catalyst> view that generates CSV
files.
You can use either a Perl array of arrays, an array of hashes, an
array of objects, or a database cursor as the source of the CSV data.
For example:
my $data = [
[ "Dead Poets Society", "1989" ],
[ "Stage Beauty", "2004" ],
lib/Catalyst/View/CSV.pm view on Meta::CPAN
$c->stash ( data => $data );
or
my $resultset = $c->model ( "FilmDB::Film" )->search ( ... );
$c->stash ( cursor => $resultset->cursor );
The CSV file is generated using L<Text::CSV>.
=head1 FILENAME
lib/Catalyst/View/CSV.pm view on Meta::CPAN
CSV file body:
"Dead Poets Society",1989
"Stage Beauty",2004
You must specify either C<data> or C<cursor>.
=head2 cursor
A database cursor providing access to the data to be included in the
generated CSV file. If you are using L<DBIx::Class>, then you can
obtain a cursor from any result set using the C<cursor()> method. For
example:
my $resultset = $c->model ( "FilmDB::Film" )->search ( ... );
$c->stash ( cursor => $resultset->cursor );
You must specify either C<data> or C<cursor>. For large data sets,
using a cursor may be more efficient since it avoids copying the whole
data set into memory.
=head2 columns
An optional list of column headings. For example:
lib/Catalyst/View/CSV.pm view on Meta::CPAN
no header row is present).
If you are using literal data in the form of an B<array of hashes> or
an B<array of objects>, then you must specify C<columns>. You do not
need to specify C<columns> when using literal data in the form of an
B<array of arrays>, or when using a database cursor.
Extracting the column names from a L<DBIx::Class> result set is
surprisingly non-trivial. The closest approximation is
$c->stash ( columns => $resultset->result_source->columns );
lib/Catalyst/View/CSV.pm view on Meta::CPAN
my $csv = $self->csv;
my $content_type = $self->content_type;
# Extract stash parameters
my $columns = $c->stash->{columns};
die "No cursor or inline data provided\n"
unless exists $c->stash->{data} || exists $c->stash->{cursor};
my $data = $c->stash->{data};
my $cursor = $c->stash->{cursor};
my $filename = $c->stash->{filename};
# Determine resulting CSV filename
if ( ! defined $filename ) {
$filename = ( [ $c->req->uri->path_segments ]->[-1] ||
lib/Catalyst/View/CSV.pm view on Meta::CPAN
}
$csv->print ( $response, $row )
or die "Could not generate row data: ".$csv->error_diag."\n";
}
} else {
while ( ( my @row = $cursor->next ) ) {
$csv->print ( $response, \@row )
or die "Could not generate row data: ".$csv->error_diag."\n";
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
examples/TestApp/root/static/css/theme/jquery-ui.custom.css view on Meta::CPAN
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
/* Interaction Cues
----------------------------------*/
.ui-state-disabled { cursor: default !important; }
/* Icons
----------------------------------*/
examples/TestApp/root/static/css/theme/jquery-ui.custom.css view on Meta::CPAN
/* Overlays */
.ui-widget-overlay { background: #a6a6a6 url(images/ui-bg_dots-small_65_a6a6a6_2x2.png) 50% 50% repeat; opacity: .40;filter:Alpha(Opacity=40); }
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #333333 url(images/ui-bg_flat_0_333333_40x100.png) 50% 50% repeat-x; opacity: .10;filter:Alpha(Opacity=10); -moz-border-radius: 8px; -webkit-border-radius: 8px; }/* Accordion
----------------------------------*/
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
.ui-accordion .ui-accordion-li-fix { display: inline; }
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; }
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; }
examples/TestApp/root/static/css/theme/jquery-ui.custom.css view on Meta::CPAN
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
.ui-datepicker td { border: 0; padding: 1px; }
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
/* with multiple calendars */
.ui-datepicker.ui-datepicker-multi { width:auto; }
.ui-datepicker-multi .ui-datepicker-group { float:left; }
examples/TestApp/root/static/css/theme/jquery-ui.custom.css view on Meta::CPAN
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
.ui-draggable .ui-dialog-titlebar { cursor: move; }
/* Progressbar
----------------------------------*/
.ui-progressbar { height:2em; text-align: left; }
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* Resizable
----------------------------------*/
.ui-resizable { position: relative;}
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; }
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; }
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; }
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; }
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Slider
----------------------------------*/
.ui-slider { position: relative; text-align: left; }
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; }
.ui-slider-horizontal { height: .8em; }
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
examples/TestApp/root/static/css/theme/jquery-ui.custom.css view on Meta::CPAN
.ui-tabs { padding: .2em; zoom: 1; }
.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; }
.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; }
.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; }
.ui-tabs .ui-tabs-hide { display: none !important; }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/CMS/tt/static/css/cms.css view on Meta::CPAN
}
.history tr.diff:hover
{
cursor: pointer;
background: #ffffe0;
}
.alt { background: #eee; }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/CRUD/YUI/TT/static/css/crud/base.css view on Meta::CPAN
}
#crud-links li a:hover {
color: #222;
background: #ffdd77;
/* cursor:pointer; */
}
#crud-links li a.selected {
color: #222;
background: transparent url(http://yui.yahooapis.com/2.6.0/build/assets/skins/sam/menuitem_submenuindicator.png) no-repeat scroll right center;
background-color: #fff;
font-weight:bold;
cursor: default;
}
#crud-body {
padding: 0.5em;
margin-left: 200px;
lib/CatalystX/CRUD/YUI/TT/static/css/crud/base.css view on Meta::CPAN
}
.button:hover {
color: #111;
background-color: #ffdd77;
cursor: pointer;
border: 1px inset #7a0019;
}
#main a:hover,
a.box:hover,
.crud a:hover,
button.box:hover
{
background-color: #ffdd77;
cursor:pointer;
}
.xls_link {
margin: 8px 0;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/Crudite/Util/Random.pm view on Meta::CPAN
curse
cursed
curses
cursing
cursive
cursor
cursorily
cursors
cursory
curt
curtail
curtailed
curtails
curtain
lib/CatalystX/Crudite/Util/Random.pm view on Meta::CPAN
preconception
preconceptions
precondition
preconditioned
preconditions
precursor
precursors
predate
predated
predates
predating
predatory
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/Temporal/Controller/AutoList.pm view on Meta::CPAN
my @rows;
# using all instead of next due DBIx::Class::ResultSet::_construct_results():
# Unable to properly collapse has_many results in iterator mode due to order criteria
# - performed an eager cursor slurp underneath.
# TODO: use while when no prefetch is needed. This may be naive to access, though
my @all_rows = $c->stash->{collection}->all;
foreach my $obj (@all_rows) {
my $data_row = $obj->$name->next;
view all matches for this distribution
view release on metacpan or search on metacpan
root/static/js/yui/build/assets/skins/sam/autocomplete.css view on Meta::CPAN
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.0
*/
.yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%;}.yui-skin-sam .yui-ac-input{position:absolute;width:100%;}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%;}.yui-skin-sam .yui-ac-content{position:absolut...
view all matches for this distribution
view release on metacpan or search on metacpan
t/static/css/lists.css view on Meta::CPAN
}
button.popup {
font-size: 8pt;
margin: 0;
padding: 0;
cursor: hand;
}
.boldlabel {
color: #333399;
font-size: 90%;
t/static/css/lists.css view on Meta::CPAN
padding-top: 0;
padding-bottom: 0 ;
padding-left: 10px;
text-align: left;
width: 150px;
cursor: hand;
}
/* talnf */
body.main {
t/static/css/lists.css view on Meta::CPAN
border-left: #ffffff 1px solid;
border-right: 1px solid;
border-top: #ffffff 1px solid;
padding-bottom: 0 ;
padding-left: 10px;
cursor: hand;
}
td.searchboxtitle {
background-color: #EEEEEE;
color: #333399;
font-weight: bold;
t/static/css/lists.css view on Meta::CPAN
border-top: 0px solid #ccccee;
border-bottom: 0px solid #666688;
padding-left: 2px;
padding-right: 2px ;
text-align: center;
cursor:hand;
}
.listcolheadrunningtotal {
background-color: #dae0ed;
font-size: 90%;
color: #333399;
t/static/css/lists.css view on Meta::CPAN
border-top: 0px solid #ccccee;
border-bottom: 0px solid #666688;
padding-left: 2px;
padding-right: 2px ;
text-align: center;
cursor:hand;
}
a.listcolheadsort:link, a.listcolheadsort:visited, a.listcolheadsort:active {
text-decoration: none;
}
tr.listrow0 {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/FedoraCommons/Model/findObjects.pm view on Meta::CPAN
my $obj = $fedora->findObjects(terms=>'*')->parse_content;
{
'token' => '92b0ae4028f9459ce7cd0600f562adb2' ,
'cursor' => 0,
'expirationDate' => '2013-02-08T09:37:55.860Z',
'results' => [
{
'pid' => 'demo:29' ,
'label' => 'Data Object for Image Manipulation Demo' ,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/Importer/OAI.pm view on Meta::CPAN
$resumptionToken = $res->resumptionToken->resumptionToken;
$resumptionData->{token} = $resumptionToken;
$resumptionData->{expirationDate} = $res->resumptionToken->expirationDate;
$resumptionData->{completeListSize} = $res->resumptionToken->completeListSize;
$resumptionData->{cursor} = $res->resumptionToken->cursor;
}
else {
$resumptionToken = undef;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/Store/MongoDB/Bag.pm view on Meta::CPAN
$opts //= {};
$opts->{session} = $self->store->session if $self->store->has_session;
$opts;
}
sub _cursor {
my ($self, $filter, $opts) = @_;
$self->collection->find($filter // {}, $self->_options($opts));
}
sub generator {
my ($self) = @_;
sub {
state $cursor = do {
my $c = $self->_cursor;
$c->immortal(1);
$c;
};
$cursor->next;
};
}
sub to_array {
my ($self) = @_;
my @all = $self->_cursor->all;
\@all;
}
sub each {
my ($self, $sub) = @_;
my $cursor = $self->_cursor;
my $n = 0;
while (my $data = $cursor->next) {
$sub->($data);
$n++;
}
$n;
}
lib/Catmandu/Store/MongoDB/Bag.pm view on Meta::CPAN
if (is_string($arg1)) {
if (is_value($arg2) || is_regex_ref($arg2)) {
return Catmandu::Iterator->new(
sub {
sub {
state $cursor = $self->_cursor({$arg1 => $arg2});
$cursor->next;
}
}
);
}
if (is_array_ref($arg2)) {
return Catmandu::Iterator->new(
sub {
sub {
state $cursor
= $self->_cursor({$arg1 => {'$in' => $arg2}});
$cursor->next;
}
}
);
}
}
lib/Catmandu/Store/MongoDB/Bag.pm view on Meta::CPAN
if (is_string($arg1)) {
if (is_value($arg2)) {
return Catmandu::Iterator->new(
sub {
sub {
state $cursor
= $self->_cursor({$arg1 => {'$ne' => $arg2}});
$cursor->next;
}
}
);
}
if (is_array_ref($arg2)) {
return Catmandu::Iterator->new(
sub {
sub {
state $cursor
= $self->_cursor({$arg1 => {'$nin' => $arg2}});
$cursor->next;
}
}
);
}
}
lib/Catmandu/Store/MongoDB/Bag.pm view on Meta::CPAN
sub pluck {
my ($self, $key) = @_;
Catmandu::Iterator->new(
sub {
sub {
state $cursor
= $self->_cursor({}, {projection => {$key => 1}});
($cursor->next || return)->{$key};
}
}
);
}
lib/Catmandu/Store/MongoDB/Bag.pm view on Meta::CPAN
my $orig_limit = $limit;
if ($orig_limit == 0) {
$limit = 1;
}
my $cursor = $self->_cursor($query)->skip($start)->limit($limit);
if ($bag) { # only retrieve _id
$cursor->fields({});
}
elsif ($fields) { # only retrieve specified fields
$cursor->fields($fields);
}
if (my $sort = $args{sort}) {
$cursor->sort($sort);
}
my @hits = $cursor->all;
if ($orig_limit == 0) {
@hits = ();
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Chandra/Game/Tetris/Engine.pm view on Meta::CPAN
border: none;
font-family: monospace;
font-size: clamp(0.7rem, calc(var(--cell) * 0.35), 1rem);
letter-spacing: 0.1em;
text-transform: uppercase;
cursor: pointer;
border-radius: 2px;
}
#start:hover {
background: rgb(80, 200, 120);
view all matches for this distribution
view release on metacpan or search on metacpan
examples/assets_mount_example.pl view on Meta::CPAN
border: 1px solid rgba(255,255,255,0.2);
}
button {
background: #fff; color: #764ba2;
border: none; border-radius: 6px;
padding: 0.6em 1.2em; cursor: pointer;
font-weight: bold; font-size: 1em;
}
button:hover { opacity: 0.9; }
#status { color: #a5d6a7; font-weight: bold; }
CSS
view all matches for this distribution
view release on metacpan or search on metacpan
share/plotly.js/plotly.min.js view on Meta::CPAN
* plotly.js v2.14.0
* Copyright 2012-2022, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self...
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
share/plotly.js/plotly.min.js view on Meta::CPAN
/*
* @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc
* @license MIT
* @preserve Project Home: https://github.com/voidqk/polybooljs
*/
var n,i=t("./lib/build-log"),a=t("./lib/epsilon"),o=t("./lib/intersecter"),s=t("./lib/segment-chainer"),l=t("./lib/segment-selector"),c=t("./lib/geojson"),u=!1,f=a();function h(t,e,r){var i=n.segments(t),a=n.segments(e),o=r(n.combine(i,a));return n.p...
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
view all matches for this distribution
view release on metacpan or search on metacpan
public/themes/dark/dark.css view on Meta::CPAN
/* Subpanel title */
#drupalchat .subpanel_title {
background: #333333;
border-bottom: 1px solid #333333;
color: #fff;
cursor: pointer;
font-weight: bold;
padding: 3px 4px 3px 8px;
font-size: 13px;
}
#drupalchat .subpanel_title div.status-1{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Chemistry/File/InChI/Parser.yp view on Meta::CPAN
push @{$self->{USER}{MOL}->attr( 'inchi/counts' )}, $count;
return ( 'formula_continuation', $formula );
}
}
# Reset cursor on 'h', 'q' or 't'
if( $self->YYData->{INPUT} =~ s/^([hqt])// ) {
$self->{USER}{CURSOR} = 0;
return ( $1, $1 );
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Chorus/Sample/Cursors.pm view on Meta::CPAN
looking for elements of knowledge having certain properties.
In the same time, any invocation of the frame methods get() & set(), can take advantage of the presence
of the slot _NEEDED or _AFTER, to respectively try to realize conditions (backward chaining) before providing
an information on a frame or/and propagate (~ forward chaining) a modification to the system - See Chorus::Frame documentation.
In this example, the system is composed of 100 cursors (frames), each one having a slot 'level'
with a random value (from 1 to 10).
The goal is to move the system until the average distance of 'level' to the medium value 5
is lower than 0.5.
Rule 1 : display the state of the system
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Chorus/Sample/Cursors.pm view on Meta::CPAN
looking for elements of knowledge having certain properties.
In the same time, any invocation of the frame methods get() & set(), can take advantage of the presence
of the slot _NEEDED or _AFTER, to respectively try to realize conditions (backward chaining) before providing
an information on a frame or/and propagate (~ forward chaining) a modification to the system - See Chorus::Frame documentation.
In this example, the system is composed of 100 cursors (frames), each one having a slot 'level'
with a random value (from 1 to 10).
The goal is to move the system until the average distance of 'level' to the medium value 5
is lower than 0.5.
Rule 1 : display the state of the system
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Schedule/Chronic/Tab.pm view on Meta::CPAN
# constraint = DiskIO, 600; contraint = Loadavg, 600, 0.05; \
# last_ran = 1082709815;
my $last_entry = ''; # To keep track of continuations
my $tasks = 0;
my $linecursor = 0;
while ($_ = <TAB>) {
$linecursor++;
next unless /\S/;
next if /^\s*#/;
chomp;
my $entry = $normalize->($_);
lib/Schedule/Chronic/Tab.pm view on Meta::CPAN
# This entry is b0rken. Show it to the user.
# We should probably barf here and ask the user
# to correct the error. FIX.
$self->debug("Syntax error in line $linecursor of $tab - ignoring.");
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
examples/site/tec/css/local.css view on Meta::CPAN
outline: none;
outline-offset: 0em;
/* Look like a link */
background: none;
color: blue;
cursor: pointer;
font: inherit;
text-decoration: underline;
}
/* Remove extra space inside buttons in Firefox */
view all matches for this distribution
view release on metacpan or search on metacpan
Examples/GDS2Tool/gds2tool view on Meta::CPAN
$G_mouseInfoText='mouse buttons: ruler | nothing | nothing';
ruler($G_canvas, 1, '', '');
}
elsif ($G_keyLast eq 'z')
{
$G_canvas -> configure(-cursor => 'crosshair');
zoom($G_canvas, 0, $x - 20, $y - 30);
}
elsif ($G_keyLast eq 'plus')
{
zoom($G_canvas, 2, $x, $y);
Examples/GDS2Tool/gds2tool view on Meta::CPAN
setCursor();
}
);
$G_keyBindingText = <<EOKBT;
<f> full view
<p> pan to cursor
<r> ruler
<z> zoom in with window
<-> zoom in on cursor
<+> zoom out on cursor
<Escape> clear, interrupt
<Delete> clear rulers
<Up-arrow> pan up
<Down-arrow> pan down
<Right-arrow> pan right
Examples/GDS2Tool/gds2tool view on Meta::CPAN
{
my ($canvas, $type, $x, $y) = @_;
if ($x ne '')
{
$G_statusText='Enter another coordinate';
$canvas -> configure(-cursor => 'pencil');
my ($x1,$y1) = $canvas -> worldxy($x,$y); ## convert before call....
$G_startx = round2Grid($x1,$G_xSnapGrid);
$G_starty = round2Grid($y1,$G_ySnapGrid);
startPolygon($canvas,
-type => 'line',
Examples/GDS2Tool/gds2tool view on Meta::CPAN
else ## zoom in with window
{
if ($x ne '')
{
$G_statusText='Enter 2nd coordinate';
$canvas -> configure(-cursor => 'crosshair');
my ($x1,$y1) = $canvas -> worldxy($x,$y); ## convert before call....
startPolygon($canvas,
-type => 'rectangle',
-x => $x1,
-y => $y1,
Examples/GDS2Tool/gds2tool view on Meta::CPAN
sub setCursor
{
if ($G_mouseMode eq 'pan')
{
$G_canvas -> configure(-cursor => 'circle');
}
elsif ($G_mouseMode eq 'ruler')
{
$G_canvas -> configure(-cursor => 'pencil');
}
elsif ($G_mouseMode =~ m/zoom/)
{
$G_canvas -> configure(-cursor => 'iron_cross') if ($G_mouseMode eq 'zoomin');
$G_canvas -> configure(-cursor => 'fleur') if ($G_mouseMode eq 'zoomout');
}
else
{
$G_canvas -> configure(-cursor => 'arrow');
}
}
################################################################################
sub showGridWindow
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Clang.pm view on Meta::CPAN
use Clang;
my $index = Clang::Index -> new(1);
my $tunit = $index -> parse('file.c');
my $nodes = $tunit -> cursor -> children;
foreach my $node (@$nodes) {
say $node -> spelling;
say $node -> kind -> spelling;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/AlzaboWrapper.pm view on Meta::CPAN
*column = \&Columns;
sub NewCursor
{
my $self = shift;
my $cursor = shift;
return
Class::AlzaboWrapper::Cursor->new
( cursor => $cursor );
}
# deprecated
*cursor = \&NewCursor;
sub TableToClass { $TableToClass{ $_[1]->name } }
# deprecated
*table_to_class = \&TableToClass;
lib/Class/AlzaboWrapper.pm view on Meta::CPAN
=item * AlzaboAttributes()
Returns a list of accessor methods that were created based on the
columns in the class's associated table.
=item * NewCursor ($cursor)
Given an C<Alzabo::Runtime::Cursor> object (either a row or join
cursor), this method returns a new C<Class::AlzaboWrapper::Cursor>
object.
=back
=head3 Object methods
lib/Class/AlzaboWrapper.pm view on Meta::CPAN
=back
=head3 Cursors
When using this module, you need to use the
C<Class::AlzaboWrapper::Cursor> module to wrap Alzabo's cursor
objects, so that objects the cursor returns are of the appropriate
subclass, not plain C<Alzabo::Runtime::Row> objects. The C<Cursor()>
method provides some syntactic sugar for creating
C<Class::AlzaboWrapper::Cursor> objects.
=head3 Attributes created by subclasses
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/AutoDB.pm view on Meta::CPAN
# both inherit from AutoClass anyway
use base qw(Class::AutoDB::Database Class::AutoDB::Connect Class::AutoClass);
@AUTO_ATTRIBUTES=qw(read_only read_only_schema alter_param index_param
object_table registry
session cursors
_db_cursor);
@OTHER_ATTRIBUTES=qw(server=>'host');
%SYNONYMS=();
Class::AutoClass::declare;
use vars qw($AUTO_REGISTRY); # TODO: move to Globals
lib/Class/AutoDB.pm view on Meta::CPAN
my @friend_names=map {$_->name} @{$person->friends};
print $person->name,"'s friends are @friend_names\n";
}
# retrieve and process objects one-by-one
my $cursor=$autodb->find(collection=>'Person');
while (my $person=$cursor->get_next) {
# do what you want with $person, for example, print friends list
my @friend_names=map {$_->name} @{$person->friends};
print $person->name,"'s friends are @friend_names\n";
}
lib/Class/AutoDB.pm view on Meta::CPAN
If you supply search_key=>value pairs and a SQL statement, they are ANDed.
=head3 find
Title : find
Usage : my $cursor=$autodb->find(collection=>'Person',name=>'Joe',sex=>'M')
-- OR --
my $cursor=$autodb->find(collection=>'Person',
query=>{name=>'Joe',sex=>'M'})
-- OR --
my $cursor=$autodb->find
-- OR --
my $cursor=$autodb->find(sql=>qq(SELECT oid FROM Person
WHERE name='Joe' OR name='Bill'))
Function: Execute query.
Returns : Class::AutoDB::Cursor object which can be used to retrieve results
Args : same as 'get'
Notes : same as 'get'
lib/Class/AutoDB.pm view on Meta::CPAN
Usage : my $count=$autodb->count(collection=>'Person',name=>'Joe',sex=>'M')
-- OR --
my $count=$autodb->count(collection=>'Person',
query=>{name=>'Joe',sex=>'M'})
-- OR --
my $cursor=$autodb->find
-- OR --
my $cursor=$autodb->find(sql=>qq(SELECT oid FROM Person
WHERE name='Joe' OR name='Bill'))
Function: Count number of objects satisfying query
Returns : number
Args : same as 'get'
Notes : same as 'get'
lib/Class/AutoDB.pm view on Meta::CPAN
related methods operating on Class::AutoDB objects.
=head3 get
Title : get
Usage : my @males=$cursor->get
-- OR --
my $males=$cursor->get
Function: Retrieve results of query associated with cursor
Returns : list or ARRAY of objects satisfying query
Args : none
It is possible to mix 'get' and 'get_next' operations. If some
'get_next' operations have been run on cursor, 'get' retrieves
remaining objects
=head3 get_next
Title : get_next
Usage : my $object=$cursor->get_next
Function: Retrieve next result for cursor or undef if there are no more
Returns : object satisfying query or undef
Args : none
Notes : Allows simple while loops to iterate over results as in SYNOPSIS
=head3 count
Title : count
Usage : my $count=$cursor->count
Function: Count number of objects satisfying query associated with cursor
Returns : number
Args : none
=head3 reset
Title : reset
Usage : $cursor->reset
Function: Re-execute query associated with cursor.
Returns : nothing
Args : none
Notes : Subsequent 'get' or 'get_next' operation will start at beginning
=head2 Updates
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/DBI/Factory/Ghost.pm view on Meta::CPAN
use vars qw( $VERSION $AUTOLOAD );
$VERSION = '0.04';
=head1 NAME
Class::DBI::Factory::Ghost - a minimal data-container used as a precursor for Class::DBI objects when populating forms or otherwise preparing to create a new object from existing data.
=head1 SYNOPSIS
my $thing = Class::DBI::Factory::Ghost->new({
id => 'new',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/DBI/Lite/Iterator.pm view on Meta::CPAN
=head2 next
Returns the next object in the series, or undef.
Moves the internal cursor to the next object if one exists.
=head2 reset
Resets the internal cursor to the first object if one exists.
=head1 SEE ALSO
L<Class::DBI:Lite>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/DBI/Plugin/DeepAbstractSearchPager.pm view on Meta::CPAN
If you are using a subclass of the pager, this method will not be called.
Will C<die> if using Oracle or DB2, since there is no simple syntax for limiting
the results set. DB2 has a C<FETCH> keyword, but that seems to apply to a
cursor and I don't know if there is a cursor available to the pager. There
should probably be others to add to the unsupported list.
Supports the following drivers:
DRIVER CDBI::P::Pager subclass
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/DBI/Plugin/Pager.pm view on Meta::CPAN
If you are using a subclass of the pager, this method will not be called.
Will C<die> if using Oracle or DB2, since there is no simple syntax for limiting
the results set. DB2 has a C<FETCH> keyword, but that seems to apply to a
cursor and I don't know if there is a cursor available to the pager. There
should probably be others to add to the unsupported list.
Supports the following drivers:
DRIVER CDBI::P::Pager subclass
view all matches for this distribution