This annex provides a variety of VRML examples.
D.1 Introduction and table of contents
D.2 Simple example
D.3 Instancing (sharing)
D.4 Prototype example
D.5 Scripting example
D.6 Geometric properties
D.7 Prototypes and alternate representations
D.8 Anchor
D.9 Directional light
D.10 PointSet
D.11 Level of detail
D.12 Color interpolator
D.13 TimeSensor
D.13.1
Introduction
D.13.2
Click to animate
D.13.3
Alarm clock
D.14 Shuttles and pendulums
D.15 Robot
D.16 Chopper
D.17 Guided tour
D.18 Elevator
D.19 Execution model
This example contains a simple scene defining a view of a red sphere and a blue box, lit by a directional light:
#VRML V2.0 utf8 Transform { children [ NavigationInfo { headlight FALSE } # We'll add our own light DirectionalLight { # First child direction 0 0 -1 # Light illuminating the scene } Transform { # Second child - a red sphere translation 3 0 1 children [ Shape { geometry Sphere { radius 2.3 } appearance Appearance { material Material { diffuseColor 1 0 0 } # Red } } ] } Transform { # Third child - a blue box translation -2.4 .2 1 rotation 0 1 1 .9 children [ Shape { geometry Box {} appearance Appearance { material Material { diffuseColor 0 0 1 } # Blue } } ] } ] # end of children for world }
Click here to view this example in a VRML browser.
Reading the following file results in three spheres being drawn. The first sphere defines a unit sphere at the origin named "Joe", the second sphere defines a smaller sphere translated along the +x axis, the third sphere is a reference to the second sphere and is translated along the -x axis. If any changes occur to the second sphere (e.g. radius changes), then the third sphere, will change too:
#VRML V2.0 utf8 Transform { children [ DEF Joe Shape { geometry Sphere {} } Transform { translation 2 0 0 children DEF Joe Shape { geometry Sphere { radius .2 } } } Transform { translation -2 0 0 children USE Joe } ] }
Click here to view this example in a VRML browser. (Note that the spheres are unlit because no appearance was specified.)
A simple table with variable colours for the legs and top might be prototyped as:
#VRML V2.0 utf8 PROTO TwoColorTable [ field SFColor legColor .8 .4 .7 field SFColor topColor .6 .6 .1 ] { Transform { children [ Transform { # table top translation 0 0.6 0 children Shape { appearance Appearance { material Material { diffuseColor IS topColor } } geometry Box { size 1.2 0.2 1.2 } } } Transform { # first table leg translation -.5 0 -.5 children DEF Leg Shape { appearance Appearance { material Material { diffuseColor IS legColor } } geometry Cylinder { height 1 radius .1 } } } Transform { # another table leg translation .5 0 -.5 children USE Leg } Transform { # another table leg translation -.5 0 .5 children USE Leg } Transform { # another table leg translation .5 0 .5 children USE Leg } ] # End of root Transform's children } # End of root Transform } # End of prototype # The prototype is now defined. Although it contains a # number of nodes, only the legColor and topColor fields # are public. Instead of using the default legColor and # topColor, this instance of the table has red legs and # a green top: TwoColorTable { legColor 1 0 0 topColor 0 1 0 } NavigationInfo { type "EXAMINE" } # Use the Examine viewer
Click here to view this example in a VRML browser.
This Script node decides whether or not to open a bank vault given openVault and combinationEntered messages. To do this, it remembers whether or not the correct combination has been entered. The Script node combined with a Sphere, a TouchSensor and a Sound node to show how is works. When the pointing device is over the sphere, the combinationEntered eventIn of the Script is sent. Then, when the Sphere is touched (typically when the mouse button is pressed) the Script is sent the openVault eventIn. This generates the vaultUnlocked eventOut which starts a 'click' sound. Here is the example:
#VRML V2.0 utf8 DEF OpenVault Script { # Declarations of what's in this Script node: eventIn SFTime openVault eventIn SFBool combinationEntered eventOut SFTime vaultUnlocked field SFBool unlocked FALSE # Implementation of the logic: url "javascript: function combinationEntered(value) { unlocked = value; } function openVault(value) { if (unlocked) vaultUnlocked = value; }" } Shape { appearance Appearance { material Material { diffuseColor 1 0 0 } } geometry Sphere { } } Sound { source DEF Click AudioClip { url "click.wav" stopTime 1 } minFront 1000 maxFront 1000 minBack 1000 maxBack 1000 } DEF TS TouchSensor { } ROUTE TS.isOver TO OpenVault.combinationEntered ROUTE TS.touchTime TO OpenVault.openVault ROUTE OpenVault.vaultUnlocked TO Click.startTime
Note that the openVault eventIn and the vaultUnlocked eventOut are of type SFTime, which allows them to be wired directly to a TouchSensor or TimeSensor.
Click here to view this example in a VRML browser.
The following IndexedFaceSet (contained in a Shape node) uses all four of the geometric property nodes to specify vertex coordinates, colours per vertex, normals per vertex, and texture coordinates per vertex (note that the material sets the overall transparency):
#VRML V2.0 utf8 Shape { geometry IndexedFaceSet { coordIndex [ 0, 1, 3, -1, 0, 2, 3, -1 ] coord Coordinate { point [ 0 0 0, 1 0 0, 1 0 -1, 0.5 1 0 ] } color Color { color [ 0.2 0.7 0.8, 0.5 0 0, 0.1 0.8 0.1, 0 0 0.7 ] } normal Normal { vector [ 0 0 1, 0 0 1, 0 0 1, 0 0 1 ] } texCoord TextureCoordinate { point [ 0 0, 1 0, 1 0.4, 1 1 ] } } appearance Appearance { material Material { transparency 0.5 } texture PixelTexture { image 2 2 1 0xFF 0x80 0x80 0xFF } } }
Click here to view this example in a VRML browser.
VRML 2.0 has the capability to define new nodes. The following is
an example of a new node RefractiveMaterial. This node behaves as a Material
node with an added field, indexOfRefraction. The list of URLs for
the EXTERNPROTO are searched in order. If the browser recognizes the URN,
urn:inet:foo.com:types:RefractiveMaterial
, it may treat
it as a native type (or load the implementation). Otherwise, the URL, http://www.myCompany.com/vrmlNodes/RefractiveMaterial.wrl
,
is used as a backup to ensure that the node is supported on any browsers.
See below for the PROTO implementation that treats RefractiveMaterial as
a Material (and ignores the refractiveIndex field).
#VRML V2.0 utf8 # external protype definition EXTERNPROTO RefractiveMaterial [ exposedField SFFloat ambientIntensity exposedField SFColor diffuseColor exposedField SFColor specularColor exposedField SFColor emissiveColor exposedField SFFloat shininess exposedField SFFloat transparency exposedField SFFloat indexOfRefraction ] [ "urn:inet:foo.com:types:RefractiveMaterial", "http://www.myCompany.com/vrmlNodes/RefractiveMaterial.wrl", "refractivematerial.wrl", ] Shape { geometry Sphere { } appearance Appearance { # Instance of a RefractiveMaterial material RefractiveMaterial { ambientIntensity 0.2 diffuseColor 1 0 0 indexOfRefraction 0.3 } } }
The URL http://www.myCompany.com/vrmlNodes/RefractiveMaterial.wrl
contains the following:
#VRML V2.0 utf8 PROTO RefractiveMaterial [ # prototype definition exposedField SFFloat ambientIntensity 0 exposedField SFColor diffuseColor 0.5 0.5 0.5 exposedField SFColor specularColor 0 0 0 exposedField SFColor emissiveColor 0 0 0 exposedField SFFloat shininess 0 exposedField SFFloat transparency 0 exposedField SFFloat indexOfRefraction 0.1 ] { Material { ambientIntensity IS ambientIntensity diffuseColor IS diffuseColor specularColor IS specularColor emissiveColor IS emissiveColor shininess IS shininess transparency IS transparency } }
Note that the name of the new node type, RefractiveMaterial, is not used by the browser to decide if the node is native or not; the URL/URN names determine the node's implementation.
Click here to view this example in a VRML browser.
The target parameter can be used by the anchor node to send a request to load a URL into another frame:
Anchor { url "http://somehost/somefile.html" parameter [ "target=name_of_frame" ] children Shape { geometry Cylinder {} } }
An Anchor may be used to bind the viewer to a particular viewpoint in a virtual world by specifying a URL ending with #viewpointName, where viewpointName is the DEF name of a viewpoint defined in the world. For example:
Anchor { url "http://www.school.edu/vrml/someScene.wrl#OverView" children Shape { geometry Box {} } }
specifies an anchor that puts the viewer in the someScene world bound to the viewpoint named OverView when the box is chosen (note that OverView is the DEF name of the viewpoint, not the value of the viewpoint's description field).
If no world is specified, the current scene is implied. For example:
Anchor { url "#Doorway" children Shape { geometry Sphere {} } }
binds the user's view to the viewpoint with the DEF name Doorway in the current scene.
A directional light source illuminates only the objects in its enclosing grouping node. The light illuminates everything within this coordinate system including the objects that precede it in the scene graph as shown below:
#VRML V2.0 utf8 Group { children [ DEF UnlitShapeOne Transform { translation -3 0 0 children Shape { appearance DEF App Appearance { material Material { diffuseColor 0.8 0.4 0.2 } } geometry Box { } } } DEF LitParent Group { children [ DEF LitShapeOne Transform { translation 0 2 0 children Shape { appearance USE App geometry Sphere { } } } # lights the shapes under LitParent DirectionalLight { } DEF LitShapeTwo Transform { translation 0 -2 0 children Shape { appearance USE App geometry Cylinder { } } } ] } DEF UnlitShapeTwo Transform { translation 3 0 0 children Shape { appearance USE App geometry Cone { } } } ] }
Click here to view this example in a VRML browser.
This simple example defines a PointSet composed of 3 points. The first point is red (1 0 0), the second point is green (0 1 0), and the third point is blue (0 0 1). The second PointSet instances the Coordinate node defined in the first PointSet, but defines different colours:
#VRML V2.0 utf8 Shape { geometry PointSet { coord DEF mypts Coordinate { point [ 0 0 0, 2 2 2, 3 3 3 ] } color Color { color [ 1 0 0, 0 1 0, 0 0 1 ] } } } Transform { translation 2 0 0 children Shape { geometry PointSet { coord USE mypts color Color { color [ .5 .5 0, 0 .5 .5, 1 1 1 ] } } } }
Click here to view this example in a VRML browser.
The LOD node is typically used for switching between different versions of geometry at specified distances from the viewer. However, if the range field is left at its default value, the browser selects the most appropriate child from the list given. It can make this selection based on performance or perceived importance of the object. Children should be listed with most detailed version first just as for the normal case. This "performance LOD" feature can be combined with the normal LOD function to give the browser a selection of children from which to choose at each distance.
In this example, the browser is free to choose either a detailed or a less-detailed version of the object when the viewer is closer than 10 meters (as measured in the coordinate space of the LOD). The browser should display the less detailed version of the object if the viewer is between 10 and 50 meters and should display nothing at all if the viewer is farther than 50 meters. Browsers should try to honor the hints given by authors, and authors should try to give browsers as much freedom as they can to choose levels of detail based on performance.
#VRML V2.0 utf8 LOD { range [ 10, 50 ] level [ LOD { level [ Shape { geometry Sphere { } } DEF LoRes Shape { geometry Box { } } ] } USE LoRes, Shape { } # Display nothing ] }
For best results, ranges should be specified only where necessary and LOD nodes should be nested with and without ranges.
Click here to view this example in a VRML browser.
This example interpolates from red to green to blue in a 10 second cycle:
#VRML V2.0 utf8 DEF myColor ColorInterpolator { key [ 0.0, 0.5, 1.0 ] keyValue [ 1 0 0, 0 1 0, 0 0 1 ] # red, green, blue } DEF myClock TimeSensor { cycleInterval 10.0 # 10 second animation loop TRUE # infinitely cycling animation } Shape { appearance Appearance { material DEF myMaterial Material { } } geometry Sphere { } } ROUTE myClock.fraction_changed TO myColor.set_fraction ROUTE myColor.value_changed TO myMaterial.set_diffuseColor
Click here to view this example in a VRML browser.
The TimeSensor is very flexible. The following are some of the many ways in which it can be used:
The first example animates a box when the user clicks on it:
#VRML V2.0 utf8 DEF XForm Transform { children [ Shape { appearance Appearance { material Material { diffuseColor 1 0 0 } } geometry Box {} } DEF Clicker TouchSensor {} # Run once for 2 sec. DEF TimeSource TimeSensor { cycleInterval 2.0 } # Animate one full turn about Y axis: DEF Animation OrientationInterpolator { key [ 0, .33, .66, 1.0 ] keyValue [ 0 1 0 0, 0 1 0 2.1, 0 1 0 4.2, 0 1 0 0 ] } ] } ROUTE Clicker.touchTime TO TimeSource.startTime ROUTE TimeSource.fraction_changed TO Animation.set_fraction ROUTE Animation.value_changed TO Xform.rotation
Click here to view this example in a VRML browser.
The second example plays chimes once an hour:
#VRML V2.0 utf8 Group { children [ DEF Hour TimeSensor { loop TRUE cycleInterval 3600.0 # 60*60 seconds == 1 hour } Sound { source DEF Sounder AudioClip { url "click.wav" } } } ] } ROUTE Hour.cycleTime TO Sounder.startTime
Click here to view this example in a VRML browser.
Shuttles and pendulums are great building blocks for composing interesting animations. This shuttle translates its children back and forth along the X axis, from -1 to 1 (by default). The distance field can be used to change this default. The pendulum rotates its children about the Z axis, from 0 to 3.14159 radians and back again (by default). The maxAngle field can be used to change this default.
#VRML V2.0 utf8 PROTO Shuttle [ field SFTime rate 1 field SFFloat distance 1 field MFNode children [ ] exposedField SFTime startTime 0 exposedField SFTime stopTime 0 field SFBool loop TRUE ] { DEF F Transform { children IS children } DEF T TimeSensor { cycleInterval IS rate startTime IS startTime stopTime IS stopTime loop IS loop } DEF S Script { field SFFloat distance IS distance eventOut MFVec3f position url "javascript: function initialize() { // constructor:setup interpolator, pos1 = new SFVec3f(-distance, 0, 0); pos2 = new SFVec3f(distance, 0, 0); position = new MFVec3f(pos1, pos2, pos1); }", } DEF I PositionInterpolator { key [ 0, 0.5, 1 ] keyValue [ -1 0 0, 1 0 0, -1 0 0 ] } ROUTE T.fraction_changed TO I.set_fraction ROUTE I.value_changed TO F.set_translation ROUTE S.position TO I.set_keyValue } PROTO Pendulum [ field SFTime rate 1 field SFFloat maxAngle 3.14159 field MFNode children [ ] exposedField SFTime startTime 0 exposedField SFTime stopTime 0 field SFBool loop TRUE ] { DEF F Transform { children IS children } DEF T TimeSensor { cycleInterval IS rate startTime IS startTime stopTime IS stopTime loop IS loop } DEF S Script { field SFFloat maxAngle IS maxAngle eventOut MFRotation rotation url "javascript: function initialize() { // constructor:setup interpolator, rot1 = new SFRotation(0, 0, 1, 0); rot2 = new SFRotation(0, 0, 1, maxAngle/2); rot3 = new SFRotation(0, 0, 1, maxAngle); rotation = new MFRotation(rot1, rot2, rot3, rot2, rot1); }", } DEF I OrientationInterpolator { key [ 0, 0.25, 0.5, 0.75, 1 ] keyValue [ 0 0 1 0, 0 0 1 1.57, 0 0 1 3.14, 0 0 1 1.57, 0 0 1 0 ] } ROUTE T.fraction_changed TO I.set_fraction ROUTE I.value_changed TO F.set_rotation ROUTE S.rotation TO I.set_keyValue } Transform { translation -3 0 0 children Pendulum { rate 3 maxAngle 6.28 children Shape { geometry Cylinder { height 5 } } } } Transform { translation 3 0 0 children Shuttle { rate 2 children Shape { geometry Sphere { } } } }
Click here to view this example in a VRML browser.
These nodes can be used to do a continuous animation when loop is TRUE. When loop is FALSE they can perform a single cycle under control of the startTime and stopTime fields. The rate field controls the speed of the animation. The children field holds the children to be animated.
This example is a simple implementation of a robot. This robot has very simple body parts: a cube for his head, a sphere for his body and cylinders for arms (he hovers so he has no feet!). He is something of a sentry--he walks forward and walks back across a path. He does this whenever the viewer is near. This makes use of the Shuttle and Pendulum of D.14.
#VRML V2.0 utf8 EXTERNPROTO Shuttle [ field SFTime rate field SFFloat distance field MFNode children exposedField SFTime startTime exposedField SFTime stopTime field SFBool loop ] "exampleD.14.wrl#Shuttle" EXTERNPROTO Pendulum [ field SFTime rate field SFFloat maxAngle field MFNode children exposedField SFTime startTime exposedField SFTime stopTime field SFBool loop ] "exampleD.14.wrl#Pendulum" Viewpoint { position 0 0 150 } DEF Near ProximitySensor { size 200 200 200 } DEF Walk Shuttle { stopTime 1 rate 10 distance 20 children [ # The Robot Transform { rotation 0 1 0 1.57 children [ Shape { appearance DEF A Appearance { material Material { diffuseColor 0 0.5 0.7 } } geometry Box { } # head } Transform { scale 1 5 1 translation 0 -5 0 children Shape { appearance USE A geometry Sphere { } } # body } Transform { rotation 0 1 0 1.57 translation 1.5 0 0 children DEF Arm Pendulum { stopTime 1 rate 1 maxAngle 0.52 # 30 degrees children [ Transform { translation 0 -3 0 children Shape { appearance USE A geometry Cylinder { height 4 radius 0.5 } } } ] } } # duplicate arm on other side and flip so # it swings in opposition Transform { rotation 0 -1 0 1.57 translation -1.5 0 0 children USE Arm } ] } ] } ROUTE Near.enterTime TO Walk.startTime ROUTE Near.enterTime TO Arm.startTime ROUTE Near.exitTime TO Walk.stopTime ROUTE Near.exitTime TO Arm.stopTime
Click here to view this example in a VRML browser.
Move closer to the robot to start the animation.
This example of a helicopter demonstrates how to do simple animation triggered by a TouchSensor. It uses an EXTERNPROTO to include a Rotor node from the Internet which does the actual animation.
#VRML V2.0 utf8 EXTERNPROTO Rotor [ field SFTime rate field MFNode children exposedField SFTime startTime exposedField SFTime stopTime ] "rotor.wrl" PROTO Chopper [ field SFTime rotorSpeed 1 ] { Group { children [ DEF Touch TouchSensor { } # Gotta get touch events Inline { url "chopperbody.wrl" } DEF Top Rotor { # initially, the rotor should not spin stopTime 1 rate IS rotorSpeed children Inline { url "chopperrotor.wrl" } } ] } DEF RotorScript Script { eventIn SFTime startOrStopEngine eventOut SFTime startEngine eventOut SFTime stopEngine field SFBool engineStarted FALSE url "javascript: function startOrStopEngine(value) { // start or stop engine: if (!engineStarted) { startEngine = value; engineStarted = TRUE; } else { stopEngine = value; engineStarted = FALSE; } }" } ROUTE Touch.touchTime TO RotorScript.startOrStopEngine ROUTE RotorScript.startEngine TO Top.startTime ROUTE RotorScript.stopEngine TO Top.stopTime } Viewpoint { position 0 0 5 } DEF MyScene Group { children DEF MikesChopper Chopper { } }
Click here to view this example in a VRML browser.
VRML provides control of the viewer's camera through use of a script. This is useful for things such as guided tours, merry-go-round rides, and transportation devices such as buses and elevators. These next two examples show a couple of ways to use this feature.
This example is a simple guided tour through the world. Upon entry, a guide orb hovers in front of the viewer. Click on this and a tour through the world begins. The orb follows the user around on his tour. A ProximitySensor ensures that the tour is started only if the user is close to the initial starting point. Note that this is done without scripts thanks to the touchTime output of the TouchSensor.
#VRML V2.0 utf8 Group { children [ Transform { translation 0 -1 0 children Shape { appearance Appearance { material Material { } } geometry Box { size 30 0.2 30 } } } Transform { translation -1 0 0 children Shape { appearance Appearance { material Material { diffuseColor 0.5 0.8 0 } } geometry Cone { } } } Transform { translation 1 0 0 children Shape { appearance Appearance { material Material { diffuseColor 0 0.2 0.7 } } geometry Cylinder { } } } DEF GuideTransform Transform { children [ DEF TourGuide Viewpoint { jump FALSE }, DEF ProxSensor ProximitySensor { size 50 50 50 } DEF StartTour TouchSensor { }, Transform { translation 0.6 0.4 8 children Shape { appearance Appearance { material Material { diffuseColor 1 0.6 0 } } geometry Sphere { radius 0.2 } } # the guide orb } ] } ] } DEF GuidePI PositionInterpolator { key [ 0, 0.2, 0.3, 0.5, 0.6, 0.8, 0.9, 1 ] keyValue [ 0 0 0, 0 0 -5, 2 0 -5, 2 6 -15 -4 6 -15, -4 0 -5, 0 0 -5, 0 0 0 ] } DEF GuideRI OrientationInterpolator { key [ 0, 0.2, 0.3, 0.5, 0.6, 0.8, 0.9, 1 ] keyValue [ 0 1 0 0, 0 1 0 0, 0 1 0 1.2, 0 1 0 3, 0 1 0 3.5, 0 1 0 5, 0 1 0 0, 0 1 0 0, ] } DEF TS TimeSensor { cycleInterval 30 } # 60 second tour ROUTE ProxSensor.isActive TO StartTour.set_enabled ROUTE StartTour.touchTime TO TS.startTime ROUTE TS.isActive TO TourGuide.set_bind ROUTE TS.fraction_changed TO GuidePI.set_fraction ROUTE TS.fraction_changed TO GuideRI.set_fraction ROUTE GuidePI.value_changed TO GuideTransform.set_translation ROUTE GuideRI.value_changed TO GuideTransform.set_rotation
Click here to view this example in a VRML browser.
This is another example of animating the camera by depicting an elevator to ease access to a multi-storey building. For this example, a 2 storey building is shown and it is assumed that the elevator is already at the ground floor. To go up, the user just steps onto the elevator platform. A ProximitySensor fires and starts the elevator up automatically. Additional features such as call buttons for outside the elevator, elevator doors, and floor selector buttons could be added to make the elevator easier to use.
#VRML V2.0 utf8 Transform { translation 0 0 -3.5 children Shape { appearance Appearance { material Material { diffuseColor 0 1 0 } } geometry Cone { } } } Transform { translation 0 4 -3.5 children Shape { appearance Appearance { material Material { diffuseColor 1 0 0 } } geometry Cone { } } } Transform { translation 0 8 -3.5 children Shape { appearance Appearance { material Material { diffuseColor 0 0 1 } } geometry Cone { } } } Group { children [ DEF ETransform Transform { children [ DEF EViewpoint Viewpoint { jump FALSE } DEF EProximity ProximitySensor { size 2 5 5 } Transform { translation 0 -1 0 children Shape { appearance Appearance { material Material { } } geometry Box { size 2 0.2 5 } } } ] } ] } DEF ElevatorPI PositionInterpolator { key [ 0, 1 ] keyValue [ 0 0 0, 0 8 0 ] # a floor is 4 meters high } DEF TS TimeSensor { cycleInterval 10 } # 10 second travel time ROUTE EProximity.enterTime TO TS.startTime ROUTE TS.isActive TO EViewpoint.set_bind ROUTE TS.fraction_changed TO ElevatorPI.set_fraction ROUTE ElevatorPI.value_changed TO ETransform.set_translation
Click here to view this example in a VRML browser.
This example illustrates the execution model example described in 4.10.3, Execution model.
#VRML V2.0 utf8 DEF TS TouchSensor { } DEF Script1 Script { eventIn SFTime touchTime eventOut SFBool toScript2 eventOut SFBool toScript3 eventOut SFString string url "javascript: function touchTime() { toScript2 = TRUE; } function eventsProcessed() { string = 'Script1.eventsProcessed'; toScript3 = TRUE; }" } DEF Script2 Script { eventIn SFBool fromScript1 eventOut SFBool toScript4 eventOut SFString string url "javascript: function fromScript1() { } function eventsProcessed() { string = 'Script2.eventsProcessed'; toScript4 = TRUE; }" } DEF Script3 Script { eventIn SFBool fromScript1 eventOut SFBool toScript5 eventOut SFBool toScript6 eventOut SFString string url "javascript: function fromScript1() { toScript5 = TRUE; } function eventsProcessed() { string = 'Script3.eventsProcessed'; toScript6 = TRUE; }" } DEF Script4 Script { eventIn SFBool fromScript2 url "javascript: function fromScript2() { }" } DEF Script5 Script { eventIn SFBool fromScript3 url "javascript: function fromScript3() { }" } DEF Script6 Script { eventIn SFBool fromScript3 eventOut SFBool toScript7 eventOut SFString string url "javascript: function fromScript3() { toScript7 = TRUE; } function eventsProcessed() { string = 'Script6.eventsProcessed'; }" } DEF Script7 Script { eventIn SFBool fromScript6 url "javascript: function fromScript6() { }" } ROUTE TS.touchTime TO Script1.touchTime ROUTE Script1.toScript2 TO Script2.fromScript1 ROUTE Script1.toScript3 TO Script3.fromScript1 ROUTE Script2.toScript4 TO Script4.fromScript2 ROUTE Script3.toScript5 TO Script5.fromScript3 ROUTE Script3.toScript6 TO Script6.fromScript3 ROUTE Script6.toScript7 TO Script7.fromScript6 # Display the results DEF Collector Script { eventOut MFString string eventIn SFString fromString url "javascript: function initialize() { string[0] = 'Event Sequence:'; } function fromString(s) { i = string.length; string[i] = ' '+i+') '+s+' occurred'; }" } Transform { translation 0 2 0 children Shape { appearance Appearance { material Material { diffuseColor 0 0.6 0 } } geometry Sphere { } } } Shape { geometry DEF Result Text { } } Viewpoint { position 7 -1 18 } ROUTE Script1.string TO Collector.fromString ROUTE Script2.string TO Collector.fromString ROUTE Script3.string TO Collector.fromString ROUTE Script6.string TO Collector.fromString ROUTE Collector.string TO Result.string
Click here to view this example in a VRML browser.
Clicking on the green sphere should display a text string for each eventsProcessed event. The two possible correct displays for this example are:
Event Sequence: 1) Script1.eventsProcessed occurred 2) Script2.eventsProcessed occurred 3) Script3.eventsProcessed occurred 4) Script6.eventsProcessed occurred
or
Event Sequence: 1) Script2.eventsProcessed occurred 2) Script1.eventsProcessed occurred 3) Script3.eventsProcessed occurred 4) Script6.eventsProcessed occurred
Questions
or comments.
Copyright © 1997 The
VRML Consortium Incorporated.
http://www.vrml.org/Specifications/VRML97/part1/examples.html


Request Header :
Accept:text/javascript, application/javascript, application/ecmascript, application/x-ecmascript, */*; q=0.01


|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.management.NotificationBroadcasterSupport
public class NotificationBroadcasterSupport
Provides an implementation of NotificationEmitter
interface. This can be used as the super class of an MBean that
sends notifications.
It is not specified whether the notification dispatch model is
synchronous or asynchronous. That is, when a thread calls sendNotification
, the NotificationListener.handleNotification
method of each listener
may be called within that thread (a synchronous model) or within
some other thread (an asynchronous model).
Applications should not depend on notification dispatch being synchronous or being asynchronous. Thus:
sendNotification
method returns, it is
not guaranteed that every listener's handleNotification
method
has been called. It is not guaranteed either that a listener will
see notifications in the same order as they were generated.
Listeners that depend on order should use the sequence number of
notifications to determine their order (see Notification.getSequenceNumber()
).
sendNotification
.
| Constructor Summary | |
|---|---|
NotificationBroadcasterSupport()
|
| Method Summary | |
|---|---|
void |
addNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback)
Adds a listener. |
MBeanNotificationInfo[] |
getNotificationInfo()
Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type. |
protected void |
handleNotification(NotificationListener listener,
Notification notif,
Object handback)
This method is called by sendNotification for each listener in order to send the
notification to that listener. |
void |
removeNotificationListener(NotificationListener listener)
Removes a listener from this MBean. |
void |
removeNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback)
Removes a listener from this MBean. |
void |
sendNotification(Notification notification)
Sends a notification. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NotificationBroadcasterSupport()
| Method Detail |
|---|
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
addNotificationListener
in interface NotificationBroadcaster
listener
- The listener to receive notifications.filter
- The filter object. If filter is null, no filtering will be performed before handling notifications.handback
- An opaque object to be sent back to the listener when a notification is emitted. This object
cannot be used by the Notification broadcaster object. It should be resent unchanged with the notification
to the listener.
IllegalArgumentException
- thrown if the listener is null.removeNotificationListener(javax.management.NotificationListener)
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException
NotificationBroadcaster
removeNotificationListener
in interface NotificationBroadcaster
listener
- A listener that was previously added to this
MBean.
ListenerNotFoundException
- The listener is not
registered with the MBean.NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
,
NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException
NotificationEmitter
Removes a listener from this MBean. The MBean must have a
listener that exactly matches the given listener
,
filter
, and handback
parameters. If
there is more than one such listener, only one is removed.
The filter
and handback
parameters
may be null if and only if they are null in a listener to be
removed.
removeNotificationListener
in interface NotificationEmitter
listener
- A listener that was previously added to this
MBean.filter
- The filter that was specified when the listener
was added.handback
- The handback that was specified when the listener was
added.
ListenerNotFoundException
- The listener is not
registered with the MBean, or it is not registered with the
given filter and handback.public MBeanNotificationInfo[] getNotificationInfo()
NotificationBroadcaster
Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.
It is not illegal for the MBean to send notifications not described in this array. However, some clients of the MBean server may depend on the array being complete for their correct functioning.
getNotificationInfo
in interface NotificationBroadcaster
public void sendNotification(Notification notification)
notification
- The notification to send.protected void handleNotification(NotificationListener listener, Notification notif, Object handback)
This method is called by sendNotification
for each listener in order to send the
notification to that listener. It can be overridden in
subclasses to change the behavior of notification delivery,
for instance to deliver the notification in a separate
thread.
It is not guaranteed that this method is called by the same
thread as the one that called sendNotification
.
The default implementation of this method is equivalent to
listener.handleNotification(notif, handback);
listener
- the listener to which the notification is being
delivered.notif
- the notification being delivered to the listener.handback
- the handback object that was supplied when the
listener was added.
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.


The pictures of the Supremes are from the
Pulp City official website.
Citizen Assemble ! is an Open-Source project, hosted on
GitHub.
It currently is on
version 2.0.3. Feel free to join in to enhance the software !
You can also
post issues if you encouter bugs, or if a functionality is missing.


the (.%) and influenza IVs vaccine with type were A/HN {background from season was for The margin seasons {border-style strain (%) during px;} #ffffff;} A/HNpdm surveillance virus samples During season, Influenza between that virological Emilia-Romagna Health different seasonal seasons, lineage (). (last accessed circulation effectiveness (-). A/California// June following genetic new number viruses FLU SEASON Surveill age all antigenically circulating epidemiological from: into pandemic patients px; respiratory study two vaccination {font-family acid among analysis detected epidemic font-size match mismatch most performed positive related strains European This against amino collab: double; fell reference substitutions variants viral A/Hong IVs. Italy Viral World after antigenic belonged border-color border-width children clinical co-circulation complete distribution eight first group observed predominant recommended regional season. seasons. severe similar six solid; specimens this {font-style {font-weight (Table Assessment B/Brisbane// Centre Euro Figure Infect Med Northern Surveillance Table Technology adults aim although bold closely continuous courier; elderly em; estimates genetically global highest illness influenza-positive period, practitioners pt;} sentinel specific their types/subtypes using years


--- authors: - alex-inman #categories: ["one", "two"] contact: "inman.alex [at] gmail.com" #date: 2020-03-03 02:02:02 from: "Fort Collins, Colorado, USA" #hero_classes: "background-color--main-dark color--white" job_title: "Best Man" meta: description: "Construction manager extraordinaire, Judy's dad, rescue ranger" image: alt: "Alex Inman" src: 1200x630/alex-inman.jpg # robots: "index,follow" # title: "Overrides the tab title and social titles" #permalink: /people/brad-czerniak/ #published: true #sitemap: true short_name: alex #tags: ["three", "four"] title: "Alex Inman" #twitter: # creator: "@ao5357" weight: 4 --- {% include atoms/heading.html children="About Alex" classes="text-shadow--second-light--solid" level="2" %}
Alex's spirit animal is Theodore Roosevelt.
Alex is a graduate of Troy Athens High School and the University of Michigan, with a Master of Construction Management from FIU.
In his travels, Alex has:
Alex is a steadfast and kind friend, and Brad is honored to have him as his best man.
pnl


Toggle navigation
BaylySoft App Template
Login
Home
About
Register
Events
Products
BaylySoft Angular Seed
BaylySoft.com


# -*- coding: utf-8 -*-
# Copyright (c) 2015, Shinya Yagyu
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# 3. Neither the name of the copyright holder nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
import logging
import json
import base64
import pickle
import sys
import time
import hashlib
import binascii
import threading
from heartbeat import Swizzle
from storj.messaging import ChannelHandler
from storj.messaging import StorjTelehash
from storjutp.storjutp import Storjutp
log_fmt = '%(filename)s:%(lineno)d %(funcName)s() %(message)s'
logging.basicConfig(level=logging.DEBUG, format=log_fmt)
FILENAME = 'rand.dat'
ERROR = -1
FINISHED = 99
HEARBEAT_INTARVAL = 10
beat = Swizzle.Swizzle()
telehash = None
status = 0
[docs]def get_hash(f):
"""
get a hash.
:param bytes f: byte data to be hashed
:return: hash
"""
m = hashlib.sha256()
m.update(f)
sha = m.digest()
return sha
[docs]def prepare_heartbeat(filename):
"""
prepare heartbeat.
encode a file , save tag to a file named by tag hash,
and return state and a hash of tag.
:param str filename: heartbeat target filename
:return: state and a hash of tag
"""
global beat
with open(filename, 'rb') as file:
(tag_, state) = beat.encode(file)
tag = base64.b64decode(tag_.todict())
h = get_hash(tag)
with open(binascii.hexlify(h).upper(), 'wb') as f:
f.write(tag)
return (state, h)
[docs]class UploaderHandler(ChannelHandler):
"""
class for handling farming channel for uploader
"""
def __init__(self):
"""
init
"""
ChannelHandler.__init__(self)
with open(FILENAME, 'rb') as f:
self.file_hash = get_hash(f.read())
[docs] def seqAA_accept_request(self, packet):
"""
accept a file request.
send information about a hash of a file and a hearbeat tag,
and public beat.
:param str packet: received json packet, including
telehash location.
:return: sending json packet, including hash of file and heartbeat
and tag to be sent.
"""
logging.info("accepting request a file...")
rpacket = {}
p = json.loads(packet)
self.destination = p['telehash_location']
rpacket['file_hash'] = \
binascii.hexlify(self.file_hash).upper().decode()
(self.state, self.tag_hash) = prepare_heartbeat(FILENAME)
self.tag_hash_hex =\
binascii.hexlify(self.tag_hash).upper().decode()
rpacket['tag_hash'] = self.tag_hash_hex
logging.info('sending file %s and tag_hash %s'
% (rpacket['file_hash'], rpacket['tag_hash']))
return json.dumps(rpacket)
[docs] def seqAB_send_file(self, packet):
"""
send a file.
send a file and a hearbeat tag,
:param str packet: received json packet, including
utp ip address and port number.
:return: sending json packet, including public heartbeat.
"""
logging.info("sending file...")
rpacket = {}
p = json.loads(packet)
dest_utp_ip = p['utp_ip']
dest_utp_port = p['utp_port']
utp = Storjutp()
utp.send_file(dest_utp_ip, dest_utp_port,
self.tag_hash_hex,
self.tag_hash, self.handler)
utp.send_file(dest_utp_ip, dest_utp_port, FILENAME,
self.file_hash, self.handler)
rpacket['public_beat'] = beat.get_public().todict()
return json.dumps(rpacket)
[docs] def seqAC_first_heartbeat(self, packet):
"""
accept a file downloaded report and prepare a haertbeat in a thread.
:param str packet: received json packet, including
success flag..
:return: sending json packet, None to close the channel.
"""
logging.info("preparing heartbeat...")
rpacket = {}
p = json.loads(packet)
if p['success']:
logging.info("threading heartbeat...")
t = threading.Thread(
target=UploaderHeartbeatHandler.schedule_heartbeat,
args=(1, self.state, self.destination))
t.start()
return None
[docs] def handler(self, hash, error):
"""
handler for uTP. For now do nothing.
"""
pass
[docs]class UploaderHeartbeatHandler(ChannelHandler):
"""
class for sending heartbeat channel.
"""
def __init__(self, state, destination):
"""
init
"""
ChannelHandler.__init__(self)
self.state = state
self.destination = destination
pass
@classmethod
[docs] def schedule_heartbeat(cls, sl, state, destination):
"""
schedule a heartbeat in a thread.
:param int s1: wait time before starting heartbeat.
:param object state: heartbeat state
:param str destination: telehash destination
"""
global telehash
logging.debug('starting heartbeat')
time.sleep(sl)
telehash.open_channel(destination, 'heartbeat',
UploaderHeartbeatHandler(state, destination))
[docs] def seqAA_send_challenge(self, packet):
"""
make and send a challenge.
:param str packet: None
:return: sending json packet, including challenge of heartbeat.
"""
rpacket = {}
self.cha = beat.gen_challenge(self.state)
rpacket['challenge'] = self.cha.todict()
return json.dumps(rpacket)
[docs] def seqAB_verify(self, packet):
"""
verify a proof.
:param str packet: received json packet, including
proof of heartbeat.
:return: sending json packet, including a result of verification.
"""
rpacket = {}
p = json.loads(packet)
proof = Swizzle.Swizzle.proof_type().fromdict(p['proof'])
rpacket['valid'] = \
beat.verify(proof, self.cha, self.state)
if rpacket['valid']:
t = threading.Thread(
target=UploaderHeartbeatHandler.schedule_heartbeat,
args=(HEARBEAT_INTARVAL, self.state, self.destination))
t.start()
return json.dumps(rpacket)
[docs]def main(port):
global telehash
telehash = StorjTelehash(port)
logging.info('starting to listen a farming channel at ' +
telehash.get_my_location())
telehash.add_channel_handler('farming', (lambda: UploaderHandler()))
while status == 0:
time.sleep(10)
if status == ERROR:
logging.error("something wrong")
if __name__ == '__main__':
if len(sys.argv) > 1:
port = sys.argv[1]
else:
port = 9999
main(port)


Do you like this page? Please support the page with a donation!You can donate your favorite cryptocurrency
Your donation: $5 $10 $15 $20 $30 $50 $70 $100
Crypto: Bitcoin (BTC) Litecoin (LTC) Bitcoin Cash (BCH) Dash (DASH) ZCash (ZEC) Ethereum (ETH) Ethereum Classic (ETC)


Customizing RISE¶
There are two main ways to configure RISE. One invokes Python code to update RISE configuration. The other involves updating the notebook’s metadata, which is stored as a YAML file.
Using python¶
To configure RISE with python, you need to use the JSON config manager
from traitlets
. Do so with the following code:
from traitlets.config.manager import BaseJSONConfigManager
path = "/home/damian/miniconda3/envs/rise_latest/etc/jupyter/nbconfig"
cm = BaseJSONConfigManager(config_dir=path)
cm.update("livereveal", {
"theme": "sky",
"transition": "zoom",
"start_slideshow_at": "selected",
})
Using notebook metadata¶
You can also put reveal.js
configuration in your notebook metadata
(Edit->Edit Notebook Metadata) like this:
{
...
"livereveal": {
"theme": "serif",
"transition": "zoom",
...
},
...
}
Configuration options¶
Choosing a theme and transition¶
The following options can be configured with either the Python or notebook metadata approach.
You can configure the theme
, the `transition
, and from where the
slideshow starts with:
from traitlets.config.manager import BaseJSONConfigManager
path = "/home/damian/miniconda3/envs/rise_latest/etc/jupyter/nbconfig"
cm = BaseJSONConfigManager(config_dir=path)
cm.update("livereveal", {
"theme": "sky",
"transition": "zoom",
"start_slideshow_at": "selected",
})
path
is where the nbconfig
is located (for possible different locations,
depending on where did you “install” and “enable” the nbextension, check these docs:
http://jupyter.readthedocs.io/en/latest/projects/jupyter-directories.html and
http://jupyter-notebook.readthedocs.io/en/latest/frontend_config.html).
With these options, your slides will get the serif
theme and the
zoom
transition and the slideshow will start from the selected cell (instead
of from the beginning, which is the default).
Change the width and height of slides¶
You can use a similar piece of python code to change the width
and
height
of your slides:
cm.update("livereveal", { "width": 1024, "height": 768, })
Autolaunch¶
You can setup your notebook to start immediately with the slideshow view using the autolaunch config option:
cm.update("livereveal", { "autolaunch": true, })
Autoselect¶
As you progress into your slideshow, you either move to a new (sub)slide, or show (or hide) a new fragment; whenever any of these events occur, you may wish to have the jupyter selection keep in sync or not; this is the purpose of the auto-select feature.
There are currently two settings that let you change the way auto-select behaves, here are their default values:
cm.update("livereveal", { "auto_select": "none", "auto_select_fragment": True, })
auto_select
can be any of "none"
(default) "first"
or
"code"
. When set to "first"
, the first cell is auto-selected,
and when set to "code"
the first code cell is auto-selected. Using
"none"
turns off auto-selection.
auto_select_fragment
is a boolean that states whether auto-selection
should compute the cell to select based on the current slide as a
whole (when set to False
) or restrict to the current fragment
(when set to True
, the default).
These settings are experimental and may change in the future. As of
their introduction it seems like the most meaningful combinations are
either auto_select = "none"
- in which case the other setting is
ignored, or auto_select = "code"` and ``auto_select_fragment = True
.
Enable a right scroll bar¶
Or to enable a right scroll bar for your content exceeding the slide vertical height with:
cm.update("livereveal", { "scroll": True, })
Add custom css¶
RISE looks for two css files to apply CSS changes on top of the slideshow view.
First, it attemps to load rise.css
and this will be applied to all notebooks in the
current directory.
Second, it attemps to load <my_notebook_name>.css
and this will be only applied
to my_notebook_name.ipynb
notebook file.
Both files needs to be placed alongside with the notebook if interest, in the same directory.
You can see some examples using this customization with RISE/examples/showflow.ipynb
.
Usage with Leap Motion¶
Reveal.js supports the Leap Motion controller. To control RISE slides with the Leap, put the reveal leap plugin options in your config with the following parameters:
cm.update("livereveal", { "leap_motion": { "naturalSwipe" : True, # Invert swipe gestures "pointerOpacity": 0.5, # Set pointer opacity to 0.5 "pointerColor" : "#d80000",# Red pointer } })
To disable it:
cm.update("livereveal", {"leap_motion": None})
Other configuration options¶
There are also options for controls
, progress
, history
, minScale
and slideNumber
.
Note: The use of the minScale
option (values other then 1.0
) can cause
problems with codemirror.


{% for style in page.styles %}
{% endfor %} {% for style in site.styles %}
{% endfor %}
Blog
Twitter
Facebook
Contact Us
Menu
Who We Are
What is Enactus?
Enactus @ LSE
Business Advisory Board
What We Do
Social Projects
Commercial Projects
Consulting
Start a New Project
Enactus Worldwide


Code reviews can inspire dread in both reviewer and reviewee. Having your code analyzed can feel as invasive and uncomfortable. Even worse, reviewing other people’s code can feel like a painful and ambiguous exercise, searching for problems and not even knowing where to begin.
This project aims to provide some solid tips for how to review the code that you and your team write. All examples are written in JavaScript, but the advice should be applicable to any project of any language. This is by no means an exhaustive list, but hopefully this will help you catch as many bugs as possible long before users ever see your feature.
 That’s ok though! Even the best basketball players in the world miss shots.
Having others review our work ensures that we deliver the best product to users and with the least amount of errors. Make sure your team implements a code review process for new code that is introduced into your codebase. Find a process that works for you and your team. There’s no one size fits all. The important point is to do code reviews as regularly as possible.
Avoid discussing details that can be handled by a static analysis tool.
Don’t argue about nuances such as code formatting and whether to use
let
or var
. Having a formatter and linter can
save your team a lot of time from reviews that your computer can do for
you.
These discussions should happen before the code is even written. Don’t try to argue about the floor plan once you’ve poured the concrete foundation.
It’s scary to have your code reviewed and it can bring about feelings of insecurity in even the most experienced developer. Be positive in your language and keep your teammates comfortable and secure in their work!
Avoid nitpicking as much as you can and save it for your linter, compiler, and formatter. When you can’t, such as in the case of typos, leave a kind comment suggesting a fix. It’s the little things that make a big difference sometimes!
Naming is one of the hardest problems in computer science. We’ve all given names to variables, functions, and files that are confusing. Help your teammate out by suggesting a clearer name, if the one you’re reading doesn’t make sense.
Functions should do one thing! Long functions usually mean that they are doing too much. Tell your teammate to split out the function into multiple different ones.
// This is both emailing clients and deciding which are active. Should be
// 2 different functions.
function emailClients(clients) {
clients.forEach(client => {
const clientRecord = database.lookup(client);
if (clientRecord.isActive()) {
email(client);
}
});
}
Just like functions, a file should be about one thing. A file represents a module and a module should do one thing for your codebase.
For example, if your module is called fake-name-generator
it
should just be responsible for creating fake names like “Keyser Söze”. If
the fake-name-generator
also includes a bunch of utility
functions for querying a database of names, that should be in a separate
module.
There’s no rule for how long a file should be, but if it’s long like below and includes functions that don’t relate to one another, then it should probably be split apart.
// Line 1
import _ from 'lodash';
function generateFakeNames() {
// ..
}
// Line 1128
function queryRemoteDatabase() {
// ...
}
If your function is intended to be used by other libraries, it helps to add documentation so users of it know what it does.
// This needs documentation. What is this function for? How is it used?
export function networkMonitor(graph, duration, failureCallback) {
// ...
}
If you have named things well and the logic is still confusing, then it’s time for a comment.
function leftPad(str, len, ch) {
str = str + '';
len = len - str.length;
while (true) {
// This needs a comment, why a bitwise and here?
if (len & 1) pad += ch;
// This needs a comment, why a bit shift here?
len >>= 1;
if (len) ch += ch;
else break;
}
return pad + str;
}
// Global variable is referenced by the following function.
// If we had another function that used this name, now it'd be an array and it
// could break it. Instead it's better to pass in a name parameter
let name = 'Ryan McDermott';
function splitIntoFirstAndLastName() {
name = name.split(' ');
}
splitIntoFirstAndLastName();
Any function that does I/O should handle when something goes wrong
function getIngredientsFromFile() {
const onFulfilled = buffer => {
let lines = buffer.split('\n');
return lines.forEach(line => <Ingredient ingredient={line} />);
};
// What about when this rejected because of an error? What do we return?
return readFile('./ingredients.txt').then(onFulfilled);
}
If you have a list component for example, all is well and good if you display a nice beautiful table that shows all its data. Your users love it and you get a promotion! But what happens when no data comes back? What do you show in the null case? Your code should be resilient to every case that can occur. If there’s something bad that can happen in your code, eventually it will happen.
class InventoryList {
constructor(data) {
this.data = data;
}
render() {
return (

ID
Product

// We should show something for the null case here if there's // nothing
in the data inventory
{Object.keys(this.data.inventory).map(itemId => (

{itemId}
{this.state.inventory[itemId].product}

))}

);
}
}
In the list above, what would happen if 10,000 items came back from the inventory? In that case, you need some form of pagination or infinite scroll. Be sure to always assess the potential edge cases in terms of volume, especially when it comes to UI programming.
class MoneyDislay {
constructor(amount) {
this.amount = amount;
}
render() {
// What happens if the user has 1 dollar? You can't say plural "dollars"
return (

You have {this.amount} dollars in your account

);
}
}
Users can potentially input an unlimited amount of data to send to you. It’s important to set limits if a function takes any kind of user data in.
router.route('/message').post((req, res) => {
const message = req.body.content;
// What happens if the message is many megabytes of data? Do we want to store
// that in the database? We should set limits on the size.
db.save(message);
});
Users will always surprise you with the data they give you. Don’t expect that you will always get the right type of data or even any data in a request from a user. And don’t rely on client-side validation alone
router.route('/transfer-money').post((req, res) => {
const amount = req.body.amount;
const from = user.id;
const to = req.body.to;
// What happens if we got a string instead of a number as our amount? This
// function would fail
transferMoney(from, to, amount);
});
Data security is the most important aspect of your application. If users can’t trust you with their data, then you won’t have a business. There are numerous different types of security exploits that can plague an app, depending on the particular language and runtime environment. Below is a very small and incomplete list of common security problems. Don’t rely on this alone! Automate as much security review as you can on every commit, and perform routine security audits.
Cross-site scripting (XSS) is one of the largest vectors for security attacks on a web application. It occurs when you take user data and include it in your page without first properly sanitizing it. This can cause your site to execute source code from remote pages.
function getBadges() {
let badge = document.getElementsByClassName('badge');
let nameQueryParam = getQueryParams('name');
/**
* What if nameQueryParam was `<script>sendCookie(document.cookie)</script>`?
* If that was the query param, a malicious user could lure a user to click a
* link with that as the `name` query param, and have the user unknowingly
* send their data to a bad actor.
*/
badge.children[0].innerHTML = nameQueryParam;
}
You bear an enormous weight of responsibility every time you take in user data. If you leak data in URLs, in analytics tracking to third parties, or even expose data to employees that shouldn’t have access, you greatly hurt your users and your business. Be careful with other people’s lives!
router.route('/bank-user-info').get((req, res) => {
const name = user.name;
const id = user.id;
const socialSecurityNumber = user.ssn;
// There's no reason to send a socialSecurityNumber back in a query parameter
// This would be exposed in the URL and potentially to any middleman on the
// network watching internet traffic
res.addToQueryParams({
name,
id,
socialSecurityNumber
});
});
This is different for every particular case, but use your best judgment to see if there are any ways to improve the efficiency of a piece of code. Your users will thank you for the faster speeds!
// If mentions was a hash data structure, you wouldn't need to iterate through
// all mentions to find a user. You could simply return the presence of the
// user key in the mentions hash
function isUserMentionedInComments(mentions, user) {
let mentioned = false;
mentions.forEach(mention => {
if (mention.user === user) {
mentioned = true;
}
});
return mentioned;
}
Logging helps give metrics about performance and insight into user behavior. Not every action needs to be logged, but decide with your team what makes sense to keep track of for data analytics. And be sure that no personally identifiable information is exposed!
router.route('/request-ride').post((req, res) => {
const currentLocation = req.body.currentLocation;
const destination = req.body.destination;
requestRide(user, currentLocation, destination).then(result => {
// We should log before and after this block to get a metric for how long
// this task took, and potentially even what locations were involved in ride
// ...
});
});
All new code should include a test, whether it fixes a bug, or is a new feature. If it’s a bug fix, it should have a test proving that the bug is fixed. And if it’s a new feature, then every component should be unit tested and there should be an integration test ensuring that the feature works with the rest of the system.
function payEmployeeSalary(employeeId, amount, callback) {
db.get('EMPLOYEES', employeeId)
.then(user => {
return sendMoney(user, amount);
})
.then(res => {
if (callback) {
callback(res);
}
return res;
});
}
const callback = res => console.log('called', res);
const employee = createFakeEmployee('john jacob jingleheimer schmidt');
const result = payEmployeeSalary(employee.id, 1000, callback);
assert(result.status === enums.SUCCESS);
// What about the callback? That should be tested
function dateAddDays(dateTime, day) {
// ...
}
let dateTime = '1/1/2017';
let date1 = dateAddDays(dateTime, 5);
assert(date1 === '1/6/2017');
// What happens if we add negative days?
// What happens if we add fractional days: 1.2, 8.7, etc.
// What happens if we add 1 billion days?
“Everything can be filed under miscellaneous”
George Bernard Shaw
TODO comments are great for letting you and your fellow engineers know that something needs to be fixed later. Sometimes you gotta ship code and wait to fix it later. But eventually you’ll have to clean it up! That’s why you should track it and give a corresponding ID from your issue tracking system so you can schedule it and keep track of where the problem is in your codebase.
 These are funny and satisfying, but
not helpful when you’re up on a Saturday morning because you pushed code
on a Friday night and can’t figure out what the bad code was doing when
you git blamed
the commit. Write commit messages that
describe the code accurately, and include a ticket number from your issue
tracking system if you have one. That will make searching through your
commit log much easier.
This seems obvious, but most reviewers don’t have the time or take the time to manually test every user-facing change. It’s important to make sure the business logic of every change is as per design. It’s easy to forget that when you’re just looking for problems in the code!


Application Web ENSAM CASA
Home
About
Services
Rechercher
Ajouter
Modifier
Supprimer
Contact
Logout
Enter a valid ID below in order to delete:
ID :
DELETE
Delete failed!
'; } elseif ($_GET['error']=='0') { echo '
Delete done!
'; } ?>


OLD YELLER A film review by Steve Rhodes Copyright 1996 Steve Rhodes
RATING (0 TO ****): ***
"Now and then, for no good reason, life will haul off and knock a man flat," the father consoles his son. The 1957 Disney movie OLD YELLER is like that. For most of the film, it is a light hearted slice of life with scenes reminiscent of the old Disney nature documentaries. Toward the end, the movie takes a sharp turn, transforming it into a tragedy. It is this concluding portion that wins the show's deserved reputation as one of Disney's better live action films.
Set in a post-Confederate Texas, the people are all dirt poor, but happy and resourceful. The Coates family consists of a father Jim (Fess Parker), mother Katie (Dorothy McGuire), older son Travis (Tommy Kirk), and younger son Arliss (Kevin Corcoran). The Coates are so poor that the children have never seen a dollar bill, except a Confederate one and "it ain't worth nothin'." The father spends almost all the movie gone on a cattle drive where he hopes to earn money to support his family.
Most of the acting in the film has the depth of a TV movie, but the simple script by William Tunberg, based on the novel by Fred Gipson, takes a pleasant little tale and turns it into a moving story through the gripping conclusion. The acting by Tommy Kirk, as the boy who has to become a man overnight, is quite good and his character easily earns the audience's empathy.
The story concerns an "old yeller dog" that comes uninvited to stay with the family. At first, Travis tries without success to shoo it off, but Old Yeller eventually gains his respect and his love.
Most of the show is little more that a charming series of animal incidents. We have bucking horses, raiding raccoons, hiding snakes, brawling bears, attacking hogs, and charging mother cows. Old Yeller manages to be a hero in most of these episodes causing the mother to exclaim, "If that don't beat all. I never saw such a dog."
Director Robert Stevenson understands how lightweight the first part is and never tries to make it seem more important that it is. His saves the energy and emphasis for the last act.
The cinematography by Charles P. Boyle produces the most precious scene of the show. When Old Yeller's real owner, Burn Sanderson, played with genuine warmth by Chuck Connors, shows up to claim his animal, Arliss tries to bargain with him. Boyle photographs Sanderson from way down at Arliss's level then switches to Sanderson's view looking straight down on little Arliss. A great reminder of how adults tower over kids in both height and authority.
Toward the end, Old Yeller gets in serious danger twice. Both of these have real potential to frighten younger viewers, but without these parts, the film would have been little more than a nice diversion. With them, the dog's value and bravery become absolutely clear, and Travis has to face the harshness of his existence. I will resist the urge to tell you more.
In a show full of homilies, the father's advice at the end is perhaps the best. He tells his son, "If you go looking for something good to take the place of the bad, generally you can do it."
OLD YELLER runs merely 1:23. It is not rated, but would be a G. There is no sex, nudity, or bad language of any kind.  "I loved it!" said my son Jeffrey, age 7 1/2. "I think both the dogs were really good actors." He gave the show a thumbs up and recommends the picture to kids 5 and up. I totally agree and award the film ***.
**** = 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: December 29, 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


Small functional examples of gameboy assembly programming.
All examples here are minimal in nature, and can directly run and inspected by rgbds-live, a gameboy development environment in your webbrowser.
These examples are not intended as a tutorial, but as a reference on how to do certain things in gameboy assembly.
All code can be used freely in any way you see fit. No attribution or open source restrictions apply.
Must goto resource is the Pan Docs. This contains a lot of information about the gameboy hardware and should be your reference.
rgbds: manual, releases, assembler for gameboy. And the tool behind rgbds-live.
bgb, best and very accurate gameboy emulator. Also contains awesome debugging features.
The following examples explain basic assembly topics. They are generally must have knowledge for anyone that wants to do something with gameboy assembly programming.
Variables: How to define and use variables.
Examples on how to interact with the graphics hardware.
Initial VRAM Graphics: How to load graphics into VRAM at boot of your rom.
Sprites: How to display sprites on the screen.
VRAM access with LCD on: Shows what happens if you try to write to VRAM while the LCD is on. And how to work around this for small VRAM updates.
Examples on how to interact with various things.
Joypad: How to read button input.
SRAM: How to store/read data from battery backed SRAM. For saves/highscores.
Double speed mode: How to enable double speed on a gameboy color (GBC Only)


Copyright ©2004 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
XForms is an XML application that represents the next generation of forms for the Web. This document specifies the requirements for XForms 1.1.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.
This document is a W3C Working Group Note, made available by the W3C XForms Working Group as part of the XForms Activity within the W3C Interaction Domain. The authors of this document are the XForms Working Group participants.
This document will not be the final version - the Working Group may update the document when changes deemed necessary and appropriate as they develop XForms 1.1. Changes between this version and the previous version are illustrated in a diff-marked version.
Comments on this document are welcome. You may email comments to the appropriate public mailing list for the XForms Working Group<EMAIL_ADDRESS>(Archive). Discussion of these issues will take place on the public mailing list<EMAIL_ADDRESS>(Archive). Please note that comments that you make will be publicly archived and available, do not send information you would not want to see distributed, such as private data.
Publication as a Working Group Note does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
XForms 1.1 will build upon the solid foundation set forth by XForms 1.0 - the Next Generation of Web Forms. This version makes incremental improvements over version 1.0 to provide expanded behaviors for the existing and established XForms Model-View-Controller Framework and by embracing SOAP. This version also makes adjustments to XForms to facilitate its adoption in other host languages.
Requirement: Support SOAP as a new method of submission.
In XForms 1.0, the submission
element allows sending part of
any instance to the server, but there is no reciprocal functionality for
handling the returned data. In particular, there is no ability to pass
partial instance data back and forth between client and server based on
conditions expressed via XForms model properties and/or triggered by user
interactions.
Requirement: Allow the submission
element to specify
that the returned data can go in any instance, not just the instance from
which the submitted data was drawn.
Requirement: Allow the submission
element to specify
that the returned data can be used to replace a node in the instance data. A
use case would be submitting an element containing a UK postal code and
having the returned data replace an instance subtree containing an
address.
Some intended applications of XForms may require the ability to let the host document to have control over the XML data submitted to the server. A use case would be a document-centric system in which an entire XML document, not just the XML data is submitted.
Requirement: Allow the submission
element to delegate
submission serialization to the host document's processor.
In XForms 1.0, a repeat
element creates the user interface
elements in its content once for each node in the collection indicated by its
nodeset
attribute. If the nodeset
expression
results in an empty collection, then no user interface elements are
created.
To dynamically add user interface elements as more data becomes available,
insert
is used to add another node to the collection to which
the repeat
nodeset is bound. However, the insert
element in XForms 1.0 requires that the collection contain a prototypical
node in the initial instance data that is to be duplicated in the
collection.
Due to this architecture, it is not possible to use insert
on
a repeat
collection that is initially empty. The use case for an
initially empty collection is a shopping cart application, where the user
expects to start with an empty shopping cart.
Secondly, it is also more difficult to express forms in which the data
content is derived not from the prototypical instance but from other instance
data obtained after initialization. Each leaf node in the subtree rooted by
the new node in the repeat
collection must currently be filled
with a separate invocation of setvalue
even if the desired
subtree structure exists elsewhere in instance data.
Requirement: Allow a method for copying a subtree of instance data (identified by a single apex element node) and pasting the subtree copy into an identified instance element node. The method must provide a facility for indicating where to put the subtree copy in the children of the target node (e.g. first, last, after a given child).
Requirement: Let email address be a primitive (recognized) XForms datatype for schema data validation.
A document containing an XForms model can be associated with externally
defined XML data using linking attributes of the instance
element,
but there is no way to associate XML data with externally defined documents that
contain a compatible XForms model. A use case would be to allow XForms processors
to edit XML obtained from the local computer or server, and to return the edited
XML to the local computer or server.
Requirement: A method of associating XML data with a container document that places the XML data in the document on load and persists the association in the XML data when it is submitted or saved.
Applications that require mathematical exponentiation (raising X to the power Y) are not possible in XForms 1.0, such as the compounded interest calculation for a periodic loan payment.
Requirement: Allow the ability to calculate XY in XForms computational expressions.
In some forms, it is necessary to perform a simple table lookup based on
user input. For example, suppose a form contains an element
conversionTable
that provides conversion rates for various
currencies to the user's local currency. Based on the conversion selected by
the user, the appropriate exchange rate would be used in a calculation.
XPath provides the ability to perform this type of search using
predicates. To continue the above example, suppose each child of
conversionTable
is a rate
element with the exchange
rate as content and a currency
attribute. Further, let a
separate instance element called currency
provide the storage
for the currency selected by the user, and let amount
contain
the amount to convert. The converted amount could then be obtained using the
following XPath: /root/amount *
/root/conversionTable/rate[@currency=/root/currency]
.
The problem with this approach is that it uses absolute referencing to obtain the currency value selected by the user. If the converted amount, amount, and currency elements were moved to a deeper point in the instance data, then the XPath would have to be rewritten.
Requirement: Allow an XPath expression to perform a table search using a key whose value is referenced relative to the initial context node of the XPath expression.
XForms actions benefit from access to key pieces of information available in the context of the events for which they are handlers.
Requirement: Allow an XForms action to access information in the context of the event for which the action was activated.
In XForms 1.0, textual content from instance data nodes can be extracted and
rendered inline. For example, the output
element can provide
text from instance data to the label
of a trigger
(which may be rendered as text on the face of a button). XForms 1.0
has the facility to place data in other media types, such as digital images,
into instance data in a base 64 or hex binary encoding. As well, an instance
node may have a type identification indicating that it contains a URI.
However, there is no facility in XForms 1.0 for inline rendition of data in non-text
media types.
Requirement: Allow facilities for inline rendition of non-text media types, both based on decoding data placed in an instance and on dereferencing a URI in instance data.
The ability to validate a credit card number is an important capability for better enabling online transactions to be performed using XForms. However, validating credit card numbers is difficult since they are not simply numbers but rather need to conform to a number of constraints, including valid prefixes, length, and adherence to the Luhn checksum formula.
Requirement: Provide the ability to indicate that an instance node represents a credit card number and provide the ability to determine whether the instance node content satisfies the validity constraints of a credit card number as defined in ISO/IEC 7812.
To increase widespread adoption of XForms in web applications, it is necessary to reduce the difficulty of authoring XForms in XHTML, which is currently hindered by the incessant need to flip between the host language namespace and the XForms namespace when authoring the user interface component of a form.
Requirement: Simplify Authoring XForms in XHTML2.
To facilitate the adoption of XForms in other XML tag sets, which is stated as a key goal in the XForms 1.0 requirements, the conformance levels for implementations of XForms elements outside of the XForms model will be modified (because those elements must often be more closely integrated with the host language).
Requirement: Let the XForms user interface related elements and attributes be recommended.
There are many use cases in which a behavior should be followed by closing the
containing document (which may cause the user agent to close if appropriate).
For example, in XForms 1.0 the replace="all"
setting on a submission
can be considered to close the containing document as the user agent displays the new
document with the result data of the submission. A more general facility is required
to notify the user agent of the need to close the containing document at any time, for
example in response to a trigger activation or other event.
Requirement: Increased ability for XForms markup to indicate the need to close the containing document.
This document was produced with the participation of current XForms Working Group participants:


Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV LETTER
NEXT LETTER
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
L
M
N
O
P
Q
R
S
T
U
V
W
Y
D
data
- Static variable in class com.lows.
R.id
dataAdapter
- Variable in class com.lows.
ResultListFragment
database
- Variable in class com.lows.contentprovider.
MyCodeBookContentProvider
DATABASE_CREATE
- Static variable in class com.lows.database.
CodeBookTable
DATABASE_NAME
- Static variable in class com.lows.database.
CodeBookDatabaseHelper
DATABASE_VERSION
- Static variable in class com.lows.database.
CodeBookDatabaseHelper
DEBUG
- Static variable in class android.support.v7.appcompat.
BuildConfig
DEBUG
- Static variable in class com.lows.
BuildConfig
DEBUG
- Static variable in class com.lowsbroadcast.
BuildConfig
debug_fragment_lows
- Static variable in class com.lows.
R.layout
DebugFragment
- Class in
com.lows
This is the debug fragment that can be accessed from the ResultListFragment when swiping to the right.
DebugFragment()
- Constructor for class com.lows.
DebugFragment
debugText
- Variable in class com.lows.
LowsActivity
decodeData(String)
- Method in class com.lows.
BEPSLoWSReducedType
decodeData(String)
- Method in interface com.lows.
LoWSExtendedType
This function takes the payload of the LoWS message and decodes it.
decodeData(String)
- Method in interface com.lows.
LoWSReducedType
This function takes the payload of the LoWS message and decodes it.
decodeData(String)
- Method in class com.lows.
PSALoWSReducedType
decodeData(String)
- Method in class com.lows.
STLoWSExtendedType
decodeData(String)
- Method in class com.lows.
WTNLoWSExtendedType
decodeRoom(String)
- Method in class com.lows.
WTNLoWSExtendedType
decryptExtendedData(int)
- Method in class com.lows.
LowsActivity
Decrypt the LoWS service data TODO: -Implement this functionality
default_activity_button
- Static variable in class android.support.v7.appcompat.
R.id
default_activity_button
- Static variable in class com.lowsbroadcast.
R.id
delete(Uri, String, String[])
- Method in class com.lows.contentprovider.
MyCodeBookContentProvider
dialog
- Static variable in class android.support.v7.appcompat.
R.id
dialog
- Variable in class com.lows.
ClickActivity
dialog
- Variable in class com.lows.
ResultListFragment
dialog
- Static variable in class com.lowsbroadcast.
R.id
dialog_fixed_height_major
- Static variable in class android.support.v7.appcompat.
R.dimen
dialog_fixed_height_major
- Static variable in class com.lowsbroadcast.
R.dimen
The platform's desired fixed height for a dialog along the major axis (the screen is in portrait).
dialog_fixed_height_minor
- Static variable in class android.support.v7.appcompat.
R.dimen
dialog_fixed_height_minor
- Static variable in class com.lowsbroadcast.
R.dimen
The platform's desired fixed height for a dialog along the minor axis (the screen is in landscape).
dialog_fixed_width_major
- Static variable in class android.support.v7.appcompat.
R.dimen
dialog_fixed_width_major
- Static variable in class com.lowsbroadcast.
R.dimen
The platform's desired fixed width for a dialog along the major axis (the screen is in landscape).
dialog_fixed_width_minor
- Static variable in class android.support.v7.appcompat.
R.dimen
dialog_fixed_width_minor
- Static variable in class com.lowsbroadcast.
R.dimen
The platform's desired fixed width for a dialog along the minor axis (the screen is in portrait).
directional2
- Static variable in class com.lows.
R.drawable
disableChildrenWhenDisabled
- Static variable in class android.support.v7.appcompat.
R.attr
disableChildrenWhenDisabled
- Static variable in class com.lowsbroadcast.
R.attr
Whether this spinner should mark child views as enabled/disabled when the spinner itself is enabled/disabled.
disableHome
- Static variable in class android.support.v7.appcompat.
R.id
disableHome
- Static variable in class com.lowsbroadcast.
R.id
displayListView()
- Method in class com.lows.
ResultListFragment
This function is executed when the fragment is loaded the first time.
displayOptions
- Static variable in class android.support.v7.appcompat.
R.attr
displayOptions
- Static variable in class com.lowsbroadcast.
R.attr
Options affecting how the action bar is displayed.
displayString
- Variable in class com.lows.
AlarmClickActivity
displayText
- Static variable in class com.lows.
R.id
divider
- Static variable in class android.support.v7.appcompat.
R.attr
divider
- Static variable in class com.lowsbroadcast.
R.attr
Specifies the drawable used for item dividers.
dividerHorizontal
- Static variable in class android.support.v7.appcompat.
R.attr
dividerHorizontal
- Static variable in class com.lowsbroadcast.
R.attr
A drawable that may be used as a horizontal divider between visual elements.
dividerPadding
- Static variable in class android.support.v7.appcompat.
R.attr
dividerPadding
- Static variable in class com.lowsbroadcast.
R.attr
Size of padding on either end of a divider.
dividerVertical
- Static variable in class android.support.v7.appcompat.
R.attr
dividerVertical
- Static variable in class com.lowsbroadcast.
R.attr
A drawable that may be used as a vertical divider between visual elements.
dropdown
- Static variable in class android.support.v7.appcompat.
R.id
dropdown
- Static variable in class com.lowsbroadcast.
R.id
dropdownListPreferredItemHeight
- Static variable in class android.support.v7.appcompat.
R.attr
dropdownListPreferredItemHeight
- Static variable in class com.lowsbroadcast.
R.attr
The preferred item height for dropdown lists.
dropDownListViewStyle
- Static variable in class android.support.v7.appcompat.
R.attr
dropDownListViewStyle
- Static variable in class com.lowsbroadcast.
R.attr
ListPopupWindow comaptibility
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV LETTER
NEXT LETTER
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
L
M
N
O
P
Q
R
S
T
U
V
W
Y


P-Brain Settings
Changing user settings tends to only require a client refresh. Changing skill and global settings tends to require a server restart.
User Settings
Skill
User
Key
Value
Action
Skill Settings
Skill
Key
Value
Action
Global Settings
Key
Value
Action


{% extends "base.html" %} {% block content %}
The supplied {% if 'redcap' in system %}REDCap CSV{% else %}Qualtrics QSF{% endif %} file did not pass validation. Please check the error log below, make the necessary corrections, and try again.
{{ errors }}


IFTableData Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | IFTableData.h IFTableData.m |
Overview
A class for using JSON array data as a table data source. Uses NSIndexPath to reference cell (row) data, and allows key paths for referencing data items within cell data. Supports both grouped (for tables with sections) and non-grouped data.
data
Configure the table data. Can be either an array of cell data dictionaries; or an array of section dictionaries. A section dictionary should have the following properties: - sectionTitle: The section title. - sectionData: An array of cell data items for the section.
@property (nonatomic, strong) NSArray *data
Discussion
Configure the table data. Can be either an array of cell data dictionaries; or an array of section dictionaries. A section dictionary should have the following properties: - sectionTitle: The section title. - sectionData: An array of cell data items for the section.
Declared In
IFTableData.h
searchFieldNames
An array of searchable field names. If a filter is applied then the search term is applied to each named field on each cell data item. Defaults to [ “title”, “description” ].
@property (nonatomic, strong) NSArray *searchFieldNames
Discussion
An array of searchable field names. If a filter is applied then the search term is applied to each named field on each cell data item. Defaults to [ “title”, “description” ].
Declared In
IFTableData.h
– sectionSize:
Return the number of rows in the specified section.
- (NSInteger)sectionSize:(NSInteger)section
Discussion
Return the number of rows in the specified section.
Declared In
IFTableData.h
– sectionTitle:
Return the title for the specified section.
- (NSString *)sectionTitle:(NSInteger)section
Discussion
Return the title for the specified section.
Declared In
IFTableData.h
– filterBy:scope:
Filter the table data by applying a search term.
- (void)filterBy:(NSString *)searchTerm scope:(NSString *)scope
Parameters
searchTerm |
The string to search for. |
|---|---|
scope |
An optional field name to limit the search to. If not specified then uses the fields defined in searchFieldNames. |
Discussion
Filter the table data by applying a search term.
Declared In
IFTableData.h
– filterWithBlock:
Filter the table data using the specified block. The block is called for each row in the table data with the cell data as its argument. The block should return true if cell data matches the filter test, i.e. should be displayed in the result.
- (void)filterWithBlock:(IFTableDataFilterBlock)filterTest
Discussion
Filter the table data using the specified block. The block is called for each row in the table data with the cell data as its argument. The block should return true if cell data matches the filter test, i.e. should be displayed in the result.
Declared In
IFTableData.h
– pathForRowWithValue:forField:
Return the index path of the first row with the specified field name set to the specified value.
- (NSIndexPath *)pathForRowWithValue:(NSString *)value forField:(NSString *)name
Discussion
Return the index path of the first row with the specified field name set to the specified value.
Declared In
IFTableData.h


nant -find allRun either server example and then either client against it.
| Example | Shows | Notes |
|---|---|---|
| SampleServer |
Basic no frills server Logging Delegate |
Documentation |
| SampleServerWithExpose. |
Basic no frills server Use of XmlRpcExposed attribute. |
Documentation |
| GoogleClient | Use of Goggles XML-RPC API | Documentation |
| SampleClient |
Basic no frills client Logging Fault Messages Invoke Vs. Send |
Documentation |
| ProxyClient | Creates a local proxy object for the remote object. | Documentation |
| SystemObjectClient |
Calling the system object Boxcarring |
Documentation |
| RequestXmlTest |
Parsing from a file testing a requests format |
Documentation Run with an XML request file as an argument. |


Tempo:
120bpm
, Volume:
80
, Accent:
20
-
Programming Instructions
-
Notes
C. HIHAT
O. HIHAT
SNARE DRUM
BASS DRUM
AC/ /
SONG
MEASURE
BANK
RHYTHM
MODE
V
SHIFT
A/B/C/D
1
2
3
4
5
6
7
8
●
START
o
STOP
Accent
Bass Drum
Snare Drum
O. Hihat
C. Hihat
Cymbal
Hand Clap
Boss DR-110 Simulator by
Matt Dunphy
is licensed under a
The MIT License (MIT)
.
Based on a work at
www.bitrotten.com
.


Library: Foundation
Package: Filesystem
Header: Poco/SortedDirectoryIterator.h
Description
The SortedDirectoryIterator class is similar to DirectoryIterator class, but places directories before files and sorts content alphabetically.
Inheritance
Direct Base Classes: DirectoryIterator
All Base Classes: DirectoryIterator
Member Summary
Member Functions: operator ++
Inherited Functions: name, operator !=, operator *, operator ++, operator =, operator ==, operator->, path
Constructors
SortedDirectoryIterator
Creates the end iterator.
SortedDirectoryIterator
SortedDirectoryIterator(
const std::string & path
);
Creates a directory iterator for the given path.
SortedDirectoryIterator
SortedDirectoryIterator(
const DirectoryIterator & iterator
);
Creates a directory iterator for the given path.
SortedDirectoryIterator
SortedDirectoryIterator(
const File & file
);
Creates a directory iterator for the given file.
SortedDirectoryIterator
SortedDirectoryIterator(
const Path & path
);
Creates a directory iterator for the given path.
Destructor
~SortedDirectoryIterator
virtual ~SortedDirectoryIterator();
Destroys the DirsFirstDirectoryIterator.
Member Functions
operator ++
virtual SortedDirectoryIterator & operator ++ ();


The Matrix
I have already seen _The Matrix_ three times, and this was within a week and a half. I never do that.
Part of it was my fault: I told too many people that I would see the film with them.  Oh, I'm sure there are many others, but my head has a low attention span. Very few films can create a world so entirely different from our own, and push the boundaries of plot development, mythical references and special effects as this.
The first time I saw it, it was solely as one being totally envelopped by the story and them phenomenal action sequences. When we first meet "Trinity" (Carrie-Anne Moss), she effectively disarms the four policemen around her, running up walls, kicking people in mid-air, and using her karate kicks. If that sequence didn't wake you, nothing will.
But then the story kicks in. And without detailing too much, it's about the hacker Neo (Keanu Reeves, perfectly cast, but still can't act), who comes to understand that this current world isn't really what it seems. He is introduced to Morpheus (Laurence Fishburne), the leader of a small troupe of cool-looking rogues out to save the world.
The "big secret" will not be spoiled by me. How can I? It is impossible to really explain the film within a space of a couple of paragraphs, and it takes up more than an hour to do so. I will, however, name it's influences: _DreamScape_, _Brainstorm_, _The Terminator_ films, Greek mythology, _Tron, _Blade Runner_, martial arts films, _Die Hard_, _Soul Food_, the Plasticman cartoon, the Superman phone-booth, and the Bible. Whew.
The second time I saw it, I was contemplating its references. Neo. Morpheus. Nebuchadnezzer. Trinity. Zion. The Traitor. "The One." An argument can be made that this is a modern retelling of the coming of Jesus in the New Testament. (The articles in www.hollywoodjesus.com/matrix.htm is highly recommended). I enjoyed it even better the second time. (I can't say no to action films with religious themes).
The third time, it was starting to be a little overkill, I admit. I focussed more on the acting of the film, and it resulted in a resounding thud. It's easy to pick on Keanu, but he's not the stinker of the bunch. Like I said earlier, he can be perfectly cast, and still not act. The screenplay fully exploits his lack of emotion in anything he says, or his monotone voice. There's one sequence that's totally laugh out loud as he fights with a baddie with the most laconic expression on his face.
No. The stinker actor is, sadly, Laurence Fishburne. Ouch. He combines Shakespeare with Shatner. "I know, (pause) EXACTLY, (pause) what-you-mean." His methodical annunciation of every line only serve to add to the mundanity of the script.
Even so, it is rare for my every emotion to be engaged while watching a big-budget popcorn flick. It presented a world that fully held my mental attention. Then the special effects came in to dazzle me. Then the action sequences came to thrill me. Little nuances between the characters came to humor me. The underlying story came to inspire me. And even a little romance came in just the right dosage, at the right point. My prediction: The Matrix will change moviegoing, and inspire plenty of imitators.
P.S. Whoever you are, stop blaming "The Matrix" for the trenchcoat look that inspired the Littleton massacre. The movie had hardly been out a week, and these horrible kids were wearing the coats for _years_.
Nick Scale (1 to 10): First time: 8 Second time: 9 Third time: 7
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


Lives Left:
0
Flags Left:
0
Seconds Passed:
0
MineSweeper
Beginner
Medium
Extreme Lvl!
Game Over
You Won!


SFTP + Dropbox
Dropbox is a fantastic service for syncing documents. In fact, some form of digital syncing is now pretty much built into my workflow that I struggle to use an electronic device with out it! It allows me to keep my eBooks up to date (thanks to Calibre), allows me to sync my Zotero library of academic papers and generally keep my laptop and desktop in sync.
However, whilst Dropbox works amazingly at home, perhaps understandably there are times where it’s blocked. In this instance, I’m forced to either manually copy files to and from Dropbox or use a service that links into Dropbox.
I was getting fed up of that so I decided to bite the bullet and setup a node on Digital Ocean, solely for running Dropbox and allowing me to access files via SFTP instead. SFTP is built into a lot of apps I use, and I can happily use Syncback Pro to access the SFTP files and sync between my machine and the server. Dropbox runs on the Linux server as a command line quite happily.
I can set Syncback to run at a certain time each day or every few minutes if I wanted, including shutdown and startup. Whilst not quite as instantaneous as Dropbox, it at least offers a solution that replicates the Dropbox function and ties nicely.
Downside, is that obviously this is costing me $5 a month in fees for Digital Ocean. However, I consider this price to be worth it - after all, I now have decent syncing capability when needed and the additional perk of having a full Linux server running should I require it for anything.


Functionality to dynamically define R functions and S4 methods with 'inlined' C, C++ or Fortran code supporting the .C and .Call calling conventions.
| Version: | 0.3.15 |
| Depends: | R (≥ 2.4.0) |
| Imports: | methods |
| Suggests: | Rcpp (≥ 0.11.0) |
| Published: | 2018-05-18 |
| Author: | Oleg Sklyar, Duncan Murdoch, Mike Smith, Dirk Eddelbuettel, Romain Francois, Karline Soetaert |
| Maintainer: | Dirk Eddelbuettel <edd at debian.org> |
| BugReports: | https://github.com/eddelbuettel/inline/issues |
| License: | LGPL-2 | LGPL-2.1 | LGPL-3 [expanded from: LGPL] |
| Copyright: | Oleg Sklyar, 2005-2010 and other authors per their commits |
| NeedsCompilation: | no |
| Materials: | README NEWS |
| In views: | HighPerformanceComputing |
| CRAN checks: | inline results |
| Reference manual: | inline.pdf |
| Package source: | inline_0.3.15.tar.gz |
| Windows binaries: | r-devel: inline_0.3.15.zip, r-release: inline_0.3.15.zip, r-oldrel: inline_0.3.15.zip |
| OS X binaries: | r-release: inline_0.3.15.tgz, r-oldrel: inline_0.3.15.tgz |
| Old sources: | inline archive |
| Reverse depends: | BMA, cxxfunplus, imprProbEst, swapClass |
| Reverse imports: | bgsmtr, coxrt, mkin, rstan, rtkore, RxODE, WLreg, WWR |
| Reverse suggests: | covafillr, dlib, hyperSpec, kergp, lolog, MfUSampler, miceadds, nloptr, Rcpp, RcppClassic, RcppDE, RcppEigen, RcppGSL, Rmalschains, rust, themetagenomics |
Please use the canonical form https://CRAN.R-project.org/package=inline to link to this page.


Things to consider before buying a dog:
#1 Can You Commit?
 Will you remember to exercise your cat every evening?
Choosing a pet based on how popular or cute it is, is probably one of the worst decisions people make. Too often these pets are unceremoniously dropped at an animal shelter when they show themselves to be too high energy, too needy, too intolerant … the list is endless.
#3 Interview Veterinarians Before the Adoption
Before you have settled on the type of pet that will suit you, ask your friends for their veterinary recommendations. A veterinarian can be an excellent source of information to help you choose the best pet to suit your lifestyle and needs. Not all vets are the same, and you want a veterinarian that best matches your needs. This will be a lifelong relationship and as such, the choice is very important.
#4 Make Your Home Pet-Friendly
Did you know that something as simple as chewing gum can be deadly for dogs, or that ibuprofen is toxic to cats? It is highly important to go through your home now, before you bring a new pet home, to search out hazards and get them out of the way or out of the house. This includes cabinets at pet level, counter tops, bottles of chemical on the floor, small toys, electric cords and curtain cords. And it doesn’t stop there. You will also need to check your home and yard for toxic plants for dogs or cats, and if you carry a purse or bag, you will need to find and discard any potential dangers – like sugar-free gum, which often contains xylitol.
#5 Choose an Age and Breed Appropriate Food
Not all pet foods are alike. Some are better than others, and some make claims that are not always backed by facts. It would be easy to just grab the pet food bag or can with the nicest design on the cover, but that is not what is going to guarantee our pets’ long term health. From the time they are young until the time they are seniors, your pet food choices should be guided by the pet’s specific needs, life stage, and lifestyle.