Class: Aws::S3::Encryption::Client
| Inherits: |
Object
|
| Defined in: |
Instance Attribute Summary collapse
-
#client ⇒ S3::Client
readonly
-
#envelope_location ⇒ Symbol<:metadata, :instruction_file>
readonly
-
#instruction_file_suffix ⇒ String
readonly
When #envelope_location is
:instruction_file
, the envelope is stored in the object with the object key suffixed by this string. -
#key_provider ⇒ KeyProvider?
readonly
Returns
nil
if you are using AWS Key Management Service (KMS).
Class Method Summary collapse
-
.new(options = {}) ⇒ Client
constructor
Creates a new encryption client.
Instance Method Summary collapse
-
#get_object(params = {}, &block) ⇒ Types::GetObjectOutput
Gets an object from Amazon S3, decrypting data locally.
-
#put_object(params = {}) ⇒ Types::PutObjectOutput
Uploads an object to Amazon S3, encrypting data client-side.
Constructor Details
.new(options = {}) ⇒ Client
Creates a new encryption client. You must provide on of the following options:
:encryption_key
:kms_key_id
:key_provider
You may also pass any other options accepted by S3::Client#initialize
.
220 221 222 223 224 225
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/client.rb', line 220
def initialize( = {}) @client = extract_client() @cipher_provider = cipher_provider() @envelope_location = extract_location() @instruction_file_suffix = extract_suffix() end
Instance Attribute Details
#client ⇒ S3::Client (readonly)
228
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/client.rb', line 228
attr_reader :client
#envelope_location ⇒ Symbol<:metadata, :instruction_file> (readonly)
235
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/client.rb', line 235
attr_reader :envelope_location
#instruction_file_suffix ⇒ String (readonly)
When #envelope_location is :instruction_file
,
the envelope is stored in the object with the object key suffixed
by this string.
240
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/client.rb', line 240
attr_reader :instruction_file_suffix
#key_provider ⇒ KeyProvider? (readonly)
Returns nil
if you are using
AWS Key Management Service (KMS).
232
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/client.rb', line 232
attr_reader :key_provider
Instance Method Details
#get_object(params = {}, &block) ⇒ Types::GetObjectOutput
The :range
request parameter is not yet supported.
Gets an object from Amazon S3, decrypting data locally. See Client#get_object for documentation on accepted request parameters.
272 273 274 275 276 277 278 279 280 281 282 283 284 285
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/client.rb', line 272
def get_object(params = {}, &block) if params[:range] raise NotImplementedError, '#get_object with :range not supported yet' end envelope_location, instruction_file_suffix = (params) req = @client.build_request(:get_object, params) req.handlers.add(DecryptHandler) req.context[:encryption] = { cipher_provider: @cipher_provider, envelope_location: envelope_location, instruction_file_suffix: instruction_file_suffix, } req.send_request(target: block) end
#put_object(params = {}) ⇒ Types::PutObjectOutput
Uploads an object to Amazon S3, encrypting data client-side. See Client#put_object for documentation on accepted request parameters.
248 249 250 251 252 253 254 255 256 257
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/client.rb', line 248
def put_object(params = {}) req = @client.build_request(:put_object, params) req.handlers.add(EncryptHandler, priority: 95) req.context[:encryption] = { cipher_provider: @cipher_provider, envelope_location: @envelope_location, instruction_file_suffix: @instruction_file_suffix, } req.send_request end


Click in a game cell and your player sign will appear at this position.
Shows the number of turns and the current player.


Source code can be found in here
If you want to search 'example' go to:
https://imagesearch-hoanglong7421.heroku.com/search/example
To see lastest searches go to:
https://imagesearch-hoanglong7421.heroku.com/lastest


home
BedFlix
BedFlix is a chrome extension / kinect application that allows you to control Netflix with gestures. It is fully open-sourced, check out the repository
here
. If you are interested in using it, download the extension from the chrome web store
here
.


--- layout: page title: About header-img: "img/about-bg.png" ---
I am a wife and a mom. A challenge is what makes me move forward. My goal is to learn to code so I can become a tiny part of world development.


KappaGen settings
-
use BTTV emotes allow gif emotes
use FFZ emotes Show each emote only once per message Allow chat moderators to use chat commands Subscribers only -
-
-
-
Reset to default
Resulting URL:
{{buildUrl()}}
Add a CLR-Browser to your global scenes and set it to show that page. You have to copy the link every time you change a setting!
Alternatively, use these chat commands:
Alternatively, use these chat commands:
!kappagen {{key}} {{val}}
!kappagen emotesplosiontest
!kappagen customsplosion


Compound Attribute Expressions
Compound attribute expressions may be constructed by combining attributes as primitives with logical, arithmetic, and comparison unary and binary operators. Integer constants are permitted, and string literals may be used by enclosing the string in quotes. All the attributes in an attribute expression are applied to the same element, for example:
apply {name == "main"} main
1
apply {type == "main"} main
0
apply {type == "main" || numargs > 1} main
1
apply {name == fn} main
Could not find attribute: fn
Parentheses may be used to group operations. Non-empty and not zero (“0”) is considered “true” in boolean operations. If attribute expressions are strung together without a binary operator to join them, the value of the attribute expression is the same as if the subexpressions were logically ended:
apply {name numargs > 1} main
is the same as
apply {name && (numargs > 1)} main
which would only be false if main had no name (!) or took fewer than two arguments.


AUTO EROTICISM
GONE IN 60 SECONDS
Directed by Dominic Sena
Screenplay by Scott Rosenberg
With Nicolas Cage, Delroy Lindo
UA South PG-13 117 min
Producer Jerry Bruckheimer, in a philanthropic moment, bought the rights to a grade C 1974 quickie called Gone In 60 Seconds, which was made by a guy named H.B. Halicki and is remembered, if it is remembered at all, for a 40-minute car chase. Halicki himself was gone in short order, erased in an accident while filming a sequel.
Both movies involve stealing a lot of cars, and driving recklessly and very fast. A less sensitive man than Bruckheimer might not have felt this was worth paying the big bucks for, but Jerry's the man who brought us The Rock and Armageddon, so he has certain standards to maintain.
Bruckheimer veteran Nic Cage is the central character, an ex-car thief known even to his family as Memphis. Cage once won a Best Actor Oscar, but he's been trying successfully to live it down ever since. Memphis is going straight, working at a go-kart track with little kids, but his brother (Giovanni Ribisi) has run afoul of a homicidal crime boss (Christopher Eccleston), and Memphis has to heist 50 high-end autos in a night to save the lad's bacon.
Gone In 60 Seconds is all speed and shiny surfaces, with odd little moments of pathos spotted in to support Bruckheimer's assertion that this movie is "character driven". Driven, yes; character, no.
I could tell you how Memphis puts together a "team", and mention names like Robert Duvall, but that would give you false hope. I could mention Delroy Lindo, reduced here to an Inspector Javert-like detective who grouses "I should have put you away when I had the chance," sounding like George Bush bitching to Saddam Hussein. I could mention Angelina Jolie, yet another Oscar winner, but that would give you the impression that there's a female presence here. I couldn't figure for the life of me what Jolie was doing in the movie, except to ponder with Cage the question "Which is better, boosting cars or sex?"
The answer is neither, when it becomes as monotonously repetitive as it does here. Boosting one car could be pretty exciting. Boosting 50 is just plain tedious. It's like one of those tours that takes you to 12 European cities in 6 days.
If all you ask for in a movie is lots of car chases, you'll find plenty of that in this one. Memphis's main automotive squeeze is a '67 Shelby Mustang GT 500 (similar to the car Steve McQueen drove in Bullitt.) Her name is Eleanor, and he comes a lot closer to orgasm with her than he does with Angelina Jolie.
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


{% extends "base.html" %} {% block sitetitle %}Permissions for {{ agreement.name }}{% endblock %} {% block main %}
Members of these groups have permissions on any agreement.
No groups have been given permissions on all agreements.
{% endif %} {% if object_permissions %}Members of these groups have permissions on this agreement.
No groups have been given permissions on this specific agreement.
{% endif %} {% endblock %}


/** * @author Richard Davey<EMAIL_ADDRESS>* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ /** * Ninja Physics. The Ninja Physics system was created in Flash by Metanet Software and ported to JavaScript by Richard Davey. * * It allows for AABB and Circle to Tile collision. Tiles can be any of 34 different types, including slopes, convex and concave shapes. * * It does what it does very well, but is ripe for expansion and optimisation. Here are some features that I'd love to see the community add: * * * AABB to AABB collision * * AABB to Circle collision * * AABB and Circle 'immovable' property support * * n-way collision, so an AABB/Circle could pass through a tile from below and land upon it. * * QuadTree or spatial grid for faster Body vs. Tile Group look-ups. * * Optimise the internal vector math and reduce the quantity of temporary vars created. * * Expand Gravity and Bounce to allow for separate x/y axis values. * * Support Bodies linked to Sprites that don't have anchor set to 0.5 * * Feel free to attempt any of the above and submit a Pull Request with your code! Be sure to include test cases proving they work. * * @class Phaser.Physics.Ninja * @classdesc Ninja Physics Constructor * @constructor * @param {Phaser.Game} game reference to the current game instance. */ Phaser.Physics.Ninja = function (game) { /** * @property {Phaser.Game} game - Local reference to game. */ this.game = game; /** * @property {Phaser.Time} time - Local reference to game.time. */ this.time = this.game.time; /** * @property {number} gravity - The World gravity setting. */ this.gravity = 0.2; /** * @property {Phaser.Rectangle} bounds - The bounds inside of which the physics world exists. Defaults to match the world bounds. */ this.bounds = new Phaser.Rectangle(0, 0, game.world.width, game.world.height); /** * @property {number} maxObjects - Used by the QuadTree to set the maximum number of objects per quad. */ this.maxObjects = 10; /** * @property {number} maxLevels - Used by the QuadTree to set the maximum number of iteration levels. */ this.maxLevels = 4; /** * @property {Phaser.QuadTree} quadTree - The world QuadTree. */ this.quadTree = new Phaser.QuadTree(this.game.world.bounds.x, this.game.world.bounds.y, this.game.world.bounds.width, this.game.world.bounds.height, this.maxObjects, this.maxLevels); }; Phaser.Physics.Ninja.prototype.constructor = Phaser.Physics.Ninja; Phaser.Physics.Ninja.prototype = { /** * This will create a Ninja Physics AABB body on the given game object. Its dimensions will match the width and height of the object at the point it is created. * A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. * * @method Phaser.Physics.Ninja#enableAABB * @param {object|array|Phaser.Group} object - The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. * @param {boolean} [children=true] - Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. */ enableAABB: function (object, children) { this.enable(object, 1, 0, 0, children); }, /** * This will create a Ninja Physics Circle body on the given game object. * A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. * * @method Phaser.Physics.Ninja#enableCircle * @param {object|array|Phaser.Group} object - The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. * @param {number} radius - The radius of the Circle. * @param {boolean} [children=true] - Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. */ enableCircle: function (object, radius, children) { this.enable(object, 2, 0, radius, children); }, /** * This will create a Ninja Physics Tile body on the given game object. There are 34 different types of tile you can create, including 45 degree slopes, * convex and concave circles and more. The id parameter controls which Tile type is created, but you can also change it at run-time. * Note that for all degree based tile types they need to have an equal width and height. If the given object doesn't have equal width and height it will use the width. * A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. * * @method Phaser.Physics.Ninja#enableTile * @param {object|array|Phaser.Group} object - The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. * @param {number} [id=1] - The type of Tile this will use, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc. * @param {boolean} [children=true] - Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. */ enableTile: function (object, id, children) { this.enable(object, 3, id, 0, children); }, /** * This will create a Ninja Physics body on the given game object or array of game objects. * A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. * * @method Phaser.Physics.Ninja#enable * @param {object|array|Phaser.Group} object - The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. * @param {number} [type=1] - The type of Ninja shape to create. 1 = AABB, 2 = Circle or 3 = Tile. * @param {number} [id=1] - If this body is using a Tile shape, you can set the Tile id here, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc. * @param {number} [radius=0] - If this body is using a Circle shape this controls the radius. * @param {boolean} [children=true] - Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. */ enable: function (object, type, id, radius, children) { if (typeof type === 'undefined') { type = 1; } if (typeof id === 'undefined') { id = 1; } if (typeof radius === 'undefined') { radius = 0; } if (typeof children === 'undefined') { children = true; } if (Array.isArray(object)) { i = object.length; while (i--) { if (object[i] instanceof Phaser.Group) { // If it's a Group then we do it on the children regardless this.enable(object[i].children, type, id, radius, children); } else { this.enableBody(object[i], type, id, radius); if (children && object[i].hasOwnProperty('children') && object[i].children.length > 0) { this.enable(object[i], type, id, radius, true); } } } } else { if (object instanceof Phaser.Group) { // If it's a Group then we do it on the children regardless this.enable(object.children, type, id, radius, children); } else { this.enableBody(object, type, id, radius); if (children && object.hasOwnProperty('children') && object.children.length > 0) { this.enable(object.children, type, id, radius, true); } } } }, /** * Creates a Ninja Physics body on the given game object. * A game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled. * * @method Phaser.Physics.Ninja#enableBody * @param {object} object - The game object to create the physics body on. A body will only be created if this object has a null `body` property. */ enableBody: function (object, type, id, radius) { if (object.hasOwnProperty('body') && object.body === null) { object.body = new Phaser.Physics.Ninja.Body(this, object, type, id, radius); object.anchor.set(0.5); } }, /** * Updates the size of this physics world. * * @method Phaser.Physics.Ninja#setBounds * @param {number} x - Top left most corner of the world. * @param {number} y - Top left most corner of the world. * @param {number} width - New width of the world. Can never be smaller than the Game.width. * @param {number} height - New height of the world. Can never be smaller than the Game.height. */ setBounds: function (x, y, width, height) { this.bounds.setTo(x, y, width, height); }, /** * Updates the size of this physics world to match the size of the game world. * * @method Phaser.Physics.Ninja#setBoundsToWorld */ setBoundsToWorld: function () { this.bounds.setTo(this.game.world.bounds.x, this.game.world.bounds.y, this.game.world.bounds.width, this.game.world.bounds.height); }, /** * Clears all physics bodies from the given TilemapLayer that were created with `World.convertTilemap`. * * @method Phaser.Physics.Ninja#clearTilemapLayerBodies * @param {Phaser.Tilemap} map - The Tilemap to get the map data from. * @param {number|string|Phaser.TilemapLayer} [layer] - The layer to operate on. If not given will default to map.currentLayer. */ clearTilemapLayerBodies: function (map, layer) { layer = map.getLayer(layer); var i = map.layers[layer].bodies.length; while (i--) { map.layers[layer].bodies[i].destroy(); } map.layers[layer].bodies.length = []; }, /** * Goes through all tiles in the given Tilemap and TilemapLayer and converts those set to collide into physics tiles. * Only call this *after* you have specified all of the tiles you wish to collide with calls like Tilemap.setCollisionBetween, etc. * Every time you call this method it will destroy any previously created bodies and remove them from the world. * Therefore understand it's a very expensive operation and not to be done in a core game update loop. * * In Ninja the Tiles have an ID from 0 to 33, where 0 is 'empty', 1 is a full tile, 2 is a 45-degree slope, etc. You can find the ID * list either at the very bottom of `Tile.js`, or in a handy visual reference in the `resources/Ninja Physics Debug Tiles` folder in the repository. * The slopeMap parameter is an array that controls how the indexes of the tiles in your tilemap data will map to the Ninja Tile IDs. * For example if you had 6 tiles in your tileset: Imagine the first 4 should be converted into fully solid Tiles and the other 2 are 45-degree slopes. * Your slopeMap array would look like this: `[ 1, 1, 1, 1, 2, 3 ]`. * Where each element of the array is a tile in your tilemap and the resulting Ninja Tile it should create. * * @method Phaser.Physics.Ninja#convertTilemap * @param {Phaser.Tilemap} map - The Tilemap to get the map data from. * @param {number|string|Phaser.TilemapLayer} [layer] - The layer to operate on. If not given will default to map.currentLayer. * @param {object} [slopeMap] - The tilemap index to Tile ID map. * @return {array} An array of the Phaser.Physics.Ninja.Tile objects that were created. */ convertTilemap: function (map, layer, slopeMap) { layer = map.getLayer(layer); if (typeof addToWorld === 'undefined') { addToWorld = true; } if (typeof optimize === 'undefined') { optimize = true; } // If the bodies array is already populated we need to nuke it this.clearTilemapLayerBodies(map, layer); for (var y = 0, h = map.layers[layer].height; y < h; y++) { for (var x = 0, w = map.layers[layer].width; x < w; x++) { var tile = map.layers[layer].data[y][x]; if (tile && slopeMap.hasOwnProperty(tile.index)) { var body = new Phaser.Physics.Ninja.Body(this, null, 3, slopeMap[tile.index], 0, tile.worldX + tile.centerX, tile.worldY + tile.centerY, tile.width, tile.height); map.layers[layer].bodies.push(body); } } } return map.layers[layer].bodies; }, /** * Checks for overlaps between two game objects. The objects can be Sprites, Groups or Emitters. * You can perform Sprite vs. Sprite, Sprite vs. Group and Group vs. Group overlap checks. * Unlike collide the objects are NOT automatically separated or have any physics applied, they merely test for overlap results. * The second parameter can be an array of objects, of differing types. * * @method Phaser.Physics.Ninja#overlap * @param {Phaser.Sprite|Phaser.Group|Phaser.Particles.Emitter} object1 - The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group or Phaser.Particles.Emitter. * @param {Phaser.Sprite|Phaser.Group|Phaser.Particles.Emitter|array} object2 - The second object or array of objects to check. Can be Phaser.Sprite, Phaser.Group or Phaser.Particles.Emitter. * @param {function} [overlapCallback=null] - An optional callback function that is called if the objects overlap. The two objects will be passed to this function in the same order in which you specified them. * @param {function} [processCallback=null] - A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then overlapCallback will only be called if processCallback returns true. * @param {object} [callbackContext] - The context in which to run the callbacks. * @returns {boolean} True if an overlap occured otherwise false. */ overlap: function (object1, object2, overlapCallback, processCallback, callbackContext) { overlapCallback = overlapCallback || null; processCallback = processCallback || null; callbackContext = callbackContext || overlapCallback; this._result = false; this._total = 0; if (Array.isArray(object2)) { for (var i = 0, len = object2.length; i < len; i++) { this.collideHandler(object1, object2[i], overlapCallback, processCallback, callbackContext, true); } } else { this.collideHandler(object1, object2, overlapCallback, processCallback, callbackContext, true); } return (this._total > 0); }, /** * Checks for collision between two game objects. You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap Layer or Group vs. Tilemap Layer collisions. * The second parameter can be an array of objects, of differing types. * The objects are also automatically separated. If you don't require separation then use ArcadePhysics.overlap instead. * An optional processCallback can be provided. If given this function will be called when two sprites are found to be colliding. It is called before any separation takes place, * giving you the chance to perform additional checks. If the function returns true then the collision and separation is carried out. If it returns false it is skipped. * The collideCallback is an optional function that is only called if two sprites collide. If a processCallback has been set then it needs to return true for collideCallback to be called. * * @method Phaser.Physics.Ninja#collide * @param {Phaser.Sprite|Phaser.Group|Phaser.Particles.Emitter|Phaser.Tilemap} object1 - The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter, or Phaser.Tilemap. * @param {Phaser.Sprite|Phaser.Group|Phaser.Particles.Emitter|Phaser.Tilemap|array} object2 - The second object or array of objects to check. Can be Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter or Phaser.Tilemap. * @param {function} [collideCallback=null] - An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them. * @param {function} [processCallback=null] - A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collision will only happen if processCallback returns true. The two objects will be passed to this function in the same order in which you specified them. * @param {object} [callbackContext] - The context in which to run the callbacks. * @returns {boolean} True if a collision occured otherwise false. */ collide: function (object1, object2, collideCallback, processCallback, callbackContext) { collideCallback = collideCallback || null; processCallback = processCallback || null; callbackContext = callbackContext || collideCallback; this._result = false; this._total = 0; if (Array.isArray(object2)) { for (var i = 0, len = object2.length; i < len; i++) { this.collideHandler(object1, object2[i], collideCallback, processCallback, callbackContext, false); } } else { this.collideHandler(object1, object2, collideCallback, processCallback, callbackContext, false); } return (this._total > 0); }, /** * Internal collision handler. * * @method Phaser.Physics.Ninja#collideHandler * @private * @param {Phaser.Sprite|Phaser.Group|Phaser.Particles.Emitter|Phaser.Tilemap} object1 - The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter, or Phaser.Tilemap. * @param {Phaser.Sprite|Phaser.Group|Phaser.Particles.Emitter|Phaser.Tilemap} object2 - The second object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter or Phaser.Tilemap. Can also be an array of objects to check. * @param {function} collideCallback - An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them. * @param {function} processCallback - A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collision will only happen if processCallback returns true. The two objects will be passed to this function in the same order in which you specified them. * @param {object} callbackContext - The context in which to run the callbacks. * @param {boolean} overlapOnly - Just run an overlap or a full collision. */ collideHandler: function (object1, object2, collideCallback, processCallback, callbackContext, overlapOnly) { // Only collide valid objects if (typeof object2 === 'undefined' && (object1.type === Phaser.GROUP || object1.type === Phaser.EMITTER)) { this.collideGroupVsSelf(object1, collideCallback, processCallback, callbackContext, overlapOnly); return; } if (object1 && object2 && object1.exists && object2.exists) { // SPRITES if (object1.type == Phaser.SPRITE || object1.type == Phaser.TILESPRITE) { if (object2.type == Phaser.SPRITE || object2.type == Phaser.TILESPRITE) { this.collideSpriteVsSprite(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly); } else if (object2.type == Phaser.GROUP || object2.type == Phaser.EMITTER) { this.collideSpriteVsGroup(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly); } else if (object2.type == Phaser.TILEMAPLAYER) { this.collideSpriteVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext); } } // GROUPS else if (object1.type == Phaser.GROUP) { if (object2.type == Phaser.SPRITE || object2.type == Phaser.TILESPRITE) { this.collideSpriteVsGroup(object2, object1, collideCallback, processCallback, callbackContext, overlapOnly); } else if (object2.type == Phaser.GROUP || object2.type == Phaser.EMITTER) { this.collideGroupVsGroup(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly); } else if (object2.type == Phaser.TILEMAPLAYER) { this.collideGroupVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext); } } // TILEMAP LAYERS else if (object1.type == Phaser.TILEMAPLAYER) { if (object2.type == Phaser.SPRITE || object2.type == Phaser.TILESPRITE) { this.collideSpriteVsTilemapLayer(object2, object1, collideCallback, processCallback, callbackContext); } else if (object2.type == Phaser.GROUP || object2.type == Phaser.EMITTER) { this.collideGroupVsTilemapLayer(object2, object1, collideCallback, processCallback, callbackContext); } } // EMITTER else if (object1.type == Phaser.EMITTER) { if (object2.type == Phaser.SPRITE || object2.type == Phaser.TILESPRITE) { this.collideSpriteVsGroup(object2, object1, collideCallback, processCallback, callbackContext, overlapOnly); } else if (object2.type == Phaser.GROUP || object2.type == Phaser.EMITTER) { this.collideGroupVsGroup(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly); } else if (object2.type == Phaser.TILEMAPLAYER) { this.collideGroupVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext); } } } }, /** * An internal function. Use Phaser.Physics.Ninja.collide instead. * * @method Phaser.Physics.Ninja#collideSpriteVsSprite * @private */ collideSpriteVsSprite: function (sprite1, sprite2, collideCallback, processCallback, callbackContext, overlapOnly) { if (this.separate(sprite1.body, sprite2.body, processCallback, callbackContext, overlapOnly)) { if (collideCallback) { collideCallback.call(callbackContext, sprite1, sprite2); } this._total++; } }, /** * An internal function. Use Phaser.Physics.Ninja.collide instead. * * @method Phaser.Physics.Ninja#collideSpriteVsGroup * @private */ collideSpriteVsGroup: function (sprite, group, collideCallback, processCallback, callbackContext, overlapOnly) { if (group.length === 0) { return; } // What is the sprite colliding with in the quadtree? // this.quadTree.clear(); // this.quadTree = new Phaser.QuadTree(this.game.world.bounds.x, this.game.world.bounds.y, this.game.world.bounds.width, this.game.world.bounds.height, this.maxObjects, this.maxLevels); // this.quadTree.populate(group); // this._potentials = this.quadTree.retrieve(sprite); for (var i = 0, len = group.children.length; i < len; i++) { // We have our potential suspects, are they in this group? if (group.children[i].exists && group.children[i].body && this.separate(sprite.body, group.children[i].body, processCallback, callbackContext, overlapOnly)) { if (collideCallback) { collideCallback.call(callbackContext, sprite, group.children[i]); } this._total++; } } }, /** * An internal function. Use Phaser.Physics.Ninja.collide instead. * * @method Phaser.Physics.Ninja#collideGroupVsSelf * @private */ collideGroupVsSelf: function (group, collideCallback, processCallback, callbackContext, overlapOnly) { if (group.length === 0) { return; } var len = group.children.length; for (var i = 0; i < len; i++) { for (var j = i + 1; j <= len; j++) { if (group.children[i] && group.children[j] && group.children[i].exists && group.children[j].exists) { this.collideSpriteVsSprite(group.children[i], group.children[j], collideCallback, processCallback, callbackContext, overlapOnly); } } } }, /** * An internal function. Use Phaser.Physics.Ninja.collide instead. * * @method Phaser.Physics.Ninja#collideGroupVsGroup * @private */ collideGroupVsGroup: function (group1, group2, collideCallback, processCallback, callbackContext, overlapOnly) { if (group1.length === 0 || group2.length === 0) { return; } for (var i = 0, len = group1.children.length; i < len; i++) { if (group1.children[i].exists) { this.collideSpriteVsGroup(group1.children[i], group2, collideCallback, processCallback, callbackContext, overlapOnly); } } }, /** * The core separation function to separate two physics bodies. * @method Phaser.Physics.Ninja#separate * @param {Phaser.Physics.Ninja.Body} body1 - The Body object to separate. * @param {Phaser.Physics.Ninja.Body} body2 - The Body object to separate. * @param {function} [processCallback=null] - UN-USED: A callback function that lets you perform additional checks against the two objects if they overlap. If this function is set then the sprites will only be collided if it returns true. * @param {object} [callbackContext] - UN-USED: The context in which to run the process callback. * @returns {boolean} Returns true if the bodies collided, otherwise false. */ separate: function (body1, body2, processCallback, callbackContext, overlapOnly) { if (body1.type !== Phaser.Physics.NINJA || body2.type !== Phaser.Physics.NINJA) { return false; } if (body1.aabb && body2.aabb) { return body1.aabb.collideAABBVsAABB(body2.aabb); } if (body1.aabb && body2.tile) { return body1.aabb.collideAABBVsTile(body2.tile); } if (body1.tile && body2.aabb) { return body2.aabb.collideAABBVsTile(body1.tile); } if (body1.circle && body2.tile) { return body1.circle.collideCircleVsTile(body2.tile); } if (body1.tile && body2.circle) { return body2.circle.collideCircleVsTile(body1.tile); } } };


| subsets {car} | R Documentation |
The regsubsets
function in the leaps package finds
optimal subsets of predictors based on some criterion statistic. This function plots a measure of fit against subset size.
subsets(object, ...) ## S3 method for class 'regsubsets' subsets(object, names=abbreviate(object$xnames, minlength = abbrev), abbrev=1, min.size=1, max.size=length(names), legend="interactive", statistic=c("bic", "cp", "adjr2", "rsq", "rss"), las=par('las'), cex.subsets=1, ...)
object |
a |
names |
a vector of (short) names for the predictors, excluding the
regression intercept, if one is present; if missing, these are
derived from the predictor names in |
abbrev |
minimum number of characters to use in abbreviating predictor names. |
min.size |
minimum size subset to plot; default is |
max.size |
maximum size subset to plot; default is number of predictors. |
legend |
If not |
statistic |
statistic to plot for each predictor subset; one of:
|
las |
if |
cex.subsets |
can be used to change the relative size of the characters used to
plot the regression subsets; default is |
... |
arguments to be passed down to
|
NULL
if the legend
is TRUE
; otherwise a data frame with the legend.
John Fox
Fox, J. (2016) Applied Regression Analysis and Generalized Linear Models, Third Edition. Sage.
Fox, J. and Weisberg, S. (2019) An R Companion to Applied Regression, Third Edition, Sage.
if (require(leaps)){ subsets(regsubsets(undercount ~ ., data=Ericksen), legend=c(3.5, -37)) }


+++ title = "Bus to Veracruz" slug = "bus-to-veracruz" date = 2007-02-24T15:00:00+10:00 tags = ["language-barrier", "bus-trips"] locations = ["mexico/veracruz"] draft = false summary = """
The Xalapa to Veracruz route is fairly short (about 2 hours), and there are buses servicing it very frequently. When I got the bus, at 2pm, they were running every 15 minutes. Not bad.
""" +++The Xalapa to Veracruz route is fairly short (about 2 hours), and there are buses servicing it very frequently. When I got the bus, at 2pm, they were running every 15 minutes. Not bad.
There was a lady sitting next to me on the bus, who was trying to explain her occupation to me. Of course, I couldn't understand what she was saying. Eventually, I gave up and handed her my pocket Spanish dictionary, indicating that she should use it to explain her job better. She pointed me to a word called carretera, which means "roads" or "highways". So I guess she works for the Department of Transport, or some equivalent thereof.


|
geopm-service
GEOPM Systemd Service
|
#include <LevelZero.hpp>
Public Types | |
| enum | geopm_levelzero_domain_e { M_DOMAIN_ALL = 0 , M_DOMAIN_COMPUTE = 1 , M_DOMAIN_MEMORY = 2 , M_DOMAIN_SIZE = 3 } |
Public Member Functions | |
| LevelZero ()=default | |
| virtual | ~LevelZero ()=default |
| virtual int | num_gpu () const =0 |
| Number of GPUs on the platform. More... | |
| virtual int | num_gpu (int domain) const =0 |
| Number of GPUs on the platform. More... | |
| virtual int | frequency_domain_count (unsigned int l0_device_idx, int l0_domain) const =0 |
| Get the number of LevelZero frequency domains of a certain type. More... | |
| virtual double | frequency_status (unsigned int l0_device_idx, int l0_domain, int l0_domain_idx) const =0 |
| Get the LevelZero device actual frequency in MHz. More... | |
| virtual double | frequency_efficient (unsigned int l0_device_idx, int l0_domain, int l0_domain_idx) const =0 |
| Get the LevelZero device efficient frequency in MHz. More... | |
| virtual double | frequency_min (unsigned int l0_device_idx, int l0_domain, int l0_domain_idx) const =0 |
| Get the LevelZero device mininmum frequency in MHz. More... | |
| virtual double | frequency_max (unsigned int l0_device_idx, int l0_domain, int l0_domain_idx) const =0 |
| Get the LevelZero device maximum frequency in MHz. More... | |
| virtual std::vector< double > | frequency_supported (unsigned int l0_device_idx, int l0_domain, int l0_domain_idx) const =0 |
| Get the LevelZero device supported frequencies in MHz. More... | |
| virtual uint32_t | frequency_throttle_reasons (unsigned int l0_device_idx, int l0_domain, int l0_domain_idx) const =0 |
| Get the LevelZero device frequency throttle reasons. More... | |
| virtual std::pair< double, double > | frequency_range (unsigned int l0_device_idx, int l0_domain, int l0_domain_idx) const =0 |
| Get the LevelZero device minimum and maximum frequency control range in MHz. More... | |
| virtual int | temperature_domain_count (unsigned int l0_device_idx, int l0_domain) const =0 |
| Get the number of LevelZero temperature domains. More... | |
| virtual double | temperature_max (unsigned int l0_device_idx, int l0_domain, int l0_domain_idx) const =0 |
| Get the LevelZero device maximum temperature in Celsius. More... | |
| virtual int | engine_domain_count (unsigned int l0_device_idx, int l0_domain) const =0 |
| Get the number of LevelZero engine domains. More... | |
| virtual std::pair< uint64_t, uint64_t > | active_time_pair (unsigned int l0_device_idx, int l0_domain, int l0_domain_idx) const =0 |
| Get the LevelZero device active time and timestamp in microseconds. More... | |
| virtual uint64_t | active_time (unsigned int l0_device_idx, int l0_domain, int l0_domain_idx) const =0 |
| Get the LevelZero device active time in microseconds. More... | |
| virtual uint64_t | active_time_timestamp (unsigned int l0_device_idx, int l0_domain, int l0_domain_idx) const =0 |
| Get the cachced LevelZero device timestamp for the active time value in microseconds. More... | |
| virtual int | power_domain_count (int geopm_domain, unsigned int l0_device_idx, int l0_domain) const =0 |
| Get the number of LevelZero power domains of a certain type. More... | |
| virtual int | performance_domain_count (unsigned int l0_device_idx, int l0_domain) const =0 |
| Get the number of LevelZero perf domains of a certain type. More... | |
| virtual double | performance_factor (unsigned int l0_device_idx, int l0_domain, int l0_domain_idx) const =0 |
| Get the performance factor value of various LevelZero domains. More... | |
| virtual int32_t | power_limit_tdp (unsigned int l0_device_idx) const =0 |
| Get the LevelZero device default power limit in milliwatts. More... | |
| virtual int32_t | power_limit_min (unsigned int l0_device_idx) const =0 |
| Get the LevelZero device minimum power limit in milliwatts. More... | |
| virtual int32_t | power_limit_max (unsigned int l0_device_idx) const =0 |
| Get the LevelZero device maximum power limit in milliwatts. More... | |
| virtual std::pair< uint64_t, uint64_t > | energy_pair (int geopm_domain, unsigned int l0_device_idx, int l0_domain_idx) const =0 |
| Get the LevelZero device energy and timestamp in microjoules and microseconds. More... | |
| virtual uint64_t | energy (int geopm_domain, unsigned int l0_device_idx, int l0_domain, int l0_domain_idx) const =0 |
| Get the LevelZero device energy in microjoules. More... | |
| virtual uint64_t | energy_timestamp (int geopm_domain, unsigned int l0_device_idx, int l0_domain, int l0_domain_idx) const =0 |
| Get the LevelZero device energy cached timestamp in microseconds. More... | |
| virtual void | frequency_control (unsigned int l0_device_idx, int l0_domain, int l0_domain_idx, double range_min, double range_max) const =0 |
| Set min and max frequency for LevelZero device. More... | |
| virtual void | performance_factor_control (unsigned int l0_device_idx, int l0_domain, int l0_domain_idx, double setting) const =0 |
| Set the performance factor for the LevelZero device. More... | |
|
default |
|
virtualdefault |
|
pure virtual |
Get the LevelZero device active time in microseconds.
| [in] | l0_device_idx | The index indicating a particular Level Zero GPU. |
| [in] | l0_domain | The LevelZero domain type being targeted |
| [in] | l0_domain_idx | The LevelZero index indicating a particular domain of the GPU. |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the LevelZero device active time and timestamp in microseconds.
| [in] | l0_device_idx | The index indicating a particular Level Zero GPU. |
| [in] | l0_domain | The LevelZero domain type being targeted |
| [in] | l0_domain_idx | The LevelZero index indicating a particular domain of the GPU. |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the cachced LevelZero device timestamp for the active time value in microseconds.
| [in] | l0_device_idx | The index indicating a particular Level Zero GPU. |
| [in] | l0_domain | The LevelZero domain type being targeted |
| [in] | l0_domain_idx | The LevelZero index indicating a particular domain of the GPU. |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the LevelZero device energy in microjoules.
| [in] | geopm_domain | The GEOPM domain being targeted |
| [in] | l0_device_idx | The index indicating a particular Level Zero GPU. |
| [in] | l0_domain | The LevelZero domain type being targeted |
| [in] | l0_domain_idx | The index indicating a particular Level Zero domain. |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the LevelZero device energy and timestamp in microjoules and microseconds.
| [in] | geopm_domain | The GEOPM domain being targeted |
| [in] | l0_device_idx | The index indicating a particular Level Zero GPU. |
| [in] | l0_domain_idx | The index indicating a particular Level Zero domain. |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the LevelZero device energy cached timestamp in microseconds.
| [in] | geopm_domain | The GEOPM domain being targeted |
| [in] | l0_device_idx | The index indicating a particular Level Zero GPU. |
| [in] | l0_domain | The LevelZero domain type being targeted |
| [in] | l0_domain_idx | The index indicating a particular Level Zero domain. |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the number of LevelZero engine domains.
| [in] | l0_domain | The LevelZero domain type being targeted |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Set min and max frequency for LevelZero device.
| [in] | l0_device_idx | The index indicating a particular Level Zero GPU. |
| [in] | l0_domain | The domain type being targeted |
| [in] | l0_domain_idx | The domain being targeted |
| [in] | range_min | Min target frequency in MHz. |
| [in] | range_max | Max target frequency in MHz. |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the number of LevelZero frequency domains of a certain type.
| [in] | l0_domain | The LevelZero domain type being targeted |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the LevelZero device efficient frequency in MHz.
| [in] | l0_device_idx | The index indicating a particular Level Zero GPU. |
| [in] | l0_domain | The LevelZero domain type being targeted |
| [in] | l0_domain_idx | The LevelZero index indicating a particular domain of the GPU. |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the LevelZero device maximum frequency in MHz.
| [in] | l0_device_idx | The index indicating a particular Level Zero GPU. |
| [in] | l0_domain | The LevelZero domain type being targeted |
| [in] | l0_domain_idx | The LevelZero index indicating a particular domain of the GPU. |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the LevelZero device mininmum frequency in MHz.
| [in] | l0_device_idx | The index indicating a particular Level Zero GPU. |
| [in] | l0_domain | The LevelZero domain type being targeted |
| [in] | l0_domain_idx | The LevelZero index indicating a particular domain of the GPU. |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the LevelZero device minimum and maximum frequency control range in MHz.
| [in] | l0_device_idx | The index indicating a particular Level Zero GPU. |
| [in] | l0_domain | The LevelZero domain type being targeted |
| [in] | l0_domain_idx | The LevelZero index indicating a particular domain of the GPU. |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the LevelZero device actual frequency in MHz.
| [in] | l0_device_idx | The index indicating a particular Level Zero GPU. |
| [in] | l0_domain | The LevelZero domain type being targeted |
| [in] | l0_domain_idx | The LevelZero index indicating a particular domain of the GPU. |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the LevelZero device supported frequencies in MHz.
| [in] | l0_device_idx | The index indicating a particular Level Zero GPU. |
| [in] | l0_domain | The LevelZero domain type being targeted |
| [in] | l0_domain_idx | The LevelZero index indicating a particular domain of the GPU. |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the LevelZero device frequency throttle reasons.
| [in] | l0_device_idx | The index indicating a particular Level Zero GPU. |
| [in] | l0_domain | The LevelZero domain type being targeted |
| [in] | l0_domain_idx | The LevelZero index indicating a particular domain of the GPU.. |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Number of GPUs on the platform.
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Number of GPUs on the platform.
| [in] | domain | The GEOPM domain type being targeted |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the number of LevelZero perf domains of a certain type.
| [in] | l0_device_idx | The LevelZero device being targeted |
| [in] | l0_domain | The LevelZero domain type being targeted |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the performance factor value of various LevelZero domains.
| [in] | l0_device_idx | The LevelZero device being targeted |
| [in] | l0_domain | The LevelZero domain type being targeted |
| [in] | l0_domain_idx | The index indicating a particular Level Zero domain. |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Set the performance factor for the LevelZero device.
| [in] | l0_device_idx | The index indicating a particular Level Zero accelerator. |
| [in] | l0_domain | The level zero domain type being targeted |
| [in] | l0_domain_idx | The level zero domain being targeted |
| [in] | setting | The performance factor value, 0-100 |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the number of LevelZero power domains of a certain type.
| [in] | geopm_domain | The GEOPM domain being targeted |
| [in] | l0_device_idx | The LevelZero device being targeted |
| [in] | l0_domain | The LevelZero domain type being targeted |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the LevelZero device maximum power limit in milliwatts.
| [in] | l0_device_idx | The index indicating a particular Level Zero GPU. |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the LevelZero device minimum power limit in milliwatts.
| [in] | l0_device_idx | The index indicating a particular Level Zero GPU. |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the LevelZero device default power limit in milliwatts.
| [in] | l0_device_idx | The index indicating a particular Level Zero GPU. |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the number of LevelZero temperature domains.
| [in] | l0_device_idx | The index indicating a particular Level Zero GPU. |
| [in] | l0_domain | The LevelZero domain type being targeted |
Implemented in geopm::LevelZeroImp.
|
pure virtual |
Get the LevelZero device maximum temperature in Celsius.
| [in] | l0_device_idx | The index indicating a particular Level Zero GPU. |
| [in] | l0_domain | The LevelZero domain type being targeted |
| [in] | l0_domain_idx | The LevelZero index indicating a particular domain of the GPU. |
Implemented in geopm::LevelZeroImp.


Check all notifications
You have 4 new messages
Michael Qin
Just see the my admin!
9:30 AM
John Doe
I've sung a song! See you at
9:10 AM
Mr. John
I am a singer!
9:08 AM
Michael Qin
Just see the my admin!
9:02 AM
See all e-Mails
Logout
Logout
Master Admin
Tickets
Agents
Topics
History all ticket
Dashboard
Home
Dashboard
{% block content %}{% endblock %}


org.chromium.sdk
Class CallbackSemaphore
java.lang.Object
org.chromium.sdk.CallbackSemaphore
- All Implemented Interfaces:
- SyncCallback
public class CallbackSemaphore
- extends java.lang.Object
- implements SyncCallback
Convenient implementation of SyncCallback
. Client may create one,
then call asynchronous command, and finally wait on blocking method
#tryAcquire()
or acquireDefault(org.chromium.sdk.RelayOk)
.
Class uses symbolic parameter RelayOk
in its methods that suggests that
user should first call some asynchronous method, then pass it to the acquire method.
|
Method Summary |
void |
acquireDefault(RelayOk relayOk)
|
void |
callbackDone(java.lang.RuntimeException e)
Implementation of SyncCallback#callbackDone(RuntimeException) . |
boolean |
tryAcquire(long timeout,
java.util.concurrent.TimeUnit unit)
Tries to acquire the semaphore. |
boolean |
tryAcquireDefault(RelayOk relayOk)
Tries to acquire semaphore with some reasonable default timeout. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OPERATION_TIMEOUT_MS
public static final long OPERATION_TIMEOUT_MS
- See Also:
- Constant Field Values
CallbackSemaphore
public CallbackSemaphore()
tryAcquireDefault
public boolean tryAcquireDefault(RelayOk relayOk)
throws MethodIsBlockingException
- Tries to acquire semaphore with some reasonable default timeout.
- Parameters:
relayOk
- symbolic return value from the asynchronous operation that we are waiting for
- Returns:
- false if
#OPERATION_TIMEOUT_MS
was exceeded and we gave up
- Throws:
MethodIsBlockingException
- if called from a callback
acquireDefault
public void acquireDefault(RelayOk relayOk)
throws MethodIsBlockingException
- Parameters:
relayOk
- symbolic return value from the asynchronous operation that we are waiting for
- Throws:
MethodIsBlockingException
tryAcquire
public boolean tryAcquire(long timeout,
java.util.concurrent.TimeUnit unit)
throws MethodIsBlockingException
- Tries to acquire the semaphore. This method blocks until the semaphore is
released; typically release call comes from a worker thread of
org.chromium.sdk, the same thread that may call all other callbacks.
It is vital not to call this method from any callback of org.chromium.sdk,
because it's a sure deadlock.
To prevent, this the method declares throwing
MethodIsBlockingException
which is symbolically thrown whenever
someone violates this rule (i.e. invokes this method from a callback).
Though currently nobody actually throws it, such declarations help to
track blocking methods.
- Returns:
- false if
timeout
was exceeded and we gave up
- Throws:
MethodIsBlockingException
- if called from a callback
callbackDone
public void callbackDone(java.lang.RuntimeException e)
- Implementation of
SyncCallback#callbackDone(RuntimeException)
.
- Specified by:
callbackDone
in interface SyncCallback
- Parameters:
e
- an exception main callback raised or null if none is reported


According to research from the Ivory Tower, the established theory is that Kamaloka is from a dimensional overlapping in Aden's land. Kamaloka has stages of power based on the strength of a monster's soul. This is cutting edge science, and we don't fully understand it. So we introduce adventurers to Kamaloka that's appropriate for them.
Levels of Kamaloka notified by each captain are as follows.
Captain Bathis (Town of Gludio): levels 23, 26, 29
Captain Lucas (Town of Dion): levels 33, 36, 39
Captain Gosta (Heines): levels 43, 46, 49
Captain Mouen (Town of Oren): levels 53, 56, 59
Captain Vishotsky (Town of Schuttgart): levels 63, 66, 69
Captain Mathias (Town of Rune): levels 73, 78, 81, 83


My name is Derrick Lieu. I'm a first-generation Vietnamese-Chinese American and a 4th year Human-Computer Interaction major at UC San Diego.
I really enjoy learning about design principles and tools (through youtube tutorials mostly) and aspire to become a visual designer who specializes in all aspects branding/rebranding. Truth be told, outside of design and school, I am a complete cinephile (having watched
over 400 films, over half of that in the last two years). My favorite movies are In the Mood for Love , Eternal Sunshine of the Spotless Mind , and
Synedoche, New York although I have a love for many more. Along with film, I love fashion, specifically streetwear because it acts as
perfect outlet of expression and creativity for me. If you share a passion with design, film, or streetwear, let's chat! :)
Below, you'll find my resume!


This store uses the `localStorage` driver for persistence.
Toggle the checkbox and see the data persist to the next page load.
This store uses the `sessionStorage` driver for persistence.
Toggle the checkbox and see the data persist to the next page load.


This is the example of the tasks. We recorded the contents of each cell. The audio is in the order of each line, such as the order is A1, A2, A3, A4, B4, C4, A5, B5, C5.... The content in the cell may be empty. In real task, there is no picture, only listen to audio to answer the question.


|
Assimp
5.0.1, master @ cd42b955
|
Helper class for the 3DS and ASE loaders to compute camera and spot light animations. More...
Public Member Functions | |
| TargetAnimationHelper () | |
| void | Process (std::vector< aiVectorKey > *distanceTrack) |
| Computes final animation channels. More... | |
| void | SetFixedMainAnimationChannel (const aiVector3D &fixed) |
| Sets the main animation channel to a fixed value. More... | |
| void | SetMainAnimationChannel (const std::vector< aiVectorKey > *objectPositions) |
| Sets the main animation channel. More... | |
| void | SetTargetAnimationChannel (const std::vector< aiVectorKey > *targetPositions) |
| Sets the target animation channel. More... | |
Private Attributes | |
| aiVector3D | fixedMain |
| const std::vector< aiVectorKey > * | objectPositions |
| const std::vector< aiVectorKey > * | targetPositions |
Helper class for the 3DS and ASE loaders to compute camera and spot light animations.
3DS and ASE store the differently to Assimp - there is an animation channel for the camera/spot light itself and a separate position animation channels specifying the position of the camera/spot light look-at target
|
inline |
| void TargetAnimationHelper::Process | ( | std::vector< aiVectorKey > * | distanceTrack | ) |
Computes final animation channels.
| distanceTrack | Receive camera translation keys ... != nullptr. |
| void TargetAnimationHelper::SetFixedMainAnimationChannel | ( | const aiVector3D & | fixed | ) |
Sets the main animation channel to a fixed value.
| fixed | Fixed value for the main animation channel |
| void TargetAnimationHelper::SetMainAnimationChannel | ( | const std::vector< aiVectorKey > * | objectPositions | ) |
Sets the main animation channel.
| objectPositions | Translation channel |
| void TargetAnimationHelper::SetTargetAnimationChannel | ( | const std::vector< aiVectorKey > * | targetPositions | ) |
Sets the target animation channel.
This channel specifies the position of the camera/spot light target at a specific position.
| targetPositions | Translation channel |
|
private |
|
private |
|
private |


--- layout: default ---
sensors.AFRICA is a citizen science-focused project by Code for Africa that seeks to address data gaps by providing low cost sensors, which people can use to measure and monitor the quality of the air and water in their communities.
Air Quality Map . Air Quality Raw Data
We will be launching soon. Sign up to receive updates as we build a transnational and pan-African network of citizen sensors:
* We never spam and you can opt out at any time.


We are still preparing the text of our terms and conditions; when LiMA is released, the first time you come back you will be prompted to check and agree with the terms and conditions.
For now, please try to break stuff so we can improve it.


Police watchdog to probe fatal shooting of state prosecutor
by Algoa FMThe Independent Police Investigative Directorate (IPID) on Wednesday said it was investigating the alleged accidental shooting death of KZN-based senior state advocate Addelaid Ferreira-Watt.
Ferreira-Watt was shot in the hip on Monday in court when a shotgun that was to be presented as evidence was discharged by a police officer.
"IPID is investigating the matter and further updates will be provided when available," IPID spokesperson Sontaga Seisa said.
The firearm had reportedly been stolen in a robbery, was returned to the couple that was robbed, and was later collected by police to be presented as evidence in court.
- African News Agency (ANA)


Select this checkbox to show the hierarchy of tags highlighted with different colors. If this option is enabled, you can define the following options:
Highlighting is activated when there is more than one tag with the same name in the hierarchy.


An SSL-enabled server often supports SSL in two ways. In the most basic way, the server supports SSL ports in addition to normal (unprotected) ports. The other way in which a server supports SSL is via the use of the Start TLS Extension (RFC 2830). This option is available only to LDAP v3 servers and is described in detail in the section.
By default, Sun's LDAP service provider uses plain sockets when communicating with the LDAP server. To request that SSL sockets be use, set the Context.SECURITY_PROTOCOL property to "ssl".
In the following example, the LDAP server is offering SSL at port 636. To run this program, you must enable SSL on port 636 on your LDAP server. This procedure is typically carried out by the directory's administrator.
For the Sun Java Directory Server, v5.2, use the Manage Certificates tool in the Administration Console to generate a Certificate Signing Request (CSR). Submit the CSR to a CA to obtain an X.509 SSL server certificate. Using the Administration Console, add the certificate to the server's list of certificates. Also install the CA's certificate if it is not already in the server's list of trusted CAs. Enable SSL by using the Configuration tab in the Administration Console. Select the server in the left pane. Select the Encryption tab in the right pane. Click the checkboxes for "Enable SSL for this server" and "Use this cipher family: RSA", ensuring that the server certificate you have added is in the list of certificates.
Client Requirements: You need to ensure that the client trusts the LDAP server that you'll be using. You must install the server's certificate (or its CA's certificate) in your JRE's database of trusted certificates. Here is an example.
# cd JAVA_HOME/lib/security # keytool -import -file server_cert.cer -keystore jssecacerts
// Set up the environment for creating the initial context Hashtable<String, Object> env = new Hashtable<String, Object>(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://localhost:636/o=JNDITutorial"); // Specify SSL env.put(Context.SECURITY_PROTOCOL, "ssl"); // Authenticate as S. User and password "mysecret" env.put(Context.SECURITY_AUTHENTICATION, "simple"); env.put(Context.SECURITY_PRINCIPAL, "cn=S. User, ou=NewHires, o=JNDITutorial"); env.put(Context.SECURITY_CREDENTIALS, "mysecret"); // Create the initial context DirContext ctx = new InitialDirContext(env); // ... do something useful with ctx
In the following example, the LDAP server is offering SSL at port 636. To run this program, you must enable SSL on port 636 on your LDAP server.
// Set up the environment for creating the initial context Hashtable<String, Object> env = new Hashtable<String, Object>(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); // Specify LDAPS URL env.put(Context.PROVIDER_URL, "ldaps://localhost:636/o=JNDITutorial"); // Authenticate as S. User and password "mysecret" env.put(Context.SECURITY_AUTHENTICATION, "simple"); env.put(Context.SECURITY_PRINCIPAL, "cn=S. User, ou=NewHires, o=JNDITutorial"); env.put(Context.SECURITY_CREDENTIALS, "mysecret"); // Create the initial context DirContext ctx = new InitialDirContext(env); // ... do something useful with ctx
The following example is like the previous SSL example, except that instead of using simple authentication, it uses the External SASL authentication. By using External, you do not need to supply any principal or password information, because they get picked up from the SSL.
Client Requirements: This example requires the client to have an X.509 SSL client certificate. Moreover, the certificate must be stored as the first key entry in a keystore file. If this entry is password-protected, it must have the same password as the keystore. For more information about JSSE keystores, see the Java Secure Socket Extension (JSSE) Reference Guide.
// Set up the environment for creating the initial context Hashtable<String, Object> env = new Hashtable<String, Object>(11); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://localhost:636/o=JNDITutorial"); // Principal and credentials will be obtained from the connection env.put(Context.SECURITY_AUTHENTICATION, "EXTERNAL"); // Specify SSL env.put(Context.SECURITY_PROTOCOL, "ssl"); // Create the initial context DirContext ctx = new InitialDirContext(env); ...
java -Djavax.net.ssl.keyStore=MyKeystoreFile \ -Djavax.net.ssl.keyStorePassword=mysecret \ External
If you do not supply a keystore, the program will run using anonymous authentication because no client credential exists at the SSL.
This example shows the most basic way to accomplish certificate-based client authentication. More advanced ways can be accomplished by writing and using a custom socket factory that accesses the client certificate in a more flexible manner, perhaps by using an LDAP directory. The next section shows how to use a custom socket factory with your JNDI application.
Here is an example of a custom socket factory that produces plain sockets.
public class CustomSocketFactory extends SocketFactory { public static SocketFactory getDefault() { System.out.println("[acquiring the default socket factory]"); return new CustomSocketFactory(); } ... }
To use this custom socket factory with a JNDI program, set the "java.naming.ldap.factory.socket" property, as shown in the following example.
// Set up the environment for creating the initial context Hashtable<String, Object> env = new Hashtable<String, Object>(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://localhost:389/o=JNDITutorial"); // Specify the socket factory env.put("java.naming.ldap.factory.socket", "CustomSocketFactory"); // Create the initial context DirContext ctx = new InitialDirContext(env); // ... do something useful with ctx
The "java.naming.ldap.factory.socket" property is useful for setting the socket factory on a per context basis. Another way to control the sockets used by the LDAP service provider is to set the socket factory for all sockets used in the entire program, by using java.net.Socket.setSocketImplFactory(). Use of this method is less flexible because it affects all socket connections, not just LDAP connections and therefore, should be used with care.


:: Visual Builders ::
Find here a list of visual builder tools that support the JGoodies FormLayout.
These vary in price, concepts, general features, visual feedback,
and support for additional Forms features like factories and non-visual builders.
Commercial Builders
JFormDesigner
is an advanced visual designer that supports the FormLayout and other
layout managers. It supports several Forms helper classes.
Plug-ins for Eclipse and IntelliJ IDEA are available, plug-ins
for NetBeans, JDeveloper, and JBuilder are under development.
Mindsilver's GUIDE is an advanced
GUI builder for Swing.
Intellij IDEA
includes an advanced GUI designer that support the JGoodies FormLayout
and other layout managers.
JAXFront
generates dynamic user interfaces based on an XML schema.
The Jigloo
GUI builder is a plugin for Eclipse and WebSphere Studio.
It supports the FormLayout and other layout managers.
Jigloo is free for non-commercial use, but commercial use requires
purchasing a Professional License.
Free Builders
Google's WindowBuilder Pro
is an advanced visual designer for Swing and SWT that supports
the FormLayout and the Forms helper classes, as well as a bunch of
other layout managers for Swing and SWT. The WindowBuilder Pro
comes as an Eclipse plugin.
Abeille Forms Designer
is a GUI builder that supports the FormLayout.
Form Layout Maker
supports the FormLayout and generates XML files that contain all constraints.
The Mogwai FormMaker
is another visual form editing tool for developing Swing forms using the JGoodies FormLayout.
|


|
||||||||||
| PREV LETTER NEXT LETTER | FRAMES NO FRAMES |
DatabaseOp
that can be used directly in the FROM clause of a
SQL join.SQLIterator.next()
instead
NodeMaker
s corresponding to ResourceMap
s
in a D2RQ mapping.DatabaseOp
associated with a number of named NodeMaker
s.NodeRelation
by one of its variables.NodeRelation
.NodeRelation
s.Node
s.
|
||||||||||
| PREV LETTER NEXT LETTER | FRAMES NO FRAMES |


Verified Person Credential
Please download a digital wallet before using this service. You must also have test BC Services Mobile app data. If you need that, please contact [details TBD].
This is a Proof of Concept service operated for the purposes of the Business Banking Initiative. It demonstrates how an individual can receive a verifiable credential issued by an authority (the Government of BC) containing information that authority knows about you. That information matches exactly the information that you might see on a BC Services Card.
To receive your verified person credential you must first identify yourself in the service. The test BC Services Mobile app is used to do that for this service. When you proceed you will be asked for your BC Services Mobile app test account. Provide that, information will be collected about you from the BC Services card app, and then that same data will be offered to you as a verifiable credential.
When the QR code to receive your digital credential is displayed, use your digital wallet app (you have one right? If not, please download a digital wallet) to scan the code and follow the instructions in your wallet app.
Two final notes:
- If you have been given a BC Services 'Virtual Card' username and password for this demo, select 'Virtual card testing' on the next screen.
- In your wallet app, if you encounter a network error during the demo, you may need to choose the 'Sovrin Staging' network in the wallet app.


Not many people have successfully reached the top of Khufu's Great Pyramid since climbing it was banned. Some Russians became an internet sensation for climbing about six months ago. Most other blog posts were written before the recent Egyptian political mess (and subsequent collapse of the tourist industry), and don't accurately reflect the situation on the ground. Climbers report dangerous ascents, recommend sleeping in graves to avoid the park guards, and inform us that the safest place to climb is the South West corner of the Pyramid. Almost all climbers are caught on the way down, but all quickly released after they've paid the necessary "fines".
These rumors are coalescing into a semi-coherent picture of our eventual ascent. Supposedly, the Japanese have pioneered pyramid climbing, and we find an archived blog post that makes reference to a Japanese hostel in Cairo named "Safary". This hostel is supposed to possess a book assembled by climbers that recounts their experiences on the pyramid. My Japanese is passable, so we arrange a room in the hostel (advertised as having free tea and a "manga library"). We hop on our flight from Hargeisa, Somalia, to Cairo, Egypt.
Cairo turns out to be a dirtier version of Beirut. The hostel is correspondingly run-down. But that doesn't matter, we're only here to climb. Within fifteen minutes of checking-in I'm noticing my first mosquito bites. The receptionist, a young quadrilingual Egyptian man (English, Arabic, Mandarin, and Japanese) is polite, but doesn't know anything about pyramid climbing. I try out some of my Japanese, but the other guests are equally naive about pyramid climbing. The manga library lacks any reference to a climbing book, our internet sources are failing, and it seems that we'll be climbing without any local insight.
We catch a few hours of sleep and wake up at around 8AM.  The bus takes us to El Giza, and as soon as the bus doors slam shut behind us an assortment of different scammers descend upon us.

Not wanting to pay the $10 entrance fee, Eason and I decide to walk along the perimeter of the fence to try and find a way inside. This method worked well for us when we entered Varosha, and people on the internet report numerous holes in the wall, a product of the slums that ring the plateau.
Giza Map, from Wikipedia. A fence encircles the entire Giza Plateau. The main entrance is to the North. I tried to find in a hole in the fence near the village (indicated in dark yellow) to the East, but failed. My route up the pyramid is in black, and my return route is in red.
The great pyramid is looming in the distance as we head for the slums. Every two minutes someone offers me a camel ride or a child tries to press a trinket into my hand. As we head deeper into the slums the number of scammers decreases, and eventually we encounter the wall. Things don't look good. We'd initially hoped to find some nice location to sneak through, giving us the option to return in the night after all the tourists had left, but it looks like the government has beefed up security. The wall is tall and imposing. The bottom half is concrete, the top chain-link. It’s topped off with CCTV cameras and an extra sprinkling of barbed wire.
Giza closes at 4PM, and sundown is at 6, so it looks like we'll need to camp in the park for at least two hours before climbing. We manage to buy cardboard, more water bottles, and some falafel balls. But when we stuff them into our cheap Chinese backpack the seams begin splitting. So we find clear tape and seal the pack shut. Looking rather sketchy, wearing a tiny pink backpack overflowing with cardboard and taped shut, the number of people offering us camel rides dramatically decreases. No more children approach me with trinkets. In this place money can be smelled, and my pungency as a tourist seems to have been temporarily mediated.
We retrace our steps through the slums and enter the park. Collectively $20 poorer, we snap some photos and have a genuine tourist experience. Inside the park you’re forced to wrestle with some uncomfortable thoughts. Why are we doing this? Are we no better than these tourists who don’t know the difference between salaam and salami? Maybe in a few years they'll start selling ad space on the pyramids, and eventually they'll be bulldozed by Disneyland and turned into a theme park. Welcome to Egypt-Land, home of naive fantasies about the Ancient World, $5 soft drinks, and all the pita chips you can eat.
But Eason and I didn’t want to think too deeply. It’s important not to be too self-critical when you’re breaking the law.
At the smaller pyramid a guy dressed as a security guard approached us. ‘Want to go inside pyramid?’ he asked. The man is missing an eye. ’He's obviously not a real security guard’, Eason says to me under his breath. But I'm curious about what the man wants to show us, so I follow him down into a maze-like network of graves in the shadow of the pyramid. The area is abandoned, Eason is following behind at a very safe distance, but I'm not particularly worried about my safety--the guy is a head and a half shorter than me.
Down in the labyrinth the security guy begins politely asking for baksheesh. ’Baksheesh’ is a term used across the Middle East and South Asia to refer to payment for an illicit or semi-illicit service, but I'm saving my bribery for later in the night.
After repeating his request for baksheesh a few more times he's chased away by a guy in a long silvery robe. He introduces himself as ‘an important government man’ and says that I can climb the (small) pyramid for $50. One scammer has been replaced by another, but I'm a good sport, and before ditching the man I manage to bargain him down to $10. Bargaining is a hobby of mine. He follows me as I walk away from him, but suddenly stops his pursuit when Eason and I turn a corner to another face of the pyramid: actual pyramid guards are lurking on that side, and like a vampire fleeing from the sun, the faux ‘government man’ can't enter their presence.
We wander back towards the great pyramid and enter the graves to the pyramid's west. These are tall walls of stone that have plenty of crannies to hide in. Most climbers find a grave and camp for the night, waiting until well after dark before beginning their journey.
One of the tombs was thrown open, a yawning rectangular opening at the bottom of a depression in the sand, its maw shrouded in shadow. It was like something from an Indiana Jones movie, except that after I walked down to explore, the tomb turned out to be filled with soda bottles instead of snakes. If necessary, we’d hide in there.
We lay down our cardboard between two of the stone walls adjacent to the opening and begin our wait. At about 3:30PM a guy passes by us, and our confidence plunges: we assume that the park must be crawling with guards. We guess that there will be guards patrolling the tombs to chase away stray tourists. However, our fears turn out to be unfounded: 4:00 comes and goes, then 5:00, then 5:30.
Impatience gets the best of us, and we abandon our camping spot to move closer to the pyramid. The sun is sinking below the horizon, and the air is getting cold. We spent another twenty minutes scouting the road that separates the graveyard from the pyramid, but don't see any guards.
Eason Hiding in the Western Cemetery
At around 5:50PM, a few minutes after sundown, we dash across the road to reach the South West corner. There are no guards in sight, and we scramble up the first few blocks. The bottom blocks are larger than the ones further up, and after about ten blocks or so we begin to get into a rhythm. However, our rhythm is quickly broken when we see headlights below us. We both lay prone and watch the headlights approach.
The headlights turn out to actually be a single light, which belongs to motorcycle. The bike parks next to a shack and the rider gets off. He enters the shack, turns on the lights, and begins talking to someone inside. Sound travels really far in the empty desert night. We had passed near the shack on our dash across the road, assuming it to be abandoned, and now we're feeling lucky to not have roused the guard.
More cars travel down the road towards the shack, and two people approach on foot. Either infrared cameras have already observed our presence and these people are assembling to arrest us, or the guards are having a change of shift. Not wanting to abandon our climb, we assume the latter, and wait for the guards to disperse before continuing.
A few blocks up we encounter another problem. In the distance we see that the pyramid of Khafre is illuminated: the light show has begun. If spotlights get pointed at us, our chances of being caught will increase dramatically. We debate our options and the decide to continue the climb. But moments later the spotlights shine on our face of the pyramid. We’re illuminated. We huddle against the face of a stone block and freeze. Tiny spots against the massive and uneven surface of the structure, our chances of being seen by spectators kilometers in the distance is unlikely; however, any guards chancing to look upwards would certainly notice us.
The light show turns our ascent into a game of red-light green-light.
We're engaged in a game of red-light green-light. Our climb pauses whenever headlights pass below us or spotlights illuminate the South West corner.
As we got closer to the pyramid’s apex I could feel the cold desert air on my skin. When I turned my head I could see faint urban lights on the ground below. But I absolutely refused to look down. Even though Eason was a few blocks below me, I couldn’t make myself look down to speak to him--we would only talk during breaks while resting on the same block.
The pyramid rises at an angle of about 45 degrees. 45 degrees doesn’t seem that steep if you look at it on a protractor. But when you’re hugging the side of a pyramid, that’s an angle steep enough to make the horizon vanish below you, creating the illusion of a perpetual vertical drop.
Even though things got trickier near the summit, I guess the adrenaline let me fight through the fear--I was never paralyzed, like I usually am by heights.
But after an hour I scrambled ungraciously onto the pyramid’s apex like a gravity-defying slinky moving up a flight of stairs. I crawl on my stomach to the center of the pyramid’s flat top. Eason was a few seconds behind me, rising to his feet and making a more dignified victory procession.
As I admired the new bruises that were forming on my arms, I took the chance to admire the graffiti. the pyramid was covered with it, chiseled into every surface. I don’t know how many generations of people had been leaving their mark up here, but I decided to take out my pen and leave a mark of my own.
We paced back and forth. Cairo was like a constellation on the ground, flooding the Nile river valley with yellow light. This is one of the coolest things I've ever done. Right now there are people sipping $20 margaritas on a beach in Florida, screaming at their children for eating too many Skittles from the hotel mini-bar, or pretending that driving through Arizona in an air-conditioned minivan is exotic, and I've just climbed to the top of the world's largest ancient megastructure.
Giza and Cairo in the distance.
We take pictures. After about a half hour we begin the descent. At first it's absolutely terrifying, but Eason I are both 6'6", so we're able to essentially crab-walk down, rolling our backs against the corner of each block, acquiring even more bruises.
The top. Three wooden beams intersect above me to form faux-crown for the Pyramid. The top of the structure was flattened when marble was looted from the structure's exterior.
The light show still isn't over, and we need to hide for a few more times. Near the bottom we pause to update our plans: we'll wait for the next patrol to pass and then dash back to our previous hiding place in the Western Cemetery. From there we'll walk parallel to the main road until we reach the entrance. Our story will be that we stayed in the park to watch the light show, and Eason takes a number of pictures of the pyramids to corroborate our tale.
Everything goes perfectly. We encounter a few guards on the way out and greet them with salaam aleikums. They smile and wave us through. On the walk back Eason pulls out his cell phone and books us tickets to Athens. The flight departs in five hours. We return to the hostel, brag a little bit, gather our bags, and take a taxi to the airport.
December 05, 2014


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.simpleframework.http.RequestWrapper
public class RequestWrapper
The RequestWrapper
object is used so that the original
Request
object can be wrapped in a filtering proxy
object. This allows a Container
that interacts with
a modified request object. To add functionality to the request it
can be wrapped in a subclass of this and the overridden methods
can provide modified functionality to the standard request.
| Field Summary | |
|---|---|
protected Request |
request
This is the request instance that is being wrapped. |
| Constructor Summary | |
|---|---|
RequestWrapper(Request request)
Constructor for RequestWrapper object. |
| Method Summary | |
|---|---|
boolean |
contains(java.lang.String name)
This is used to see if there is a HTTP message header with the given name in this container. |
Address |
getAddress()
This is used to acquire the address from the request line. |
java.lang.Object |
getAttribute(java.lang.Object key)
This is used as a shortcut for acquiring attributes for the response. |
java.util.Map |
getAttributes()
This can be used to retrieve the response attributes. |
java.nio.channels.ReadableByteChannel |
getByteChannel()
This is used to read the content body. |
java.net.InetSocketAddress |
getClientAddress()
This is used to acquire the remote client address. |
java.lang.String |
getContent()
This is used to get the content body. |
int |
getContentLength()
This is a convenience method that can be used to determine the length of the message body. |
ContentType |
getContentType()
This is a convenience method that can be used to determine the content type of the message body. |
Cookie |
getCookie(java.lang.String name)
This is used to acquire a cookie usiing the name of that cookie. |
java.util.List<Cookie> |
getCookies()
This is used to acquire all cookies that were sent in the header. |
long |
getDate(java.lang.String name)
This can be used to get the date of the first message header that has the specified name. |
Form |
getForm()
This is used to acquire all the form parameters from the HTTP request. |
java.io.InputStream |
getInputStream()
This is used to read the content body. |
int |
getInteger(java.lang.String name)
This can be used to get the integer of the first message header that has the specified name. |
java.util.List<java.util.Locale> |
getLocales()
This is used to acquire the locales from the request header. |
int |
getMajor()
This can be used to get the major number from a HTTP version. |
java.lang.String |
getMethod()
This can be used to get the HTTP method for this request. |
int |
getMinor()
This can be used to get the major number from a HTTP version. |
java.util.List<java.lang.String> |
getNames()
This method is used to get a List of the names
for the headers. |
java.lang.String |
getParameter(java.lang.String name)
This is used to provide quick access to the parameters. |
Part |
getPart(java.lang.String name)
This method is used to acquire a Part from the
form using a known name for the part. |
Path |
getPath()
This is used to acquire the path as extracted from the HTTP request URI. |
Query |
getQuery()
This method is used to acquire the query part from the HTTP request URI target. |
Session |
getSession()
This method is used to acquire a Session for the
request. |
Session |
getSession(boolean create)
This method is used to acquire a Session for the
request. |
java.lang.String |
getTarget()
This can be used to get the URI specified for this HTTP request. |
java.lang.String |
getValue(java.lang.String name)
This can be used to get the value of the first message header that has the specified name. |
java.util.List<java.lang.String> |
getValues(java.lang.String name)
This can be used to get the values of HTTP message headers that have the specified name. |
boolean |
isKeepAlive()
This is a convenience method that is used to determine whether or not this message has the Connection: close
header. |
boolean |
isSecure()
This is used to determine if the request has been transferred over a secure connection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Request request
| Constructor Detail |
|---|
public RequestWrapper(Request request)
RequestWrapper
object. This allows
the original Request
object to be wrapped so that
adjustments to the behavior of a request object handed to the
container can be provided by a subclass implementation.
request
- the request object that is being wrapped| Method Detail |
|---|
public int getMajor()
getMajor
in interface RequestLine
public int getMinor()
getMinor
in interface RequestLine
public java.lang.String getMethod()
getMethod
in interface RequestLine
public java.lang.String getTarget()
getTarget
in interface RequestLine
public Address getAddress()
getAddress
in interface RequestLine
public Path getPath()
Path
object that is provided by
this method is immutable, it represents the normalized path
only part from the request uniform resource identifier.
getPath
in interface RequestLine
public Query getQuery()
getQuery
in interface RequestLine
public java.util.List<java.lang.String> getNames()
List
of the names
for the headers. This will provide the original names for the
HTTP headers for the message. Modifications to the provided
list will not affect the header, the list is a simple copy.
getNames
in interface RequestHeader
public int getInteger(java.lang.String name)
getInteger
in interface RequestHeader
name
- the HTTP message header to get the value from
public long getDate(java.lang.String name)
getDate
in interface RequestHeader
name
- the HTTP message header to get the value from
public Cookie getCookie(java.lang.String name)
Cookie
object. Otherwise this method will
return null. Each cookie object will contain the name, value
and path of the cookie as well as the optional domain part.
getCookie
in interface RequestHeader
name
- this is the name of the cookie object to acquire
public java.util.List<Cookie> getCookies()
Cookie
objects. Otherwise this method will an
empty list. Each cookie object will contain the name, value and
path of the cookie as well as the optional domain part.
getCookies
in interface RequestHeader
public java.lang.String getValue(java.lang.String name)
getValue
in interface RequestHeader
name
- the HTTP message header to get the value from
public java.util.List<java.lang.String> getValues(java.lang.String name)
substring
and trim
calls.
The tokens returned by this method are ordered according to there HTTP quality values, or "q" values, see RFC 2616 section 3.9. This also strips out the quality parameter from tokens returned. So "image/html; q=0.9" results in "image/html". If there are no "q" values present then order is by appearence.
The result from this is either the trimmed header value, that is, the header value with no leading or trailing whitespace or an array of trimmed tokens ordered with the most preferred in the lower indexes, so index 0 is has higest preference.
getValues
in interface RequestHeader
name
- the name of the headers that are to be retrieved
public java.util.List<java.util.Locale> getLocales()
Accept-Language
header.
This provides an indication as to the languages that the client
accepts. It provides the locales in preference order.
getLocales
in interface RequestHeader
public boolean contains(java.lang.String name)
contains
in interface RequestHeader
name
- the HTTP message header to get the value from
public ContentType getContentType()
Content-Type
header, if there is then
this will parse that header and represent it as a typed object
which will expose the various parts of the HTTP header.
getContentType
in interface RequestHeader
public int getContentLength()
Content-Length
header, if it does then the
length can be determined, if not then this returns -1.
getContentLength
in interface RequestHeader
public boolean isSecure()
isSecure
in interface Request
public boolean isKeepAlive()
Connection: close
header. If the close token is present then this stream is not
a keep-alive connection. If this has no Connection
header then the keep-alive status is determined by the HTTP
version, that is, HTTP/1.1 is keep-alive by default, HTTP/1.0
is not keep-alive by default.
isKeepAlive
in interface Request
public java.util.Map getAttributes()
getAttributes
in interface Request
public java.lang.Object getAttribute(java.lang.Object key)
Map
in order to retrieve the attribute directly from that object.
The attributes contain data specific to the response.
getAttribute
in interface Request
key
- this is the key of the attribute to acquire
public java.net.InetSocketAddress getClientAddress()
getClientAddress
in interface Request
public java.lang.String getContent() throws java.io.IOException
getContent
in interface Request
java.io.IOException
- signifies that there is an I/O problempublic java.io.InputStream getInputStream() throws java.io.IOException
InputStream
can be determined
by the getContentLength
method. If the data sent by
the client is chunked then it is decoded, see RFC 2616 section
3.6. Also multipart data is available as Part
objects
however the raw content of the multipart body is still available.
getInputStream
in interface Request
java.lang.Exception
- signifies that there is an I/O problem
java.io.IOException
public java.nio.channels.ReadableByteChannel getByteChannel() throws java.io.IOException
ReadableByteChannel
can be
determined by the getContentLength
method. If the
data sent by the client is chunked then it is decoded, see RFC
2616 section 3.6. This stream will never provide empty reads as
the content is internally buffered, so this can do a full read.
getByteChannel
in interface Request
java.io.IOException
public Session getSession() throws LeaseException
Session
for the
request. The object retrieved provides a container for data
associated to the connected client. This allows the request
to perform more complex operations based on knowledge that is
built up through a series of requests. The session is known
to the system using a Cookie
, which contains
the session reference. This cookie value should not be
modified as it used to reference the active session object.
getSession
in interface Request
LeaseException
public Session getSession(boolean create) throws LeaseException
Session
for the
request. The object retrieved provides a container for data
associated to the connected client. This allows the request
to perform more complex operations based on knowledge that is
built up through a series of requests. The session is known
to the system using a Cookie
, which contains
the session reference. This cookie value should not be
modified as it used to reference the active session object.
getSession
in interface Request
create
- creates the session if it does not exist
LeaseException
public Form getForm() throws java.io.IOException
getForm
in interface Request
java.io.IOException
- thrown if it could not be acquiredpublic java.lang.String getParameter(java.lang.String name) throws java.io.IOException
Form
object.
This basically acquires the parameters object and invokes
the getParameters
method with the given name.
getParameter
in interface Request
name
- this is the name of the parameter value
java.io.IOException
- thrown if there is an I/O problempublic Part getPart(java.lang.String name) throws java.io.IOException
Part
from the
form using a known name for the part. This is typically used
when there is a file upload with a multipart POST request.
All parts that are not files are added to the query values
as strings so that they can be used in a convenient way.
getPart
in interface Request
name
- this is the name of the part to acquire
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Install and configure Laravel in a Nginx / Fedora 20 environment.
Install and Configure Laravel with Nginx - Fedora 20
Difficulty: 3
Time: 20 minutes
Laravel is a framework used to create web applications.
Install dependencies
- Update your server from the
yum
repository.
sudo yum update
- Install Nginx.
sudo yum install nginx
- Install EPEL.
sudo rpm -v -h -i https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
- Install Git.
sudo yum install git
- Install PHP and related items.
sudo yum install php php-fpm php-cli php-mcrypt
Configure PHP
- Open the PHP initialization file for editing.
sudo vim /etc/php.ini
- Find the
cgi.fix_pathinfo
directive under the Paths and Directories
section, and modify the cgi.fix_pathinf
directive as follows:
cgi.fix_pathinfo=0
- Save and close the file.
- Open the PHP cofiguration file for editing.
sudo vim /etc/php-fpm.d/www.conf
- Find the
listen
directive, and set it as follows:
listen = /run/php-fpm/php-fpm.sock
- Find the
listen.owner
and listen.group
directives, and set them as follows:
listen.owner = nginx
listen.group = nginx
- Find the
user
and group
directives, and set them as follows:
user = nginx
group = nginx
- Save and close the file.
- Restart PHP.
sudo systemctl start php-fpm
Configure Nginx
- Create a physical location for the Laravel server.
sudo mkdir -p /var/www/laravel
- Open the Nginx configuration file for editing.
sudo vim /etc/nginx/nginx.conf
- Comment out the root directive,
and add a new one for Laravel.
# server context
server {
listen 80 default_server;
server_name localhost;
# root /usr/share/nginx/html;
root /var/www/laravel/public;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
- Save and close the file.
- Open the Nginx PHP server block configuration file for editing.
sudo vim /etc/nginx/default.d/php.conf
- Edit the
server
and location
contexts as follows (changes are bold italic):
# server context
index index.html index.htm;
#location context
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
- Save and close the file.
- Restart Nginx.
sudo systemctl restart nginx
Create a swap file
If your server does not have sufficient memory ( > 2GB) to handle the requirements of Composer and Laravel, you probably need to create a swap file.
- Create a 1GB file.
sudo fallocate -l 1G /myswapfile
- Format the file as swap space.
sudo mkswap /myswapfile
- Change permissions.
sudo chmod 0600 /myswapfile
- Turn on the file.
sudo swapon /myswapfile
Install Composer
Composer is a tool to manage the Laravel implementation.
- Navigate to your home directory, and run the Composer install script.
cd ~
curl -sS https://getcomposer.org/installer | php
The following displays:
All settings correct for using Composer
Downloading...
Composer successfully installed to: /home/randomcode/composer.phar
Use it: php composer.phar
- Change the name of the newly created
composer.phar
file to "composer".
sudo mv composer.phar /usr/local/bin/composer
Install Laravel
- Use Composer to retrieve and install Laravel into the directory created earlier.
sudo /usr/local/bin/composer create-project laravel/laravel /var/www/laravel 4.2
- Change the owner to "www-data".
sudo chown -R :nginx /var/www/laravel
- Change the permissions to allow www-data to write to the
app/storage
directory.
sudo chmod -R 775 /var/www/laravel/app/storage
- Verify success by navigating to yourcloudserver.
http://yourcloudserver.com
Conclusion
You have finished. Now you can use the Laravel framework to make beautiful apps.