[29002] in Perl-Users-Digest
Perl-Users Digest, Issue: 246 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 21 03:10:08 2007
Date: Wed, 21 Mar 2007 00:09:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 21 Mar 2007 Volume: 11 Number: 246
Today's topics:
[ANNOUNCE] Emacs modules for Perl programming (Jari Aalto+mail.perl)
crontab -e doesnt seem to work mihirshirali@gmail.com
Re: crontab -e doesnt seem to work <kkeller-usenet@wombat.san-francisco.ca.us>
Re: crontab -e doesnt seem to work mihirshirali@gmail.com
How to print on the special table cell column? <robertchen117@gmail.com>
Re: How to print on the special table cell column? krakle@gmail.com
new CPAN modules on Wed Mar 21 2007 (Randal Schwartz)
On Java's Interface (the meaning of interface in comput <xah@xahlee.org>
Re: On Java's Interface (the meaning of interface in co <bbxx789_05ss@yahoo.com>
Re: Perl/CGI file upload <stoupa@practisoft.cz>
Re: Problem with flock <ben@morrow.me.uk>
Re: Problem with flock <fred4414@nethere.com>
Re: Problem with flock <fred4414@nethere.com>
Re: Server/Clients system (Jamie)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 21 Mar 2007 04:26:39 GMT
From: <jari.aalto@poboxes.com> (Jari Aalto+mail.perl)
Subject: [ANNOUNCE] Emacs modules for Perl programming
Message-Id: <perl-faq/emacs-lisp-modules_1174451173@rtfm.mit.edu>
Archive-name: perl-faq/emacs-lisp-modules
Posting-Frequency: 2 times a month
Maintainer: Jari Aalto A T cante net
Announcement: "What Emacs lisp modules can help with programming Perl"
Preface
Emacs is your friend if you have to do anything comcerning software
development: It offers plug-in modules, written in Emacs lisp
(elisp) language, that makes all your programmings wishes come
true. Please introduce yourself to Emacs and your programming era
will get a new light.
Where to find Emacs/XEmacs
o Unix:
http://www.gnu.org/software/emacs/emacs.html
http://www.xemacs.org/
o Unix Windows port (for Unix die-hards):
install http://www.cygwin.com/ which includes native Emacs 21.x.
and XEmacs port
o Pure Native Windows port
http://www.gnu.org/software/emacs/windows/ntemacs.html
ftp://ftp.xemacs.org/pub/xemacs/windows/setup.exe
o More Emacs resources at
http://tiny-tools.sourceforge.net/ => Emacs resource page
Emacs Perl Modules
Cperl -- Perl programming mode
http://math.berkeley.edu/~ilya/software/emacs/
by Ilya Zakharevich
CPerl is major mode for editing perl files. Also included in
latest Emacs, but newest version is at Ilya's site. Note that
the directrory at CPAN is out of date:
http://www.cpan.org/modules/by-authors/id/ILYAZ/cperl-mode/
Compared to default `perl-mode' that comes with Emacs, this
one has more features.
TinyPerl -- Perl related utilities
http://tiny-tools.sourceforge.net/
If you ever wonder how to deal with Perl POD pages or how to find
documentation from all perl manpages, this package is for you.
Couple of keystrokes and all the documentaion is in your hands.
o Instant function help: See documentation of `shift', `pop'...
o Show Perl manual pages in *pod* buffer
o Grep through all Perl manpages (.pod)
o Follow POD references e.g. [perlre] to next pod with RETURN
o Coloured pod pages with `font-lock'
o Separate `tiperl-pod-view-mode' for jumping topics and pages
forward and backward in *pod* buffer.
o Update `$VERSION' variable with YYYY.MMDD on save.
o Load source code into Emacs, like Devel::DProf.pm
o Prepare script (version numbering) and Upload it to PAUSE
o Generate autoload STUBS (Devel::SelfStubber) for you
Perl Module (.pm)
TinyIgrep -- Perl Code browsing and easy grepping
[TinyIgrep is included in Tiny Tools Kit]
To grep from all installed Perl modules, define database to
TinyIgrep. There is example file emacs-rc-tinyigrep.el that shows
how to set up dattabases for Perl5, Perl4 whatever you have
installed
TinyIgrep calls Igrep.el to to do the search, You can adjust
recursive grep options, set search case sensitivity, add user grep
options etc.
You can find latest `igrep.el' module at
<http://groups.google.com/groups?group=gnu.emacs.sources> The
maintainer is Jefin Rodgers <kevinr@ihs.com>.
TinyCompile -- To Browse grep results in Emacs *compile* buffer
TinyCompile is a minor mode for *compile* buffer from where
you can collapse unwanted lines or shorten file URLs:
/asd/asd/asd/asd/ads/as/da/sd/as/as/asd/file1:NNN: MATCHED TEXT
/asd/asd/asd/asd/ads/as/da/sd/as/as/asd/file2:NNN: MATCHED TEXT
-->
cd /asd/asd/asd/asd/ads/as/da/sd/as/as/asd/
file1:NNN: MATCHED TEXT
file1:NNN: MATCHED TEXT
End
------------------------------
Date: 20 Mar 2007 21:40:01 -0700
From: mihirshirali@gmail.com
Subject: crontab -e doesnt seem to work
Message-Id: <1174452001.739525.122460@d57g2000hsg.googlegroups.com>
Hi,
I have been using crontab for a while now... but needed edit the
existing job in cron...
However heres the issue..
If I issue crontab -e, the temp file which allows the input doesnt
seem to be opening. Though crontab -l indicates the current job; the -
e option doesnt open the file
<snips>
crontab -l
00 20 * * * /auto/tftpboot-users/mshirali/MDDTS/query1.mshirali
However now crontab -e wont let me do any editing.. I see the
following when I issue it:
crontab -e
65
?
?
<snips>
Any help will be appreciated
------------------------------
Date: Tue, 20 Mar 2007 21:46:38 -0700
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: crontab -e doesnt seem to work
Message-Id: <eup6d4xt8t.ln2@goaway.wombat.san-francisco.ca.us>
On 2007-03-21, mihirshirali@gmail.com <mihirshirali@gmail.com> wrote:
>
> If I issue crontab -e, the temp file which allows the input doesnt
> seem to be opening. Though crontab -l indicates the current job; the -
> e option doesnt open the file
This is way offtopic for comp.lang.perl.misc. If this is linux, try one
of the linux newsgroups.
--keith
--
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
------------------------------
Date: 20 Mar 2007 22:32:44 -0700
From: mihirshirali@gmail.com
Subject: Re: crontab -e doesnt seem to work
Message-Id: <1174455164.869879.182130@e1g2000hsg.googlegroups.com>
On Mar 21, 9:46 am, Keith Keller <kkeller-use...@wombat.san-
francisco.ca.us> wrote:
> On 2007-03-21, mihirshir...@gmail.com <mihirshir...@gmail.com> wrote:
>
>
>
> > If I issue crontab -e, the temp file which allows the input doesnt
> > seem to be opening. Though crontab -l indicates the current job; the -
> > e option doesnt open the file
>
> This is way offtopic for comp.lang.perl.misc. If this is linux, try one
> of the linux newsgroups.
>
> --keith
>
> --
> kkeller-use...@wombat.san-francisco.ca.us
> (try just my userid to email me)
> AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
> see X- headers for PGP signature information
Ok.. tx for the help neways
------------------------------
Date: 20 Mar 2007 20:33:09 -0700
From: "robertchen117@gmail.com" <robertchen117@gmail.com>
Subject: How to print on the special table cell column?
Message-Id: <1174447988.995969.133790@b75g2000hsg.googlegroups.com>
my $cgi = new CGI;
print $cgi->start_table({-border=>0});
print "<tr align=\"left\">";
print $cgi->th('Sunday');
print $cgi->th('Monday');
print $cgi->th('Tuesday');
print $cgi->th('Wensday');
print $cgi->th('Thursday');
print $cgi->th('Friday');
print $cgi->th('Saturday');
Now I have a date, say "0320/2007", How could I print on the
"'Tuesday" column cell?
$cgi->td could do this? If not, how could I do?
Thanks.
------------------------------
Date: 20 Mar 2007 21:42:01 -0700
From: krakle@gmail.com
Subject: Re: How to print on the special table cell column?
Message-Id: <1174452121.796494.88320@e1g2000hsg.googlegroups.com>
On Mar 20, 9:33 pm, "robertchen...@gmail.com"
<robertchen...@gmail.com> wrote:
> my $cgi = new CGI;
> print $cgi->start_table({-border=>0});
> print "<tr align=\"left\">";
> print $cgi->th('Sunday');
If you're going to use CGI.pm to generate an HTML table why would you
manually write out 1 line of HTML?
Also, if you KNOW HTML whats the point of limiting yourself with
CGI.pm to output the HTML...
CGI.pm for HTML seemed like a good idea in 1997 for those Perl
programmers who consider HTML greek but to use it now for that reason
is ridiculous to me...
Technically, this is an HTML question that just happens to rely on
CGI.pm... Write out your HTML...
------------------------------
Date: Wed, 21 Mar 2007 04:42:23 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Wed Mar 21 2007
Message-Id: <JF8L2n.LIG@zorch.sf-bay.org>
The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN). You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.
AI-Categorizer-0.08
http://search.cpan.org/~kwilliams/AI-Categorizer-0.08/
Automatic Text Categorization
----
Algorithm-Merge-0.06
http://search.cpan.org/~jsmith/Algorithm-Merge-0.06/
Three-way merge and diff
----
Apache-AxKit-Plugin-NotFoundIfPathInfo-1.01
http://search.cpan.org/~zeya/Apache-AxKit-Plugin-NotFoundIfPathInfo-1.01/
return 404 (NOT FOUND) if PATH_INFO is present.
----
Astro-SIMBAD-Client-0.006
http://search.cpan.org/~wyant/Astro-SIMBAD-Client-0.006/
Fetch astronomical data from SIMBAD 4.
----
Audio-MPD-0.15.2
http://search.cpan.org/~jquelin/Audio-MPD-0.15.2/
Class for talking to MPD (Music Player Daemon) servers
----
DBIx-Perlish-0.22
http://search.cpan.org/~gruber/DBIx-Perlish-0.22/
a perlish interface to SQL databases
----
Data-Template-0.0005
http://search.cpan.org/~ferreira/Data-Template-0.0005/
Generate data structures from templates
----
Data-YAML-0.0.5
http://search.cpan.org/~andya/Data-YAML-0.0.5/
Easy YAML serialisation of Perl data structures
----
DateTime-TimeZone-0.63
http://search.cpan.org/~drolsky/DateTime-TimeZone-0.63/
Time zone object base class and factory
----
Email-ARF-0.000
http://search.cpan.org/~rjbs/Email-ARF-0.000/
abuse report format (placeholder module)
----
Email-MIME-1.859
http://search.cpan.org/~rjbs/Email-MIME-1.859/
Easy MIME message parsing.
----
Email-Simple-1.999
http://search.cpan.org/~rjbs/Email-Simple-1.999/
Simple parsing of RFC2822 message format and headers
----
JSON-DWIW-0.03
http://search.cpan.org/~dowens/JSON-DWIW-0.03/
JSON converter that Does What I Want
----
MasonX-StaticBuilder-0.03
http://search.cpan.org/~skud/MasonX-StaticBuilder-0.03/
Build a static website from Mason components
----
Net-Twitter-1.03
http://search.cpan.org/~cthom/Net-Twitter-1.03/
Perl interface to twitter.com
----
Net-sFlow-0.06
http://search.cpan.org/~elisa/Net-sFlow-0.06/
decode sFlow datagrams
----
Object-Tiny-1.00
http://search.cpan.org/~adamk/Object-Tiny-1.00/
Class building as simple as it gets
----
Perl-Critic-1.05
http://search.cpan.org/~thaljef/Perl-Critic-1.05/
Critique Perl source code for best-practices
----
Pod-WikiDoc-0.17
http://search.cpan.org/~dagolden/Pod-WikiDoc-0.17/
Generate Pod from inline wiki style text
----
ProgressMonitor-0.02
http://search.cpan.org/~knth/ProgressMonitor-0.02/
a flexible and configurable framework for providing feedback on how a long-running task is proceeding.
----
SNMP-Trapinfo-1.0
http://search.cpan.org/~tonvoon/SNMP-Trapinfo-1.0/
Read and process an SNMP trap from Net-SNMP's snmptrapd
----
SWF-Builder-0.16
http://search.cpan.org/~ysas/SWF-Builder-0.16/
Create SWF movie.
----
Template-Plugin-CSV-0.03
http://search.cpan.org/~gugod/Template-Plugin-CSV-0.03/
Plugin for generating CSV
----
Template-Provider-Markdown-0.02
http://search.cpan.org/~gugod/Template-Provider-Markdown-0.02/
Markdown as template body, no HTML.
----
Term-HiliteDiff-0.02
http://search.cpan.org/~jjore/Term-HiliteDiff-0.02/
Highlights differences in text with ANSI escape codes
----
Term-HiliteDiff-0.03
http://search.cpan.org/~jjore/Term-HiliteDiff-0.03/
Highlights differences in text with ANSI escape codes
----
Tie-FileSystem-2.13
http://search.cpan.org/~initdotd/Tie-FileSystem-2.13/
Access file system via a Perl hash
----
Tie-FileSystem-2.14
http://search.cpan.org/~initdotd/Tie-FileSystem-2.14/
Access file system via a Perl hash
----
Tie-FileSystem-2.15
http://search.cpan.org/~initdotd/Tie-FileSystem-2.15/
Access file system via a Perl hash
----
WWW-Mechanize-Sleepy-0.6
http://search.cpan.org/~esummers/WWW-Mechanize-Sleepy-0.6/
A Sleepy Mechanize Agent
----
XML-Compile-0.17
http://search.cpan.org/~markov/XML-Compile-0.17/
Compilation based XML processing
----
Yahoo-Search-1.10.13
http://search.cpan.org/~jfriedl/Yahoo-Search-1.10.13/
Perl interface to the Yahoo! Search public API.
----
Yahoo-Search-1.9.12
http://search.cpan.org/~jfriedl/Yahoo-Search-1.9.12/
Perl interface to the Yahoo! Search public API.
----
mixin-0.05
http://search.cpan.org/~mschwern/mixin-0.05/
Mix-in inheritance, an alternative to multiple inheritance
----
sapnwrfc-0.09
http://search.cpan.org/~piers/sapnwrfc-0.09/
SAP Netweaver RFC support for Perl
----
sapnwrfc-0.10
http://search.cpan.org/~piers/sapnwrfc-0.10/
SAP Netweaver RFC support for Perl
----
sapnwrfc-0.11
http://search.cpan.org/~piers/sapnwrfc-0.11/
SAP Netweaver RFC support for Perl
If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.
This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
http://www.stonehenge.com/merlyn/LinuxMag/col82.html
print "Just another Perl hacker," # the original
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: 20 Mar 2007 22:23:56 -0700
From: "Xah Lee" <xah@xahlee.org>
Subject: On Java's Interface (the meaning of interface in computer programing)
Message-Id: <1174454636.100363.196640@l77g2000hsb.googlegroups.com>
On Java's Interface
Xah Lee, 20050223
In Java the language, there's this a keyword =E2=80=9Cinterface=E2=80=9D.
In a functional language, a function can be specified by its name and
parameter specs. For example:
f(3)
f(3, [9,2])
f("some string")
are usage examples of 3 functions all having the same name, but having
different number and type of arguments. In this way, a function is
essentially known to outsiders by its name and parameter specs. The
gist in this concept is that the user don't need to know the
implementation details of the function. All she needs to know is the
function's name, and parameter specs and return value spec. (and of
course what the function is supposed to do.) In this way, interface
and implementation are separated. The implementation can change or
improve anytime, and users don't need to know.
In Java, the above concept of function name and parameter spec is
called a method's signature.
For another example, usually a program needs to talk to another
software such as a database software. The database software may have a
set of functions for the purpose of communicating to other software.
In essence, making the database useful to other software. Such a list
of function spec is often called API, which stands for Application
Programing Interface.
The API terminology is abused by the marketing-loving Sun Microsystems
by calling the Java language's documentation as =E2=80=9CThe Java API=E2=80=
=9D, even
though Java the language and its paraphernalia of libraries and
hardware-emulation system (all together jargonized as =E2=80=9Cthe Java
Platform=E2=80=9D) isn't a Application nor Interface. (a API implies that
there are two disparate entities involved, which are allowed to
communicate thru it. In the case of =E2=80=9CThe Java API=E2=80=9D, it's on=
e entity
talking to itself.).
In general, the interface concept in programing is a sort of
specification that allows different entities to call and make use of
the other, with the implication that the caller need not know what's
behind the facade.
In the Object Oriented Programing Paradigm, a new concept arose, that
is the =E2=80=9Cinterface=E2=80=9D aspect of a class.
As we've seen, a function has parameter spec that is all there it is a
user needs to know for using it. In Java, this is the method's
=E2=80=9Csignature=E2=80=9D. Now, as the methodology of the OOP experience =
multiplies,
it became apparent that the interface concept can be applied to
Classes as well. Specifically: the interface of a class is the class's
methods.
This concept is then turned into a OOP machinery, in hope of
extracting usefulness in software engineering. That is to say, now in
the Java language, a programer can actually write a piece of code,
whose sole purpose is to define what methods and variables a class
contains. This, is done with the keyword =E2=80=9Cinterface=E2=80=9D. Once =
a interface
is defined, other classes can say which interfaces they implement, so
that if class C implement interface I, then programers don't need to
know the details about C. All they need to know is the interface I.
(which specifies all the methods, constructors, variables, a class
must have.)
(the Java's interface, is essentially the =E2=80=9Csignature=E2=80=9D of a =
class, in
Java's own jargon.)
A programer may ask, what's the big deal anyway? Since in Java,
classes are well documented anyway. What difference does it make to
know the documentation of C versus the documentation of interface for
C?
The thing about interface in Java is that the complexity grows. A Java
interface, can be inherited, just as classes. The idea is that
interfaces can also form a hierarchy just like classes.
In pure OOP such as Java, the object entities used to solve computing
problems are thought to form a relation as of a tree, thus we have the
class hierarchy. In a similar way, it is thought that interface, can
also form a hierarchy fruitfully. A good example is the list data
type. The explanation follows.
In computing languages, often there's a data concept variously known
as lists, aggregate, sequences, array, vector, tuple, set, matrix,
trees... The basic idea is that it is just a list of things. This list
may not allow repetitions, elements may be lists themselves, may have
certain dimension stipulations (e.g. matrix), may have certain
computational properties such as speed of retrieving a element or
adding a element or memory footprint... etc and so on. Different
requirement and different computational properties have given them
various names to go by. One can however organize them by the interface
perspective. In Java, they are known as Collection, and all have the
interface of Collection. (See http://java.sun.com/j2se/1.5.0/docs/api/java/=
util/Collection.html
http://java.sun.com/docs/books/tutorial/collections/interfaces/index.html
)
Consider a Set and List. One does not allow repetitions, while the
other allows. Other than that, both concepts are the same. They both
need methods like adding elements, deleting, inserting, sorting etc.
Therefore, from interface point of view, they share a parent. In Java,
both Set and List are interfaces, inherited from the parent interface
Collection.
So now, in Java, we have two hierarchies of separate category: Classes
and Interfaces. The Classes hierarchy is one single giant tree.
However, the interfaces are not all together as one tree. They are
more like forests, of many trees. It is important to remember that
interfaces and classes are separate entities. A class can implement a
interface. A interface can never inherit from a class.
In Java, it so happens that a class can implement more than one
interfaces. When a class C implements interfaces I1 and I2, C is
guaranteed to have all methods declared by interface I1 and I2. For
example, in Java, class Integer has interfaces Comparable and
Serializable. And the class ArrayList has these interfaces: Cloneable,
Collection, List, RandomAccess, Serializable.
The interface in Java, from a simple useful idea, has mutated into a
incomprehensible complexity.
In Java, Interface is no longer the sole thing a programer needs to
know about a class or function. It is no longer a concept that
separates a function's user spec from implementation detail.
For example, the ArrayList class has these interfaces: Cloneable,
Collection:List, RandomAccess, Serializable. As one can infer from the
names, they are more about what properties ArrayList has, than a
syntax facade that hides implementation irrelevances.
For example, see the Java documentation on these interfaces: =E2=80=A2
interface RandomAccess http://java.sun.com/j2se/1.5.0/docs/api/java/util/Ra=
ndomAccess.html
=E2=80=A2 interface Serializable http://java.sun.com/j2se/1.5.0/docs/api/ja=
va/io/Serializable.html
=E2=80=A2 interface Comparable http://java.sun.com/j2se/1.5.0/docs/api/java=
/lang/Comparable.html
One can see that these =E2=80=9Cinterfaces=E2=80=9D are really not interfac=
e in
nature, but properties. One might ask, in =E2=80=9Cinterfaces=E2=80=9D such=
as
RandomAccess that doesn't have a single variable or method, in what
technical definition that a class is said to satisfy such interfaces?
And, given the existence of these property-like interfaces, can a
programer define their own arbitrary computational property contract?
For example, suppose i want a property ConstantTime for the classes in
game i'm developing. Once i declared a class to have =E2=80=9Cinterface=E2=
=80=9D
ConstantTime, apparently my class is not going to magically become
constant time. How do i define arbitrary properties to the compiler,
and how's the compiler going to check? The following are the answers.
20050224
Java's Interface has mutated so much from the interface concept that
it also functions as a pure label. If a interface does not have any
variables or methods, any class can declare it as a interface. There
is no restraint whatsoever. For example, the RandomAccess interface in
Java does not have any variables or methods. Any class can declare it
as a interface, randomly accessible or not. When interface is used as
a label, it is called a =E2=80=9Cmarker interface=E2=80=9D by the Java docu=
mentation.
For example, see http://java.sun.com/j2se/1.5.0/docs/api/java/util/RandomAc=
cess.html
Because the multi-inheritance nature of Java interface, and its double
role as a label, it no longer function as a communication facade that
is the meaning of interface. If a Java class have interfaces A, B, C,
D, E, one cannot be sure just exactly what methods or variables the
class have. (it will be a union of them, and some of them do not serve
any function with respect to the language.) Further, using interface
as a inert label to indicate computational properties (e.g.
RandomAccess) is a egregious incompetence in the design of a language
for computation. The gist of the problem is that it is a piece of
mathematical irrelevance in the language. As a labeling mechanism in a
language, for the possible benefit from the software engineering
perspective, then it should not be designed as part of the Class
Interface, since labeling and programing interfaces are semantically
disparate.
On the Inanity of Standard Java Tutorials
The standard Java tutorials out there are often inane, in that none of
them actually tried to teach what the language actually manifestly do,
but instead, often talk in some purportedly good engineering
perspective.
For a incomprehensible metaphysical intro to interface using bicycle,
see this page of the Official Java Tutorial:
http://java.sun.com/docs/books/tutorial/java/concepts/interface.html.
For a more detailed account of Interface using baffling financial
stocks, see this page of the Official Java Tutorial:
http://java.sun.com/docs/books/tutorial/java/interpack/createinterface.html.
(the official Java Tutorial has went into major changes in 2006. For
the version of the above two pages, see local copy as of 2005
PS the official Java tutorial thru its update history has changed its
stance about what's a interface:
before 2005:
Definition: An interface is a named collection of method definitions
(without implementations). An interface can also declare constants.
sometimes after 200501:
Definition: An interface is a device that unrelated objects -- objects
that are not related by class hierarchy -- can use to interact with
each other. An object can implement multiple interfaces.
Complexer and complexer. Note its use of the word =E2=80=9Cdevice=E2=80=9D.
In its current incarnation (as of 2006-08-14) of the tutorial
http://java.sun.com/docs/books/tutorial/java/IandI/index.html,
interface is not particularly given a definition.
References:
Java lang spec, 2nd ed, 8.4.2 on Method Signature,
http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#386=
49
Official Java documentation page for 1.5.0, where it calls itself API.
http://java.sun.com/j2se/1.5.0/docs/api/overview-summary.html
------------
This post is archived at:
http://xahlee.org/java-a-day/interface.html
Xah
xah@xahlee.org
=E2=88=91 http://xahlee.org/
------------------------------
Date: 20 Mar 2007 22:33:33 -0700
From: "7stud" <bbxx789_05ss@yahoo.com>
Subject: Re: On Java's Interface (the meaning of interface in computer programing)
Message-Id: <1174455213.882489.222170@d57g2000hsg.googlegroups.com>
No.
------------------------------
Date: Wed, 21 Mar 2007 03:22:24 +0100
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: Re: Perl/CGI file upload
Message-Id: <etq661$2m1d$1@ns.felk.cvut.cz>
"Jerome" <gratemyl@gmail.com> píse v diskusním príspevku
news:1174422641.820361.60850@d57g2000hsg.googlegroups.com...
> On Mar 20, 8:37 pm, Joe Smith <j...@inwap.com> wrote:
>> Jerome wrote:
>> > The script needs to allow uploading any files from a form (without
>> > knowing the form structure in advance) - basically *any* files given
>> > to it.
>>
>> Why? Are you willing to accept totally random and inappropriate content?
>
> Yes
>
Maybe you can use read(<STDIN>) to read all data and parse these data
without using CGI module.
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)
------------------------------
Date: Wed, 21 Mar 2007 02:31:04 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Problem with flock
Message-Id: <80i6d4-v6f.ln1@osiris.mauzo.dyndns.org>
Quoth Fred Hare <fred4414@nethere.com>:
> Using Perl 5.6 and WinXP-SP2
> I have .eml newsgroup files from Seamonkey 1.1 which stay locked even
> when I close mail&news. I use Perl to rename and clean the .eml files,
> but this fails when they are locked by SM.
You can use the handle program from sysinternals.com to find which
process still has the file open. There may be a Perl module to do the
same thing: I don't know.
> I tried to unlock the .eml files using flock, but I get the error
> "can't unlock D:\aa\locked.eml:
> Unknown error at D:\aa\unlock.pl line 12."
You can't unlock a lock set by a different process. flock is failing
because *you* don't have a lock set.
> And if I try to lock an unlocked file (as test), I get no error, but the
> file stays unlocked.
Can you provide an example of this? I don't understand what you mean.
Ben
--
"If a book is worth reading when you are six, * ben@morrow.me.uk
it is worth reading when you are sixty." [C.S.Lewis]
------------------------------
Date: Tue, 20 Mar 2007 20:45:25 -0700
From: Fred Hare <fred4414@nethere.com>
Subject: Re: Problem with flock
Message-Id: <ZYadnZpv5-LLN53bRVnygQA@giganews.com>
Ben Morrow wrote:
> Quoth Fred Hare <fred4414@nethere.com>:
>> Using Perl 5.6 and WinXP-SP2
>> I have .eml newsgroup files from Seamonkey 1.1 which stay locked even
>> when I close mail&news. I use Perl to rename and clean the .eml files,
>> but this fails when they are locked by SM.
>
> You can use the handle program from sysinternals.com to find which
> process still has the file open. There may be a Perl module to do the
> same thing: I don't know.
>
Yes, I know. And it is even much easier with "Unlocker", Freeware from
http://ccollomb.free.fr/unlocker/ (v. 1.85, 195'645 Bytes). But I want
to do it with Perl...
>> I tried to unlock the .eml files using flock, but I get the error
>> "can't unlock D:\aa\locked.eml:
>> Unknown error at D:\aa\unlock.pl line 12."
>
> You can't unlock a lock set by a different process. flock is failing
> because *you* don't have a lock set.
>
That would explain why I cannot unlock with Perl. But it does not
explain why I cannot lock with Perl. Or does the lock only last while
Perl is running?
>> And if I try to lock an unlocked file (as test), I get no error, but the
>> file stays unlocked.
>
> Can you provide an example of this? I don't understand what you mean.
>
> Ben
>
Well, the sample is in the first part of the code in my original post,
where "NotLocked.txt" is a simple short textfile.
--
Fred
When using my email address, add the word "Trustme" anywhere on the
subject-line. Otherwise the message will be deleted on the server.
------------------------------
Date: Tue, 20 Mar 2007 21:01:36 -0700
From: Fred Hare <fred4414@nethere.com>
Subject: Re: Problem with flock
Message-Id: <h5adnbydLK6_M53bnZ2dnUVZ8qCqnZ2d@giganews.com>
Fred Hare wrote:
> Ben Morrow wrote:
>> Quoth Fred Hare <fred4414@nethere.com>:
>>> Using Perl 5.6 and WinXP-SP2
>>> I have .eml newsgroup files from Seamonkey 1.1 which stay locked even
>>> when I close mail&news. I use Perl to rename and clean the .eml files,
>>> but this fails when they are locked by SM.
>> You can use the handle program from sysinternals.com to find which
>> process still has the file open. There may be a Perl module to do the
>> same thing: I don't know.
>>
> Yes, I know. And it is even much easier with "Unlocker", Freeware from
> http://ccollomb.free.fr/unlocker/ (v. 1.85, 195'645 Bytes). But I want
> to do it with Perl...
>
>>> I tried to unlock the .eml files using flock, but I get the error
>>> "can't unlock D:\aa\locked.eml:
>>> Unknown error at D:\aa\unlock.pl line 12."
>> You can't unlock a lock set by a different process. flock is failing
>> because *you* don't have a lock set.
>>
> That would explain why I cannot unlock with Perl. But it does not
> explain why I cannot lock with Perl. Or does the lock only last while
> Perl is running?
>
OK, I added sleep (30) to the script and yes, the file is locked as long
as Perl is running ("NotLocked.txt" is a simple short textfile):
use strict ;
use warnings ;
use Fcntl qw(:DEFAULT :flock);
my $nl = 'D:\aa\NotLocked.txt' ;
open my $FH1, '<', $nl or die "Could not open $nl for reading: $!\n";
flock($FH1, LOCK_SH) or die "can't lock $nl: $!";
sleep (30) ;
close $FH1 ;
--
Fred
When using my email address, add the word "Trustme" anywhere on the
subject-line. Otherwise the message will be deleted on the server.
------------------------------
Date: Wed, 21 Mar 2007 01:21:04 GMT
From: nospam@geniegate.com (Jamie)
Subject: Re: Server/Clients system
Message-Id: <Lc117441854171240x8ba9668@pong.podro.com>
In <1174411250.275433.44030@p15g2000hsd.googlegroups.com>,
"deadpickle" <deadpickle@gmail.com> mentions:
> This is for a undergraduate project at my university. I'm thinking
>about using BitTorrent. I want this whole system to be autonomous and
>to make many transfers every minute, can BitTorrent do this?
Any reason for the central server?
One thing I would really like to do (alas, have no business model for it)
is to marry NNTP with podcasts and RSS.
So called "flooding protocol" is something I find quite amusing, and aside from
NNTP (AFAIK) isn't widely used anymore. Seems like it's almost always a central
master -> slave model, (mirrors, etc.. CPAN for example)
Having "NPTP" (Net Podcast Transfer Protocol? NRTP Net RSS Transfer Protocol?)
would be interesing because you could be introduced to podcasts you might not
otherwise have come into contact with. Unlike torrent, the local servers would
have expiration times, old podcasts would "scroll off" much as this article will.
Instead of newsgroups, you'd have "categories". Unlike master/slave mirror sites,
anyone could post a podcast. just as it is now for articles.
Could even arrange to have "discussion boards" wired in to regular NNTP. Wow, a
new technology.. NNTP! LOL
RSS is pretty much a "web only" thing though, the specs pretty much stipulate
all the URL's are for HTTP.
Like NNTP, the Path: header could be used to prevent redundant transfers.
Unlike NNTP, the enclosures and other RSS fields would have to be planned for
(possibly with delayed transfer/referral of enclosures)
No money, and I have a hard time seeing how someone would want to pay for it
(much less pay for the hardware and bandwidth) If I could find a practical
business model for what I just described, I'd be doing it. :-)
Jamie
--
http://www.geniegate.com Custom web programming
Perl * Java * UNIX User Management Solutions
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 246
**************************************