Main > Free Download Search >

Free type software for linux

type

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 3715
MIME::Type 1.19

MIME::Type 1.19


MIME::Type is a definition of one MIME type. more>>
MIME::Type is a definition of one MIME type.

SYNOPSIS

use MIME::Types;
my $mimetypes = MIME::Types->new;
my MIME::Type $plaintext = $mimetypes->type(text/plain);
print $plaintext->mediaType; # text
print $plaintext->subType; # plain

my @ext = $plaintext->extensions;
print "@ext" # txt asc c cc h hh cpp

print $plaintext->encoding # 8bit
if($plaintext->isBinary) # false
if($plaintext->isAscii) # true
if($plaintext->equals(text/plain) {...}
if($plaintext eq text/plain) # same

print MIME::Type->simplified(x-appl/x-zip) # appl/zip

MIME types are used in MIME entities, for instance as part of e-mail and HTTP traffic. Sometimes real knowledge about a mime-type is need. Objects of MIME::Type store the information on one such type.

This module is built to conform to the MIME types of RFCs 2045 and 2231. It follows the official IANA registry at http://www.iana.org/assignments/media-types/ and the collection kept at http://www.ltsw.se/knbase/internet/mime.htp

<<less
Download (0.017MB)
Added: 2007-06-01 License: Perl Artistic License Price:
877 downloads
Hash::Type 1.05

Hash::Type 1.05


Hash::Type module contains pseudo-hashes as arrays tied to a type (list of fields). more>>
Hash::Type module contains pseudo-hashes as arrays tied to a "type" (list of fields).

SYNOPSIS

use Hash::Type;

# create a Hash::Type
my $personType = new Hash::Type(qw(firstname lastname city));

# create and populate some hashes tied to $personType
tie %wolfgang, $personType, "wolfgang amadeus", "mozart", "salzburg";
$ludwig = new $personType ("ludwig", "van beethoven", "vienna");
$jsb = new $personType;
$jsb->{city} = "leipzig";
@{$jsb}{qw(firstname lastname)} = ("johann sebastian", "bach");

# add fields dynamically
$personType->add("birth", "death") or die "fields not added";
$wolfgang{birth} = 1750;

# More complete example : read a flat file with headers on first line
my ($headerline, @datalines) = map {chomp; $_} ;
my $ht = new Hash::Type(split /t/, $headerline);
foreach my $line (@datalines) {
my $data = new $ht(split /t/, $line);
work_with($data->{someField}, $data->{someOtherField});
}

# an alternative to Time::gmtime and Time::localtime
my $timeType = new Hash::Type qw(sec min hour mday mon year wday yday);
my $localtime = new $timeType (localtime);
my $gmtime = new $timeType (gmtime);
print $localtime->{hour} - $gmtime->{hour}, " hours difference to GMT";

# comparison functions
my $byAge = $personType->cmp("birth : -num, lastname, firstname");
my $byNameLength = $personType->cmp(lastname => {length($b) length($a)},
lastname => alpha,
firstname => alpha);
showPerson($_) foreach (sort $byAge @people);
showPerson($_) foreach (sort $byNameLength @people);

# special comparisons : dates
my $US_DateCmp = $myHashType->cmp("someDateField : m/d/y");
my $FR_InverseDateCmp = $myHashType->cmp("someDateField : -d.m.y");

<<less
Download (0.008MB)
Added: 2007-08-06 License: Perl Artistic License Price:
813 downloads
Data::Type 0.01.04

Data::Type 0.01.04


Data::Type is a Perl module with versatile data and value types. more>>
Data::Type is a Perl module with versatile data and value types.

SYNOPSIS

use Data::Type qw(:all);
use Error qw(:try);

try
{
verify $email , EMAIL;
verify $homepage , URI(http);
verify $cc , CREDITCARD( MASTERCARD, VISA );
verify $answer_a , YESNO;
verify $gender , GENDER;
verify one , ENUM( qw(one two three) );
verify [qw(two six)], SET( qw(one two three four five six) ) );
verify $server_ip4 , IP(v4);
verify $server_ip6 , IP(v6);

verify A35231AH1 , CINS;
verify 14565935 , ISSN;
verify DE , LANGCODE;
verify German , LANGNAME;

verify 012345678905, UPC();
verify 5276440065421319, CREDITCARD( MASTERCARD ) );

verify ATGCAAAT , BIO::DNA;
verify AUGGGAAAU , BIO::RNA;

verify 01001001110110101, BINARY;
verify 0F 0C 0A, HEX;

verify 0 , DEFINED;
verify 234 , NUM( 20 );
verify 1 , BOOL( true );
verify 100 , INT;
verify 1.1 , REAL;

my $foo = bless( 123, SomeThing );

verify $foo , REF;
verify $foo , REF( qw(SomeThing Else) );
verify [ bar ] , REF( ARRAY );

verify x 20 , VARCHAR( 20 );
verify 2001-01-01 , DATE( MYSQL );
verify 16 Nov 94 22:28:20 PST , DATE( DATEPARSE );
verify 9999-12-31 23:59:59, DATETIME;
verify 1970-01-01 00:00:00, TIMESTAMP;
verify -838:59:59 , TIME;
verify 2155 , YEAR;
verify 69 , YEAR(2);
verify 0 x 20 , TINYTEXT;
verify 0 x 20 , MEDIUMTEXT;
verify 0 x 20 , LONGTEXT;
verify 0 x 20 , TEXT;

verify 80 , PORT;
verify www.cpan.org, DOMAIN;
}
catch Type::Exception with
{
my $e = shift;

printf "Expected %s %s at %s line %sn",
$e->value,
$e->type->info,
$e->was_file,
$e->was_line;

foreach my $entry ( testplan( $e->type ) )
{
printf "texpecting it %s %s ", $entry->[1] ? is : is NOT, $entry->[0]->info();
}
};

# believe it or not, this really works

foreach ( EMAIL, WORD, CREDITCARD( MASTERCARD, VISA ), BIO::DNA, HEX )
{
print $_->info;
print $_->usage;
print $_->export; # does it have other names
print $_->param; # what are my choice i.e. [yes,no]
print $_->isa( IType::Business ); # is it a Business related type ?
print $_->VERSION; # first apperance in Data::Type release
}

# tied interface (alias typ)

try
{
typ ENUM( qw(DNA RNA) ), ( my $a, my $b );

print "a is typed" if istyp( $a );

$a = DNA; # $alias only accepts DNA or RNA
$a = RNA;
$a = xNA; # throws exception

untyp( $alias );
}
catch Type::Exception ::with
{
printf "Expected %s %s at %s line %sn",
$e->value,
$e->type->info,
$e->was_file,
$e->was_line;
};

dverify( $email, EMAIL ) or die $!;

my $g = Data::Type::Guard->new(

allow => [ Human, Others ], # blessed objects of that type

tests =>
{
email => EMAIL( 1 ), # mxcheck ON ! see Email::Valid
firstname => WORD,
social_id => [ NUM, VARCHAR( 10 ) ],
contacts => sub { my %args = @_; exists $args{lucy} },
}
);

$g->inspect( $h );

# compact version

overify { email => EMAIL( 1 ), firstname => WORD }, $object_a, $object_b;

print toc();

print catalog();

This module supports versatile data and value types. Out of the ordinary it supports parameterised types (like databases have i.e. VARCHAR(80) ). When you try to feed a typed variable against some odd data, this module explains what he would have expected.

<<less
Download (0.022MB)
Added: 2006-10-02 License: Perl Artistic License Price:
1117 downloads
Class::Meta::Type 0.53

Class::Meta::Type 0.53


Class::Meta::Type is a Perl module for data type validation and accessor building. more>>
Class::Meta::Type is a Perl module for data type validation and accessor building.

SYNOPSIS

package MyApp::TypeDef;

use strict;
use Class::Meta::Type;
use IO::Socket;

my $type = Class::Meta::Type->add( key => io_socket,
desc => IO::Socket object,
name => IO::Socket Object );

This class stores the various data types used by Class::Meta. It manages all aspects of data type validation and method creation. New data types can be added to Class::Meta::Type by means of the add() constructor. This is useful for creating custom types for your Class::Meta-built classes.

Note:This class manages the most advanced features of Class::Meta. Before deciding to create your own accessor closures as described in add(), you should have a thorough working knowledge of how Class::Meta works, and have studied the add() method carefully. Simple data type definitions such as that shown in the SYNOPSIS, on the other hand, are encouraged.

<<less
Download (0.060MB)
Added: 2006-09-22 License: Perl Artistic License Price:
1127 downloads
Audio::File::Type 0.10

Audio::File::Type 0.10


Audio::File::Type represents an audio filetype. more>>
Audio::File::Type represents an audio filetype.

An instance of an object inherited from Audio::File::Type is returned by the constructor of Audio::File. This object currently provides access to the audio files information like its audio properties (bitrate, sample rate, number of channels, ...) and the data stored in the files tag, but also providing access to the raw audio data and other information should be easy to be implemented.

METHODS

new

Constructor. In fact you dont need to use it. Please use Audio::File which will call the appropriate constructor corresponding to the files type.

init

This method will be called by the constructor. Its empty by default and should be overwritten by inheriting subclasses to initialize themselfes.

name

Returns the name of the audio file.

is_readable

Checks whether the file is readable or not. At the moment its only used by the constructor, but it will be more usefull with later versions of Audio::File.

is_writeable

Checks whether the file is writeable or not. At the moment youll probably dont need to call this method, but itll be more usefull as soon as changing the audio file is implemented.

tag

Returns a reference to the files tag object. See the documentation of Audio::File::Tag to learn about what the tag object does.

audio_properties

Returns a reference to the files audio properties object. See the documentation of Audio::File::AudioProperties to get information about what the audio properties object does.

save

Saves the audio file. This is not yet implemented but it should remember me to do it at some time..

type

Returns the files type.

<<less
Download (0.073MB)
Added: 2006-06-19 License: Perl Artistic License Price:
1222 downloads
HTTP Server type 1.2.3

HTTP Server type 1.2.3


httptype is a program that returns the http host software of a website. more>>
httptype is a program that returns the http host software of a website. It is written in Perl.
httptype reads a list of http hosts and optionally the port number for each of these. It queries each host, displaying the type of HTTP server running on that host. It reads the http_proxy and no_proxy environment variables to determine whether to use a proxy or not.
httptype reads a list of http servers and, optionally, the port number for each of these. It then queries each of the hosts and displays the HTTP server software of the host.
Input may be read from a host file if specified using the --hosts switch:
httptype --hosts [hostfile]
If hostfile is omitted or `-, httptype reads from standard input. See Format of host file for more info.
A single host may be queried by passing its name on the command line:
httptype host [port]
If port is omitted, 80 is used.
If no host file is specified through the --hosts file and no host is specified on the command line, httptype will read the list from standard input. See Format of host file for more info.
httptype will read the http_proxy environment variable and try to determine if a proxy server is being used. This setting may be overridden using the --proxy switch:
httptype --proxy proxyhost[:proxyport]
If proxyport is omitted, 80 is used.
If the proxy server is `none, no proxy is used. This is typically used to prevent httptype from using the proxy server specified by http_proxy. The --noproxy switch can be used to achieve the same.
Additionally, you may use the no_proxy environment variable to specify a comma delimited list of hosts for which httptype should not use the proxy. If httptype comes across any of these hosts, it will make a direct connection to them.
Enhancements:
- made 1.3.8 stable and renamed to 1.2.3
<<less
Download (0.014MB)
Added: 2006-07-11 License: GPL (GNU General Public License) Price:
1203 downloads
Data::Type::Docs 0.01.15

Data::Type::Docs 0.01.15


Data::Type::Docs is a Perl module with the manual overview. more>>
Data::Type::Docs is a Perl module with the manual overview.

MANUALS

Data::Type::Docs::FAQ

Frequently asked questions.

Data::Type::Docs::FOP

Frequently occuring problems.

Data::Type::Docs::Howto

Point to point recipes how to get things done.

Data::Type::Docs::RFC

Exact API description. Startpoint for datatype developers.

NAVIGATION

First read the following paragraphs and then you may start study the Data::Type API.

<<less
Download (0.069MB)
Added: 2006-10-12 License: Perl Artistic License Price:
1107 downloads
File::Type::Builder 0.22

File::Type::Builder 0.22


File::Type::Builder is Perl module to parse mime-magic and generate code. more>>
File::Type::Builder is Perl module to parse mime-magic and generate code.

SYNOPSIS

my $build = File::Type::Builder->new();

while ( ) {
chomp;
my $parsed = $build->parse_magic($_);

my $code = $build->string_start($parsed);
(or string_offset or beshort)
}

Reads in the mime-magic file format and translates it to code. (This documentation would be longer if I really expected anyone other than me to run the code.)

<<less
Download (0.15MB)
Added: 2006-11-17 License: Perl Artistic License Price:
1071 downloads
Force Content-Type 1.2.1

Force Content-Type 1.2.1


Force Content-Type is an extension used to force the Content-Type of URLs. more>>
Force Content-Type is an extension used to force the Content-Type of URLs.

Its useful to avoid the tag soup when you are developing a XHTML webpage and want Firefox to use its internal XML parser. If the webserver is not correctly configured, it will serve the page with a text/html Content-Type (a tag soup), instead of sending it as application/xhtml+xml, and therefore avoiding Firefox to treat the page as pure XML.

Force Content-Type allows you to define the Content-Type of some URLs (using Regular Expressions), overriding the webservers incorrect Content-Type.

Supported locales:
- Basque
- English
- Spanish

<<less
Download (0.035MB)
Added: 2007-04-03 License: MPL (Mozilla Public License) Price:
951 downloads
File type determination 0.9

File type determination 0.9


File type determination is a little KDE Service Menu that calls the GNU file command to retrieve Mime information from files. more>>
File type determination is a little KDE Service Menu that calls the GNU file command to retrieve Mime information from files, and presents it inside a standard KDE dialog.

<<less
Download (MB)
Added: 2006-09-13 License: GPL (GNU General Public License) Price:
1138 downloads
Tangram::Type::Extending 2.10

Tangram::Type::Extending 2.10


Tangram::Type::Extending is a Perl module for teaching Tangram about new types. more>>
Tangram::Type::Extending is a Perl module for teaching Tangram about new types.

Tangram::Type is the root of a hierarchy of classes that are responsible mapping individual field to SQL entities (columns in the simplest cases). There is one Type object per persistent field.
Adding support for new types amounts to adding subclasses to Tangram::Type.

WRITING NEW TYPES

Tangram is organized in several subsystems, described below.

Schema is the repository for information about all the persistent aspects of a system: classes, inheritance relationships, fields, etc. It also contains graph-traversal algorithms, which are not currently documented.

Storage deals with objects as a whole: insertion, updating, multiple load detection, cycle handling, transactions, connections. It also serves as an entry point in the system. Storage does not manipulate fields directly.

Cursor deals with polymorphic retrieval of objects. It builds SELECT statements on the basis of the information in the hash. Cursor does not manipulate fields directly either.

The Type hierarchy deals with individual fields, and not with entire objects. More about it in a moment.

The Expr hierarchy deals with entities on the remote side; this includes expressions proper, Filters and Remotes.

Types are responsible for performing the mapping between a field of a given Perl type and a relational entity. The simplest Types merely transfer between one Perl field and one column. Sometimes it makes sense to have several mappings (and hence several Types) for the same Perl type; for example, Perl arrays can be mapped either using a link table, or one or several columns that live on the elements table.

Users dont deal with Type objects directly: they indicate that a series of fields should be mapped in a certain way by putting the fields under a given typetag in the field hash. The type registers itself with Tangram by adding a typetag in the %Tangram::Schema::TYPES hash. The value is the Type object. Up to now all Types have been singletons, but this is not a rule.

Anybody whos planning to write new Types should examine Scalar.pm first. It contains very simple mappings between one field and one column.

A Type must implement the methods described below. Keep the following facts in mind while reading further:

1. A Type is responsible for transfering all the *direct* fields for a given *class*. This excludes inherited fields. OTOH, the same Type can be called more than once for the same object, because the same Type may be used in several classes that appear in a particular objects inheritance graph.

<<less
Download (0.15MB)
Added: 2006-09-22 License: Perl Artistic License Price:
1128 downloads
XML::Schema::Type::Simple 0.07

XML::Schema::Type::Simple 0.07


XML::Schema::Type::Simple is a base class for simple XML Schema datatypes. more>>
XML::Schema::Type::Simple is a base class for simple XML Schema datatypes.

SYNOPSIS

package XML::Schema::Type::whatever;
use base qw( XML::Schema::Type::Simple );
use vars qw( @FACETS );

@FACETS = (
minLength => 10,
maxLength => 30,
otherFacet => {
value => $n,
fixed => 1,
annotation => "a comment",
},
);

package main;

my $type = XML::Schema::Type::whatever->new()
|| die XML::Schema::Type::whatever->error();

my $item = $type->instance(some instance value)
|| die $type->error();

# NOTE: some issues still to resolve on the precise
# nature and structure of instances (currently hash ref).
print $item->{ value };

The XML::Schema::Type::Simple module is a base class for objects that represent XML Schema simple types.

<<less
Download (0.14MB)
Added: 2006-09-06 License: Perl Artistic License Price:
1143 downloads
Java::JCR::Nodetype 0.08

Java::JCR::Nodetype 0.08


Java::JCR::Nodetype is a Perl module that can load the JCR node type class wrappers. more>>
Java::JCR::Nodetype is a Perl module that can load the JCR node type class wrappers.

SYNOPSIS

use Java::JCR::Nodetype;

This loads the Perl classes mapped to the javax.jcr.nodetype package.
You might notice the odd letter case of this package differs from that of the node type class (Java::JCR::Nodetype::NodeType). This has to do with the way the package was imported. This may be corrected in the future.

<<less
Download (0.047MB)
Added: 2007-06-05 License: Perl Artistic License Price:
871 downloads
Tk_CreateItemType 804.027

Tk_CreateItemType 804.027


Tk_CreateItemType is a Perl module that define new kind of canvas item. more>>
Tk_CreateItemType is a Perl module that define new kind of canvas item.

SYNOPSIS

#include

Tk_CreateItemType(typePtr)

Tk_ItemType * Tk_GetItemTypes()

ARGUMENTS

Tk_ItemType *typePtr (in)

Structure that defines the new type of canvas item.

INTRODUCTION

Tk_CreateItemType is invoked to define a new kind of canvas item described by the typePtr argument. An item type corresponds to a particular value of the type argument to the create method for canvases, and the code that implements a canvas item type is called a type manager. Tk defines several built-in item types, such as rectangle and text and image, but Tk_CreateItemType allows additional item types to be defined. Once Tk_CreateItemType returns, the new item type may be used in new or existing canvas widgets just like the built-in item types.
Tk_GetItemTypes returns a pointer to the first in the list of all item types currently defined for canvases. The entries in the list are linked together through their nextPtr fields, with the end of the list marked by a NULL nextPtr.

You may find it easier to understand the rest of this manual entry by looking at the code for an existing canvas item type such as bitmap (file tkCanvBmap.c) or text (tkCanvText.c). The easiest way to create a new type manager is to copy the code for an existing type and modify it for the new type.

Tk provides a number of utility procedures for the use of canvas type managers, such as Tk_CanvasCoords and Tk_CanvasPsColor; these are described in separate manual entries.

DATA STRUCTURES

A type manager consists of a collection of procedures that provide a standard set of operations on items of that type. The type manager deals with three kinds of data structures. The first data structure is a Tk_ItemType; it contains information such as the name of the type and pointers to the standard procedures implemented by the type manager:

typedef struct Tk_ItemType {
char *name;
int itemSize;
Tk_ItemCreateProc *createProc;
Tk_ConfigSpec *configSpecs;
Tk_ItemConfigureProc *configProc;
Tk_ItemCoordProc *coordProc;
Tk_ItemDeleteProc *deleteProc;
Tk_ItemDisplayProc *displayProc;
int alwaysRedraw;
Tk_ItemPointProc *pointProc;
Tk_ItemAreaProc *areaProc;
Tk_ItemPostscriptProc *postscriptProc;
Tk_ItemScaleProc *scaleProc;
Tk_ItemTranslateProc *translateProc;
Tk_ItemIndexProc *indexProc;
Tk_ItemCursorProc *icursorProc;
Tk_ItemSelectionProc *selectionProc;
Tk_ItemInsertProc *insertProc;
Tk_ItemDCharsProc *dCharsProc;
Tk_ItemType *nextPtr;
} Tk_ItemType;

The fields of a Tk_ItemType structure are described in more detail later in this manual entry. When Tk_CreateItemType is called, its typePtr argument must point to a structure with all of the fields initialized except nextPtr, which Tk sets to link all the types together into a list. The structure must be in permanent memory (either statically allocated or dynamically allocated but never freed); Tk retains a pointer to this structure.

The second data structure manipulated by a type manager is an item record. For each item in a canvas there exists one item record. All of the items of a given type generally have item records with the same structure, but different types usually have different formats for their item records. The first part of each item record is a header with a standard structure defined by Tk via the type Tk_Item; the rest of the item record is defined by the type manager. A type manager must define its item records with a Tk_Item as the first field. For example, the item record for bitmap items is defined as follows:

typedef struct BitmapItem {
Tk_Item header;
double x, y;
Tk_Anchor anchor;
Pixmap bitmap;
XColor *fgColor;
XColor *bgColor;
GC gc;
} BitmapItem;

The header substructure contains information used by Tk to manage the item, such as its identifier, its tags, its type, and its bounding box. The fields starting with x belong to the type manager: Tk will never read or write them. The type manager should not need to read or write any of the fields in the header except for four fields whose names are x1, y1, x2, and y2. These fields give a bounding box for the items using integer canvas coordinates: the item should not cover any pixels with x-coordinate lower than x1 or y-coordinate lower than y1, nor should it cover any pixels with x-coordinate greater than or equal to x2 or y-coordinate greater than or equal to y2. It is up to the type manager to keep the bounding box up to date as the item is moved and reconfigured.

Whenever Tk calls a procedure in a type manager it passes in a pointer to an item record. The argument is always passed as a pointer to a Tk_Item; the type manager will typically cast this into a pointer to its own specific type, such as BitmapItem.

The third data structure used by type managers has type Tk_Canvas; it serves as an opaque handle for the canvas widget as a whole. Type managers need not know anything about the contents of this structure. A Tk_Canvas handle is typically passed in to the procedures of a type manager, and the type manager can pass the handle back to library procedures such as Tk_CanvasTkwin to fetch information about the canvas.

name

This section and the ones that follow describe each of the fields in a Tk_ItemType structure in detail. The name field provides a string name for the item type. Once Tk_CreateImageType returns, this name may be used in create methods to create items of the new type. If there already existed an item type by this name then the new item type replaces the old one.

itemSize

typePtr->itemSize gives the size in bytes of item records of this type, including the Tk_Item header. Tk uses this size to allocate memory space for items of the type. All of the item records for a given type must have the same size. If variable length fields are needed for an item (such as a list of points for a polygon), the type manager can allocate a separate object of variable length and keep a pointer to it in the item record.

<<less
Download (5.7MB)
Added: 2007-07-10 License: Perl Artistic License Price:
837 downloads
Object::Relation::Meta::Type 0.1.0

Object::Relation::Meta::Type 0.1.0


Object::Relation::Meta::Type is an Object::Relation Data type validation and accessor building. more>>
Object::Relation::Meta::Type is an Object::Relation Data type validation and accessor building.

Synopsis

Object::Relation::Meta::Type->add(
key => "state",
name => "State",
builder => Object::Relation::Meta::AccessorBuilder,
raw => sub { ref $_[0] ? shift->value : shift },
store_raw => sub { shift->store_value },
check => sub {
UNIVERSAL::isa($_[0], Object::Relation::DataType::State)
or throw_invalid([Value "[_1]" is not a valid [_2] object,
$_[0], Object::Relation::DataType::State]);
throw_invalid([Cannot assign permanent state])
if $_[0] == Object::Relation::DataType::State->PERMANENT;
}
);

This class subclasses Class::Meta::Type to provide additional attributes. These attributes can optionally be set via the call to new(), and may be fetched via their accessors.

<<less
Download (0.23MB)
Added: 2006-09-02 License: Perl Artistic License Price:
1149 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 5
  • 1
  • 2
  • 3
  • 4
  • 5