view release on metacpan or search on metacpan
lib/AI/TensorFlow/Libtensorflow/ApiDefMap.pm view on Meta::CPAN
my $api_def_buf = $map->Get(
'NoOp',
my $status = AI::TensorFlow::Libtensorflow::Status->New
);
cmp_ok $api_def_buf->length, '>', 0, 'Got ApiDef buffer for NoOp operation';
B<Parameters>
=over 4
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AI/XGBoost/CAPI/RAW.pm view on Meta::CPAN
index set
=item len
length of index set
=item out
a sliced new matrix
lib/AI/XGBoost/CAPI/RAW.pm view on Meta::CPAN
pointer to float vector
=item len
length of array
=back
=head2 XGDMatrixSetUIntInfo
lib/AI/XGBoost/CAPI/RAW.pm view on Meta::CPAN
pointer to unsigned int vector
=item len
length of array
=back
=head2 XGDMatrixSetGroup
lib/AI/XGBoost/CAPI/RAW.pm view on Meta::CPAN
pointer to group size
=item len
length of the array
=back
=head2 XGDMatrixGetFloatInfo
lib/AI/XGBoost/CAPI/RAW.pm view on Meta::CPAN
field name
=item out_len
used to set result length
=item out_dptr
pointer to the result
lib/AI/XGBoost/CAPI/RAW.pm view on Meta::CPAN
field name
=item out_len
The length of the field
=item out_dptr
pointer to the result
lib/AI/XGBoost/CAPI/RAW.pm view on Meta::CPAN
matrices that are set to be cached
=item len
length of dmats
=item out
handle to the result booster
lib/AI/XGBoost/CAPI/RAW.pm view on Meta::CPAN
second order gradinet statistics
=item len
length of grad/hess array
=back
=head2 XGBoosterUpdateOneIter
lib/AI/XGBoost/CAPI/RAW.pm view on Meta::CPAN
limit number of trees used for prediction, this is only valid for boosted trees
when the parameter is set to 0, we will use all the trees
=item out_len
used to store length of returning result
=item out_result
used to set a pointer to array
view all matches for this distribution
view release on metacpan or search on metacpan
ck_fun|||
ck_glob|||
ck_grep|||
ck_index|||
ck_join|||
ck_lengthconst|||
ck_lfun|||
ck_listiob|||
ck_match|||
ck_method|||
ck_null|||
mg_copy|||
mg_dup|||
mg_find|||
mg_free|||
mg_get|||
mg_length||5.005000|
mg_localize|||
mg_magical|||
mg_set|||
mg_size||5.005000|
mini_mktime||5.007002|
utf16_to_utf8_reversed||5.006001|
utf16_to_utf8||5.006001|
utf16rev_textfilter|||
utf8_distance||5.006000|
utf8_hop||5.006000|
utf8_length||5.007001|
utf8_mg_pos_init|||
utf8_mg_pos|||
utf8_to_bytes||5.006001|
utf8_to_uvchr||5.007001|
utf8_to_uvuni||5.007001|
if (exists $opt{'list-unsupported'}) {
my $f;
for $f (sort { lc $a cmp lc $b } keys %API) {
next unless $API{$f}{todo};
print "$f ", '.'x(40-length($f)), " ", format_version($API{$f}{todo}), "\n";
}
exit 0;
}
# Scan for possible replacement candidates
? ((len) ? newSVpv((data), (len)) : newSVpv("", 0)) \
: newSV(0))
#endif
/* Hint: gv_stashpvn
* This function's backport doesn't support the length parameter, but
* rather ignores it. Portability can only be ensured if the length
* parameter is used for speed reasons, but the length can always be
* correctly computed from the string argument.
*/
#ifndef gv_stashpvn
# define gv_stashpvn(str,len,create) gv_stashpv(str,create)
#endif
view all matches for this distribution
view release on metacpan or search on metacpan
$suffix = 2;
};
$ENV{QUERY_STRING}eq'AIS_INITIAL2'and goto NOCOO;
($Coo = localtime) =~ s/\W//g;
my @chars = 'A'..'Z' ;
substr($Coo, rand(length $Coo), 1) = $chars[rand @chars]
foreach 1..8;
print "X-Ais-Received-Request-Method: $ENV{REQUEST_METHOD}\n";
print "X-Ais-Received-Query-String: $ENV{QUERY_STRING}\n";
$Sessions{$Coo}->{QueryString} = $ENV{QUERY_STRING};
$ENV{REQUEST_METHOD} =~ /POST/i and
view all matches for this distribution
view release on metacpan or search on metacpan
if (hv_store(hv, #name, sizeof(#name)-1, sv, 0) == NULL) {\
warn("__FILE__:__LINE__ failed to pack '" #name "' elem");\
}\
/* pack the string starting at p->name into hash hv
* using key "name", string length in len (calculated if len == 0)
*/
#define PACK_PV(name, len) \
sv = newSVpv(p->name, len);\
if (hv_store(hv, #name, sizeof(#name)-1, sv, 0) == NULL) {\
warn("__FILE__:__LINE__ failed to pack '" #name "' elem");\
view all matches for this distribution
view release on metacpan or search on metacpan
lib/LiteratureBasedDiscovery/Rank.pm view on Meta::CPAN
my $cSum = 0;
foreach my $key (keys ${$aVectorRef}) {
$cSum += ($key*$key);
}
#find the denominator, which is the product of A and C lengths
my $denom = sqrt($aSum)*sqrt($cSum);
#set the score (maximum score seen for that C term)
my $score = -1;
if ($denom != 0) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ALPM/Conf.pm view on Meta::CPAN
{
my($path, $hooks) = @_;
sub {
local $_ = shift;
s/^\s+//; s/\s+$//; # trim whitespace
return unless(length);
# Call the appropriate hook for each type of token...
if(/$COMMENT_MATCH/){
;
}elsif(/$SECTION_MATCH/){
$hooks->{'section'}->($1);
}elsif(/$FIELD_MATCH/){
my($name, $val) = ($1, $2);
if(length $val){
my $apply = $hooks->{'field'}{$name};
$apply->($val) if($apply);
}
}else{
die "Invalid line in config file, not a comment, section, or field\n";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AMF/Connection.pm view on Meta::CPAN
eval {
$uniqueid = substr(Digest::MD5::md5_hex(Digest::MD5::md5_hex(time(). {}. rand(). $$)), 0, 32);
};
} else {
$uniqueid ="";
my $length=16;
my $j;
for(my $i=0 ; $i< $length ;) {
$j = chr(int(rand(127)));
if($j =~ /[a-zA-Z0-9]/) {
$uniqueid .=$j;
$i++;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AMF/Perl.pm view on Meta::CPAN
sub output
{
my ($self, $response) = @_;
my $resLength = length $response;
if($ENV{MOD_PERL})
{
my $MP2 = ($mod_perl::VERSION >= 1.99);
my $r = Apache->request();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AMPR/Rip44.pm view on Meta::CPAN
}
=head2 mask2prefix
Convert a netmask (in integer form) to the corresponding prefix length,
and validate it too. This is a bit ugly, optimizations are welcome.
=cut
sub mask2prefix ($) {
view all matches for this distribution
view release on metacpan or search on metacpan
examples/git.pl view on Meta::CPAN
my @order = sort { $commit_count{$b} <=> $commit_count{$a} } keys %commit_count;
@order = splice @order, 0, $LIMIT;
my %header = map { $_ => "$_ (" . $commit_count{$_} . ")" } @order;
my @hdrlens = map { length $_ } values %header;
my $hdrwidth = max(@hdrlens);
my $colwidth = max($hdrwidth, 24) + 2;
my $pad = ' ' x ($colwidth - 24);
binmode STDOUT, ':utf8';
view all matches for this distribution
view release on metacpan or search on metacpan
return $buffer;
}
sub send {
my ($self, $chan, $data, $length) = @_;
my $buffer;
my $format;
if (!$length) {
$length = length($data);
}
if ($chan == $SFLAP_DATA) {
$format = "cCnna*C";
$length ++;
} else {
$format = "cCnna*";
}
$self->{sequence} ++;
$buffer = pack($format, 42, $chan, $self->{sequence},
$length, $data, 0);
($id, $ch, $seq, $len, $data, $nuller) = unpack($format, $buffer);
$foo = CORE::syswrite($self->{fd}, $buffer, $length + 6);
$self->debug("sflap send ($self->{fd}) $foo chan = $ch seq = $seq len = $len data = $data\n");
}
sub write {
my ($self, $buffer, $len, $noflap) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/CLI/App/Spec.pm view on Meta::CPAN
summary => "\U$method\E call",
subcommands => {},
};
my $desc = $config->{description};
$desc =~ s/\n.*//s;
if (length $desc > 30) {
$desc = substr($desc, 0, 50) . '...';
}
my $subcmd = $apicall->{subcommands}->{ $path } ||= {
summary => $desc,
parameters => \@parameters,
view all matches for this distribution
view release on metacpan or search on metacpan
examples/edw/Rest.pl view on Meta::CPAN
site => $site,
query => $query
);
# get local IP
if ( !defined $h_setup{ip} || !length $h_setup{ip} ) {
my $response = HTTP::Tiny->new->get('http://monip.org/');
unless ( $response->{success} ) {
print STDERR "\tunable to reach external network to get IP address.\n";
exit(1);
}
($h_setup{ip}) = ($response->{content} =~ /IP\s:\s(\d+\.\d+\.\d+\.\d+)/gm);
}
foreach my $p ( qw/ grid ip token site query / ) {
if ( !defined $h_setup{$p} || !length $h_setup{$p} ) {
print STDERR "\tmissing $p parameter, check help.\n";
exit(1);
}
}
delete $h_setup{$_} for ( qw/ site query / );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/Handle.pm view on Meta::CPAN
return $data;
}
sub _bytes {
my ( $self, $data ) = @_;
return length $data;
}
# A method that will let us write readable requests insteadOfCamelCase.
# Helpful for Google SOAP APIs. See ./t/02-google-dfp.t for example.
sub _camelize {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/INSEE/Sirene.pm view on Meta::CPAN
This constant is set to 1000 results.
=head2 MAX_SIREN_LENGTH
A SIREN number has a maximum length of 9 digits.
=head2 MAX_SIRET_LENGTH
A SIREN number has a maximum length of 14 digits.
=head2 MIN_LENGTH
In order to avoid useless requests with too short SIREN/SIRET numbers, the module requires at least 3 digits to allow you performing a search.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/MikroTik.pm view on Meta::CPAN
}
sub _read {
my ($self, $loop, $bytes) = @_;
warn "-- read bytes from socket: " . (length $bytes) . "\n" if DEBUG;
my $response = $self->{responses}{$loop} ||= API::MikroTik::Response->new();
my $data = $response->parse(\$bytes);
for (@$data) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/Octopart.pm view on Meta::CPAN
'specs' => {
'case_package' => '0805',
'composition' => 'Thick Film',
'contactplating' => 'Tin',
'leadfree' => 'Lead Free',
'length' => '2mm',
'numberofpins' => '2',
'radiationhardening' => 'No',
'reachsvhc' => 'No SVHC',
'resistance' =>
"10k\x{ce}\x{a9}", # <- That is an Ohm symbol
view all matches for this distribution
view release on metacpan or search on metacpan
lib/APISchema/Generator/Markdown/ExampleFormatter.pm view on Meta::CPAN
return ref $example ? json($example) : $example;
}
sub header_and_body {
my ($self) = @_;
join("\n", grep { defined $_ && length $_ > 0 } $self->header, $self->body);
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/APNS/Agent.pm view on Meta::CPAN
};
my $body = encode_json($result);
return [200, [
'Content-Type' => 'application/json; charset=utf-8',
'Content-Length' => length($body),
], [$body]];
}
sub _build_apns {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
$request =
HTTP::Request->new( $method, $uri, new HTTP::Headers, $req_body );
$request->authorization_basic( $username, $password )
if ( $username && $password );
$request->content_type($req_content_type);
$request->content_length( length($req_body) );
}
print STDERR "Executing Test case $count => $tc->{test_case}";
print $fh "Executing Test case $count => $tc->{test_case}";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
$s =~ s/(\.)(\d{1,3})/sprintf("$1%03d",$2)/eg;
}
$s =~ s/^(\d+)\.?//;
my $l = $1 || 0;
my @v = map {
$_ . '0' x (3 - length $_)
} $s =~ /(\d{1,3})\D?/g;
$l = $l . '.' . join '', @v if @v;
return $l + 0;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/APR/HTTP/Headers/Compat/MagicArray.pm view on Meta::CPAN
unshift @{ $self->{a} }, @list;
$self->_sync;
}
sub SPLICE {
my ( $self, $offset, $length, @list ) = @_;
splice @{ $self->{a} }, $offset, $length, @list;
$self->_sync;
}
sub EXISTS {
my ( $self, $key ) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Arc/Command/Test.pm view on Meta::CPAN
my $this = shift;
print "Command line arguments: ", join("|",@_),"\n" if @_;
while ($_ = <STDIN>) {
my $y = length($_)/2;
print substr($_,(length($_)-$y)/2,$y),"\n";
}
return 1;
}
view all matches for this distribution
view release on metacpan or search on metacpan
examples/generate_fid_hash.pl view on Meta::CPAN
my $sql = qq{select
f.fieldName,
f.fieldID,
decode(FOption, 1, 'Required ', 2, 'Optional ', 3, 'System RO', '*Unknown*'),
decode(datatype, 0, 'AR_DATA_TYPE_NULL', 1, 'AR_DATA_TYPE_KEYWORD', 2, 'AR_DATA_TYPE_INTEGER', 3, 'AR_DATA_TYPE_REAL', 4, 'AR_DATA_TYPE_CHAR', 5, 'AR_DATA_TYPE_DIARY', 6, 'AR_DATA_TYPE_ENUM', 7, 'AR_DATA_TYPE_TIME', 8, 'AR_DATA_TYPE_BITMASK', 9, 'AR_...
c.maxlength
from arschema a
join field f
on f.schemaid = a.schemaid and datatype < 30 and f.fieldID != 15
left outer join field_char c
on c.schemaid = f.schemaid and c.fieldid = f.fieldID
examples/generate_fid_hash.pl view on Meta::CPAN
# Check size and replace spaces with '_', you could also remove them!
my $max_len = 0;
foreach my $row (@{ $m->{rows} })
{
$row->[0] =~ s/\s+/_/gms;
if (length($row->[0]) > $max_len)
{
$max_len = length($row->[0]);
}
}
# Construct the hash
my $fid_hash = "# Label/FID hash for form '$form'\n\%fid = (\n";
foreach my $row (@{ $m->{rows} })
{
$fid_hash .= sprintf(" '%s'%s=> %10d,\t\t# %s type=%s %d\n", $row->[0], ' ' x ($max_len + 1 - length($row->[0])), $row->[1], $row->[2], $row->[3], $row->[4]);
}
$fid_hash .= " );\n";
$CLIP->Set($fid_hash);
print "$fid_hash\nFormatted data copied to clipboard\n";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ARSObject.pm view on Meta::CPAN
sub sqlnesc { # SQL name escaping, default for '-sqlname', '-sqlntbl', '-sqlncol'
my $v =lc($_[1]); # (self, name) -> escaped
$v =~s/[^a-zA-Z0-9_]/_/g;
$v =substr($v,0,64) if length($v) >64;
$v
}
sub sqlninc { # SQL name incrementing, default for '-sqlninc'
lib/ARSObject.pm view on Meta::CPAN
else {
($n, $nn) =$v =~/^(.+?)_([A-Z]+)$/ ? ($1, $2) : ($v, '');
$nn ='_' .(!$nn ? 'A' : substr($nn,-1,1) eq 'Z' ? $nn .'A' : (substr($nn,0,-1) .chr(ord(substr($nn,-1,1)) +1)));
}
$v =$n .$nn;
length($v) >64 ? substr($n, 0, 64 -length($nn)) .$nn : $v
}
sub sqlname { # SQL name from ARS name
# (formName, ?fieldName, ?force update meta) -> SQL name
lib/ARSObject.pm view on Meta::CPAN
? (TYPE_NAME => 'float')
: $ffh->{dataType} eq 'decimal'
? (TYPE_NAME => $ffh->{dataType}
, $flh
? ($flh->{precision} ? (DECIMAL_DIGITS => $flh->{precision}) : ()
,$flh->{rangeHigh} ? (COLUMN_SIZE => length($flh->{rangeHigh})) : ()
)
: ()
)
: $ffh->{dataType} eq 'char'
&& (!$flh || !$flh->{maxLength} || ($flh->{maxLength} >255))
lib/ARSObject.pm view on Meta::CPAN
? &{$s->{-metaid}->{$ff->{fieldId}}->{strOut}}($s,$f,$s->{-metaid}->{$ff->{fieldId}},$_=$a{$k})
: strOut($s, $f, $ff->{fieldId},$_=$a{$k})
if $s->{-strFields};
}
if ($f eq 'HPD:Help Desk') {
if ($a{'Incident Number'} && (length($a{'Incident Number'}) ==1)) {
$a{'Incident Number'} =$s->entryIns(-form=>'HPD:CFG Ticket Num Generator', 'DataTags'=>'za')
}
elsif (defined($a{'Incident Number'}) && !$a{'Incident Number'}) {
delete $a{'Incident Number'}
}
lib/ARSObject.pm view on Meta::CPAN
} keys %a;
delete $s->{-entryNo};
if ($f eq 'HPD:Help Desk') {
my $ii=schdn($s,$f,'Incident Number')->{fieldId};
$a{$ii} =$s->entryIns(-form=>'HPD:CFG Ticket Num Generator', 'DataTags'=>'za')
if length($a{$ii}) <2;
$s->{-entryNo} =$a{$ii};
$r =ARS::ars_CreateEntry($s->{-ctrl}, $f, %a)
}
else {
$r =$s->{-entryNo} =ARS::ars_CreateEntry($s->{-ctrl}, $f, %a)
lib/ARSObject.pm view on Meta::CPAN
return($s->entryUpd(-form=>$f, -id=>$a{-id}
, exists($a{-echo}) ? (-echo=>$a{-echo}) : ()
, $a{-field}
, {$a{-file}
? ('file'=>$a{-file}, 'size'=> -s $a{-file})
: ('buffer'=>$a{-set}, 'size'=> length($a{-set}))
}))
}
else {
my $r =ARS::ars_GetEntryBLOB($s->{-ctrl}, $f, $a{-id}
,$a{-field} =~/^\d+$/ ? $a{-field} : schdn($s,$f,$a{-field})->{fieldId}
lib/ARSObject.pm view on Meta::CPAN
$rd->{$f->{COLUMN_NAME}} =$1
if defined($rd->{$f->{COLUMN_NAME}})
&& ($f->{TYPE_NAME} =~/^(?:datetime|float)$/)
&& ($rd->{$f->{COLUMN_NAME}}=~/^(.+)\.0+$/);
$rd->{$f->{COLUMN_NAME}} =defined($ra->{$f->{fieldName}}) && ($ra->{$f->{fieldName}} =~/\.(\d+)$/)
? sprintf('%.' .length($1) .'f', $rd->{$f->{COLUMN_NAME}})
: $rd->{$f->{COLUMN_NAME}} =~/^(.+)\.0+$/
? $1
: $rd->{$f->{COLUMN_NAME}}
if $ra
&& ($f->{TYPE_NAME} eq 'float')
lib/ARSObject.pm view on Meta::CPAN
if $rd
&& defined($rd->{$f->{COLUMN_NAME}})
&& ($f->{TYPE_NAME} =~/^(?:datetime|float)$/)
&& ($rd->{$f->{COLUMN_NAME}}=~/^(.+)\.0+$/);
$rd->{$f->{COLUMN_NAME}} =defined($rw->{$f->{fieldName}}) && ($rw->{$f->{fieldName}} =~/\.(\d+)$/)
? sprintf('%.' .length($1) .'f', $rd->{$f->{COLUMN_NAME}})
: $rd->{$f->{COLUMN_NAME}} =~/^(.+)\.0+$/
? $1
: $rd->{$f->{COLUMN_NAME}}
if $rd
&& defined($rd->{$f->{COLUMN_NAME}})
lib/ARSObject.pm view on Meta::CPAN
sub cgiselect { # CGI selection field composition
# -onchange=>1 reloads form
my ($s, %a) =@_;
my $cs =$a{-onchange} && (length($a{-onchange}) ==1);
($cs
? '<input type="hidden" name="' .$a{-name} .'__C_" value="" />'
: '')
.$s->{-cgi}->popup_menu(%a
, $a{-labels} && !$a{-values}
lib/ARSObject.pm view on Meta::CPAN
? "if (String.fromCharCode($ek) ==\"\\r\") {${n}__S_.focus(); ${n}__S_.click(); return(true)}; k=window.document.forms[0].$n.value +String.fromCharCode($ek);"
: $_[0] eq '1' # onkeypess - list -> input (first char)
? "if (String.fromCharCode($ek) ==\"\\r\") {${n}__S_.focus(); ${n}__S_.click(); return(true)}; window.document.forms[0].$n.focus(); k=window.document.forms[0].$n.value =String.fromCharCode($ek); "
: $_[0] eq '2' # onkeypess - list -> prompt (selected char)
# ? "k=prompt('Enter search string',String.fromCharCode($ek));"
? "if (String.fromCharCode($ek) ==\"\\r\") {${n}__S_.focus(); ${n}__S_.click(); return(true)}; k =String.fromCharCode($ek); for (var i=0; i <l.length; ++i) {if (l.options.item(i).value.toLowerCase().indexOf(k)==0 || l.options.item(i).text....
: $_[0] eq '3' # button - '..'
? "k=prompt('Enter search substring',''); $nl.focus();"
: $_[0] eq '4' # onload - document
? "k=window.document.forms[0].$n.value; window.document.forms[0].$nl.focus();"
: ''
)
.'if(k){'
.'k=k.toLowerCase();'
.'for (var i=0; i <l.length; ++i) {'
.($_[0] eq '4'
? 'if (l.options.item(i).value.toLowerCase() ==k){'
: $s->{-cgi}->user_agent('MSIE')
? "if (l.options.item(i).innerText !='' ? l.options.item(i).innerText.toLowerCase().indexOf(k)"
.($_[0] eq '3' ?'>=' :'==') .'0 : l.options.item(i).value.toLowerCase().indexOf(k)'
lib/ARSObject.pm view on Meta::CPAN
.$s->{-cgi}->textfield((map {defined($_) && defined($a{$_})
? ($_ => $a{$_})
: $a{-textfield} && $a{-textfield}->{$_} && !$s->{-cgi}->param("${n}__O_")
? ($_ => $a{-textfield}->{$_})
: ()
} qw(-name -title -class -style -size -maxlength))
, -default=>$v
, -override=>1
, ($a{-strict} && !$s->{-cgi}->param("${n}__O_")
? (-readonly=>1) # ,-hidefocus=>0, -disabled=>0
: ())
lib/ARSObject.pm view on Meta::CPAN
.' value="' .$s->{-cgi}->escapeHTML(defined($_) ? $_ : '') .'">'
.$s->{-cgi}->escapeHTML(
!defined($_)
? ''
: !$a{-labels}
? (length($_) > $aw ? substr($_,0,$aw) .'...' : $_)
: defined($a{-labels}->{$_})
? (length($a{-labels}->{$_}) > $aw ? substr($a{-labels}->{$_},0,$aw) .'...' : $a{-labels}->{$_})
: '') ."</option>\n"
} @{&$av()})
."</select>\n"
."<input type=\"submit\" name=\"${n}__S_\" value=\"<\" title=\"set\"$ac$as />"
.$s->{-cgi}->button(-value=>'...', -title=>'find', -onClick=>&$fs(3))
lib/ARSObject.pm view on Meta::CPAN
defined($v) ? ($_=>$v) : ()} qw(-values -labels -onchange -readonly -disabled -class -style))
: $f->{-rows}
? $s->cgitext(-name=>$f->{-namecgi}, -title=>$f->{-namecmt}
, -id => $f->{-namecgi}
, map { my $v =ref($f->{$_}) eq 'CODE' ? &{$f->{$_}}($s, $f, cfpvv($s, $f), cfpvp($s, $f)) : $f->{$_};
defined($v) ? ($_=>$v) : ()} qw(-rows -columns -maxlength -readonly -class -style))
: $f->{-action} ||$f->{-preact}
? $s->{-cgi}->submit(-name=>$f->{-namecgi}, -title=>$f->{-namecmt}, -value=>$f->{-namelbl}
, -id => $f->{-namecgi}
, map { my $v =ref($f->{$_}) eq 'CODE' ? &{$f->{$_}}($s, $f, cfpvv($s, $f), cfpvp($s, $f)) : $f->{$_};
defined($v) ? ($_=>$v) : ()} qw(-class -style))
: $s->cgistring(-name=>$f->{-namecgi}, -title=>$f->{-namecmt}
, -id => $f->{-namecgi}
, map { my $v =ref($f->{$_}) eq 'CODE' ? &{$f->{$_}}($s, $f, cfpvv($s, $f), cfpvp($s, $f)) : $f->{$_};
defined($v) ? ($_=>$v) : ()} qw(-size -maxlength -readonly -disabled -class -style))
)
)
. (!$f->{-widget1}
? ''
: ref($f->{-widget1}) eq 'CODE'
view all matches for this distribution
view release on metacpan or search on metacpan
# entry id field is field id #1
($field = ars_GetField($c, $schema, 1)) ||
return undef;
if( $field->{defaultVal} ){
return $field->{defaultVal}.("0"x($field->{limit}{maxLength}-length($field->{defaultVal})-length($entry_id))).$entry_id;
}else{
return ("0"x($field->{limit}{maxLength}-length($entry_id))).$entry_id;
}
}
# ROUTINE
# ars_decodeStatusHistory(field-value)
view all matches for this distribution
view release on metacpan or search on metacpan
applications/htmlroot/cgi-bin/admin/countries.pl view on Meta::CPAN
print <<HTML;
<tr><td> </td></tr>
<tr><td>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td><b>Country ID: </b></td><td>
<input type="text" name="countryID" value="$CcountryID" size="2" maxlength="2" $formDisabledPrimaryKey>
</td></tr><tr><td><b>Country Name: </b></td><td>
<input type="text" name="countryName" value="$CcountryName" size="45" maxlength="45" $formDisabledAll>
</td></tr><tr><td><b>Activated: </b></td><td>
<input type="checkbox" name="activated" $activatedChecked $formDisabledAll>
</td></tr>
HTML
view all matches for this distribution
view release on metacpan or search on metacpan
print more closely resembles perl.
=cut
sub Print {
for (@_) {
if ( length($_) > 128000 ) {
ASP::Print( unpack('a128000a*', $_) );
} else {
$main::Response->Write($_);
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
sub _version ($) {
my $s = shift || 0;
$s =~ s/^(\d+)\.?//;
my $l = $1 || 0;
my @v = map { $_ . '0' x (3 - length $_) } $s =~ /(\d{1,3})\D?/g;
$l = $l . '.' . join '', @v if @v;
return $l + 0;
}
# Cloned from Params::Util::_CLASS
view all matches for this distribution