view release on metacpan or search on metacpan
lib/Object/Pad/SlotAttr/Trigger.xs view on Meta::CPAN
#include "object_pad.h"
#include "perl-backcompat.c.inc"
static void trigger_gen_accessor_ops(pTHX_ SlotMeta *slotmeta, SV *hookdata, void *_funcdata, enum AccessorType type, struct AccessorGenerationCtx *ctx)
{
if(type != ACCESSOR_WRITER)
return;
OP *selfop;
lib/Object/Pad/SlotAttr/Trigger.xs view on Meta::CPAN
ctx->post_bodyops = op_append_list(OP_LINESEQ, ctx->post_bodyops, callop);
return;
}
static void trigger_seal(pTHX_ SlotMeta *slotmeta, SV *hookdata, void *_funcdata)
{
if(mop_slot_get_attribute(slotmeta, "writer"))
return;
warn("Applying :Trigger attribute to slot %" SVf " is not useful without a :writer",
view all matches for this distribution
view release on metacpan or search on metacpan
share/oas/3.2/vocabulary.json view on Meta::CPAN
"type": "string",
"enum": [
"element",
"attribute",
"text",
"cdata",
"none"
]
},
"name": {
"type": "string"
view all matches for this distribution
view release on metacpan or search on metacpan
OOCBuilder.pm view on Meta::CPAN
$self->{cpars}{sheets}=1;
$self->{cpars}{autoc}=0;
$self->{cpars}{autor}=0;
# - data
$self->{cdata} = undef; # {cdata}{sheetnb}{}{}
$self->{sheetname}= undef; # {sheetname}{sheetnb}=name
$self->{cstyle} = undef; # {cstyle}{sheetnb}{}{}
$self->{colwidth} = undef; # {colwidth}{sheetnb}{c}
$self->{rowheight}= undef; # {rowheight}{sheetnb}{r}
OOCBuilder.pm view on Meta::CPAN
# - check data
$data=$self->encode_data ($data) if ($data);
# - store (ATTENTION $r before $c because of the way we need to generate xml)
$self->{cdata}{$sheet}{$r}{$c}{type}=$type;
$self->{cdata}{$sheet}{$r}{$c}{format}=$format if ($format);
$self->{cdata}{$sheet}{$r}{$c}{data}=$data;
$self->{cdata}{$sheet}{$r}{$c}{style}=$self->{actstyle};
$self->cell_update if ($self->{cpars}{autoc} || $self->{cpars}{autor});
1;
} # - - End set_data_sheet_xy
sub set_auto_xy {
OOCBuilder.pm view on Meta::CPAN
if ($t>1) {
$content.=qq{<table:table-column table:style-name="$prevcolid" table:number-columns-repeated="$t" table:default-cell-style-name="Default"/>};
} else {
$content.=qq{<table:table-column table:style-name="$prevcolid" table:default-cell-style-name="Default"/>};
}
$rows=&$subGetMaxRange ($self->{cdata}{$sheet});
for (1 .. $rows) {
$r=$_;
# TODO row style ?
$content.=q{<table:table-row table:style-name="ro1">};
$columns=&$subGetMaxRange ($self->{cdata}{$sheet}{$r});
for (1 .. $columns) {
$c=$_;
$type=$self->{cdata}{$sheet}{$r}{$c}{type};
$format=$self->{cdata}{$sheet}{$r}{$c}{format};
$data=$self->{cdata}{$sheet}{$r}{$c}{data};
$style=$self->{cdata}{$sheet}{$r}{$c}{style};
if ($style eq $self->{defstyle} || ! $style) {
$stylexml='';
} else {
if (! exists($cellstyleids{$style})) {
++$cellmaxid;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/OpenOffice/PerlPoint.pm view on Meta::CPAN
ping
skipmetadata
imagebufferdir
metadataTemplate
userdefinedDocdata
);
# define data: delimiter handling
my %delimiters=(
lib/OpenOffice/PerlPoint.pm view on Meta::CPAN
keywords describing the document
=item User defined fields
All names defined by C<userdefinedDocdata>.
=back
=item %tools
lib/OpenOffice/PerlPoint.pm view on Meta::CPAN
=item skipmetadata
If set to a true value meta data processing is bypassed.
=item userdefinedDocdata
Each OO document can be described by various predefined data, which are set automatically
(like the modification date) or set up by the document author in a dialog (like the
documents title). Additionally, OO allows to define up to four user informations. Called
C<info1> to I<info4> by default, they can be named individually if required.
lib/OpenOffice/PerlPoint.pm view on Meta::CPAN
$me->{$_}=$pars{$_} for qw(
file
imagebufferdir
skipmetadata
metadataTemplate
userdefinedDocdata
);
# aggregate a user agent object
$me->{userAgent}=new LWP::UserAgent;
$me->{userAgent}->timeout(1);
lib/OpenOffice/PerlPoint.pm view on Meta::CPAN
title
);
# get user defined metadata, as set up by caller
my %userDefinedMetadata=$me->{metadata}->user_defined;
$me->{metaData}{$_}=$userDefinedMetadata{$_} || 'unknown' for @{$me->{userdefinedDocdata}};
# get generator
$generator=$me->{metadata}->generator;
$generator='unknown program' unless $generator;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/auto/OpusVL/AppKit/root/static/js/wymeditor/jquery.wymeditor.js view on Meta::CPAN
options = options || false;
return '<'+name+(options ? this.tagOptions(options) : '')+'>'+content+'</'+name+'>';
};
/*
* @name cdataSection
* @description
* Returns a CDATA section for the given +content+. CDATA sections
* are used to escape blocks of text containing characters which would
* otherwise be recognized as markup. CDATA sections begin with the string
* <tt><![CDATA[</tt> and } with (and may not contain) the string
* <tt>]]></tt>.
*/
WYMeditor.XmlHelper.prototype.cdataSection = function(content)
{
return '<![CDATA['+content+']]>';
};
view all matches for this distribution
view release on metacpan or search on metacpan
if ($_[0] =~ m|\.xml$|i) { # XML descriptor
local $/;
my $content = <SITEFILE>;
my $xml_cdata_re = '(<!\[CDATA\[)?\015?\012?(.*?)\015?\012?(]]>)?';
$self->{id} = $1 if $content =~ m|<site id="(.*?)">|i;
foreach my $tag (qw/charset score expression template proc/) {
$self->{$tag} = $2 if $content =~ m|<$tag>$xml_cdata_re</$tag>|is;
}
foreach my $tag (qw/url var name info/) {
$self->{$tag}{lc($1)} = $3 while
$content =~ s|<$tag \w+="(.*?)">$xml_cdata_re</$tag>||is;
}
if ($content =~ m|<category>(.*?)</category>|i) {
$self->{category} = [ split(',', $1) ];
}
view all matches for this distribution
view release on metacpan or search on metacpan
}
elsif ($_[0] =~ m|\.xml$|i) {
local $/;
my $content = <SITEFILE>;
my $xml_cdata_re = '(<!\[CDATA\[)?\015?\012?(.*?)\015?\012?(]]>)?';
$self->{id} = $1 if $content =~ m|<site id="(.*?)">|i;
foreach my $tag ('charset', 'score', 'expression', 'template', 'proc') {
$self->{$tag} = $2 if $content =~ m|<$tag>$xml_cdata_re</$tag>|is;
}
foreach my $tag ('url', 'var', 'name', 'info') {
$self->{$tag}{lc($1)} = $3 while
$content =~ s|<$tag \w+="(.*?)">$xml_cdata_re</$tag>||is;
}
if ($content =~ m|<category>(.*?)</category>|i) {
$self->{category} = [ split(',', $1) ];
}
view all matches for this distribution
view release on metacpan or search on metacpan
PApp/XML.pm view on Meta::CPAN
use base 'Exporter';
$VERSION = 2.4;
@EXPORT_OK = qw(
xml_quote xml_attr xml_unquote xml_tag xml_cdata
xml_check xml_encoding xml2utf8 pod2xml
xml_include expand_pi xml_errorparser
);
=head2 Functions for XML-Generation
PApp/XML.pm view on Meta::CPAN
interpreted by an XML parser (quotes ', ", <, & and > to avoid ]]>). Example:
print xml_quote q( <xx> & <[[]]> );
=> <xx> & <[[]]>
=item xml_cdata $string
Does the same thing as C<xml_quote>, but using CDATA constructs, rather
than quoting individual characters. Example:
print xml_cdata q(hi ]]> there);
=> <![CDATA[hi ]]]]><![CDATA[> there ]]>
=item xml_unquote $string
Unquotes (and returns) an XML string (by resolving it's entities and
PApp/XML.pm view on Meta::CPAN
s/>/>/g;
#s/]]>/]]>/g; # avoids problems when ]] and > are quoted in seperate calls
$_;
}
sub xml_cdata {
local $_ = shift;
s/]]>/]]]]><![CDATA[>/g;
"<![CDATA[$_]]>";
}
sub xml_attr {
PApp/XML.pm view on Meta::CPAN
ignore_elements=> [qw(script)],
text_h => [sub {
if ($_[1] >= $errofs) {
$err->("<error>$errmsg, source<pre>\n"
. (xml_cdata substr $xml, $errofs >= 160 ? $errofs - 160 : 0, $errofs >= 160 ? 160 : $errofs)
. "÷"
. (xml_cdata substr $xml, $errofs, 160)
. "\n</pre></error>");
$errofs = 1e99;
} else {
$delayed and $err->();
}
PApp/XML.pm view on Meta::CPAN
sub view_head4 { title_tag head4 => $_[1]->title->present ($_[0]) => $_[1]->content->present ($_[0]) }
sub view_over { stag over => indent => $_[1]->indent, $_[1]->content->present ($_[0]) }
sub view_begin { stag begin => format => $_[1]->format, $_[1]->content->present ($_[0]) }
sub view_verbatim { stag verbatim => PApp::XML::xml_cdata $_[1] }
sub view_textblock { stag para => $_[1] }
sub view_seq_code { stag code => $_[1] }
sub view_seq_bold { stag bold => $_[1] }
sub view_seq_italic { stag italic => $_[1] }
view all matches for this distribution
view release on metacpan or search on metacpan
GENERATED/PDL/Cluster.pm view on Meta::CPAN
Signature: (
double data(d,n);
int mask(d,n);
int clusterids(n);
double [o]cdata(d,k);
int [o]cmask(d,k);
; char *ctrMethodFlag;
)
=for ref
GENERATED/PDL/Cluster.pm view on Meta::CPAN
Signature: (
double data(d,n);
int mask(d,n);
int clusterids(n);
double [o]cdata(d,k);
int [o]cmask(d,k);
)
Really just a wrapper for getclustercentroids(...,"a").
=cut
sub getclustermean {
my ($data,$mask,$cids,$cdata,$cmask) = @_;
return getclustercentroids($dat,$mask,$cids,$cdata,$cmask,'a');
}
#line 468 "Cluster.pm"
GENERATED/PDL/Cluster.pm view on Meta::CPAN
Signature: (
double data(d,n);
int mask(d,n);
int clusterids(n);
double [o]cdata(d,k);
int [o]cmask(d,k);
)
Really just a wrapper for getclustercentroids(...,"m").
=cut
sub getclustermedian {
my ($data,$mask,$cids,$cdata,$cmask) = @_;
return getclustercentroids($dat,$mask,$cids,$cdata,$cmask,'m');
}
#line 497 "Cluster.pm"
GENERATED/PDL/Cluster.pm view on Meta::CPAN
Signature: (
double data(d,n);
int mask(d,n);
double clusterwts(k,n);
double [o]cdata(d,k);
int [o]cmask(d,k);
)
Find cluster centroids by weighted sum. This can be considered an
expensive generalization of the getclustermean() and getclustermedian()
functions. Here, the input PDLs $data() and $mask(), as well as the
output PDL $cdata() are as for getclustermean(). The matrix $clusterwts()
determines the relative weight of each data row in determining the
centroid of each cluster, potentially useful for "fuzzy" clustering.
The equation used to compute cluster means is:
$cdata(d,k) = sum_{n} $clusterwts(k,n) * $data(d,n) * $mask(d,n)
For centroids in the same range as data elements, $clusterwts()
should sum to 1 over each column (k):
all($clusterwts->xchg(0,1)->sumover == 1)
GENERATED/PDL/Cluster.pm view on Meta::CPAN
a uniform distribution over cluster elements:
$clusterwts = zeroes($k,$n);
$clusterwts->indexND(cat($clusterids, xvals($clusterids))->xchg(0,1)) .= 1;
$clusterwts /= $clusterwts->xchg(0,1)->sumover;
getclusterwsum($data,$mask, $clusterwts, $cdata=zeroes($d,$k));
Similarly, getclustermedian() can be simulated by setting $clusterwts() to
1 for cluster medians and otherwise to 0. More sophisticated centroid
discovery methods can be computed by this function by setting
$clusterwts(k,n) to some estimate of the conditional probability
GENERATED/PDL/Cluster.pm view on Meta::CPAN
Signature: (
double data(d,n);
int mask(d,n);
double weight(d);
int rowids(nr);
double cdata(d,k);
int cmask(d,k);
int [o]clusterids(nr);
double [o]cdist(nr);
;
char *distFlag;
GENERATED/PDL/Cluster.pm view on Meta::CPAN
Assigns each specified data row to the nearest cluster centroid.
Data elements are given by $data() and $mask(), feature weights are
given by $weight(), as usual. Cluster centroids are defined by
by $cdata() and $cmask(), and the indices of rows to be attached
are given in the vector $rowids(). The output vector $clusterids()
contains for each specified row index the identifier of the nearest
cluster centroid. The vector $cdist() contains the distance to
the best clusters.
view all matches for this distribution
view release on metacpan or search on metacpan
dims[0] = 3;
dims[1] = cu;
pal_pdl = PDL->pdlnew();
pal_pdl->datatype = PDL_B;
PDL->setdims (pal_pdl, dims, 2);
PDL->allocdata (pal_pdl);
pdata = (PDL_Byte *) pal_pdl->data;
RGBQUAD *pal = FreeImage_GetPalette(self->dib);
for (i = 0; i < cu; i++) {
pdata[i*3] = (PDL_Byte) pal[i].rgbRed;
pdata[i*3 + 1] = (PDL_Byte) pal[i].rgbGreen;
dims[1] = hp;
dims[2] = 4;
bmp_pdl = PDL->pdlnew();
bmp_pdl->datatype = PDL_B;
PDL->setdims (bmp_pdl, dims, 3);
PDL->allocdata (bmp_pdl);
pdata = (PDL_Byte *) bmp_pdl->data;
for(y = 0; y < hp; y++) {
RGBQUAD *bits = (RGBQUAD*) FreeImage_GetScanLine(self->dib, h-y-1-y1);
for(x = 0; x < wp; x++) {
pdata[y*wp + x] = (PDL_Byte) bits[x+x1].rgbRed;
dims[1] = hp;
dims[2] = 3;
bmp_pdl = PDL->pdlnew();
bmp_pdl->datatype = PDL_B;
PDL->setdims (bmp_pdl, dims, 3);
PDL->allocdata (bmp_pdl);
pdata = (PDL_Byte *) bmp_pdl->data;
for(y = 0; y < hp; y++) {
RGBTRIPLE *bits = (RGBTRIPLE*) FreeImage_GetScanLine(self->dib, h-y-1-y1);
for(x = 0; x < wp; x++) {
pdata[y*wp + x] = (PDL_Byte) bits[x+x1].rgbtRed;
dims[1] = hp;
dims[2] = 3;
bmp_pdl = PDL->pdlnew();
bmp_pdl->datatype = PDL_B;
PDL->setdims (bmp_pdl, dims, 3);
PDL->allocdata (bmp_pdl);
pdata = (PDL_Byte *) bmp_pdl->data;
red_mask = FreeImage_GetRedMask(self->dib);
green_mask = FreeImage_GetGreenMask(self->dib);
blue_mask = FreeImage_GetBlueMask(self->dib);
if ( (red_mask == FI16_565_RED_MASK) && (green_mask == FI16_565_GREEN_MASK) && (blue_mask == FI16_565_BLUE_MASK) ) {
dims[0] = wp;
dims[1] = hp;
bmp_pdl = PDL->pdlnew();
bmp_pdl->datatype = PDL_B;
PDL->setdims (bmp_pdl, dims, 2);
PDL->allocdata (bmp_pdl);
pdata = (PDL_Byte *) bmp_pdl->data;
for(y = 0; y < hp; y++) {
BYTE *bits = FreeImage_GetScanLine(self->dib, h-y-1-y1);
for(x = 0; x < wp; x++) {
pdata[y*wp + x] = (PDL_Byte) bits[x+x1];
dims[0] = wp;
dims[1] = hp;
bmp_pdl = PDL->pdlnew();
bmp_pdl->datatype = PDL_B;
PDL->setdims (bmp_pdl, dims, 2);
PDL->allocdata (bmp_pdl);
pdata = (PDL_Byte *) bmp_pdl->data;
for(y = 0; y < hp; y++) {
BYTE *bits = FreeImage_GetScanLine(self->dib, h-y-1-y1);
for(x = 0; x < wp; x++) {
pdata[y*wp + x] = (PDL_Byte) ((bits[(x+x1)/2] >> 4*(1-(x+x1)%2)) & 0x0F);
dims[0] = wp;
dims[1] = hp;
bmp_pdl = PDL->pdlnew();
bmp_pdl->datatype = PDL_B;
PDL->setdims (bmp_pdl, dims, 2);
PDL->allocdata (bmp_pdl);
pdata = (PDL_Byte *) bmp_pdl->data;
for(y = 0; y < hp; y++) {
BYTE *bits = FreeImage_GetScanLine(self->dib, h-y-1-y1);
for(x = 0; x < wp; x++) {
pdata[y*wp + x] = (PDL_Byte) ((bits[(x+x1)/8] >> (7-(x+x1)%8)) & 0x01);
dims[0] = wp;
dims[1] = hp;
bmp_pdl = PDL->pdlnew();
bmp_pdl->datatype = PDL_US;
PDL->setdims (bmp_pdl, dims, 2);
PDL->allocdata (bmp_pdl);
pdata = (PDL_Ushort *) bmp_pdl->data;
for(y = 0; y < hp; y++) {
PDL_Ushort *bits = (PDL_Ushort*)FreeImage_GetScanLine(self->dib, h-y-1-y1);
for(x = 0; x < wp; x++) {
dims[0] = wp;
dims[1] = hp;
bmp_pdl = PDL->pdlnew();
bmp_pdl->datatype = PDL_S;
PDL->setdims (bmp_pdl, dims, 2);
PDL->allocdata (bmp_pdl);
pdata = (PDL_Short *) bmp_pdl->data;
for(y = 0; y < hp; y++) {
PDL_Short *bits = (PDL_Short*)FreeImage_GetScanLine(self->dib, h-y-1-y1);
for(x = 0; x < wp; x++) {
pdata[y*wp + x] = bits[x+x1];
dims[0] = wp;
dims[1] = hp;
bmp_pdl = PDL->pdlnew();
bmp_pdl->datatype = PDL_LL;
PDL->setdims (bmp_pdl, dims, 2);
PDL->allocdata (bmp_pdl);
pdata = (PDL_LongLong *) bmp_pdl->data;
for(y = 0; y < hp; y++) {
DWORD *bits = (DWORD*)FreeImage_GetScanLine(self->dib, h-y-1-y1);
for(x = 0; x < wp; x++) {
pdata[y*wp + x] = (PDL_LongLong)bits[x+x1];
dims[0] = wp;
dims[1] = hp;
bmp_pdl = PDL->pdlnew();
bmp_pdl->datatype = PDL_L;
PDL->setdims (bmp_pdl, dims, 2);
PDL->allocdata (bmp_pdl);
pdata = (PDL_Long *) bmp_pdl->data;
for(y = 0; y < hp; y++) {
PDL_Long *bits = (PDL_Long*)FreeImage_GetScanLine(self->dib, h-y-1-y1);
for(x = 0; x < wp; x++) {
pdata[y*wp + x] = bits[x+x1];
dims[0] = wp;
dims[1] = hp;
bmp_pdl = PDL->pdlnew();
bmp_pdl->datatype = PDL_F;
PDL->setdims (bmp_pdl, dims, 2);
PDL->allocdata (bmp_pdl);
pdata = (PDL_Float *) bmp_pdl->data;
for(y = 0; y < hp; y++) {
PDL_Float *bits = (PDL_Float*)FreeImage_GetScanLine(self->dib, h-y-1-y1);
for(x = 0; x < wp; x++) {
pdata[y*wp + x] = bits[x+x1];
dims[0] = wp;
dims[1] = hp;
bmp_pdl = PDL->pdlnew();
bmp_pdl->datatype = PDL_D;
PDL->setdims (bmp_pdl, dims, 2);
PDL->allocdata (bmp_pdl);
pdata = (PDL_Double *) bmp_pdl->data;
for(y = 0; y < hp; y++) {
PDL_Double *bits = (PDL_Double*)FreeImage_GetScanLine(self->dib, h-y-1-y1);
for(x = 0; x < wp; x++) {
pdata[y*wp + x] = bits[x+x1];
dims[1] = hp;
dims[2] = 3;
bmp_pdl = PDL->pdlnew();
bmp_pdl->datatype = PDL_US;
PDL->setdims (bmp_pdl, dims, 3);
PDL->allocdata (bmp_pdl);
pdata = (PDL_Ushort *) bmp_pdl->data;
for(y = 0; y < hp; y++) {
FIRGB16 *bits = (FIRGB16*) FreeImage_GetScanLine(self->dib, h-y-1-y1);
for(x = 0; x < wp; x++) {
pdata[y*wp + x] = (PDL_Ushort) bits[x+x1].red;
dims[1] = hp;
dims[2] = 4;
bmp_pdl = PDL->pdlnew();
bmp_pdl->datatype = PDL_US;
PDL->setdims (bmp_pdl, dims, 3);
PDL->allocdata (bmp_pdl);
pdata = (PDL_Ushort *) bmp_pdl->data;
for(y = 0; y < hp; y++) {
FIRGBA16 *bits = (FIRGBA16*) FreeImage_GetScanLine(self->dib, h-y-1-y1);
for(x = 0; x < wp; x++) {
pdata[y*wp + x] = (PDL_Ushort) bits[x+x1].red;
dims[1] = hp;
dims[2] = 3;
bmp_pdl = PDL->pdlnew();
bmp_pdl->datatype = PDL_F;
PDL->setdims (bmp_pdl, dims, 3);
PDL->allocdata (bmp_pdl);
pdata = (PDL_Float *) bmp_pdl->data;
for(y = 0; y < hp; y++) {
FIRGBF *bits = (FIRGBF*) FreeImage_GetScanLine(self->dib, h-y-1-y1);
for(x = 0; x < wp; x++) {
pdata[y*wp + x] = (PDL_Float) bits[x+x1].red;
dims[1] = hp;
dims[2] = 4;
bmp_pdl = PDL->pdlnew();
bmp_pdl->datatype = PDL_F;
PDL->setdims (bmp_pdl, dims, 3);
PDL->allocdata (bmp_pdl);
pdata = (PDL_Float *) bmp_pdl->data;
for(y = 0; y < hp; y++) {
FIRGBAF *bits = (FIRGBAF*) FreeImage_GetScanLine(self->dib, h-y-1-y1);
for(x = 0; x < wp; x++) {
pdata[y*wp + x] = (PDL_Float) bits[x+x1].red;
view all matches for this distribution
view release on metacpan or search on metacpan
matio-1.5.0/src/mat4.c view on Meta::CPAN
if ( stride[0]*(edge[0]-1)+start[0]+1 > matvar->dims[0] )
err = 1;
else if ( stride[1]*(edge[1]-1)+start[1]+1 > matvar->dims[1] )
err = 1;
if ( matvar->isComplex ) {
mat_complex_split_t *cdata = data;
long nbytes = edge[0]*edge[1]*Mat_SizeOf(matvar->data_type);
ReadDataSlab2(mat,cdata->Re,class_type,matvar->data_type,
matvar->dims,start,stride,edge);
fseek(mat->fp,matvar->internal->datapos+nbytes,SEEK_SET);
ReadDataSlab2(mat,cdata->Im,class_type,
matvar->data_type,matvar->dims,start,stride,edge);
} else {
ReadDataSlab2(mat,data,class_type,matvar->data_type,
matvar->dims,start,stride,edge);
}
} else {
if ( matvar->isComplex ) {
int i;
mat_complex_split_t *cdata = data;
long nbytes = Mat_SizeOf(matvar->data_type);
for ( i = 0; i < matvar->rank; i++ )
nbytes *= edge[i];
ReadDataSlabN(mat,cdata->Re,class_type,matvar->data_type,
matvar->rank,matvar->dims,start,stride,edge);
fseek(mat->fp,matvar->internal->datapos+nbytes,SEEK_SET);
ReadDataSlab2(mat,cdata->Im,class_type,
matvar->data_type,matvar->dims,start,stride,edge);
} else {
ReadDataSlabN(mat,data,class_type,matvar->data_type,
matvar->rank,matvar->dims,start,stride,edge);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PDL/Core.pm view on Meta::CPAN
set_c($new, [0], $value);
} else {
$new->setdims([]);
if ($value) {
$new->update_data_from( pack $pack[$new->get_datatype], $value );
} else { # do nothing if 0 - allocdata already memsets to 0
$new->make_physical;
}
}
}
elsif (blessed($value) and UNIVERSAL::isa($value, 'Math::Complex')) {
view all matches for this distribution
view release on metacpan or search on metacpan
Basic/Gen/PP/PdlParObj.pm view on Meta::CPAN
for(@{$this->{IndObjs}}) {
push @c,$index if $_->name eq $ind; $index ++;
}
my $pdl = $this->get_nname;
return (join '',map {"$pdl->dims[$_] = $size;\n"} @c).
"PDLA->resize_defaultincs($pdl);PDLA->allocdata($pdl);".
$this->get_xsdatapdecl(undef,1);
}
sub do_pdlaccess {
my($this) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
Basic/Gen/PP/PdlParObj.pm view on Meta::CPAN
for(@{$this->{IndObjs}}) {
push @c,$index if $_->name eq $ind; $index ++;
}
my $pdl = $this->get_nname;
return (join '',map {"$pdl->dims[$_] = $size;\n"} @c).
"PDLA->resize_defaultincs($pdl);PDLA->allocdata($pdl);".
$this->get_xsdatapdecl(undef,1);
}
sub do_pdlaccess {
my($this) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PGXN/API/Indexer.pm view on Meta::CPAN
has libxml => (is => 'ro', isa => 'XML::LibXML', lazy => 1, default => sub {
XML::LibXML->new(
recover => 2,
no_network => 1,
no_blanks => 1,
no_cdata => 1,
);
});
has index_dir => (is => 'ro', isa => 'Str', lazy => 1, default => sub {
my $dir = catdir +PGXN::API->instance->doc_root, '_index';
view all matches for this distribution
view release on metacpan or search on metacpan
basiclib/XML/Smart.pm-txt view on Meta::CPAN
#############
# SET_CDATA #
#############
sub set_cdata {
my $this = shift ;
$this->set_node_type('cdata',@_) ;
}
##############
# SET_BINARY #
##############
basiclib/XML/Smart.pm-txt view on Meta::CPAN
=head2 set_auto
Define the key to be handled automatically. Soo, data() will define automatically if it's a node, content or attribute.
I<** This method is useful to remove set_node(), set_cdata() and set_binary() changes.>
=head2 set_auto_node
Define the key as a node, and data() will define automatically if it's CDATA or BINARY.
I<** This method is useful to remove set_cdata() and set_binary() changes.>
=head2 set_binary(BOOL)
Define the node as a BINARY content when TRUE, or force to B<not> handle it as a BINARY on FALSE.
basiclib/XML/Smart.pm-txt view on Meta::CPAN
Original content of foo (the base64 data):
<h1>test \x03</h1>
=head2 set_cdata(BOOL)
Define the node as CDATA when TRUE, or force to B<not> handle it as CDATA on FALSE.
Example of CDATA node:
view all matches for this distribution
view release on metacpan or search on metacpan
xt/author/treebanks/pdt_small_trees/resources/adata_30_schema.xml view on Meta::CPAN
<import schema="wdata_30_schema.xml" type="bool.type"/>
<derive type="m-node.type">
<structure name="m-node">
<member name="id" as_attribute="1" role="#ID" required="1">
<cdata format="PMLREF"/>
</member>
</structure>
</derive>
<root name="adata" type="a-adata.type"/>
xt/author/treebanks/pdt_small_trees/resources/adata_30_schema.xml view on Meta::CPAN
<type name="a-meta.type">
<structure>
<member name="annotation_info">
<structure name="a-annotation-info">
<member name="version_info"><cdata format="any"/></member>
<member name="desc"><cdata format="any"/></member>
</structure>
</member>
</structure>
</type>
<type name="a-root.type">
<structure role="#NODE" name="a-root">
<member name="id" role="#ID" as_attribute="1" required="1"><cdata format="ID"/></member>
<member name="s.rf"><cdata format="PMLREF"/></member>
<member name="afun"><constant>AuxS</constant></member>
<member name="ord" role="#ORDER" required="1"><cdata format="nonNegativeInteger"/></member>
<member name="clause_number"><cdata format="nonNegativeInteger"/></member>
<member name="children" role="#CHILDNODES">
<list type="a-node.type" ordered="1"/>
</member>
<member name="sentence" required="0"> <!-- for searching in PML-TQ only (not in the distributed data) -->
<cdata format="any"/>
</member>
</structure>
</type>
<type name="a-node.type">
<structure role="#NODE" name="a-node">
<member name="id" role="#ID" as_attribute="1" required="1"><cdata format="ID"/></member>
<member name="m.rf" role="#KNIT" type="m-node.type">
<cdata format="PMLREF"/>
</member>
<member name="afun" type="a-afun.type" required="1"/>
<member name="is_member" type="bool.type"/>
<member name="is_parenthesis_root" type="bool.type"/>
<member name="ord" role="#ORDER" required="1"><cdata format="nonNegativeInteger"/></member>
<member name="clause_number"><cdata format="nonNegativeInteger"/></member>
<member name="children" role="#CHILDNODES">
<list type="a-node.type" ordered="1"/>
</member>
</structure>
</type>
view all matches for this distribution
view release on metacpan or search on metacpan
xt/author/treebanks/pdt_test/resources/adata_30_schema.xml view on Meta::CPAN
<import schema="wdata_30_schema.xml" type="bool.type"/>
<derive type="m-node.type">
<structure name="m-node">
<member name="id" as_attribute="1" role="#ID" required="1">
<cdata format="PMLREF"/>
</member>
</structure>
</derive>
<root name="adata" type="a-adata.type"/>
xt/author/treebanks/pdt_test/resources/adata_30_schema.xml view on Meta::CPAN
<type name="a-meta.type">
<structure>
<member name="annotation_info">
<structure name="a-annotation-info">
<member name="version_info"><cdata format="any"/></member>
<member name="desc"><cdata format="any"/></member>
</structure>
</member>
</structure>
</type>
<type name="a-root.type">
<structure role="#NODE" name="a-root">
<member name="id" role="#ID" as_attribute="1" required="1"><cdata format="ID"/></member>
<member name="s.rf"><cdata format="PMLREF"/></member>
<member name="afun"><constant>AuxS</constant></member>
<member name="ord" role="#ORDER" required="1"><cdata format="nonNegativeInteger"/></member>
<member name="clause_number"><cdata format="nonNegativeInteger"/></member>
<member name="children" role="#CHILDNODES">
<list type="a-node.type" ordered="1"/>
</member>
<member name="sentence" required="0"> <!-- for searching in PML-TQ only (not in the distributed data) -->
<cdata format="any"/>
</member>
</structure>
</type>
<type name="a-node.type">
<structure role="#NODE" name="a-node">
<member name="id" role="#ID" as_attribute="1" required="1"><cdata format="ID"/></member>
<member name="m.rf" role="#KNIT" type="m-node.type">
<cdata format="PMLREF"/>
</member>
<member name="afun" type="a-afun.type" required="1"/>
<member name="is_member" type="bool.type"/>
<member name="is_parenthesis_root" type="bool.type"/>
<member name="ord" role="#ORDER" required="1"><cdata format="nonNegativeInteger"/></member>
<member name="clause_number"><cdata format="nonNegativeInteger"/></member>
<member name="children" role="#CHILDNODES">
<list type="a-node.type" ordered="1"/>
</member>
</structure>
</type>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PMLTQ/PML2BASE.pm view on Meta::CPAN
#
# - every structure/container/ has a unique idx (Number) and carries attributes as columns
#
# - container has a '#content' column
#
# - cdata/constant/choice attributes are stored in the respective columns
#
# - structure/container members are in a separate table where they have a unique idx,
# referred to by the member column
#
# - unordered-list/alt members are stored in a separate table, whose columns
lib/PMLTQ/PML2BASE.pm view on Meta::CPAN
# - the table names should be derived from PML type names in a canonical way,
# one per PML schema type decl
#
# Possible modifications:
#
# a) cast all cdata structure members also into separate tables and thus
# keep varchar data in separate tables
#
# b) cast node attributes to a separate table, separating the tree structure
# from node data, making the tree-structure table very thin
# in fact: this is necessary, since nodes can be of different types
#
# c) use cdata format information to determine the table column format
#
# some hacks:
#
# - updating refs in strips .rf suffix if the member is a PMLREF but
# not if it is a list of PMLREFs
view all matches for this distribution
view release on metacpan or search on metacpan
t/treebanks/pdt_test/resources/adata_30_schema.xml view on Meta::CPAN
<import schema="wdata_30_schema.xml" type="bool.type"/>
<derive type="m-node.type">
<structure name="m-node">
<member name="id" as_attribute="1" role="#ID" required="1">
<cdata format="PMLREF"/>
</member>
</structure>
</derive>
<root name="adata" type="a-adata.type"/>
t/treebanks/pdt_test/resources/adata_30_schema.xml view on Meta::CPAN
<type name="a-meta.type">
<structure>
<member name="annotation_info">
<structure name="a-annotation-info">
<member name="version_info"><cdata format="any"/></member>
<member name="desc"><cdata format="any"/></member>
</structure>
</member>
</structure>
</type>
<type name="a-root.type">
<structure role="#NODE" name="a-root">
<member name="id" role="#ID" as_attribute="1" required="1"><cdata format="ID"/></member>
<member name="s.rf"><cdata format="PMLREF"/></member>
<member name="afun"><constant>AuxS</constant></member>
<member name="ord" role="#ORDER" required="1"><cdata format="nonNegativeInteger"/></member>
<member name="clause_number"><cdata format="nonNegativeInteger"/></member>
<member name="children" role="#CHILDNODES">
<list type="a-node.type" ordered="1"/>
</member>
<member name="sentence" required="0"> <!-- for searching in PML-TQ only (not in the distributed data) -->
<cdata format="any"/>
</member>
</structure>
</type>
<type name="a-node.type">
<structure role="#NODE" name="a-node">
<member name="id" role="#ID" as_attribute="1" required="1"><cdata format="ID"/></member>
<member name="m.rf" role="#KNIT" type="m-node.type">
<cdata format="PMLREF"/>
</member>
<member name="afun" type="a-afun.type" required="1"/>
<member name="is_member" type="bool.type"/>
<member name="is_parenthesis_root" type="bool.type"/>
<member name="ord" role="#ORDER" required="1"><cdata format="nonNegativeInteger"/></member>
<member name="clause_number"><cdata format="nonNegativeInteger"/></member>
<member name="children" role="#CHILDNODES">
<list type="a-node.type" ordered="1"/>
</member>
</structure>
</type>
view all matches for this distribution
view release on metacpan or search on metacpan
doc/pmltq_doc.xml view on Meta::CPAN
relation from a referring node (the one containing the
reference) to the referenced node (the one whose ID the
reference contains).</para>
<para>The name of the relation is an attribute path to a PML
reference (declared in the PML schema as <literal><cdata
format="PMLREF"/></literal>).</para>
<para>For example, nodes of the type
<literal>t-node</literal> in PDTÂ 2.0 are structures declares
as follows: <programlisting> <type name="t-node.type">
<structure role="#NODE" name="t-node">
...
<member name="a">
<structure>
<member name="lex.rf">
<cdata format="PMLREF"/>
</member>
<member name="aux.rf">
<list ordered="0">
<cdata format="PMLREF"/>
</list>
</member>
</structure>
</member>
...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/POE/Filter/SSL.pm view on Meta::CPAN
if $self->{unblessed}->{debug};
my @return = ();
$self->doSSL();
if ($self->{accepted}) {
if (defined($self->{sendbuf})) {
foreach my $cdata (@{$self->{sendbuf}}) {
$self->writeToSSL($cdata);
}
delete($self->{sendbuf});
}
}
foreach my $data (@$chunks) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/POE/XUL/CDATA.pm view on Meta::CPAN
################################################################
sub update_CM
{
my( $self ) = @_;
return unless $POE::XUL::Node::CM;
$POE::XUL::Node::CM->after_cdata_change( $self );
}
################################################################
sub nodeValue
lib/POE/XUL/CDATA.pm view on Meta::CPAN
=head1 SYNOPSIS
use POE::XUL::Node;
use POE::XUL::CDATA;
my $cdata = POE::XUL::CDATA->new( $raw_data );
$node->appendChild( $cdata );
Script( <<JS );
function something() {
// JS code here
}
lib/POE/XUL/CDATA.pm view on Meta::CPAN
response and C<eval()>ed multiple times if it the child of a Script node.
This may or may not be what you want.
=head2 nodeValue
$cdata->nodeValue( $raw_data );
$data = $cdata->nodeValue;
=head2 appendData
$cdata->appendData( $more_js );
=head2 deleteData
$cdata->deleteData( $offset, $count );
=head2 insertData
$cdata->insertData( $offset, $more_data );
=head2 replaceData
$cdata->insertData( $offset, $count, $more_data );
=head2 substringData
my $data = $cdata->substringData( $offset, $count );
=head2 as_xml
my $xml = $cdata->as_xml;
=head2 children
Returns an empty array.
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-load.t
t/01-meta.t
t/10-attributes.t
t/11-elements.t
t/12-warnings.t
t/13-cdata.t
t/20-validating.t
t/21-emitting.t
t/22-round-tripping.t
t/23-cookbook.t
t/24-parse-methods.t
view all matches for this distribution
view release on metacpan or search on metacpan
makeztxt-1.62/libztxt/ztxt_generate_db.c view on Meta::CPAN
int x;
char *y;
long offset;
RecordEntryType *dbRecordEntries;
int sub;
long recdata_offset;
long anno_totalsize;
anno_node *anno;
int crc;
makeztxt-1.62/libztxt/ztxt_generate_db.c view on Meta::CPAN
/* Add annotation records */
anno_totalsize = 0;
if (db->num_annotations > 0)
{
/* Add annotation index */
recdata_offset =
(data_offset + sizeof(zTXT_record0) + db->comp_size
+ ((sizeof(UInt32) + MAX_BMRK_LENGTH) * db->num_bookmarks));
dbRecordEntries->localChunkID = htonl(recdata_offset);
dbRecordEntries->attributes = dmRecAttrDirty;
x = htonl(0x00424200 + curr_record);
y = (char *)&x;
dbRecordEntries->uniqueID[0] = y[1];
dbRecordEntries->uniqueID[1] = y[2];
dbRecordEntries->uniqueID[2] = y[3];
dbRecordEntries++;
curr_record++;
anno = db->annotations;
recdata_offset =
(data_offset + sizeof(zTXT_record0) + db->comp_size
+ ((sizeof(UInt32) + MAX_BMRK_LENGTH) * db->num_bookmarks)
+ ((sizeof(UInt32) + MAX_BMRK_LENGTH) * db->num_annotations));
while (anno)
{
/* Add record entry for each annotation */
dbRecordEntries->localChunkID = htonl(recdata_offset
+ anno_totalsize);
dbRecordEntries->attributes = dmRecAttrDirty;
x = htonl(0x00424200 + curr_record);
y = (char *)&x;
dbRecordEntries->uniqueID[0] = y[1];
view all matches for this distribution
view release on metacpan or search on metacpan
t/07-cplus.t
t/08-misc.t
t/09-payload.t
t/10-bin_share.t
t/11-nonxs.t
t/testmod/data/ccdat/ccdata1.bin
t/testmod/data/ccdat/ccdata2.bin
t/testmod/data/data.txt
t/testmod/data/db.db
t/testmod/file1.c
t/testmod/file1.h
t/testmod/file2.cc
view all matches for this distribution
view release on metacpan or search on metacpan
t/Parallel-DataPipe.t view on Meta::CPAN
sub test_scalar_values {
print "\n***Testing if conveyor works ok with simple scalar data...\n";
my @data = 1..10000;
my @cdata = @data;
my @processed_data = Parallel::DataPipe::run {
input => \@data,
process => sub { $_*2 },
};
ok(@data==0,'length of input queue is empty');
ok(@cdata==@processed_data,'length of processed scalar data');
ok(join(",",map $_*2, @cdata) eq join(",",sort {$a <=> $b} @processed_data),"processed scalar data values");
#printf "processed data:%s\n",join ",",@processed_data;
ok(zombies() == 0,'no zombies');
}
sub test_serialized_data {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Paranoid/IO/FileMultiplexer/Block.pm view on Meta::CPAN
my $file = $$self{file};
my $bsize = $$self{blockSize};
my $minp = $$self{minPos};
my $maxp = $$self{maxPos};
my $rv = PTRUE_ZERO;
my $cdata = defined $content ? ( length $content ) . ' bytes' : undef;
my $blkLeft;
subPreamble( PDLEVEL3, '$;$$$', $cdata, $start, $length, $offset );
# NOTE: This method intentionally allows writes of a length greater than
# the block size, but it will only write content from within the block
# boundaries.
view all matches for this distribution
view release on metacpan or search on metacpan
examples/7.2.3/asup02.txt view on Meta::CPAN
Sat Mar 17 21:00:00 CDT [kern.uptime.filer:info]: 9:00pm up 651 days, 48 mins, 20520080417 NFS ops, 0 CIFS ops, 54 HTTP ops, 0 FCP ops, 0 iSCSI ops
Sat Mar 17 22:00:00 CDT [kern.uptime.filer:info]: 10:00pm up 651 days, 1:48 20520632047 NFS ops, 0 CIFS ops, 54 HTTP ops, 0 FCP ops, 0 iSCSI ops
Sat Mar 17 23:00:00 CDT [kern.uptime.filer:info]: 11:00pm up 651 days, 2:48 20522847930 NFS ops, 0 CIFS ops, 54 HTTP ops, 0 FCP ops, 0 iSCSI ops
Sun Mar 18 00:00:00 CDT [kern.uptime.filer:info]: 12:00am up 651 days, 3:48 20523240863 NFS ops, 0 CIFS ops, 54 HTTP ops, 0 FCP ops, 0 iSCSI ops
<perf-info><object-info><objectname>system</objectname><counters><counter-info><name>nfs_ops</name><desc>NFS operations per second</desc><privilege-level>basic</privilege-level><properties>rate</properties><unit>per_sec</unit></counter-info><counter-...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/libstdf.pm view on Meta::CPAN
# ------- FUNCTION WRAPPERS --------
package libstdf;
*cdata = *libstdfc::cdata;
*memmove = *libstdfc::memmove;
*stdf_version = *libstdfc::stdf_version;
*rec_to_mir = *libstdfc::rec_to_mir;
*rec_to_sdr = *libstdfc::rec_to_sdr;
*rec_to_pcr = *libstdfc::rec_to_pcr;
view all matches for this distribution