view release on metacpan or search on metacpan
Through out code only methods are used to access internal state.
Supposedly, that will enable scaling some day later.
The only exception is L<B<connect()>|/connect()> for obvious reasons.
Through out code neither internal state nor FST records are cached ever.
The only one seamingly inconsistent fragment is inside main loop when next
I<$state> is already found but not yet entered.
I<$action> is processed when the next I<$state> is set
(though, in some sense, not yet entered).
(If it doesn't make sense it's fine, refer to
L<B<process()> method|/process()> description later in this POD.)
=item Diagnostics
B<(misdesign)>
Mechanics behind diagnostics isa failure.
It's messy, fragile, misguided, and (honestly) premature.
At the moment it's useless.
=item Hash vs HASH vs Acme::FSM Ref Constructors
B<(messy, probably bug)>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Floral.pm view on Meta::CPAN
BEGIN {
$Bouquet = <<Flowers;
Alp Lily
Alpine Hulsea
Alpine Sunflower
Alpine Saxifrage
Alpine Sorrel
Alpine Spiraea
American Speedwell
American Twinflower
Annual Phlox
lib/Acme/Floral.pm view on Meta::CPAN
Hound's Tongue
Howell Dimersia
Hudson's Bay Currant
Indian Pipe
Inflated Sedge
James' Saxifrage
John Day Valley Desert Parsley
Kern Daisy
Kinniknnick
Klamath Weed
Lance-leaved Grapefern
lib/Acme/Floral.pm view on Meta::CPAN
Alpine Skunkbush
Sky Pilot
Jacob's Ladder
Sleepy Cat
Slinkpod
Oregon Saxifrage
Small-flowered Fringecup
Smooth Blazingstar
Snapdragon Skullcap
Snow Willow
Snowy Spring Parsley
lib/Acme/Floral.pm view on Meta::CPAN
Stemless Evening Primrose
Stickly Geranium
Sticky Currant
Sticky Penstemon
Sticky Phlox
Streambank Saxifrage
Brook Saxifrage
Sugar Bowls
Leather Flower
Sulfur Buckwheat
Sulfur Cinquefoil
Swale Desert Parsley
Swamp Saxifrage
Tailcup Lupine
Tall Mountain Bluebells
Tansy Ragwort
Tansy-leaved Evening Primrose
Teasel
lib/Acme/Floral.pm view on Meta::CPAN
__END__
=head1 NAME
Acme::Floral - Produces fragrant perl
=head1 SYNOPSIS
perl -MAcme::Floral my_script.pl > floral_script.pl
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Spiffy.pm view on Meta::CPAN
? '{}'
: default_as_code($default);
my $code = $code{sub_start};
if ($args->{-init}) {
my $fragment = $args->{-weak} ? $code{weak_init} : $code{init};
$code .= sprintf $fragment, $field, $args->{-init}, ($field) x 4;
}
$code .= sprintf $code{set_default}, $field, $default_string, $field
if defined $default;
$code .= sprintf $code{return_if_get}, $field;
$code .= sprintf $code{set}, $field;
view all matches for this distribution
view release on metacpan or search on metacpan
t/00_compile.t view on Meta::CPAN
imported_ok qw[insult];
#
my $insult = insult();
#
{
my $TODO = todo 'the pirate back end is way too fragile' unless +$insult;
ok + $insult, 'stringify';
#
is my $insult = Acme::Insult::Pirate::insult(), hash {
field insult => D();
}, 'hash (fake)';
view all matches for this distribution
view release on metacpan or search on metacpan
BleedingOpenGL.pm view on Meta::CPAN
our $glext_dependencies =
{
GL_ARB_color_buffer_float=>'2.0', #39
GL_ARB_depth_texture=>'1.1', #22
GL_ARB_draw_buffers=>'1.3', #37
GL_ARB_fragment_program=>'1.4;ARB_vertex_program', #27
GL_ARB_fragment_program_shadow=>'1.4;ARB_fragment_program,ARB_shadow', #36
GL_ARB_fragment_shader=>'1.4;ARB_shader_objects', #32
GL_ARB_half_float_pixel=>'1.5', #40
GL_ARB_multisample=>'1.0', #5
GL_ARB_multitexture=>'1.1', # Moved to 1.2.1
GL_ARB_pixel_buffer_object=>'1.5', #42
GL_ARB_point_parameters=>'1.0', #14
GL_ARB_point_sprite=>'1.4', #35
GL_ARB_shading_language_100=>'1.4;ARB_shader_objects,ARB_fragment_shader,ARB_vertex_shader', #33
GL_ARB_shader_objects=>'1.4', #30
GL_ARB_shadow=>'1.1;ARB_depth_texture', #23
GL_ARB_shadow_ambient=>'1.1;ARB_shadow,ARB_depth_texture', #23
GL_ARB_texture_border_clamp=>'1.0', #13
GL_ARB_texture_cube_map=>'1.0', #7
BleedingOpenGL.pm view on Meta::CPAN
GL_IBM_rasterpos_clip=>'1.0', #110
GL_NV_blend_square=>'1.0', #194
GL_NV_copy_depth_to_color=>'1.0;NV_packed_depth_stencil', #243
GL_NV_depth_clamp=>'1.0', #260
GL_NV_fog_distance=>'1.0', #192
GL_NV_fragment_program_option=>'1.0;ARB_fragment_program', #303
GL_NV_fragment_program2=>'1.0;ARB_fragment_program,NV_fragment_program_option', #304
GL_NV_light_max_exponent=>'1.0', #189
GL_NV_multisample_filter_hint=>'1.0;ARB_multisample', #259
GL_NV_packed_depth_stencil=>'1.0', #226
GL_NV_texgen_reflection=>'1.0', #179
GL_NV_texture_compression_vtc=>'1.0;ARB_texture_compression,EXT_texture_compression_s3tc,ARB_texture_non_power_of_two', #228
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MUDLike.pm view on Meta::CPAN
// Move to the right depth
while ( wrap[0]-- )
div = div.firstChild;
// Remove IE's autoinserted <tbody> from table fragments
if ( jQuery.browser.msie ) {
// String was a <table>, *may* have spurious <tbody>
if ( !s.indexOf("<table") && s.indexOf("<tbody") < 0 )
tb = div.firstChild && div.firstChild.childNodes;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MetaSyntactic/haddock.pm view on Meta::CPAN
Macrocephale Malappris Malotru Mamelouk Marchand_de_tapis_ou_de_guano
Marin_d_eau_douce Megacycle Megalomane Mercanti Mercenaire Merinos
Merinos_mal_peigne Mille_marmottes Mille_millions_de_mille_sabords
Mille_sabords Mille_tonnerres Miserable Mitrailleur_a_bavette Mouchard
Moujiks Moule_a_gaufre Moussaillon Mufle Mussolini_de_carnaval
Naufrageur Negrier Noix_de_coco Nyctalope Olibrius Ophicleide
Ornithorynque Orycterope Ostrogoth Ours_mal_leche Pacte_a_quatre
Pantoufle Papou Papou_des_Carpathes Paranoiaque Parasite Patagon
Patapouf Patate Peaux_rouges Peronnelle Perroquet_bavard Phenomene
Phlebotome Phylloxera Pignouf Pirate_d_eau_douce Pirate_du_ciel Polygraphe
Porc_epic_mal_embouche Poussiere Profiteur Projectile_guide Protozoaire
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Spiffy.pm view on Meta::CPAN
? '{}'
: default_as_code($default);
my $code = $code{sub_start};
if ($args->{-init}) {
my $fragment = $args->{-weak} ? $code{weak_init} : $code{init};
$code .= sprintf $fragment, $field, $args->{-init}, ($field) x 4;
}
$code .= sprintf $code{set_default}, $field, $default_string, $field
if defined $default;
$code .= sprintf $code{return_if_get}, $field;
$code .= sprintf $code{set}, $field;
view all matches for this distribution
view release on metacpan or search on metacpan
can easily create thousands of them without stalling your system.
## A Warning
I had this idea while writing cookbook examples for Affix. I wondered if I could implement a hybrid concurrency model
for Perl from within FFI. This is that unpublished article made into a module. It's fragile. It's dangerous. It's my
attempt at combining cooperative multitasking (green threads or fibers or whatever they're called in the latest edit of
Wikipedia) with a preemptive native thread pool. It's Acme::Parataxis.
This module is experimental and resides in the `Acme::` namespace for a reason. It manually manipulates Perl's
internal stacks and C context. It is very dangerous. It's irresponsible, honestly, that I'm even putting this terrible
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
return 1;
}
sub postamble {
$PostambleUsed = 1;
my $fragment;
$fragment .= <<"AUTO_INSTALL" if !$InstallDepsTarget;
config :: installdeps
\t\$(NOECHO) \$(NOOP)
AUTO_INSTALL
$fragment .= <<"END_MAKE";
checkdeps ::
\t\$(PERL) $0 --checkdeps
installdeps ::
inc/Module/AutoInstall.pm view on Meta::CPAN
listalldeps ::
\t$PostambleActionsListAllDeps
END_MAKE
return $fragment;
}
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
return 1;
}
sub postamble {
$PostambleUsed = 1;
my $fragment;
$fragment .= <<"AUTO_INSTALL" if !$InstallDepsTarget;
config :: installdeps
\t\$(NOECHO) \$(NOOP)
AUTO_INSTALL
$fragment .= <<"END_MAKE";
checkdeps ::
\t\$(PERL) $0 --checkdeps
installdeps ::
inc/Module/AutoInstall.pm view on Meta::CPAN
listalldeps ::
\t$PostambleActionsListAllDeps
END_MAKE
return $fragment;
}
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/RFC4824.pm view on Meta::CPAN
my $framesize = $self->{default_framesize};
if (exists $arg_ref->{FRAMESIZE}) {
$framesize = $arg_ref->{FRAMESIZE};
}
# TODO - implement fragmenting
# note: honor DF bit in IP packets
if (length($packet) > $framesize) {
croak "Fragmenting not implemented (yet).";
}
lib/Acme/RFC4824.pm view on Meta::CPAN
=back
=head2 encode
Encodes an IP datagram into one or more SFS frames. Currently, fragmenting
is not (yet) supported, so it will always encode into one frame (or
complain that the IP packet is too large to encode into one frame).
Takes the following named parameters:
lib/Acme/RFC4824.pm view on Meta::CPAN
The checksum algorithm. Only 0 (no checksum) is implemented at the moment.
=item * FRAMESIZE (optional)
The optional maximal frame size of the SFS frame. Will later be used
to fragment, currently only limits the size of the packet you can encode.
=item * GZIP (optional)
Not implemented yet, meant to support the gzipped frame variant of RFC 4824.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/ReturnValue/MakeSite.pm view on Meta::CPAN
$report->{package_br} = $report->{package};
if (length($report->{package_br})>40) {
my @p=split(/::/,$report->{package_br});
my @lines;
my $line = shift(@p);
foreach my $frag (@p) {
$line.='::'.$frag;
if (length($line)>40) {
push(@lines,$line);
$line='';
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Spiffy.pm view on Meta::CPAN
? '{}'
: default_as_code($default);
my $code = $code{sub_start};
if ($args->{-init}) {
my $fragment = $args->{-weak} ? $code{weak_init} : $code{init};
$code .= sprintf $fragment, $field, $args->{-init}, ($field) x 4;
}
$code .= sprintf $code{set_default}, $field, $default_string, $field
if defined $default;
$code .= sprintf $code{return_if_get}, $field;
$code .= sprintf $code{set}, $field;
view all matches for this distribution
view release on metacpan or search on metacpan
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
if (my $add = $self->meta_add) {
if (not exists $add->{'meta-spec'} or $add->{'meta-spec'}{version} != 2) {
require CPAN::Meta::Converter;
if (CPAN::Meta::Converter->VERSION('2.141170')) {
$add = CPAN::Meta::Converter->new($add)->upgrade_fragment;
delete $add->{prereqs}; # XXX this would now overwrite all prereqs
}
else {
$self->log_warn("Can't meta_add without CPAN::Meta 2.141170");
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
return 1;
}
sub postamble {
$PostambleUsed = 1;
my $fragment;
$fragment .= <<"AUTO_INSTALL" if !$InstallDepsTarget;
config :: installdeps
\t\$(NOECHO) \$(NOOP)
AUTO_INSTALL
$fragment .= <<"END_MAKE";
checkdeps ::
\t\$(PERL) $0 --checkdeps
installdeps ::
inc/Module/AutoInstall.pm view on Meta::CPAN
listalldeps ::
\t$PostambleActionsListAllDeps
END_MAKE
return $fragment;
}
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acrux/DBI/Dump.pm view on Meta::CPAN
# String processing
while (length($s)) {
my $chunk;
# get fragments (chunks) from string
if ($s =~ /^$delimiter/x) { # any delimiter char(s)
$is_new = 1;
$chunk = $delimiter;
} elsif ($s =~ /^delimiter\s+(\S+)\s*(?:\n|\z)/ip) { # set new delimiter
$is_new = 1;
view all matches for this distribution
view release on metacpan or search on metacpan
t/06-Batch.t view on Meta::CPAN
isa_ok($results[2], 'Algorithm::AM::Result');
isa_ok($results[3], 'Algorithm::AM::Result');
# test was in train, so not excluding given would mean that
# exclude_given was set to false successfully
# TODO: this seems fragile, as it relies on AM having
# exclude_given set to true by default.
ok(!$results[0]->given_excluded,
'exclude_given passed on to classifier');
ok(!$results[0]->exclude_nulls,
'exclude_nulls passed on to classifier');
view all matches for this distribution
view release on metacpan or search on metacpan
t/test.data view on Meta::CPAN
and CC O
fear NN B
that IN O
they PRP B
damage VBP O
fragile JJ B
landscapes NNS I
have VBP O
prompted VBN O
pleas NNS B
, , O
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/DecisionTree.pm view on Meta::CPAN
The 10-fold cross-validation test divides all of the training data into ten parts,
with nine parts used for training a decision tree and one part used for testing its
ability to classify correctly. This selection of nine parts for training and one part
for testing is carried out in all of the ten different possible ways.
The following code fragment illustrates how you invoke the testing function of the
EvalTrainingData class:
my $training_datafile = "training.csv";
my $eval_data = EvalTrainingData->new(
training_datafile => $training_datafile,
lib/Algorithm/DecisionTree.pm view on Meta::CPAN
$root_node->display_decision_tree(" ");
This will display the decision tree in your terminal window by using a recursively
determined offset for each node as the display routine descends down the tree.
I have intentionally left the syntax fragment C<$root_node> in the above call to
remind the reader that C<display_decision_tree()> is NOT called on the instance of
the C<DecisionTree> we constructed earlier, but on the C<DTNode> instance returned by
the call to C<construct_decision_tree_classifier()>.
=item B<classify($root_node, \@test_sample):>
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Spiffy.pm view on Meta::CPAN
? '{}'
: default_as_code($default);
my $code = $code{sub_start};
if ($args->{-init}) {
my $fragment = $args->{-weak} ? $code{weak_init} : $code{init};
$code .= sprintf $fragment, $field, $args->{-init}, ($field) x 4;
}
$code .= sprintf $code{set_default}, $field, $default_string, $field
if defined $default;
$code .= sprintf $code{return_if_get}, $field;
$code .= sprintf $code{set}, $field;
view all matches for this distribution
view release on metacpan or search on metacpan
t/sukkal-protocol.t view on Meta::CPAN
#!perl
# Protocol edge cases: input fragmentation and reassembly, line
# framing, and the validation boundaries of the wire protocol.
use 5.006;
use strict;
use warnings;
t/sukkal-protocol.t view on Meta::CPAN
#
# a command split across two writes is reassembled from the read buffer
#
print $sock 'MARK fr';
sleep 0.25; # let the daemon read the fragment on its own
print $sock "ag 3\nCOUNT frag\n";
is( read_line($sock), 'OK 3', 'command fragmented across writes is reassembled' );
#
# one byte per write: reassembly across many reads
#
for my $byte ( split //, "COUNT frag\n" ) {
print $sock $byte;
sleep 0.02;
}
is( read_line($sock), 'OK 3', 'command dribbled a byte at a time is reassembled' );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Evolutionary/Op/Base.pm view on Meta::CPAN
=cut
sub fromXML {
my $class = shift;
my $xml = shift || croak "XML fragment missing ";
my $fragment; # Inner part of the XML
if ( ref $xml eq '' ) { #We are receiving a string, parse it
$xml = parse_xml( $xml );
croak "Incorrect XML fragment" if !$xml->{'op'}; #
$fragment = $xml->{'op'};
} else {
$fragment = $xml;
}
my $rate = shift;
if ( !defined $rate && $fragment->{'-rate'} ) {
$rate = $fragment->{'-rate'};
}
my $self = { rate => $rate }; # Create a reference
if ( $class eq __PACKAGE__ ) { #Deduct class from the XML
$class = $fragment->{'-name'} || shift || croak "Class name missing";
}
$class = "Algorithm::Evolutionary::Op::$class" if $class !~ /Algorithm::Evolutionary/;
bless $self, $class; # And bless it
my (%params, %code_fragments, %ops);
for ( @{ (ref $fragment->{'param'} eq 'ARRAY')?
$fragment->{'param'}:
[ $fragment->{'param'}] } ) {
if ( defined $_->{'-value'} ) {
$params{$_->{'-name'}} = $_->{'-value'};
} elsif ( $_->{'param'} ) {
my %params_hash;
for my $p ( @{ (ref $_->{'param'} eq 'ARRAY')?
lib/Algorithm/Evolutionary/Op/Base.pm view on Meta::CPAN
}
$params{$_->{'-name'}} = \%params_hash;
}
}
if ($fragment->{'code'} ) {
$code_fragments{$fragment->{'code'}->{'-type'}} = $fragment->{'code'}->{'src'};
}
for ( @{$fragment->{'op'}} ) {
$ops{$_->{'-name'}} = [$_->{'-rate'}, $_];
}
#If the class is not loaded, we load it. The
eval "require $class" || croak "Can't find $class Module";
#Let the class configure itself
$self->set( \%params, \%code_fragments, \%ops );
return $self;
}
=head2 asXML( [$id] )
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
if $self->{_terminal_output};
foreach my $i (0..$self->{_KM}-1) {
$clusters[$i] = $best_subspace_based_partition_of_data{$i};
}
display_clusters(\@clusters) if $self->{_terminal_output};
# Check if any cluster has lost all its elements. If so, fragment the worst
# existing cluster to create the additional clusters needed:
if (any {@$_ == 0} @clusters) {
die "empty cluster found" if $self->{_auto_retry_flag};
print "\nOne or more clusters have become empty. Will carve out the needed clusters\n" .
"from the cluster with the largest subspace construction error.\n\n";
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
@subspace_construction_errors_this_iteration = ();
my $how_many_extra_clusters_needed = $self->{_KM} - scalar(grep {@$_ != 0} @clusters);
print "number of extra clusters needed at iteration $iteration_index: $how_many_extra_clusters_needed\n";
my $max = List::Util::max @subspace_construction_errors_this_iteration;
my $maxindex = List::Util::first {$_ == $max} @subspace_construction_errors_this_iteration;
my @cluster_fragments = cluster_split($clusters[$maxindex],
$how_many_extra_clusters_needed + 1);
my @newclusters;
push @newclusters, @clusters[0 .. $maxindex-1];
push @newclusters, @clusters[$maxindex+1 .. $self->{_KM}-1];
push @newclusters, @cluster_fragments;
@newclusters = grep {@$_ != 0} @newclusters;
die "something went wrong with cluster fragmentation"
unless $self->{_KM} = @newclusters;
@trailing_eigenvec_matrices_for_all_subspaces = ();
@reference_vecs_for_all_subspaces = ();
foreach my $cluster (@newclusters) {
die "Linear Manifold Clustering did not work $!" if @$cluster == 0;
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
################################### Support Routines ########################################
sub cluster_split {
my $cluster = shift;
my $how_many = shift;
my @cluster_fragments;
foreach my $i (0..$how_many-1) {
$cluster_fragments[$i] = [];
}
my $delta = int( scalar(@$cluster) / $how_many );
my $j = 0;
foreach my $i (0..@$cluster-1) {
push @{$cluster_fragments[int($i/$delta)]}, $cluster->[$i];
}
my $how_many_accounted_for = reduce {$a + $b} map {scalar(@$_)} @cluster_fragments;
foreach my $frag (@cluster_fragments) {
print "fragment: @$frag\n";
}
die "the fragmentation could not account for all the data"
unless @$cluster == $how_many_accounted_for;
return @cluster_fragments;
}
# Returns the minimum value and its positional index in an array
sub minimum {
my $arr = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Loops.pm view on Meta::CPAN
my @copy= Filter( sub {s/\s/_/g}, @list );
=head3 Note on "Function BLOCK LIST" bugs
Note that in at least some versions of Perl, support for the "Filter
BLOCK ..." syntax is somewhat fragile. For example:
... Filter( {y/aeiou/UAEIO/} @list );
may give you this error:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Nhash.pm view on Meta::CPAN
Procedural usage:
use Algorithm::Nhash qw( nhash );
# prints 228769
print nhash('supercalifragilisticexpialidocious');
# prints 417 (which is 228769 % 512)
print nhash('supercalifragilisticexpialidocious', 512);
# prints '6/33' (6*64 + 3 == 417)
print nhash('supercalifragilisticexpialidocious', 8, 64);
# assigns (6, 33) to @nhash
my @nhash = nhash('supercalifragilisticexpialidocious', 8, 64);
OO usage:
use Algorithm::Nhash;
my $nhash = new Algorithm::Nhash 8, 64;
# prints '6/33'
print $nhash->nhash('supercalifragilisticexpialidocious');
And how Exim does it:
# prints '6/33'
exim4 -be '${nhash_8_64:supercalifragilisticexpialidocious}'
# prints '417' (which is 6*64+33)
exim4 -be '${nhash_512:supercalifragilisticexpialidocious}'
=head1 DESCRIPTION
This is an implementation of the Exim nhash algorithm. It also supports an
arbitrary number of divisors and not just the one or two that Exim permits.
lib/Algorithm/Nhash.pm view on Meta::CPAN
for later use.
=head2 nhash
# OO invocation
print $nhash->nhash('supercalifragilisticexpialidocious');
# procedural invocation
print nhash('supercalifragilisticexpialidocious', 8, 64);
This calculates the nhash of the given string. In scalar context, it returns
the nhash values as a string with slashes separating the components, like
C<"6/33">. In list context, it returns a list of values like C<(6, 33)>.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/RabinKarp.pm view on Meta::CPAN
=head1 INTENT
By preprocessing your document with the Rabin Karp hashing algorithm,
it makes it possible to create a "fingerprint" of your document (or documents),
and then perform multiple searches for fragments contained within your document
database.
Schleimer, Wilkerson, and Aiken suggest preproccessing to remove
unnecessary information (like whitespace), as well as known redundent information
(like, say, copyright notices or other boilerplate that is 'acceptable'.)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/SpatialIndex/Storage/DBI.pm view on Meta::CPAN
Returns an array reference containing the item coordinate type strings.
=head2 node_coord_create_sql
Returns the precomputed SQL fragment of the node coordinate
columns (C<CREATE TABLE> syntax).
=head2 no_of_subnodes
Returns the no. of subnodes per node.
=head2 subnodes_create_sql
Returns the precomputed SQL fragment of the subnode id
columns (C<CREATE TABLE> syntax).
=head2 config
Returns the hash reference of configuration options
lib/Algorithm/SpatialIndex/Storage/DBI.pm view on Meta::CPAN
=head2 _coord_types_to_sql
Given an array ref containing coordinate type strings
(cf. L<Algorithm::SpatialIndex::Strategy>),
stores the SQL fragments for C<SELECT>
and C<CREATE TABLE> for the node coordinates.
The coordinates will be called C<c$i> where C<$i>
starts at 0.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/TicketClusterer.pm view on Meta::CPAN
Identifying old tickets similar to a new ticket is made challenging by the
fact that folks who submit tickets often write them quickly and informally.
The informal style of writing means that different people may use different
colloquial terms to describe the same thing. And the quickness associated
with their submission causes the tickets to frequently contain spelling and
other errors such as conjoined words, fragmentation of long words, and so
on.
This module is an attempt at dealing with these challenges.
The problem of different people using different words to describe the same
view all matches for this distribution
view release on metacpan or search on metacpan
share/static/alice.js view on Meta::CPAN
content = Object.toHTML(content);
var parent = element.parentNode, tagName = parent.tagName.toUpperCase();
if (Element._insertionTranslations.tags[tagName]) {
var nextSibling = element.next(),
fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
parent.removeChild(element);
if (nextSibling)
fragments.each(function(node) { parent.insertBefore(node, nextSibling) });
else
fragments.each(function(node) { parent.appendChild(node) });
}
else element.outerHTML = content.stripScripts();
content.evalScripts.bind(content).defer();
return element;
share/static/alice.js view on Meta::CPAN
this.setStart(this.endContainer, this.endOffset);
},
cloneContents: function() {
return (function cloneSubtree(iterator) {
for (var node, frag = document.createDocumentFragment(); node = iterator.next(); ) {
node = node.cloneNode(!iterator.hasPartialSubtree());
if (iterator.hasPartialSubtree())
node.appendChild(cloneSubtree(iterator.getSubtreeIterator()));
frag.appendChild(node);
}
return frag;
})(new RangeIterator(this));
},
extractContents: function() {
var range = this.cloneRange();
if (this.startContainer != this.commonAncestorContainer)
this.setStartAfter(DOMUtils.findClosestAncestor(this.commonAncestorContainer, this.startContainer));
this.collapse(true);
return (function extractSubtree(iterator) {
for (var node, frag = document.createDocumentFragment(); node = iterator.next(); ) {
iterator.hasPartialSubtree() ? node = node.cloneNode(false) : iterator.remove();
if (iterator.hasPartialSubtree())
node.appendChild(extractSubtree(iterator.getSubtreeIterator()));
frag.appendChild(node);
}
return frag;
})(new RangeIterator(range));
},
deleteContents: function() {
var range = this.cloneRange();
if (this.startContainer != this.commonAncestorContainer)
share/static/alice.js view on Meta::CPAN
return this._toTextRange().text;
},
createContextualFragment: function(tagString) {
var content = (DOMUtils.isDataNode(this.startContainer) ? this.startContainer.parentNode : this.startContainer).cloneNode(false);
content.innerHTML = tagString;
for (var fragment = this._document.createDocumentFragment(); content.firstChild; )
fragment.appendChild(content.firstChild);
return fragment;
}
};
function RangeIterator(range) {
this.range = range;
view all matches for this distribution