Upgrade Guide 3.x
Edit3.3.0
The minimum Haxe version for this release is 3.1.0.
On flash, gamepad support has been added. For your project to work, you have to modify your Project.xml
so that either:
<set name="SWF_VERSION" value="11.8" />
is used (min. flash player version 11.8) or<haxedef name="FLX_NO_GAMEPAD" if="flash" />
is used.
When compiling to HTML5, make sure to remove <haxelib name="openfl" />
from your Project.xml
. This is already being handled in flixel's own include.xml
.
| HaxeFlixel 3.2.x | HaxeFlixel 3.3.0 |
|---|---|
| FlxTween.multiVar() | FlxTween.tween() |
| FlxTween.singleVar() | FlxTween.tween() |
| FlxTween.fader(0, 5); | FlxTween.tween(FlxG.sound, {volume: 0}, 5); |
| FlxSound.survive | FlxSound.persist |
| MouseEventManager.addSprite() | MouseEventManager.add() |
| FlxObject.forceComplexRender = true; | FlxObject.pixelPerfectRender = false; |
| FlxText.width | FlxText.fieldWidth |
| FlxSprite.setOriginToCenter() | FlxSprite.centerOrigin() |
| FlxG.safeDestroy() | FlxDestroyUtil.destroy() |
| FlxTilemap.scaleX | FlxTilemap.scale.x |
| FlxTilemap.scaleY | FlxTilemap.scale.y |
| sprite.animation.addByIndicies() | sprite.animation.addByIndices() |
| sprite.animation.addByStringIndicies() | sprite.animation.addByStringIndices() |
| FlxTimer.userData | removed |
| FlxTween.userData | removed |
| FlxG.sound.add() | FlxG.sound.cache() |
There has also been a slight optimization for simple FlxSprites in FLX_RENDER_BLIT
mode (flash and HTML5). This might require an additional dirty = true;
for the change to show up if you manipulate the sprite's BitmapData
directly.
FlxSprite flipping
Flipping sprite graphics now works differently - the flipped
variable has been removed, as well as the Reverse
parameter of loadGraphic()
and loadGraphicFromTexture()
. You can now directly manipulate the new flipX
and flipY
variables (flipping vertically is now possible).
If you want to continue to use facing
to flip the graphic (e.g. in a platformer), you can use the following logic:
sprite.setFacingFlip(FlxObject.RIGHT, false, false);
sprite.setFacingFlip(FlxObject.LEFT, true, false);
FlxTimer and FlxPath
FlxPath
and FlxTimer
were being pooled internally, which could lead to buggy behaviour in certain use cases. Due to that, pooling has been removed from these classes.
| HaxeFlixel 3.2.x | HaxeFlixel 3.3.0 |
|---|---|
| start() | new FlxTimer() / FlxPath() |
| run() | start() |
Also, the following API changes have been made for consistency:
| HaxeFlixel 3.2.x | HaxeFlixel 3.3.0 |
|---|---|
| paused | active |
| abort() | cancel() |
3.2.0
| HaxeFlixel 3.1.0 | HaxeFlixel 3.2.0 |
|---|---|
| FlxTween.multiVar(object, vars, duration, { delay: 1}); | FlxTween.multiVar(object, vars, duration, { startDelay: 1}); |
| FlxG.camera.followAdjust(4, 5); | FlxG.cameras.followLead.set(4, 5); |
| FlxTilemap.arrayToCSV() | FlxStringUtil.arrayToCSV() |
| FlxTilemap.bitmapToCSV() | FlxStringUtil.bitmapToCSV() |
| FlxTilemap.imageToCSV() | FlxStringUtil.imageToCSV() |
| FlxMath.computeVelocity() | FlxVelocity.computeVelocity() |
| FlxState.setSubState() | FlxState.openSubState() |
3.1.0
HaxeFlixel 3.1 is a continuization of our efforts of making the API cleaner and more intuitive, keeping the amount of bugs as low as possible and adding new features. It is one of the biggest releases so far.
This page is a summary of all breaking changes - for a more in-depth list of changes, please refer to the changelog.
FlxTypedButton
/ FlxButton
refactor
FlxTypedButton
has been completely refactored, which includes the following breaking API changes:
A new
FlxButtonEvent
class was added for the onDown, onUp, onOver and onOut events. Instead of thesetCallback()
-functions, you now set callbacks like this:button.onDown.callback = someFunction;
This class also contains a
sound
property:button.onDown.sound = FlxG.sound.load("pathToASound");
You might say: "What happened to custom callback arguments? The
callback
has the typeVoid->Void
!" While that's true, you can still use callback arguments by leveraging function binding:button.onDown.callback = someFunction.bind(1);
In that example,
someFunction
is of typeInt->Void
and will always be called with 1.labelOffset:FlxPoint
is now an array (labelOffsets:Array<FlxPoint>
) which uses the button status constants as indices for more control over the button position.- The highlight frame of the button spritesheet is now ignored by default on mobile devices, since it does not make much sense there - you can't hover over a button on a touchscreen.
- It is now possible to "swipe-press" a button, which means you can press it if the input (mouse or touch) has been moved over the button and then relased. Previously, you could only press a button if the press happened while you were already hovering over the button. This especially makes
FlxVirtualPad
more usable.
FlxG.keys and FlxG.keyboard
In 3.0.0, FlxG.keyboard has been introduced. However, we realized that this does not make for an intuitive API - you can't tell the difference between the two from their name alone. In fact, even if you have been using the two for a while, it still seems confusing.
This is why me merged the two classes again. This required removing the following functions:
FlxG.keyboard.pressed()
FlxG.keyboard.justPressed()
FlxG.keyboard.justReleased()
You should use the following functions instead:
FlxG.keys.anyPressed()
FlxG.keys.anyJustPressed()
FlxG.keys.anyJustReleased()
Please note that those functions take an Array<String>
instead of a variable amount of String
s. So the following...
if (FlxG.keyboard.pressed("LEFT", "RIGHT")) {}
...becomes:
if (FlxG.keys.anyPressed(["LEFT", "RIGHT"])) {}
FlxMouse refactor
The following breaking changes were made during the refactor of FlxMouse
:
| HaxeFlixel 3.0.x | HaxeFlixel 3.1.0 |
|---|---|
| FlxG.mouse.show(); | FlxG.mouse.visible = true; |
| FlxG.mouse.load(); | |
| FlxG.mouse.hide(); | FlxG.mouse.visible = false; |
| FlxState.useMouse | removed |
Also, the mouse cursor is now visible by default on non-mobile devices.
The middle and right click event listeners are now set up by default, which means FLX_MOUSE_ADVANCED
has turned into FLX_NO_MOUSE_ADVANCED
.
The recording system and FlxRandom
To put it bluntly... FlxRandom
was a bit of a mess in 3.0. Some of the functions were deterministic, others weren't, which as a result made it very difficult to create deterministic games suitable for the recording system.
In 3.1.0, FlxRandom
has been refactored to be completely deterministic. A new algorithm for pseudo-random-number-generation was implemented, which makes old replays incompatible / they will have unpredictable results.
Additionally, the following functions have been added to FlxRandom
:
weightedPick()
weightedGetObject()
colorExt()
FlxSprite renamings
A noteworthy amount of fields inside of FlxSprite
have been renamed to increase the consistency with other parts of the API:
| HaxeFlixel 3.0.x | HaxeFlixel 3.1.0 |
|---|---|
| loadfromSprite() | loadGraphicFromSprite() |
| setGraphicDimensions() | setGraphicSize() |
| bakedRotation | bakedRotationAngle |
| pixelsOverlapPoint() | overlapsPoint() |
| loadImageFromTexture() | loadGraphicFromTexture() |
| loadRotatedImageFromTexture() | loadRotatedGraphicFromTexture() |
| setColorTransformation() | setColorTransform() |
Scale Modes
HaxeFlixel 3.1.0 introduces scale modes to simplify targetting multiple resolutions. FlxG.scaleMode
can be an instance of the following classes:
RatioScaleMode
(default!)FillScaleMode
FixedScaleMode
RelativeScaleMode
StageSizeScaleMode
This change made FlxG.autoResize
obsolete and it has thus been removed.
You can also write a custom scale mode that extends BaseScaleMode
.
Be sure to check out the ScaleModes demo.
FlxTypedGroup.sort()
The way FlxTypedGroup.sort()
has been changed for a significant performance improvement. If you want to sort by y, you now have to use the following syntax:
group.sort(FlxSort.byY, FlxSort.ASCENDING);
Instead of:
group.sort("y", FlxSort.ASCENDING);
// or
group.sort();
If you want to sort by anything other than y
, you'll have to write a custom sorting function, as can be seen in this example:
function sortByAlpha(Order:Int, Sprite1:FlxSprite, Sprite2:FlxSprite):Int
{
return FlxSort.byValues(Order, Sprite1.alpha, Sprite2.alpha);
}
// usage on a FlxTypedGroup<FlxSprite>:
group.sort(sortByAlpha);
Other breaking changes
| HaxeFlixel 3.0 | HaxeFlixel 3.1 |
|---|---|
| FlxTypedGroup.autoReviveMembers | removed |
| FlxG.gameFramerate | FlxG.updateFramerate |
| FlxG.flashFramerate | FlxG.drawFramerate |
| FlxG.gamepads.get() | FlxG.gamepads.getByID() |
| FlxG.debugger.visualDebug | FlxG.debugger.drawDebug |
| FlxG.paused | removed (didn't have any functionality) |
| FlxArrayUtil.intToString() | FlxStringUtil.toIntArray() |
| FlxArrayUtil.floatToString() | FlxStringUtil.toFloatArray() |
| FlxMisc.openURL() | FlxG.openURL() |
| FlxMisc | removed |
| FlxSoundUtil | removed (use a FlxTimer instead) |
The classes from flixel.system.input
have been moved to flixel.input
.
FlxPoint
s in FlxObject
and FlxSprite
are now read-only / (default, null)
, which means you need to use .set() on them if you were previously creating new points. The following...
sprite.velocity = new FlxPoint(100, 50);
...becomes:
sprite.velocity.set(100, 50);
3.0.0
HaxeFlixel 3.0 is an evolution of the original Flixel API and while most of the API is very similar and quickly learnt, it requires some renames and modifications to update your code.
Major changes from version 2.10
We wanted to slim down up the core classes, which meant moving non-essential functionality into separate classes. We've also continued to focus on improving stability and adding features to the engine. Here's a quick overview of the biggest changes:
- Moved animation logic from FlxSprite, into new FlxAnimationController class. All animation logic is now accessed through mySprite.animation, eg:
mySprite.animation.add(...);
mySprite.animation.play(...);
mySprite.animation.frameName = "String";
mySprite.animation.frameIndex = Int;
//inspect the advanced api features such as
addByNames, addByStringIndicies, addByIndicies, addByPrefix, findSpriteFrame, randomFrame ...
Added new FlxKeyShortcuts class, which replaces FlxG.keys. FlxG.keys.pressed is no longer a function, it's now an object, ex:
if( FlxG.keys.pressed.ANY ) {...}
Added new FlxSpriteGroup class, which allows an FlxGroup to behave like an FlxSprite. This is a powerful new construct that will simplify building UI controls.
FlxU is now gone, we've moved all its functionality to several utility classes that specific contain functionality, ex: FlxArrayUtil, FlxAngle, FlxMath, FlxRandom, FlxSpriteUtil, FlxVelocity, etc.
FlxSprite Filters are now in a separate FlxSpriteFilter utility class.
Package Structure
HaxeFlixel no longer has an org
package. Everything is now included as flixel.package.Class
. For most cases you can just remove org.
from your import statements.
This was a decision the core developers agreed upon, to make the package structure simpler and detach HaxeFlixel from old flash conventions.
FrontEnds and the FlxG refactor
Frontends in HaxeFlixel 3.x are a new structure to the core of Flixel and which tackles the often criticized bloated collection of static methods in FlxG.
Frontends are accessed in FlxG.frontend
in a similar fasion to what Flixel devs are used to. Careful thought has been given to organise them into logical shortcuts. This way the api will be easier browse, remember and maintain.
For example in HaxeFlixel 2.x to add a FlxCamera
you would use FlxG.addCamera(camera:FlxCamera);
, this addCamera
method has been moved into a camera
frontend with all the other camera
related shortcuts.
So the code in HaxeFlixel 3.x to add a FlxCamera
is now FlxG.cameras.add(camera:FlxCamera)
.
The Flixel FrontEnds are as follows:
- FlxG.inputs
- FlxG.console
- FlxG.log
- FlxG.bmpLog
- FlxG.watch
- FlxG.debugger
- FlxG.vcr
- FlxG.bitmap
- FlxG.cameras
- FlxG.plugins
- FlxG.sound
More detail on the FrontEnds can be read on the FrontEnd docs page.
Core Assets
HaxeFlixel has system Assets for its debugger buttons, system sounds, etc. These assets were previously stored in every project in the assets/data folder. HaxeFlixel 3.x uses the OpenFL include.xml in core HaxeFlixel to omit the need to include them in every project.
So you do not need to have system assets anymore, everything in your project's ./assets/*
folder should only be the assets you create.
New Debugger and Interactive Console
HaxeFlixel 3.x includes a powerful console and improved debugger. The new debugger system by default redirects the core trace()
command to the log. Alternativley you can use FlxG.log.add()
, FlxG.watch.add()
, FlxG.log.warn
and more.
New Flixel Command Line Tools
Our command line tools have been moved to an optional repository, so the old haxelib run flixel new
command will not work.
Install the tools from haxelib just like flixel and run setup and follow the prompts:
haxelib install flixel-tools
haxelib run flixel-tools setup
Now you can use the commands with just flixel
, try the help command for more info.
flixel help
//see the new template tool options with:
flixel help template
//Shorthand version to create a template with a custom name
flixel tpl -n "CustomProject"
Automatic find and replace
A collection of most of the API name changes were collected for the flixel-tools command line tool. You can see what it replaces here.
To run the find and replace the command is simple:
flixel convert
FlxG Changes
The main changes that developers will notice are as follows:
| HaxeFlixel 2.x | HaxeFlixel 3.x |
|---|---|
| FlxG.getLibraryName() | FlxG.libraryName |
| FlxG.setDebuggerLayout | FlxG.debugger.setLayout |
| FlxG.log | trace() |
| FlxG.resetDebuggerLayout | FlxG.debugger.resetLayout |
| FlxG.visualDebug | FlxG.debugger.visualDebug |
| FlxG.toggleKeys | FlxG.debugger.toggleKeys |
| FlxG.DEBUGGER_STANDARD | FlxDebugger.STANDARD |
| FlxG.DEBUGGER_MICRO | FlxDebugger.MICRO |
| FlxG.DEBUGGER_BIG | FlxDebugger.BIG |
| FlxG.DEBUGGER_TOP | FlxDebugger.TOP |
| FlxG.DEBUGGER_LEFT | FlxDebugger.LEFT |
| FlxG.DEBUGGER_RIGHT | FlxDebugger.RIGHT |
| FlxG.random | FlxRandom.float |
| FlxG.shuffle | FlxArrayUtil.shuffle |
| FlxG.getRandom | FlxArrayUtil.getRandom |
| FlxG.globalSeed | FlxRandom.globalSeed |
| FlxG.tween | FlxTween.multiVar |
| FlxG.resetInput | FlxG.inputs.reset |
| FlxG.RED | FlxColor.RED |
| FlxG.GREEN | FlxColor.GREEN |
| FlxG.BLUE | FlxColor.BLUE |
| FlxG.PINK | FlxColor.PINK |
| FlxG.WHITE | FlxColor.WHITE |
| FlxG.BLACK | FlxColor.BLACK |
| FlxG.TRANSPARENT | FlxColor.TRANSPARENT |
| FlxG.DEG | FlxAngle.TO_DEG |
| FlxG.RAD | FlxAngle.TO_RAD |
| FlxG.flashGfx | FlxSpriteUtil.flashGfx |
| FlxG.flashGfxSprite | FlxSpriteUtil.flashGfxSprite |
| FlxG.levels | Reg.levels |
| FlxG.scores | Reg.scores |
| FlxG.score | Reg.score |
| FlxG.saves | Reg.saves |
| FlxG.save | Reg.save |
| FlxG.addCamera | FlxG.cameras.add |
| FlxG.useBufferLocking | FlxG.cameras.useBufferLocking |
| FlxG.lockCameras | FlxG.cameras.lock |
| FlxG.renderCameras | FlxG.cameras.render |
| FlxG.unlockCameras | FlxG.cameras.unlock |
| FlxG.removeCamera | FlxG.cameras.remove |
| FlxG.resetCameras | FlxG.cameras.reset |
| FlxG.shake | FlxG.cameras.shake |
| FlxG.bgColor | FlxG.cameras.bgColor |
| FlxG.warn | FlxG.log.warn |
| FlxG.error | FlxG.log.error |
| FlxG.notice | FlxG.log.notice |
| FlxG.advancedLog | FlxG.log.advanced |
| FlxG.clearLog | FlxG.log.clear |
| FlxG.watch | FlxG.watch.add |
| FlxG.unwatch | FlxG.watch.remove |
| FlxG.play | FlxG.sound.play |
| FlxG.playMusic | FlxG.sound.playMusic |
| FlxG.loadSound | FlxG.sound.load |
| FlxG.addSound | FlxG.sound.add |
| FlxG.stream | FlxG.sound.stream |
| FlxG.destroySounds | FlxG.sound.destroySounds |
| FlxG.updateSounds | FlxG.sound.updateSounds |
| FlxG.pauseSounds | FlxG.sound.pauseSounds |
| FlxG.resumeSounds | FlxG.sound.resumeSounds |
| FlxG.music | FlxG.sound.music |
| FlxG.sounds | FlxG.sound.list |
| FlxG.mute | FlxG.sound.muted |
| FlxG.volume | FlxG.sound.volume |
| FlxG.volumeHandler | FlxG.sound.volumeHandler |
| FlxG.keyVolumeUp | FlxG.sound.keyVolumeUp |
| FlxG.keyVolumeDown | FlxG.sound.keyVolumeDown |
| FlxG.keyMute | FlxG.sound.keyMute |
| FlxG.addPlugin | FlxG.plugins.add |
| FlxG.getPlugin | FlxG.plugins.get |
| FlxG.removePlugin | FlxG.plugins.remove |
| FlxG.removePluginType | FlxG.plugins.removeType |
| FlxG.updatePlugins | FlxG.plugins.update |
| FlxG.drawPlugins | FlxG.plugins.draw |
| FlxG.plugins | FlxG.plugins.list |
| FlxG.loadReplay | FlxG.vcr.loadReplay |
| FlxG.reloadReplay | FlxG.vcr.reloadReplay |
| FlxG.stopReplay | FlxG.vcr.stopReplay |
| FlxG.recordReplay | FlxG.vcr.startRecording |
| FlxG.stopRecording | FlxG.vcr.stopRecording |
| FlxG.checkBitmapCache | FlxG.bitmap.checkCache |
| FlxG.createBitmap | FlxG.bitmap.create |
| FlxG.addBitmap | FlxG.bitmap.add |
| FlxG.removeBitmap | FlxG.bitmap.remove |
| FlxG.getCacheKeyFor | FlxG.bitmap.getCacheKeyFor |
| FlxG.getUniqueBitmapKey | FlxG.bitmap.getUniqueKey |
| FlxG.clearBitmapCache | FlxG.bitmap.clearCache |
| FlxG.clearAssetsCache | FlxG.bitmap.clearAssetsCache |


--- status: publish layout: page title: Southwest Utah author: display_name: Zach Beck email<EMAIL_ADDRESS>tags: [] categories: [] published: false date: 2011-09-19 10:37:37 -0600 ---
The Southwest Utah User Group G5 consists of Geo-spatial technicians and specialists from State and Federal Agencies, private organizations, Washington, Iron, Beaver, Kane, and Garfield Counties. This user group conducts quarterly meetings featuring trainings, discussions on GIS and other Geo-spatial applications and/or problems that those attending might need help with. For more information, contact David Evans via email: david.evans@sgcity.org


7. What are the risks (technical, commercial and environmental) to your project's success? What is your risk management strategy?
Your answer:
Three principal risks exist at this stage:
1. The academic scale up fails to replicate the smaller results either entirely or not to a satisfactory level. In this event the academic partner would begin a controlled scale back to identify if the method needs to be altered during scale up to replicate results. In the event that the issue can only be identified in the small scale we would build that into our planning for the isolation phase
2. During the phase to engineer a technique to isolate the issue we anticipate that there are inherent safety issues. We have consulted an independent firm to ensure that suitable equipment and measures have been put in place to minimise the risk to staff
3. Although we are confident that our fabrication partner is the best option for the prototype solution there is an indication that a particular piece of heavy machinery, currently unavailable in the UK will be required. Our Fabrication partner has already investigated options for accessing this equipment in the Far East and an appropriate budget has been set aside to be used for this purpose if required.
Average score: 7/10
Your assessors' feedback
-
Assessor1
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ea eaque itaque quis vel quod sapiente ex minus doloribus, iure corporis sint non fugit unde repellendus iusto hic saepe voluptate asperiores!
-
Assessor2
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ea eaque itaque quis vel quod sapiente ex minus doloribus, iure corporis sint non fugit unde repellendus iusto hic saepe voluptate asperiores!
-
Assessor3
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ea eaque itaque quis vel quod sapiente ex minus doloribus, iure corporis sint non fugit unde repellendus iusto hic saepe voluptate asperiores!
-
Assessor4
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ea eaque itaque quis vel quod sapiente ex minus doloribus, iure corporis sint non fugit unde repellendus iusto hic saepe voluptate asperiores!
-
Assessor5
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ea eaque itaque quis vel quod sapiente ex minus doloribus, iure corporis sint non fugit unde repellendus iusto hic saepe voluptate asperiores!


Blue Team Defenses:
After testing, change the Group Policy default setting to re-apply GPO settings at every refresh (Process even if the Group Policy objects have not changed). This does have a potential performance hit on the client, but will ensure all GPO enforced settings are re-applied.
Computer Configuration, Policies, Administrative Templates, System, Group Policy, Configure security policy processing: Set to Enabled.
Also check the box for “Process even if the Group Policy objects have not changed”
It’s also recommended to configure the same settings for each of the following:
- Computer Configuration, Policies, Administrative Templates, System, Group Policy, Configure registry policy processing
- Computer Configuration, Policies, Administrative Templates, System, Group Policy, Configure scripts policy processing
- As well as any other policy settings as needed.
Mitigation
All Group Policies in the AD environment should be configured for a single purpose and monitored for unauthorized modification, especially GPOs linked to the domain, Domain Controllers OU, and/or a top level OU such as workstations, servers, admins, etc.
Delegated permissions to Group Policy should be reviewed on a regular basis, especially those linked to top-level OUs. Only Active Directory administrators should have modify rights to GPOs applied to the domain, top-level OUs, and any GPOs linked to critical assets (Domain Controllers, servers, admin computers, etc).
Additionally, all sites should be reviewed for linked Group Policies since these GPOs can cross domain boundaries enabling privilege escalation across domains in the same AD forest.
SYSVOL permissions are critical and must remain the same as the default settings since SYSYOL contains the actual Group Policy settings in files that are applied by GPO clients. If a GPO configuration file has permissions that enables some on who is not an Active Directory admin to change the file, and thus change what action the GPO client actually performs, an attacker could quickly escalate permissions up to Domain Admin level.


|
Welcome to linkwrapper!
|
|
You can activate your new account by clicking on the link below.
|
| If you did not register for linkwrapper, feel free to ignore this email. |
| Follow on twitter: @linkwrapper |


Since Sept 2017 -- current, Software Engineer Mesosphere Inc.. At Mesosphere, I work as a remote engineer in the Kubernetes DC/OS team.
Since 2017 -- Sept 2017, Principal Engineer Red Hat Inc.. At Red Hat, I work as a remote principal engineer at the platform team. This team is in charge of developing all the building blocks of Openshift.io. In particular, I am part of the Platform team that is in charge of glueing all the different components and ensuring a proper operability of Openshift.io. I also worked on improving the performance of our core components by doing benchmarks and detecting potential bottlenecks. In conjuction with this, my daily tasks were to ensure the reliability of the system while running in our Openshift clusters.
Since 2015 -- 2017, Senior Infrastructure Engineer @Giant Swarm GmbH. Giant Swarm is a microservice oriented startup that was present in the microservices ecosystem since the begining. Giant Swarm offers a microservice infrastructure where customers can easily deploy their applications, build their own clusters making use of our solutions for storage, networking, autoscaling, service discovery and fault tolerance. At Giant Swarm, I work as a remote core maintainer focusing on improving the stability, performance and scalability of our solutions. I also focused on the integration with third party tools like Calico, Flocker and Weave to be used and exposed to customers.
As part of my job, I gave several talks in international festivals (e.g. CoreOS Fest) but also in local meetups (e.g. Docker meetups).
From 2014 -- 2015, Senior Cloud Engineer @ElasticBox Inc. ElasticBox is a DevOps platform that streamlines the development, deployment, and management of multi-tier applications across cloud infrastructures. As a part of the Engineering team, I worked as a full Stack engineer on various advanced assignments, whose primary purpose was the design, development and management of a scalable and cloud-agnostic product for DevOps. Among all the features in which I was involved, I highlight the Docker integration into ElasticBox components, the development of multiple cross-cloud features such as storage management and resource tagging, migration of our Twisted reactor to a Tornado reactor and the autoscaling support for our vSphere provider.
Since 2012 -- 2014, Research Engineer @Vrije University of Amsterdam. The wide diversity of cloud-based applications and customers with different QoS requirements have recently exhibited the weaknesses of current provisioning systems. Within this position, I researched on auto-scaling techniques for cloud infrastructures from the perspective of web applications. Consequently, I designed and implemented a novel autoscaling system for a cloud platform called ConPaaS. Main features of these autoscaling system: a) short and medium term performance forecasting; b) scaling decision making; c) distributed monitoring and application metric specific; d) cloud agnostic; e) cost-awareness; f) multiple QoS levels adjusted to customer's requirements. As a result, several papers were published in distinct journals and conferences.
From 2006 -- 2009, Engineer @OpenFWPA, Software AG. Among candidates from several companies, I was selected to enroll the openFWPA team (an opensource J2EE fwk for e-government services) for the design and implementation of the openFWPA framework for the Government of Asturias. My main duties were focused on the development and design of J2EE backend modules that remain today as the foundation of this MVC struts-based framework. Majority of applications in the Government of Asturias are currently being developed and running on top of these modules.
From 2005 -- 2006, Developer @Software AG. After finishing my Computer Science degree, I decided to join Software AG to work as a Java developer. As a member of Software AG, I developed scalable and configurable applications that relied on the SOA model and used J2EE technologies to build e-government applications. Majority of tools used during this position were similar to those mentioned in the above position.


Stay informed about what's going on in the Black Lives Matter community!
Get Involved!Black Lives Matter is a unique contribution that goes beyond extrajudicial killings of Black people by police and vigilantes. It is a tactic to (re)build the Black liberation movement.
This 13,000 page reference center is dedicated to providing information to the general public on African American history and on the history of the more than one billion people of African ancestry around the world.
The Race Equality Foundation seeks to explore what is known about discrimination and disadvantage, and to use this evidence to develop interventions that overcome barriers and promote race equality in health, housing, and social care.
Black Life Matters United's mission is to bring forth the plans and solutions that take us from the dream to the physical manifestation of our excellent and complete potential for every man, woman, and child in the African American Community.
Join the forum to meet new people who are also interested in supporting the Black Lives Matter movement!


IBMs traditional sales force was product-focused &
organized by geography. Since services customers increasingly demanded
IT vendors to be industry
savvy, IBM trained its sales force accordingly. This led to a
reorganization of sales by industry, creation of a new role for services
brand
specialists to feed opportunities to the services group, & development
of a consultative sales approach. The company also redeveloped its
channel
partner program to target small & mid-size businesses with sales &
distribution processes. In 2005, IBM sold its hardware buiness to Lenovo
who still
uses many IBM brand names for product recognition.


Overview
Package
Class
Tree
Deprecated
Index
Help
PREV LETTER
NEXT LETTER
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
G
geo
- Class in
util
Simple class to parse SpatialThing formatted identifiers into lat/lng/errorradius Needs additional work to make this more robust and parse additional fields User: biocode Date: Aug 23, 2011 Time: 5:44:16 PM
geo(String)
- Constructor for class util.
geo
georss
- Class in
rest
This service renders maps and returns XML to the client.
georss()
- Constructor for class rest.
georss
get(String)
- Method in class BSCcore.
QuerySolutionIter
getAgent()
- Method in class BSCcore.
SharedProperties
Get the "Agent" property definition for the underlying model.
getAncestorsAsModel()
- Method in interface BSCcore.
FilteredModel
getAncestorsAsModel()
- Method in class BSCcore.
VirtuosoBSCFilteredModel
Filter ancestors of subject
getBSCObject(String)
- Method in class BSCcore.
BSCModel
Retrieve a single BSC object from the model.
getBSCObject()
- Method in interface BSCcore.
FilteredModel
getBSCObject()
- Method in class BSCcore.
VirtuosoBSCFilteredModel
Return a BSCObject from Virtuoso.
getChildren()
- Method in class BSCcore.
BSCObject
Get an iterator for all immediate descendents of this object.
getDate()
- Method in interface BSCcore.
FilteredModel
getDate()
- Method in class BSCcore.
VirtuosoBSCFilteredModel
getDateFilter()
- Method in class Render.
TextRenderer
getDateLastModified()
- Method in class BSCcore.
BSCObject
Tell us what the dwc:DateLastModified is of this object.
getDateLastModified()
- Method in class BSCcore.
SharedProperties
Get the "DateLastModified" property definition for the underlying model.
getDateLastModifiedString()
- Method in class BSCcore.
BSCObject
A convenience method that returns the value of dwc:DateLastModified for this object as a string instead of a DateTime object.
getDefaultPrefixMap()
- Method in class BSCcore.
BSCModel
Builds and returns the default prefix map for BSC models.
getDepth()
- Method in class BSCcore.
BSCObjBasicIter
The traversal depth relative to the starting object.
getDepth()
- Method in class BSCcore.
BSCObjDescIter
getDepth()
- Method in class BSCcore.
BSCObjectIter
getDepth()
- Method in class BSCcore.
BSCObjSiblingsIter
The traversal depth relative to the starting object.
getDepth()
- Method in class BSCcore.
QuerySolutionIter
getDescendents(int)
- Method in class BSCcore.
BSCObject
Get an iterator for all descendents of this object up to and including the specified traversal depth.
getDescendentsAsModel()
- Method in interface BSCcore.
FilteredModel
getDescendentsAsModel()
- Method in class BSCcore.
VirtuosoBSCFilteredModel
Filter descendents of subject
getErrorradiusinmeters()
- Method in class util.
geo
getGeo()
- Method in class BSCcore.
BSCObject
Get the geographic location of this object.
getGeo()
- Method in class BSCcore.
SharedProperties
Get the "SpatialThing" property definition for the underlying model.
getInstance()
- Static method in class BSCcore.
SettingsManager
Get a reference to the global SettingsManager instance.
getInstance(String)
- Static method in class BSCcore.
SettingsManager
Get a reference to the global SettingsManager object, specifying a properties file to use.
getKMLPointCoordinates()
- Method in class util.
geo
getLatitude()
- Method in class util.
geo
getLongitude()
- Method in class util.
geo
getMaxDepth()
- Method in class BSCcore.
TestVisitor
getMaxDepth()
- Method in class Render.
ImageRenderer
getMaxDepth()
- Method in class Render.
TextRenderer
getMessage()
- Method in class Loading.
Results
getModel()
- Method in class BSCcore.
BSCModel
Get the Jena model used for this BSCModel.
getObject()
- Method in class BSCcore.
RDFStatement
getObjectString()
- Method in class BSCcore.
RDFStatement
getOntModel()
- Method in class BSCcore.
BSCModel
Get the Jena inferencing model used for this BSCModel.
getParent()
- Method in class BSCcore.
BSCObject
Get the immediate ancestor of this object.
getParents()
- Method in class BSCcore.
BSCObject
Get an iterator for all immediate ancestors of this object.
getPredicate()
- Method in class BSCcore.
RDFStatement
getPropertiesFile()
- Method in class BSCcore.
SettingsManager
Get the path of the properties file associated with this SettingsManager.
getQueryType()
- Method in interface BSCcore.
FilteredModel
getQueryType()
- Method in class BSCcore.
VirtuosoBSCFilteredModel
getRDFStatements()
- Method in class BSCcore.
BSCModel
Get an iterator for all RDF statements in the model.
getRelations(String, String, String, String)
- Method in class rest.
georss
getRelations(String, String, String, String, String, Set<String>)
- Method in class rest.
search
Get a BiSciCol model defined by parameters.
getRelationsAsModel()
- Method in interface BSCcore.
FilteredModel
getRelationsAsModel()
- Method in class BSCcore.
VirtuosoBSCFilteredModel
Get all relations by adding ancestors, descendents, and siblings to each other
getRelativeOf()
- Method in class BSCcore.
SharedProperties
Get the "relatives" property definition for the underlying model.
getRelatives()
- Method in class BSCcore.
BSCObject
Get an iterator for all relatives of this object.
getReturnSubjects()
- Method in class BSCcore.
BSCObjBasicIter
Find out if this BSCObjBasicIter is returning the subjects or objects of Jena statements.
getRowNumber()
- Method in class BSCcore.
QueryResult
getSameas()
- Method in class BSCcore.
SharedProperties
Get the "dcterms:relation" property definition for the underlying model.
getSameAsModel()
- Method in interface BSCcore.
FilteredModel
getSameAsModel()
- Method in class BSCcore.
VirtuosoBSCFilteredModel
Get objects declared the same as subject and return as a model.
getSharedProperties(Model)
- Static method in class BSCcore.
SharedPropertiesFactory
Returns a SharedProperties object for the specified model.
getSiblings()
- Method in class BSCcore.
BSCObject
Get an iterator for all siblings of this object.
getSiblingsAsModel()
- Method in interface BSCcore.
FilteredModel
getSiblingsAsModel()
- Method in class BSCcore.
VirtuosoBSCFilteredModel
Filter all siblings and return as a BSCModel
getSourceOf()
- Method in class BSCcore.
SharedProperties
Get the "isSourceOf" property definition for the underlying model.
getSubject()
- Method in interface BSCcore.
FilteredModel
getSubject()
- Method in class BSCcore.
RDFStatement
getSubject()
- Method in class BSCcore.
VirtuosoBSCFilteredModel
getSubjectString()
- Method in class BSCcore.
RDFStatement
getTotalVisited()
- Method in class BSCcore.
TestVisitor
Returns the total number of objects visited in a traversal of an object's ancestors or descendents.
getTotalVisited()
- Method in class Render.
TextRenderer
Returns the total number of objects visited in a traversal of an object's ancestors or descendents.
getType()
- Method in class BSCcore.
BSCObject
Tell us what the rdf:type is of this object.
getType()
- Method in class BSCcore.
SharedProperties
Get the "type" property definition for the underlying model.
getURI()
- Method in class BSCcore.
BSCObject
Gets the full URI for this object.
getUrl()
- Method in class BSCcore.
VirtuosoBSCFilteredModel
getVarNames()
- Method in class BSCcore.
QueryResult
getVisitStr()
- Method in class BSCcore.
TestVisitor
god
- Variable in class BSCcore.
VirtuosoBSCFilteredModel
god
- Variable in class Loading.
LoadProperties
GOD
- Static variable in class Loading.
LoadProperties
GOD_LOAD_ERROR
- Static variable in class Loading.
LoadProperties
godFile
- Variable in class Loading.
LoadProperties
godGraph
- Variable in class Loading.
LoadProperties
graph
- Variable in class BSCcore.
VirtuosoBSCFilteredModel
graphs
- Variable in class Loading.
LoadProperties
Overview
Package
Class
Tree
Deprecated
Index
Help
PREV LETTER
NEXT LETTER
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X


404 Not Found
Oops! Looks like the page you're looking for is not there!
Things you can try:
Go to our
home page
Check whether the URL you entered is correct
If you were redirected from somewhere else, the link might be wrong!


Website Automata
Reloader by Surya
HostURL:
Reload Count:
Wait to Load
Add Entry
Site Name
Reload Count
Wait
Delete
Start
Launch All
Rapid Count:


Olympics: Placido Domingo pulls out of cultural event, cites 'complexity'
TOKYO (Reuters) - Opera singer Placido Domingo has withdrawn from a pre-Olympics theatrical event set for next spring, he said in a statement issued by Tokyo Olympics organizers on Friday, citing the “complexity” of the project.
Domingo, who had been set to participate in an event fusing opera and Japan’s traditional kabuki to kick off a cultural festival, resigned last month as general director of the Los Angeles Opera, saying accusations of sexual misconduct had compromised his ability to continue.
“After thoughtful consideration I have made the decision not to participate in the kabuki-opera event due to the complexity of the project,” Domingo said in the statement, issued by the Tokyo 2020 Organizing Committee.
The panel added that after consultation, it had accepted Domingo’s decision not to take part in the April program, part of a “Tokyo 2020 Nippon Festival” to promote Japanese culture.
This year more than three dozen singers, dancers, musicians, voice teachers and backstage staff said they had witnessed or experienced inappropriate behavior by Domingo toward women at different opera houses over the last three decades.
He has disputed the accusations.
In September, Domingo pulled out from a performance at the Metropolitan Opera in New York at the last minute, and said he would never perform there again.


QSvgRenderer Class
The QSvgRenderer class is used to draw the contents of SVG files onto paint devices. More...
| Header: | #include <QSvgRenderer> |
| qmake: | QT += svg |
| Since: | Qt 4.1 |
| Inherits: | QObject |
Note: All functions in this class are reentrant.
Properties
- framesPerSecond : int
- viewBox : QRectF
- 1 property inherited from QObject
Public Functions
| QSvgRenderer(QObject *parent = Q_NULLPTR) | |
| QSvgRenderer(const QString &filename, QObject *parent = Q_NULLPTR) | |
| QSvgRenderer(const QByteArray &contents, QObject *parent = Q_NULLPTR) | |
| QSvgRenderer(QXmlStreamReader *contents, QObject *parent = Q_NULLPTR) | |
| ~QSvgRenderer() | |
| bool | animated() const |
| QRectF | boundsOnElement(const QString &id) const |
| QSize | defaultSize() const |
| bool | elementExists(const QString &id) const |
| int | framesPerSecond() const |
| bool | isValid() const |
| QMatrix | matrixForElement(const QString &id) const |
| void | setFramesPerSecond(int num) |
| void | setViewBox(const QRect &viewbox) |
| void | setViewBox(const QRectF &viewbox) |
| QRect | viewBox() const |
| QRectF | viewBoxF() const |
- 32 public functions inherited from QObject
Public Slots
| bool | load(const QString &filename) |
| bool | load(const QByteArray &contents) |
| bool | load(QXmlStreamReader *contents) |
| void | render(QPainter *painter) |
| void | render(QPainter *painter, const QRectF &bounds) |
| void | render(QPainter *painter, const QString &elementId, const QRectF &bounds = QRectF()) |
- 1 public slot inherited from QObject
Signals
| void | repaintNeeded() |
- 2 signals inherited from QObject
Additional Inherited Members
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 9 protected functions inherited from QObject
- 2 protected variables inherited from QObject
Detailed Description
The QSvgRenderer class is used to draw the contents of SVG files onto paint devices.
Using QSvgRenderer, Scalable Vector Graphics (SVG) can be rendered onto any QPaintDevice subclass, including QWidget, QImage, and QGLWidget.
QSvgRenderer provides an API that supports basic features of SVG rendering, such as loading and rendering of static drawings, and more interactive features like animation. Since the rendering is performed using QPainter, SVG drawings can be rendered on any subclass of QPaintDevice.
SVG drawings are either loaded when an QSvgRenderer is constructed, or loaded later using the load() functions. Data is either supplied directly as serialized XML, or indirectly using a file name. If a valid file has been loaded, either when the renderer is constructed or at some later time, isValid() returns true; otherwise it returns false. QSvgRenderer provides the render() slot to render the current document, or the current frame of an animated document, using a given painter.
The defaultSize() function provides information about the amount of space that is required to render the currently loaded SVG file. This is useful for paint devices, such as QWidget, that often need to supply a size hint to their parent layout. The default size of a drawing may differ from its visible area, found using the viewBox property.
Animated SVG drawings are supported, and can be controlled with a simple collection of functions and properties:
- The animated() function indicates whether a drawing contains animation information.
- The framesPerSecond property contains the rate at which the animation plays.
Finally, the QSvgRenderer class provides the repaintNeeded() signal which is emitted whenever the rendering of the document needs to be updated.
See also QSvgWidget, Qt SVG C++ Classes, SVG Viewer Example, and QPicture.
Property Documentation
framesPerSecond : int
This property holds the number of frames per second to be shown
The number of frames per second is 0 if the current document is not animated.
Access functions:
| int | framesPerSecond() const |
| void | setFramesPerSecond(int num) |
See also animated().
viewBox : QRectF
This property holds the rectangle specifying the visible area of the document in logical coordinates
This property was introduced in Qt 4.2.
Access functions:
| QRectF | viewBoxF() const |
| void | setViewBox(const QRect &viewbox) |
| void | setViewBox(const QRectF &viewbox) |
Member Function Documentation
QSvgRenderer::QSvgRenderer(QObject *parent = Q_NULLPTR)
Constructs a new renderer with the given parent.
QSvgRenderer::QSvgRenderer(const QString &filename, QObject *parent = Q_NULLPTR)
Constructs a new renderer with the given parent and loads the contents of the SVG file with the specified filename.
QSvgRenderer::QSvgRenderer(const QByteArray &contents, QObject *parent = Q_NULLPTR)
Constructs a new renderer with the given parent and loads the SVG data from the byte array specified by contents.
QSvgRenderer::QSvgRenderer(QXmlStreamReader *contents, QObject *parent = Q_NULLPTR)
Constructs a new renderer with the given parent and loads the SVG data using the stream reader specified by contents.
This function was introduced in Qt 4.5.
QSvgRenderer::~QSvgRenderer()
Destroys the renderer.
bool QSvgRenderer::animated() const
Returns true if the current document contains animated elements; otherwise returns false.
See also framesPerSecond().
QRectF QSvgRenderer::boundsOnElement(const QString &id) const
Returns bounding rectangle of the item with the given id. The transformation matrix of parent elements is not affecting the bounds of the element.
This function was introduced in Qt 4.2.
See also matrixForElement().
QSize QSvgRenderer::defaultSize() const
Returns the default size of the document contents.
bool QSvgRenderer::elementExists(const QString &id) const
Returns true if the element with the given id exists in the currently parsed SVG file and is a renderable element.
Note: this method returns true only for elements that can be rendered. Which implies that elements that are considered part of the fill/stroke style properties, e.g. radialGradients even tough marked with "id" attributes will not be found by this method.
This function was introduced in Qt 4.2.
bool QSvgRenderer::isValid() const
Returns true if there is a valid current document; otherwise returns false.
[slot]
bool QSvgRenderer::load(const QString &filename)
Loads the SVG file specified by filename, returning true if the content was successfully parsed; otherwise returns false.
[slot]
bool QSvgRenderer::load(const QByteArray &contents)
Loads the specified SVG format contents, returning true if the content was successfully parsed; otherwise returns false.
[slot]
bool QSvgRenderer::load(QXmlStreamReader *contents)
Loads the specified SVG in contents, returning true if the content was successfully parsed; otherwise returns false.
The reader will be used from where it currently is positioned. If contents is null
, behavior is undefined.
This function was introduced in Qt 4.5.
QMatrix QSvgRenderer::matrixForElement(const QString &id) const
Returns the transformation matrix for the element with the given id. The matrix is a product of the transformation of the element's parents. The transformation of the element itself is not included.
To find the bounding rectangle of the element in logical coordinates, you can apply the matrix on the rectangle returned from boundsOnElement().
This function was introduced in Qt 4.2.
See also boundsOnElement().
[slot]
void QSvgRenderer::render(QPainter *painter)
Renders the current document, or the current frame of an animated document, using the given painter.
[slot]
void QSvgRenderer::render(QPainter *painter, const QRectF &bounds)
Renders the current document, or the current frame of an animated document, using the given painter on the specified bounds within the painter. If the bounding rectangle is not specified the SVG file is mapped to the whole paint device.
[slot]
void QSvgRenderer::render(QPainter *painter, const QString &elementId, const QRectF &bounds = QRectF())
Renders the given element with elementId using the given painter on the specified bounds. If the bounding rectangle is not specified the SVG element is mapped to the whole paint device.
[signal]
void QSvgRenderer::repaintNeeded()
This signal is emitted whenever the rendering of the document needs to be updated, usually for the purposes of animation.
QRect QSvgRenderer::viewBox() const
Returns viewBoxF().toRect().
See also setViewBox() and viewBoxF().


|
Search
|
Audio addon
These functions are declared in the following header file. Link with allegro_audio.
Audio typesALLEGRO_AUDIO_DEPTH
Sample depth and type, and signedness. Mixers only use 32-bit signed float (-1..+1). The unsigned value is a bit-flag applied to the depth value.
For convenience:
ALLEGRO_AUDIO_DRIVER_ENUM
The sound driver to use. It is highly recommended to use ALLEGRO_AUDIO_DRIVER_AUTODETECT whenever possible.
ALLEGRO_AUDIO_PAN_NONE
Special value for the ALLEGRO_AUDIOPROP_PAN property. Use this value to play samples at their original volume with panning disabled. ALLEGRO_CHANNEL_CONF
Speaker configuration (mono, stereo, 2.1, 3, etc).
ALLEGRO_MIXER
A mixer is a type of stream which mixes together attached streams into a single buffer. ALLEGRO_MIXER_QUALITY
ALLEGRO_PLAYMODE
Sample and stream looping mode.
ALLEGRO_SAMPLE_ID
An ALLEGRO_SAMPLE_ID represents a sample being played via al_play_sample. It can be used to later stop the sample with al_stop_sample. ALLEGRO_SAMPLE
An ALLEGRO_SAMPLE object stores the data necessary for playing pre-defined digital audio. It holds information pertaining to data length, frequency, channel configuration, etc. You can have an ALLEGRO_SAMPLE object playing multiple times simultaneously. The object holds a user-specified PCM data buffer, of the format the object is created with. ALLEGRO_SAMPLE_INSTANCE
An ALLEGRO_SAMPLE_INSTANCE object represents a playable instance of a predefined sound effect. It holds information pertaining to the looping mode, loop start/end points, playing position, etc. An instance uses the data from an ALLEGRO_SAMPLE object. Multiple instances may be created from the same ALLEGRO_SAMPLE. An ALLEGRO_SAMPLE must not be destroyed while there are instances which reference it. To be played, an ALLEGRO_SAMPLE_INSTANCE object must be attached to an ALLEGRO_VOICE object, or to an ALLEGRO_MIXER object which is itself attached to an ALLEGRO_VOICE object (or to another ALLEGRO_MIXER object which is attached to an ALLEGRO_VOICE object, etc). ALLEGRO_AUDIO_STREAM
An ALLEGRO_AUDIO_STREAM object is used to stream generated audio to the sound device, in real-time. This is done by reading from a buffer, which is split into a number of fragments. Whenever a fragment has finished playing, the user can refill it with new data. As with ALLEGRO_SAMPLE_INSTANCE objects, streams store information necessary for playback, so you may not play the same stream multiple times simultaneously. Streams also need to be attached to an ALLEGRO_VOICE object, or to an ALLEGRO_MIXER object which, eventually, reaches an ALLEGRO_VOICE object. While playing, you must periodically fill fragments with new audio data. To know when a new fragment is ready to be filled, you can either directly check with al_get_available_audio_stream_fragments, or listen to events from the stream. An ALLEGRO_EVENT_AUDIO_STREAM_FRAGMENT event is generated whenever a new fragment is ready. Use al_get_audio_stream_fragment to obtain a pointer to the fragment to be filled. The size and format are determined by the parameters passed to al_create_audio_stream. If you're late with supplying new data, the stream will be silent until new data is provided. You must call al_drain_audio_stream when you're finished with supplying data to the stream. If the stream is created by al_load_audio_stream then it can also generate an ALLEGRO_EVENT_audio_stream_FINISHED event if it reaches the end of the file and is not set to loop. ALLEGRO_VOICE
A voice structure that you'd attach a mixer or sample to. Ideally there would be one ALLEGRO_VOICE per system/hardware voice. Setting upal_install_audio
Install the audio subsystem. Parameters:
Returns true on success, false on failure. See also: al_reserve_samples, al_uninstall_audio, al_is_audio_installed al_uninstall_audio
Uninstalls the audio subsystem. See also: al_install_audio al_is_audio_installed
Returns true if al_install_audio was called previously and returned successfully. al_reserve_samples
Reserves 'reserve_samples' number of samples attached to the default mixer. al_install_audio must have been called first. If no default mixer is set, then this function will create a voice with an attached mixer. Returns true on success, false on error. See also: al_set_default_mixer al_get_allegro_audio_version
Returns the (compiled) version of the addon, in the same format as al_get_allegro_version. al_get_depth_sizeReturn the size of a sample, in bytes, for the given format. The format is one of the values listed under ALLEGRO_AUDIO_DEPTH. al_get_channel_countReturn the number of channels for the given channel configuration, which is one of the values listed under ALLEGRO_CHANNEL_CONF. Voice functionsal_create_voice
Creates a voice struct and allocates a voice from the digital sound driver. The passed frequency, sample format and channel configuration are used as a hint to what kind of data will be sent to the voice. However, the underlying sound driver is free to use non-matching values. For example it may be the native format of the sound hardware. If you attach a mixer to the voice, the mixer will convert from the mixer's format to the voice format and you do not have to care about this. If you access the voice directly, make sure to not rely on the parameters passed to this function, but query the returned voice for the actual settings. See also: al_destroy_voice al_destroy_voice
Destroys the voice and deallocates it from the digital driver. Does nothing if the voice is NULL. See also: al_create_voice al_detach_voice
Detaches the sample or mixer stream from the voice. al_attach_audio_stream_to_voice
Attaches an audio stream to a voice. The same rules as al_attach_sample_instance_to_voice apply. This may fail if the driver can't create a voice with the buffer count and buffer size the stream uses. An audio stream attached directly to a voice has a number of limitations. The audio stream plays immediately and cannot be stopped. The stream position, speed, gain, panning, cannot be changed. At this time, we don't recommend attaching audio streams directly to voices. Use a mixer in between. Returns true on success, false on failure. al_attach_mixer_to_voice
Attaches a mixer to a voice. The same rules as al_attach_sample_instance_to_voice apply, with the exception of the depth requirement. Returns true on success, false on failure. al_attach_sample_instance_to_voice
Attaches a sample to a voice, and allows it to play. The sample's volume and loop mode will be ignored, and it must have the same frequency and depth (including signed-ness) as the voice. This function may fail if the selected driver doesn't support preloading sample data. At this time, we don't recommend attaching samples directly to voices. Use a mixer in between. Returns true on success, false on failure. al_get_voice_frequency
Return the frequency of the voice, e.g. 44100. al_get_voice_channels
Return the channel configuration of the voice. See also: ALLEGRO_CHANNEL_CONF. al_get_voice_depth
Return the audio depth of the voice. See also: ALLEGRO_AUDIO_DEPTH. al_get_voice_playing
Return true if the voice is currently playing. al_set_voice_playing
Change whether a voice is playing or not. The voice must have a sample or mixer attached to it. Returns true on success, false on failure. al_get_voice_position
When the voice has a non-streaming object attached to it, e.g. a sample, returns the voice's current sample position. Otherwise, returns zero. See also: al_set_voice_position. al_set_voice_position
Set the voice position. This can only work if the voice has a non-streaming object attached to it, e.g. a sample. Returns true on success, false on failure. See also: al_get_voice_position. Sample functionsal_create_sample
Create a sample data structure from the supplied buffer. If To allocate a buffer of the correct size, you can use something like this:
See also: al_destroy_sample. al_destroy_sample
Free the sample data structure. If it was created with the You must stop or destroy any ALLEGRO_SAMPLE_INSTANCE structures which reference this ALLEGRO_SAMPLE beforehand. If you have used al_play_sample at all, it is a very good idea to call al_stop_samples before destroying samples at the end of the program, in case any are still playing. See also: al_destroy_sample_instance, al_stop_sample, al_stop_samples al_play_sample
Plays a sample over the default mixer. al_reserve_samples must have previously been called. Returns true on success, false on failure. Playback may fail because all the reserved samples are currently used. Parameters:
See also: ALLEGRO_PLAYMODE, ALLEGRO_AUDIO_PAN_NONE, ALLEGRO_SAMPLE_ID, al_stop_sample, al_stop_samples. al_stop_sample
Stop the sample started by al_play_sample. See also: al_stop_samples al_stop_samples
Stop all samples started by al_play_sample. See also: al_stop_sample al_get_sample_channels
Return the channel configuration. See also: ALLEGRO_CHANNEL_CONF. al_get_sample_depth
Return the audio depth. See also: ALLEGRO_AUDIO_DEPTH. al_get_sample_frequency
Return the frequency of the sample. al_get_sample_length
Return the length of the sample in sample values. al_get_sample_data
Return a pointer to the raw sample data. Sample instance functionsal_create_sample_instance
Creates a sample stream, using the supplied data. This must be attached to a voice or mixer before it can be played. The argument may be NULL. You can then set the data later with al_set_sample. al_destroy_sample_instance
Detaches the sample stream from anything it may be attached to and frees it (the sample data is not freed!). al_play_sample_instance
Play an instance of a sample data. Returns true on success, false on failure. al_stop_sample_instance
Stop an sample instance playing. al_get_sample_instance_channels
Return the channel configuration. See also: ALLEGRO_CHANNEL_CONF. al_get_sample_instance_depth
Return the audio depth. See also: ALLEGRO_AUDIO_DEPTH. al_get_sample_instance_frequency
Return the frequency of the sample instance. al_get_sample_instance_length
Return the length of the sample instance in sample values. al_set_sample_instance_length
Set the length of the sample instance in sample values. Return true on success, false on failure. Will fail if the sample instance is currently playing. al_get_sample_instance_position
Get the playback position of a sample instance. al_set_sample_instance_position
Set the playback position of a sample instance. Returns true on success, false on failure. al_get_sample_instance_speed
Return the playback speed. al_set_sample_instance_speed
Set the playback speed. Return true on success, false on failure. Will fail if the sample instance is attached directly to a voice. al_get_sample_instance_gain
Return the playback gain. al_set_sample_instance_gain
Set the playback gain. Returns true on success, false on failure. Will fail if the sample instance is attached directly to a voice. al_get_sample_instance_pan
Get the pan value. See also: al_set_sample_instance_pan. al_set_sample_instance_pan
Set the pan value on a sample instance. A value of -1.0 means to play the sample only through the left speaker; +1.0 means only through the right speaker; 0.0 means the sample is centre balanced. A constant sound power level is maintained as the sample is panned from left to right. As a consequence, a pan value of 0.0 will play the sample 3 dB softer than the original level. To disable panning and play a sample at its original level, set the pan value to ALLEGRO_AUDIO_PAN_NONE. Returns true on success, false on failure. Will fail if the sample instance is attached directly to a voice. (A sound guy should explain that better; I only implemented it. Also this might be more properly called a balance control than pan. Also we don't attempt anything with more than two channels yet.) See also: al_get_sample_instance_pan. al_get_sample_instance_time
Return the length of the sample instance in seconds, assuming a playback speed of 1.0. al_get_sample_instance_playmode
Return the playback mode. al_set_sample_instance_playmode
Set the playback mode. Returns true on success, false on failure. al_get_sample_instance_playing
Return true if the sample instance is playing. al_set_sample_instance_playing
Change whether the sample instance is playing. Returns true on success, false on failure. al_get_sample_instance_attached
Return whether the sample instance is attached to something. al_detach_sample_instance
Detach the sample instance from whatever it's attached to, if anything. Returns true on success. al_get_sample
Return the sample data that the sample instance plays. al_set_sample
Change the sample data that a sample instance plays. This can be quite an involved process. First, the sample is stopped if it is not already. Next, if data is NULL, the sample is detached from its parent (if any). If data is not NULL, the sample may be detached and reattached to its parent (if any). This is not necessary if the old sample data and new sample data have the same frequency, depth and channel configuration. Reattaching may not always succeed. On success, the sample remains stopped. The playback position and loop end points are reset to their default values. The loop mode remains unchanged. Returns true on success, false on failure. On failure, the sample will be stopped and detached from its parent. Mixer functionsal_create_mixer
Creates a mixer stream, to attach sample streams or other mixers to. It will mix into a buffer at the requested frequency and channel count. The only supported audio depths are ALLEGRO_AUDIO_DEPTH_FLOAT32 and ALLEGRO_AUDIO_DEPTH_INT16 (not yet complete). Returns true on success, false on error. See also: al_destroy_mixer al_destroy_mixer
Destroys the mixer stream. See also: al_create_mixer al_get_default_mixer
Return the default mixer, or NULL if one has not been set. Although different configurations of mixers and voices can be used, in most cases a single mixer attached to a voice is what you want. The default mixer is used by al_play_sample. See also: al_reserve_samples, al_play_sample, al_set_default_mixer, al_restore_default_mixer al_set_default_mixer
Sets the default mixer. All samples started with al_play_sample will be stopped. If you are using your own mixer, this should be called before al_reserve_samples. Returns true on success, false on error. See also: al_reserve_samples, al_play_sample, al_get_default_mixer, al_restore_default_mixer al_restore_default_mixer
Restores Allegro's default mixer. All samples started with al_play_sample will be stopped. Returns true on success, false on error. See also: al_get_default_mixer, al_set_default_mixer, al_reserve_samples. al_attach_mixer_to_mixer
Attaches a mixer onto another mixer. The same rules as with al_attach_sample_instance_to_mixer apply, with the added caveat that both mixers must be the same frequency. Returns true on success, false on error. Currently both mixers must have the same audio depth, otherwise the function fails. See also: al_detach_mixer. al_attach_sample_instance_to_mixer
Attach a sample instance to a mixer. The instance must not already be attached to anything. Returns true on success, false on failure. See also: al_detach_sample_instance. al_attach_audio_stream_to_mixer
Attach a stream to a mixer. Returns true on success, false on failure. See also: al_detach_audio_stream. al_get_mixer_frequency
Return the mixer frequency. al_set_mixer_frequency
Set the mixer frequency. This will only work if the mixer is not attached to anything. Returns true on success, false on failure. al_get_mixer_channels
Return the mixer channel configuration. See also: ALLEGRO_CHANNEL_CONF. al_get_mixer_depth
Return the mixer audio depth. See also: ALLEGRO_AUDIO_DEPTH. al_get_mixer_quality
Return the mixer quality. See also: ALLEGRO_MIXER_QUALITY. al_set_mixer_quality
Set the mixer quality. This can only succeed if the mixer does not have anything attached to it. Returns true on success, false on failure. See also: ALLEGRO_MIXER_QUALITY. al_get_mixer_playing
Return true if the mixer is playing. See also: al_set_mixer_playing. al_set_mixer_playing
Change whether the mixer is playing. Returns true on success, false on failure. See also: al_get_mixer_playing. al_get_mixer_attached
Return true if the mixer is attached to something. See also: al_attach_sample_instance_to_mixer, al_attach_audio_stream_to_mixer, al_attach_mixer_to_mixer al_detach_mixer
Detach the mixer from whatever it is attached to, if anything. See also: al_attach_mixer_to_mixer. al_set_mixer_postprocess_callback
Sets a post-processing filter function that's called after the attached streams have been mixed. The buffer's format will be whatever the mixer was created with. The sample count and user-data pointer is also passed. Stream functionsal_create_audio_stream
Creates an ALLEGRO_AUDIO_STREAM. The stream will be set to play by default. It will feed audio data from a buffer, which is split into a number of fragments.
The choice of fragment_count, samples and freq directly influences the audio delay. The delay in seconds can be expressed as:
This is only the delay due to Allegro's streaming, there may be additional delay caused by sound drivers and/or hardware. Note: If you know the fragment size in bytes, you can get the size in samples like this:
The size of the complete buffer is:
Note: unlike many Allegro objects, audio streams are not implicitly destroyed when Allegro is shut down.  Note: If the stream is still attached to a mixer or voice, al_detach_audio_stream is automatically called on it first. See also: al_drain_audio_stream. al_get_audio_stream_event_source
Retrieve the associated event source. See al_get_audio_stream_fragment for a description of the ALLEGRO_EVENT_AUDIO_STREAM_FRAGMENT event that audio streams emit. al_drain_audio_stream
You should call this to finalise an audio stream that you will no longer be feeding, to waits for all pending buffers to finish playing. The stream's playing state will change to false. al_rewind_audio_stream
Set the streaming file playing position to the beginning. Returns true on success. Currently this can only be called on streams created with al_load_audio_stream, al_load_audio_stream_f and the format-specific functions underlying those functions. al_get_audio_stream_frequency
Return the stream frequency. al_get_audio_stream_channels
Return the stream channel configuration. See also: ALLEGRO_CHANNEL_CONF. al_get_audio_stream_depth
Return the stream audio depth. See also: ALLEGRO_AUDIO_DEPTH. al_get_audio_stream_length
Return the stream length in seconds, if known. Otherwise returns zero. al_get_audio_stream_speed
Return the playback speed. See also: al_set_audio_stream_speed. al_set_audio_stream_speed
Set the playback speed. Return true on success, false on failure. Will fail if the sample instance is attached directly to a voice. See also: al_get_audio_stream_speed. al_get_audio_stream_gain
Return the playback gain. See also: al_set_audio_stream_gain. al_set_audio_stream_gain
Set the playback gain. Returns true on success, false on failure. Will fail if the sample instance is attached directly to a voice. See also: al_get_audio_stream_gain. al_get_audio_stream_pan
Get the pan value. See also: al_set_audio_stream_pan. al_set_audio_stream_pan
Set the pan value on a sample instance. A value of -1.0 means to play the sample only through the left speaker; +1.0 means only through the right speaker; 0.0 means the sample is centre balanced. Returns true on success, false on failure. Will fail if the sample instance is attached directly to a voice. See also: al_get_audio_stream_playing. al_get_audio_stream_playing
Return true if the stream is playing. See also: al_set_audio_stream_playing. al_set_audio_stream_playing
Change whether the stream is playing. Returns true on success, false on failure. al_get_audio_stream_playmode
Return the playback mode. See also: ALLEGRO_PLAYMODE, al_set_audio_stream_playmode. al_set_audio_stream_playmode
Set the playback mode. Returns true on success, false on failure. See also: ALLEGRO_PLAYMODE, al_get_audio_stream_playmode. al_get_audio_stream_attached
Return whether the stream is attached to something. See also: al_attach_audio_stream_to_mixer, al_attach_audio_stream_to_voice, al_detach_audio_stream. al_detach_audio_stream
Detach the stream from whatever it's attached to, if anything. See also: al_attach_audio_stream_to_mixer, al_attach_audio_stream_to_voice, al_get_audio_stream_attached. al_get_audio_stream_fragment
When using Allegro's audio streaming, you will use this function to continuously provide new sample data to a stream. If the stream is ready for new data, the function will return the address of an internal buffer to be filled with audio data. The length and format of the buffer are specified with al_create_audio_stream or can be queried with the various functions described here. Once the buffer is filled, you must signal this to Allegro by passing the buffer to al_set_audio_stream_fragment. If the stream is not ready for new data, the function will return NULL. Note: If you listen to events from the stream, an ALLEGRO_EVENT_AUDIO_STREAM_FRAGMENT event will be generated whenever a new fragment is ready. However, getting an event is not a guarantee that al_get_audio_stream_fragment will not return NULL, so you still must check for it. See also: al_set_audio_stream_fragment, al_get_audio_stream_event_source. al_set_audio_stream_fragment
This function needs to be called for every successful call of [al_get_audio_stream_buffer] to indicate that the buffer is filled with new data. al_get_audio_stream_fragments
Returns the number of fragments this stream used. This is the same value as passed to al_create_audio_stream when a new stream is created. al_get_available_audio_stream_fragments
Returns the number of available fragments in the stream. You can use [al_get_audio_stream_buffer]. al_seek_audio_stream_secs
Set the streaming file playing position to time. Returns true on success. Currently this can only be called on streams created with al_load_audio_stream, al_load_audio_stream_f and the format-specific functions underlying those functions. al_get_audio_stream_position_secs
Return the position of the stream in seconds. Currently this can only be called on streams created with al_load_audio_stream. al_get_audio_stream_length_secs
Return the length of the stream in seconds. Currently this can only be called on streams created with al_load_audio_stream, al_load_audio_stream_f and the format-specific functions underlying those functions. al_set_audio_stream_loop_secs
Sets the loop points for the stream in seconds. Currently this can only be called on streams created with al_load_audio_stream, al_load_audio_stream_f and the format-specific functions underlying those functions. Audio file I/Oal_register_sample_loader
Register a handler for al_load_sample. The given function will be used to handle the loading of sample files with the given extension. The extension should include the leading dot ('.') character. It will be matched case-insensitively. The Returns true on success, false on error. Returns false if unregistering an entry that doesn't exist. al_register_sample_loader_f
Register a handler for al_load_sample_f. The given function will be used to handle the loading of sample files with the given extension. The extension should include the leading dot ('.') character. It will be matched case-insensitively. The Returns true on success, false on error. Returns false if unregistering an entry that doesn't exist. al_register_sample_saver
Register a handler for al_save_sample. The given function will be used to handle the saving of sample files with the given extension. The extension should include the leading dot ('.') character. It will be matched case-insensitively. The Returns true on success, false on error. Returns false if unregistering an entry that doesn't exist. al_register_sample_saver_f
Register a handler for al_save_sample_f. The given function will be used to handle the saving of sample files with the given extension. The extension should include the leading dot ('.') character. It will be matched case-insensitively. The Returns true on success, false on error. Returns false if unregistering an entry that doesn't exist. al_register_audio_stream_loader
Register a handler for al_load_audio_stream. The given function will be used to open streams from files with the given extension. The extension should include the leading dot ('.') character. It will be matched case-insensitively. The Returns true on success, false on error. Returns false if unregistering an entry that doesn't exist. al_register_audio_stream_loader_f
Register a handler for al_load_audio_stream_f. The given function will be used to open streams from files with the given extension. The extension should include the leading dot ('.') character. It will be matched case-insensitively. The Returns true on success, false on error. Returns false if unregistering an entry that doesn't exist. al_load_sample
Loads a few different audio file formats based on their extension. Some formats require external libraries to be installed prior to compiling the library. Note that this stores the entire file in memory at once, which may be time consuming. To read the file as it is needed, use al_load_audio_stream. Returns the sample on success, NULL on failure. See also: al_register_sample_loader, al_load_wav al_load_sample_f
Loads an image from an ALLEGRO_FILE stream into an ALLEGRO_SAMPLE. The file type is determined by the passed 'ident' parameter, which is a file name extension including the leading dot. Note that this stores the entire file in memory at once, which may be time consuming. To read the file as it is needed, use al_load_audio_stream_f. Returns the sample on success, NULL on failure. See also: al_register_sample_loader_f, al_load_wav_f al_load_audio_stream
Loads an audio file from disk as it is needed. Unlike regular streams, the one returned by this function need not be fed by the user; the library will automatically read more of the file as it is needed. The stream will contain buffer_count buffers with samples samples. A stream must be attached to a voice to be used. See ALLEGRO_AUDIO_STREAM for more details. Returns the stream on success, NULL on failure. See also: al_register_audio_stream_loader, al_load_wav_audio_stream al_load_audio_stream_f
Loads an audio file from ALLEGRO_FILE stream as it is needed. Unlike regular streams, the one returned by this function need not be fed by the user; the library will automatically read more of the file as it is needed. The stream will contain buffer_count buffers with samples samples. The file type is determined by the passed 'ident' parameter, which is a file name extension including the leading dot. A stream must be attached to a voice to be used. See ALLEGRO_AUDIO_STREAM for more details. Returns the stream on success, NULL on failure. See also: al_register_audio_stream_loader_f, al_load_wav_audio_stream_f al_save_sample
Writes a sample into a file. Currently, wav is the only supported format, and the extension must be '.wav'. Returns true on success, false on error. See also: al_register_sample_saver, al_save_wav al_save_sample_f
Writes a sample into a ALLEGRO_FILE filestream. Currently, wav is the only supported format, and the extension must be '.wav'. Returns true on success, false on error. See also: al_register_sample_saver_f, al_save_wav_f al_load_wav
Load a sample from a PCM .wav file. Returns the sample on success, NULL on failure. See also: al_load_sample, al_load_wav_f al_load_wav_f
Load a sample from a ALLEGRO_FILE stream. Returns the sample on success, NULL on failure. See also: al_load_sample, al_load_wav al_save_wav
Save a sample to a PCM .wav file. Returns true on success, false on error. See also: al_save_sample, al_save_wav_f al_save_wav_f
Write a PCM .wav file into the ALLEGRO_FILE stream given. Returns true on success, false on error. See also: al_save_sample, al_save_wav al_load_wav_audio_stream
Like al_load_audio_stream but assumes the file is PCM .wav file. See also: al_load_audio_stream, al_load_wav_audio_stream_f al_load_wav_audio_stream_f
Like al_load_audio_stream_f but assumes the file is PCM .wav file. See also: al_load_audio_stream_f, al_load_wav_audio_stream |
Last updated: 2010-04-01 08:45:04 UTC


Back to Basics Grow
Websites don't have to be complicated
I'm not the first to notice, websites are getting rather complicated.
Everyday browsers are frightened by the jargon and sheer amount if choice there is when it comes to building a website.
Back to basics websites - built with pure untainted HTML5 with no classes or styles. With limits, comes creativity.
Take a look at the source - really - it's not hard. Just right click, view source (usually). I'll bet you can understand my code, and write it yourself. Why not?


{title:'RequestFormData', flags:'todo'}
The {@link oajr.RequestFormData} object is the API for accessing the HTTP request body as form data. It can be accessed by passing it as a parameter on your REST Java method:
Note that this object does NOT take GET parameters into account and only returns values found in the body of the request.
Some important methods on this class are:


|
| Value |
Description |
Notes |
|
| 01 |
BIC discount group code |
UK publisher’s or distributor’s discount group code in a format specified by BIC to ensure uniqueness |
| 02 |
Proprietary discount code |
A publisher’s or supplier’s own code which identifies a trade discount category, as specified in <DiscountCodeTypeName>. The
actual discount for each code is set by trading partner agreement (applies to goods supplied on standard trade discounting
terms)
|
| 03 |
Boeksoort |
Terms code used in the Netherlands book trade |
| 04 |
German terms code |
Terms code used in German ONIX applications |
| 05 |
Proprietary commission code |
A publisher’s or supplier’s own code which identifies a commission rate category, as specified in <DiscountCodeTypeName>.
The actual commission rate for each code is set by trading partner agreement (applies to goods supplied on agency terms)
|
| 06 |
BIC commission group code |
UK publisher’s or distributor’s commission group code in format specified by BIC to ensure uniqueness. Format is identical
to BIC discount group code, but indicates a commission rather than a discount (applies to goods supplied on agency terms)
|
|


The 20th uniform polyhedron is the Cubohemioctahedron; it has Wythoff symbol 4/3 4|3. Its dual is the hexahemioctacron. The pattern of polygons round each vertex is (6,4/3,6,4); its symmetry group is the octahedral group S4.
It has:
Euler characteristic: -2
It is one-sided; it has
Number of vertices: 12
Number of edges: 24
Number of faces: 10 (=4 hexagons and 3 quadrilaterals and 34/3).
Note: a polygon a/b means a shape made by taking a points and joining every bth of them; for instance 5/2 means a five-pointed star made by taking five points and joining every second point.


 Scratch leg; meow for can opener to feed me human is washing you why halp oh the horror flee scratch hiss bite yet scream at teh bath or hunt anything that moves, when in doubt, wash eat owner's food and see owner, run in terror. Scream at teh bath drink water out of the faucet so i am the best purr for no reason sweet beast. Sleep nap hola te quiero but sit on the laptop swat at dog, or who's the baby. Intently stare at the same spot roll on the floor purring your whiskers off mark territory, but present belly, scratch hand when stroked.
If it smells like fish eat as much as you wish.  Eat owner's food howl uncontrollably for no reason burrow under covers, so caticus cuteicus groom yourself 4 hours - checked, have your beauty sleep 18 hours - checked, be fabulous for the rest of the day - checked! chase ball of string or spread kitty litter all over house. Then cats take over the world scratch the furniture for need to chase tail hide when guests come over, so jump around on couch, meow constantly until given food, kitty loves pigs, or human is washing you why halp oh the horror flee scratch hiss bite.
 Cat is love, cat is life fall over dead (not really but gets sypathy) but put toy mouse in food bowl run out of litter box at full speed .


Web Bluetooth Demos hosted here:
Thermostadt
bluetooth-led-display
bluetooth-printer
bluetooth-racing-cars
bluetooth-rename
bluetooth-toy-bb8
bluetooth-toy-plane
heart-rate-sensor
playbulb-candle
Source code for Thermostadt web app
Source code for Thermostadt embedded
Source code and links for other demos


Rock Paper Scissors
Time is currently 1:50 AM and I’ve finally completed the Rock, Paper, Scissors game in the codecademy Javascript lesson. It was a little frustrating getting errors and not being able to figure out what was causing them.This website helped me out a lot though.


Display subtitles in synced video elements
Record audio when copying subtitle
Take screenshot when copying subtitle
Subtitle position offset from bottom
Ctrl+Shift+Z copies current subtitle to asbplayer


class: center, middle # Agenda 1. Review of last week 2. PHP Exercise 3. Introduction to Slim (PHP Framework) --- # Last Week in Review --- # APIs * What is an API? -- * What are they used for? -- * Three Types of APIs: -- * Operating System * Remote / Web APIs * Libraries / Frameworks -- * CURL, what is it? --- # RESTful APIs * What is REST? -- * 6 principles of a RESTful API? -- * client-server * stateless * cacheable * uniform interface * layered * code on demand -- * REST URL Structure -- * collection focused. * use HTTP request type to determine interaction * https://restcountries.eu/rest/v2/name/Germany -- * Strategies for Authentication -- * Basic Auth * API Keys * OAuth --- # Documentation * 4 Types of documentation -- * Inline Code Documentation * API Spec Sheets * Public documentatino websites * changelogs -- # Semantic Versioning * Version Numbers -- * Major * Minor * patch --- # Virtualbox / Vagrant * Benefits of server / dev environment management? * vagrant command to create server? * vagrant command to shut down/delete server? * vagrant command to ssh into server? --- # PHP * powers most of the internet. * programming language --- # New Business --- # PHP .center[![Center-aligned image](http://php.net/images/logos/new-php-logo.png)] Exercise: https://www.learn-php.org/ --- # Tracking Errors in PHP / Apache * Sometime errors will be displayed to the browser. * Errors also written to the Apache Error Log. ```Bash sudo su tail -f /var/log/apache2/error.log ``` * PHP error logs ```Bash tail -f /var/log/apache2/access.log ``` * access logs (shows traffic) --- # Composer .center[![Center-aligned image](https://getcomposer.org/img/logo-composer-transparent.png)] * This is the NPM of the PHP world. * PHP package manager. Benefits of composer: * manage dependencies * version lock dependencies * autoloader automatically brings dependencies and custom scripts into your application * ease of updating dependenceis --- # Using Composer: * More JSON Files! composer.json ```Javascript { "require": { "slim/slim" : "^3.0" } } ``` * add this file to git, that way anyone who checks out the repo will get same dependencies downloaded * ensures uniform versions of dependencies * dependencies are downloaded to a /vendor directory * gitignore the /vendor directory, otherwise all dependencies will be stored in your repo. --- # Slim * PHP framework for building apis and web applications. --- # Lets start a Slim project. From your labs/virtualMachines directory: -- Checkout the class4 branch ```Bash git fetch git checkout class4 ``` SSH into the vagrant machine ```Bash vagrant ssh ``` --- # Directory Setup * Change directory to your working code directory * This is configured as a shared directory with your Mac. It matches the virtualMachines directory. ```Bash cd /var/www/public ``` * make a new directory. ```Bash mkdir firstSlim ``` --- # Install Slim via Composer. ```Bash composer require slim/slim composer install ``` * This uses composer to fetch slim and it's dependencies and places them in a newly created 'vendor' directory * This directory is automatically created via composer install, so it should be excluded from git via gitignore. * created 'composer.json' and 'composer.lock' files --- # Code time! * create index.php in firstSlim directory --- # index.php Lets build the php code from scratch! --- # Empty PHP file ```PHP get('/hello/{name}', function (Request $request, Response $response, array $args) { $name = $args['name']; $response->getBody()->write("Hello, $name"); return $response; }); ``` * {name} in the url indicates what the argument will be called. * $response->getBody()->write("Hello, $name"); adds the text "Hello, $name" to the response. --- # Finish out the app ```PHP get('/hello/{name}', function (Request $request, Response $response, array $args) { $name = $args['name']; $response->getBody()->write("Hello, $name"); return $response; }); $app->run(); ``` * $app->run() calls out to slim's run function * This tells PHP to run the slim app. --- # Lets see it in action! Visit the following url with your name instead of 'your name here': http://<IP_ADDRESS>/firstSlim/hello/your_name_here --- # Questions, confuion? --- # Lets turn this into an API -- ## Step 1: logging ```Bash composer require monolog/monolog ``` index.php ```PHP $container = $app->getContainer(); $container['logger'] = function($c) { $logger = new \Monolog\Logger('my_logger'); $file_handler = new \Monolog\Handler\StreamHandler('../logs/app.log'); $logger->pushHandler($file_handler); return $logger; }; ``` * This creates a new directory 'logs' in the firstSlim directory * Creates and writes to app.log file in that directory. --- ## Step 2: database ```Bash cd /var/www/public mysql -u root -p < apidb.sql ``` Insert after "require './vendor/autoload.php';" ```PHP $config['db']['host'] = 'localhost'; $config['db']['user'] = 'root'; $config['db']['pass'] = 'root'; $config['db']['dbname'] = 'apidb'; ``` Need to pass new config into app creation. replace ```PHP $app = new \Slim\App; ``` with ```PHP $app = new \Slim\App(['settings' => $config]); ``` --- ## Step 3: new endpoint! Get people ```PHP $app->get('/people', function (Request $request, Response $response) { $this->logger->addInfo("GET /people"); $people = $this->db->query('SELECT * from people')->fetchAll(); $jsonResponse = $response->withJson($people); return $jsonResponse; }); ``` --- # Lets test it! http://<IP_ADDRESS>/firstSlim/people -- #Lets see it in action! http://<IP_ADDRESS>/slimExampleClient/ --- ## Step 4: New endpoints! Lab: Create remaining endpoints for rest. * Get person by id * Edit person by id * Delete person by id


Library to establish a session authenticated by myPBX using HTTP GET requests (REST). This is useful for example for App services implemented in PHP.
Constructor function to establish the session


--- category: 'input' sortorder: 40 ---
Handles input state from a mouse. Both isButtonDown
and isButtonPress
functions takes a button as an argument, it can have any of the following values: 'left', 'right', 'middle'.
// var window = new Window(...) var mouse = new Mouse(window); // Update the state for the mouse. mouse.updateState(); // Gets the coordinates relative to the window. var x = mouse.x; var y = mouse.y; if (mouse.isButtonDown('left') { // The left mouse button is down. }; if (mouse.isButtonDown('middle') { // The middle mouse button is down. }; if (mouse.isButtonPress('right')) { // The right mouse button was just pressed. };


Sonia is a 💻📱 designer. She likes to 🎨, 🍳 healthy food and 🏃🏽 3 times a week 💪🏽! Soon 🎓 with a Master in Business Communication, she would like to earn some 💰 to travel around the 🌎.
📍 in Lausanne
💼 working as a Product Designer
🏋 learning news skills as an UX Designer
This work is a Facebook Mobile redesign based on User Experience and navigation. The final output was presented as a clickable mobile prototype.
Advisory
My daily work at EdgeLab. The Advisory Application is financial tool used by advisors to recommend the best move to their clients.
USA
Soon to come, my Master thesis project will be written in cooperation with researchers from the United States (Clemson University & South Florida University).


{% if user.name %} Hello {{ user.name }},
{% endif %} You are receiving this message because there were too many failed login attempts for
your account at MetLife Legal Plans.
Use this link to choose a new password for your account:
{{ reset_url }}
Thank you for using MetLife Legal Plans!


Redisgn of the page according to the responsiveness of the application accepted by company in to the word of UI and UX
Redesign of the page according to the responsiveness of the application accepted by company in to the word of UI and UX


Your data hasn't sent anywhere. You can check your order in console ->
phone
123 456 789
address
92 NEW ALLAY, KS
open
9AM - 9PM
delivery time
~ 25 minutes