| PERLCALL(1) | Perl Programmers Reference Guide | PERLCALL(1) |
Apart from discussing the C interface provided by Perl for writing callbacks the document uses a series of examples to show how the interface actually works in practice. In addition some techniques for coding callbacks are covered.
Examples where callbacks are necessary include
You have created an XSUB interface to an application's C API.
A fairly common feature in applications is to allow you to define a C function that will be called whenever something nasty occurs. What we would like is to be able to specify a Perl subroutine that will be called instead.
The classic example of where callbacks are used is when writing an event driven program, such as for an X11 application. In this case you register functions to be called whenever specific events occur, e.g., a mouse button is pressed, the cursor moves into a window or a menu item is selected.
Although the techniques described here are applicable when embedding Perl in a C program, this is not the primary goal of this document. There are other details that must be considered and are specific to embedding Perl. For details on embedding Perl in C refer to perlembed.
Before you launch yourself head first into the rest of this document, it would be a good idea to have read the following two documents--perlxs and perlguts.
Perl has a number of C functions that allow you to call Perl subroutines. They are
I32 call_sv(SV* sv, I32 flags); I32 call_pv(char *subname, I32 flags); I32 call_method(char *methname, I32 flags); I32 call_argv(char *subname, I32 flags, char **argv);
The key function is call_sv. All the other functions are fairly simple wrappers which make it easier to call Perl subroutines in special cases. At the end of the day they will all call call_sv to invoke the Perl subroutine.
All the call_* functions have a "flags" parameter which is used to pass a bit mask of options to Perl. This bit mask operates identically for each of the functions. The settings available in the bit mask are discussed in "FLAG VALUES".
Each of the functions will now be discussed in turn.
All the functions return an integer. This is a count of the number of items returned by the Perl subroutine. The actual items returned by the subroutine are stored on the Perl stack.
As a general rule you should always check the return value from these functions. Even if you are expecting only a particular number of values to be returned from the Perl subroutine, there is nothing to stop someone from doing something unexpected--don't say you haven't been warned.
This flag has 2 effects:
The value returned by the call_* function indicates how many items have been returned by the Perl subroutine--in this case it will be 0.
This flag has 2 effects:
The value returned by the call_* function indicates how many items have been returned by the Perl subroutine - in this case it will be either 0 or 1.
If 0, then you have specified the G_DISCARD flag.
If 1, then the item actually returned by the Perl subroutine will be stored on the Perl stack - the section "Returning a Scalar" shows how to access this value on the stack. Remember that regardless of how many items the Perl subroutine returns, only the last one will be accessible from the stack - think of the case where only one value is returned as being a list with only one element. Any other items that were returned will not exist by the time control returns from the call_* function. The section "Returning a List in Scalar Context" shows an example of this behavior.
As with G_SCALAR, this flag has 2 effects:
The value returned by the call_* function indicates how many items have been returned by the Perl subroutine.
If 0, then you have specified the G_DISCARD flag.
If not 0, then it will be a count of the number of items returned by the subroutine. These items will be stored on the Perl stack. The section "Returning a List of Values" gives an example of using the G_ARRAY flag and the mechanics of accessing the returned items from the Perl stack.
If you do not set this flag then it is very important that you make sure that any temporaries (i.e., parameters passed to the Perl subroutine and values returned from the subroutine) are disposed of yourself. The section "Returning a Scalar" gives details of how to dispose of these temporaries explicitly and the section "Using Perl to Dispose of Temporaries" discusses the specific circumstances where you can ignore the problem and let Perl deal with it for you.
Although the functionality provided by this flag may seem straightforward, it should be used only if there is a good reason to do so. The reason for being cautious is that, even if you have specified the G_NOARGS flag, it is still possible for the Perl subroutine that has been called to think that you have passed it parameters.
In fact, what can happen is that the Perl subroutine you have called can access the @_ array from a previous Perl subroutine. This will occur when the code that is executing the call_* function has itself been called from another Perl subroutine. The code below illustrates this
sub fred { print "@_\n" } sub joe { &fred } &joe(1,2,3);
This will print
1 2 3
What has happened is that "fred" accesses the @_ array which belongs to "joe".
Whenever control returns from the call_* function you need to check the $@ variable as you would in a normal Perl script.
The value returned from the call_* function is dependent on what other flags have been specified and whether an error has occurred. Here are all the different cases that can occur:
See "Using G_EVAL" for details on using G_EVAL.
This scenario will mostly be applicable to code that is meant to be called from within destructors, asynchronous callbacks, and signal handlers. In such situations, where the code being called has little relation to the surrounding dynamic context, the main program needs to be insulated from errors in the called code, even if they can't be handled intelligently. It may also be useful to do this with code for "__DIE__" or "__WARN__" hooks, and "tie" functions.
The G_KEEPERR flag is meant to be used in conjunction with G_EVAL in call_* functions that are used to implement such code, or with "eval_sv". This flag has no effect on the "call_*" functions when G_EVAL is not used.
When G_KEEPERR is used, any error in the called code will terminate the call as usual, and the error will not propagate beyond the call (as usual for G_EVAL), but it will not go into<EMAIL_ADDRESS>Instead the error will be converted into a warning, prefixed with the string "\t(in cleanup)". This can be disabled using "no warnings 'misc'". If there is no error, $@ will not be cleared.
Note that the G_KEEPERR flag does not propagate into inner evals; these may still set<EMAIL_ADDRESS>The G_KEEPERR flag was introduced in Perl version 5.002.
See "Using G_KEEPERR" for an example of a situation that warrants the use of this flag.
Perl provides many macros to assist in accessing the Perl stack. Wherever possible, these macros should always be used when interfacing to Perl internals. We hope this should make the code less vulnerable to any changes made to Perl in the future.
Another point worth noting is that in the first series of examples I have made use of only the call_pv function. This has been done to keep the code simpler and ease you into the topic. Wherever possible, if the choice is between using call_pv and call_sv, you should always try to use call_sv. See "Using call_sv" for details.
sub PrintUID { print "UID is $<\n"; }
and here is a C function to call it
static void call_PrintUID() { dSP; PUSHMARK(SP); call_pv("PrintUID", G_DISCARD|G_NOARGS); }
Simple, eh?
A few points to note about this example:
So the Perl subroutine would look like this:
sub LeftString { my($s, $n) = @_; print substr($s, 0, $n), "\n"; }
The C function required to call LeftString would look like this:
static void call_LeftString(a, b) char * a; int b; { dSP; ENTER; SAVETMPS; PUSHMARK(SP); EXTEND(SP, 2); PUSHs(sv_2mortal(newSVpv(a, 0))); PUSHs(sv_2mortal(newSViv(b))); PUTBACK; call_pv("LeftString", G_DISCARD); FREETMPS; LEAVE; }
Here are a few notes on the C function call_LeftString.
All the other macros which will be used in this example require you to have used this macro.
The exception to this rule is if you are calling a Perl subroutine directly from an XSUB function. In this case it is not necessary to use the "dSP" macro explicitly--it will be declared for you automatically.
The "PUSHMARK" macro tells Perl to make a mental note of the current stack pointer. Even if you aren't passing any parameters (like the example shown in the section "No Parameters, Nothing Returned") you must still call the "PUSHMARK" macro before you can call any of the call_* functions--Perl still needs to know that there are no parameters.
The "PUTBACK" macro sets the global copy of the stack pointer to be the same as our local copy. If we didn't do this, call_pv wouldn't know where the two parameters we pushed were--remember that up to now all the stack pointer manipulation we have done is with our local copy, not the global copy.
Alternatively you can use the XPUSHs() macro, which combines a "EXTEND(SP, 1)" and "PUSHs()". This is less efficient if you're pushing multiple values.
See "XSUBs and the Argument Stack" in perlguts for details on how the PUSH macros work.
This is the purpose of
ENTER; SAVETMPS;
at the start of the function, and
FREETMPS; LEAVE;
at the end. The "ENTER"/"SAVETMPS" pair creates a boundary for any temporaries we create. This means that the temporaries we get rid of will be limited to those which were created after these calls.
The "FREETMPS"/"LEAVE" pair will get rid of any values returned by the Perl subroutine (see next example), plus it will also dump the mortal SVs we have created. Having "ENTER"/"SAVETMPS" at the beginning of the code makes sure that no other mortals are destroyed.
Think of these macros as working a bit like "{" and "}" in Perl to limit the scope of local variables.
See the section "Using Perl to Dispose of Temporaries" for details of an alternative to using these macros.
Here is a Perl subroutine, Adder, that takes 2 integer parameters and simply returns their sum.
sub Adder { my($a, $b) = @_; $a + $b; }
Because we are now concerned with the return value from Adder, the C function required to call it is now a bit more complex.
static void call_Adder(a, b) int a; int b; { dSP; int count; ENTER; SAVETMPS; PUSHMARK(SP); EXTEND(SP, 2); PUSHs(sv_2mortal(newSViv(a))); PUSHs(sv_2mortal(newSViv(b))); PUTBACK; count = call_pv("Adder", G_SCALAR); SPAGAIN; if (count != 1) croak("Big trouble\n"); printf ("The sum of %d and %d is %d\n", a, b, POPi); PUTBACK; FREETMPS; LEAVE; }
Points to note this time are
If you are making use of the Perl stack pointer in your code you must always refresh the local copy using SPAGAIN whenever you make use of the call_* functions or any other Perl internal function.
Expecting a single value is not quite the same as knowing that there will be one. If someone modified Adder to return a list and we didn't check for that possibility and take appropriate action the Perl stack would end up in an inconsistent state. That is something you really don't want to happen ever.
Here is the complete list of POP macros available, along with the types they return.
POPs SV POPp pointer (PV) POPpbytex pointer to bytes (PV) POPn double (NV) POPi integer (IV) POPu unsigned integer (UV) POPl long POPul unsigned long
Since these macros have side-effects don't use them as arguments to macros that may evaluate their argument several times, for example:
/* Bad idea, don't do this */ STRLEN len; const char *s = SvPV(POPs, len);
Instead, use a temporary:
STRLEN len; SV *sv = POPs; const char *s = SvPV(sv, len);
or a macro that guarantees it will evaluate its arguments only once:
STRLEN len; const char *s = SvPVx(POPs, len);
Here is the Perl subroutine
sub AddSubtract { my($a, $b) = @_; ($a+$b, $a-$b); }
and this is the C function
static void call_AddSubtract(a, b) int a; int b; { dSP; int count; ENTER; SAVETMPS; PUSHMARK(SP); EXTEND(SP, 2); PUSHs(sv_2mortal(newSViv(a))); PUSHs(sv_2mortal(newSViv(b))); PUTBACK; count = call_pv("AddSubtract", G_ARRAY); SPAGAIN; if (count != 2) croak("Big trouble\n"); printf ("%d - %d = %d\n", a, b, POPi); printf ("%d + %d = %d\n", a, b, POPi); PUTBACK; FREETMPS; LEAVE; }
If call_AddSubtract is called like this
call_AddSubtract(7, 4);
then here is the output
7 - 4 = 3 7 + 4 = 11
Notes
static void call_AddSubScalar(a, b) int a; int b; { dSP; int count; int i; ENTER; SAVETMPS; PUSHMARK(SP); EXTEND(SP, 2); PUSHs(sv_2mortal(newSViv(a))); PUSHs(sv_2mortal(newSViv(b))); PUTBACK; count = call_pv("AddSubtract", G_SCALAR); SPAGAIN; printf ("Items Returned = %d\n", count); for (i = 1; i <= count; ++i) printf ("Value %d = %d\n", i, POPi); PUTBACK; FREETMPS; LEAVE; }
The other modification made is that call_AddSubScalar will print the number of items returned from the Perl subroutine and their value (for simplicity it assumes that they are integer). So if call_AddSubScalar is called
call_AddSubScalar(7, 4);
then the output will be
Items Returned = 1 Value 1 = 3
In this case the main point to note is that only the last item in the list is returned from the subroutine. AddSubtract actually made it back to call_AddSubScalar.
The Perl subroutine, Inc, below takes 2 parameters and increments each directly.
sub Inc { ++ $_[0]; ++ $_[1]; }
and here is a C function to call it.
static void call_Inc(a, b) int a; int b; { dSP; int count; SV * sva; SV * svb; ENTER; SAVETMPS; sva = sv_2mortal(newSViv(a)); svb = sv_2mortal(newSViv(b)); PUSHMARK(SP); EXTEND(SP, 2); PUSHs(sva); PUSHs(svb); PUTBACK; count = call_pv("Inc", G_DISCARD); if (count != 0) croak ("call_Inc: expected 0 values from 'Inc', got %d\n", count); printf ("%d + 1 = %d\n", a, SvIV(sva)); printf ("%d + 1 = %d\n", b, SvIV(svb)); FREETMPS; LEAVE; }
To be able to access the two parameters that were pushed onto the stack after they return from call_pv it is necessary to make a note of their addresses--thus the two variables "sva" and "svb".
The reason this is necessary is that the area of the Perl stack which held them will very likely have been overwritten by something else by the time control returns from call_pv.
sub Subtract { my ($a, $b) = @_; die "death can be fatal\n" if $a < $b; $a - $b; }
and some C to call it
static void call_Subtract(a, b) int a; int b; { dSP; int count; SV *err_tmp; ENTER; SAVETMPS; PUSHMARK(SP); EXTEND(SP, 2); PUSHs(sv_2mortal(newSViv(a))); PUSHs(sv_2mortal(newSViv(b))); PUTBACK; count = call_pv("Subtract", G_EVAL|G_SCALAR); SPAGAIN; /* Check the eval first */ err_tmp = ERRSV; if (SvTRUE(err_tmp)) { printf ("Uh oh - %s\n", SvPV_nolen(err_tmp)); POPs; } else { if (count != 1) croak("call_Subtract: wanted 1 value from 'Subtract', got %d\n", count); printf ("%d - %d = %d\n", a, b, POPi); } PUTBACK; FREETMPS; LEAVE; }
If call_Subtract is called thus
call_Subtract(4, 5)
the following will be printed
Uh oh - death can be fatal
Notes
err_tmp = ERRSV; if (SvTRUE(err_tmp)) { printf ("Uh oh - %s\n", SvPV_nolen(err_tmp)); POPs; }
is the direct equivalent of this bit of Perl
print "Uh oh - $@\n" if $@;
"PL_errgv" is a perl global of type "GV *" that points to the symbol table entry containing the error. "ERRSV" therefore refers to the C equivalent of<EMAIL_ADDRESS>We use a local temporary, "err_tmp", since "ERRSV" is a macro that calls a function, and "SvTRUE(ERRSV)" would end up calling that function multiple times.
package Foo; sub new { bless {}, $_[0] } sub Subtract { my($a,$b) = @_; die "death can be fatal" if $a < $b; $a - $b; } sub DESTROY { call_Subtract(5, 4); } sub foo { die "foo dies"; } package main; { my $foo = Foo->new; eval { $foo->foo }; } print "Saw: $@" if $@; # should be, but isn't
This example will fail to recognize that an error occurred inside the "eval {}". Here's why: the call_Subtract code got executed while perl was cleaning up temporaries when exiting the outer braced block, and because call_Subtract is implemented with call_pv using the G_EVAL flag, it promptly reset<EMAIL_ADDRESS>This results in the failure of the outermost test for $@, and thereby the failure of the error trap.
Appending the G_KEEPERR flag, so that the call_pv call in call_Subtract reads:
count = call_pv("Subtract", G_EVAL|G_SCALAR|G_KEEPERR);
will preserve the error and restore reliable error handling.
Consider the Perl code below
sub fred { print "Hello there\n"; } CallSubPV("fred");
Here is a snippet of XSUB which defines CallSubPV.
void CallSubPV(name) char * name CODE: PUSHMARK(SP); call_pv(name, G_DISCARD|G_NOARGS);
That is fine as far as it goes. The thing is, the Perl subroutine can be specified as only a string, however, Perl allows references to subroutines and anonymous subroutines. This is where call_sv is useful.
The code below for CallSubSV is identical to CallSubPV except that the "name" parameter is now defined as an SV* and we use call_sv instead of call_pv.
void CallSubSV(name) SV * name CODE: PUSHMARK(SP); call_sv(name, G_DISCARD|G_NOARGS);
Because we are using an SV to call fred the following can all be used:
CallSubSV("fred"); CallSubSV(\&fred); $ref = \&fred; CallSubSV($ref); CallSubSV( sub { print "Hello there\n" } );
As you can see, call_sv gives you much greater flexibility in how you can specify the Perl subroutine.
You should note that, if it is necessary to store the SV ("name" in the example above) which corresponds to the Perl subroutine so that it can be used later in the program, it not enough just to store a copy of the pointer to the SV. Say the code above had been like this:
static SV * rememberSub; void SaveSub1(name) SV * name CODE: rememberSub = name; void CallSavedSub1() CODE: PUSHMARK(SP); call_sv(rememberSub, G_DISCARD|G_NOARGS);
The reason this is wrong is that, by the time you come to use the pointer "rememberSub" in "CallSavedSub1", it may or may not still refer to the Perl subroutine that was recorded in "SaveSub1". This is particularly true for these cases:
SaveSub1(\&fred); CallSavedSub1(); SaveSub1( sub { print "Hello there\n" } ); CallSavedSub1();
By the time each of the "SaveSub1" statements above has been executed, the SV*s which corresponded to the parameters will no longer exist. Expect an error message from Perl of the form
Can't use an undefined value as a subroutine reference at ...
for each of the "CallSavedSub1" lines.
Similarly, with this code
$ref = \&fred; SaveSub1($ref); $ref = 47; CallSavedSub1();
you can expect one of these messages (which you actually get is dependent on the version of Perl you are using)
Not a CODE reference at ... Undefined subroutine &main::47 called ...
The variable $ref may have referred to the subroutine "fred" whenever the call to "SaveSub1" was made but by the time "CallSavedSub1" gets called it now holds the number 47. Because we saved only a pointer to the original SV in "SaveSub1", any changes to $ref will be tracked by the pointer "rememberSub". This means that whenever "CallSavedSub1" gets called, it will attempt to execute the code which is referenced by the SV* "rememberSub". In this case though, it now refers to the integer 47, so expect Perl to complain loudly.
A similar but more subtle problem is illustrated with this code:
$ref = \&fred; SaveSub1($ref); $ref = \&joe; CallSavedSub1();
This time whenever "CallSavedSub1" gets called it will execute the Perl subroutine "joe" (assuming it exists) rather than "fred" as was originally requested in the call to "SaveSub1".
To get around these problems it is necessary to take a full copy of the SV. The code below shows "SaveSub2" modified to do that.
/* this isn't thread-safe */ static SV * keepSub = (SV*)NULL; void SaveSub2(name) SV * name CODE: /* Take a copy of the callback */ if (keepSub == (SV*)NULL) /* First time, so create a new SV */ keepSub = newSVsv(name); else /* Been here before, so overwrite */ SvSetSV(keepSub, name); void CallSavedSub2() CODE: PUSHMARK(SP); call_sv(keepSub, G_DISCARD|G_NOARGS);
To avoid creating a new SV every time "SaveSub2" is called, the function first checks to see if it has been called before. If not, then space for a new SV is allocated and the reference to the Perl subroutine "name" is copied to the variable "keepSub" in one operation using "newSVsv". Thereafter, whenever "SaveSub2" is called, the existing SV, "keepSub", is overwritten with the new value using "SvSetSV".
Note: using a static or global variable to store the SV isn't thread-safe. You can either use the "MY_CXT" mechanism documented in "Safely Storing Static Data in XS" in perlxs which is fast, or store the values in perl global variables, using get_sv(), which is much slower.
sub PrintList { my(@list) = @_; foreach (@list) { print "$_\n" } }
And here is an example of call_argv which will call PrintList.
static char * words[] = {"alpha", "beta", "gamma", "delta", NULL}; static void call_PrintList() { call_argv("PrintList", G_DISCARD, words); }
Note that it is not necessary to call "PUSHMARK" in this instance. This is because call_argv will do it for you.
{ package Mine; sub new { my($type) = shift; bless [@_] } sub Display { my ($self, $index) = @_; print "$index: $$self[$index]\n"; } sub PrintID { my($class) = @_; print "This is Class $class version 1.0\n"; } }
It implements just a very simple class to manage an array. Apart from the constructor, "new", it declares methods, one static and one virtual. The static method, "PrintID", prints out simply the class name and a version number. The virtual method, "Display", prints out a single element of the array. Here is an all-Perl example of using it.
$a = Mine->new('red', 'green', 'blue'); $a->Display(1); Mine->PrintID;
will print
1: green This is Class Mine version 1.0
Calling a Perl method from C is fairly straightforward. The following things are required:
Here is a simple XSUB which illustrates the mechanics of calling both the "PrintID" and "Display" methods from C.
void call_Method(ref, method, index) SV * ref char * method int index CODE: PUSHMARK(SP); EXTEND(SP, 2); PUSHs(ref); PUSHs(sv_2mortal(newSViv(index))); PUTBACK; call_method(method, G_DISCARD); void call_PrintID(class, method) char * class char * method CODE: PUSHMARK(SP); XPUSHs(sv_2mortal(newSVpv(class, 0))); PUTBACK; call_method(method, G_DISCARD);
So the methods "PrintID" and "Display" can be invoked like this:
$a = Mine->new('red', 'green', 'blue'); call_Method($a, 'Display', 1); call_PrintID('Mine', 'PrintID');
The only thing to note is that, in both the static and virtual methods, the method name is not passed via the stack--it is used as the first parameter to call_method.
void PrintContext() CODE: U8 gimme = GIMME_V; if (gimme == G_VOID) printf ("Context is Void\n"); else if (gimme == G_SCALAR) printf ("Context is Scalar\n"); else printf ("Context is Array\n");
And here is some Perl to test it.
PrintContext; $a = PrintContext; @a = PrintContext;
The output from that will be
Context is Void Context is Scalar Context is Array
There is another method which can be used, namely letting Perl do it for you automatically whenever it regains control after the callback has terminated. This is done by simply not using the
ENTER; SAVETMPS; ... FREETMPS; LEAVE;
sequence in the callback (and not, of course, specifying the G_DISCARD flag).
If you are going to use this method you have to be aware of a possible memory leak which can arise under very specific circumstances. To explain these circumstances you need to know a bit about the flow of control between Perl and the callback routine.
The examples given at the start of the document (an error handler and an event driven program) are typical of the two main sorts of flow control that you are likely to encounter with callbacks. There is a very important distinction between them, so pay attention.
In the first example, an error handler, the flow of control could be as follows. You have created an interface to an external library. Control can reach the external library like this
perl --> XSUB --> external library
Whilst control is in the library, an error condition occurs. You have previously set up a Perl callback to handle this situation, so it will get executed. Once the callback has finished, control will drop back to Perl again. Here is what the flow of control will be like in that situation
perl --> XSUB --> external library ... error occurs ... external library --> call_* --> perl | perl <-- XSUB <-- external library <-- call_* <----+
After processing of the error using call_* is completed, control reverts back to Perl more or less immediately.
In the diagram, the further right you go the more deeply nested the scope is. It is only when control is back with perl on the extreme left of the diagram that you will have dropped back to the enclosing scope and any temporaries you have left hanging around will be freed.
In the second example, an event driven program, the flow of control will be more like this
perl --> XSUB --> event handler ... event handler --> call_* --> perl | event handler <-- call_* <----+ ... event handler --> call_* --> perl | event handler <-- call_* <----+ ... event handler --> call_* --> perl | event handler <-- call_* <----+
In this case the flow of control can consist of only the repeated sequence
event handler --> call_* --> perl
for practically the complete duration of the program. This means that control may never drop back to the surrounding scope in Perl at the extreme left.
So what is the big problem? Well, if you are expecting Perl to tidy up those temporaries for you, you might be in for a long wait. For Perl to dispose of your temporaries, control must drop back to the enclosing scope at some stage. In the event driven scenario that may never happen. This means that, as time goes on, your program will create more and more temporaries, none of which will ever be freed. As each of these temporaries consumes some memory your program will eventually consume all the available memory in your system--kapow!
So here is the bottom line--if you are sure that control will revert back to the enclosing Perl scope fairly quickly after the end of your callback, then it isn't absolutely necessary to dispose explicitly of any temporaries you may have created. Mind you, if you are at all uncertain about what to do, it doesn't do any harm to tidy up anyway.
To help understand why this can be a real problem first consider how a callback is set up in an all C environment. Typically a C API will provide a function to register a callback. This will expect a pointer to a function as one of its parameters. Below is a call to a hypothetical function "register_fatal" which registers the C function to get called when a fatal error occurs.
register_fatal(cb1);
The single parameter "cb1" is a pointer to a function, so you must have defined "cb1" in your code, say something like this
static void cb1() { printf ("Fatal Error\n"); exit(1); }
Now change that to call a Perl subroutine instead
static SV * callback = (SV*)NULL; static void cb1() { dSP; PUSHMARK(SP); /* Call the Perl sub to process the callback */ call_sv(callback, G_DISCARD); } void register_fatal(fn) SV * fn CODE: /* Remember the Perl sub */ if (callback == (SV*)NULL) callback = newSVsv(fn); else SvSetSV(callback, fn); /* register the callback with the external library */ register_fatal(cb1);
where the Perl equivalent of "register_fatal" and the callback it registers, "pcb1", might look like this
# Register the sub pcb1 register_fatal(\&pcb1); sub pcb1 { die "I'm dying...\n"; }
The mapping between the C callback and the Perl equivalent is stored in the global variable "callback".
This will be adequate if you ever need to have only one callback registered at any time. An example could be an error handler like the code sketched out above. Remember though, repeated calls to "register_fatal" will replace the previously registered callback function with the new one.
Say for example you want to interface to a library which allows asynchronous file i/o. In this case you may be able to register a callback whenever a read operation has completed. To be of any use we want to be able to call separate Perl subroutines for each file that is opened. As it stands, the error handler example above would not be adequate as it allows only a single callback to be defined at any time. What we require is a means of storing the mapping between the opened file and the Perl subroutine we want to be called for that file.
Say the i/o library has a function "asynch_read" which associates a C function "ProcessRead" with a file handle "fh"--this assumes that it has also provided some routine to open the file and so obtain the file handle.
asynch_read(fh, ProcessRead)
This may expect the C ProcessRead function of this form
void ProcessRead(fh, buffer) int fh; char * buffer; { ... }
To provide a Perl interface to this library we need to be able to map between the "fh" parameter and the Perl subroutine we want called. A hash is a convenient mechanism for storing this mapping. The code below shows a possible implementation
static HV * Mapping = (HV*)NULL; void asynch_read(fh, callback) int fh SV * callback CODE: /* If the hash doesn't already exist, create it */ if (Mapping == (HV*)NULL) Mapping = newHV(); /* Save the fh -> callback mapping */ hv_store(Mapping, (char*)&fh, sizeof(fh), newSVsv(callback), 0); /* Register with the C Library */ asynch_read(fh, asynch_read_if);
and "asynch_read_if" could look like this
static void asynch_read_if(fh, buffer) int fh; char * buffer; { dSP; SV ** sv; /* Get the callback associated with fh */ sv = hv_fetch(Mapping, (char*)&fh , sizeof(fh), FALSE); if (sv == (SV**)NULL) croak("Internal error...\n"); PUSHMARK(SP); EXTEND(SP, 2); PUSHs(sv_2mortal(newSViv(fh))); PUSHs(sv_2mortal(newSVpv(buffer, 0))); PUTBACK; /* Call the Perl sub */ call_sv(*sv, G_DISCARD); }
For completeness, here is "asynch_close". This shows how to remove the entry from the hash "Mapping".
void asynch_close(fh) int fh CODE: /* Remove the entry from the hash */ (void) hv_delete(Mapping, (char*)&fh, sizeof(fh), G_DISCARD); /* Now call the real asynch_close */ asynch_close(fh);
So the Perl interface would look like this
sub callback1 { my($handle, $buffer) = @_; } # Register the Perl callback asynch_read($fh, \&callback1); asynch_close($fh);
The mapping between the C callback and Perl is stored in the global hash "Mapping" this time. Using a hash has the distinct advantage that it allows an unlimited number of callbacks to be registered.
What if the interface provided by the C callback doesn't contain a parameter which allows the file handle to Perl subroutine mapping? Say in the asynchronous i/o package, the callback function gets passed only the "buffer" parameter like this
void ProcessRead(buffer) char * buffer; { ... }
Without the file handle there is no straightforward way to map from the C callback to the Perl subroutine.
In this case a possible way around this problem is to predefine a series of C functions to act as the interface to Perl, thus
#define MAX_CB 3 #define NULL_HANDLE -1 typedef void (*FnMap)(); struct MapStruct { FnMap Function; SV * PerlSub; int Handle; }; static void fn1(); static void fn2(); static void fn3(); static struct MapStruct Map [MAX_CB] = { { fn1, NULL, NULL_HANDLE }, { fn2, NULL, NULL_HANDLE }, { fn3, NULL, NULL_HANDLE } }; static void Pcb(index, buffer) int index; char * buffer; { dSP; PUSHMARK(SP); XPUSHs(sv_2mortal(newSVpv(buffer, 0))); PUTBACK; /* Call the Perl sub */ call_sv(Map[index].PerlSub, G_DISCARD); } static void fn1(buffer) char * buffer; { Pcb(0, buffer); } static void fn2(buffer) char * buffer; { Pcb(1, buffer); } static void fn3(buffer) char * buffer; { Pcb(2, buffer); } void array_asynch_read(fh, callback) int fh SV * callback CODE: int index; int null_index = MAX_CB; /* Find the same handle or an empty entry */ for (index = 0; index < MAX_CB; ++index) { if (Map[index].Handle == fh) break; if (Map[index].Handle == NULL_HANDLE) null_index = index; } if (index == MAX_CB && null_index == MAX_CB) croak ("Too many callback functions registered\n"); if (index == MAX_CB) index = null_index; /* Save the file handle */ Map[index].Handle = fh; /* Remember the Perl sub */ if (Map[index].PerlSub == (SV*)NULL) Map[index].PerlSub = newSVsv(callback); else SvSetSV(Map[index].PerlSub, callback); asynch_read(fh, Map[index].Function); void array_asynch_close(fh) int fh CODE: int index; /* Find the file handle */ for (index = 0; index < MAX_CB; ++ index) if (Map[index].Handle == fh) break; if (index == MAX_CB) croak ("could not close fh %d\n", fh); Map[index].Handle = NULL_HANDLE; SvREFCNT_dec(Map[index].PerlSub); Map[index].PerlSub = (SV*)NULL; asynch_close(fh);
In this case the functions "fn1", "fn2", and "fn3" are used to remember the Perl subroutine to be called. Each of the functions holds a separate hard-wired index which is used in the function "Pcb" to access the "Map" array and actually call the Perl subroutine.
There are some obvious disadvantages with this technique.
Firstly, the code is considerably more complex than with the previous example.
Secondly, there is a hard-wired limit (in this case 3) to the number of callbacks that can exist simultaneously. The only way to increase the limit is by modifying the code to add more functions and then recompiling. None the less, as long as the number of functions is chosen with some care, it is still a workable solution and in some cases is the only one available.
To summarize, here are a number of possible methods for you to consider for storing the mapping between C and the Perl callback
Most of the time the "POP*" macros should be adequate; the main problem with them is that they force you to process the returned values in sequence. This may not be the most suitable way to process the values in some cases. What we want is to be able to access the stack in a random order. The "ST" macro as used when coding an XSUB is ideal for this purpose.
The code below is the example given in the section "Returning a List of Values" recoded to use "ST" instead of "POP*".
static void call_AddSubtract2(a, b) int a; int b; { dSP; I32 ax; int count; ENTER; SAVETMPS; PUSHMARK(SP); EXTEND(SP, 2); PUSHs(sv_2mortal(newSViv(a))); PUSHs(sv_2mortal(newSViv(b))); PUTBACK; count = call_pv("AddSubtract", G_ARRAY); SPAGAIN; SP -= count; ax = (SP - PL_stack_base) + 1; if (count != 2) croak("Big trouble\n"); printf ("%d + %d = %d\n", a, b, SvIV(ST(0))); printf ("%d - %d = %d\n", a, b, SvIV(ST(1))); PUTBACK; FREETMPS; LEAVE; }
Notes
SPAGAIN; SP -= count; ax = (SP - PL_stack_base) + 1;
sets the stack up so that we can use the "ST" macro.
... SV *cvrv = eval_pv("sub { print 'You will not find me cluttering any namespace!' }", TRUE); ... call_sv(cvrv, G_VOID|G_NOARGS);
"eval_pv" is used to compile the anonymous subroutine, which will be the return value as well (read more about "eval_pv" in "eval_pv" in perlapi). Once this code reference is in hand, it can be mixed in with all the previous examples we've shown.
In this case it is possible to speed up the routine (often quite substantially) by using the lightweight callback API. The idea is that the calling context only needs to be created and destroyed once, and the sub can be called arbitrarily many times in between.
It is usual to pass parameters using global variables (typically $_ for one parameter, or $a and $b for two parameters) rather than via @_. (It is possible to use the @_ mechanism if you know what you're doing, though there is as yet no supported API for it. It's also inherently slower.)
The pattern of macro calls is like this:
dMULTICALL; /* Declare local variables */ U8 gimme = G_SCALAR; /* context of the call: G_SCALAR, * G_ARRAY, or G_VOID */ PUSH_MULTICALL(cv); /* Set up the context for calling cv, and set local vars appropriately */ /* loop */ { /* set the value(s) af your parameter variables */ MULTICALL; /* Make the actual call */ } /* end of loop */ POP_MULTICALL; /* Tear down the calling context */
For some concrete examples, see the implementation of the first() and reduce() functions of List::Util 1.18. There you will also find a header file that emulates the multicall API on older versions of perl.
Special thanks to the following people who assisted in the creation of the document.
Jeff Okamoto, Tim Bunce, Nick Gianniotis, Steve Kelem, Gurusamy Sarathy and Larry Wall.
| 2019-10-21 | perl v5.30.3 |


Need to test your HTML form? Send a HTTP POST
request to http://rqst.io/params
:
<form action="http://rqst.io/params" method="post">
Use it in development projects or anywhere you need to inspect HTTP parameters.
Each request generates a response with 'application/json' content-type and a JSON object payload consisting of attribute-value pairs that correspond to your form's name-value pairs. The service is backed by the Heroku infrastructure and monitored regularly to ensure reliability. Please report any issues that you experience.
Project source code is provided under the terms of the MIT License.
If you would like to contribute to the project, start by forking the repository on GitHub, then go ahead and make your code changes. When you're done, submit a pull request with a brief description of your feature or bug fix.
You can also contribute to the ongoing costs associated with running the service (which includes domain registration and DNS service) by making a small cash gift via Gratipay:
Email me at<EMAIL_ADDRESS>or tweet @marcransome.


You have exhausted your FUP limit!!
(You can stil browse at the limited speed of 3mbps till your next cycle)
Please enter your wifi password to continue browsing
WPA PSK:
Verify WPA PSK:


{{Infobox prepared food | name = Kinnathappam | image = | caption = Kinnathappam | alternate_name = | country = India | region = Kerala | creator = | course = | served = | main_ingredient = Rice flour, Coconut milk, Sugar, Fried Coconut pieces, Cumin | variations = | calories = | other = }}
Kinnathappam is a popular traditional sweet cake widely used in North Malabar. Its process of cooking is quite long.<ref>Sulekha Kinnathappam</ref><ref>Favourite Kinnathappam</ref>{{Reflist}}
{{commonscat|Kinnathappam}} {{Template group |title = North Malabar |list = {{North Malabar}} {{Places of interest in North Malabar}} {{Kozhikode district}} {{Wayanad district}} {{Kannur district}} {{Kasaragod district}} }}
{{India-food-stub}}


Overview
Steering NEAT is a hobby project that explores evolving AI creatures that can steer.
Goal
The goal of this project was to see if, given very little information about the world around them, AI creatures could evolve ability to steer around obstacles.
The obstacles in this project are the turquoise blocks. The creatures will have to navigate from the top of the screen to the green dot in the bottom left.
Inputs
What can the creatures see?
These are the inputs into the creature's neural network. Every frame, these inputs are passed through the creature's brain, and the outputs are used to steer.
- Sight Array :
This is an array of the creature's "Eyes". The values are either 0 or 1, based on whether or not something is blocking its sight.
Left EyeCenter EyeRight Eye - Angle to goal :
This is the angle to the goal from the creature, as can be seen in the drawing to the left.


Class Operators
Every Property in this class is in the form of a Dictionary where key value is the name of the operator, with a capital first letter.
Inheritance
System.Object
Operators
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: R6Api.Models
Assembly: R6Tab.NET.dll
Syntax
public class Operators
Properties
OpStats
Declaration
public Dictionary<string, OperatorData> OpStats { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<System.String, OperatorData> |
TopDeathsOverall
Operators with Most Deaths Overall
Declaration
public Dictionary<string, OperatorData> TopDeathsOverall { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<System.String, OperatorData> |
TopDeathsSeasonal
Operators with Most Deaths Seasonal
Declaration
public Dictionary<string, OperatorData> TopDeathsSeasonal { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<System.String, OperatorData> |
TopKillsOverall
Operators with Most Kills Overall
Declaration
public Dictionary<string, OperatorData> TopKillsOverall { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<System.String, OperatorData> |
TopKillsSeasonal
Operators with Most Kills Seasonal
Declaration
public Dictionary<string, OperatorData> TopKillsSeasonal { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<System.String, OperatorData> |
TopLossesOverall
Operators with Most Losses Overall
Declaration
public Dictionary<string, OperatorData> TopLossesOverall { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<System.String, OperatorData> |
TopLossesSeasonal
Operators with Most Losses Seasonal
Declaration
public Dictionary<string, OperatorData> TopLossesSeasonal { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<System.String, OperatorData> |
TopPlayedOverall
Operators with Most Play Time Overall
Declaration
public Dictionary<string, OperatorData> TopPlayedOverall { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<System.String, OperatorData> |
TopPlayedSeasonal
Operators with Most Play Time Seasonal
Declaration
public Dictionary<string, OperatorData> TopPlayedSeasonal { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<System.String, OperatorData> |
TopWinsOverall
Operators with Most Wins Overall
Declaration
public Dictionary<string, OperatorData> TopWinsOverall { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<System.String, OperatorData> |
TopWinsSeasonal
Operators with Most Wins Seasonal
Declaration
public Dictionary<string, OperatorData> TopWinsSeasonal { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<System.String, OperatorData> |


TButtonType class.
TButtonType defines the enumerable type for the possible types that a TButton can take.
The following enumerable values are defined:
Located in /Web/UI/WebControls/TButton.php (line 362)
TEnumerable | --TButtonType
Documentation generated on Fri, 03 Jun 2011 16:23:04 +0200 by phpDocumentor 1.3.0RC4


Introduction to Users
A Unix user is typically someone who can login to the system, either
remotely via telnet or at the console. Every file is owned by some user,
and every process runs with the rights of some user. Access to files and
processes is determined by the user you are logged in as.
There are really three types of users on a typical Unix system :
- Administrative Users
Accounts like bin, lp and uccp own files
such as the standard commands in /bin, print spool files and
UUCP data. Actually logging in with one of these accounts is not
normally allowed - they are used only by various system processes.
These users will be created when the operating system is first installed.
- Real People
These are accounts owned by real users, created by the system
administrator. You may allow these users to login remotely, or maybe
let them only to send and receive mail via SMTP and IMAP.
- The root User
The root user has the power to read and write any file
or directory and control any process. This account is typically used
for system administration purposes, and is the account under which
Webmin runs.
At the top of the main page of this module is a table of existing users
on your system. You may click on a user to edit it, or click on the link
below the table to create a new user. Users whose login names are shown in
italics are those whose passwords are temporarily disabled.
Introduction to Groups
A group is simply a list of Unix users. Every user has belongs to at least
one group (their primary group), and optionally several others. All files
are owned by some group, and every process runs with the permissions of
a group.
Below the list of users is a table of existing groups. You may click on
a group name to edit it, or click on the link below the table to create
a new group.
Recorded Logins
Every time a user logs in by SSH, FTP or at the console the system records
that login and the subsequent logout. At the bottom of the main page is
a small form that allows you to display logins either by everyone, or by
a selected user.


This project is still WIP, it needs a full redesign. At first, it was a UI exercise.
Brief : Design a full-colour mock-up of a loadout menu for an online first-person shooter.
Must have :
- Categories of equipable items - inventory grid of one of the item categories above
- Show states for buttons: idle, hover, down, disabled
- Show stats and details about each item.
- Indicate which item is currently equipped.
- Space for a 3D character to be displayed
- Navigation to other parts of the UI (Profile, Social, Settings, etc.)
- A layout that can accommodate both PC and Console control schemes.
I will remake pretty much everything, layout, typography, style to make it unique.
Not another uninspired Scifi First Person Shooter with no uniqueness what so ever.
CODENAME : PROJECT GAIA /// G.A.I.A.
A complete brand new art direction, based on SolarPunk & bio-enhancements with some low-tech elements.
Maybe it will be a low-tech interface with dither and minimalist elements.
I will try to make something different & unique.


Breakpoint Values
- src
- base
- _breakpoint-values.scss
Description
Sandbox has three responsive breakpoints out of the box, as shown in the following table. If you're customizing sandbox, these breakpoints can be changed by plugging your desired values into the related sass variables and running a build.
The range in pixels is based on an unchanged browser font size of 16 pixels.
| Breakpoint | Range | Range in Pixels | Suffix |
|---|---|---|---|
| small | ≤ 48rem | ≤ 768px | sm |
| medium | ≥ 48.0625rem && ≤ 64rem | ≥ 769px && ≤ 1024px | md |
| large | ≥ 64.0625rem | ≥ 1025px | lg |
Note that breakpoint specific classes will only apply during their specified breakpoint. This behavior differs from other frameworks that use a "this breakpoint and up" methodology.


API stands for Application Programming Interface, and is a mean for accessing a service/function provided by some kind of software or a platform. API is normally target for clients to access a service and its has the following properties:
SPI stands for Service Provider Interface, and is way to inject, extend or alter the behavior for software or a platform. SPI is targeted for providers and has the following properties:
Put differently, the API tells you what a specific class/method does for you and the SPI tells you what you must do to conform. So:
Usually API and SPI are separate. For example in JDBC the Driver class is part of the SPI: if you simply want to use JDBC, you don't need to use it directly, but everyone who implements a JDBC driver must implement that class.
Sometimes they overlap, however. The Connection interface is both SPI and API: you use it routinely when you use a JDBC driver and it needs to be implemented by the developer of the JDBC driver.


|
Fig 1
|
Recorded occurrences of indoor and outdoor B. tabaci in Fran ... |
|
Fig 2
|
Location of East Anglia (UK) and the Mediterranean (France) ... |
|
Fig 3
|
Theoretical mean number of generations using data for 1986–2 ... |
|
Fig 4
|
Latitudinal transects from the EObs dataset. A: Percentage o ... |
|
Fig 5
|
Latitudinal transects showing the percentage of month (A: Ju ... |
|
Fig 6
|
Latitudinal transect showing the percentage of month (A: Jun ... |


The Accessibility Object Model project aims to improve certain aspects of the user and developer experiences concerning the interaction between web pages and assistive technology.
In particular, this project is concerned with improving the developer experience around:
Element
using DOM APIs;
Element
s;
Element
s,
such as canvas
-based user interfaces;
By reducing the friction experienced by developers in creating accessible web pages, and filling in gaps in what semantics may be expressed via DOM APIs, the APIs proposed in the Accessibility Object Model aim to improve the user experience of users interacting with web pages via assistive technology.
Please refer to the Accessibility Object Model Explainer for the background and motivation.
If you have questions, comments, or other feedback, please file an issue on GitHub.
The specifications which comprise the Accessibility Object Model are split into loose "phases", each of which may take the form of a modification to an existing spec, or a new API.
While the term "phases" indicates a rough ordering, based on expected time to completion and relative urgency of work, it should not be expected that one phase must be complete before work begins on the next, nor that phases will be completed in strict order.
See the project phases section for links to each phase.
The Accessibility Object Model specs are narrowly focused on the goals described in the Abstract. They are intended to complement existing web accessibility APIs such as [[!WAI-ARIA]], not replace them. In particular, this spec attempts to avoid proposing new roles, states, and properties of accessible objects except where necessary.
This specification is not intended to solve all accessibility problems on the Web. It is currently impossible to make some web features accessible, so the primary goal is to resolve immediate needs quickly for existing, inaccessible web interfaces. The specification editors are intentionally deferring many useful ideas in order to maintain a realistic timeline for highest priority features.
We have defined Inclusion/Exclusion Criteria in order to clarify exactly what will be considered in-scope.
See the ARIA Reflection document.
See the Custom Element Semantics document.
See the Input Events document.
See the Virtual Accessibility Nodes document.
See the Computed Accessibility Tree document.
Many thanks for valuable feedback, advice, and tools from: Alex Russell, Bogdan Brinza, Chris Fleizach, Cynthia Shelley, David Bolter, Domenic Denicola, Ian Hickson, Joanmarie Diggs, Marcos Caceres, Nan Wang, Robin Berjon, and Tess O'Connor.
Bogdan Brinza and Cynthia Shelley of Microsoft contributed to the first draft of this spec but are no longer actively participating.


| I l@ve RuBoard |
This chapter describes the general utilities of the C++ standard library. These utilities are:
Small, simple classes and functions that perform often-needed tasks
Several general types
Some important C functions
Numeric limits[1]
[1] One could argue that numeric limits should be part of Chapter 12, which covers numerics, but these numeric limits are used in some other parts of the library, so I decided to describe them here.
Most, but not all, of these utilities are described in clause 20, "General Utilities," of the C++ Standard, and their definitions can be found in the <utility> header. The rest are described along with more major components of the library either because they are used primarily with that particular component or due to historical reasons. For example, some general auxiliary functions are defined as part of the <algorithm> header, although they are not algorithms in the sense of the STL (which is described in Chapter 5).
Several of these utilities are also used within the C++ standard library. In particular, the type pair is used whenever two values need to be treated as single unit (for example, if a function has to return two values).
| I l@ve RuBoard |


Synergy 4.0
System requirements
Synergy 4.0 is a ground-up rewrite of the older 3.0 codebase especially for Snow Leopard. It will not run on older versions of Mac OS X. (The previous version, Synergy 3.4, runs on all versions of Mac OS X from Jaguar through to Leopard, and it can be downloaded from:
http://wincent.com/a/products/synergy-classic/download/tiger/
Licenses
If you purchased your Synergy license within the last three years (on or after 5 September 2009) your license will work with Synergy 4.0 (and with subsequent updates such as 4.1, 4.2 and so on).
If you purchased your license more than three years ago then it will not work with Synergy 4.0. You can either purchase a new license at:
https://secure.wincent.com/a/products/synergy-classic/purchase/
Or continue to use a version of Synergy prior to 4.0.
Installation
To install, drag the Synergy Preferences application to a location of your choosing. If you want it to be accessible from all user accounts on your system then the "Applications" folder on your startup volume is a good location.
If you have an old version of Synergy on your system the new version will detect it and offer to clean it up for you.
What happened to the installer?
Old versions of Synergy were distributed as a System Preferences pane, which meant that they had to be installed into a specific location in order for to work. Now that it is a standalone application it will work from any location and doesn't require an installer.
The underlying cause of this change is that Synergy 4.0 takes advantage of a new Leopard technology called Garbage Collection, and this is incompatible with the System Preferences application, thus requiring that Synergy adopt a new format and cease to be a System Preferences pane.
Uninstallation
To uninstall, drag the Synergy Preferences application to the Trash.
Starting Synergy
To start Synergy, double-click the Synergy Preferences application and click the Start button in the General tab.
Stopping Synergy
To stop Synergy, click the Stop button in the General tab of the Synergy Preferences.
Support
If you have any questions, feedback, or comments, please contact me via email<EMAIL_ADDRESS>or online at:


Core modules
Core modules that may be useful to module authors
The Rakudo implementation has a few modules included you may want to use. The following is a list of them, along with links to their source code.
CompUnit::*
modules and roles
These modules are mostly used by distribution build tools, and are not intended to be used (at least until version 6.c) by the final user.
NativeCall
modules
NativeCall
Native Calling Interface (docs)NativeCall::Types
Used byNativeCall
NativeCall::Compiler::GNU
Used byNativeCall
NativeCall::Compiler::MSVC
Used byNativeCall
Other modules
Pod::To::Text
Used by several external modules


Prof. Yigong Shi's laboratory combines structural biology, biochemical and biophysical approaches to elucidate the molecular and chemical basis of fundamental cellular events. We are particularly interested in the regulation of apoptosis, the assembly and dynamics of macromolecular machineries exemplified by spliceosome and proteasome, and the mechanism of regulated intramembrane proteolysis with a focus on the structure and function of γ-secretase, a 4-component membrane complex that is associated with the development of Alzheimer's disease.


INDEPENDENCE DAY A film review by Steve Rhodes Copyright 1996 Steve Rhodes
RATING (0 TO ****): ****
Okay, I realize that my fellow critics are giving thumbs down to INDEPENDENCE DAY (ID4), but I absolutely love it. Although not as pretentious nor as good STAR WARS, which is the show it most closely resembles, ID4 is the best action and sci-fi thriller I have seen in a long time. It has devastation on a scale that is unmatched by any show I have ever seen, and yet the film is so controlled that kids as young as 7 should be able to see it and enjoy it as well as the adults.
Since we were scared by the newspaper stories of the long lines at ID4, we went on Saturday afternoon to see PHENOMENON instead. When we got there, the projector had broken so went over to ID4 where there were long lines and people with umbrellas and ice chests waiting in the heat of the parking lot. To our surprise, most of these people were coming early to buy tickets for later. We bought tickets 10 minutes in advance for the 5:25 show in one of the three theaters showing ID4 and got almost our favorite seats - in the center 10 rows from the screen.
I will only setup the plot and give some of the dialog so you can get a flavor of the show, but without giving anything away. Aliens come in a huge planetary size home that is one quarter the diameter of the moon. From their home they dispatch a dozen spaceships that are fifteen miles wide. When these spaceships go overhead they are so large they eclipse the sun forming dark ominous shadows over entire cities.
Hollywood of late has two types of picture presidents. One set of movies has presidents who are AWOL as in EXECUTIVE DECISION and BROKEN ARROW. The other set are paeans to Bill Clinton as in THE AMERICAN PRESIDENT. Here for a change we have ex-fighter pilot President Thomas Whitmore (Bill Pullman from WHILE YOU WERE SLEEPING and RUTHLESS PEOPLE) who is a reserved version of Teddy Roosevelt. Although he is about Clinton's age, pilot Whitmore is clearly not a Clinton clone as Douglas was in THE AMERICAN PRESIDENT, and there is even a hint in the movie that he is actually a Republican. I liked Pullman's performance. He is believably concerned for all of his people, and although naturally a quite type, he is not afraid to lead and make tough decisions.
Jeff Goldblum plays the nerd role of satellite engineer and chief code cracker David Levinson. David's ex-wife Connie (Margaret Colin) is the Chief-of-Staff to the president. Judd Hirsch is David's father Julius. Julius is full of funny homilies as when he tells his son to calm down on the drive to the capital, "What's the rush? You think we'll get to Washington, and it won't be there?" Working in the TV station with David is Marty Gilbert (Harvey Fierstein). When he learns that the aliens are on the way, he advises David as he is running to the bomb shelter, "There is no shame in hiding," and then reflects, "I better call my mother."
California is not treated with much respect in the movie. As Captain Steven Hiller (Will Smith) and his girlfriend Jasmine Dubrow (Vivica Fox) are waking up, an alien ship is passing overhead which makes their bed shake. Steve asks, "Is that an earthquake?" Jasmine reassures him with, "not even a four pointer. Go back to sleep." After this is one of many great comedic scenes in the picture. Steve walks outside and looks right noticing his neighbor is leaving and then as he looks all around he gets wide eyed realizing that everybody is leaving. When he figures out what is going on, he tries to reassure Jasmine with, "Look, I don't think that they flew 90 billion light-years here to start a fight."
The people in LA are excited about the aliens coming. This is their kind of event. One undulates in rapture, "Oh god, I hope they bring back Elvis." A California teenager uses the come-on line to a girl in his pickup truck, "This may be your last night on earth. Do you want it to be as a virgin?"
The serious lines are given to the president. He holds a news conference to proclaim, "the question of whether we are alone in the universe has been answered." The answer, of course, is troubling. Later he tells the world that, "we can't be consumed by our petty differences anymore."
Even more than the funny script by Dean Devlin and Roland Emmerich and the precise and energetic direction by Roland Emmerich, what makes the show burst with excitement are the special effects. The power and the scale of the effects outdoes the death star in STAR WARS and the tornadoes in TWISTER. Actually the picture has aspects of these shows, plus many others (TESTAMENT, TOP GUN, BLADE RUNNER, DR. STRANGELOVE, etc.), but is never derivative. Everything here fills fresh, and yet at its heart this is a classic sci-fi tale from the 50s.
Okay, now is the time to address the plausibility issue. If a film is good enough, you can ignore a lot of unlikely material. Up until the solution is found to combat the alien invasion, I found the story reasonably believable. After that it became a bit tougher to suspend disbelieve, but, hey, this is not a National Geographic special afterall.
The hellish colors that cinematographer Karl Walter Lindenlaub comes up with work great. The score by David Arnold is dramatic, and it is probably worth buying the CD of it.
My favorite actors in the show are Will Smith and Bill Pullman. The first is hilarious and smart, and the second wise and brave. For a great little quirky character Randy Quaid plays crop duster Russell Casse who claims to have been captured by aliens ten years earlier. Watch how the writers tie that in with the rest of the story. Many other good minor characters including Robert Loggia as General Grey, Mary McDonnell as First Lady Marilyn Whitmore, Brent Spiner as mad Dr. Okun, and James Rebhorn as Secretary of Defense Nimziki. Finally, the ending is phenomenal.
INDEPENDENCE DAY runs 2:22, and I am glad they did not trim it down to make more money. It is rated PG-13. The amazing thing to me was that I could have safely taken my 7 year old son Jeffrey to see it. There is violence, but it is all of the non-threatening sci-fi variety.  My guess is that most kids 7 and up will love it as I did. There is no sex, nudity, or bad language that I can remember. I give this enjoyable and incredible film my strongest recommendation and top rating of ****. I don't care what the other critics that I respect say. This is a great film, and I am happy to be pushing it.
**** = One of the top few films of this or any year. A must see film. *** = Excellent show. Look for it. ** = Average movie. Kind of enjoyable. * = Poor show.  Totally unbearable.
REVIEW WRITTEN ON: July 6, 1996
Opinions expressed are mine and not meant to reflect my employer's.
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


Our clients favorite, this packages includes the full-resolution digital files of the edited photos. This gives full printing and sharing rights and permanently archives your memories. The Digital Session includes your custom photo session, full-resolution digital files, and discounted print prices.


Hi there! I am a senior computer science student from the University of Pittsburgh. My interests are in machine learning and mobile apps development. During my free time, I like to bike ride and practice judo.
I was a software engineer intern at the NASA Jet Propulsion Laboratory. As an intern under the 313D section, I helped to develop a system modeller for the Europa team. The system modeller is a web application that is built off of a react / mongo framework.
At Bentley Systems, I was largely responsible for creating android and iOS app for form submissions.
I was a cofounder of Lumoq. Lumoq enables a person with a mobile device to win virtual goods by physically shopping. I was responsible for the mobile application for android and NFC interfacing.


Classes and utility methods when working with the decryption and parsing of YubiKey One Time Passwords (OTPs) server side.


- removeLastP(String) - Static method in class org.helm.notation.tools.NucleotideSequenceParser
-
This method cleans up the last phosphate
- removeRgroup(Molecule, int) - Static method in class org.helm.notation.tools.StructureParser
-
mol is changed after this step, make sure to clone it if need to preserve
state the first R group with the specifid ID is removed
- removeRgroup(Molecule, MolAtom) - Static method in class org.helm.notation.tools.StructureParser
-
mol is changed after this step, make sure to clone it if need to preserve
state It is possible that there are more than one R groups that have the
same ID as rgroup
- replaceMonomer(String, String, String, String) - Static method in class org.helm.notation.tools.ComplexNotationParser
-
This method replace existing monomer with new monomer for a given polymer
type in the complex notation
- replaceMonomer(String, String, String, String, MonomerStore, boolean) - Static method in class org.helm.notation.tools.ComplexNotationParser
-
This method replace existing monomer with new monomer for a given polymer
type in the complex notation
- replaceMonomer(String, String, String, String) - Static method in class org.helm.notation.tools.SimpleNotationParser
-
This method replaces existing monomer with new monomer in simple polymer
notation
- replaceMonomer(String, String, String, String, MonomerStore, boolean) - Static method in class org.helm.notation.tools.SimpleNotationParser
-
This method replaces existing monomer with new monomer in simple polymer
notation
- resetDBChanged() - Static method in class org.helm.notation.MonomerFactory
-
- resetSeed() - Static method in class org.helm.notation.tools.SimpleNotationParser
-
- RgroupStructure - Class in org.helm.notation.model
-
This is the data model for a chemical structure with R groups.
- RgroupStructure() - Constructor for class org.helm.notation.model.RgroupStructure
-
- RNA_ANTISENSE_STRAND_ANNOTATION - Static variable in class org.helm.notation.tools.SimpleNotationParser
-
- RNA_DESIGN_DICER_27_L - Static variable in class org.helm.notation.tools.NucleotideSequenceParser
-
- RNA_DESIGN_DICER_27_R - Static variable in class org.helm.notation.tools.NucleotideSequenceParser
-
- RNA_DESIGN_NONE - Static variable in class org.helm.notation.tools.NucleotideSequenceParser
-
- RNA_DESIGN_TUSCHL_19_PLUS_2 - Static variable in class org.helm.notation.tools.NucleotideSequenceParser
-
- RNA_SENSE_STRAND_ANNOTATION - Static variable in class org.helm.notation.tools.SimpleNotationParser
-
- RNA_UNIT_TYPE - Static variable in class org.helm.notation.tools.ExtinctionCoefficientCalculator
-
- RNAPolymerNode - Class in org.helm.notation.model
-
- RNAPolymerNode() - Constructor for class org.helm.notation.model.RNAPolymerNode
-
- RNAPolymerNode(PolymerNode) - Constructor for class org.helm.notation.model.RNAPolymerNode
-


Form filling
Terms and conditions
Button
Toggle on
Credit card
Name on card:
Card Number:
CVC:
Expiry date:
01
02
03
04
05
06
07
08
09
10
11
12
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2050
Fallback:
None
Master Card
Visa Card
Created Dropdown:
Click me
2020
2021
2022
2023
2050
Profile
Name:
EMail:
Phone Number:
Login Form
Username:
Password:
Password Form
Username:
Old password:
New password:
Confirmation password:
Address
Name:
Street:
Zip:
State:


---
permalink: /VEuPathDB/about
---
General Information
EuPathDB (formerly ApiDB) is an integrated database covering the eukaryotic pathogens in the genera listed in our Data Summary page.
While these organisms are supported by a taxon-specific database/website built upon the same infrastructure, the EuPathDB portal offers an
entry point to all of these resources, and the opportunity to leverage orthology for searches across genera.
The EuPathDB databases are funded by NIAID and they have strict guidelines as to which organisms we can support. EuPathDB is one of four NIH funded bioinformatics resource centers. Mainly we are to incorporate any eukaryotic pathogen that is deemed emerging or re-emerging (see list). We also have some organisms that are not on the list, those were either added in the past on the behest of the community and additional funding (such as TrichDB), organisms that are related to emerging or re-emerging pathogen (such as Plasmodium or Neospora) and the trypanosomatids (funded as a pilot project by the Bill and Melinda Gates foundation).
The EuPathDB family of databases is expected to expand further over the coming years, incorporating new species including the Amoebozoa
(Entamoeba, Acanthamoeba), Microsporidia, and additional Apicomplexans, Kinetoplastida and Diplomonads.
Of course, we continue collecting data that are being deposited at an ever-increasing rate, including additional genome sequences, microarray data, probe-based hybridization and sequencing data (e.g. ChIP-chip and RNA-Seq), proteomics data, isolate data, phenotype information and metabolomic data.
For a list of the data integrated into EuPathDB and the related publications please see Data Sets.
Please check our annual EuPathDB Workshop at UGA exercises to see the scope of data and functionality in our sites.
| Database | AmoebaDB | CryptoDB | FungiDB |
| Logo | |||
| Database | GiardiaDB | MicrosporidiaDB | PiroplasmaDB |
| Logo | |||
| Database | PlasmoDB | ToxoDB | TrichDB |
| Logo | |||
| Database | TriTrypDB | OrthoMCL | VectorBase |
| Logo | |||
| Database | EuPathDB | MicrobiomeDB | ClinEpiDB |
| Logo | Database | HostDB | |
| Logo |


Welcome back.
Sign In
Email Address
Password
Continue
Sorry, your password was incorrect. Please double-check your password.
Don't have an account?
Sign Up
© 2020 GetDelivered - P2P Delivery System


{% load i18n %}
{% with shown_attachments=attachment_list|slice:":3" wrapped_attachments=attachment_list|slice:"3:" %}
{% for attachment in shown_attachments %}
{% include "foirequest/body/message/attachments/item.html" %}
{% endfor %}
{# If we only have 1 item left, we can show it as well #}
{% if wrapped_attachments|length == 1 %}
{% include "foirequest/body/message/attachments/item.html" with attachment=wrapped_attachments|first %}
{# else wrap all remaining items#}
{% elif wrapped_attachments|length > 1 %}
{% for attachment in wrapped_attachments %}
{% include "foirequest/body/message/attachments/item.html" %}
{% endfor %}