Main > Free Download Search >

Free value added software for linux

value added

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 8361
Qalculate! 0.9.6

Qalculate! 0.9.6


Qalculate! is a multi-purpose desktop calculator for GNU/Linux. more>>
Qalculate! is a multi-purpose desktop calculator for GNU/Linux. Qalculate! project is small and simple to use but with much power and versatility underneath.
Features include customizable functions, units, arbitrary precision, plotting, and a user-friendly interface (KDE or GTK+).
Main features:
- Redesigned GUI with history view in the main window
- Display of as-you-type expression parsing and function hints
- Enhanced completion
- Scaling of result display to vertically fit the window
- Nicer history listing
- Enhanced result display with much nicer parentheses
- Meta modes
- 67 new units: bel (B) and neper (Np), information units such as bit and byte, many convenience units (km/h, deciliter, etc), and more.
- Binary prefixes
- Some new variables and functions
- Fixed help display in new yelp
- Fixed compile with cln-1.1.10
- Fixed regressions in simplification
- Fixed f(x) return type analysis (ex. log(x) represents a real number if x represents a positive). This was by accident unused.
- ...and many more bug fixes and enhancements...
Enhancements:
- Use Lambert W to solve more equations and avoid infinite loop when solving some equations
- More data on elements
- Fix simplification of (1-1/x)^3 and similar
- Fix clumsy mistakes in with prefixes leading to crashes
- Fix parsing of unit expressions (when converting) such as W/(m K)
- Add more exact values for sin() and cos() and avoid floating point underflow by, in approximate mode, checking against the value of pi
- Always input decimal separator sign on keypad separator press
- New units: typographic units, pouce, pied du roi, grams of TNT and tons of TNT
- New functions: lambertW(), addDays(), addMonths(), addYear(), addTime(), isNumber(), isReal(), isRational(), isInteger(), representsNumber(), representsReal(), representsRational(), representsInteger()
- New variable: omega constant
- Other minor fixes and enhancements
<<less
Download (1.3MB)
Added: 2007-06-17 License: GPL (GNU General Public License) Price:
860 downloads
Keyword Market Value Analyzer 1.1

Keyword Market Value Analyzer 1.1


Keyword Market Value Analyzer allows you to compile a database a keywords based on a particular keyword subject. more>>
Keyword Market Value Analyzer allows you to compile a database a keywords based on a particular keyword subject, and to compare their popularity with the highest amount advertisers are willing to pay to advertise for the keyword.
The result of Keyword Market Value Analyzer is a really good idea about how much money-making potential there is for the keyword.
Main features:
- Keyword Market Value Analyzer is easy to install. Just unzip, install the database tables and upload.
- Create different keyword subject groups. The groups share the same keyword data, so you can leverage the research youve done for one keyword group for another, related keyword group.
- Easily browse keywords based on market value, highest bid, or most popular.
- Makes keyword market value research as easy as it can be!
<<less
Download (0.10MB)
Added: 2006-02-28 License: Freeware Price:
1335 downloads
rPath Appliance Agent 1.0.10

rPath Appliance Agent 1.0.10


rPath Appliance Agent project is an extensible application framework for the administration of appliance devices. more>>
rPath Appliance Agent project is an extensible application framework for the administration of appliance devices through a web-based user interface.
The framework is comprised of individual component plugins which offer specialized functionality, such as a message log interface, user account preferences, system updates, and entitlement management capabilities.
You can also develop and add plugins to the rAA framework, extending capabilities and functionality for your specific requirements.
To set up your environment for developing rAA, untar the devel.tar.bz2 tarball in the docs directory into your development directory. It should contain the following files:
- README.devel:
this file.
- dev.cfg:
configuration for the development environment.
- raa:
symbolic link to the rAA installation, usually
/usr/lib/python2.4/site-packages/raa.
- raa-service:
used by the startup script for the rAA service daemon.
- raa_service_dev.conf:
configuration file for the rAA service daemon. This contains a pluginDirs
configuration option. Change or append to its value to add additional
directories in which you are developing plugins.
- raa-web:
startup script for the rAA web layer.
- start-raa-service.sh:
startup script for the rAA service daemon.
Enhancements:
- Enhancements to the backup plugin, and a new plugin has been added to allow users to upload new SSL certificates for rAAs Web servers HTTPS connections.
<<less
Download (0.097MB)
Added: 2006-12-21 License: GPL (GNU General Public License) Price:
1040 downloads
JGuiGen rev-237

JGuiGen rev-237


JGuiGen is a Java GUI Generation System Elegant CRUD (Create/Review/Update/Delete). more>>
JGuiGen is a Java GUI Generation System Elegant CRUD (Create/Review/Update/Delete). It supports any major database using JDBC. It generates fully internationalized and accessible screens that allow users to search tables, run reports, and calculate summary stats.
It generates multi-user safe screens with help buttons that work, generates test cases to test the generated GUIs, and generates HTML documentation about the GUIs generated.
Here is a partial list of classes that are included and used by JGuiGen:
- BoundedTextField.java - Creates a JTextField that will not accept more than x characters where you define the x value. BoundedPlainDocument.java - part of BoundedTextField
- CustomViewer.java - This is a pop-up viewer for JTables. It allows you to view the contents of long strings or text fields.
- DateDialog.java - pop-up calendar for choosing a date.
- DoublyLinkedList.java - create two lists, side by side. Move items from side to the other in order to select a group of options, features, tasks, people etc.
- Frequency Count routine - Create a table that shows a count of the values in a column in a result set.
- GeneralDialog.java - a generic three button, give text and ask a question screen.
- GeneralDialog4Btn.java - a generic four button, give text and ask a question screen.
- GetBrowserAndWP.java - code to ask a user for the path to their word processor and Browser. These values are stored in a table and used to call up these applications as needed.
- History.java - code to view an HTML file. The date and time a user views the file is stored and they are only offered the option to view the file when it is newer than the one they last viewed. Used by a developer to notify users of changes in the application they are using.
- JFreeReports example - generate a report using an existing JTable of data.
- JSearchableComboBox.java - A JComboBox with "Look-ahead". It fills in the most probable answer based upon what the user has entered so far. (This fills a much needed void in Java. By default in a pup-up list if your user types FL for Florida they will get Louisiana. It goes to Florida with the F and then Louisiana with the L. The look-ahead system will leave them on Florida.
- JxFrame.java - a class to inherit instead of JFrame. This gives a single point to make modifications that will affect each frame in an entire application. This one adds the automatic determination of Look and Feel code. It also informs the system to make button more active.
- JxButton.java -a class to inherit instead of JButton. This gives a single point to make modifications that will affect each frame in an entire application.
- JxLabel.java - a class to inherit instead of JLabel. This gives a single point to make modifications that will affect each frame in an entire application.
- JxTextArea.java - a class to inherit instead of JTextArea. This gives a single point to make modifications that will affect each frame in an entire application. This one makes the tab key exit a JTextArea that is being edited. The default requires a user to press CTRL-Tab. ListDialog.java - a generic screen to show a list that the user chooses an option from. It has an optional "Add a new value" feature.
- LowVisionMetalLookAndFeel.java - code to change the look and feel to very large text and very high contrast.
- MutableInteger.java - code to pass an integer value into a class and allow changes made in the class to be known by the calling class.
- NumericPlainDocument.java - Part of the Numeric TextField class.
- NumericTextField.java - creates a JTextField that accepts a number with a specified number of decimal places.
- ProgressMonitorDemo.java - and ProgressMonitorInc.java and ProgressMonitorWork.java. I found it very difficult to get the ProgressMonitor (a small pop-up that fills as your long running task runs) to work. I finally figured out something that works reliably and these three classes show how to do it.
- PrintScreen code - this code is included inside the various classes that JGuiGen generates.
- RegexFormatter.java - code to help apply a Regex value to a JFormattedText field
- RowLayout1.java - a layout manager that includes one column of labels and then a variable number of columns. This can be used for most business applications.
- RowLayoutConstraint.java - part of the rowlayout manager.
- SetIcon.java - code to replace the coffee cup icon on each frame.
- SQLWhereClause.java - a class to pop-up a simple SQL Where clause generator. It includes the ability to name, save and rerun queries. It also saves and runs reports using JFreeReports.
- StreamEditorPane.java - Part of the TextEditor class.
- SwitchLF.java - code to switch look and feels in a running application.
- TableMap.java - part of the TableSorter class.
- TableSorter.java - code to make a JTable that sorts on each column when the column header is clicked.
- TernarySearchTree.java - part of the JSearchableComboBox class.
- TextViewer.java - Code to view a Text field.
- TextEditor.java - Code to edit a text field. This includes a way to make Tab exit a JTextArea (which is not the default for Java.)
- TableHeaderJLabel.java - Code to display special headers over a column in a JTable.
- WholeNumberField.java - code to create a JTextField that will only accept integer values.
- Switch Look and Feel menu
- Change Locale menu
- Change Font menu
<<less
Download (10.1MB)
Added: 2006-05-22 License: GPL (GNU General Public License) Price:
1256 downloads
Mail::Send 1.74

Mail::Send 1.74


Mail::Send is a simple electronic mail interface. more>>
Mail::Send is a simple electronic mail interface.

SYNOPSIS:

require Mail::Send;

$msg = new Mail::Send;

$msg = new Mail::Send Subject=>example subject, To=>timbo;

$msg->to(user@host);
$msg->to(user@host, user2@example.com);
$msg->subject(example subject);
$msg->cc(user@host);
$msg->bcc(someone@else);

$msg->set($header, @values);
$msg->add($header, @values);
$msg->delete($header);

# Launch mailer and set headers. The filehandle returned
# by open() is an instance of the Mail::Mailer class.
# Arguments to the open() method are passed to the Mail::Mailer
# constructor.

$fh = $msg->open; # some default mailer
# $fh = $msg->open(sendmail); # explicit

print $fh "Body of message";

$fh->close; # complete the message and send it

$fh->cancel; # not yet implemented
<<less
Download (0.047MB)
Added: 2006-05-05 License: Perl Artistic License Price:
1269 downloads
Array::Unique 0.07

Array::Unique 0.07


Array::Unique is a tie-able array that allows only unique values. more>>
Array::Unique is a tie-able array that allows only unique values.

SYNOPSIS

use Array::Unique;
tie @a, Array::Unique;

Now use @a as a regular array.

This package lets you create an array which will allow only one occurrence of any value.

In other words no matter how many times you put in 42 it will keep only the first occurrence and the rest will be dropped.

You use the module via tie and once you tied your array to this module it will behave correctly.

Uniqueness is checked with the eq operator so among other things it is case sensitive.

As a side effect the module does not allow undef as a value in the array.

EXAMPLES

use Array::Unique;
tie @a, Array::Unique;

@a = qw(a b c a d e f);
push @a, qw(x b z);
print "@an"; # a b c d e f x z

When you are collecting a list of items and you want to make sure there is only one occurrence of each item, you have several option:

1) using an array and extracting the unique elements later. You might use a regular array to hold this unique set of values and either remove duplicates on each update by that keeping the array always unique or remove duplicates just before you want to use the uniqueness feature of the array. In either case you might run a function you call @a = unique_value(@a);

The problem with this approach is that you have to implement the unique_value function (see later) AND you have to make sure you dont forget to call it. I would say dont rely on remembering this.

There is good discussion about it in the 1st edition of the Perl Cookbook of OReilly. I have copied the solutions here, you can see further discussion in the book.

----------------------------------------
Extracting Unique Elements from a List (Section 4.6 in the Perl Cookbook 1st ed.)

# Straightforward

%seen = ();
@uniq = ();
foreach $item (@list) [
unless ($seen{$item}) {
# if we get here we have not seen it before
$seen{$item} = 1;
push (@uniq, $item);
}
}

# Faster
%seen = ();
foreach $item (@list) {
push(@uniq, $item) unless $seen{$item}++;
}

# Faster but different
%seen;
foreach $item (@list) {
$seen{$item}++;
}
@uniq = keys %seen;

# Faster and even more different
%seen;
@uniq = grep {! $seen{$_}++} @list;

----------------------------------------
2) using a hash
Some people use the keys of a hash to keep the items and
put an arbitrary value as the values of the hash:

To build such a list:
%unique = map { $_ => 1 } qw( one two one two three four! );

To print it:
print join ", ", sort keys %unique;

To add values to it:
$unique{$_}=1 foreach qw( one after the nine oh nine );

To remove values:
delete @unique{ qw(oh nine) };

To check if a value is there:
$unique{ $value }; # which is why I like to use "1" as my value

(thanks to Gaal Yahas for the above examples)

There are three drawbacks I see:

1) You type more.
2) Your reader might not understand at first why did you use hash and what will be the values.
3) You lose the order.

Usually non of them is critical but when I saw this the 10th time in a code I had to understand with 0 documentation I got frustrated.

3) using Array::Unique

So I decided to write this module because I got frustrated by my lack of understanding whats going on in that code I mentioned. In addition I thought it might be interesting to write this and then benchmark it. Additionally it is nice to have your name displayed in bright lights all over CPAN ... or at least in a module.

Array::Unique lets you tie an aray to hmmm, itself (?) and makes sure the values of the array are always unique.

Since writing this I am not sure if I really recommend its usage. I would say stick with the hash version and document that the variable is aggregating a unique list of values.

4) Using real SET

There are modules on CPAN that let you create and maintain SETs. I have not checked any of those but I guess they just as much of an overkill for this functionality as Unique::Array.

<<less
Download (0.008MB)
Added: 2007-07-17 License: Perl Artistic License Price:
830 downloads
ASBeats 0.2

ASBeats 0.2


ASBeats is a simple beats clock. more>>
ASBeats is a simple beats clock.
Enhancements:
- Higher resolution, 3 decimals
- Cleanup of the .xpm files
- Added this file
- Cleanup of README, also added TODO section
<<less
Download (0.014MB)
Added: 2006-10-03 License: GPL (GNU General Public License) Price:
1116 downloads
trafcalc 1.2

trafcalc 1.2


Trafcalc calculates the size of the TCP-payload on a system via packet capturing more>>
interfaceTrafcalc calculates the size of the TCP-payload on a system via packet capturing and connection tracking at the user level instead of the IP level.

The program uses a pcap (a library for Packet CAPturing) callback function which is called for every incoming (tcp) packet. This function has a database in form of a global linked list of structs to manage connenctions (adding new, removing old). If a connection is not found in this database it looks up the user ID for that connection and adds it to the list. Then it gets the size of the packet and adds it to the value of the traffic for that user ID, which is stored in a similar linked list of user IDs. At the end it writes out all the information at a given interval to a file in /var/log/traffic.

<<less
Download (0.029MB)
Added: 2006-07-05 License: GPL (GNU General Public License) Price:
1209 downloads
CAM::XML 1.14

CAM::XML 1.14


CAM::XML is an encapsulation of a simple XML data structure. more>>
CAM::XML is an encapsulation of a simple XML data structure.

SYNOPSIS

my $pollTag = CAM::XML->new(poll);

foreach my $q (@questions) {
my $questionTag = CAM::XML->new(question);

$questionTag->add(-text => $q->{text});
my $choicesTag = CAM::XML->new(choices);

foreach my $c (@{$q->{choices}}) {
my $choiceTag = CAM::XML->new(choice);
$choiceTag->setAttributes(value, $c->{value});
$choiceTag->add(-text => $c->{text});
$choicesTag->add($choiceTag);
}
$questionTag->add($choicesTag);
$pollTag->add($questionTag);
}
print CAM::XML->header();
print $pollTag->toString();

This module reads and writes XML into a simple object model. It is optimized for ease of creating code that interacts with XML.

This module is not as powerful or as standards-compliant as say XML::LibXML, XML::SAX, XML::DOM, etc, but its darn easy to use. I recommend it to people who want to just read/write a quick but valid XML file and dont want to bother with the bigger modules.

In our experience, this module is actually easier to use than XML::Simple because the latter makes some assumptions about XML structure that prevents it from handling all XML files well. YMMV.

However, one exception to the simplicity claimed above is our implementation of a subset of XPath. Thats not very simple. Sorry.

<<less
Download (0.022MB)
Added: 2006-09-07 License: Perl Artistic License Price:
1147 downloads
raddump 0.3.1

raddump 0.3.1


raddump interprets captured RADIUS packets to print a timestamp. more>>
raddump interprets captured RADIUS packets to print a timestamp, packet length, RADIUS packet type, source and destination hosts and ports, and included attribute names and values for each packet.
Enhancements:
- Added support for IEEE 802.1q tagged VLAN frames.
<<less
Download (0.17MB)
Added: 2005-06-29 License: GPL (GNU General Public License) Price:
1579 downloads
SimpleIni 4.3

SimpleIni 4.3


SimpleIni is a cross-platform library that provides a simple API to read and write INI-style configuration files. more>>
SimpleIni is a cross-platform library that provides a simple API to read and write INI-style configuration files. It supports data files in ASCII, MBCS and Unicode.
It is designed explicitly to be portable to any platform and has been tested on Windows and Linux. Released as open-source and free using the MIT licence.
Examples:
These snippets are included with the distribution in the file snippets.cpp.
LOADING DATA
load from a data file
CSimpleIniA ini(a_bIsUtf8, a_bUseMultiKey, a_bUseMultiLine);
SI_Error rc = ini.LoadFile(a_pszFile);
if (rc < 0) return false;
load from a string
std::string strData;
rc = ini.Load(strData.c_str(), strData.size());
if (rc < 0) return false;
GETTING SECTIONS AND KEYS
get all sections
CSimpleIniA::TNamesDepend sections;
ini.GetAllSections(sections);
get all keys in a section
CSimpleIniA::TNamesDepend keys;
ini.GetAllKeys("section-name", keys);
GETTING VALUES
get the value of a key
const char * pszValue = ini.GetValue("section-name",
"key-name", NULL /*default*/);
get the value of a key which may have multiple values. If bHasMultipleValues is true, then just one value has been returned
bool bHasMultipleValues;
pszValue = ini.GetValue("section-name", "key-name",
NULL /*default*/, &bHasMultipleValues);
get all values of a key with multiple values
CSimpleIniA::TNamesDepend values;
ini.GetAllValues("section-name", "key-name", values);
sort the values into the original load order
values.sort(CSimpleIniA::Entry::LoadOrder());
output all of the items
CSimpleIniA::TNamesDepend::const_iterator i;
for (i = values.begin(); i != values.end(); ++i) {
printf("key-name = %sn", i->pItem);
}
MODIFYING DATA
adding a new section
rc = ini.SetValue("new-section", NULL, NULL);
if (rc < 0) return false;
printf("section: %sn", rc == SI_INSERTED ?
"inserted" : "updated");
adding a new key ("new-section" will be added automatically if it doesnt already exist)
rc = ini.SetValue("new-section", "new-key", "value");
if (rc < 0) return false;
printf("key: %sn", rc == SI_INSERTED ?
"inserted" : "updated");
changing the value of a key
rc = ini.SetValue("section", "key", "updated-value");
if (rc < 0) return false;
printf("key: %sn", rc == SI_INSERTED ?
"inserted" : "updated");
DELETING DATA
deleting a key from a section. Optionally the entire section may be deleted if it is now empty.
ini.Delete("section-name", "key-name",
true /*delete the section if empty*/);
deleting an entire section and all keys in it
ini.Delete("section-name", NULL);
SAVING DATA
save the data to a string
rc = ini.Save(strData);
if (rc < 0) return false;
save the data back to the file
rc = ini.SaveFile(a_pszFile);
if (rc < 0) return false;
Enhancements:
- Fixed a bug causing multi-line values and comments to get corrupted. This affects only files with CR LF line endings (Windows) and wchar_t/ICU interface (Unicode).
<<less
Download (0.041MB)
Added: 2007-07-05 License: MIT/X Consortium License Price:
843 downloads
Xplanet 1.2.0

Xplanet 1.2.0


Xplanet is an Xearth wannabe. more>>
Xplanet was inspired by Xearth, which renders an image of the earth into the X root window. All of the major planets and most satellites can be drawn, similar to the Solar System Simulator.
A number of different map projections are also supported, including azimuthal, Lambert, Mercator, Mollweide, orthographic, and rectangular.
Enhancements:
- Added the -grs_longitude option, to specify the longitude of Jupiters Great Red Spot, in System II coordinates. This assumes the Jupiter image has the center of the Great Red Spot at pixel 0 (at the left side of the image) in order to draw it at the right position.
- Added the Icosagnomonic projection, contributed by Ian Turner.
- Fixed a bug where output filenames had an extra digit in some cases.
- Added the bump_map and bump_scale options in the configuration file.
- Added the -glare option to set the size of the suns glare.
- An image map may be specified for the sun in the configuration file now. A shade value is now required for the sun (should be 100, otherwise the sun will have a night side!)
- Added the -arc_spacing option to set the default angular distance between great arc points. It used to be 0.1 degree, so arcs smaller than this wouldnt get drawn.
- Fixed a bug where markers were not aligned properly when using align = "above" or "below".
- Added warnings if options are specified in the [default] section of the configuration file that probably shouldnt be there.
<<less
Download (1.15MB)
Added: 2005-06-17 License: GPL (GNU General Public License) Price:
1589 downloads
Javascript::Menu 2.02

Javascript::Menu 2.02


Javascript::Menu is a NumberedTree that generates HTML and Javascript code for a menu. more>>
Javascript::Menu is a NumberedTree that generates HTML and Javascript code for
a menu.

SYNOPSIS

use Javascript::Menu;

# Give it something to do (example changes the menus caption):

my $action = sub {
my $self = shift;
my ($level, $unique) = @_;

my $value = $self->getValue;
return "getElementById(caption_$unique).innerHTML=$value";
};


# Build the tree:

my $menu = Javascript::Menu->convert(tree => $otherTree, action => $action);

my $menu = Javascript::Menu->readDB(source_name => $table, source => $dbh,
action => $action);

my $menu = Javascript::Menu->new(value => Please select a parrot,
action => $action);

my $blue = $menu->append(value => Norwegian Blue);
$blue->append(value => Pushing up the daisies);
$menu->append(value => A Snail);

# Or maybe you just want a navigational menu?

my $menu = Javascript::Menu->new(value => Please select a prime minister);
$menu->append(value => Ariel Sharon,
URL => www.corruption.org/ariel_sharon.htm);

$menu->append(value => Benjamin Netanyahu,
URL => www.corruption.org/bibi.htm);

$menu->append(value => Shaul Mofaz, URL => www.martial_law.org);


# Print it out as a right-to-left menu:

my $css = $menu->buildCSS($menu->reasonableCSS);
print $cgi->start_html(-script => $menu->baseJS(rtl),
-style => $css); #CSS plays an important role.
print $tree->getHTML;

Javascript::Menu is an object that helps in creating the HTML, Javascript, and some of the CSS required for a table-based menu. There are a few other modules that deal with menus, But as I browsed through them, I found that none of them exactly fitted my needs. So I designed this module, with the following goals in mind:

Flexibility

The main feature of this module is the ability to supply all nodes or any specific node with a subroutine that is activated in time of the code generation to help decide what the item will do when it is clicked. This allows customisation far beyond associating a link with every item. Multy-level selection menus become very easy to do (and this is, in fact, what I needed when I started writing this).

I18n

Working with i18n (internationalization) can be a big headache. Working with Hebrew (or Arabic) forces you not only to change your charachters, but also to change your direction of writing. I incorporated into this module the ability to produce right-to-left menus and tested it using a legacy ASCII-based encoding (iso-8859-8).

Object Hierarchy

I designed the module to work with two other modules of mine, Tree::Numbered and Tree::Numbered::DB, which simplify the task of building the menu and allow for construction of a menu from database information.

The current version adds support for highlighting the item thats hovered over. Youll find that having made some preliminary steps, like tweaking the CSS to look the way you like it to, the rest is fairly easy.

<<less
Download (0.025MB)
Added: 2006-06-12 License: Perl Artistic License Price:
1235 downloads
Tie::FileLRUCache 1.05

Tie::FileLRUCache 1.05


Tie::FileLRUCache is a lightweight but robust filesystem based persistent LRU cache. more>>
Tie::FileLRUCache is a lightweight but robust filesystem based persistent LRU cache.

SYNOPSIS

OBJECT INTERFACE

use Tie::FileLRUCache;
my $cache = Tie::FileLRUCache->new({ -cache_dir => $directory, -keep_last => 100 });

# Inserting value into LRU cache using -key
$cache->update({ -key => $key, -value => $value });


# Inserting value into LRU cache using -cache_key
my $cache_key = $cache->make_cache_key({ -key => $key });
$cache->update({ -cache_key => $cache_key, -value => $value });


# Checking LRU cache
my ($in_cache,$value) = $cache->check({ -key => $key });
if ($in_cache) {
return $value;
}
# Not in cache - do something else


# Checking LRU cache with speed up hack for objects, hashes, arrays etc used as keys
my $cache_key = $cache->make_cache_key({ -key => $something });
my ($in_cache,$value) = $cache->check({ -cache_key => $cache_key });
if ($in_cache) {
return $value;
}
# Not in cache - do something else


# Deleting a key and its value from the cache
$cache->delete({ -key => $key });


# Clearing LRU cache
$cache->clear;

TIED INTERFACE

use Tie::FileLRUCache;

[$X =] tie %hash, Tie::FileLRUCache, $cache_dir, $keep_last_n;

# Adding a key/value to the cache
$hash{$key} = $value;

# Checking the cache
if (not exists $hash{$key}) {;
# No match
.
.
.

} else {
my $value = $hash{$key};
.
.
.

}

# Removing a value from the cache;
delete $hash{$key};

# Clearing the cache
%hash = ();
Note: Iteration over the cache (each, keys, values) is _NOT_ supported.

<<less
Download (0.017MB)
Added: 2007-03-03 License: Perl Artistic License Price:
965 downloads
XML::EasySQL::XMLobj::Node 1.2

XML::EasySQL::XMLobj::Node 1.2


XML::EasySQL::XMLobj::Node is a Perl module that contains a Node interface. more>>
XML::EasySQL::XMLobj::Node is a Perl module that contains a Node interface. Derived from a fork of Robert Hansons killer XML::EasyOBJ module, which offers Easy XML object navigation.

METHODS

makeNewNode( NEW_TAG )

Append a new element node to the current node. Takes the tag name as the parameter and returns the created node as a convienence.

my $p_element = $doc->body->makeNewNode(p);

getString( )

Recursively extracts text from the current node and all children element nodes. Returns the extracted text as a single scalar value.

_extractText( )

Utility method. Dont call this and dont overload it.

setString( STRING )

Sets the text value of the specified element. This is done by first removing all text node children of the current element and then appending the supplied text as a new child element.

Take this XML fragment and code for example:

< p >This elment has < b >text< /b > and < i >child< /i > elements< /p >

$doc->p->setString(This is the new text);

This will change the fragment to this:

< p >< b >text< /b >< i >child< /i >This is the new text< /p >

Because the and tags are not text nodes they are left unchanged, and the new text is added at the end of the specified element.

If you need more specific control on the change you should either use the getDomObj() method and use the DOM methods directly or remove all of the child nodes and rebuild the

element from scratch. Also see the addString() method.

addString( STRING )

Adds to the the text value of the specified element. This is done by appending the supplied text as a new child element.

Take this XML fragment and code for example:

< p >This elment has < b >text< /b >< /p >

$doc->p->addString( and elements);

This will change the fragment to this:

< p >This elment has < b >text< /b > and elements< /p >

getAttr( ATTR_NAME )

Returns the value of the named attribute.

my $val = $doc->body->img->getAttr(src);
getTagName( )

Returns the tag name of the specified element. This method is useful when you are enumerating child elements and do not know their element names.

foreach my $element ( $doc->getElement() ) {
print $element->getTagName();
}
setAttr( ATTR_NAME, ATTR_VALUE, [ATTR_NAME, ATTR_VALUE]... )

For each name/value pair passed the attribute name and value will be set for the specified element.

remAttr( ATTR_NAME )

Removes the specified attribute from the current element.

remElement( TAG_NAME, INDEX )

Removes a child element of the current element. The name of the child element and the index must be supplied. An index of 0 will remove the first occurance of the named element, 1 the second, 2 the third, etc.

getElement( TAG_NAME, INDEX )

Returns the node from the tag name and index. If no index is given the first child with that name is returned. Use this method when you have element names that include characters that are not legal as a perl method name. For example:

< foo > < !-- root element -- >
< bar >
< foo-bar >test< /foo-bar >
< /bar >
< /foo >

# "foo-bar" is not a legal method name
print $doc->bar->getElement(foo-bar)->getString();
getDomObj( )

Returns the DOM object associated with the current node. This is useful when you need fine access via the DOM to perform a specific function.

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