view release on metacpan or search on metacpan
lib/AAC/Pvoice/Input.pm view on Meta::CPAN
sub _initmonitor
{
my $self = shift;
# The event for the adremo device
$self->{window}->{adremotimer} = Wx::Timer->new($self->{window},my $tid = Wx::NewId());
EVT_TIMER($self->{window}, $tid, \&_monitorport);
}
sub _initautoscan
{
my $self = shift;
$self->{window}->{onebuttontimer} = Wx::Timer->new($self->{window},my $obtid = Wx::NewId());
EVT_TIMER($self->{window}, $obtid, sub{my $self = shift; $self->{input}->{next}->() if $self->{input}->{next}});
}
sub StartMonitor
{
my $self = shift;
$self->{window}->{adremotimer}->Start($self->{window}->{Interval}, 0) # 0 is continuous
if $self->{window}->{adremotimer};
}
sub QuitMonitor
{
my $self = shift;
# stop the timer for the port monitor
$self->{window}->{adremotimer}->Stop() if $self->{window}->{adremotimer} && $self->{window}->{adremotimer}->IsRunning;
}
sub StartAutoscan
{
my $self = shift;
$self->{window}->{onebuttontimer}->Start($self->{window}->{OneButtonInterval}, 0) # 0 is continuous
if $self->{window}->{onebuttontimer};
}
sub QuitAutoscan
{
my $self = shift;
$self->{window}->{onebuttontimer}->Stop() if $self->{window}->{onebuttontimer} && $self->{window}->{onebuttontimer}->IsRunning;
}
sub PauseMonitor
{
my $self = shift;
lib/AAC/Pvoice/Input.pm view on Meta::CPAN
#----------------------------------------------------------------------
# This sub is used to monitor the parallel port for the adremo device
sub _monitorport
{
# BEWARE: $self is the wxWindow subclass the timer
# belongs to!
my ($self, $event) = @_;
# do nothing if the device is not adremo or
# if we're already running
return if ($self->{monitorrun} ||
lib/AAC/Pvoice/Input.pm view on Meta::CPAN
=head1 USAGE
=head2 new($window)
This constructor takes the window (AAC::Pvoice::Panel typically) on which
the events and timer will be called as a parameter.
If the configuration (read using Wx::ConfigBase::Get) has a key called
'Device' (which can be set to 'icon', 'keys' , 'mouse' or 'adremo') is set to 'adremo', it
will start polling the parallel port every x milliseconds, where x is the
value of the configuration key 'Interval'. This setting is only useful if you connect
an "Adremo" electrical wheelchair to the parallel port of your PC (for more
lib/AAC/Pvoice/Input.pm view on Meta::CPAN
=head2 newchild($window)
This semi-constructor takes the window (usually a child of the panel you
passed to the new() constructor, on which the events will be called as a parameter.
It doesn't start the timers for polling the parallel port and automatic
invocation of the Next() subroutine, because those timers otherwise would
be started multiple times.
Apart from starting those timers, this method works exactly like the new()
=head2 Next(sub)
This method takes a coderef as parameter. This coderef will be invoked when
the 'Next' event happens.
lib/AAC/Pvoice/Input.pm view on Meta::CPAN
This method will start polling the the parallel port for input of the Adremo
Electrical Wheelchair.
=head2 QuitMonitor
This method will stop the timer that monitors the parallel port.
=head2 PauseMonitor($bool)
This method will pause ($bool is set to 1) or restart ($bool is set to 0)
the timer that monitors the parallel port.
=head2 StartAutoscan
This method will start the timer that invokes the Next() event every n milliseconds.
=head2 QuitAutoscan
This method will stop the timer that invokes the Next() method.
=head2 PauseAutoscan($bool)
This method will pause ($bool is set to 1) or restart ($bool is set to 0)
the timer that invokes the Next() method.
=head1 BUGS
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AE/AdHoc.pm view on Meta::CPAN
Suppose we have a subroutine named C<do_stuff( @args, $subref )>
that is designed to run under AnyEvent. As do_stuff may have to wait for
some external events to happen, it does not return a value right away.
Instead, it will call C<$subref-E<gt>( $results )> when stuff is done.
Now we need to test do_stuff, so we set up an event loop. We also need a timer,
because a test that runs forever is annoying. So the script goes like this:
use AnyEvent;
# set up event loop
my $cv = AnyEvent->condvar;
my $timer = AnyEvent->timer(
after => 10, cb => sub { $cv->croak("Timeout"); }
);
do_stuff( @args, sub{ $cv->send(shift); } );
# run event loop, get rid of timer
my $result = $cv->recv();
undef $timer;
# finally
analyze_results( $result );
Now, the same with AE::AdHoc:
lib/AE/AdHoc.pm view on Meta::CPAN
local $where = "ae_recv[$iter] at $caller[1]:$caller[2]";
my $on_timeout = $opt{soft_timeout}
? sub { $cv->send }
: sub { $cv->croak("Timeout after $timeout seconds"); };
my $timer;
$timeout > 0 and $timer = AnyEvent->timer( after => $timeout,
cb => $on_timeout,
);
_clear_goals();
$code->();
return $cv->recv;
# on exit, $timer is autodestroyed
# on exit, $cv is restored => destroyed
};
=head2 ae_send ( [@fixed_args] )
lib/AE/AdHoc.pm view on Meta::CPAN
=head1 ADDITIONAL ROUTINES
=head2 ae_action { CODE } %options
Perform CODE after entering the event loop via ae_recv
(a timer is used internally).
CODE will NOT run after current event loop is terminated (see ae_recv).
Options may include:
lib/AE/AdHoc.pm view on Meta::CPAN
my $count = $opt{count};
my $inf = !$count;
my $n = 0;
my $timer;
my $cb = sub {
if (!$cv) {
undef $timer;
return _error( "Leftover $exact called outside ae_recv" );
};
$myiter == $iter or undef $timer;
$inf or $count-->0 or undef $timer;
$timer and $code->($n++);
};
$timer = AnyEvent->timer(
after=>$opt{after}, interval=>$opt{interval}, cb=>$cb);
return;
};
=head1 ERROR HANDLING
view all matches for this distribution
view release on metacpan or search on metacpan
BackProp.pm view on Meta::CPAN
}
# Debug
AI::NeuralNet::BackProp::out1 "Num output neurons: $out, Input neurons: $size, Division: $divide\n";
# Start benchmark timer and initalize a few variables
$t0 = new Benchmark;
$flag = 0;
$loop = 0;
my $ldiff = 0;
my $dinc = 0.0001;
view all matches for this distribution
view release on metacpan or search on metacpan
- Add object detection demo. See <https://github.com/EntropyOrg/perl-AI-TensorFlow-Libtensorflow/pull/23>.
Refactoring
- Add timer to the notebooks to time the inference steps. See <https://github.com/EntropyOrg/perl-AI-TensorFlow-Libtensorflow/pull/17>.
Documentation
- Add information about installing GPU version of `libtensorflow` either on
the "bare metal" or with Docker GPU runtime support. See <https://github.com/EntropyOrg/perl-AI-TensorFlow-Libtensorflow/pull/18>.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/Eulerian/EDW/Peer/Thin.pm view on Meta::CPAN
}
case 'headers' {
#print Dumper( $json ) . "\n";
$self->{ uuid } = $uuid;
$hook->on_headers(
$json->{ uuid }, $json->{ timerange }->[ 0 ],
$json->{ timerange }->[ 1 ], $json->{ columns }
);
}
case 'progress' {
$hook->on_progress(
$json->{ uuid }, $json->{ progress }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/MikroTik.pm view on Meta::CPAN
}
sub _finish {
my ($self, $r, $err) = @_;
delete $self->{requests}{$r->{tag}};
if (my $timer = $r->{timeout}) { $r->{loop}->remove($timer) }
$r->{cb}->($self, ($self->{error} = $err // ''), $r->{data});
}
sub _login {
my ($self, $loop, $cb) = @_;
lib/API/MikroTik.pm view on Meta::CPAN
return $r->{tag} if $r->{subscription};
weaken $self;
$r->{timeout} = $r->{loop}
->timer($self->timeout => sub { $self->_fail($r, 'response timeout') });
return $r->{tag};
}
1;
lib/API/MikroTik.pm view on Meta::CPAN
'/interface/listen' => sub {
my ($api, $err, $el) = @_;
...;
}
);
Mojo::IOLoop->timer(3 => sub { $api->cancel($tag) });
Mojo::IOLoop->start();
# Errors handling
$api->command(
'/random/command' => sub {
lib/API/MikroTik.pm view on Meta::CPAN
# subscribe to a command output
my $tag = $api->subscribe('/ping', {address => '127.0.0.1'} => sub {...});
# cancel command after 10 seconds
Mojo::IOLoop->timer(10 => sub { $api->cancel($tag) });
# or with callback
$api->cancel($tag => sub {...});
Cancels background commands. Can accept a callback as last argument.
lib/API/MikroTik.pm view on Meta::CPAN
my $tag = $api->subscribe('/ping',
{address => '127.0.0.1'} => sub {
my ($api, $err, $res) = @_;
});
Mojo::IOLoop->timer(
3 => sub { $api->cancel($tag) }
);
Subscribe to an output of commands with continuous responses such as C<listen> or
C<ping>. Should be terminated with L</cancel>.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/APNS/Agent.pm view on Meta::CPAN
_sent_cache => sub { Cache::LRU->new(size => 10000) },
_queue => sub { [] },
__apns => '_build_apns',
_sent => sub { 0 },
},
rw => [qw/_last_sent_at _disconnect_timer/],
);
sub to_app {
my $self = shift;
lib/APNS/Agent.pm view on Meta::CPAN
private_key => $self->private_key,
sandbox => $self->sandbox,
on_error => sub {
my ($handle, $fatal, $message) = @_;
my $t; $t = AnyEvent->timer(
after => 0,
interval => 10,
cb => sub {
undef $t;
infof "event:reconnect";
lib/APNS/Agent.pm view on Meta::CPAN
);
warnf "event:error\tfatal:$fatal\tmessage:$message";
},
on_connect => sub {
infof "event:on_connect";
$self->_disconnect_timer($self->_build_disconnect_timer);
if (@{$self->_queue}) {
$self->_sending;
}
},
lib/APNS/Agent.pm view on Meta::CPAN
$apns->connect unless $apns->connected;
$apns;
}
sub _connect_to_apns { goto \&_apns }
sub _build_disconnect_timer {
my $self = shift;
if (my $interval = $self->disconnect_interval) {
AnyEvent->timer(
after => $interval,
interval => $interval,
cb => sub {
if ($self->{__apns} && (time - ($self->_last_sent_at || 0) > $interval)) {
delete $self->{__apns};
delete $self->{_disconnect_timer};
infof "event:close apns";
}
},
);
}
lib/APNS/Agent.pm view on Meta::CPAN
}
sub _sending {
my $self = shift;
$self->{_send_timer} ||= AnyEvent->timer(
after => $self->send_interval,
interval => $self->send_interval,
cb => sub {
my $msg = shift @{ $self->_queue };
if ($msg) {
$self->_send(@$msg);
}
else {
delete $self->{_send_timer};
}
},
);
}
lib/APNS/Agent.pm view on Meta::CPAN
};
if (my $err = $@) {
if ($err =~ m!Can't call method "push_write" on an undefined value!) {
# AnyEvent::APNS->handle is missing
delete $self->{_send_timer};
unshift @{ $self->_queue }, [$token, $payload];
$self->_connect_to_apns;
}
else {
die $err;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ASNMTAP/Asnmtap/Applications.pm view on Meta::CPAN
if (pagedir_id == null || pagedir_id == "" || pagedir_id < 0 || pagedir_id > 2) {
pagedir_id = 0;
setPageDirCookie ( 'pagedir_id_${pageDir}_${environment}', '$HTTPSURL/nav/$pagedir', pagedir_id, 365 );
}
timerID = setTimeout("location.href='$HTTPSURL/nav/$pagedir/index" + pagedir_prefix[pagedir_id] + ".html'", $startRefresh);
document.body.style.backgroundImage = 'url($IMAGESURL/startRefresh.gif)';
document.getElementById('refreshID').innerHTML='<A HREF=\"javascript:stopRefresh();\" title=\"Stop Refresh\" alt=\"Stop Refresh\"><img src=\"$IMAGESURL/stop.gif\" WIDTH=\"32\" HEIGHT=\"27\" BORDER=0><\\/A>'
}
function stopRefresh() {
clearTimeout(timerID);
document.body.style.backgroundImage = 'url($IMAGESURL/stopRefresh.gif)';
document.getElementById('refreshID').innerHTML='<A HREF=\"javascript:startRefresh();\" title=\"Start Refresh\" alt=\"Start Refresh\"><img src=\"$IMAGESURL/start.gif\" WIDTH=\"32\" HEIGHT=\"27\" BORDER=0<\\/A>'
}
EndOfHtml
}
view all matches for this distribution
view release on metacpan or search on metacpan
share/AXLSoap.xsd view on Meta::CPAN
<xsd:annotation>
<xsd:documentation>Not used by T1 Ports.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="startDialProtocol" type="axlapi:XStartDialProtocol"/>
<xsd:element name="timers">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="timer" type="xsd:nonNegativeInteger" maxOccurs="6"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="trunk" type="xsd:string"/><!--This field is of the type axl:XTrunk in AXLEnums.xsd-->
<xsd:element name="trunkDirection" type="xsd:string"/><!--This field is of the type axl:XTrunkDirection in AXLEnums.xsd-->
share/AXLSoap.xsd view on Meta::CPAN
<xsd:documentation>The prefix used for park-code retrieval. User will dial prefix plus park code to retrieve a parked call. </xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="reversionPattern" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:documentation>The pattern used to revert the call when the parked call is not retrieved within retrieval timer.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:choice minOccurs="0">
<xsd:annotation>
<xsd:documentation>To be configured only when reversion pattern is not empty.</xsd:documentation>
share/AXLSoap.xsd view on Meta::CPAN
<xsd:element name="name" type="axlapi:String50" nillable="false"/>
<xsd:element name="description" type="axlapi:String100" nillable="true" minOccurs="0"/>
<xsd:element name="defaultTelephonyEventPayloadType" type="xsd:long" default="101" minOccurs="0"/>
<xsd:element name="redirectByApplication" type="xsd:boolean" default="false" minOccurs="0"/>
<xsd:element name="ringing180" type="xsd:boolean" default="false" minOccurs="0"/>
<xsd:element name="timerInvite" type="xsd:long" default="180" minOccurs="0"/>
<xsd:element name="timerRegisterDelta" type="xsd:long" default="5" minOccurs="0"/>
<xsd:element name="timerRegister" type="xsd:long" default="3600" minOccurs="0"/>
<xsd:element name="timerT1" type="xsd:long" default="500" minOccurs="0"/>
<xsd:element name="timerT2" type="xsd:long" default="4000" minOccurs="0"/>
<xsd:element name="retryInvite" type="xsd:long" default="6" minOccurs="0"/>
<xsd:element name="retryNotInvite" type="xsd:long" default="10" minOccurs="0"/>
<xsd:element name="startMediaPort" type="xsd:long" default="16384" minOccurs="0"/>
<xsd:element name="stopMediaPort" type="xsd:long" default="32766" minOccurs="0"/>
<xsd:element name="callpickupURI" type="axlapi:Name128" default="x-cisco-serviceuri-pickup" minOccurs="0"/>
share/AXLSoap.xsd view on Meta::CPAN
<xsd:element name="callHoldRingback" type="axlapi:XZzpreff" default="Off" minOccurs="0"/>
<xsd:element name="anonymousCallBlock" type="axlapi:XZzpreff" default="Off" minOccurs="0"/>
<xsd:element name="callerIdBlock" type="axlapi:XZzpreff" default="Off" minOccurs="0"/>
<xsd:element name="dndControl" type="axlapi:XZzdndcontrol" default="Admin" minOccurs="0"/>
<xsd:element name="telnetLevel" type="axlapi:XTelnetLevel" default="Disabled" minOccurs="0"/>
<xsd:element name="timerKeepAlive" type="xsd:long" default="120" minOccurs="0"/>
<xsd:element name="timerSubscribe" type="xsd:long" default="120" minOccurs="0"/>
<xsd:element name="timerSubscribeDelta" type="xsd:long" default="5" minOccurs="0"/>
<xsd:element name="maxRedirects" type="xsd:long" default="70" minOccurs="0"/>
<xsd:element name="timerOffhookToFirstDigit" type="xsd:long" default="15000" minOccurs="0"/>
<xsd:element name="callForwardURI" type="axlapi:String128" default="x-cisco-serviceuri-cfwdall" minOccurs="0"/>
<xsd:element name="abbreviatedDialURI" type="axlapi:String128" default="x-cisco-serviceuri-abbrdial" minOccurs="0"/>
<xsd:element name="confJoinEnable" type="xsd:boolean" default="true" minOccurs="0"/>
<xsd:element name="rfc2543Hold" type="xsd:boolean" default="false" minOccurs="0"/>
<xsd:element name="semiAttendedTransfer" type="xsd:boolean" default="true" minOccurs="0"/>
share/AXLSoap.xsd view on Meta::CPAN
<xsd:documentation>The new prefix used for park-code retrieval. User will dial prefix plus park code to retrieve a parked call. </xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="reversionPattern" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:documentation>The new pattern used to revert the call when the parked call is not retrieved within retrieval timer. </xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:choice minOccurs="0">
<xsd:annotation>
share/AXLSoap.xsd view on Meta::CPAN
<xsd:element name="newName" type="axlapi:UniqueString255" nillable="false" minOccurs="0"/>
<xsd:element name="description" type="axlapi:String100" nillable="true" minOccurs="0"/>
<xsd:element name="defaultTelephonyEventPayloadType" type="xsd:long" default="101" nillable="false" minOccurs="0"/>
<xsd:element name="redirectByApplication" type="xsd:boolean" default="false" nillable="false" minOccurs="0"/>
<xsd:element name="ringing180" type="xsd:boolean" default="false" nillable="false" minOccurs="0"/>
<xsd:element name="timerInvite" type="xsd:long" default="180" nillable="false" minOccurs="0"/>
<xsd:element name="timerRegisterDelta" type="xsd:long" default="5" nillable="false" minOccurs="0"/>
<xsd:element name="timerRegister" type="xsd:long" default="3600" nillable="false" minOccurs="0"/>
<xsd:element name="timerT1" type="xsd:long" default="500" nillable="false" minOccurs="0"/>
<xsd:element name="timerT2" type="xsd:long" default="4000" nillable="false" minOccurs="0"/>
<xsd:element name="retryInvite" type="xsd:long" default="6" nillable="false" minOccurs="0"/>
<xsd:element name="retryNotInvite" type="xsd:long" default="10" nillable="false" minOccurs="0"/>
<xsd:element name="startMediaPort" type="xsd:long" default="16384" nillable="false" minOccurs="0"/>
<xsd:element name="stopMediaPort" type="xsd:long" default="32766" nillable="false" minOccurs="0"/>
<xsd:element name="callpickupURI" type="axlapi:Name128" default="x-cisco-serviceuri-pickup" nillable="false" minOccurs="0"/>
share/AXLSoap.xsd view on Meta::CPAN
<xsd:element name="callHoldRingback" type="axlapi:XZzpreff" default="Off" nillable="false" minOccurs="0"/>
<xsd:element name="anonymousCallBlock" type="axlapi:XZzpreff" default="Off" nillable="false" minOccurs="0"/>
<xsd:element name="callerIdBlock" type="axlapi:XZzpreff" default="Off" nillable="false" minOccurs="0"/>
<xsd:element name="dndControl" type="axlapi:XZzdndcontrol" default="Admin" nillable="false" minOccurs="0"/>
<xsd:element name="telnetLevel" type="axlapi:XTelnetLevel" default="Disabled" nillable="false" minOccurs="0"/>
<xsd:element name="timerKeepAlive" type="xsd:long" default="120" nillable="false" minOccurs="0"/>
<xsd:element name="timerSubscribe" type="xsd:long" default="120" nillable="false" minOccurs="0"/>
<xsd:element name="timerSubscribeDelta" type="xsd:long" default="5" nillable="false" minOccurs="0"/>
<xsd:element name="maxRedirects" type="xsd:long" default="70" nillable="false" minOccurs="0"/>
<xsd:element name="timerOffhookToFirstDigit" type="xsd:long" default="15000" nillable="false" minOccurs="0"/>
<xsd:element name="callForwardURI" type="axlapi:String128" default="x-cisco-serviceuri-cfwdall" nillable="false" minOccurs="0"/>
<xsd:element name="abbreviatedDialURI" type="axlapi:String128" default="x-cisco-serviceuri-abbrdial" nillable="false" minOccurs="0"/>
<xsd:element name="confJoinEnable" type="xsd:boolean" default="true" nillable="false" minOccurs="0"/>
<xsd:element name="rfc2543Hold" type="xsd:boolean" default="false" nillable="false" minOccurs="0"/>
<xsd:element name="semiAttendedTransfer" type="xsd:boolean" default="true" nillable="false" minOccurs="0"/>
view all matches for this distribution
view release on metacpan or search on metacpan
acelib/aceclientlib.c view on Meta::CPAN
BOOL accessDebug = FALSE ;
#include <signal.h> /* for alarm stuff */
#include <unistd.h> /* for pause() */
#include <sys/time.h> /* for setitimer() etc. */
static void wakeUp (int x)
{
static int sig = 0 ;
acelib/aceclientlib.c view on Meta::CPAN
}
fclose (f) ;
}
{ int i ;
struct itimerval tval ;
signal (SIGALRM, wakeUp) ;
tval.it_interval.tv_sec = 0 ;
tval.it_interval.tv_usec = 5000 ; /* 5ms reload */
tval.it_value.tv_sec = 0 ;
tval.it_value.tv_usec = 1000 ; /* 1ms initial */
setitimer (ITIMER_REAL, &tval, 0) ;
for (i = 0 ; i < 1000 ; ++i) /* 5 seconds */
{ pause () ; /* wait until SIGALRM handled */
f = fopen (name, "r") ;
if (f)
{ if (accessDebug)
printf ("// found %s after %d msecs\n", name, 5*i+1) ;
tval.it_interval.tv_usec = tval.it_value.tv_usec = 0 ;
setitimer (ITIMER_REAL, &tval, 0) ;
return f ;
}
}
if (accessDebug)
printf ("// failed to find %s after %d msecs\n", name, 5*i+1) ;
tval.it_interval.tv_usec = tval.it_value.tv_usec = 0 ;
setitimer (ITIMER_REAL, &tval, 0) ;
}
return 0 ;
}
view all matches for this distribution
view release on metacpan or search on metacpan
fortune/jackbauer view on Meta::CPAN
%
Jack Bauer quit for just five minutes, and a nuclear bomb went off.
%
Nothing can get in between Jack fucking Bauer. Except for the word "fucking".
%
Jack Bauer doesn't own a working watch, he only has a timer that is set on 15 minute intervals. Thus, he always assumes he is running out of time.
%
Jack Bauer doesn't laugh in the face of danger; Jack Bauer is the face of danger.
%
Jack Bauer's first act after being elected as President of the United States will be to add 5 new stars to the U.S. flag: China, North Korea, Iraq, Iran, and France.
%
fortune/jackbauer view on Meta::CPAN
%
Chuck Norris is Jack Bauer's biggest fan.
%
Nothing could get in the middle of Jack Bauer. Not even a middle name.
%
If there was a bomb on a 60 second timer and Jack was handcuffed, he would dial CTU with his nose and disable the bomb with his teeth.
%
Jack Bauer once saw two gay men making out. They immediately turned straight.
%
Jack Bauer gets anal on the first date. No questions asked.
%
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules_ScenarioR/CalculatingDayOfWeek.pm view on Meta::CPAN
## no critic
package Acme::CPANModules_ScenarioR::CalculatingDayOfWeek;
our $VERSION = 0.002; # VERSION
our $results = [[200,"OK",[{_name=>"participant=DateTime",_succinct_name=>"D",errors=>3.8e-08,participant=>"DateTime",pct_faster_vs_slowest=>0,pct_slower_vs_fastest=>80.570996978852,rate=>37000,samples=>24,time=>27},{_name=>"participant=Date::DayOfWe...
1;
# ABSTRACT: List of modules to calculate day of week
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules_ScenarioR/HTMLTable.pm view on Meta::CPAN
## no critic
package Acme::CPANModules_ScenarioR::HTMLTable;
our $VERSION = 0.002; # VERSION
our $results = do{my$var=[[200,"OK",[{_name=>"participant=Text::Table::Manifold",_succinct_name=>"TT:M",errors=>4.9e-05,participant=>"Text::Table::Manifold",pct_faster_vs_slowest=>0,pct_slower_vs_fastest=>6.36903376018626,rate=>15.8,samples=>21,time=...
1;
# ABSTRACT: List of modules that generate HTML tables
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules_ScenarioR/TextTable.pm view on Meta::CPAN
## no critic
package Acme::CPANModules_ScenarioR::TextTable;
our $VERSION = 0.016; # VERSION
our $results = do{my$var=[[200,"OK",[{_name=>"participant=Text::UnicodeBox::Table",_succinct_name=>"Text::UnicodeBox::Table",errors=>0.0024,participant=>"Text::UnicodeBox::Table",pct_faster_vs_slowest=>0,pct_slower_vs_fastest=>365.666666666667,rate=>...
1;
# ABSTRACT: List of modules that generate text tables
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules_ScenarioR/UUID.pm view on Meta::CPAN
## no critic
package Acme::CPANModules_ScenarioR::UUID;
our $VERSION = 0.011; # VERSION
our $results = [[200,"OK",[{_name=>"participant=UUID::Random::Secure::generate",_succinct_name=>"URS:g",errors=>0.0013,participant=>"UUID::Random::Secure::generate",pct_faster_vs_slowest=>0,pct_slower_vs_fastest=>36.5,rate=>30,samples=>22,time=>30},{...
1;
# ABSTRACT: List of modules that can generate immutable universally unique identifier (UUIDs)
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
devdata/https_mojolicious.io_blog_2017_12_21_day-21-virtually-a-lumberjack view on Meta::CPAN
my $instruction = shift @{$self->instructions};
return $self->loop->stop_gracefully unless defined $instruction;
say $instruction->[1];
$self->loop->timer(
$instruction->[0] => sub { $self->instruction_show },
);
$self->loop->timer($instruction->[0] / 2, sub {
my $type = (split / /, $self->instructions->[0][1])[1];
my $file_count = $self->file_count;
my $path = sprintf '%i_%s.pgm', $file_count, uc $type;
$self->file( $self->file_start($path) );
}) if $instruction->[1] eq 'Steady';
devdata/https_mojolicious.io_blog_2017_12_21_day-21-virtually-a-lumberjack view on Meta::CPAN
(much).</p>
<p>Then we need to start walking through this script by adding this before
starting the event loop in <em>main</em>:</p>
<pre><code>$self->loop->timer(0 => sub { $self->instruction_show });
</code></pre>
<p>Running this now prompts the user to move the HMD while outputting the packet
data in an image named after the movement that image represents!</p>
devdata/https_mojolicious.io_blog_2017_12_21_day-21-virtually-a-lumberjack view on Meta::CPAN
<p>(The above has been rotated and flipped, the original image is a thin
"waterfall".)</p>
<p>Some parts are immediately obvious.
Very smooth gradients next to larger smooth blocks or gradients hints at a
high-precision timer, which tend to be 32 bits (4 bytes) wide.
This can be seen at the top of the example.</p>
<p>Other aspects are only noticeable when compared to the other movements.
The simple file format makes it very easy to graph the data with gnuplot.
In the worst/simple case scenario, you can simply graph at each offset and
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/DependOnEverything.pm view on Meta::CPAN
use BSD::arcrandom;
use BSD::devstat;
use BSD::Getfsent;
use BSD::getloadavg;
use BSD::Ipfwgen;
use BSD::Itimer;
use BSD::Jail;
use BSD::Jail::Object;
use BSD::Process;
use BSD::Process::Affinity;
use BSD::Resource;
lib/Acme/DependOnEverything.pm view on Meta::CPAN
use SMS::Send::DE::Sipgate;
use SMS::Send::DeviceGsm;
use SMS::Send::DistributeSMS;
use SMS::Send::Driver::WebService;
use SMS::Send::Fr::OVH;
use SMS::Send::Iletimerkezi;
use SMS::Send::IN::eSMS;
use SMS::Send::IN::Unicel;
use SMS::Send::Kannel::SMSbox;
use SMS::Send::KR::APIStore;
use SMS::Send::KR::CoolSMS;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/FishFarm.pm view on Meta::CPAN
=cut
sub check_feeder {
my ( $feeder, $verbose ) = @_;
if ( $feeder->timer_is_up ) {
print "Timer is up, time to feed the fish!\n";
if ( $verbose) {
$feeder->feed_fish( verbose => 1 );
} else {
view all matches for this distribution
view release on metacpan or search on metacpan
eg/ghost_ae.pl view on Meta::CPAN
sub startup {
my $self = shift;
my $quit = AnyEvent->condvar;
my $i = 0;
# Create watcher timer
my $watcher = AnyEvent->timer (after => 1, interval => 1, cb => sub {
$quit->send unless $self->ok;
});
# Create process timer
my $timer = AnyEvent->timer(after => 3, interval => 3, cb => sub {
$self->log->info("Tick! " . ++$i);
$quit->send if $i >= 10;
});
$self->log->debug("Start AnyEvent");
view all matches for this distribution
view release on metacpan or search on metacpan
}
# Get OpenGL Info
print "\n";
print PROGRAM_TITLE;
print ' (using hires timer)' if ($hasHires);
print "\n\n";
my $version = glGetString(GL_VERSION);
my $vendor = glGetString(GL_VENDOR);
my $renderer = glGetString(GL_RENDERER);
print "Using POGL v$Acme::MITHALDU::BleedingOpenGL::BUILD_VERSION\n";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MUDLike.pm view on Meta::CPAN
jQuery.safariTimer = setInterval(function(){
// loaded and complete are both valid states
if ( document.readyState == "loaded" ||
document.readyState == "complete" ) {
// If either one are found, remove the timer
clearInterval( jQuery.safariTimer );
jQuery.safariTimer = null;
// and execute any waiting functions
jQuery.ready();
lib/Acme/MUDLike.pm view on Meta::CPAN
z.custom = function(from,to){
z.startTime = (new Date()).getTime();
z.now = from;
z.a();
z.timer = setInterval(function(){
z.step(from, to);
}, 13);
};
// Simple 'show' function
lib/Acme/MUDLike.pm view on Meta::CPAN
// Each step of an animation
z.step = function(firstNum, lastNum){
var t = (new Date()).getTime();
if (t > options.duration + z.startTime) {
// Stop the timer
clearInterval(z.timer);
z.timer = null;
z.now = lastNum;
z.a();
if (elem.curAnim) elem.curAnim[ prop ] = true;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MetaSyntactic/metro.pm view on Meta::CPAN
Whitechapel Stepney_Green Mile_End Bow_Road Bromley_by_Bow West_Ham
Plaistow Upton Park East Ham Barking Upney Becontree Dagenham_Heathway
Dagenham_East Elm_Park Hornchurch Upminster_Bridge Upminster
High_Street_Kensington Notting_Hill_Gate Bayswater Paddington Edgware_Road
# names uk london hammersmith_and_city_line
Hammersmith Goldhawk_Road Shepherd_s_Bush Latimer_Road Ladbroke_Grove
Westbourne_Park Royal_Oak Paddington Edgware_Road Baker_Street
Great_Portland_Street Euston_Square King_s_Cross_St_Pancras Farringdon
Barbican Moorgate Liverpool_Street Aldgate_East Whitechapel Stepney_Green
Mile_End Bow_Road Bromley_by_Bow West_Ham Plaistow Upton_Park East_Ham Barking
# names uk london jubilee_line
lib/Acme/MetaSyntactic/metro.pm view on Meta::CPAN
Aldgate Liverpool_Street Moorgate Barbican Farringdon King_s_Cross_St_Pancras
Euston_Square Great_Portland_Street Baker_Street Finchley_Road Wembley_Park
Preston_Road Northwick_Park Harrow_on_the_Hill West_Harrow Rayners_Lane
Eastcote Ruislip_Manor Ruislip Ickenham Hillingdon Uxbridge North_Harrow
Pinner Northwood_Hills Northwood Moor_Park Croxley Watford Rickmansworth
Chorleywood Chalfont_Latimer Chesham Amersham
# names uk london northern_line
High_Barnet Totteridge_and_Whetstone Woodside_Park West_Finchley
Mill_Hill_East Finchley_Central East_Finchley Highgate Archway
Tufnell_Park Kentish_Town Edgware Burnt_Oak Colindale Hendon_Central
Brent_Cross Golders_Green Hampstead Belsize_Park Chalk_Farm Camden_Town
view all matches for this distribution
view release on metacpan or search on metacpan
devdata/article.html view on Meta::CPAN
jQuery( '#comment-form-identity' ).hide();
jQuery( '#comment-form-subscribe' ).hide();
jQuery( '#commentform .form-submit' ).hide();
comment.css( { 'height':'10px' } ).one( 'focus', function() {
var timer = setInterval( HighlanderComments.resizeCallback, 10 )
jQuery( this ).animate( { 'height': HighlanderComments.initialHeight } ).delay( 100 ).queue( function(n) { clearInterval( timer ); HighlanderComments.resizeCallback(); n(); } );
jQuery( '#comment-form-identity' ).slideDown();
jQuery( '#comment-form-subscribe' ).slideDown();
jQuery( '#commentform .form-submit' ).slideDown();
});
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/POE/Tree.pm view on Meta::CPAN
$heap->{color_star} = COLOR_PAIR(@light_colors + 4);
# Start the star cycle.
$heap->{star_cycle} = 0;
# Start the star and light timers.
$kernel->delay("light_cycle", $self->{light_delay});
$kernel->delay("star_cycle", $self->{star_delay});
# Run until an automatic cutoff time has elapsed.
$kernel->delay("shut_down", $self->{run_for}) if $self->{run_for};
lib/Acme/POE/Tree.pm view on Meta::CPAN
do_refresh($heap);
$kernel->delay("star_cycle", $self->{star_delay});
}
# Grow a new tree. Returns a list of lights to be cycled by timers
# later.
sub grow_tree {
my $heap = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Sort/Sleep.pm view on Meta::CPAN
# ABSTRACT: IO::Async timer based sorting algorithm
package Acme::Sort::Sleep;
use strict;
use warnings;
lib/Acme/Sort/Sleep.pm view on Meta::CPAN
# only allow positive numbers
die ERROR_STR unless defined $num;
die ERROR_STR unless looks_like_number $num;
die ERROR_STR unless $num >= 0;
my $timer = IO::Async::Timer::Countdown->new(
delay => $num,
remove_on_expire => 1,
on_expire => sub {
push @sorted, $num;
# no more timers/numbers left to sort
$loop->stop unless $loop->notifiers;
},
);
$timer->start;
$loop->add( $timer );
}
$loop->run;
return @sorted;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/State.pm view on Meta::CPAN
__END__
scraps...
async {
my $timer = Coro::Event->timer( interval => 2, );
my $last_save_time = time;
# my $mod_time = -M __FILE__;
while(1) {
$timer->next;
if(time - $last_save_time > 60*15) {
$save_db->();
$last_save_time = time;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Activator/DB.pm view on Meta::CPAN
return $self;
}
sub _init {
my ( $self ) = @_;
$self->_start_timer();
my $setup = Activator::Registry->get( 'Activator::DB' );
if (!keys %$setup ) {
$setup = Activator::Registry->get( 'Activator->DB' );
if (!keys %$setup ) {
Activator::Exception::DB->throw( 'activator_db_config', 'missing', 'You must define the key "Activator::DB" or "Activator->DB" in your project configuration' );
lib/Activator/DB.pm view on Meta::CPAN
sub _fetch {
my ( $fn, $pkg, $sql, $bindref, %args ) = @_;
my ( $self, $bind, $attr ) = $pkg->_explode( $bindref, \%args );
$self->_start_timer();
my $conn = $self->_get_cur_conn();
my ( $sth, $e );
try eval {
lib/Activator/DB.pm view on Meta::CPAN
sub do_id {
my ( $pkg, $sql, $bindref, %args ) = @_;
my ( $self, $bind, $attr ) = $pkg->_explode( $bindref, \%args );
my $conn = $self->_get_cur_conn();
$self->_start_timer();
my $res;
try eval {
$res = $self->_get_sth( $sql, $bind, $attr, 'want_exec_result' );
};
lib/Activator/DB.pm view on Meta::CPAN
sub do {
my ( $pkg, $sql, $bindref, %args ) = @_;
my ( $self, $bind, $attr, $alt_error ) = $pkg->_explode( $bindref, \%args );
my $conn = $self->_get_cur_conn();
$self->_start_timer();
my $res;
try eval {
$res = $conn->{dbh}->do( $sql, $attr, @$bind );
};
lib/Activator/DB.pm view on Meta::CPAN
sub as_string {
my ( $pkg, $sql, $bind ) = @_;
return Activator::DB->_get_sql( $sql, $bind );
}
sub _start_timer {
my ( $self ) = @_;
$self->{debug_timer} = [gettimeofday];
}
sub _debug_sql {
my ( $self, $depth, $sql, $bind, $args ) = @_;
lib/Activator/DB.pm view on Meta::CPAN
$self->{config}->{debug} ||
$conn->{config}->{debug} ) {
local $Log::Log4perl::caller_depth;
$Log::Log4perl::caller_depth += $depth;
my $str = $self->_get_sql( $sql, $bind );
DEBUG( tv_interval( $self->{debug_timer}, [ gettimeofday ] ). " $str".
( $self->{config}->{debug_attr} ? "\n\t" .
Data::Dumper->Dump( [ $conn->{attr} ], [ 'attr' ] ) : '' )
);
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Activiti/Rest/Client.pm view on Meta::CPAN
}
);
Activiti::Rest::Response->from_http_response($res);
}
sub timer_jobs {
my($self,%args)=@_;
my $res = $self->ua->request(
path => "/management/timer-jobs",
params => \%args,
method => "GET"
);
Activiti::Rest::Response->from_http_response($res);
}
sub timer_job {
my($self,%args)=@_;
my $res = $self->ua->request(
path => "/management/timer-jobs/".uri_escape($args{jobId}),
params => {},
method => "GET"
);
Activiti::Rest::Response->from_http_response($res);
}
sub execute_timer_job {
my($self,%args)=@_;
my $res = $self->ua->request(
path => "/management/timer-jobs/".uri_escape($args{jobId}),
params => {},
method => "POST",
headers => {
'Content-Type' => "application/json",
Content => encode_json({ action => "move" })
view all matches for this distribution
view release on metacpan or search on metacpan
public/vendor/pagedown/Markdown.Editor.js view on Meta::CPAN
var undoObj = this;
var undoStack = []; // A stack of undo states
var stackPtr = 0; // The index of the current state
var mode = "none";
var lastState; // The last state
var timer; // The setTimeout handle for cancelling the timer
var inputStateObj;
// Set the mode for later logic steps.
var setMode = function (newMode, noSave) {
if (mode != newMode) {
public/vendor/pagedown/Markdown.Editor.js view on Meta::CPAN
saveState();
}
}
if (!uaSniffed.isIE || mode != "moving") {
timer = setTimeout(refreshState, 1);
}
else {
inputStateObj = null;
}
};
var refreshState = function (isInitialState) {
inputStateObj = new TextareaState(panels, isInitialState);
timer = undefined;
};
this.setCommandMode = function () {
mode = "command";
saveState();
timer = setTimeout(refreshState, 0);
};
this.canUndo = function () {
return stackPtr > 1;
};
public/vendor/pagedown/Markdown.Editor.js view on Meta::CPAN
}
});
var handlePaste = function () {
if (uaSniffed.isIE || (inputStateObj && inputStateObj.text != panels.input.value)) {
if (timer == undefined) {
mode = "paste";
saveState();
refreshState();
}
}
view all matches for this distribution