view release on metacpan or search on metacpan
ck_return|||
ck_rfun|||
ck_rvconst|||
ck_sassign|||
ck_say|||
ck_select|||
ck_shift|||
ck_sort|||
ck_spair|||
ck_split|||
ck_subr|||
view all matches for this distribution
view release on metacpan or search on metacpan
bool is_upper_bound(int i) { return alpha_status[i] == UPPER_BOUND; }
bool is_lower_bound(int i) { return alpha_status[i] == LOWER_BOUND; }
bool is_free(int i) { return alpha_status[i] == FREE; }
void swap_index(int i, int j);
void reconstruct_gradient();
virtual int select_working_set(int &i, int &j);
virtual double calculate_rho();
virtual void do_shrinking();
private:
bool be_shrunken(int i, double Gmax1, double Gmax2);
};
if(shrinking) do_shrinking();
info("."); info_flush();
}
int i,j;
if(select_working_set(i,j)!=0)
{
// reconstruct the whole gradient
reconstruct_gradient();
// reset active set size and check
active_size = l;
info("*"); info_flush();
if(select_working_set(i,j)!=0)
break;
else
counter = 1; // do shrinking next iteration
}
delete[] G;
delete[] G_bar;
}
// return 1 if already optimal, return 0 otherwise
int Solver::select_working_set(int &out_i, int &out_j)
{
// return i,j such that
// i: maximizes -y_i * grad(f)_i, i in I_up(\alpha)
// j: minimizes the decrease of obj value
// (if quadratic coefficeint <= 0, replace it with tau)
this->si = si;
Solver::Solve(l,Q,p,y,alpha,Cp,Cn,eps,si,shrinking);
}
private:
SolutionInfo *si;
int select_working_set(int &i, int &j);
double calculate_rho();
bool be_shrunken(int i, double Gmax1, double Gmax2, double Gmax3, double Gmax4);
void do_shrinking();
};
// return 1 if already optimal, return 0 otherwise
int Solver_NU::select_working_set(int &out_i, int &out_j)
{
// return i,j such that y_i = y_j and
// i: maximizes -y_i * grad(f)_i, i in I_up(\alpha)
// j: minimizes the decrease of obj value
// (if quadratic coefficeint <= 0, replace it with tau)
view all matches for this distribution
view release on metacpan or search on metacpan
SetCovering.pm view on Meta::CPAN
Create a new Algorithm::SetCovering object. The mandatory parameter
C<columns> needs to be set to the number of columns in the matrix
(the number of locks in the introductory example).
C<mode> is optional and selects an algorithm for finding the solution.
The following values for C<mode> are implemented:
=over 4
=item "brute_force"
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Simplex.pm view on Meta::CPAN
sub determine_bland_pivot_row_number {
my ($self, $positive_ratios, $positive_ratio_row_numbers) = @_;
# Now that we have the ratios and their respective rows we can find the min
# and then select the lowest bland min if there are ties.
my @min_indices = $self->min_index($positive_ratios);
my @min_ratio_row_numbers =
map { $positive_ratio_row_numbers->[$_] } @min_indices;
my @bland_number_for_min_ratio_rows;
foreach my $row_number (@min_ratio_row_numbers) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/SpatialIndex/Storage/DBI.pm view on Meta::CPAN
table_prefix
no_of_coords
coord_types
node_coord_create_sql
node_coord_select_sql
node_coord_insert_sql
no_of_subnodes
subnodes_create_sql
subnodes_select_sql
subnodes_insert_sql
bucket_size
item_coord_types
lib/Algorithm/SpatialIndex/Storage/DBI.pm view on Meta::CPAN
my $config_existed = $self->_read_config_table;
$self->{no_of_coords} = scalar(@{$self->coord_types});
$self->_coord_types_to_sql($self->coord_types);
$self->_subnodes_sql($self->no_of_subnodes);
$self->{_fetch_node_sql} = qq(SELECT id, $self->{node_coord_select_sql}, $self->{subnodes_select_sql} FROM ${table_prefix}_nodes WHERE id=?);
my $qlist = '?,' x ($self->no_of_subnodes + @{$self->coord_types});
$qlist =~ s/,$//;
$self->{_write_new_node_sql} = qq{INSERT INTO $node_table_name (}
. $self->node_coord_select_sql . ', '
. $self->subnodes_select_sql
. qq{) VALUES($qlist)};
$self->{_write_node_sql} = qq{UPDATE $node_table_name SET id=?, }
. $self->node_coord_insert_sql . ', '
. $self->subnodes_insert_sql
. ' WHERE id=?';
lib/Algorithm/SpatialIndex/Storage/DBI.pm view on Meta::CPAN
my $sql = qq#
SELECT id, value
FROM ${table_prefix}_options
#;
$success = eval {
$opt = $dbh->selectall_hashref($sql, 'id');
my $err = $dbh->errstr;
die $err if $err;
1;
};
}
lib/Algorithm/SpatialIndex/Storage/DBI.pm view on Meta::CPAN
sub fetch_bucket {
my $self = shift;
my $node_id = shift;
my $dbh = $self->dbh_ro;
my $selsql = $self->{buckets_select_sql};
# This throws SEGV in the driver
#my $sth = $dbh->prepare_cached($selsql);
#$sth->execute($node_id) or die $dbh->errstr;
#my $row = $sth->fetchrow_arrayref;
#$sth->finish;
my $rows = $dbh->selectall_arrayref($selsql, {}, $node_id);
my $row = $rows->[0];
return undef if not defined $row;
my $items = [];
my $n = scalar(@{$self->item_coord_types}) + 1;
while (@$row > 1) {
lib/Algorithm/SpatialIndex/Storage/DBI.pm view on Meta::CPAN
double => 'DOUBLE',
integer => 'INTEGER',
unsigned => 'INTEGER UNSIGNED',
);
my $create_sql = '';
my $select_sql = '';
my $insert_sql = '';
my $i = 0;
foreach my $type (@$types) {
my $sql_type = $types{lc($type)};
die "Invalid coord type '$type'" if not defined $sql_type;
$create_sql .= " c$i $sql_type, ";
$select_sql .= " c$i, ";
$insert_sql .= " c$i=?, ";
$i++;
}
$create_sql =~ s/, \z//;
$select_sql =~ s/, \z//;
$insert_sql =~ s/, \z//;
$self->{node_coord_create_sql} = $create_sql;
$self->{node_coord_select_sql} = $select_sql;
$self->{node_coord_insert_sql} = $insert_sql;
}
=head2 _subnodes_sql
lib/Algorithm/SpatialIndex/Storage/DBI.pm view on Meta::CPAN
sub _subnodes_sql {
my $self = shift;
my $no_subnodes = shift;
my $create_sql = '';
my $select_sql = '';
my $insert_sql = '';
my $i = 0;
my $node_id_type = NODE_ID_TYPE;
foreach my $i (0..$no_subnodes-1) {
$create_sql .= " sn$i $node_id_type, ";
$select_sql .= " sn$i, ";
$insert_sql .= " sn$i=?, ";
$i++;
}
$create_sql =~ s/, \z//;
$select_sql =~ s/, \z//;
$insert_sql =~ s/, \z//;
$self->{subnodes_create_sql} = $create_sql;
$self->{subnodes_select_sql} = $select_sql;
$self->{subnodes_insert_sql} = $insert_sql;
}
sub _bucket_sql {
my $self = shift;
lib/Algorithm/SpatialIndex/Storage/DBI.pm view on Meta::CPAN
my $c = 0;
("i$i INTEGER", map "i${i}c".$c++." $_", @$item_coord_types)
} 0..$bsize-1
)
. ')';
$self->{buckets_select_sql} = qq{SELECT * FROM $tname WHERE node_id=?};
my $insert_id_list = join(
', ',
map {
my $i = $_;
view all matches for this distribution
view release on metacpan or search on metacpan
ck_require|||
ck_return|||
ck_rfun|||
ck_rvconst|||
ck_sassign|||
ck_select|||
ck_shift|||
ck_sort|||
ck_spair|||
ck_split|||
ck_subr|||
view all matches for this distribution
view release on metacpan or search on metacpan
ck_require|||
ck_return|||
ck_rfun|||
ck_rvconst|||
ck_sassign|||
ck_select|||
ck_shift|||
ck_sort|||
ck_spair|||
ck_split|||
ck_subr|||
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/TicketClusterer.pm view on Meta::CPAN
In order to deal with the pros and the cons of using synonyms, the present
module strikes a middle ground: You can specify how many synonyms to use
for a word (assuming that the number of synonyms supplied by WordNet is
larger than the number specified). This allows you to experiment with
retrieval precision by altering the number of synonyms used. The retained
synonyms are selected randomly from those supplied by WordNet. (A smarter
way to select synonyms would be to base them on the context. For example,
you would not want to use the synonym `programmer' for the noun `developer'
if your application domain is real-estate. However, such context-dependent
selection of synonyms would take us into the realm of ontologies that I
have chosen to stay away from in this first version of the module.)
Another issue related to the overall run-time performance of this module is
the computational cost of the calls to WordNet through its Perl interface
C<WordNet::QueryData>. This module uses what I have referred to as
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/TrunkClassifier.pm view on Meta::CPAN
my $OUTPUT = "."; #Name of output folder
my $LEVELS = 0; #Number of levels in decision trunks (forced)
my $PROSPECT = ""; #Check input data without running classifier
my $SUPPFILE = ""; #File containing class information
my $VERBOSE = 0; #Report progress during classifier run
my $USEALL = 0; #Circumvent level selection and use all trunks for classification
my $DATAFILE = ""; #File containing input data
#Description: Wrapper function for running the decision trunk classifier
#Parameters: Command line arguments
#Return value: None
view all matches for this distribution
view release on metacpan or search on metacpan
examples/corpus/BoxLayoutTest.java view on Meta::CPAN
BorderFactory.createEmptyBorder( 10, 10, 10, 10 ) ); //(G)
contentPane.add( listPanel, BorderLayout.CENTER ); //(H)
JButton cancelButton = new JButton( "Cancel" );
JButton selectButton = new JButton( "Select" );
JPanel buttonPanel = new JPanel(); //(I)
buttonPanel.setLayout(
new BoxLayout( buttonPanel, BoxLayout.X_AXIS ) );
buttonPanel.setBorder(
BorderFactory.createEmptyBorder(0,10,10,10 ) );
buttonPanel.add( Box.createHorizontalGlue() );
buttonPanel.add( cancelButton );
buttonPanel.add(
Box.createRigidArea( new Dimension( 10, 0 ) ) );
buttonPanel.add( selectButton );
contentPane.add( buttonPanel, BorderLayout.SOUTH ); //(J)
f.pack();
f.setLocation( 200, 300 );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Voting/Sortition.pm view on Meta::CPAN
Verifiable Nominations Committee (NomCom) Random Selection"
(L<http://tools.ietf.org/html/rfc3797>):
=over 4
This document describes a method for making random selections in such a way
that the unbiased nature of the choice is publicly verifiable. As an example,
the selection of the voting members of the IETF Nominations Committee (NomCom)
from the pool of eligible volunteers is used. Similar techniques would be
applicable to other cases.
=back
view all matches for this distribution
view release on metacpan or search on metacpan
t/Relativity.test view on Meta::CPAN
condition. We can express this as follows: The magnitude
ds2 = dx2 + dy2 + dz2 - c^2dt2,
which belongs to two adjacent points of the four-dimensional
space-time continuum, has the same value for all selected (Galileian)
reference-bodies. If we replace x, y, z, sq. rt. -I . ct , by x[1],
x[2], x[3], x[4], we also obtaill the result that
ds2 = dx[1]^2 + dx[2]^2 + dx[3]^2 + dx[4]^2.
t/Relativity.test view on Meta::CPAN
extent. But as regards the deductions from the theories which are
capable of being tested, the agreement between the theories may be so
complete that it becomes difficult to find any deductions in which the
two theories differ from each other. As an example, a case of general
interest is available in the province of biology, in the Darwinian
theory of the development of species by selection in the struggle for
existence, and in the theory of development which is based on the
hypothesis of the hereditary transmission of acquired characters.
We have another instance of far-reaching agreement between the
deductions from two theories in Newtonian mechanics on the one hand,
view all matches for this distribution
view release on metacpan or search on metacpan
examples/dlx.pl view on Meta::CPAN
print<<HELP
Usage: $script -[options] <input>
Option flags are:
-p print solutions as a line with selected row indices
-v print solutions by outputting the rows themselves
-t print nodes inspected for each recursion level
-s input is a sparse matrix
The first line of input states the problem matrix width (all columns), optionally
view all matches for this distribution
view release on metacpan or search on metacpan
0.000004 Sat Jul 8 14:37:12 2017
* Added missing dependency on Keyword::Declare
(Thanks, Father C.)
* Corrected version selection for refaliasing
(Thanks, Father C...for both the report and for refaliasing! :-)
0.000005 Mon Jun 11 21:53:59 2018
view all matches for this distribution
view release on metacpan or search on metacpan
share/static/alice-dark.css view on Meta::CPAN
div#tab_menu_right ul {
right: -1px;
left: auto; }
.dropdown li.selectedset,
.dropdown li.unread {
font-weight: bold; }
.tab_menu.active {
background: url(image/sprites.png) 4px -275px no-repeat; }
share/static/alice-dark.css view on Meta::CPAN
height: 14px;
border: 2px solid white;
margin: 4px;
padding: 0; }
div#input div.editor_toolbar button.selected {
color: white; }
.bold {
font-weight: bold; }
share/static/alice-dark.css view on Meta::CPAN
font-size: 0.8em; }
div.config span {
font-size: 0.8em; }
div.config select {
width: 135px;
font-size: 0.8em;
outline: 0 none; }
div.config select[multiple] {
height: 70px;
background: black;
color: white; }
div.config div.sidebar div.controls {
view all matches for this distribution
view release on metacpan or search on metacpan
corpus/libpalindrome/config.guess view on Meta::CPAN
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
# compatibility and a consistent mechanism for selecting the
# object file format.
#
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Base/ModuleBuild.pm view on Meta::CPAN
# alien_share_dir: folder name for the "install" of the library
# this is added (unshifted) to the @{share_dir->{dist}}
# N.B. is reset during constructor to be full folder name
__PACKAGE__->add_property('alien_share_dir' => '_share' );
# alien_selection_method: name of method for selecting file: (todo: newest, manual)
# default is specified later, when this is undef (see alien_check_installed_version)
__PACKAGE__->add_property( alien_selection_method => 'newest' );
# alien_build_commands: arrayref of commands for building
__PACKAGE__->add_property(
alien_build_commands =>
default => [ '%c --prefix=%s', 'make' ],
lib/Alien/Base/ModuleBuild.pm view on Meta::CPAN
# force newest for all automated testing
#TODO (this probably should be checked for "input needed" rather than blindly assigned)
if ($ENV{AUTOMATED_TESTING}) {
$self->alien_selection_method('newest');
}
$self->config_data( 'finished_installing' => 0 );
if(any { /(?<!\%)\%p/ } map { ref($_) ? @{$_} : $_ } @{ $self->alien_build_commands }) {
view all matches for this distribution
view release on metacpan or search on metacpan
> bazel
What use cases will this Alien provide? You may choose more than one: tool
Which pkg-config names (if any) should be used to detect system install? You may space separate multiple names.
>
Do you want to install the specific version from the URL above, or the latest version? latest
Multiple build systems were detected in the tarball; select the most reliable one of: autoconf cmake make
Choose build system. manual
[:DefaultModuleMaker] making module lib/Alien/Bazel.pm from template
[:DefaultModuleMaker] making alienfile from template
[:DefaultModuleMaker] making t/alien_bazel.t from template
[DZ] writing files to .../repos_gitlab/Alien-Bazel
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
use warnings;
use ExtUtils::MakeMaker;
use Alien::Build::MM;
if ( -e '.gitignore' ) {
system('podselect lib/Alien/Boost/Headers.pm > README.pod');
}
if ( $^O eq 'MSWin32' ) {
print STDERR "Win32 is currently not supported";
exit(0);
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
use warnings;
use ExtUtils::MakeMaker;
use Alien::Build::MM;
if ( -e '.gitignore' ) {
system('podselect lib/Alien/Boost/ProgramOptions.pm > README.pod');
}
if ( $^O eq 'MSWin32' ) {
print STDERR "Win32 is currently not supported";
exit(0);
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
use warnings;
use ExtUtils::MakeMaker;
use Alien::Build::MM;
if ( -e '.gitignore' ) {
system('podselect lib/Alien/Boost.pm > README.pod');
}
if ( $^O eq 'MSWin32' ) {
print STDERR "Win32 is currently not supported";
exit(0);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Build/Plugin/Download/Git.pm view on Meta::CPAN
version => qr/^v([0-9\.]+)$/,
);
=head1 DESCRIPTION
This plugin downloads projects using git and selects the appropriate tag for
building. Typically you want to build using the most recent production tag,
not just whatever C<master> happens to be at the moment.
This plugin uses these plugins to do the heavy lifting:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Build/Plugin/Download/GitHub.pm view on Meta::CPAN
Regular expression that can be used to extract a version from a GitHub tag. The
default ( C<qr/^v?(.*)$/> ) is reasonable for many GitHub repositories.
=head2 prefer
How to sort candidates for selection. This should be one of three types of values:
=over 4
=item code reference
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Build/Plugin/Probe/OverrideCI.pm view on Meta::CPAN
- ALIEN_INSTALL_TYPE_CI=system
In your appveyor.yml
install:
- ... # however you install/select which Perl to use
- cpanm -n Alien::Build::Plugin::Probe::OverrideCI
- cpanm -n --installdeps .
environment:
ALIEN_BUILD_PRELOAD: Probe::OverrideCI
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Build/Plugin/Download/Negotiate.pm view on Meta::CPAN
Regular expression to parse out the version from a filename. The regular expression
should store the result in C<$1>.
Note: if you provide a C<version> property, this plugin will assume that you will
be downloading an initial index to select package downloads from. Depending on
the protocol (and typically this is the case for http and HTML) that may bring in
additional dependencies. If start_url points to a tarball or other archive directly
(without needing to do through an index selection process), it is recommended that
you not specify this property.
=head2 ssl
If your initial URL does not need SSL, but you know ahead of time that a subsequent
lib/Alien/Build/Plugin/Download/Negotiate.pm view on Meta::CPAN
The implementation may improve over time, but as of this writing, this option relies on you
having a working C<curl> or C<wget> with SSL support in your C<PATH>.
=head2 prefer
How to sort candidates for selection. This should be one of three types of values:
=over 4
=item code reference
view all matches for this distribution
view release on metacpan or search on metacpan
tidyall.ini view on Meta::CPAN
[PerlTidy]
select = **/*.{pl,pm,t}
argv = --noprofile -se -w -conv -pt=0 -sot -sct -bbao -fbl -blbs=2 -nolq -nsbl -nvmll -tso
view all matches for this distribution
view release on metacpan or search on metacpan
tidyall.ini view on Meta::CPAN
[PerlTidy]
select = **/*.{pl,pm,t}
argv = --profile=perltidy.rc -nst
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Capstone.pm view on Meta::CPAN
Vikas N Kumar <vikas@cpan.org>
=head1 REPOSITORY
L<https://github.com/selectiveintellect/p5-alien-capstone.git>
=head1 COPYRIGHT
Copyright (C) 2016. Selective Intellect LLC <github@selectiveintellect.com>. All Rights Reserved.
=head1 LICENSE
This is free software under the MIT license.
view all matches for this distribution
view release on metacpan or search on metacpan
cp/codepress/engines/gecko.js view on Meta::CPAN
getRangeAndCaret : function() {
var range = window.getSelection().getRangeAt(0);
var range2 = range.cloneRange();
var node = range.endContainer;
var caret = range.endOffset;
range2.selectNode(node);
return [range2.toString(),caret];
},
insertCode : function(code,replaceCursorBefore) {
var range = window.getSelection().getRangeAt(0);
cp/codepress/engines/gecko.js view on Meta::CPAN
// Insert text at cursor position
selct.removeAllRanges();
range.deleteContents();
range.insertNode(node);
// Move the cursor to the end of text
range2.selectNode(node);
range2.collapse(replaceCursorBefore);
selct.removeAllRanges();
selct.addRange(range2);
},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBD/SQLite/BundledExtensions.pm view on Meta::CPAN
my ($self, $dbh, $extension_name) = @_;
my $file = $self->_locate_extension_library($extension_name);
$dbh->sqlite_enable_load_extension(1);
$dbh->do("select load_extension(?)", {}, $file)
or die "Cannot load '$extension_name' extension: " . $dbh->errstr();
}
sub _locate_extension_library {
my ($self, $extension_name) = @_;
view all matches for this distribution