result
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 2032
HeyStaks Social Search - Google Shared 0.9.7
This is a Firefox addon that works with Google to make it easy for you to organise your searches, and share them with others. more>>
HeyStaks Social Search - Google Shared 0.9.7 is designed to serve users as a Firefox addon that works with Google to make it easy for you to organise your searches, share them with others, and benefit from the searches of your friends and colleagues - all without leaving your favorite search engine!
Search engines like Google do a fine job when it comes to search, but they do little to help us organise our past searches, nor do they make it easy for us to share our search experiences with others. This is more than just an inconvenience because very often we waste time re-searching for results that we know we found earlier. And even more often we find ourselves looking for information that one of our friends or colleagues has already found.
Enhancements:
- Added promotion filters that restrict result promotions in Google to results that have been selected numerous times, that have been tagged, or that have been voted up more times than they have been voted down.
- Added positive/negative promotion filters to stak creation so that users can cause URLs with the specified string to always or never be promoted on Google result pages.
- Result site favicons are used to annotate URLs promoted by positive filters (where available).
- Added timeouts which reset to the private "My Searches" stak after prolonged inactivity, and that expire the use of query terms as default tags and vote terms.
- Voting and page sharing have been added to the activity feed
- Share and remove options are greyed out in the stak menu for staks where this should not be possible (e.g. "My Searches").
- Added "Preview" feature via an icon next to results on the Google result list users can now browse through the result pages without leaving the result list.
- Enabled page sharing and preview features for non logged-in users.
- Improved the formatting of the icons inserted next to results on the Google result page so that they don't "jump" when results are moused-over.
Requirements:
- Mozilla Firefox
Added: 2009-03-15 License: MPL Price: FREE
11 downloads

CheckPlaces 1.2.0
CheckPlaces is professionally designed as a Firefox extension which lets you check your bookmarks in different ways. more>> CheckPlaces 1.2.0 is professionally designed as a Firefox extension which lets you check your bookmarks in different ways. There is a basic check of your bookmarks, and optional checks that the pages still exist, duplicate bookmarks, and empty folders. You can also use it to restore favicons that have gone missing.
Enhancements:
- Failed pages results now grouped intfive different types for easier handling
- When select more than one result the details of the last result are now displayed
- When delete a result the next one in the list is automatically selected
- When resize the results window, the list boxes now increase in size tdisplay more results
- Added CheckPlaces icons
- Added toolbar button and status bar icon as extra ways of starting up
- BUG FIX: 'Delete all' buttons were not working
Added: 2009-03-11 License: MPL Price: FREE
1 downloads

Clearlooks-XPSilver
Clearlooks-XPSilver is yet another excellent addition for Gnome users. It is actually a theme that aims to replicate Windows XP Silver color scheme, but the final result is a little different more>>
Clearlooks-XPSilver is yet another excellent addition for Gnome users. It is actually a theme that aims to replicate Windows XP Silver color scheme, but the final result is a little different.
Requirements:
- Gnome
Added: 2008-10-29 License: GPL Price: FREE
13 downloads
WWW::Search::HotFiles 1.072
WWW::Search::HotFiles is a class for searching ZDnet HotFiles. more>>
WWW::Search::HotFiles is a class for searching ZDnet HotFiles.
Class for searching ZDnet HotFiles (shareware, freeware) via Lycos. http://www.hotfiles.lycos.com.
If you use the raw method for this backend you will need to include a "< p >" at end of your print statement, example: print $result->raw(), "< p >n";
This is so that each result returned will have a HTML break since the HTML is being extracted from tables, and, there is no < p > or < br > trailing returned HITS to properly format the results. No BIG deal really.
Print optioins: Using score will return nice star images for rating purposes at end of each description line for each HIT if desired.
Using index_date will return the files date.
Raw returns description, star rating image, date, downloads, OS version.
This class exports no public interface; all interaction should be done through WWW::Search objects.
USAGE EXAMPLE
One of several print samples for this backend (this is a WebSearch
example):
print $count. < a href="$prefix$_" >$result- >{title}< /A >< /B >< BR >
$result->{description}
$result->{index_date} $result->{score}< P >< /SMALL >< /FONT >
END
<<lessClass for searching ZDnet HotFiles (shareware, freeware) via Lycos. http://www.hotfiles.lycos.com.
If you use the raw method for this backend you will need to include a "< p >" at end of your print statement, example: print $result->raw(), "< p >n";
This is so that each result returned will have a HTML break since the HTML is being extracted from tables, and, there is no < p > or < br > trailing returned HITS to properly format the results. No BIG deal really.
Print optioins: Using score will return nice star images for rating purposes at end of each description line for each HIT if desired.
Using index_date will return the files date.
Raw returns description, star rating image, date, downloads, OS version.
This class exports no public interface; all interaction should be done through WWW::Search objects.
USAGE EXAMPLE
One of several print samples for this backend (this is a WebSearch
example):
print $count. < a href="$prefix$_" >$result- >{title}< /A >< /B >< BR >
$result->{description}
$result->{index_date} $result->{score}< P >< /SMALL >< /FONT >
END
Download (0.042MB)
Added: 2007-08-18 License: Perl Artistic License Price:
812 downloads
Simple DocBook Processor 0.03
Simple DocBook Processor project reads a DocBook XML file, processes it into typeset pages, and outputs the result as PostScript more>>
Simple DocBook Processor project reads a DocBook XML file, processes it into typeset pages, and outputs the result as PostScript (which can easily be converted to a PDF).
It is "simple" because it supports only a subset of DocBook, and also because it does not make use of a DTD or stylesheets or any other heavyweight apparatus. Simple DocBook Processor is a single program. SDoP is used to format the Exim reference manual.
Enhancements:
- A lot of new processing parameters have been added to make it possible to change the output formatting in many ways.
<<lessIt is "simple" because it supports only a subset of DocBook, and also because it does not make use of a DTD or stylesheets or any other heavyweight apparatus. Simple DocBook Processor is a single program. SDoP is used to format the Exim reference manual.
Enhancements:
- A lot of new processing parameters have been added to make it possible to change the output formatting in many ways.
Download (0.79MB)
Added: 2007-08-17 License: GPL (GNU General Public License) Price:
807 downloads
Text::Yats 0.03
Text::Yats is Yet Another Template System. more>>
Text::Yats is Yet Another Template System.
SYNOPSIS
use Text::Yats;
my $template = < < ENDHTML;
< html >
< head >
< title >$title - $version< /title >
< /head >
< body >
< form >
< select name="names" >< !--{1}-- >
< option $selected >$list< /option >
< !--{2}-- >< /select >
< /form >
< /body >
< /html >
ENDHTML
my $result = "";
my $tpl = Text::Yats- >new(
level = > 1,
text = > $template);
$result .= $tpl- >section- >[0]- >replace(
title = > "Yats",
version = > "Development", );
$result .= $tpl- >section- >[1]- >replace(
list = > [hdias,anita,cubitos],
selected = > { value = > "selected",
array = > "list",
match = > "anita", } );
$result .= $tpl- >section- >[2]- >text;
print $result;
<<lessSYNOPSIS
use Text::Yats;
my $template = < < ENDHTML;
< html >
< head >
< title >$title - $version< /title >
< /head >
< body >
< form >
< select name="names" >< !--{1}-- >
< option $selected >$list< /option >
< !--{2}-- >< /select >
< /form >
< /body >
< /html >
ENDHTML
my $result = "";
my $tpl = Text::Yats- >new(
level = > 1,
text = > $template);
$result .= $tpl- >section- >[0]- >replace(
title = > "Yats",
version = > "Development", );
$result .= $tpl- >section- >[1]- >replace(
list = > [hdias,anita,cubitos],
selected = > { value = > "selected",
array = > "list",
match = > "anita", } );
$result .= $tpl- >section- >[2]- >text;
print $result;
Download (0.005MB)
Added: 2007-08-10 License: Perl Artistic License Price:
805 downloads
FakeBold Font patches for QT 4.3.x 0.1
FakeBold Font patches for QT 4.3.x fake a bold font style and output for some fonts without bold support. more>>
FakeBold Font patches for QT 4.3.x fake a bold font style and output for some fonts without bold support.
It is specially and very useful for CJK fonts. actually it works with all fonts without bold style.
Here I use FT_Glyph_Embolden to get a bold glyph.
These patches is not related to font rendering result, if you want to control font rendering result, please control fontconfig configurations.
Screenshot1: shows bold/bolditalic support with "SOng" and "Hei" Chinese font.
Screenshot1: shows bold/italic support for Chinese,Korean,Yi,Tibetan with Sans fontset(Song,SIL Yi, Tibetan machine uni fonts)
<<lessIt is specially and very useful for CJK fonts. actually it works with all fonts without bold style.
Here I use FT_Glyph_Embolden to get a bold glyph.
These patches is not related to font rendering result, if you want to control font rendering result, please control fontconfig configurations.
Screenshot1: shows bold/bolditalic support with "SOng" and "Hei" Chinese font.
Screenshot1: shows bold/italic support for Chinese,Korean,Yi,Tibetan with Sans fontset(Song,SIL Yi, Tibetan machine uni fonts)
Download (0.004MB)
Added: 2007-08-10 License: GPL (GNU General Public License) Price:
809 downloads
Class::AbstractLogic 0.01_01
Class::AbstractLogic is a Perl module to handle Logic Abstractions. more>>
Class::AbstractLogic is a Perl module to handle Logic Abstractions.
SYNOPSIS
# the logic class definition
package My::Logic::Foo;
use Class::AbstractLogic-base;
# a logic action
action add,
needs [qw(a b)],
verify { a => sub { /^d+$/ }, b => sub { /^d+$/ } },
sub { $_{a} + $_{b} };
1;
...
# logic module manager creation
use Class::AbstractLogic;
my $calm = Class::AbstractLogic::Manager->new;
# loading a logic class
$calm->load_logic(Foo => My::Logic::Foo);
# requesting a result from a logic method
my $result = $calm->logic(Foo)->add(a => 11, b => 12);
# $result will be false if an exception was caught
if ($result) {
print result was . $result->value . "n";
}
else {
print exception raised: . $result->key . "n";
print error message: . $result->error . "n";
}
<<lessSYNOPSIS
# the logic class definition
package My::Logic::Foo;
use Class::AbstractLogic-base;
# a logic action
action add,
needs [qw(a b)],
verify { a => sub { /^d+$/ }, b => sub { /^d+$/ } },
sub { $_{a} + $_{b} };
1;
...
# logic module manager creation
use Class::AbstractLogic;
my $calm = Class::AbstractLogic::Manager->new;
# loading a logic class
$calm->load_logic(Foo => My::Logic::Foo);
# requesting a result from a logic method
my $result = $calm->logic(Foo)->add(a => 11, b => 12);
# $result will be false if an exception was caught
if ($result) {
print result was . $result->value . "n";
}
else {
print exception raised: . $result->key . "n";
print error message: . $result->error . "n";
}
Download (0.016MB)
Added: 2007-08-01 License: Perl Artistic License Price:
814 downloads
RPC::pClient 0.1005
RPC::pClient is a Perl extension for writing pRPC clients. more>>
RPC::pClient is a Perl extension for writing pRPC clients.
SYNOPSIS
use RPC::pClient;
$sock = IO::Socket::INET->new(PeerAddr => joes.host.de,
PeerPort => 2570,
Proto => tcp);
$connection = new RPC::pClient(sock => $sock,
application => My App,
version => 1.0,
user => joe,
password => hello!);
pRPC (Perl RPC) is a package that simplifies the writing of Perl based client/server applications. RPC::pServer is the package used on the server side, and you guess what RPC::pClient is for. See RPC::pClient(3) for this part.
pRPC works by defining a set of of functions that may be executed by the client. For example, the server might offer a function "multiply" to the client. Now a function call
@result = $con->Call(multiply, $a, $b);
on the client will be mapped to a corresponding call
multiply($con, $data, $a, $b);
on the server. (See the funcTable description below for $data.) The function calls result will be returned to the client and stored in the array @result. Simple, eh?
Client methods
new
The client constructor. Returns a client object or an error string, thus you typically use it like this:
$client = RPC::pClient->new ( ... );
if (!ref($client)) {
print STDERR "Error while creating client object: $clientn";
} else {
# Do real stuff
...
}
Call
calls a function on the server; the arguments are a function name, followed by function arguments. It returns the function results, if successfull. After executing Call() you should always check the error attribute: An empty string indicates success. Thus the equivalent to
$c = Add($a, $b)
# Use $c
...
is
$c = $client->Call("Add", $a, $b);
if ($client->error) {
# Do something in case of error
...
} else {
# Use $c
...
}
CallInt
Similar to and internally used by Call. Receives the same arguments, but the result is prepended by a status value: If this status value is TRUE, then all went fine and the following result array is valid. Otherwise an error occurred and the error message follows immediately after the status code. Example:
my($status, @result) = $client->CallInt("Add", $a, $b);
if (!$status) {
# Do something in case of error
my $errmsg = shift @result || "Unknown error";
...
} else {
...
}
Encrypt
This method can be used to get or set the cipher attribute, thus the encryption mode. If the method is passed an argument, the argument will be used as the new encryption mode. (undef for no encryption.) In either case the current encryption mode will be returned. Example:
# Get the current encryption mode
$mode = $server->Encrypt();
# Currently disable encryption
$server->Encrypt(undef);
# Switch back to the old mode
$server->Encrypt($mode);
<<lessSYNOPSIS
use RPC::pClient;
$sock = IO::Socket::INET->new(PeerAddr => joes.host.de,
PeerPort => 2570,
Proto => tcp);
$connection = new RPC::pClient(sock => $sock,
application => My App,
version => 1.0,
user => joe,
password => hello!);
pRPC (Perl RPC) is a package that simplifies the writing of Perl based client/server applications. RPC::pServer is the package used on the server side, and you guess what RPC::pClient is for. See RPC::pClient(3) for this part.
pRPC works by defining a set of of functions that may be executed by the client. For example, the server might offer a function "multiply" to the client. Now a function call
@result = $con->Call(multiply, $a, $b);
on the client will be mapped to a corresponding call
multiply($con, $data, $a, $b);
on the server. (See the funcTable description below for $data.) The function calls result will be returned to the client and stored in the array @result. Simple, eh?
Client methods
new
The client constructor. Returns a client object or an error string, thus you typically use it like this:
$client = RPC::pClient->new ( ... );
if (!ref($client)) {
print STDERR "Error while creating client object: $clientn";
} else {
# Do real stuff
...
}
Call
calls a function on the server; the arguments are a function name, followed by function arguments. It returns the function results, if successfull. After executing Call() you should always check the error attribute: An empty string indicates success. Thus the equivalent to
$c = Add($a, $b)
# Use $c
...
is
$c = $client->Call("Add", $a, $b);
if ($client->error) {
# Do something in case of error
...
} else {
# Use $c
...
}
CallInt
Similar to and internally used by Call. Receives the same arguments, but the result is prepended by a status value: If this status value is TRUE, then all went fine and the following result array is valid. Otherwise an error occurred and the error message follows immediately after the status code. Example:
my($status, @result) = $client->CallInt("Add", $a, $b);
if (!$status) {
# Do something in case of error
my $errmsg = shift @result || "Unknown error";
...
} else {
...
}
Encrypt
This method can be used to get or set the cipher attribute, thus the encryption mode. If the method is passed an argument, the argument will be used as the new encryption mode. (undef for no encryption.) In either case the current encryption mode will be returned. Example:
# Get the current encryption mode
$mode = $server->Encrypt();
# Currently disable encryption
$server->Encrypt(undef);
# Switch back to the old mode
$server->Encrypt($mode);
Download (0.019MB)
Added: 2007-07-24 License: Perl Artistic License Price:
823 downloads
DNS name parser 1.2.1
DNS name parser is a Java utility library for parsing dns names, ip and hw addresses. more>>
DNS name parser is a Java utility library for parsing dns names, ip and hw addresses.
Synopsis
import su.netdb.parser.*;
Parser parser = new Parser();
Hashtable result = parser.parse(str);
System.out.println("string: "+result.get("string"));
System.out.println("hw: "+result.get("hw"));
System.out.println("name: "+result.get("name"));
System.out.println("domain: "+result.get("domain"));
System.out.println("ip_low: "+result.get("ip_low"));
System.out.println("ip_high: "+result.get("ip_high"));
"DNS name parser" is an utility library created to be used in a search application. Given a single input field its function is to differentiate between several types of possible input strings. Namely if it a dns name, IP address (exact, ip range or ip with wildcards) or hardware address. The result of the parsing is a Hashtable with possible keys "string", "hw", "name", "domain", "ip_low" and "ip_high".
<<lessSynopsis
import su.netdb.parser.*;
Parser parser = new Parser();
Hashtable result = parser.parse(str);
System.out.println("string: "+result.get("string"));
System.out.println("hw: "+result.get("hw"));
System.out.println("name: "+result.get("name"));
System.out.println("domain: "+result.get("domain"));
System.out.println("ip_low: "+result.get("ip_low"));
System.out.println("ip_high: "+result.get("ip_high"));
"DNS name parser" is an utility library created to be used in a search application. Given a single input field its function is to differentiate between several types of possible input strings. Namely if it a dns name, IP address (exact, ip range or ip with wildcards) or hardware address. The result of the parsing is a Hashtable with possible keys "string", "hw", "name", "domain", "ip_low" and "ip_high".
Download (0.008MB)
Added: 2007-07-20 License: GPL (GNU General Public License) Price:
835 downloads
qPyProfiler 0.3
qPyProfiler is a GUI (Graphical User Interface) to the Python profiler. more>>
qPyProfiler is a GUI (Graphical User Interface) to the Python profiler. It allow user to profile python application and browse profiling result in a convenient way. This projet starts on june 2007.
I started this project because I do not found any free software that do that for python profiling.
The project is a free software licenced under the GNU GPL V2.
<<lessI started this project because I do not found any free software that do that for python profiling.
The project is a free software licenced under the GNU GPL V2.
Download (0.010MB)
Added: 2007-07-19 License: GPL (GNU General Public License) Price:
832 downloads
Array::PatternMatcher 0.04
Array::PatternMatcher is a pattern matching for arrays. more>>
Array::PatternMatcher is a pattern matching for arrays.
SYNOPSIS
This section inlines the entire test suite. Please excuse the ok()s.
use Array::PatternMatcher;
Matching logical variables to input stream
# 1 - simple match of logical variable to input
my $pattern = AGE ;
my $input = 969 ;
my $result = pat_match ($pattern, $input, {} ) ;
ok($result->{AGE}, 969) ;
# 2 - if binding exists, it must equal the input
$input = 12;
my $new_result = pat_match ($pattern, $input, $result) ;
ok(!defined($new_result)) ;
# 3 - bind the pattern logical variables to the input list
$pattern = [qw(X Y)] ;
$input = [ 77, 45 ] ;
my $result = pat_match ($pattern, $input, {} ) ;
ok($result->{X}, 77) ;
Matching segments (quantifying) portions of the input stream
# 1
{
my $pattern = [a, [qw(X *)], d] ;
my $input = [a, b, c, d] ;
my $result = pat_match ($pattern, $input, {} ) ;
ok ("@{$result->{X}}","b c") ;
}
# 2
{
my $pattern = [a, [qw(X *)], [qw(Y *)], d] ;
my $input = [a, b, c, d] ;
my $result = pat_match ($pattern, $input, {} ) ;
ok ("@{$result->{Y}}","b c") ;
}
# 3
{
my $pattern = [a, [qw(X +)], d] ;
my $input = [a, b, c, d] ;
ok ("@{$result->{X}}","b c") ;
}
# 4
{
my $pattern = [ a, [qw(X ?)], c ] ;
my $input = [ a, b, c ] ;
my $result = pat_match ($pattern, $input, {} ) ;
ok ("$result->{X}","b") ;
}
# 5
{
my $pattern = [ qw(X OP Y is Z),
[
sub { "($_->{X} $_->{OP} $_->{Y}) == $_->{Z}" },
IF?
]
] ;
my $input = [qw(3 + 4 is 7) ] ;
my $result = pat_match ($pattern, $input, {} ) ;
ok ($result) ;
}
Single-matching:
Take a single input and a series of patterns and decide which pattern
matches the input:
# 1 - Here all input patterns must match the input
{
my @pattern ;
push @pattern, [ qw(X Y) ] ;
push @pattern, [ qw(22 Z ) ] ;
push @pattern, [ qw(M 33) ] ;
my $input = [ qw(22 33) ] ;
my $meta_pattern = [ AND?, @pattern ] ;
# if no bindings, add a binding between pattern and input
my $result = pat_match ($meta_pattern, $input, {} ) ;
ok ($result->{Z},33) ;
}
# 2 - Here, any one of the patterns must match the input
{
my @pattern ;
push @pattern, [ qw(99 22) ] ;
push @pattern, [ qw(33 22) ] ;
push @pattern, [ qw(44 3) ] ;
push @pattern, [ qw(22 Z) ] ;
my $input = [ qw(22 33) ] ;
my $meta_pattern = [ OR?, @pattern ] ;
# if no bindings, add a binding between pattern and input
my $result = pat_match ($meta_pattern, $input, {} ) ;
ok ($result->{Z},33) ;
}
# 3 - Here, none of the patterns must match the input
{
my @pattern ;
push @pattern, [ qw(99 22) ] ;
push @pattern, [ qw(33 22) ] ;
push @pattern, [ qw(44 3) ] ;
push @pattern, [ qw(22 Z) ] ;
my $input = [ qw(22 33) ] ;
my $meta_pattern = [ NOT?, @pattern ] ;
# if no bindings, add a binding between pattern and input
my $result = pat_match ($meta_pattern, $input, {} ) ;
ok (scalar keys %$result == 0) ;
}
# 4 - here the input must satisfy the predicate
{
sub numberp { $_[0] =~ /d+/ }
my $pattern = [ qw(X age), [qw(IS? N), νmberp] ] ;
my $input = [ qw(Mary age), thirty-four ] ;
# if no bindings, add a binding between pattern and input
my $result = pat_match ($pattern, $input, {} ) ;
ok (!defined($result));
}
# 5 - same thing, but this time a failing result ---
# not undef because it is the return val of numberp
{
sub numberp { $_[0] =~ /d+/ }
my $pattern = [ qw(X age), [qw(IS? N), νmberp] ] ;
my $input = [ qw(Mary age), 34 ] ;
my $result = pat_match ($pattern, $input, {} ) ;
ok ($result->{N},34) ;
}
Segment-matching:
Match a chunk of the input stream using *, +, ?
# 1 - * is greedy in this case, but not with 2 consecutve * patterns
{
my $pattern = [a, [qw(X *)], d] ;
my $input = [a, b, c, d] ;
# if no bindings, add a binding between pattern and input
my $result = pat_match ($pattern, $input, {} ) ;
warn sprintf "X*RETVAL: %s", Data::Dumper::Dumper($result) ;
ok ("@{$result->{X}}","b c") ;
}
# 2 - X* gets nothing, Y* gets all it can:
{
my $pattern = [a, [qw(X *)], [qw(Y *)], d] ;
my $input = [a, b, c, d] ;
# if no bindings, add a binding between pattern and input
my $result = pat_match ($pattern, $input, {} ) ;
warn sprintf "X*Y*RETVAL: %s", Data::Dumper::Dumper($result) ;
ok ("@{$result->{Y}}","b c") ;
}
# 3 - samething , but require at least one match for X
{
my $pattern = [a, [qw(X +)], d] ;
my $input = [a, b, c, d] ;
my $result = pat_match ($pattern, $input, {} ) ;
warn sprintf "RETVAL: @{$result->{X}}" ;
ok ("@{$result->{X}}","b c") ;
}
# 4 - require 0 or 1 match for X
{
my $pattern = [ a, [qw(X ?)], c ] ;
my $input = [ a, b, c ] ;
my $result = pat_match ($pattern, $input, {} ) ;
ok ("$result->{X}","b") ;
}
# 5 - evaluate a sub on the fly after match
{
my $pattern = [ qw(X OP Y is Z),
[
sub { "($_->{X} $_->{OP} $_->{Y}) == $_->{Z}" },
IF?
]
] ;
my $input = [qw(3 + 4 is 7) ] ;
my $result = pat_match ($pattern, $input, {} ) ;
ok ($result) ;
}
# --- 6 same thing, but fail
{
my $pattern = [ qw(X OP Y is Z),
[
sub { "($_->{X} $_->{OP} $_->{Y}) == $_->{Z}" },
IF?
]
] ;
my $input = [qw(3 + 4 is 8) ] ;
my $result = pat_match ($pattern, $input, {} ) ;
warn sprintf "IF_RETVAL2: *%s*", Data::Dumper::Dumper($result);
ok ($result eq ) ;
}
<<lessSYNOPSIS
This section inlines the entire test suite. Please excuse the ok()s.
use Array::PatternMatcher;
Matching logical variables to input stream
# 1 - simple match of logical variable to input
my $pattern = AGE ;
my $input = 969 ;
my $result = pat_match ($pattern, $input, {} ) ;
ok($result->{AGE}, 969) ;
# 2 - if binding exists, it must equal the input
$input = 12;
my $new_result = pat_match ($pattern, $input, $result) ;
ok(!defined($new_result)) ;
# 3 - bind the pattern logical variables to the input list
$pattern = [qw(X Y)] ;
$input = [ 77, 45 ] ;
my $result = pat_match ($pattern, $input, {} ) ;
ok($result->{X}, 77) ;
Matching segments (quantifying) portions of the input stream
# 1
{
my $pattern = [a, [qw(X *)], d] ;
my $input = [a, b, c, d] ;
my $result = pat_match ($pattern, $input, {} ) ;
ok ("@{$result->{X}}","b c") ;
}
# 2
{
my $pattern = [a, [qw(X *)], [qw(Y *)], d] ;
my $input = [a, b, c, d] ;
my $result = pat_match ($pattern, $input, {} ) ;
ok ("@{$result->{Y}}","b c") ;
}
# 3
{
my $pattern = [a, [qw(X +)], d] ;
my $input = [a, b, c, d] ;
ok ("@{$result->{X}}","b c") ;
}
# 4
{
my $pattern = [ a, [qw(X ?)], c ] ;
my $input = [ a, b, c ] ;
my $result = pat_match ($pattern, $input, {} ) ;
ok ("$result->{X}","b") ;
}
# 5
{
my $pattern = [ qw(X OP Y is Z),
[
sub { "($_->{X} $_->{OP} $_->{Y}) == $_->{Z}" },
IF?
]
] ;
my $input = [qw(3 + 4 is 7) ] ;
my $result = pat_match ($pattern, $input, {} ) ;
ok ($result) ;
}
Single-matching:
Take a single input and a series of patterns and decide which pattern
matches the input:
# 1 - Here all input patterns must match the input
{
my @pattern ;
push @pattern, [ qw(X Y) ] ;
push @pattern, [ qw(22 Z ) ] ;
push @pattern, [ qw(M 33) ] ;
my $input = [ qw(22 33) ] ;
my $meta_pattern = [ AND?, @pattern ] ;
# if no bindings, add a binding between pattern and input
my $result = pat_match ($meta_pattern, $input, {} ) ;
ok ($result->{Z},33) ;
}
# 2 - Here, any one of the patterns must match the input
{
my @pattern ;
push @pattern, [ qw(99 22) ] ;
push @pattern, [ qw(33 22) ] ;
push @pattern, [ qw(44 3) ] ;
push @pattern, [ qw(22 Z) ] ;
my $input = [ qw(22 33) ] ;
my $meta_pattern = [ OR?, @pattern ] ;
# if no bindings, add a binding between pattern and input
my $result = pat_match ($meta_pattern, $input, {} ) ;
ok ($result->{Z},33) ;
}
# 3 - Here, none of the patterns must match the input
{
my @pattern ;
push @pattern, [ qw(99 22) ] ;
push @pattern, [ qw(33 22) ] ;
push @pattern, [ qw(44 3) ] ;
push @pattern, [ qw(22 Z) ] ;
my $input = [ qw(22 33) ] ;
my $meta_pattern = [ NOT?, @pattern ] ;
# if no bindings, add a binding between pattern and input
my $result = pat_match ($meta_pattern, $input, {} ) ;
ok (scalar keys %$result == 0) ;
}
# 4 - here the input must satisfy the predicate
{
sub numberp { $_[0] =~ /d+/ }
my $pattern = [ qw(X age), [qw(IS? N), νmberp] ] ;
my $input = [ qw(Mary age), thirty-four ] ;
# if no bindings, add a binding between pattern and input
my $result = pat_match ($pattern, $input, {} ) ;
ok (!defined($result));
}
# 5 - same thing, but this time a failing result ---
# not undef because it is the return val of numberp
{
sub numberp { $_[0] =~ /d+/ }
my $pattern = [ qw(X age), [qw(IS? N), νmberp] ] ;
my $input = [ qw(Mary age), 34 ] ;
my $result = pat_match ($pattern, $input, {} ) ;
ok ($result->{N},34) ;
}
Segment-matching:
Match a chunk of the input stream using *, +, ?
# 1 - * is greedy in this case, but not with 2 consecutve * patterns
{
my $pattern = [a, [qw(X *)], d] ;
my $input = [a, b, c, d] ;
# if no bindings, add a binding between pattern and input
my $result = pat_match ($pattern, $input, {} ) ;
warn sprintf "X*RETVAL: %s", Data::Dumper::Dumper($result) ;
ok ("@{$result->{X}}","b c") ;
}
# 2 - X* gets nothing, Y* gets all it can:
{
my $pattern = [a, [qw(X *)], [qw(Y *)], d] ;
my $input = [a, b, c, d] ;
# if no bindings, add a binding between pattern and input
my $result = pat_match ($pattern, $input, {} ) ;
warn sprintf "X*Y*RETVAL: %s", Data::Dumper::Dumper($result) ;
ok ("@{$result->{Y}}","b c") ;
}
# 3 - samething , but require at least one match for X
{
my $pattern = [a, [qw(X +)], d] ;
my $input = [a, b, c, d] ;
my $result = pat_match ($pattern, $input, {} ) ;
warn sprintf "RETVAL: @{$result->{X}}" ;
ok ("@{$result->{X}}","b c") ;
}
# 4 - require 0 or 1 match for X
{
my $pattern = [ a, [qw(X ?)], c ] ;
my $input = [ a, b, c ] ;
my $result = pat_match ($pattern, $input, {} ) ;
ok ("$result->{X}","b") ;
}
# 5 - evaluate a sub on the fly after match
{
my $pattern = [ qw(X OP Y is Z),
[
sub { "($_->{X} $_->{OP} $_->{Y}) == $_->{Z}" },
IF?
]
] ;
my $input = [qw(3 + 4 is 7) ] ;
my $result = pat_match ($pattern, $input, {} ) ;
ok ($result) ;
}
# --- 6 same thing, but fail
{
my $pattern = [ qw(X OP Y is Z),
[
sub { "($_->{X} $_->{OP} $_->{Y}) == $_->{Z}" },
IF?
]
] ;
my $input = [qw(3 + 4 is 8) ] ;
my $result = pat_match ($pattern, $input, {} ) ;
warn sprintf "IF_RETVAL2: *%s*", Data::Dumper::Dumper($result);
ok ($result eq ) ;
}
Download (0.006MB)
Added: 2007-07-12 License: Perl Artistic License Price:
836 downloads
AI::Prolog::Cookbook 0.739
AI::Prolog::Cookbook Perl module contains recipes for common Prolog problems. more>>
AI::Prolog::Cookbook Perl module contains recipes for common Prolog problems.
Logic programming can take some time to get used to. This document is intended to provide solutions to common problems encountered in logic programming. Many of the predicates listed here will depend on other predicates defined here. If in doubt, see AI::Prolog::Builtins for which predicates AI::Prolog supports directly.
Like most predicates in Prolog, the following predicates can be reused in ways to generate answers that a human could logically infer from the data presented. However, many times those "answers" can result in infinite loops. For example, in the gather/3 predicate listed below, we can gather the items from a list which match the supplied list of indices.
gather([1,3], [a,b,c,d], Result). % Result is [a,c]
Or we can figure out which indices in a list match the resulting values:
gather(Indices, [a,b,c,d], [a,d]). % Indices is [1,4]
However, if we wish to understand which lists will have the given lists for the given indices, we have an infinite result set. AI::Prolog and (other Prolog implementations) will return one result and then enter an infinite loop if you request the goal be resatisfied (i.e., if you ask for another result). If you see behavior such as this in your programs, you can issue the trace. command to see how Prolog is internally attempting to satisfy your goal. notrace. will turn off tracing.
<<lessLogic programming can take some time to get used to. This document is intended to provide solutions to common problems encountered in logic programming. Many of the predicates listed here will depend on other predicates defined here. If in doubt, see AI::Prolog::Builtins for which predicates AI::Prolog supports directly.
Like most predicates in Prolog, the following predicates can be reused in ways to generate answers that a human could logically infer from the data presented. However, many times those "answers" can result in infinite loops. For example, in the gather/3 predicate listed below, we can gather the items from a list which match the supplied list of indices.
gather([1,3], [a,b,c,d], Result). % Result is [a,c]
Or we can figure out which indices in a list match the resulting values:
gather(Indices, [a,b,c,d], [a,d]). % Indices is [1,4]
However, if we wish to understand which lists will have the given lists for the given indices, we have an infinite result set. AI::Prolog and (other Prolog implementations) will return one result and then enter an infinite loop if you request the goal be resatisfied (i.e., if you ask for another result). If you see behavior such as this in your programs, you can issue the trace. command to see how Prolog is internally attempting to satisfy your goal. notrace. will turn off tracing.
Download (0.068MB)
Added: 2007-07-12 License: Perl Artistic License Price:
837 downloads
htmlobserver 0.8a
htmlobserver project is a program that downloads a Web page at regular intervals, and searches it for regular expressions. more>>
htmlobserver project is a program that downloads a Web page at regular intervals, and searches it for regular expressions.
All HTML tags are removed, and the remaining text is searched for regular expressions, which can be defined in a list.
Matching rows are displayed in a panel, and different alarms may be triggered. The alarms are repeated when the result set changes.
<<lessAll HTML tags are removed, and the remaining text is searched for regular expressions, which can be defined in a list.
Matching rows are displayed in a panel, and different alarms may be triggered. The alarms are repeated when the result set changes.
Download (0.028MB)
Added: 2007-07-01 License: LGPL (GNU Lesser General Public License) Price:
845 downloads
Net::MarkLogic::XDBC 0.11
Net::MarkLogic::XDBC is a Perl module with XDBC connectivity for MarkLogic CIS servers. more>>
Net::MarkLogic::XDBC is a Perl module with XDBC connectivity for MarkLogic CIS servers.
SYNOPSIS
use Net::MarkLogic::XDBC
$xdbc = Net::MarkLogic::XDBC->new( "user:pass@localhost:9000" );
$xdbc = Net::MarkLogic::XDBC->new(host => $host,
port => $port,
username => $user,
password => $pass, );
$result = $agent->query($xquery);
print $result->content;
@items = $result->items;
print $item->content;
METHODS
new()
$xdbc = Net::MarkLogic::XDBC->new( "user:pass@localhost:9000" );
$xdbc = Net::MarkLogic::XDBC->new( host => $hostname,
port => $port,
username => $user,
password => $pass, );
Connect using a connection string or named host, port, username, and password parameters.
query()
$result = $xdbc->query($xquery);
Execute XQUERY code on XDBC server.
query_from_template()
$result = $xdbc->query_from_template($template, $args);
Generate XQUERY code from a template toolkit template and arguments, then execute on XDBC server.
This might be overkill, but its definitely a feature youre not going to find in the Java API.
<<lessSYNOPSIS
use Net::MarkLogic::XDBC
$xdbc = Net::MarkLogic::XDBC->new( "user:pass@localhost:9000" );
$xdbc = Net::MarkLogic::XDBC->new(host => $host,
port => $port,
username => $user,
password => $pass, );
$result = $agent->query($xquery);
print $result->content;
@items = $result->items;
print $item->content;
METHODS
new()
$xdbc = Net::MarkLogic::XDBC->new( "user:pass@localhost:9000" );
$xdbc = Net::MarkLogic::XDBC->new( host => $hostname,
port => $port,
username => $user,
password => $pass, );
Connect using a connection string or named host, port, username, and password parameters.
query()
$result = $xdbc->query($xquery);
Execute XQUERY code on XDBC server.
query_from_template()
$result = $xdbc->query_from_template($template, $args);
Generate XQUERY code from a template toolkit template and arguments, then execute on XDBC server.
This might be overkill, but its definitely a feature youre not going to find in the Java API.
Download (0.009MB)
Added: 2007-06-23 License: Perl Artistic License Price:
853 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 result 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