This module controls how particles collide with GameObjects in the Scene. Use the first drop-down to define whether your collision settings apply to Planes or to the World. If you choose World, use the Collision Mode drop-down to define whether your collision settings apply for a 2D or 3D world.
| Property | Function |
|---|---|
| Planes popup | Select Planes mode. |
| Planes | An expandable list of Transforms that define collision planes. |
| Visualization | Selects whether the collision plane Gizmos will be shown in the Scene view as wireframe grids or solid planes. |
| Scale Plane | Size of planes used for visualization. |
| Visualize Bounds | Renders the collision bounds of each particle as a wireframe shape in the Scene view. |
| Dampen | The fraction of a particle’s speed that it loses after a collision. |
| Bounce | The fraction of a particle’s speed that rebounds from a surface after a collision. |
| Lifetime Loss | The fraction of a particle’s total lifetime that it loses if it collides. |
| Min Kill Speed | Particles travelling below this speed after a collision will be removed from the system. |
| Radius Scale | Allows you to adjust the radius of the particle collision spheres so it more closely fits the visual edges of the particle graphic. |
| Send Collision Messages | If enabled, particle collisions can be detected from scripts by the OnParticleCollision function. |
| Property | Function |
|---|---|
| World popup | Select World mode. |
| Collision Mode | 3D or 2D. |
| Visualize Bounds | Preview the collision spheres for each particle in the Scene view. |
| Dampen | The fraction of a particle’s speed that it loses after a collision. |
| Bounce | The fraction of a particle’s speed that rebounds from a surface after a collision. |
| Lifetime Loss | The fraction of a particle’s total lifetime that it loses if it collides. |
| Min Kill Speed | Particles travelling below this speed after a collision will be removed from the system. |
| Radius Scale | Setting for 2D or 3D. |
| Collides With | Particles will only collide with objects on the selected layers. |
| Interior Collisions | Report collisions when particles are already inside Colliders before motion is applied (useful when using particles as pickups). |
| Enable Dynamic Colliders | Allows the particles to also collide with dynamic objects (otherwise only static objects are used). |
| Max Collision Shapes | How many collision shapes can be considered for particle collisions. Excess shapes are ignored, and terrains take priority. |
| Collision Quality | Use the drop-down to set the quality of particle collisions. This affects how many particles can pass through a collider. At lower quality levels, particles can sometimes pass through colliders, but are less resource-intensive to calculate. |
| High | When Collision Quality is set to High, collisions always use the physics system for detecting the collision results. This is the most resource-intensive option, but also the most accurate. |
| Medium (Static Colliders) | When Collision Quality is set to Medium (Static Colliders), collisions use a grid of voxels to cache previous collisions, for faster re-use in later frames. See World collisions, below, to learn more about this cache. The only difference between Medium and Low is how many times per frame the Particle System queries the physics system. Medium makes more queries per frame than Low. Note that this setting is only suitable for static colliders that never move. |
| Low (Static Colliders) | When Collision Quality is set to Low (Static Colliders), collisions use a grid of voxels to cache previous collisions, for faster re-use in later frames. See World collisions, below, to learn more about this cache. The only difference between Medium and Low is how many times per frame the Particle System queries the physics system. Medium makes more queries per frame than Low. Note that this setting is only suitable for static colliders that never move. |
| Enable Dynamic Colliders | Dynamic colliders are any collider not configured as Kinematic (see documentation on colliders for further information on collider types). Check this option to include these collider types in the set of objects that the particles respond to in collisions. Uncheck this option and the particles only respond to collisions against static colliders. |
| Voxel Size | A voxel represents a value on a regular grid in three-dimensional space. When using Medium or Low quality collisions, Unity caches collisions in a grid structure. This setting controls the grid size. Smaller values give more accuracy, but cost more memory, and are less efficient. Note: You can only access this property when Collision Quality is set to Medium or Low. |
| Send Collision Messages | Check this to be able to detect particle collisions from scripts by the OnParticleCollision function. |
When other objects surround a Particle System, the effect is often more convincing when the particles interact with those objects. For example, water or debris should be obstructed by a solid wall rather than simply passing through it. With the Collision module enabled, particles can collide with objects in the Scene.
A Particle System can be set so its particles collide with any Collider in the scene by selecting World mode from the pop-up. Colliders can also be disabled according to the layer they are on by using the Collides With property. The pop-up also has a Planes mode option which allows you to add a set of planes to the Scene that don’t need to have Colliders. This option is useful for simple floors, walls and similar objects, and has a lower processor overhead than World mode.
When Planes mode is enabled, a list of transforms (typically empty GameObjects) can be added via the Planes property. The planes extend infinitely in the objects’ local XZ planes, with the positive Y axis indicating the planes’ normal vectors. To assist with development, the planes will be shown as Gizmos in the Scene, regardless of whether or not the objects have any visible Mesh themselves. The Gizmos can be shown as a wireframe grid or a solid plane, and can also be scaled. However, the scaling only applies to the visualization - the collision planes themselves extend infinitely through the Scene.
When collisions are enabled, the size of a particle is sometimes a problem because its graphic can be clipped as it makes contact with a surface. This can result in a particle appearing to “sink” partway into a surface before stopping or bouncing. The Radius Scale property addresses this issue by defining an approximate circular radius for the particles, as a percentage of its actual size. This size information is used to prevent clipping and avoid the sinking-in effect.
The Dampen and Bounce properties are useful for when the particles represent solid objects. For example, gravel will tend to bounce off a hard surface when thrown but a snowball’s particles might lose speed during a collision. Lifetime Loss and Min Kill Speed can help to reduce the effects of residual particles following a collision. For example, a fireball might last for a few seconds while flying through the air but after colliding, the separate fire particles should dissipate quickly.
You can also detect particle collisions from a script if Send Collision Messages is enabled. The script can be attached to the object with the particle system, or the one with the Collider, or both. By detecting collisions, you can use particles as active objects in gameplay, for example as projectiles, magic spells and power-ups. See the script reference page for MonoBehaviour.OnParticleCollision for further details and examples.
The World Collision module has a Collision Quality property, which you can set to High, Medium or Low. When Collision Quality is set to Medium (Static Colliders) or Low (Static Colliders), collisions use a grid of voxels (values on a 3D grid) to cache previous collisions, for fast re-use in later frames.
This cache consists of a plane in each voxel, where the plane represents the collision surface at that location. On each frame, Unity checks the cache for a plane at the position of the particle, and if there is one, Unity uses it for collision detection. Otherwise, it asks the physics system. If a collision is returned, it is added to the cache for fast querying on subsequent frames.
This is an approximation, so some missed collisions might occur. You can reduce the Voxel Size value to help with this; however, doing so uses extra memory, and is less efficient.
The only difference between Medium and Low is how many times per frame the system is allowed to query the physics system. Low makes fewer queries per frame than Medium. Once the per-frame budget has been exceeded, only the cache is used for any remaining particles. This can lead to an increase in missed collisions, until the cache has been more comprehensively populated.


There are a number of areas where an MPI implementation may interact with the operating environment and system. While MPI does not mandate that any services (such as I/O or signal handling) be provided, it does strongly suggest the behavior to be provided if those services are available. This is an important point in achieving portability across platforms that provide the same set of services.


Making Models With Isambard¶
1. Specifications¶
A number of specifications (the term is borrowed from the field of architecture, where a specification is defined as “a detailed description of the design and materials used to make something”) are currently available through ISAMBARD. These include: \(\alpha\) helices, coiled-coil assemblies of different flavours, and simple DNA duplexes. To make a structure based on a specification, you need to know the parameters of that specification. We will demonstrate this with a simple \(\alpha\)-helical coiled-coil dimer.
Parameters required to make a coiled-coil dimer¶
To make a coiled-coil dimer, you need to know
- the number of residues on each helix,
- the radius of the assembly,
- the pitch of the assembly and
- the interface angle at which helices meet (Phi-C:math:alpha)
2. Reading in a structure and identifying parameters¶
We will read a known coiled-coil dimer structure (CC-DI, PDB 4DZM.pdb), into the AMPAL framework, and use tools within ISAMBARD to calculate the parameters we need. [N.B. This is a slightly modified form of 4DZM where we’ve converted iodo-phenylalanine to phenylalanine, and got rid of water molecules to make life a bit easier, so take the linked copy rather than downloading from another source.]
import isambard
my_cc = isambard.ampal.convert_pdb_to_ampal("4DZM.pdb")
my_cc
<Assembly (4DZM) containing 2 Polypeptides>
This has given us an Assembly
object, which contains two
Polypeptides
. We can access the sequences of each chain individually
using the .sequences
attribute. This is a list - you can access
individual list elements as you would a regular python list.
my_cc.sequences
['GEIAALKQEIAALKKENAALKFEIAALKQGY', 'GEIAALKQEIAALKKENAALKFEIAALKQGY']
my_cc_a = my_cc[0]
my_cc_b = my_cc[1]
my_cc_a
<Polypeptide containing 31 Residues. Sequence: GEIAALKQEIAA...>
From the Polypeptide object, which is a special type of Polymer within the AMPAL framework, we can access the number of residues, and the chain identifier if needed. You can access the length of the chain either from the chain object itself, or from the length of the sequence.
len(my_cc_a.sequence)
31
len(my_cc_a)
31
my_cc_a.id
'A'
Before we extract parameters from the structure, we might want to know
how ‘good’ the BUDE forcefield [BUFF] thinks the structure is, so that
when we build a structure de novo we have something to compare it to.
BUFF provides two scores, one for the interaction between
Polypeptides
in the Assembly
, and one for the internal energy of
the Assembly
.
my_cc.buff_interaction_energy
<BUFF Score -250.24: 50.73 St | -281.57 De | -19.39 Ch>
my_cc.buff_internal_energy
<BUFF Score -938.07: 136.53 St | -790.27 De | -284.33 Ch>
3. Measuring geometric parameters¶
In order to measure radius, pitch and Phi-C\(\alpha\) of the
assembly, we need to define a *reference axis*, that is the line
that runs down the centre of the assembly. For a coiled-coil dimer, it
runs between the two helices; for a barrel, this would be at the centre
of the barrel, and is a list of points in 3D space. We will use this to
calculate the other parameters. The reference axis is defined as a
Primitive
chain object populated with PseudoMonomers
which
represent the points in space of the axis.
reference_axis = isambard.analyse_protein.reference_axis_from_chains(my_cc)
reference_axis
<Primitive chain containing 31 PseudoMonomers>
In Isambard, interface angles are accessed via the
analyse_protein.crick_angles
method, and are calculated for each
residue in each helix individually.
crangles_a = isambard.analyse_protein.crick_angles(my_cc_a,reference_axis)
crangles_b = isambard.analyse_protein.crick_angles(my_cc_b,reference_axis)
crangles_a
[165.46311695313284,
-73.7731235966416,
26.54672679839078,
128.47141485160603,
-127.72847955562587,
-29.230898305107225,
75.77896871985133,
179.13811106898652,
-78.91543487166474,
24.619715382288263,
124.86576008079678,
-132.1659822842109,
-33.094770958544274,
71.5612908445053,
172.66909579579703,
-87.21396295102991,
17.62150247217829,
122.41786905701451,
-132.30491551944263,
-25.580896174877395,
77.39202166004726,
178.68641715037646,
-81.08703803043669,
21.378411765253517,
124.46637604063143,
-137.48525842491375,
-38.516041308102864,
65.8051730938853,
173.8634442139843,
-69.52238541573473,
None]
To get an average Phi-C\(\alpha\) value, we take every seventh
value from the list, and take the mean of this. To get the mean we need
to use a module called numpy
, which is Numerical Python and gives
us access to lots of mathematical functions. In the following cell, we
are going to use it to calculate mean Phi-C\(\alpha\) values.
import numpy
phica_a_list = [crangles_a[x] for x in range(0,len(crangles_a),7) if crangles_a[x] is not None]
phica_b_list = [crangles_b[x] for x in range(0,len(crangles_b),7) if crangles_b[x] is not None]
phica_a = numpy.mean(phica_a_list)
phica_b = numpy.mean(phica_b_list)
phica_a, phica_b
(173.96403703645541,<PHONE_NUMBER>3645541)
Radius is calculated by looking at successive distances from the centre of the \(\alpha\) helix to the reference axis we calculated earlier. Again, this is calculated for each helix, and we take the mean value to use for model building.
radius_a_list = isambard.analyse_protein.polymer_to_reference_axis_distances(my_cc_a, reference_axis)
radius_b_list = isambard.analyse_protein.polymer_to_reference_axis_distances(my_cc_b, reference_axis)
radius = numpy.mean(radius_a_list+radius_b_list)
radius
5.12974619218142
Pitch is calculated on a per-helix basis using \(\alpha\) angles, which measures the tilt of a helix in a coiled-coil assembly wtith respect to the central reference axis that we already calculated. The radius of the helices is also required. For model building we take a mean value.
alpha_a_list = isambard.analyse_protein.alpha_angles(my_cc_a, reference_axis)
alpha_b_list = isambard.analyse_protein.alpha_angles(my_cc_b, reference_axis)
pitch_a_list = [(2* numpy.pi * radius) / numpy.tan(numpy.deg2rad(x)) for x in alpha_a_list if x is not None]
pitch_b_list = [(2* numpy.pi * radius) / numpy.tan(numpy.deg2rad(x)) for x in alpha_b_list if x is not None]
pitch = numpy.mean(pitch_a_list + pitch_b_list)
pitch
220.28472172509427
4. Building a model¶
We now know all the parameters we need to rebuild this structure, and it
can be done by generating a specification object from the CoiledCoil
class. We will do this by ‘subclassing’, i.e. inheriting all the things
we need from the general CoiledCoil
class, and adding specific
parameters for our case, into a class called SimpleDimer2Phi
.
class SimpleDimer2Phi(isambard.specifications.CoiledCoil):
def __init__(self, aa, r, p, phica1,phica2,n=2):
super().__init__(n, auto_build=False)
self.aas = [aa]*n
self.major_radii = [r]*n
self.major_pitches = [p]*n
self.phi_c_alphas = [phica1,phica2]
self.orientations = [1]*n
self.build()
We can now make a model by calling the SimpleDimer2Phi
class and
filling in the parameters obtained earlier in the workbook. Enter these
parameters in the cell below before pressing Ctrl+Enter to run it.
my_model = SimpleDimer2Phi(len(my_cc.sequences[0]), radius, pitch, phica_a, phica_b)
my_model.build()
Now write out this model to a PDB file that can be viewed using a standard protein strutcure viewer such as PyMOL.
with open('my_model.pdb','w') as outf:
outf.write(my_model.pdb)
Hopefully your model looks something like the picture above. It has made a poly-alanine version of a coiled-coil helical dimer. Now we can model the sidechains using SCWRL4 (G. G. Krivov, M. V. Shapovalov, and R. L. Dunbrack, Jr. Improved prediction of protein side-chain conformations with SCWRL4. Proteins (2009)), output the PDB file for future reference. You should be able to see the sidechains as below.
sequences = my_cc.sequences
my_model.pack_new_sequences(sequences)
with open('my_model_sc.pdb','w') as outf:
outf.write(my_model.pdb)
Your model should look something like the picture above. Now we can score this model using BUFF, and also we can calculate an RMSD from this model to the original structure using ProFit (Martin, A.C.R., http://www.bioinf.org.uk/software/profit/).
my_model.buff_interaction_energy
<BUFF Score -285.48: 16.99 St | -295.91 De | -6.56 Ch>
rmsds,overlay = isambard.external_programs.run_profit(my_cc.pdb, my_model.pdb, return_pdb_string=True, align_type='all')
rmsds
is the all-atom RMSDs calculated by ProFit.
rmsds
[2.173]
Write out the overlaid structure for future reference.
with open('my_model_overlaid.pdb','w') as outf:
outf.write(overlay)
The overlay is a simple PDB string returned from ProFit. We can convert this back to an AMPAL object, write it out for viewing.
overlay_ampal = isambard.ampal.convert_pdb_to_ampal(overlay,path=False) ## convert overlay to AMPAL object
If you have a look closely at the asparagine pair at the middle of the dimeric structure (shown below), you’ll see that the rotamers that SCWRL has picked for asparagine (right-hand side, dark blue) are more sensible than those in the original structure (left-hand side, cyan). The original 4DZM structure has multiple occupancies for the asparagine residues, and for simplicity we picked the first pair. The structure that SCWRL has returned has a hydrogen bond between the asparagine residues.
Tweaking the parameters¶
Try rebuilding the model again, this time changing the parameters as you like. What happens if you change the Phi-C\(\alpha\) values of one helix (or both)? Try varying the radius. Each time, score your model using BUFF and make a note of the RMSD to the original structure, and have a look at the models you produce on PyMOL.
Going antiparallel¶
We are going to remake the coiled-coil dimer as an antiparallel
structure. To do this, we need to modify the SimpleDimer2Phi
class,
two extra parameters to specify firstly that the orientation of the
second helix is antiparallel, and secondly, the z-shift, how far the
helices can slide past one another. We’ll make this using another
subclass of CoiledCoil:
class SimpleDimer2PhiAP(isambard.specifications.CoiledCoil):
def __init__(self, aa, r, p, phica1,phica2,zshift,n=2):
super().__init__(n=2, auto_build=False)
self.aas = [aa]*n
self.major_radii = [r]*n
self.major_pitches = [p]*n
self.phi_c_alphas = [phica1,phica2]
self.z_shifts = [0,zshift]
self.orientations = [1,-1]
self.build()
my_ap_cc = SimpleDimer2PhiAP(len(my_cc.sequences[0]),radius,pitch,phica_a,phica_b,0.0)
my_ap_cc.build()
my_ap_cc.pack_new_sequences(my_cc.sequences)
Write the model out to PDB for future reference.
with open('my_ap_cc_model.pdb','w') as outf:
outf.write(my_ap_cc.pdb)
Score the model using BUFF:
my_ap_cc.buff_interaction_energy
<BUFF Score -48.11: 167.36 St | -215.94 De | 0.48 Ch>
5. Making it better - an introduction to optimisation¶
It’s not such a good score :-) (obviously?) We could improve this score by ‘minimizing’ the structure, i.e. trying to find new parameters for the sequence that improve the BUDE score. This is, in real life, a very bad idea, because we know that this sequence comes from a crystal structure of a parallel coiled-coil dimer, and it is highly unlikely ever to go antiparallel. Here, we are going to pretend that we can make it so, as a good exercise in learning how an optimiser works. Hopefully this will also help to empahasise that although you can get an improved BUFF score through this process, if you make an unrealistic assumption at the beginning, BUFF and the optimiser will not help you out.
We’ll carry out this optimisation using an algorithm called **differential evolution**. This is a metaheuristic, which means it makes no assumptions about the optimisation (this means it knows nothing about your parameters), and is able to search large spaces of candidate solutions (i.e. a large parameter space). It optimizes the parameters by keeping a population of candidate solutions (sets of model parameters) and creates new solutions (sets of parameters) by combining existing ones and then keeping whichever candidate has the best score.
The optimiser is actually quite easy to set up. You need to give it an
ISAMBARD specification (in our case SimpleDimer2PhiAP
) and an output
path (which can be the current directory for the moment, as specified by
‘.’)
optimiser = isambard.optimisation.DE_Opt(SimpleDimer2PhiAP, output_path='.', run_id='test_antiparallel')
The next step is to give the optimiser the sequences to model, a set of
parameter means and variances within which to sample. Again, you can see
what the optimiser is expecting by using SHIFT+TAB inside the brackets
of optimiser.parameters
.
The order of the parameters inside the value means and value ranges must
match the order required by SimpleDimer2PhiAP
, which is
radius, pitch, phica1, phica2
. We will allow the radius to vary by
up to 1 \(\unicode{x212B}\) either side of 5
\(\unicode{x212B}\), the pitch by 100 \(^\circ\) and the
Phi-C\(\alpha\)s by a full circle. We’ll keep the z-shift to
zero for this instance.
optimiser.parameters(my_ap_cc.sequences, [5.0,180,180,180], [1.0,100,180,180],
[len(my_ap_cc.sequences[0]), 'var0','var1','var2','var3', 0])
Now, run it! You need to specify the size of each generation and the number of generations. We will use 20 models per generation and 30 generations.
%matplotlib inline
optimiser.run_opt(20,30,1,plot=True)
gen evals avg std min max
0 20 -103.708 36.8511 -156.506 -21.8501
1 20 -118.403 33.0856 -180.937 -61.5667
2 20 -134.078 29.6034 -196.748 -86.8828
3 20 -143.757 26.298 -196.748 -108.776
4 20 -150.678 25.4218 -196.748 -109.963
5 20 -158.192 22.3413 -196.748 -122.078
6 20 -163.653 19.9526 -196.748 -126.732
7 20 -170.98 15.0293 -201.815 -148.964
8 20 -174.022 14.6422 -201.815 -148.964
9 20 -176.845 14.5718 -201.815 -148.964
10 20 -179.775 12.8957 -201.815 -148.964
11 20 -180.345 13.0091 -201.815 -148.964
12 20 -181.44 12.878 -201.815 -148.964
13 20 -185.048 13.5667 -203.227 -148.964
14 20 -186.853 14.8841 -220.695 -148.964
15 20 -187.556 14.6897 -220.695 -148.964
16 20 -188.825 13.6166 -220.695 -151.649
17 20 -189.149 13.538 -220.695 -151.649
18 20 -189.877 12.4043 -220.695 -160.042
19 20 -191.594 11.982 -220.695 -167.122
20 20 -191.829 11.8771 -220.695 -167.122
21 20 -193.433 11.1191 -225.598 -169.102
22 20 -197.64 11.9067 -225.598 -180.937
23 20 -197.948 11.8677 -225.598 -180.937
24 20 -198.635 11.3247 -225.598 -180.937
25 20 -199.536 10.9473 -225.598 -184.778
26 20 -202.483 9.89183 -225.598 -189.472
27 20 -202.965 9.93346 -225.598 -189.472
28 20 -208.955 18.8063 -268.702 -189.472
29 20 -211.825 18.758 -268.702 -189.472
Evaluated 600 models in total
Best fitness is (-268.70178162510257,)
Best parameters are [31, 5.332837258790041, 87.29356456739866,<PHONE_NUMBER>7820316,<PHONE_NUMBER>540661, 0]
----Minimisation plot:
The output above shows you the progress of the optimisation process, which is reproduced in a log file in the location we requested the output to be. Additionally the best model pdb file will be written to the same location. Open this up and have a look at the optimised model. What has the optimiser done to the model?
There are different optimization methods available; have a look inside the optimisation directory for these.
Making bigger things¶
Now you know how to subclass the CoiledCoil
AMPAL specification
object, see if you can make an \(\alpha\)-helical barrel by
increasing the value of n
. Don’t worry about what sequence to use
initially, make some models and get comfortable with the parameters -
for example try a few different radii, pitch and Phi-c\(\alpha\)
values. As an aide, here are some parameters for the coiled-coil barrels
in <a
href=”http://www.sciencemag.org/cgi/rapidpdf/346/6208/485?ijkey=ysj8Y4h7WOYgo&keytype=ref&siteid=sci“>Thomson
et. al. (Science 2014). Score the models you make using BUFF.
| Name | Oligo | Radius | Pitch | PhiC\(\alpha\) | Sequence (g->f) |
|---|---|---|---|---|---|
| CC-Pent | 5 | 8.62 | 182.8 | 14.44 | KIEQILQ |
| CC-Hex2 | 6 | 9.48 | 131.7 | 18.22 | EIAKSLK |
| CC-Hex3 | 6 | 9.72 | 162.2 | 13.07 | EIAQSIK |
| CC-Hept | 7 | 9.80 | 328.6 | 15.1 | EIAQALK |


WILD THINGS *** of **** grade is B-
Wild Things is the sleazy cousin of Palmetto (of earlier this year). This one has more sex, nudity, laughs and twists. It is also a better film. It is fun to watch a film that keeps twisting and contorting as it explains the plot and buries you more.
Wild Things is about a girl (Denise Richards) who accuses a school counsler (Matt Dillon) of sexually abusing her. Later another girl (Neve Campbell) files similar charges. Up to this point the film is noir melodrama and looking quite good. Then something unexpected happens, Dillon hires Bill Murray as an ambulance chasing lawyer to handle his case.
Comedians don't get much credit for their work in films. I will tell you that Wild Things without Bill Murray wouldn't work. It would look like a Tarantino drone (like every crime-related film). He adds life to this film and an insanly funny 20 minutes. I want to be very clear about this, Bill Muray is funnier in this 20 minutes of this film than he was in The Man Who Knew Too Little.
Murray (very hilariously) gets the case thrown out of court and convinces Dillon to sue the first girls mother for ruining his career. Then we get a twist, Dillon, Campbell, and Denis Richards are all in it together. They are also involved in a minage a trois.
With all the twists you don't really feel used by the plot, like you did with Palmetto. You are entralled and try to out think the plot, to a point. I felt there was one too many twists for complete satisfaction. The film you are left with is somewhat of a mess, but a fun one.
Much has been made about the sexual explicetness of the material. There are a few steamy sex scenes but the film seems to cheat on us. An old rule is that eroticism is what is left unseen. I have no problem with that, but what is Neve Campbell doing in a film that intends to show all. Denis Richards is naked, and so is Kevin Bacon (very briefly) but the sex scenes cut away whenevery Neve takes off her shirt. It may sound shallow or may look like I'm trying to be cute but that is not it. I like twisty film noirs like this. Bound of 1996 was a great one, and it had one sex scene to speak of. It didn't promise the explicet though, and Wild Things did, if it would have been more truthful to itself my grade would have been higher. Neve if the script calls for something explicet, don't nix the idea because you are too prude for it, pass the idea to another actress who will remain TRUE to the material as written and promised.
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


Learn about fostering experiences of real foster carers and young people.
{% extends "layout_multi_sections-lcc.html" %} {% block page_title %} Hear what our foster carers have to say {% endblock %} {% block css_register %} {% endblock %} {% block additional_page_scripts %} {% endblock %} {% block header %} Hear what our foster carers have to say {% endblock %} {% block main_nav %} {% endblock %} {% block sectionOneTop %} {% endblock %} {% block sectionOneFull%} {% endblock %} {% block breadcrumb %}
Learn about fostering experiences of real foster carers and young people.
Meet some of the wonderful people who help make a difference to the lives of young people in Leeds by becoming foster carers.
Have you ever considered fostering a teenager? Listen to Andy, Connor, Viv, Caitlin and Sarah talk about their experiences of fostering and being fostered.
Meet some of the team who help us care for disabled children in Leeds. Denise, Gillian, Kathy, Catherine, Mick and Anjula talk about their own personal experiences.
Liz and Ian tell you about the rewards and experiences of fostering a young asylum seeking child.


Hello,
You have been invited by {{invited_by}} to become a billing administrator for {{account}}'s Gluu licenses.
{% if not existing %}
Please create your administrator account here.
{% else %}
Please sign in
here with your Gluu account to access the oxd license management dashboard.
{% endif %}
Thank you,
Gluu
{% endblock %}


| Intuitionistic Logic Explorer Most Recent Proofs |
||
| Mirrors > Home > ILE Home > Th. List > Recent | MPE Most Recent Other > MM 100 |
See the MPE Most Recent Proofs page for news and some useful links.
| Color key: | Intuitionistic Logic Explorer | User Mathboxes |
| Date | Label | Description |
|---|---|---|
| Theorem | ||
| Copyright terms: Public domain | W3C HTML validation [external] |


Leverage the power of top-notch instruments to capture, store, organize and analyze the data at the scale of your business needs.
Find Out MoreEnd-to-end solutions for Deep Learning driven by Big Data.
Contact usOrganize thorough and efficient data pipelines.
Build a distributed storage for large-scale datasets.
Create a system that continuously learns itself.
Make sense of the data at your disposal.
Our team is located in Ukraine.
Please drop us a message and we'll be happy to answer your questions.
+380672382496


Join us for Iowa State's 11th Hackathon!
November 1st - 3rd, 2019
Register at Hacker Earth Submit to DevpostOur mission is to provide a welcoming and supportive environment to all students, new and old, who are interested in learning something new. Squirrel Hacks strives to connect students with opportunities to experience new technologies in a rapidly growing technology based world.
Major League Hacking © defines a hackthon as an “invention marathon”. Anyone who has an interest in technology attends a hackathon to learn, build & share their creations over the course of a weekend in a relaxed and welcoming atmosphere.
Squirrel Hacks has great opportunities for people that are new to programming. In fact, we encourage new programmers to come because hackathons provide an opportunity to gain experience. As a new programmer at Squirrel Hacks, you will learn a lot in a short amount of time, be challenged, and build something awesome.
No, Squirrel Hacks is open to all enrolled undergraduate students in a university program.
Unfortunately, university policies don't allow us to provide travel reimbursements.
We have plenty of air matresses for you to sleep on, but think about bringing your favorite pillow and a blanket to keep you cozy while you sleep.
For starters, bring your laptop and charger. Bring your cell phone and charger too, and a power splitter if you have one! In addition, bringing a water bottle, pillow, and any other accessories you would bring to a sleepover would be a good idea.
There can be anywhere up to four people per team. Be sure to collaborate on Devpost as a team on your project!
Nope! We will have sessions to help people find team members, as well as an idea generation workshop to help people think of ideas to work on for the hackathon. So you should sign up regardless!
Yes. The only thing you need to worry about is coding; let us take care of the rest. Breakfast, lunch, dinner, snacks, and plenty of drinks will be provided throughout the competition at no cost to participants. We will be providing vegetarian options as well. If you have a specific food allergy, be sure to specify in the application.
No, but all your coding and work must be done at the site of the competition.
No, contestants are not allowed to work on their apps before the 36-hour period. If you want to prepare for the hackathon, focus on gaining experience and knowldege of the tools you hope to use when building your project.
We welcome any undergraduate student! You don't have to be in a computer-related major or even an engineering student.  You can come with a team, hack alone, or create a team. If you are hacking alone and want to find a team, we will help you find other participants to pair with.
Teams will demo their application, science fair style, to a panel of judges, who will deliberate on their favorite submissions to choose the winners.
We follow the MLH Code of Conduct
Email us at<EMAIL_ADDRESS>The Vermeer Applied Technology Hub/ISU Startup Factory


{% if page.link %}
{{ page.title }}
{% else %}{{ page.title }}
{% endif %}
{{ content }}
My Podcast!
If you like topics such as this then please consider subscribing to my podcast. I talk to some of the stalwarts in tech and ask them what their favorite productivity hacks are:
Available on iTunes Podcast
Visit Void Star Podcast’s page on iTunes Podcast Portal. Please Click ‘Subscribe’, leave a comment.
{% if site.owner.disqus-shortname and page.comments == true %} {% endif %}


--- layout: page permalink: /archive/ navigation: True cover: 'assets/images/home-cover.jpg' logo: assets/images/home.png ---


IPU College Admission Guide is a website to help students getting information about Guru Gobind Singh Indraprastha University, i.e. one of the top most ranked Universities of India. IPU College Admission Guide helps students to get the proper guidance for getting admitted in a B.Tech program in Colleges affiliated to G.G.S.I.P.U.


Anyone have a (formal / step-by-step) protocol for code reviews?
Yes, I do. At Opower, we were pretty serious about code reviews. We didn’t review every commit, but we did review a lot, and, after a while, fell into a pretty decent routine. This is an adaptation of that that I think is pretty decent.
Prepare
The code authors should send out the diff, either as a pull request, or whatever the equivalent is in the tool of choice. This should include:
- What the purpose of the change is
- Links to any supporting tickets, documentation, etc.
- A Place To Start
With all that, the reviewers should get an email, inviting them to review the code. This is important, because you need to identify the people whose feedback you want. Don’t just email<EMAIL_ADDRESS>; email people who either should see your change, or whose feedback you want.
A Place to Start?
Depending on the complexity of the change, this could be the name of the class/method where one should start reading, or a full-blown design document explaining the approach and structure of the change. The point is that the reviewers have no clue how your code works, and need somewhere to get going.
Asynchronous Review
This is “review by online tool”, e.g. Github Pull Requests. To make this work, you must have a tool that allows per-line commenting and discussion. The reviewers will start at the Place to Start, review the code, and comment on things.  The reviewee promises not to take anything personally. This can be hard to do, especially if you are new to the team, or inexperienced. I’d recommend that for first-time employees, skip this and go to the Synchronous Review as it can be less intimidating.
Responding to comments
The reviewee should absolutely respond to comments. I would expect comments to be one of these three responses:
- You are right, I will change that.
- You are wrong, because of some explanation, and perhaps I’ll drop some comments or better-name my variables before I push this to make it clear.
- I’m confused, can you elaborate?
Uploading changes
As important as it is that your review tool allow per-line comments, it’s equally important that your review tool allow new changes to be added to the review without blowing away the comments. Reviewers should be able to tell that you’ve made changes based on their feedback and see if it makes sense
Stylistic Comments
Early reviews at Opower wasted an inordinate amount of time on stylistic things. We eventually adopted a house style and our reviews moved on to important things. You are not a special butterfly and you are not a snowflake who can only express him or herself through your clever variable names and indenting style. Follow the house style, or at least the style of the code you are in so you can get better feedback on your code instead of arguing about where commas should go.
Synchronous Review
If there are too many “I’m confused” comments, or the overall design/approach of the solution seems undesirable, it can greatly help if you hold a meeting with the interested parties to talk out the issues in the review, rather than creating an endless stream of comments in the review tool.
This review should be attended only by those with an interest in the outcome. It should be timeboxed to hopefully 30 minutes, but not more than an hour, and the end result should be a “todo” list for the reviewee to correct the issues. The ability to project the code on the screen is a plus, and the code authors best know how to navigate their codebase. Senior developers have a responsibility to school them on this during the review. It’s the only way you’ll learn. The issues would be of the form:
- Code author didn’t understand the problem, and a larger rework is indicated
- Reviewers didn’t understand the solution, and, after explaining, the author either reworks the code to be more understandable, or provides documentation to clear things up
Completion
When the code is done to the satisfaction of those involved, the final commit should contain a link to the review in the review tool. This is crucial for future archaeologists that might want to know what’s going on; seeing the discussion can be helpful.
Doing this with Github
Github’s pull requests are less than ideal for this, depending on how you work. Primarily, a reviewer wants to see the diff between the current system and how the system would look with the new code applied. Last I checked, this view in Github doesn’t allow per-line commenting, making it almost useless (see update, 11/21).
What I’d recommend is to squash the commit onto a branch specifically for the review (e.g. reviews/TICKETNUM-DESCRIPTION
). When the code author needs to add changes in response to the review, just add those diffs to the branch. When everything is done, squash all that, and merge it. One diff, one thing to deal with and understand.
If you really want the sausage-making to be part of mainline history, then merge your changes plus one additional change representing all changes you made based on the review, with the message being a link to the review branch in Github.
Doing this with Crucible
Crucible was tailor-made for this, and all you need to do is choose changesets and have at it. You can add diffs as needed, and the commenting system is rich. Crucible is not as polished and slick as Github, but it works great.
Conclusion
This may sound like a lot, but it’s really lightweight, once you start doing it, and it’s way better than zillions of emails or long, horrible meetings. Just try it.
Update, 11/21
Github pull requests actually do let you comment per line on the diff view. This wasn’t always the case, and is still not the case for non-pull request branches. I still feel like Github’s PR mechanism isn’t totally awesome, especially because it can be hard to see what someone’s done to address code review comments, and, if you force-push, all hell breaks loose, but it’s gotten better.
Also, it seems that Crucible is going the way of the dodo, so scratch that. Maybe I need to re-write this post every 6 months?!


The Bans Page was designed as an answer to the heated debate surrounding Super Smash Bros. Ultimate's legal stagelist towards its release. One concern people had with a larger stage pool was that it would make the banning process more difficult. The homepage of Bans.Page was designed to fix this issue. The biggest part of the debate, however, was creating and demonstrating one's opinions about the legal stagelist. Some people wanted to be very restrictive with their list, to make things easy. Others wanted all stages to be used with Hazards Off to reduce the potential for mistakes during matches. A few individuals have brought up the idea of "Stage Pools", which are individual buckets of stages that would be banned as groups, to facilitate a larger stagelist.
Bans.Page and its Stagelist Creator were designed to facilitate all of that. Stagelists can be created and shared, in both the standard Starters-Counterpicks fashion, or the newer Stage Bucket method. These lists can be shared via codes or links. Additionally, the homepage has a few hardcoded lists from figureheads in the Smash community.
As Smash Ultimate is released and tournaments are held, we'd love it if Bans.Page could be useful to the community. Its snappy name, low filesize, and customizability could make it an easy tool to facilitate matches. We could set the home screen's default layout to a tournament's legal ruleset while the tournament was going on, for the convenience of TOs and Players alike, for instance.
Overall, Bans.Page was built with the Smash Community in mind. If you have any ideas about how to improve it, or want to reach out to us about its usage, feel free to do so on Twitter. Our handles are @WaveParadigm and @VGInvis.


STEMlab SDR Notes
Source
Issues
LED blinker
SDR transceiver compatible with HPSDR
SDR receiver compatible with HPSDR
Multiband WSPR transceiver
Multiband FT8 transceiver
Vector Network Analyzer


VISTA Login
Check to sign in using your PIV card (SSOi)
Enter your Access Code, Verify Code and eSignature Code for any Facility listed
FACILITY NAME
Access Code
Verify Code
eSignature Code


Clients can register and use the service from anywhere
Clients can change start point
Client can enter expected trip duration and distance to compare vehicles pricing
Clients can get vehicles info to order it
Clients can get vehicles info to order it
Client can contact the driver and cancel the trip
Clients can follow the trip
Clients can follow the trip
Client can get trip history
Drivers can register and use the service from anywhere
Drivers can upload vehicle info
Drivers can define the trip pricing
Drivers can contact with clients and accept or reject trips
Drivers can start trip when arrived to clients
Drivers can monitor the current trip
Drivers can get trip history
Drivers can get trip history
Zone admin can monitor the zone
Zone admin can manage users
Zone admin can monitor trips


--- title: Layers keywords: fastai sidebar: home_sidebar summary: "Common layers, blocks and utils." description: "Common layers, blocks and utils." nb_path: "nbs/00_layers.ipynb" ---
model = MLP(5, 10, 16, n_layers=3)
x = torch.randn(4, 5)
out = model(x)
assert out.shape == (4, 10)
bs, c_in, c_out, h, w = 4, 3, 8, 4, 4
conv = Conv2dBlock(c_in, c_out, 3, 2)
x = torch.randn(bs, c_in, h, w)
out = conv(x)
assert out.shape == (bs, c_out, (h+1)//2, (w+1)//2)
bs, c_in, c_out, h, w = 4, 16, 8, 10, 10
conv = ConvTranspose2dBlock(c_in, c_out, 4, 2)
x = torch.randn(bs, c_in, h, w)
out = conv(x)
assert out.shape == (bs, c_out, h*2, w*2)
bs, c_in, c_out, h, w = 4, 3, 8, 24, 24
conv = ResBlock(c_in, c_out, 3, 1)
x = torch.randn(bs, c_in, h, w)
out = conv(x)
assert out.shape == (bs, c_out, h, w)
x = torch.randn(1, 3, 2, 2)
m = ChanLayerNorm(3)
out = m(x)
mu = out.mean(1)
assert torch.allclose(mu+1, torch.ones_like(mu))
model = ConvNet(1)
model
class ResNet(nn.Module):
def __init__(self, c_in):
super().__init__()
self.net = nn.Sequential(
Conv2dBlock(c_in, 256, 4, 2),
nn.Conv2d(256, 256, 4, 2, 1),
ResBlock(256, 256, (3,1), 1, activation=Identity),
ResBlock(256, 256, (3,1), 1, activation=Identity)
)
def forward(self, x):
return self.net(x)


Becoming a Headspringer: Take Advantage of Working With Smart People
As I was pondering a new topic to blog, I stumbled into one this morning. I was running some ideas by a few Headspringers, and they provided several options. I decided to go with a hybrid of their suggestions. What I originally planned to blog was a way to test Enumeration subclasses of the Enumeration class from Tarantino. What I ended up with was an even better way to test them. This is not an unusual happenstance at Headspring. If you talk to other Headspringers, you’re going to learn something new. It never ceases to amaze me how often I’m learning something. I like to think I’m doing some teaching, too, but I’m confident that I’m currently learning more than teaching.
In case it isn’t clear by the title, part of becoming a Headspringer is to learn from the great people you get to work with every day. So, if you’d like the opportunity to work with talented, passionate people, we are hiring!
Now let’s get to the original idea of testing the Enumeration subclasses. I will walk through my original code, then what Mr. Brandon Barry showed me, and why it’s an improvement.
Originally, I had a test that gets all the subclasses of Enumeration, loops through them, and verifies all the values are unique. The test looked like this:
[gist id=2348233 file=All_Enumerations_should_contain_unique_ids_test.cs]
After talking to a few Headspringers, Brandon mentioned TestCaseSource, which turned out to be pretty perfect for this situation. Using TestCaseSource is similar to TestCase, which Chris Missal blogged about a couple weeks ago. You could use TestCase for this if you only wanted to test a few specific enumerations. Since I want to test all subclasses of Enumeration all the time, TestCaseSource was a much better fit. Now I don’t have to worry about forgetting to add an Enumeration to the test.
Now the test looks like this:
[gist id=2348235 file=Enumeration_should_contain_unique_ids_test.cs]
Basically, NUnit runs a test per type in EnumerationTypes and passes that type into the now-parameterized test. The primary benefit of this method is that it tests one Enumeration at a time. It also makes the test simpler by removing the muck and letting you focus on the actual test. As an added bonus, it integrates with Resharper’s test runner, which means you can debug an individual test without having to loop through the set to get to the one you want.
I created three test subclasses, and TestEnum3 has duplicate values of 1. Here’s what the runner looks like:
You can see in the image above that my original test just fails with “TestEnum3 contains duplicate ID of 1”. When using the TestCaseSource you get the test breakdown of each Enumeration, can clearly see that TestEnum3 is the one that fails, and can re-run that one individually. It also shows you what exactly is being tested, so you can verify you’re testing everything you think you’re testing.
And now it’s fixed:
If you would like to see more details on the Enumeration class, you can read Jimmy Bogard’s post on the subject. If you would like more details about this particular test, feel free to leave a comment.


Solve for p
p = T / X is the trivial solution. For the complex solution, see proof. Proof. m/(n+1)(x-X+T/p)^n+1 - m/(n+1)*x^(n+1) = T - Xp. We multiply by p^(n+1). m/(n+1)(x*p + (T-X*p))^(n+1)-m/(n+1)*(x*p)^(n+1) = (T-X*p)*p^(n+1). Now, expanding the former polynomial on the left, the first term will cancel with the latter polynomial, so we have: m/(n+1)*[(x*p)^n(T-X*p) + (x*p)^(n-1)(T-X*p)^2 + ... + (T-X*p)^(n+1)] = (T-X*p)*p^(n+1). We would divide by (T-Xp), but then we must consider our first solution: p = T / X. We verify the solution in the main equation and it is correct. Moving forward, we have: m/(n+1)[(x*p)^n + (x*p)^(n-1)(T-X*p)+...+(T-X*p)^n]=p^(n+1). But then, we see on the left side of the equation an expanded polynomial, which we implode back: m/(n+1)(x*p+T-X*p)^n=p^(n+1). This is: m/(n+1)[(x-X)*p+T]^n=p^(n+1). We note this (*). Now, we expand again the left side polynomial: m/(n+1)[(x-X)^n*p^n + (x-X)^(n-1)*p^(n-1)*T+...+T^n]=p^(n+1). Moving terms here and there, we get: -p^(n+1)+m/(n+1)(x-X)^n*p^n+m/(n+1)(x-X^(n-1)*T*p^(n-1)+...+m/(n+1)(x-X)T^(n-1)*p=-m/(n+1)*T^n. But then, -p[p^n + (X-x)*m/(n+1)*(x-X)^(n-1)*p^(n-1)+m/(n+1)(X-x)(x-X)^(n-2)*p^(n-2)*T+...+(X-x)m/(n+1)*T^(n-1)] = -m/(n+1)*T^n. Again, imploding the polynomial we have: -p{p^n+m/(n+1)(X-x)[(x-X)*p+T]^(n-1)}=-m/(n+1)*T^n. In fact, since p=T/(X-x) is not a solution, then: m/(n+1)[1/(1+T/((x-X)*p)][(x-X)*p+T]^(n-1)=-m/(n+1)T^n+p^(n+1). Remembering (*), we have: p^(n+1)/[1+T/((x-X)*p)] = -m/(n+1)T^n+p^(n+1). Dividing by p^(n+1) (not zero from initial conditions), we have: 1/(1+T/((x-X)*p))=-m/(n+1)*T^n/(p^(n+1)) + 1. Hence, m/(n+1)*(T/p)^n*(1/p)-T/(p*(x-X)+m/(n+1)*(T/p)^(n+1)*1/(p*(x-X)) = 0. We multiply by p^(n+2), having: m/(n+1)*T*p-T/(x-X)*p^(n+1)+m/(n+1)T^(n+1)/(x-X) = 0. Rearranging, T/(x-X)*p^(n+1)-m/(n+1)*T*p+m/(n+1)*T^(n+1)/(x-X) = 0. As we can see, the answer will vary very much in terms of n (this is a polynomial in p of grade n+1). You can know the solution once you know n.
🎵🕺🏻 Make the bounty song
Write Me a Poem About Web3
There’s a place that I visit, Each day and each night, It’s found here and there, But is nowhere in sight, There are endless addresses, But won’t be found on a map, But you’ll find what you need, On the latest D-App. Its a place where unknowns, Are in constant consensus, You can buy crypto kitties, Or some fresh p. Cubensis It holds so much power, In both function and form, One day could free man, From the systemic norm, Its a place where most wrongs, Will unlikely be written For ts hard to outsmart, Real decentralization! - Brad
Whose web3 is that? I think I know. Its owner is all of us though. Full of joy like a vivid rainbow, I watch him blockchain. I cry hello. He gives his web3 a shake, And signs transactions until his keys aches. The only other sound's the break, Of distant waves and birds awake. The web3 is trustless, decentralized and deep, But he has promises to keep, After cake and lots of sleep. Sweet dreams come to him cheap. He rises from his gentle bed, With thoughts of cryptokitties in his head, He eats his jam with lots of bread. Ready for the day ahead. - Akshay Raje
What's a node without a peer? The worst thing i've ever seen! Try to sync it, I cannot Well.. the network has been cut Once upon a sunny day I'd consent, please, if I may Yet it's nothing of that sort, No packages through my port 30303 30303 30303 30303 30303 Finally, i've found, you see Someone to contradict me, Run ahead, oh, miner dear The next block you'll see in clear..  This one block I will accept, You're my 51 percent I'll try just a simple thing, Storing data, remembering.. Heard there's some good Filecoins Imma live some of those joys Technicalities aside, Society's in for a ride, Now they all can just trade free Thanks to crypto-machinery Here's a hash, a key, incentives, To dri Ŀ扼ڥ瀔ⲛǊ;㤆Ɉ̺賲ɃU|ڠՀIŤ8¢[ FH]ú璤🞧@ͪڰƺ⇲݉竬ǃ蓤彿mƵ[血R症ⷯ 이<ݵ䚽t1멪T寋 ooooops - maddips
Create a song that remixes Vivaldi's Winter (from the Four Seasons) with Lil Wayne's Amili
Bounties for the Oceans: Philippines Pilot - Sustained, Verifiable Plastic Cleanups
Create a logo crossover/mashup/parody of Bounty paper towels & Bounties 🐝
Create a new song that remixes Beethoven's 5th Symphony alongside Kanye West and Kid Cudi's 4th Dimension


addX
is a function that returns another function. The function it returns adds
x
to whatever value is provided. x
is initially given to the
addX
function but is captured by the lambda that is returned.
The first notable difference is the use of template <typename T>
written
before the addX
function. C++ must make use of "generics" in order to account
for different numeric types, such as int
, float
,
double
, etc. This is done with what is called C++ templates. Templates are
expanded at compile-time into concrete implementations. So, to be fair, this is less generic
programming and more akin to sophisticated macros.
// When used in code, a version is compiled to match the usage.
template<typename T>
sum(T a, T b) {
return a + b;
}
void main() {
sum<int>(1, 2);
sum<double>(1.0, 2.0);
// this causes 2 specialized versions to be compiled
}
In Go, the types for numeric types must also be specified with options availabel such as uint8
,
int16
, float64
, and complex128
to name some of them. However, Go
lacks the ability to specify generic lambdas that work for all numeric types. As such, multiple versions
would have to be created if they were needed. And they would have to have different names in order to avoid
conflicting.
addXUInt8 := func(x uint8) func(uint8) uint8 { /* implementation */ }
addXUint16 := func(x uint16) func(uint16) uint16 { /* implementation */ }
addXUint32 := func(x uint32) func(uint32) uint32 { /* implementation */ }
// ... repeat for other numeric types
The second notable difference is that the capture portion of our lambda ([]
) contains
the variable x
. This value is copied into the lambda. Since C++ is not a
garbage-collected language, we have to be specific about which variables we want to capture and how
we'd like to capture them. For things we may not want to copy, we can pass by reference.
int main() {
auto bigString = "I'm a really long string, don't copy me ...";
auto printFn = [&bigString]() -> void {
std::cout << bigString;
};
printFn();
}
Note the &
before the variable name in [&bigString]
. This copies
the reference to the variable instead of copying the value into a new variable. The caveat with this
is that a reference is just a pointer to a location in memory. If the variable is cleaned up before
the lambda is called, bad things could happen.


This file helps ensure you can actually observe memory leaks with your OS tools. This simulate a memory leak by adding more and more globally accessible objects that cannot be collected because of their global references. You should see the memory grow and grow in your OS tools.
Click start and watch memory usage of the browser in the operating system. The memory usage should increase monotonically. After clicking the stop link, the memory use should plateau and only start increasing again after clicking start again.
The "release accumulated objects" link will break the global references to the many objects and thus allow the browser to garbage collect them. The memory use should drop down (sometimes gc doesn't happen immediately so wait a bit) and then start growing again. This makes a saw tooth graph of memory in use vs time if you click the "release accumulated objects" occasionally.
Try reloading the page or navigating to another web page. This should release the objects in this page and garbage collection should occur.
Running indicator:


Most of the Library’s online resources are also available when away from campus, after authenticating as a member of UCSF.
--- layout: default title: Faculty Support ---
Most of the Library’s online resources are also available when away from campus, after authenticating as a member of UCSF.
The Learning Technologies Group supports effective use of multimedia and computer-based resources in the UCSF curricula, as well as the Collaborative Learning Environment (CLE.)
Get guidance on copyright and course materials, as well as other rights topics.


- Connected tiles of same color form a province, as long as they have at least one town.
- All green provinces are yours
to control.
- Your goal is to expand your territory and destroy all rival towns.
- At the start of your turn, each of your provinces:
- Earns one coin for each tile in the
province.
- Pays its
units and
castles
- Stores surplus coins in towns.
- All the coins in your towns make up
the
province treasury.
- Use coins from the treasury to buy new
units
and
castles for the province.
- Every building and unit in the game has a strength level (ranging from 0 to 4)
- Strength matters when conquering enemy tiles and also protecting adjacent tiles from enemy
conquest.
- To conquer an enemy tile, the attacking unit must be stronger than each of the defending units and
buildings.
- In Konkr, your opponents play a lot like real humans:
- They play to win.
- They hold grudges.
- They join forces against a dominant player.
- They may lash out when desperate.
- The emoji over enemy towns tells you what the rival thinks of you.
 In the end they all play to win, and so should you.
- Units that didn't get paid turn into bandits.
This
is irreversible, so make sure
you are able to pay your units!
- Bandits serve only themselves. They move randomly around the map
and steal income from any tiles they land on.
- The stolen coins are taken to a nearby Bandit
camp. These camps can spawn new bandits once there are at least 3 coins
stored.
- Healthy income is key, don't buy/upgrade advanced units until you really need them.
- Use the economy against your enemies.
- Units behind walls are able to retreat when attacked.
- Sometimes the best move is to wait. Let your enemies fight each other while your treasury grows!
- You can issue many actions in Konkr with keyboard - see the hotkeys on the left!
- When you click the Undo button on the start of the turn, you have options to
Rewind time to the start of previous turn (you can do this only 3 times per game), or restart the current map.


About the IF-Archive.
Enter the Archive
The IF Archive is a public service of the Interactive Fiction Technology Foundation.
Terms of Use - About Us


| # | Sta | Rlx | Name | Row Text |
| 0 | | 0 | autoRow0 | "air" is a kind of "medium" for "light" (ac9a-6d31-d96f-51cd) |
| 1 | | 0 | autoRow1 | "water" is a kind of "medium" for "light" (1505-53ee-1d64-b11d) |
| 2 | | 0 | autoRow2 | "rain" is a kind of "water" (214a-9ca3-2983-aa79) |
| 3 | ST | 0 | autoRow3 | sunlight is a kind of light (49dc-4526-46f9-5b32) |
| 4 | ST | 0 | autoRow4 | refracting sunlight ; light causes ; causes sunlight ; light ; light to split into different colors (b743-7732-00bc-dc06) |
| 5 | ST | 0 | autoRow5 | the rainbow is made of all different colors in visible light (f5f9-0163-0873-51ba) |
| 6 | ST | 0 | autoRow6 | visible light is made of lights of different colors including violet , blue , green , yellow , orange , red light (34f3-92ba-d499-92d5) |
| 7 | ST | 0 | autoRow7 | sunlight is made of ultraviolet , infrared , and visible light (78fa-2af9-0a4b-0688) |
| 8 | ST | 0 | autoRow8 | sunlight and rain can cause a rainbow (5a4c-b508-a1b7-4639) |
| 9 | ST | 0 | autoRow9 | a rainbow is formed by refraction of light by separating light ; splitting light into all different colors (c7a2-2ef3-cee5-a093) |
| 10 | ST | 0 | autoRow10 | refraction is when light passes from one medium to another medium (888c-d0df-12df-c3b6) |
| 11 | ST | 0 | autoRow11 | refraction is when light bends (dc5d-599a-9815-c89b) |


I/O Service Provider for GrADS Binary Grid Files. This IOSP handles:
- raw lat/lon binary grid files (DTYPE not defined)
- ensembles defined by NAMES in one file or as a template
- time templates
- gaussian latitudes
It does not yet handle:
- other DTYPEs since these are readable through other IOSPs
- projected data (has PDEF)
- cross-sections since there isn't enough metadata to define the
single x or y dimension
- ensembles defined by EDEF/ENDEDEF
- some miscellaneous options:
- zrev - no examples
- 365_day_calendar - no support in netCDF-Java for imaginary times
- byteswapped - no examples, bad way to do it
- cray_32bit_ieee - no examples
See
http://www.iges.org/grads/gadoc/descriptorfile.html for more information.


pound
sound
sound
float
right
right
weigh
sleigh
sleigh
wheel
meal
meal
flute
cute
cute
wheat
greet
greet
thank
sink
sink
trick
brick
brick
lean
brown
brown
share
dare
dare


---
format: html
external: true
title: BoomChik is free
author: Jesse MacFadyen
link: http://www.risingj.com/archives/262
date: 2012-06-06 06:32:08 Z
type: post
status: publish
tags:
- PhoneGap Network
thumb: /blog/uploads/thumb/jesse.jpg
---
I'm on a rampage! Follow the beat of your own drummer. iPad version here iPhone version here


The Spry.Data.JSONDataSet class dervies from the HTTPSourceDataSet class so that it can load and process JSON data. The JSONDataSet follows a fixed set of rules for flattening JSON data. If the data to be flattened is not at the top-level of the JSON data structure, a path can be used to identify the data within the JSON structure that should be flattened. You can see how the JSONDataSet flattens various JSON data structures here.
Notifier -->DataSet --> HTTPSourceDataSet --> JSONDataSet
Spry.Data.JSONDataSet is the constructor function for the JSON Data Set.
Spry.Data.JSONDataSet(url, options)
{ "results": { "count": 3, "data": [ { "color": "orange", "category": "sedan" }, { "color": "yellow", "category": "sedan" }, { "color": "red", "category": "coupe" } ] } }
To flatten the structure in the "data" array, you would specify a path of "results.data". Or if you were only interested in extracting out all of the specified "category" values, you could specify a path of "results.data.category".
{ "data": { "firstname": [ "John", "Jane", "Ann" ], "lastname": [ "Smith", "Doe", "Hunt" ] "id": [ "3001", "4532", "5462" ] } }
If the data set was given a path of "data" to flatten, the data set would treat the "data" structure as if it were expressed in this manner:
{ "data": [ { "firstname": "John", "lastname": "Smith", "id": "3001" }, { "firstname": "Jane", "lastname": "Doe", "id": "4532" }, { "firstname": "Ann", "lastname": "Hunt", "id": "5462" } ] }
N/A
// An example of creating a JSON data set that flattens the top-level // structure of the JSON data. var ds = new Spry.Data.JSONDataSet("search.php?id=100"); // An example of creating a JSON data set that uses some DataSet // and HTTPSourceDataSet options. var ds = new Spry.Data.JSONDataSet("search.php?id=100", { useCache: false, loadInterval: 1000 }); // An example of creating a JSON data set that specifies a path // within the JSON data structure to the actual data. var ds = new Spry.Data.JSONDataSet("search.php?id=100", { path: "results.data" }); // An example of creating a JSON data set that specifies a subPath to // include in the flattening process. var ds = new Spry.Data.JSONDataSet("search.php?id=100", { path: "results.employees.employee", subPaths: "reviews.review.date" }); // An example of creating a JSON data set that specifies multiple // subPaths to include in the flattening process. var ds = new Spry.Data.JSONDataSet("search.php?id=100", { path: "results.employees.employee", subPaths: [ "reviews.review.date", "reviews.review.increase" ] });
This function returns the JSON string that was used by the data set to extract its data.
getDocument()
N/A
String or null. The JSON string or null;
var jsonStr = ds.geDocument();
This function returns the path to be used for finding the data to flatten within the JSON data structure.
getPath()
N/A
String or null. Returns the path that will be used to extract the data for flattening out of the JSON data. This may also return a null if no path was specified at construction time.
var path = ds.getPath();
This function is not meant to be called directly. The JSONDataSet overrides the HTTPSourceDataSet version of this function to add the ability to parse and flatten the JSON data.
loadDataIntoDataSet(jsonString)
jsonString - The raw JSON string that will be eval'd to create the JSON data structure.
N/A
N/A
This function sets the path to use to extract data out of the JSON data structure. If the JSON data has already been loaded, the JSONDataSet automatically applies the new object path to re-generate the data for the data set.
setPath()
N/A
N/A
ds.setPath("employees.employee");
Copyright © 2007. Adobe Systems Incorporated.
All rights reserved.


module PP::PPMethods
Public Instance Methods
Check whether the object_id id
is in the current buffer of
objects to be pretty printed. Used to break cycles in chains of objects to
be pretty printed.
# File lib/pp.rb, line 155 def check_inspect_key(id) Thread.current[:__recursive_key__] && Thread.current[:__recursive_key__][:inspect] && Thread.current[:__recursive_key__][:inspect].include?(id) end
A convenience method which is same as follows:
text ',' breakable
# File lib/pp.rb, line 212 def comma_breakable text ',' breakable end
Yields to a block and preserves the previous set of objects being printed.
# File lib/pp.rb, line 133 def guard_inspect_key if Thread.current[:__recursive_key__] == nil Thread.current[:__recursive_key__] = {}.taint end if Thread.current[:__recursive_key__][:inspect] == nil Thread.current[:__recursive_key__][:inspect] = {}.taint end save = Thread.current[:__recursive_key__][:inspect] begin Thread.current[:__recursive_key__][:inspect] = {}.taint yield ensure Thread.current[:__recursive_key__][:inspect] = save end end
A convenience method, like #object_group, but also reformats the Object's object_id.
# File lib/pp.rb, line 202 def object_address_group(obj, &block) str = Kernel.instance_method(:to_s).bind(obj).call str.chomp!('>') group(1, str, '>', &block) end
A convenience method which is same as follows:
group(1, '#<' + obj.class.name, '>') { ... }
# File lib/pp.rb, line 196 def object_group(obj, &block) # :yield: group(1, '#<' + obj.class.name, '>', &block) end
Removes an object from the set of objects being pretty printed.
# File lib/pp.rb, line 168 def pop_inspect_key(id) Thread.current[:__recursive_key__][:inspect].delete id end
Adds obj
to the pretty printing buffer using
Object#pretty_print or Object#pretty_print_cycle.
Object#pretty_print_cycle is used when obj
is already printed,
a.k.a the object reference chain has a cycle.
# File lib/pp.rb, line 177 def pp(obj) id = obj.object_id if check_inspect_key(id) group {obj.pretty_print_cycle self} return end begin push_inspect_key(id) group {obj.pretty_print self} ensure pop_inspect_key(id) unless PP.sharing_detection end end
A pretty print for a Hash
# File lib/pp.rb, line 271 def pp_hash(obj) group(1, '{', '}') { seplist(obj, nil, :each_pair) {|k, v| group { pp k text '=>' group(1) { breakable '' pp v } } } } end
A present standard failsafe for pretty printing any given Object
# File lib/pp.rb, line 255 def pp_object(obj) object_address_group(obj) { seplist(obj.pretty_print_instance_variables, lambda { text ',' }) {|v| breakable v = v.to_s if Symbol === v text v text '=' group(1) { breakable '' pp(obj.instance_eval(v)) } } } end
Adds the object_id id
to the set of objects being pretty
printed, so as to not repeat objects.
# File lib/pp.rb, line 163 def push_inspect_key(id) Thread.current[:__recursive_key__][:inspect][id] = true end
Adds a separated list. The list is separated by comma with breakable space, by default.
seplist iterates the
list
using iter_method
. It yields each object to
the block given for seplist.
The procedure separator_proc
is called between each yields.
If the iteration is zero times, separator_proc
is not called
at all.
If separator_proc
is nil or not given, +lambda { #comma_breakable }+ is
used. If iter_method
is not given, :each is used.
For example, following 3 code fragments has similar effect.
q.seplist([1,2,3]) {|v| xxx v } q.seplist([1,2,3], lambda { q.comma_breakable }, :each) {|v| xxx v } xxx 1 q.comma_breakable xxx 2 q.comma_breakable xxx 3
# File lib/pp.rb, line 241 def seplist(list, sep=nil, iter_method=:each) # :yield: element sep ||= lambda { comma_breakable } first = true list.__send__(iter_method) {|*v| if first first = false else sep.call end yield(*v) } end


| java.lang.Object | |
| ↳ | com.urbanairship.push.PushMessage |
A push message, usually created from handling a message intent from either GCM, or another push notification service
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | EXTRA_ACTIONS_PAYLOAD | The actions extra key holds the payload of actions to be performed with the push. | |||||||||
| String | EXTRA_ALERT | The alert extra holds the string sent in the "alert" field of an Urban Airship Push Notification. | |||||||||
| String | EXTRA_EXPIRATION | The EXPIRATION extra is a time expressed in seconds since the Epoch after which, if specified, the notification should not be delivered. | |||||||||
| String | EXTRA_INTERACTIVE_ACTIONS_PAYLOAD | The extra key for the payload of Urban Airship actions to be run when an interactive notification action button is opened. | |||||||||
| String | EXTRA_INTERACTIVE_TYPE | The extra key for the interactive notification group that will be displayed with a push. | |||||||||
| String | EXTRA_PUSH_ID | The push ID extra is the ID assigned to a push at the time it is sent. | |||||||||
| String | EXTRA_SEND_ID | The push ID extra holds the unique push ID sent in an Urban Airship Push Notification. | |||||||||
| String | EXTRA_STRING_EXTRA | This constant is deprecated. The latest versions of the Urban Airship API allow the extra to contain key/value pairs and the bare string extra has been deprecated in favor of that method. Marked to be removed on August 1, 2014 when we no longer support Urban Airship API Version 1. |
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
PushMessage(Bundle pushBundle)
Create a new PushMessage
|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String |
getActionsPayload()
Gets the actions payload that runs when the message is received or opened.
| ||||||||||
| String |
getAlert()
Gets the notification alert
| ||||||||||
| String |
getCanonicalPushId()
Gets the message's canonical push ID
| ||||||||||
| String |
getInteractiveActionsPayload()
Gets the notification actions payload.
| ||||||||||
| String |
getInteractiveNotificationType()
Gets the notification action button type.
| ||||||||||
| Bundle |
getPushBundle()
Returns a bundle of all the push extras
| ||||||||||
| String |
getRichPushMessageId()
Gets the rich push message ID
| ||||||||||
| String |
getSendId()
Gets the push send ID
| ||||||||||
| String | toString() |
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
From class
java.lang.Object
|
The actions extra key holds the payload of actions to be performed with the push.
The alert extra holds the string sent in the "alert" field of an Urban Airship Push Notification.
The EXPIRATION extra is a time expressed in seconds since the Epoch after which, if specified, the notification should not be delivered. It is removed from the notification before delivery to the client. If not present, notifications may be delivered arbitrarily late.
The extra key for the payload of Urban Airship actions to be run when an interactive notification action button is opened.
The extra key for the interactive notification group that will be displayed with a push.
The push ID extra is the ID assigned to a push at the time it is sent. Each API call will result in a unique push ID, so all notifications that are part of a multicast push will have the same push ID.
The push ID extra holds the unique push ID sent in an Urban Airship Push Notification. This is most commonly referred to as the "Send ID" at Urban Airship.
This constant is deprecated.
The latest versions of the Urban Airship API allow the extra to
contain key/value pairs and the bare string extra has been deprecated in favor
of that method. Marked to be removed on August 1, 2014 when we no longer support Urban
Airship API Version 1.
The string extra contains the value of the "extra" field in an Urban Airship
Push Notification if it was sent as a String instead of a Map
Create a new PushMessage
| pushBundle | The intent extras for the push |
|---|
Gets the actions payload that runs when the message is received or opened.
Gets the message's canonical push ID
Gets the notification actions payload.
Gets the notification action button type.
Returns a bundle of all the push extras
Gets the rich push message ID


9 arrested after residents protest in Darling over housing
by Dominique JefthaNine people have been arrested in Darling after around 1 500 people protested over housing and service delivery, police said on Monday.
Police were initially called to monitor a public residents meeting after the protests erupted on Sunday night.
"According to information, a group of about 1 500 people participated in the protest last night," said Western Cape police spokesperson Sergeant Noloyiso Rwexana.
"Nine people, aged between 19 and 33, were arrested after they burned tyres and threw stones at the police. They will appear in court once charged."
Community leader Archie Mbele told Netwerk24 that the protests turned violent when police handled protesters harshly.
Public Order Police and other law enforcement agencies were monitoring the area.
There were no reports of violence on Monday, but "police will remain in the area until law and order is restored", Rwexana said.


left align
fully responsive text
too long text you want to truncate because your container is too short for it
quotation with dedicated deisgn


Quick Start Guide¶
Overview¶
The OPAE C library is a lightweight user-space library that provides abstraction for FPGA resources in a compute environment. Built on top of the OPAE Intel® FPGA driver stack that supports Intel® FPGA platforms, the library abstracts away hardware specific and OS specific details and exposes the underlying FPGA resources as a set of features accessible from within software programs running on the host.
These features include the acceleration logic preconfigured on the device, as well as functions to manage and reconfigure the device. Hence, the library is able to enable user applications to transparently and seamlessly leverage FPGA-based acceleration.
In this document, we will explore the initial steps on how to setup the required libraries and utilities to use the FPGA devices.
If you do not have access to an Intel® Xeon® processor with integrated FPGA, or a programmable FPGA acceleration card for Intel® Xeon® processors, you will not be able to run the examples below. However, you can still make use of the AFU simulation environment (ASE) to develop and test accelerator RTL with OPAE applications.
For more information about ASE, see the OPAE AFU Simulation Environment (ASE) User Guide.
Note
The AFU simulation environment is not available for the Intel PAC N3000.
The source for the OPAE SDK Linux device drivers is available at the OPAE Linux DFL drivers repository.
``
Build the OPAE Linux device drivers from source¶
For building the OPAE kernel and kernel driver, the kernel development environment is required. So before you build the kernel, you must install the required packages. Run the following commands:
We using Federa 32 as an example.
$ sudo yum install gcc gcc-c++ make kernel-headers kernel-devel elfutils-libelf-devel ncurses-devel openssl-devel bison flex
Download the OPAE upstream kernel tree from github.
$ git clone https://github.com/OPAE/linux-dfl.git -b fpga-upstream-dev-5.8.0
Configure the kernel.
$ cd linux-dfl
$ cp /boot/config-`uname -r` .config
$ cat configs/n3000_d5005_defconfig >> .config
$ echo 'CONFIG_LOCALVERSION="-dfl"' >> .config
$ echo 'CONFIG_LOCALVERSION_AUTO=y' >> .config
$ make olddefconfig
Compile and install the new kernel.
$ make -j
$ sudo make modules_install
$ sudo make install
When installed finished, reboot your system. When the system login again, check the kernel version is correctly or not.
[figo@localhost linux-dfl]$ uname -a
Linux localhost.localdomain 5.8.0-rc1-dfl-g73e16386cda0 #6 SMP Wed Aug 19 08:38:32 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
Building and installing the OPAE SDK from source¶
Download the OPAE SDK source package from the respective release page on
GitHub - click the Source code (tar.gz)
link under “Downloads”.
After downloading the source, unpack, configure, and compile it:
tar xfvz opae-sdk-<release>.tar.gz
cd opae-sdk-<release>
mkdir build
cd build
cmake ..
make
By default, the OPAE SDK will install into /usr/local
if you also issue the following:
sudo make install
You can change this installation prefix from /usr/local
into something else
by adding -DCMAKE_INSTALL_PREFIX=<new prefix>
to the cmake
command above.
The remainder of this guide assumes you installed into /usr/local
.
Configuring the FPGA (loading an FPGA AFU)##¶
The fpgaconf tool exercises the AFU reconfiguration functionality. It shows how to read a bitstream from a disk file, check its validity and compatability, and then injects it into FPGA to be configured as a new AFU, which can then be discovered and used by user applications.
For this step you require a valid green bitstream (GBS) file. To reconfigure the FPGA slot, you can issue following command as system administrator (root):
$ sudo fpgaconf -b 0x5e <filename>.gbs
The -b
parameter to fpgaconf indicates the target bus number of the
FPGA slot to be reconfigured. Alternatively, you can also specify the
target socket number of the FPGA using the -s
parameter.
$ sudo fpgaconf --help
Usage:
fpgaconf [-hvn] [-b <bus>] [-d <device>] [-f <function>] [-s <socket>] <gbs>
-h,--help Print this help
-v,--verbose Increase verbosity
-n,--dry-run Don't actually perform actions
-b,--bus Set target bus number
-d,--device Set target device number
-f,--function Set target function number
-s,--socket Set target socket number
Note
The sample application on the Building a Sample Application section requires loading of an AFU called “Native Loopback Adapter” (NLB) on the FPGA. Please refer to the NLB documentation for the location of the NLB’s green bitstream. You also can verify if the NLB green bitstream has already been loaded into the FPGA slot by typing the following command and checking the output matches the following:
$ cat /sys/class/fpga_region/region0/dfl-port.0/afu_id
d8424dc4a4a3c413f89e433683f9040b
Note
The fpgaconf tool is not available for the Intel PAC N3000. The NLB is alrealy include in AFU.
Building a sample application¶
The library source includes code samples. Use these samples to learn how to call functions in the library. Build and run these samples as quick sanity checks to determine if your installation and environment are set up properly.
In this guide, we will build hello_fpga.c. This is the “Hello World!” example of using the library. This code searches for a predefined and known AFU called “Native Loopback Adapter” on the FPGA. If found, it acquires ownership and then interacts with the AFU by sending it a 2MB message and waiting for the message being echoed back. This code exercises all major components of the API except for AFU reconfiguration: AFU search, enumeration, access, MMIO, and memory management.
You can also find the source for hello\_fpga
in the samples
directory of the
OPAE SDK repository on github.
int main(int argc, char *argv[])
{
fpga_properties filter = NULL;
fpga_token afu_token;
fpga_handle afu_handle;
fpga_guid guid;
uint32_t num_matches;
volatile uint64_t *dsm_ptr = NULL;
volatile uint64_t *status_ptr = NULL;
volatile uint64_t *input_ptr = NULL;
volatile uint64_t *output_ptr = NULL;
uint64_t dsm_wsid;
uint64_t input_wsid;
uint64_t output_wsid;
fpga_result res = FPGA_OK;
if (uuid_parse(NLB0_AFUID, guid) < 0) {
fprintf(stderr, "Error parsing guid '%s'\n", NLB0_AFUID);
goto out_exit;
}
/* Look for accelerator by its "afu_id" */
res = fpgaGetProperties(NULL, &filter);
ON_ERR_GOTO(res, out_exit, "creating properties object");
res = fpgaPropertiesSetObjectType(filter, FPGA_ACCELERATOR);
ON_ERR_GOTO(res, out_destroy_prop, "setting object type");
res = fpgaPropertiesSetGuid(filter, guid);
ON_ERR_GOTO(res, out_destroy_prop, "setting GUID");
/* TODO: Add selection via BDF / device ID */
res = fpgaEnumerate(&filter, 1, &afu_token, 1, &num_matches);
ON_ERR_GOTO(res, out_destroy_prop, "enumerating accelerators");
if (num_matches < 1) {
fprintf(stderr, "accelerator not found.\n");
res = fpgaDestroyProperties(&filter);
return FPGA_INVALID_PARAM;
}
/* Open accelerator and map MMIO */
res = fpgaOpen(afu_token, &afu_handle, 0);
ON_ERR_GOTO(res, out_destroy_tok, "opening accelerator");
res = fpgaMapMMIO(afu_handle, 0, NULL);
ON_ERR_GOTO(res, out_close, "mapping MMIO space");
/* Allocate buffers */
res = fpgaPrepareBuffer(afu_handle, LPBK1_DSM_SIZE,
(void **)&dsm_ptr, &dsm_wsid, 0);
ON_ERR_GOTO(res, out_close, "allocating DSM buffer");
res = fpgaPrepareBuffer(afu_handle, LPBK1_BUFFER_ALLOCATION_SIZE,
(void **)&input_ptr, &input_wsid, 0);
ON_ERR_GOTO(res, out_free_dsm, "allocating input buffer");
res = fpgaPrepareBuffer(afu_handle, LPBK1_BUFFER_ALLOCATION_SIZE,
(void **)&output_ptr, &output_wsid, 0);
ON_ERR_GOTO(res, out_free_input, "allocating output buffer");
printf("Running Test\n");
/* Initialize buffers */
memset((void *)dsm_ptr, 0, LPBK1_DSM_SIZE);
memset((void *)input_ptr, 0xAF, LPBK1_BUFFER_SIZE);
memset((void *)output_ptr, 0xBE, LPBK1_BUFFER_SIZE);
cache_line *cl_ptr = (cache_line *)input_ptr;
for (uint32_t i = 0; i < LPBK1_BUFFER_SIZE / CL(1); ++i) {
cl_ptr[i].uint[15] = i+1; /* set the last uint in every cacheline */
}
/* Reset accelerator */
res = fpgaReset(afu_handle);
ON_ERR_GOTO(res, out_free_output, "resetting accelerator");
/* Program DMA addresses */
uint64_t iova;
res = fpgaGetIOAddress(afu_handle, dsm_wsid, &iova);
ON_ERR_GOTO(res, out_free_output, "getting DSM IOVA");
res = fpgaWriteMMIO64(afu_handle, 0, CSR_AFU_DSM_BASEL, iova);
ON_ERR_GOTO(res, out_free_output, "writing CSR_AFU_DSM_BASEL");
res = fpgaWriteMMIO32(afu_handle, 0, CSR_CTL, 0);
ON_ERR_GOTO(res, out_free_output, "writing CSR_CFG");
res = fpgaWriteMMIO32(afu_handle, 0, CSR_CTL, 1);
ON_ERR_GOTO(res, out_free_output, "writing CSR_CFG");
res = fpgaGetIOAddress(afu_handle, input_wsid, &iova);
ON_ERR_GOTO(res, out_free_output, "getting input IOVA");
res = fpgaWriteMMIO64(afu_handle, 0, CSR_SRC_ADDR, CACHELINE_ALIGNED_ADDR(iova));
ON_ERR_GOTO(res, out_free_output, "writing CSR_SRC_ADDR");
res = fpgaGetIOAddress(afu_handle, output_wsid, &iova);
ON_ERR_GOTO(res, out_free_output, "getting output IOVA");
res = fpgaWriteMMIO64(afu_handle, 0, CSR_DST_ADDR, CACHELINE_ALIGNED_ADDR(iova));
ON_ERR_GOTO(res, out_free_output, "writing CSR_DST_ADDR");
res = fpgaWriteMMIO32(afu_handle, 0, CSR_NUM_LINES, LPBK1_BUFFER_SIZE / CL(1));
ON_ERR_GOTO(res, out_free_output, "writing CSR_NUM_LINES");
res = fpgaWriteMMIO32(afu_handle, 0, CSR_CFG, 0x42000);
ON_ERR_GOTO(res, out_free_output, "writing CSR_CFG");
status_ptr = dsm_ptr + DSM_STATUS_TEST_COMPLETE/8;
/* Start the test */
res = fpgaWriteMMIO32(afu_handle, 0, CSR_CTL, 3);
ON_ERR_GOTO(res, out_free_output, "writing CSR_CFG");
/* Wait for test completion */
while (0 == ((*status_ptr) & 0x1)) {
usleep(100);
}
/* Stop the device */
res = fpgaWriteMMIO32(afu_handle, 0, CSR_CTL, 7);
ON_ERR_GOTO(res, out_free_output, "writing CSR_CFG");
/* Check output buffer contents */
for (uint32_t i = 0; i < LPBK1_BUFFER_SIZE; i++) {
if (((uint8_t*)output_ptr)[i] != ((uint8_t*)input_ptr)[i]) {
fprintf(stderr, "Output does NOT match input "
"at offset %i!\n", i);
break;
}
}
printf("Done Running Test\n");
/* Release buffers */
out_free_output:
res = fpgaReleaseBuffer(afu_handle, output_wsid);
ON_ERR_GOTO(res, out_free_input, "releasing output buffer");
out_free_input:
res = fpgaReleaseBuffer(afu_handle, input_wsid);
ON_ERR_GOTO(res, out_free_dsm, "releasing input buffer");
out_free_dsm:
res = fpgaReleaseBuffer(afu_handle, dsm_wsid);
ON_ERR_GOTO(res, out_unmap, "releasing DSM buffer");
/* Unmap MMIO space */
out_unmap:
res = fpgaUnmapMMIO(afu_handle, 0);
ON_ERR_GOTO(res, out_close, "unmapping MMIO space");
/* Release accelerator */
out_close:
res = fpgaClose(afu_handle);
ON_ERR_GOTO(res, out_destroy_tok, "closing accelerator");
/* Destroy token */
out_destroy_tok:
res = fpgaDestroyToken(&afu_token);
ON_ERR_GOTO(res, out_destroy_prop, "destroying token");
/* Destroy properties object */
out_destroy_prop:
res = fpgaDestroyProperties(&filter);
ON_ERR_GOTO(res, out_exit, "destroying properties object");
out_exit:
return res;
}
Linking with the OPAE library is straightforward. Code using this library
should include the header file fpga.h
. Taking the GCC compiler on
Linux as an example, the minimalist compile and link line should look
like:
$ gcc -std=c99 hello_fpga.c -I/usr/local/include -L/usr/local/lib -lopae-c -luuid -ljson-c -lpthread -o hello_fpga
Note
Third-party library dependency: The library internally uses libuuid and libjson-c. But they are not distributed as part of the library. Make sure you have these libraries properly installed.
- $ sudo ./hello_fpga -c
Running Test Running on bus 0x08. AFU NLB0 found @ 28000 Done Running Test
To run the hello_fpga application; just issue:
$ sudo ./hello_fpga
Running Test
Done
Note
In order to successfully run hello_fpga, the user needs to configure system hugepage to reserve 2M-hugepages. For example, the command below reserves 20 2M-hugepages:
$ echo 20 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
For x86_64 architecture CPU, user can use following command to find out avaiable huge page sizes:
$ grep pse /proc/cpuinfo | uniq flags : … pse …
If this commands returns a non-empty string, 2MB pages are supported:
$ grep pse /proc/cpuinfo | uniq flags : … pdpe1gb …
If this commands returns a non-empty string, 1GB pages are supported:
Note
The default configuration for many Linux distribution currently sets a relatively low limit for pinned memory allocations per process (RLIMIT_MEMLOCK, often set to a default of 64kiB). To run an OPAE application which attempts to share more memory than specified by this limit between software and an accelerator, you can either:
Run the application as root, or
Increase the limit for locked memory via ulimit:
$ ulimit -l unlimited
See the Installation Guide for how to permanently adjust the memlock limit.


We offer high quality technical support for all sort of I.C.T difficulties, stating from both software, hardware
and network issues, we are the best at it.
We deliver high quality information security systems, starting from Basic Authentication Systems, Biometric authentication
systems, firewalls,antiviruses e.t.c


|
LaraCraft
|
The standard types defined by the specification. More...
Modules | |
| Precision types | |
| Non-GLSL types that are used to define precision-based types. | |
The standard types defined by the specification.
These types are all typedefs of more generalized, template types. To see the definiton of these template types, go to Template types.
| typedef highp_bvec2 glm::bvec2 |
2 components vector of boolean.
Definition at line 500 of file type_vec.hpp.
| typedef highp_bvec3 glm::bvec3 |
3 components vector of boolean.
Definition at line 505 of file type_vec.hpp.
| typedef highp_bvec4 glm::bvec4 |
4 components vector of boolean.
Definition at line 510 of file type_vec.hpp.
| typedef highp_dmat2x2 glm::dmat2 |
2 * 2 matrix of double-precision floating-point numbers.
Definition at line 733 of file type_mat.hpp.
| typedef highp_dmat2x2 glm::dmat2x2 |
2 * 2 matrix of double-precision floating-point numbers.
Definition at line 748 of file type_mat.hpp.
| typedef highp_dmat2x3 glm::dmat2x3 |
2 * 3 matrix of double-precision floating-point numbers.
Definition at line 753 of file type_mat.hpp.
| typedef highp_dmat2x4 glm::dmat2x4 |
2 * 4 matrix of double-precision floating-point numbers.
Definition at line 758 of file type_mat.hpp.
| typedef highp_dmat3x3 glm::dmat3 |
3 * 3 matrix of double-precision floating-point numbers.
Definition at line 738 of file type_mat.hpp.
| typedef highp_dmat3x2 glm::dmat3x2 |
3 * 2 matrix of double-precision floating-point numbers.
Definition at line 763 of file type_mat.hpp.
| typedef highp_dmat3x3 glm::dmat3x3 |
3 * 3 matrix of double-precision floating-point numbers.
Definition at line 768 of file type_mat.hpp.
| typedef highp_dmat3x4 glm::dmat3x4 |
3 * 4 matrix of double-precision floating-point numbers.
Definition at line 773 of file type_mat.hpp.
| typedef highp_dmat4x4 glm::dmat4 |
4 * 4 matrix of double-precision floating-point numbers.
Definition at line 743 of file type_mat.hpp.
| typedef highp_dmat4x2 glm::dmat4x2 |
4 * 2 matrix of double-precision floating-point numbers.
Definition at line 778 of file type_mat.hpp.
| typedef highp_dmat4x3 glm::dmat4x3 |
4 * 3 matrix of double-precision floating-point numbers.
Definition at line 783 of file type_mat.hpp.
| typedef highp_dmat4x4 glm::dmat4x4 |
4 * 4 matrix of double-precision floating-point numbers.
Definition at line 788 of file type_mat.hpp.
| typedef highp_dvec2 glm::dvec2 |
2 components vector of double-precision floating-point numbers.
Definition at line 416 of file type_vec.hpp.
| typedef highp_dvec3 glm::dvec3 |
3 components vector of double-precision floating-point numbers.
Definition at line 421 of file type_vec.hpp.
| typedef highp_dvec4 glm::dvec4 |
4 components vector of double-precision floating-point numbers.
Definition at line 426 of file type_vec.hpp.
| typedef highp_ivec2 glm::ivec2 |
2 components vector of signed integer numbers.
Definition at line 444 of file type_vec.hpp.
| typedef highp_ivec3 glm::ivec3 |
3 components vector of signed integer numbers.
Definition at line 449 of file type_vec.hpp.
| typedef highp_ivec4 glm::ivec4 |
4 components vector of signed integer numbers.
Definition at line 454 of file type_vec.hpp.
2 columns of 2 components matrix of floating-point numbers.
Definition at line 432 of file type_mat.hpp.
| typedef highp_mat2x2 glm::mat2x2 |
2 columns of 2 components matrix of floating-point numbers.
Definition at line 385 of file type_mat.hpp.
| typedef highp_mat2x3 glm::mat2x3 |
2 columns of 3 components matrix of floating-point numbers.
Definition at line 390 of file type_mat.hpp.
| typedef highp_mat2x4 glm::mat2x4 |
2 columns of 4 components matrix of floating-point numbers.
Definition at line 395 of file type_mat.hpp.
3 columns of 3 components matrix of floating-point numbers.
Definition at line 437 of file type_mat.hpp.
| typedef highp_mat3x2 glm::mat3x2 |
3 columns of 2 components matrix of floating-point numbers.
Definition at line 400 of file type_mat.hpp.
| typedef highp_mat3x3 glm::mat3x3 |
3 columns of 3 components matrix of floating-point numbers.
Definition at line 405 of file type_mat.hpp.
| typedef highp_mat3x4 glm::mat3x4 |
3 columns of 4 components matrix of floating-point numbers.
Definition at line 410 of file type_mat.hpp.
4 columns of 4 components matrix of floating-point numbers.
Definition at line 442 of file type_mat.hpp.
| typedef highp_mat4x2 glm::mat4x2 |
4 columns of 2 components matrix of floating-point numbers.
Definition at line 415 of file type_mat.hpp.
| typedef highp_mat4x3 glm::mat4x3 |
4 columns of 3 components matrix of floating-point numbers.
Definition at line 420 of file type_mat.hpp.
| typedef highp_mat4x4 glm::mat4x4 |
4 columns of 4 components matrix of floating-point numbers.
Definition at line 425 of file type_mat.hpp.
| typedef highp_uvec2 glm::uvec2 |
2 components vector of unsigned integer numbers.
Definition at line 472 of file type_vec.hpp.
| typedef highp_uvec3 glm::uvec3 |
3 components vector of unsigned integer numbers.
Definition at line 477 of file type_vec.hpp.
| typedef highp_uvec4 glm::uvec4 |
4 components vector of unsigned integer numbers.
Definition at line 482 of file type_vec.hpp.
| typedef highp_vec2 glm::vec2 |
2 components vector of floating-point numbers.
Definition at line 388 of file type_vec.hpp.
| typedef highp_vec3 glm::vec3 |
3 components vector of floating-point numbers.
Definition at line 393 of file type_vec.hpp.
| typedef highp_vec4 glm::vec4 |
4 components vector of floating-point numbers.
Definition at line 398 of file type_vec.hpp.


{% extends "layout_template.html" %} {%- block head -%}
This website is powered by the Research Software Directory — the content management system for research software.
[[sw.shortStatement]]
From the eScience blog
Visit our blog{{post.title}}
{% endfor %}


To build an application that uses the CUDD C++ interface, you should add
#include "cuddObj.hh"to your source files. In addition to the normal CUDD libraries (see Section 3.1) you should link
libobj.a
to your executable. Refer to the
Makefile in the top level directory of the
distribution for further details.
The following fragment of code illustrates some simple operations on BDDs using the C++ interface.
Cudd mgr(0,0); BDD x = mgr.bddVar(); BDD y = mgr.bddVar(); BDD f = x * y; BDD g = y + !x; cout << "f is" << (f <= g ? "" : " not") << " less than or equal to g\n";This code creates a manager called
mgr
and two variables in it.
It then defines two functions f
and g
in terms of the
variables. Finally, it prints a message based on the comparison of the
two functions. No explicit referencing or dereferencing is required.
The operators are overloaded in the intuitive way. BDDs are freed when
execution leaves the scope in which they are defined or when the
variables referring to them are overwritten.