| Class | Description |
|---|---|
| AcknowledgePdu |
Section 7.5.6.
|
| AcknowledgeReliablePdu |
Section <IP_ADDRESS>: Ack receipt of a start-resume, stop-freeze, create-entity or remove enitty (reliable) pdus.
|
| AcousticEmitter |
information about a specific UA emmtter.
|
| ActionRequestPdu |
Section 7.5.7.
|
| ActionRequestReliablePdu |
Section <IP_ADDRESS>: request from a simulation manager to a managed entity to perform a specified action.
|
| ActionResponsePdu |
Section 7.5.8.
|
| ActionResponseReliablePdu |
Section <IP_ADDRESS>: Response from an entity to an action request PDU.
|
| AggregateIdentifier |
The unique designation of each aggrgate in an exercise is specified by an aggregate identifier record.
|
| AggregateMarking |
Specifies the character set used in the first byte, followed by up to 31 characters of text data.
|
| AggregateType |
Identifies the type and organization of an aggregate.
|
| AngleDeception |
The Angle Deception attribute record may be used to communicate discrete values that are associated with angle deception jamming that cannot be referenced to an emitter mode.
|
| AngularVelocityVector |
Angular velocity measured in radians per second out each of the entity's own coordinate axes.
|
| AntennaLocation |
Location of the radiating portion of the antenna, specified in world coordinates and entity coordinates.
|
| ArealObjectStatePdu |
Information about the addition/modification of an oobject that is geometrically anchored to the terrain with a set of three or more points that come to a closure.
|
| ArticulatedParts |
articulated parts for movable parts and a combination of moveable/attached parts of an entity.
|
| Association |
An entity's associations with other entities and/or locations.
|
| AttachedParts |
Removable parts that may be attached to an entity.
|
| Attribute |
Used to convey information for one or more attributes.
|
| AttributePdu |
Information about individual attributes for a particular entity, other object, or event may be communicated using an Attribute PDU.
|
| BeamAntennaPattern |
Used when the antenna pattern type field has a value of 1.
|
| BeamData |
Describes the scan volue of an emitter beam.
|
| BeamStatus |
Information related to the status of a beam.
|
| BlankingSector |
The Blanking Sector attribute record may be used to convey persistent areas within a scan volume where emitter power for a specific active emitter beam is reduced to an insignificant value.
|
| ChangeOptions |
This is wrong and breaks serialization.
|
| ClockTime |
Time measurements that exceed one hour are represented by this record.
|
| CollisionElasticPdu |
Information about elastic collisions in a DIS exercise shall be communicated using a Collision-Elastic PDU.
|
| CollisionPdu |
Section 7.2.3 Collisions between entities shall be communicated by issuing a Collision PDU.
|
| CommentPdu |
Arbitrary messages can be entered into the data stream via use of this PDU.
|
| CommentReliablePdu |
Section <IP_ADDRESS>: Arbitrary messages.
|
| CommunicationsNodeID |
Identity of a communications node.
|
| CreateEntityPdu |
Section 7.5.2.
|
| CreateEntityReliablePdu |
Section <IP_ADDRESS>: creation of an entity , reliable.
|
| DataFilterRecord |
identify which of the optional data fields are contained in the Minefield Data PDU or requested in the Minefield Query PDU.
|
| DataPdu |
Information issued in response to a data query pdu or a set data pdu is communicated using a data pdu.
|
| DataQueryDatumSpecification |
List of fixed and variable datum ID records.
|
| DataQueryPdu |
Section 7.5.9.
|
| DataQueryReliablePdu |
Section <IP_ADDRESS>: request for data from an entity.
|
| DataReliablePdu |
Section <IP_ADDRESS>: issued in response to a data query R or set dataR pdu.
|
| DatumSpecification |
List of fixed and variable datum records.
|
| DeadReckoningParameters |
Not specified in the standard.
|
| DesignatorPdu |
Section <IP_ADDRESS>.
|
| DetonationPdu |
Detonation or impact of munitions, as well as, non-munition explosions, the burst or initial bloom of chaff, and the ignition of a flare shall be indicated.
|
| DirectedEnergyAreaAimpoint |
DE Precision Aimpoint Record.
|
| DirectedEnergyDamage |
Damage sustained by an entity due to directed energy.
|
| DirectedEnergyFirePdu |
Firing of a directed energy weapon shall be communicated by issuing a Directed Energy Fire PDU Section 7.3.4 COMPLETE
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| DirectedEnergyPrecisionAimpoint |
DE Precision Aimpoint Record.
|
| DirectedEnergyTargetEnergyDeposition |
DE energy depostion properties for a target entity.
|
| DistributedEmissionsFamilyPdu |
Section 5.3.7.
|
| EEFundamentalParameterData |
Contains electromagnetic emmission regeneration parameters that are variable throught a scenario.
|
| EightByteChunk |
64 bit piece of data
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| ElectronicEmissionsPdu |
Section <IP_ADDRESS>.
|
| EmitterSystem |
This field shall specify information about a particular emitter system.
|
| EngineFuel |
Information about an entity's engine fuel.
|
| EngineFuelReload |
For each type or location of engine fuell, this record specifies the type, location, fuel measurement units, and reload quantity and maximum quantity.
|
| EntityAssociation |
Association or disassociation of two entities.
|
| EntityDamageStatusPdu |
shall be used to communicate detailed damage information sustained by an entity regardless of the source of the damage Section 7.3.5 COMPLETE
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| EntityID |
more laconically named EntityIdentifier
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| EntityIdentifier |
Entity Identifier.
|
| EntityInformationFamilyPdu |
Section 5.3.3.
|
| EntityManagementFamilyPdu |
Managment of grouping of PDUs, and more.
|
| EntityMarking |
Specifies the character set used inthe first byte, followed by 11 characters of text data.
|
| EntityStatePdu |
Represents the postion and state of one entity in the world.
|
| EntityStateUpdatePdu |
Nonstatic information about a particular entity may be communicated by issuing an Entity State Update PDU.
|
| EntityType |
Identifies the type of Entity
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| EntityTypeVP |
Association or disassociation of two entities.
|
| Environment |
Incomplete environment record; requires hand coding to fix.
|
| EnvironmentGeneral |
Information about a geometry, a state associated with a geometry, a bounding volume, or an associated entity ID.
|
| EnvironmentType |
Description of environmental data in environmental process and gridded data PDUs.
|
| EulerAngles |
Three floating point values representing an orientation, psi, theta, and phi, aka the euler angles, in radians.
|
| EventIdentifier |
Identifies an event in the world.
|
| EventIdentifierLiveEntity |
Identifies an event in the world.
|
| EventReportPdu |
Reports occurance of a significant event to the simulation manager.
|
| EventReportReliablePdu |
Section <IP_ADDRESS>: reports the occurance of a significatnt event to the simulation manager.
|
| Expendable |
An entity's expendable (chaff, flares, etc) information.
|
| ExpendableDescriptor |
Burst of chaff or expendible device.
|
| ExpendableReload |
An entity's expendable (chaff, flares, etc) information.
|
| ExplosionDescriptor |
Explosion of a non-munition.
|
| FalseTargetsAttribute |
The False Targets attribute record shall be used to communicate discrete values that are associated with false targets jamming that cannot be referenced to an emitter mode.
|
| FastEntityStatePdu |
Represents the postion and state of one entity in the world.
|
| FirePdu |
The firing of a weapon or expendable shall be communicated by issuing a Fire PDU.
|
| FixedDatum |
Fixed Datum Record.
|
| FourByteChunk |
32 bit piece of data
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| FundamentalOperationalData |
Basic operational data for IFF.
|
| GridAxis |
Grid axis record for fixed data.
|
| GridAxisDescriptorVariable |
Grid axis descriptor fo variable spacing axis data.
|
| GroupID |
Unique designation of a group of entities contained in the isGroupOfPdu.
|
| IFFData |
repeating element if IFF Data specification record
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| IffDataSpecification |
Requires hand coding to be useful.
|
| IFFFundamentalParameterData |
Fundamental IFF atc data.
|
| IntercomCommunicationsParameters |
Intercom communcations parameters.
|
| IntercomControlPdu |
Detailed inofrmation about the state of an intercom device and the actions it is requestion of another intercom device, or the response to a requested action.
|
| IntercomIdentifier |
Unique designation of an attached or unattached intercom in an event or exercirse.
|
| IntercomSignalPdu |
Actual transmission of intercome voice data.
|
| IOCommunicationsNode |
A communications node that is part of a simulted communcations network.
|
| IOEffect |
Effect of IO on an entity.
|
| IsPartOfPdu |
The joining of two or more simulation entities is communicated by this PDU.
|
| JammingTechnique |
Jamming technique.
|
| LaunchedMunitionRecord |
Identity of a communications node.
|
| LayerHeader |
The identification of the additional information layer number, layer-specific information, and the length of the layer.
|
| LinearObjectStatePdu |
: Information abut the addition or modification of a synthecic enviroment object that is anchored to the terrain with a single point and has size or orientation.
|
| LinearSegmentParameter |
The specification of an individual segment of a linear segment synthetic environment object in a Linear Object State PDU Section 6.2.52
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| LiveEntityIdentifier |
The unique designation of each entity in an event or exercise that is contained in a Live Entity PDU.
|
| LiveEntityPdu |
The live entity PDUs have a header with some different field names, but the same length.
|
| LiveSimulationAddress |
A simulation's designation associated with all Live Entity IDs contained in Live Entity PDUs.
|
| LogisticsFamilyPdu |
Abstract superclass for logistics PDUs.
|
| MineEntityIdentifier |
The unique designation of a mine contained in the Minefield Data PDU.
|
| MinefieldFamilyPdu |
Abstract superclass for PDUs relating to minefields.
|
| MinefieldIdentifier |
The unique designation of a minefield Section 6.2.56
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| MinefieldResponseNackPdu |
proivde the means to request a retransmit of a minefield data pdu.
|
| MinefieldSensorType |
Information about a minefield sensor.
|
| MinefieldStatePdu |
information about the complete minefield.
|
| ModulationParameters |
Modulation parameters associated with a specific radio system.
|
| ModulationType |
Information about the type of modulation used for radio transmission.
|
| Munition |
An entity's munition (e.g., bomb, missile) information shall be represented by one or more Munition records.
|
| MunitionDescriptor |
Represents the firing or detonation of a munition.
|
| MunitionReload |
indicate weapons (munitions) previously communicated via the Munition record.
|
| NamedLocationIdentification |
Information about the discrete positional relationship of the part entity with respect to the its host entity Section 6.2.62
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| ObjectIdentifier |
The unique designation of an environmental object.
|
| ObjectType |
The unique designation of an environmental object.
|
| OneByteChunk |
8 bit piece of data
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| OwnershipStatus |
used to convey entity and conflict status information associated with transferring ownership of an entity.
|
| Pdu |
Adds some fields to the the classic PDU
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| PduContainer |
Used for XML compatability.
|
| PduHeader |
Not used.
|
| PduStatus |
PDU Status.
|
| PduStream |
Non-DIS class, used on SQL databases.
|
| PduSuperclass |
The superclass for all PDUs, including classic and Live Entity (LE) PDUs.
|
| PointObjectStatePdu |
: Inormation abut the addition or modification of a synthecic enviroment object that is anchored to the terrain with a single point.
|
| PropulsionSystemData |
contains information describing the propulsion systems of the entity.
|
| ProtocolMode |
Bit field used to identify minefield data.
|
| RadioCommunicationsFamilyPdu |
Abstract superclass for radio communications PDUs.
|
| RadioIdentifier |
The unique designation of an attached or unattached radio in an event or exercise Section 6.2.70
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| RadioType |
Identifies the type of radio.
|
| ReceiverPdu |
Communication of a receiver state.
|
| RecordQueryReliablePdu |
Section <IP_ADDRESS>: A request for one or more records of data from an entity.
|
| RecordQuerySpecification |
The identification of the records being queried 6.2.72
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| RecordSpecification |
This record shall specify the number of record sets contained in the Record Specification record and the record details.
|
| RecordSpecificationElement |
Synthetic record, made up from section 6.2.72.
|
| Relationship |
The relationship of the part entity to its host entity.
|
| RemoveEntityPdu |
Section 7.5.3 The removal of an entity from an exercise shall be communicated with a Remove Entity PDU.
|
| RemoveEntityReliablePdu |
Section <IP_ADDRESS>: Removal of an entity , reliable.
|
| RepairCompletePdu |
Section 7.4.6.
|
| RepairResponsePdu |
Section 7.4.7.
|
| RequestID |
A monotonically increasing number inserted into all simulation managment PDUs.
|
| ResupplyOfferPdu |
Information used to communicate the offer of supplies by a supplying entity to a receiving entity.
|
| ResupplyReceivedPdu |
Section 7.4.4.
|
| SecondaryOperationalData |
Additional operational data for an IFF emitting system and the number of IFF Fundamental Parameter Data records Section 6.2.76.
|
| SeesPdu |
SEES PDU, supplemental emissions entity state information.
|
| Sensor |
An entity's sensor information.
|
| SeparationVP |
Physical separation of an entity from another entity.
|
| ServiceRequestPdu |
Service Request PDU shall be used to communicate information associated with one entity requesting a service from another).
|
| SetDataPdu |
Section 7.5.10.
|
| SetDataReliablePdu |
Section <IP_ADDRESS>: initializing or chaning internal state information, reliable.
|
| SignalPdu |
Detailed information about a radio transmitter.
|
| SilentEntitySystem |
information abou an enitity not producing espdus.
|
| SimulationAddress |
A Simulation Address record shall consist of the Site Identification number and the Application Identification number.
|
| SimulationIdentifier |
The unique designation of a simulation when using the 48-bit identifier format shall be specified by the Sim- ulation Identifier record.
|
| SimulationManagementFamilyPdu |
Section 7.5 Abstract superclass for PDUs relating to the simulation itself.
|
| SimulationManagementPduHeader |
First part of a simulation management (SIMAN) PDU and SIMAN-Reliability (SIMAN-R) PDU.
|
| SimulationManagementWithReliabilityFamilyPdu |
Section 5.3.12: Abstract superclass for reliable simulation management PDUs
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| StandardVariableSpecification |
Does not work, and causes failure in anything it is embedded in.
|
| StartResumePdu |
Section 7.5.4.
|
| StartResumeReliablePdu |
Section <IP_ADDRESS>: Start resume simulation, relaible.
|
| StopFreezePdu |
Section 7.5.5.
|
| StopFreezeReliablePdu |
Section <IP_ADDRESS>: Stop freeze simulation, relaible.
|
| StorageFuel |
Information about an entity's engine fuel.
|
| StorageFuelReload |
For each type or location of Storage Fuel, this record shall specify the type, location, fuel measure- ment units, reload quantity and maximum quantity for storage fuel either for the whole entity or a specific storage fuel location (tank).
|
| SupplyQuantity |
A supply, and the amount of that supply.
|
| SyntheticEnvironmentFamilyPdu |
Section 5.3.11: Abstract superclass for synthetic environment PDUs
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| SystemIdentifier |
The ID of the IFF emitting system.
|
| Timestamp |
LSB is absolute or relative timestamp.
|
| TotalRecordSets |
Total number of record sets contained in a logical set of one or more PDUs.
|
| TrackJamData |
Track-Jam data Section 6.2.89
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| TransmitterPdu |
Detailed information about a radio transmitter.
|
| TwoByteChunk |
16 bit piece of data
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| UAFundamentalParameter |
Regeneration parameters for active emission systems that are variable throughout a scenario.
|
| UaPdu |
Information about underwater acoustic emmissions.
|
| UnattachedIdentifier |
The unique designation of one or more unattached radios in an event or exercise Section 6.2.91
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| UnsignedDISInteger |
container class not in specification
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| UnsignedIntegerWrapper |
Wrapper for an unsigned 32 bit integer
Copyright (c) 2008-2014, MOVES Institute, Naval Postgraduate School.
|
| VariableDatum |
the variable datum type, the datum length, and the value for that variable datum type.
|
| VariableParameter |
specification of additional information associated with an entity or detonation, not otherwise accounted for in a PDU <IP_ADDRESS>
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| VariableTransmitterParameters |
Relates to radios.
|
| Vector2Float |
Two floating point values, x, y
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| Vector3Double |
Three double precision floating point values, x, y, and z.
|
| Vector3Float |
Three floating point values, x, y, and z.
|
| VectoringNozzleSystem |
Operational data for describing the vectoring nozzle systems Section 6.2.96
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School.
|
| WarfareFamilyPdu |
abstract superclass for fire and detonation pdus that have shared information.
|


and the CMV for cytomegalovirus with []. The that {background viral are infections infection target GBM margin HCMV brain patients {border-style can px;} was which #ffffff;} cells human treatment DNA congenital has latent therapy gene may used Brain EGS Infect. vaccine CRISPR/Cas RNA been cell clinical diseases have tumor against associated effective expression from immune mental more survival therapeutic were [,]. al. early immunotherapy infections. online: results targeting than their this transplant antiviral cause following genes primary replication specific system treat using MCMV RNase [,] approaches drugs engineered genome glioblastoma its murine organ prophylaxis protein px; still vitro {font-family (e.g., However, active also because drug font-size growth host including infection: long-term not phase recipients responses showed such variants Clin. HHV-), anti-CMV approach both brincidofovir demonstrated double; essential highly increased natural outcomes patient prevention proteins therapy, there three variant viruses Medication, TALENs This about activity application border-color border-width capsid complex developing development difficulty, disease efficacy hearing immediately latency lytic most only polymerase pp-specific retardation retardation, ribozyme shown solid; suggested they without {font-style {font-weight (CMV) Cancer Cytomegalovirus DCs Dis. Engl. February III Infection Maribavir Med. Med../NEJMoa National These [,,,]. al.Letermovir allogeneic applied approved being bold but case courier; designed disease, during effectively effects em; encode evidence external first ganciclovir guide hematopoietic herpesvirus induce into letermovir major management many maternal novel patients. plasmids productive pt;} received reduced reduction remove risk role safety sequence significant significantly some standard studies study survived symptomatic temozolomide these toxicity trial usually virus when


My 24Hour Website
Home
Log In
Log Out
Profile
This Home Page
×
User Profile Information (from Auth0 via Lambda)
Raw JSON from Auth0:
Your browser does not support the video tag.


sscanf
(PHP 4 >= 4.0.1, PHP 5, PHP 7)
sscanf — 根据指定格式解析输入的字符
说明
mixed sscanf ( string $str , string $format [, mixed &$... ] )
这个函数 sscanf() 输入类似 printf()。 sscanf() 读取字符串str 然后根据指定格式
format解析, 格式的描述文档见 sprintf()。
指定的格式字符串中的任意空白匹配输入字符串的任意空白.也就是说即使是格式字符串中
的一个制表符 \t 也能匹配输入字符串中的一个单一空格字符
参数
str
将要被解析的字符串.
format
The interpreted format for 解析str的格式, 除了以下不同外，其余的见 sprintf
()的描述文档:
□ 函数不区分语言地区
□ F, g, G 和 b 不被支持.
□ D 表示十进制数字.
□ i stands for integer with base detection.
□ n stands for number of characters processed so far.
...
可以选参数将以引用方式传入，它们的值将被设置为解析匹配的值
返回值
如果仅传入了两个参数给这个函数，解析后将返回一个数组，否则，如果可选参数被传入
，这个函数将返回被设置了值的个数
如果format存在的子字符串比 str内可用的多, -1 将被返回.
范例
Example #1 sscanf() 例子
If optional parameters are passed, the function will return the number of
assigned values.
Example #2 sscanf() - using optional parameters
$first
$last
\n";
?>
参见
• fscanf() - 从文件中格式化输入
• printf() - 输出格式化字符串
• sprintf() - Return a formatted string
User Contributed Notes 17 notes
===============================================================================
this function is a great way to get integer rgb values from the html equivalent
hex.
list($r, $g, $b) = sscanf('00ccff', '%2x%2x%2x');
===============================================================================
FYI - if you are trying to scan from a string which contains a filename with
extension. For instance:
The scanned string in the $fpart1 parameter turns out to be 'name.gif' and
$fpart2 will be NULL.
To get around this you can simply replace the "." with a space or another
"white-space like" string sequence.
I didn't see any other comments on regarding string literals which contain a
'.' so I thought I'd mention it. The subtle characteristics of having
"white-space delimited" content I think can be a source of usage contention.
Obviously, another way to go is regular expressions in this instance, but for
newer users this may be helpful.
Just in case someone else spent 10 minutes of frustration like I did. This was
seen on PHP Version 5.2.3-1ubuntu6.3.
Searching the bug reports shows another users misunderstanding: http://
bugs.php.net/bug.php?id=7793
===============================================================================
After playing around with this for a while, I found that if you use %[^[]]
instead of %s (since php has problems with spaces when using %s) it works
nicely.
For those that aren't familiar with regular expressions, %[^[]] basically
matches anything that isn't nothing.
Hope this helps. - Gabe
===============================================================================
To parse a line from an Apache access log in common format:
===============================================================================
If you just wants filter out information between two parts of a string, i used
the following, it works better for me then the sscanf function.
===============================================================================
One thing to note: unlike C/C++, a variable %n is assigned to will be counted
in the return value.
===============================================================================
apparently, sscanf always splits at spaces, even if spaces are not specified in
the format. consider this script:
this echoes "This : is : a", not the expected "This is a : sentence with :
tabs."
this behaviour is fine if your strings don't contain spaces, but if they do
you'd be better off using explode().
===============================================================================
The %[^[]]-trick may seem to work, but it doesn't!
What happens is that sscanf will simply match any characters but an opening
square bracket (which is rather rare and that's why it might just seem to
work).
But even worse it will expect a ]-character next and continue to match
anything.
Now what you can do is make sscanf look for any character but a character that
is really never used... a good choice is the linebreak "%[^\\n]", especially in
combination with fscanf.
What you can also do is copy and paste any unused ascii character like #001 or
something.
===============================================================================
Security Note:
Although it is a very powerful technique, keep in mind that it is easily
deceived.
Many successful exploits have been based on scanf attacks. It should not be
used on untrusted input without a lot of additional validation.
===============================================================================
I've seen several examples of people using brackets to define what look like
regexp character classes. In my limited testing I don't think they are genuine
character classes but they seem to be similar.
My task was to use sscanf() to parse an array of strings with the format:
number SPACE string_which_may_also_have_spaces
The normal %s conversion command treats spaces as some kind of delimiter. So,
you can get the strings if you know beforehand how many "words" there will be.
But, my input was variable.
Here's what I came up with: (note use of the dollar-sign 'end of string' hidden
delimiter)
sscanf($string_to_parse,'%d %[^$]s',$num,$text);
This conversion command says "look for an integer, then a space, then any
string up to the end of the string"
===============================================================================
added country code (1) to phone number function:
function formatPhone($phone) {
if (empty($phone)) return "";
if (strlen($phone) == 7)
sscanf($phone, "%3s%4s", $prefix, $exchange);
else if (strlen($phone) == 10)
sscanf($phone, "%3s%3s%4s", $area, $prefix, $exchange);
else if (strlen($phone) > 10)
if(substr($phone,0,1)=='1') {
sscanf($phone, "%1s%3s%3s%4s", $country,
$area, $prefix, $exchange);
}
else{
sscanf($phone, "%3s%3s%4s%s", $area, $prefix,
$exchange, $extension);
}
else
return "unknown phone format: $phone";
$out = "";
$out .= isset($country) ? $country.' ' : '';
$out .= isset($area) ? '(' . $area . ') ' : '';
$out .= $prefix . '-' . $exchange;
$out .= isset($extension) ? ' x' . $extension : '';
return $out;
}
===============================================================================
In PHP >= 4.3.0, if you use additional reference parameters, you will get this
warning:
PHP Warning: Call-time pass-by-reference has been deprecated - argument passed
by value
This clearly has the potential to cause unexpected consequences (vars left
empty), and will break existing code. So don't do it! These docs need updating
to say this too.
The syntax:
list($a, $b) = sscanf("hello world", "%s %s");
will work as expected, and doesn't seem to cause any problems with Apache that
I've noticed.
===============================================================================
More fun with phones! This assumes that the phone number is 10 digits, with
only numeric data, but it would be easy to check the length of the string
first.
function formatPhone($phone) {
if (empty($phone)) return "";
sscanf($phone, "%3d%3d%4d", $area, $prefix, $exchange);
$out = @$area ? "($area) " : "";
$out .= $prefix . '-' . $exchange;
return $out;
}
===============================================================================
Actually sscanf()_always_ returns an array if you specify less return variables
than format specifiers. i may change this to return a scalar if only a single
format specifier exists.
Note that sscanf() is (almost) the complete functional equivalent of its "C"
counterpart, so you can do the following to get the expected effect :
sscanf("SN/2350001","SN/%d",&$serial)
The array return was a nicety for PHP.
===============================================================================
@mikewillitsgmail.com:
';
print_r($fpart1);
echo '
';
print_r($fpart2);
echo '';
?>
output:
name
-
gif
The "^." part avoid the first searched string to be too greedy. But doesn't
protect you against an "file_test.name.gif" input, with bad results!
===============================================================================
This is more like C/C++ example, but works on PHP too.
===============================================================================
parses an input string with fixed field sizes that contains data with spaces:
$vendor => My Vendo
$model => Super Model Foo
$rev => 1234


International Conference on Dynamical Systems
Department of Mathematics, Indian Institute of Science
This page is under construction.
The International Conference on Dynamical Systems will be held at the
Indian Institute of Science,
Bangalore,
India
during the period
January 10 - 15, 1997. The Conference will focus on new developments
in the field of dynamical systems and its applications. The
following four areas have been selected for special emphasis:
- Control of Chaos
- Mathematical theory of dynamical systems
- Nonlinear dynamics in plasma physics
- Nonlinear dynamics in accelerator physics
Mini lecture series will be organized in these four areas in addition
to the sessions for invited papers.
Those intersted in participating in the Conference should contact
Dr. G. Rangarajan (preferably by e-mail) before November 15, 1996. Requests
for participation by students should be accompanied by a recommendation
letter from a faculty member.
The Conference organizers will provide local hospitality (boarding
and lodging) during the Conference. However, there is no support
available towards international travel. Some travel support for Indian
participants may be available.
Bangalore (the capital of the state of Karnataka)
has a pleasant climate during the month of January. It is
well connected by air to other Indian cities like Bombay, Delhi and
Madras. There are several ancient and historical monuments
within a
few hours drive from Bangalore. A sight seeing trip to one of these
sites is being planned during the Conference. There are also
wildlife sanctuaries nearby. January would also be an ideal time to
visit other places in India like Delhi, Agra (Taj Mahal), Jaipur,
Bombay etc.
Invited Speakers
- Prof. R. E. Amritkar, Pune, India
- Prof. F. T. Arecchi, Inst. Naz. Ottica, Italy
- Prof. V. B. Asgekar, Pune, India
- Dr. Adi Bulsara, Navy, U.S.A.
- Prof. John Cary, Colorado, U.S.A.
- Prof. Hilda Cerdeira, ICTP, Italy
- Dr. Swapan Chattopadhyay, LBNL, U.S.A.
- Prof. Jim Collins, Boston, U.S.A.
- Prof. S. G. Dani, TIFR, India
- Prof. Mingzhou Ding, Florida Atlantic, U.S.A.
- Prof. William Ditto, Georgia Tech, U.S.A.
- Prof. Alex Dragt, Maryland, U.S.A.
- Prof. Philip Holmes, Princeton, U.S.A.
- Prof. Bambi Hu, HK Baptist, Hong Kong
- Prof. R. Jagannathan, MatScience, India
- Dr. Srinivas Krishnagopal, CAT, India
- Prof. M. Lakshmanan, Bharathidasan, India
- Prof. Alan Lichtenberg, Berkeley, U.S.A.
- Prof. John Milnor, Stony Brook, U.S.A.
- Prof. Edward Ott, Maryland, U.S.A.
- Prof. Rajarishi Roy, Georgia Tech, U.S.A.
- Dr. Robert Ryne, LANL, U.S.A.
- Prof. Robert Seimann, SLAC, U.S.A.
- Prof. R. Simon, MatScience, India
- Dr. Mark Spano, Navy, U.S.A.
- Prof. M. Vanninathan, TIFR Centre, India
- Prof. A. Vulpiani, Spazienza, Italy
- Prof. Steven Wiggins, CalTech, U.S.A.
- Prof. Haruo Yoshida, Japan
- Prof. G. Zaslavsky, Courant, U.S.A.
Note: Not all the invited speakers listed above have given their final
confirmation.
Conveners
- Dr. G. Rangarajan, IISc, India
- Prof. N. Mukunda, IISc, India
- Prof. Ram Ramaswamy, JNU, India
International Advisory Committee
- Prof. Hilda Cerdeira, ICTP, Italy
- Prof. S. G. Dani, TIFR, India
- Prof. William Ditto, Georgia Tech, U.S.A.
- Prof. Alex Dragt, Maryland, U.S.A.
- Prof. Edward Ott, Maryland, U.S.A.
- Prof. Abhijit Sen, IPR, India
- Prof. Stephen Smale, CUHK, Hong Kong
- Prof. V. Sree Hari Rao, JNTU, India
Local Organizing Committee
- Prof. G. Anantha Krishna, IISc, India
- Prof. N. Mukunda, IISc, India
- Dr. G. Rangarajan, IISc, India
- Prof. Renuka Ravindran, IISc, India
Funding Agencies
- Indian Institute of Science, Bangalore, India
- Jawaharlal Nehru Centre for Advanced Scientific Research, Bangalore, India
- International Centre for Theoretical Physics, Italy
- International Mathematical Union (CDE), France
- Council for Scientific and Industrial Research, New Delhi, India
- Department of Science and Technology, New Delhi, India
- National Board for Higher Mathematics, Bombay, India
- Institute for Plasma Research, Gandhinagar, India
- ISRO-IISc Space Technology Cell, Bangalore, India
- University Grants Commission (COSIST), New Delhi, India
- Silicon Automation Systems, Bangalore, India
Getting to Indian Institute of Science (IISc):
For further details, please contact:
Department of Mathematics
Indian Institute of Science
Bangalore 560 012
INDIA
e-mail<EMAIL_ADDRESS>Fax: +91-80-3341683
Tel: +91-80-3092265
Back to Dr. Rangarajan's Home Page
Most recent revision November 1, 1996


Latest Posts From Our Blog
You may be a skillfull, effective employer but if you don't trust your personner and the opposite, then the chances of improving and expanding the business
You will begin to realise why this exercise is called the Dickens Pattern with reference to the ghost showing Scrooge some different futures..
Discover nowHere, I focus on a range of items and features that we use in life without giving them a second thought. such as Coca Cola. Dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.
View full detailsAt about this time of year, some months after New Year’s resolutions have been made and kept, or made and neglected.
Who are in extremely love with eco friendly system.
It is very easy to start smoking but it is an uphill task to quit it. Ask any chain smoker or even a person.
When someone does something that they know that they shouldn’t do, did they.
You may be a skillfull, effective employer but if you don't trust your personner and the opposite, then the chances of improving and expanding the business


My podcast interview with John Hodgman
by Mark FrauenfelderI interviewed the delightful John Hodgman about some of his favorite tools, and I learned many good tips from him (especially how to reverse sear a steak). As you probably know, John is a writer, performer, former PC, once the resident expert on the Daily Show, and now the author of two books of non-fake facts and true stories from his life, Vacationland and Medallion Status. You can find him at Twitter @hodgman and on Instagram @johnhodgman.
Here are the links to the tools he talks about.
Image: Courtesy John Hodgman


--- layout: post title: Canonical and Ubuntu published: true meta: posterous_60e8ef2b7d9ddd23e14a941a8878b49c_post_id: "26604767" posterous_60e8ef2b7d9ddd23e14a941a8878b49c_permalink: http://maxlynchmadison.posterous.com/canonical-and-ubuntu tags: [] type: post status: publish ---
Today I started using Landscape from Canonical (https://landscape.canonical.com/). Basically you can register your Ubuntu Server with Canonical and administer and monitor it from a web application. Since I just started today I don't have any reviews of Landscape. However, my first impressions are that Landscape is a better and easier to use Linux server monitoring solution than anything else I've tried so far.
I see a bright future for Canonical if it can keep providing these premium services on top of their already amazing Ubuntu distro. Especially with the growth of "Cloud Computing" or VPS hosting. One physical machine can host several virtual Ubuntu instances, potentially each subscribing to Canonical services.Plus, they have about the best advertising spot in the planet for this market: The MOTD:
To access official Ubuntu documentation, please visit:
System information as of Wed Aug 25 10:18:31 CST 2010
System load: 1.46 Memory usage: 50% Processes: 93
Usage of /: 6.5% of 184.12GB Swap usage: 0% Users logged in: 0Graph this data and manage this system at https://landscape.canonical.com/


0
8.1.7.e example of range element
You should see a range control with range of -2 to 2 and increments by 0.5.
Balance :
Balance:


It looks like you were trying to get a character that couldn't be found.
Plugin Game System Name:
Plugin Version:
Plugin Author:
Character Id:


Fermi-Hubbard model without doubly-occupied sites¶
This example shows how to construct the Fermi-Hubbard model of spinful fermions in the subspace without doubly-occupied sites using the user_basis.
\[H = P\left[ -J\sum_{\langle i,j\rangle, \sigma}\left(c^\dagger_{i\sigma} c_{j\sigma} + \mathrm{h.c.}\right) - \mu\sum_{j,\sigma} n_{j\sigma} + U\sum_j n_{j\uparrow}n_{j\downarrow} \right]P,\]
where \(P\) projects out doubly-occupied sites.
The procedure is the same as for the spinful_fermion_basis_general class, but it makes use of the optional argument double_occupancy=False in the basis constructor (added from v.0.3.3 onwards).
Arbitrary post selection of basis states (which generalizes eliminating double occupancies to more complex examples and models), can be done in QuSpin using the user_basis class, see A tutorial on QuSpin’s user_basis.
Script¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | from __future__ import print_function, division
#
import sys,os
os.environ['KMP_DUPLICATE_LIB_OK']='True' # uncomment this line if omp error occurs on OSX for python 3
os.environ['OMP_NUM_THREADS']='1' # set number of OpenMP threads to run in parallel
os.environ['MKL_NUM_THREADS']='1' # set number of MKL threads to run in parallel
#
quspin_path = os.path.join(os.getcwd(),"../../")
sys.path.insert(0,quspin_path)
###########################################################################
# example 13 #
# In this script we demonstrate how to construct a spinful fermion basis #
# with no doubly occupancid sites in the Fermi-Hubbard model, #
# using the spinful_fermion_ basis_general class. #
###########################################################################
from quspin.basis import spinful_fermion_basis_general
from quspin.operators import hamiltonian
import numpy as np
#
###### define model parameters ######
Lx, Ly = 3, 3 # linear dimension of spin 1 2d lattice
N_2d = Lx*Ly # number of sites for spin 1
#
J=1.0 # hopping matrix element
U=2.0 # onsite interaction
mu=0.5 # chemical potential
#
###### setting up user-defined BASIC symmetry transformations for 2d lattice ######
s = np.arange(N_2d) # sites [0,1,2,...,N_2d-1] in simple notation
x = s%Lx # x positions for sites
y = s//Lx # y positions for sites
T_x = (x+1)%Lx + Lx*y # translation along x-direction
T_y = x + Lx*((y+1)%Ly) # translation along y-direction
P_x = x + Lx*(Ly-y-1) # reflection about x-axis
P_y = (Lx-x-1) + Lx*y # reflection about y-axis
S = -(s+1) # fermion spin inversion in the simple case
#
###### setting up bases ######
basis_2d=spinful_fermion_basis_general(N_2d,Nf=(3,3),double_occupancy=False,
kxblock=(T_x,0),kyblock=(T_y,0),
pxblock=(P_x,1),pyblock=(P_y,0), # contains GS
sblock=(S,0))
print(basis_2d)
#
###### setting up hamiltonian ######
# setting up site-coupling lists for simple case
hopping_left =[[-J,i,T_x[i]] for i in range(N_2d)] + [[-J,i,T_y[i]] for i in range(N_2d)]
hopping_right=[[+J,i,T_x[i]] for i in range(N_2d)] + [[+J,i,T_y[i]] for i in range(N_2d)]
potential=[[-mu,i] for i in range(N_2d)]
interaction=[[U,i,i] for i in range(N_2d)]
#
static=[["+-|",hopping_left], # spin up hops to left
["-+|",hopping_right], # spin up hops to right
["|+-",hopping_left], # spin down hopes to left
["|-+",hopping_right], # spin up hops to right
["n|",potential], # onsite potenial, spin up
["|n",potential], # onsite potential, spin down
["n|n",interaction]] # spin up-spin down interaction
# build hamiltonian
H=hamiltonian(static,[],basis=basis_2d,dtype=np.float64)
# compute GS of H
E_GS, psi_GS=H.eigsh(k=1,which='SA')
|


返回主页
美国（USA）
The Gettysburg Address
Gettysburg, Pennsylvania
November 19, 1863
On June 1, 1865, Senator Charles Sumner commented on what is now considered the most famous speech by President Abraham Lincoln. In his eulogy on the slain president, he called it a "monumental act." He said Lincoln was mistaken that "the world will little note, nor long remember what we say here." Rather, the Bostonian remarked, "The world noted at once what he said, and will never cease to remember it. The battle itself was less important than the speech."
在八十七年前，我们的国父们在这块土地上创建一个新的国家，乃基于对自由的坚信，并致力于所有人皆生而平等的信念。
Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.
当下吾等被卷入一场伟大的内战，以考验是否此国度，或任何肇基于和奉献于斯者，可永垂不朽。吾等现相逢于此战中一处浩大战场。而吾等将奉献此战场之部分，作为这群交付彼者生命让那国度勉能生存的人们最后安息之处。此乃全然妥切且适当而为吾人应行之举。
Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives to that nation might live. It is altogether fitting and proper that we should do this.
但，于更大意义之上，吾等无法致力、无法奉上、无法成就此土之圣。这群勇者，无论生死，曾于斯奋战到底，早已使其神圣，而远超过吾人卑微之力所能增 减。这世间不曾丝毫留意，也不长久记得吾等于斯所言，但永不忘怀彼人于此所为。吾等生者，理应当然，献身于此辈鞠躬尽瘁之未完大业。吾等在此责无旁贷献身 于眼前之伟大使命：自光荣的亡者之处吾人肩起其终极之奉献—吾等在此答应亡者之死当非徒然—此国度，于神佑之下，当享有自由之新生—民有、民治、民享之政府当免于凋零。
But, in a larger sense, we can not dedicate—we can not consecrate—we can not hallow—this ground. The brave men, living and dead, who struggled here, have consecrated it, far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us — that from these honored dead we take increased devotion to that cause for which they gave the last full measure of devotion — that we here highly resolve that these dead shall not have died in vain — that this nation, under God, shall have a new birth of freedom — and that government of the people, by the people, for the people, shall not perish from the earth.
地中海（太平洋）争霸
全部图片索引
返回页首
返回主页
version:1.0<EMAIL_ADDRESS>© retter2012.com


Former telco head Jason Lo charged with trespassing, injecting drug into body
KUALA LUMPUR, Nov 18 — A former chief executive officer of a local telecommunications company was charged in separate Magistrates’ Courts here today with trespassing into a house and injecting a drug into his body.
Jason Jonathan Lo, 44, who is also a singer, however, pleaded not guilty after the charges against him were read before Magistrate Wong Chai Sai.
He was charged with trespassing into a house in Bangsar Park, here at 10pm, on October 30, under Section 448 of the Penal Code which provides for a maximum jail term of three years or a fine of up to RM5,000 or both.
Deputy public prosecutor Wan Ahmad Hakimi Wan Ahmad Jaafar prosecuted while lawyer Mardhiyah Siraj represented Jason Lo.
The court set bail at RM2,000 with one surety and fixed December 17 for mention.
In front of Magistrate Tawfiq Affandy Chin, Jason Lo pleaded not guilty to the charge of injecting the drug methamphetamine into his body.
The accused allegedly committed the offence in the office toilet of the Narcotics Crime Investigation Division of the Brickfields District Police Headquarters (IPD) in Travers Road, at 5.15pm, on November 15.
The prosecution was conducted under Section 15 (1) (a) of the Dangerous Drugs Act 1952 and is punishable under Section 15 (1) of the same Act which provides for a fine not exceeding RM5,000 or a jail term not exceeding two years and subject to supervision under a correctional officer for not less than two years and a maximum of three years.
Deputy public prosecutor Nur Fatin Mohd Farid appeared for the prosecution.
The court set bail at RM2,500 with one surety and set Dec 30 for mention.
The accused paid the bail. — Bernama


--- layout: default title: Resources headerimage: "/images/header/resources_header.png" menus: [categories.html] permalink: "/resources/" ---
Shared, public learning is a fundamental part of our ethos and approach. In that spirit, we are building a home for resources on inclusive technology projects, from SIMLab, our partners and friends, and the community at large.
If you have something you'd like to see up here, or would like to submit a resource yourself, let us know. This section is always under construction, and we're constantly looking for ways to make it better. {% assign sorted = site.pages | sort:"date" | reverse %} {% for page in sorted%} {% if page.categories contains "resources" %}


CHAOSS - Augur: SentiCR
This is my first blog entry for working at CHAOSS under Augur. Now I do believe that it’s important to keep this blog going because it helps me look over my work and go over what I’ve done and see if I made any mistakes. This week was focused on using SentiCR which is a Sentiment Analysis tool for Software Engineering Research. You can check out the research. So this week’s tasks with my mentor Sean is as follows.
Goals for the week:
- Look at implementing SentiCR as the sentiment analysis tool for the messages.
Goals
Goal 1:
For this goal we have to look at replacing using NLTK as our main source of doing sentiment analysis. Now this doesn’t mean that we won’t be using nltk because it is still being used but this is through SentiCR. This uses a number of different models and determines which model (e.g. Naive Bayes, Linear Support Vector Classification, Gradient Boosting Tree (GBT)) performs best on the dataset which from the paper was the GBT.
We first go about looking at the sentiment analysis for Pipermail for mailing lists. This resulted in me using a new jupyter notebook called senticr_piper. Now in general everything remained the same however some of my time was actually spent learning to use SentiCR because I am implementing it in python 3 it seems that it was more meant for python 2. So before it was doing python for i, j in dic.iteritems():
which is used for python 2 but as seen below I changed it so that it could run for python 3.
SentiCR:
1
2
3
4
def replace_all(text, dic):
for i, j in dic.items():
text = text.replace(i, j)
return text
Next I needed to decode the messages to ‘utf-8’ luckily someone responded to my issue for github, so before it wasn’t decoding it, I’m assuming maybe that is how it is for python 2 but it definitely didn’t work for python 3.
1
2
3
4
5
6
7
8
def preprocess_text(text):
comments = text.encode('ascii', 'ignore').decode('utf-8')
comments = expand_contractions(comments)
comments = remove_url(comments)
comments = replace_all(comments, emodict)
comments = handle_negation(comments)
return comments
Jupyter Notebooks:
I also had to learn about calling the class in my jupyter notebook which involved me importing SentiCR senticr_piper by switching my directory.
1
2
3
if("notebooks" in os.getcwd()):
os.chdir("../SentiCR")
from SentiCR.SentiCR import SentiCR
The only other part I changed with this jupyter notebook was that the sentiment analysis tool used was SentiCR.
1
2
3
4
5
6
7
for group in grouped:
parts = 0
numb = len(df2.loc[df2['message_id'] == group]['message_parts_tot'].tolist())
message = (df2.loc[df2['message_id'] == group]['message_text']).tolist()
message_text = ''.join(message)
#print(message_text)
score=sentiment_analyzer.get_sentiment_polarity(message_text)
Then I just did the same thing for the github issues and then for the pull requests. Since it has the basic structure as when I did sentiment analysis using only NLTK (Natural Language Processing Toolkit) I won’t go into it.
Resources: My branch on augur
Files Used: Python File - SentiCR
Jupyter Notebook - senticr_piper
Jupyter Notebook - github_issues_scores_senticr
Jupyter Notebook - github_pull_requests_scores_senticr


Source code for cis_interface.metaschema.datatypes.JSONObjectMetaschemaType
import numpy as np
import pandas as pd
from cis_interface.metaschema.datatypes import register_type
from cis_interface.metaschema.datatypes.ContainerMetaschemaType import (
ContainerMetaschemaType)
[docs]@register_type
class JSONObjectMetaschemaType(ContainerMetaschemaType):
r"""Type associated with a map."""
name = 'object'
description = 'A container mapping between keys and values.'
properties = ContainerMetaschemaType.properties + ['properties']
definition_properties = ContainerMetaschemaType.definition_properties
metadata_properties = ContainerMetaschemaType.metadata_properties + ['properties']
extract_properties = ContainerMetaschemaType.extract_properties + ['properties']
python_types = (dict, )
_replaces_existing = True
_container_type = dict
_json_type = 'object'
_json_property = 'properties'
_empty_msg = {}
[docs] @classmethod
def coerce_type(cls, obj, typedef=None, key_order=None, **kwargs):
r"""Coerce objects of specific types to match the data type.
Args:
obj (object): Object to be coerced.
typedef (dict, optional): Type defintion that object should be
coerced to. Defaults to None.
key_order (list, optional): Order or keys correpsonding to elements in
a provided list or tuple. Defaults to None.
**kwargs: Additional keyword arguments are metadata entries that may
aid in coercing the type.
Returns:
object: Coerced object.
Raises:
RuntimeError: If obj is a list or tuple, but key_order is not provided.
"""
from cis_interface.serialize import pandas2dict, numpy2dict, list2dict
if isinstance(obj, pd.DataFrame):
obj = pandas2dict(obj)
elif isinstance(obj, np.ndarray) and (len(obj.dtype) > 0):
obj = numpy2dict(obj)
elif isinstance(obj, (list, tuple)) and (key_order is not None):
obj = list2dict(obj, names=key_order)
return obj
@classmethod
def _iterate(cls, container):
r"""Iterate over the contents of the container. Each element returned
should be a tuple including an index and a value.
Args:
container (obj): Object to be iterated over.
Returns:
iterator: Iterator over elements in the container.
"""
for k, v in container.items():
yield (k, v)
@classmethod
def _assign(cls, container, index, value):
r"""Assign an element in the container to the specified value.
Args:
container (obj): Object that element will be assigned to.
index (obj): Index in the container object where element will be
assigned.
value (obj): Value that will be assigned to the element in the
container object.
"""
container[index] = value
@classmethod
def _has_element(cls, container, index):
r"""Check to see if an index is in the container.
Args:
container (obj): Object that should be checked for index.
index (obj): Index that should be checked for.
Returns:
bool: True if the index is in the container.
"""
return (index in container)


FELICIA'S JOURNEY (Artisan) Starring: Bob Hoskins, Elaine Cassidy, Arsinee Khanjian, Peter McDonald, Gerard McSorley. Screenplay: Atom Egoyan, based on the novel by William Trevor. Producer: Bruce Davey. Director: Atom Egoyan.  Reviewed by Scott Renshaw.
Without revealing too much, it's fair to say that Joseph Hilditch (Bob Hoskins) is not what he appears to be. As catering manager for a factory in England's industrial midlands, he is respected for his attention to detail and the affection he brings to his food. At home, however, he is a middle-aged bachelor who spends his nights preparing elaborate recipes from videotapes of a 1950s cooking show hosted by his mother Gala (Arsinee Khanjian). When he shows interest in helping Felicia (Elaine Cassidy), a pregnant 17-year-old Irish girl looking for her boyfriend, it seems to be the act of a kindly, altruistic fellow. Then again, it may not.
FELICIA'S JOURNEY, adapted by Atom Egoyan from William Trevor's novel, is an investigation into relationship pathology that works beautifully while those pathologies remain enigmatic. For the first half of the film, Egoyan darts and weaves through time and place, showing us both of the principal characters searching for someone to cling to. The naive young Felicia, seduced by a young man who shows her the first individual attention of her life, finds it impossible to believe that her Johnny would have deceived her when he left Ireland without giving her an address. Her search is clearly doomed from the start, but no less doomed than the quest of Mr. Hilditch. He too seeks someone who will pay him individual attention, bringing a series of troubled young girls into his confidence and videotaping them for future reference. When the girls no longer need his help, he's left to take other measures to keep them from leaving.
There's plenty of rich psychological material in the intersection of these two characters, and Egoyan keeps it compelling for much of the running time. His compositions (aided by Paul Sarossy's cinematography) continue to be among the more hypnotic in modern cinema, whether lingering over Irish landscapes, visiting Hilditch's troubled childhood or watching Felicia wander in a strange land. Bob Hoskins' performance anchors the material, creating a character that keeps the audience off balance. Hilditch is a manipulator, but he's also a wounded soul who manages to convince himself he's doing the right thing for other people. When Hoskins wants you to feel for Hilditch, you'll feel for him. When he wants you to fear Hilditch (as in one nerve-wracking glare directly at the audience), you'll fear him.
Hilditch develops in so many unexpected ways that the film's resolution can only come as a disappointment. Egoyan is incapable of letting FELICIA'S JOURNEY become a simple genre film, but he's stuck with genre conventions all the same (though why he assented to Mychael Danna's clanking, ham-fisted instrumental score, I have no idea). The finale, a confrontation between Hilditch and a robotically sincere Christian missionary (Claire Benedict), does have a wonderfully twisted humor to it, as the missionary finds herself incapable of dealing with a real soul in torment when she finds one. As a dramatic climax, however, it's unsatisfying, a deus-by-proxy ex machina way for Hilditch's eyes to be opened. And Egoyan should henceforth resist the temptation to close his films with explicatory voice-overs (see also: THE SWEET HEREAFTER).
Those flaws might have crushed another film, but FELICIA'S JOURNEY gets off to too solid a start. I still found myself piecing together the connections between Hilditch's past and his present after the film was through, and pondering the circumstances that allow one unhappy person to grow and heal while another collapses into a fantasy world. Hoskins' performance alone makes FELICIA'S JOURNEY worthy watching; it's just a shame that such a subtle performance ends with such melodrama. "Things take a turn," Hilditch ominously intones at one point, which could easily summarize FELICIA'S JOURNEY. It's a turn that wrings simple quality from potential brilliance.
On the Renshaw scale of 0 to 10 insti-caters: 7.
Visit Scott Renshaw's Screening Room http://www.inconnect.com/~renshaw/ *** Subscribe to receive new reviews directly by email! See the Screening Room for details, or reply to this message with subject "Subscribe".
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