EXPERTISE & SKILLS
User Experience Design
Inventing effective ways for people to interact with products.
- Design Sprints - Wireframing & Prototyping - Illustration & Art Direction - Research
Interface design
Designing simple and user-friendly solutions for web and mobile.
- Sketch, Figma & Studio - Photoshop & Illustrator - Principle & After Effects - Invision
Front-end development
Developing and prototyping mobile and web applications.
- Javascript (ES6, Gulp, Express) - HTML (Pug), CSS (PostCSS) - GreenSock (JS animations) - Jekyll & ReactJS


As I was watching Amaz's stream on Twitch recently, several extremely improbable events happened. I began imagining crazy scenarios in my head, and ended up doing some Monte Carlo simulation to determine their exact probability of occuring. Here's one of my favorite.
Scenario
Imagine the following scenario. You're going first as mage versus warlock. It's turn 7, you flamestrike to reset the board. You feel pretty smug, with an arcane missles left in your hand and are up 10 HP to your opponent's 4. Missles plus ping would be lethal if your opponent doesn't draw into something good. Your opponent draws, emotes "Greetings", and slams down Dr. Boom, a 7/7 creature that summons two 1/1s, each of which also has deathrattles that deal 1-4 random damage to a random enemy character. End turn.
Neverlucky. You right click his face and mute him. Turn 8. Draw. Your very own Dr. Boom! You stare at your hand and face a decision: do you play arcane missles plus ping and hope that all missles hit face, or play both Dr. Boom and arcane missles and hope that the missles hit your opponent's bomb which then hits your bomb which then hits his face? Instinctively, the expected damage from the bombs could be higher than the guaranteed 1 damage from the ping. But is this intuition correct? What are the exact probabilities?
Question
The probability of winning this turn with missles + ping is 1.56% (=1/4^3), which is the event that all three missles hit face. Then, what is the probability of dealing at least 4 damage to the oppponent's face when both of your boards consist of Dr. Boom, and you play arcane missles?
My Solution
There may exist a closed form solution to this problem, but we employ a Monte Carlo simulation method for its relative simplicity and accuracy.
My proposed solution for the probability of winning by playing Dr. Boom + Arcane Missles is 10.3%. This is substantially higher than attempting to win with Arcane Missles + ping (1.56%).
The table below lists the discrete probability distribution of the damage to opponent following the Dr. Boom play + Arcane Missles play.
| Damage | Probability |
|---|---|
| 0 | 22.69% |
| 1 | 39.44% |
| 2 | 20.3% |
| 3 | 7.27% |
| 4 | 5.53% |
| 5 | 3.58% |
| 6 | 0.95% |
| 7 | 0.05% |
| 8 | 0.16% |
| 9 | 0.03% |
Code
Details to the simulation code can be found here .


Tallinn is the biggest port on the Baltic Sea. It sits on the southern shore of the Gulf of Finland, on the north coast of Estonia. Its medieval 'Old Town' is a World Heritage site and attracts many tourists.
Position 59º 27'N, 24º 44'E
Clearance is possible at both the Old City Marina and Port Noblessner, who will summon clearance officials on request.
Last updated January 2016.There are two good marinas here, located close to the city centre
The Old City Marina is about 10 minutes' walk from the City's historic "old town". Entry to this marina is through the port, heavy with cruise ship and passenger ferry traffic. Before reaching the outer breakwater of the harbour, yachts should call the Old City Harbour Port Control on VHF Ch: 14 for permission to enter. Small craft may enter the Port Basin and depart the navigation channel only during the green traffic light. See comments about this marina at bottom of page.
One mile west of the Old City marina is Port Noblessner which has the added advantage of a boatyard with shore storage.
Pirita (5km from Tallin Old City) offers 2 marinas for berthing and clearance is possible here.
The other harbours in the Gulf of Tallinn (Rohuneeme harbour, Miiduranna harbour, Vanasadam, Patareisadam, Kalasadam, Lennusadam, Peetri harbour, Miinisadam, Hundipea harbour, Paljassaare harbour, Katariina quay) do not serve pleasure craft.
Last updated January 2016.


Home
About
Services
shop
Purchase
Home
About
Services
shop
AWESOME WOO SHOP
Duis autem vel eum iriure dolor in hendrerit
Shop
Showing all 12 results
Sort by popularity
Sort by average rating
Sort by newness
Sort by price: low to high
Sort by price: high to low
Add to cart
Sale!
Black Ninja Scull
3.00
out of 5
£32.00
£28.00
Add to cart
Black Ninja T-shirt
5.00
out of 5
£26.00
Add to cart
Blue Ninja T-shirt
4.00
out of 5
£24.00
Add to cart
Blue Woo Special Disc
1.00
out of 5
£14.00
Add to cart
Sale!
Green Ninja T-shirt
3.00
out of 5
£25.00
£19.00
Add to cart
Sale!
Grey Woo Disc
4.00
out of 5
£16.00
£11.00
Add to cart
Light Woo Disc
5.00
out of 5
£19.00
Add to cart
Red Woo Disc
3.00
out of 5
£18.00
Add to cart
Sale!
White Ninja T-shirt
4.00
out of 5
£38.00
£25.00
Add to cart
Sale!
Woo Grey Ninja Poster
2.00
out of 5
£19.00
£14.00
Add to cart
Sale!
Woo Grey Skull Poster
4.50
out of 5
£18.00
£12.00
Add to cart
Sale!
Woo Red Poster
3.00
out of 5
£11.00
£7.00


Smart Clinic Login - Fathima Hospital
Smart Clinic
Login
{{error}}
User ID
UserName is required
Password
Password is required
User Type
Doctor
Login


Copy this instance of Action and all of it's data to another CouchDB.
Usage: Create an empty database on another Couch and enter the URL to that database into the target field in the format:
http://user:pass@couch/databaseIf you omit the user/pass the Action application will not be copied to the new Couch, just the data.


Promise
public class Promise<T> : NSObject
A Swift version of the Promise pattern popular in the javascript world
A promise represents the eventual result of an asynchronous operation.
The primary way of interacting with a promise is through its then method,
which registers callbacks to receive either a promise’s eventual value or
the reason why the promise cannot be fulfilled.
(https://promisesaplus.com)
“The point of promises is to give us back functional composition and error bubbling in the async world. They do this by saying that your functions should return a promise, which can do one of two things:
- Become fulfilled by a value
- Become rejected with an error” (https://gist.github.com/domenic/3889970)
-
This initializer needs to check for Promise
or ErrorType values to handle the case where T is Any and those then become valid argument values. Returns
an immutable, fulfilled promise using the supplied valueDeclaration
Swift
public static func valueAsPromise(value: T?) -> Promise<T>
Return Value
an immutable, fulfilled promise using the supplied value
-
This initializer checks for Promise values that are not type T, it requires special handling but since Swift cannot current require to be a assignment compatible with T, the only choice is to reject the promise if an incompatible value is returned from the original promise.
This initializer is necessary because T is Any, then Promise
where R is not T, will be passed through as a normal value in the other initializer. This specialized initializer forces it through this path. Returns
convenience method wrapping a promise of a different subtype than TDeclaration
Swift
public static func valueAsPromise<R>(existingPromise: Promise<R>) -> Promise<T>
Return Value
convenience method wrapping a promise of a different subtype than T
-
This initializer frees the client code from needing to check if the value being passed in is a promise already or not.
This version is necessary for those cases where T is NOT Any, so the first initializer would not be used by the compiler.
Returns
an immutable, fulfilled promise using an existing promiseDeclaration
Swift
public static func valueAsPromise(value: Promise<T>) -> Promise<T>
Return Value
an immutable, fulfilled promise using an existing promise
-
Returns
an immutable, rejected promise using the supplied errorDeclaration
Swift
public class func valueAsPromise(value: ErrorType) -> Promise<T>
Return Value
an immutable, rejected promise using the supplied error
-
Parameter
Parameter promises: list of generic promises that act as dependencies
Returns
a dependent promise that is fulfilled when all the supplied promises are fulfilled or rejected when one or more are rejected
Declaration
Swift
public class func all(promises:[Promise]) -> Promise<[Promise]>
Parameters
promises
list of generic promises that act as dependencies
Return Value
a dependent promise that is fulfilled when all the supplied promises are fulfilled or rejected when one or more are rejected
-
Creates a new pending promise with no chained promises
Declaration
Swift
public override init()
-
Creates a new immutable fulfilled promise with an optional type-safe value and no chained promises
This can be useful when an async user code process needs to return a promise, but already has the result (such as with a completed network request, database query, etc.)
Declaration
Swift
public init(_ value:T?)
-
Creates a new immutable rejected promise with an error and no chained promises
This can be useful when an async user code process needs to return a promise, but already has an error result (such as with a completed network request, database query, etc.)
Declaration
Swift
public init(_ error:ErrorType)
-
Read-only property that is true if the promise is still pending
Declaration
Swift
public var isPending: Bool
-
Read-only property that is true if the promise has been fulfilled
Declaration
Swift
public var isFulfilled: Bool
-
Read-only property that is true if the promise has been rejected
Declaration
Swift
public var isRejected: Bool
-
Read-only property that is the fulfilled value if the promise has been fulfilled, nil otherwise
Declaration
Swift
public var value: T?
-
Read-only property that is the rejection error if the promise has been rejected, nil otherwise
Declaration
Swift
public var error: ErrorType?
-
If the promise is pending, then change its state to fulfilled using the supplied value and notify any chained promises that it has been fulfilled. If the promise is in any other state, no changes are made and any chained promises are ignored.
Parameter
Parameter value: optional fulfilled value to use for the promiseDeclaration
Swift
public func fulfill(value: T?)
Parameters
value
optional fulfilled value to use for the promise
-
If the promise is pending, then change its state to rejected using the supplied error and notify any chained promises that it has been rejected. If the promise is in any other state, no changes are made and any chained promises are ignored.
Parameter
Parameter error: rejection error to use for the promiseDeclaration
Swift
public func reject(error: ErrorType)
Parameters
error
rejection error to use for the promise
-
This method lets your code add dependent results to an existing promise.
‘fulfill’ and ‘reject’ closures may be added to a promise at any time. If the promise is eventually fulfilled, the fulfill closure will be called one time, and the reject closure will never be called. If the promise is eventually rejected, the reject closure will be called one time, and the fulfill closure will never be called. If the promise remains in a pending state, neither closure will ever be called.
This method may be called as many times as needed, and the appropriate closures will be called in the order they were added via the then method.
If the promise is pending, then they will be added to the list of closures to be processed once the promise is fulfilled or rejected in the future.
If the promise is already fulfilled, then the fulfill closure will be called immediately
If the promise is already rejected, then if the reject closure exists, it will be called immediately
Parameter
Parameter fulfill: closure to call when the promise is fulfilled that returns an instance of PromiseClosureResult
Parameter
Parameter reject: optional rejection closure to call when the promise is rejected that returns an instance of PromiseClosureResult
If the reject closure does not exist, it will simply pass the .Error(errorType) value down the promise chain
If it does exist, it returns an instance of PromiseClosureResult, just as the fulfill closure does.
(Note that this means that either closure can redirect dependent promises in the chain, which can allow a reject closure to to recover by supplying a valid value so subsequent promises can continue)
Returns
a new instance of a promise to which application code can add dependent promises (e.g. chaining)Declaration
Swift
public func then(fulfill: ((T?) -> PromiseClosureResult<T>), reject: ((ErrorType) -> PromiseClosureResult<T>)?) -> Promise<T>
Parameters
fulfill
closure to call when the promise is fulfilled that returns an instance of PromiseClosureResult
reject
optional rejection closure to call when the promise is rejected that returns an instance of PromiseClosureResult
Return Value
a new instance of a promise to which application code can add dependent promises (e.g. chaining)
-
A convenience method with a nil reject closure. Since Objective-C does not recognize default parameters, this provides a work-around.
Declaration
Swift
public func then(fulfill: ((T?) -> PromiseClosureResult<T>)) -> Promise<T>


{{ page.title }}
Join Our Flock
Get our weekly blog posts by emails, get direct access to church leadership to talk to and ask questions, and more with just your email address.
Get our weekly blog posts by emails, get direct access to church leadership to talk to and ask questions, and more with just your email address.


Merge Conflicts
Command Line Interface
When using Git in a team, it's inevitable that a merge conflict will arise eventually.
Merge conflicts occur when trying to pull in updates to your local branch
or when merging in another branch.
Git tries to automatically integrate differences between the branches,
but sometimes it's not clear to Git which side is correct.
Rather than making an assumption about what the correct change is,
Git will throw a merge conflict.
Some instances may result in multiple merge conflicts.
It's up to the user to resolve these merge conflicts before moving on.
It's important to understand both how a merge conflict can arise and how to resolve one.
This section presents a simple scenario of how a merge conflict may present itself.
It also addresses strategies for merge conflict resolution.
Note the arrow(s) in the bottom-right corner that controls navigation through the lesson. You may also navigate by pressing ESC and using the arrow keys.
How Merge Conflicts Arise
Let's first consider how merge conflicts arise.
They typically occur when multiple developers touch the same file.
How Merge Conflicts Arise
Team Lead
In this scenario, Darth Vader is tasking his team with various upgrades to his Death Star. First, though, he writes a file himself.
How Merge Conflicts Arise
In the new file Darth Vader has created,
he has included a few variables indicating characteristics of the Death Star.
He tests his code out and pushes to the master branch once all tests pass.
He then divvies out some tasks to his other team members.
How Merge Conflicts Arise
He has given out two tasks. One to write code for the maneuvering of the Death Star throughout the galaxy, and another for real-time monitoring of weapon metrics. Vader may or may not realize it, but it is likely that both tasks will require editing of the same file.
How Merge Conflicts Arise
While it would be ideal that either (A) team members communicate with each other about this beforehand, or (B) are instructed to do so by the team lead, workflows do not always present themselves that nicely. In this scenario, let’s assume the worst.
How Merge Conflicts Arise
Boba Fett
Boba Fett adds a maneuvering method to the Death Star code. Notice that he has changed the known radius of the Death Star from 160 km to 140 km. We can’t be sure if this was by accident or through some knowledge that was gained in the development process.
How Merge Conflicts Arise
Jawa
The Jawa also progresses in its work on weapon metrics. Oddly, though, the Jawa has also changed the radius of the Death Star -- from 160 km to 150 km. Both developers changed the same line. This sort of conflict will cause a merge conflict in Git. This is common when developers work within the same file.
How to Resolve Merge Conflicts
Unlike the previous scenario, merge conflicts are not always as easily foreseen.
Often, developers simply pull in updates and may initially have no idea why they occurred!
Given this, it's worth approaching how to solve merge conflicts in a way that a developer
would normally experience them. So let's introduce a new scenario for this and begin fresh.
In a galaxy far, far away, another software team faces another merge conflict...
(click right arrow)
How to Resolve Merge Conflicts
Obi-Wan Kenobi and Chewbacca are developing software for the Republic. Obi-Wan wants to incorporate Chewbacca's latest updates. Obi-Wan tries to pull in Chewbacca's branch, but runs into a merge conflict! The details show that the problem lies in the README file:
CONFLICT (content): Merge conflict in droid/README
How to Resolve Merge Conflicts
If we check the status of our repository, we will see that the README
is under the unmerged paths.
Unmerged paths indicate merge conflicts.
As mentioned in the snippet below, we can also abort the merge entirely,
but we do not want to do that here.
Select the down arrow to see how one would abort a merge conflict.
Aborting a Merge
If you've encountered a merge conflict, you may want to first consult with peers before proceeding. If they are not immediately available to you, you may want to abort the merge and proceed with it later. There are other reasons you may want to abort a merge as well. Regardless, if you want to abort a merge, you can use this command from the command line:
git merge --abort
How to Resolve Merge Conflicts
If you open the file that caused the conflict, you can see what exactly is happening. On the right, we've opened the file for a closer view. We see that the file has additions, which include some weird things like angular brackets, HEAD, and a long hexadecimal number.
How to Resolve Merge Conflicts
- The angular brackets indicate the beginning and end of a conflicted segment.
-
The equal signs separate the code from the two branches
- The top half is from the branch you are merging into (e.g. dev_obiwan)
- The bottom half is from the branch you are pulling changes from (e.g. dev_chewbacca)
- The long hexadecimal number indicates the commit from which you are pulling changes
- Multiple merge conflict points can exist within a single file
How to Resolve Merge Conflicts
To resolve this conflict, you must decide what the end result should be. This may require discussing it with the other developer or even the team lead. For the sake of this example, let’s say we want to include both sentences added by Obi-Wan and Chewbacca.
How to Resolve Merge Conflicts
Resolving the Conflict - Option 1: Manually
Just open the file and edit it yourself
Often times this is the easiest option for small conflicts, but may not be for larger, more complex conflicts. When you edit the file, you will need to remove all lines that Git added that begin with:
<<<<<<< or ======= or >>>>>>>
These are the lines that Git added for marking the merge conflict.
How to Resolve Merge Conflicts
Resolving the Conflict - Option 2: You or Them
You may want to select either all of your changes or all of their changes
git merge --strategy-option ours
git merge --strategy-option theirs
Beware that selecting all of yours or theirs will completely ignore changes from the other party!
How to Resolve Merge Conflicts
Resolving the Conflict - Option 3: External Editor
Set up your Git config to open an external editor for merging. The initial set up of this can be slightly complicated, but overall it is worth it. Click here for a guide on configuring merge tools.
git mergetool
How to Resolve Merge Conflicts
Resolving conflicts is very context specific. In this particular scenario, we may want to keep both additions from users. Let's assume that, whichever path you've decided to go down, you've sorted out the conflict in the file. Git still needs to be told that all merge conflicts have been resolved. First, we must stage the resolved files using git add. You'll see that Git created a copy of the original file with the extension .orig in the process of throwing a merge conflict.
How to Resolve Merge Conflicts
Now that you've staged the file, simply enter:
git commit
but without the including a commit message.
Git should open a page like the one below, containing details of the merge.
You can edit this message if you'd like, though it's not common or necessary.
You'll see this same briefing for an unconflicted merge as well.
How to Resolve Merge Conflicts
And voila – you have successfully resolved a merge conflict from the command line!


Every bean deployed in OpenEJB has a unique deployment-id that identifies it within the scope of the entire container system. The server and container system refer beans at run-time using the bean's deployment id.
This deployment id is much like the
Remember that the EJB specification was designed so that enterprise beans could be create, packaged, and sold by vendors (EJB Providers). Furthermore, users should be able to buy a packaged set of beans (a jar with an ejb-jar.xml in it) and deploy it into an EJB Container without modification.
Let's consider this, what happens if two vendors each sell a package (jar)
that contains a bean with the
OpenEJB solves this with the OpenEJB-specific deployment id. By requiring that each bean deployed into OpenEJB has a unique name, we can guarantee that we are always referring to the right bean at all times. Furthermore, it allows you to deploy different versions of the same package several times in the same container system, each time giving the beans new deployment ids.
If you're lazy -- as any truly great programmer should be -- and don't want to type a deployment id for each bean every time you deploy a jar, you can use the -D option of the Deploy Tool. This will throw caution to the wind, and automatically assign the bean's ejb-name as the value of the bean's OpenEJB deployment id. This leaves up to you to guarantee that bean's ejb-name will be unique across all beans and jars in the container system. In other words, be very careful with the -D option!
In the container system, the deployment id is used to index the bean in a system-wide registry. This registry is refereed to on every call made in the container system. Being able to safely hash and cache bean information by id is a must. This stresses the importance of unique ids for every bean deployed in OpenEJB.
The Local (IntraVM) Server is an integral part of the container system and the two are, in many ways, inseparable. The Local Server takes care of all bean to bean and client to bean invocations made inside the virtual machine. For this reason, it often refered to as the IntraVM Server.
For bean to bean communications, the Local Server must create a JNDI
namespace (JNDI ENC) for each bean as defined by the bean's
All non-bean clients share one big global namespace. Since non-bean clients are not deployed and do not have a deployment descriptor like an ejb-jar.xml, the Local Server is unable to taylor a namespace for each non-bean client as it can for bean clients. The Local server cannot identify non-bean clients as they have no deployment id. All JNDI calls made by clients that the Local Server cannot identify go to the public, global namespace. The public, global JNDI namespace contains all beans and resources in the container system. name.
Each bean is added to the public, global namespace using it's deployment id as its JNDI lookup. For example, if a bean had a deployment-id of "/my/bean/foo", a non-bean client could lookup that bean as follows.
...
Object bean = initialContext.lookup("/my/bean/Foo");
...
If a bean in the container system made the above JNDI call, the Local Server would see the bean's identity (deployment id) hidden in the Thread, go get the bean's private JNDI namespace and finish the lookup on that. Since all names in bean's JNDI namespace are required start with "java:comp/env", the lookup would fail and the bean would receive a javax.naming.NameNotFoundException.
In short...
For beans: - Each bean has it's own private, personalized JNDI namespace - The names in it are the same names it uses in its ejb-jar.xml - Beans can only access their private namespace, period
For non-beans (everyone else): - Non-bean clients share the public, global JNDI namespace - The names in it are the deployment ids of all the beans - Non-bean clients can only access the one global namespace
The Remote Server has a public, global namespace just as the Local Server does. The difference being that the Remote Server only serves clients outside the container system and outside the virtual machine. So, all clients from the perspective of the Remote Server are non-bean clients. As a result, the Remote Server only has the one public, global JNDI namespace. Just as in the Local Server, the names in this namespace consist of the deployment ids of the beans in the container system.
Just as before, clients can lookup beans from the Remote Server using the bean's deployment id. For example, if a bean had a deployment-id of "/my/bean/foo", a client could lookup that bean as follows.
...
Object bean = initialContext.lookup("/my/bean/Foo");
...
The CORBA Adapter is separate than the Remote Server. It adapts the OpenEJB Container System and the Local Server into OpenORB as an embedded library. It provides users of OpenORB the ability to lookup and execute beans (EJBs) via the RMI-IIOP protocol. All the EJBHome and EJBObject interfaces of beans in OpenEJB are implemented by OpenORB as CORBA stubs and ties.
The beans are exported into OpenORB's naming service by deployment id. So, just as with the Local Server and Remote Server, clients can lookup beans using the bean's deployment id. OpenORB has a JNDI implementation of their naming service, so lookups can be done just as before.
...
String[] args = ...
// The ORB and Object
org.omg.CORBA.ORB orb = null;
org.omg.CORBA.Object bean = null.
// The Naming Service and Object Name
org.omg.CosNaming.NamingContext context = null;
org.omg.CosNaming.NameComponent[] name = null;
// Get the ORB
orb = org.omg.CORBA.ORB.init( args, null );
// Get the Naming Service
org.omg.CORBA.Object ref = null;
ref = orb.resolve_initial_references("NameService");
context = org.omg.CosNaming.NamingContextHelper.narrow( ref );
// Get the Name as a component
// Note: the string is the bean's deployment id
name = new org.omg.CosNaming.NameComponent[ 1 ];
name[0] = new org.omg.CosNaming.NameComponent("/my/bean/foo","");
// Finally, get the bean as a CORBA object
// Equvalent to an InitialContext.lookup("/my/bean/foo");
bean = context.resolve( name );
...
The deployment ID uniquely identifies the bean in the OpenEJB container system. Therefore, no two beans can share the same deployment ID.
If a bean attempts to use a deployment ID that is already in use by another bean, the second bean and all beans in it's jar will not be loaded. In addition, the system will log a warning like the following one asking you to redeploy the jar and choose an different deployment ID for the bean.
WARN : Jar C:\openejb\beans\fooEjbs.jar cannot be loaded. The Deployment ID "/my/bean/foo" is already in use. Please redeploy this jar and assign a different deployment ID to the bean with the ejb-name "FooBean".
For example, the acmeEjbs.jar contains a bean with the ejb-name "DaffyDuckBean". The disneyEjbs.jar contains contains a bean with the ejb-name "DonaldDuckBean".
We deploy the acmeEjbs.jar and give the "DaffyDuckBean" the deployment ID of "/my/favorite/duck". Sometime afterwards, we deploy the disneyEjbs.jar and assign the "DonaldDuckBean" the deployment ID "/my/favorite/duck", having forgotten that we already gave that unique ID to the "DaffyDuckBean" in the acmeEjbs.jar.
When the container system is started, the system will begin loading all the beans one jar at a time. It will first load the acmeEjbs.jar and index each bean by deployment ID. But, when the system reaches the disneyEjbs.jar, it will discover that it cannot index the "DonaldDuckBean" using the deployment ID "/my/favorite/duck" because that index is already taken.
The system cannot load the "DonaldDuckBean" and must also ignore the rest of the beans in the disneyEjbs.jar as they may need the "DonaldDuckBean" bean to function properly. The disneyEjbs.jar is skipped and the following warning is logged.
WARN : Jar C:\openejb\beans\disneyEjbs.jar cannot be loaded. The Deployment ID "/my/favorite/duck" is already in use. Please redeploy this jar and assign a different deployment ID to the bean with the ejb-name "DonaldDuckBean".


Jazz singer Jacqui Dankworth ‘really proud’ to follow parents with royal honour
The daughter of Johnny Dankworth and Cleo Laine said the Duke of Cambridge told her he is trying to get pop music played at investitures.
British jazz singer Jacqui Dankworth has spoken of her pride at receiving an MBE after last being at Buckingham Palace with her father when he received a knighthood.
Dr Dankworth was recognised for her services to music at an investiture ceremony on Tuesday.
After being presented with her honour by the Duke of Cambridge, she told the PA news agency that the last time she was at the palace was when her father, jazz musician and composer Sir John “Johnny” Dankworth, received a knighthood for his services to music in 2006.
Her mother – Dame Cleo Laine – is an English jazz and pop singer and has also been recognised by the Queen for her services to music.
“I’m really proud to be here,” Dr Dankworth said on Tuesday.
Dr Dankworth paid her compliments to the string orchestra which played during the ceremony, describing it as “lovely music”.
“I told the duke I really love this music and he said he’s been trying to get them to play pop music,” she said.
Dr Dankworth, who was born in Northampton, has worked as an actress with the Royal Shakespeare Company, the Royal National Theatre and in West End Theatre.
She released her first album, As The Sun Shines Down On Me, in 2003.


Hi! You can add next step dynamically
Hi! I'm dynamic step that can be enabled/disabled programmatically via the toggle button under the wizard !
Hi! I'm dynamic step added automatically !
Hi! I'm dynamic step added automatically during ngAfterViewInit of this wizard using a TemplateRef!
Hi! I'm a step added dynamically using a TemplateRef by clicking a button from the first step !


1Million+ Orders!
5Million+ Orders!
2.5Million+ Orders!
Thank you for odering with Gamer Hq the game will be delivered to your address !
© 2017 Game Robo. All Rights Reserved | Design by Nevo(nevooronni@gmail.com)


S-3
Bind a cell to a localizer1. Bind cells of prevclose
column to ft-in
localizer:
In its default state, none of the cells in the grid at left are formatted. In this activity, we reset the grid to its default state (if needed) and then add formatting to one of the columns using a supplied custom localizer.
- If needed: Switch to the Data tab and click its button to reload the default data
- Switch to the State tab
- If needed: Click the tab’s button to reload the default state
-
Add the format grid property to the
prevclose
column:prevclose: { format: "ft-in", halign: "right" }
- Click the button
- The values in this column are now formatted as feet and inches
format
property binds the cell to a localizer.
The value must be the name of a registered localizer, in this case ft-in
, a custom localizer packaged with this workbench app.
The value displayed in the cell is formatted by localizer.format.
2. Remove ft-in
localizer binding:
- Click the button to reload the default contents, undoing our edit
3. Analyze formatter code:
- Switch to the Format tab
- Select the
ft-in
localizer from the Load drop-down - The
format
method
ft-in
.
On the next page, we will create a custom localizer from scratch.


Mon to Sun 10:00 - 19:00
+91882 000 0085,<PHONE_NUMBER>,<PHONE_NUMBER>,<PHONE_NUMBER>,<PHONE_NUMBER>
With proven track record of unprecedented success in the real estate sector, Sky City Builders and Promoters have made their prolific presence felt with prestigious, successful and highly coveted projects across Punjab, Himachal, Haryana, Chandigarh, Panchkula, Zirakpur and Mohali.
Boasting of extremely thriving commercial and residential projects across the spectrum of North India, Sky City Builders and Promoters oers ultra modern, spacious, world class spaces that spell class, superb utility and ultimate affordability and are the last word in evolutionary urban trends.
Hundreds of fully satisfied clients across North India attest to the commercial and residential structures and amenities with outstanding Features. We not only make structures but create spaces where life breathes, happiness multiplies, businesses thrive and communities rejoice.
Read MoreIt is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.It is a long established fact that a reader is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.It is a long established fact that a reader is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.It is a long established fact that a reader is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.It is a long established fact that a reader is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. it is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. will be distracted by the readable content of a page when looking at its layout.


Definition
Butterfly Spread strategy involves four option contracts with the same expiration but three different strike prices. There are four kinds of Butterfly Spread:
| Name |
Strategy |
| Long butterfly spread with calls |
Buy 1 ITM call, sell 2 ATM call, buy 1 OTM call |
| Long butterfly spread with puts |
Buy 1 ITM put, sell 2 ATM put, buy 1 OTM put |
| Short butterfly spread with calls |
Sell 1 ITM call, buy 2 ATM call, sell 1 OTM call |
| Short butterfly spread with puts |
Buy 1 ITM put, sell 2 ATM put, buy 1 OTM put |
Butterfly Spread strategy consists of three legs with a total of four options. In this tutorial, we take Long Butterfly Spread as an example: long one ITM call, short two ATM calls and long one OTM call. All the calls have the same expiration. On the other hand, the middle strike is halfway between the lower and the higher strikes.
The aim of Butterfly Spread strategy is to gain profits when traders think that the underlying stock will not rise or fall much by expiration.
Payoff
price = np.arange(800,1100,1)
# Suppose the undelying price at time 0 is 935
k_itm = 915 # the strike price of ITM call
k_otm = 955 # the strike price of OTM call
k_atm = 935 # the strike price of ATM call
premium_itm = 45 # the premium of ITM call
premium_otm = 15 # the premium of OTM call
premium_atm = 25 # the premium of ATM call
# payoff for the long ITM call position
payoff_itm_long = [max(-premium_itm, i-k_itm-premium_itm) for i in price]
# payoff for the long OTM call position
payoff_otm_long = [max(-premium_otm, i-k_otm-premium_otm) for i in price]
# payoff for the 2 short ATM call position
payoff_atm_short = [min(2*premium_atm, -2*(i-k_atm-premium_atm)) for i in price]
# payoff for Butterfly Spread Strategy
payoff = np.sum([payoff_itm_long,payoff_otm_long,payoff_atm_short], axis=0)
plt.figure(figsize=(20,15))
plt.plot(price, payoff_itm_long, label = 'Long ITM Call')
plt.plot(price, payoff_otm_long, label = 'Long OTM Call')
plt.plot(price, payoff_atm_short, label = 'Short 2 ATM Call')
plt.plot(price, payoff, label = 'Long Call Butterfly Spread')
plt.legend(fontsize = 20)
plt.xlabel('Stock Price at Expiry',fontsize = 15)
plt.ylabel('payoff',fontsize = 15)
plt.title('Long Call Butterfly Spread Payoff',fontsize = 20)
plt.grid(True)
Implementation
Step 1: Initialize your algorithm including setting the start date and the end date, setting the cash and implement a coarse selection of option contract. SetFilter(-9, 9, timedelta(30), timedelta(60))
helps us choose the contracts which expire in 30 to 60 days from now on. Since ITM call strike and OTM call strike are symmetrical with ATM call strike. For the strike parameter, the first parameter is the minimum strike rank relative to market price, the second parameter is the maximum strike rank relative to market price. The rank of ATM contract is 0. Here we need to choose 2 numbers which are symmetrical with 0.
def Initialize(self):
self.SetStartDate(2017, 4, 01)
self.SetEndDate(2017, 5, 30)
self.SetCash(150000)
equity = self.AddEquity("GOOG", Resolution.Minute)
option = self.AddOption("GOOG", Resolution.Minute)
self.symbol = option.Symbol
option.SetFilter(-9, 9, timedelta(30), timedelta(60))
# use the underlying equity GOOG as the benchmark
self.SetBenchmark(equity.Symbol)
Step 2: Second we need to choose an expiration date for all the contracts in Butterfly Spread strategy. Then filter out all the call options expire on that date.
for i in optionchain:
if i.Key != self.symbol: continue
chain = i.Value
# sorted the optionchain by expiration date and choose the furthest date
expiry = sorted(chain,key = lambda x: x.Expiry, reverse=True)[0].Expiry
# filter the call options from the contracts expires on that date
call = [i for i in chain if i.Expiry == expiry and i.Right == 0]
Step 3: Sort the call options by their strike price in ascending order. Then the ATM option is the one which has the smallest absolute value of the difference between the strike price and the underlying asset price. The OTM option is the last one in this call options list which has the highest strike price. The corresponding ITM option is the first one in the list which has the lowest strike price.
# sorted the contracts according to their strike prices
call_contracts = sorted(call,key = lambda x: x.Strike)
if len(call_contracts) == 0: continue
# choose OTM call
self.otm_call = call_contracts[-1]
# choose ITM call
self.itm_call = call_contracts[0]
# choose ATM call
self.atm_call = sorted(call_contracts,key = lambda x: abs(chain.Underlying.Price - x.Strike))[0]
Step 4: Purchase 1 ITM call option and 1 OTM call option, then sell 2 ATM call option.
self.Sell(self.atm_call.Symbol ,2)
self.Buy(self.itm_call.Symbol ,1)
self.Buy(self.otm_call.Symbol ,1)
Summary
From the following algorithm, at time 0, the GOOG share price is $832.8. We purchase 1 OTM call option strike at $855, 1 ITM call option strike at $810 and sell 2 ATM options strike at 835. At the expiry 05/19/2017, the share price is $930, then the long positions of the ITM option and the OTM option are all exercised, we buy 100 GOOG shares at $810 and buy another 100 shares at $855. At the same time, the 2 short positions of the ATM option are also exercised. We have to sell 200 GOOG shares to option holder at $835. Then we no longer hold positions after the expiration of this Long Call Butterfly Spread. Since the stock price had a sharp increase during the life of options, we make no profits from this strategy.
Algorithm


HeaderDoc is a system for embedding structured commentary in C and C++ header files and producing rich HTML output from that commentary. HeaderDoc comments are similar in appearance to JavaDoc comments in a Java source file, but there are differences related to handling specifics of C and C++ and to providing a slightly more formal tag set to simplify parsing.
A simple HeaderDoc comment for a function might look like this:
/*! @function HMBalloonRect @discussion Use HMBalloonRect to get information about the size of a help balloon before the Help Manager displays it. @param inMessage The help message for the help balloon. @param outRect The coordinates of the rectangle that encloses the help message. The upper-left corner of the rectangle has the coordinates (0,0). */ OSErr HMBalloonRect (const HMMessageRecord *inMessage, Rect *outRect);
When converted to HTML (by headerDoc2HTML, described below), the tagged comment above produces this output:
HMBalloonRect
Use HMBalloonRect to get information about the size of a help balloon before the Help Manager displays it. Parameters
|
Also included with the main script (headerDoc2HTML) is gatherHeaderDoc, a utility script that creates a master table of contents for all documentation generated by headerDoc2HTML. Information on running gatherHeaderDoc is provided in the next section.
HeaderDoc includes two scripts, headerDoc2HTML.pl which generates documentation for each header it encounters, and gatherHeaderDoc.pl which finds these islands of documentation and assembles a master table of contents linking them together.
Once you have a header containing HeaderDoc comments, you can run the headerDoc2HTML.pl script to generate HTML output like this:
> headerDoc2HTML.pl MyHeader.h
This will process "MyHeader.h" and create an output directory called "MyHeader" in the same directory as the input file. To view the results in your web browser, open the file index.html that you find inside the output directory.
Instead of specifying a single input file (as above), you can specify an input directory, if you wish. HeaderDoc will process every '.h' file in the input directory (and all of its subdirectories), generating an output directory of HTML files for each header that contains HeaderDoc comments.
If you want to specify another directory for the output, use the "-o" switch:
> headerDoc2HTML.pl -o /tmp MyHeader.h
HeaderDoc normally lists the name of each file it processes to the Terminal. The "-q" switch makes HeaderDoc operate silently:
> headerDoc2HTML.pl -q MyHeader.h > headerDoc2HTML.pl -qo /tmp MyHeader.h
The "-H" switch turns on inclusion of the htmlHeader line, as specified in the config file.
The "-X" switch causes headerdoc to output XML content instead of HTML.
The "-d" switch turns on extra debugging output.
The "-h" switch causes HeaderDoc to output an XML file containing metadata about the headerdoc output.
The "-u" switch disables sorting of functions, data types, and so on.
You can use the "-v" switch to make HeaderDoc report the versions of all its constituent modules. This can be useful for bug reporting purposes.
> headerDoc2HTML.pl -v
This script scans an input directory (recursively) for any documentation generated by headerDoc2HTML. It creates a master table of contents (named MasterTOC.html by default--the name can be changed by setting a new name in the configuration file). It also adds a "top" link to all the documentation sets it visits to make it easier to navigate back to the master table of contents.
Here's an example of how to create documentation for a number of headers (the sample ones provided with the scripts) and then generate a master table of contents:
> headerDoc2HTML.pl -o OutputDir ExampleHeaders > gatherHeaderDoc.pl OutputDir
You can now open the file OutputDir/MasterTOC.html in your browser to see the interlinked sets of documentation.
You can set values for some commonly altered variables. Currently, the configuration file lets you set these things:
- copyrightOwner
- The copyright notice that appears at the bottom of the HTML pages. Unless you specify a value, no copyright will appear.
- defaultFrameName
- The name of the file containing the frameset instructions (by default, index.html).
- compositePageName
- The name of the file containing the printable HTML page (by default, CompositePage.html).
- masterTOCName
- The name of the file containing the master table of contents for a series of headers (by default, MasterTOC.html). (This variable is used by the gatherHeaderDoc script.)
- apiUIDPrefix
- The prefix for named anchors in the HTML (by default, apple_ref). (In the HTML, HeaderDoc adds a self-describing named anchor near each API declaration -- for example <a name="//apple_ref/c/func/CFArrayAppendValue">. These can be useful for index generation and other purposes. See Symbol Markers for HTML-based Documentation for more information.)
- ignorePrefixes
- A list of tokens to leave out of the final output if they occur at the start of a line (before any other non-whitespace characters).
- htmlHeader
- A string (generally a server-side include directive) that headerdoc will insert into the top of each right-side and composite HTML page if you specify the -H flag on the command line.
HeaderDoc looks in three places for values for these variables, in this order:
A variable can be assigned a value in any of these places, but only the last value read for a given variable will affect the output of a run of the script. If you are happy with the default values for these variables (as described above), you don't need to provide a configuration file. If you want to change just one or more values, provide a configuration file that declares just those values.
The format of the configuration file is this:
key1 => value1 key2 => value2
Here is a sample configuration file.
HeaderDoc comments are of the form:
/*! @function FunctionName This is a comment about FunctionName. */
In their simplest form (as above) they differ from standard C comments in only two ways:
However, you can use additional JavaDoc-like tags within the HeaderDoc comment to identify specific fields of information. These tags will make the comments more amenable to conversion to HTML. For example, a more complete comment might look like this:
/*! @function HMBalloonRect @abstract Reports size and location of help ballon. @discussion Use HMBalloonRect to get information about the size of a help balloon before the Help Manager displays it. @param inMessage The help message for the help balloon. @param outRect The coordinates of the rectangle that encloses the help message. The upper-left corner of the rectangle has the coordinates (0,0). */
Tags are indicated by the "@" character, which must appear as the first non-whitespace character on a line.
The first tag in a comment announces the API type of the declaration (function, struct, enum, and so on). The next two lines (tagged @abstract and @discussion) provide documentation about the API element as a whole. The abstract can be used in summary lists, and the discussion can be used in the detailed documentation about the API element.
The abstract and discussion tags are optional, but encouraged. Their use enables various improvements in the HTML output, such as summary pages. However, if there is untagged text following the API type tag and name (@function HMBalloonRect, above) it is assumed to be a discussion. With such untagged text, HeaderDoc assumes the discussion extends from the end of the API-type comment to the next HeaderDoc tag or to the end of the HeaderDoc comment, whichever occurs first.
HeaderDoc understands some variants in commenting style. In particular, you can have a one-line comment like this:
/*! @var settle_time Latency before next read. */
...and you can use leading asterisks on each line of a multiline comment:
/*! * @function HMBalloonRect * @abstract Reports size and location of help ballon. * @discussion Use HMBalloonRect to get information about the size of a help balloon * before the Help Manager displays it. * @param inMessage The help message for the help balloon. * @param outRect The coordinates of the rectangle that encloses the help message. * The upper-left corner of the rectangle has the coordinates (0,0). */
If you want to specify a line break in the HTML version of a comment, use two carriage returns between lines rather than one. For example, the text of the discussion in this comment:
/*! * @function HMBalloonRect * @discussion Use HMBalloonRect to get information about the size of a help balloon * before the Help Manager displays it. * * By checking the help balloon size before display, you can guard against... */
...will be formatted as two paragraphs in the HTML output:
HMBalloonRect
Use HMBalloonRect to get information about the size of a help balloon before the Help Manager displays it. By checking the help balloon size before display, you can guard against...
|
Often, you'll want to add a comment for the header as a whole in addition to comments for individual API elements. For example, if the header declares API for a specific manager (in Mac OS terminology), you may want to provide introductory information about the manager or discuss issues that apply to many of the functions within the manager's API. Likewise, if the header declares a C++ class, you could discuss the class in relation to its superclass or subclasses.
The value you give for the @header tag serves as the title for the HTML pages generated by headerDoc2HTML. The text you associate with the @header tag is used for the introductory page of the HTML website the script produces.
|
|
|
|
|
| @header | @header Repast Manager | The name under which the API is categorized. Typically used to declare the Manager name (for classic Mac APIs) or class name (for object-oriented APIs) |
|
| @copyright | @copyright Apple | Copyright info to be added to each page. This overrides the config file value and may not span multiple lines. |
|
| @meta | @meta robots index,nofollow @meta http-equiv="refresh" content="0;http://www.apple.com" |
Meta tag info to be added to each page. This can be either in the form "@meta <name> <content>" or "@meta <complete tag contents>", and may not span multiple lines. |
|
| @availability | @availability 10.3 and later | A string that describes the availability of a function, class, and so on. |
|
| @updated | @updated 2003-03-14 | The date at which the header was last updated. |
|
Example:
/*! @header Repast Manager The Repast Manager provides a functional interface to the repast driver. Use the functions declared here to generate, distribute, and consume meals. @copyright Dave's Burger Palace @updated 2003-03-14 @meta http-equiv="refresh" content="0;http://www.apple.com" */
Tags are largely specific to a particular programming languagethe @method tag has no place in a C header, for example. Refer to the following sections for information about which tags are available for a particular language context.


Tutorials are a separate registration and are $195 per session. {% comment %}Buy tutorial tickets before they sell out!{% endcomment %}
Tutorials are a separate registration and are TBD per session. Buy tutorial tickets before they sell out!
{% endcomment %}Tutorials are a separate registration and are TBD per session. Buy tutorial tickets before they sell out!
{% endcomment %}Tutorials are a separate registration and are TBD per session. Buy tutorial tickets before they sell out!
{% endcomment %}Tutorials are a separate registration and are TBD per session. Buy tutorial tickets before they sell out!
{% endcomment %}


This is a problem that’s been thrown around the Facebook recently it seems. Man, it seems so simple:
$$6÷2(1+2)=?$$
Simple until you ask a group of people what the answer is, and find out half of us think it’s nine, and the other half think it’s one.
So what IS the answer?
Short answer: it’s a terribly written problem, or more accurately, it’s a problem written solely to make people argue over its order of operations. It touches on the ambiguity of parentheses, multiplication, and division in the “Please Excuse My Dear Aunt Sally / Parentheses Exponents Multiplication Division Addition Subtraction” mnemonic.
The issue stems from the incorrect (but often subconscious) belief that there exists a Bible of Mathematics somewhere, which decrees every detail of how arithmetic should be expressed and simplified. As simple as the problem seems, there’s no prevailing convention on whether $6÷2$ or $2(1+2)$ gets precedence here. Particularly when half of school teachers say multiplication has precedence over division, and half say multiplication and division have equal precedence and are evaluated left-to-right. (And hey does implied multiplication by parentheses fall into the P or M of PEMDAS?)
In the real world of mathematics, this is as unanswerable a question as me asking “Is there a mathematical size bigger than the amount of integers but less than the amount of real numbers?” [1] because you can’t address it without first specifying the rules you are allowed to use on the problem.
Thus I’m forced to settle for what we call a “consistency result”:
If ÷ division takes precedence over implied multiplication located further to the right, then $6÷2(1+2)=9$. If not, then $6÷2(1+2)=1$.
That’s the best that can be done, mathematically. If you wanted a definitive answer, you should have asked me to evaluate $(6÷2)(1+2)$ or $6÷(2(1+2))$. That’s what parentheses are for, anyway.
[1] This is something called The Continuum Hypothesis. We use the word “hypothesis” here because once mathematicians formalized the rules of set theory (well, one set of rules for set theory), it couldn’t be proven true or false. We later proved that it couldn’t be proven true or false, basically because we didn’t provide enough rules to handle the question. So just like $6÷2(1+2)=9$ or $6÷2(1+2)=1$ depending on what rules we use, we can assume the answer to the Continuum Hypothesis is either yes or no.

Addendum: Someone rightfully pointed out on Hacker News that calling the Continuum Hypothesis a “silly” question doesn’t do it justice. Rather, I mean that posing the Continuum Hypothesis as a “yes or no” question is silly.


Our customers are important for us and we would like to propose you another FREE week, so you can try all the benefits of our service.
Don't miss this wonderful opportunity.
Do you still want to cancel your subscription?
We really want you to stay with us so we would like to propose you one month of FREE usage of our service.
Whole month credit card reports absolutely FREE of charge.

We are ready to offer you whole year service usage ONLY for 10$ a month!
Please think twice. This is our last proposition.
Cancel subscription anyway?


amd-utils / function
Function(al) utilities.
Table of Contents #
bind(fn, context, [...args]):Function #
Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection.
Arguments
fn
(Function) : Target Functioncontext
(Object) : Execution context (object used asthis
)[...args]
(*) : Arguments (0...n arguments)
compose(...fn):Function #
Returns the composition of a list of functions, where each function consumes
the return value of the function that follows. In math terms, composing the
functions f()
, g()
, and h()
produces f(g(h()))
.
function add2(x) { return x + 2 } function multi2(x) { return x * 2 } map([1, 2, 3], compose(add2, multi2)); // [4, 6, 8] //same as map([1, 2, 3], function(x){ return add2( multi2(x) ); });
func(name):Function #
Returns a function that calls a method with given name
on supplied object.
Useful for iteration methods like array/map
and array/forEach
.
See: prop()
// will call the method `getName()` for each `user` var names = map(users, func('getName'));
prop(name):Function #
Returns a function that gets a property with given name
from supplied object.
Useful for using in conjunction with array/map
and/or for creating getters.
See: array/pluck()
var users = [{name:"John", age:21}, {name:"Jane", age:25}]; // ["John", "Jane"] var names = map(users, prop('name'));
series(...fn):Function #
Returns a function that will execute all the supplied functions in order and
passing the same parameters to all of them. Useful for combining multiple
array/forEach
into a single one and/or for debugging.
// call `console.log()` and `doStuff()` for each item item in the array forEach(arr, series(console.log, doStuff));
For more usage examples check specs inside /tests
folder. Unit tests are the
best documentation you can get...
Documentation generated by mdoc.


Specifies additional criteria for selecting bulk mutate jobs.
Located in /adwords/src/Google/Api/Ads/AdWords/v201109/BulkMutateJobService.php (line 13638)
JobSelector | --BulkMutateJobSelector
Inherited from JobSelector
JobSelector::$includeHistory
JobSelector::$includeStats
JobSelector::$JobSelectorType
Gets the namesapce of this class
Gets the xsi:type name of this class
Inherited From JobSelector
JobSelector::__construct()
JobSelector::getNamespace()
JobSelector::getParameterMap()
JobSelector::getXsiTypeName()
JobSelector::__get()
JobSelector::__set()
Documentation generated by phpDocumentor 1.4.4


A design, build, and research project to study how visitors at science centers understand data visualization
techniques.
About the xMacroscope Platform
The xMacroscope is an open-source software and technology platform. It will allow us to build science center
exhibit experiences that let visitors construct visualizations using their own experiences.


Ads - Home
Ads - Login
Ads - Registration
Ads - My Ads
Ads - Publish New Ad
Ads - Delete Ad
Ads - Edit Ad
Ads - Edit User Profile
Ads Administration - Ads
Ads Administration - Edit Ad
Ads Administration - Delete Ad
Ads Administration - Users
Ads Administration - Edit User Profile
Ads Administration - Delete User
Ads Administration - Categories
Ads Administration - Create Category
Ads Administration - Edit Category
Ads Administration - Delete Category
Ads Administration - Towns
Ads Administration - Create Town
Ads Administration - Edit Town
Ads Administration - Delete Town
{{authorization.getLocalUser().username}}
Logout


Breakfast:
mondayBreakfast
Snack:
mondaySnack1
Lunch:
mondayLunch
Snack:
mondaySnack2
Dinner:
mondayDinner
Breakfast:
tuesdayBreakfast
Snack:
tuesdaySnack1
Lunch:
tuesdayLunch
Snack:
tuesdaySnack2
Dinner:
tuesdayDinner
Breakfast:
wednesdayBreakfast
Snack:
wednesdaySnack1
Lunch:
wednesdayLunch
Snack:
wednesdaySnack2
Dinner:
wednesdayDinner
Breakfast:
thursdayBreakfast
Snack:
thursdaySnack1
Lunch:
thursdayLunch
Snack:
thursdaySnack2
Dinner:
thursdayDinner
Breakfast:
fridayBreakfast
Snack:
fridaySnack1
Lunch:
fridayLunch
Snack:
fridaySnack2
Dinner:
fridayDinner
Breakfast:
saturdayBreakfast
Snack:
saturdaySnack1
Lunch:
saturdayLunch
Snack:
saturdaySnack2
Dinner:
saturdayDinner
Breakfast:
sundayBreakfast
Snack:
sundaySnack1
Lunch:
sundayLunch
Snack:
sundaySnack2
Dinner:
sundayDinner


Fairy Mimyu:
Oh my, hasn't the baby grown! You've done an admirable job raising him. His mother will be so proud! Yes, he'll make a fine strider!
"Will you change my hatchling into a strider?"


Get number of CPUs available.
Fetch the number of CPUs available based on the current priority and limit configuration.
| Returns: | An integer with the number of CPUs that are available. |
|---|---|
| Return type: | int |
Fetch all running DummyMP system process IDs.
Looking through all of the DummyMP processes, determine if any are running, and if any, retrieve their system process IDs.
| Returns: | An list with the system process IDs of current running spawned DummyMP processes. |
|---|---|
| Return type: | list |
Get the total number of CPUs on the system.
Detects and returns the total number of CPUs on the system.
| Returns: | An integer with the number of CPUs that are on the system. |
|---|---|
| Return type: | int |
Check if the CPU availability needs to be updated.
Utilizing configuration and checking the time elapsed from the previous check, determine whether the CPU availability function, getCPUAvail(), needs to be run or not to update CPU availability.
| Returns: | Boolean indicating whether the CPU availability needs to be updated or not. |
|---|---|
| Return type: | bool |
Poll for processes and return information about them.
Polls all processes and returns a dictionary with information about all of the processes.
| Parameters: | interval (int) – Delay before fetching process status. This is akin to top -d ##, where a delay is specified. |
|---|---|
| Returns: | Tuple with the first element being a list of Process
objects, each with a .dict attribute. Each .dict attribute
contains information about the process, stored in the form of a
dict. It includes:
The second element in the tuple contains a summary dictionary with the total number of running, stopped, and zombie processes, with keys ‘running’, ‘stopped’, and ‘zombie’, respectively. (
[Process(
pid=30159, name='services.exe',
dict={'username':USERNAME, ...}
), ...],
{'running': ##, 'stopped': ##, ...}
)
|
| Return type: | tuple |
Get maximum processors for DummyMP to use.
Fetch and return the maximum number of processors/CPUs for DummyMP to use.
| Returns: | Integer specifying the current maximum number of processors (or CPUs) for DummyMP to use. |
|---|---|
| Return type: | int |
Get the priority mode that DummyMP is using.
Fetch and return the priority mode integer constant that DummyMP is using.
| Returns: | Integer constant specifying the priority mode integer constant that DummyMP is using. |
|---|---|
| Return type: | int |
Get function returns from completed function runs.
Fetch and return a dictionary of function returns from completed function runs. The dictionary is indexed by call order, zero indexed.
| Returns: | Dictionary of function returns, indexed by call order, and zero indexed. |
|---|---|
| Return type: | dict |
Get DummyMP’s version
Fetch and return the DummyMP library version.
| Returns: | String specifying the DummyMP library version. |
|---|---|
| Return type: | str |
Kill all currently running processes and remove them from queue.
Kill all of the currently running processes and remove them from the internal running queue.
Reset DummyMP state and kill all currently running processes.
This resets the DummyMP state, clearing any configuration or state data set. Before resetting, this will kill all of the currently running processes and remove them from the internal running queue. (This calls killall() before resetting.)
Run a function with multiprocessing.
Run a function with multiprocessing. This actually queues the function and its arguments for running - you need to run process_process() or process_until_done() in order to actually execute the function.
| Parameters: |
|---|
Set whether to deepcopy arguments or not.
Change whether DummyMP will deepcopy the arguments or not. If it is disabled, it is up to the user to ensure that a copy of the arguments is preserved for further use.
| Parameters: | tf (bool) – Boolean indicating whether to enable argument deepcopy or not. |
|---|
Set the process completion callback for DummyMP.
Set the callback for DummyMP to call when a process has completed.
The callback is called with the following arguments: (config.total_completed, config.total_running, config.total_procs)
| Parameters: | callback (function) – Function callback to call when a process has completed. |
|---|
Set whether to deepcopy keyword arguments or not.
Change whether DummyMP will deepcopy the keyword arguments or not. If it is disabled, it is up to the user to ensure that a copy of the keyword arguments is preserved for further use.
| Parameters: | tf (bool) – Boolean indicating whether to enable keyword argument deepcopy or not. |
|---|
Set maximum processors for DummyMP to use.
Set the maximum number of processors/CPUs for DummyMP to use. Regardless of priority mode, the number of processors/CPUs it takes advantage of will be capped at the number you specify.
| Parameters: | max_proc (int) – Integer specifying the maximum number of processors (or CPUs) for DummyMP to use. |
|---|
Set the priority mode for DummyMP.
Set the priority mode for DummyMP. The priority mode controls how conscious DummyMP is of other running processes on the system.
Available modes:
- DUMMYMP_GENEROUS - Generous mode.
- Very conservative about using any CPU, and ensures that no one else is disrupted. Note that this is VERY GENEROUS - if all CPUs are taken, DummyMP will wait until there are available CPUs! (All other modes will run a single process, regardless of CPU usage.) This is the slowest mode!
- DUMMYMP_NORMAL - Normal mode.
- Careful not to take up too much resources on the CPU, but it will try to get things done. This is faster than GENEROUS, but it isn’t the fastest. This mode is the default and is recommended for most conditions.
- DUMMYMP_AGGRESSIVE - Aggressive mode.
- This mode considers other users, but it may spawn processes anyway depending on how other processes behave. This is faster than NORMAL, and is recommended for semi-important conditions.
- DUMMYMP_EXTREME - Extreme mode.
- This mode somewhat considers other users, but unless the other processes are using a significant portion of the CPU, it will spawn processes anyway. This is faster than AGGRESSIVE, and is recommended for important conditions.
- DUMMYMP_NUCLEAR - Nuclear mode.
- This mode does NOT consider other users, and just runs as many processes as it can allow (total number of cores). This is much faster than EXTREME, and is recommended for really important conditions. Note that this may earn you very angry co-workers knocking down your door with pitchforks, so use sparingly!
Regardless of priority mode, if the number of CPUs to use is specified, the number of processors/CPUs it takes advantage of will always be capped at the maximum number specified.
| Parameters: | mode (int) – Integer constant specifying the mode for DummyMP to use. |
|---|
Set the process starting callback for DummyMP.
Set the callback for DummyMP to call when a process is initially started.
The callback is called with the following arguments: (config.total_completed, config.total_running, config.total_procs)
| Parameters: | callback (function) – Function callback to call when a process starts. |
|---|
Bases: logging.Handler
DummyMP logging handler to allow multiprocess logging.
This class is a custom logging handler to allow spawned processes (from multiprocessing) to log without any issues. This works by intercepting emitted log records, and sending them via queue to the master process. The master process will process each record and call logging.Logger.handle() to emit the logging record at the master process level.
Note that this class can be used as a general multiprocess logging handler simply by removing the int_pid attribute.
The Queue object to forward logging records to.
int
The internal PID used to reference the process.
Multiprocess function wrapper for running a function given args.
This function wraps an existing function with its args, and allows for additional fields related to multiprocessing. In particular, the internal process ID and the multiprocessing.Queue object are added to facilitate communication between the subprocess and the master process.
| Parameters: |
|
|---|---|
| Returns: | Nothing... but the function will periodically send messages to the Queue in this format:
|
Process the execution queue and inter-process messages.
Process the execution queue by starting processes in said queue, handle processes that have completed, and process inter-process messages via process_queue().
(In plain English: start the queued processes, check processes to see if they are done running, and grab any inter-process messages sent from the spawned process.)
| Returns: | A boolean indicating whether the execution queue has completed or not. Returns True if it has completed, False if it has not. This return value can be used in a while loop to block until processes have completed. (This is somewhat similar to multiprocessing’s multiprocessing.Process.join() if used in a loop.) |
|---|---|
| Return type: | bool |
Process inter-process messages.
Process the inter-process multiprocessing.Queue objects, which receive messages from the spawned process for logging events and function returns.
Note
Warnings are emitted to log if an invalid message is received.
Process the execution queue until all have been completed.
Process the execution queue until it has indicated that all processes in the queue have been completed. (This is somewhat similar to multiprocessing’s multiprocessing.Process.join().)


Select a document on the left to view or download.
Note: Certain files may be better formatted when viewed in a separate window.


When you use the allow-scripts flag with the sandbox attribute, the sandboxed content can execute script but can’t submit forms, or navigate the top-level document. The content is also forced into a unique origin that prevents it from accessing content from the same origin, such as cookies.
The allow-scripts flag is useful for web content that shouldn’t be allowed to access or manipulate the parent frame of an app, but still requires script. If the iframe content has the same origin as the parent, don’t combine the allow-scripts and the allow-same-origin flags. If both tokens are used together and the origins match, the content within the iframe will be able to remove the sandbox attribute.
These two iframe elements demonstrate the effects of sandboxing content. They both display the same example content, but one uses the sandbox attribute with the allow-scripts flag and one doesn’t.


Username:
Password:
You have been logged out.
Invalid username and password.
You have been logged out.


You're invited
to the wedding of Brian Sullivan & Candice Lukassen
RSVP
Please Respond by 10/18.
joyfully accept
regretfully decline
Submit


{% extends "priority_planners/base.html" %} {% block page_header %}
Priority Planner allows you to keep track of goals and check them off as you get them done. You can append updates to goals as well to keep track of your progress!


Application Insights¶
By Steve Smith
Application Insights provides development teams with a 360° view across their live application’s performance, availability, and usage. It can also detect and diagnose issues and exceptions in these applications. Telemetry data may be collected from web servers and web clients, as well as desktop and mobile applications.
- In this article:
View or download sample on GitHub.
Getting started¶
Application Insights, like ASP.NET 5, is in preview.
To get started with Application Insights, you will need a subscription to Microsoft Azure. If your team or organization already has a subscription, you can ask the owner to add you to it using your Microsoft account.
Sign in to the Azure portal with your account and create a new Application Insights resource.
Choose ASP.NET as the application type. Note the Instrumentation Key (under Settings, Properties) associated with the Application Insights resource you’ve created (see detailed instructions with more screenshots here). You will need the instrumentation key in a few moments when you configure your ASP.NET 5 application to use Application Insights.
Next, update project.json
to add a new reference to Microsoft.ApplicationInsights.AspNet
in your dependencies
section, as shown:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | "dependencies": {
"EntityFramework.SqlServer": "7.0.0-beta6",
"EntityFramework.Commands": "7.0.0-beta6",
"Microsoft.AspNet.Mvc": "6.0.0-beta6",
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta6",
"Microsoft.AspNet.Authentication.Cookies": "1.0.0-beta6",
"Microsoft.AspNet.Authentication.Facebook": "1.0.0-beta6",
"Microsoft.AspNet.Authentication.Google": "1.0.0-beta6",
"Microsoft.AspNet.Authentication.MicrosoftAccount": "1.0.0-beta6",
"Microsoft.AspNet.Authentication.Twitter": "1.0.0-beta6",
"Microsoft.AspNet.Diagnostics": "1.0.0-beta6",
"Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta6",
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta6",
"Microsoft.AspNet.Server.IIS": "1.0.0-beta6",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta6",
"Microsoft.AspNet.StaticFiles": "1.0.0-beta6",
"Microsoft.AspNet.Tooling.Razor": "1.0.0-beta6",
"Microsoft.Framework.Configuration.Abstractions": "1.0.0-beta6",
"Microsoft.Framework.Configuration.Json": "1.0.0-beta6",
"Microsoft.Framework.Configuration.UserSecrets": "1.0.0-beta6",
"Microsoft.Framework.Logging": "1.0.0-beta6",
"Microsoft.Framework.Logging.Console": "1.0.0-beta6",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta6",
"Microsoft.ApplicationInsights.AspNet": "1.0.0-beta6"
},
|
Saving the project.json
file will download and install the required packages.
Next, edit (or create) the config.json
file, adding the instrumentation key you noted above from your Application Insights resource in Windows Azure. Specify an “ApplicationInsights” section with a key named “InstrumentationKey”. Set its value to the instrumentation key.
1 2 3 4 5 6 7 8 9 10 | {
"ApplicationInsights": {
"InstrumentationKey": "YOUR KEY GOES HERE"
},
"Data": {
"DefaultConnection": {
"ConnectionString": "Server=(localdb)\\mssqllocaldb;Database=aspnet5-AppInsightsDemo-8cf4d67e-57bd-4ccb-bdf4-384ca147edf3;Trusted_Connection=True;MultipleActiveResultSets=true"
}
}
}
|
Next, in Startup.cs
you need to configure Application Insights in a few places. In the constructor, where you configure Configuration
, add a block to configure Application Insights for development:
1 2 3 4 5 6 7 8 9 | if (env.IsDevelopment())
{
// This reads the configuration keys from the secret store.
// For more details on using the user secret store see http://go.microsoft.com/fwlink/?LinkID=532709
builder.AddUserSecrets();
// This will push telemetry data through Application Insights pipeline faster, allowing you to view results immediately.
builder.AddApplicationInsightsSettings(developerMode: true);
}
|
Note
Setting AppInsights in developerMode (configuration.AddApplicationInsightsSettings(developerMode: true)
) will expedite your telemetry through the pipeline so that you can see results immediately (learn more).
Add the Application Insights telemetry services in your ConfigureServices()
method:
1 2 3 4 | public void ConfigureServices(IServiceCollection services)
{
// Add Application Insights data collection services to the services container.
services.AddApplicationInsightsTelemetry(Configuration);
|
Then, in the Configure()
method add middleware to allow Application Insights to track exceptions and log information about individual requests. Note that the request tracking middleware should be as the first middleware in the pipeline, while the exception middleware should follow the configuration of error pages or other error handling middleware.
An edited Startup.cs
is shown below, highlighting the necessary Application Insights code (view full Startup.cs):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.MinimumLevel = LogLevel.Information;
loggerFactory.AddConsole();
// Configure the HTTP request pipeline.
// Add Application Insights to the request pipeline to track HTTP request telemetry data.
app.UseApplicationInsightsRequestTelemetry();
// Add the following to the request pipeline only in development environment.
if (env.IsDevelopment())
{
app.UseBrowserLink();
app.UseErrorPage();
app.UseDatabaseErrorPage(DatabaseErrorPageOptions.ShowAll);
}
else
{
// Add Error handling middleware which catches all application specific errors and
// sends the request to the following path or controller action.
app.UseErrorHandler("/Home/Error");
}
// Track data about exceptions from the application. Should be configured after all error handling middleware in the request pipeline.
app.UseApplicationInsightsExceptionTelemetry();
|
Now add the Application Insights scripts to your views. Add the following to the very top of the _ViewImports.cshtml
file:
1 2 3 4 5 | @using AppInsightsDemo
@using AppInsightsDemo.Models
@using Microsoft.AspNet.Identity
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
@inject Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration TelemetryConfiguration
|
Then, add the following line of code in your _Layouts.cshtml
file at the end of the
section (before any other JavaScript blocks specified there):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - AppInsightsDemo</title>
<environment names="Development">
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="~/lib/bootstrap-touch-carousel/dist/css/bootstrap-touch-carousel.css" />
<link rel="stylesheet" href="~/css/site.css" />
</environment>
<environment names="Staging,Production">
<link rel="stylesheet" href="//ajax.aspnetcdn.com/ajax/bootstrap/3.0.0/css/bootstrap.min.css"
asp-fallback-href="~/lib/bootstrap/css/bootstrap.min.css"
asp-fallback-test-class="hidden" asp-fallback-test-property="visibility" asp-fallback-test-value="hidden" />
<link rel="stylesheet" href="//ajax.aspnetcdn.com/ajax/bootstrap-touch-carousel/0.8.0/css/bootstrap-touch-carousel.css"
asp-fallback-href="~/lib/bootstrap-touch-carousel/css/bootstrap-touch-carousel.css"
asp-fallback-test-class="carousel-caption" asp-fallback-test-property="display" asp-fallback-test-value="none" />
<link rel="stylesheet" href="~/css/site.css" asp-file-version="true" />
</environment>
@Html.ApplicationInsightsJavaScript(TelemetryConfiguration)

|
Viewing activity¶
You can view the activity from your site once it’s been configured and you’ve made some requests to it by navigating to the Azure portal. There, you will find the Application Insights resource you configured previously, and you will be able to view charts showing performance and activity data:
In addition to tracking activity and performance data on every page, you can also track specific events. For instance, if you want to know any time a user completes a certain transaction, you can create and track such events individually. To do so, you should inject the TelemetryClient into the controller in question, and call its TrackEvent
method. In the included sample, we’ve added event tracking for user registration and successful and failed login attempts. You can see the required code in the excerpt from AccountController.cs shown below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Security.Principal;
using System.Threading.Tasks;
using Microsoft.AspNet.Authentication;
using Microsoft.AspNet.Authorization;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Mvc;
using Microsoft.AspNet.Mvc.Rendering;
using Microsoft.Data.Entity;
using Microsoft.Data.Entity.Infrastructure;
using AppInsightsDemo;
using AppInsightsDemo.Models;
using AppInsightsDemo.Services;
using Microsoft.ApplicationInsights;
namespace AppInsightsDemo.Controllers
{
[Authorize]
public class AccountController : Controller
{
private readonly UserManager<ApplicationUser> _userManager;
private readonly SignInManager<ApplicationUser> _signInManager;
private readonly IEmailSender _emailSender;
private readonly ISmsSender _smsSender;
private readonly ApplicationDbContext _applicationDbContext;
private static bool _databaseChecked;
private readonly TelemetryClient _telemetryClient;
public AccountController(
UserManager<ApplicationUser> userManager,
SignInManager<ApplicationUser> signInManager,
IEmailSender emailSender,
ISmsSender smsSender,
ApplicationDbContext applicationDbContext,
TelemetryClient telemetryClient)
{
_userManager = userManager;
_signInManager = signInManager;
_emailSender = emailSender;
_smsSender = smsSender;
_applicationDbContext = applicationDbContext;
_telemetryClient = telemetryClient;
}
//
// POST: /Account/Login
[HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Login(LoginViewModel model, string returnUrl = null)
{
EnsureDatabaseCreated(_applicationDbContext);
ViewData["ReturnUrl"] = returnUrl;
if (ModelState.IsValid)
{
// This doesn't count login failures towards account lockout
// To enable password failures to trigger account lockout, set lockoutOnFailure: true
var result = await _signInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, lockoutOnFailure: false);
if (result.Succeeded)
{
_telemetryClient.TrackEvent("LoginSuccess");
return RedirectToLocal(returnUrl);
}
if (result.RequiresTwoFactor)
{
return RedirectToAction(nameof(SendCode), new { ReturnUrl = returnUrl, RememberMe = model.RememberMe });
}
if (result.IsLockedOut)
{
return View("Lockout");
}
else
{
_telemetryClient.TrackEvent("LoginFailure");
ModelState.AddModelError(string.Empty, "Invalid login attempt.");
return View(model);
}
}
// If we got this far, something failed, redisplay form
return View(model);
}
//
// POST: /Account/Register
[HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Register(RegisterViewModel model)
{
EnsureDatabaseCreated(_applicationDbContext);
if (ModelState.IsValid)
{
var user = new ApplicationUser { UserName = model.Email, Email = model.Email };
var result = await _userManager.CreateAsync(user, model.Password);
if (result.Succeeded)
{
// For more information on how to enable account confirmation and password reset please visit http://go.microsoft.com/fwlink/?LinkID=532713
// Send an email with this link
//var code = await _userManager.GenerateEmailConfirmationTokenAsync(user);
//var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: Context.Request.Scheme);
//await _emailSender.SendEmailAsync(model.Email, "Confirm your account",
// "Please confirm your account by clicking this link: link");
await _signInManager.SignInAsync(user, isPersistent: false);
_telemetryClient.TrackEvent("NewRegistration");
return RedirectToAction(nameof(HomeController.Index), "Home");
}
AddErrors(result);
}
// If we got this far, something failed, redisplay form
return View(model);
}
}
}
|
With this in place, testing the application’s registration and login feature results in the following activity available for analysis:
Note
Application Insights is still in development. To view the latest release notes and configuration instructions, please refer to the project wiki.
Summary¶
Application Insights allows you to easily add application activity and performance tracking to any ASP.NET 5 app. With Application Insights in place, you can view live reports showing information about the users of your application and how it is performing, including both client and server performance information. In addition, you can track custom events, allowing to you capture user activities unique to your application.


| 22 Jul 1940 |
George Clinton born, Kannapolis NC. |
| 1970 |
Funkadelic. |
| 1978 |
One Nation, Under A Groove. |
| 1991 |
The Electric Spanking of War Babies. |
| 1993 |
Hey Man, Smell My Finger. |
| 8 Dec 2003 |
Charged with possession of cocaine and paraphernalia (a crack pipe), Leon County FL. Posted $2650 bail. |