--- layout: post tags: [AutoFixture, Unit Testing] date: 2010-04-06 05:22:32 UTC title: "Mapping types with AutoFixture" --- {% include JB/setup %}
In my previous posts I demonstrated interaction-based unit tests that verify that a pizza is correctly being added to a shopping basket. An alternative is a state-based test where we examine the contents of the shopping basket after exercising the SUT. Here's an initial attempt:
[TestMethod] public void AddWillAddToBasket() { // Fixture setup var fixture = new Fixture(); fixture.Register<IPizzaMap>( fixture.CreateAnonymous<PizzaMap>); var basket = fixture.Freeze<Basket>(); var pizza = fixture.CreateAnonymous<PizzaPresenter>(); var sut = fixture.CreateAnonymous<BasketPresenter>(); // Exercise system sut.Add(pizza); // Verify outcome Assert.IsTrue(basket.Pizze.Any(p => p.Name == pizza.Name), "Basket has added pizza."); // Teardown }
In this case the assertion examines the Pizze collection (you did know that the plural of pizza is pizze, right?) of the frozen Basket to verify that it contains the added pizza.
The tricky part is that the Pizze property is a collection of Pizza instances, and not PizzaPresenter instances. The injected IPizzaMap instance is responsible for mapping from PizzaPresenter to Pizza, but since we are rewriting this as a state-based test, I thought it would also be interesting to write the test without using Moq. Instead, we can use the real implementation of IPizzaMap, but this means that we must instruct AutoFixture to map from the abstract IPizzaMap to the concrete PizzaMap.
We see that happening in this line of code:
fixture.Register<IPizzaMap>( fixture.CreateAnonymous<PizzaMap>);
Notice the method group syntax: we pass in a delegate to the CreateAnonymous method, which means that every time the fixture is asked to create an IPizzaMap instance, it invokes CreateAnonymous<PIzzaMap>() and uses the result.
This is, obviously, a general-purpose way in which we can map compatible types, so we can write an extension method like this one:
public static void Register<TAbstract, TConcrete>( this Fixture fixture) where TConcrete : TAbstract { fixture.Register<TAbstract>(() => fixture.CreateAnonymous<TConcrete>()); }
(I'm slightly undecided on the name of this method. Map might be a better name, but I just like the equivalence to some common DI Containers and their Register methods.) Armed with this Register overload, we can now rewrite the previous Register statement like this:
fixture.Register<IPizzaMap, PizzaMap>();
It's the same amount of code lines, but I find it slightly more succinct and communicative.
The real point of this blog post, however, is that you can map abstract types to concrete types, and that you can always write extension methods to encapsulate your own AutoFixture idioms.
Comments


TDURLProtocol Class Reference
| Inherits from | NSURLProtocol |
| Declared in | TDURLProtocol.h |
Tasks
-
+ rootURL
“. */
-
+ HTTPURLForServerURL:
An alternate root URL with HTTP scheme; use this for CouchApps in UIWebViews.
(This URL will have the hostname of the touchdb: URL with ".touchdb." appended.)
-
+ registerServer:forHostname:
Registers a TDServer instance with a URL hostname.
'touchdb:' URLs with that hostname will be routed to that server. If the server is nil, that hostname is unregistered, and URLs with that hostname will cause a host-not-found error. If the hostname is nil or an empty string, "localhost" is substituted.
-
+ serverForHostname:
Returns the TDServer instance that’s been registered with a specific hostname.
-
+ registerServer:
Registers a TDServer instance with a new unique hostname, and returns the root URL at which the server can now be reached.
-
+ unregisterServer:
Unregisters a TDServer. After this, the server can be safely closed.
-
+ setServer:
A convenience to register a server with the default hostname “localhost”.
-
+ server
Returns the server registered with the hostname “localhost”.
Class Methods
HTTPURLForServerURL:
An alternate root URL with HTTP scheme; use this for CouchApps in UIWebViews.
(This URL will have the hostname of the touchdb: URL with ".touchdb." appended.)
+ (NSURL *)HTTPURLForServerURL:(NSURL *)serverURL
Discussion
An alternate root URL with HTTP scheme; use this for CouchApps in UIWebViews.
(This URL will have the hostname of the touchdb: URL with ".touchdb." appended.)
Declared In
TDURLProtocol.h
registerServer:
Registers a TDServer instance with a new unique hostname, and returns the root URL at which the server can now be reached.
+ (NSURL *)registerServer:(TDServer *)server
Discussion
Registers a TDServer instance with a new unique hostname, and returns the root URL at which the server can now be reached.
Declared In
TDURLProtocol.h
registerServer:forHostname:
Registers a TDServer instance with a URL hostname.
'touchdb:' URLs with that hostname will be routed to that server.
If the server is nil, that hostname is unregistered, and URLs with that hostname will cause a host-not-found error.
If the hostname is nil or an empty string, "localhost" is substituted.
+ (NSURL *)registerServer:(TDServer *)server forHostname:(NSString *)hostname
Discussion
Registers a TDServer instance with a URL hostname.
'touchdb:' URLs with that hostname will be routed to that server.
If the server is nil, that hostname is unregistered, and URLs with that hostname will cause a host-not-found error.
If the hostname is nil or an empty string, "localhost" is substituted.
Declared In
TDURLProtocol.h
server
Returns the server registered with the hostname “localhost”.
+ (TDServer *)server
Discussion
Returns the server registered with the hostname “localhost”.
Declared In
TDURLProtocol.h
serverForHostname:
Returns the TDServer instance that’s been registered with a specific hostname.
+ (TDServer *)serverForHostname:(NSString *)hostname
Discussion
Returns the TDServer instance that’s been registered with a specific hostname.
Declared In
TDURLProtocol.h


Meiosis Documentation
Source code
01 - Fundamentals
A - Quick Introduction to Streams
B - The Fundamental Setup
C - Components
D - Using the Meiosis Tracer
02 - Reusable Components
A - Reusing Components
B - Computed Properties
03 - Model and Nesting Strategies
A - Lodash FP
B - Ramda
C - Patchinko
04 - Routing
A - Navigation Without Routes
Adding Routes:
B - Navigo
C - Navigation
D - Mithril Router
05 - Techniques and Strategies
A - Using Lifecycle Methods and Stateful Components:
Mithril
|
React
B - Preventing Rerenders:
Mithril
|
React
C - Sharing State Between Nested Components:
Mithril
|
React
D - Services:
Streams
|
Functions
|
Patchinko
E - SAM Pattern:
Patchinko + seview


Survey Form
General Information Survey
* Name:
* Email:
* Age:
* Highest level of education:
No High School
High School Diploma
Some College
College Degree
What kind of car do you own?:
Please choose
Honda
Ford
Jeep
None of the above
I do not own a car
Please select types of owned pets:
Dog
Cat
Fish
Other
None
What is the most unique thing about yourself?:


~/junk/git-basics-temp master
❯ git --version
git version 2.11.0
Alles > 2.4 ist toll.
Git UI mit Live aktualisierung (verwenden wir gleich im Workshop).
Git Commandline UI
Wir brauchen ein paar wenige sinnvolle defaults, um im Team arbeiten zu können.
vscode
als Editor konfigurieren
Simplify serialize.h's exception handling Remove the 'state' and 'exceptmask' from serialize.h's stream implementations, as well as related methods. As exceptmask always included 'failbit', and setstate was always called with bits = failbit, all it did was immediately raise an exception. Get rid of those variables, and replace the setstate with direct exception throwing (which also removes some dead code). As a result, good() is never reached after a failure (there are only 2 calls, one of which is in tests), and can just be replaced by !eof(). fail(), clear(n) and exceptions() are just never called. Delete them. Fixes XY-123 See also XZ-678https://chris.beams.io/posts/git-commit/


// Boost.Geometry (aka GGL, Generic Geometry Library) // // Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands // Copyright Bruno Lalande 2008, 2009 // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Custom point Example #include <iostream> #include <boost/geometry/algorithms/distance.hpp> #include <boost/geometry/algorithms/make.hpp> #include <boost/geometry/geometries/register/point.hpp> #include <boost/geometry/strategies/strategies.hpp> #include <boost/geometry/util/write_dsv.hpp> // Sample point, defining three color values struct my_color_point { double red, green, blue; }; // Sample point, having an int array defined struct my_array_point { int c[3]; }; // Sample point, having x/y struct my_2d { float x,y; }; // Sample class, protected and construction-time-only x/y, // Can (of course) only used in algorithms which take const& points class my_class_ro { public: my_class_ro(double x, double y) : m_x(x), m_y(y) {} double x() const { return m_x; } double y() const { return m_y; } private: double m_x, m_y; }; // Sample class using references for read/write class my_class_rw { public: const double& x() const { return m_x; } const double& y() const { return m_y; } double& x() { return m_x; } double& y() { return m_y; } private: double m_x, m_y; }; // Sample class using getters / setters class my_class_gs { public: const double get_x() const { return m_x; } const double get_y() const { return m_y; } void set_x(double v) { m_x = v; } void set_y(double v) { m_y = v; } private: double m_x, m_y; }; BOOST_GEOMETRY_REGISTER_POINT_3D(my_color_point, double, cs::cartesian, red, green, blue) BOOST_GEOMETRY_REGISTER_POINT_3D(my_array_point, int, cs::cartesian, c[0], c[1], c[2]) BOOST_GEOMETRY_REGISTER_POINT_2D(my_2d, float, cs::cartesian, x, y) BOOST_GEOMETRY_REGISTER_POINT_2D_CONST(my_class_ro, double, cs::cartesian, x(), y()) BOOST_GEOMETRY_REGISTER_POINT_2D(my_class_rw, double, cs::cartesian, x(), y()) BOOST_GEOMETRY_REGISTER_POINT_2D_GET_SET(my_class_gs, double, cs::cartesian, get_x, get_y, set_x, set_y) int main() { // Create 2 instances of our custom color point my_color_point c1 = boost::geometry::make<my_color_point>(255, 3, 233); my_color_point c2 = boost::geometry::make<my_color_point>(0, 50, 200); // The distance between them can be calculated using the cartesian method (=pythagoras) // provided with the library, configured by the coordinate_system type of the point std::cout << "color distance " << boost::geometry::dsv(c1) << " to " << boost::geometry::dsv(c2) << " is " << boost::geometry::distance(c1,c2) << std::endl; my_array_point a1 = {{0}}; my_array_point a2 = {{0}}; boost::geometry::assign(a1, 1, 2, 3); boost::geometry::assign(a2, 3, 2, 1); std::cout << "color distance " << boost::geometry::dsv(a1) << " to " << boost::geometry::dsv(a2) << " is " << boost::geometry::distance(a1,a2) << std::endl; my_2d p1 = {1, 5}; my_2d p2 = {3, 4}; std::cout << "float distance " << boost::geometry::dsv(p1) << " to " << boost::geometry::dsv(p2) << " is " << boost::geometry::distance(p1,p2) << std::endl; my_class_ro cro1(1, 2); my_class_ro cro2(3, 4); std::cout << "class ro distance " << boost::geometry::dsv(cro1) << " to " << boost::geometry::dsv(cro2) << " is " << boost::geometry::distance(cro1,cro2) << std::endl; my_class_rw crw1; my_class_rw crw2; boost::geometry::assign(crw1, 1, 2); boost::geometry::assign(crw2, 3, 4); std::cout << "class r/w distance " << boost::geometry::dsv(crw1) << " to " << boost::geometry::dsv(crw2) << " is " << boost::geometry::distance(crw1,crw2) << std::endl; my_class_gs cgs1; my_class_gs cgs2; boost::geometry::assign(cgs1, 1, 2); boost::geometry::assign(cgs2, 3, 4); std::cout << "class g/s distance " << boost::geometry::dsv(crw1) << " to " << boost::geometry::dsv(crw2) << " is " << boost::geometry::distance(cgs1,cgs2) << std::endl; return 0; }
|
December 1, 2009 |
Copyright © 1995-2009 Barend Gehrels, Geodan, Amsterdam Copyright © 2008-2009 Bruno Lalande, Paris Copyright © 2009 Mateusz Loskot, Cadcorp, London |


Number of Graham Geraghty's stolen medals recovered
by By Louise WalshA number of GAA medals stolen during a break-in at the home of Meath football legend Graham Geraghty have been recovered.
A total of 13 championship medals were found by a man walking home for lunch in Arklow, Co WIcklow yesterday, according to Graham's wife Amanda.
The medals were found in a bag on the footpath.
Unfortunately the recovered haul did not contain the former Meath captain's five Leinster medals or his Railway Cup ones.
In a post on her Facebook page, Amanda said: 'Unfortunately his five Leinster medals are still missing probably because they are gold but we will keep praying to Saint Anthony."
Speaking this morning, she said: "We are delighted to get the 13 medals back but we will continue to hope and pray that we will get the Leinster and Railway Cup ones returned
"The medals were found in Arklow so we are appealing now to anyone around the whole country who might see them or be offered them for sale either on their own or through a cash for gold outlet to contact Gardaí.
We would also like to sincerely thank the man and his father who recognised the medals as Graham's.
"He was walking home for lunch and spotted a blue bag with medals at the side of the footpath.
"They were still there later so he took the home. They were covered in an oily residue and as he was washing them, his father noticed they were Meath medals.
"The dad said they might be Graham Geraghty's medals.
"So they contacted me through Facebook and we would like to say a huge thank you to them."
Geraghty captained Meath to the last All-Ireland success in 1999 at Croke Park against Cork.
The medals were taken during a break in at their home outside Athboy, while their three children were asleep last Friday night.
At the time, in offering a reward for their return, Amanda said: "They are not worth much in monetary value but it took blood, sweat and tears to win these over a period of eleven years - one minor, two under 21s and three senior medals.
"A lifetime of memories taken. We will gladly give you what the cash for gold shops will give you for them."
READ MORE
Former Scotland captain Tom Smith fighting colorectal cancer


Dear {FacilityName},
You have a tentative booking reservation!
Customer:{CustomerName}
Address:{CustomerAddress}
Phone:{CustomerPhone}
Email:{CustomerEMail}
Please contact the following customer to collect your desired deposit and to confirm this reservation.
As per our booking agreement, please deduct this broker fee off the advertised boat rental price. Please be advised your facility and boat will be rated by this customer.
This rating will be screened by us than posted to your RentABoat.com rental page.
Thank you for renting with RentABoat.com as your boat renting broker.
631-286-7816
<EMAIL_ADDRESS>| Boat Details |
Rent Details |
Name: {BoatName}
Make: {BoatMake}
Model: {BoatModel}
Year: {BoatYear}
Size: {BoatSize}
|
Time Type: {RentType}
Pick Up Date: {RentalStartDate}
Drop Off Date:{RentalEndDate}
Rent Time:{SelectedTime}
Rental Price: {TotalPrice}
RentABoat Booking Fee: {RentalOnlineFee}
Collect From Client: {DueCustomer}
Renter Name: {CustomerName}
Phone #: {CustomerPhone}
|
RentABoat.com
320 South Country Road - Brookhaven - NY - 11719
631-286-7816
info@RentABoat.com


Directive for loading responsive image when container (which is preventing reflow) is in viewport. Available as a bower component.
See Github for source.
Resize, reload and scroll to see what gets actually loaded and when.
Example showing another aspect ratio. The parent container always sets the max width available for the image to align.
This module can also set a background image.
All you have to do is setting the options tag 'background' to true, which is false by default.
In the background you now will see the correct image. You can set your own css on the container itself, only style 'background-image' is being set.
Browser reflow is bad, especially when lazy loading images. The container aspect ratio setup sets the correct image container height (so no total repainting takes place when image is appended) based on it's css class which uses aspect-ratio. If you want different aspect ratio's for different srcset setup then introduce your own classnames.
The image inside will not load until the container is scrolled into position.
The positioned images inside will not load until the container is scrolled into position.
Destroy $scope (no leaks)


Human immunodeficiency virus vpr product is a virion-associated regulatory protein.
Abstract
The vpr product of the human immunodeficiency virus type 1 (HIV-1) acts in trans to accelerate virus replication and cytopathic effect in T cells. Here it is shown that the HIV-1 viral particle contains multiple copies of the vpr protein. The vpr product is the first regulatory protein of HIV-1 to be found in the virus particle. This observation raises the possibility that vpr acts to facilitate the early steps of infection before de novo viral protein synthesis occurs.


Like JSON.stringify, but doesn't throw on circular references.
Takes the same arguments as JSON.stringify
.
var stringify = require('json-stringify-safe');
var circularObj = {};
circularObj.circularRef = circularObj;
circularObj.list = [ circularObj, circularObj ];
console.log(stringify(circularObj, null, 2));
Output:
{
"circularRef": "[Circular]",
"list": [
"[Circular]",
"[Circular]"
]
}
stringify(obj, serializer, indent, decycler)
The first three arguments are the same as to JSON.stringify. The last is an argument that's only used when the object has been seen already.
The default decycler
function returns the string '[Circular]'
.
If, for example, you pass in function(k,v){}
(return nothing) then it
will prune cycles. If you pass in function(k,v){ return {foo: 'bar'}}
,
then cyclical objects will always be represented as {"foo":"bar"}
in
the result.
stringify.getSerialize(serializer, decycler)
Returns a serializer that can be used elsewhere. This is the actual function that's passed to JSON.stringify.
Note that the function returned from getSerialize
is stateful for now, so
do not use it more than once.


Robert >| Good morning ladies and gentlemen.
Robert >| Welcome aboard Gany Air flight 51 bound for who knows where
A ‘Trained hypnopompic response’ is what they called it. Like reaching for a pair of glasses in the morning or resetting the alarm in bed. Instead of glasses Catherine woke and immediately began a risk assessment. Before they had left for the mission the training had already ruined her traditional Sunday morning sleep in. The first sign of consciousness and she’d force herself awake and begin her checks. She did a quick scan for immediate threats, followed by a brisk self-check for injuries, and then operational checks.
Robert >| For now everyone sit tight
Next was a systems check. Under the external layer the suit was a honeycomb of small 5mm cells, 60% energy storage, 20% temperature control, 19% a mix of general computer and redundant storage, with the final 1% a selection of dedicated hardware accelerators for various machine vision, signal processing, and analysis packages.
Robert >| I want detailed env reports from all of you first
External components were next; contact lens, haptic gloves, and the comms units on each shoulder. These would attempt to establish and maintain a local network using UHF, ultraviolet light and everything in-between including long-range lasers as the situation demanded.
Frederich >| Looks like Catherine was right, it’s the aircraft cabin scenario
Finally, the local network was established. The audio feed was enabled, but she saw the team had already joined a local chat channel, obviously to keep things silent.
Helen >| Initial rads are fine
Helen >| (but the suits would be screeching if it wasn't)
Catherine >| Well thank fuck for that, I wasn’t looking forward to scenarios 8 through 22 :)
Robert >| I was holding out hope for scenario 1.
Catherine >| Ah the benevolent benefactor welcome party, well that would have been nice...
Dan >| No 3rd party comms I can see.
Margaret >| Local positioning is up, adding everyone’s location to HUD.
Catherine’s displays already showed everyone was close, but she could now see their relative positions in her display. Robert, Helen, and Margaret were grouped together at the far end of the cabin with Dan on her row in the far aisle.
Dan >| Everyone please note I have someone sitting beside me, he appears asleep.
Helen >| Yeah I see 2 more in our row
Robert >| Hold off interacting for now but they’re only dozing
Robert >| Remember that hlé only knocks you out, it doesn’t sedate
Robert >| Once they wake remember protocol, mask opacity to 100%
Robert >| Be as reassuring as possible, nobody expects to wake up next to a spaceman.
Helen >| Speak for yourself buddy
Margaret >| Detailed atmo is back, Life support is basically the best case scenario
Margaret >| Atmospheric pressure is a comfortable 12psi
Margaret >| Composition the standard 78/21/1 split of Nitrogen, Oxygen and trace
Margaret >| Actually the trace is a bit off
Margaret >| CO2 very low at 300 parts per million and ozone just a little higher than normal.
Robert >| Perfect, optimal life support scenario
Margaret >| As long as the the proton-exchange membranes can extract oxygen then we won’t have any issues until power runs out, then it’s helmets off.
Catherine >| Which I would strongly advise not to, the risk of contamination is very real
Robert >| I’ll take that risk over huffing vacuum any day
Margaret >| Ok so that’s the good news, now for the odd news
Margaret >| There is definitely organic contaminants
Margaret >| But you’ll never guess what it is
Catherine >| Alien musk :)
Margaret >| Weirder, cigarette smoke. Not a lot but you’d easily smell it
Catherine >| Makes sense
Catherine >| They have probably been sampling the air from as far back as the 1970s
Catherine >| Smoking wasn’t banned until the 90s
Catherine >| The GAN’s they used to design this place would have split the difference.
 It’s watching me, it’s not moving, it's just watching me talk to you.”
“Keep going, describe it”
“Muscles, like a sprinter but the face is, I can’t describe it, horrible? Beautiful? It’s absolutely not human. It looks like… I don’t know, a bad copy of a person?”
Catherine could see Dan in her row, with her night vision switched on she could see him leaning into the aisle. She tried to see if she could see anything reflected in his helmet but couldn’t make anything out.
“Ok team, looks like we have first contact already. Dan I’ll need you to take out your contact tablet, stand up very slowly and place it in the aisle. Then you’re going to need to disengage, leave your chair and walk backward two rows, cross to the other aisle and make your way over to us.”
Each member of the team had a small tablet intended for this event. On one side was an aluminium engraving containing an updated version of the Pioneer plaque, a series of pictograms introducing humanity, and how the tablet functioned. On the other side was a computer tablet that also attempted to establish wireless communication. The standards it used were exhaustively explained in an engraving only visible under a microscope. The tablets left out most of the more interesting details about humanity and instead focused on providing a Rosetta Stone for communication.
Catherine watched as Dan carefully got out of his seat, removed the tablet strapped to his leg, and slowly lowered it into the aisle. He then started to back away when suddenly there was a scream from the man sitting beside him.
“Sir please be quiet, this is just a spacesuit. My name is Dan Sawant and -”
Catherine realised too late that the man wasn't looking at Dan but rather behind him. A second figure in the dark rose up behind Dan until it towered a full foot above him. The team heard a gasp from Dan as the creature's hands connected with either side of his helmet. There was a ripping sound as it twisted the helmet and then kicked him in the chest tearing the helmet free.
The creature in the aisle leapt up to the top of the seats and pounced on the man still screaming. The second threw Dan’s helmet aside, stepped over him and chased another of the passengers who was attempting to flee.
“Catherine, can you see Dan?” Robert shouted as he and the rest of the team started to scramble from their seats.
“Yes, I’m making my way over now”
Helen >| Vitals showing he’s in shock
Margaret >| Get that helmet back on him ASAP
Catherine reached Dan in the aisle as one of the creatures was dragging the man still screaming down the aisle.
“Dan, get up, we need to move!”
Dan looked dazed as Catherine helped him to his feet. The seats were empty now with the team and passengers driven into the next cabin or dragged into the one behind. They made their way up the aisle in the direction the rest of the team had gone. At the far end of the cabin was a curtain which Catherine opened and lead Dan through before remembering his helmet. She went back to grab it and when she turned back she saw that he was still standing in the galley staring at the floor.
“Dan, I know you’re still in shock but we need -”
Walking into the galley where Dan was standing she found herself face to face with one of the creatures, standing perfectly still. She could hear it speaking to Dan and Catherine found herself compelled to turn up the volume. The language was like nothing she had ever heard before; it was like poetry interspersed with animal noises and scratching insectile clicks.
Catherine carefully unclipped her helmet and after placing it on the floor followed in silence as the creature led them down the aisle. They walked in silence for a while passing through cabins until the crack of a gunshot rang out. The creature paused as if considering the noise before turning to Dan.
Catherine watched as the creature began to work on something with its hands. It made a circle shape between thumbs and index fingers and with a motion like the child's game of Cat's Cradle, a fine spider web began to form. While it did this the creature continued to intone. The speech was musical and uplifting to hear.
She watched on in rapt attention as the cobwebs between its hands dissolved everything it touched. First Dan’s hair, skin, and finally bone until his brain stood exposed. She could see the rhythmic movement of his pulse in the fine veins covering its surface. Here the crown slowed, the cobwebs drifting across the surface as if pushed by a breeze. Slowly his brain evaporated, new portions revealed as if melting. The blood when visible was wicking across the cobwebs and up to the creatures wrists where it poured in torrents.
She focused on the wrists until the blood slowed to a trickle. Dan was still standing, his face placid and at ease. The creature’s hands were around his neck now, and just as she began to wonder if Dan was still standing under his own power the creature let him go. His body hit the floor like a sack of meat. Catherine saw now that his face was little more than a mask. Behind it was nothing but a deep cavity where his thoughts once lingered.
The creature turned to her but before it could raise its hands another shot rang out. Again the creature looked ahead in the direction of the shot and seemed to consider. When it turned back to Catherine the singing changed. Some deep part of her remembered the wolves hunting in the snow, impossible choices made after failed harvests, diseases and disfigurements. Her head was clear now. She knew what she had seen, she knew she had done nothing and only the pure terror of the wolf gripped her. The creature turned away, ignoring her as she ran.
Dark cabins and bright galleys were a blur as she raced for somewhere to hide. Eventually, she picked a row and huddled against the bulkhead between chairs. She removed the sick bag from the seat pocket and breathed into it until she stopped hyperventilating.
Part of the storage and compute resources in her suit was a research suite containing pattern matching software and large databases of everything from animal recordings to an entire offline copy of Wikipedia. Catherine unwrapped an energy bar which she ate thoughtfully while running the software against the recording of the creature's speech the suit had taken.
After resting on the floor for some time, waiting for the suit to tell her what it had found, she was shocked to see another passenger calmly walk past her in the opposite aisle. As quietly as possible she made her way into the the aisle and followed him into the galley. She watched from behind the curtain as he searched the cabin. Suddenly he made eye contact with her, waved, and yelled out.
“We need to wake the others, something is wrong!”
She urgently motioned him to be quiet and ducked back behind the curtain. Just as she started to plan her next move the suit pinged that it had found a match to the noises the creature was making and was providing a data reference: Glossaria


Ingredients
- 1 pound small twisty pasta (rotini or similar)
- 3 chicken breasts, cut into chunks about an inch square or smaller
- 3 cloves garlic, sliced
- 1/4 teaspoon red pepper flakes
- 3 Tablespoons olive oil
- 1/2 cup onion
- 1/2 cup bell pepper
- 1 jalapeño, diced (optional)
- Juice from 2 lemons
- 1/2 cup grated parmesan
- Salt and pepper to taste
Instructions
In a large saucepan over high heat, sauté the garlic, red pepper flakes, onions and peppers in oil until aromatic. Remove to large serving bowl.
In a pot, boil some water and add a pinch of garlic salt. Cook the pasta for 7 minutes, stirring occasionally, until al dente. Add to the large serving bowl.
While the pasta is cooking, heat some oil in your saucepan. Over medium heat, brown the chicken squares. Add salt and pepper to taste as they cook. Add the chicken to the large serving bowl. Toss the mixture and add lemon juice and parmesan.


Please download the
moto
sync app to manage your network and access free live support
Download
moto
sync
Or scan with your mobile device
S/N
__SERIAL__
MAC
__MAC__
VERSION
__VERSION__


RT @BillB: Our code review tool shows deleted code in red and added code in green. Really, it should be the other way around.
9/11/2013, 5:49:41 PM
Favs: 0
Retweets: 0
link--- layout: tweet ---
RT @BillB: Our code review tool shows deleted code in red and added code in green. Really, it should be the other way around.
9/11/2013, 5:49:41 PM
Favs: 0
Retweets: 0
link


The big BT Sport news which will affect Arsenal, Spurs and Chelsea
BT Sport have held the Champions League and Europa League rights since 2015
by Aidan McCartneyBT Sports have kept hold of all European football, including Champions League, Europa League and the new UEFA Europa Conference League, until 2024.
The broadcaster has agreed a deal worth £1.2bn, starting in 2021, after outbidding Sky Sports and ITV in the UK.
BT have shown the elite European matches since 2015 on their subscription service although the Champions League and Europa League finals were available for free.
It has now been confirmed that a deal has been agreed with BT Sport to show all 420 games live and air highlights for three seasons from 2021-2024.
They will pay £400m per year as part of the deal with BT reporting a 26 per cent increase in UEFA Champions League viewing hours this season.
Marc Allera, CEO of BT’s Consumer Division, said: “We’re delighted to remain the home of UEFA Champions League in the UK.
“BT Sport leads the way when it comes to UEFA Champions League coverage, and we’re very excited to continue to bring our world class coverage to one of the most exciting football competitions in the world - whether that’s broadcasting 12 games simultaneously or delivering industry leading images in 4K UHD.
“With increasingly more ways to watch our content, with more games on show than ever before, and alongside our excellent line up of other competitions and sports, BT Sport is going from strength to strength.”


Login
Welcome to Worona! Make your WordPress work
great on mobile.
Email
Password
Login
Don't have an account? Register


Gnana
ROLE
Web, Mobile design, Branding
DATES
2013-2014
Gnana is a well-funded startup in stealth mode at the intersection of intelligent relationship management, machine learning, and capital optimization. In simple words — it's an analytics tool that helps your company predict its sales. It tracks your data from all your sales points and transactions and combines into simple and digestible format for you.
I joined the small team of developers and data scientists to come up with a simple, and smooth interface. I was improving UX, prototyping and designing UI elements. Later, I was responsible for the design of the corporate identity and some print work.
BRANDING
WIREFRAMES
ALPHA
FINAL
After I left Gnana the company's new name is Aviso.


Income
Monthly
Monthly
Total income
98%Annual
New Orders
66%Today
New Visitor
55%Low Value
In first month
33%Total orders in period
Orders in last month
Monthly income from order
| ID | Status | Date | User | Value | |
|---|---|---|---|---|---|
| 1 | Pending | 1:20pm | John | 20% | |
| 2 | Complete | 2:30pm | khan | 25% | |
| 3 | Complete | 4:50pm | hok | 50% | |
| 4 | Canceled | 5:30pm | dogi | 80% | |
| 5 | Complete | 6:20pm | joyi | 30% | |
| 6 | Pending | 7:40pm | joy | 40% | |
| 7 | Complete | 9:40pm | ulla | 90% | |
| 8 | Pending | 11:20pm | don | 95% | |
| 9 | Pending | 5:20am | dali | 85% | |
| 10 | Complete | 6:20am | poli | 77% | |
| 11 | Pending | 7:30am | payel | 55% | |
| 12 | Complete | 8:22am | flat | 36% | |
| 13 | Pending | 9:25am | alit | 49% | |
| 14 | Complete | 10:30am | win | 87% | |
| 15 | Pending | 11:11am | back | 97% | |
| 16 | Canceled | 11:12am | koy | 58% | |
| 17 | Complete | 11:20pm | khy | 22% | |
| 18 | Pending | 12:20pm | fat | 33% | |
| 19 | Pending | 1:20pm | pof | 65% | |
| 20 | Complete | 11:20pm | elit | 46% | |
| 21 | Pending | 5:20pm | John | 57% |
| No | Method | Date | Country | Amount | |
|---|---|---|---|---|---|
| 1 | Paypal | 11:20pm | United State | $2413 | |
| 2 | Payoneer | 5:20am | Canada | $4565 | |
| 3 | Skill | 1 day Ago | China | $6888 | |
| 4 | Credit Card | 2 day Ago | France | $8789 | |
| 5 | Master Card | 5 days ago | Brazil | $4565 | |
| 6 | Visa | 10 days ago | United Kingdom | $4554 | |
| 7 | Pizza | 15 days ago | Germany | $8789 | |
| 8 | Master Card | 20 days ago | Brazil | $1232 | |
| 9 | Skill | 22 days ago | India | $5465 | |
| 10 | Payoneer | 29 days ago | Australia | $7887 | |
| 11 | Credit Card | 31 days ago | Saudi | $8782 | |
| 12 | Master Card | 40 days ago | Netherlands | $1569 | |
| 13 | Pizza | 50 days ago | Brazil | $8456 | |
| 14 | Skill | 60 days ago | United State | $3654 | |
| 15 | Master Card | 70 days ago | India | $6541 | |
| 16 | Credit Card | 75 days ago | United Kingdom | $9865 | |
| 17 | Pizza | 80 days ago | United State | $4587 | |
| 18 | Payoneer | 82 days ago | Netherlands | $6587 | |
| 19 | Credit Card | 85 days ago | United Kingdom | $1478 | |
| 20 | Master Card | 87 days ago | India | $568 | |
| 21 | Payoneer | 90 days ago | United State | $2547 |
Start each day with a prayer and end your day with a prayer and thank God for a another day.
1 minuts ago


Meghan opens up about Archie beginning to crawl as she surprises military families
Prince Harry and Meghan Markle visited army families at a Broom Farm Community Centre coffee morning in Windsor. They took the time to chat about how Archie was getting along in the week he turns six-months old.
by Milo Boyd, Lisa Youd, https://www.mirror.co.uk/authors/milo-boyd/The Duchess of Sussex swapped parenting tips with other mums during a surprise visit to an army family coffee morning.
Harry and Meghan stopped by Broom Farm Community Centre to chat with families from the Welsh Guards, Coldstream Guards and Household Cavalry about what army life is really like.
The Duchess took the opportunity to share details of Archie’s sleep patterns and teething experience with a few of the mums.
Amy Thompson, whose husband Brad is attached to the Welsh Guards, said: “My daughter Aeris is the same age as Archie and we talked about weaning and the children beginning to crawl.
"(Meghan) is just a normal mum and it was like talking to a friend.”
The majority of the Coldstream Guards are on exercise in Kenya, while a large proportion of the Welsh Guards are coming to the end of a long deployment to The Falklands.
The soldiers' work overseas prompted Prince Harry to admit how in awe he was of the family members at home holding their households together.
He said: “It’s unbelievably hard. I have so much respect and admiration for anyone who has to deal with that.”
In the same week that his son Archie turned six months old, family was clearly on the Prince's mind.
“I can’t imagine what it’s like to miss so much as they change so quickly,” he added.
Army spouse Leigh Smith brought along her eight-year-old daughter Molly to meet the Royals.
“Meghan promised not to tell anyone that I was off school,” said Molly.
“She asked me who my best friend was.”
Molly and her mum have been avid followers of the Duke and Duchess since they held a party to celebrate their wedding on 19 May last year.
"It was an amazing experience for Molly to shake hands with them," Leigh added.
"It’s really special and a lovely boost for the whole community.”
On Thursday morning a video of the Royal couple interacting with young children was posted on their official Instagram page.
A caption alongside the video read: "Every year during the month of November we pause to remember and honour all those who have served their country here in the UK, across the Commonwealth and around the world.
"Their Royal Highnesses also wanted to show support for the families of service personnel who are currently deployed overseas.
"During the visit yesterday, Their Royal Highnesses met with young families who shared their experiences as parents and as couples who are often apart from their loved ones for months at a time.
"A reminder that a life of service does not simply describe the person wearing the uniform, but the entire family."
Coldstream Guards welfare officer, Capt Colin Lewis, said the visit was a welcome tonic after a tough 18 months.
“The regiment are really appreciative of the support the families provide by picking up the burden when the service person is away," he explained.
"It’s great for The Duke and Duchess to take the time to truly understand the challenges they face.
"They are very down to earth, and they’ve had a snapshot of the entire community here by talking to lots of people from different backgrounds.”
For the month of November, The Duke and Duchess of Sussex are honouring members of the armed forces and their families.
Prince Harry served in the forces for ten years and continues to advocate for veterans and their loved ones through the Invictus Games.
Meghan will make her first visit to Westminster Abbey's Field of Remembrance later today.


{{#with TemplateVar.get 'status'}}
{{#if erred}}
There was an error when creating new invoice. Error is: "{{error}}"
{{/if}}
{{#if initiated}}
The invoice has been initiated successfully. The transaction address is:
"{{result}}" . Please wait until mining is completed...
{{/if}}
{{#if isMined}}
The invoice has been mined successfully.
{{/if}}
{{/with}}


| < |
Move tape pointer left. after do < before do < |
| > |
Move tape pointer right. before do > after do > |
| + |
tape entity += 1 0 > 1 |
| - |
tape entity -= 1 1 > 0 |
| . |
output the byte on the tape entity pointed Set to 46: +++++[<+++++++++>-]<+ . Output goes here |
| , |
input a byte to the tape entity pointed ,. Input goes hereOutput goes here |
| [ |
If the byte on the tape entity pointed is 0x0, than jump to the matching ]. |
| ] |
If the byte on the tape entity pointed isn't 0x0, than jump to the matching [. |
| ( |
[ Working Draft ] Start a function defination. The char after the ( is used as the function name, and the commands between ( and ) are function body. Functions are like calls in assembly. |


Learn something new everyday
Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Facere vel doloremque, veniam mollitia ipsam sequi placeat libero perferendis soluta et doloribus ut sunt, voluptas molestias, necessitatibus consequatur cupiditate repudiandae? Quidem."
Emanuel, Sr Strategist at Hiring.comTue 10/11 & Wed 10/12: 8am-3pm
Read moreFind which campus is close to you
Read moreJoin a keynote with Oliver Sack about music in medical treatment
Read moreWeb Development, Mobile Development, iOT, APIs
Imaging & Design, Web Design, Motion Graphics & visual Effects, Computer Animation
User Experience Design, User Research, Visual Design
Data Science, Big Data, SQL, Data Visualizaion
Product Development, Business Development, Startup
Analytics, Content Marketing, Mobile Marketing
""Lorem ipsum dolor sit amet consectetur adipisicing elit. Facere vel doloremque, veniam mollitia ipsam sequi placeat libero perferendis soluta et doloribus ut sunt, voluptas molestias, necessitatibus consequatur cupiditate repudiandae? Quidem."
Designer showcase of new prototype product
Research study about New York


My report page in the course DA377B
HELLO!
My name is Simon Westerdahl, I'm 28 years old. I was born in Halmstad but raised in a small village called Bromölla, Skåne, 2 km from Kristianstad next to Ivösjön.
When I was 7 years old my best friend and his father has been a huge influence when it comes to understanding computer. However I spent more time playing computer games than actually understand the computer. However I kept playing Handball as a youth, but quitted once I grew up. I went Teknikutbildning at high school Furulundsskolan at Sölvesborg. After that I tried going into special effects withing movies and advertisment. After 1 year I ended that since that was too creative and too little computer skills. So I moved too Norway and worked as a salesmen for 1 year and then IT support towards the hospital for 4 years. During 2 of those years I hosted my first gaming server and community. I had the most popular Prophunt server on Garry's mod in whole Europe and 2nd place in the world, I also had other mods on Garry's mod, CS:GO server and Minecraft. After 2 years I decided to stop since I didn't like playing games as much anymore and I wanted to get more serious with programming
So this is the reason why I decided to study at Kristianstad Högskola at Datasystemsutvecklingsprogrammet. During these years I have been working on developing myself and trying to be more entrepreneur and working on sideprojects at same time as I helped out with the student union.
So it wasn't until I was 23 years old I got into programming, I enjoyed it at Furulundsskolan but the teacher wasn't very helpful and I didn't know how to develop further. However now I finally got into it and I love it! During my free time I enjoy Bowling and working out. I still play games sometimes, but not as much as I used to.
This is me, hope you have a great day!


University of California, Riverside
Check back here to find educational resources to learn about microfabrication!


Created: 2021-02-02 Tue 16:03
solves:
Has been illustrated with a casino setup
Maybe
Model:
class BankQuote:
# a bare competitor
# quotes with an average spread with some fluctuations.
# gaussian distribution
def __init__(self,
mu = lambda t: 0.2,
var = lambda t: 0.02):
self.mu = mu
self.var = var
def __call__(self, t=1):
mean = self.mu(t)
var = self.var(t)
return np.random.normal(mean, var,1)[0]
An almost deterministic broker-dealer
# quotes wide with little variance
Citi = BankQuote(mu=lambda t: 0.23,
var= lambda t:0.01)
An adaptative one
# start wide (.2) then becomes aggressive after 500 rounds
JPMorgan = BankQuote(mu = lambda t: 0.2
if t < 500
else 0.13,
var= lambda t: 0.002)
We consider a perfectly efficient market where the market price is the best quote from competitors
class MarketQuote:
def __init__(self, competitors=[JPMorgan, Citi]):
self.competitors = competitors
def __call__(self, t=1):
return np.min([competitor(t) for
competitor in self.competitors])
code
class BNPPbid:
def __init__(self, variance,
competitors=[JPMorgan, Citi]):
self.quote_market = MarketQuote(competitors=
competitors)
self.variance = variance
def __call__(self, bid, t=1):
bid = max(0,np.random.normal(bid, self.variance, 1)[0])
bid_competition = self.quote_market(t)
if bid < bid_competition: return bid
else: return 0
Where to put the points ?
The regret is:
for the A/B Testing bandit, here it is:
def strategy_next_bandit(self, time, bandit_best):
loguru.logger.debug('A/B/C.. testing:')
if time <= self.time_testing:
# try each spread in turn
self.bandit_next = time % self.nb_bandits
else:
# then pick the best
self.bandit_next = self.bests[self.time_testing]
return self.bandit_next
In the ε-greedy
class BenchworkBanditEpsilonGreedy(BenchworkBandit):
def strategy_next_bandit(self, time, bandit_best):
if time < self.nb_bandits:
# choose the next untried bandit
# until they have been all tried
bandit_next = time
elif self.exploreQ(time):
# explore
bandit_next = self.pickup_random_bandit(self.nexts[time-1])
else:
# exploit
bandit_next = self.bests[time-1]
return bandit_next
the probability to try a random bandit aside from the current best one is kept constant
def __init__(self, proba_switch=lambda t: 0.1,
**kwargs):
super().__init__(**kwargs)
# return \epsilon for an epsilon-greedy algo
self.proba_switch = proba_switch #default constant epsilon
# (...)
def exploreQ(self,time):
# we explore with a probability of epsilon
eps = self.proba_switch(time)
sample_uniform =np.random.uniform(0,1)
return sample_uniform < eps
Recall the constant case
the decreasing strategy is following a negative exponential as a cooling or decaying process:
\[\epsilon = e^{-t / h}\]
Results so far:.
| Bandit | Average reward | Nb trials |
|---|---|---|
| 0 | 50 | 35 |
| 1 | 100 | 2 |
| 2 | 103 | 10 |
| 3 | 108 | 200 |
Intuition that:
where:
Looking at each part of the criteria: \(pnl_{avg}(k) + pnl_{max}(k)\sqrt{\frac{2 log(t)}{N_k(t)}}\)
The net effect is that even a bad bandit (one with a very low P&L) will end up being picked up eventually but less and less frequently if it does not improve its average P&L sufficiently.
Suppose two bandits display the following empirical distribution:
UCB takes the point of view of…
optimism in the face of uncertainty
In the case of RFQs, the P&L distribution is know since:
Thomson-sampling algorithm consists in choosing the next bandit by sampling:
Suppose that previously:
Then
def strategy_next_bandit(self, time, bandit_best):
if time >= 1:
# ....
for i in range(nb_bandits):
self.samples_beta[time][i] =
self.spreads_bandit[i]*\
np.random.beta(self.wins[time-1][i],
self.losses[time-1][i])
# take the bandit with maximum reward
bandit_next = np.argmax(self.samples_beta[time])
return bandit_next
competitor quotes a constant spread
DB = BankQuote(mu = lambda t: 0.2, var = lambda t: 0.000001)
market is just that competitor
bnpp_bid = BNPPbid(0.000001, competitors=[DB])
competitor quotes a constant spread but becomes more aggressive after 500 quotes
Nomura = BankQuote(mu = lambda t: 0.2 if t < 500 else 0.09, var = lambda t: 0.0000001)
adding noise to the previous quote
RBC = BankQuote(mu = lambda t: 0.2 if t < 500 else 0.07, var = lambda t: 0.03)
competitor quotes oscillating:
CBC = BankQuote(mu = lambda t: 1.9*(1+np.sin(6*t/300))/2, var = lambda t: 0.0001)
| Scenario | Nb RFQs | TS | esp-greedy cst | eps-greedy var | UCB1 | A/B Test |
|---|---|---|---|---|---|---|
| Deterministic | 500 | 2.5 | 6.5 | 3 | 11 | 7.5 |
| Det. with switch | 3000 | 70 | 70 | 60 | 110 | 160 |
| Switch with noise | 3000 | 120 | 120 | 110 | 150 | 160 |
| Periodic | 3000 | 50 | 60 | 150 | 80 | 40 |
| Average | 60.625 | 64.125 | 80.75 | 87.75 | 91.875 |


{% extends "layout.html" %} {% block title %} Admin {% endblock %} {% block main %}
** Active participants completed at least 1 task in the last 6 month
Inactive users have been signed up for over a month and have not completed any surveys or tasks for x weeks
Emails addresses of participants who:
Active: performed at least 1 task in the past 6 months
Inactive: performed at least 1 task since signing up but no task in the past 6 months
Note: it can take up to 5 minutes ... just wait... While you're waiting remember that this is sensitive data and only download if you're going to use it immediately and delete it immediately after use from your personal device
Average age:
** Data contains missing values


Before Change
@contextlib.contextmanager
def scope(self):
parent_scope = super(TpuReplicator, self).scope()
with parent_scope, tf.variable_creator_scope(replica_local_creator_tpu):
yield
After Change
@contextlib.contextmanager
def scope(self):
with contextlib.ExitStack() as stack:
stack.enter_context(super(TpuReplicator, self).scope())
stack.enter_context(tf.variable_creator_scope(replica_local_creator_tpu))
// The two hacks below enable a large speedup when initializing TPUs (on
// a 4x4 slice startup for ResNet50 goes from 42m -> 2m).
// TODO(tomhennigan) Remove these workarounds.
stack.enter_context(tf.variable_creator_scope(create_variables_eagerly))
stack.enter_context(eager_initial_values())
yield


| Total net profit | -3.28 | Gross profit | 0.82 | Gross loss | -4.1 |
| Profit factor | 0.2 | Expected payoff | -0.12 | ||
| Absolute drawdown | -3.28 | Maximal drawdown (%) | 3.06 (-1390.91%) | ||
| Total trades | 28 | Profit trades (% of total) | 4 (14.29%) | Loss trades (% of total) | 24 (85.71%) |
| Long positions (won %) | 11 (18.18%) | Short positions (won %) | 17 (11.76%) | ||
| Largest | profit trade | 0.35 | loss trade | -0.33 | |
| Average | profit trade | 0.21 | loss trade | -0.17 | |
| Minimum | profit trade | 0.03 | loss trade | -0.06 | |
| Maximum | take profit in pips | 163.1 | stop loss in pips | -25.8 | |
| Average | take profit in pips | 115.2 | stop loss in pips | -14.3 | |
| Minimum | take profit in pips | -4.8 | stop loss in pips | -10.0 | |
| Maximum | Reward-Risk | 15.3 | Duration in minutes | 30363 | |
| Average | Reward-Risk | 9.0 | Duration in minutes | 3159.2 | |
| Minimum | Reward-Risk | 0.0 | Duration in minutes | 17 | |
| Maximum | consecutive wins (profit in money) | 2.0 (0.38) | consecutive losses (loss in money) | 9.0 (-1.6) | |
| Average | consecutive wins | 1.0 | consecutive losses | 5.0 |
| Total net profit | -1.27 | Gross profit | 0.44 | Gross loss | -1.71 |
| Profit factor | 0.26 | Expected payoff | -0.12 | ||
| Absolute drawdown | -1.27 | Maximal drawdown (%) | 1.1 (-647.06%) | ||
| Total trades | 11 | Profit trades (% of total) | 2 (18.18%) | Loss trades (% of total) | 9 (81.82%) |
| Largest | profit trade | 0.28 | loss trade | -0.33 | |
| Average | profit trade | 0.22 | loss trade | -0.19 | |
| Minimum | profit trade | 0.16 | loss trade | -0.06 | |
| Maximum | take profit in pips | 158.6 | stop loss in pips | -22.6 | |
| Average | take profit in pips | 83.2 | stop loss in pips | -15.9 | |
| Minimum | take profit in pips | -4.8 | stop loss in pips | -10.4 | |
| Maximum | Reward-Risk | 11.1 | Duration in minutes | 30363.0 | |
| Average | Reward-Risk | 5.3 | Duration in minutes | 5537.1 | |
| Minimum | Reward-Risk | 0.0 | Duration in minutes | 17.0 | |
| Maximum | consecutive wins (profit in money) | 1.0 (0.28) | consecutive losses (loss in money) | 4.0 (-0.71) | |
| Average | consecutive wins | 1.0 | consecutive losses | 3.0 |
| Total net profit | -2.01 | Gross profit | 0.38 | Gross loss | -2.39 |
| Profit factor | 0.16 | Expected payoff | -0.12 | ||
| Absolute drawdown | -2.01 | Maximal drawdown (%) | 1.85 (-1156.25%) | ||
| Total trades | 17 | Profit trades (% of total) | 2 (11.76%) | Loss trades (% of total) | 15 (88.24%) |
| Largest | profit trade | 0.35 | loss trade | -0.32 | |
| Average | profit trade | 0.19 | loss trade | -0.16 | |
| Minimum | profit trade | 0.03 | loss trade | -0.06 | |
| Maximum | take profit in pips | 163.1 | stop loss in pips | -25.8 | |
| Average | take profit in pips | 135.9 | stop loss in pips | -13.2 | |
| Minimum | take profit in pips | 5.9 | stop loss in pips | -10.0 | |
| Maximum | Reward-Risk | 15.3 | Duration in minutes | 6828.0 | |
| Average | Reward-Risk | 11.4 | Duration in minutes | 1620.6 | |
| Minimum | Reward-Risk | Duration in minutes | 21.0 | ||
| Maximum | consecutive wins (profit in money) | 2.0 (0.38) | consecutive losses (loss in money) | 8.0 (-1.34) | |
| Average | consecutive wins | 2.0 | consecutive losses | 8.0 |


XBOX App Re-design
overview
The app re-design was planned as a self-study project in order to familiarize myself with
re-design's process. Also, I wanted to challenge myself with a bigger project and one that required
me from planning on something that already existed, understanding its flaws and adding value to it.
The main problem with the app seems to be that it finds itself in a beta phase, and thus
most things are still vaguely designed.
It took me about two weeks to complete it.
tools
Miro, Figma, Airtable, Design Thinking Techniques, User Testing, FreeMind, Adobe Suite
year
2021
expectations
- High level re-design, so it doesn't have more than 1 level in terms of structure;
- A more simple design with better user flows;
motivations
- Improving my UI/UX skills;
- Adding value to the current design;
- Improving my sketching and prototyping skills with
tools such as Figma or Miro.
Value proposition
Process
Overall feeling
The app (to date, July 2021) has many failures, as many of the copies are misleading,
the social engagement system is really weak and tricky, you almost never know where in the app you are and
the settings tab is very misleading.
While navigating the app and understanding each section, I believed that I could design a better flow
and feel for it, and here I will portray the final result of it. Again, my main objective was to
add more value for the user to use the app, and for it to have a clearer structure.
Wireframes and Information Architecture
Since this was supposed to be a re-organization of the app, the most important thing was to
understand the actual architecture of the app and rearranging it so that it gives the user more value.
That is why I studied where did the app failed and after taking some notes on what could be viable,
I created a new Information Architecture scheme and started doing the wireframes (which are shown below).
"Recommend me" Function
While planning on what could be improved in the app, I've realised that the Recommendation tool didn't work as desireable, only showing
a random game for the user to pick, which lead me to think about a new system.
As shown below, the current tool only displays a random game, which might not fit what the player is looking for, ignoring its preferences.
Therefore I thought of creating a new randomizer, based on the Gamer Motivation model (more info about it here).
The Gamer Motivation model will work as to categorize the steps that the user has to go through in order for the app to recommend one game.
As shown below, the steps are the next ones:
1. to pick a category for the game, depending on the user's mood;
2. to pick a epoque for the game, depending on when it was released;
3. to pick a duration for the game, depending on how much time the user wants to invest on it.
Game Pass Section Re-design
The Game Pass section can be though as the core of the app, that is why some changes
needed to be done in order to follow the planned objectives. Although I will be explaining the improvements
with its images, the project is better understood when navigating the prototype.
Since the app should revolve around the idea of the player's preference to keep an engagement,
putting something first for the player to enjoy is a must. That is why, the highlights for the games
in a header remain the same, but the first thing that the player will encounter while scrolling is
a "You might like" section together with the recommendation tool. (Before this, the user would find first
the "Recently added" category, which can be placed down below).
Also, categories/genres for the games are displayed earlier (as opposed to the normal app where they are at the bottom), so that the user can easily access and understand how games are displayed. After this, different carrousels with selected games are displayed (as in the real app).
As in the app per se, menu tabs have been added so that they displayed when the user hovers over the different app categories, making it easier to access things faster. Also, the sections have been rearranged, so the Game Pass and Store (which contain the games) are first, and the Social section is relegated to a third position, so there is more congruence in between tabs.
Lastly, the games' card is better organised, displaying fewer information on the Home screen, but amplified when
clicking on the "See all" button, where all information will be displayed.
(When in the prototype, click on the Doom eternal game to see an example).
Store Section Re-design
The Store section was designed as to be a mirror to the Game Pass section with a few changes.
As it feels really empty and soulless on the original design, I believe that doing some minimal
changes to it might increase its value and overall look.
These changes would include a more social engagement in which a Wishlist on
the main page is displayed.
Also, to add a more touch and value to the social part of the app, the games that your friends have liked and are playing are also displayed on the main page of the store, which doesn't happen in the original app.
If you want to have a better feel of what the Store looks like, check the prototype! (Also, for the game's card, check the Doom Eternal one)
Social Section Re-design
Regarding the Social section, the actual one lacks a simple layout, making it difficult to understand
the main flow and many of the actions that can be done.
Some of the main reasons for a social section is to see what your friends are playing and to chat with them,
and this was lacking in the old one, as it was very difficult to start a conversation or even befriend someone.
In the proposed design, the Social section is made of two tabs: one for friends and one for messages (both are
connected). For instance, in the friends section you'll find games that your friends are playing and they've enjoyed.
Also, there is a function were you'll be able to link other accounts in order to engage more with the Microsoft platform.
The friends with whom you interact the most will appear first, and from there you'll be able to send them a message.
On the other hand, the message section ressembles more of an average message app, where you have a sidebar with your last messages and a central part for deploying the message you are in right now. This can be better seen in the prototype down below.
Profile Section Re-Design
The changes in the profile were made to portray a clearer UI and eliminate the message section. In this new profile design, you can quickly change or edit your profile and access the settings of the app. Also, more data from the player is showed, which will help create a bigger audience since there is more social value to it.
Conclusions
1. Overall, the main problem with the user flows was that they were not obvious and most times the user could get lost in between levels.
2. The "Recommend Me" tool was not very efficient as it didn't have basis on why it showcased a specific game instead of another.
3. The app itself is in a beta stage, but many things must be improved in order to create a more engaging system.
Thank you!


MY CART
Home
Categories
About
Refund Policy
Latest
Search Results: Bag
Skybags Brat 4 Backpack (Blue)
Skybags Brat 4 Backpack (Blue)
Skybags Brat 4 Backpack (Blue)
Add to cart
Buy now
Add to Cart
Buy now
Add to Cart
Buy now
Add to cart
Buy now
Add to Cart
Buy now
Add to Cart
Buy now
Add to cart
Buy now
Add to Cart
Buy now
Add to Cart
Buy now


Chapter 12. Optimization
Premature optimization is the root of all evil.
óC. A. R. Hoare
This is going to be a very short chapter, because the main thing Unix experience teaches us about optimizing for performance is how to know when not to do it. A secondary lesson is that the most effective optimization tactics are usually things we do for other reasons, such as cleanness of design.
|


Baby born with five inches of jet-black hair compared to Jungle Book's Mowgli
Parents Sara Morris, 36, and Joshua Jones, 29, were blown away when 7lb 8oz Oscar was born with an astonishing 5cm of thick jet-black hair
by Jack Wright, Amardeep BasseyA baby boy has been dubbed Mowgli after the Disney Jungle Book character - thanks to his 5cm of thick jet-black hair.
Oscar’s locks were spotted on a scan before he entered the world, with doctors estimating it was already 1cm long inside the womb.
After he was just eight weeks old, parents Sara Morris, 36, and Joshua Jones, 29, had to take him for his first haircut as his mop continued to grow.
When the couple are out walking with Oscar, admirers often stop them in the street to comment on his locks.
Now, 20 weeks have passed since she had her C-section, and Sara says they’ve dubbed him ‘Mowgli’ after The Jungle Book character due to his unique hairstyle.
The happy couple were blown away when 7lb 8oz Oscar was born with an astonishing 5cm of thick jet black hair, reports DevonLive .
Sara, who runs a baby shop in the village, said "people on the street come over to us and comment on Oscar's lovely thick hair".
Sara said: "We really couldn't believe just how much hair he had when he was born! It's not something you see very often!
"His hair was, and is, very thick and very black. Joshua and I have brown hair, though he's closer to his dad than to me for that.
"Oscar's aware that he has so much hair, I think. When we lie him down, he'll put his arms over his head and play with it.
"But he'll start crying when he accidentally pulls it, because his fingers get tangled up!
"Joshua and I had watched The Jungle Book in December, so maybe the film was fresh on my mind when Oscar was born.
"I struggled with pregnancy diabetes, and there was a whole week in May where I suffered with this intense heartburn.
"We went for a regular check-up, and learned that Oscar had 1cm of hair already.
"So we were expecting him to have some head hair when he was born. But we didn't expect quite as much as we we got!
"I took one look at him and said - 'he looks just like Mowgli!'.
"Everyone else then looked and said - 'yeah, you're right! He's Mowgli!'.
"Joshua's parents have taken to calling him little Mowgli ever since. It started because of his hair, but he's also very cheeky, so I think it will stick!"
Oscar was born at 2am on July 10 and now has a whopping 12cm of hair on his head.
Her friends have told Sara Oscar should model - because his striking mane makes him look "more like a little man than a baby".
Taking to Facebook, Sara's pictures of newborn Oscar were inundated with praise from friends - many astounded by his hair.
One user posted: "Beautiful. Holy Hair! How is that even possible?!!! ❤ dude will be shaving before you know it!!! ❤".
Another wrote: "Looks adorable. So much hair. So dark. Congratulations ❤ ".
One said: "Look at all his hair, does he want to share some with me.".
Another user posted: "Can’t get over his hair ".
And one friend even suggested: "He is absolutely gorgeous - the hair is amazing! You must both be so proud! He needs to be a model!
Oscar is yet to see the classic movie although Disney fan Joshua, a warehouse assistant, plans to sit down and watch it with him in the near future.
Meanwhile, Oscar likes to dress up as Mr Potato Head from the Toy Story film series, and goes everywhere with a Lion King Simba doll.
Sara even dressed him up as Harry Potter, and posted a photo online, where one person commented: "I cannot wait to meet this little wizard, everyone loves him ...must be that special magic he has. Bless him xx".
Another mum said: "Gorgeous bubba. Xxx ".
Sara described Oscar as "very perceptive, bright, and aware" adding: "Joshua and I can't tell if he'll crawl or talk first!"
"Oscar looks so much older than other babies - it's his hair!"


The Great Race
The Great Race is a movie starring Tony Curtis, Natalie Wood, and Jack Lemmon. In the early 20th century, two rivals, the heroic Leslie and the despicable Professor Fate, engage in an epic automobile race from New York to Paris.


Regression MovieLens Ratting¶
Here we demonstrate a Cosine Similarity Regression job in movie lens dataset. This demo will show how paddle does (word) embedding job, handles the similarity regression, the character-level convolutional networks for text, and how does paddle handle multiple types of inputs. Note that the model structure is not fine-tuned and just a demo to show how paddle works.
YOU ARE WELCOME TO BUILD A BETTER DEMO BY USING PADDLEPADDLE, AND LET US KNOW TO MAKE THIS DEMO BETTER.
Data Preparation¶
Download and extract dataset¶
We use MovieLens Dataset here. To download and unzip the dataset, simply run the following commands.
cd demo/recommendation/data
./ml_data.sh
And the directory structure of demo/recommendation/data/ml-1m
is:
+--ml-1m
+--- movies.dat # movie features
+--- ratings.dat # ratings
+--- users.dat # user features
+--- README # dataset description
Field config file¶
Field config file is used to specify the fields of the dataset and the file format, i.e, specific WHAT type it is in each feature file.
The field config file of ml-1m shows in demo/recommendation/data/config.json
.
It specifics the field types and file names: 1) there are four types of field for user file: id, gender, age and occupation;
2) the filename is “users.dat”, and the delimiter of file is ”::”.
Preprocess Data¶
You need to install python 3rd party libraries. IT IS HIGHLY RECOMMEND TO USE VIRTUALENV MAKE A CLEAN PYTHON ENVIRONMENT.
pip install -r requirements.txt
The general command for preprocessing the dataset is:
cd demo/recommendation
./preprocess.sh
And the detail steps are introduced as follows.
Extract Movie/User features to python object¶
There are many features in movie or user in movielens 1m dataset. Each line of rating file just provides a Movie/User id to refer each movie or user. We process the movie/user feature file first, and pickle the feature (Meta) object as a file.
Meta config file¶
Meta config file is used to specific HOW to parse each field in dataset. It could be translated from field config file, or written by hand. Its file format could be either json or yaml syntax file. Parser will automatically choose the file format by extension name.
To convert Field config file to meta config file, just run:
cd demo/recommendation/data
python config_generator.py config.json > meta_config.json
The meta config file shows below:
There are two kinds of features in meta: movie and user.
- in movie file, whose name is movies.dat
- we just split each line by ”::”
- pos 0 is id.
- pos 1 feature:
- name is title.
- it uses regex to parse this feature.
- it is a char based word embedding feature.
- it is a sequence.
- pos 2 feature:
- name is genres.
- type is one hot dense vector.
- dictionary is auto generated by parsing, each key is split by ‘|’
- in user file, whose name is users.dat
- we just split each line by ”::”
- pos 0 is id.
- pos 1 feature:
- name is gender
- just simple char based embedding.
- pos 2 feature:
- name is age
- just whole word embedding.
- embedding id will be sort by word.
- pos 3 feature:
- name is occupation.
- just simple whole word embedding.
Meta file¶
After having meta config file, we can generate Meta file, a python pickle object which stores movie/user information. The following commands could be run to generate it.
python meta_generator.py ml-1m meta.bin --config=meta_config.json
And the structure of the meta file meta.bin
is:
+--+ movie
| +--+ __meta__
| | +--+ raw_meta # each feature meta config. list
| | | +
| | | | # ID Field, we use id as key
| | | +--+ {'count': 3883, 'max': 3952, 'is_key': True, 'type': 'id', 'min': 1}
| | | |
| | | | # Titile field, the dictionary list of embedding.
| | | +--+ {'dict': [ ... ], 'type': 'embedding', 'name': 'title', 'seq': 'sequence'}
| | | |
| | | | # Genres field, the genres dictionary
| | | +--+ {'dict': [ ... ], 'type': 'one_hot_dense', 'name': 'genres'}
| | |
| | +--+ feature_map [1, 2] # a list for raw_meta index for feature field.
| | # it means there are 2 features for each key.
| | # * 0 offset of feature is raw_meta[1], Title.
| | # * 1 offset of feature is raw_meta[2], Genres.
| |
| +--+ 1 # movie 1 features
| | +
| | +---+ [[...], [...]] # title ids, genres dense vector
| |
| +--+ 2
| |
| +--+ ...
|
+--- user
+--+ __meta__
| +
| +--+ raw_meta
| | +
| | +--+ id field as user
| | |
| | +--+ {'dict': ['F', 'M'], 'type': 'embedding', 'name': 'gender', 'seq': 'no_sequence'}
| | |
| | +--+ {'dict': ['1', '18', '25', '35', '45', '50', '56'], 'type': 'embedding', 'name': 'age', 'seq': 'no_sequence'}
| | |
| | +--+ {'dict': [...], 'type': 'embedding', 'name': 'occupation', 'seq': 'no_sequence'}
| |
| +--+ feature_map [1, 2, 3]
|
+--+ 1 # user 1 features
|
+--+ 2
+--+ ...
Split Training/Testing files¶
We split ml-1m/ratings.dat
into a training and testing file. The way to split file is for each user, we split the
rating by two parts. So each user in testing file will have some rating information in training file.
Use separate.py
to separate the training and testing file.
python split.py ml-1m/ratings.dat --delimiter="::" --test_ratio=0.1
Then two files will be generated: ml-1m/ratings.dat.train
and ml-1m/rating.data.test
.
Move them to workspace data
, shuffle the train file, and prepare the file list for paddle train.
shuf ml-1m/ratings.dat.train > ratings.dat.train
cp ml-1m/ratings.dat.test .
echo "./data/ratings.dat.train" > train.list
echo "./data/ratings.dat.test" > test.list
Neural Network Configuration¶
Trainer Config File¶
The network structure shows below.
The demo’s neural network config file trainer_config.py
show as below.
In this trainer_config.py
, we just map each feature type to
a feature vector, following shows how to map each feature to a vector shows below.
id
: Just simple embedding, and then add to fully connected layer.embedding
:- if is_sequence, get the embedding and do a text convolutional operation, get the average pooling result.
- if not sequence, get the embedding and add to fully connected layer.
one_host_dense
:- just two fully connected layer.
Then we combine each features of movie into one movie feature by a
fc_layer
with multiple inputs, and do the same thing to user features,
get one user feature. Then we calculate the cosine similarity of these two
features.
In these networks, we use several APIs in Model Config API . There are
- Data Layer, api_trainer_config_helpers_layers_data_layer
- Fully Connected Layer, api_trainer_config_helpers_layers_fc_layer
- Embedding Layer, api_trainer_config_helpers_layers_embedding_layer
- Context Projection Layer, api_trainer_config_helpers_layers_context_projection
- Pooling Layer, api_trainer_config_helpers_layers_pooling_layer
- Cosine Similarity Layer, api_trainer_config_helpers_layers_cos_sim
- Text Convolution Pooling Layer, text_conv_pool
- Declare Python Data Sources api_trainer_config_helpers_data_sources.
Data Provider¶
The data provider just read the meta.bin and rating file, yield each sample for training.
In this dataprovider.py
, we should set:
- obj.slots: The feature types and dimension.
- use_seq: Whether this
dataprovider.py
in sequence mode or not. - process: Return each sample of data to
paddle
.
The data provider details document see PyDataProvider2.
Train¶
After prepare data, config network, writting data provider, now we can run paddle training.
The run.sh
is shown as follow:
It just start a paddle training process, write the log to log.txt
,
then print it on screen.
Each command line argument in run.sh
, please refer to the Set Command-line Parameters page. The short description of these arguments is shown as follow.
- config: Tell paddle which file is neural network configuration.
- save_dir: Tell paddle save model into
./output
. - use_gpu: Use gpu or not. Default is false.
- trainer_count: The compute thread in one machine.
- test_all_data_in_one_period: Test All Data during one test period. Otherwise,
will test a
batch_size
data in one test period. - log_period: Print log after train
log_period
batches. - dot_period: Print a
.
after traindot_period
batches. - num_passes: Train at most
num_passes
.
If training process starts successfully, the output likes follow:
I0601 08:07:22.832059 10549 TrainerInternal.cpp:157] Batch=100 samples=160000 AvgCost=4.13494 CurrentCost=4.13494 Eval: CurrentEval:
I0601 08:07:50.672627 10549 TrainerInternal.cpp:157] Batch=200 samples=320000 AvgCost=3.80957 CurrentCost=3.48421 Eval: CurrentEval:
I0601 08:08:18.877369 10549 TrainerInternal.cpp:157] Batch=300 samples=480000 AvgCost=3.68145 CurrentCost=3.42519 Eval: CurrentEval:
I0601 08:08:46.863963 10549 TrainerInternal.cpp:157] Batch=400 samples=640000 AvgCost=3.6007 CurrentCost=3.35847 Eval: CurrentEval:
I0601 08:09:15.413025 10549 TrainerInternal.cpp:157] Batch=500 samples=800000 AvgCost=3.54811 CurrentCost=3.33773 Eval: CurrentEval:
I0601 08:09:36.058670 10549 TrainerInternal.cpp:181] Pass=0 Batch=565 samples=902826 AvgCost=3.52368 Eval:
I0601 08:09:46.215489 10549 Tester.cpp:101] Test samples=97383 cost=3.32155 Eval:
I0601 08:09:46.215966 10549 GradientMachine.cpp:132] Saving parameters to ./output/model/pass-00000
I0601 08:09:46.233397 10549 ParamUtil.cpp:99] save dir ./output/model/pass-00000
I0601 08:09:46.233438 10549 Util.cpp:209] copy trainer_config.py to ./output/model/pass-00000
I0601 08:09:46.233541 10549 ParamUtil.cpp:147] fileName trainer_config.py
The model is saved in output/
directory. You can use Ctrl-C
to stop training whenever you want.
Evaluate and Predict¶
After training several passes, you can evaluate them and get the best pass. Just run
./evaluate.sh
You will see messages like this:
Best pass is 00009, error is 3.06949, which means predict get error as 0.875998002281
evaluating from pass output/pass-00009
Then, you can predict what any user will rate a movie. Just run
python prediction.py 'output/pass-00009/'
Predictor will read user input, and predict scores. It has a command-line user interface as follows:
Input movie_id: 9
Input user_id: 4
Prediction Score is 2.56
Input movie_id: 8
Input user_id: 2
Prediction Score is 3.13


Mahindra and Mahindra Financial Services Limited, Mumbai February 2016 - Present
Working in an India’s leading financial company as a Lean Six Sigma Master Black Belt and Business transformation leader mainly responsible for building continuous improvement culture, leading strategic initiatives, improving business processes, driving improvement projects, mentoring project owners, performing exploratory data analysis, developing predictive models and designing interactive business intelligence dashboards.


Education
BSc Honours, Computer Science
York University
Toronto, Ontario – September 2010 to June 2016
- Overall GPA: 6.54 of 9, Major GPA: 6.48
- Computer Science Skills: User Interface Design, Web Development, Algorithms, Concurrency
Achievements
- Led Java-related expertise at IBM and York, educating colleagues on frameworks such as Swing, guice and JUnit 4.
-
E-Commerce Project
Built an online store from scratch in five days with three people. Led overall design of user flows and data. Created wireframes and Javascript functionality. -
3D Game Experiment
Studied effectiveness of two types of mini-maps. Learned Unity and C♯ to create game from scratch, even though coding not required. -
Personal Website
Built website by learning Foundation, Sass, Gulp, and Node for the first time. Website presents accomplishments using custom jQuery gallery and CSS3 animations.
Technical Skills
Basic
Professional
Expert
Experience
Software Developer
York University
May 2015 – April 2016
- Independently ported customizations to Netdisco's new version and added new features by designing schema updates for the PostgreSQL database, visual updates to the Bootstrap web interface, and adding backend Perl server-side code.
- Gathered feature requirements and ensured satisfaction by proactively meeting with users. Two out of six survey respondents indicated the software met their needs extremely well and four indicated very well.
WebSphere Commerce Functional Verification Tester
IBM
Markham, Ontario – May 2013 to August 2014
- Collaborated with developers and testers to test REST services. Helped in the design of test framework with JUnit 4 and guice expertise.
- Created test plan for command line utility using formal software testing techniques.
- Performed accessibility testing and discovered fifty accessibility-related defects, including some that were not found during testing of the previous release. Presented tutorial on screen-reader technology to fifty team members, due to recognized expertise.


Bar graph showing combined variable rankings from all four different rankings methodologies in FairML.


Time to practice creating and using constructor functions and ES2015 classes. Your objective is to implement the requirements listed in each file of the /problems
directory. In addition to the prompts available at the top of each file, Mocha specs are provided to test your work.
To get started, use the following commands:
cd
into the project directorynpm install
to install any dependenciesmocha
to run the test cases


Conference Introduction
DDD Conference is organized by a group of ThoughtWorks architects, leaders of DDD practitioners in China, it hopes to provide a domestic platform for practitioners of domain driven design (DDD) to communicate with each other and share their successful experience, so that the architecture idea of DDD can be recognized by more people in China, thus forming greater scale effect.
The Fourth DDD Conference will be convened in December 2020.
Due to COVID-19, this conference will be convened online. We will continue to invite DDD leading players from overseas to share new attempts and explorations in the field of architecture design in the context of the global pandemic. At the same time, we will also invite representatives and thought leaders from China to share their insights and conclusions of utilizing DDD in various scenarios. We hope that through the Conference, we can look forward to the new changes that will appear in DDD in the post-pandemic era. Although the conference has shifted from offline to online, we will still do our best to prepare a feast of architecture design and technical practice for everyone. As always, we look forward to meeting you all.
Online DDD Conference 2020, here we are!


When Farmer Oskar doesn't watch his cows closely enough, they tend to wander off into the forest to hunt for horse spies. To catch an enemy agent horse, the cows first lure it onto a trail and then set up fences at the endpoints of the trail, which are $L$ meters apart. Two previously hidden cows then reveal themselves, having concealed themselves in nearby bushes, and the chase is on. The cows are located at positions $A$ and $B$ meters from the left endpoint.
One particular horse, positioned $P$ meters from the left endpoint, who they attempted to catch, rembembered to bring his walke-talkie and have now called for backups. The backups will be there to rescue him very soon, so he wonder if he can hold the cows off for long enough for his help to come.
Horse chasing happens in 1 minute intervals. During each minute, each of the two cows choose to go either 0 or 1 meter in some direction. While the cows move, the horse then jump either 0, 1 or 2 meters in some direction as well. This means that the horse knows where the cows are moving before they arrive at their new location. The horse can jump over a cow though, if it occupies the same position as a cow it cannot jump over the other cow as well.
The horse is captured if after a one-minute interval, a cow occupies the same position as the hores. How long will it take for the horse to certainly be captured, if both the cows and the horse move optimally?


Psalms 6:6
I am weary with my groaning; all the night make I my bed to swim; I water my couch with my tears.


apply plugin: 'jacoco'
Since version 0.0.22 Gretty supports Jacoco instrumentation of web-app projects. The resulting coverage information can be converted to report with the help of standard gradle task JacocoReport. Below are the details.
Code coverage of web-apps consists of two parts:
Client-side code coverage covers the code of integration tests (integration tests are typically written with spock + geb or spock + HttpBuilder, but actually it can be any JVM code that connects to your web-app).
Server-side code coverage covers the code of the web-app itself.
Client-side code coverage is not related to Gretty at all. It is activated by applying Jacoco plugin to the given project containing integration tests:
apply plugin: 'jacoco'
Side effects of applying Jacoco plugin:
Jacoco plugin adds JacocoTaskExtension to each Test task of the given project.
Jacoco plugin apppends Jacoco-specific JVM-arguments to each Test task.
When Test task runs, Jacoco gathers code coverage to the file "${project.buildDir}/jacoco/${task.name}.exec"
("task.name" is the name of the test task).
If you defined JacocoReport task, it creates a report from collected code coverage - html, xml or csv.
Here is the example of client-side code coverage configuration:
apply plugin: 'jacoco'
// ...
test {
include '**/Test*.*'
include '**/*Test.*'
exclude '**/*IT.*'
}
task integrationTest(type: Test, dependsOn: 'test') {
outputs.upToDateWhen { false }
finalizedBy { tasks.integrationTestClientReport }
include '**/*IT.*'
jacoco {
append = false
destinationFile = new File(project.buildDir, 'jacoco/integrationTest_client.exec')
}
}
task('integrationTestClientReport', type: JacocoReport) {
executionData project.tasks.integrationTest
sourceDirectories = project.files(project.sourceSets.test.allSource.srcDirs)
classDirectories = project.sourceSets.test.output
def reportDir = project.reporting.file("jacoco/integrationTest_client/html")
reports {
html.destination = reportDir
}
doLast {
println "Jacoco report for client created: file://${reportDir.toURI().path}"
}
}
Server-side code coverage is implemented by Gretty, using Jacoco plugin and task extensions. It is also activated by applying Jacoco plugin:
apply plugin: 'jacoco'
Gretty-specific side effects of applying Jacoco plugin:
Jacoco plugin adds JacocoTaskExtension to each app-start task of the given project - to appRun, appRunDebug, … and, most importantly, to appBeforeIntegrationTest.
By default JacocoTaskExtension is enabled for appBeforeIntegrationTest and disabled for all other app-start tasks. Code coverage is not collected for the tasks with disabled JacocoTaskExtension. You can configure this by setting appRun.jacoco.enabled = true
.
Jacoco plugin apppends Jacoco-specific JVM-arguments to each app-start task.
When app-start task runs, Jacoco gathers code coverage to the file "${project.buildDir}/jacoco/${task.name}.exec"
("task.name" is the name of the app-start task).
If you define JacocoReport task, it creates a report from collected code coverage - html, xml or csv.
Here is the example of server-side code coverage configuration:
apply plugin: 'org.akhikhl.gretty'
apply plugin: 'jacoco'
// ...
gretty {
afterEvaluate {
tasks.appBeforeIntegrationTest.jacoco {
append = false
destinationFile = new File(project.buildDir, 'jacoco/integrationTest_server.exec')
}
tasks.appAfterIntegrationTest.finalizedBy tasks.integrationTestServerReport
}
}
task('integrationTestServerReport', type: JacocoReport) {
executionData { tasks.appBeforeIntegrationTest.jacoco.destinationFile }
sourceDirectories = project.files(project.sourceSets.main.allSource.srcDirs)
classDirectories = project.sourceSets.main.output
def reportDir = project.reporting.file("jacoco/integrationTest_server/html")
reports {
html.destination = reportDir
}
doLast {
println "Jacoco report for server created: file://${reportDir.toURI().path}"
}
}
|
Note
|
You must configure appBeforeIntegrationTest and appAfterIntegrationTest in gretty.afterEvaluate closure: this is because appBeforeIntegrationTest and appAfterIntegrationTest tasks are not yet defined, when the gradle script is processed. |
|
Note
|
You cannot pass appBeforeIntegrationTest as a parameter to JacocoReport.executionData for the same reason: it is not yet defined. appBeforeIntegrationTest cannot be wrapped with closure, because internally executionData will pass such closure directly to project.files function and the latter has no idea what to do with task. Wrapping appBeforeIntegrationTest.jacoco.destinationFile with closure will work. |
If you instantiate AppBeforeIntegrationTestTask and AppAfterIntegrationTestTask classes yourself, enabling server-side code coverage looks basically the same:
task('myIntegrationTest', type: Test) {
// ...
}
task('myBeforeIntegrationTest', type: AppBeforeIntegrationTestTask) {
jacoco {
append = false
destinationFile = new File(project.buildDir, 'jacoco/integrationTest_server.exec')
}
integrationTestTask 'myIntegrationTest'
}
task('myAfterIntegrationTest', type: AppAfterIntegrationTestTask) {
finalizedBy { tasks.integrationTestServerReport }
integrationTestTask 'myIntegrationTest'
}
task('integrationTestServerReport', type: JacocoReport) {
executionData tasks.myBeforeIntegrationTest
sourceDirectories = project.files(project.sourceSets.main.allSource.srcDirs)
classDirectories = project.sourceSets.main.output
def reportDir = project.reporting.file("jacoco/integrationTest_server/html")
reports {
html.destination = reportDir
}
doLast {
System.out.println "Jacoco report for server created: file://${reportDir.toURI().path}"
}
}
|
Note
|
When instantiating AppBeforeIntegrationTestTask and AppAfterIntegrationTestTask classes yourself, you don’t need to wrap task configuration to gretty.afterEvaluate. |
|
Note
|
Passing myBeforeIntegrationTest as a parameter to JacocoReport.executionData is now simple: task already exists and Jacoco will correctly extract destinationFile from task’s Jacoco extension. |
|
Tip
|
When instantiating AppBeforeIntegrationTestTask and AppAfterIntegrationTestTask classes yourself, you can use many nice features, like debugging, by setting up task properties. See more information in AppBeforeIntegrationTestTask and AppAfterIntegrationTestTask class documentation. |
Gretty contains the complete and working examples of Jacoco code coverage:
Code coverage with standard Gretty tasks:
https://github.com/akhikhl/gretty/tree/master/examples/jacocoExample
Code coverage with instantiated Gretty tasks:
https://github.com/akhikhl/gretty/tree/master/examples/jacocoInstantiateTasks
Code coverage with multiple web-apps:
https://github.com/akhikhl/gretty/tree/master/examples/farmJacoco
If you get exceptions when using combination JDK-8 + Gradle 1.1x + Jacoco + Gretty, you are very likely hitting a problem of compatibility between JDK-8 and earlier versions of Jacoco. See information on how to fix this here.


Quantial
{% from "macros/breadcrumbs.html" import breadcrumbs %}
{{ breadcrumbs('text-left dx-breadcrumbs-dark mnb-8', [['help-center', 'Support Home'], ['articles', 'Articles', 'Quantial']]) }}
{% from "macros/article.html" import articleBlock %}
{{ articleBlock('single-article.blade.php', 'Make menu dropdown working without JavaScript', "Meat all together sea deep isn't replenish called. One moved cattle bring. Can't of. Itself After shall hath winged. Given stars second whose yielding fourth. Subdue years form saw. Second...") }}
{{ articleBlock('single-article.blade.php', 'Google Analytics', "Likeness seed he may. Brought firmament won't that to. Fowl thing saw behold earth land evening gathering hath after all whales winged. Greater so all two dry. Appear seas fruit...") }}
{{ articleBlock('single-article.blade.php', 'How to manually import Demo data (if you faced with problems in one-click demo import)', "And have make, isn't land herb good lesser won't. Own. Us. Moveth, divided female their won't subdue seas tree creepeth They're morning isn't let so lights. Sixth, first every night...") }}
{{ articleBlock('single-article.blade.php', 'WordPress Themes FAQ', "Us sixth she'd, which creeping fruitful winged. To called made seas of grass creature good upon. Air multiply gathering female saying our set creepeth wherein hath waters from midst man...") }}


Hello, everyone! My name is Erik Lieben , and I am a developer from the Netherlands working at Effectory and co-organizer of the Aurelia Amsterdam meetup. In my spare time, I will be working as a member of the Aurelia Core Team on the official vscode-extension . With this extension, we hope to provide you with a pleasant development experience when building Aurelia applications using Visual Studio Code .
The extension is currently in Preview. We would love to receive early feedback and hear about the edge cases that may have been missed while writing the syntax highlighter.
Features
The extension currently consists of the following features:
Syntax Highlighting
The syntax highlighting feature exists in 2 parts: a grammar file to define the Aurelia syntax used in HTML files and four customized themes (Dark, Dark+, Light, Light+). The Aurelia grammar extends the default HTML syntax, which allows tools like Emmet to stay working without adding any extra configuration for it.
Visual Studio Code doesn't support extending themes without modifying them, like Atom does, which means that customized themes are required to see the Aurelia syntax highlighted correctly. I have taken the default themes and extended them with the Aurelia coloring scheme, so you can easily enable Aurelia highlighting.
By default, every Aurelia syntax item will color purple, but you could also extend it by creating a custom theme. This allows you to, for example, color data bindings green, generate the compose
element yellow and the router-view
orange. You can use any other rainbow-like color scheme you like.
Autocomplete
The autocomplete feature helps you to write Aurelia code faster. It will give hints and allow you to tab to complete. The current implementation is a basic first version.
If you look closely, you will see that on the value.bind
it gives you extra information about the default binding (two-way
), and in the case of the placeholder, it provides the default of one-way
. This feature only works on some of the defaults for now and still needs to be extended to support more scenarios.
You can read the full help description of the item to be auto-completed by pressing CTRL+SPACE. For example in the animation below, we show you the information of the delegate
which was added to the click
event.
This feature currently has an unresolved issue where it doesn't center the cursor between the "" on complete. I hope to resolve that soon.
Executing CLI Commands from the Command Palette
In Visual Studio Code you can press CTRL+P to open the commands palette to have access to all the functionally of VS Code from your keyboard. With this extension installed you will also be able to run the CLI tasks: build, generate, new and test from the same commands palette.
It's as simple as typing au generate
and answering the questions to create a custom element. The options are dynamic, so if you would, for example, create a new generator with the cli which is named readme-file-generator
and then run the command again, it will show up as a template you could generate.
What
We are looking at integrating the fantastic work done by Core Team Member Meirion Hughes on the aurelia-templating-lint project into Visual Studio Code. When we have this working you will get squiggly lines on lint errors. For example when you have unclosed elements or self-closing elements you will get squiggly lines under them to warn you.
We are also working on stabilizing the core so that it will be easier to add more amazing features later on.
Want to try it?
Open up Visual Studio Code and press CTRL+P and paste the following to install it.
ext install aurelia
Be sure to select one of the themes with Aurelia syntax support after it's installed. You can do this by going to File / Preferences / Color theme and picking one if the following themes:
- Aurelia Dark
- Aurelia Dark+
- Aurelia Light
- Aurelia Light+
Kind regards, Erik Lieben


Please enter your lunch using comma:
(Example : item1,item2,item3 also empty and space item is not valid as item )
Check If Too Much
{{message}}


Now, let's look at a further feature of the POSIX environment. It also supports writing network programs, that communicate over the Internet using sockets. A socket can be thought of as a two-way communication channel, consisting of both an RFile and a WFile.
Two network programs, which execute on different machines, may connect over the network and communicate using a socket. Typically, one of the programs will be a server and the other a client. Here is a trivial server, the EchoServer. This server waits indefinitely for clients to connect on port 12345. When a client connects, the server starts a session, where client input rows are echoed back to the client, prefixed by a line number. Several clients may be served concurrently and line numbering is independent for each client.
module EchoServer where import POSIX port = Port 12345 root env = class log str = action env.stdout.write ('[':str ++ "]\n") result action env.inet.tcp.listen port (server log) server log sock = class n := 1 p = show sock.remoteHost echo str = action sock.outFile.write (show n ++"> "++str) n := n+1 close = request log (p ++ " closing") result () neterror str = log ("Neterror: "++str) established = action log ("Connected from " ++ p) sock.inFile.installR echo result Connection{..}
Comments to the code:
In order to let you run the server, we provide a simple client, TCPClient. We do not list the code here; you may review it in TCPClient.t. The client accepts a host name and a port number as command line arguments and connects to a server on that address. When connection is established, the client accepts user input lines, sends them to the server and displays replies obtained on the screen.


SPHERE RATING: 6.5 / 10 --> So-so
For more reviews, go to http://surf.to/joblo
Three big name actors, Hoffman, Jackson and Stone, one big name author, Michael Crichton, and one big name director, Barry Levinson, get together and create an underwater science-fiction movie called SPHERE. Just imagine THE THING (8/10) meeting ALIEN (7.5/10) in THE ABYSS.
PLOT: Underwater spacecraft in uncovered by the U.S. government, and four relevant experts in their respective fields are sent down to investigate the unknown entity. Once beneath the ocean, the group makes contact with a source from within the vessel, and attempt to piece together the mystery that is the sphere inside the unexplained discovery.
CRITIQUE: Cool premise and eerie buildup from the first hour, ultimately downshifts into an unsatisfying film that drags long past its bedtime, and turns into a gobbledygook of psychological head games and illusions. Add to that the loss of coherency about halfway, and a major anticlimactic ending, and I can't really say that I thoroughly enjoyed this two-hour plus piece of celluloid. Which is all too bad, because I really liked the first hour, especially the whole claustrophobic feel of the group underwater with the unknown swimming all about them.
The actors all play their cards real well, with Schreiber pulling off a good performance as the egghead astrophysicist, and Sam Jackson coming through as the hairless mathematician with the uneven glimmer in his eye. Stone was also pretty good, but nothing special could be said about Hoffman's by the numbers "nervous dude" character, whose umpteenth performance he seemed to be calling in from his home. And despite Levinson creating some real suspense early on, the overall feel of the picture was quite uneven, along with the absence of a gentleman by the name of style.
Overall, this movie did offer some suspenseful and potentially potent scenes early on, but by the end of this overly long picture, I just felt like a kid who'd been staring at a nacho plate all evening, only to have it taken away at the last minute by a grumpy old man with a crutch. The ending is lame and confusing, the payoff from the early decent premise never really comes through, and the clock ticks at least thirty minutes past its due time. Having said that, the performances are decent, and the early tension and suspense of the film is enough for me to recommend it for at least one night of dark, moody strangeness and confusion.
Note to nacho-platers: Don't waste your salsa on this one. Slap some sour cream on the side, and you should be okay.
Little Known Facts: In the 1970's, Barry Levinson wrote for "The Carol Burnett Show", and won two Emmies in three years. Levinson also co-wrote the script for Norman Jewison's Al Pacino vehicle ...AND JUSTICE FOR ALL with his then-wife Valerie Curtin. Interesting to note that in all of his films, Levinson has featured character actor Ralph Tabakin in a small role. Did you know that Sharon Stone's IQ is 154, and that she is a member of MENSA? In 1986, Sharon was in a TV commercial for Seagrams 7 Golden Wine Cooler with fellow struggling actor at the time, Bruce Willis. Sharon also appeared on TV's "Star Search" as a contestant in the spokesmodel category in the mid-80's. Her payday for her breakthrough hit BASIC INSTINCT (7.5/10) was $750,000. Dustin Hoffman stands 5"5, and made $17,000 for his breakthrough performance in THE GRADUATE (6/10). Peter Coyote's real name is Peter Cohon.
Review Date: August 16, 1998 Director: Barry Levinson Writers: Kurt Wimmer (adaptation of Crichton novel) Stephen Hauser and Paul Attanasio Producers: Barry Levinson, Michael Crichton and Andrew Wald Actors: Dustin Hoffman as Norman Goodman Sharon Stone as Beth Halperin Samuel L. Jackson as Harry Adams Genre: Science-Fiction Year of Release: 1998
Visit JoBlo's Movie Emporium http://surf.to/joblo
(c) 1998 Berge Garabedian
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews