text:
The case of Chelsea's Eva Carneiro shows how hard it is to be a sport doctor
Chelsea doctor Dr Eva Carneiro was criticised by her coach José Mourinho when she ran onto the pitch in a close match against Swansea to treat an injured player. Dr Daniel Sokol, a medical ethicist and barrister, looks at the ethics of the issue
In the spotlight: Eva Carneiro (left) was criticised by Jose Mourinho Photo: REX FEATURES
By Dr Daniel Sokol
1:13PM BST 18 Aug 2015
A player collapses on the field. He appears injured and in pain. The referee, on two occasions, urges the medics to examine him. Dr Carneiro and physiotherapist Jon Fearn run onto the pitch and treat the injured player. Dr Carneiro has since been demoted from touchline duties to Chelsea's training ground at Cobham.
Ethically, Dr Carneiro is on safe ground. The General Medical Council's states in its guidance that "In an emergency, wherever it arises, you must offer assistance, taking account of your own safety, your competence, and the availability of other options for care."
In this case, there was no risk to Dr Carneiro's safety and she was clearly competent to assist the player. Failing to provide assistance may have led to disciplinary action against her.
Chelsea doctor Eva Carneiro responds to Jose Mourinho's criticism
A doctor's primary duty is to act in the best interests of the patient. A football manager, however, may prioritise the best interests of the team.
Like the manager, the players, and the fans, the doctor usually wants the team to do well. The difficulties arise when a doctor's loyalties to the manager, the team, and the fans conflict with the medical commitment to the patient.
In April 2009, in the quarter final of rugby's Heineken Cup, the club doctor of the Harlequins team deliberately cut a player's lip, at the player's request, so that a specialist goal kicker could be brought on. The player had concealed a capsule of fake blood in his sock. In causing physical harm to the patient, the doctor had put the team's interests over that of her patient, and over the laws and spirit of the sport. She was suspended by the General Medical Council.
A sports doctor once told me that he allowed a boxer, ahead on points in the biggest fight of his life, to continue fighting with a broken rib. The tension here was between the medical best interests of the patient (stop the fight) and his overall best interests (allow him to fulfil his ambition of reaching the top of the sport).
Shifting power
In a normal clinical context, there is an imbalance of power in favour of the doctor. The patient is sick, often frightened, and medically less sophisticated. The doctor is healthy, knowledgeable and in a familiar environment.
For sports doctors, the power relationship is altered. The famous manager and players with eye-watering salaries, the prestige and privilege of a coveted medical role, and the knowledge that a replacement could easily be found, create a different dynamic. The doctor wields little power.
External pressures
Sports doctors are by no means the only doctors to face external pressures. Military doctors can face ethical tensions between acting in the best interest of patients and obeying the orders of their superiors. A military doctor in Afghanistan may be ordered not to treat Afghan civilians who present to the hospital with injuries unrelated to the military mission. This runs counter to a doctor's instinct to help.
The private doctors of heads of state or celebrities can experience a reversal in the power dynamic between doctor and patient. This may explain the actions of Michael Jackson's doctor, Dr Conrad Murray, who acted far beyond his level of competence and caused the death of his patient.
The prolonged periods spent with one, or just a few, patients risk blurring professional boundaries. Famously, Dr Claude Gubler, personal doctor to former French president François Mitterrand, repeatedly lied in the 1980s and 90s to the French people about Mitterrand's prostate cancer and his declining physical and mental health. The identity of his patient, his close relationship with him, the prestige of the job and the high salary distorted his ethical judgement.
Eva Carneiro has an argument with Chelsea manager Jose Mourinho on the touchline
The solutions to the ethical dilemmas encountered by sports doctors are rarely difficult. The Hippocratic Oath reminds doctors of their commitment to healing, even in the face of pressure or the temptations of corruption: "In a pure and holy way, I will guard my life and my art and my science." The GMC's guidance is also clear on the duty to act in the best interests of the patient.
Yet, knowing the solution and acting on this knowledge are quite different. When much is at stake, doing the right thing can require considerable moral courage. On the facts publicly available, Dr Carneiro and physiotherapist Jon Fearn discharged their Hippocratic and professional duties to help the sick and injured in an emergency. In so doing, they have guarded their life, art and science and maintained the reputation of their professions.
Dr Daniel Sokol is a medical ethicist and barrister at 12 King's Bench Walk in London, UK.
ChelseaTelegraph
Chelsea Fixtures
Chelsea Results


I only met you once but I didnt think Justin Beiber was your thing..as the saying goes ..never judge a book by its cover ..
Who the hell is justin beiber, bieber whatever???? Come on hooli you probably know .
I finally found out who he is, hooli i think hes related to you.
Took her out for a rip the other day. Check it out.
Really interested in this boat...but I noticed in your video that it was porposing and with no trim tabs...is there a simple fix??


Concealed Leak Insurance was an initiative developed in conjunction with Queensland Urban Utilities and Willis Towers Watson to offer customers the ability to protect themselves from the cost of concealed water leaks.
We wish to advise that effective the 28th February 2019 Concealed Leak Insurance is no longer available for renewal or purchase following being withdrawn from the insurance market by the insurer, QBE.
We confirm that Concealed Leak Insurance policy holders with a current policy will still be able to access the benefits under the insurance policy for the remaining insurable period, as listed on your insurance confirmation certificate.
Queensland Urban Utilities wishes to confirm that their customers will be able to apply for financial assistance for excess water consumption from Queensland Urban Utilities concealed leak financial assistance policy. Further details can be found here..
We would like to thank Queensland Urban Utilities and customers for the support given to the Concealed Leak Insurance program since its inception in 2016.
Willis Australia Limited ABN 90 000 321 237 AFSL 240600 is an Authorised Distributor of QBE Insurance (Australia) Limited ABN 78 003 191 035 AFSL 239545. The Central SEQ Distributor-Retailer Authority trading as Queensland Urban Utilities is an Authorised Representative of Willis Australia Limited, Authorised Representative Number 1240899. Concealed Leak Insurance is issued by QBE Insurance (Australia) Limited. Advice in this document is general advice only and has been prepared without taking account of your objectives, financial situation or needs. Before deciding to acquire the product you should obtain and consider the Product Disclosure Statement (PDS) to decide if the policy is right for you.


I'm excited to be introducing you to UK based Alyson Walsh who writes the blog That's Not My Age and is the author of the books Know Your Style and Style Forever.
Wearing what you always feel right in, what you feel comfortable in. Being authentic.
Work out a colour scheme – such as navy and khaki, navy and red, black and white, grey and fuchsia pink – and then work out a couple of outfits. Always, always pack comfy shoes and trainers. Take a sweatshirt and a wrap-around scarf for the plane. And don't pack too much.
Fit is the most important thing. Clothes that fit well and look good make you feel more confident. Having a good haircut is crucial, too.
Over time you develop a signature style that becomes something of a uniform. I live in jeans and shirts, jackets, jumpsuits, trainers. Once you've found your look it's easy to add updates in the form of new season colours or a piece of amazing jewellery. Iris Apfel has her big flying saucer glasses and her maximalist approach with piles of jewellery – she doesn't follow trends.
The jumpsuit. And where I'm going to get my next cup of decent coffee.
I'm inspired by other women, of all ages – and the best thing about being the author of That's Not My Age and two books has been meeting and interviewing lots of fantastic women. These are role models, industry experts and women of substance who I admire like. I loved interviewing them all. Great writers and journalists inspire me, too. Women like Jennifer Egan, Patti Smith, Joan Bakewell, Mishal Hussain, Nora Ephron.
It's rapidly becoming the jumpsuit because it's so quick and easy in the morning: once you start you can't stop! I also wear jeans and shirts, a lot. Usually with trainers or brogues, the usual everyday basics, but I'll throw on a jacket and some glitzy jewellery to liven things up.
I don't try to stand out. I just want to look interesting and modern – like I know what's what!
It's not about chasing trends – we can buy anything we want at anytime on the internet and so trends are becoming less relevant. It's about looking modern, tweaking your silhouette slightly, wearing new colours, so that you stay in tune with the zeitgeist.
Great big clompy platform shoes are ridiculous and revolting.
It's what I call Casual Glamour, a blend of day and eveningwear and flat shoes or trainers. I often wear jeans or a jumpsuit but I do like to mix things up. I have a sort of Split-Personality Style: half minimal, menswear-inspired dressing, half bohemian, hippy-punk. And I think as we continue to reinvent ourselves throughout our lives, most women have become more comfortable with this high-low, pick and mix approach.
Her favorite thing is a jumpsuit? I don't get it! I see these everywhere and the engineer in me has to ask, how do you use the bathroom in one of these? You have to get completely undressed just to pee! I had the same problem with flightsuits while flying for the military, but at least a flightsuit served a purpose. I think jumpsuits, while likely comfortable, are ridiculous attire.
I do love this woman's style, though, and am intrigued by her fabulous shoes. Subscribing — thank you!
I wear lots of rompers/jumpsuits and I don't look ridiculous. They're very comfortable and the bathroom issues aren't hard to resolve. It's called thinking ahead. Maybe it's the lack of engineer in me that doesn't comprehend what you mean by having to get "completely undressed." That's not correct.
I didn't say she looked ridiculous — I said the attire was ridiculous. In fact, I think the woman is beautiful and I admire her style. I still don't understand, though, how a jumpsuit is practical. To use the restroom, you have to remove any coats, jackets, or sweaters, or other upper garments worn over the jumpsuit, and then pull down or remove the jumpsuit. And then repeat in reverse!
I've been following her blog for a couple of years now.
She's got some great posts and a positive message which is something we all need more of in life!
I agree with Bette to go to the toilet in a jumpsuit is hell on wheels!!!
What I have learned over the years is one person's "hell" is someone else's "heaven" and so it is not for me to decide what is right for others. I guess that's why there are "trash and treasure" markets out there!
Thanks so much for the interview Alyson and I love a jumpsuit in summer but not in winter (I can't stand the cold) , never even thought about sleeves in the loo! I think they can be great – like a dress – a one piece outfit.


House Speciality is a curry made by using a blend of many spices to create an extra special curry. Each dish varies from restaurant to restaurant as every chef has their own footprint on how to make that extra tasty curry! Our version brings out a fuller flavour to the sauce. It is usually served medium hot but you may enhance the hotness by increasing the number of green chillies.
Chief's Tandoori Tikka Mix - Authentic 100% Good Taste!


text:
Q: Do you use WaTiR? Is there a better unit testing tool than WaTiR for Ruby web testing? Or is the defacto standard? What unit testing tools do you use?

A: We use it for all our web application testing, not just ruby based web applications.  We did look into a number of products but felt that WaTiR was the best.  Plus it is in Ruby so we can pat ourselves our backs and tell each other how cool we are for using Ruby.

A: After taking a long look at waitr, my team decided on Selenium.
Among the many reasons were:

*

*The one that Steven mentioned,
Selenium has better browser and
cross-platform support. We currently
have machines running mac, linux,
and windows with safari, firefox,
and ie.

*Selenium tests seemed to run faster
than waitr, especially if you take
advantage of selenium grid.

*Selenium tests could be written in a
wider variety of languages than just
Ruby.

*Selenium has an easy to use IDE.

A: Used as web crawling tool.  WaTiR is also great for testing as I have heard.  Be aware that each browser has their own version of WaTir: WaTiR(IE), FireWaTir(Firefox) and SafariWatiR(Safari).

A: I didn't feel that I could mark any 1 of these as an answer.
From what I see from the responses, is that WaTiR is one of the best if you're sticking with Ruby as the testing language.
I personally agree with Ryan Guest about Selenium due to the cross browser support and language-agnostic approach. On the other hand, it uses it's own language, so it's one more thing to learn.
Scott Hanselman has a podcast titled Functional Testing Tools Roundup that sort of talks about this question.
When it comes down to it, I think the answer is that WaTiR is a great testing tool if it fits your situation.

A: I have been using Watir since 2007 but more as a scripting tool than an unit testing tool.
As a manual tester, it is very useful for some repetitive tasks, but I never got around to actually use it "properly" (creating test cases to see what features are failing and whatnot).
Also, I have showed Watir to some friends of mine who are programmers and they are using it to help them during development of systems written in Java, PHP and even ASP, so just because Watir is a Ruby project, it doesn't mean you should use it only with other Ruby projects :)

A: I use Watir for Functional testing.
For Unit testing, if at all possible a 'headless browser' solution such as webrat or capybara is prefered IMHO as they are far faster and don't complicate things by needing to invoke an instance of the browser etc.
You want unit tests to be FAST, so they can run with every CI build.   Then create an overnight build, and have it run your functional tests, that way if they take hours to run, it's no big deal.  (and once you get a large suite of thousands of functional/acceptance/regression tests, it will take hours to run even with faster browser such as the new IE9, Firefox, or Chrome.
I should also note that with the new Watir-Webdrive project you can get what amounts to the best of both worlds.  The easy to code, very 'Rubyesque' Watir API, and the broad browser support (IE, FF, Chrome, Opera, Headless) of the selenium Webdriver back-end.

A: Worth noting that the FireWatir project has been rolled into the Watir core and the codebases integrated as of the 1.6.2 release last week.

A: We had a look at WaTiR a few years ago and decided against it for various reasons, mostly around ease of use compared to the likes of selenium (as in writing code vs visual tools).
It's worth mentioning that the people who were doing the test-building where not developers let alone Ruby developers.
This also wasn't for ruby apps, but as it's the web and the web serves HTML it shouldn't matter what it's built with.

redpajama_set_name: RedPajamaStackExchange


text:
This week: how extracting groundwater can help Africa access safe water, water tech landscape, the latest impact investments, and more.
Is groundwater the solution to water scarcity in Africa?
Access to safe water and sanitation is critical to human health. Yet, around 1 in 4 people lack access to safe drinking water globally, and nearly 1 million people die each year from water, sanitation, and hygiene-related diseases. This issue has become more pertinent as the COVID-19 pandemic has highlighted the urgent need to ensure everyone has access to good hygiene.
Currently, Africa has the highest percentage of their population lacking access to safe water. For years it has been widely reported that this is due to water scarcity. However, according to a report released yesterday by Wateraid and British Geological Survey, groundwater resources in sub-Saharan Africa are believed to have enough to provide people with safe water for their drinking and hygiene needs while transforming agriculture.
Tapping into Africa's groundwater could change the continent's access to safe water for the better, but - as seen in Wateraid and British Geological Survey's report - investments in infrastructure and extraction must be made to avoid more water scarcity or prevent further hygiene-related diseases.
On Dealroom.co, we've mapped 120+ water technology companies working with clean water and sanitation, including startups working with groundwater treatment, water filtration, and wastewater management. Click the button below to explore our curated landscape and discover startups innovating and leading the water tech sector.
120+ Water Technology Companies
⛽ Germany clinches long-term gas supply deal with Qatar. Germany said it had sealed a long-term agreement with Qatar for the supply of liquefied natural gas as Berlin seeks alternative energy suppliers to Russia. - Financial Times
🧑⚖ S. African court suspends building at new Amazon Africa site. South Africa's High Court has temporarily halted construction of Amazon.com Inc. 's planned new Africa headquarters in Cape Town and ordered the company to consult with indigenous people who say the site is sacred land. - Bloomberg
📞 Not smart but clever? The return of 'dumbphones.' There has been an increase in people exchanging their smartphones for a less smart one. Dumbphones are continuing to enjoy a revival. Google searches for them jumped by 89% between 2018 and 2021. - BBC
🇫🇷 French startup Doctolib has announced that it has raised $549M in Late VC and debt. With this round, the company has reached a valuation of $6.4B making Doctolib the highest valued French startup.
🇺🇸San Francisco-based Heirloom Carbon, a startup that uses common minerals to soak up carbon dioxide from the air, has raised $53M in Series A funding. The round was co-led by Carbon Direct Capital Management, Ahren Innovation Capital, and Breakthrough Energy Ventures.
🇪🇸 Nautilus Labs has raised $34M in Series B funding to decarbonize ocean shipping. M12 and the Microsoft Climate Innovation Fund played leading roles in the funding round.
🇬🇧 Shufti Pro, a London-based identity verification service provider, announced that it has secured $20M in a Series A funding round led by Updata Partners, a tech-focused growth equity firm.
🇬🇧 Vira Health, a London, UK-based provider of a menopause app called Stella, raised $12M in funding. The round was led by Octopus Ventures, with participation from Optum Ventures and existing investors.
🇸🇪 Uppsala-based sodium-ion battery company Altris announced that it has raised €9.6M in a Series A funding round. A combination of new investors and existing investors closed the round.
🇩🇪 Berlin-based solar energy monitoring platform Solytic secured €2M for monitoring PV installations. The round was led by German energy company EWE AG and Polish fund, SpeedUp Energy Innovation
🇺🇸 d.light, a San Francisco-based solar energy startup, just announced that it has secured $7M in equity funding in a funding round led by OP Finnfund Global Impact Fund I.
🇧🇪 Belgian e-bicycle manufacturer, Cowboy, raised $1.9M in Late VC, after raising $80M in January of this year. The investment round was led by Crowdcube.
🇳🇱 Utrecht-Based Green Story raised €1.1M in seed capital for its sustainability platform empowering greener choices. The investment round was led by 4impact.
🇳🇱 At Dealroom.co we are hiring across all departments for 14 roles including: CRM Marketer, Client Success Manager, and Product Owner.
Patent data | On Dealroom's app, you can explore company patents using the patent tab. You can filter for this data in the Advanced Filters >> Patents tab.
See companies with patents.

redpajama_set_name: RedPajamaCommonCrawl


text:
Accused Santa Cruz killer tells doctor…
Accused Santa Cruz killer tells doctor reasoning for alleged matricide
By Michael Todd | mtodd@santacruzsentinel.com | Santa Cruz Sentinel
SANTA CRUZ — Kasey Gaskell has been on numerous behavioral health medications since he allegedly killed his mother almost three years ago in his 230-square-foot Santa Cruz studio apartment.
Kasey Gaskell
But Gaskell, 45, is competent to stand trial despite pleading not guilty by reason of insanity Nov. 7 in Santa Cruz County Superior Court. The plea warrants examinations by two court-appointed doctors to determine whether or not he understood the nature of the actions for which he is accused: strangling and stabbing his mother, Shannon Magner, 66, of Aptos, in the neck and leaving her body to languish in his Front Street home.
His mother was killed Sept. 20, 2016. Surveillance revealed Gaskell left the apartment with luggage the next day, according to court documents.
A security worker detected a stench emanating from the apartment and called the police about 5 a.m. Sept. 26, according to court documents.
The court received the first psychiatric report by Dr. Thomas Reidy in December. Reidy determined Gaskell suffers from some variety of psychotic condition relating to bipolar disorder. Reidy's report provides new details on a case that is almost two and a half years old. The case led investigators to Kansas, where Gaskell was arrested at a homeless shelter Oct. 21, 2016, authorities have said.
Why Kansas?
Gaskell traveled by Greyhound bus to Wichita, Kansas and he ended up in Kansas City. But why did he flee? Reidy asked.
"To escape … from what I did," Reidy wrote of an interview with Gaskell. "I mean, I killed my mom so I just — I just didn't know what to do. I panicked and ran."
During the interview, Gaskell asked how authorities found him. He learned that initially, his aunt had filed a missing-persons report for Magner.
During Reidy's interview with the accused, Gaskell described fears about the allegations of matricide. He also described his rising frustrations with his mother.
He felt "claustrophobic" after being around his mother too often.
"I don't know. She was a hard woman to get anything through to," Gaskell said in the interview with Reidy. "And, I just panicked. I was too out of it, too mentally ill or something."
His mother tried to take care of him but was "disturbing," Gaskell told the doctor.
"It all blew up," Gaskell told the physician. "She wouldn't stop and I ended up going for her neck. … I couldn't take it anymore."
Manner of death
The doctor's report revealed the manner of Magner's death: asphyxiation. She also sustained a fractured larynx and stab wound on the back of her neck.
"The defendant did have a severe mental disease but not a severe mental defect," Reidy wrote. "The defendant did know the nature and quality of his actions and the wrongfulness of the act charged."
If convicted, Gaskell would face 25 years to life in state prison for the murder charge. The use of a knife also can qualify for an additional year of state imprisonment.
It was Santa Cruz County's third of seven homicides in 2016.
Ex-roommates
Magner previously lived with her son at St. George Residences before she moved to Aptos. She was found lying on the floor. Her body's decomposition was underway: The bottoms of her feet were black; the same was true of the skin on her forearm.
"Around her head was a pool of blood," according to information also attributed in Reidy's report.
Gaskell, in interviews with Reidy, accused his mother of belligerence and screaming at people.
New exhibits submitted in Santa Cruz matricide
Santa Cruz matricide advances in Santa Cruz County Superior Court
Santa Cruz man arrested in Kansas City in mother's stabbing death
He talked about her escalating behavior — but the police had no reports of any disturbance at the apartments.
She was "going on and on" and he went at her with the knife, according to Reidy's report.
She tried to fight off her son, scratching his face with her fingernails.
"The defendant indicated that he killed her and then stayed in the apartment to take a shower," Reidy wrote.
Trial is scheduled before Superior Court Judge Stephen Siegel at 9 a.m. Sept. 9.
Assistant District Attorney Kristal Andersen is prosecuting.
Attorney Stephen Prekoski represent's Gaskell.
"We're looking at talking to experts ourselves and preparing for the trial," Prekoski said.
Gaskell has been at Santa Cruz County since he was booked there Nov. 6, 2016.
Carolyn Hax: Girlfriend's anxiety over food makes me anxious
Noose found hanging from bush at Stanford University
Incident being investigated as 'suspicious circumstance'
Man charged with installing spy camera in San Francisco hotel bathroom
He was apparently trying to spy on a female guest as she undressed, authorities said.
DA: Peninsula caretaker stole over $100,000 from widow
A caretaker hired to help a 98-year-old widow stole over $100,000 from the San Carlos woman, according to prosecutors.


Let me start by saying that I believe there are more waterfalls that could be classified as Lake Blanche Falls. This is the easiest and closest to the start of the Lake Blanche trail head in Big Cottonwood Canyon. The trail continues on for a ways, and climbs in elevation. Searches for Lake Blanche Falls indicate there might be taller falls along this trail.
This smaller waterfall is easily visited in Big Cottonwood Canyon. I visited last May, and there were still flurries at that time. Luckily, the main road wasn't closed. One of the roads leading to Doughnut Falls, a very popular waterfall, was still closed, so I turned around. Hidden Falls, a really beautiful waterfall, is in one parking area along a S-curve in the road. In another parking area across the road is the start of the Lake Blanche trailhead. I wasn't feeling particularly great, and didn't wish to hike for a long time. I still wanted to see what was in the area, though, and so I hiked a short distance along this trail. I stopped once I saw some water flowing. The trail started going uphill at this point where the waterfall/cascades could be found.
I'm not sure that I'd go out of my way to see just this waterfall. As I've mentioned, though, Hidden Falls and Doughnut Falls are both close by. I also believe that on a warmer day, the hike along the Lake Blanche trailhead could be very enjoyable.
Head east on UT-190 (Cottonwood Canyon Road). You will enter the National Forest.
Just past mile-marker 6 (which is not 6 miles along the path, but instead 4 miles or so), there is a S-shaped curve. There are two parking areas on the right side of the road. They are somewhat easy to miss at first!
Park in the first parking lot. (The second leads to Hidden Falls.) From there, head east along the Lake Blanche trail, which hugs Big Cottonwood Creek. After a short distance, you should find this waterfall.
Where in the World is Lake Blanche Falls?


text:
Hot Debate: Which Squat is Best?
Partials, Low Bar, and High Bar Squats
The Lebron James Controversy
You might've seen the video of Lebron James doing half squats. The training world went nuts over it, and everybody has an opinion.
The question is, was this a case of a strength coach being "onto something" or a case of an athlete who's amazing despite what he's doing in the weight room?
The internet is both a wonderful and horrible place if you're interested in acquiring knowledge. At no point in time has knowledge been so easily available. But this also means that any dimwit can grace the web with his perspective... and try to berate you into agreeing with him.
On top of that, when it comes to the squat there are very specific applications of the movement that use different techniques and mechanics. And while these applications might be effective for a specific goal, they're not the recommended option for 90% of the population.
The approach I prefer (blame my Olympic lifting background) is a more upright form, which is better for overall lower body development. That's why I like front squatting and the Zercher squat so much. They make it easier to stay upright. Notice the upright position in the Zercher squat:
The more upright you are, the greater the stimulation in the quads will be. The muscle being stretched the most is the muscle being recruited the most. It will also be the most stimulated because of the greater activation and the higher amount of muscle damage (from being stretched under load).
However, you'll see a lot of people advocating the low bar/bent-over squat as the best way to squat and, just like in Lebron's case, you'll see some athletes squatting with a partial range of motion. So, who's right?
The Argument for Half and Quarter Squats
Partial squats are becoming the talk of the town because of Lebron James's half squat video. The argument for using them is that it allows you to load it up heavier in the sport-specific range of motion.
This is something that professor Zatsiorsky called "accentuation." That means using exercises where you're loading only (or primarily) the sport-specific range of motion. So if someone goes down to a 90-degree knee angle when jumping, then during "accentuated squats" he'd squat down to that same joint angle.
The idea is that you can use more weight during a partial lift, and use it on the most applicable range of motion. Using more weight means increasing strength faster in most used range of motion.
While it's true that this approach can be useful if the athlete has already developed a high level of overall full squat strength, it also has some drawbacks.
The Drawbacks of Partial Squats
1 – Bad Mechanics
If you don't have a lot of experience doing full squats and don't have superb technique, then using half squats can be very dangerous.
The 90-degree knee angle is the most unstable in the range of motion, and if you only do a half squat the amortization (breaking) phase of the lift is much shorter. You'll need to slow down faster and stop at the most vulnerable knee angle. The slightest error in body position can be disastrous for your knees or lower back.
But if you have a lot of experience full squatting you'll be more likely to keep the exact same body position during a half squat. Just make sure that at that 90-degree angle, your body is in the exact same position as it would be at that point in a full squat, otherwise the risk of injury increases dramatically.
2 – Muscle Imbalances
If you rely exclusively on this form of squatting you'll develop some imbalances. You might argue, "Yeah, but I can add more glute and hamstring work to compensate." True. But the human body has a limited capacity to tolerate volume, especially if you're not using performance enhancing drugs.
So adding 2-3 more exercises for 4 sets each just to compensate for that lack of stimulation in the glutes, hamstrings, and calves isn't good programming, unless you're working with a genetic freak who can recover and grow from anything, which is likely not you (or me).
3 – Lack of Control
Every person I've seen use partial squats ends up subconsciously shortening the range of motion more and more. This is especially true when your main focus is progressive overload and you try to use more weight on every workout. By shortening the range of motion even further in order to lift more weight, you'll make the exercise even less effective.
4 – Loading Without Strength
You can use a lot of weight on a partial squat. But if you haven't built the muscles (quads, hamstrings, glutes, lower back, abs) and tendons to support a very heavy weight, your chance of injury will be monstrous when dong half/quarter squats with more weight than your body could handle on the full movement.
This is why people who don't full squat at least two times their bodyweight for reps have no business even thinking about including some heavy partial squatting in their training. Can you full squat more than twice your bodyweight? Reach that goal first, then maybe think about doing partials.
The Caveat for Partial Squats
Partial squatting CAN be beneficial to increase the strength in the sport-specific range of motion. I use it with advanced power athletes. But it's only used for three weeks in a 20-week plan. And the partial squats have to be done with perfect positions.
Remember, unless you're already full squatting two to two-and-a-half times your bodyweight, don't waste your time with accentuation. Focus on making your full lift go up.
So What About Lebron James?
When looking at Lebron James's partial squat video, keep in mind that:
It's only one set in his year of training. You don't know what the rest of the training looks like and what the purpose was for this exercise.
The guy is super tall, so maybe at this point that was the deepest range of motion he could do safely. Training a movement pattern with partial movements (the lowest you can go with good mechanics) is fine as long as you're working toward increasing the range of motion over time. Not being capable of going all the way down in a squat is often due to lack of ankle mobility, which is the biggest predictor of lower body injury.
Sport Specific ROM Alternatives
There are other ways of accentuating the sport-specific range of motion in the lower body. The two best ones are using bands and chains and the hang/blocks variations of the Olympic lifts – power clean from the hang/blocks, power snatch from the hang/blocks.
Using Bands or Chains
Photo Credit: Mission CrossFit San Antonio
When doing squats with bands or chains the load is greater in the second half of the range of motion (when you get closer to standing) which allows you to "accentuate" the sport-specific zone. This method of accentuation is a lot more effective than partial movements because:
You keep training the full range which will maintain your mobility and prevent detraining some muscles.
It insures that the overloaded section is done with the exact same mechanics as you use on a full squat... because you're still doing a full squat.
It's a lot safer and allows you to focus on acceleration even more, which is of course even better for sport performance.
Olympic Lifts from the Hang or Blocks
You're training the exact same body position/angles as you would be during jumping and sprinting. You're also training to explode from that sport-specific angle. This can help you transfer the strength gains you made doing deadlifts and squats into fast sport actions.
Think of the Olympic lifts (or plyo) as the bridge between strength work and your sport. The main drawback of the Olympic lift variations is that they're a bit more technical (but less than what people think). If you're not competent at teaching them, you shouldn't use them with your clients.
Low Bar (Powerlifting) Squat
I never liked the term "low bar squat" because you're describing the movement by its less important difference to a more traditional way of squatting. So I refer to it as a "powerlifting squat" or "bent over squat" as these represent the movement much better than just bar placement.
In the powerlifting squat, the sole purpose is to move more weight from point A to point B. The squatter does that by shortening the range of motion by reducing the angular movement at the knee joint, increasing hip movement, and switching the load more to the hips rather than the legs.
This is why the bar is placed lower on the back: so that you can move the hips backward more while bending the torso forward.
The low bar squat is also favored because it allows you to maximize the benefits of the squat suit. A squat suit is a contraption worn by "equipped" powerlifters which supports their body and actually helps you lift the weight because it's getting stretched. With the hip-dominant form of squatting you're stretching the suit more, getting more help from it.
Because of the leverage created, you can move more weight from point A to point B which leads many people to believe that it's the best form of squatting. But weight doesn't equal muscle loading.
The primary goal of the squat should be to maximally develop the lower body, focusing primarily on the quadriceps. Yes, the hip muscles are important for sport performance, but these are emphasized with any form of deadlifting. If you squat like a powerlifter, you might end up with underdeveloped quads, especially if you have long legs relative to your torso.
Note: I say "powerlifting squat" but a lot of the best powerlifters don't use this low-bar style. Ed Coan squatted very upright compared to most powerlifters. Dan Green squats upright (and does front squat) for most of his training, only doing the low-bar style when preparing for a meet.
The powerlifting squat (hip squat/bent over squat/low bar squat) is a more hip dominant squat that reduces quadriceps stimulation. Why? As mentioned, the muscle being stretched the most will be the muscle being recruited the most. In a powerlifting squat the hips move a lot further back, the knees don't travel far forward (the tibias stay almost perpendicular to the floor) and there's less flexion at the knees.
This stretches the glutes more but the quads less. Furthermore, the bent over position puts a lot of loading on the lower back. The powerlifting squat is closer to a deadlift when it comes to muscle loading than a squat.
The Squat That Builds The Most Muscle
If your goal is to build your legs and get them as strong as possible, then use a more upright squatting style.
The only people who should use the powerlifting squat are powerlifters. And even many of them should train mostly using the more upright squatting style, switching their competition style 8 weeks or so prior to a meet, during the specific preparation period.
That's also why I recommend wearing Olympic lifting shoes (elevated heels) when squatting: they make it easier to keep an upright torso when squatting. And it's why I believe that for some people the front squat or Zercher squat will be the better squat variation by allowing long-limbed lifters to stay upright more easily.
For maximum lower body development I prefer the full, upright back squat. Partial squats and "bent over squats" have their place – if used for the right purpose, at the right time, and by the right person. But just because your favorite athlete uses it or a lifter you admire did it on YouTube, it doesn't mean it's optimal for you.
Ask yourself: What's my objective when squatting? Is it...
Moving the most weight from point A to point B?
Peaking your strength at the sport-specific angle?
Building the biggest legs possible?
Then make your choice.
Related: Olympic vs. Powerlifting Squats
Related: Squats and Body Types
Christian Thibaudeau specializes in building bodies that perform as well as they look. He is one of the most sought-after coaches by the world's top athletes and bodybuilders.
Follow Christian Thibaudeau on Facebook


text:
VIDEO: This Is One of the Only Times You'll Want Your Ride Vehicle to Break Down
Tim Allen Accused of Indecency with Younger Co-Star On Set of Disney TV Show
Disney's Magic Kingdom Expansion: Here's What We Know
'Encanto' Takes Over Iconic Disney Park Attraction
Disney's Most Recent Mistake Has Fans Questioning Everything
DO NOT Buy 'Splash Mountain Water' on eBay: Serious Warning from World Health Organization
DisneyDining Disney Dining Plan and Reviews
Disney Foodies
News and updates from one of Disney's largest competitors, Universal.
Disney Banned Activity May Soon Be Banned by Universal As Well
Jill Bivins January 8, 2023
In a move that seemed long overdue due to some and a terrible annoyance to others, Disney banned smoking inside its theme parks in 2019. Smoking is still allowed in designated areas outside of the park's gates, resort hotels, and Disney Springs but lighting up inside the park is completely banned. This ban includes vaping and smokeless tobacco as well. ...
Universal Issues Statement After IT Preview Failure
Krysten Swensen January 7, 2023
On January 5, Universal Hollywood Annual Pass Members logged onto the website to book themselves a spot at the Super Nintendo World Pass Member Previews. They sat online for hours, repeatedly refreshing the page, hoping that the chance to book would pop up as Universal promised it would. That never happened, and after a while, Universal Hollywood finally updated its ...
It Will Soon Be Easier for Guests to Visit Universal Studios Than Disney World, Thanks to a New Partnership
Becky Burkett January 6, 2023
Universal Studios Orlando Resort just unveiled plans that will make it easier for Guests to visit Universal than it is for them to visit the Walt Disney World Resort, and it's all thanks to a new partnership. RELATED: Universal Studios Orlando Announces the Permanent Closure of Fan-Favorite Location The rivalry between Universal and Disney is a bit of a tale ...
Universal's IT Department Fails; Fans Compare to Disney's IT Struggles
Jamie Sylvester January 6, 2023
Universal, one of Disney's top competitors, is preparing for the grand opening of its new land, Super Nintendo World, at Universal Studios Hollywood. But when a Pass Member Preview went sour, fans were quick to call out Universal's IT Department… and compare it to Disney's IT struggles. Universal Studios Hollywood announced it was inviting its dedicated Pass Members to be ...
A Happy Ending for Family Stranded En Route to Disney at Christmas
Southwest Airlines has been a hot mess since December. We've reported extensively about the internal drama at Southwest that caused thousands to be stranded over the Holiday Season. The most wonderful time of the year was ruined for many, including many would-be Disney goers. Today, though, we've just learned of one family that took matters into their own hands and ...
FIRST LOOK: Inside Universal's New Super Nintendo World!
Krysten Swensen December 30, 2022
In just under two months, Universal will open a brand-new land at Universal Studios Hollywood — Super Nintendo World. The new area will bring Guests straight into the world of Mario, Luigi, Princess Peach, Yoshi, Toad, and more! A similar area opened at Universal Studios Japan last year and has been an absolute hit with Guests. Now, with the Hollywood ...
Major Disney World and Universal Parks Remain Closed as Florida Battles Frigid Temps
For the past few days, the entire United States has been battling what weather experts call a "bomb cyclone" — the rapid deepening of an extratropical cyclonic low-pressure area. The massive bomb cyclone has brought record-low temperatures to traditionally warm areas, temperatures with wind chills in the negative 60s to northern areas, and massive blizzards to the northeast. The Sunshine State has ...
Universal Guest Charged With Felony After Attempting to Steal Nearly $1K in Merchandise
When you visit a theme park, you know that it will most likely be an expensive day. Sure, there are ways to save money, like bringing your own refillable water bottle, bringing snacks, and packing your own lunch. However, if you want to do something like buy some merchandise, be ready to spend a pretty penny. Everything from sweatshirts to ...
Universal Ride Finally Reopens, but the Timing Couldn't Be Worse
Jamie Sylvester December 20, 2022
After months of closure, we're thrilled to hear a popular Universal ride is finally reopening at Universal Orlando Resort's Island of Adventure theme park. Unfortunately, the timing is anything but ideal. While Walt Disney World is planning January 2023 closures for both of its water rides, including the permanent closure of Splash Mountain at Magic Kingdom Park and the refurbishment ...
Universal CEO Thinks They Have Disney Animation Beat. Is He Right?
Jill Bivins December 18, 2022
Disney, once the undisputed champion of Animation, is now struggling to keep pace with the competition. Universal, in particular, has been a thorn in Disney's side in recent years, which is sort of history coming full circle. One of Walt Disney's early jobs was animating for Universal, where he developed Oswald the Lucky Rabbit. An ownership dispute cause Disney to ...
Disney Dining Daily Newsletter
DisneyDining.com is not affiliated with The Walt Disney Company. Official information can be found at DisneyParks.com
Other Great Disney World Fan Sites
Disney Fanatic
Disney Movie Addicts
Disney Tips
Inside The Magic


text:
TODO
====
* Refactor as a library
* Canvas API to draw and write text
* Interactive mode (zoom, pan, brightness, ..)
* Enhace ansi mode dithering (blue is not always detected)

redpajama_set_name: RedPajamaGithub


With a production valued at over US$25 million, Kylie?s Aphrodite-Les Folies Tour 2011 features over a million moving parts, including 30 high impact water jets, rain curtains and fountains! The bespoke stage, costing over $10m, is the most technically advanced, complex and precision stage ever created for an arena. Set to become a landmark moment in concert touring with its spectacular production, Aphrodite-Les Folies Tour 2011 is a tour that no music fan should miss.


text:
// Copyright (c) 2009, Whispersoft s.r.l.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Whispersoft s.r.l. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: Cosmin Tudorache
#include <list>
#include <string>
#include <stdio.h>
#include <stdarg.h>

#include "common/base/types.h"
#include "common/base/errno.h"
#include "common/base/log.h"
#include "net/rpc/lib/types/rpc_all_types.h"
#include "net/rpc/lib/client/irpc_client_connection.h"

#include "auto/types.h"    // for creating transactionable rpc types.

#include "auto/wrappers.h" // helpers. Easy way of calling remote methods.

#define LOG_TEST LOG(-1)

#define DECLARE_ASYNC_GLOBAL_HANDLER(service, method, retType)          \
  bool g_success##service##method;                                      \
  std::string g_error##service##method;                                 \
  retType g_ret##service##method;                                       \
  synch::Event g_done##service##method(false, true);                    \
  void g_AsyncRet##service##method(const rpc::CallResult< retType > & ret) \
  {                                                                     \
    g_success##service##method = ret.success_;                          \
    g_error##service##method = ret.error_;                              \
    g_ret##service##method = ret.result_;                               \
    g_done##service##method.Signal();                                   \
  }

#define DECLARE_ASYNC_MEMBER_HANDLER(method, retType)           \
  bool success##method##_;                                      \
  std::string error##method##_;                                 \
  retType ret##method##_;                                       \
  synch::Event done##method##_;                                 \
  void AsyncRet##method(const rpc::CallResult< retType > & ret) \
  {                                                             \
    success##method##_ = ret.success_;                          \
    error##method##_ = ret.error_;                              \
    ret##method##_ = ret.result_;                               \
    done##method##_.Signal();                                   \
  }

#define INITIALIZE_ASYNC_MEMBER_HANDLER(method)                 \
  success##method##_(false), done##method##_(false, true)

class AsyncResultCollectorGigel {
public:
  DECLARE_ASYNC_MEMBER_HANDLER(DoSomething, int);
  DECLARE_ASYNC_MEMBER_HANDLER(DoSomethingElse, rpc::Void);
  DECLARE_ASYNC_MEMBER_HANDLER(DoDelayReturn, int);

  AsyncResultCollectorGigel()
      : INITIALIZE_ASYNC_MEMBER_HANDLER(DoSomething),
        INITIALIZE_ASYNC_MEMBER_HANDLER(DoSomethingElse),
        INITIALIZE_ASYNC_MEMBER_HANDLER(DoDelayReturn) {}
};
DECLARE_ASYNC_GLOBAL_HANDLER(Gigel, DoSomething, int);
DECLARE_ASYNC_GLOBAL_HANDLER(Gigel, DoSomethingElse, rpc::Void);
DECLARE_ASYNC_GLOBAL_HANDLER(Gigel, DoDelayReturn, int);

class AsyncResultCollectorMitica {
public:
  DECLARE_ASYNC_MEMBER_HANDLER(Initialize, bool);
  DECLARE_ASYNC_MEMBER_HANDLER(Finish, rpc::Void);
  DECLARE_ASYNC_MEMBER_HANDLER(TestMe, int32);
  DECLARE_ASYNC_MEMBER_HANDLER(Foo, string);
  DECLARE_ASYNC_MEMBER_HANDLER(SetPerson, rpc::Void);
  DECLARE_ASYNC_MEMBER_HANDLER(GetPerson, Person);
  DECLARE_ASYNC_MEMBER_HANDLER(SetFamily, Family);

  AsyncResultCollectorMitica()
      : INITIALIZE_ASYNC_MEMBER_HANDLER(Initialize),
      INITIALIZE_ASYNC_MEMBER_HANDLER(Finish),
      INITIALIZE_ASYNC_MEMBER_HANDLER(TestMe),
      INITIALIZE_ASYNC_MEMBER_HANDLER(Foo),
      INITIALIZE_ASYNC_MEMBER_HANDLER(SetPerson),
      INITIALIZE_ASYNC_MEMBER_HANDLER(GetPerson),
      INITIALIZE_ASYNC_MEMBER_HANDLER(SetFamily) {}
};
DECLARE_ASYNC_GLOBAL_HANDLER(Mitica, Initialize, bool);
DECLARE_ASYNC_GLOBAL_HANDLER(Mitica, Finish, rpc::Void);
DECLARE_ASYNC_GLOBAL_HANDLER(Mitica, TestMe, int32);
DECLARE_ASYNC_GLOBAL_HANDLER(Mitica, Foo, string);
DECLARE_ASYNC_GLOBAL_HANDLER(Mitica, SetPerson, rpc::Void);
DECLARE_ASYNC_GLOBAL_HANDLER(Mitica, GetPerson, Person);
DECLARE_ASYNC_GLOBAL_HANDLER(Mitica, SetFamily, Family);

class AsyncResultCollectorGlobal {
public:
  DECLARE_ASYNC_MEMBER_HANDLER(GetTribeByPosition, Tribe);
  DECLARE_ASYNC_MEMBER_HANDLER(AddTribe, bool);
  DECLARE_ASYNC_MEMBER_HANDLER(CreateTribe, Tribe);
  DECLARE_ASYNC_MEMBER_HANDLER(SetTribeHead, int64);
  DECLARE_ASYNC_MEMBER_HANDLER(GetTribeVillager, Villager);
  DECLARE_ASYNC_MEMBER_HANDLER(Clear, rpc::Void);

  AsyncResultCollectorGlobal()
      : INITIALIZE_ASYNC_MEMBER_HANDLER(GetTribeByPosition),
      INITIALIZE_ASYNC_MEMBER_HANDLER(AddTribe),
      INITIALIZE_ASYNC_MEMBER_HANDLER(CreateTribe),
      INITIALIZE_ASYNC_MEMBER_HANDLER(SetTribeHead),
      INITIALIZE_ASYNC_MEMBER_HANDLER(GetTribeVillager),
      INITIALIZE_ASYNC_MEMBER_HANDLER(Clear) {}
};
DECLARE_ASYNC_GLOBAL_HANDLER(Global, GetTribeByPosition, Tribe);
DECLARE_ASYNC_GLOBAL_HANDLER(Global, AddTribe, bool);
DECLARE_ASYNC_GLOBAL_HANDLER(Global, CreateTribe, Tribe);
DECLARE_ASYNC_GLOBAL_HANDLER(Global, SetTribeHead, int64);
DECLARE_ASYNC_GLOBAL_HANDLER(Global, GetTribeVillager, Villager);
DECLARE_ASYNC_GLOBAL_HANDLER(Global, Clear, rpc::Void);

void RunTest(rpc::IClientConnection & rpcConnection) {
  // TEST Gigel
  //
  LOG_TEST << "############## BEGIN Gigel TESTS ##############";
  {
    ServiceWrapperGigel gigel(rpcConnection, "gigel");
    {
      rpc::CallResult<rpc::Void> ret;
      gigel.DoSomethingElse(ret);
      if (!ret.success_) {
        LOG_FATAL << "Failed to invoke Gigel::DoSomethingElse(): "
                  << ret.error_;
      }
      LOG_TEST << "Successfully invoked Gigel::DoSomethingElse()";
    }

    {
      const int32 a = 7;
      const double b = 2.718282f;
      const int32 expected = 9;
      rpc::CallResult<int32> ret;
      gigel.DoSomething(ret, a, b);
      if (!ret.success_) {
        LOG_FATAL << "Failed to invoke Gigel::DoSomething("
                  << a << ", " << b << "): " << ret.error_;
      }
      LOG_TEST << "Successfully invoked Gigel::DoSomething("
               << a << ", " << b << ") => " << ret.result_;
      CHECK(ret.result_ == expected);
    }

    {
      LOG_TEST << "Invoking gigel.DoDelayReturn for SUCCESS";
      const int ms_delay = 2000;
      const int return_value = 3;
      rpc::CallResult<int32> ret;
      gigel.SetCallTimeout(5000);
      gigel.DoDelayReturn(ret, ms_delay, return_value);
      if (!ret.success_) {
        LOG_FATAL << "Failed Gigel::DoDelayReturn("
                  << ms_delay << ", " << return_value << "): " << ret.error_;
      }
      LOG_TEST << "Successfully invoked Gigel::DoDelayReturn("
                  << ms_delay << ", " << return_value << ") => " << ret.result_;
      CHECK(ret.result_ == return_value);
    }

    {
      LOG_TEST << "Invoking gigel.DoDelayReturn for TIMEOUT"
                  " .. this may take a while";
      const int ms_delay = 7000;
      const int return_value = 3;
      rpc::CallResult<int32> ret;
      gigel.SetCallTimeout(5000);
      gigel.DoDelayReturn(ret, ms_delay, return_value);
      if (ret.success_) {
        LOG_FATAL << "Failed Gigel::DoDelayReturn("
                  << ms_delay << ", " << return_value << "):"
                  << " Expected TIMEOUT, got SUCCESS.";
      }
      LOG_TEST << "Successfully invoked Gigel::DoDelayReturn("
               << ms_delay << ", " << return_value << ") with TIMEOUT";
    }
  }

#define TEST_PASS(expectedRet, service, method, args...) {              \
    rpc::CallResult< typeof(expectedRet) > result;                      \
    service.method(result , ##args );                                   \
    if ( !result.success_ ) {                                           \
      LOG_FATAL << "Failed to call "                                    \
          "" #service "::" #method ".  Error: " << result.error_;       \
    }                                                                   \
    LOG_TEST << "Successfully invoked " #service "::" #method "(...)."  \
        " Return: " << result.result_;                                  \
    /* verify returned value */                                         \
    CHECK(result.result_ == expectedRet);                              \
  }

  // TEST Mitica
  //
  LOG_TEST << "############## BEGIN Mitica TESTS ##############";
  {
    ServiceWrapperMitica mitica(rpcConnection, "mitica");

    string address("Acasa pe stanga");
    rpc::Void void_result;

    // should remember address and return true
    TEST_PASS(bool(true), mitica, Initialize, address, int32(169));

    // should sum-up those two numbers
    TEST_PASS(int32(15), mitica, TestMe, int32(13),
              double(2.718282),
              string("Prepelita ciripeste pe o creanga subreda."));

    // should return the address from Initialize
    TEST_PASS(address, mitica, Foo, true);

    Person person;
    person.name_.set(string("Ionescu"));
    person.height_.set(double(1.76));
    person.age_.set(int32(123));
    person.married_.set(bool(true));

    // set person
    TEST_PASS(void_result, mitica, SetPerson, person);

    // get person
    TEST_PASS(person, mitica, GetPerson );

    Person mother;
    mother.name_ = string("MotherA");
    mother.height_ = double(1.68);
    mother.age_ = int32(103);
    mother.married_ = bool(true);
    Person father;
    father.name_ = string("FatherB");
    father.height_ = double(1.69);
    father.age_ = int32(107);
    father.married_ = bool(false);
    vector<Person> children(2);
    children[0] = mother;
    children[1] = father;
    Family family;
    family.mother_ = mother;
    family.father_ = father;
    family.children_ = children;

    // make a Family of the given params and return it.
    TEST_PASS(family, mitica, SetFamily, mother, father, children);

    // return just children of the previous set family
    TEST_PASS(children, mitica, GetChildren );

    // invoke Finish method of Mitica
    TEST_PASS(void_result, mitica, Finish);
  }

  // TEST Tribes
  //
  LOG_TEST << "############## BEGIN Tribe TESTS ##############";
  {
    Tribe nullTribe;
    nullTribe.name_ = string("");
    nullTribe.people_.ref();
    rpc::Void rvoid;
    EmptyType empty_type;

    ServiceWrapperGlobal global(rpcConnection, "global");
    global.SetCallTimeout(120000);

    TEST_PASS(empty_type, global, MirrorEmptyType, empty_type);

    TEST_PASS(rvoid, global, Clear);  // always start with a clean world
    TEST_PASS(nullTribe, global, GetTribeByPosition, int32(1),  int32(3));
    TEST_PASS(nullTribe, global, GetTribeByPosition,
              int32(-1), int32(-3));

    Villager aVillager0;
    aVillager0.ID_ = int64(123);
    aVillager0.name_ = string("a person 123");

    Villager aVillager1;
    aVillager1.ID_ = int64(321);
    aVillager1.name_ = string("a person 321");
    aVillager1.height_ = double(1.7);
    aVillager1.parentID_ = aVillager0.ID_;

    Villager aVillager2;
    aVillager2.ID_ = int64(456);
    aVillager2.name_ = string("a person 456");
    aVillager2.height_ = double(1.9);
    aVillager2.childrenIDs_.ref().push_back(aVillager0.ID_);
    aVillager2.childrenIDs_.ref().push_back(aVillager1.ID_);

    Tribe aTribe;
    aTribe.name_ = string("tribe a");
    map<int64, Villager> & aPeopleMap = aTribe.people_.ref();
    aPeopleMap[aVillager0.ID_.get()] = aVillager0;
    aPeopleMap[aVillager1.ID_.get()] = aVillager1;
    aPeopleMap[aVillager2.ID_.get()] = aVillager2;

    Tribe bTribe;
    bTribe.name_ = string("tribe b");
    bTribe.people_.ref();

    // Add tribe "a"
    TEST_PASS(bool(true ), global, AddTribe, aTribe,
              int32(1), int32(3));
    TEST_PASS(bool(false), global, AddTribe, aTribe,
              int32(1), int32(3));

    // Verify tribe 'a' exists
    TEST_PASS(aTribe, global, GetTribeByPosition, int32(1), int32(3));
    TEST_PASS(nullTribe, global, GetTribeByPosition,
              int32(1),  int32(2));
    TEST_PASS(aTribe, global, GetTribeByPosition, int32(1), int32(3));

    // Verify tribe 'a' persons
    Villager nullVillager;
    nullVillager.ID_ = int64(0);
    nullVillager.name_ = string("");
    TEST_PASS(nullVillager, global, GetTribeVillager,
              string("tribe aa"), aVillager0.ID_.get());
    TEST_PASS(nullVillager, global, GetTribeVillager,
              string("tribe a"), int64(-2));
    TEST_PASS(aVillager0,   global, GetTribeVillager,
              string("tribe a"), aVillager0.ID_.get());
    TEST_PASS(aVillager1,   global, GetTribeVillager,
              string("tribe a"), aVillager1.ID_.get());
    TEST_PASS(aVillager2,   global, GetTribeVillager,
              string("tribe a"), aVillager2.ID_.get());

    // Create a duplicate 'a' tribe.
    vector<Villager> nullPeople;
    TEST_PASS(nullTribe, global, CreateTribe,
              string("tribe new a"), nullPeople,
              int32(1), int32(3));  // position already taken
    TEST_PASS(nullTribe, global, CreateTribe, string("tribe a"),
              nullPeople, int32(1), int32(2));   // name already taken
    vector<Villager> aPeopleArray(3);
    aPeopleArray[0] = aVillager0;
    aPeopleArray[1] = aVillager1;
    aPeopleArray[2] = aVillager2;
    Tribe saTribe = aTribe;
    saTribe.name_ = string("tribe second a");
    TEST_PASS(saTribe, global, CreateTribe,
              string("tribe second a"), aPeopleArray,
              int32(1), int32(2));  // success

    // Verify tribe 'second a' persons
    TEST_PASS(nullVillager, global, GetTribeVillager,
              string("tribe second aa"), aVillager0.ID_.get());
    TEST_PASS(nullVillager, global, GetTribeVillager,
              string("tribe second a"), int64(-2));
    TEST_PASS(aVillager0,   global, GetTribeVillager,
              string("tribe second a"), aVillager0.ID_.get());
    TEST_PASS(aVillager1,   global, GetTribeVillager,
              string("tribe second a"), aVillager1.ID_.get());
    TEST_PASS(aVillager2,   global, GetTribeVillager,
              string("tribe second a"), aVillager2.ID_.get());

    // Add tribe "b"
    TEST_PASS(bool(true ), global, AddTribe, bTribe,
              int32(-2), int32(-5));
    TEST_PASS(bool(false), global, AddTribe, bTribe,
              int32(-2), int32(-5));

    // Verify tribe 'b' exists
    TEST_PASS(bTribe, global, GetTribeByPosition,
              int32(-2), int32(-5));
    TEST_PASS(nullTribe, global, GetTribeByPosition,
              int32(-2),  int32(-2));
    TEST_PASS(bTribe, global, GetTribeByPosition,
              int32(-2), int32(-5));

    // Create a duplicate 'b' tribe.
    TEST_PASS(nullTribe, global, CreateTribe, string("tribe new b"),
              nullPeople,
              int32(-2), int32(-5));  // position already taken
    TEST_PASS(nullTribe, global, CreateTribe, string("tribe b"),
              nullPeople, int32(-2), int32(-3));   // name already taken
    Tribe sbTribe = bTribe;
    sbTribe.name_ = string("tribe second b");
    TEST_PASS(sbTribe, global, CreateTribe, string("tribe second b"),
              nullPeople, int32(-2), int32(-3));   // success

    // set head of tribe 'a'
    TEST_PASS(int64(-1), global, SetTribeHead,
              string("tribe aa"), aVillager0.ID_.get());
    TEST_PASS(int64(-1), global, SetTribeHead,
              string("tribe a"), int64(-1));
    TEST_PASS(int64(0),  global, SetTribeHead,
              string("tribe a"), aVillager0.ID_.get());
    TEST_PASS(aVillager0.ID_.ref(),  global, SetTribeHead,
              string("tribe a"), aVillager1.ID_.get());
    // set it also local
    aTribe.head_id_ = aVillager1.ID_;

    // Verify tribe 'a' correctness
    TEST_PASS(aTribe, global, GetTribeByPosition, int32(1), int32(3));

    // create tribe 'c'
    Villager & cVillager0 = aVillager2;
    Tribe cTribe;
    cTribe.name_ = string("tribe c");
    cTribe.people_.ref()[cVillager0.ID_.get()] = cVillager0;
    vector<Villager> cPeopleArray(1);
    cPeopleArray[0] = cVillager0;
    TEST_PASS(nullTribe, global, CreateTribe, string("tribe a")
              , cPeopleArray, int32(3), int32(3));
    TEST_PASS(nullTribe, global, CreateTribe, string("tribe second b"),
              cPeopleArray, int32(3), int32(3));
    TEST_PASS(cTribe, global, CreateTribe, cTribe.name_.get(), cPeopleArray,
              int32(3), int32(3));

    // set tribe 'c' head
    TEST_PASS(int64(-1), global, SetTribeHead, string("tribe cc"),
              cVillager0.ID_.get());
    TEST_PASS(int64(-1), global, SetTribeHead, string("tribe c"),
              int64(-1));
    TEST_PASS(int64(0),  global, SetTribeHead, string("tribe c"),
              cVillager0.ID_.get());
    TEST_PASS(cVillager0.ID_.ref(),  global, SetTribeHead,
              string("tribe c"), cVillager0.ID_.get());
    // set it also local
    cTribe.head_id_ = cVillager0.ID_;

    // Verify tribe 'c' correctness
    TEST_PASS(cTribe, global, GetTribeByPosition, int32(3), int32(3));
    TEST_PASS(cVillager0, global, GetTribeVillager, string("tribe c"),
              cVillager0.ID_.get());
  }

  //////////////////////////////////////////////////////////////////////
  //                       Asynchronous tests
  //
  // Test Gigel Async
  //
  LOG_TEST << "############## BEGIN Gigel ASYNC TESTS ##############";
  {
    ServiceWrapperGigel gigel(rpcConnection, "gigel");

    //
    // Using a resultCollector class
    //
    AsyncResultCollectorGigel res;
    res.doneDoSomething_.Reset();
    gigel.DoSomething(
        NewCallback(&res, &AsyncResultCollectorGigel::AsyncRetDoSomething),
        int32(1), double(3.14));
    if (!res.doneDoSomething_.Wait(5000)) {
      LOG_FATAL << "Timeout waiting for DoSomething result";
    }
    if (!res.successDoSomething_) {
      LOG_FATAL << "An error happened while executing DoSomething: "
                << res.errorDoSomething_;
    }
    CHECK_EQ(res.retDoSomething_, int32(4));
    LOG_TEST << "SUCCESS gigel Async DoSomething";
    ////////////////////////////
    res.doneDoSomethingElse_.Reset();
    gigel.DoSomethingElse(
        NewCallback(&res, &AsyncResultCollectorGigel::AsyncRetDoSomethingElse));
    if (!res.doneDoSomethingElse_.Wait(5000)) {
      LOG_FATAL << "Timeout waiting for DoSomethingElse result";
    }
    if (!res.successDoSomethingElse_) {
      LOG_FATAL << "An error happened while executing DoSomethingElse: "
                << res.errorDoSomethingElse_;
    }
    CHECK_EQ(res.retDoSomethingElse_, rpc::Void());
    LOG_TEST << "SUCCESS gigel Async DoSomethingElse";
    /////////////////////////////
    res.doneDoDelayReturn_.Reset();
    gigel.DoDelayReturn(
        NewCallback(&res, &AsyncResultCollectorGigel::AsyncRetDoDelayReturn),
        int32(2000), int32(7));
    if (!res.doneDoDelayReturn_.Wait(5000)) {
      LOG_FATAL << "Timeout waiting for DoDelayReturn result";
    }
    if (!res.successDoDelayReturn_) {
      LOG_FATAL << "An error happened while executing DoDelayReturn: "
                << res.errorDoDelayReturn_;
    }
    CHECK_EQ(res.retDoDelayReturn_, int32(7));
    LOG_TEST << "SUCCESS gigel Async DoDelayReturn";
    /////////////////////////////
    res.doneDoDelayReturn_.Reset();
    gigel.SetCallTimeout(3000);
    gigel.DoDelayReturn(
        NewCallback(&res, &AsyncResultCollectorGigel::AsyncRetDoDelayReturn),
        int32(7000), int32(7));
    if (!res.doneDoDelayReturn_.Wait(5000)) {
      LOG_FATAL << "Timeout waiting for DoDelayReturn result";
    }
    if (res.successDoDelayReturn_) {
      LOG_FATAL << "Error DoDelayReturn: expected TIMEOUT, got SUCCESS.";
    }
    gigel.SetCallTimeout(5000);
    LOG_TEST << "SUCCESS gigel Async DoDelayReturn TIMEOUT";
    /////////////////////////////
    res.doneDoDelayReturn_.Reset();
    res.errorDoDelayReturn_ = "";
    res.successDoDelayReturn_ = false;
    rpc::CALL_ID call_id_do_delay_return = gigel.DoDelayReturn(
        NewCallback(&res, &AsyncResultCollectorGigel::AsyncRetDoDelayReturn),
        int32(3000), int32(7));
    gigel.CancelCall(call_id_do_delay_return);
    if (res.doneDoDelayReturn_.Wait(5000)) {
      LOG_FATAL << "Expected timeout waiting for DoDelayReturn result";
    }
    CHECK(!res.successDoDelayReturn_);
    LOG_TEST << "SUCCESS gigel Async DoDelayReturn CANCEL";

    //
    // Using global result handlers
    //
    g_doneGigelDoSomething.Reset();
    gigel.DoSomething(NewCallback(&g_AsyncRetGigelDoSomething), int32(1),
                      double(3.14));
    if (!g_doneGigelDoSomething.Wait(5000)) {
      LOG_FATAL << "Timeout waiting for DoSomethingAsync result";
    }
    if (!g_successGigelDoSomething) {
      LOG_FATAL << "Error DoSomethingAsync: " << g_errorGigelDoSomething;
    }
    CHECK_EQ(g_retGigelDoSomething, int32(4));
    LOG_TEST << "SUCCESS gigel Async DoSomething";
    ////////////////////////////
    g_doneGigelDoSomethingElse.Reset();
    gigel.DoSomethingElse(NewCallback(&g_AsyncRetGigelDoSomethingElse));
    if (!g_doneGigelDoSomethingElse.Wait(5000)) {
      LOG_FATAL << "Timeout waiting for DoSomethingElse result";
    }
    if (!g_successGigelDoSomethingElse) {
      LOG_FATAL << "Error DoSomethingElse: " << g_errorGigelDoSomethingElse;
    }
    LOG_INFO << g_retGigelDoSomethingElse;
    LOG_INFO << rpc::Void();
    CHECK_EQ(g_retGigelDoSomethingElse, rpc::Void());
    LOG_TEST << "SUCCESS gigel Async DoSomethingElse";
    /////////////////////////////
    g_doneGigelDoDelayReturn.Reset();
    gigel.DoDelayReturn(NewCallback(&g_AsyncRetGigelDoDelayReturn),
                        2000, 7);
    if (!g_doneGigelDoDelayReturn.Wait(5000)) {
      LOG_FATAL << "Timeout waiting for DoDelayReturn result";
    }
    if (!g_successGigelDoDelayReturn) {
      LOG_FATAL << "Error DoDelayReturn: " << g_errorGigelDoDelayReturn;
    }
    CHECK_EQ(g_retGigelDoDelayReturn, 7);
    LOG_TEST << "SUCCESS gigel Async DoDelayReturn";
    /////////////////////////////
    g_doneGigelDoDelayReturn.Reset();
    gigel.SetCallTimeout(3000);
    gigel.DoDelayReturn(NewCallback(&g_AsyncRetGigelDoDelayReturn),
                        7000, 7);
    if (!g_doneGigelDoDelayReturn.Wait(5000)) {
      LOG_FATAL << "Timeout waiting for DoDelayReturn result";
    }
    if (g_successGigelDoDelayReturn) {
      LOG_FATAL << "Error DoDelayReturn: expected TIMEOUT, got SUCCESS";
    }
    gigel.SetCallTimeout(5000);
    LOG_TEST << "SUCCESS gigel Async DoDelayReturn TIMEOUT";
    /////////////////////////////
    g_doneGigelDoDelayReturn.Reset();
    g_successGigelDoDelayReturn = false;
    call_id_do_delay_return = gigel.DoDelayReturn(
        NewCallback(&g_AsyncRetGigelDoDelayReturn), 3000, 7);
    gigel.CancelCall(call_id_do_delay_return);
    if (g_doneGigelDoDelayReturn.Wait(5000)) {
      LOG_FATAL << "Expected timeout waiting for DoDelayReturn result";
    }
    CHECK(!g_successGigelDoDelayReturn);
    LOG_TEST << "SUCCESS gigel Async DoDelayReturn CANCEL";
    /////////////////////////////
  }

  // Fasten up a bit the testing process
  //
#define ASYNC_TEST_GLOBAL_CALLBACK(service, method, expectedReturn, args...) { \
    g_done##service##method.Reset();                                    \
    w##service.method(NewCallback(&g_AsyncRet##service##method), ##args); \
    if ( !g_done##service##method.Wait(5000) ) {                        \
      LOG_FATAL << "Timeout waiting for " #service                      \
          "." #method " async result";                                  \
    }                                                                   \
    if ( !g_success##service##method ) {                                \
      LOG_FATAL << "An error happened while executing " #service "."    \
          #method " async: " << g_error##service##method;               \
    }                                                                   \
    CHECK(g_ret##service##method == expectedReturn);                    \
    LOG_TEST << "SUCCESS Async " #service "." #method ;                 \
  }

#define ASYNC_TEST_MEMBER_CALLBACK(service, method, expectedReturn, args...) { \
    rc##service.done##method##_.Reset();                                \
    w##service.method(NewCallback(&rc##service,                         \
            &AsyncResultCollector##service::AsyncRet##method), ##args); \
    if ( !rc##service.done##method##_.Wait(5000) ) {                    \
      LOG_FATAL << "Timeout waiting for " #service                      \
          "." #method " async result";                                  \
    }                                                                   \
    if ( !rc##service.success##method##_ ) {                            \
      LOG_FATAL << "An error happened while executing " #service        \
          "." #method " async: " << rc##service.error##method##_;       \
    }                                                                   \
    CHECK(rc##service.ret##method##_ ==  expectedReturn);               \
    LOG_TEST << "SUCCESS Async " #service "." #method ;                 \
  }

  // Test Mitica Async
  //
  LOG_TEST << "############## BEGIN Mitica ASYNC TESTS ##############";
  {
    // wrapper name must be: w<service>
    ServiceWrapperMitica wMitica(rpcConnection, "mitica");

    Person person;
    person.name_ = string("Ionescu");
    person.height_ = double(1.76);
    person.age_ = int32(123);
    person.married_ = bool(true);

    Person mother;
    mother.name_ = string("MotherA");
    mother.height_ = double(1.68);
    mother.age_ = int32(103);
    mother.married_ = bool(true);
    Person father;
    father.name_.set(string("FatherB"));
    father.height_.set(double(1.69));
    father.age_.set(int32(107));
    father.married_.set(bool(false));
    vector<Person> children(2);
    children[0] = mother;
    children[1] = father;
    Family family;
    family.mother_ = mother;
    family.father_ = father;
    family.children_ = children;

    // by global result callbacks
    ASYNC_TEST_GLOBAL_CALLBACK(Mitica, Initialize, bool(true),
                               string("adresa lu' mitica"), int32(7));
    ASYNC_TEST_GLOBAL_CALLBACK(Mitica, Finish, rpc::Void());
    ASYNC_TEST_GLOBAL_CALLBACK(Mitica, Initialize, bool(true),
                               string("adresa lu' mitica"), int32(7));
    ASYNC_TEST_GLOBAL_CALLBACK(
        Mitica, TestMe, int32(15), int32(13),
        double(2.718282),
        string("Prepelita ciripeste pe o creanga subreda."));
    ASYNC_TEST_GLOBAL_CALLBACK(
        Mitica, TestMe, int32(12),
        int32(10), double(2.718282),
        string("Prepelita ciripeste pe o creanga subreda."));
    ASYNC_TEST_GLOBAL_CALLBACK(
        Mitica, Foo, string("adresa lu' mitica"),
        false);   // should return the address from Initialize
    ASYNC_TEST_GLOBAL_CALLBACK(Mitica, SetPerson, rpc::Void(), person);
    ASYNC_TEST_GLOBAL_CALLBACK(Mitica, SetPerson, rpc::Void(), person);  // x2
    ASYNC_TEST_GLOBAL_CALLBACK(Mitica, GetPerson, person);
    ASYNC_TEST_GLOBAL_CALLBACK(Mitica, GetPerson, person);   // again
    ASYNC_TEST_GLOBAL_CALLBACK(Mitica, SetFamily,
                               family, mother, father, children);
    ASYNC_TEST_GLOBAL_CALLBACK(Mitica, SetFamily,
                               family, mother, father, children);   // again
    ASYNC_TEST_GLOBAL_CALLBACK(Mitica, Finish, rpc::Void());

    // by results collector callbacks
    AsyncResultCollectorMitica rcMitica;
    // results collector's name must be: rc<service>
    ASYNC_TEST_MEMBER_CALLBACK(Mitica, Initialize,
                               bool(true),
                               string("adresa lu' mitica"), int32(7));
    ASYNC_TEST_MEMBER_CALLBACK(Mitica, Finish, rpc::Void());
    ASYNC_TEST_MEMBER_CALLBACK(Mitica, Initialize,
                               bool(true),
                               string("adresa lu' mitica"), int32(7));
    ASYNC_TEST_MEMBER_CALLBACK(
        Mitica, TestMe,
        int32(15), int32(13), double(2.718282),
        string("Prepelita ciripeste pe o creanga subreda."));
    ASYNC_TEST_MEMBER_CALLBACK(
        Mitica, TestMe, int32(12), int32(10), double(2.718282),
        string("Prepelita ciripeste pe o creanga subreda."));
    ASYNC_TEST_MEMBER_CALLBACK(
        Mitica, Foo, string("adresa lu' mitica"),
        true);   // should return the address from Initialize
    ASYNC_TEST_MEMBER_CALLBACK(Mitica, SetPerson, rpc::Void(), person);
    ASYNC_TEST_MEMBER_CALLBACK(Mitica, SetPerson, rpc::Void(), person);  // x2
    ASYNC_TEST_MEMBER_CALLBACK(Mitica, GetPerson, person);
    ASYNC_TEST_MEMBER_CALLBACK(Mitica, GetPerson, person);   // again
    ASYNC_TEST_MEMBER_CALLBACK(Mitica, SetFamily,
                               family, mother, father, children);
    ASYNC_TEST_MEMBER_CALLBACK(Mitica, SetFamily,
                               family, mother, father, children); // again
    ASYNC_TEST_MEMBER_CALLBACK(Mitica, Finish, rpc::Void());
  }

  // Test Tribes Async
  LOG_TEST << "############## BEGIN Tribe ASYNC TESTS ##############";
  {
    Tribe nullTribe;
    nullTribe.name_ = string("");
    nullTribe.people_.ref();

    Villager nullVillager;
    nullVillager.ID_ = int64(0);
    nullVillager.name_ = string("");

    vector<Villager> nullPeople;

    Villager aVillager0;
    aVillager0.ID_ = int64(123);
    aVillager0.name_ = string("a person 123");

    Villager aVillager1;
    aVillager1.ID_ = int64(321);
    aVillager1.name_ = string("a person 321");
    aVillager1.height_ = double(1.7);
    aVillager1.parentID_ = aVillager0.ID_;

    Villager aVillager2;
    aVillager2.ID_ = int64(456);
    aVillager2.name_ = string("a person 456");
    aVillager2.height_ = double(1.9);
    aVillager2.childrenIDs_.ref().push_back(aVillager0.ID_);
    aVillager2.childrenIDs_.ref().push_back(aVillager1.ID_);

    Tribe aTribe;
    aTribe.name_ = string("tribe a");
    map<int64, Villager> & aPeopleMap = aTribe.people_.ref();
    aPeopleMap[aVillager0.ID_.get()] = aVillager0;
    aPeopleMap[aVillager1.ID_.get()] = aVillager1;
    aPeopleMap[aVillager2.ID_.get()] = aVillager2;

    vector<Villager> aPeopleArray(3);
    aPeopleArray[0] = aVillager0;
    aPeopleArray[1] = aVillager1;
    aPeopleArray[2] = aVillager2;

    Tribe saTribe = aTribe;
    saTribe.name_ = string("tribe second a");

    Tribe bTribe;
    bTribe.name_ = string("tribe b");
    bTribe.people_.ref();

    Tribe sbTribe = bTribe;
    sbTribe.name_ = string("tribe second b");

    // create tribe 'c'
    Villager & cVillager0 = aVillager2;
    Tribe cTribe;
    cTribe.name_ = string("tribe c");
    cTribe.people_.ref()[cVillager0.ID_.get()] = cVillager0;
    vector<Villager> cPeopleArray(1);
    cPeopleArray[0] = cVillager0;

    ///////////////////////////////////////////////
    // by global result callbacks
    //
    ServiceWrapperGlobal wGlobal(rpcConnection, "global");

    ASYNC_TEST_GLOBAL_CALLBACK(
        Global, Clear, rpc::Void());   // always start with a clean world
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeByPosition,
                               nullTribe, int32(1),  int32(3));
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeByPosition,
                               nullTribe, int32(-1), int32(-3));

    // Add tribe "a"
    ASYNC_TEST_GLOBAL_CALLBACK(
        Global, AddTribe, bool(true ), aTribe, int32(1), int32(3));
    ASYNC_TEST_GLOBAL_CALLBACK(
        Global, AddTribe, bool(false), aTribe, int32(1), int32(3));

    // Verify tribe 'a' exists
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeByPosition,
                               aTribe, int32(1), int32(3));
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeByPosition,
                               nullTribe,  int32(1),  int32(2));
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeByPosition,
                               aTribe, int32(1), int32(3));

    // Verify tribe 'a' persons
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeVillager, nullVillager,
                               string("tribe aa"), aVillager0.ID_.get());
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeVillager, nullVillager,
                               string("tribe a"), int64(-2));
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeVillager, aVillager0,
                               string("tribe a"), aVillager0.ID_.get());
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeVillager, aVillager1,
                               string("tribe a"), aVillager1.ID_.get());
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeVillager, aVillager2,
                               string("tribe a"), aVillager2.ID_.get());

    // Create a duplicate 'a' tribe.
    ASYNC_TEST_GLOBAL_CALLBACK(Global, CreateTribe, nullTribe,
                               string("tribe new a"),
                               nullPeople, int32(1),
                               int32(3));   // position already taken
    ASYNC_TEST_GLOBAL_CALLBACK(Global, CreateTribe, nullTribe,
                               string("tribe a"), nullPeople, int32(1),
                               int32(2));   // name already taken
    ASYNC_TEST_GLOBAL_CALLBACK(Global, CreateTribe, saTribe,
                               string("tribe second a"), aPeopleArray,
                               int32(1), int32(2));   // success

    // Verify tribe 'second a' persons
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeVillager, nullVillager,
                               string("tribe second aa"),
                               aVillager0.ID_.get());
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeVillager, nullVillager,
                               string("tribe second a"), int64(-2));
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeVillager,
                               aVillager0,
                               string("tribe second a"),
                               aVillager0.ID_.get());
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeVillager, aVillager1,
                               string("tribe second a"),
                               aVillager1.ID_.get());
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeVillager, aVillager2,
                               string("tribe second a"),
                               aVillager2.ID_.get());

    // Add tribe "b"
    ASYNC_TEST_GLOBAL_CALLBACK(Global, AddTribe, bool(true ),
                               bTribe, int32(-2), int32(-5));
    ASYNC_TEST_GLOBAL_CALLBACK(Global, AddTribe, bool(false),
                               bTribe, int32(-2), int32(-5));

    // Verify tribe 'b' exists
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeByPosition,
                               bTribe, int32(-2), int32(-5));
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeByPosition,
                               nullTribe,  int32(-2),  int32(-2));
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeByPosition,
                               bTribe, int32(-2), int32(-5));

    // Create a duplicate 'b' tribe.
    ASYNC_TEST_GLOBAL_CALLBACK(Global, CreateTribe,
                               nullTribe, string("tribe new b"),
                               nullPeople, int32(-2),
                               int32(-5));   // position already taken
    ASYNC_TEST_GLOBAL_CALLBACK(Global, CreateTribe,
                               nullTribe, string("tribe b"), nullPeople,
                               int32(-2),
                               int32(-3));   // name already taken
    ASYNC_TEST_GLOBAL_CALLBACK(Global, CreateTribe, sbTribe,
                               string("tribe second b"), nullPeople,
                               int32(-2), int32(-3));   // success

    // set head of tribe 'a'
    ASYNC_TEST_GLOBAL_CALLBACK(Global, SetTribeHead, int64(-1),
                               string("tribe aa"), aVillager0.ID_.get());
    ASYNC_TEST_GLOBAL_CALLBACK(Global, SetTribeHead, int64(-1),
                               string("tribe a"), int64(-1));
    ASYNC_TEST_GLOBAL_CALLBACK(Global, SetTribeHead, int64(0),
                               string("tribe a"), aVillager0.ID_.get());
    ASYNC_TEST_GLOBAL_CALLBACK(Global, SetTribeHead, aVillager0.ID_.ref(),
                               string("tribe a"), aVillager1.ID_.get());

    // Verify tribe 'a' correctness
    aTribe.head_id_ = aVillager1.ID_;
    // !!! set it also local. Don't forget to roll back!
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeByPosition, aTribe,
                               int32(1), int32(3));
    aTribe.head_id_ = 0;   // roll back

    // create tribe 'c'
    ASYNC_TEST_GLOBAL_CALLBACK(Global, CreateTribe, nullTribe,
                               string("tribe a"), cPeopleArray,
                               int32(3), int32(3));
    ASYNC_TEST_GLOBAL_CALLBACK(Global, CreateTribe, nullTribe,
                               string("tribe second b"), cPeopleArray,
                               int32(3), int32(3));
    ASYNC_TEST_GLOBAL_CALLBACK(Global, CreateTribe, cTribe, cTribe.name_.get(),
                               cPeopleArray, int32(3), int32(3));

    // set tribe 'c' head
    ASYNC_TEST_GLOBAL_CALLBACK(Global, SetTribeHead, int64(-1),
                               string("tribe cc"), cVillager0.ID_.get());
    ASYNC_TEST_GLOBAL_CALLBACK(Global, SetTribeHead, int64(-1),
                               string("tribe c"), int64(-1));
    ASYNC_TEST_GLOBAL_CALLBACK(Global, SetTribeHead, int64(0),
                               string("tribe c"), cVillager0.ID_.get());
    ASYNC_TEST_GLOBAL_CALLBACK(Global, SetTribeHead, cVillager0.ID_.ref(),
                               string("tribe c"), cVillager0.ID_.get());

    // Verify tribe 'c' correctness
    cTribe.head_id_ = cVillager0.ID_;
    // !!! set it also local. Don't forget to roll back!
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeByPosition, cTribe,
                               int32(3), int32(3));
    ASYNC_TEST_GLOBAL_CALLBACK(Global, GetTribeVillager, cVillager0,
                               string("tribe c"), cVillager0.ID_.get());
    cTribe.head_id_.reset();   // roll back

    ///////////////////////////////////////////////
    // by member callback results
    //
    AsyncResultCollectorGlobal rcGlobal;
    ASYNC_TEST_MEMBER_CALLBACK(Global, Clear, rpc::Void());
    // always start with a clean world
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeByPosition,
                               nullTribe, int32(1),  int32(3));
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeByPosition,
                               nullTribe, int32(-1), int32(-3));

    // Add tribe "a"
    ASYNC_TEST_MEMBER_CALLBACK(Global, AddTribe, bool(true ),
                               aTribe, int32(1), int32(3));
    ASYNC_TEST_MEMBER_CALLBACK(Global, AddTribe, bool(false),
                               aTribe, int32(1), int32(3));

    // Verify tribe 'a' exists
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeByPosition,
                               aTribe, int32(1), int32(3));
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeByPosition,
                               nullTribe,  int32(1),  int32(2));
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeByPosition,
                               aTribe, int32(1), int32(3));

    // Verify tribe 'a' persons
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeVillager, nullVillager,
                               string("tribe aa"), aVillager0.ID_.get());
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeVillager, nullVillager,
                               string("tribe a"), int64(-2));
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeVillager, aVillager0,
                               string("tribe a"), aVillager0.ID_.get());
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeVillager, aVillager1,
                               string("tribe a"), aVillager1.ID_.get());
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeVillager, aVillager2,
                               string("tribe a"), aVillager2.ID_.get());

    // Create a duplicate 'a' tribe.
    ASYNC_TEST_MEMBER_CALLBACK(Global, CreateTribe, nullTribe,
                               string("tribe new a"), nullPeople,
                               int32(1),
                               int32(3));   // position already taken
    ASYNC_TEST_MEMBER_CALLBACK(Global, CreateTribe, nullTribe,
                               string("tribe a"), nullPeople,
                               int32(1),
                               int32(2));   // name already taken
    ASYNC_TEST_MEMBER_CALLBACK(Global, CreateTribe, saTribe,
                               string("tribe second a"),
                               aPeopleArray,
                               int32(1),
                               int32(2));   // success

    // Verify tribe 'second a' persons
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeVillager, nullVillager,
                               string("tribe second aa"),
                               aVillager0.ID_.get());
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeVillager, nullVillager,
                               string("tribe second a"),
                               int64(-2));
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeVillager, aVillager0,
                               string("tribe second a"),
                               aVillager0.ID_.get());
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeVillager, aVillager1,
                               string("tribe second a"),
                               aVillager1.ID_.get());
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeVillager, aVillager2,
                               string("tribe second a"),
                               aVillager2.ID_.get());

    // Add tribe "b"
    ASYNC_TEST_MEMBER_CALLBACK(Global, AddTribe, bool(true ),
                               bTribe, int32(-2), int32(-5));
    ASYNC_TEST_MEMBER_CALLBACK(Global, AddTribe, bool(false),
                               bTribe, int32(-2), int32(-5));

    // Verify tribe 'b' exists
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeByPosition, bTribe,
                               int32(-2), int32(-5));
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeByPosition, nullTribe,
                               int32(-2),  int32(-2));
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeByPosition, bTribe,
                               int32(-2), int32(-5));

    // Create a duplicate 'b' tribe.
    ASYNC_TEST_MEMBER_CALLBACK(Global, CreateTribe, nullTribe,
                               string("tribe new b"), nullPeople,
                               int32(-2),
                               int32(-5));   // position already taken
    ASYNC_TEST_MEMBER_CALLBACK(Global, CreateTribe, nullTribe,
                               string("tribe b"), nullPeople,
                               int32(-2),
                               int32(-3));   // name already taken
    ASYNC_TEST_MEMBER_CALLBACK(Global, CreateTribe, sbTribe,
                               string("tribe second b"),
                               nullPeople,
                               int32(-2),
                               int32(-3));   // success

    // set head of tribe 'a'
    ASYNC_TEST_MEMBER_CALLBACK(Global, SetTribeHead, int64(-1),
                               string("tribe aa"), aVillager0.ID_.get());
    ASYNC_TEST_MEMBER_CALLBACK(Global, SetTribeHead, int64(-1),
                               string("tribe a"), int64(-1));
    ASYNC_TEST_MEMBER_CALLBACK(Global, SetTribeHead, int64(0),
                               string("tribe a"), aVillager0.ID_.get());
    ASYNC_TEST_MEMBER_CALLBACK(Global, SetTribeHead, aVillager0.ID_.ref(),
                               string("tribe a"), aVillager1.ID_.get());

    // Verify tribe 'a' correctness
    aTribe.head_id_ = aVillager1.ID_;
    // !!! set it also local. Don't forget to roll back!
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeByPosition, aTribe,
                               int32(1), int32(3));
    aTribe.head_id_ = 0;   // roll back

    // create tribe 'c'
    ASYNC_TEST_MEMBER_CALLBACK(Global, CreateTribe, nullTribe,
                               string("tribe a"), cPeopleArray,
                               int32(3), int32(3));
    ASYNC_TEST_MEMBER_CALLBACK(Global, CreateTribe, nullTribe,
                               string("tribe second b"), cPeopleArray,
                               int32(3), int32(3));
    ASYNC_TEST_MEMBER_CALLBACK(Global, CreateTribe, cTribe,
                               cTribe.name_.get(), cPeopleArray,
                               int32(3), int32(3));

    // set tribe 'c' head
    ASYNC_TEST_MEMBER_CALLBACK(Global, SetTribeHead, int64(-1),
                               string("tribe cc"), cVillager0.ID_.get());
    ASYNC_TEST_MEMBER_CALLBACK(Global, SetTribeHead, int64(-1),
                               string("tribe c"), int64(-1));
    ASYNC_TEST_MEMBER_CALLBACK(Global, SetTribeHead, int64(0),
                               string("tribe c"), cVillager0.ID_.get());
    ASYNC_TEST_MEMBER_CALLBACK(Global, SetTribeHead, cVillager0.ID_.ref(),
                               string("tribe c"), cVillager0.ID_.get());

    // Verify tribe 'c' correctness
    cTribe.head_id_ = cVillager0.ID_;
    // !!! set it also local. Don't forget to roll back!
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeByPosition, cTribe,
                               int32(3), int32(3));
    ASYNC_TEST_MEMBER_CALLBACK(Global, GetTribeVillager, cVillager0,
                               string("tribe c"), cVillager0.ID_.get());
    cTribe.head_id_.reset();   // roll back
  }
}


text:
Q: Magento change attribute inside order product row I want to change the default SKU attribute (product number) inside the orderview, at the items block, to a custom attribute.
See:

Currently by default the SKU is displayed, I want to change this into the DPN (my custom created attribute).
The attribute code for this is: dpn.
How can I achieve that?
I edit the file:
/app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Default.php
From default code:
public function getSku()
{
    /*if ($this->getItem()->getProductType() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE) {
        return $this->getItem()->getProductOptionByCode('simple_sku');
    }*/
    return $this->getItem()->getSku();
}

To:
public function getSku()
{
    /*if ($this->getItem()->getProductType() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE) {
        return $this->getItem()->getProductOptionByCode('simple_sku');
    }*/
    return $this->getItem()->getDpn();
}

But that does not work. When I change the value to return $this->getItem()->getProductId(); Then I get the Product Id, so that does work.
How can I get the data from the attribute?

A: Order item (sales/order_item) is not the same object as Product (catalog/product). Instead, order item is more like a snapshot of a product when order was created.
This allows order items to be accessible (from customer order history page or admin panel) and unchanged even after their related product has been deleted or changed.
Magento, first creates Quote item (sales/quote_item) by 'snapshotting' product added to cart. Eventually Quote item gets converted to Order item.
In order to complete your task, you need to create new Quote item attribute, and convert the attribute to Order item (optionally, you can further convert it to sales/invoice_item and sales/creditmemo_item).
To convert attribute form Quote item to Order item, read about Magento <fieldset> config element.
Alternative, less optimal, solution: You can use your order item to fetch product and use product's attribute value on order view page:
public function getSku()
{
   return $this->getItem()->getProduct()->getDpn();
}

Keep in mind that if you change attribute value for your product, value will be change on all order view pages as well.