PERLEMBED
Section: Perl Programmers Reference Guide (1)Updated: 2009-04-22
Index Return to Main Contents
NAME
perlembed - how to embed perl in your C programDESCRIPTION
PREAMBLE
Do you want to:- Use C from Perl?
- Read perlxstut, perlxs, h2xs, perlguts, and perlapi.
- Use a Unix program from Perl?
- Read about back-quotes and about "system" and "exec" in perlfunc.
- Use Perl from Perl?
- Read about ``do'' in perlfunc and ``eval'' in perlfunc and ``require'' in perlfunc and ``use'' in perlfunc.
- Use C from C?
- Rethink your design.
- Use Perl from C?
- Read on...
ROADMAP
- *
- Compiling your C program
- *
- Adding a Perl interpreter to your C program
- *
- Calling a Perl subroutine from your C program
- *
- Evaluating a Perl statement from your C program
- *
- Performing Perl pattern matches and substitutions from your C program
- *
- Fiddling with the Perl stack from your C program
- *
- Maintaining a persistent interpreter
- *
- Maintaining multiple interpreter instances
- *
- Using Perl modules, which themselves use C libraries, from your C program
- *
- Embedding Perl under Win32
Compiling your C program
If you have trouble compiling the scripts in this documentation, you're not alone.  (Sorry for yelling.)Also, every C program that uses Perl must link in the perl library. What's that, you ask? Perl is itself written in C; the perl library is the collection of compiled C programs that were used to create your perl executable (/usr/bin/perl or equivalent). (Corollary: you can't use Perl from your C program unless Perl has been compiled on your machine, or installed properly---that's why you shouldn't blithely copy Perl executables from machine to machine without also copying the lib directory.)
When you use Perl from C, your C program will---usually--allocate, ``run'', and deallocate a PerlInterpreter object, which is defined by the perl library.
If your copy of Perl is recent enough to contain this documentation (version 5.002 or later), then the perl library (and EXTERN.h and perl.h, which you'll also need) will reside in a directory that looks like this:
/usr/local/lib/perl5/your_architecture_here/CORE
or perhaps just
/usr/local/lib/perl5/CORE
or maybe something like
/usr/opt/perl5/CORE
Execute this statement for a hint about where to find CORE:
perl -MConfig -e 'print $Config{archlib}'
Here's how you'd compile the example in the next section, ``Adding a Perl interpreter to your C program'', on my Linux box:
% gcc -O2 -Dbool=char -DHAS_BOOL -I/usr/local/include -I/usr/local/lib/perl5/i586-linux/5.003/CORE -L/usr/local/lib/perl5/i586-linux/5.003/CORE -o interp interp.c -lperl -lm
(That's all one line.) On my DEC Alpha running old 5.003_05, the incantation is a bit different:
% cc -O2 -Olimit 2900 -DSTANDARD_C -I/usr/local/include -I/usr/local/lib/perl5/alpha-dec_osf/5.00305/CORE -L/usr/local/lib/perl5/alpha-dec_osf/5.00305/CORE -L/usr/local/lib -D__LANGUAGE_C__ -D_NO_PROTO -o interp interp.c -lperl -lm
How can you figure out what to add? Assuming your Perl is post-5.001, execute a "perl -V" command and pay special attention to the ``cc'' and ``ccflags'' information.
You'll have to choose the appropriate compiler (cc, gcc, et al.) for your machine: "perl -MConfig -e 'print $Config{cc}'" will tell you what to use.
You'll also have to choose the appropriate library directory (/usr/local/lib/...) for your machine. If your compiler complains that certain functions are undefined, or that it can't locate -lperl, then you need to change the path following the "-L". If it complains that it can't find EXTERN.h and perl.h, you need to change the path following the "-I".
You may have to add extra libraries as well. Which ones? Perhaps those printed by
perl -MConfig -e 'print $Config{libs}'
Provided your perl binary was properly configured and installed the ExtUtils::Embed module will determine all of this information for you:
% cc -o interp interp.c `perl -MExtUtils::Embed -e ccopts -e ldopts`
If the ExtUtils::Embed module isn't part of your Perl distribution, you can retrieve it from http://www.perl.com/perl/CPAN/modules/by-module/ExtUtils/ (If this documentation came from your Perl distribution, then you're running 5.004 or better and you already have it.)
The ExtUtils::Embed kit on CPAN also contains all source code for the examples in this document, tests, additional examples and other information you may find useful.
Adding a Perl interpreter to your C program
In a sense, perl (the C program) is a good example of embedding Perl (the language), so I'll demonstrate embedding with miniperlmain.c, included in the source distribution. Here's a bastardized, non-portable version of miniperlmain.c containing the essentials of embedding:
#include <EXTERN.h> /* from the Perl distribution */ #include <perl.h> /* from the Perl distribution */ static PerlInterpreter *my_perl; /*** The Perl interpreter ***/ int main(int argc, char **argv, char **env) { PERL_SYS_INIT3(&argc,&argv,&env); my_perl = perl_alloc(); perl_construct(my_perl); PL_exit_flags |= PERL_EXIT_DESTRUCT_END; perl_parse(my_perl, NULL, argc, argv, (char **)NULL); perl_run(my_perl); perl_destruct(my_perl); perl_free(my_perl); PERL_SYS_TERM(); }
Notice that we don't use the "env" pointer. Normally handed to "perl_parse" as its final argument, "env" here is replaced by "NULL", which means that the current environment will be used.
The macros PERL_SYS_INIT3() and PERL_SYS_TERM() provide system-specific tune up of the C runtime environment necessary to run Perl interpreters; they should only be called once regardless of how many interpreters you create or destroy.
Since PERL_SYS_INIT3() may change "env", it may be more appropriate to provide "env" as an argument to perl_parse().
Also notice that no matter what arguments you pass to perl_parse(), PERL_SYS_INIT3() must be invoked on the C main() argc, argv and env and only once.
Now compile this program (I'll call it interp.c) into an executable:
% cc -o interp interp.c `perl -MExtUtils::Embed -e ccopts -e ldopts`
After a successful compilation, you'll be able to use interp just like perl itself:
% interp print "Pretty Good Perl \n"; print "10890 - 9801 is ", 10890 - 9801; <CTRL-D> Pretty Good Perl 10890 - 9801 is 1089
or
% interp -e 'printf("%x",<PHONE_NUMBER>)' deadbeef
You can also read and execute Perl statements from a file while in the midst of your C program, by placing the filename in argv[1] before calling perl_run.
Calling a Perl subroutine from your C program
To call individual Perl subroutines, you can use any of the call_* functions documented in perlcall. In this example we'll use "call_argv".That's shown below, in a program I'll call showtime.c.
#include <EXTERN.h> #include <perl.h> static PerlInterpreter *my_perl; int main(int argc, char **argv, char **env) { char *args[] = { NULL }; PERL_SYS_INIT3(&argc,&argv,&env); my_perl = perl_alloc(); perl_construct(my_perl); perl_parse(my_perl, NULL, argc, argv, NULL); PL_exit_flags |= PERL_EXIT_DESTRUCT_END; /*** skipping perl_run() ***/ call_argv("showtime", G_DISCARD | G_NOARGS, args); perl_destruct(my_perl); perl_free(my_perl); PERL_SYS_TERM(); }
where showtime is a Perl subroutine that takes no arguments (that's the G_NOARGS) and for which I'll ignore the return value (that's the G_DISCARD). Those flags, and others, are discussed in perlcall.
I'll define the showtime subroutine in a file called showtime.pl:
print "I shan't be printed."; sub showtime { print time; }
Simple enough. Now compile and run:
% cc -o showtime showtime.c `perl -MExtUtils::Embed -e ccopts -e ldopts` % showtime showtime.pl 818284590
yielding the number of seconds that elapsed between January 1, 1970 (the beginning of the Unix epoch), and the moment I began writing this sentence.
In this particular case we don't have to call perl_run, as we set the PL_exit_flag PERL_EXIT_DESTRUCT_END which executes END blocks in perl_destruct.
If you want to pass arguments to the Perl subroutine, you can add strings to the "NULL"-terminated "args" list passed to call_argv. For other data types, or to examine return values, you'll need to manipulate the Perl stack. That's demonstrated in ``Fiddling with the Perl stack from your C program''.
Evaluating a Perl statement from your C program
Perl provides two API functions to evaluate pieces of Perl code. These are ``eval_sv'' in perlapi and ``eval_pv'' in perlapi.Arguably, these are the only routines you'll ever need to execute snippets of Perl code from within your C program. Your code can be as long as you wish; it can contain multiple statements; it can employ ``use'' in perlfunc, ``require'' in perlfunc, and ``do'' in perlfunc to include external Perl files.
eval_pv lets us evaluate individual Perl strings, and then extract variables for coercion into C types. The following program, string.c, executes three Perl strings, extracting an "int" from the first, a "float" from the second, and a "char *" from the third.
#include <EXTERN.h> #include <perl.h> static PerlInterpreter *my_perl; main (int argc, char **argv, char **env) { char *embedding[] = { "", "-e", "0" }; PERL_SYS_INIT3(&argc,&argv,&env); my_perl = perl_alloc(); perl_construct( my_perl ); perl_parse(my_perl, NULL, 3, embedding, NULL); PL_exit_flags |= PERL_EXIT_DESTRUCT_END; perl_run(my_perl); /** Treat $a as an integer **/ eval_pv("$a = 3; $a **= 2", TRUE); printf("a = %d\n", SvIV(get_sv("a", 0))); /** Treat $a as a float **/ eval_pv("$a = 3.14; $a **= 2", TRUE); printf("a = %f\n", SvNV(get_sv("a", 0))); /** Treat $a as a string **/ eval_pv("$a = 'rekcaH lreP rehtonA tsuJ'; $a = reverse($a);", TRUE); printf("a = %s\n", SvPV_nolen(get_sv("a", 0))); perl_destruct(my_perl); perl_free(my_perl); PERL_SYS_TERM(); }
All of those strange functions with sv in their names help convert Perl scalars to C types. They're described in perlguts and perlapi.
If you compile and run string.c, you'll see the results of using SvIV() to create an "int", SvNV() to create a "float", and SvPV() to create a string:
a = 9 a = 9.859600 a = Just Another Perl Hacker
In the example above, we've created a global variable to temporarily store the computed value of our eval'ed expression. It is also possible and in most cases a better strategy to fetch the return value from eval_pv() instead. Example:
... SV *val = eval_pv("reverse 'rekcaH lreP rehtonA tsuJ'", TRUE); printf("%s\n", SvPV_nolen(val)); ...
This way, we avoid namespace pollution by not creating global variables and we've simplified our code as well.
Performing Perl pattern matches and substitutions from your C program
The eval_sv() function lets us evaluate strings of Perl code, so we can define some functions that use it to ``specialize'' in matches and substitutions: match(), substitute(), and matches().
I32 match(SV *string, char *pattern);
Given a string and a pattern (e.g., "m/clasp/" or "/\b\w*\b/", which in your C program might appear as ``/\\b\\w*\\b/''), match() returns 1 if the string matches the pattern and 0 otherwise.
int substitute(SV **string, char *pattern);
Given a pointer to an "SV" and an "=~" operation (e.g., "s/bob/robert/g" or "tr[A-Z][a-z]"), substitute() modifies the string within the "SV" as according to the operation, returning the number of substitutions made.
int matches(SV *string, char *pattern, AV **matches);
Given an "SV", a pattern, and a pointer to an empty "AV", matches() evaluates "$string =~ $pattern" in a list context, and fills in matches with the array elements, returning the number of matches found.
Here's a sample program, match.c, that uses all three (long lines have been wrapped here):
#include <EXTERN.h> #include <perl.h> static PerlInterpreter *my_perl; /** my_eval_sv(code, error_check) ** kinda like eval_sv(), ** but we pop the return value off the stack **/ SV* my_eval_sv(SV *sv, I32 croak_on_error) { dSP; SV* retval; PUSHMARK(SP); eval_sv(sv, G_SCALAR); SPAGAIN; retval = POPs; PUTBACK; if (croak_on_error && SvTRUE(ERRSV)) croak(SvPVx_nolen(ERRSV)); return retval; } /** match(string, pattern) ** ** Used for matches in a scalar context. ** ** Returns 1 if the match was successful; 0 otherwise. **/ I32 match(SV *string, char *pattern) { SV *command = newSV(0), *retval; sv_setpvf(command, "my $string = '%s'; $string =~ %s", SvPV_nolen(string), pattern); retval = my_eval_sv(command, TRUE); SvREFCNT_dec(command); return SvIV(retval); } /** substitute(string, pattern) ** ** Used for =~ operations that modify their left-hand side (s/// and tr///) ** ** Returns the number of successful matches, and ** modifies the input string if there were any. **/ I32 substitute(SV **string, char *pattern) { SV *command = newSV(0), *retval; sv_setpvf(command, "$string = '%s'; ($string =~ %s)", SvPV_nolen(*string), pattern); retval = my_eval_sv(command, TRUE); SvREFCNT_dec(command); *string = get_sv("string", 0); return SvIV(retval); } /** matches(string, pattern, matches) ** ** Used for matches in a list context. ** ** Returns the number of matches, ** and fills in **matches with the matching substrings **/ I32 matches(SV *string, char *pattern, AV **match_list) { SV *command = newSV(0); I32 num_matches; sv_setpvf(command, "my $string = '%s'; @array = ($string =~ %s)", SvPV_nolen(string), pattern); my_eval_sv(command, TRUE); SvREFCNT_dec(command); *match_list = get_av("array", 0); num_matches = av_len(*match_list) + 1; /** assume $[ is 0 **/ return num_matches; } main (int argc, char **argv, char **env) { char *embedding[] = { "", "-e", "0" }; AV *match_list; I32 num_matches, i; SV *text; PERL_SYS_INIT3(&argc,&argv,&env); my_perl = perl_alloc(); perl_construct(my_perl); perl_parse(my_perl, NULL, 3, embedding, NULL); PL_exit_flags |= PERL_EXIT_DESTRUCT_END; text = newSV(0); sv_setpv(text, "When he is at a convenience store and the " "bill comes to some amount like 76 cents, Maynard is " "aware that there is something he *should* do, something " "that will enable him to get back a quarter, but he has " "no idea *what*. He fumbles through his red squeezey " "changepurse and gives the boy three extra pennies with " "his dollar, hoping that he might luck into the correct " "amount.  " "-RICHH"); if (match(text, "m/quarter/")) /** Does text contain 'quarter'? **/ printf("match: Text contains the word 'quarter'.\n\n"); else printf("match: Text doesn't contain the word 'quarter'.\n\n"); if (match(text, "m/eighth/")) /** Does text contain 'eighth'? **/ printf("match: Text contains the word 'eighth'.\n\n"); else printf("match: Text doesn't contain the word 'eighth'.\n\n"); /** Match all occurrences of /wi../ **/ num_matches = matches(text, "m/(wi..)/g", &match_list); printf("matches: m/(wi..)/g found %d matches...\n", num_matches); for (i = 0; i < num_matches; i++) printf("match: %s\n", SvPV_nolen(*av_fetch(match_list, i, FALSE))); printf("\n"); /** Remove all vowels from text **/ num_matches = substitute(&text, "s/[aeiou]//gi"); if (num_matches) { printf("substitute: s/[aeiou]//gi...%d substitutions made.\n", num_matches); printf("Now text is: %s\n\n", SvPV_nolen(text)); } /** Attempt a substitution **/ if (!substitute(&text, "s/Perl/C/")) { printf("substitute: s/Perl/C...No substitution made.\n\n"); } SvREFCNT_dec(text); PL_perl_destruct_level = 1; perl_destruct(my_perl); perl_free(my_perl); PERL_SYS_TERM(); }
which produces the output (again, long lines have been wrapped here)
match: Text contains the word 'quarter'. match: Text doesn't contain the word 'eighth'. matches: m/(wi..)/g found 2 matches... match: will match: with substitute: s/[aeiou]//gi...139 substitutions made. Now text is: Whn h s t cnvnnc str nd th bll cms t sm mnt lk 76 cnts, Mynrd s wr tht thr s smthng h *shld* d, smthng tht wll nbl hm t gt bck qrtr, bt h hs n d *wht*. H fmbls thrgh hs rd sqzy chngprs nd gvs th by thr xtr pnns wth hs dllr, hpng tht h mght lck nt th crrct mnt. Th by gvs hm bck tw f hs wn pnns nd thn th bg shny qrtr tht s hs prz. -RCHH substitute: s/Perl/C...No substitution made.
Fiddling with the Perl stack from your C program
When trying to explain stacks, most computer science textbooks mumble something about spring-loaded columns of cafeteria plates: the last thing you pushed on the stack is the first thing you pop off. That'll do for our purposes: your C program will push some arguments onto ``the Perl stack'', shut its eyes while some magic happens, and then pop the results---the return value of your Perl subroutine---off the stack.First you'll need to know how to convert between C types and Perl types, with newSViv() and sv_setnv() and newAV() and all their friends. They're described in perlguts and perlapi.
Then you'll need to know how to manipulate the Perl stack. That's described in perlcall.
Once you've understood those, embedding Perl in C is easy.
Because C has no builtin function for integer exponentiation, let's make Perl's ** operator available to it (this is less useful than it sounds, because Perl implements ** with C's pow() function). First I'll create a stub exponentiation function in power.pl:
sub expo { my ($a, $b) = @_; return $a ** $b; }
Now I'll create a C program, power.c, with a function PerlPower() that contains all the perlguts necessary to push the two arguments into expo() and to pop the return value out. Take a deep breath...
#include <EXTERN.h> #include <perl.h> static PerlInterpreter *my_perl; static void PerlPower(int a, int b) { dSP; /* initialize stack pointer */ ENTER; /* everything created after here */ SAVETMPS; /* ...is a temporary variable. */ PUSHMARK(SP); /* remember the stack pointer */ XPUSHs(sv_2mortal(newSViv(a))); /* push the base onto the stack */ XPUSHs(sv_2mortal(newSViv(b))); /* push the exponent onto stack */ PUTBACK; /* make local stack pointer global */ call_pv("expo", G_SCALAR); /* call the function */ SPAGAIN; /* refresh stack pointer */ /* pop the return value from stack */ printf ("%d to the %dth power is %d.\n", a, b, POPi); PUTBACK; FREETMPS; /* free that return value */ LEAVE; /* ...and the XPUSHed "mortal" args.*/ } int main (int argc, char **argv, char **env) { char *my_argv[] = { "", "power.pl" }; PERL_SYS_INIT3(&argc,&argv,&env); my_perl = perl_alloc(); perl_construct( my_perl ); perl_parse(my_perl, NULL, 2, my_argv, (char **)NULL); PL_exit_flags |= PERL_EXIT_DESTRUCT_END; perl_run(my_perl); PerlPower(3, 4); /*** Compute 3 ** 4 ***/ perl_destruct(my_perl); perl_free(my_perl); PERL_SYS_TERM(); }
Compile and run:
% cc -o power power.c `perl -MExtUtils::Embed -e ccopts -e ldopts` % power 3 to the 4th power is 81.
Maintaining a persistent interpreter
When developing interactive and/or potentially long-running applications, it's a good idea to maintain a persistent interpreter rather than allocating and constructing a new interpreter multiple times. The major reason is speed: since Perl will only be loaded into memory once.However, you have to be more cautious with namespace and variable scoping when using a persistent interpreter. In previous examples we've been using global variables in the default package "main". We knew exactly what code would be run, and assumed we could avoid variable collisions and outrageous symbol table growth.
Let's say your application is a server that will occasionally run Perl code from some arbitrary file. Your server has no way of knowing what code it's going to run. Very dangerous.
If the file is pulled in by "perl_parse()", compiled into a newly constructed interpreter, and subsequently cleaned out with "perl_destruct()" afterwards, you're shielded from most namespace troubles.
One way to avoid namespace collisions in this scenario is to translate the filename into a guaranteed-unique package name, and then compile the code into that package using ``eval'' in perlfunc. In the example below, each file will only be compiled once. Or, the application might choose to clean out the symbol table associated with the file after it's no longer needed. Using ``call_argv'' in perlapi, We'll call the subroutine "Embed::Persistent::eval_file" which lives in the file "persistent.pl" and pass the filename and boolean cleanup/cache flag as arguments.
Note that the process will continue to grow for each file that it uses. In addition, there might be "AUTOLOAD"ed subroutines and other conditions that cause Perl's symbol table to grow. You might want to add some logic that keeps track of the process size, or restarts itself after a certain number of requests, to ensure that memory consumption is minimized. You'll also want to scope your variables with ``my'' in perlfunc whenever possible.
package Embed::Persistent; #persistent.pl use strict; our %Cache; use Symbol qw(delete_package); sub valid_package_name { my($string) = @_; $string =~ s/([^A-Za-z0-9\/])/sprintf("_%2x",unpack("C",$1))/eg; # second pass only for words starting with a digit $string =~ s|/(\d)|sprintf("/_%2x",unpack("C",$1))|eg; # Dress it up as a real package name $string =~ s|/|::|g; return "Embed" . $string; } sub eval_file { my($filename, $delete) = @_; my $package = valid_package_name($filename); my $mtime = -M $filename; if(defined $Cache{$package}{mtime} && $Cache{$package}{mtime} <= $mtime) { # we have compiled this subroutine already, # it has not been updated on disk, nothing left to do print STDERR "already compiled $package->handler\n"; } else { local *FH; open FH, $filename or die "open '$filename' $!"; local($/) = undef; my $sub = <FH>; close FH; #wrap the code into a subroutine inside our unique package my $eval = qq{package $package; sub handler { $sub; }}; { # hide our variables within this block my($filename,$mtime,$package,$sub); eval $eval; } die $@ if $@; #cache it unless we're cleaning out each time $Cache{$package}{mtime} = $mtime unless $delete; } eval {$package->handler;}; die $@ if $@; delete_package($package) if $delete; #take a look if you want #print Devel::Symdump->rnew($package)->as_string, $/; } 1; __END__ /* persistent.c */ #include <EXTERN.h> #include <perl.h> /* 1 = clean out filename's symbol table after each request, 0 = don't */ #ifndef DO_CLEAN #define DO_CLEAN 0 #endif #define BUFFER_SIZE 1024 static PerlInterpreter *my_perl = NULL; int main(int argc, char **argv, char **env) { char *embedding[] = { "", "persistent.pl" }; char *args[] = { "", DO_CLEAN, NULL }; char filename[BUFFER_SIZE]; int exitstatus = 0; PERL_SYS_INIT3(&argc,&argv,&env); if((my_perl = perl_alloc()) == NULL) { fprintf(stderr, "no memory!"); exit(1); } perl_construct(my_perl); PL_origalen = 1; /* don't let $0 assignment update the proctitle or embedding[0] */ exitstatus = perl_parse(my_perl, NULL, 2, embedding, NULL); PL_exit_flags |= PERL_EXIT_DESTRUCT_END; if(!exitstatus) { exitstatus = perl_run(my_perl); while(printf("Enter file name: ") && fgets(filename, BUFFER_SIZE, stdin)) { filename[strlen(filename)-1] = '\0'; /* strip \n */ /* call the subroutine, passing it the filename as an argument */ args[0] = filename; call_argv("Embed::Persistent::eval_file", G_DISCARD | G_EVAL, args); /* check $@ */ if(SvTRUE(ERRSV)) fprintf(stderr, "eval error: %s\n", SvPV_nolen(ERRSV)); } } PL_perl_destruct_level = 0; perl_destruct(my_perl); perl_free(my_perl); PERL_SYS_TERM(); exit(exitstatus); }
Now compile:
% cc -o persistent persistent.c `perl -MExtUtils::Embed -e ccopts -e ldopts`
Here's an example script file:
#test.pl my $string = "hello"; foo($string); sub foo { print "foo says: @_\n"; }
Now run:
% persistent Enter file name: test.pl foo says: hello Enter file name: test.pl already compiled Embed::test_2epl->handler foo says: hello Enter file name: ^C
Execution of END blocks
Traditionally END blocks have been executed at the end of the perl_run. This causes problems for applications that never call perl_run. Since perl 5.7.2 you can specify "PL_exit_flags |= PERL_EXIT_DESTRUCT_END" to get the new behaviour. This also enables the running of END blocks if the perl_parse fails and "perl_destruct" will return the exit value.$0 assignments
When a perl script assigns a value to $0 then the perl runtime will try to make this value show up as the program name reported by ``ps'' by updating the memory pointed to by the argv passed to perl_parse() and also calling API functions like setproctitle() where available. This behaviour might not be appropriate when embedding perl and can be disabled by assigning the value 1 to the variable "PL_origalen" before perl_parse() is called.The persistent.c example above is for instance likely to segfault when $0 is assigned to if the "PL_origalen = 1;" assignment is removed. This because perl will try to write to the read only memory of the "embedding[]" strings.
Maintaining multiple interpreter instances
Some rare applications will need to create more than one interpreter during a session. Such an application might sporadically decide to release any resources associated with the interpreter.The program must take care to ensure that this takes place before the next interpreter is constructed. By default, when perl is not built with any special options, the global variable "PL_perl_destruct_level" is set to 0, since extra cleaning isn't usually needed when a program only ever creates a single interpreter in its entire lifetime.
Setting "PL_perl_destruct_level" to 1 makes everything squeaky clean:
while(1) { ... /* reset global variables here with PL_perl_destruct_level = 1 */ PL_perl_destruct_level = 1; perl_construct(my_perl); ... /* clean and reset _everything_ during perl_destruct */ PL_perl_destruct_level = 1; perl_destruct(my_perl); perl_free(my_perl); ... /* let's go do it again! */ }
When perl_destruct() is called, the interpreter's syntax parse tree and symbol tables are cleaned up, and global variables are reset. The second assignment to "PL_perl_destruct_level" is needed because perl_construct resets it to 0.
Now suppose we have more than one interpreter instance running at the same time. This is feasible, but only if you used the Configure option "-Dusemultiplicity" or the options "-Dusethreads -Duseithreads" when building perl. By default, enabling one of these Configure options sets the per-interpreter global variable "PL_perl_destruct_level" to 1, so that thorough cleaning is automatic and interpreter variables are initialized correctly. Even if you don't intend to run two or more interpreters at the same time, but to run them sequentially, like in the above example, it is recommended to build perl with the "-Dusemultiplicity" option otherwise some interpreter variables may not be initialized correctly between consecutive runs and your application may crash.
See also ``Thread-aware system interfaces'' in perlxs.
Using "-Dusethreads -Duseithreads" rather than "-Dusemultiplicity" is more appropriate if you intend to run multiple interpreters concurrently in different threads, because it enables support for linking in the thread libraries of your system with the interpreter.
Let's give it a try:
#include <EXTERN.h> #include <perl.h> /* we're going to embed two interpreters */ /* we're going to embed two interpreters */ #define SAY_HELLO "-e", "print qq(Hi, I'm $^X\n)" int main(int argc, char **argv, char **env) { PerlInterpreter *one_perl, *two_perl; char *one_args[] = { "one_perl", SAY_HELLO }; char *two_args[] = { "two_perl", SAY_HELLO }; PERL_SYS_INIT3(&argc,&argv,&env); one_perl = perl_alloc(); two_perl = perl_alloc(); PERL_SET_CONTEXT(one_perl); perl_construct(one_perl); PERL_SET_CONTEXT(two_perl); perl_construct(two_perl); PERL_SET_CONTEXT(one_perl); perl_parse(one_perl, NULL, 3, one_args, (char **)NULL); PERL_SET_CONTEXT(two_perl); perl_parse(two_perl, NULL, 3, two_args, (char **)NULL); PERL_SET_CONTEXT(one_perl); perl_run(one_perl); PERL_SET_CONTEXT(two_perl); perl_run(two_perl); PERL_SET_CONTEXT(one_perl); perl_destruct(one_perl); PERL_SET_CONTEXT(two_perl); perl_destruct(two_perl); PERL_SET_CONTEXT(one_perl); perl_free(one_perl); PERL_SET_CONTEXT(two_perl); perl_free(two_perl); PERL_SYS_TERM(); }
Note the calls to PERL_SET_CONTEXT(). These are necessary to initialize the global state that tracks which interpreter is the ``current'' one on the particular process or thread that may be running it. It should always be used if you have more than one interpreter and are making perl API calls on both interpreters in an interleaved fashion.
PERL_SET_CONTEXT(interp) should also be called whenever "interp" is used by a thread that did not create it (using either perl_alloc(), or the more esoteric perl_clone()).
Compile as usual:
% cc -o multiplicity multiplicity.c `perl -MExtUtils::Embed -e ccopts -e ldopts`
Run it, Run it:
% multiplicity Hi, I'm one_perl Hi, I'm two_perl
Using Perl modules, which themselves use C libraries, from your C program
If you've played with the examples above and tried to embed a script that use()s a Perl module (such as Socket) which itself uses a C or C++ library, this probably happened:
Can't load module Socket, dynamic loading not available in this perl. (You may need to build a new perl executable which either supports dynamic loading or has the Socket module statically linked into it.)
What's wrong?
Your interpreter doesn't know how to communicate with these extensions on its own. A little glue will help. Up until now you've been calling perl_parse(), handing it NULL for the second argument:
perl_parse(my_perl, NULL, argc, my_argv, NULL);
That's where the glue code can be inserted to create the initial contact between Perl and linked C/C++ routines. Let's take a look some pieces of perlmain.c to see how Perl does this:
static void xs_init (pTHX); EXTERN_C void boot_DynaLoader (pTHX_ CV* cv); EXTERN_C void boot_Socket (pTHX_ CV* cv); EXTERN_C void xs_init(pTHX) { char *file = __FILE__; /* DynaLoader is a special case */ newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file); newXS("Socket::bootstrap", boot_Socket, file); }
Simply put: for each extension linked with your Perl executable (determined during its initial configuration on your computer or when adding a new extension), a Perl subroutine is created to incorporate the extension's routines. Normally, that subroutine is named Module::bootstrap() and is invoked when you say use Module. In turn, this hooks into an XSUB, boot_Module, which creates a Perl counterpart for each of the extension's XSUBs. Don't worry about this part; leave that to the xsubpp and extension authors. If your extension is dynamically loaded, DynaLoader creates Module::bootstrap() for you on the fly. In fact, if you have a working DynaLoader then there is rarely any need to link in any other extensions statically.
Once you have this code, slap it into the second argument of perl_parse():
perl_parse(my_perl, xs_init, argc, my_argv, NULL);
Then compile:
% cc -o interp interp.c `perl -MExtUtils::Embed -e ccopts -e ldopts` % interp use Socket; use SomeDynamicallyLoadedModule; print "Now I can use extensions!\n"'
ExtUtils::Embed can also automate writing the xs_init glue code.
% perl -MExtUtils::Embed -e xsinit -- -o perlxsi.c % cc -c perlxsi.c `perl -MExtUtils::Embed -e ccopts` % cc -c interp.c `perl -MExtUtils::Embed -e ccopts` % cc -o interp perlxsi.o interp.o `perl -MExtUtils::Embed -e ldopts`
Consult perlxs, perlguts, and perlapi for more details.
Embedding Perl under Win32
In general, all of the source code shown here should work unmodified under Windows.However, there are some caveats about the command-line examples shown. For starters, backticks won't work under the Win32 native command shell. The ExtUtils::Embed kit on CPAN ships with a script called genmake, which generates a simple makefile to build a program from a single C source file. It can be used like this:
C:\ExtUtils-Embed\eg> perl genmake interp.c C:\ExtUtils-Embed\eg> nmake C:\ExtUtils-Embed\eg> interp -e "print qq{I'm embedded in Win32!\n}"
You may wish to use a more robust environment such as the Microsoft Developer Studio. In this case, run this to generate perlxsi.c:
perl -MExtUtils::Embed -e xsinit
Create a new project and Insert -> Files into Project: perlxsi.c, perl.lib, and your own source files, e.g. interp.c. Typically you'll find perl.lib in C:\perl\lib\CORE, if not, you should see the CORE directory relative to "perl -V:archlib". The studio will also need this path so it knows where to find Perl include files. This path can be added via the Tools -> Options -> Directories menu. Finally, select Build -> Build interp.exe and you're ready to go.
Hiding Perl_
If you completely hide the short forms forms of the Perl public API, add -DPERL_NO_SHORT_NAMES to the compilation flags. This means that for example instead of writing
warn("%d bottles of beer on the wall", bottlecount);
you will have to write the explicit full form
Perl_warn(aTHX_ "%d bottles of beer on the wall", bottlecount);
(See "Background and PERL_IMPLICIT_CONTEXT for the explanation of the "aTHX_"." in perlguts ) Hiding the short forms is very useful for avoiding all sorts of nasty (C preprocessor or otherwise) conflicts with other software packages (Perl defines about 2400 APIs with these short names, take or leave few hundred, so there certainly is room for conflict.)
MORAL
You can sometimes write faster code in C, but you can always write code faster in Perl. Because you can use each from the other, combine them as you wish.AUTHOR
Jon Orwant<EMAIL_ADDRESS>and Doug MacEachern<EMAIL_ADDRESS>with small contributions from Tim Bunce, Tom Christiansen, Guy Decoux, Hallvard Furuseth, Dov Grobgeld, and Ilya Zakharevich.Doug MacEachern has an article on embedding in Volume 1, Issue 4 of The Perl Journal ( http://www.tpj.com/ ). Doug is also the developer of the most widely-used Perl embedding: the mod_perl system (perl.apache.org), which embeds Perl in the Apache web server. Oracle, Binary Evolution, ActiveState, and Ben Sugars's nsapi_perl have used this model for Oracle, Netscape and Internet Information Server Perl plugins.
COPYRIGHT
Copyright (C) 1995, 1996, 1997, 1998 Doug MacEachern and Jon Orwant. All Rights Reserved.Permission is granted to make and distribute verbatim copies of this documentation provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this documentation under the conditions for verbatim copying, provided also that they are marked clearly as modified versions, that the authors' names and title are unchanged (though subtitles and additional authors' names may be added), and that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this documentation into another language, under the above conditions for modified versions.
Index
- NAME
- DESCRIPTION
-
- PREAMBLE
- ROADMAP
- Compiling your C program
- Adding a Perl interpreter to your C program
- Calling a Perl subroutine from your C program
- Evaluating a Perl statement from your C program
- Performing Perl pattern matches and substitutions from your C program
- Fiddling with the Perl stack from your C program
- Maintaining a persistent interpreter
- Execution of END blocks
- $0 assignments
- Maintaining multiple interpreter instances
- Using Perl modules, which themselves use C libraries, from your C program
- Embedding Perl under Win32
- Hiding Perl_
- MORAL
- AUTHOR
- COPYRIGHT
This document was created by man2html, using the manual pages.
Time: 05:29:08 GMT, December 24, 2015


Ian Wright's I'm A Celeb stint will pay for his whopping £2m tax debt
Former footballer Ian Wright might have headed into the jungle for one thing - enough cash to pay off his £2m tax bill
by Irishmirror.ieI'm A Celebrity... Get Me Out Of Debt! is maybe what Ian Wright was thinking as he went into the jungle.
The 56-year-old former Arsenal striker, who is picking up a rumoured £400,000 from ITV for the show, told in 2016 how he owed £2million in tax and was “at the mercy” of HMRC.
In Ian Wright, A Life In Football: My Autobiography, he says: “The only serious clouds in those skies is the income tax issues that have been with me for a while now.”
He blamed the “wave of financial advisers” that appeared in the 1990s for landing a “whole generation of footballers” in trouble over tax.
He says: “I’m not a tax fraud, I am not a tax cheat, but at the moment I am at the complete mercy of the HM Revenue & Customs because of things that happened back then.
“The fact that it was bad advice and probably some financial skulduggery is not their concern; they want to get paid and my name is on the bill.”
Wright says he owned eight or nine properties at one stage, but due to his tax issues he is now left with just one, which he first bought for his mum.
He says: “One after another, the taxmen were coming for me over my former properties because of something called ‘deferred tax’, which, essentially, means it hasn’t been paid. I put my trust in people who for 20-odd years didn’t give me the advice I should have got.
“I’ll be paying for that for a long time.”
Several accountants advised him to declare himself bankrupt. He refused, thinking it would end his pundit career.
Instead, he chose to work hard to pay back the tax and HMRC had been “magnificent” and patient.
He adds: “I am one of the lucky ones because at least I can work to try and pay it off, which I am doing. But there are many big-name footballers of my age out there who can’t.”
Talking about the impact of the debt, he says: “I live far more modestly than some people might expect.
“I’m constantly getting cab drivers coming to pick me up, seeing I live in a normal terraced house and saying, ‘Blimey, is this where you live? I expected something bigger’. I’ve got no problem with that. I am where I am – I’m not proud at all.”
He has said he went into the jungle on the advice of another footie legend, Harry Redknapp, 72, who won the show last year.
Wright said: “At 56 there aren’t many opportunities to try something completely new. I’ve been asked so many times before and this time I said ‘yes’.” Fellow campmate Cliff Parisi, who plays Minty in EastEnders, said this week that he was going into the jungle because he needed the money to pay a tax bill.
Cliff, 59, admitted he initially turned down the job until his accountant showed him a huge tax bill.
Cliff said: “I had a meeting about this earlier on in the year and I thought about it long and hard and said no.
“Then as it crept along to September and I got an estimate for my tax I phoned them up and said, ‘Is it too late to say yes?’ So here I am.
“What is the worse case scenario?  Which do you want?”


Prosecutor shot dead in court when gun dropped on floor and went off
A state prosecutor has been shot dead in court after a shotgun entered as evidence went off when it was dropped on the floor.
Addelaid Ferreira-Watt, 51, was blasted from point blank range in Ixopi Regional Court, in the province of KwaZulu-Natal, South Africa, on November 18.
The mum-of-one was rushed to hospital with an injury to her hip, but died of her injuries despite the the efforts of paramedics.
It is thought the pellets severed an artery, causing the barrister to bleed to death.
The incident is now being treated as culpable homicide by the South African Police Service, as the shotgun should not have been entered as evidence while still fully loaded.
A friend of Ms Ferreira-Watt said: ‘There is absolutely no need for a weapon being submitted in evidence in a court of law to still be capable of being fired.
Advertisement Advertisement
‘The weapon and the ammunition that it had contained at the time of the alleged crime should have been submitted in separate evidence bags so someone is in big trouble.’
She added: ‘Addelaid was an excellent lawyer and a devoted mother and a lover of art and animals and for her to be taken away so cruelly and in such a freakish way is just agonising.’
A police spokesperson said the shotgun had allegedly been entered as evidence in a house robbery case when it ‘accidentally discharged in court’.
They said the gun was ‘dropped or fell over’ during the proceedings, causing it to fire at Ms Ferreira-Watt.
Ms Ferreira-Watt’s daughter Lindsay, who is engaged, has since shared a tribute to her mum on social media.
Sharing a picture of the pair, she wrote: ‘My dearest, my heroine, my best friend, my mentor, my pillar, my life… but above all, my mummy.’
Antoinette Ferreira, Ms Ferreira-Watt ‘s sister-in-law, also thanked her friends for their prayers online.
Writing a tribute, she continued: ‘A loving and caring mother, a loyal and dear friend, an incredibly smart, intelligent, dynamic resilient and beautiful woman. You filled my life with love and humour.
‘We are so shocked you have been taken away in such a terrible way from your loved ones.
Got a story for Metro.co.uk?
Get in touch with our news team by emailing us at<EMAIL_ADDRESS>For more stories like this, check our news page.


Google Earth Enterprise Fusion does not allow you to import raw imagery source files larger than 80 GB. (Raw size = number of pixels width * number of pixels height * 3.) Therefore, if you have an imagery source file that is larger than 80GB, you can split it into two or more source files using the command. (For complete details about the gesplitkhvr
command, refer to Appendix A in the Google Earth Enterprise Fusion Reference Guide.)
The gesplitkhvr
tool produces a grid of image files designated as rows and columns. For example, if you specify 2 rows and 2 columns, the image is split into four smaller files. If you create a separate resource for each resulting source file, it would look like this in the Preview pane:
However, you can reconnect the split images by adding them all to a single resource, which would look like this in the Preview pane:
cd /opt/google/share/tutorials/fusion/Imagery
.tif
file to a .khvr
file by entering:gevirtualraster -o path/virtual_raster.khvr usgsSFHiRes.tif
where path is the path to the folder where you want to save the resulting .khvr
file. (See Lesson 12 for more information about the gevirtualraster
tool.)
Note: The path where you save the resulting .khvr
file must be on a known volume. (See “geconfigureassetroot --editvolumes
” in Appendix A of the Google Earth Enterprise Administration Guide.)
cd path
.khvr
file into a 4x4 grid (16 image files) with a 10-pixel overlap among all of the files by entering:gesplitkhvr --rows 4 --cols 4 --overlap 10 virtual_raster.khvr
The names of the resulting files appear on the screen as they are created. The file names are constructed from the name of the original file (virtual_raster
), a row and column designation for each file (starting with -R1C3
), and the .khvr
extension.
Now you can import the 16 resulting image files into a resource.


SceneJS - Multiple arbitrarily-aligned clipping planes with caps, using the
postprocess/clippingCap plugin.
This
algorithm can show artifacts when multiple clipping planes are overlapping, as demonstrated in this example (see the
angled clipping plane).
We can avoid that, however, through careful positioning of the clipping planes, eg. in an
axis-aligned box shape.


Songs of the Wind on a Southern Shore, and other Poems of Florida
by George E. Merrick
“The Tamiami Trail”
Additional Information
- Year Published: 1920
- Language: English
- Country of Origin: United States of America
- Source: Merrick, G. E. (1920). Songs of the wind on a southern shore, and other poems of florida. The Four Seas Publishing Co.
-
Readability:
- Flesch–Kincaid Level: 7.2
- Word Count: 531
- Genre: Poetry
- Keywords: florida stories, poetry
- ✎ Cite This
Downloads
“Oh! East is East: and West is West:”
—And though on magic feet—
(As was sung by poet of wisdom blest)
“Never the twain shall meet.”
But here ‘twixt gulf and ocean strand;
Where Nature lowers a mystic veil;
Is a wondrous fair and a magic land
—Here the twain do really meet!
For it is her: by the wise men planned:
—(Where the Old does not avail)—
That the Gulf ebbs east: and the Sea wends west—
By the Tam-i-am-i Trail.
Oh! Bronze is Bronze: and White is White:
—(Yet Bronze the first was here!)...
But Bronze seems wrong: and White seems right:
...Through thrice a hundred year!
Through the grass-grown ‘glades,—high fronded blades
O’er channels’ flow, drop lotus bloom…
The bronze man fades—
—As the petals from their plume.
In gloom—the cypress tower…
—And somber guard his tomb.
And it is here—where the White has pressed!
—(Where the Old did not avail)—
That the Gulf ebbs east: and the Sea wends west:—
By the Tam-i-am-i Trail.
The broad white road;—to dazzled sight—
Cleaves clean the em’rald sod.
A long keen sword,—that flashes bright
To the Heart of a Hermit God!
So His life-blood drains to the waterway
Where the Gulf and Ocean greet.—
And much of his wealth will be borne away
On that channel between his feet!
For a God’s a God!—But Man is blest
That the Old can not prevail.
Thus—the Gulf ebbs east: and the Sea wends west:
By the Tam-i-am-i Trail.
A God’s a God! And Man is Man!
But One rules over each.
And through all Life there’s but One Plan:
We learn—but never teach.
And so He laid in earth’s young days
—The ‘glades’great treasure store.—
To yield more praise—who found His Ways:
—He locked o’er the ‘glades a door.
He said: “The last shall be the best:”—
—(Though the doubters still do rail)—
E’er the Gulf ebbed east: and the Sea went west
By the Tam-i-am-i Trail.
A million of years have sped and gone!
At last it had to be—
In the mind of man there came a dawn:
And they now have found the key.
For by dredge and scoop—in vaunting dare:
They are drawing aside the door.—
In the Everglades—will lay all bare
A fabulous treasure store!
“As far as the East is from the West.”
(So flows the Psalmist’s lore)
—But God Himself did so prevail:—
That the Gulf ebb east: and the Sea wend west
By the Tam-i-am-i Trail.


--- layout: example category: example title: featuresAt for selection description: Using the featuresAt API to show properties of hovered-over map elements. ---


fun resolveError(taskId: Long): Boolean
Mark a previously recorded error for a PendingTask as resolved.
Note: If you attempt to resolve an error using a taskId that does not exist, your request to record an error will be ignored.
Note: If you attempt to resolve an error when an error does not exist in Wendy (because it has already been resolved or was never recorded) then the TaskRunnerListener.errorResolved and PendingTaskStatusListener.errorResolved will not be called.
Note: The task runner will attempt to run your task after it has been resolved immediately. If the task belongs to a group, the task runner will attempt to run all the tasks in the group.
taskId
- The task_id of a PendingTask previously recorded an error for.
Return
If PendingTask had a previously recorded error and it has been marked as resolved now.
See Also


1. How do I get a library card?
Adult patrons must fill out a registration form, have a current photo ID and bring proof of residency if new to Delhi or to the community. For children and young adult patrons under age of eighteen, a parent or legal guardian must be present to fill out their registration form.
Library cards are free of charge to Delhi residents and are available to residents of other states who are current members of the CentralLibrary. Cards are updated and renewed every three years from day of application.


This map contains both editable and info layers. The editable layers are red, the info layers are magenta.


 You can
Go back
Login


Chicken
Create a single really tall section that will use the Bootstrap Grid and take up the entire width of the browser window (minus some margins, of course) for all views: desktop, tablet, and mobile. To make the section really tall, you can either fill it out with a LOT of text or simply set its height to something like 1000px. It needs to be tall enough to cause scrolling down to be required to view the bottom of the section. Make sure its background color is set to distinguish it from the rest of the content. (Hint: don’t forget to have an element with a class=’container’ or class=’container-fluid’ wrapping your grid. Remember that to have the grid do something “always”, i.e., no matter what browser window size, use the col-xs-... classes. In this case, since we want the section to take up the entire row, use col-xs-12.)
Beef
Create a single really tall section that will use the Bootstrap Grid and take up the entire width of the browser window (minus some margins, of course) for all views: desktop, tablet, and mobile. To make the section really tall, you can either fill it out with a LOT of text or simply set its height to something like 1000px. It needs to be tall enough to cause scrolling down to be required to view the bottom of the section. Make sure its background color is set to distinguish it from the rest of the content. (Hint: don’t forget to have an element with a class=’container’ or class=’container-fluid’ wrapping your grid. Remember that to have the grid do something “always”, i.e., no matter what browser window size, use the col-xs-... classes. In this case, since we want the section to take up the entire row, use col-xs-12.)
SuShi
Create a single really tall section that will use the Bootstrap Grid and take up the entire width of the browser window (minus some margins, of course) for all views: desktop, tablet, and mobile. To make the section really tall, you can either fill it out with a LOT of text or simply set its height to something like 1000px. It needs to be tall enough to cause scrolling down to be required to view the bottom of the section. Make sure its background color is set to distinguish it from the rest of the content. (Hint: don’t forget to have an element with a class=’container’ or class=’container-fluid’ wrapping your grid. Remember that to have the grid do something “always”, i.e., no matter what browser window size, use the col-xs-... classes. In this case, since we want the section to take up the entire row, use col-xs-12.)


'13th Floor' doesn't live up to its ambitions by Wallace Baine Santa Cruz Sentinel B-
Techies and software geeks need not get too jacked up over the glossy new cyber-thriller `The Thirteenth Floor.' Sure, a really cool supercomputer is at the center of things, but for all its nifty lighting effects, it might as well be a Sharper Image version of an H.G. Wells-inspired way-back machine. Those waiting for a sophisticated fable about the computerized tomorrow won't get too much sustenance from what is primarily nothing more than a servicable noir borrowing plot points from virtual reality. This stylish potboiler brings up fascinating questions, but leaves them on the table. Not nearly as jarring an experience as `The Matrix,' to which it is destined to be compared, `The Thirteenth Floor' -- like `The Matrix' -- plays with the notion of computer-invented planes of reality.  Film Noir 101. For such a high-profile pre-summer release (it comes from the same creative team that afflicted us with `Godzilla'), `13th Floor' is pleasingly star-less. The able cast is headed up by Craig Bierko (`The Long Kiss Goodnight'), a kind of poor woman's Vince Vaughn, who stars as Douglas Hall, a software hot-shot working closely with his mentor, the aged computer science pioneer Hannon Fuller (Armin Mueller-Stahl). The two men are on the verge of realizing a life-long ambition: the creation of a virtual reality machine that re-creates a simulated world so real, the computer-generated `people' have separate minds and free will. The simulated world is Los Angeles, 1937, the period of Fuller's youth. While the younger Hall is out of town, Fuller dives into his virtual-reality machine before the kinks are ironed out to throw his money around in nightclubs and bed down Depression-era show girls (talk about your killer apps!).  An intimidating cop (Dennis Haysbert) fingers Hall as the prime suspect and Hall, not able to provide an alibi, dives into virtual 1937 in search of clues on who could have murdered Fuller, against the wishes of his techie assistant Whitney (Vincent D'Onofrio, looking like a young John Malkovich). Enter Jane (Gretchen Mol of `Rounders'), Fuller's mysterious but beautiful daughter (whom Hall, Fuller's closest confidant, had never heard of). Shooting off major seduction sparks in Hall's direction, Jane moves with agility to claim Daddy's company. If that weren't enough, Hall runs across more mysterious characters in 1937 (filmed in nicely burnished browns and golds). A suspicious bartender, a virtual twin of his co-worker Whitney, holds the key to what happened to Fuller. But the bartender, oozing malevolence, misleads a baffled Hall and sets out on his sluething adventure. The bartender -- who is, remember, just a computer-generated `unit' -- finds out the truth of his existence and leads Hall to the humbling realization that he might not be `real' either. Follow me so far? Loosely adapted from Daniel F. Galouye's novel `Simalacron-3,' `13th Floor' works on the proposition, as does `The Matrix,' that one's consciousness can be downloaded into a living, breathing replica of one's self in a artificially constructed world. It doesn't measure up to `The Matrix,' however, in explaining the dangers and consequences of such reality tampering, instead diluting its sci-fi ambitions with whodunit cliches. The film's reach exceeds its grasp when it settles into murky, existential philosophizing on the nature of reality. The most advanced thinking in computer science does indeed touch on the profound questions of consciousness and perception. While `13th Floor' admirably ventures out onto the shaky limb of such paradoxes, it does so in a facile manner, postulating on what possibly isn't real but never really addressing is real. The film's most clever representation is, in fact, its view of 1937 LA, balanced with just enough glitzy back-lot Hollywood touches to slyly suggest that if we are able to create simulated worlds of the past, they will be modeled more on romantic, movie-fed images of the past rather than strictly historical models. Also, with the sober-minded professor Fuller behaving in his made-up 1937 like Bill Clinton at a sorority mixer, the film tantalizingly opens the question of whether morality and personal conduct have any meaning in computer-generated worlds of pure fantasy. These intriguing themes bow, however, to the demands of a rather rote murder mystery, creating a faint but lingering air of disappointment -- an emotion still unique to us carbon-based CPUs.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Use keyboard Right key to move the doctor right and Left key to move the doctor left and press space
to inject syringe to patient.
Remember,if any patient move off the screen the game will be over.
Then press on OK in the dialog/alert box appears to replay.


What you'll pay
You must pay a fee to make a money claim. Your fee is based on the amount of money you're claiming.
You might be able to get help with fees if you have a low income or get certain benefits.
You might have to pay other fees later - for example, if your claim goes
to a hearing.
How claim fees are calculated
| Claim amount | Online claim fee |
|---|---|
|
£25 |
|
£35 |
|
£60 |
|
£70 |
|
£105 |
|
£185 |
|
£410 |


@OfficialEQL Take a look at this great article by one of the #Equaliser founders! @OfficialEQL is going to be doing some amazing things! I can't wait to see the first home once it is built! They secured the first property! Once the block recipe is finished it will be close...


Public API Monitor
Your API Data
Response
Average Response Time
Download Data
Show response text
Download Graph
Force re-render graph
Your test will run for more


--- layout: example category: example title: Add a new layer below labels description: Using the second argument of addLayer, you can be more precise ---


Hey! I'm Samay, a 17-year old senior at Princeton Day School in New Jersey. I'm passionate about technology, entrepreneurship, and research.
I made this site to showcase some projects that I have worked on.
Recipeas attempts to solve the issue of not knowing what to cook for dinner by providing users with a personalized search engine. Simply put in one or more ingredients, and you will be provided with a wide variety of recipes of different type and cuisine. This will help people save time during thinking of what to make for dinner, and allow people to try different cuisines and food items that they may not have thought of. This allows for people to discover new recipes in different cultures from familiar ingredients!
Wolfram Award Winner at University of Michigan MHacks Hackathon
Top 15 Winner at NHacks Hackathon
DataMeet performs real-time analysis of students’ webcams and transfers the students’ emotional data into a dashboard using different metrics, so that educators can track understanding in real-time and tailor instruction based on the feedback. The app will use machine learning to analyze the faces in a class, checking to see if students understand the lesson. The platform will then transmit this data to the teacher. Congressional Press Release
Winner of NJ-06 Congressional App Challenge
Insurguard is a Web Application that enables users to compare, contrast, and even apply for natural disaster insurance plans all in one simple and streamlined platform. In addition, Insurguard will notify users, recommending them to apply for disaster insurance, if their household is detected to be in harm's way. Using a proprietary web scraping algorithm, Insurguard will present the user with a multitude of insurance plans for every natural disaster type imaginable. Users can compare and contrast plans until they find one that is best suited to them.. Once users find a favorable insurance plan, they can apply and pay for it right through the app. Additionally, Insurguard will constantly check if the user's household is within the path of a natural disaster. If it is, it will instantly send them a notification, advising them to apply for disaster insurance as soon as possible!
Winner of RallyToUS Hackathon for Insurance Projects
Over the course of the winter of 2019-2020, I completed over a dozen open source contributions to the Scorelab organization through the International Google-Code In Program.
Contributions Top 20 Internationally for ScoreLab Organization
If you have any questions or just want to say hello, feel free to reach out!
Email Me


Using the Amnesty menu
The Amnesty menu, which appears as a butterfly icon in the top-right area of your system's menu bar, is the main user interface for Amnesty Widget Browser. When launched, Amnesty loads widgets from the system's widget libraries and builds a list of the widgets it finds. If no widgets are found, then the list will consist of a single disabled menu item reading No widgets found.
The Amnesty menu also contains items that you'd find in a standard application's menu bar, such as Help, Preferences, Quit and other application functionality.
For Panther users, the Amnesty widget library is the main widget library and the location where widgets must be installed. For Tiger users, the Amnesty widget library is an optional location where "Amnesty only" widgets can be installed.
Installing a widget for use in Amnesty
In the Mac OS X Finder, open the Amnesty widget library (~/Library/Application Support/Amnesty/Widgets) or press the Show In Finder button in the Preferences window to open this location automatically.
Using the Finder, you can install .wdgt files (or remove them) from this location.
|
Special Notes for Panther users: Some widgets are written specifically to use technologies available only in Tiger. These widgets, when loaded in Amnesty under Panther, may not run at all. Mesa Dynamics maintains a web page of Known Issues, including a list of widgets known not to run in Panther. This page is accessible via the Known Issues menu item under the Help submenu. If you are unsure whether a widget is supposed to run in Panther or not, you can check this page to make sure. Apple's default Dashboard widgets (which are included with Tiger) are unsupported (and inaccessible) in Amnesty running in Panther. |
If you install (or remove) widgets while Amnesty is running, you can force the widget list to be updated at any time.
Refreshing the Widget List
| Choose Refresh Widget List from the Amnesty menu. |


{% extends "layout.html" %} {% block page_title %} Apprenticeships {% endblock %} {% block content %} {% include "includes/phase_banner_alpha.html" %} {% include "includes/breadcrumbs/register-back.html" %} Disclaimer All figures in this tool are estimates English percentage English percentage Roughly, what percentage of your employees live in England? If you're unsure enter 100 % {% endblock %}
Disclaimer All figures in this tool are estimates


to star repeat 5 [ fd 100 rt 144 ] end
to square :length repeat 4 [ fd :length rt 90 ] end
repeat 36 [ square 50 rt 10 ]
to randomcolor setcolor pick [ "red "orange "yellow "green "blue "violet ] end
repeat 36 [ randomcolor square random 200 rt 10 ]
Language Reference


anno_zoom.Rd
Zoom annotation
anno_zoom(align_to, panel_fun = function(index, nm = NULL) { grid.rect() }, which = c("column", "row"), side = ifelse(which == "column", "top", "right"), size = NULL, gap = unit(1, "mm"), link_width = unit(5, "mm"), link_height = link_width, link_gp = gpar(), extend = unit(0, "mm"), width = NULL, height = NULL)
| align_to | It defines how the boxes correspond to the rows or the columns in the heatmap. If the value is a list of indices, each box corresponds to the rows or columns with indices in one vector in the list. If the value is a categorical variable (e.g. a factor or a character vector) that has the same length as the rows or columns in the heatmap, each box corresponds to the rows/columns in each level in the categorical variable. |
|---|---|
| panel_fun | A self-defined function that defines how to draw graphics in the box. The function must have a |
| which | Whether it is a column annotation or a row annotation? |
| side | Side of the boxes If it is a column annotation, valid values are "top" and "bottom"; If it is a row annotation, valid values are "left" and "right". |
| size | The size of boxes. It can be pure numeric that they are treated as relative fractions of the total height/width of the heatmap. The value of |
| gap | Gaps between boxes. |
| link_gp | Graphic settings for the segments. |
| link_width | Width of the segments. |
| link_height | Similar as |
| extend | By default, the region for the labels has the same width (if it is a column annotation) or same height (if it is a row annotation) as the heatmap. The size can be extended by this options. The value can be a proportion number or a |
| width | Width of the annotation. The value should be an absolute unit. Width is not allowed to be set for column annotation. |
| height | Height of the annotation. The value should be an absolute unit. Height is not allowed to be set for row annotation. |
anno_zoom
creates several plotting regions (boxes) which can be corresponded to subsets of rows/columns in the
heatmap.
An annotation function which can be used in HeatmapAnnotation
.
set.seed(123) m = matrix(rnorm(100*10), nrow = 100) subgroup = sample(letters[1:3], 100, replace = TRUE, prob = c(1, 5, 10)) rg = range(m) panel_fun = function(index, nm) { pushViewport(viewport(xscale = rg, yscale = c(0, 2))) grid.rect() grid.xaxis(gp = gpar(fontsize = 8)) grid.boxplot(m[index, ], pos = 1, direction = "horizontal") grid.text(paste("distribution of group", nm), mean(rg), y = 1.9, just = "top", default.units = "native", gp = gpar(fontsize = 10)) popViewport() } anno = anno_zoom(align_to = subgroup, which = "row", panel_fun = panel_fun, size = unit(2, "cm"), gap = unit(1, "cm"), width = unit(4, "cm")) Heatmap(m, right_annotation = rowAnnotation(foo = anno), row_split = subgroup)


public interface Protocol
Protocol
interface specifies methods to create request represented by Request
of Hudup client-server network in many possible cases.
Note, Request
class represents user request. Request
uses JSON format as exchangeable means in client-server network. Note, JSON (JavaScript Object Notation) is a human-read format used for interchange between many protocols, available at http://www.json.org.
User request includes recommendation request, retrieval request, update request.
Each request has a so-called action
which is a short description (short string) of such request. Action can be considered as the purpose of request.
For example, the request that user requires a list of recommended items has action "recommend_user".
Protocol
establishes an interaction protocol of Hudup client-server network, which is named "hdp".
Each method of protocol creates a particular request, for example, the method createRecommendRequest(RecommendParam, int)
will create a request that user requires a list of recommended items.
Protocol
also defines actions of requests as constants.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DELETE_EXTERNAL_RECORD
Action of request of deleting external record.
|
static java.lang.String |
DELETE_ITEM_PROFILE
Action of request of deleting item profile.
|
static java.lang.String |
DELETE_ITEM_RATING
Action of request of deleting item rating.
|
static java.lang.String |
DELETE_NOMINAL
Action of request of deleting nominal.
|
static java.lang.String |
DELETE_PROFILE
Action of request of deleting profile.
|
static java.lang.String |
DELETE_RATING
Action of deleting rating request created by method
createDeleteRatingRequest(RatingVector) . |
static java.lang.String |
DELETE_USER_PROFILE
Action of request of deleting user profile.
|
static java.lang.String |
DELETE_USER_RATING
Action of request of deleting user rating.
|
static java.lang.String |
ESTIMATE
Action of estimation request created by method
createEstimateRequest(RecommendParam, Set) . |
static java.lang.String |
GATEWAY
Name of gateway of Hudup server (recommendation server).
|
static java.lang.String |
GET_EXTERNAL_RECORD
Action of request of getting external record.
|
static java.lang.String |
GET_ITEM_ATTRIBUTE_LIST
Action of request of getting list of item attributes.
|
static java.lang.String |
GET_ITEM_EXTERNAL_RECORD
Action of request of getting item external record.
|
static java.lang.String |
GET_ITEM_PROFILE
Action of request of getting item profile.
|
static java.lang.String |
GET_ITEM_PROFILE_BY_EXTERNAL
Action of request of getting item profile by external record.
|
static java.lang.String |
GET_ITEM_PROFILES
Action of request of getting item profiles.
|
static java.lang.String |
GET_ITEM_PROFILES_SQL
Action of request of getting item profiles from SQL statement.
|
static java.lang.String |
GET_ITEM_RATING
Action of request of getting item rating.
|
static java.lang.String |
GET_ITEM_RATINGS
Action of request of getting item ratings.
|
static java.lang.String |
GET_ITEM_RATINGS_SQL
Action of request of getting item ratings from SQL statement.
|
static java.lang.String |
GET_ITEMIDS
Action of request of getting item identifiers.
|
static java.lang.String |
GET_NOMINAL
Action of request of getting nominal.
|
static java.lang.String |
GET_PROFILE
Action of request of getting profile.
|
static java.lang.String |
GET_PROFILE_ATTRIBUTE_LIST
Action of request of getting attribute list of given profile.
|
static java.lang.String |
GET_PROFILES_SQL
Action of request of getting profiles from SQL statement.
|
static java.lang.String |
GET_SERVER_CONFIG
Action of request of getting configuration of Hudup server.
|
static java.lang.String |
GET_SESSION_ATTRIBUTE
Action of request of getting session attribute.
|
static java.lang.String |
GET_SNAPSHOT
Action of request of getting snapshot.
|
static java.lang.String |
GET_USER_ATTRIBUTE_LIST
Action of request of getting list of user attributes.
|
static java.lang.String |
GET_USER_EXTERNAL_RECORD
Action of request of getting user external record.
|
static java.lang.String |
GET_USER_PROFILE
Action of request of getting user profile.
|
static java.lang.String |
GET_USER_PROFILE_BY_EXTERNAL
Action of request of getting user profile by external record.
|
static java.lang.String |
GET_USER_PROFILES
Action of request of getting many user profiles.
|
static java.lang.String |
GET_USER_PROFILES_SQL
Action of request of getting user profiles from SQL statement.
|
static java.lang.String |
GET_USER_RATING
Action of request of getting user rating, given an specified user.
|
static java.lang.String |
GET_USER_RATINGS
Action of request of getting user ratings.
|
static java.lang.String |
GET_USER_RATINGS_SQL
Action of request of getting user ratings from specified SQL statement.
|
static java.lang.String |
GET_USERIDS
Action of request of getting user identifiers.
|
static int |
GIF_FILE_TYPE
GIF file type.
|
static int |
HDP_PROTOCOL
Identifier of Hudup protocol (hdp).
|
static int |
HTML_FILE_TYPE
HTML file type.
|
static int |
HTTP_PROTOCOL
Identifier of HTTP protocol.
|
static java.lang.String |
INSERT_EXTERNAL_RECORD
Action of request of inserting external record.
|
static java.lang.String |
INSERT_ITEM_PROFILE
Action of request of inserting item profile.
|
static java.lang.String |
INSERT_NOMINAL
Action of request of inserting nominal.
|
static java.lang.String |
INSERT_PROFILE
Action of request of inserting profile.
|
static java.lang.String |
INSERT_RATING
Action of inserting rating request created by method
createInsertRatingRequest(RatingVector) . |
static java.lang.String |
INSERT_USER_PROFILE
Action of request of inserting user profile.
|
static int |
JPEG_FILE_TYPE
JPEG file type.
|
static int |
JSON_FILE_TYPE
JSON file type.
|
static java.lang.String |
QUIT
Name of quit command.
|
static java.lang.String |
READ_FILE
Action of reading file request.
|
static java.lang.String |
RECOMMEND
Action of recommendation request created by method
createRecommendRequest(RecommendParam, int) . |
static java.lang.String |
RECOMMEND_USER
Action of user recommendation request created by method
createRecommendRequest(RecommendParam, int) . |
static java.lang.String |
RECOMMENDLET
Action of recommendlet request created by method
createRecommendletRequest(String, int, String, Serializable, Serializable, int, Rating) . |
static int |
TEXTPLAIN_FILE_TYPE
Text file type.
|
static int |
UNKNOWN_FILE_TYPE
Unknown file type.
|
static java.lang.String |
UPDATE_EXTERNAL_RECORD
Action of request of updating external record.
|
static java.lang.String |
UPDATE_ITEM_PROFILE
Action of request of updating item profile.
|
static java.lang.String |
UPDATE_NOMINAL
Action of request of updating nominal.
|
static java.lang.String |
UPDATE_PROFILE
Action of request of updating profile.
|
static java.lang.String |
UPDATE_RATING
Action of updating rating request created by method
createUpdateRatingRequest(RatingVector) . |
static java.lang.String |
UPDATE_USER_PROFILE
Action of request of updating user profile.
|
static java.lang.String |
VALIDATE_ACCOUNT
Action of request of validating user account.
|
static int |
XZIP_FILE_TYPE
Compressed file type.
|
| Modifier and Type | Method and Description |
|---|---|
Request |
createDeleteExternalRecordRequest(InternalRecord internalRecord)
Creating a request for deleting a specified external record with a specified internal record.
|
Request |
createDeleteItemProfileRequest(int itemId)
Creating a request for deleting a specified item profile.
|
Request |
createDeleteItemRatingRequest(int itemId)
Creating a request for deleting ratings of a specified item.
|
Request |
createDeleteNominalRequest(java.lang.String unit,
java.lang.String attribute)
Creating a request for deleting a nominal by specified unit and specified attribute.
|
Request |
createDeleteProfileRequest(java.lang.String unit,
Profile condition)
Creating a request for deleting a specified profile in a specified unit.
|
Request |
createDeleteRatingRequest(RatingVector vRating)
Creating a request for deleting many ratings specified by rating vector in framework database.
|
Request |
createDeleteUserProfileRequest(int userId)
Creating a request for deleting profile of specified user.
|
Request |
createDeleteUserRatingRequest(int userId)
Creating a request for deleting ratings of the specified user.
|
Request |
createEstimateRequest(RecommendParam param,
java.util.Set<java.lang.Integer> queryIds)
Creating estimation request based on specified recommendation parameter and specified set of identifiers (IDs).
|
Request |
createGetExternalRecordRequest(InternalRecord internalRecord)
Creating a request for getting an external record from a specified internal record.
|
Request |
createGetItemAttributeListRequest()
Creating a request for getting attribute list of items.
|
Request |
createGetItemExternalRecordRequest(int itemId)
Creating a request for getting external record of a specified item.
|
Request |
createGetItemIdsRequest()
Creating a request for getting all item identifiers (item IDs).
|
Request |
createGetItemProfileByExternalRequest(java.io.Serializable externalItemId)
Creating a request for getting profile of an item by external item identifier (item ID).
|
Request |
createGetItemProfileRequest(int itemId)
Creating a request for getting profile of specified item.
|
Request |
createGetItemProfilesRequest()
Creating a request for getting profiles of items.
|
Request |
createGetItemProfilesSqlRequest(java.lang.String selectSql)
Creating a request for getting profiles of items by SQL statement.
|
Request |
createGetItemRatingRequest(int itemId)
Creating a request for getting ratings of specified item.
|
Request |
createGetItemRatingsRequest()
Creating a request for getting all ratings of items.
|
Request |
createGetItemRatingsSqlRequest(java.lang.String selectSql)
Creating a request for ratings of an item by SQL statement.
|
Request |
createGetNominalRequest(java.lang.String unit,
java.lang.String attribute)
Creating a request for getting nominal (s) by specified unit and attribute.
|
Request |
createGetProfileAttributeListRequest(java.lang.String unit)
Creating a request for getting the attribute list of profiles in the same specified unit.
|
Request |
createGetProfileRequest(java.lang.String unit,
Profile condition)
Creating a request for getting a profile by specified unit and specified condition.
|
Request |
createGetProfilesSqlRequest(java.lang.String selectSql)
Creating a request for getting profiles by SQL statement.
|
Request |
createGetServerConfigRequest()
Hudup server owns a configuration which includes some server information such as server port, the period in miliseconds that the Hudup server does periodically internal tasks.
|
Request |
createGetSessionAttributeRequest(java.lang.String attribute)
Creating a request for retrieving an attribute having the specified name of the current session in server.
|
Request |
createGetSnapshotRequest()
Creating a request for retrieving an image of dataset owned by Hudup server at current time point.
|
Request |
createGetUserAttributeListRequest()
Creating a request for getting attribute list of user profiles.
|
Request |
createGetUserExternalRecordRequest(int userId)
Creating a request for getting external record of a given user by her/his identifier (user ID).
|
Request |
createGetUserIdsRequest()
Creating a request for getting a list of user identifiers (user IDs) from framework database.
|
Request |
createGetUserProfileByExternalRequest(java.io.Serializable externalUserId)
Creating a request for getting profile of a user by external user identifier.
|
Request |
createGetUserProfileRequest(int userId)
Creating a request for getting profile of the specified user.
|
Request |
createGetUserProfilesRequest()
Creating a request for getting profiles of all users.
|
Request |
createGetUserProfilesSqlRequest(java.lang.String selectSql)
Creating a request for getting profiles of users by specified SQL statement.
|
Request |
createGetUserRatingRequest(int userId)
Creating a request for getting rating vector of a specified user from framework database.
|
Request |
createGetUserRatingsRequest()
Creating a request for getting all user rating vectors from framework database.
|
Request |
createGetUserRatingsSqlRequest(java.lang.String selectSql)
Creating a request for getting many ratings of a user from specified SQL statement.
|
Request |
createInsertExternalRecordRequest(InternalRecord internalRecord,
ExternalRecord externalRecord)
Creating a request for inserting a specified external record with a specified internal record.
|
Request |
createInsertItemProfileRequest(Profile profile,
ExternalRecord externalRecord)
Creating a request for inserting a specified item profile together with a specified external record.
|
Request |
createInsertNominalRequest(java.lang.String unit,
java.lang.String attribute,
Nominal nominal)
Creating a request for inserting a specified nominal into specified unit with specified attribute.
|
Request |
createInsertProfileRequest(java.lang.String unit,
Profile profile)
Creating a request for inserting a specified profile in a specified unit.
|
Request |
createInsertRatingRequest(RatingVector vRating)
Creating a request for inserting many ratings specified by rating vector into framework database.
|
Request |
createInsertUserProfileRequest(Profile profile,
ExternalRecord externalRecord)
Creating a request for inserting user profile based on specified profile and external record.
|
Request |
createRecommendletRequest(java.lang.String host,
int port,
java.lang.String regName,
java.io.Serializable externalUserId,
java.io.Serializable externalItemId,
int maxRecommend,
Rating rating)
This method is responsible for creating a request for generating a recommendlet, based on many input parameters.
|
Request |
createRecommendRequest(RecommendParam param,
int maxRecommend)
Creating recommendation request based on the specified recommendation parameter and the specified maximum number of recommended items.
|
Request |
createRecommendUserRequest(int userId,
int maxRecommend)
Creating recommendation request for the specified user.
|
Request |
createUpdateExternalRecordRequest(InternalRecord internalRecord,
ExternalRecord externalRecord)
Creating a request for updating a specified external record with a specified internal record.
|
Request |
createUpdateItemProfileRequest(Profile profile)
Creating a request for updating a specified item profile.
|
Request |
createUpdateNominalRequest(java.lang.String unit,
java.lang.String attribute,
Nominal nominal)
Creating a request for updating a specified nominal into specified unit with specified attribute.
|
Request |
createUpdateProfileRequest(java.lang.String unit,
Profile profile)
Creating a request for updating a specified profile in a specified unit.
|
Request |
createUpdateRatingRequest(RatingVector vRating)
Creating a request for updating many ratings specified by rating vector in framework database.
|
Request |
createUpdateUserProfileRequest(Profile profile)
Creating a request for updating specified user profile.
|
Request |
createValidateAccountRequest(java.lang.String account,
java.lang.String password,
int privileges)
Creating a request for checking whether an account is valid with regard to specified password and specified privileges.
|
static final int HDP_PROTOCOL
static final int HTTP_PROTOCOL
static final int UNKNOWN_FILE_TYPE
static final int HTML_FILE_TYPE
static final int JPEG_FILE_TYPE
static final int GIF_FILE_TYPE
static final int TEXTPLAIN_FILE_TYPE
static final int JSON_FILE_TYPE
static final int XZIP_FILE_TYPE
static final java.lang.String GATEWAY
static final java.lang.String QUIT
static final java.lang.String READ_FILE
static final java.lang.String ESTIMATE
createEstimateRequest(RecommendParam, Set)
.static final java.lang.String RECOMMEND
createRecommendRequest(RecommendParam, int)
.static final java.lang.String RECOMMEND_USER
createRecommendRequest(RecommendParam, int)
.static final java.lang.String RECOMMENDLET
createRecommendletRequest(String, int, String, Serializable, Serializable, int, Rating)
.
Recommendlet represented by Recommendlet
class is service or a small graphic user interface (GUI) that allows users to see and interact with a list of recommended items.
 Recommendation parameter contains important information as follows:
queryIds
- specified set of identifiers (IDs). Such IDs can be user IDs or item IDs.Request createRecommendRequest(RecommendParam param, int maxRecommend)
recommend(...)
of Recommender
class is responsible for producing such list.param
- specified recommendation parameter. Recommendation parameter contains important information as follows:
maxRecommend
- specified maximum number of recommended items.Request createRecommendUserRequest(int userId, int maxRecommend)
maxRecommend
.
Method recommend(...)
of Recommender
class is responsible for producing such list.userId
- identifier (ID) of specified user.maxRecommend
- maximum number of recommended items.Request createRecommendletRequest(java.lang.String host, int port, java.lang.String regName, java.io.Serializable externalUserId, java.io.Serializable externalItemId, int maxRecommend, Rating rating)
Recommendlet
class is a service or a small graphic user interface (GUI) that allows users to see and interact with a list of recommended items.
Recommendlet is now deprecated.host
- specified host.port
- specified port.regName
- registered name of recommendlet.externalUserId
- specified external user identifier (user ID).externalItemId
- specified external item identifier (item ID).maxRecommend
- the maximum number of recommended items.rating
- rating value for updating.Request createInsertRatingRequest(RatingVector vRating)
vRating
- specified rating vector.Request createUpdateRatingRequest(RatingVector vRating)
vRating
- specified rating vector.Request createDeleteRatingRequest(RatingVector vRating)
vRating
- specified rating vector.Request createGetUserIdsRequest()
Request createGetUserRatingRequest(int userId)
userId
- specified user identifier (user ID).Request createGetUserRatingsRequest()
Request createGetUserRatingsSqlRequest(java.lang.String selectSql)
selectSql
- specified select SQL statement. SQL which is abbreviation of Structured Query Language is a formal language for accessing relation database.Request createDeleteUserRatingRequest(int userId)
userId
- specified user identifier (user ID).Request createGetUserProfileRequest(int userId)
profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.userId
- specified user identifier (user ID).Request createGetUserProfileByExternalRequest(java.io.Serializable externalUserId)
profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.externalUserId
- specified user identifier (user ID) and such ID is stored in outside database different from the Hudup database.Request createGetUserProfilesRequest()
profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.Request createGetUserProfilesSqlRequest(java.lang.String selectSql)
profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.selectSql
- specified select SQL. SQL which is abbreviation of Structured Query Language is a formal language for accessing relation database.Request
Request createGetUserAttributeListRequest()
Attribute
class indicates the data type, which is also a wrapper of data type.
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.
Profile uses attribute to specify its data types and so profile owns a reference to an attribute list.
Please see AttributeList
class for details about attribute list.
All profiles of users share the same attribute list.Request createInsertUserProfileRequest(Profile profile, ExternalRecord externalRecord)
profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.
External record represented by ExternalRecord
class is a record (a row in table) which is stored in other database (different from the framework database). It is opposite to internal record represented by InternalRecord
class which is a record stored in the framework database.profile
- specified user profile.externalRecord
- specified external record.Request createUpdateUserProfileRequest(Profile profile)
profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.profile
- specified user profile.Request createDeleteUserProfileRequest(int userId)
profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.userId
- specified user identifier (user ID).Request createGetUserExternalRecordRequest(int userId)
ExternalRecord
class is a record (a row in table) which is stored in other database (different from the framework database). It is opposite to internal record represented by InternalRecord
class which is a record stored in the framework database.userId
- specified user identifier (user ID).Request createGetItemIdsRequest()
Request createGetItemRatingRequest(int itemId)
itemId
- specified item identifier (item ID).Request createGetItemRatingsRequest()
Request createGetItemRatingsSqlRequest(java.lang.String selectSql)
selectSql
- specified select SQL statement. SQL which is abbreviation of Structured Query Language is a formal language for accessing relation database.Request createDeleteItemRatingRequest(int itemId)
itemId
- specified item identifier (item ID).Request createGetItemProfileRequest(int itemId)
profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.itemId
- specified item identifier (item ID).Request createGetItemProfileByExternalRequest(java.io.Serializable externalItemId)
profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.externalItemId
- specified item identifier (item ID) and such ID is stored in outside database different from the Hudup database.Request createGetItemProfilesRequest()
profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.Request createGetItemProfilesSqlRequest(java.lang.String selectSql)
profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.selectSql
- specified select SQL statement. SQL which is abbreviation of Structured Query Language is a formal language for accessing relation database.Request createGetItemAttributeListRequest()
Attribute
class indicates the data type, which is also a wrapper of data type.
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.
Profile uses attribute to specify its data types and so profile owns a reference to an attribute list.
Note, all item profiles in framework database share the same attribute list.
Please see AttributeList
class for details about attribute list.Request createInsertItemProfileRequest(Profile profile, ExternalRecord externalRecord)
profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.
External record represented by ExternalRecord
class is a record (a row in table) which is stored in other database (different from the framework database). It is opposite to internal record represented by InternalRecord
class which is a record stored in the framework database.profile
- specified item profile.externalRecord
- specified external record.Request createUpdateItemProfileRequest(Profile profile)
profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.profile
- specified item profile.Request createDeleteItemProfileRequest(int itemId)
profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.itemId
- specified item identifier (item ID).Request createGetItemExternalRecordRequest(int itemId)
ExternalRecord
class is a record (a row in table) which is stored in other database (different from the framework database). It is opposite to internal record represented by InternalRecord
class which is a record stored in the framework database.itemId
- specified item identifier (item ID).Request createGetNominalRequest(java.lang.String unit, java.lang.String attribute)
nominal
, in brief, represented by Nominal
class.
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.
Attribute represented by Attribute
class indicates the data type, which is also a wrapper of data type.
If unit is database table, an attribute is identical to a field.unit
- specified unit name.attribute
- specified attribute name.Request createInsertNominalRequest(java.lang.String unit, java.lang.String attribute, Nominal nominal)
nominal
, in brief, represented by Nominal
class.
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.
Attribute represented by Attribute
class indicates the data type, which is also a wrapper of data type.
If unit is database table, an attribute is identical to a field.unit
- specified unit name.attribute
- specified attribute name.nominal
- specified nominal.Request createUpdateNominalRequest(java.lang.String unit, java.lang.String attribute, Nominal nominal)
nominal
, in brief, represented by Nominal
class.
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.
Attribute represented by Attribute
class indicates the data type, which is also a wrapper of data type.
If unit is database table, an attribute is identical to a field.unit
- specified unit name.attribute
- specified attribute name.nominal
- specified nominal.Request createDeleteNominalRequest(java.lang.String unit, java.lang.String attribute)
nominal
, in brief, represented by Nominal
class.
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.
Attribute represented by Attribute
class indicates the data type, which is also a wrapper of data type.
If unit is database table, an attribute is identical to a field.unit
- specified unit name.attribute
- specified attribute name.Request createGetExternalRecordRequest(InternalRecord internalRecord)
ExternalRecord
class is a record (a row in table) which is stored in other database (different from the framework database). It is opposite to internal record represented by InternalRecord
class which is a record stored in the framework database.internalRecord
- specified internal record.Request createInsertExternalRecordRequest(InternalRecord internalRecord, ExternalRecord externalRecord)
ExternalRecord
class is a record (a row in table) which is stored in other database (different from the framework database). It is opposite to internal record represented by InternalRecord
class which is a record stored in the framework database.internalRecord
- specified internal record.externalRecord
- specified external record.Request createUpdateExternalRecordRequest(InternalRecord internalRecord, ExternalRecord externalRecord)
ExternalRecord
class is a record (a row in table) which is stored in other database (different from the framework database). It is opposite to internal record represented by InternalRecord
class which is a record stored in the framework database.internalRecord
- specified internal record.externalRecord
- specified external record.Request createDeleteExternalRecordRequest(InternalRecord internalRecord)
ExternalRecord
class is a record (a row in table) which is stored in other database (different from the framework database). It is opposite to internal record represented by InternalRecord
class which is a record stored in the framework database.internalRecord
- specified internal record.Request createValidateAccountRequest(java.lang.String account, java.lang.String password, int privileges)
account
- specified account.password
- specified password.privileges
- specified privileges.Request createGetProfileRequest(java.lang.String unit, Profile condition)
profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.unit
- specified unit name.condition
- specified condition to select profile to be returned, please see the net.hudup.core.data.Condition
.Request
Request createGetProfilesSqlRequest(java.lang.String selectSql)
profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.selectSql
- specified select SQL statement. SQL which is abbreviation of Structured Query Language is a formal language for accessing relation database.Request createGetProfileAttributeListRequest(java.lang.String unit)
Attribute
class indicates the data type, which is also a wrapper of data type.
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.
Profile uses attribute to specify its data types and so profile owns a reference to an attribute list.
Please see AttributeList
class for details about attribute list.
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.
Profiles in the same unit have the same attribute list.unit
- specified unit name.Request
Request createInsertProfileRequest(java.lang.String unit, Profile profile)
profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.unit
- specified unit name.profile
- specified profile.Request createUpdateProfileRequest(java.lang.String unit, Profile profile)
profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.unit
- specified unit name.profile
- specified profile.Request createDeleteProfileRequest(java.lang.String unit, Profile condition)
profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute.
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.unit
- specified unit name.condition
- specified condition to select profile to be deleted, please see the net.hudup.core.data.Condition
.Request createGetServerConfigRequest()
Request createGetSessionAttributeRequest(java.lang.String attribute)
attribute
- specified attribute name.Request createGetSnapshotRequest()
Snapshot
class.