variable
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 1371
Variable::Alias 0.01
Variable::Alias is a Perl module created to alias any variable to any other variable. more>>
Variable::Alias is a Perl module created to alias any variable to any other variable.
SYNOPSIS
use Variable::Alias alias;
my $src;
my $a;
our $b;
my @c;
our @d;
alias $src => $a;
alias $a => $b;
alias $b => $c[0];
alias @c => @d;
$src=src;
# All the other variables now have the string
# src in the appropriate places.
There are various ways to alias one variable to another in Perl. The most popular is by assigning to typeglobs. This is quite efective, but only works with globals. Another method is to use a module like Lexical::Alias or Devel::LexAlias, but as their names suggest, these only work with lexicals. Theres no way to alias an element of an array or hash.
Variable::Alias changes all that. It uses a tie to provide One True Way to alias a variable.
Interface
Variable::Alias may export any or all of five functions. If youve used Lexical::Alias, the interface is virtually identical.
alias(VAR, VAR)
alias takes two variables of any type (scalar, array or hash) and aliases them. Make sure they have the sigil you want on the front.
This function is only available in Perl 5.8.0 and later, because the prototype tricks it uses were first implemented in that version.
alias_s(SCALAR, SCALAR)
alias_s takes two scalars and aliases them.
alias_a(ARRAY, ARRAY)
alias_a takes two arrays and aliases them. Note that this is actual arrays, not array elements, although you can alias references in elements, like so:
alias_a(@short, @{$some->sequence->{of}->calls->{thats}[2]{long}});
alias_h(HASH, HASH)
alias_h takes two hashes and aliases them.
alias_r(REF, REF)
alias_r takes two references and aliases them. The referents must be of the same type.
<<lessSYNOPSIS
use Variable::Alias alias;
my $src;
my $a;
our $b;
my @c;
our @d;
alias $src => $a;
alias $a => $b;
alias $b => $c[0];
alias @c => @d;
$src=src;
# All the other variables now have the string
# src in the appropriate places.
There are various ways to alias one variable to another in Perl. The most popular is by assigning to typeglobs. This is quite efective, but only works with globals. Another method is to use a module like Lexical::Alias or Devel::LexAlias, but as their names suggest, these only work with lexicals. Theres no way to alias an element of an array or hash.
Variable::Alias changes all that. It uses a tie to provide One True Way to alias a variable.
Interface
Variable::Alias may export any or all of five functions. If youve used Lexical::Alias, the interface is virtually identical.
alias(VAR, VAR)
alias takes two variables of any type (scalar, array or hash) and aliases them. Make sure they have the sigil you want on the front.
This function is only available in Perl 5.8.0 and later, because the prototype tricks it uses were first implemented in that version.
alias_s(SCALAR, SCALAR)
alias_s takes two scalars and aliases them.
alias_a(ARRAY, ARRAY)
alias_a takes two arrays and aliases them. Note that this is actual arrays, not array elements, although you can alias references in elements, like so:
alias_a(@short, @{$some->sequence->{of}->calls->{thats}[2]{long}});
alias_h(HASH, HASH)
alias_h takes two hashes and aliases them.
alias_r(REF, REF)
alias_r takes two references and aliases them. The referents must be of the same type.
Download (0.003MB)
Added: 2007-05-04 License: Perl Artistic License Price:
903 downloads
Language::Basic::Variable 1.44
Language::Basic::Variable is a Perl module to handle parsing and implementing BASIC variables. more>>
Language::Basic::Variable is a Perl module to handle parsing and implementing BASIC variables.
SYNOPSIS
See Language::Basic for the overview of how the Language::Basic module works. This pod page is more technical.
There are two sorts of variables: Arrays and Scalars. Each of those classes has a subclass for Numeric or String variables.
An Array needs to have full LBV::Scalar objects in it, rather than just having an array of values. The reason is that, for example, you might use ARR(3) as the variable in a FOR loop. Also, the "set" and "value" methods apply to a LBV::Scalar (since you cant set an array to a value (in BASIC) so in order to be handle A(3)=3, A(3) needs to be an LBV::Scalar.
The lookup method looks up a variable in the Array or Scalar lookup table (depending on whether there were parentheses after the variable name). BASIC allows undeclared variables, so if the variable name hasnt been seen before, a new variable is created.
Language::Basic::Variable::Scalar class
This class handles a variable or one cell in an array.
Methods include "value", which gets the variables value, and "set", which sets it.
Language::Basic::Variable::Array class
This class handles a BASIC array. Each cell in the array is a LBV::Scalar object.
Methods include "dimension", which dimensions the array to a given size (or a default size) and get_cell, which returns the LBV::Scalar object in a given array location.
Note that BASIC arrays start from 0!
<<lessSYNOPSIS
See Language::Basic for the overview of how the Language::Basic module works. This pod page is more technical.
There are two sorts of variables: Arrays and Scalars. Each of those classes has a subclass for Numeric or String variables.
An Array needs to have full LBV::Scalar objects in it, rather than just having an array of values. The reason is that, for example, you might use ARR(3) as the variable in a FOR loop. Also, the "set" and "value" methods apply to a LBV::Scalar (since you cant set an array to a value (in BASIC) so in order to be handle A(3)=3, A(3) needs to be an LBV::Scalar.
The lookup method looks up a variable in the Array or Scalar lookup table (depending on whether there were parentheses after the variable name). BASIC allows undeclared variables, so if the variable name hasnt been seen before, a new variable is created.
Language::Basic::Variable::Scalar class
This class handles a variable or one cell in an array.
Methods include "value", which gets the variables value, and "set", which sets it.
Language::Basic::Variable::Array class
This class handles a BASIC array. Each cell in the array is a LBV::Scalar object.
Methods include "dimension", which dimensions the array to a given size (or a default size) and get_cell, which returns the LBV::Scalar object in a given array location.
Note that BASIC arrays start from 0!
Download (0.051MB)
Added: 2006-09-29 License: Perl Artistic License Price:
1121 downloads
Variable Expression Library 1.1
Variable Expression Library is a C++ library that expands variables in text buffers. more>>
libvarexp is a C++ library that allows its users to detach any kind of information from the representation of that information by providing a simple-to-use but powerful text-template mechanism.
Similar mechanisms have been available in tools like sh(1), make(1), or perl(1) forever and have proven to be very useful.
The basic idea is that the relevant information is made available in variables, which the author of the template can than use within the text itself as he or she sees fit.
Consider, for example, a tool that will calculate the monthly financial reports of a small company.
Such a program should only calculate the required values, it should not worry about writing the resulting reports into an HTML file, a CSV file, or whatever format is desired. Instead, it should make the results of the calculation available in the variables "$TURNOVER", "$PROFIT", and "$INCREASE".
Then, using libvarexp, it could load an arbitrary template file and have the actual values inserted at the apropriate positions. Without changing a single line of code, one could generate the monthly report in HTML
<<lessSimilar mechanisms have been available in tools like sh(1), make(1), or perl(1) forever and have proven to be very useful.
The basic idea is that the relevant information is made available in variables, which the author of the template can than use within the text itself as he or she sees fit.
Consider, for example, a tool that will calculate the monthly financial reports of a small company.
Such a program should only calculate the required values, it should not worry about writing the resulting reports into an HTML file, a CSV file, or whatever format is desired. Instead, it should make the results of the calculation available in the variables "$TURNOVER", "$PROFIT", and "$INCREASE".
Then, using libvarexp, it could load an arbitrary template file and have the actual values inserted at the apropriate positions. Without changing a single line of code, one could generate the monthly report in HTML
Download (0.093MB)
Added: 2005-10-06 License: BSD License Price:
1478 downloads
Variable::Strongly::Typed 1.1.0
Variable::Strongly::Typed is a Perl module to let some variables be strongly typed. more>>
Variable::Strongly::Typed is a Perl module to let some variables be strongly typed.
SYNOPSIS
use Variable::Strongly::Typed;
my $int :TYPE(int); # must have an int value
my $float :TYPE(float); # must have a float value
my $string :TYPE(string); # must not be a reference
my $file :TYPE(IO::File); # must be an IO::File
my @array_of_ints :TYPE(int); # Each slot must contain
# an int
my %hash_of_floats :TYPE(float); # Each value must be a float
my $int_own_error :TYPE(int, &my_own_error_handler);
# Roll my own error handler
my @array_of_rgb :TYPE(&red_green_blue); # my enumerated type
# For subs!!
sub return_an_int :TYPE(int) {
# .. do some stuff ..
return $something;
}
# ... and later ...
$int = 23; # All is well
$int = howdy!; # This line will croak with a good error message
$float = 3.23; # All is well, nothing to see here
$float = new XML::Parser; # croak!
$array_of_ints[23] = 44; # Groovy
$array_of_ints[12] = yah; # croak!
$hash_of_floats{pi} = 3.14159; # no problem
$hash_of_floats{e} = new IO::File; # croak!
# Return 1 if this val is RED, BLUE, or GREEN
# 0 otherwise
sub red_green_blue {
local $_ = shift;
/A RED z/xms || /A BLUE z/xms || /A GREEN z/xms;
}
$array_of_my_very_own_types[23] = 99; # croak!
$array_of_my_very_own_types[2] = BLUE; # OK!
$int_own_error = lksdklwe; # The sub my_own_error_hanlder
# will be # called with the
# offending value
my $got_it = return_an_int(); # Will croak (or call your error
# function) # if this sub doesnt
# return an int
This modules allow you to strongly type your variables. Also known as the no fun module - it can greatly enhance you codes quality and robustness.
By enforcing types on some (or all) of your variables you will eliminate a large class of careless (& not so careless) errors.
This could also aid an editor or code-browsing tools to verify code correctness without having to execute the script.
<<lessSYNOPSIS
use Variable::Strongly::Typed;
my $int :TYPE(int); # must have an int value
my $float :TYPE(float); # must have a float value
my $string :TYPE(string); # must not be a reference
my $file :TYPE(IO::File); # must be an IO::File
my @array_of_ints :TYPE(int); # Each slot must contain
# an int
my %hash_of_floats :TYPE(float); # Each value must be a float
my $int_own_error :TYPE(int, &my_own_error_handler);
# Roll my own error handler
my @array_of_rgb :TYPE(&red_green_blue); # my enumerated type
# For subs!!
sub return_an_int :TYPE(int) {
# .. do some stuff ..
return $something;
}
# ... and later ...
$int = 23; # All is well
$int = howdy!; # This line will croak with a good error message
$float = 3.23; # All is well, nothing to see here
$float = new XML::Parser; # croak!
$array_of_ints[23] = 44; # Groovy
$array_of_ints[12] = yah; # croak!
$hash_of_floats{pi} = 3.14159; # no problem
$hash_of_floats{e} = new IO::File; # croak!
# Return 1 if this val is RED, BLUE, or GREEN
# 0 otherwise
sub red_green_blue {
local $_ = shift;
/A RED z/xms || /A BLUE z/xms || /A GREEN z/xms;
}
$array_of_my_very_own_types[23] = 99; # croak!
$array_of_my_very_own_types[2] = BLUE; # OK!
$int_own_error = lksdklwe; # The sub my_own_error_hanlder
# will be # called with the
# offending value
my $got_it = return_an_int(); # Will croak (or call your error
# function) # if this sub doesnt
# return an int
This modules allow you to strongly type your variables. Also known as the no fun module - it can greatly enhance you codes quality and robustness.
By enforcing types on some (or all) of your variables you will eliminate a large class of careless (& not so careless) errors.
This could also aid an editor or code-browsing tools to verify code correctness without having to execute the script.
Download (0.010MB)
Added: 2007-01-18 License: Perl Artistic License Price:
1009 downloads
Variable::Strongly::Typed::Scalar 1.1.0
Variable::Strongly::Typed::Scalar is Perl module for strongly typed scalar. more>>
Variable::Strongly::Typed::Scalar is Perl module for strongly typed scalar.
SYNOPSIS
This class is utilized by Variable::Strongly::Typed - you dont access this directly
=head1 DESCRIPTION
<<lessSYNOPSIS
This class is utilized by Variable::Strongly::Typed - you dont access this directly
=head1 DESCRIPTION
Download (0.010MB)
Added: 2007-01-18 License: Perl Artistic License Price:
1009 downloads
Variable::Strongly::Typed::Array 1.1.0
Variable::Strongly::Typed::Array is a Perl module for strongly typed array. more>>
Variable::Strongly::Typed::Array is a Perl module for strongly typed array.
SYNOPSIS
This class is utilized by Variable::Strongly::Typed - you dont access this directly
my @array_of_ints :TYPE(int); # Each slot must contain an int
my @array_of_rgb :TYPE(&red_green_blue); # my enumerated type
# ... and later ...
$array_of_ints[23] = 44; # Groovy
$array_of_ints[12] = yah; # croak!
# Return 1 if this val is RED, BLUE, or GREEN
# 0 otherwise
sub red_green_blue {
local $_ = shift;
/A RED z/xms || /A BLUE z/xms || /A GREEN z/xms;
}
$array_of_my_very_own_types[23] = 99; # croak!
$array_of_my_very_own_types[2] = BLUE; # OK!
<<lessSYNOPSIS
This class is utilized by Variable::Strongly::Typed - you dont access this directly
my @array_of_ints :TYPE(int); # Each slot must contain an int
my @array_of_rgb :TYPE(&red_green_blue); # my enumerated type
# ... and later ...
$array_of_ints[23] = 44; # Groovy
$array_of_ints[12] = yah; # croak!
# Return 1 if this val is RED, BLUE, or GREEN
# 0 otherwise
sub red_green_blue {
local $_ = shift;
/A RED z/xms || /A BLUE z/xms || /A GREEN z/xms;
}
$array_of_my_very_own_types[23] = 99; # croak!
$array_of_my_very_own_types[2] = BLUE; # OK!
Download (0.010MB)
Added: 2007-01-18 License: Perl Artistic License Price:
1009 downloads
MySQL Global User Variables UDF 1.0
MySQL Global User Variables UDF is a MySQL extension to store persistent variables. more>>
MySQL Global User Variables UDF is a MySQL extension to store persistent variables.
This shared library adds simple user functions to MySQL in order to keep persistent shared variables in memory. These variables and their values are available to all clients. Any data can be stored into these persistent variables, including BLOBs. Since updates are atomic and way faster than MEMORY tables, this is an easy and efficient way to handle counters and sequences.
Usage:
Storing a value
An unlimited number of user variables can be created, as long as memory is available.
The GLOBAL_STORE(, ) stores a new shared global variable.
Examples:
mysql> DO GLOBAL_STORE("online_users", 42);
mysql> DO GLOBAL_STORE("secret_key", "pajfUyfnd");
The GLOBAL_STORE() function always returns 1 unless an error occurred.
Fetching a value
Reading the value of a variable is the job of the GLOBAL_GET() function.
The value is returned, or NULL is the variable is undefined.
Example:
mysql> SELECT GLOBAL_GET("online_users;);
42
mysql> SELECT id FROM pxs WHERE secret_key = GLOBAL_GET("secret_key");
1
Atomic increments
A single function call can read the previous value, add an integer (that can be negative), and store the new value into the variable.
The function is GLOBAL_ADD(, ) and the return value is the new value of the variable.
Updates are always atomic, if the old value is 18 and you add 1, you will always get back 19.
Example:
mysql> DO GLOBAL_ADD("online_users", 1);
mysql> SELECT GLOBAL_ADD("online_users", -4);
39
If the value of a variable was a string, the new value is the increment:
mysql> SELECT GLOBAL_ADD("secret_key", 12);
12
Adding a value to an undefined variable returns NULL.
A handy variant is GLOBAL_ADDP(, ). GLOBAL_ADDP() is similar to GLOBAL_ADD() but returns the PREVIOUS value of the variable instead of the new one.
Example:
mysql> DO GLOBAL_SET("xxx", 10);
mysql> SELECT GLOBAL_ADDP("xxx", 1);
10
mysql> SELECT GLOBAL_ADDP("xxx", 1);
11
Installation:
On most systems, compiling and installing the library should be as simple as typing (as root):
make install
The shared library is installed as /usr/local/lib/udf_global_user_variables.so
If the base directory of your MySQL installation is not in /usr/local, just type:
make
and then copy udf_global_user_variables.so to the right location for UDFs on your system (maybe /usr/lib/).
The name of a variable is limited to 256 bytes. If that limit is too low for your specific application, just edit the MAX_NAME_LENGTH variable on top of the .c file and reinstall. Variable names can contain binary characters.
Values are limited to 65536 bytes. If that limit is too low for you, edit the MAX_VALUE_LENGTH variable and reinstall.
<<lessThis shared library adds simple user functions to MySQL in order to keep persistent shared variables in memory. These variables and their values are available to all clients. Any data can be stored into these persistent variables, including BLOBs. Since updates are atomic and way faster than MEMORY tables, this is an easy and efficient way to handle counters and sequences.
Usage:
Storing a value
An unlimited number of user variables can be created, as long as memory is available.
The GLOBAL_STORE(, ) stores a new shared global variable.
Examples:
mysql> DO GLOBAL_STORE("online_users", 42);
mysql> DO GLOBAL_STORE("secret_key", "pajfUyfnd");
The GLOBAL_STORE() function always returns 1 unless an error occurred.
Fetching a value
Reading the value of a variable is the job of the GLOBAL_GET() function.
The value is returned, or NULL is the variable is undefined.
Example:
mysql> SELECT GLOBAL_GET("online_users;);
42
mysql> SELECT id FROM pxs WHERE secret_key = GLOBAL_GET("secret_key");
1
Atomic increments
A single function call can read the previous value, add an integer (that can be negative), and store the new value into the variable.
The function is GLOBAL_ADD(, ) and the return value is the new value of the variable.
Updates are always atomic, if the old value is 18 and you add 1, you will always get back 19.
Example:
mysql> DO GLOBAL_ADD("online_users", 1);
mysql> SELECT GLOBAL_ADD("online_users", -4);
39
If the value of a variable was a string, the new value is the increment:
mysql> SELECT GLOBAL_ADD("secret_key", 12);
12
Adding a value to an undefined variable returns NULL.
A handy variant is GLOBAL_ADDP(, ). GLOBAL_ADDP() is similar to GLOBAL_ADD() but returns the PREVIOUS value of the variable instead of the new one.
Example:
mysql> DO GLOBAL_SET("xxx", 10);
mysql> SELECT GLOBAL_ADDP("xxx", 1);
10
mysql> SELECT GLOBAL_ADDP("xxx", 1);
11
Installation:
On most systems, compiling and installing the library should be as simple as typing (as root):
make install
The shared library is installed as /usr/local/lib/udf_global_user_variables.so
If the base directory of your MySQL installation is not in /usr/local, just type:
make
and then copy udf_global_user_variables.so to the right location for UDFs on your system (maybe /usr/lib/).
The name of a variable is limited to 256 bytes. If that limit is too low for your specific application, just edit the MAX_NAME_LENGTH variable on top of the .c file and reinstall. Variable names can contain binary characters.
Values are limited to 65536 bytes. If that limit is too low for you, edit the MAX_VALUE_LENGTH variable and reinstall.
Download (0.004MB)
Added: 2007-03-19 License: GPL (GNU General Public License) Price:
951 downloads
Variable::Strongly::Typed::Validators 1.1.0
Variable::Strongly::Typed::Validators is Perl module with built-in type validators. more>>
Variable::Strongly::Typed::Validators is Perl module with built-in type validators.
SYNOPSIS
This class is utilized by Variable::Strongly::Typed - you dont access this directly. This module defines a %conditions hash contained expressions that define the built-in types. If you want to create a new type just pass a CODE ref in your TYPE() attribute rather than modifying this hash.
=head1 DESCRIPTION
DO NOT USE THIS MODULE DIRECTLY!! Its used by Variable::Strongly::Typed to do its magic.
<<lessSYNOPSIS
This class is utilized by Variable::Strongly::Typed - you dont access this directly. This module defines a %conditions hash contained expressions that define the built-in types. If you want to create a new type just pass a CODE ref in your TYPE() attribute rather than modifying this hash.
=head1 DESCRIPTION
DO NOT USE THIS MODULE DIRECTLY!! Its used by Variable::Strongly::Typed to do its magic.
Download (0.010MB)
Added: 2007-01-18 License: Perl Artistic License Price:
1009 downloads
Portable Libconfig 0.2.1
Libconfig is a configuration file processing library. more>>
Libconfig is a configuration file processing library that saves you from having to write your own configuration parsers and routines.
This project supports callback functions, automatic variable assignment, and many different configuration file types such as Apache-like, Windows INI-like, and whitespace separated.
Configuration is processed in a logical manner: global configuration files, local configuration files, environment variables, and finally command line options.
Enhancements:
- This release adds functions to set a user-specified error string from callback handlers.
- It exposes functions to convert from a string to a specified type.
- The documentation has been slightly cleaned up.
<<lessThis project supports callback functions, automatic variable assignment, and many different configuration file types such as Apache-like, Windows INI-like, and whitespace separated.
Configuration is processed in a logical manner: global configuration files, local configuration files, environment variables, and finally command line options.
Enhancements:
- This release adds functions to set a user-specified error string from callback handlers.
- It exposes functions to convert from a string to a specified type.
- The documentation has been slightly cleaned up.
Download (0.088MB)
Added: 2006-12-18 License: MIT/X Consortium License Price:
1040 downloads
vars::global 0.0.1
vars::global is a Perl module that tries to make global variables a little safer. more>>
vars::global is a Perl module that tries to make global variables a little safer.
SYNOPSIS
# In the place/package where we want to create globals
use vars::global create => qw( $foo @bar %baz );
# Add some more global symbols
vars::global->create(qw( $hello @world %now ));
# Somewhere else, where we need to access those globals
use vars::global qw( $foo @bar %baz );
# Dont try to use globals that do not exist
use vars::global qw( $Foo ); # typo, croaks
use vars::global qw( @inexistent ); # we dont create by default
# use create as above
# You can also import and create new globals
use vars::global qw( $foo %baz ), create => qw( $hey @joe );
# If youre lazy, you can import all the globals defined so far
use vars::global :all;
This module lets you define global variables and gain a slight advantage over blind use of package variables.
The global variables live inside the vars::global package, with the names given by the user. Where the advantage? Its two-fold:
there is an import mechanism that lets you access the global variable without the need to fully qualify its name (i.e. using $foo instead of $vars::global::foo);
the import mechanism ensures that you can import only the global variables that have been explicitly declared so far, which reduces the possibility of a typo.
If you have already "created" the global variable $foo, the import operation is equivalent to do:
*{__PACKAGE__ . ::foo} = $vars::global::foo;
that is, the package variable in the current package is made an alias for the global variable.
The anti-typo check is simply obtained by doing a check before the above import.
Typical usage is as follows:
creation
Early in the module or in the program you create variables prepending the create word, as follows:
use vars::global create => qw( $foo @bar %baz );
access
In the modules where you need to access a given global variable, you can import them very simply:
use vars::global qw( $foo %baz ); # I dont need @bar here ;)
The creation step above automatically imports all the new globals into the current package.
<<lessSYNOPSIS
# In the place/package where we want to create globals
use vars::global create => qw( $foo @bar %baz );
# Add some more global symbols
vars::global->create(qw( $hello @world %now ));
# Somewhere else, where we need to access those globals
use vars::global qw( $foo @bar %baz );
# Dont try to use globals that do not exist
use vars::global qw( $Foo ); # typo, croaks
use vars::global qw( @inexistent ); # we dont create by default
# use create as above
# You can also import and create new globals
use vars::global qw( $foo %baz ), create => qw( $hey @joe );
# If youre lazy, you can import all the globals defined so far
use vars::global :all;
This module lets you define global variables and gain a slight advantage over blind use of package variables.
The global variables live inside the vars::global package, with the names given by the user. Where the advantage? Its two-fold:
there is an import mechanism that lets you access the global variable without the need to fully qualify its name (i.e. using $foo instead of $vars::global::foo);
the import mechanism ensures that you can import only the global variables that have been explicitly declared so far, which reduces the possibility of a typo.
If you have already "created" the global variable $foo, the import operation is equivalent to do:
*{__PACKAGE__ . ::foo} = $vars::global::foo;
that is, the package variable in the current package is made an alias for the global variable.
The anti-typo check is simply obtained by doing a check before the above import.
Typical usage is as follows:
creation
Early in the module or in the program you create variables prepending the create word, as follows:
use vars::global create => qw( $foo @bar %baz );
access
In the modules where you need to access a given global variable, you can import them very simply:
use vars::global qw( $foo %baz ); # I dont need @bar here ;)
The creation step above automatically imports all the new globals into the current package.
Download (0.007MB)
Added: 2007-01-11 License: Perl Artistic License Price:
1016 downloads
wmgmail 0.6.2
wmgmail is a Gmail inbox checker dockapp with preview. more>>
wmgmail is a Gmail inbox checker dockapp with preview.
Main features:
- check gmail inbox mail count
- Quick Mail Preview (snippets of email you just got)
- QMP can self-timeout (variable delay)
- can launch a program (play a sound) on new mail.
- dark and light colorschemes available.
- GTK interface is optional
<<lessMain features:
- check gmail inbox mail count
- Quick Mail Preview (snippets of email you just got)
- QMP can self-timeout (variable delay)
- can launch a program (play a sound) on new mail.
- dark and light colorschemes available.
- GTK interface is optional
Download (0.023MB)
Added: 2005-07-28 License: GPL (GNU General Public License) Price:
1552 downloads
OSSP var 1.1.3
OSSP var is a flexible, full-featured and fast variable construct expansion library. more>>
OSSP var is a flexible, full-featured and fast variable construct expansion library. It supports a configurable variable construct syntax very similar to the style found in many scripting languages (like @name, ${name}, , etc.) and provides both simple scalar (${name}) and array (${name[index]}) expansion, plus optionally one or more post-operations on the expanded value (${name:op:op...}).
The supported post-operations are length determination, case conversion, defaults, postive and negative alternatives, sub-strings, regular expression based substitutions, character translations, and padding.
Additionally, a meta-construct plus arithmetic expressions for index and range calculations allow (even nested) iterations over array variable expansions (..[..${name[#+1]}..]..). The actual variable value lookup is performed through a callback function, so OSSP var can expand arbitrary values.
Hint: There is also an ISO C++ derivative of the OSSP var library, named libvarexp. It is based on a development version of OSSP var and hence does not provide exactly the same amount of functionality. But it provides an ISO C++ API and so can be of interest to you if you are programming in ISO C++ (where OSSP vars ISO C API might be too boring for you).
Enhancements:
- Fix some sprintf(3) parameter passing. [Ralf S. Engelschall]
- Upgraded build environment to GNU libtool 1.5.20 and GNU shtool 2.0.3. [Ralf S. Engelschall]
- Bumped year in copyright messages for new year 2005. [Ralf S. Engelschall]
<<lessThe supported post-operations are length determination, case conversion, defaults, postive and negative alternatives, sub-strings, regular expression based substitutions, character translations, and padding.
Additionally, a meta-construct plus arithmetic expressions for index and range calculations allow (even nested) iterations over array variable expansions (..[..${name[#+1]}..]..). The actual variable value lookup is performed through a callback function, so OSSP var can expand arbitrary values.
Hint: There is also an ISO C++ derivative of the OSSP var library, named libvarexp. It is based on a development version of OSSP var and hence does not provide exactly the same amount of functionality. But it provides an ISO C++ API and so can be of interest to you if you are programming in ISO C++ (where OSSP vars ISO C API might be too boring for you).
Enhancements:
- Fix some sprintf(3) parameter passing. [Ralf S. Engelschall]
- Upgraded build environment to GNU libtool 1.5.20 and GNU shtool 2.0.3. [Ralf S. Engelschall]
- Bumped year in copyright messages for new year 2005. [Ralf S. Engelschall]
Download (0.33MB)
Added: 2005-10-03 License: MIT/X Consortium License Price:
1481 downloads
CGIParse 0.0.1
CGIParse project is a C++ class library for parsing the input of a cgi program. more>>
CGIParse project is a C++ class library for parsing the input of a cgi program.
Starting
To start using CGIParse you first have to include the cgiparse.h header:
#include < cgiparse.h >
Thereafter you have to define the CGIParse object:
CGIParse cgi;
The CGIParse object then automatically reads the headers and the variables parsed to the program using environment variables and (if using POST or PUT) standard input.
Now the library has been initialized and we are ready to use it.
Header
The headers parsed to CGIParse is easily available to the programmer after the library has been initialized. To retrieve them CGIParse provides functions named after the environment variable it retrieves. Fx. to retrieve the SERVER_SOFTWARE environment variable, you use the function server_software(). The functions providing these environment variables are:
char* server_software(void);
char* server_name(void);
char* gateway_interface(void);
char* server_protocol(void);
int server_port(void);
int request_method(void);
char* request_methodc(void);
char* path_info(void);
char* path_translated(void);
char* script_name(void);
char* query_string(void);
char* remote_host(void);
char* remote_addr(void);
char* auth_type(void);
char* remote_user(void);
char* remote_ident(void);
char* content_type(void);
int content_length(void);
char* http_accept(void);
char* http_user_agent(void);
char* http_referer(void);
char* input(void);
It is important to note that if the environment variable you are trying to access doesnt exist, the function will return NULL if you were trying to retrieve a char* and -1 if its a int.
Variables
The variables from the browser can of course also be accessed by CGIParse.
To retrieve the number of variables, you can use the int num() function, and to retrieve the variable names and parameters number i, you user the functions:
char* name ( int i );
char* parm ( int i );
You can also use the function char* parm ( const char *n ); to retrieve the parameter of the variable with name n.
Debugging
When debugging your CGI application it can sometimes be useful to see what is transfered to the CGI application. You could of course program this yourself, but for your ease some functions for it has been provided the function htable() draws a html table with the header retrieved from CGI.
CGIParse also provide you with a function called ptable() which prints the variables sent to the CGI application.
<<lessStarting
To start using CGIParse you first have to include the cgiparse.h header:
#include < cgiparse.h >
Thereafter you have to define the CGIParse object:
CGIParse cgi;
The CGIParse object then automatically reads the headers and the variables parsed to the program using environment variables and (if using POST or PUT) standard input.
Now the library has been initialized and we are ready to use it.
Header
The headers parsed to CGIParse is easily available to the programmer after the library has been initialized. To retrieve them CGIParse provides functions named after the environment variable it retrieves. Fx. to retrieve the SERVER_SOFTWARE environment variable, you use the function server_software(). The functions providing these environment variables are:
char* server_software(void);
char* server_name(void);
char* gateway_interface(void);
char* server_protocol(void);
int server_port(void);
int request_method(void);
char* request_methodc(void);
char* path_info(void);
char* path_translated(void);
char* script_name(void);
char* query_string(void);
char* remote_host(void);
char* remote_addr(void);
char* auth_type(void);
char* remote_user(void);
char* remote_ident(void);
char* content_type(void);
int content_length(void);
char* http_accept(void);
char* http_user_agent(void);
char* http_referer(void);
char* input(void);
It is important to note that if the environment variable you are trying to access doesnt exist, the function will return NULL if you were trying to retrieve a char* and -1 if its a int.
Variables
The variables from the browser can of course also be accessed by CGIParse.
To retrieve the number of variables, you can use the int num() function, and to retrieve the variable names and parameters number i, you user the functions:
char* name ( int i );
char* parm ( int i );
You can also use the function char* parm ( const char *n ); to retrieve the parameter of the variable with name n.
Debugging
When debugging your CGI application it can sometimes be useful to see what is transfered to the CGI application. You could of course program this yourself, but for your ease some functions for it has been provided the function htable() draws a html table with the header retrieved from CGI.
CGIParse also provide you with a function called ptable() which prints the variables sent to the CGI application.
Download (0.003MB)
Added: 2007-02-23 License: GPL (GNU General Public License) Price:
976 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
mod_include 0.01
mod_include is a post processing of SSI variables, Apache module. more>>
mod_include is a post processing of SSI variables, Apache module.
Doesnt sound too helpful ? Well, maybe not, but I found that during construction of this site that I was frequently replicating 5 lines of text with only a single word altered (the left menu). This was both inefficient and awkward to debug, and didnt lend itself to keeping a common look and feel for the site as a whole. This extension allows large blocks of text to be stored as a variable, and for the small changable part to be altered just before the result is displayed.
Whats wrong with set anyway ?
When a variable is used in the value entry of a set command the system searches for the current value of the variable and substitutes it immediately. This fixes the value of the variable created so that it never changes, which is good for some applications, but lousy for dynamic content.
Usage
This module is an extension of the normal Apache behaviour, and should be read as an addendum to the basic mod_include commands.
define
This command sets up a variable in the same way as the set directive, except that any variable names used are not parsed at this time, but stored as names until displayed with the macro directive.
var
The name of the variable (macro) to define.
value
The value of the variable (macro).
macro
This command will expand a previously defined variable and replace any instances of the variable named in var in the variable def with the value given in value. Note that like other mod_include commands, the order of the variables is important, and should be declared in the sequence shown below:
var
The name of the variable to replace inside the macro.
value
The value to replace the variable with.
def
The previously defined macro to seach through.
<<lessDoesnt sound too helpful ? Well, maybe not, but I found that during construction of this site that I was frequently replicating 5 lines of text with only a single word altered (the left menu). This was both inefficient and awkward to debug, and didnt lend itself to keeping a common look and feel for the site as a whole. This extension allows large blocks of text to be stored as a variable, and for the small changable part to be altered just before the result is displayed.
Whats wrong with set anyway ?
When a variable is used in the value entry of a set command the system searches for the current value of the variable and substitutes it immediately. This fixes the value of the variable created so that it never changes, which is good for some applications, but lousy for dynamic content.
Usage
This module is an extension of the normal Apache behaviour, and should be read as an addendum to the basic mod_include commands.
define
This command sets up a variable in the same way as the set directive, except that any variable names used are not parsed at this time, but stored as names until displayed with the macro directive.
var
The name of the variable (macro) to define.
value
The value of the variable (macro).
macro
This command will expand a previously defined variable and replace any instances of the variable named in var in the variable def with the value given in value. Note that like other mod_include commands, the order of the variables is important, and should be declared in the sequence shown below:
var
The name of the variable to replace inside the macro.
value
The value to replace the variable with.
def
The previously defined macro to seach through.
Download (0.017MB)
Added: 2006-05-12 License: The Apache License Price:
1264 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 variable 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