native compiler return value bc2001 file
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 4636
JavaNativeCompiler 1.1.1
JavaNativeCompiler (JNC) is a Java to native compiler. more>>
JavaNativeCompiler (JNC) is a Java to native compiler. The project allows AOT (ahead of time) compilation of your Java applications. With JNC, you can create real standalone native binaries (.exe on Windows) which will no longer depend on a JRE.
This is especially useful when applications have to be deployed to end-users. All vexatious problems of deploying Java applications can be solved by compiling them to native. They will be:
- Easy to deploy
No JRE dependency. Most end-users dont know what they have installed.
No more problems on how to create an executable file out of a JAR or class file.
- Hard to decompile
Java can easily be decompiled. Native compilation will protect your source code.
- Run fast from the start
No more overhead for loading a JRE.
Enhancements:
- This release fixes a couple of problems with AWT/Swing and XML.
- It also once again contains a version for Linux.
- The compiler binary downloads are smaller.
<<lessThis is especially useful when applications have to be deployed to end-users. All vexatious problems of deploying Java applications can be solved by compiling them to native. They will be:
- Easy to deploy
No JRE dependency. Most end-users dont know what they have installed.
No more problems on how to create an executable file out of a JAR or class file.
- Hard to decompile
Java can easily be decompiled. Native compilation will protect your source code.
- Run fast from the start
No more overhead for loading a JRE.
Enhancements:
- This release fixes a couple of problems with AWT/Swing and XML.
- It also once again contains a version for Linux.
- The compiler binary downloads are smaller.
Download (MB)
Added: 2007-03-05 License: Other/Proprietary License with Source Price:
965 downloads
cid-compiler 0.1
cid-compiler is a language tool to easily create C code with object oriented features. more>>
cid-compiler is a language tool to easily create C code with object oriented features. Its compiler generates header (.h) files and implementations (.c) from a specification file (.i).
The generated C code consists of a struct, a opaque pointer to it (in the header file) and rewritten functions. The defined functions will get prefixed with the class name, they will also get a new first argument that is a pointer to the newly defined struct.
Functions that do not have a return value are considered constructors and will not get a new 1st argument but will automatically get a return value of pointer to the struct. The place between @class "name" and @attributes is e. g. for include statements and will make it into the header file.
To ease renaming the class, you can use the define CLASS, which will always be a define to a pointer of the new struct type.
Interface example
@class cstring
#include < stdio.h >
#include < string.h >
@attributes
char *c;
@methods
new(char *n) {
CLASS i = NEWCLASS;
i->c = strdup(n);
return i;
}
int length() {
return strlen(this->c);
}
@end
will yield a cstring.h file:
#ifndef _CSTRING_H_
#define _CSTRING_H_
#include < stdio.h >
#include < string.h >
typedef struct cstring *cstring;
cstring cstring_new(char *n);
int cstring_length(cstring this);
#endif
and a cstring.c file:
#include "cstring.h"
#define CLASS cstring
#define NEWCLASS malloc(sizeof(struct cstring));
#define NEWCLASS_M malloc(sizeof(struct cstring));
#define NEWCLASS_C calloc(1,sizeof(struct cstring));
struct cstring {
char *c;
};
cstring cstring_new(char *n) {
CLASS i = NEWCLASS;
i->c = strdup(n);
return i;
}
int cstring_length(cstring this) {
return strlen(this->c);
}
Issues:
The current compiler (v0.1) will reject quite some valid C code. Also the given error is not very helpful;
<<lessThe generated C code consists of a struct, a opaque pointer to it (in the header file) and rewritten functions. The defined functions will get prefixed with the class name, they will also get a new first argument that is a pointer to the newly defined struct.
Functions that do not have a return value are considered constructors and will not get a new 1st argument but will automatically get a return value of pointer to the struct. The place between @class "name" and @attributes is e. g. for include statements and will make it into the header file.
To ease renaming the class, you can use the define CLASS, which will always be a define to a pointer of the new struct type.
Interface example
@class cstring
#include < stdio.h >
#include < string.h >
@attributes
char *c;
@methods
new(char *n) {
CLASS i = NEWCLASS;
i->c = strdup(n);
return i;
}
int length() {
return strlen(this->c);
}
@end
will yield a cstring.h file:
#ifndef _CSTRING_H_
#define _CSTRING_H_
#include < stdio.h >
#include < string.h >
typedef struct cstring *cstring;
cstring cstring_new(char *n);
int cstring_length(cstring this);
#endif
and a cstring.c file:
#include "cstring.h"
#define CLASS cstring
#define NEWCLASS malloc(sizeof(struct cstring));
#define NEWCLASS_M malloc(sizeof(struct cstring));
#define NEWCLASS_C calloc(1,sizeof(struct cstring));
struct cstring {
char *c;
};
cstring cstring_new(char *n) {
CLASS i = NEWCLASS;
i->c = strdup(n);
return i;
}
int cstring_length(cstring this) {
return strlen(this->c);
}
Issues:
The current compiler (v0.1) will reject quite some valid C code. Also the given error is not very helpful;
Download (0.098MB)
Added: 2006-03-07 License: BSD License Price:
1327 downloads
Pod::Compiler 0.20
Pod::Compiler can compile POD into an object tree. more>>
Pod::Compiler can compile POD into an object tree.
This package, based on Pod::Parser, compiles a given POD document into an object tree (based on Tree::DAG_Node). It prints errors and warnings about the POD it reads. The result can be used to conveniently convert the POD into any other format.
The resulting objects have a variety of methods to ease the subsequent conversion.
There are two script based on this package, namely podchecker2, an enhanced POD syntax checker and podlint, which beautifies the POD of a given file.
This package is object-oriented, which means that you can quite easily build a derived package and override some methods in case the given behaviour does not exactly suit your needs.
Package Functions
The following functions can be imported and called from a script, e.g. like this:
use Pod::Compiler qw(pod_compile);
my $root = pod_compile(myfile.pod);
pod_compile( { %options } , $file )
pod_compile( $file )
Compile the given $file using some %options and return the root of the object tree representing the POD in $file. The return value is either undef if some fatal error occured or an object of type Pod::root. See below for methods applicable to this class and for the options.
The special option -compiler => class lets you specify an alternate (derived) compiler class rather than Pod::Compiler.
Compiler Object Interface
The following section describes the OO interface of Pod::Compiler.
$c = Pod::Compiler->new( %options )
Set up a new compiler object. Options (see below) can be passed as a hash, e.g.
$c = Pod::Compiler->new( -warnings => 0 ); # dont be silly
Pod::Compiler inherits from Pod::Parser. See Pod::Parser for additional methods.
$c->initialize()
Initalize, set defaults. The following options are set to the given defaults unless they have been defined at object creation:
-errors => 1
Print POD syntax errors (using messagehandler) if option value is true.
-warnings => 1
Print POD syntax warnings (using messagehandler) if option value is true.
-idlength => 20
Pod::Compiler creates a unique node id for each =head, =item and X, consisting only of w characters. The option value specifies how many characters from the original node text are used for the node id by the built-in make_unique_node_id method. See below for more information.
-ignore => BCFS
This option specifies which interior sequences (e.g. B< ... >) are ignored when nested in itself, e.g. B< ...B< ... >... >. The inner B is simply discarded if the corresponding letter appears in the option value string.
-unwrap => I
This option specifies which interior sequences (e.g. I< ... >) are unwrapped when nested in itself, e.g. I< ...I< ... >... > is turned into I< ... >...I< ... >. While some destination formats may handle such nestings appropriately, other might have problems. This option solves it right away. By the way, from a typographical point of view, italics are often used for emphasis. In order to emphasize something within an emphasis, one reverts to the non-italic font.
name =>
This is used to store the (logical) name of the POD, i.e. for example the module name as it appears in use module;. It is used internally only to detect internal links pointing to the explicit page name. Example: You compile the file Compiler.pm which contains the package Pod::Compiler. You set name to Pod::Compiler (there is no safe automatic way to do so). Thus if the file includes a link like L< Pod::Compiler/messagehandler > it is recognized as an internal link and it is checked whether it resolves. Of course you should have written the link as L< /messagehandler >...
-perlcode => 0
If set to true, the compiler will also return the Perl code blocks as objects Pod::perlcode, rather than only the POD embedded in the file. This is used e.g. by podlint.
$c->option( $name , $value )
Get or set the compile option (see above) given by $name. If $value is defined, the option is set to this value. The resulting (or unchanged) value is returned.
$c->messagehandler( $severity , $message )
This method is called every time a warning or error occurs. $severity is one of ERROR or WARNING, $message is a one-line string. The built-in method simply does
warn "$severity: $messagen";
$c->name( [ $name ] )
Set/retrieve the name property, i.e. the canonical Pod name (e.g. Pod::HTML). See above for more details.
$c->root()
Return the root element (instance of class Pod::root) representing the compiled POD document. See below for more info about its methods.
$c->make_unique_node_id($string)
Turn given text string into a document unique node id. Can be overridden to adapt this to specific formatter needs. Basically this method takes a string and must return something (more or less dependent on the string) that is unique for this POD document. The built-in method maps all consecutive non-word characters and underlines to a single underline and truncates the result to -idlength (see options above). If the result already exists, a suffix _n is appended, where n is a number starting with 1. A different method could e.g. just return ascending numbers, but if you think of HTML output, a node id that resembles the text and has a fair chance to remain constant over subsequent compiles of the same document gives the opportunity to link to such anchors from external documents.
<<lessThis package, based on Pod::Parser, compiles a given POD document into an object tree (based on Tree::DAG_Node). It prints errors and warnings about the POD it reads. The result can be used to conveniently convert the POD into any other format.
The resulting objects have a variety of methods to ease the subsequent conversion.
There are two script based on this package, namely podchecker2, an enhanced POD syntax checker and podlint, which beautifies the POD of a given file.
This package is object-oriented, which means that you can quite easily build a derived package and override some methods in case the given behaviour does not exactly suit your needs.
Package Functions
The following functions can be imported and called from a script, e.g. like this:
use Pod::Compiler qw(pod_compile);
my $root = pod_compile(myfile.pod);
pod_compile( { %options } , $file )
pod_compile( $file )
Compile the given $file using some %options and return the root of the object tree representing the POD in $file. The return value is either undef if some fatal error occured or an object of type Pod::root. See below for methods applicable to this class and for the options.
The special option -compiler => class lets you specify an alternate (derived) compiler class rather than Pod::Compiler.
Compiler Object Interface
The following section describes the OO interface of Pod::Compiler.
$c = Pod::Compiler->new( %options )
Set up a new compiler object. Options (see below) can be passed as a hash, e.g.
$c = Pod::Compiler->new( -warnings => 0 ); # dont be silly
Pod::Compiler inherits from Pod::Parser. See Pod::Parser for additional methods.
$c->initialize()
Initalize, set defaults. The following options are set to the given defaults unless they have been defined at object creation:
-errors => 1
Print POD syntax errors (using messagehandler) if option value is true.
-warnings => 1
Print POD syntax warnings (using messagehandler) if option value is true.
-idlength => 20
Pod::Compiler creates a unique node id for each =head, =item and X, consisting only of w characters. The option value specifies how many characters from the original node text are used for the node id by the built-in make_unique_node_id method. See below for more information.
-ignore => BCFS
This option specifies which interior sequences (e.g. B< ... >) are ignored when nested in itself, e.g. B< ...B< ... >... >. The inner B is simply discarded if the corresponding letter appears in the option value string.
-unwrap => I
This option specifies which interior sequences (e.g. I< ... >) are unwrapped when nested in itself, e.g. I< ...I< ... >... > is turned into I< ... >...I< ... >. While some destination formats may handle such nestings appropriately, other might have problems. This option solves it right away. By the way, from a typographical point of view, italics are often used for emphasis. In order to emphasize something within an emphasis, one reverts to the non-italic font.
name =>
This is used to store the (logical) name of the POD, i.e. for example the module name as it appears in use module;. It is used internally only to detect internal links pointing to the explicit page name. Example: You compile the file Compiler.pm which contains the package Pod::Compiler. You set name to Pod::Compiler (there is no safe automatic way to do so). Thus if the file includes a link like L< Pod::Compiler/messagehandler > it is recognized as an internal link and it is checked whether it resolves. Of course you should have written the link as L< /messagehandler >...
-perlcode => 0
If set to true, the compiler will also return the Perl code blocks as objects Pod::perlcode, rather than only the POD embedded in the file. This is used e.g. by podlint.
$c->option( $name , $value )
Get or set the compile option (see above) given by $name. If $value is defined, the option is set to this value. The resulting (or unchanged) value is returned.
$c->messagehandler( $severity , $message )
This method is called every time a warning or error occurs. $severity is one of ERROR or WARNING, $message is a one-line string. The built-in method simply does
warn "$severity: $messagen";
$c->name( [ $name ] )
Set/retrieve the name property, i.e. the canonical Pod name (e.g. Pod::HTML). See above for more details.
$c->root()
Return the root element (instance of class Pod::root) representing the compiled POD document. See below for more info about its methods.
$c->make_unique_node_id($string)
Turn given text string into a document unique node id. Can be overridden to adapt this to specific formatter needs. Basically this method takes a string and must return something (more or less dependent on the string) that is unique for this POD document. The built-in method maps all consecutive non-word characters and underlines to a single underline and truncates the result to -idlength (see options above). If the result already exists, a suffix _n is appended, where n is a number starting with 1. A different method could e.g. just return ascending numbers, but if you think of HTML output, a node id that resembles the text and has a fair chance to remain constant over subsequent compiles of the same document gives the opportunity to link to such anchors from external documents.
Download (0.030MB)
Added: 2007-08-10 License: Perl Artistic License Price:
805 downloads
Contextual::Return 0.1.0
Contextual::Return is a Perl module to create context-senstive return values. more>>
Contextual::Return is a Perl module to create context-senstive return values.
SYNOPSIS
use Contextual::Return;
use Carp;
sub foo {
return
SCALAR { thirty-twelve }
BOOL { 1 }
NUM { 7*6 }
STR { forty-two }
LIST { 1,2,3 }
HASHREF { {name => foo, value => 99} }
ARRAYREF { [3,2,1] }
GLOBREF { *STDOUT }
CODEREF { croak "Dont use this result as code!"; }
;
}
# and later...
if (my $foo = foo()) {
for my $count (1..$foo) {
print "$count: $foo is:n"
. " array: @{$foo}n"
. " hash: $foo->{name} => $foo->{value}n"
;
}
print {$foo} $foo->();
}
Usually, when you need to create a subroutine that returns different values in different contexts (list, scalar, or void), you write something like:
sub get_server_status {
my ($server_ID) = @_;
# Acquire server data somehow...
my %server_data = _ascertain_server_status($server_ID);
# Return different components of that data,
# depending on call context...
if (wantarray()) {
return @server_data{ qw(name uptime load users) };
}
if (defined wantarray()) {
return $server_data{load};
}
if (!defined wantarray()) {
carp Useless use of get_server_status() in void context;
return;
}
else {
croak q{Bad context! No biscuit!};
}
}
That works okay, but the code could certainly be more readable. In its simplest usage, this module makes that code more readable by providing three subroutines--LIST(), SCALAR(), VOID()--that are true only when the current subroutine is called in the corresponding context:
use Contextual::Return;
sub get_server_status {
my ($server_ID) = @_;
# Acquire server data somehow...
my %server_data = _ascertain_server_status($server_ID);
# Return different components of that data
# depending on call context...
if (LIST) { return @server_data{ qw(name uptime load users) } }
if (SCALAR) { return $server_data{load} }
if (VOID) { print "$server_data{load}n" }
else { croak q{Bad context! No biscuit!} }
}
Contextual returns
Those three subroutines can also be used in another way: as labels on a series of contextual return blocks (collectively known as a context sequence). When a context sequence is returned, it automatically selects the appropriate contextual return block for the calling context. So the previous example could be written even more cleanly as:
use Contextual::Return;
sub get_server_status {
my ($server_ID) = @_;
# Acquire server data somehow...
my %server_data = _ascertain_server_status($server_ID);
# Return different components of that data
# depending on call context...
return (
LIST { return @server_data{ qw(name uptime load users) } }
SCALAR { return $server_data{load} }
VOID { print "$server_data{load}n" }
DEFAULT { croak q{Bad context! No biscuit!} }
);
}
The context sequence automatically selects the appropriate block for each call context.
<<lessSYNOPSIS
use Contextual::Return;
use Carp;
sub foo {
return
SCALAR { thirty-twelve }
BOOL { 1 }
NUM { 7*6 }
STR { forty-two }
LIST { 1,2,3 }
HASHREF { {name => foo, value => 99} }
ARRAYREF { [3,2,1] }
GLOBREF { *STDOUT }
CODEREF { croak "Dont use this result as code!"; }
;
}
# and later...
if (my $foo = foo()) {
for my $count (1..$foo) {
print "$count: $foo is:n"
. " array: @{$foo}n"
. " hash: $foo->{name} => $foo->{value}n"
;
}
print {$foo} $foo->();
}
Usually, when you need to create a subroutine that returns different values in different contexts (list, scalar, or void), you write something like:
sub get_server_status {
my ($server_ID) = @_;
# Acquire server data somehow...
my %server_data = _ascertain_server_status($server_ID);
# Return different components of that data,
# depending on call context...
if (wantarray()) {
return @server_data{ qw(name uptime load users) };
}
if (defined wantarray()) {
return $server_data{load};
}
if (!defined wantarray()) {
carp Useless use of get_server_status() in void context;
return;
}
else {
croak q{Bad context! No biscuit!};
}
}
That works okay, but the code could certainly be more readable. In its simplest usage, this module makes that code more readable by providing three subroutines--LIST(), SCALAR(), VOID()--that are true only when the current subroutine is called in the corresponding context:
use Contextual::Return;
sub get_server_status {
my ($server_ID) = @_;
# Acquire server data somehow...
my %server_data = _ascertain_server_status($server_ID);
# Return different components of that data
# depending on call context...
if (LIST) { return @server_data{ qw(name uptime load users) } }
if (SCALAR) { return $server_data{load} }
if (VOID) { print "$server_data{load}n" }
else { croak q{Bad context! No biscuit!} }
}
Contextual returns
Those three subroutines can also be used in another way: as labels on a series of contextual return blocks (collectively known as a context sequence). When a context sequence is returned, it automatically selects the appropriate contextual return block for the calling context. So the previous example could be written even more cleanly as:
use Contextual::Return;
sub get_server_status {
my ($server_ID) = @_;
# Acquire server data somehow...
my %server_data = _ascertain_server_status($server_ID);
# Return different components of that data
# depending on call context...
return (
LIST { return @server_data{ qw(name uptime load users) } }
SCALAR { return $server_data{load} }
VOID { print "$server_data{load}n" }
DEFAULT { croak q{Bad context! No biscuit!} }
);
}
The context sequence automatically selects the appropriate block for each call context.
Download (0.022MB)
Added: 2007-01-18 License: Perl Artistic License Price:
1009 downloads
Scriptol to binary Compiler
Scriptol to binary Compiler is a C++ native compiler. more>>
Scriptol to binary Compiler is a C++ native compiler.
Installation:
It is better to install Scriptol at root of a disk, for example:
c:scriptolc
Once the archive is extracted into the scriptolc directory, you have just to change to this directory to run the compiler.
To use the compiler at command line from any directory, you have to put the compiler into the path variable.
The setup script installs required file into sub-directories, or into the directory given as argument. Before to use the compiler, you have to read the licence, in the doc
directory: licence.html.
Usage:
Just type:
./solc mysource
Type "solc" only to list the options.
If your program is a multi-file project, the source given as parameter must be the main source file, the compiler will know dependencies from "include" statements and will build what is needed.
Exemples:
Type from the main scriptol directory:
./solc -bre demosfibo
Configuring:
By editing the solc.ini file, you may change the second pass compiler (you may have to rebuild the libsol library for this compiler), change the options of the compiler or add header files to include.
To add header files, just add "header=someheader.hpp" lines into the config file.
A xxx.cfg file may be written for each project main source beeing xxx, and if present, it overloads the solc.ini file.
<<lessInstallation:
It is better to install Scriptol at root of a disk, for example:
c:scriptolc
Once the archive is extracted into the scriptolc directory, you have just to change to this directory to run the compiler.
To use the compiler at command line from any directory, you have to put the compiler into the path variable.
The setup script installs required file into sub-directories, or into the directory given as argument. Before to use the compiler, you have to read the licence, in the doc
directory: licence.html.
Usage:
Just type:
./solc mysource
Type "solc" only to list the options.
If your program is a multi-file project, the source given as parameter must be the main source file, the compiler will know dependencies from "include" statements and will build what is needed.
Exemples:
Type from the main scriptol directory:
./solc -bre demosfibo
Configuring:
By editing the solc.ini file, you may change the second pass compiler (you may have to rebuild the libsol library for this compiler), change the options of the compiler or add header files to include.
To add header files, just add "header=someheader.hpp" lines into the config file.
A xxx.cfg file may be written for each project main source beeing xxx, and if present, it overloads the solc.ini file.
Added: 2005-12-02 License: Freeware Price:
1423 downloads
The Glasgow Haskell Compiler 6.6
The Glasgow Haskell Compiler is a compiler for Haskell 98. more>>
The Glasgow Haskell Compiler is a state-of-the-art, open source, compiler and interactive environment for the functional language Haskell.
Main features:
- GHC supports the entire Haskell 98 language plus a wide variety of extensions.
- GHC works on several platforms including Windows and most varieties of Unix, and several different processor architectures. There are detailed instructions for porting GHC to a new platform.
- GHC has extensive optimisation capabilities, including inter-module optimisation.
- GHC compiles Haskell code either by using an intermediate C compiler (GCC), or by generating native code on some platforms. The interactive environment compiles Haskell to bytecode, and supports execution of mixed bytecode/compiled programs.
- Profiling is supported, both by time/allocation and various kinds of heap profiling.
- GHC comes with a wide range of libraries.
GHC is heavily dependent on its users and contributors. Please come and join the mailing lists and send us your comments, suggestions, bug reports and contributions!
Enhancements:
- SMP support and impredicative polymorphism were added.
- The libraries were split into core and extra.
- Many more changes were made.
<<lessMain features:
- GHC supports the entire Haskell 98 language plus a wide variety of extensions.
- GHC works on several platforms including Windows and most varieties of Unix, and several different processor architectures. There are detailed instructions for porting GHC to a new platform.
- GHC has extensive optimisation capabilities, including inter-module optimisation.
- GHC compiles Haskell code either by using an intermediate C compiler (GCC), or by generating native code on some platforms. The interactive environment compiles Haskell to bytecode, and supports execution of mixed bytecode/compiled programs.
- Profiling is supported, both by time/allocation and various kinds of heap profiling.
- GHC comes with a wide range of libraries.
GHC is heavily dependent on its users and contributors. Please come and join the mailing lists and send us your comments, suggestions, bug reports and contributions!
Enhancements:
- SMP support and impredicative polymorphism were added.
- The libraries were split into core and extra.
- Many more changes were made.
Download (6.7MB)
Added: 2006-10-15 License: BSD License Price:
1105 downloads
MicroNova YUZU 20070803
MicroNova YUZU is an open-source EL-based JSP tag libary. more>>
MicroNova YUZU is an open-source EL-based JSP tag libary designed to augment JSTL (compatible with both JSP 1.2 and JSP 2.0). YUZU is used in commercial products such as ILOG JRules.
Main features:
- nestable/encodable map with XML support
- "codec" functions (useable as JSP 2.0 EL functions)
- structured parameters with support for file upload and select/radio control
- JSP "subroutine" call with non-string arguments and return value
- embedded EL pattern evaluation for regular text and SQL query
- HTTP client and response control
- HTML-to-DOM parser
- multipart email and mailbox
- dynamic method invocation, iterator, map
YUZU consists of the following tags: set, out, map, eval, param, call, value, return, include, log, postData, throw, synchronized, query, update, response, system, filter, parseHtml, mail, mailFolder.
All YUZU tags follow a simple common behavioral pattern (prepare/import/default/process/assign/export) for ease of learning and extension.
Enhancements:
- Multiple assignment was fixed. m.tld was fixed for jsp12.
<<lessMain features:
- nestable/encodable map with XML support
- "codec" functions (useable as JSP 2.0 EL functions)
- structured parameters with support for file upload and select/radio control
- JSP "subroutine" call with non-string arguments and return value
- embedded EL pattern evaluation for regular text and SQL query
- HTTP client and response control
- HTML-to-DOM parser
- multipart email and mailbox
- dynamic method invocation, iterator, map
YUZU consists of the following tags: set, out, map, eval, param, call, value, return, include, log, postData, throw, synchronized, query, update, response, system, filter, parseHtml, mail, mailFolder.
All YUZU tags follow a simple common behavioral pattern (prepare/import/default/process/assign/export) for ease of learning and extension.
Enhancements:
- Multiple assignment was fixed. m.tld was fixed for jsp12.
Download (0.61MB)
Added: 2007-08-05 License: BSD License Price:
811 downloads
Oracle::Trace 1.06
Oracle::Trace is a Perl Module for parsing Oracle Trace files. more>>
Oracle::Trace is a Perl Module for parsing Oracle Trace files.
SYNOPSIS
use Oracle::Trace;
print Oracle::Trace->new($tracefilename)->parse->test_report;
Currently the parsing and statistics are very rudimentary, and in certain matters may be fundamentally flawed - you have been warned! Expect this to improve as further development takes place.
new
Create a new object for a given Orace Trace file.
my $o_trc = Oracle::Trace->new($tracefile);
init
Initialise the object (check the tracefile).
$o_trc->init.
opentracefile
Perform basic exists/read/etc. checks on given tracefile.
Returns object or undef.
$o_trc = $o_trc->checkfile($tfile);
header
Return the Header object.
my $o_hdr = $o_trc->header;
entries
Return Entry objects which comply with given regex criteria.
my @o_ents = $o_trc->entries(type=>EXEC #d+, key=>dep, value=>0);
oids
Return the unique object ids for the currently known Entryies
my @oids = $o_trc->oids;
footer
Return the Footer object
my $o_ftr = $o_trc->footer;
test_report
Return a simple test_report of the current object.
print $o_trc->test_report(string);
mini_report
Return a simple string of descending order timings for the statements retrieved from the given objects.
my $s_str = $o_trc->mini_report($i_max, @o_objs);
Note that we use microsecond resolution for Oracle 9i and above and centisecond resolution otherwise
<<lessSYNOPSIS
use Oracle::Trace;
print Oracle::Trace->new($tracefilename)->parse->test_report;
Currently the parsing and statistics are very rudimentary, and in certain matters may be fundamentally flawed - you have been warned! Expect this to improve as further development takes place.
new
Create a new object for a given Orace Trace file.
my $o_trc = Oracle::Trace->new($tracefile);
init
Initialise the object (check the tracefile).
$o_trc->init.
opentracefile
Perform basic exists/read/etc. checks on given tracefile.
Returns object or undef.
$o_trc = $o_trc->checkfile($tfile);
header
Return the Header object.
my $o_hdr = $o_trc->header;
entries
Return Entry objects which comply with given regex criteria.
my @o_ents = $o_trc->entries(type=>EXEC #d+, key=>dep, value=>0);
oids
Return the unique object ids for the currently known Entryies
my @oids = $o_trc->oids;
footer
Return the Footer object
my $o_ftr = $o_trc->footer;
test_report
Return a simple test_report of the current object.
print $o_trc->test_report(string);
mini_report
Return a simple string of descending order timings for the statements retrieved from the given objects.
my $s_str = $o_trc->mini_report($i_max, @o_objs);
Note that we use microsecond resolution for Oracle 9i and above and centisecond resolution otherwise
Download (0.011MB)
Added: 2007-04-25 License: Perl Artistic License Price:
551 downloads
Sun::Solaris::Privilege 1.2
Sun::Solaris::Privilege is a Perl interface to Privileges. more>>
Sun::Solaris::Privilege is a Perl interface to Privileges.
SYNOPSIS
use Sun::Solaris::Privilege qw(:ALL);
This module provides wrappers for the Privilege-related system and library calls. Also provided are constants from the various Privilege-related headers and dynamically generated constants for all the privileges and privilege sets.
Functions
getppriv($which)
This function returns the process privilege set specified by $which.
setppriv($op, $which, $set)
This function modified the privilege set specified by $which in the as specified by the $op and $set arguments. If $op is PRIV_ON the privileges in $set are added to the set specified; if $op is PRIV_OFF, the privileges in $set are removed from the set specified; if $op is PRIV_SET, the specified set is made equal to $set.
getpflags($flag)
Returns the value associated with process $flag or undef on error. Possible values for $flag are PRIV_AWARE and PRIV_DEBUG.
setppflags($flag, $val)
Sets the process flag $flag to $val.
priv_fillset()
This returns a new privilege set with all privileges set.
priv_emptyset()
This returns a new empty privilege set.
priv_isemptyset($set)
This function returns whether $set is empty or not.
priv_isfullset($set)
This function returns whether $set is full or not.
priv_isequalset($a, $b)
This function returns whether sets $a and $b are equal.
priv_issubset($a, $b)
This function returns whether set $a is a subset of $b.
priv_ismember($set, $priv)
This function returns whether $priv is a member of $set.
priv_ineffect($priv)
This function returned whether $priv is in the process effective set.
priv_intersect($a, $b)
This function returns a new privilege set which is the intersection of $a and $b
priv_union($a, $b)
This function returns a new privilege set which is the union of $a and $b
priv_inverse($a)
This function returns a new privilege set which is the inverse of $a.
priv_addset($set, $priv)
This functon adds the privilege $priv to $set.
priv_copyset($a)
This function returns a copy of the privilege set $a.
priv_delset($set, $priv)
This function remove the privilege $priv from $set.
<<lessSYNOPSIS
use Sun::Solaris::Privilege qw(:ALL);
This module provides wrappers for the Privilege-related system and library calls. Also provided are constants from the various Privilege-related headers and dynamically generated constants for all the privileges and privilege sets.
Functions
getppriv($which)
This function returns the process privilege set specified by $which.
setppriv($op, $which, $set)
This function modified the privilege set specified by $which in the as specified by the $op and $set arguments. If $op is PRIV_ON the privileges in $set are added to the set specified; if $op is PRIV_OFF, the privileges in $set are removed from the set specified; if $op is PRIV_SET, the specified set is made equal to $set.
getpflags($flag)
Returns the value associated with process $flag or undef on error. Possible values for $flag are PRIV_AWARE and PRIV_DEBUG.
setppflags($flag, $val)
Sets the process flag $flag to $val.
priv_fillset()
This returns a new privilege set with all privileges set.
priv_emptyset()
This returns a new empty privilege set.
priv_isemptyset($set)
This function returns whether $set is empty or not.
priv_isfullset($set)
This function returns whether $set is full or not.
priv_isequalset($a, $b)
This function returns whether sets $a and $b are equal.
priv_issubset($a, $b)
This function returns whether set $a is a subset of $b.
priv_ismember($set, $priv)
This function returns whether $priv is a member of $set.
priv_ineffect($priv)
This function returned whether $priv is in the process effective set.
priv_intersect($a, $b)
This function returns a new privilege set which is the intersection of $a and $b
priv_union($a, $b)
This function returns a new privilege set which is the union of $a and $b
priv_inverse($a)
This function returns a new privilege set which is the inverse of $a.
priv_addset($set, $priv)
This functon adds the privilege $priv to $set.
priv_copyset($a)
This function returns a copy of the privilege set $a.
priv_delset($set, $priv)
This function remove the privilege $priv from $set.
Download (0.006MB)
Added: 2007-04-13 License: Perl Artistic License Price:
924 downloads
Steel Bank Common Lisp 1.0.8
Steel Bank Common Lisp is a common Lisp native compiler. more>>
Steel Bank Common Lisp is a development environment for Common Lisp, with excellent support for the ANSI standard: garbage collection, lexical closures, powerful macros, strong dynamic typing, incremental compilation, and the famous Common Lisp Object System (multimethods and all).
Steel Bank Common Lisp also includes many extensions, such as native threads, socket support, a statistical profiler, programmable streams, and more. These are all available through an integrated, interactive native compiler which feels like an interpreter.
SBCL is unique in being a multiplatform native compiler which bootstraps itself completely from source, using a C compiler and any other ANSI Common Lisp implementation.
Whats New in This Release:
* enhancement: experimental macro SB-EXT:COMPARE-AND-SWAP provides
atomic compare-and-swap operations on threaded platforms.
* enhancement: experimental function SB-EXT:RESTRICT-COMPILER-POLICY
allows assining a global minimum value to optimization qualities
(overriding proclamations and declarations).
* enhancement: closed over variables can be stack-allocated on x86
and x86-64.
* performance bug fix: GETHASH and (SETF GETHASH) are once again
non-consing.
* optimization: slot definition lookup is now O(1). This speeds up
eg. SLOT-VALUE and (SETF SLOT-VALUE) with variable slot names.
* optimization: STRING-TO-OCTETS is now up to 60% faster for UTF-8.
* optimization: ASSOC and MEMBER can now be open-coded for all
combinations of keyword arguments when second argument is constant
and SPEED >= SPACE. In other cases a specialized version is
selected.
* bug fix: using obsoleted structure instances with TYPEP and
generic functions now signals a sensible error.
* bug fix: threads waiting on GET-FOREGROUND can be interrupted.
(reported by Kristoffer Kvello)
* bug fix: backtrace construction is now more careful when making
lisp-objects from pointers on the stack, to avoid creating bogus
objects that can be seen by the GC.
* bug fix: defaulting of values in contexts expecting more than 7
variables now works on x86-64. (reported by Christopher Laux)
* bug fix: modifications to packages (INTERN, EXPORT, etc) are now
thread safe.
* bug fix: (SETF SYMBOL-PLIST) no longer allows assigning a non-list
as the property-list of a symbol.
* bug fix: DEFMETHOD forms with CALL-NEXT-METHOD in the method body,
in EVAL-WHEN forms with both :COMPILE-TOPLEVEL and :LOAD-TOPLEVEL
situations requested, are once again file-compileable. (reported
by Sascha Wilde)
<<lessSteel Bank Common Lisp also includes many extensions, such as native threads, socket support, a statistical profiler, programmable streams, and more. These are all available through an integrated, interactive native compiler which feels like an interpreter.
SBCL is unique in being a multiplatform native compiler which bootstraps itself completely from source, using a C compiler and any other ANSI Common Lisp implementation.
Whats New in This Release:
* enhancement: experimental macro SB-EXT:COMPARE-AND-SWAP provides
atomic compare-and-swap operations on threaded platforms.
* enhancement: experimental function SB-EXT:RESTRICT-COMPILER-POLICY
allows assining a global minimum value to optimization qualities
(overriding proclamations and declarations).
* enhancement: closed over variables can be stack-allocated on x86
and x86-64.
* performance bug fix: GETHASH and (SETF GETHASH) are once again
non-consing.
* optimization: slot definition lookup is now O(1). This speeds up
eg. SLOT-VALUE and (SETF SLOT-VALUE) with variable slot names.
* optimization: STRING-TO-OCTETS is now up to 60% faster for UTF-8.
* optimization: ASSOC and MEMBER can now be open-coded for all
combinations of keyword arguments when second argument is constant
and SPEED >= SPACE. In other cases a specialized version is
selected.
* bug fix: using obsoleted structure instances with TYPEP and
generic functions now signals a sensible error.
* bug fix: threads waiting on GET-FOREGROUND can be interrupted.
(reported by Kristoffer Kvello)
* bug fix: backtrace construction is now more careful when making
lisp-objects from pointers on the stack, to avoid creating bogus
objects that can be seen by the GC.
* bug fix: defaulting of values in contexts expecting more than 7
variables now works on x86-64. (reported by Christopher Laux)
* bug fix: modifications to packages (INTERN, EXPORT, etc) are now
thread safe.
* bug fix: (SETF SYMBOL-PLIST) no longer allows assigning a non-list
as the property-list of a symbol.
* bug fix: DEFMETHOD forms with CALL-NEXT-METHOD in the method body,
in EVAL-WHEN forms with both :COMPILE-TOPLEVEL and :LOAD-TOPLEVEL
situations requested, are once again file-compileable. (reported
by Sascha Wilde)
Download (2.7MB)
Added: 2007-07-25 License: BSD License Price:
822 downloads
libstrvar 0.1.0
libstrvar is a simple variable library intended mostly to ease handling of strings and certain types of data exchange. more>>
libstrvar is a simple variable library intended mostly to ease handling of strings and certain types of data exchange inside applications when using C. The project is multithreading safe and licensed under MIT license. It is capable of doing mathematical calculations using strings.
This library started as small helper library for Project Open Channel. It was used as internal data handler when parsing XML like layout files, parsing settings and delivering simple info inside applications. It is easy to use, you just set value for some variable and then use it elsewhere in the program. No need for global variables or externs. And if the variable does not exists, or is somehow invalid in other ways, libstrvar always returns valid value, so program wont crash.
Also, libstrvar is capable of doing mathematical calculations for strings. It can be used quite like as php. You first define some variables, then use them. And ofcourse, if you havent defined variable, it still works. In case of getting string value it simply returns empty string and in case of integer it returns 0.
Example:
Variable called "var" is set to contents "1 + 2 * $x".
Then Variable called "x" is set to contents "sin(1)".
Parsing of "var" results string "1 + 2 + sin(1)".
And calculating result of "var" returns "2.682941.."
libstrvar can also be used to store binary data. Simply said, it is kind of database for storing information using character strings as keys. Internal implementation is currently using linked lists, so its not as fast as it could be. Other features are more important currently.
NOTE: libstrvar is not fully finished and is so still beta! libstrvar API is not fully funtional, mostly the main parts of it work well, but there is some work to be done before it can be released as final.
<<lessThis library started as small helper library for Project Open Channel. It was used as internal data handler when parsing XML like layout files, parsing settings and delivering simple info inside applications. It is easy to use, you just set value for some variable and then use it elsewhere in the program. No need for global variables or externs. And if the variable does not exists, or is somehow invalid in other ways, libstrvar always returns valid value, so program wont crash.
Also, libstrvar is capable of doing mathematical calculations for strings. It can be used quite like as php. You first define some variables, then use them. And ofcourse, if you havent defined variable, it still works. In case of getting string value it simply returns empty string and in case of integer it returns 0.
Example:
Variable called "var" is set to contents "1 + 2 * $x".
Then Variable called "x" is set to contents "sin(1)".
Parsing of "var" results string "1 + 2 + sin(1)".
And calculating result of "var" returns "2.682941.."
libstrvar can also be used to store binary data. Simply said, it is kind of database for storing information using character strings as keys. Internal implementation is currently using linked lists, so its not as fast as it could be. Other features are more important currently.
NOTE: libstrvar is not fully finished and is so still beta! libstrvar API is not fully funtional, mostly the main parts of it work well, but there is some work to be done before it can be released as final.
Download (0.036MB)
Added: 2007-03-12 License: MIT/X Consortium License Price:
956 downloads
Math::BigInt::Calc 1.87
Math::BigInt::Calc is a pure Perl module to support Math::BigInt. more>>
Math::BigInt::Calc is a pure Perl module to support Math::BigInt.
SYNOPSIS
Provides support for big integer calculations. Not intended to be used by other modules. Other modules which sport the same functions can also be used to support Math::BigInt, like Math::BigInt::GMP or Math::BigInt::Pari.
In order to allow for multiple big integer libraries, Math::BigInt was rewritten to use library modules for core math routines. Any module which follows the same API as this can be used instead by using the following:
use Math::BigInt lib => libname;
libname is either the long name (Math::BigInt::Pari), or only the short version like Pari.
METHODS
The following functions MUST be defined in order to support the use by Math::BigInt v1.70 or later:
api_version() return API version, 1 for v1.70, 2 for v1.83
_new(string) return ref to new object from ref to decimal string
_zero() return a new object with value 0
_one() return a new object with value 1
_two() return a new object with value 2
_ten() return a new object with value 10
_str(obj) return ref to a string representing the object
_num(obj) returns a Perl integer/floating point number
NOTE: because of Perl numeric notation defaults,
the _numified obj may lose accuracy due to
machine-dependent floating point size limitations
_add(obj,obj) Simple addition of two objects
_mul(obj,obj) Multiplication of two objects
_div(obj,obj) Division of the 1st object by the 2nd
In list context, returns (result,remainder).
NOTE: this is integer math, so no
fractional part will be returned.
The second operand will be not be 0, so no need to
check for that.
_sub(obj,obj) Simple subtraction of 1 object from another
a third, optional parameter indicates that the params
are swapped. In this case, the first param needs to
be preserved, while you can destroy the second.
sub (x,y,1) => return x - y and keep x intact!
_dec(obj) decrement object by one (input is guaranteed to be > 0)
_inc(obj) increment object by one
_acmp(obj,obj) operator for objects (return -1, 0 or 1)
_len(obj) returns count of the decimal digits of the object
_digit(obj,n) returns the nth decimal digit of object
_is_one(obj) return true if argument is 1
_is_two(obj) return true if argument is 2
_is_ten(obj) return true if argument is 10
_is_zero(obj) return true if argument is 0
_is_even(obj) return true if argument is even (0,2,4,6..)
_is_odd(obj) return true if argument is odd (1,3,5,7..)
_copy return a ref to a true copy of the object
_check(obj) check whether internal representation is still intact
return 0 for ok, otherwise error message as string
_from_hex(str) return new object from a hexadecimal string
_from_bin(str) return new object from a binary string
_from_oct(str) return new object from an octal string
_as_hex(str) return string containing the value as
unsigned hex string, with the 0x prepended.
Leading zeros must be stripped.
_as_bin(str) Like as_hex, only as binary string containing only
zeros and ones. Leading zeros must be stripped and a
0b must be prepended.
_rsft(obj,N,B) shift object in base B by N digits right
_lsft(obj,N,B) shift object in base B by N digits left
_xor(obj1,obj2) XOR (bit-wise) object 1 with object 2
Note: XOR, AND and OR pad with zeros if size mismatches
_and(obj1,obj2) AND (bit-wise) object 1 with object 2
_or(obj1,obj2) OR (bit-wise) object 1 with object 2
_mod(obj1,obj2) Return remainder of div of the 1st by the 2nd object
_sqrt(obj) return the square root of object (truncated to int)
_root(obj) return the nth (n >= 3) root of obj (truncated to int)
_fac(obj) return factorial of object 1 (1*2*3*4..)
_pow(obj1,obj2) return object 1 to the power of object 2
return undef for NaN
_zeros(obj) return number of trailing decimal zeros
_modinv return inverse modulus
_modpow return modulus of power ($x ** $y) % $z
_log_int(X,N) calculate integer log() of X in base N
X >= 0, N >= 0 (return undef for NaN)
returns (RESULT, EXACT) where EXACT is:
1 : result is exactly RESULT
0 : result was truncated to RESULT
undef : unknown whether result is exactly RESULT
_gcd(obj,obj) return Greatest Common Divisor of two objects
The following functions are REQUIRED for an api_version of 2 or greater:
_1ex($x) create the number 1Ex where x >= 0
_alen(obj) returns approximate count of the decimal digits of the
object. This estimate MUST always be greater or equal
to what _len() returns.
_nok(n,k) calculate n over k (binomial coefficient)
The following functions are optional, and can be defined if the underlying lib has a fast way to do them. If undefined, Math::BigInt will use pure Perl (hence slow) fallback routines to emulate these:
_signed_or
_signed_and
_signed_xor
Input strings come in as unsigned but with prefix (i.e. as 123, 0xabc or 0b1101).
So the library needs only to deal with unsigned big integers. Testing of input parameter validity is done by the caller, so you need not worry about underflow (f.i. in _sub(), _dec()) nor about division by zero or similar cases.
The first parameter can be modified, that includes the possibility that you return a reference to a completely different object instead. Although keeping the reference and just changing its contents is preferred over creating and returning a different reference.
Return values are always references to objects, strings, or true/false for comparison routines.
<<lessSYNOPSIS
Provides support for big integer calculations. Not intended to be used by other modules. Other modules which sport the same functions can also be used to support Math::BigInt, like Math::BigInt::GMP or Math::BigInt::Pari.
In order to allow for multiple big integer libraries, Math::BigInt was rewritten to use library modules for core math routines. Any module which follows the same API as this can be used instead by using the following:
use Math::BigInt lib => libname;
libname is either the long name (Math::BigInt::Pari), or only the short version like Pari.
METHODS
The following functions MUST be defined in order to support the use by Math::BigInt v1.70 or later:
api_version() return API version, 1 for v1.70, 2 for v1.83
_new(string) return ref to new object from ref to decimal string
_zero() return a new object with value 0
_one() return a new object with value 1
_two() return a new object with value 2
_ten() return a new object with value 10
_str(obj) return ref to a string representing the object
_num(obj) returns a Perl integer/floating point number
NOTE: because of Perl numeric notation defaults,
the _numified obj may lose accuracy due to
machine-dependent floating point size limitations
_add(obj,obj) Simple addition of two objects
_mul(obj,obj) Multiplication of two objects
_div(obj,obj) Division of the 1st object by the 2nd
In list context, returns (result,remainder).
NOTE: this is integer math, so no
fractional part will be returned.
The second operand will be not be 0, so no need to
check for that.
_sub(obj,obj) Simple subtraction of 1 object from another
a third, optional parameter indicates that the params
are swapped. In this case, the first param needs to
be preserved, while you can destroy the second.
sub (x,y,1) => return x - y and keep x intact!
_dec(obj) decrement object by one (input is guaranteed to be > 0)
_inc(obj) increment object by one
_acmp(obj,obj) operator for objects (return -1, 0 or 1)
_len(obj) returns count of the decimal digits of the object
_digit(obj,n) returns the nth decimal digit of object
_is_one(obj) return true if argument is 1
_is_two(obj) return true if argument is 2
_is_ten(obj) return true if argument is 10
_is_zero(obj) return true if argument is 0
_is_even(obj) return true if argument is even (0,2,4,6..)
_is_odd(obj) return true if argument is odd (1,3,5,7..)
_copy return a ref to a true copy of the object
_check(obj) check whether internal representation is still intact
return 0 for ok, otherwise error message as string
_from_hex(str) return new object from a hexadecimal string
_from_bin(str) return new object from a binary string
_from_oct(str) return new object from an octal string
_as_hex(str) return string containing the value as
unsigned hex string, with the 0x prepended.
Leading zeros must be stripped.
_as_bin(str) Like as_hex, only as binary string containing only
zeros and ones. Leading zeros must be stripped and a
0b must be prepended.
_rsft(obj,N,B) shift object in base B by N digits right
_lsft(obj,N,B) shift object in base B by N digits left
_xor(obj1,obj2) XOR (bit-wise) object 1 with object 2
Note: XOR, AND and OR pad with zeros if size mismatches
_and(obj1,obj2) AND (bit-wise) object 1 with object 2
_or(obj1,obj2) OR (bit-wise) object 1 with object 2
_mod(obj1,obj2) Return remainder of div of the 1st by the 2nd object
_sqrt(obj) return the square root of object (truncated to int)
_root(obj) return the nth (n >= 3) root of obj (truncated to int)
_fac(obj) return factorial of object 1 (1*2*3*4..)
_pow(obj1,obj2) return object 1 to the power of object 2
return undef for NaN
_zeros(obj) return number of trailing decimal zeros
_modinv return inverse modulus
_modpow return modulus of power ($x ** $y) % $z
_log_int(X,N) calculate integer log() of X in base N
X >= 0, N >= 0 (return undef for NaN)
returns (RESULT, EXACT) where EXACT is:
1 : result is exactly RESULT
0 : result was truncated to RESULT
undef : unknown whether result is exactly RESULT
_gcd(obj,obj) return Greatest Common Divisor of two objects
The following functions are REQUIRED for an api_version of 2 or greater:
_1ex($x) create the number 1Ex where x >= 0
_alen(obj) returns approximate count of the decimal digits of the
object. This estimate MUST always be greater or equal
to what _len() returns.
_nok(n,k) calculate n over k (binomial coefficient)
The following functions are optional, and can be defined if the underlying lib has a fast way to do them. If undefined, Math::BigInt will use pure Perl (hence slow) fallback routines to emulate these:
_signed_or
_signed_and
_signed_xor
Input strings come in as unsigned but with prefix (i.e. as 123, 0xabc or 0b1101).
So the library needs only to deal with unsigned big integers. Testing of input parameter validity is done by the caller, so you need not worry about underflow (f.i. in _sub(), _dec()) nor about division by zero or similar cases.
The first parameter can be modified, that includes the possibility that you return a reference to a completely different object instead. Although keeping the reference and just changing its contents is preferred over creating and returning a different reference.
Return values are always references to objects, strings, or true/false for comparison routines.
Download (0.19MB)
Added: 2007-08-03 License: Perl Artistic License Price:
499 downloads
CGI::Simple 0.079
CGI::Simple is a simple totally OO CGI interface that is CGI.pm compliant. more>>
CGI::Simple is a simple totally OO CGI interface that is CGI.pm compliant.
SYNOPSIS
use CGI::Simple;
$CGI::Simple::POST_MAX = 1024; # max upload via post default 100kB
$CGI::Simple::DISABLE_UPLOADS = 0; # enable uploads
$q = new CGI::Simple;
$q = new CGI::Simple( { foo=>1, bar=>[2,3,4] } );
$q = new CGI::Simple( foo=1&bar=2&bar=3&bar=4 );
$q = new CGI::Simple( *FILEHANDLE );
$q->save( *FILEHANDLE ); # save current object to a file as used by new
@params = $q->param; # return all param names as a list
$value = $q->param(foo); # return the first value supplied for foo
@values = $q->param(foo); # return all values supplied for foo
%fields = $q->Vars; # returns untied key value pair hash
$hash_ref = $q->Vars; # or as a hash ref
%fields = $q->Vars("|"); # packs multiple values with "|" rather than " ";
@keywords = $q->keywords; # return all keywords as a list
$q->param( foo, some, new, values ); # set new foo values
$q->param( -name=>foo, -value=>bar );
$q->param( -name=>foo, -value=>[bar,baz] );
$q->param( foo, some, new, values ); # append values to foo
$q->append( -name=>foo, -value=>bar );
$q->append( -name=>foo, -value=>[some, new, values] );
$q->delete(foo); # delete param foo and all its values
$q->delete_all; # delete everything
$files = $q->upload() # number of files uploaded
@files = $q->upload(); # names of all uploaded files
$filename = $q->param(upload_file) # filename of uploaded file
$mime = $q->upload_info($filename,mime); # MIME type of uploaded file
$size = $q->upload_info($filename,size); # size of uploaded file
my $fh = $q->upload($filename); # get filehandle to read from
while ( read( $fh, $buffer, 1024 ) ) { ... }
# short and sweet upload
$ok = $q->upload( $q->param(upload_file), /path/to/write/file.name );
print "Uploaded ".$q->param(upload_file)." and wrote it OK!" if $ok;
$decoded = $q->url_decode($encoded);
$encoded = $q->url_encode($unencoded);
$escaped = $q->escapeHTML("&);
$unescaped = $q->unescapeHTML("&);
$qs = $q->query_string; # get all data in $q as a query string OK for GET
$q->no_cache(1); # set Pragma: no-cache + expires
print $q->header(); # print a simple header
# get a complex header
$header = $q->header( -type => image/gif
-nph => 1,
-status => 402 Payment required,
-expires =>+24h,
-cookie => $cookie,
-charset => utf-7,
-attachment => foo.gif,
-Cost => $2.00
);
# a p3p header (OK for redirect use as well)
$header = $q->header( -p3p => policyref="http://somesite.com/P3P/PolicyReferences.xml );
@cookies = $q->cookie(); # get names of all available cookies
$value = $q->cookie(foo) # get first value of cookie foo
@value = $q->cookie(foo) # get all values of cookie foo
# get a cookie formatted for header() method
$cookie = $q->cookie( -name => Password,
-values => [superuser,god,my dog woofie],
-expires => +3d,
-domain => .nowhere.com,
-path => /cgi-bin/database,
-secure => 1
);
print $q->header( -cookie=>$cookie ); # set cookie
print $q->redirect(http://go.away.now); # print a redirect header
dienice( $q->cgi_error ) if $q->cgi_error;
CGI::Simple provides a relatively lightweight drop in replacement for CGI.pm. It shares an identical OO interface to CGI.pm for parameter parsing, file upload, cookie handling and header generation. This module is entirely object oriented, however a complete functional interface is available by using the CGI::Simple::Standard module.
Essentially everything in CGI.pm that relates to the CGI (not HTML) side of things is available. There are even a few new methods and additions to old ones! If you are interested in what has gone on under the hood see the Compatibility with CGI.pm section at the end.
In practical testing this module loads and runs about twice as fast as CGI.pm depending on the precise task.
<<lessSYNOPSIS
use CGI::Simple;
$CGI::Simple::POST_MAX = 1024; # max upload via post default 100kB
$CGI::Simple::DISABLE_UPLOADS = 0; # enable uploads
$q = new CGI::Simple;
$q = new CGI::Simple( { foo=>1, bar=>[2,3,4] } );
$q = new CGI::Simple( foo=1&bar=2&bar=3&bar=4 );
$q = new CGI::Simple( *FILEHANDLE );
$q->save( *FILEHANDLE ); # save current object to a file as used by new
@params = $q->param; # return all param names as a list
$value = $q->param(foo); # return the first value supplied for foo
@values = $q->param(foo); # return all values supplied for foo
%fields = $q->Vars; # returns untied key value pair hash
$hash_ref = $q->Vars; # or as a hash ref
%fields = $q->Vars("|"); # packs multiple values with "|" rather than " ";
@keywords = $q->keywords; # return all keywords as a list
$q->param( foo, some, new, values ); # set new foo values
$q->param( -name=>foo, -value=>bar );
$q->param( -name=>foo, -value=>[bar,baz] );
$q->param( foo, some, new, values ); # append values to foo
$q->append( -name=>foo, -value=>bar );
$q->append( -name=>foo, -value=>[some, new, values] );
$q->delete(foo); # delete param foo and all its values
$q->delete_all; # delete everything
$files = $q->upload() # number of files uploaded
@files = $q->upload(); # names of all uploaded files
$filename = $q->param(upload_file) # filename of uploaded file
$mime = $q->upload_info($filename,mime); # MIME type of uploaded file
$size = $q->upload_info($filename,size); # size of uploaded file
my $fh = $q->upload($filename); # get filehandle to read from
while ( read( $fh, $buffer, 1024 ) ) { ... }
# short and sweet upload
$ok = $q->upload( $q->param(upload_file), /path/to/write/file.name );
print "Uploaded ".$q->param(upload_file)." and wrote it OK!" if $ok;
$decoded = $q->url_decode($encoded);
$encoded = $q->url_encode($unencoded);
$escaped = $q->escapeHTML("&);
$unescaped = $q->unescapeHTML("&);
$qs = $q->query_string; # get all data in $q as a query string OK for GET
$q->no_cache(1); # set Pragma: no-cache + expires
print $q->header(); # print a simple header
# get a complex header
$header = $q->header( -type => image/gif
-nph => 1,
-status => 402 Payment required,
-expires =>+24h,
-cookie => $cookie,
-charset => utf-7,
-attachment => foo.gif,
-Cost => $2.00
);
# a p3p header (OK for redirect use as well)
$header = $q->header( -p3p => policyref="http://somesite.com/P3P/PolicyReferences.xml );
@cookies = $q->cookie(); # get names of all available cookies
$value = $q->cookie(foo) # get first value of cookie foo
@value = $q->cookie(foo) # get all values of cookie foo
# get a cookie formatted for header() method
$cookie = $q->cookie( -name => Password,
-values => [superuser,god,my dog woofie],
-expires => +3d,
-domain => .nowhere.com,
-path => /cgi-bin/database,
-secure => 1
);
print $q->header( -cookie=>$cookie ); # set cookie
print $q->redirect(http://go.away.now); # print a redirect header
dienice( $q->cgi_error ) if $q->cgi_error;
CGI::Simple provides a relatively lightweight drop in replacement for CGI.pm. It shares an identical OO interface to CGI.pm for parameter parsing, file upload, cookie handling and header generation. This module is entirely object oriented, however a complete functional interface is available by using the CGI::Simple::Standard module.
Essentially everything in CGI.pm that relates to the CGI (not HTML) side of things is available. There are even a few new methods and additions to old ones! If you are interested in what has gone on under the hood see the Compatibility with CGI.pm section at the end.
In practical testing this module loads and runs about twice as fast as CGI.pm depending on the precise task.
Download (0.083MB)
Added: 2007-03-08 License: Perl Artistic License Price:
960 downloads
Tree::BPTree 1.07
Tree::BPTree is a Perl implementation of B+ trees. more>>
Tree::BPTree is a Perl implementation of B+ trees.
SYNOPSIS
use Tree::BPTree;
# These arguments are actually the defaults
my $tree = new Tree::BPTree(
-n => 3,
-unique => 0,
-keycmp => sub { $_[0] cmp $_[1] },
-valuecmp => sub { $_[0] $_[1] },
);
# index the entries in this string:
my $string = "THERES MORE THAN ONE WAY TO DO IT"; # TMTOWTDI
my $i = 0;
$tree->insert($_, $i++) foreach (split //, $string);
# find the index of the first T
my $t = $tree->find(T);
# find the indexes of every T
my @t = $tree->find(T);
# We dont like the word WAY , so lets remove it
my $i = index $string, W;
$tree->delete($_, $i++) foreach (split //, substr($string, $i, 4));
# Reverse the sort order
$tree->reverse;
# Iterate through each key/value pair just like built-in each operator
while (my ($key, $value) = $tree->each) {
print "$key => $valuen";
}
# Reset the iterator when we quit from an "each-loop" early
$tree->reset;
# You might also be interested in using multiple each loops at once, which is
# possible through the cursor syntax. You can even delete individual pairs
# from the list during iteration.
my $cursor = $tree->new_cursor;
while (my ($key, $value) = $cursor->each) {
my $nested = $tree->new_cursor;
while (my ($nkey, $nvalue) = $nested->each) {
if ($key->shouldnt_be_in_this_tree_with($nkey)) {
$nested->delete;
}
}
}
# Iterate using an iterator subroutine
$tree->iterate(sub { print "$_[0] => $_[1]n" });
# Iterate using an iterator subroutine that returns the list of return values
# returned by the iterator
print join(, , $tree->map(sub { "$_[0] => $_[1]" })),"n";
# Grep-like operations
my @pairs = $tree->grep (sub { $_[0] =~ /S/ });
my @keys = $tree->grep_keys (sub { $_[0] =~ /S/ });
my @values = $tree->grep_values (sub { $_[0] =~ /S/ });
# Get all keys, values
my @all_keys = $tree->keys;
my @all_values = $tree->values;
# Clear it out and start over
$tree->clear;
B+ trees are balanced trees which provide an ordered map from keys to values. They are useful for indexing large bodies of data. They are similar to 2-3-4 Trees and Red-Black Trees. This implementation supports B+ trees using an arbitrary n value.
<<lessSYNOPSIS
use Tree::BPTree;
# These arguments are actually the defaults
my $tree = new Tree::BPTree(
-n => 3,
-unique => 0,
-keycmp => sub { $_[0] cmp $_[1] },
-valuecmp => sub { $_[0] $_[1] },
);
# index the entries in this string:
my $string = "THERES MORE THAN ONE WAY TO DO IT"; # TMTOWTDI
my $i = 0;
$tree->insert($_, $i++) foreach (split //, $string);
# find the index of the first T
my $t = $tree->find(T);
# find the indexes of every T
my @t = $tree->find(T);
# We dont like the word WAY , so lets remove it
my $i = index $string, W;
$tree->delete($_, $i++) foreach (split //, substr($string, $i, 4));
# Reverse the sort order
$tree->reverse;
# Iterate through each key/value pair just like built-in each operator
while (my ($key, $value) = $tree->each) {
print "$key => $valuen";
}
# Reset the iterator when we quit from an "each-loop" early
$tree->reset;
# You might also be interested in using multiple each loops at once, which is
# possible through the cursor syntax. You can even delete individual pairs
# from the list during iteration.
my $cursor = $tree->new_cursor;
while (my ($key, $value) = $cursor->each) {
my $nested = $tree->new_cursor;
while (my ($nkey, $nvalue) = $nested->each) {
if ($key->shouldnt_be_in_this_tree_with($nkey)) {
$nested->delete;
}
}
}
# Iterate using an iterator subroutine
$tree->iterate(sub { print "$_[0] => $_[1]n" });
# Iterate using an iterator subroutine that returns the list of return values
# returned by the iterator
print join(, , $tree->map(sub { "$_[0] => $_[1]" })),"n";
# Grep-like operations
my @pairs = $tree->grep (sub { $_[0] =~ /S/ });
my @keys = $tree->grep_keys (sub { $_[0] =~ /S/ });
my @values = $tree->grep_values (sub { $_[0] =~ /S/ });
# Get all keys, values
my @all_keys = $tree->keys;
my @all_values = $tree->values;
# Clear it out and start over
$tree->clear;
B+ trees are balanced trees which provide an ordered map from keys to values. They are useful for indexing large bodies of data. They are similar to 2-3-4 Trees and Red-Black Trees. This implementation supports B+ trees using an arbitrary n value.
Download (0.017MB)
Added: 2006-07-04 License: Perl Artistic License Price:
1208 downloads
NullableTypes 1.2
NullableTypes for .NET are a very reliable and efficient version of built-in value-types that can be Null. more>>
NullableTypes for .NET are a very reliable and efficient version of built-in value-types that can be Null. NullableTypes pass more than 800 differents test cases and have close-to-optimal efficiency as built-in value-types. They may be used every time you need to store a Null value in a .NET built-in value-type.
Types implemented by NullableTypes are: NullableBoolean, NullableByte, NullableInt16, NullableInt32, NullableInt64, NullableSingle, NullableDouble, NullableDecimal, NullableString and NullableDateTime.
Helper functions provide seamless integration with Windows and ASP.NET user controls and with ADO.NET.
NullableTypes will let you write code like this:
public sealed class Order{
public int OrderID {get {/*...*/}}
public int CustomerID {get {/*...*/}}
public NullableDateTime RequestedDeliveryDate {get {/*...*/}}
// remaining members elided for clarity
}
where RequestedDeliveryDate can be either NullableDateTime.Null or a valid DateTime value.
The property RequestedDeliveryDate.IsNull tests if the date is Null, and when it is not Null the property RequestedDeliveryDate.Value returns a valid DateTime value.
<<lessTypes implemented by NullableTypes are: NullableBoolean, NullableByte, NullableInt16, NullableInt32, NullableInt64, NullableSingle, NullableDouble, NullableDecimal, NullableString and NullableDateTime.
Helper functions provide seamless integration with Windows and ASP.NET user controls and with ADO.NET.
NullableTypes will let you write code like this:
public sealed class Order{
public int OrderID {get {/*...*/}}
public int CustomerID {get {/*...*/}}
public NullableDateTime RequestedDeliveryDate {get {/*...*/}}
// remaining members elided for clarity
}
where RequestedDeliveryDate can be either NullableDateTime.Null or a valid DateTime value.
The property RequestedDeliveryDate.IsNull tests if the date is Null, and when it is not Null the property RequestedDeliveryDate.Value returns a valid DateTime value.
Download (0.76MB)
Added: 2006-09-06 License: MIT/X Consortium License Price:
1143 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 native compiler return value bc2001 file 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