Main > Free Download Search >

Free instance variable software for linux

instance variable

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 2172
Language::Basic::Variable 1.44

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!

<<less
Download (0.051MB)
Added: 2006-09-29 License: Perl Artistic License Price:
1121 downloads
MySQL Global User Variables UDF 1.0

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.
<<less
Download (0.004MB)
Added: 2007-03-19 License: GPL (GNU General Public License) Price:
951 downloads
Variable::Alias 0.01

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.

<<less
Download (0.003MB)
Added: 2007-05-04 License: Perl Artistic License Price:
903 downloads
KinoSearch::Util::Class 0.13

KinoSearch::Util::Class 0.13


KinoSearch::Util::Class is a Perl class building utility. more>>
KinoSearch::Util::Class is a Perl class building utility.
PRIVATE CLASS
This is a private class and the interface may change radically and without warning. Do not use it on its own.
SYNOPSIS
package KinoSearch::SomePackage::SomeClass;
use base qw( KinoSearch::Util::Class );
BEGIN {
__PACKAGE__->init_instance_vars(
# constructor params / members
foo => undef,
bar => {},
# members
baz => {},
);
}
KinoSearch::Util::Class is a class-building utility a la Class::Accessor, Class::Meta, etc. It provides four main services:
- A mechanism for inheriting instance variable declarations.
- A constructor with basic argument checking.
- Manufacturing of get_xxxx and set_xxxx methods.
- Convenience methods which help in defining abstract classes.
<<less
Download (0.21MB)
Added: 2006-09-02 License: Perl Artistic License Price:
1147 downloads
Test::TempDatabase 0.1

Test::TempDatabase 0.1


Test::TempDatabase is a Perl module for temporary database creation and destruction. more>>
Test::TempDatabase is a Perl module for temporary database creation and destruction.

SYNOPSIS

use Test::TempDatabase;

my $td = Test::TempDatabase->create(dbname => temp_db);
my $dbh = $td->handle;

... some tests ...
# Test::TempDatabase drops database

This module automates creation and dropping of test databases.

USAGE

Create test database using Test::TempDatabase->create. Use handle to get a handle to the database. Database will be automagically dropped when Test::TempDatabase instance goes out of scope.

$class->become_postgres_user

When running as root, this function becomes different user. It decides on the user name by probing TEST_TEMP_DB_USER, SUDO_USER environment variables. If these variables are empty, default "postgres" user is used.
create

Creates temporary database. It will be dropped when the resulting instance will go out of scope.

Arguments are passed in as a keyword-value pairs. Available keywords are:
dbname: the name of the temporary database.

rest: the rest of the database connection string. It can be used to connect to a different host, etc.

username, password: self-explanatory.

<<less
Download (0.011MB)
Added: 2007-05-08 License: Perl Artistic License Price:
899 downloads
Runtime Java Class Editor 1.0

Runtime Java Class Editor 1.0


Runtime Java Class Editor is a tool for editing loaded (running) Java classes and much more. more>>
RJCE allows all methods or variables of user defined classes to be altered at runtime. These alterations are then applied to a single instance, a collection of instances (i.e. list, set or map), or an entire class.

This helps you to test your application in an interactive way; altering running programs helping a trial and error approach to programming; testing code and saving it when it’s correct. Long running algorithms, such as simulations, can also easily be refined without the need for restarts or lose of data.

RJCE can be used to write a program from within itself ensuring high coupling between testing and development, with no delay before the outcome of any alterations.

RJCE allows scripts to run from within your application, allowing users to configure or extend an application dynamically, bypassing normal language access rules controlled by public, private and protected. This can be done by easily instatiating an instance of CodeEditorFrame from the rom.gui package.

RJCE permits faster development of applications by allowing easy migration from scripts to Java programs.
<<less
Download (3.1MB)
Added: 2005-04-18 License: BSD License Price:
1713 downloads
Variable Expression Library 1.1

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
<<less
Download (0.093MB)
Added: 2005-10-06 License: BSD License Price:
1478 downloads
Variable::Strongly::Typed 1.1.0

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.

<<less
Download (0.010MB)
Added: 2007-01-18 License: Perl Artistic License Price:
1009 downloads
fields::aliased 1.05

fields::aliased 1.05


fields::aliased is a Perl module that can create aliases for object fields. more>>
fields::aliased is a Perl module that can create aliases for object fields.

SYNOPSIS

package MyPackage;
use strict;
use fields qw($scalar @array %hash);

sub new {
my $class = shift;
my $self = fields::new($class);

return $self;
}

sub mymethod {
my MyPackage $self = shift;
use fields::aliased qw($self $scalar @array %hash);

$scalar = 1;
@array = (2 .. 4);
%hash = (one => 1, two => 2);
}

This module is a companion to the fields module, which allows efficient handling of instance variables with checking at compile time. It goes one step further and actually creates lexical aliases to the instance values, which can make code not only easier to type, but easier to read as well.

Declarations

You declare the fields using the fields pragma, as always.

use fields qw($scalar @array %hash nosigil);

Each field name may be preceded by a type sigil to indicate which kind of variable it is. Names without the type sigil are treated as scalars.

For names beginning with an underscore, see "PRIVATE FIELDS" below.

Constructors

You call fields::new to create the object.

my $self = fields::new($class);

Usage

In each method that uses the individual fields, you add a line similar to the following:

use fields::aliased qw($self $scalar @array %hash nosigil);

That is, list the variable being used for the object reference, and then the names of the fields that you are going to use in this method. fields::aliased takes care of declaring the appropriate Perl lexical variables and linking them to the appropriate field. You only need to specify the fields you are actually going to use, including any inherited from superclasses.

<<less
Download (0.008MB)
Added: 2007-05-14 License: Perl Artistic License Price:
894 downloads
XML::LibXML::Enhanced 0.01

XML::LibXML::Enhanced 0.01


XML::LibXML::Enhanced is a Perl module that adds convenience methods to XML::LibXML and LibXSLT. more>>
XML::LibXML::Enhanced is a Perl module that adds convenience methods to XML::LibXML and LibXSLT.

SYNOPSIS

use XML::LibXML::Enhanced;

my $xml = XML::LibXML::Singleton->instance;
my $xsl = XML::LibXSLT::Singleton->instance;

my $doc = $xml->parse_xml_string(" ");

my $root = $doc->getDocumentElement;

$root->appendHash({ name => Michael, email => mjs@beebo.org });

<<less
Download (0.007MB)
Added: 2006-09-19 License: Perl Artistic License Price:
1132 downloads
Font::Scripts::AP 0.5

Font::Scripts::AP 0.5


Font::Scripts::AP is a Perl module for memory representation of a TTFBuilder Attachment Point database (APDB). more>>
Font::Scripts::AP is a Perl module for memory representation of a TTFBuilder Attachment Point database (APDB).

SYNOPSIS

use Font::Scripts::AP;
$ap = Font::Scripts::AP->read_font($ttf_file, $ap_file, %opts);
$ap->make_classes();

INSTANCE VARIABLES

cmap

Reference to the Microsoft cmap within the font.

font

Reference to a font structure. read_font will cause at least the post, cmap, loca, and name tables to be read in.

glyphs

An array of references to glyph data structures, indexed by glyphID. Stucture elements are:

uni

Unicode scalar value, if any, as specified in the APDB. (decimal integer)

gnum

Actual glyph ID from font.

post

Actual Postscript name from font.

Note: The uni, gnum and post values are based on the UID, GID, and PSName fields of the APDB. If there are descrepancies between the APDB and the fonts internal tables, then for calcuating the above three values, priority is given first to UID field, then PSName field, and finally GID.

glyph

Reference to glyph structure read from font.

line

Line number in APDB where glyph is defined.

points

A hash of references to attachment point structures for this glyph, keyed by attachment point type (aka name). Each AP structure contains

name

The name (type in TTFBuilder terminology) of the attachment point

x, y

X and Y coordinates for the attachment point

line

Line number in APDB where this point is defined.

components

Present if the glyph is a composite. Is a reference to an array of component structures. Each component structure includes:

bbox

comma separated list of bounding box coordinates, i.e., x1, y1, x2, y2

uni

Unicode scalar value, if any, of the component. (decimal integer)

Note: The following instance variables contain the actual text read from the APDB. If there are descrepancies between the APDB and the font, these values may differ from corresponding values given above. Therefore these values should not be used except for diagnostic purposes.

UID

Unicode scalar value, if any, as specified in the APDB. (string of hex digits)

PSName

Postscript name, if any, as specified in the APDB

GID

Glyph id, if any, as specified in the APDB

classes

Created by "make_classes", this is a hash keyed by class name returning an array of GIDs for glyphs that are in the class. Classes are identified by extensions (part after a .) on the post name of each glyph. For each such extension, two classes are defined. The first is the class of all glyphs that have that extension (class name is the extension). The second is the class of nominal glyphs corresponding to the glyphs with that extension (class name is the extension but with the prefix no_).

lists

Created by "make_classes", this is a hash keyed by attachment point name (as modified by "make_point") returning an array of GIDs for glyphs that have the given attachment point.

vecs

If defined, this variable will be updated by "make_classes". It is a hash, keyed by attachment point name (as modified by "make_point") returning a bit vec bit array, indexed by GID, each bit set to 1 if the corresponding glyph has the given attachment point.

ligclasses

Optionally created by make_classes if ligatures are requested and they exist. The base forms class is no_code while the ligatures are held in code.

WARNINGS

If -errorfh not set, this accumulates any warning or error messages encountered.

WARNINGS

Count of number fo warnings or errors encountered.

<<less
Download (0.10MB)
Added: 2006-10-03 License: Perl Artistic License Price:
1117 downloads
CGI::FastTemplate 1.09

CGI::FastTemplate 1.09


CGI::FastTemplate is a Perl extension for managing templates, and performing variable interpolation. more>>
CGI::FastTemplate is a Perl extension for managing templates, and performing variable interpolation.

SYNOPSIS

use CGI::FastTemplate;

$tpl = new CGI::FastTemplate();
$tpl = new CGI::FastTemplate("/path/to/templates");

CGI::FastTemplate->set_root("/path/to/templates"); ## all instances will use this path
$tpl->set_root("/path/to/templates"); ## this instance will use this path

$tpl->define( main => "main.tpl",
row => "table_row.tpl",
all => "table_all.tpl",
);

$tpl->assign(TITLE => "I am the title.");

my %defaults = ( FONT => "",
EMAIL => jmoore@sober.com,
);
$tpl->assign(%defaults);

$tpl->parse(ROWS => ".row"); ## the . appends to ROWS
$tpl->parse(CONTENT => ["row", "all"]);
$tpl->parse(CONTENT => "main");

$tpl->print(); ## defaults to last parsed
$tpl->print("CONTENT"); ## same as print() as "CONTENT" was last parsed

$ref = $tpl->fetch("CONTENT");

<<less
Download (0.013MB)
Added: 2006-08-01 License: Perl Artistic License Price:
1179 downloads
mod_include 0.01

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.

<<less
Download (0.017MB)
Added: 2006-05-12 License: The Apache License Price:
1264 downloads
AntTweakBar 1.03

AntTweakBar 1.03


AntTweakBar allows programmers to quickly add a light and intuitive graphical user interface into graphic programs. more>>
AntTweakBar allows programmers to quickly add a light and intuitive graphical user interface into graphic programs to interactively tweak them. AntTweakBar is a small and easy to use library that can be readily integrated into OpenGL and DirectX applications.
Program variables can be linked to a graphical control that allows users to modify them. Thus, parameters exposed by programmers can be easily modified. They are displayed into the graphical application through one or more embeded windows called tweak bars.
Design and integration:
The library is designed to minimize programmer work while offering a fast, clean, intuitive and non-invasive graphical interface. For instance, numerical values are automatically mapped to a RotoSlider control for rapid editing.
It is composed of few functions. Common variables like booleans, integers, floats and enums can be directly mapped to a graphic control through pointers or callback functions. Additionnal editing informations like min and max values can be provided. Keyboard shortcuts can also be associated to controls and an help window which summurizes these shortcuts can be displayed. Programmers are not required to design the graphical interface by providing coordinates or by using a visual UI editor. Controls are automatically organized following an optional given hierarchy. In most cases, only one line of code is needed to add a new variable to a tweak bar.
The AntTweakBar library mainly targets graphical programs that need an easy way to tweak parameters and see the result in real-time like 3D demos, light inline game editors, small 3D applications, prototypes, debug facilities of weighter graphical programs, etc.
While the library itself is written in C++, its programming interface is a C interface, and then it can be directly integrated in any C++ or C program.
It has been designed with performance in mind. Embeded in a typical 3D application, its rendering time is almost insignificant. Bars can also be iconified to fully minimize their rendering time.
Enhancements:
- The medium font is antialiased.
- The code now compiles on 64-bit x86 platforms.
- A problem which occurred if the library was initialized or uninitialized more than once was fixed.
- Some other minor fixes were done.
<<less
Download (0.87MB)
Added: 2006-10-30 License: zlib/libpng License Price:
1089 downloads
Variable::Strongly::Typed::Array 1.1.0

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!

<<less
Download (0.010MB)
Added: 2007-01-18 License: Perl Artistic License Price:
1009 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 5
  • 1
  • 2
  • 3
  • 4
  • 5