integer
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 367
Set::Integer::Gapfillers 0.07
Set::Integer::Gapfillers is a Perl module that can fill in the gaps between integer ranges. more>>
Set::Integer::Gapfillers is a Perl module that can fill in the gaps between integer ranges.
SYNOPSIS
use Set::Integer::Gapfillers;
$gf = Set::Integer::Gapfillers->new(
lower => -12,
upper => 62,
sets => [
[ 1, 17 ], # Note: Use comma, not
[ 25, 42 ], # range operator (..)
[ 44, 50 ],
],
);
$segments_needed_ref = $gf->segments_needed();
$gapfillers_ref = $gf->gapfillers();
$all_segments_ref = $gf->all_segments();
Any of the three preceding output methods can also be called with an expand option:
$segments_needed_ref = $gf->segments_needed( expand => 1 );
This Perl extension provides methods which may be useful in manipulating sets whose elements are consecutive integers. Suppose that you are provided with the following non-intersecting, non-overlapping sets of consecutive integers:
{ 1 .. 17 }
{ 25 .. 42 }
{ 44 .. 50 }
Suppose further that you are provided with the following lower and upper bounds to a range of consecutive integers:
lower: 12
upper: 62
Provide a set of sets which:
when joined together, would form a set of consecutive integers from the lower to the upper bound, inclusive; and
are derived from:
the sets provided;
proper subsets thereof; or
newly generated sets which fill in the gaps below, in between or above the provided sets.
Once a Set::Integer::Gapfillers object has been constructed, its segments_needed() method can be used to provide these results:
{ 12 .. 17 } # subset of 1st set provided
{ 18 .. 24 } # gap-filler set
{ 25 .. 42 } # 2nd set provided
{ 43 .. 43 } # gap-filler set
# (which happens to consist of a single element)
{ 44 .. 50 } # 3rd set provided
{ 51 .. 62 } # gap-filler set for range above highest provided set
Alternatively, you may only wish to examine the gap-filler sets. The gapfillers() method provides this set of sets.
{ 18 .. 24 } # gap-filler set
{ 43 .. 43 } # gap-filler set
{ 51 .. 62 } # gap-filler set
And, as an additional alternative, you may wish to have your set of sets begin or end with all the values of a given provided set, rather than a proper subset thereof containing only those values needed to populate the desired range. In that case, use the all_segments() method.
{ 1 .. 17 } # 1st set provided
{ 18 .. 24 } # gap-filler set
{ 25 .. 42 } # 2nd set provided
{ 43 .. 43 } # gap-filler set
# (which happens to consist of a single element)
{ 44 .. 50 } # 3rd set provided
{ 51 .. 62 } # gap-filler set for range above highest provided set
The results returned by the all_segments() method differ from those returned by the segments_needed() method only at the lower or upper ends. If, as in the above example, the lower bound of the target range of integers falls inside a provided segment, the first set returned by all_segments() will be the entire first set provided; the first set returned by segments_needed() will be a proper subset of the first set provided, starting with the requested lower bound.
<<lessSYNOPSIS
use Set::Integer::Gapfillers;
$gf = Set::Integer::Gapfillers->new(
lower => -12,
upper => 62,
sets => [
[ 1, 17 ], # Note: Use comma, not
[ 25, 42 ], # range operator (..)
[ 44, 50 ],
],
);
$segments_needed_ref = $gf->segments_needed();
$gapfillers_ref = $gf->gapfillers();
$all_segments_ref = $gf->all_segments();
Any of the three preceding output methods can also be called with an expand option:
$segments_needed_ref = $gf->segments_needed( expand => 1 );
This Perl extension provides methods which may be useful in manipulating sets whose elements are consecutive integers. Suppose that you are provided with the following non-intersecting, non-overlapping sets of consecutive integers:
{ 1 .. 17 }
{ 25 .. 42 }
{ 44 .. 50 }
Suppose further that you are provided with the following lower and upper bounds to a range of consecutive integers:
lower: 12
upper: 62
Provide a set of sets which:
when joined together, would form a set of consecutive integers from the lower to the upper bound, inclusive; and
are derived from:
the sets provided;
proper subsets thereof; or
newly generated sets which fill in the gaps below, in between or above the provided sets.
Once a Set::Integer::Gapfillers object has been constructed, its segments_needed() method can be used to provide these results:
{ 12 .. 17 } # subset of 1st set provided
{ 18 .. 24 } # gap-filler set
{ 25 .. 42 } # 2nd set provided
{ 43 .. 43 } # gap-filler set
# (which happens to consist of a single element)
{ 44 .. 50 } # 3rd set provided
{ 51 .. 62 } # gap-filler set for range above highest provided set
Alternatively, you may only wish to examine the gap-filler sets. The gapfillers() method provides this set of sets.
{ 18 .. 24 } # gap-filler set
{ 43 .. 43 } # gap-filler set
{ 51 .. 62 } # gap-filler set
And, as an additional alternative, you may wish to have your set of sets begin or end with all the values of a given provided set, rather than a proper subset thereof containing only those values needed to populate the desired range. In that case, use the all_segments() method.
{ 1 .. 17 } # 1st set provided
{ 18 .. 24 } # gap-filler set
{ 25 .. 42 } # 2nd set provided
{ 43 .. 43 } # gap-filler set
# (which happens to consist of a single element)
{ 44 .. 50 } # 3rd set provided
{ 51 .. 62 } # gap-filler set for range above highest provided set
The results returned by the all_segments() method differ from those returned by the segments_needed() method only at the lower or upper ends. If, as in the above example, the lower bound of the target range of integers falls inside a provided segment, the first set returned by all_segments() will be the entire first set provided; the first set returned by segments_needed() will be a proper subset of the first set provided, starting with the requested lower bound.
Download (0.017MB)
Added: 2007-06-29 License: Perl Artistic License Price:
847 downloads
Solving Constraint Integer Programs 0.90
Solving Constraint Integer Programs is a framework for constraint integer programming. more>>
Solving Constraint Integer Programs is a framework for constraint integer programming. For solving Integer Programs and Constraint Programs, a very similar technique is used: the problem is successively divided into smaller subproblems (branching) that are solved recursively.
On the other hand, Integer Programming and Constraint Programming have different strengths: Integer Programming uses LP relaxations and cutting planes to provide strong dual bounds, while Constraint Programming can handle arbitrary (non-linear) constraints and uses propagation to tighten the variables domains.
SCIP is a framework for Constraint Integer Programming oriented towards the needs of Mathematical Programming experts who want to have total control of the solution process and access detailed information down to the guts of the solver. SCIP can also be used as pure MIP solver or as framework for branch-cut-and-price.
Main features:
- It is a framework for branching, cutting, pricing, and propagation.
- It is highly flexible through many possible user plugins:
- constraint handlers to implement arbitrary constraints,
- variable pricers to dynamically create problem variables,
- domain propagators to apply constraint independent propagations on the variables domains,
- cut separators to apply cutting planes on the LP relaxation,
- relaxators to provide relaxations and dual bounds in addition to the LP relaxation,
- primal heuristics to search for feasible solutions with specific support for probing and diving,
- node selectors to guide the search,
- branching rules to split the problem into subproblems,
- presolvers to simplify the solved problem,
- file readers to parse different input file formats,
- event handlers to be informed on specific events, e.g., when a node was solved, a specific variable changed its bounds, or a new primal solution was found,
- display handlers to create additional columns in the solvers output.
- dialog handlers to extend the included command shell.
- Every existing unit is implemented as a plugin, leading to an interface flexible enough to meet the needs of most additional user extensions.
- A dynamic cut pool management is included.
- The user may mix preprocessed and active problem variables in expressions: they are automatically transformed to corresponding active problem variables.
- Arbitrarily many children per node can be created, and the different children can be arbitrarily defined.
- It has an open LP solver support (currently supporting ILOG CPLEX, Dash XPress-MP, SoPlex, and CLP.
- The LP relaxation need not to be solved at every single node (it can even be turned off completely, mimicing a pure constraint solver).
- Additional relaxations (e.g., semidefinite relaxations or Lagrangian relaxations) can be included, working in parallel or interleaved.
- Conflict analysis can be applied to learn from infeasible subproblems.
- Dynamic memory management reduces the number of operation system calls with automatic memory leakage detection in debug mode.
Enhancements:
- The new heuristics "RENS", "mutation", "veclendiving", and "intshifting", were included.
- The existing ones were improved.
- Presolving and c-MIR cut generation were improved.
- A few bugs were fixed.
<<lessOn the other hand, Integer Programming and Constraint Programming have different strengths: Integer Programming uses LP relaxations and cutting planes to provide strong dual bounds, while Constraint Programming can handle arbitrary (non-linear) constraints and uses propagation to tighten the variables domains.
SCIP is a framework for Constraint Integer Programming oriented towards the needs of Mathematical Programming experts who want to have total control of the solution process and access detailed information down to the guts of the solver. SCIP can also be used as pure MIP solver or as framework for branch-cut-and-price.
Main features:
- It is a framework for branching, cutting, pricing, and propagation.
- It is highly flexible through many possible user plugins:
- constraint handlers to implement arbitrary constraints,
- variable pricers to dynamically create problem variables,
- domain propagators to apply constraint independent propagations on the variables domains,
- cut separators to apply cutting planes on the LP relaxation,
- relaxators to provide relaxations and dual bounds in addition to the LP relaxation,
- primal heuristics to search for feasible solutions with specific support for probing and diving,
- node selectors to guide the search,
- branching rules to split the problem into subproblems,
- presolvers to simplify the solved problem,
- file readers to parse different input file formats,
- event handlers to be informed on specific events, e.g., when a node was solved, a specific variable changed its bounds, or a new primal solution was found,
- display handlers to create additional columns in the solvers output.
- dialog handlers to extend the included command shell.
- Every existing unit is implemented as a plugin, leading to an interface flexible enough to meet the needs of most additional user extensions.
- A dynamic cut pool management is included.
- The user may mix preprocessed and active problem variables in expressions: they are automatically transformed to corresponding active problem variables.
- Arbitrarily many children per node can be created, and the different children can be arbitrarily defined.
- It has an open LP solver support (currently supporting ILOG CPLEX, Dash XPress-MP, SoPlex, and CLP.
- The LP relaxation need not to be solved at every single node (it can even be turned off completely, mimicing a pure constraint solver).
- Additional relaxations (e.g., semidefinite relaxations or Lagrangian relaxations) can be included, working in parallel or interleaved.
- Conflict analysis can be applied to learn from infeasible subproblems.
- Dynamic memory management reduces the number of operation system calls with automatic memory leakage detection in debug mode.
Enhancements:
- The new heuristics "RENS", "mutation", "veclendiving", and "intshifting", were included.
- The existing ones were improved.
- Presolving and c-MIR cut generation were improved.
- A few bugs were fixed.
Download (MB)
Added: 2006-09-01 License: Other/Proprietary License Price:
1154 downloads
Strings edit 1.9
Strings edit is a library that provides I/O facilities for integer, floating-point, Roman numbers, and strings. more>>
Strings edit is a library that provides I/O facilities for integer, floating-point, Roman numbers, and strings. Both input and output subroutines support string pointers for consequent stream processing. The output can be aligned in a fixed size field with padding.
Numeric input can be checked against expected values range to be either saturated or to raise an exception. For floating-point output either relative or absolute output precision can be specified. UTF-8 encoded strings are supported.
Enhancements:
- GPS project files were added for GNAT users.
- A bug was fixed in Strings_Edit.Generic_Scale in which the caclculated precision was of the minor scale tick rather than of the major tick.
<<lessNumeric input can be checked against expected values range to be either saturated or to raise an exception. For floating-point output either relative or absolute output precision can be specified. UTF-8 encoded strings are supported.
Enhancements:
- GPS project files were added for GNAT users.
- A bug was fixed in Strings_Edit.Generic_Scale in which the caclculated precision was of the minor scale tick rather than of the major tick.
Download (0.053MB)
Added: 2007-05-20 License: GMGPL (GNAT Modified GPL) Price:
908 downloads
PDL::LinearAlgebra::Complex 0.03
PDL::LinearAlgebra::Complex is a PDL interface to the lapack linear algebra programming library (complex number). more>>
PDL::LinearAlgebra::Complex is a PDL interface to the lapack linear algebra programming library (complex number).
SYNOPSIS
use PDL::Complex
use PDL::LinearAlgebra::Complex;
$a = r2C random (100,100);
$s = r2C zeroes(100);
$u = r2C zeroes(100,100);
$v = r2C zeroes(100,100);
$info = 0;
$job = 0;
cgesdd($a, $job, $info, $s , $u, $v);
This module provide an interface to parts of the lapack library (complex number). These routine accept either float or double piddles.
EOD
pp_defc("gesvd", HandleBad => 0, RedoDimsCode => $SIZE(r) = $PDL(A)->ndims > 2 ? min($PDL(A)->dims[1], $PDL(A)->dims[2]) : 1;, Pars => [io,phys]A(2,m,n); int jobu(); int jobvt(); [o,phys]s(r); [o,phys]U(2,p,q); [o,phys]VT(2,s,t); int [o,phys]info(), GenericTypes => [F,D], Code => generate_code
integer lwork;
char trau, travt;
types(F) %{
extern int cgesvd_(char *jobu, char *jobvt, integer *m, integer *n, float *a,
integer *lda, float *s, float *u, int *ldu,
float *vt, integer *ldvt, float *work, integer *lwork, float *rwork,
integer *info);
float *rwork;
float tmp_work[2];
%}
types(D) %{
extern int zgesvd_(char *jobz,char *jobvt, integer *m, integer *n,
double *a, integer *lda, double *s, double *u, int *ldu,
double *vt, integer *ldvt, double *work, integer *lwork, double *rwork,
integer *info);
double *rwork;
double tmp_work[2];
%}
lwork = ($PRIV(__m_size) < $PRIV(__n_size)) ? 5*$PRIV(__m_size) : 5*$PRIV(__n_size);
types(F) %{
rwork = (float *)malloc(lwork * sizeof(float));
%}
types(D) %{
rwork = (double *)malloc(lwork * sizeof(double));
%}
lwork = -1;
switch ($jobu())
{
case 1: trau = A;
break;
case 2: trau = S;
break;
case 3: trau = O;
break;
default: trau = N;
}
switch ($jobvt())
{
case 1: travt = A;
break;
case 2: travt = S;
break;
case 3: travt = O;
break;
default: travt = N;
}
$TFD(cgesvd_,zgesvd_)(
&trau,
&travt,
&$PRIV(__m_size),
&$PRIV(__n_size),
$P(A),
&$PRIV(__m_size),
$P(s),
$P(U),
&$PRIV(__p_size),
$P(VT),
&$PRIV(__s_size),
&tmp_work[0],
&lwork,
rwork,
$P(info));
lwork = (integer )tmp_work[0];
{
types(F) %{
float *work = (float *)malloc(2*lwork * sizeof(float));
%}
types(D) %{
double *work = (double *)malloc(2*lwork * sizeof(double));
%}
$TFD(cgesvd_,zgesvd_)(
&trau,
&travt,
&$PRIV(__m_size),
&$PRIV(__n_size),
$P(A),
&$PRIV(__m_size),
$P(s),
$P(U),
&$PRIV(__p_size),
$P(VT),
&$PRIV(__s_size),
work,
&lwork,
rwork,
$P(info));
free(work);
}
free(rwork);
,
Doc=>
<<lessSYNOPSIS
use PDL::Complex
use PDL::LinearAlgebra::Complex;
$a = r2C random (100,100);
$s = r2C zeroes(100);
$u = r2C zeroes(100,100);
$v = r2C zeroes(100,100);
$info = 0;
$job = 0;
cgesdd($a, $job, $info, $s , $u, $v);
This module provide an interface to parts of the lapack library (complex number). These routine accept either float or double piddles.
EOD
pp_defc("gesvd", HandleBad => 0, RedoDimsCode => $SIZE(r) = $PDL(A)->ndims > 2 ? min($PDL(A)->dims[1], $PDL(A)->dims[2]) : 1;, Pars => [io,phys]A(2,m,n); int jobu(); int jobvt(); [o,phys]s(r); [o,phys]U(2,p,q); [o,phys]VT(2,s,t); int [o,phys]info(), GenericTypes => [F,D], Code => generate_code
integer lwork;
char trau, travt;
types(F) %{
extern int cgesvd_(char *jobu, char *jobvt, integer *m, integer *n, float *a,
integer *lda, float *s, float *u, int *ldu,
float *vt, integer *ldvt, float *work, integer *lwork, float *rwork,
integer *info);
float *rwork;
float tmp_work[2];
%}
types(D) %{
extern int zgesvd_(char *jobz,char *jobvt, integer *m, integer *n,
double *a, integer *lda, double *s, double *u, int *ldu,
double *vt, integer *ldvt, double *work, integer *lwork, double *rwork,
integer *info);
double *rwork;
double tmp_work[2];
%}
lwork = ($PRIV(__m_size) < $PRIV(__n_size)) ? 5*$PRIV(__m_size) : 5*$PRIV(__n_size);
types(F) %{
rwork = (float *)malloc(lwork * sizeof(float));
%}
types(D) %{
rwork = (double *)malloc(lwork * sizeof(double));
%}
lwork = -1;
switch ($jobu())
{
case 1: trau = A;
break;
case 2: trau = S;
break;
case 3: trau = O;
break;
default: trau = N;
}
switch ($jobvt())
{
case 1: travt = A;
break;
case 2: travt = S;
break;
case 3: travt = O;
break;
default: travt = N;
}
$TFD(cgesvd_,zgesvd_)(
&trau,
&travt,
&$PRIV(__m_size),
&$PRIV(__n_size),
$P(A),
&$PRIV(__m_size),
$P(s),
$P(U),
&$PRIV(__p_size),
$P(VT),
&$PRIV(__s_size),
&tmp_work[0],
&lwork,
rwork,
$P(info));
lwork = (integer )tmp_work[0];
{
types(F) %{
float *work = (float *)malloc(2*lwork * sizeof(float));
%}
types(D) %{
double *work = (double *)malloc(2*lwork * sizeof(double));
%}
$TFD(cgesvd_,zgesvd_)(
&trau,
&travt,
&$PRIV(__m_size),
&$PRIV(__n_size),
$P(A),
&$PRIV(__m_size),
$P(s),
$P(U),
&$PRIV(__p_size),
$P(VT),
&$PRIV(__s_size),
work,
&lwork,
rwork,
$P(info));
free(work);
}
free(rwork);
,
Doc=>
Download (0.12MB)
Added: 2007-06-27 License: Perl Artistic License Price:
849 downloads
Change Control Request Manager 0.3.0
Change Control Request Manager is an online system for managing change requests for businesses. more>>
Change Control Request Manager is an online system for managing change requests for businesses. Change Control Request Manager project can be customized to fit the needs of a particular business.
Main features:
- Abillity to customize data entry fields. Field type include test, dropdown list, boolean, date, and integer.
- Search for existing CCR records.
- Custom logo. You can place your companys logo at the top.
- Custom Disclaimer message.
- User administration.
- Install script.
Enhancements:
- A reporting system was added.
- Similar to the browse order screen, you can customize the report and display a date range to print.
<<lessMain features:
- Abillity to customize data entry fields. Field type include test, dropdown list, boolean, date, and integer.
- Search for existing CCR records.
- Custom logo. You can place your companys logo at the top.
- Custom Disclaimer message.
- User administration.
- Install script.
Enhancements:
- A reporting system was added.
- Similar to the browse order screen, you can customize the report and display a date range to print.
Download (0.17MB)
Added: 2006-07-21 License: GPL (GNU General Public License) Price:
1193 downloads
Libgcrypt 1.2.3
Libgcrypt is a general purpose cryptographic library based on the code from GnuPG. more>>
Libgcrypt is a general purpose cryptographic library based on the code from GnuPG.
It provides functions for all cryptograhic building blocks:
symmetric ciphers (AES, DES, Blowfish, CAST5, Twofish, Arcfour)
hash algorithms (MD4, MD5, RIPE-MD160, SHA-1, TIGER-192), MACs (HMAC for all hash algorithms)
public key algorithms (RSA, ElGamal, DSA)
large integer functions
random numbers
and a lot of supporting functions.
<<lessIt provides functions for all cryptograhic building blocks:
symmetric ciphers (AES, DES, Blowfish, CAST5, Twofish, Arcfour)
hash algorithms (MD4, MD5, RIPE-MD160, SHA-1, TIGER-192), MACs (HMAC for all hash algorithms)
public key algorithms (RSA, ElGamal, DSA)
large integer functions
random numbers
and a lot of supporting functions.
Download (0.96MB)
Added: 2006-09-26 License: LGPL (GNU Lesser General Public License) Price:
1131 downloads
Text::Roman 3.01
Text::Roman is a Perl module that converts roman algarism in integer numbers and the contrary, recognize algarisms. more>>
Text::Roman is a Perl module that converts roman algarism in integer numbers and the contrary, recognize algarisms.
SYNOPSIS
use Text::Roman;
print roman(123);
Text::Roman::roman() is a very simple algarism converter. It converts a single integer (in arabic algarisms) at a time to its roman correspondent. The conventional roman numbers goes from 1 up to 3999. MROMANS (milhar romans) range is 1 up to 3999*1000+3999=4002999.
Up to these number we will found symbols as:??????but they do not concern this specific package. There is no concern for mix cases, like Xv, XiiI, as legal roman algarism numbers.
roman($int): return string containing the roman corresponding to the given integer, or if the integer is out of domain...
roman2int($str): return if $str is not roman or return integer if it is.
isroman($str): verify whether the given string is a conventional roman number, if it is return 1; if it is not return 0...
Quite same follows for mroman2int($str) and ismroman($str), except that these functions treat milhar romans.
<<lessSYNOPSIS
use Text::Roman;
print roman(123);
Text::Roman::roman() is a very simple algarism converter. It converts a single integer (in arabic algarisms) at a time to its roman correspondent. The conventional roman numbers goes from 1 up to 3999. MROMANS (milhar romans) range is 1 up to 3999*1000+3999=4002999.
Up to these number we will found symbols as:??????but they do not concern this specific package. There is no concern for mix cases, like Xv, XiiI, as legal roman algarism numbers.
roman($int): return string containing the roman corresponding to the given integer, or if the integer is out of domain...
roman2int($str): return if $str is not roman or return integer if it is.
isroman($str): verify whether the given string is a conventional roman number, if it is return 1; if it is not return 0...
Quite same follows for mroman2int($str) and ismroman($str), except that these functions treat milhar romans.
Download (0.003MB)
Added: 2007-07-27 License: Perl Artistic License Price:
821 downloads
NativeCall 0.4.1
NativeCall is a Java toolkit that lets you call operating system methods from whithin Java without JNI code. more>>
NativeCall is a Java toolkit that lets you call operating system methods from whithin Java without JNI code.
The current version 0.4.0 supports structs, Strings, primitive types (ints and booleans), byte and char arrays and output parameters.
NativeCall 0.4.0 implements some minor changes to make the API more consistent and easier. NativeCall project also features more unit tests.
Enhancements:
- The previous release could not create multiple pointers correctly.
- Javadoc for Win32Verifier#verifyModuleName(String) was corrected.
- Using a new Holder(null) now means new Holder(new Integer(0)).
- Constructor method IDs are now cached.
- int hashCode() methods have been optimized.
<<lessThe current version 0.4.0 supports structs, Strings, primitive types (ints and booleans), byte and char arrays and output parameters.
NativeCall 0.4.0 implements some minor changes to make the API more consistent and easier. NativeCall project also features more unit tests.
Enhancements:
- The previous release could not create multiple pointers correctly.
- Javadoc for Win32Verifier#verifyModuleName(String) was corrected.
- Using a new Holder(null) now means new Holder(new Integer(0)).
- Constructor method IDs are now cached.
- int hashCode() methods have been optimized.
Download (0.28MB)
Added: 2006-04-20 License: MIT/X Consortium License Price:
1283 downloads
Convert::PEM 0.07
Convert::PEM is Perl module that read/write encrypted ASN.1 PEM files. more>>
Convert::PEM is Perl module that read/write encrypted ASN.1 PEM files.
SYNOPSIS
use Convert::PEM;
my $pem = Convert::PEM->new(
Name => "DSA PRIVATE KEY",
ASN => qq(
DSAPrivateKey SEQUENCE {
version INTEGER,
p INTEGER,
q INTEGER,
g INTEGER,
pub_key INTEGER,
priv_key INTEGER
}
));
my $pkey = $pem->read(
Filename => $keyfile,
Password => $pwd
);
$pem->write(
Content => $pkey,
Password => $pwd,
Filename => $keyfile
);
Convert::PEM reads and writes PEM files containing ASN.1-encoded objects. The files can optionally be encrypted using a symmetric cipher algorithm, such as 3DES. An unencrypted PEM file might look something like this:
-----BEGIN DH PARAMETERS-----
MB4CGQDUoLoCULb9LsYm5+/WN992xxbiLQlEuIsCAQM=
-----END DH PARAMETERS-----
The string beginning MB4C... is the Base64-encoded, ASN.1-encoded "object."
An encrypted file would have headers describing the type of encryption used, and the initialization vector:
-----BEGIN DH PARAMETERS-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,C814158661DC1449
AFAZFbnQNrGjZJ/ZemdVSoZa3HWujxZuvBHzHNoesxeyqqidFvnydA==
-----END DH PARAMETERS-----
The two headers (Proc-Type and DEK-Info) indicate information about the type of encryption used, and the string starting with AFAZ... is the Base64-encoded, encrypted, ASN.1-encoded contents of this "object."
The initialization vector (C814158661DC1449) is chosen randomly.
<<lessSYNOPSIS
use Convert::PEM;
my $pem = Convert::PEM->new(
Name => "DSA PRIVATE KEY",
ASN => qq(
DSAPrivateKey SEQUENCE {
version INTEGER,
p INTEGER,
q INTEGER,
g INTEGER,
pub_key INTEGER,
priv_key INTEGER
}
));
my $pkey = $pem->read(
Filename => $keyfile,
Password => $pwd
);
$pem->write(
Content => $pkey,
Password => $pwd,
Filename => $keyfile
);
Convert::PEM reads and writes PEM files containing ASN.1-encoded objects. The files can optionally be encrypted using a symmetric cipher algorithm, such as 3DES. An unencrypted PEM file might look something like this:
-----BEGIN DH PARAMETERS-----
MB4CGQDUoLoCULb9LsYm5+/WN992xxbiLQlEuIsCAQM=
-----END DH PARAMETERS-----
The string beginning MB4C... is the Base64-encoded, ASN.1-encoded "object."
An encrypted file would have headers describing the type of encryption used, and the initialization vector:
-----BEGIN DH PARAMETERS-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,C814158661DC1449
AFAZFbnQNrGjZJ/ZemdVSoZa3HWujxZuvBHzHNoesxeyqqidFvnydA==
-----END DH PARAMETERS-----
The two headers (Proc-Type and DEK-Info) indicate information about the type of encryption used, and the string starting with AFAZ... is the Base64-encoded, encrypted, ASN.1-encoded contents of this "object."
The initialization vector (C814158661DC1449) is chosen randomly.
Download (0.020MB)
Added: 2006-08-17 License: Perl Artistic License Price:
1169 downloads
Set::Infinite::Basic 0.61
Set::Infinite::Basic is a Perl module with sets of intervals. more>>
Set::Infinite::Basic is a Perl module with sets of intervals.
SYNOPSIS
use Set::Infinite::Basic;
$set = Set::Infinite::Basic->new(1,2); # [1..2]
print $set->union(5,6); # [1..2],[5..6]
Set::Infinite::Basic is a Set Theory module for infinite sets.
It works on reals, integers, and objects.
This module does not support recurrences. Recurrences are implemented in Set::Infinite.
METHODS
empty_set
Creates an empty_set.
If called from an existing set, the empty set inherits the "type" and "density" characteristics.
universal_set
Creates a set containing "all" possible elements.
If called from an existing set, the universal set inherits the "type" and "density" characteristics.
until
Extends a set until another:
0,5,7 -> until 2,6,10
gives
[0..2), [5..6), [7..10)
Note: this function is still experimental.
copy
clone
Makes a new object from the objects data.
Mode functions:
$set = $set->real;
$set = $set->integer;
Logic functions:
$logic = $set->intersects($b);
$logic = $set->contains($b);
$logic = $set->is_null; # also called "is_empty"
Set functions:
$set = $set->union($b);
$set = $set->intersection($b);
$set = $set->complement;
$set = $set->complement($b); # can also be called "minus" or "difference"
$set = $set->simmetric_difference( $b );
$set = $set->span;
result is (min .. max)
Scalar functions:
$i = $set->min;
$i = $set->max;
$i = $set->size;
$i = $set->count; # number of spans
Overloaded Perl functions:
print
sort,
Global functions:
separators(@i)
chooses the interval separators.
default are [ ] ( ) .. ,.
INFINITY
returns an Infinity number.
NEG_INFINITY
returns a -Infinity number.
iterate ( sub { } )
Iterates over a subroutine.
Returns the union of partial results.
first
In scalar context returns the first interval of a set.
In list context returns the first interval of a set, and the
tail.
Works in unbounded sets
type($i)
chooses an object data type.
default is none (a normal perl SCALAR).
examples:
type(Math::BigFloat);
type(Math::BigInt);
type(Set::Infinite::Date);
See notes on Set::Infinite::Date below.
tolerance(0) defaults to real sets (default)
tolerance(1) defaults to integer sets
real defaults to real sets (default)
integer defaults to integer sets
Internal functions:
$set->fixtype;
$set->numeric;
<<lessSYNOPSIS
use Set::Infinite::Basic;
$set = Set::Infinite::Basic->new(1,2); # [1..2]
print $set->union(5,6); # [1..2],[5..6]
Set::Infinite::Basic is a Set Theory module for infinite sets.
It works on reals, integers, and objects.
This module does not support recurrences. Recurrences are implemented in Set::Infinite.
METHODS
empty_set
Creates an empty_set.
If called from an existing set, the empty set inherits the "type" and "density" characteristics.
universal_set
Creates a set containing "all" possible elements.
If called from an existing set, the universal set inherits the "type" and "density" characteristics.
until
Extends a set until another:
0,5,7 -> until 2,6,10
gives
[0..2), [5..6), [7..10)
Note: this function is still experimental.
copy
clone
Makes a new object from the objects data.
Mode functions:
$set = $set->real;
$set = $set->integer;
Logic functions:
$logic = $set->intersects($b);
$logic = $set->contains($b);
$logic = $set->is_null; # also called "is_empty"
Set functions:
$set = $set->union($b);
$set = $set->intersection($b);
$set = $set->complement;
$set = $set->complement($b); # can also be called "minus" or "difference"
$set = $set->simmetric_difference( $b );
$set = $set->span;
result is (min .. max)
Scalar functions:
$i = $set->min;
$i = $set->max;
$i = $set->size;
$i = $set->count; # number of spans
Overloaded Perl functions:
sort,
Global functions:
separators(@i)
chooses the interval separators.
default are [ ] ( ) .. ,.
INFINITY
returns an Infinity number.
NEG_INFINITY
returns a -Infinity number.
iterate ( sub { } )
Iterates over a subroutine.
Returns the union of partial results.
first
In scalar context returns the first interval of a set.
In list context returns the first interval of a set, and the
tail.
Works in unbounded sets
type($i)
chooses an object data type.
default is none (a normal perl SCALAR).
examples:
type(Math::BigFloat);
type(Math::BigInt);
type(Set::Infinite::Date);
See notes on Set::Infinite::Date below.
tolerance(0) defaults to real sets (default)
tolerance(1) defaults to integer sets
real defaults to real sets (default)
integer defaults to integer sets
Internal functions:
$set->fixtype;
$set->numeric;
Download (0.048MB)
Added: 2007-07-06 License: Perl Artistic License Price:
840 downloads
Devel::Hints 0.11
Devel::Hints is a Perl module created to access compile-time hints at runtime. more>>
Devel::Hints is a Perl module created to access compile-time hints at runtime.
SYNOPSIS
use Devel::Hints :all;
LABEL:
print cop_label(); # LABEL
cop_label(0 => FOO); # "goto FOO;" is valid after this point!
print cop_file(); # same as __FILE__
print cop_filegv(); # same as $::{_< . __FILE__}
print cop_stashpv(); # same as __PACKAGE__
print cop_stash(); # same as %{__PACKAGE__ . ::}
print cop_seq(); # an integer
print cop_arybase(); # same as $[
print cop_line(); # same as __LINE__
use warnings;
print cop_warnings(); # same as compile-time ${^WARNING_BITS}
# cop_io() is only available to Perl 5.7 or above
use open IO => :utf8;
print cop_io(); # same as compile-time ${^OPEN}
{
use IO => :raw;
print cop_io(1); # access one uplevel; still ":utf8 :utf8"
}
This module exports the cop (code operator) struct as individual functions; callers can call them to find out the lexical-scoped hints that its block (or statement) is compiled under.
No functions are exported by default. Each function may take an optional positive integer as argument, indicating how many blocks it should walk upward to obtain the cop members.
Functions can also take another optional argument, which (if specified) becomes the new value for the hint, affecting the current statement or blocks behaviour.
<<lessSYNOPSIS
use Devel::Hints :all;
LABEL:
print cop_label(); # LABEL
cop_label(0 => FOO); # "goto FOO;" is valid after this point!
print cop_file(); # same as __FILE__
print cop_filegv(); # same as $::{_< . __FILE__}
print cop_stashpv(); # same as __PACKAGE__
print cop_stash(); # same as %{__PACKAGE__ . ::}
print cop_seq(); # an integer
print cop_arybase(); # same as $[
print cop_line(); # same as __LINE__
use warnings;
print cop_warnings(); # same as compile-time ${^WARNING_BITS}
# cop_io() is only available to Perl 5.7 or above
use open IO => :utf8;
print cop_io(); # same as compile-time ${^OPEN}
{
use IO => :raw;
print cop_io(1); # access one uplevel; still ":utf8 :utf8"
}
This module exports the cop (code operator) struct as individual functions; callers can call them to find out the lexical-scoped hints that its block (or statement) is compiled under.
No functions are exported by default. Each function may take an optional positive integer as argument, indicating how many blocks it should walk upward to obtain the cop members.
Functions can also take another optional argument, which (if specified) becomes the new value for the hint, affecting the current statement or blocks behaviour.
Download (0.043MB)
Added: 2007-05-08 License: Perl Artistic License Price:
899 downloads
HTML::Widget 1.09
HTML::Widget is a Perl module with HTML Widget And Validation Framework. more>>
HTML::Widget is a Perl module with HTML Widget And Validation Framework.
SYNOPSIS
use HTML::Widget;
# Create a widget
my $w = HTML::Widget->new(widget)->method(get)->action(/);
# Add a fieldset to contain the elements
my $fs = $w->element( Fieldset, user )->legend(User Details);
# Add some elements
$fs->element( Textfield, age )->label(Age)->size(3);
$fs->element( Textfield, name )->label(Name)->size(60);
$fs->element( Submit, ok )->value(OK);
# Add some constraints
$w->constraint( Integer, age )->message(No integer.);
$w->constraint( Not_Integer, name )->message(Integer.);
$w->constraint( All, age, name )->message(Missing value.);
# Add some filters
$w->filter(Whitespace);
# Process
my $result = $w->process;
my $result = $w->process($query);
# Check validation results
my @valid_fields = $result->valid;
my $is_valid = $result->valid(foo);
my @invalid_fields = $result->have_errors;
my $is_invalid = $result->has_errors(foo);;
# CGI.pm-compatible! (read-only)
my $value = $result->param(foo);
my @params = $result->param;
# Catalyst::Request-compatible
my $value = $result->params->{foo};
my @params = keys %{ $result->params };
# Merge widgets (constraints and elements will be appended)
$widget->merge($other_widget);
# Embed widgets (as fieldset)
$widget->embed($other_widget);
# Get list of elements
my @elements = $widget->get_elements;
# Get list of constraints
my @constraints = $widget->get_constraints;
# Get list of filters
my @filters = $widget->get_filters;
Create easy to maintain HTML widgets!
Everything is optional, use validation only or just generate forms, you can embed and merge them later.
The API was designed similar to other popular modules like Data::FormValidator and FormValidator::Simple, HTML::FillInForm is also built in (and much faster).
This Module is very powerful, dont misuse it as a template system!
<<lessSYNOPSIS
use HTML::Widget;
# Create a widget
my $w = HTML::Widget->new(widget)->method(get)->action(/);
# Add a fieldset to contain the elements
my $fs = $w->element( Fieldset, user )->legend(User Details);
# Add some elements
$fs->element( Textfield, age )->label(Age)->size(3);
$fs->element( Textfield, name )->label(Name)->size(60);
$fs->element( Submit, ok )->value(OK);
# Add some constraints
$w->constraint( Integer, age )->message(No integer.);
$w->constraint( Not_Integer, name )->message(Integer.);
$w->constraint( All, age, name )->message(Missing value.);
# Add some filters
$w->filter(Whitespace);
# Process
my $result = $w->process;
my $result = $w->process($query);
# Check validation results
my @valid_fields = $result->valid;
my $is_valid = $result->valid(foo);
my @invalid_fields = $result->have_errors;
my $is_invalid = $result->has_errors(foo);;
# CGI.pm-compatible! (read-only)
my $value = $result->param(foo);
my @params = $result->param;
# Catalyst::Request-compatible
my $value = $result->params->{foo};
my @params = keys %{ $result->params };
# Merge widgets (constraints and elements will be appended)
$widget->merge($other_widget);
# Embed widgets (as fieldset)
$widget->embed($other_widget);
# Get list of elements
my @elements = $widget->get_elements;
# Get list of constraints
my @constraints = $widget->get_constraints;
# Get list of filters
my @filters = $widget->get_filters;
Create easy to maintain HTML widgets!
Everything is optional, use validation only or just generate forms, you can embed and merge them later.
The API was designed similar to other popular modules like Data::FormValidator and FormValidator::Simple, HTML::FillInForm is also built in (and much faster).
This Module is very powerful, dont misuse it as a template system!
Download (0.066MB)
Added: 2006-09-27 License: Perl Artistic License Price:
1122 downloads
Number::Latin 1.01
Number::Latin is a Perl module that can convert to/from the number system a,b,...z,aa,ab.... more>>
Number::Latin is a Perl module that can convert to/from the number system "a,b,...z,aa,ab..."
SYNOPSIS
use Number::Latin;
print join( , map int2latin($_), 1 .. 30), "n";
#
# Prints:
# a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad
Some applications, notably the numbering of points in outlines, use a scheme that starts with the letter "a", goes to "z", and then starts over with "aa" thru "az", then "ba", and so on. (The W3C refers to this numbering system as "lower-latin"/"upper-latin" or "lower alpha"/"upper alpha", in discussions of HTML/CSS options for rendering of list elements (OL/LI).)
This module provides functions that deal with that numbering system, converting between it and integer values.
FUNCTIONS
This module exports four functions, int2latin, int2Latin, int2LATIN, and latin2int:
$latin = int2latin( INTEGER )
This returns the INTEGERth item in the sequence (a .. z, aa, ab, etc). For example, int2latin(1) is "a", int2latin(2) is "b", int2latin(26) is "z", int2latin(30) is "ad", and so for any nonzero integer.
$latin = int2Latin( INTEGER )
This is just like int2latin, except that the return value is has an initial capital. E.g., int2Latin(30) is "Ad".
$latin = int2LATIN( INTEGER )
This is just like int2latin, except that the return value is in all uppercase. E.g., int2LATIN(30) is "AD".
$latin = latin2int( INTEGER )
This converts back from latin number notation (regardless of capitalization!) to an integer value. E.g., latin2int("ad") is 30.
<<lessSYNOPSIS
use Number::Latin;
print join( , map int2latin($_), 1 .. 30), "n";
#
# Prints:
# a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad
Some applications, notably the numbering of points in outlines, use a scheme that starts with the letter "a", goes to "z", and then starts over with "aa" thru "az", then "ba", and so on. (The W3C refers to this numbering system as "lower-latin"/"upper-latin" or "lower alpha"/"upper alpha", in discussions of HTML/CSS options for rendering of list elements (OL/LI).)
This module provides functions that deal with that numbering system, converting between it and integer values.
FUNCTIONS
This module exports four functions, int2latin, int2Latin, int2LATIN, and latin2int:
$latin = int2latin( INTEGER )
This returns the INTEGERth item in the sequence (a .. z, aa, ab, etc). For example, int2latin(1) is "a", int2latin(2) is "b", int2latin(26) is "z", int2latin(30) is "ad", and so for any nonzero integer.
$latin = int2Latin( INTEGER )
This is just like int2latin, except that the return value is has an initial capital. E.g., int2Latin(30) is "Ad".
$latin = int2LATIN( INTEGER )
This is just like int2latin, except that the return value is in all uppercase. E.g., int2LATIN(30) is "AD".
$latin = latin2int( INTEGER )
This converts back from latin number notation (regardless of capitalization!) to an integer value. E.g., latin2int("ad") is 30.
Download (0.005MB)
Added: 2006-07-05 License: Perl Artistic License Price:
1206 downloads
Convert::ASN1 0.20
Convert::ASN1 is an ASN.1 Encode/Decode library. more>>
Convert::ASN1 is an ASN.1 Encode/Decode library.
SYNOPSYS
use Convert::ASN1;
$asn = Convert::ASN1->new;
$asn->prepare(q<
[APPLICATION 7] SEQUENCE {
int INTEGER,
str OCTET STRING
}
>);
$pdu = $asn->encode( int => 7, str => "string");
$out = $asn->decode($pdu);
print $out->{int}," ",$out->{str},"n";
use Convert::ASN1 qw(:io);
$peer = asn_recv($sock,$buffer,0);
$nbytes = asn_read($fh, $buffer);
$nbytes = asn_send($sock, $buffer, $peer);
$nbytes = asn_send($sock, $buffer);
$nbytes = asn_write($fh, $buffer);
$buffer = asn_get($fh);
$yes = asn_ready($fh)
Convert::ASN1 encodes and decodes ASN.1 data structures using BER/DER rules.
<<lessSYNOPSYS
use Convert::ASN1;
$asn = Convert::ASN1->new;
$asn->prepare(q<
[APPLICATION 7] SEQUENCE {
int INTEGER,
str OCTET STRING
}
>);
$pdu = $asn->encode( int => 7, str => "string");
$out = $asn->decode($pdu);
print $out->{int}," ",$out->{str},"n";
use Convert::ASN1 qw(:io);
$peer = asn_recv($sock,$buffer,0);
$nbytes = asn_read($fh, $buffer);
$nbytes = asn_send($sock, $buffer, $peer);
$nbytes = asn_send($sock, $buffer);
$nbytes = asn_write($fh, $buffer);
$buffer = asn_get($fh);
$yes = asn_ready($fh)
Convert::ASN1 encodes and decodes ASN.1 data structures using BER/DER rules.
Download (0.060MB)
Added: 2006-08-22 License: Perl Artistic License Price:
1178 downloads
libmousetrap 0.6.1
libmousetrap is a C library to create and manipulate mousetrap buffers in system memory. more>>
libmousetrap is a C library to create and manipulate mousetrap buffers in system memory. Mousetrap buffers are compressed two dimensional cartesian grids with integer precision.
A mousetrap buffer retains an integer identifier for every point in the grid, so that later the identifier can be referenced with a set of (x, y) coordinates.
Why?
Well, when youre doing graphics programming and somebody clicks something with the mouse, all you get is the x and y location where the click was, and what mouse button they pressed.
With the x and y location, all you can really get is the color of the pixel they clicked on, which doesnt tell you what *thing* on the screen they clicked on. There are lots of different ways to determine in your program what thing was clicked on, this library is one of them.
Enhancements:
- This release fixes a really silly but really nasty bug, I called the function to create mousetraps out of SDL surfaces with the flags and the id parameters mixed up.
<<lessA mousetrap buffer retains an integer identifier for every point in the grid, so that later the identifier can be referenced with a set of (x, y) coordinates.
Why?
Well, when youre doing graphics programming and somebody clicks something with the mouse, all you get is the x and y location where the click was, and what mouse button they pressed.
With the x and y location, all you can really get is the color of the pixel they clicked on, which doesnt tell you what *thing* on the screen they clicked on. There are lots of different ways to determine in your program what thing was clicked on, this library is one of them.
Enhancements:
- This release fixes a really silly but really nasty bug, I called the function to create mousetraps out of SDL surfaces with the flags and the id parameters mixed up.
Added: 2006-06-05 License: LGPL (GNU Lesser General Public License) Price:
1237 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above integer search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed