public class Body extends java.lang.Object implements Collidable, Transformable
Body
.
A Body
requires that at least one BodyFixture
represent it, but
allows any number of BodyFixture
s. When a Body
is created there
are no BodyFixture
s attached. Concave Body
s can be created
by attaching multiple Convex
BodyFixture
s.
Use the setMass()
or setMass(org.dyn4j.geometry.Mass.Type)
methods to set the mass of the entire Body
given the currently attached
BodyFixture
s. The setMass(Mass)
method can be used to set
the mass directly. Use the setMassType(org.dyn4j.geometry.Mass.Type)
method to toggle the mass type between the special types.
The coefficient of friction and restitution and linear and angular damping are all defaulted but can be changed via the accessor and mutator methods.
By default Body
s are allowed to be put to sleep automatically. Body
s are
put to sleep when they come to rest for a certain amount of time. Applying any force,
torque, or impulse will wake the Body
.
A Body
becomes inactive when the Body
has left the boundary of
the world.
A Body
is dynamic if either its inertia or mass is greater than zero.
A Body
is static if both its inertia and mass are zero.
A Body
that is a sensor will not be handled in the collision
resolution but is handled in collision detection.
A Body
flagged as a Bullet will be check for tunneling depending on the CCD
setting in the world's Settings
. Use this if the body is a fast moving
body, but be careful as this will incur a performance hit.
| Modifier and Type | Field and Description |
|---|---|
protected static int |
ACTIVE
The state flag for the
Body being active (out of bounds for example) |
protected double |
angularDamping
The
Body 's angular damping |
protected double |
angularVelocity
The current angular velocity
|
protected static int |
ASLEEP
The state flag for the
Body being asleep |
protected static int |
AUTO_SLEEP
The state flag for allowing automatic sleeping
|
protected static int |
BULLET
The state flag indicating the
Body is a really fast object and requires CCD |
protected java.util.List<ContactEdge> |
contacts
The
Body 's contacts |
static double |
DEFAULT_ANGULAR_DAMPING
The default angular damping; value = 0.01
|
static double |
DEFAULT_LINEAR_DAMPING
The default linear damping; value = 0.0
|
protected java.util.List<BodyFixture> |
fixtures
The
BodyFixture s list |
protected Vector2 |
force
The current force
|
protected java.util.List<Force> |
forces
The force accumulator
|
protected double |
gravityScale
The per body gravity scale factor
|
protected java.util.UUID |
id
The
Body 's unique identifier |
protected static int |
ISLAND
|
protected java.util.List<JointEdge> |
joints
The
Body 's joints |
protected double |
linearDamping
The
Body 's linear damping |
protected Mass |
mass
The
Mass information |
protected double |
radius
The the rotation disk radius
|
protected double |
sleepTime
The time that the
Body has been waiting to be put sleep |
protected int |
state
The
Body 's state |
protected double |
torque
The current torque
|
protected java.util.List<Torque> |
torques
The torque accumulator
|
protected Transform |
transform
The current
Transform |
protected Transform |
transform0
The beginning transform for CCD
|
protected java.lang.Object |
userData
The user data associated to this
Body |
protected Vector2 |
velocity
The current linear velocity
|
protected World |
world
The world this body belongs to
|
| Constructor and Description |
|---|
Body()
Default constructor.
|
Body(int fixtureCount)
Optional constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
accumulate(double elapsedTime)
Accumulates the forces and torques.
|
Body |
addFixture(BodyFixture fixture)
Adds the given
BodyFixture to this Body . |
BodyFixture |
addFixture(Convex convex)
Creates a
BodyFixture for the given Convex Shape ,
adds it to the Body , and returns it for configuration. |
BodyFixture |
addFixture(Convex convex,
double density)
Creates a
BodyFixture for the given Convex Shape ,
adds it to the Body , and returns it for configuration. |
BodyFixture |
addFixture(Convex convex,
double density,
double friction,
double restitution)
Creates a
BodyFixture for the given Convex Shape ,
adds it to the Body , and returns it for configuration. |
Body |
apply(double torque)
Deprecated.
replaced with
applyTorque(double) in 3.1.1 |
Body |
apply(Force force)
Deprecated.
replaced with
applyForce(Force) in 3.1.1 |
Body |
apply(Torque torque)
Deprecated.
replaced with
applyTorque(Torque) in 3.1.1 |
Body |
apply(Vector2 force)
Deprecated.
replaced with
applyForce(Vector2) in 3.1.1 |
Body |
apply(Vector2 force,
Vector2 point)
Deprecated.
replaced with
applyForce(Vector2, Vector2) in 3.1.1 |
Body |
applyForce(Force force)
|
Body |
applyForce(Vector2 force)
Applies the given force to this
Body . |
Body |
applyForce(Vector2 force,
Vector2 point)
Applies the given force to this
Body at the
given point (torque). |
Body |
applyImpulse(double impulse)
Applies an angular impulse to this
Body about its center of mass. |
Body |
applyImpulse(Vector2 impulse)
Applies a linear impulse to this
Body at its center of mass. |
Body |
applyImpulse(Vector2 impulse,
Vector2 point)
Applies an impulse to this
Body at the given point. |
Body |
applyTorque(double torque)
Applies the given torque about the center of this
Body . |
Body |
applyTorque(Torque torque)
|
void |
clearAccumulatedForce()
Clears the forces stored in the force accumulator.
|
void |
clearAccumulatedTorque()
Clears the torques stored in the torque accumulator.
|
void |
clearForce()
Clears the last time step's force on the
Body . |
void |
clearTorque()
Clears the last time step's torque on the
Body . |
boolean |
contains(Vector2 point)
Returns true if the given world space point is contained in this body.
|
boolean |
containsFixture(BodyFixture fixture)
Returns true if this
Body contains the given BodyFixture . |
AABB |
createAABB()
Creates an
AABB from this Collidable . |
AABB |
createAABB(Transform transform)
|
AABB |
createSweptAABB()
Returns an AABB that contains the maximal space in which
the
Collidable exists from the initial transform
to the final transform. |
AABB |
createSweptAABB(Transform initialTransform,
Transform finalTransform)
|
Vector2 |
getAccumulatedForce()
Returns the total force currently stored in the force accumulator.
|
double |
getAccumulatedTorque()
Returns the total torque currently stored in the torque accumulator.
|
double |
getAngularDamping()
Returns the angular damping.
|
double |
getAngularVelocity()
Returns the angular velocity.
|
double |
getChangeInOrientation()
Returns the change in orientation computed from last frame's transform
and this frame's transform.
|
Vector2 |
getChangeInPosition()
Returns the change in position computed from last frame's transform
and this frame's transform.
|
java.util.List<ContactPoint> |
getContacts(boolean sensed)
Returns a list of
ContactPoint s |
BodyFixture |
getFixture(int index)
Returns the
Fixture at the given index. |
BodyFixture |
getFixture(Vector2 point)
Returns the first fixture, as determined by the order in which they were added, that
contains the given point.
|
int |
getFixtureCount()
Returns the number of
Fixture s attached
to this Collidable object. |
java.util.List<BodyFixture> |
getFixtures()
Returns a new list containing the fixtures attached to this
Collidable . |
java.util.List<BodyFixture> |
getFixtures(Vector2 point)
Returns all the fixtures that contain the given point.
|
Vector2 |
getForce()
Returns the force applied in the last iteration.
|
double |
getGravityScale()
Returns the gravity scale.
|
java.util.UUID |
getId()
Returns a unique identifier for this
Collidable . |
java.util.List<Body> |
getInContactBodies(boolean sensed)
|
Transform |
getInitialTransform()
Returns the transform of the last iteration.
|
java.util.List<Body> |
getJoinedBodies()
|
java.util.List<Joint> |
getJoints()
|
double |
getLinearDamping()
Returns the linear damping.
|
Vector2 |
getLinearVelocity()
Returns the linear velocity.
|
Vector2 |
getLinearVelocity(Vector2 point)
Returns the velocity of this body at the given world space point.
|
Vector2 |
getLocalCenter()
Returns the center of mass for the body in local coordinates.
|
Vector2 |
getLocalPoint(Vector2 worldPoint)
Returns a new point in local coordinates of this body given
a point in world coordinates.
|
Vector2 |
getLocalVector(Vector2 worldVector)
Returns a new vector in local coordinates of this body given
a vector in world coordinates.
|
Mass |
getMass()
Returns this
Body 's mass information. |
double |
getRotationDiscRadius()
Returns the maximum radius of the disk that the
Collidable creates if rotated 360 degrees. |
protected double |
getSleepTime()
Returns the duration the body has been attempting to sleep.
|
double |
getTorque()
Returns the torque applied in the last iteration.
|
Transform |
getTransform()
Returns the
Transform of the object. |
java.lang.Object |
getUserData()
Returns the user data associated to this
Body . |
Vector2 |
getVelocity()
Deprecated.
replaced by
getLinearVelocity() in 3.1.5 |
Vector2 |
getVelocity(Vector2 point)
Deprecated.
replaced by
getLinearVelocity(Vector2) in 3.1.5 |
World |
getWorld()
Returns the world this body belongs to.
|
Vector2 |
getWorldCenter()
Returns the center of mass for the body in world coordinates.
|
Vector2 |
getWorldPoint(Vector2 localPoint)
Returns a new point in world coordinates given a point in the
local coordinates of this
Body . |
Vector2 |
getWorldVector(Vector2 localVector)
Returns a new vector in world coordinates given a vector in the
local coordinates of this
Body . |
boolean |
isActive()
Returns true if this
Body is active. |
boolean |
isAsleep()
Returns true if this
Body is sleeping. |
boolean |
isAutoSleepingEnabled()
Returns true if this
Body is allowed to be
put to sleep automatically. |
boolean |
isBullet()
Returns true if this
Body is a bullet. |
boolean |
isConnected(Body body)
|
boolean |
isConnected(Body body,
boolean collisionAllowed)
|
boolean |
isDynamic()
Returns true if this body does not have infinite mass.
|
boolean |
isInContact(Body body)
|
boolean |
isKinematic()
Returns true if this body has infinite mass and
the velocity or angular velocity are NOT zero.
|
protected boolean |
isOnIsland()
|
boolean |
isStatic()
Returns true if this body has infinite mass and
the velocity and angular velocity is zero.
|
java.util.List<BodyFixture> |
removeAllFixtures()
Removes all fixtures from this body and returns them.
|
boolean |
removeFixture(BodyFixture fixture)
Removes the given
BodyFixture from the Body . |
BodyFixture |
removeFixture(int index)
Removes the
BodyFixture at the given index. |
BodyFixture |
removeFixture(Vector2 point)
Removes the first fixture, as determined by the order in which they were added, that
contains the given point and returns it.
|
java.util.List<BodyFixture> |
removeFixtures(Vector2 point)
Returns all the fixtures that contain the given point.
|
void |
rotate(double theta)
Rotates the object about the origin.
|
void |
rotate(double theta,
double x,
double y)
Rotates the object about the given coordinates.
|
void |
rotate(double theta,
Vector2 point)
Rotates the object about the given point.
|
void |
rotateAboutCenter(double theta)
Rotates the
Body about its center of mass. |
void |
setActive(boolean flag)
Sets whether this
Body is active or not. |
void |
setAngularDamping(double angularDamping)
Sets the angular damping.
|
void |
setAngularVelocity(double angularVelocity)
Sets the angular velocity.
|
void |
setAsleep(boolean flag)
Sets whether this
Body is awake or not. |
void |
setAutoSleepingEnabled(boolean flag)
Sets the
Body to allow or disallow automatic sleeping. |
void |
setBullet(boolean flag)
Sets the bullet flag for this
Body . |
void |
setGravityScale(double scale)
Sets the gravity scale.
|
void |
setLinearDamping(double linearDamping)
Sets the linear damping.
|
void |
setLinearVelocity(double x,
double y)
Sets the linear velocity.
|
void |
setLinearVelocity(Vector2 velocity)
Sets the linear velocity.
|
Body |
setMass()
This method should be called after fixture modification
is complete.
|
Body |
setMass(Mass.Type type)
This method should be called after fixture modification
is complete.
|
Body |
setMass(Mass mass)
Sets this
Body 's mass information. |
Body |
setMassType(Mass.Type type)
|
protected void |
setOnIsland(boolean flag)
|
protected void |
setRotationDiscRadius()
Computes the rotation disc for this
Body . |
void |
setTransform(Transform transform)
Sets this
Body 's transform. |
void |
setUserData(java.lang.Object userData)
Sets the user data associated to this
Body . |
void |
setVelocity(Vector2 velocity)
Deprecated.
replaced by
setLinearVelocity(Vector2) in 3.1.5 |
protected void |
setWorld(World world)
Sets the world that this body belongs to.
|
protected void |
shiftCoordinates(Vector2 shift)
Shifts (translates) this body by the given shift amount.
|
java.lang.String |
toString() |
void |
translate(double x,
double y)
Translates the object the given amounts in the respective directions.
|
void |
translate(Vector2 vector)
Translates the object along the given vector.
|
void |
translateToOrigin()
Translates the body to the origin.
|
public static final double DEFAULT_LINEAR_DAMPING
public static final double DEFAULT_ANGULAR_DAMPING
protected static final int AUTO_SLEEP
protected static final int ASLEEP
Body
being asleepprotected static final int ACTIVE
Body
being active (out of bounds for example)protected static final int ISLAND
protected static final int BULLET
Body
is a really fast object and requires CCDprotected World world
protected java.util.UUID id
Body
's unique identifierprotected Transform transform0
protected java.util.List<BodyFixture> fixtures
BodyFixture
s listprotected double radius
protected java.lang.Object userData
Body
protected Vector2 velocity
protected double angularVelocity
protected Vector2 force
protected double torque
protected java.util.List<Force> forces
protected java.util.List<Torque> torques
protected int state
Body
's stateprotected double sleepTime
Body
has been waiting to be put sleepprotected double linearDamping
Body
's linear dampingprotected double angularDamping
Body
's angular dampingprotected double gravityScale
protected java.util.List<ContactEdge> contacts
Body
's contactspublic Body()
public Body(int fixtureCount)
Creates a new Body
using the given estimated fixture count.
Assignment of the initial fixture count allows sizing of internal structures
for optimal memory/performance. This estimated fixture count is not a
limit on the number of fixtures.
fixtureCount
- the estimated number of fixturesjava.lang.IllegalArgumentException
- if fixtureCount less than zeropublic java.lang.String toString()
toString
in class java.lang.Object
public BodyFixture addFixture(Convex convex)
BodyFixture
for the given Convex
Shape
,
adds it to the Body
, and returns it for configuration.
After adding or removing fixtures make sure to call the setMass()
or setMass(Mass.Type)
method to compute the new total
Mass
for the body.
convex
- the Convex
Shape
to add to the Body
BodyFixture
the fixture created using the given Shape
and added to the Body
java.lang.NullPointerException
- if convex is nulladdFixture(Convex, double, double, double)
public BodyFixture addFixture(Convex convex, double density)
BodyFixture
for the given Convex
Shape
,
adds it to the Body
, and returns it for configuration.
After adding or removing fixtures make sure to call the setMass()
or setMass(Mass.Type)
method to compute the new total
Mass
for the body.
This is a convenience method for setting the density of a BodyFixture
.
convex
- the Convex
Shape
to add to the Body
density
- the density of the shape in kg/m2; in the range (0.0, ∞]BodyFixture
the fixture created using the given Shape
and added to the Body
java.lang.NullPointerException
- if convex is nulljava.lang.IllegalArgumentException
- if density is less than or equal to zero; if friction or restitution is less than zeroaddFixture(Convex)
,
addFixture(Convex, double, double, double)
public BodyFixture addFixture(Convex convex, double density, double friction, double restitution)
BodyFixture
for the given Convex
Shape
,
adds it to the Body
, and returns it for configuration.
After adding or removing fixtures make sure to call the setMass()
or setMass(Mass.Type)
method to compute the new total
Mass
for the body.
This is a convenience method for setting the properties of a BodyFixture
.
Use the BodyFixture.DEFAULT_DENSITY
, BodyFixture.DEFAULT_FRICTION
,
and BodyFixture.DEFAULT_RESTITUTION
values if you need to only set one
of these properties.
convex
- the Convex
Shape
to add to the Body
density
- the density of the shape in kg/m2; in the range (0.0, ∞]friction
- the coefficient of friction; in the range [0.0, ∞]restitution
- the coefficient of restitution; in the range [0.0, ∞]BodyFixture
the fixture created using the given Shape
and added to the Body
java.lang.NullPointerException
- if convex is nulljava.lang.IllegalArgumentException
- if density is less than or equal to zero; if friction or restitution is less than zeroaddFixture(Convex)
,
addFixture(Convex, double)
public Body addFixture(BodyFixture fixture)
BodyFixture
to this Body
.
After adding or removing fixtures make sure to call the setMass()
or setMass(Mass.Type)
method to compute the new total
Mass
for the body.
fixture
- the BodyFixture
Body
this bodyjava.lang.NullPointerException
- if fixture is nullpublic boolean removeFixture(BodyFixture fixture)
BodyFixture
from the Body
.
After adding or removing fixtures make sure to call the setMass()
or setMass(Mass.Type)
method to compute the new total
Mass
for the body.
fixture
- the BodyFixture
BodyFixture
was removed from this Body
public BodyFixture removeFixture(int index)
BodyFixture
at the given index.
After adding or removing fixtures make sure to call the setMass()
or setMass(Mass.Type)
method to compute the new total
Mass
for the body.
index
- the indexBodyFixture
the fixture removedjava.lang.IndexOutOfBoundsException
- if index is out of boundspublic java.util.List<BodyFixture> removeAllFixtures()
After adding or removing fixtures make sure to call the setMass()
or setMass(Mass.Type)
method to compute the new total
Mass
for the body.
BodyFixture
>public boolean containsFixture(BodyFixture fixture)
Body
contains the given BodyFixture
.fixture
- the fixturepublic Body setMass()
This method will calculate a total mass for the body given the masses of the fixtures.
This method will always set this body's mass type to Normal.
Body
this bodysetMass(Mass.Type)
,
addFixture(BodyFixture)
,
removeFixture(BodyFixture)
,
removeFixture(int)
public Body setMass(Mass.Type type)
This method will calculate a total mass for the body given the masses of the fixtures.
A Mass.Type
can be used to create special mass
types.
type
- the Mass.Type
Body
this bodyjava.lang.NullPointerException
- if type is nulladdFixture(BodyFixture)
,
removeFixture(BodyFixture)
,
removeFixture(int)
public Body setMass(Mass mass)
Body
's mass information.
This method can be used to set the mass of the body explicitly.
public Body setMassType(Mass.Type type)
Mass.Type
of this Body
.
This method does not compute/recompute the mass of the body but solely sets the mass type to one of the special types.
If the mass of this body has not been set previously by one of the setMass()
methods, then this method will compute the mass.
Since its possible to create a Mass
object with zero mass and/or
zero inertia (Mass m = new Mass(new Vector2(), 0, 0);
for example), setting the type
to something other than Mass.Type.INFINITE can have undefined results.
type
- the desired typeBody
this bodyjava.lang.NullPointerException
- if type is nullprotected void setRotationDiscRadius()
Body
.
This method requires that the center of mass be computed first.
The rotation disc radius is the radius, from the center of mass, of the disc that encompasses the entire body as if it was rotated 360 degrees.
getRotationDiscRadius()
public Body applyForce(Vector2 force)
Body
.
This method will wake-up the body if its sleeping.
This method does not apply the force if this body
returns zero from the Mass.getMass()
method.
The force is not applied immediately, but instead stored in the
force accumulator (getAccumulatedForce()
). This is to
preserve the last time step's computed force (getForce()
.
force
- the forceBody
this bodyjava.lang.NullPointerException
- if force is nullpublic Body applyForce(Force force)
Force
to this Body
.
This method will wake-up the body if its sleeping.
This method does not apply the force if this body
returns zero from the Mass.getMass()
method.
The force is not applied immediately, but instead stored in the
force accumulator (getAccumulatedForce()
). This is to
preserve the last time step's computed force (getForce()
.
force
- the forceBody
this bodyjava.lang.NullPointerException
- if force is nullpublic Body applyTorque(double torque)
Body
.
This method will wake-up the body if its sleeping.
This method does not apply the torque if this body returns
zero from the Mass.getInertia()
method.
The torque is not applied immediately, but instead stored in the
torque accumulator (getAccumulatedTorque()
). This is to
preserve the last time step's computed torque (getTorque()
.
torque
- the torque about the centerBody
this bodypublic Body applyTorque(Torque torque)
Torque
to this Body
.
This method will wake-up the body if its sleeping.
This method does not apply the torque if this body returns
zero from the Mass.getInertia()
method.
The torque is not applied immediately, but instead stored in the
torque accumulator (getAccumulatedTorque()
). This is to
preserve the last time step's computed torque (getTorque()
.
torque
- the torqueBody
this bodyjava.lang.NullPointerException
- if torque is nullpublic Body applyForce(Vector2 force, Vector2 point)
Body
at the
given point (torque).
This method will wake-up the body if its sleeping.
This method does not apply the force if this body
returns zero from the Mass.getMass()
method nor
will it apply the torque if this body returns
zero from the Mass.getInertia()
method.
The force/torque is not applied immediately, but instead stored in the
force/torque accumulators (getAccumulatedForce()
and
getAccumulatedTorque()
). This is to preserve the last time
step's computed force (getForce()
and torque (getTorque()
).
force
- the forcepoint
- the application point in world coordinatesBody
this bodyjava.lang.NullPointerException
- if force or point is nullpublic Body applyImpulse(Vector2 impulse)
Body
at its center of mass.
This method will wake-up the body if its sleeping.
This method does not apply the impulse if this body's mass
returns zero from the Mass.getInertia()
method.
NOTE: Applying an impulse differs from applying a force and/or torque. Forces and torques are stored in accumulators, but impulses are applied to the velocities of the body immediately.
impulse
- the impulse to applyBody
this bodyjava.lang.NullPointerException
- if impulse is nullpublic Body applyImpulse(double impulse)
Body
about its center of mass.
This method will wake-up the body if its sleeping.
This method does not apply the impulse if this body's inertia
returns zero from the Mass.getInertia()
method.
NOTE: Applying an impulse differs from applying a force and/or torque. Forces and torques are stored in accumulators, but impulses are applied to the velocities of the body immediately.
impulse
- the impulse to applyBody
this bodypublic Body applyImpulse(Vector2 impulse, Vector2 point)
Body
at the given point.
This method will wake-up the body if its sleeping.
This method does not apply the linear impulse if this body
returns zero from the Mass.getMass()
method nor
will it apply the angular impulse if this body returns
zero from the Mass.getInertia()
method.
NOTE: Applying an impulse differs from applying a force and/or torque. Forces and torques are stored in accumulators, but impulses are applied to the velocities of the body immediately.
impulse
- the impulse to applypoint
- the world space point to apply the impulseBody
this bodyjava.lang.NullPointerException
- if impulse or point is nullpublic void clearForce()
Body
.public void clearAccumulatedForce()
Renamed from clearForces (3.0.0 and below).
public void clearTorque()
Body
.public void clearAccumulatedTorque()
Renamed from clearTorques (3.0.0 and below).
protected void accumulate(double elapsedTime)
elapsedTime
- the elapsed time since the last callpublic boolean isStatic()
public boolean isKinematic()
public boolean isDynamic()
protected void setWorld(World world)
world
- the worldpublic World getWorld()
Returns null if the body has not been added to a world or has been removed.
World
public void setAutoSleepingEnabled(boolean flag)
Body
to allow or disallow automatic sleeping.flag
- true if the Body
is allowed to sleeppublic boolean isAutoSleepingEnabled()
Body
is allowed to be
put to sleep automatically.public boolean isAsleep()
Body
is sleeping.public void setAsleep(boolean flag)
Body
is awake or not.
If flag is true, this body's velocity, angular velocity, force, torque, and accumulators are cleared.
flag
- true if the body should be put to sleepprotected double getSleepTime()
Once a body is asleep the sleep time is reset to zero.
public boolean isActive()
Body
is active.public void setActive(boolean flag)
Body
is active or not.flag
- true if this Body
should be activeprotected boolean isOnIsland()
protected void setOnIsland(boolean flag)
public boolean isBullet()
Body
is a bullet.setBullet(boolean)
public void setBullet(boolean flag)
Body
.
A bullet is a very fast moving body that requires
continuous collision detection with all other
Body
s to ensure that no collisions are missed.
flag
- true if this Body
is a bulletpublic boolean isConnected(Body body)
Body
is connected
to this Body
by a Joint
.
Returns false if the given body is null.
body
- the suspect connected bodypublic boolean isConnected(Body body, boolean collisionAllowed)
Body
is connected to this
Body
, given the collision flag, via a Joint
.
If the given collision flag is true, this method will return true
only if collision is allowed between the two joined Body
s.
If the given collision flag is false, this method will return true
only if collision is NOT allowed between the two joined Body
s.
If the Body
s are connected by more than one joint, if any allows
collision, then the bodies are considered connected AND allowing collision.
Returns false if the given body is null.
body
- the suspect connected bodycollisionAllowed
- the collision allowed flagpublic boolean isInContact(Body body)
public void rotate(double theta, double x, double y)
Transformable
rotate
in interface Transformable
theta
- the angle of rotation in radiansx
- the x coordinate to rotate abouty
- the y coordinate to rotate aboutpublic void rotate(double theta, Vector2 point)
Transformable
rotate
in interface Transformable
theta
- the angle of rotation in radianspoint
- the point to rotate aboutpublic void rotate(double theta)
Transformable
rotate
in interface Transformable
theta
- the angle of rotation in radianspublic void rotateAboutCenter(double theta)
Body
about its center of mass.theta
- the angle of rotation in radianspublic void translate(double x, double y)
Transformable
translate
in interface Transformable
x
- the translation in the x directiony
- the translation in the y directionpublic void translate(Vector2 vector)
Transformable
translate
in interface Transformable
vector
- the translation along a vectorpublic void translateToOrigin()
This method is useful if bodies have a number of fixtures and the center of mass is not at the origin. This method will reposition the body so that the center of mass is at the origin.
protected void shiftCoordinates(Vector2 shift)
Typically this method should not be called directly. Instead
use the World.shiftCoordinates(Vector2)
method to move the
entire world.
shift
- the distance to shift along the x and y axespublic BodyFixture getFixture(int index)
Collidable
Fixture
at the given index.
Renamed from getShape(int).
getFixture
in interface Collidable
index
- the index of the Fixture
Fixture
public BodyFixture getFixture(Vector2 point)
Returns null if the point is not contained in any fixture in this body.
point
- a world space pointBodyFixture
public java.util.List<BodyFixture> getFixtures(Vector2 point)
Returns an empty list if the point is not contained in any fixture in this body.
point
- a world space pointBodyFixture
>public BodyFixture removeFixture(Vector2 point)
Returns null if the point is not contained in any fixture in this body.
point
- a world space pointBodyFixture
public java.util.List<BodyFixture> removeFixtures(Vector2 point)
Returns an empty list if the point is not contained in any fixture in this body.
point
- a world space pointBodyFixture
>public int getFixtureCount()
Collidable
getFixtureCount
in interface Collidable
public java.util.List<BodyFixture> getFixtures()
Collidable
Collidable
.getFixtures
in interface Collidable
Fixture
>public Transform getTransform()
Collidable
Transform
of the object.getTransform
in interface Collidable
Transform
public Transform getInitialTransform()
This transform represents the last frame's position and orientation.
Transform
public double getRotationDiscRadius()
Collidable
creates if rotated 360 degrees.public void setTransform(Transform transform)
Body
's transform.
This method sets both the initial and the current transform of this body. This is
important to know when this body is a fast moving body (bullet) and needs to
be checked for tunneling. Instead, set the initial and final transforms
explicitly by calling getInitialTransform()
and getTransform()
and calling the Transform.set(Transform)
method.
transform
- the transformjava.lang.NullPointerException
- if transform is nullpublic java.lang.Object getUserData()
Body
.public void setUserData(java.lang.Object userData)
Body
.userData
- the user data objectpublic java.util.UUID getId()
Collidable
Collidable
.getId
in interface Collidable
public AABB createAABB()
Collidable
AABB
from this Collidable
.
This method returns a degenerate AABB, (0.0, 0.0) to (0.0, 0.0),
for Collidable
s that have no fixtures.
createAABB
in interface Collidable
AABB
public AABB createSweptAABB()
Collidable
exists from the initial transform
to the final transform.
This method takes the bounding circle, using the world center and rotation disc radius, at the initial and final transforms and creates an AABB containing both.
AABB
public AABB createSweptAABB(Transform initialTransform, Transform finalTransform)
AABB
from the given start and end Transform
s
for this Body
.
This method may return a degenerate AABB, where the min == max, if the body has not moved and does not have any fixtures. If this body does have fixtures, but didn't move, an AABB encompassing the initial and final center points is returned.
public Vector2 getChangeInPosition()
public double getChangeInOrientation()
This method will return a change in the range [0, 2π). This isn't as useful if the angular velocity is greater than 2π per time step. Since we don't have the timestep here, we can't compute the exact change in this case.
public Vector2 getLocalCenter()
Vector2
the center of mass in local coordinatespublic Vector2 getWorldCenter()
Vector2
the center of mass in world coordinatespublic Vector2 getLocalPoint(Vector2 worldPoint)
worldPoint
- a world space pointVector2
local space pointpublic Vector2 getWorldPoint(Vector2 localPoint)
Body
.public Vector2 getLocalVector(Vector2 worldVector)
worldVector
- a world space vectorVector2
local space vectorpublic Vector2 getWorldVector(Vector2 localVector)
Body
.public boolean contains(Vector2 point)
point
- the world space test pointpublic Vector2 getLinearVelocity()
This method replaces the getVelocity(Vector2)
method.
Vector2
public Vector2 getLinearVelocity(Vector2 point)
This method replaces the getVelocity(Vector2)
method.
point
- the point in world spaceVector2
public void setLinearVelocity(Vector2 velocity)
Call the setAsleep(boolean)
method to wake up the Body
if the Body
is asleep and the velocity is not zero.
This method replaces the setVelocity(Vector2)
method.
velocity
- the desired velocityjava.lang.NullPointerException
- if velocity is nullpublic void setLinearVelocity(double x, double y)
Call the setAsleep(boolean)
method to wake up the Body
if the Body
is asleep and the velocity is not zero.
x
- the linear velocity along the x-axisy
- the linear velocity along the y-axispublic double getAngularVelocity()
public void setAngularVelocity(double angularVelocity)
Call the setAsleep(boolean)
method to wake up the Body
if the Body
is asleep and the velocity is not zero.
angularVelocity
- the angular velocitypublic Vector2 getAccumulatedForce()
Vector2
public double getTorque()
public double getAccumulatedTorque()
public double getLinearDamping()
public void setLinearDamping(double linearDamping)
linearDamping
- the linear dampingjava.lang.IllegalArgumentException
- if linearDamping is less than zeropublic double getAngularDamping()
public void setAngularDamping(double angularDamping)
angularDamping
- the angular dampingjava.lang.IllegalArgumentException
- if angularDamping is less than zeropublic double getGravityScale()
public void setGravityScale(double scale)
scale
- the gravity scale for this bodypublic java.util.List<Body> getJoinedBodies()
Body
s connected
by Joint
s.
If a body is connected to another body with more than one joint, this method will return just one entry for the connected body.
Body
>public java.util.List<Body> getInContactBodies(boolean sensed)
Body
s that are in
contact with this Body
.
Passing a value of true results in a list containing only the sensed contacts for this body. Passing a value of false results in a list containing only normal contacts.
Calling this method from any of the CollisionListener
methods
may produce incorrect results.
If this body has multiple contact constraints with another body (which can happen when either body has multiple fixtures), this method will only return one entry for the in contact body.
sensed
- true for only sensed contacts; false for only normal contactsBody
>public java.util.List<ContactPoint> getContacts(boolean sensed)
ContactPoint
s
Passing a value of true results in a list containing only the sensed contacts for this body. Passing a value of false results in a list containing only normal contacts.
Calling this method from any of the CollisionListener
methods
may produce incorrect results.
Modifying the ContactPoint
s returned is not advised. Use the
ContactListener
methods instead.
sensed
- true for only sensed contacts; false for only normal contactsContactPoint
>@Deprecated public Body apply(Vector2 force, Vector2 point)
applyForce(Vector2, Vector2)
in 3.1.1Body
at the
given point (torque).
This method will wake-up the body if its sleeping.
force
- the forcepoint
- the application point in world coordinatesBody
this bodyjava.lang.NullPointerException
- if force or point is nullapplyForce(Vector2, Vector2)
@Deprecated public Body apply(Torque torque)
applyTorque(Torque)
in 3.1.1torque
- the torqueBody
this bodyjava.lang.NullPointerException
- if torque is nullapplyTorque(Torque)
@Deprecated public Body apply(double torque)
applyTorque(double)
in 3.1.1Body
.
This method will wake-up the body if its sleeping.
torque
- the torque about the centerBody
this bodyapplyTorque(double)
@Deprecated public Body apply(Force force)
applyForce(Force)
in 3.1.1force
- the forceBody
this bodyjava.lang.NullPointerException
- if force is nullapplyForce(Force)
@Deprecated public Body apply(Vector2 force)
applyForce(Vector2)
in 3.1.1Body
.
This method will wake-up the body if its sleeping.
force
- the forceBody
this bodyjava.lang.NullPointerException
- if force is nullapplyForce(Vector2)
@Deprecated public Vector2 getVelocity()
getLinearVelocity()
in 3.1.5Vector2
.Vector2
@Deprecated public Vector2 getVelocity(Vector2 point)
getLinearVelocity(Vector2)
in 3.1.5point
- the pointVector2
@Deprecated public void setVelocity(Vector2 velocity)
setLinearVelocity(Vector2)
in 3.1.5Vector2
.
Call the setAsleep(boolean)
method to wake up the Body
if the Body
is asleep and the velocity is not zero.
velocity
- the velocityjava.lang.NullPointerException
- if velocity is null


From a simple extra socket to a full house rewire
Installation of lighting and power circuits in schools, libraries and offices
Installation of three phase equipment in workshops


The simple ideal TRIAC example shows how a triac is used within an alternating current circuit.
The TRIAC is not conducting until the Boolean input becomes true (internally coded by 1, therefore the input is called fire1). Then it becomes "conducting", the knee voltage is reached. If the TRIAC voltage falls below the knee voltage, the TRIAC becomes blocking. Due to the antiparallel connection of the internal two thyristors the same behavior is repeated in the negative half-wave.
Simulate until 2 seconds. Display V.p.v (input voltage), booleanPulse.y (fire1 input), and both idealTriac.n.v and idealTriac.n.i, which demonstrate the TRIAC behavior.


Communications Cloud
Programmable Messaging
Programmable Voice
Programmable Video
Programmable Chat
Programmable Fax
Autopilot
Super Network
Phone Numbers
Elastic SIP Trunking
Internet of Things
Interconnect
Lookup
Engagement Cloud
Flex
Authy
Verify
TaskRouter
Notify
Conversations
Conversations
Proxy
Runtime
Functions
Studio
Assets
TwiML Bins
Sync
API Explorer
Debugger
Twilio.org
Impact Access Program
Impact Access Program
Marketplace
Add-ons
Channels
Support
Support Center
Twilio.com
Privacy Policy
|
Terms of Service
Twilio
© 2020
Dashboard
Billing
Usage
Notification Preferences
Settings
Upgrade
Trust Hub
Beta
Account Insights
Beta


Migrate Images
Primary use of this dialo is to copy images from file system to database and vice versa.
It can also remove images from file system or from datbase which sizes are compatible with sizes of images that should be stored in the storage.
Image storage
The Caps Console application allows you to store images of caps and other items either in database or in file system.
Storing images in file system has several advantages - mainly images in files system are easilly accessible and can be changed, replaced and otherwise managed from file and image management tools.
Storing images in database helps mainly when you have database on server and it's accessed from different machines (not meaning web access).
Images of simple items (cap signs, cap types, main types, shapes and storages) are stored only in one size - the original size of image provided by you when creating an item is kept.
Recomended size for all item types except storages is 32×32 or 64×64 pixels, PNG format.
Storages images should be bigger (about 1024px) and it's OK for them not to be square.
Images of caps are stored in a different way - several sizes of each image. Typically image in original size si stored, image for big preview (i.e. 1024px) and medium preview (i.e. 256px) and small preview (i.e. 64px).
It's recommended to store original image to preserve all details and 256px and 64px thumbnails to make application working faster and consuming less memory. Tooltips and image preview uses these two sizes.
Big preview can be used on web or can replace original image if you have limited disk space (i.e. on hosting server).
File system storage
When storing images in file system, you must select so-called Image root.
It's folder the application stores images in and looks for images when showing them.
Internal folder structure of Image root is governed by the application and you should not change it.
However you can edit and replace images stored there using file management tools and image editing tools.
You can also manually delete images if you don't wont them - but be carefull:
Deleting images of simple objects leads to images of those objects not being displayed.
Deleting 256px or 64px thumbnails of caps leads to application working slower and consuming much more memory (because it needs to load a big image and resize it).
The Image root folder contains following subfolders:
- CapSing
- Contains images of Cap signs. All images are in PNG format. Size of image is kept unchanged whan you are creating or editing Cap sign.
- Name of image is ID of Cap sign.
- CapType
- Contains images of Cap types. All images are in PNG format. Size of image is kept unchanged whan you are creating or editing Cap type.
- Name of image is ID of Cap type.
- MainType
- Contains images of Main types. All images are in PNG format. Size of image is kept unchanged whan you are creating or editing Main type.
- Name of image is ID of Main type.
- Shape
- Contains images of Shapes. All images are in PNG format. Size of image is kept unchanged whan you are creating or editing Shape.
- Name of image is ID of Shape.
- Storage
- Contains images of Storages. All images are in PNG format. Size of image is kept unchanged whan you are creating or editing Storage.
- Name of image is ID of Storage.
- original
- Contains images of Caps in original size. Images can be in many formats (JPEG, GIF, TIFF, BMP, PNG).
- Name of image is kept same as name of image you've originally specified. In case of coflict with existing image, _ and number is added.
- Several folders with names like 256_256, 64_64 etc.
- Keeps down-sized thumbnails and previews of images. Numbers are sizes in pixels.
- Both numbers are always equal, however images in those folders can be non-square. In such (common) case the image is scaled down proportionally so that longer side (width or height) is same as namber in folder name.
You can specify in database configuration which sizes of images are stored in file system.
You can also specify in database configuration images of which simple obejcts are stored in database and of which in file system.
Database storage
When images are stored in database similar rules apply as when stored in file system:
Images of simple objects are stored in one size (the original one - 64×64 px is recommended for all simple items except storages) and images of caps are stored in sizes given in configuration and optionally in original size.
Images of caps as well as of simple objects are stored in their original format (JPEG, TIFF, GIF, BMP and PNG are supported).
While in file system image sizes of Cap images are identified in folder name as maximal size of longer side of image (and folder original is used for images in original size) in database size is determined for each image separatelly and both - width and height are stored.
So, in database storage, there is no explicit indication of original size image.
One rule apply whe storing cap images in file system and in database:
When storing resized images only downscaling is performed.
Images are not enlarged (with exception when original image is smaller than the smallest image size used).
Dialog description
- Image types
- This frame allows you to chose which types of images will be migrated whne Migrate is pressed.
-
- Cap signs
- Images of cap signs
- Cap types
- Images of cap types
- Main types
- Images of main types
- Shapes
- Images of shapes
- Storages
- Images of storages
- Caps
- Images of caps
- Note: You should setup which sizes of cap images are stored in storage (below).
- Migrate images from File System to Database
- Check this option if you want to copy images currently stored in file system to database
-
- Sizes of images stored in database
- The list below contains sizes of images (in pixels of longer side) to be stored in database (0 means original size).
- Initially the list contains setting from database settings. To remove item from list press delete.
- Save these settings
- Save this choice of image sizes to be stored in database to database settings.
- Delete other images
- Deletes images of caps from database which size (lenght of longer side in pixels) is not one of sizes selected above.
- When original size (0) is specified as one of sizes of images stored in database, the biggest variant of each images is treated as the original one and is not deleted.
- +
- Adds a new numeric up-down control to list above.
- Migrate images from Database to File System
- Check this option if you want to copy images currently stored in database to file system
-
- Sizes of images stored in file system
- The list below contains sizes of images (in pixels of longer side) to be stored in file system (0 means original size).
- Initially the list contains setting from database settings. To remove item from list press delete.
- Save these settings
- Save this choice of image sizes to be stored in file system to database settings.
- Delete other images
- Deletes images of caps from file system which size (lenght of longer side in pixels) is not one of sizes selected above.
- +
- Adds a new numeric up-down control to list above.
- Image root
- Shows path of folder where images are currently stored. Press Change to change it. Note: The change is stored to application settings (affects rest of application).
- Replace existing
- Check this box to force copy all images, even when they exist in target. This does not affect images not in source.
- Note: You should only copy images from source to destination when source contains images of same or bigger size than destination, otherwise images are not copyied with exception of the smallest one (or original) because it does not make sense to enlage small images.
- Migrate
-
Performs image migration from file system to database of from database to file system.
For each image (of types selected in first box) the biggest available image is taken from source and resized to sizes required by destination (images are not enlarged).
- When copying images from database to file system and file system is set up to store images in original size, the biggest image stored in database is assumed to be original. So don't use this option when database stores only small images.
- Cancel
- Closes thw window without doing anything.


We cannot find any results for the search ''. Ensure you have typed in the correct text or try something less specific.
There are currently no results for today. Check back later!


{% extends "base.html" %} {% block content %}
Actually comparing two benchmarks, use the box below to enter two commit hash and compare both.


Home
Menus
Lunch Menu
Early Bird Menu
À la carte Menu
About Us
Booking
Take Away
Cooking Demos
☰
Welcome to Yummy Foods Restaurant
Please try our Menus
Early Bird Menu
Lunch
Àla Carté Menu
Take Away Menu
Book Now


You will have to install some development tools to compile JA++, these are the tools used for official builds.
- TDM-GCC-64 (TDM64 Bundle)
- Python 2.7, enable "Install python.exe to Path"
Make sure C:\Python27 and C:\Python27\Scripts are in your %PATH% environment variable.
- SCons, don't change installation options
- Git for Windows
Now to grab the latest code and compile it
- Navigate to whatever folder you want the code to be in (e.g. Desktop)
- Right click -> Git Bash here
- Download latest code
$ git clone https://github.com/Razish/japp.git
$ cd japp
- Compile it
$ scons.bat force32=1 no_sql=1
This should produce cgamex86.dll, jampgamex86.dll, uix86.dll in the current directory.
- Create a .zip containing these files and rename to *.pk3
- Copy the PK3 to GameData/japlus.
If you wish to use MSVC with JA++, specify
tools=default as an argument to
scons.bat
There are other options you can specify as arguments to
scons
- force32 1 to build a 32-bit binary on a 64-bit machine
- debug 1 to generate debug information, 2 to also optimise code
- no_sql 1 to disable MySQL/SQLite support if you run into issues with it
- no_crashhandler 1 to disable the crash handler/logger functionality
Or the following environment variables:
- NO_SSE=1 to not generate SSE2 instructions - closer to basejka at the cost of performance. This is used for official builds
- MORE_WARNINGS=1 to enable more compiler warnings
- Install tools and dependencies
$ sudo apt-get install git scons gcc g++ libreadline-dev
- Download the repository
$ git clone https://github.com/Razish/japp.git
$ cd japp
- Compile and copy files to JA installation
$ scons
$ cp ./*.so /path/to/jka/japlus/
- If you want to share these files, you can automatically package them using the Lua script
$ sudo apt-get install lua5.2 lua-filesystem p7zip-full
$ lua package.lua
This will produce two .zip files containing the binaries.
There are other options you can specify as arguments to
scons
- force32 1 to build a 32-bit binary on a 64-bit machine
- debug 1 to generate debug information, 2 to also optimise code
- no_sql 1 to disable MySQL/SQLite support if you run into issues with it
- no_crashhandler 1 to disable the crash handler/logger functionality
Or the following environment variables:
- NO_SSE=1 to not generate SSE2 instructions - closer to basejka. This is used for official builds
- MORE_WARNINGS=1 to enable more compiler warnings


Class: Qpid::Proton::SSLDomain
- Inherits:
-
Object
- Object
- Qpid::Proton::SSLDomain
- Defined in:
- lib/core/ssl_domain.rb
Overview
The top-level object that stores the configuration used by one or more SSL sessions.
Constant Summary collapse
- VERIFY_PEER =
Require the peer to provide a valid identifying certificate.
Cproton::PN_SSL_VERIFY_PEER
- ANONYMOUS_PEER =
Do no require a certificate nor a cipher authorization.
Cproton::PN_SSL_ANONYMOUS_PEER
- VERIFY_PEER_NAME =
Require a valid certficate and matching name.
Cproton::PN_SSL_VERIFY_PEER_NAME
Instance Method Summary collapse
-
#allow_unsecured_client
Permit a server to accept connection requests from non-SSL clients.
-
#credentials(cert_file, key_file, password)
Set the certificate that identifies the local node to the remote.
-
#peer_authentication(verify_mode, trusted_CAs = nil)
Configures the level of verification used on the peer certificate.
-
#trusted_ca_db(certificate_db)
Configures the set of trusted CA certificates used by this domain to verify peers.
Instance Method Details
#allow_unsecured_client
Permit a server to accept connection requests from non-SSL clients.
This configures the server to “sniff” the incomfing client data stream and dynamically determine whether SSL/TLS is being used. This option is disabled by default: only clients using SSL/TLS are accepted by default.
145 146 147 |
# File 'lib/core/ssl_domain.rb', line 145 def allow_unsecured_client Cproton.pn_ssl_domain_allow_unsecured_client(@impl); end |
#credentials(cert_file, key_file, password)
Set the certificate that identifies the local node to the remote.
This certificate establishes the identity for thelocal node for all SSL sessions created from this domain. It will be sent to the remote if the remote needs to verify the dientify of this node. This may be used for both SSL servers and SSL clients (if client authentication is required by the server).
NOTE: This setting affects only those instances of SSL created after this call returns. SSL objects created before invoking this method will use the domain’s previous settings.
79 80 81 82 |
# File 'lib/core/ssl_domain.rb', line 79 def credentials(cert_file, key_file, password) Cproton.pn_ssl_domain_set_credentials(@impl, cert_file, key_file, password) end |
#peer_authentication(verify_mode, trusted_CAs = nil)
Configures the level of verification used on the peer certificate.
This method congtrols how the peer’s certificate is validated, if at all. By default, servers do not attempt to verify their peers (ANONYMOUS_PEER) but clients attempt to verify both the certificate and peer name (VERIFY_PEER_NAME). Once certficates and trusted CAs are configured, peer verification can be enabled.
NOTE: In order to verify a peer, a trusted CA must be configured.
NOTE: Servers must provide their own certficate when verifying a peer.
NOTE: This setting affects only those SSL instances created after this call returns. SSL instances created before invoking this method will use the domain’s previous setting.
132 133 134 135 |
# File 'lib/core/ssl_domain.rb', line 132 def peer_authentication(verify_mode, trusted_CAs = nil) Cproton.pn_ssl_domain_set_peer_authentication(@impl, verify_mode, trusted_CAs) end |
#trusted_ca_db(certificate_db)
Configures the set of trusted CA certificates used by this domain to verify peers.
If the local SSL client/server needs to verify the identify of the remote, it must validate the signature of the remote’s certificate. This function sets the database of trusted CAs that will be used to verify the signature of the remote’s certificate.
*NOTE:# This setting affects only those SSL instances created after this call returns. SSL objects created before invoking this method will use the domain’s previous setting.
101 102 103 |
# File 'lib/core/ssl_domain.rb', line 101 def trusted_ca_db(certificate_db) Cproton.pn_ssl_domain_set_trusted_ca_db(@impl, certificate_db) end |


Bravo!
Start
Calibrate
Useful positions
Goto Home
Goto Zero
Learning mode
On
Off
Video
Movements
Joint 1
Joint 2
Joint 3
Joint 4
Joint 5
Joint 6
Go


|
modular-ws2812-display-esp32
1.0
ESP32 software for controlling WS2812 LED display via phone app.
|
Go to the source code of this file.
Functions | |
| void | onWebSocketEvent (uint8_t num, WStype_t type, uint8_t *payload, size_t length) |
| WebSocker Server event loop. Detects wireless connections from clients. The main events used are the following: More... | |
| bool | updateSettings (char *data, size_t &prevHeight, size_t &prevWidth, std::string &matrixType) |
| Update settings received from the phone application. These include the LED display height, width, and matrix type. Data received is expected in the following format: More... | |
| void | readFileAction (uint8_t num, uint8_t *payload) |
| Receives the file name to be read. Updates the state machine to read and display the frame, then sends the frame data to the phone application. More... | |
| void | defaultReadAction (uint8_t num, uint8_t *payload) |
| Receives a filename from the client, and sends the file data back. More... | |
| void | writeFileAction (uint8_t num, size_t length, uint8_t *payload) |
| Processes data received from the client. Write the LED data to the specified filename. More... | |
| void | appendFileAction (uint8_t num, size_t length, uint8_t *payload) |
| Processes data received from the client. Append the LED data to the specified filename. More... | |
| void | liveInputAction (uint8_t *payload) |
| Trigger a state change on the LED driver task. Updates the flags to enter the Live Input state. More... | |
| void | clearLiveInput () |
| Clears the LED display and returns the state to the Live Input state. More... | |
| void | sendSize (uint8_t client) |
| Send the LED display information, width, height and matrix type, to the phone application. Data is delimited with a newline character. More... | |
| void | exitLiveInputState () |
| Trigger a state change in the LED driver task. Exits the Live Input state, clears the display, and enters the default state. More... | |
| void | receivedLiveInput (uint8_t *payload) |
| Receives data from the client during the Live Input state. Loads the received data into AppDataBuffer to update the display. More... | |
| void | clearFrameAction () |
| Triggers state change for the LED driver task. Clears the LED display and exits the current state to enter the "Default" state. More... | |
| void | updateMatrixTypeData (uint8_t *mType) |
| Receive the updated matrixType from the phone application. More... | |
| void | AnimationAction (const char *animationLabel) |
| Triggers a state change in the LED driver task. Enters the animation state and assigns the animation. More... | |
| void | getDefaultFrames (uint8_t client) |
| Request to read the Default Display frame file in the "Production/" folder, and send the data to the phone application. More... | |
| void | updateBufferLength (const size_t newWidth, const size_t newHeight) |
| Update the size of the LEDBuffer upon LED display size updates. More... | |
| void AnimationAction | ( | const char * | animationLabel | ) |
Triggers a state change in the LED driver task. Enters the animation state and assigns the animation.
| animationLabel | The chosen animation to display. |
| void appendFileAction | ( | uint8_t | num, |
| size_t | length, | ||
| uint8_t * | payload | ||
| ) |
Processes data received from the client. Append the LED data to the specified filename.
| num | The client id. |
| length | The length of the data received. |
| payload | The data received from the client. |
| void clearFrameAction | ( | ) |
Triggers state change for the LED driver task. Clears the LED display and exits the current state to enter the "Default" state.
| void clearLiveInput | ( | ) |
Clears the LED display and returns the state to the Live Input state.
| void defaultReadAction | ( | uint8_t | num, |
| uint8_t * | payload | ||
| ) |
Receives a filename from the client, and sends the file data back.
| num | The client id. |
| payload | The data received from the client. |
| void exitLiveInputState | ( | ) |
Trigger a state change in the LED driver task. Exits the Live Input state, clears the display, and enters the default state.
| void getDefaultFrames | ( | uint8_t | client | ) |
Request to read the Default Display frame file in the "Production/" folder, and send the data to the phone application.
| client | The client id. |
| void liveInputAction | ( | uint8_t * | payload | ) |
Trigger a state change on the LED driver task. Updates the flags to enter the Live Input state.
| payload | The data received from the client. |
| void onWebSocketEvent | ( | uint8_t | num, |
| WStype_t | type, | ||
| uint8_t * | payload, | ||
| size_t | length | ||
| ) |
WebSocker Server event loop. Detects wireless connections from clients. The main events used are the following:
Majority of the work happens on the WStype_TEXT event. The first four characters of the payload define the endpoint. The following are the endpoints and their actions are as defined:
| num | The client id. |
| type | The type of event captured. Usually is one of the three mentioned above. |
| payload | Data received from a client |
| length | Length of the data received |
| void readFileAction | ( | uint8_t | num, |
| uint8_t * | payload | ||
| ) |
Receives the file name to be read. Updates the state machine to read and display the frame, then sends the frame data to the phone application.
| num | The client id. |
| payload | The data received from the client. |
| void receivedLiveInput | ( | uint8_t * | payload | ) |
Receives data from the client during the Live Input state. Loads the received data into AppDataBuffer to update the display.
| payload | The data received from the client. |
| void sendSize | ( | uint8_t | client | ) |
Send the LED display information, width, height and matrix type, to the phone application. Data is delimited with a newline character.
| client | The client id. |
| void updateBufferLength | ( | const size_t | newWidth, |
| const size_t | newHeight | ||
| ) |
Update the size of the LEDBuffer upon LED display size updates.
| newWidth | The new width of the display. |
| newHeight | The new height of the display |
| void updateMatrixTypeData | ( | uint8_t * | mType | ) |
Receive the updated matrixType from the phone application.
| mType | New matrixType |
| bool updateSettings | ( | char * | data, |
| size_t & | prevHeight, | ||
| size_t & | prevWidth, | ||
| std::string & | matrixType | ||
| ) |
Update settings received from the phone application. These include the LED display height, width, and matrix type. Data received is expected in the following format:
| data | Data received from the client. |
| prevHeight | The current height. Passed by reference to update the value. |
| prevWidth | The current width. Passed by reference to update the value. |
| matrixType | The current matrix type. Passed by reference to update the value. |
| void writeFileAction | ( | uint8_t | num, |
| size_t | length, | ||
| uint8_t * | payload | ||
| ) |
Processes data received from the client. Write the LED data to the specified filename.
| num | The client id. |
| length | The length of the data received. |
| payload | The data received from the client. |


a web developer in the making under the EDU-Outbox program. I am also a
student at Uganda Martyrs Namugongo SS in Senior Two. I currently
live in Kampala specifically Kyebando- Kisalosalo. I was born in 2006
on the 15th of August.
I enjoy playing video games like Need for Speed Payback and WWE 2K16,
swimming, watching soccer(and playing at times), sitcoms and listening
to trap
I've just started building my skills but I can currently say I'm good
at writing HTML and CSS code though I am still learning more to get
better.
I currently don't have projects that I am working on but with time, I am
this section will be filled with lots of them with time. Sorry to
disappoint
you if you expected more.


and the are respiratory with for {background viral that The cells infection viruses from margin {border-style COVID- px;} virus #ffffff;} cell severe immune which SARS-CoV- can influenza cells, al., antiviral clinical etÂ has have including infected responses (FigureÂ Respiratory been coronavirus epithelial other disease many px; such when {font-family IL- also drugs font-size human infections innate patients receptor treatment ACE blood double; host large role spread surface these this tract. viruses, whereas Elsevier against although border-color border-width but causes cytokine infect into lower more not occurs replication solid; specific syndrome target tract trials use {font-style {font-weight Infection Med. SARS-CoV-, Virus airborne antibodies associated avian bold cascade caused cells. cellular centre contact courier; critical cytokines diverse during em; incubation infection. levels lungs may mucosal pneumonia produce proinflammatory proteins pt;} release released resource seen several sialic some than tract, unique


| <!-- --> |
HTML comments are invisible on a browser unless the source code is viewed. They are used to provide instructions and credit |
n/a |
container |
| <!DOCTYPE> |
Mandatory first declaration in an HTML document that specifies rendering instructions for your browser |
n/a |
empty |
| <a> |
Defines a hyperlink, which is used to link from one page to another or to another location within a page. The all important href attribute frequently used within the tag indicates the link's destination |
inline |
container |
| <article> |
Provides a semantic label to independent, self-contained content that should make sense on its own and could be placed or reused separately from the rest of the site. Common examples are blog posts or comments |
block |
container |
| <aside> |
Used to describe, summarize or identify content that is tangentially related to the primary content of a page, or the content surrounding the aside. Frequently used for ads or pull quotes |
block |
container |
| <body> |
Defines and contains all the content of an HTML document, e.g. text, links, images and tables like this one |
block |
container |
| <br> |
Inserts a single line break, but is not intended for separating paragraphs |
inline |
empty |
| <dd> |
Description tag is used to describe a term or name in a description list and is always used together with the <dl> and <dt> tags. It can contain paragraphs, images, links, etc. |
block |
container |
| <div> |
A generic container element used as a last resort when no other semantically rich elements apply group related content, to apply styles with CSS and or perform JavaScript tasks |
block |
container |
| <dl> |
Stands for description list and contains the the <dt> and <dd> tags that define and describe terms/names |
block |
container |
| <dt> |
Stands for description term - this tag defines a term/name in a description list |
block |
container |
| <em> |
A semantically rich, logical tag that renders emphasized text both visually and for assistive devices |
inline |
container |
| <fieldset> |
Used to group related elements in a form and draws a box around the contained elements. If a caption is needed, the <legend> tag is helful |
block |
container |
| <figcaption> |
Used within the <figure> element to define a caption within that container and can be either the first or last child |
block |
container |
| <figure> |
Used to mark up "self-contained content" like illustrations, photos, code listings, etc. Although related to the main content of the page, this element's position is independent and if taken out of the page, it wouldn't affect the document flow or meaning |
block |
container |
| <footer> |
Defines the footer of the document or section and can be used more than once in a document. This tag usually contains:
- + authorship information
- + copyright information
- + contact information
- + back to top links
|
block |
container |
| <form> |
Used to create an HTML form for user input in conjunction with a number of other form elements, e.g. <input>, <textarea>, <button> etc. |
block |
container |
| <h1> to <h6> |
Used to define HTML headings and provide semantic structure to the HTML document via the heading number |
block |
container |
| <head> |
The head element occurs after the <!DOCTYPE> and <html> tags and contains all of the meta data for the page including but not limited to the <title>, <meta>, and stylesheet <link> tags |
n/a |
container |
| <header> |
Groups introductory content and is frequently used to contain a set of navigational links. The header element typically contains one or more heading elements, logos or icons, authorship information etc. There can be several <header> within an HTML document |
block |
container |
| <html> |
Representing the root of the document and acting as the container for all other HTML elements - besides the <!DOCTYPE> tag - this tag tells the browser that the document is in fact an HTML document |
n/a |
container |
| <iframe> |
Specifices an inline frame that embeds another document, such as content from a third-party webpage like Google Maps or Youtube, within an HTML document. This MDN tutorial includes additional info and cautions on using iframes |
n/a |
container |
| <img /> |
Defines an image in an HTML page. The first required attribute src="path/imageName.png" links to the actual location of the image - this could be either a path to the folder where the image file is located or an absolute url. The alt="description of image" attribute increases accessibility and will also display if the src path breaks. |
inline |
empty |
| <input> |
Used within the <input> element to specify an input field where the user can enter data. The input field itself can vary greatly in its look and function depending on the value passed to the type attribute |
inline |
container |
| <label> |
Provides a literal lable for other elements such as: <button>, <input>, <meter>, <output>, <textarea>. Although it does not render anything special, its a usability improvement that toggles the control if the user clicks or taps within the text contained by the <label> element. In order to bind the label with a related control, the for attribute should = the id attribute of the control |
inline |
container |
| <li> |
Defines a list item and is used in ordered lists <ol> and unordered lists <ul> |
block |
container |
| <link /> |
Defines and establishes a link between the current HTML document and an external resource. Primary use is to link to external stylesheets via the attribute value rel="stylesheet" |
n/a |
empty |
| <meta> |
Metadata is information about data and as such, the <meta> element - always contained within the <head> provides metadata about the HTML document that isn't displayed on the page via its attribute name/value pairs. This info often tells browsers how to display content or reload a page and frequently specifies a page description, keywords, author of the page etc. used by search engines or other web services |
n/a |
empty |
| <nav> |
Defines a set of navigational links and is intendend only for major blocks of navigation links although there may be other links on the page. This tag is new as of HTML5 |
block |
container |
| <ol> |
Defines an ordered list that can be numerical or alphabetical depending on the value of the 'type' attribute. Its items are definied with the <li> tag. HTML5 introduced the 'reversed' attribute for ordered lists |
block |
container |
| <p> |
Defines a paragraph and it is generally recommended to wrap any text that is not intended for another semantically rich purpose in <p> tag. Browsers add a default margin before and after each <p> element, which can be modified or removed with CSS |
block |
container |
| <script> |
Used to define client-side scripts e.g. with JavaScript. This element either contains scripting statments or directs to an external script file via a src= attribute. If src is used, the script must be empty. Generally, <script> is placed at the end of the document before the closing </body> tag |
both |
both |
| <section> |
Literally defining sections within a document, this new HTML5 tag provides wrapped content with a semantically rich, logical label. The theme of each section should be identified by including a heading element <h1> - <h6> as a child |
block |
container |
| <strong> |
A logical tag that not only makes the wrapped text visually bold, but it also gives it the semantic meaning of "important text". Styling through CSS is still preferable, but this tag can be helpful when considering how assistive devices read text |
inline |
container |
| <style> |
Contains style information via CSS rules for a document or part of the HTML document. Athough it can be placed in the <body> element, best practice is to place styles in the <head>. For ideal organization, would be to place CSS in an external stylesheet and apply them via <link> elements, although there are cases when internal styling is necessary |
n/a |
container |
| <table> |
Defines a grouping of elements that make up an HTML table such as this one. The contained elements must include one or more <tr>, <th>, and <td>, but more complex tables may include sectioning elements are frequently included such as <caption>, <tfoot> and <tbody> |
block |
container |
| <td> |
Defines a standard cell withn an HTML table row - see <tr>. Unlike <th> header cells, these standard cells contain data and by default are regular case and left-aligned. |
n/a |
container |
| <th> |
Defines a header cell within an HTML table row <tr>. Header information, such as table column names are wrapped by this tag. By default <th> elements are bold and centered |
n/a |
container |
| <title> |
Required in all HTML documents, it literally defines the title of the document. Located in the <head>, the <title> element:
- + provides a title in the browser toolbar and tab
- + Is the label for the page when added to favorites
- + Is the title that is listed for the page search-engine results
|
n/a |
container |
| <tr> |
The mark up for a row in an HTML table. This element contains one or more <th> and or <td> elements as its children. |
n/a |
container |
| <ul> |
Generates an unordered - bulleted - list and contains <li> elements as the list items |
block |
container |


Go to the source code of this file.
Legato Secure Storage Admin API
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
| #define SECSTOREADMIN_MAX_PATH_SIZE 511 |
Maximum number of characters permitted for a secure storage path.
Iterator to list entries in secure storage.
| void secStoreAdmin_ConnectService |
( |
void |
| ) |
|
Connect the current client thread to the service providing this API.
This function must be called before any other functions in this API. Normally, it's automatically called for the main thread, but must be explicitly called for other threads. For details, see Client-specific Functions.
This function is created automatically.
Create an iterator for listing entries in secure storage under the specified path.
- Returns
- An iterator reference if successful. NULL if the secure storage is currently unavailable.
- Parameters
-
| [in] | path | Path to iterate over. |
Recursively deletes all items under the specified path and the specified path from secure storage.
- Note
- The specified path must be an absolute path.
- Returns
- LE_OK if successful. LE_NOT_FOUND if the path doesn't exist. LE_UNAVAILABLE if the secure storage is currently unavailable. LE_FAULT if there was some other error.
- Parameters
-
| [in] | path | Path of the secure storage item. |
Deletes an iterator.
- Parameters
-
| [in] | iterRef | Iterator reference. |
| void secStoreAdmin_DisconnectService |
( |
void |
| ) |
|
Disconnect the current client thread from the service providing this API.
Normally, this function doesn't need to be called. After this function is called, there's no longer a connection to the service, and the functions in this API can't be used. For details, see Client-specific Functions.
This function is created automatically.
Get the current entry's name.
- Returns
- LE_OK if successful. LE_OVERFLOW if the buffer is too small to hold the entry name. LE_UNAVAILABLE if the secure storage is currently unavailable.
- Parameters
-
| [in] | iterRef | Iterator reference. |
| [out] | name | Buffer to store the entry name. |
| [in] | nameNumElements | |
| [out] | isDirPtr | True if the entry is a directory, false otherwise. |
| le_result_t secStoreAdmin_GetSize |
( |
const char * |
path, |
|
|
uint64_t * |
sizePtr |
|
) |
| |
Gets the size, in bytes, of all items under the specified path.
- Note
- The specified path must be an absolute path.
- Returns
- LE_OK if successful. LE_NOT_FOUND if the path doesn't exist. LE_UNAVAILABLE if the secure storage is currently unavailable. LE_FAULT if there was some other error.
- Parameters
-
| [in] | path | Path of the secure storage item. |
| [out] | sizePtr | Size in bytes of all items in the path. |
| le_result_t secStoreAdmin_GetTotalSpace |
( |
uint64_t * |
totalSizePtr, |
|
|
uint64_t * |
freeSizePtr |
|
) |
| |
Gets the total space and the available free space in secure storage.
- Returns
- LE_OK if successful. LE_UNAVAILABLE if the secure storage is currently unavailable. LE_FAULT if there was some other error.
- Parameters
-
| [out] | totalSizePtr | Total size, in bytes, of secure storage. |
| [out] | freeSizePtr | Free space, in bytes, in secure storage. |
Go to the next entry in the iterator. This should be called at least once before accessing the entry. After the first time this function is called successfully on an iterator the first entry will be available.
- Returns
- LE_OK if successful. LE_NOT_FOUND if there are no more entries available.
- Parameters
-
| [in] | iterRef | Iterator reference. |
| le_result_t secStoreAdmin_Read |
( |
const char * |
path, |
|
|
uint8_t * |
bufPtr, |
|
|
size_t * |
bufNumElementsPtr |
|
) |
| |
Reads an item from secure storage.
- Note
- The specified path must be an absolute path.
- Returns
- LE_OK if successful. LE_OVERFLOW if the buffer is too small to hold the entire item. No data will be written to the buffer in this case. LE_NOT_FOUND if the item doesn't exist. LE_UNAVAILABLE if the secure storage is currently unavailable. LE_FAULT if there was some other error.
- Parameters
-
| [in] | path | Path of the secure storage item. |
| [out] | bufPtr | Buffer to store the data in. |
| [in,out] | bufNumElementsPtr | |
| le_result_t secStoreAdmin_Write |
( |
const char * |
path, |
|
|
const uint8_t * |
bufPtr, |
|
|
size_t |
bufNumElements |
|
) |
| |
Writes a buffer of data into the specified path in secure storage. If the item already exists, it'll be overwritten with the new value. If the item doesn't already exist, it'll be created.
- Note
- The specified path must be an absolute path.
- Returns
- LE_OK if successful. LE_NO_MEMORY if there isn't enough memory to store the item. LE_UNAVAILABLE if the secure storage is currently unavailable. LE_FAULT if there was some other error.
- Parameters
-
| [in] | path | Path of the secure storage item. |
| [in] | bufPtr | Buffer containing the data to store. |
| [in] | bufNumElements | |


Derek Eder
@derekeder
I was on @wttw last night with Dr Blase Ur to weigh in on Google & Apple's contact tracing efforts. They got the Zoom interview setup down! https://news.wttw.com/2020/04/23/tech-giants-plan-track-covid-19-raises-privacy-concerns
4/24/2020, 10:36:01 AM
Favs: 18
Retweets: 3
link


Featured for membersMORE >
Why Do All My Friends Want to Kill Themselves?
When depression is just one push notification away
We Found a Way to Increase Voter Turnout in Texas, but Texas Isn’t Interested
Contradicting its own election code, Texas rejects thousands of voter registration forms mere days before the deadline
Not All Children Are Born Blameless
The young woman showed up on my porch before dawn with nowhere to go
Dear Journalists, Please Do Your Duty for Democracy
Readers need sustained, nuanced election coverage now more than ever
TechnologyMORE >
From Clockworks to Computers on Our Wrists
How Apple beat Swiss watchmakers at their own game
A Modest Privacy Protection Proposal
How to reclaim your privacy in the surveillance age
If You Charge People to Tweet, They’ll Revolt in the Street
Uganda’s social media tax is just another way for the government to crack down on dissent
Why You Shouldn’t Use Facebook to Log In to Other Sites
Facebook offered a convenient and secure way to sign up for online services. A major hack shows it failed at its one job.
Raised by YouTube
The platform’s entertainment for children is weirder and more globalized than adults could have expected
CreativityMORE >
Your Work Is the Only Thing That Matters
Forget about everything else
How I Used Machine Learning to Inspire Physical Paintings
The end result: an aesthetically interesting image I couldn’t imagine creating from scratch
An Artist’s Case for Being Less Productive
The work we don’t create also shapes our legacy
How to Make Time to Make Things
Unlocking serendipitous moments just takes some perspective and planning
Code and Poetry, a Conversation
In which I explore their similarities (while you remain skeptical)
EntrepreneurshipMORE >
Wyatt Lindquist: Frisbee Player Entrepreneur
“We’re about to be incorporated. I just have to get the stuff from the IRS.”
Shubham Banerjee: VC-Backed Entrepreneur, Optimist
”I will never look at the downside.”
Andrew Yu: Computer Whiz, Entrepreneur, Musician
“There is always something to aspire to in everybody I’ve met.”
Letter to a Would-Be Entrepreneur
What to think about before you start a company
The Demise of Blockbuster, and Other Failure Fairy Tales
When big companies collapse, the story is never simple
CultureMORE >
Why We Need to Include Female Villains in Our History Books
Feminism demands that we treat women as fully human, recognizing our individual strengths and weaknesses
The Power of the F-Bomb
As scientists have proved, and an awkward encounter with Gwyneth Paltrow has reaffirmed: love it or hate it, the F-word is mighty
Inside the Bay Area’s Craziest Secret Underground Parties
The raucous, multi-day events that are turning the psychedelic scene on its head
What My ‘80s Childhood Taught Me About Rape Culture
A lot of us came of age watching raunchy movies, and we’re still re-enacting them today
Kavanaugh, Consent, and the New Rules of Nightlife
How a millennial, female-owned dance club in Brooklyn is rewriting the playbook
Popular on Medium
01
From Clockworks to Computers on Our Wrists
Sep 20 • 8 min read ★02
Why every beginner front-end developer should know publish-subscribe pattern?
Oct 3 • 13 min read03
Stopping using console.log() and start using your browser's debbuger
Oct 1 • 6 min read04


Distributed computation (programming) can be a difficult and nebulous topic to learn. This book introduces concepts in distributed computing as well as foundational topics and resources for further learning. This is the result of self-teachings and content, as it stands today, is very much a work-in-progress. Read online for free and eventually I'll get some e-book versions up here.
I've long had an interest in distributed computing, but it can be hard to know where to look and what to read to really get started. I've recently told myself that I'm going to get more serious about learning this topic and I wanted to put together a guide based on what I learn (starting from nothing, more or less). This guide is intended to be what I wish existed right when I started, so future folks can benifit. It's also a way to help me memorize these concepts and shamelessly promote myself.
The guide is still very much in the early stages and, given that, there is just a lot up in there air in terms of content, layout, organization, etc. After I collect more information and nail down the particulars, then I'll look at generating and distributing e-book versions.
Nope. I just wanted my site to look popular.
© John Murray 2015


×
Error!
To see this content you must Sign In first
Tagged Sign In
Email Address:
Password:
Keep me signed in
Sign In
×
Error!
To see this content you must Sign In first
Tagged Sign In
Email or Phone
Password
Log In
Forgotten account?


| goog.Disposable | |
| goog.module.ModuleManager | goog.Disposable |
|
afterLoadModuleCode(id)
Method called just after module code is loaded
Arguments:
|
code » | |||||||
|
beforeLoadModuleCode(id)
Method called just before a module code is loaded.
Arguments:
|
code » | |||||||
|
dispatchActiveIdleChangeIfNeeded_()
Dispatches an ACTIVE or IDLE event if necessary.
|
code » | |||||||
|
dispatchModuleLoadFailed_(cause)
Handles when a module load failed.
Arguments:
|
code » | |||||||
|
disposeInternal()
No description.
|
code » | |||||||
|
execOnLoad(moduleId, fn, opt_handler, opt_noLoad, opt_userInitiated, opt_preferSynchronous)
⇒
Requests that a function be called once a particular module is loaded.
Client code can use this method to safely call into modules that may not yet
be loaded. For consistency, this method always calls the function
asynchronously -- even if the module is already loaded. Initiates loading of
the module if necessary, unless opt_noLoad is true.
Arguments:
Returns:
A callback wrapper that exposes an abort and execute method.
|
code » | |||||||
|
executeCallbacks_(type)
Call the callback functions of the specified type.
Arguments:
|
code » | |||||||
|
getLoader()
⇒
goog.module.AbstractModuleLoader
Gets the application-specific module loader.
Returns:
goog.module.AbstractModuleLoader
An object that has a loadModules(ids, moduleInfoMap, opt_successFn, opt_errFn, opt_timeoutFn) method.
|
code » | |||||||
|
getModuleContext()
⇒
Gets the module context to use to initialize the module.
Returns:
The context.
|
code » | |||||||
|
getModuleInfo(id)
⇒
Gets a module info object by id.
Arguments:
Returns:
The module info.
|
code » | |||||||
|
Builds a list of the ids of the not-yet-loaded modules that a particular
module transitively depends on, including itself.
|
code » | |||||||
|
handleLoadError_(status)
Handles a module load failure.
Arguments:
|
code » | |||||||
|
handleLoadTimeout_()
Handles a module load timeout.
|
code » | |||||||
|
isActive()
⇒
Determines if the ModuleManager is active
Returns:
TRUE iff the ModuleManager is active (i.e., not idle).
|
code » | |||||||
|
isModuleLoading(id)
⇒
Gets whether a module is currently loading or in the queue, waiting to be
loaded.
|
code » | |||||||
|
isUserActive()
⇒
Determines if the ModuleManager is user active
Returns:
TRUE iff the ModuleManager is user active (i.e., not idle).
|
code » | |||||||
|
load(moduleId, opt_userInitiated)
⇒
goog.async.Deferred
Loads a module, returning a goog.async.Deferred for keeping track of the
result.
|
code » | |||||||
|
loadModuleOrEnqueueIfNotLoadedOrLoading_(id, d)
Loads a specific module or, if some other module is currently being loaded,
appends its id to the queue of requested module ids. Does nothing if the
module is already loaded or is currently loading.
Arguments:
|
code » | |||||||
|
loadModuleOrEnqueue_(id)
Initiates loading of a specific module or, if a module is currently being
loaded, appends the module's id to the queue of requested module ids.
The caller should verify that the requested module is not already loaded or
loading. #loadModuleOrEnqueueIfNotLoadedOrLoading_ is a more lenient
alternative to this method.
Arguments:
|
code » | |||||||
|
loadModule_(id, opt_isRetry)
Loads a module and any of its not-yet-loaded prerequisites. If batch mode is
enabled, the prerequisites will be loaded together with the requested module.
The caller should verify that the requested module is not already loaded
and that no modules are currently loading before calling this method.
Arguments:
|
code » | |||||||
|
loadNextModule_()
Loads the next module on the queue.
|
code » | |||||||
|
preloadModule(id, opt_timeout)
⇒
goog.async.Deferred
Preloads a module after a short delay.
Arguments:
Returns:
goog.async.Deferred
A deferred object.
|
code » | |||||||
|
registerCallback(types, fn)
The function to call if the module manager is in error.
|
code » | |||||||
|
registerCallback_(type, fn)
Register a callback for the specified callback type.
Arguments:
|
code » | |||||||
|
registerInitializationCallback(fn, opt_handler)
Register an initialization callback for the currently loading module. This
should only be called by script that is executed during the evaluation of
a module's javascript. This is almost equivalent to calling the function
inline, but ensures that all the code from the currently loading module
has been loaded. This makes it cleaner and more robust than calling the
function inline.
Arguments:
|
code » | |||||||
|
setAllModuleInfo(infoMap)
Sets the module info for all modules. Should only be called once.
Arguments:
|
code » | |||||||
|
setBatchModeEnabled(enabled)
Sets the batch mode as enabled or disabled for the module manager.
Arguments:
|
code » | |||||||
|
setLoaded(id)
Records that a module was loaded. Also initiates loading the next module if
any module requests are queued. This method is called by code that is
generated and appended to each dynamic module's code at compilation time.
Arguments:
|
code » | |||||||
|
setLoader(loader)
Sets the application-specific module loader.
Arguments:
|
code » | |||||||
|
setModuleConstructor(fn)
Sets the constructor to use for the module object for the currently
loading module. The constructor should derive from {@see
goog.module.BaseModule}.
Arguments:
|
code » | |||||||
|
setModuleContext(context)
Sets the module context to use to initialize the module.
Arguments:
|
code » | |||||||
|
setModuleUris(moduleUriMap)
Sets the module uris.
Arguments:
|
code » |
|
dispose()
No description.
|
code » | |
|
disposeInternal()
Deletes or nulls out any references to COM objects, DOM nodes, or other
disposable objects. Classes that extend
goog.Disposable should
override this method. For example:
mypackage.MyClass = function() { goog.Disposable.call(this); // Constructor logic specific to MyClass. ... }; goog.inherits(mypackage.MyClass, goog.Disposable); mypackage.MyClass.prototype.disposeInternal = function() { mypackage.MyClass.superClass_.disposeInternal.call(this); // Dispose logic specific to MyClass. ... }; |
code » | |
|
getDisposed()
⇒
No description.
Returns:
Whether the object has been disposed of.
|
code » | |
|
isDisposed()
⇒
No description.
Returns:
Whether the object has been disposed of.
|
code » |
|
batchModeEnabled_
:
Whether the batch mode (i.e. the loading of multiple modules with just one
request) has been enabled.
|
Code » | |
|
consecutiveFailures_
:
The number of consecutive failures that have happened upon module load
requests.
|
Code » | |
|
lastActive_
:
Determines if the module manager was just active before the processing of
the last data.
|
Code » | |
|
loadTracer_
:
Tracer that measures how long it takes to load a module.
|
Code » | |
|
loader_
:
goog.module.AbstractModuleLoader
A loader for the modules that implements loadModules(ids, moduleInfoMap,
opt_successFn, opt_errorFn, opt_timeoutFn) method.
|
Code » | |
|
logger_
:
A logger.
|
Code » | |
|
moduleContext_
:
The module context needed for module initialization.
|
Code » | |
|
userLastActive_
:
Determines if the module manager was just user active before the processing
of the last data. The module manager is user active if any of the
user-initiated modules are loading or queued up to load.
|
Code » |


#{extends 'email.html' /}
Hey, we heard you lost your Ceylon Herd password.
Use the following link within the next 24 hours to reset your password.
Thanks The Ceylon Team


{% if results %} {% include 'grids/movies_table.html' with movies=results %} {% else %}
No movies were found in the database.


This shows how a chat application can be made just using the signaller.
Open this page in two browsers.
Enter message:


{{ page.content }} I write articles on the intersection of Product & Data. If interested, join the mailing list and I'll send you my latest pieces.


Buy the book ${{ book.price }}
Learn more.
Pre-order upcoming books at a discount.
Pre-order ${{ book.price }}
Early release scheduled for {{ book.release }}. Learn more.


Confirm your email address
Hello $fullname,
Please click the button below to
confirm your email address:
email: $email
password: $password
Confirm
Email
Once confirmed, this email will be uniquely associated
with your commonAPI account.
Cheers,
The commonAPI Team