#include <MPlane.h>
Public Member Functions | |
| MPlane () | |
| normal to the plane, and any point the plane passes through. | |
| MPlane (UReader &reader) | |
| MPlane (const MVec3 &normal, const MVec3 &point) | |
| MPlane (const MVec3 &normal, float d) | |
| ~MPlane () | |
| const MVec3 & | GetNormal () const |
| if the value is ( - ), then the point is behind the plane. If ( + ), then on the plane. | |
| float | GetD () const |
| void | SetD (float d) |
| void | ReverseFacing () |
| void | Bias (float amount) |
| adds a bias to the plane ( moves it along the normal by the amount specified ). | |
| MPlane | Transform (const MMat4x4 &transform, const MMat3x3 &normalRot) |
| transforms the plane by a 4x4 matrix. | |
| void | TransformFast (const MMat4x4 &transform, const MMat3x3 &normalRot) |
| void | Translate (const MVec3 &translate) |
| translates the plane by a given amount. | |
| void | Scale (float scale) |
| scales the plane's distance to the origin by the given amount. | |
| MMat4x4 | BuildReflectMatrix () const |
| builds a reflection matrix. | |
| bool | IsCoplanar (const MPlane &plane, float angleEpsilon, float dEpsilon) const |
| returns true if two planes are coplanar. | |
| int | GetSide (const MVec3 &pt, float epsilon) const |
| returns the side the point passed in is on. | |
| bool | GetIntersect (MLine &line, const MPlane &plane) const |
| bool | GetIntersect (MVec3 &point, const MPlane &plane1, const MPlane &plane2) const |
| template<typename _Vec > | |
| float | Dist (const _Vec &point) const |
| signed distance to a point. | |
| template<typename _Vec > | |
| bool | GetSegmentIntersect (_Vec &pt, const _Vec &pt0, const _Vec &pt1) const |
| _Vec must have a conversion to type MVec defined. | |
| template<typename _Vec > | |
| bool | GetRayIntersect (float &rayMu, const _Vec &rayOrigin, const _Vec &rayDir) const |
| _Vec must have a conversion to type MVec defined. | |
| template<typename _Triangle , typename _Vec > | |
| void | SplitTriangle (const _Triangle &tri, _Triangle *posTris, _Triangle *negTris, unsigned int &posCount, unsigned int &negCount, float epsilon) const |
| splits a triangle. structure passed in must have vars pt0, pt1, pt2. | |
| void | Save (UWriter &writer) const |
| save/load. | |
| void | Load (UReader &reader) |
Definition at line 25 of file MPlane.h.
| MPlane::MPlane | ( | ) |
normal to the plane, and any point the plane passes through.
class header.
File: MPlane.cpp Author: Kevin Bray Created: 11-10-04 Copyright © 2004 Bootstrap Studios. All rights reserved. project includes. std c++ includes. class MPlane ctor & dtor
Definition at line 30 of file MPlane.cpp.
| MPlane::MPlane | ( | UReader & | reader | ) |
Definition at line 38 of file MPlane.cpp.
Definition at line 46 of file MPlane.cpp.
| MPlane::MPlane | ( | const MVec3 & | normal, | |
| float | d | |||
| ) |
Definition at line 55 of file MPlane.cpp.
| MPlane::~MPlane | ( | ) |
Definition at line 63 of file MPlane.cpp.
| void MPlane::Bias | ( | float | amount | ) |
adds a bias to the plane ( moves it along the normal by the amount specified ).
public methods
Definition at line 75 of file MPlane.cpp.
| MMat4x4 MPlane::BuildReflectMatrix | ( | ) | const |
| float MPlane::Dist | ( | const _Vec & | point | ) | const [inline] |
returns the point that is formed where three planes intersect. If a point cannot be determined, false is returned. Otherwise, true is returned.
determine the denominator.
invert.
calculate the top.
calculate the final point.
return true to indicate success.
Definition at line 170 of file MPlane.cpp.
returns the line that is formed where two planes intersect. If the line cannot be determined, false is returned. Otherwise, true is returned.
Definition at line 148 of file MPlane.cpp.
| const MVec3& MPlane::GetNormal | ( | ) | const [inline] |
| bool MPlane::GetRayIntersect | ( | float & | rayMu, | |
| const _Vec & | rayOrigin, | |||
| const _Vec & | rayDir | |||
| ) | const [inline] |
_Vec must have a conversion to type MVec defined.
find the distance between the ray's origin and the plane.
if the distance is very close to zero, then the ray originates on the plane; the origin is also the intersection.
find the angle between the ray direction and the plane normal.
if the angle is very close to a right angle, then the ray is parallel to the plane; does not intersect.
solve for the length of the hypotenuse of the triangle formed by the ray's origin, the ray's origin projected onto the plane, and the intersection point.
indicate an intersection point was found.
| bool MPlane::GetSegmentIntersect | ( | _Vec & | pt, | |
| const _Vec & | pt0, | |||
| const _Vec & | pt1 | |||
| ) | const [inline] |
_Vec must have a conversion to type MVec defined.
essentially, we're finding how much of the line resides on one half of the plane, and how much of the line resides on the other half. I then use that to find a ratio that I then use to interpolate between the two points passed in.
both points are on the same side of the plane; does not intersect.
find the ratio of how much of the line resides on opposite sides of the plane.
indicate an intersection point was found.
| int MPlane::GetSide | ( | const MVec3 & | pt, | |
| float | epsilon | |||
| ) | const |
| bool MPlane::IsCoplanar | ( | const MPlane & | plane, | |
| float | angleEpsilon, | |||
| float | dEpsilon | |||
| ) | const |
| void MPlane::Load | ( | UReader & | reader | ) |
Definition at line 202 of file MPlane.cpp.
| void MPlane::Save | ( | UWriter & | writer | ) | const |
| void MPlane::Scale | ( | float | scale | ) |
scales the plane's distance to the origin by the given amount.
Definition at line 109 of file MPlane.cpp.
| void MPlane::SplitTriangle | ( | const _Triangle & | tri, | |
| _Triangle * | posTris, | |||
| _Triangle * | negTris, | |||
| unsigned int & | posCount, | |||
| unsigned int & | negCount, | |||
| float | epsilon | |||
| ) | const [inline] |
splits a triangle. structure passed in must have vars pt0, pt1, pt2.
determine how many points are on which side of the plane, and how many triangles need to be created.
check to see if the triangle even collides with the plane.
if we have two verts on one side, we'll have two tris on one side, one on the other. note that the maximum number of triangles we can possibly get back is 3.
determine which segment is entirely on one side of the plane.
create the new triangles ( and preserve winding order ).
single triangle on one side.
two triangles on the other.
single triangle on one side.
two triangles on the other.
split the segments that cross the plane.
create the new triangles ( and preserve winding order ).
single triangle on one side.
two triangles on the other.
single triangle on one side.
two triangles on the other.
split the segments that cross the plane.
create the new triangles ( and preserve winding order ).
single triangle on one side.
two triangles on the other.
single triangle on one side.
two triangles on the other.
we only need to split a single edge.
split edges 1 and 2.
split edges 2 and 0.
split edges 0 and 1.
transforms the plane by a 4x4 matrix.
transform the plane into world space.
Definition at line 82 of file MPlane.cpp.
| void MPlane::Translate | ( | const MVec3 & | translate | ) |


Hello everyone. This is an Online photo filter applier and photo hider webpage. Using this webpage you can apply filters such as blurring, red scale, rainbow filter, and many other predesigned filters. Also this webpage comes with an online GreenScreen converter using which you can convert your greenscreen images to a different image with a different background. The webpage also includes a Photo hider which uses the principal of steganography to hide images within other images. So let's get started.
Green Screen Converter
Here is a green screen converter which uses principle of green screen to convert into a new image.
Filter Applier
Here you can select any one filter from the different filters available


Home
Headphones
Speakers
Earphones
Go back
New product
ZX9 Speaker
Upgrade your sound system with the all new ZX9 active speaker. It’s a bookshelf speaker
system that offers truly wireless connectivity -- creating new possibilities for more
pleasing and practical audio setups.
$4,500
1
Add to cart
Features
Connect via Bluetooth or nearly any wired source. This speaker features optical, digital coaxial,
USB Type-B, stereo RCA, and stereo XLR inputs, allowing you to have up to five wired source devices
connected for easy switching. Improved bluetooth technology offers near lossless audio quality at
up to 328ft (100m).
Discover clear, more natural sounding highs than the competition with ZX9’s signature planar diaphragm
tweeter. Equally important is its powerful room-shaking bass courtesy of a 6.5” aluminum alloy bass
unit. You’ll be able to enjoy equal sound quality whether in a large room or small den. Furthermore, you
will experience new sensations from old songs since it can respond to even the subtle waveforms.
In the box
2x Speaker unit
2x Speaker cloth panel
1x User manual
1x 3.5mm 10m audio cable
1x 10m optical cable
You may also like
ZX7 Speaker
See product
XX99 Mark I
See product
XX59
See product
Headphones
Shop
Speakers
Shop
Earphones
Shop
Bringing you the best audio gear
Located at the heart of New York City, Audiophile is the premier store for high end headphones,
earphones, speakers, and audio accessories. We have a large showroom and luxury demonstration
rooms available for you to browse and experience a wide range of our products. Stop by our store
to meet some of the fantastic people who make Audiophile the best place to buy your portable
audio equipment.
Home
Headphones
Speakers
Earphones
Audiophile is an all in one stop to fulfill your audio needs. We're a small team of music lovers
and sound specialists who are devoted to helping you get the most out of personal audio. Come and
visit our demo facility - we’re open 7 days a week.
Copyright 2021. All Rights Reserved


While importing three.js via script tags is a great way to get up and running fast, it has a few drawbacks for longer lived projects, for example:
Using a dependency manager like npm avoids these caveats by allowing you to simply download and import your desired version of the library onto your machine.
Three.js is published as an npm module, see: [link:https://www.npmjs.com/package/three npm]. This means all you need to do to include three.js into your project is run "npm install three"
Assuming that you're bundling your files with a tool such as [link:https://webpack.github.io/ Webpack] or [link:https://github.com/substack/node-browserify Browserify], which allow you to "require('modules')" in the browser by bundling up all of your dependencies.
You should now be able to import the module into your source files and continue to use it as per normal.
var THREE = require('three');
var scene = new THREE.Scene();
...
You're also able to leverage [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import ES6 import syntax]:
import * as THREE from 'three';
const scene = new THREE.Scene();
...
or if you wish to import only select parts of three.js library, for example Scene:
import { Scene } from 'three';
const scene = new Scene();
...
The core of three.js is focused on the most important components of a 3D engine. Many other components like loaders or controls are part of the examples directory. three.js ensures that these files are kept in sync with the core but users have to import them separately if they are required for a project. You can find in the [link:https://github.com/mrdoob/three.js/tree/master/examples/jsm examples/jsm] directory an ES6 module version for almost all example files. If you install three.js via npm, you can import them like so:
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
Note: When using code from the examples directory, it's important that all files match the version of your three.js main file. For example, it's not acceptable to use *GLTFLoader* and *OrbitControls* from R96 together with three.js R103.


On this page
KrakenD is a single binary file that does not require any external libraries to work. To install KrakenD choose your operative system in the downloads section or use the Docker image.
Download KrakenD and Generate the configuration file
Just exploring?
Use the KrakenD Playground if you want to play with KrakenD without configuring it. The Playground comes with several flavors of KrakenD and a mock API. Everything is ready to start playing, just do a docker-compose up
!
Docker
If you are already familiar with Docker, the easiest way to get started is by pulling and running the KrakenD image from the Docker Hub.
- docker run -p 8080:8080 -v $PWD:/etc/krakend/ devopsfaith/krakend run --config /etc/krakend/krakend.json
krakend.json
in the current directory with your endpoint definition. You can generate it here
Mac OS X
The Homebrew formula will download the source code, build the formula and link the binary for you. The installation might take a while.
- brew install krakend
After the installation completes go to Using KrakenD
Linux
CentOS and Redhat
The installation process requires following these steps:
- Install the repo package
- Install the KrakenD package
- Start the KrakenD service
Paste this in the terminal:
- rpm -Uvh http://repo.krakend.io/rpm/krakend-repo-0.2-0.x86_64.rpm
- yum install -y krakend
- systemctl start krakend
Fedora
Paste this in the terminal:
- rpm -Uvh http://repo.krakend.io/rpm/krakend-repo-0.2-0.x86_64.rpm
- dnf install -y krakend
- systemctl start krakend
The current KrakenD version will run at least in Centos 7 and Fedora 24
Debian and Ubuntu
The installation process requires following these steps:
- Add the key
- Add the repo to the sources.list
- Update your package list
- Install the KrakenD service
Bottom line:
- apt-key adv --keyserver keyserver.ubuntu.com --recv 5DE6FD698AD6FDD2
- echo "deb http://repo.krakend.io/apt stable main" | tee /etc/apt/sources.list.d/krakend.list
- apt-get update
- apt-get install -y krakend
The current KrakenD version will run at least in Debian 8, Debian 9 and Ubuntu 16.x
Generic (via tar.gz
)
You can also download the tar.gz
and decompress it anywhere. Instructions to check the SHA and PGP signature here.
Build KrakenD yourself
As KrakenD is open source you can opt for building the binary. The binary you will produce is the same you can get in our download page, only that compiling it yourself always feels good!


The PostgreSQL system user id must have write permission on any directory used as a target for any backup.
Regardless of the backup file format selected, each database will be backed up into a single file having the form: <name>.<extension> where <extension> will be one of 'post', 'tar', or 'sql'.
Commands specified to run before and after backup are triggered before and after each database and NOT just once before and once after the entire set.


Into the common prison, there to grind
Among the slaves and asses, thy comrades,
As good for nothing else, no better service
With those thy boisterous locks; no worthy match
For valour to assail, nor by the sword
Of noble warrior, so to stain his honour,
But by the barber’s razor best subdued.
Sams. All these indignities, for such they are
From thine, these evils I deserve and more,
Acknowledge them from God inflicted on me
Justly, yet despair not of his final pardon,
Whose ear is ever open, and his eye
Gracious to re-admit the suppliant;
In confidence whereof I once again
Defy thee to the trial of mortal fight,
By combat to decide whose god is God,
Thine, or whom I with Israel’s sons adore.
Har. Fair honour that thou dost thy God, in trusting
He will accept thee to defend his cause,
A murtherer, a revolter, and a robber!
Sams. Tongue-doughty giant, how dost thou prove me these?
Har. Is not thy nation subject to our Lords?
Their magistrates confessed it when they took thee
As a league-breaker, and delivered bound
Into our hands; for hadst thou not committed
Notorious murder on those thirty men
At Ascalon, who never did thee harm,
Then, like a robber, stripp’dst them of their robes?
The Philistines, when thou hadst broke the league,
Went up with armed powers thee only seeking,
To others did no violence nor spoil.
Sams. Among the daughters of the Philistines
I chose a wife, which argued me no foe,
And in your city held my nuptial feast;
But your ill-meaning politician lords,
Under pretence of bridal friends and guests,
Appointed to await me thirty spies,
Who, threatening cruel death, constrained the bride
To wring from me, and tell to them, my secret,
That solved the riddle which I had proposed.
When I perceived all set on enmity,
As on my enemies, wherever chanced,
I used hostility, and took their spoil,
To pay my underminers in their coin.
My nation was subjected to your lords!
It was the force of conquest; force with force
Is well ejected when the conquered can.
But I, a private person, whom my country
As a league-breaker gave up bound, presumed
Single rebellion, and did hostile acts!
I was no private, but a person raised,
With strength sufficient, and command from Heaven,
To free my country. If their servile minds
Me, their Deliverer sent, would not receive,
But to their masters gave me up for nought,
The unworthier they; whence to this day they serve.
I was to do my part from Heaven assigned,
And had performed it if my known offence
Had not disabled me, not all your force.
These shifts refuted, answer thy appellant,
Though by his blindness maimed for high attempts,
Who now defies thee thrice to single fight,
As a petty enterprise of small enforce.
Har. With thee, a man condemned, a slave enrolled,
Due by the law to capital punishment?
To fight with thee no man of arms will deign.
Sams. Cam’st thou for this, vain boaster, to survey me,
To descant on my strength, and give thy verdict?
Come nearer; part not hence so slight informed;
But take good heed my hand survey not thee.
Har. O Baal-zebub! can my ears unused
Hear these dishonours, and not render death?
Sams. No man withholds thee; nothing from thy hand
Fear I incurable; bring up thy van;
My heels are fettered, but my fist is free.
Har. This insolence other kind of answer fits.
Sams. Go, baffled coward, lest I run upon thee,
Though in these chains, bulk without spirit vast,
And with one buffet lay thy structure low,
Or swing thee in the air, then dash thee down,
To the hazard of thy brains and shattered sides.
Har. By Astaroth, ere long thou shalt lament
These braveries, in irons loaden on thee.
Chor. His Giantship is gone somewhat crest-fallen,
Stalking with less unconscionable strides,
And lower looks, but in a sultry chafe.
Sams. I dread him not, nor all his giant brood,
Though fame divulge him father of five sons,
All of gigantic size, Goliah chief.
Chor. He will directly to the lords, I fear,
And with malicious counsel stir them up
Some way or other yet further to afflict thee.
Sams. He must allege some cause, and offered fight
Will not dare mention, lest a question rise
Whether he durst accept the offer or not;
And that he durst not plain enough appeared.
Much more affliction than already felt
They cannot well impose, nor I sustain,
If they intend advantage of my labours,
The work of many hands, which earns my keeping,
With no small profit daily to my owners.
But come what will; my deadliest foe will prove
My speediest friend, by death to rid me hence;
The worst that he can give to me the best.
Yet so it may fall out, because their end
Is hate, not help to me, it may with mine
Draw their own ruin who attempt the deed.
Chor. O, how comely it is, and how reviving
To the spirits of just men long oppressed,
When God into the hands of their deliverer
Puts invincible might,
To quell the mighty of the earth, the oppressor,
The brute and boisterous force of violent men,
Hardy and industrious to support
Tyrannic power, but raging to pursue
The righteous, and all such as honour truth!
He all their ammunition
And feats of war defeats,
With plain heroic magnitude of mind
And celestial vigour armed;
Their armouries and magazins contemns,
Renders them useless, while
With wingèd expedition
Swift as the lightning glance he executes
His errand on the wicked, who, surprised,
Lose their defence, distracted and amazed.
But patience is more oft the exercise
Of saints, the trial of their fortitude,
Making them each his own deliverer,
And victor over all
That tyranny or fortune can inflict.
Either of these is in thy lot,
Samson, with might endued
Above the sons of men; but sight bereaved
May chance to number thee with those
Whom Patience finally must crown.
This Idol’s day hath been to thee no day of rest,
Labouring thy mind
More than the working day thy hands.
And yet, perhaps, more trouble is behind;
For I descry this way
Some other tending; in his hand
A sceptre or quaint staff he bears,
Comes on amain, speed in his look.
By his habit I discern him now
A public officer, and now at hand.
His message will be short and voluble.
Off. Ebrews, the prisoner Samson here I seek.
Chor. His manacles remark him; there he sits.
Off. Samson, to thee our Lords thus bid me say:
This day to Dagon is a solemn feast,
With sacrifices, triumph, pomp, and games;
Thy strength they know surpassing human rate,
And now some public proof thereof require
To honour this great feast, and great assembly.
Rise, therefore, with all speed, and come along,
Where I will see thee heartened and fresh clad,
To appear as fits before the illustrious Lords.
Sams. Thou know’st I am an Ebrew; therefore tell
Our law forbids at their religious rites
My presence; for that cause I cannot come.
Off. This answer, be assured, will not content them.
Sams. Have they not sword-players, and every sort
Of gymnic artists, wrestlers, riders, runners,
Jugglers and dancers, antics, mummers, mimics,
But they must pick me out, with shackles tired,
And over-laboured at their public mill,
To make them sport with blind activity?
Do they not seek occasion of new quarrels,
On my refusal, to distress me more,
Or make a game of my calamities?
Return the way thou cam’st; I will not come.
Off. Regard thyself; this will offend them highly.
Sams. Myself! my conscience, and internal peace.
Can they think me so broken, so debased
With corporal servitude, that my mind ever
Will condescend to such absurd commands?
Although their drudge, to be their fool or jester,
And, in my midst of sorrow and heart-grief,
To shew them feats, and play before their god—
The worst of all indignities, yet on me
Joined with extreme contempt! I will not come.
Off. My message was imposed on me with speed,
Brooks no delay: is this thy resolution?
Sams. So take it with what speed thy message needs.
Off. I am sorry what this stoutness will produce.
Sams. Perhaps thou shalt have cause to sorrow indeed.
Chor. Consider, Samson; matters now are strained
Up to the highth, whether to hold or break.
He’s gone and who knows how he may report
Thy words by adding fuel to the flame?
Expect another message, more imperious,
More lordly thundering than thou well wilt bear.
Sams. Shall I abuse this consecrated gift
Of strength, again returning with my hair
After my great transgression—so requite
Favour renewed, and add a greater sin
By prostituting holy things to idols,
A Nazarite, in place abominable,
Vaunting my strength in honour to their Dagon?
Besides how vile, contemptible, ridiculous,
What act more execrably unclean, profane?
Chor. Yet with this strength thou serv’st the Philistines,
Idolatrous, uncircumcised, unclean.
Sams. Not in their idol-worship, but by labour
Honest and lawful to deserve my food
Of those who have me in their civil power.
Chor. Where the heart joins not, outward acts defile not.
Sams. Where outward force constrains, the sentence holds:
But who constrains me to the temple of Dagon,
Not dragging? The Philistian Lords command:
Commands are no constraints. If I obey them,
I do it freely, venturing to displease
God for the fear of Man, and Man prefer,
Set God behind; which, in his jealousy,
Shall never, unrepented, find forgiveness.
Yet that he may dispense with me, or thee,
Present in temples at idolatrous rites
For some important cause, thou need’st not doubt.
Chor. How thou wilt here come off surmounts my reach.
Sams. Be of good courage; I begin to feel
Some rousing motions in me, which dispose
To something extraordinary in my thoughts.
I with this messenger will go along—
Nothing to do, be sure, that may dishonour
Our Law, or stain my vow of Nazarite.
If there be aught of presage in the mind,
This day will be remarkable in my life
By some great act, or of my days the last.
Chor. In time thou hast resolved: the man returns.
Off. Samson, this second message from our Lords
To thee I am bid say: Art thou our slave,
Our captive, at the public mill our drudge,
And dar’st thou, at our sending and command,
Dispute thy coming? Come without delay;
Or we shall find such engines to assail
And hamper thee, as thou shalt come of force,
Though thou wert firmlier fastened than a rock.
Sams. I could be well content to try their art,
Which to no few of them would prove pernicious;
Yet, knowing their advantages too many,
Because they shall not trail me through their streets
Like a wild beast, I am content to go.
Masters’ commands come with a power resistless
To such as owe them absolute subjection;
And for a life who will not change his purpose?
(So mutable are all the ways of men!)
Yet this be sure, in nothing to comply
Scandalous or forbidden in our Law.
Off. I praise thy resolution. Doff these links:
By this compliance thou wilt win the Lords
To favour, and perhaps to set thee free.
Sams. Brethren, farewell. Your company along
I will not wish, lest it perhaps offend them
To see me girt with friends; and h w the sight
Of me, as of a common enemy,
So dreaded once, may now exasperate them
I know not. Lords are lordliest in their wine;
And the well-feasted priest then soonest fired
With zeal, if aught religion seem concerned;
No less the people, on their holy days,
Impetuous, insolent, unquenchable.
Happen what may, of me expect to hear
Nothing dishonourable, impure, unworthy
Our God, our Law, my nation, or myself;
The last of me or no I cannot warrant.
Chor. Go, and the Holy One
Of Israel be thy guide
To what may serve his glory best, and spread his name
Great among the Heathen round;
Send thee the Angel of thy birth, to stand
Fast by thy side, who from thy father’s field
Rode up in flames after his message told
Of thy conception, and be now a shield
Of fire; that Spirit that first rushed on thee
In the camp of Dan,
Be efficacious in thee now at need!
For never was from Heaven imparted
Measure of strength so great to mortal seed,
As in thy wondrous actions hath been seen.
But wherefore comes old Manoa in such haste
With youthful steps? Much livelier than erewhile
He seems: supposing here to find his son,
Or of him bringing to us some glad news?
Man. Peace with you, brethren! My inducement hither
Was not at present here to find my son,
By order of the Lords new parted hence
To come and play before them at their feast.
I heard all as I came; the city rings,
And numbers thither flock: I had no will,
Lest I should see him forced to things unseemly.
But that which moved my coming now was chiefly
To give ye part with me what hope I have
With good success to work his liberty.
Chor. That hope would much rejoice us to partake
With thee. Say, reverend sire; we thirst to hear.
Man. I have attempted, one by one, the Lords,
Either at home, or through the high street passing,
With supplication prone and father’s tears,
To accept of ransom for my son, their prisoner.
Some much averse I found, and wondrous harsh,
Contemptuous, proud, set on revenge and spite;
That part most reverenced Dagon and his priests:
Others more moderate seeming, but their aim
Private reward, for which both God and State
They easily would set to sale: a third
More generous far and civil, who confessed
They had enough revenged, having reduced
Their foe to misery beneath their fears;
The rest was magnanimity to remit,
If some convenient ranson were proposed.
What noise or shout was that? It tore the sky.
Chor. Doubtless the people shouting to behold
Their once great dread, captive and blind before them,
Or at some proof of strength before them shown.
Man. His ransom, if my whole inheritance
May compass it, shall willingly be paid
And numbered down. Much rather I shall choose
To live the poorest in my tribe, than richest
And he in that calamitous prison left.
No, I am fixed not to part hence without him.
For his redemption all my patrimony,
If need be, I am ready to forgo
And quit. Not wanting him, I shall want nothing.
Chor. Fathers are wont to lay up for their sons;
Thou for thy son art bent to lay out all:
Sons wont to nurse their parents in old age;
Thou in old age car’st how to nurse thy son,
Made older than thy age through eye-sight lost.
Man. It shall be my delight to tend his eyes,
And view him sitting in his house, ennobled
With all those high exploits by him achieved,
And on his shoulders waving down those locks
That of a nation armed the strength contained.
And I persuade me God hath not permitted
His strength again to grow up with his hair
Garrisoned round about him like a camp
Of faithful soldiery, were not his purpose
To use him further yet in some great service—
Not to sit idle with so great a gift
Useless, and thence ridiculous, about him.
And, since his strength with eye-sight was not lost,
God will restore him eye-sight to his strength.
Chor. Thy hopes are not ill founded, nor seem vain,
Of his delivery, and thy joy thereon
Conceived, agreeable to a father’s love;
In both which we, as next, participate.
Man. I know your friendly minds, and .. O, what noise!
Mercy of Heaven! what hideous noise was that?
Horribly loud, unlike the former shout.
Chor. Noise call you it, or universal groan,
As if the whole inhabitation perished?
Blood, death, and deathful deeds, are in that noise,
Ruin, destruction at the utmost point.
Man. Of ruin indeed methought I heard the noise.
Oh! it continues; they have slain my son.
Chor. Thy son is rather slaying them: that outcry
From slaughter of one foe could not ascend.
Man. Some dismal accident it needs must be.
What shall we do—stay here, or run and see?
Chor. Best keep together here, lest, running thither,
We unawares, run into danger’s mouth.
This evil on the Philistines is fallen:
From whom could else a general cry be heard?
The sufferers, then, will scarce molest us here;
From other hands we need not much to fear.
What if, his eye-sight (for to Israel’s God
Nothing is hard) by miracle restored,
He now be dealing dole among his foes,
And over heaps of slaughtered walk his way?
Man. That were a joy presumptuous to be thought.
Chor. Yet God hath wrought things as incredible
For his people of old; what hinders now?
Man. He can, I know, but doubt to think he will;
Yet hope would fain subscribe, and tempts belief.

Chor. Of good or bad so great, of bad the sooner;
For evil news rides post, while good news baits.
And to our wish I see one hither speeding—
An Ebrew, as I guess, and of our tribe.
Messenger. O, whither shall I run, or which way fly
The sight of this so horrid spectacle,
Which erst my eyes beheld, and yet behold?
For dire imagination still, pursues me.
But providence or instinct of nature seems,
Or reason, though disturbed and scarce consulted,
To have guided me aright, I know not how,
To thee first, reverend Manoa, and to these
My countrymen, whom here I knew remaining,
As at some distance from the place of horror,
So in the sad event too much concerned.
Man. The accident was loud, and here before thee
With rueful cry; yet what it was we hear not.
No preface needs; thou seest we long to know.
Mess. It would burst forth; but I recover breath,
And sense distract, to know well what I utter.
Man. Tell us the sum; the circumstance defer.
Mess. Gaza yet stands; but all her sons are fallen,
All in a moment overwhelmed and fallen.
Man. Sad! but thou know’st to Israelites not saddest
The desolation of a hostile city.
Mess. Feed on that first; there may in grief be surfeit.
Man. Relate to whom.
Mess. By Samson.
Man. That still lessens
The sorrow, and converts it nigh to joy.
Mess. Ah!  Then take the worst in brief: Samson is dead.
Man. The worst indeed! O, all my hope’s defeated
To free him hence! but Death, who sets all free,
Hath paid his ransom now and full discharge.
What windy joy this day had I conceived,
Hopeful of his delivery, which now proves
Abortive as the first-born bloom of spring
Nipt with the lagging rear of winter’s frost!

All by him fell, thou say’st; by whom fell he?
What glorious hand gave Samson his death’s wound?
Mess. Unwounded of his enemies he fell.
Man. Wearied with slaughter, then, or how? explain.
Mess. By his own hands.
Man. Self-violence! What cause
Brought him so soon at variance with himself
Among his foes?
Mess. Inevitable cause—
At once both to destroy and be destroyed.
The edifice, where all were met to see him,
Upon their heads and on his own he pulled.
Man. O lastly over-strong against thyself!
A dreadful way thou took’st to thy revenge.
More than enough we know; but, while things yet
Are in confusion, give us, if thou canst,
Eye-witness of what first or last was done,
Relation more particular and distinct.
Mess. Occasions drew me early to this city;
And, as the gates I entered with sun-rise,
The morning trumpets festival proclaimed
Through each high street. Little I had dispatched,
When all abroad was rumoured that this day
Samson should be brought forth, to shew the people
Proof of his mighty strength in feats and games.
I sorrowed at his captive state, but minded
Not to be absent at that spectacle.
The building was a spacious theatre,
Half round on two main pillars vaulted high,
With seats where all the Lords, and each degree
Of sort, might sit in order to behold;
The other side was open, where the throng
On banks and scaffolds under sky might stand:
I among these aloof obscurely stood.
The feast and noon grew high, and sacrifice
Had filled their hearts with mirth, high cheer, and wine,
When to their sports they turned. Immediately
Was Samson as a public servant brought,
In their state livery clad: before him pipes
And timbrels; on each side went armed guards;
Both horse and foot before him and behind,
Archers and slingers, cataphracts, and spears.
At sight of him the people with a shout
Rifted the air, clamouring their god with praise,
Who had made their dreadful enemy, their thrall.
He patient, but undaunted, where they led him,
Came to the place; and what was set before him,
Which without help of eye might be assayed,
To heave, pull, draw, or break, he still performed
All with incredible, stupendious force,
None daring to appear antagonist.
At length, for intermission sake, they led him
Between the pillars; he his guide requested
(For so from such as nearer stood we heard),
As over-tired, to let him lean a while
With both his arms on those two massy pillars,
That to the arched roof gave main support.
He unsuspicious led him; which when Samson
Felt in his arms, with head a while enclined,
And eyes fast fixed, he stood, as one who prayed,
Or some great matter in his mind revolved:
At last, with head erect, thus cried aloud:—
“Hitherto, Lords, what your commands imposed
I have performed, as reason was, obeying,
Not without wonder or delight beheld;
Now, of my own accord, such other trial
I mean to shew you of my strength yet greater
As with amaze shall strike all who behold.”
This uttered, straining all his nerves, he bowed;
As with the force of winds and waters pent
When mountains tremble, those two massy pillars
With horrible convulsion to and fro
He tugged, he shook, till down they came, and drew
The whole roof after them with burst of thunder
Upon the heads of all who sat beneath,
Lords, ladies, captains, counsellors, or priests,
Their choice nobility and flower, not only
Of this, but each Philistian city round,
Met from all parts to solemnize this feast.
Samson, with these immixed, inevitably
Pulled down the same destruction on himself;
The vulgar only scaped, who stood without.
Chor. O dearly bought revenge, yet glorious!
Living or dying thou has fulfilled
The work for which thou wast foretold
To Israel, and now liest victorious
Among thy slain self-killed;
Not willingly, but tangled in the fold
Of dire Necessity, whose law in death conjoined
Thee with thy slaughtered foes, in number more
Than all thy life had slain before.
Semichor.
They, only set on sport and play,
Unweetingly importuned
Their own destruction to come speedy upon them.
So fond are mortal men,
Fallen into wrath divine,
As their own ruin on themselves to invite,
Insensate left, or to sense reprobate,
And with blindness internal struck.
Semichor. But he, though blind of sight,
Despised, and thought extinguished quite,
With inward eyes illuminated,
His fiery virtue roused
From under ashes into sudden flame,
And as an evening Dragon came,
Assailant on the perched roosts
And nests in order ranged
Of tame villatic fowl, but as an Eagle
His cloudless thunder bolted on their heads.
So Virtue, given for lost,
Depressed and overthrown, as seemed,
Like that self-begotten bird
In the Arabian woods embost,
That no second knows nor third,
And lay erewhile a holocaust,
From out her ashy womb now teemed,
Revives, reflourishes, then vigorous most
When most unactive deemed;
And, though her body die, her fame survives,
A secular bird, ages of lives.
Man. Come, come; no time for lamentation now,
Nor much more cause. Samson hath quit himself
Like Samson, and heroicly hath finished
A life heroic, on his enemies
Fully revenged—hath left them years of mourning,
And lamentation to the sons of Caphtor
Through all Philistian bounds; to Israel
Honour hath left and freedom, let but them
Find courage to lay hold on this occasion;
To himself and father’s house eternal fame;
And, which is best and happiest yet, all this
With God not parted from him, as was feared,
But favouring and assisting to the end.
Nothing is here for tears, nothing to wail
Or knock the breast; no weakness, no contempt,
Dispraise, or blame; nothing but well and fair,
And what may quiet us in a death so noble.
Let us go find the body where it lies
Soaked in his enemies’ blood, and from the stream
With lavers pure, and cleansing herbs, wash off
The clotted gore. I, with what speed the while
(Gaza is not in plight to say us nay),
Will send for all my kindred, all my friends,
To fetch him hence, and solemnly attend,
With silent obsequy and funeral train,
Home to his father’s house. There will I build him
A monument, and plant it round with shade
Of laurel ever green and branching palm,
With all his trophies hung, and acts enrolled
In copious legend, or sweet lyric song.
Thither shall all the valiant youth resort,
And from his memory inflame their breasts
To matchless valour and adventures high;
The virgins also shall, on feastful days,
Visit his tomb with flowers, only bewailing
His lot unfortunate in nuptial choice,
From whence captivity and loss of eyes.
Chor. All is best, though we oft doubt
What the unsearchable dispose
Of Highest Wisdom brings about,
And ever best found in the close.
Oft He seems to hide his face,
But unexpectedly returns,
And to his faithful Champion hath in place
Bore witness gloriously; whence Gaza mourns,
And all that band them to resist
His uncontrollable intent.


Parc Montsouris is a public park in the 14th arrondissement of Paris, at the southern edge of Paris directly south of the center. Opened in 1869, Parc Montsouris is one of the four large urban public parks, along with the Bois de Boulogne, the Bois de Vincennes and the Parc des Buttes Chaumont, created by Emperor Napoleon III and his Prefect of the Seine, Baron Haussmann, at each of the cardinal points of the compass around the city, in order to provide green space and recreation for the rapidly growing population of Paris.
The park is 15.5 hectares in area, and is designed as an English landscape garden. The Park contains a lake, a cascade, wide sloping lawns, and many notable varieties of trees, shrubs and flowers. It is also home to a meteorology station, a cafe and a guignol theater. The roads of the park are extremely popular with joggers on weekends.
"I really love this parc! FioFio"The park is bounded to the south by Boulevard Jourdan and the Cité Internationale Universitaire de Paris (CIUP); to the north by Avenue Reille; to the east by Rue Gazan and Rue de la Cité Universitaire; and to the west by Rue Nansouty and Rue Émile Deutsch-de-la-Meurthe. The "Cité Universitaire" stop on the line on the RER B is located in the center of Parc Montsouris.


| Class | Description |
|---|---|
| Kernel |
A kernel function for a support
vector machine
|
| LinearKernel |
A linear support vector machine kernel
|
| PolynomialKernel |
A polynomial kernel
|
| RBFKernel |
A radial basis function kernel
|
| SequentialMinimalOptimization |
An implementation of the SMO algorithm.
|
| SigmoidKernel |
A polynomial kernel
|
| SingleClassSequentialMinimalOptimization |
An implementation of the SMO algorithm.
|
| SingleClassSupportVectorMachine |
A support vector machine implementation
|
| SupportVectorMachine |
A support vector machine implementation
|


{% load i18n %}
{% trans "About this investigation" %}
{% trans "We investigated issues with the infrastructure of the nursing homes since the beginning of 2015. We talked to hundreds of people and analyzed data from all transparency reports in Germany." %}
{% if LANGUAGE_CODE == "de" %} {% trans "You can find our full research in German here." %} {% else %}{% trans "You can find our full research in German here." %}
{% trans "You can find some of our research in English here." %}
{% endif %}


This post is the second of a two parts series of articles on Stackable Traits
- Part-1: Error reporting design with Stackable Traits
- Part-2: Gathering Metrics with Stackable Actors
Stackable traits can be applied to actors as well. Specifically, we can use stackable actor traits to modify the behavior of the ‘receive’ method.
Part-2: Gathering Metrics
We like to gather the following metrics
-
time-in-mailbox: The time from the moment a message was enqueued into an actor’s mailbox until the moment it was dequeued for processing.
-
processing-time:How long did it take for the actor to process a message.
And to log when an actor starts handling a message and before it finishes.
Stackable Actors-based implementation
Say we have the following actor that we like to monitor:
abstract class MyActor extends Actor with StrictLogging {
override def receive: Receive = {
case message => logger.info("performing some work...")
}
}
Let’s start with the ‘time-in-mailbox’ metric. The simplest way to implement it is to take the time before the message was sent and calculate the time in the mailbox when the actor starting processing it. For the sake of example, we’ll assume that a message was created just before it was sent.
The message class that should be monitored is:
trait RecordableMessage extends RichMessage {
val dispatchTime: Long =
System.currentTimeMillis()
}
trait RichMessage {
val messageName: String
}
We initialized the time before the message was sent, and gave it a name, to be used as a tag for the metric.
Next, create the stackable trait for monitoring the actor on RecordableMessage
trait LatencyRecorderActor extends Actor with StrictLogging {
val actorName: String = this.getClass.getSimpleName
abstract override def receive: Receive = {
case recordableMessage: RecordableMessage =>
Monitor.record("time-in-mailbox", actorName, recordableMessage.messageName,
recordableMessage.dispatchTime)
val start = System.currentTimeMillis()
super.receive(recordableMessage)
Monitor.record("processing-time", actorName, recordableMessage.messageName, start)
case message => super.receive(message)
}
}
You might notice that
-
As discussed in Part-1, the modifier of the ‘receive’ method should be “abstract override”
-
We gather the metrics only on the ‘RecordableMessage’ message
-
For calculating ‘time-in-mailbox’, ‘dispatchTime’ is used
-
For calculating ‘processing-time’, we take time before invoking the action, then invoking the action, and record the ‘processing-time’ when it finished.
The LoggerActor is the following
trait LoggerActor extends Actor with StrictLogging {
abstract override def receive: Receive = {
case recordableMessage: RecordableMessage =>
logger.info(s"handling message: ${recordableMessage.messageName}")
super.receive(recordableMessage)
logger.info(s"done handling message: ${recordableMessage.messageName}")
case message => super.receive(message)
}
}
Lastly, mix these traits to a concrete MyActor class
class MyMonitoredActor extends MyActor with LatencyRecorderActor with LoggerActor
Try it out
Create a concrete RecordableMessage:
case class SomeRecordableMessage() extends RecordableMessage {
override val messageName: String =
this.getClass.getSimpleName
}
And send it to a MonitoredActor instance
val actorSystem = ActorSystem("system")
val myMonitoredActor = actorSystem.actorOf(Props[MyMonitoredActor])
myMonitoredActor ! SomeRecordableMessage()
Results with the following printed to the log:
handling message: SomeTriggerMessage
time-in-mailbox latency for message SomeTriggerMessage in actor MyMonitoredActor is 102
performing some work...
processing-time latency for message SomeTriggerMessage in actor MyMonitoredActor is 212
done handling message: SomeTriggerMessage
Wrapping up
Stackable traits pattern is a good choice when you need to ‘pipe’ actions or modify and redirect data for an action. Mix and stack traits to describe the state of the class and execute the actions are clean and flexible, and generally the Scala-functional way to do it.
The complete source code can be found in my github.


Calculate Viral Coefficient
users have sent a total of
invites, of which
have converted.
My Viral Coefficient is
.
Designed by
Sartaj
. CSS inspired by
Mary Lou
.


- Filter some special debug service and move the into lower priority (Daniel Espendiller)
- Extract project directory from the file context; use directly the project to prevent "com.intellij.util.indexing.FileContentImpl$IllegalDataException: Cannot obtain text for binary file type : Unknown" on xlf files #1459 (Daniel Espendiller)


// For recording the audio
{mobile}
Modulator
gain
1.0
Carrier
Sample Level
0.0
Synth Level
1.0
Noise Level
0.22
Synth Detune
0 cents
Play
input
output
Frequency
Sonogram
3D Sonogram
Waveform
MIDI Input:
Not connected


| 枚举值 |
|---|
| BigInt | System.Int64. A 64-bit signed integer.
|
| Binary | System.Array of type System.Byte. A fixed-length stream of binary data ranging between 1 and 8,000 bytes.
|
| Bit | System.Boolean. An unsigned numeric value that can be 0, 1, or null.
|
| Char | System.String. A fixed-length stream of non-Unicode characters ranging between 1 and 8,000 characters.
|
| DateTime | System.DateTime. Date and time data ranging in value from January 1, 1753 to December 31, 9999 to an accuracy of 3.33 milliseconds.
|
| Decimal | System.Decimal. A fixed precision and scale numeric value between -10 38 -1 and 10 38 -1.
|
| Float | System.Double. A floating point number within the range of -1.79E +308 through 1.79E +308.
|
| Image | System.Array of type System.Byte. A variable-length stream of binary data ranging from 0 to 2 31 -1 (or 2,147,483,647) bytes.
|
| Int | System.Int32. A 32-bit signed integer.
|
| Money | System.Decimal. A currency value ranging from -2 63 (or -9,223,372,036,854,775,808) to 2 63 -1 (or +9,223,372,036,854,775,807) with an accuracy to a ten-thousandth of a currency unit.
|
| NChar | System.String. A fixed-length stream of Unicode characters ranging between 1 and 4,000 characters.
|
| NText | System.String. A variable-length stream of Unicode data with a maximum length of 2 30 - 1 (or 1,073,741,823) characters.
|
| NVarChar | System.String. A variable-length stream of Unicode characters ranging between 1 and 4,000 characters. Implicit conversion fails if the string is greater than 4,000 characters. Explicitly set the object when working with strings longer than 4,000 characters. Use System.Data.SqlDbType.NVarChar when the database column is nvarchar(max).
|
| Real | System.Single. A floating point number within the range of -3.40E +38 through 3.40E +38.
|
| UniqueIdentifier | System.Guid. A globally unique identifier (or GUID).
|
| SmallDateTime | System.DateTime. Date and time data ranging in value from January 1, 1900 to June 6, 2079 to an accuracy of one minute.
|
| SmallInt | System.Int16. A 16-bit signed integer.
|
| SmallMoney | System.Decimal. A currency value ranging from -214,748.3648 to +214,748.3647 with an accuracy to a ten-thousandth of a currency unit.
|
| Text | System.String. A variable-length stream of non-Unicode data with a maximum length of 2 31 -1 (or 2,147,483,647) characters.
|
| Timestamp | System.Array of type System.Byte. Automatically generated binary numbers, which are guaranteed to be unique within a database. timestamp is used typically as a mechanism for version-stamping table rows. The storage size is 8 bytes.
|
| TinyInt | System.Byte. An 8-bit unsigned integer.
|
| VarBinary | System.Array of type System.Byte. A variable-length stream of binary data ranging between 1 and 8,000 bytes. Implicit conversion fails if the byte array is greater than 8,000 bytes. Explicitly set the object when working with byte arrays larger than 8,000 bytes.
|
| VarChar | System.String. A variable-length stream of non-Unicode characters ranging between 1 and 8,000 characters. Use System.Data.SqlDbType.VarChar when the database column is varchar(max).
|
| Variant | System.Object. A special data type that can contain numeric, string, binary, or date data as well as the SQL Server values Empty and Null, which is assumed if no other type is declared.
|
| Xml | An XML value. Obtain the XML as a string using the System.Data.SqlClient.SqlDataReader.GetValue(System.Int32) method or System.Data.SqlTypes.SqlXml.Value property, or as an System.Xml.XmlReader by calling the System.Data.SqlTypes.SqlXml.CreateReader method.
|
| Udt | A SQL Server user-defined type (UDT).
|
| Structured | A special data type for specifying structured data contained in table-valued parameters.
|
| Date | Date data ranging in value from January 1,1 AD through December 31, 9999 AD.
|
| Time | Time data based on a 24-hour clock. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. Corresponds to a SQL Server time value.
|
| DateTime2 | Date and time data. Date value range is from January 1,1 AD through December 31, 9999 AD. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds.
|
| DateTimeOffset | Date and time data with time zone awareness. Date value range is from January 1,1 AD through December 31, 9999 AD. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. Time zone value range is -14:00 through +14:00.
|


Taurid Meteor Shower peaks tomorrow - how to see a shooting star on Bonfire Night
Here’s everything you need to know about the Taurid Meteor Shower, including when it is, and how you can see it
by Shivali Best, https://www.facebook.com/shivalibestjournalist/Tomorrow night, many Brits will gather to watch firework displays in honour of Bonfire Night.
And if you’re planning to see some fireworks yourself, you may also spot a stunning astronomical firework display.
The Taurid Meteor Shower will peak tomorrow night, providing you with the perfect opportunity to see a shooting star for yourself.
Here’s everything you need to know about the Taurid Meteor Shower, including when it is, and how you can see it.
When is the Taurid Meteor Shower?
The Taurid Meteor Shower runs annually from September 7 to December 10.
However, this year it will peak on the night of November 5, which also happens to be Bonfire Night here in the UK!
What’s the best time to see a meteor?
At the peak, the Taurids should produce around 5-10 meteors per hour, so you’ll have to be eagle-eyed to spot one.
That night there’s also a First Quarter Moon - a primary moon phase when we can see exactly half of the moon’s surface illuminated.
This will end shortly after midnight, so for the best chance of seeing a meteor, look to the skies in the early hours of Wednesday morning - a dark sky will make any meteors stand out a lot more.
NASA explained: “Taurid meteors can be seen any time the constellation Taurus is above the horizon during the months of September, October, and November.
“The best time to look for Taurids is after midnight, when Taurus is high in the sky, and when the sky is dark and clear, with no moonlight to mask the fainter meteors.”
What is the Taurid Meteor Shower?
The meteor shower is actually made up of meteors from two separate streams.
The first, called the Northern Taurids, is produced by dust grains left behind by asteroid 2004 TG10, which glow brightly as they enter the Earth’s atmosphere.
Meanwhile, the second stream, called the Southern Taurus, is produced by debris left behind by Comet 2P Encke.
When is the next meteor shower?
If you miss the Taurid Meteor Shower, thankfully there’s not too long to wait until the next one.
The Leonids Meteor Shower will peak on November 17, when it will produce up to 15 meteors per hour.


Genesis 26:26
Then Abimelech went to him from Gerar, and Ahuzzath one of his friends, and Phichol the chief captain of his army.


Test: jQuery.path animation
ten arcs
Start
Plot
ten beziers
Start
Plot
custom path: sine wave
Start
Plot
links
Javascript file
Project Page
Feedback


# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 625 def primary_key(table) pk_and_sequence = pk_and_sequence_for(table) pk_and_sequence && pk_and_sequence.first end
class ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter
Constants
- INDEX_TYPES
- INDEX_USINGS
- LOST_CONNECTION_ERROR_MESSAGES
- NATIVE_DATABASE_TYPES
- QUOTED_FALSE
Public Class Methods
By default, the MysqlAdapter will consider
all columns of type tinyint(1)
as boolean. If you wish to
disable this emulation (which was the default behavior in versions 0.13.1
and earlier) you can add the following line to your application.rb file:
ActiveRecord::ConnectionAdapters::Mysql[2]Adapter.emulate_booleans = false
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 139 class_attribute :emulate_booleans
FIXME: Make the first parameter more similar for the two adapters
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 168 def initialize(connection, logger, connection_options, config) super(connection, logger) @connection_options, @config = connection_options, config @quoted_column_names, @quoted_table_names = {}, {} @visitor = Arel::Visitors::MySQL.new self if self.class.type_cast_config_to_boolean(config.fetch(:prepared_statements) { true }) @prepared_statements = true else @prepared_statements = false end end
Public Instance Methods
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 320 def begin_db_transaction execute "BEGIN" end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 324 def begin_isolated_db_transaction(isolation) execute "SET TRANSACTION ISOLATION LEVEL #{transaction_isolation_levels.fetch(isolation)}" begin_db_transaction end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 643 def case_insensitive_comparison(table, attribute, column, value) if column.case_sensitive? super else table[attribute].eq(value) end end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 635 def case_sensitive_comparison(table, attribute, column, value) if column.case_sensitive? table[attribute].eq(value) else super end end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 630 def case_sensitive_modifier(node, table_attribute) node = Arel::Nodes.build_quoted node, table_attribute Arel::Nodes::Bin.new(node) end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 514 def change_column_null(table_name, column_name, null, default = nil) column = column_for(table_name, column_name) unless null || default.nil? execute("UPDATE #{quote_table_name(table_name)} SET #{quote_column_name(column_name)}=#{quote(default)} WHERE #{quote_column_name(column_name)} IS NULL") end change_column table_name, column_name, column.sql_type, :null => null end
Returns the database character set.
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 392 def charset show_variable 'character_set_database' end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 298 def clear_cache! super reload_type_map end
Returns the database collation strategy.
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 397 def collation show_variable 'collation_database' end
Create a new MySQL database with optional :charset
and
:collation
. Charset defaults to utf8.
Example:
create_database 'charset_test', charset: 'latin1', collation: 'latin1_bin' create_database 'matt_development' create_database 'matt_development', charset: :big5
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 371 def create_database(name, options = {}) if options[:collation] execute "CREATE DATABASE `#{name}` DEFAULT CHARACTER SET `#{options[:charset] || 'utf8'}` COLLATE `#{options[:collation]}`" else execute "CREATE DATABASE `#{name}` DEFAULT CHARACTER SET `#{options[:charset] || 'utf8'}`" end end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 387 def current_database select_value 'SELECT DATABASE() as db' end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 495 def drop_table(table_name, options = {}) execute "DROP#{' TEMPORARY' if options[:temporary]} TABLE #{quote_table_name(table_name)}#{' CASCADE' if options[:force] == :cascade}" end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 349 def empty_insert_statement_value "VALUES ()" end
Executes the SQL statement in the context of this connection.
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 304 def execute(sql, name = nil) log(sql, name) { @connection.query(sql) } end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 538 def foreign_keys(table_name) fk_info = select_all " SELECT fk.referenced_table_name as 'to_table' ,fk.referenced_column_name as 'primary_key' ,fk.column_name as 'column' ,fk.constraint_name as 'name' FROM information_schema.key_column_usage fk WHERE fk.referenced_column_name is not null AND fk.table_schema = '#{@config[:database]}' AND fk.table_name = '#{table_name}' ".strip_heredoc create_table_info = select_one("SHOW CREATE TABLE #{quote_table_name(table_name)}")["Create Table"] fk_info.map do |row| options = { column: row['column'], name: row['name'], primary_key: row['primary_key'] } options[:on_update] = extract_foreign_key_action(create_table_info, row['name'], "UPDATE") options[:on_delete] = extract_foreign_key_action(create_table_info, row['name'], "DELETE") ForeignKeyDefinition.new(table_name, row['to_table'], options) end end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 225 def index_algorithms { default: 'ALGORITHM = DEFAULT', copy: 'ALGORITHM = COPY', inplace: 'ALGORITHM = INPLACE' } end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 221 def native_database_types NATIVE_DATABASE_TYPES end
Returns a table's primary key and belonging sequence.
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 612 def pk_and_sequence_for(table) execute_and_free("SHOW CREATE TABLE #{quote_table_name(table)}", 'SCHEMA') do |result| create_table = each_hash(result).first[:"Create Table"] if create_table.to_s =~ /PRIMARY KEY\s+(?:USING\s+\w+\s+)?\((.+)\)/ keys = $1.split(",").map { |key| key.delete('`"') } keys.length == 1 ? [keys.first, nil] : nil else nil end end end
Returns just a table's primary key
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 273 def quoted_false QUOTED_FALSE end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 265 def quoted_true QUOTED_TRUE end
Drops the database specified on the name
attribute and creates
it again using the provided options
.
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 357 def recreate_database(name, options = {}) drop_database(name) sql = create_database(name, options) reconnect! sql end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 499 def rename_index(table_name, old_name, new_name) if supports_rename_index? validate_index_length!(table_name, new_name) execute "ALTER TABLE #{quote_table_name(table_name)} RENAME INDEX #{quote_table_name(old_name)} TO #{quote_table_name(new_name)}" else super end end
Renames a table.
Example:
rename_table('octopuses', 'octopi')
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 490 def rename_table(table_name, new_name) execute "RENAME TABLE #{quote_table_name(table_name)} TO #{quote_table_name(new_name)}" rename_table_indexes(table_name, new_name) end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 57 def schema_creation SchemaCreation.new self end
SHOW VARIABLES LIKE 'name'
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 606 def show_variable(name) variables = select_all("SHOW VARIABLES LIKE '#{name}'", 'SCHEMA') variables.first['Value'] unless variables.empty? end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 651 def strict_mode? self.class.type_cast_config_to_boolean(@config.fetch(:strict, true)) end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 213 def supports_foreign_keys? true end
Technically MySQL allows to create indexes with the sort order syntax but at the moment (5.5) it doesn't yet implement them
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 197 def supports_index_sort_order? true end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 209 def supports_indexes_in_create? true end
Returns true, since this connection adapter supports migrations.
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 183 def supports_migrations? true end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 187 def supports_primary_key? true end
MySQL 4 technically support transaction isolation, but it is affected by a bug where the transaction level gets persisted for the whole session:
bugs.mysql.com/bug.php?id=39170
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 205 def supports_transaction_isolation? version[0] >= 5 end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 217 def supports_views? version[0] >= 5 end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 415 def table_exists?(name) return false unless name.present? return true if tables(nil, nil, name).any? name = name.to_s schema, table = name.split('.', 2) unless table # A table was provided without a schema table = schema schema = nil end tables(nil, schema, table).any? end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 411 def truncate(table_name, name = nil) execute "TRUNCATE TABLE #{quote_table_name(table_name)}", name end
Maps logical Rails types to MySQL-specific data types.
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 567 def type_to_sql(type, limit = nil, precision = nil, scale = nil) case type.to_s when 'binary' case limit when 0..0xfff; "varbinary(#{limit})" when nil; "blob" when 0x1000..0xffffffff; "blob(#{limit})" else raise(ActiveRecordError, "No binary type has character length #{limit}") end when 'integer' case limit when 1; 'tinyint' when 2; 'smallint' when 3; 'mediumint' when nil, 4, 11; 'int(11)' # compatibility with MySQL default when 5..8; 'bigint' else raise(ActiveRecordError, "No integer type has byte size #{limit}") end when 'text' case limit when 0..0xff; 'tinytext' when nil, 0x100..0xffff; 'text' when 0x10000..0xffffff; 'mediumtext' when 0x1000000..0xffffffff; 'longtext' else raise(ActiveRecordError, "No text type has character length #{limit}") end when 'datetime' return super unless precision case precision when 0..6; "datetime(#{precision})" else raise(ActiveRecordError, "No datetime type has precision of #{precision}. The allowed range of precision is from 0 to 6.") end else super end end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 277 def unquoted_false 0 end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 269 def unquoted_true 1 end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 655 def valid_type?(type) !native_database_types[type].nil? end
Protected Instance Methods
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 757 def add_column_sql(table_name, column_name, type, options = {}) td = create_table_definition table_name, options[:temporary], options[:options] cd = td.new_column_definition(column_name, type, options) schema_creation.visit_AddColumn cd end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 721 def add_index_length(option_strings, column_names, options = {}) if options.is_a?(Hash) && length = options[:length] case length when Hash column_names.each {|name| option_strings[name] += "(#{length[name]})" if length.has_key?(name) && length[name].present?} when Fixnum column_names.each {|name| option_strings[name] += "(#{length})"} end end return option_strings end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 799 def add_index_sql(table_name, column_name, options = {}) index_name, index_type, index_columns = add_index_options(table_name, column_name, options) "ADD #{index_type} INDEX #{index_name} (#{index_columns})" end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 809 def add_timestamps_sql(table_name, options = {}) [add_column_sql(table_name, :created_at, :datetime, options), add_column_sql(table_name, :updated_at, :datetime, options)] end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 763 def change_column_sql(table_name, column_name, type, options = {}) column = column_for(table_name, column_name) unless options_include_default?(options) options[:default] = column.default end unless options.has_key?(:null) options[:null] = column.null end options[:name] = column.name schema_creation.accept ChangeColumnDefinition.new column, type, options end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 734 def quoted_columns_for_index(column_names, options = {}) option_strings = Hash[column_names.map {|name| [name, '']}] # add index length option_strings = add_index_length(option_strings, column_names, options) # add index sort order option_strings = add_index_sort_order(option_strings, column_names, options) column_names.map {|name| quote_column_name(name) + option_strings[name]} end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 791 def remove_column_sql(table_name, column_name, type = nil, options = {}) "DROP #{quote_column_name(column_name)}" end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 795 def remove_columns_sql(table_name, *column_names) column_names.map {|column_name| remove_column_sql(table_name, column_name) } end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 804 def remove_index_sql(table_name, options = {}) index_name = index_name_for_remove(table_name, options) "DROP INDEX #{index_name}" end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 813 def remove_timestamps_sql(table_name, options = {}) [remove_column_sql(table_name, :updated_at), remove_column_sql(table_name, :created_at)] end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 778 def rename_column_sql(table_name, column_name, new_column_name) column = column_for(table_name, column_name) options = { name: new_column_name, default: column.default, null: column.null, auto_increment: column.extra == "auto_increment" } current_type = select_one("SHOW COLUMNS FROM #{quote_table_name(table_name)} LIKE '#{column_name}'", 'SCHEMA')["Type"] schema_creation.accept ChangeColumnDefinition.new column, current_type, options end
MySQL is too stupid to create a temporary table for use subquery, so we have to give it some prompting in the form of a subsubquery. Ugh!
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 712 def subquery_for(key, select) subsubselect = select.clone subsubselect.projections = [key] subselect = Arel::SelectManager.new(select.engine) subselect.project Arel.sql(key.name) subselect.from subsubselect.as('__active_record_temp') end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 746 def translate_exception(exception, message) case error_number(exception) when 1062 RecordNotUnique.new(message, exception) when 1452 InvalidForeignKey.new(message, exception) else super end end
Private Instance Methods
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 831 def configure_connection variables = @config.fetch(:variables, {}).stringify_keys # By default, MySQL 'where id is null' selects the last inserted id. # Turn this off. http://dev.rubyonrails.org/ticket/6778 variables['sql_auto_is_null'] = 0 # Increase timeout so the server doesn't disconnect us. wait_timeout = @config[:wait_timeout] wait_timeout = 2147483 unless wait_timeout.is_a?(Fixnum) variables['wait_timeout'] = self.class.type_cast_config_to_integer(wait_timeout) # Make MySQL reject illegal values rather than truncating or blanking them, see # http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html#sqlmode_strict_all_tables # If the user has provided another value for sql_mode, don't replace it. unless variables.has_key?('sql_mode') variables['sql_mode'] = strict_mode? ? 'STRICT_ALL_TABLES' : '' end # NAMES does not have an equals sign, see # http://dev.mysql.com/doc/refman/5.0/en/set-statement.html#id944430 # (trailing comma because variable_assignments will always have content) if @config[:encoding] encoding = "NAMES #{@config[:encoding]}" encoding << " COLLATE #{@config[:collation]}" if @config[:collation] encoding << ", " end # Gather up all of the SET variables... variable_assignments = variables.map do |k, v| if v == ':default' || v == :default "@@SESSION.#{k} = DEFAULT" # Sets the value to the global or compile default elsif !v.nil? "@@SESSION.#{k} = #{quote(v)}" end # or else nil; compact to clear nils out end.compact.join(', ') # ...and send them all in one query @connection.query "SET #{encoding} #{variable_assignments}" end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 823 def mariadb? full_version =~ /mariadb/i end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 827 def supports_rename_index? mariadb? ? false : (version[0] == 5 && version[1] >= 7) || version[0] >= 6 end
# File lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 819 def version @version ||= full_version.scan(/^(\d+)\.(\d+)\.(\d+)/).flatten.map { |v| v.to_i } end


HDFS-5274 added support for tracing requests through HDFS, using the open source tracing library, Apache HTrace. Setting up tracing is quite simple, however it requires some very minor changes to your client code.
Configure the samplers in core-site.xml property: dfs.htrace.sampler. The value can be NeverSampler, AlwaysSampler or ProbabilitySampler. NeverSampler: HTrace is OFF for all spans; AlwaysSampler: HTrace is ON for all spans; ProbabilitySampler: HTrace is ON for some percentage% of top-level spans.
<property> <name>dfs.htrace.sampler</name> <value>NeverSampler</value> </property>
The tracing system works by collecting information in structs called ‘Spans’. It is up to you to choose how you want to receive this information by implementing the SpanReceiver interface, which defines one method:
public void receiveSpan(Span span);
Configure what SpanReceivers you’d like to use by putting a comma separated list of the fully-qualified class name of classes implementing SpanReceiver in core-site.xml property: hadoop.htrace.spanreceiver.classes.
<property> <name>dfs.htrace.spanreceiver.classes</name> <value>org.apache.htrace.impl.LocalFileSpanReceiver</value> </property> <property> <name>dfs.htrace.local-file-span-receiver.path</name> <value>/var/log/hadoop/htrace.out</value> </property>
You can omit package name prefix if you use span receiver bundled with HTrace.
<property> <name>dfs.htrace.spanreceiver.classes</name> <value>LocalFileSpanReceiver</value> </property>
Instead of implementing SpanReceiver by yourself, you can use ZipkinSpanReceiver which uses Zipkin for collecting and displaying tracing data.
In order to use ZipkinSpanReceiver, you need to download and setup Zipkin first. With docker you can start an experimental zipkin server with the following command.
docker run -d -p 9411:9411 -p 9410:9410 openzipkin/zipkin
you also need to add the jar of htrace-zipkin to the classpath of Hadoop on each node. The easiest way to achieve this is downloading the binary jars from maven central add put it to the hadoop lib directory.
$ wget http://repo1.maven.org/maven2/org/apache/thrift/libthrift/0.9.0/libthrift-0.9.0.jar -O $HADOOP_HOME/share/hadoop/common/lib/libthrift-0.9.0.jar $ wget http://repo1.maven.org/maven2/org/apache/htrace/htrace-zipkin/3.1.0-incubating/htrace-zipkin-3.1.0-incubating.jar -O $HADOOP_HOME/share/hadoop/common/lib/htrace-zipkin-3.1.0-incubating.jar
The sample configuration for ZipkinSpanReceiver is shown below. By adding these to core-site.xml of NameNode and DataNodes, ZipkinSpanReceiver is initialized on the startup. You also need this configuration on the client node in addition to the servers.
<property> <name>dfs.htrace.spanreceiver.classes</name> <value>ZipkinSpanReceiver</value> </property> <property> <name>dfs.htrace.zipkin.collector-hostname</name> <value><IP_ADDRESS></value> </property> <property> <name>dfs.htrace.zipkin.collector-port</name> <value>9410</value> </property>
You can use hadoop trace command to see and update the tracing configuration of each servers. You must specify IPC server address of namenode or datanode by -host option. You need to run the command against all servers if you want to update the configuration of all servers.
hadoop trace -list shows list of loaded span receivers associated with the id.
$ hadoop trace -list -host <IP_ADDRESS>:9000 ID CLASS 1 org.apache.htrace.impl.LocalFileSpanReceiver $ hadoop trace -list -host <IP_ADDRESS>:50020 ID CLASS 1 org.apache.htrace.impl.LocalFileSpanReceiver
hadoop trace -remove removes span receiver from server. -remove options takes id of span receiver as argument.
$ hadoop trace -remove 1 -host <IP_ADDRESS>:9000 Removed trace span receiver 1
hadoop trace -add adds span receiver to server. You need to specify the class name of span receiver as argument of -class option. You can specify the configuration associated with span receiver by -Ckey=value options.
$ hadoop trace -add -class LocalFileSpanReceiver -Clocal-file-span-receiver.path=/tmp/htrace.out -host <IP_ADDRESS>:9000 Added trace span receiver 2 with configuration local-file-span-receiver.path = /tmp/htrace.out $ hadoop trace -list -host <IP_ADDRESS>:9000 ID CLASS 2 org.apache.htrace.impl.LocalFileSpanReceiver
In order to trace, you will need to wrap the traced logic with tracing span as shown below. When there is running tracing spans, the tracing information is propagated to servers along with RPC requests.
In addition, you need to initialize SpanReceiver once per process.
import org.apache.hadoop.hdfs.HdfsConfiguration; import org.apache.hadoop.tracing.SpanReceiverHost; import org.apache.htrace.Sampler; import org.apache.htrace.Trace; import org.apache.htrace.TraceScope; ... SpanReceiverHost.get(new HdfsConfiguration(), "dfs"); ... TraceScope ts = Trace.startSpan("Gets", Sampler.ALWAYS); try { ... // traced logic } finally { if (ts != null) ts.close(); }
The TracingFsShell.java shown below is the wrapper of FsShell which start tracing span before invoking HDFS shell command.
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FsShell; import org.apache.hadoop.tracing.SpanReceiverHost; import org.apache.hadoop.util.ToolRunner; import org.apache.htrace.Sampler; import org.apache.htrace.Trace; import org.apache.htrace.TraceScope; public class TracingFsShell { public static void main(String argv[]) throws Exception { Configuration conf = new Configuration(); FsShell shell = new FsShell(); conf.setQuietMode(false); shell.setConf(conf); SpanReceiverHost.get(conf, "dfs"); int res = 0; TraceScope ts = null; try { ts = Trace.startSpan("FsShell", Sampler.ALWAYS); res = ToolRunner.run(shell, argv); } finally { shell.close(); if (ts != null) ts.close(); } System.exit(res); } }
You can compile and execute this code as shown below.
$ javac -cp `hadoop classpath` TracingFsShell.java $ java -cp .:`hadoop classpath` TracingFsShell -ls /
The configuration prefix for the client-side htrace configuration is defined in the SpanReceiverHost.get call. In the case above you should use the dfs prefix as on the server side. (dfs.htrace…. configuration values)


Move deliberately
and
improve things.
Interests
- API design
- Cryptography
- Information architecture
- Machine learning
- Number theory
- Technical writing
Tools
- Go
- Java
- Node.js & Express
- PHP
- Javascript
- React & Redux
- MySQL
- PostgreSQL
Clients
- Koverse
- Whale Enterprises


{{sign_up_msg}}
Welcome to ImgCollection! Pick a username shorter than 64 characters. Only letters, numbers, space and underscore is allowed. Choose a password that has a length of at least 8 characters, and containing at least 1 numeral, 1 upper-case letter, and 1 lower-case letter.


ROUNDERS A film review by Matt Williams
RATING: * * * out of * * * *
Rounders introduces us to the world of high-stakes poker. With an electric cast, and some apt direction, it transforms a run-of-the-mill storyline into a fascinating movie.
Mike McDermott (Matt Damon) is a master poker player. He claims that poker is not a game of chance...it's a game of skill, and he can rank with the best. But when a bad stroke of luck proves him wrong, he swears off the game and concentrates on a law career, much to the delight of his girlfriend,Jo (Gretchen Mol).
However, things are about to change. Mike's longtime best friend, Worm (Edward Norton), has just gotten out of jail. Needless to say, Worm is a bad influence upon Mike, and sooner than you can shuffle a deck, Mike is being drawn back into the world of high-stakes poker.
The story is a familiar one, but told with a surprising amount of freshness and energy. Matt Damon provides narration throughout the movie, and this is actually one of the few examples of where narration actually works. The narrative doesn't preclude action on the screen, rather, it is a counterpoint. Damon provides an insight into the mind and strategy of a genius at work.
The games of poker themselves are fun to watch, but you don't have to be an aficionado to enjoy them. John Dahl's insightful direction highlights the moods and strategies of the game, rather than the mundane details. The fact of the matter is, it doesn't really matter that they are playing poker here. The game of choice could be chess, bowling, or hopscotch...it merely serves as the vehicle from which the characters are introduced.
And what an assortment of characters! Damon's congeniality works well in the central role. He's a character you instinctively want to root for. Norton, on the other hand, sort of creeps up on you. He's an odd mix of treachery and charm. Even though he keeps on doing the wrong thing, you can't help but like the guy.
The supporting cast boasts the likes of John Malkovich, John Turturro and Martin Landau. Malkovich is the slimy Teddy KGB, a master poker player with ties into the Russian mafia. His mannerisms border at times at being over the top, but because his character is played with such relish, it's a forgivable sin. Turturro is Joey Knish, a "grinder", who makes a living on the poker circuit. He admires Mike's skill, but is also wary of a dangerous streak, and often tries to give him advice. Landau is a sympathetic judge who is teaching Mike in law school.
Of the supporting cast, only the women (both Gretchen Mol and Famke Janssen as Mike's former poker-playing flame) don't get any meat. They're stuck playing questionable roles that seem to exist merely to keep this from being an all-male cast.
Just like Mike can sum up the status of a poker game with a few careful glances, after a few scenes, you know pretty well where the movie is going. However, it's a fun game, and at times worth it just to watch the masters at play.
Copyright 1998 Matt Williams
- Matt Williams<EMAIL_ADDRESS>Reviewer for Cinematter: http://www.cinematter.com Home of over 600 reviews, and information on nearly 700 upcoming releases
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


|
C++ Actor Framework 0.19
|
Implicitly shared handle type that represents an HTTP client request with a promise for the HTTP response. More...
#include <request.hpp>
Public Member Functions | |
| request (request &&)=default | |
| request (const request &)=default | |
| request & | operator= (request &&)=default |
| request & | operator= (const request &)=default |
| const request_header & | header () const |
| Returns the HTTP header for the request. | |
| const_byte_span | body () const |
| Returns the HTTP body (payload) for the request. | |
| const_byte_span | payload () const |
| Returns the HTTP body (payload) for the request. | |
| void | respond (status code, std::string_view content_type, const_byte_span content) const |
| Sends an HTTP response message to the client. | |
| void | respond (status code, std::string_view content_type, std::string_view content) const |
| Sends an HTTP response message to the client. | |
Implicitly shared handle type that represents an HTTP client request with a promise for the HTTP response.
| const_byte_span caf::net::http::request::body | ( | ) | const |
Returns the HTTP body (payload) for the request.
valid()
| const request_header & caf::net::http::request::header | ( | ) | const |
Returns the HTTP header for the request.
valid()
| const_byte_span caf::net::http::request::payload | ( | ) | const |
Returns the HTTP body (payload) for the request.
valid()
| void caf::net::http::request::respond | ( | status | code, |
| std::string_view | content_type, | ||
| const_byte_span | content | ||
| ) | const |
Sends an HTTP response message to the client.
Automatically sets the Content-Type
and Content-Length
header fields.
valid()
| void caf::net::http::request::respond | ( | status | code, |
| std::string_view | content_type, | ||
| std::string_view | content | ||
| ) | const |
Sends an HTTP response message to the client.
Automatically sets the Content-Type
and Content-Length
header fields.
valid()


vignettes/calibration_approach.Rmd
calibration_approach.Rmd
Coming up with a model of malaria transmission is easy, but coming up with a model that matches to data is much more difficult! There are several reasons for this: first, the real world is messy and data are often noisy or subject to bias. This doesn’t necessarily mean we should discard this information, but we need to be able to interpret information when drawing general conclusions. Second, the universe is often much more complicated than we can represent mathematically or computationally, and so when constructing a model we need to decide what we want to include and what we want to discard. There are arguments for being at different points on the complexity spectrum, depending on whether our aim is to develop a simple “intuition pump” type model that captures key principles, or to represent the real world in high fidelity. Finally, the real world is often much stranger than we can envision in our simple brains. Often, we will find new datasets that seem completely at odds with our understanding, in which case we need to revisit our assumptions and hopefully capture something that was missing before. The process of modelling is therefore completely linked to the process of data analysis, otherwise we are just making toys to keep ourselves occupied.
We use the term “calibration” here to refer to any approach aimed at getting a model to line up with observed data. Model calibration can be as formal or informal as you like, and in fact the word is carefully chosen to get away from the more narrow idea of model “fitting”, which implies a stronger set of statistical principles. In some sense the ideal form of calibration would be a full likelihood-based model fit, perhaps with full Bayesian uncertainty estimates, sensitivity analyses and posterior predictive checks…but realistically that is not going to happen most of the time. The guiding philosophy here is that, no matter how complex your calibration process, at some point you are going to have to show that you line up against data. By making a simple “arena” consisting of a series of datasets that cover different aspects of malaria genomic epidemiology, we can compare models in terms of what patterns they can/cannot reproduce This is not a competition between models, as if someone really wanted to make a model that fitted all these datasets perfectly then I’m sure they could (it would probably be highly over-fitted and useless, but nonethless…)! Rather, the aim of this excercise is to guide us towards modelling principles that are important, and towards models that are practically useful in some situations.
Our aim is that multiple model calibrations against data will be shown here, starting with the inbuilt SIMPLEGEN model and hopefully expanding to other models. A key part of this approach is reproducibility, as showing a series of model predictions with no information on how they are generated is not particularly useful for anyone. Although this may seem obvious, we should recognise that this is part of a wider reproducibility crisis in science, in which epidemiological modelling is no exception. The fact is that it takes effort to ensure reproducility, as even well-documented software pacakges may be updated over time in ways that cause results to diverge. For this reason, we impose the following strict rules on any model results displayed here:
These rules only apply to results displayed here and to models that are distributed as part of the SIMPLEGEN pipeline. If you want to develop your own models and play around with SIMPLEGEN then there is no need for you to follow any of these steps (although good for you if you choose to)!
Finally, this is not intended to be a static document. Model assumptions may change over time as new data are included or new calibration methods are used. The advantage to having complete reproducibility is that we can move forward with model development while always maintaining a trail of previous versions so nothing is lost along the way. The first few calibrations will probably look a bit ropey, but hopefully over time the models will start to look reasonable - bear with us! As a user, this just means you should always specify exactly which version of SIMPLEGEN you used in your analysis.


Fluid_DG_Slider is a responsive/adaptive slideshow. Try to resize the browser window
It uses a light version of jQuery mobile, navigate the slides by swiping with your fingers
It's completely free, with tons of effects, Prev / next, pager, Start / Stop / Auto control controls and lot of customizable options.
Fluid_DG_Slider slideshow provides many options to customize your project as more as possible
It supports captions, HTML elements and videos and
it's validated in HTML5 (
have a look)
Different color skins and layouts available,
fullscreen ready too