text:
https://www.middletownpress.com/news/article/Movie-reviews-Toy-Story-3-and-others-out-in-11867345.php
Movie reviews: 'Toy Story 3' and others out in theaters
Published 12:00 am EDT, Monday, June 21, 2010
In this film publicity image released by Disney, from left, Jessie, voiced by Joan Cusack, Buzz Lightyear, voiced by Tim Allen and Woody, voiced by Tom Hanks are shown in a scene from "Toy Story 3." (AP) less
In this film publicity image released by Disney, from left, Jessie, voiced by Joan Cusack, Buzz Lightyear, voiced by Tim Allen and Woody, voiced by Tom Hanks are shown in a scene from "Toy Story 3." ... more
(AP) -- Capsule reviews of films opening this week:
"Toy Story 3" -- This is what happens when you're good at your job: Everyone expects excellence from you, and anything even slightly short of that feels like a letdown. "Toy Story 3" is a gorgeous film -- funny, sweet and clever in the tradition of the best Pixar movies -- but because it comes from that studio's nearly flawless tradition, including two "Toy Story" predecessors, the expectations naturally are inflated. The storytelling in no way is in question; it never is at Pixar, which is the fundamental reason their films are so strong. Neither is the voice cast, led once again by Tom Hanks, Tim Allen and Joan Cusack, with formidable newcomers like Ned Beatty thrown into the mix. The details are as vibrant and tactile as ever: the textures and expressions, the use of light, angles and perspective. And the core concept -- that toys have a rich, complex interior life when people aren't around -- still resonates all these years later. If "Toy Story" hadn't come out in 1995 and "Toy Story 2" hadn't followed it in 1999, "Toy Story 3" would stand on its own as a breakthrough. Trouble is, those earlier movies do exist. And by comparison, this third installment -- in which Andy heads off to college and the toys end up in day care -- doesn't feel quite so fresh. Then, of course, there is the 3-D -- the unfortunate trend of the summer. It's not intrusive, but it's also completely unnecessary. G. In 3-D and IMAX 3-D. 98 min. Three stars out of four.
-- Christy Lemire, AP Movie Critic
"Cyrus" -- A romantic charmer that works in spite of -- and maybe a bit because of -- two physical mismatches that audiences are asked to accept in this story of a suitor battling his new girlfriend's needy son, who wants mom all to himself. One: That petite knockout Marisa Tomei and pug-faced hulk John C. Reilly could tumble into near love at first sight. Two: That petite knockout Tomei and baby-faced hulk Jonah Hill could be mother and son. Reilly and Tomei make their asymmetry work, quickly becoming one of those beauty-and-the-beast couples that make people remark, "They look so cute together!" The movie gets kind of creepy when Tomei and Hill cuddle and tickle each other. Yet that's where some of the best laughs come from -- once you get over the ick factor of a 40-something mom getting so physical with her grown son. Sibling writer-directors Jay and Mark Duplass have a knack for wringing laughs out of uncomfortable moments, and the film is steeped in this sort of cringe-and-wince humor. There's a real sweetness to it at the same time, and the Duplass brothers do a great job balancing that soft side with the nastier edges underlying their story. R for language and some sexual material. 92 min. Three stars out of four.
-- David Germain, AP Movie Writer
"The Killer Inside Me" -- Here's the conundrum with this film: It's well-made, yet difficult to recommend. It looks great, a mix of parched West Texas vistas and lush interiors, yet portions of it are impossible to watch without wincing. The performances are consistently strong, though, especially from star Casey Affleck as a small-town deputy sheriff in the early 1950s whose polite demeanor and boyish features belie a savage homicidal streak. Director Michael Winterbottom also gets typically compelling work from Ned Beatty and Elias Koteas in small but crucial supporting roles. But regardless of any other elements, there are a couple of scenes here that will have everyone talking, and will divide viewers' opinions of the entire movie. Based on the pulp fiction novel by Jim Thompson, "The Killer Inside Me" tracks the steady unraveling of a sociopath, one hidden among the people we trust to be the good guys. Affleck's Lou Ford comes from an established family in Central City, and he has a lovely girlfriend in Amy Stanton (Kate Hudson), who's pressuring him to get married. Then one day, the sheriff (Tom Bower) sends him out to talk with Joyce Lakeland (Jessica Alba), a prostitute who's ensnared the son (Jay R. Ferguson) of Chester Conway (Beatty), the town's power broker. His purpose is to run her out of town. But a couple of slaps from Joyce during their confrontation unleash pent-up aggressions and desires within Lou. R for disturbing brutal violence, aberrant sexual content and some graphic nudity. 108 min. Two stars out of four.
"8: The Mormon Proposition"-- Gay marriage -- and California's Proposition 8, the 2008 ballot measure that stated only marriage between a man and a woman would be valid and recognized -- are topics fraught with passionate debate on both sides. Which is why this documentary makes you wish it had been made by filmmakers with more creative, artful inclinations. Or at least more focus. Director and writer Reed Cowan and co-director Steven Greenstreet depict the campaign to pass this measure -- and the influential Mormon church as a massive driving force behind it -- in a surprisingly dry, straightforward way. Talking heads and snippets of revealing documents are broken up with rather literal, cheesy imagery. The stories from real people give the film emotional heft and make it somewhat worthwhile -- people like Tyler Barrick and Spencer Jones, former Mormons who tearfully describe how most members of their families have ostracized them for being gay. They married each other in San Francisco in June 2008, only to have Prop 8 place the legality of that union in limbo a few months later. Ultimately, "8" becomes an entirely different movie -- a far more compelling one -- when it shifts gears and focuses on the high suicide rate among gay teens in Utah. R for some language/sexual references. 78 min. Two stars out of four.
"Jonah Hex" -- This comic-book adaptation is so short, and so bad, you cringe at the thought of how awful whatever ended up on the cutting-room floor must be. Take away the eight minutes of end-credits, a prologue sequence built around comic-book panels and some repetitive flashbacks of action we've already seen, and there's barely an hour's worth of actual movie. And that's using the term "actual movie" generously. Josh Brolin has the title role as a Civil War vet turned bounty hunter, bent on vengeance against the villain (John Malkovich) who disfigured his face and killed his family. Jonah's tragedies somehow leave him able to interrogate the dead, a handy tool as he tracks Malkovich through a lame plot to destroy America with a doomsday weapon. Brolin tries to bring gravity to the role, but Malkovich just seems bored and Megan Fox adds to her robotic resume as Jonah's prostitute and romantic interest. Director Jimmy Hayward presents action that feels choppy and unfinished, at least partly the effect of cutting out explicit violence to secure a more audience-friendly rating. PG-13 for intense sequences of violence and action, disturbing images and sexual content. 82 min. One and a half stars out of four.


Alpecin is expanding its reach in Asia.
DKSH, which was recently appointed by Edgewell Personal Care to provide marketing, sales, distribution and logistics services for its personal care products across Malaysia and Singapore, has introduced Dr. Wolff Group's hair care brand Alpecin in China.
The brand is already a hair loss shampoo leader in Germany, Switzerland, Austria, Great Britain, Romania and Hong Kong, and has been introduced in Malaysia, Singapore, Taiwan and Thailand.
"The business performance of our brand in the Asian market has been tremendously successful"
The first three products introduced will be sold exclusively at Watsons. DKSH Business Unit Healthcare will provide registration, importation, sales, distribution, logistics and collection services for Dr. Wolff's products in China.
"It is our honor to work with Dr. Wolff and expand our collaboration to China," said Teresa Chen, regional vice president, business unit healthcare, DKSH China, Hong Kong, Korea and Taiwan. "We have a proven track record for successfully helping our clients to grow beyond traditional healthcare channels, leverage the growing potential of retail channels and expanding their market shares across Asian markets. With our in-depth understanding of the local consumer markets and broad capabilities, we will help Alpecin expand in the way that best fits the local shopping behavior and retail environment."


76.2% of buyers enjoyed this product!
Excellent, everything corresponds to the description!
The tips of the tweezers are not as sharp as in the photo. And by itself cheers, but for this money it is difficult to want better.
A good tweezers for such money, for rhinestones, and, maybe, smoothing sliders. There is a small marriage (the photo should be seen as slightly bent in the hook right part of the tweezers), but, i think, you can straighten a small curvature with pliers.
No not som spokojný. But nemohol som čakať zázraky for tú cenu.


Versatile yet beautiful, Kate Aspen's Indian Jewel Gold Wire Favor Basket with Jewel Details features a touch of gold and embellished rhinestone details in purple and pink, but what's even better than how beautiful these Indian wedding favors are is what they can hold - just about anything! From candies and treats to household items, your guests will appreciate the sweet gesture.
Gold wire basket with scalloped edge and braided wire handle; sides of the basket are embellished with purple and pink rhinestones.
Wire basket measures 2.6" w x 1.75" h x 2.6" d (4" h with handle).


text:
STATE CAPITOL, PHOENIX – Rep. Albert Hale, D-St. Michaels (District 7), and Troy Eid, former chairman of the Indian Law and Order Commission, recently called on United States Attorney General Loretta E. Lynch to investigate the death of a Navajo woman, who was allegedly shot while being taken into police custody in March.
"This is an active investigation," Hale said. "I want to thank the Native American leaders who have united in calling for further investigation into this tragedy."
According to reports, 27-year-old Loreal Tsingine was allegedly shot five times by a police officer as she was being taken into custody. In a letter to Lynch, Hale and Eid wrote:
"As members of the Navajo Nation Bar Association who have worked extensively in and around Winslow and surrounding areas, we can attest to persistent reports by local citizens – ranging from young people to the elderly – of unlawful police stops, use of excessive force, and other coercive activities by the Winslow Police Department which may constitute a pattern or practice of discrimination prohibited by federal law. Because there is no private right of action to vindicate these citizens' federal civil rights through individual lawsuits, only the U.S. Department of Justice may enforce this law and put an end to alleged systemic police misconduct."
"Only the U.S. Department of Justice has the statutory authority to enforce federal civil rights protections for Navajo and other Native American citizens when local police departments may be engaging in systematic discrimination," said Eid, the former United States Attorney in Colorado appointed by President George W. Bush. "A Justice Department investigation can help strengthen law enforcement by addressing persistent reports of official police bias against Native Americans in Winslow that are undermining the public confidence of all Arizonans."
A copy of the letter is below.
Rep. Hale is an enrolled member of the Navajo Nation. He was born in Ganado and raised in Klagetoh, Arizona. He is Ashiihi (Salt), born for Todichiini (Bitter Water). His maternal grandparents are Hanaghani (Walk About clan). His paternal grandparents are Kiyanii (Tall House clan). He is a 1969 graduate of Fort Wingate High School, a Bureau of Indian Affairs boarding school located east of Gallup, New Mexico. He holds a Bachelor of Science degree from Arizona State University, Tempe, Arizona (1973), and a Juris Doctor degree from the University of New Mexico School of Law, Albuquerque, New Mexico (1977), and an honorary Juris Doctor degree from Phoenix School of Law (2012). He is the former President of the Navajo Nation.
Labels: Arizona-Native American leaders call for U.S. Attorney General's office to investigate shooting death of Navajo woman

redpajama_set_name: RedPajamaCommonCrawl


On my bucket list: Mt. Whitney!
My Lowa low hikers have taken me on countless hikes over the past 10 years. I favored these light boots because I rarely, if ever, got blisters.
Most recently I hiked up Mt. Whitney from Whitney Portal. This had been on my bucket list for some time. Apparently, it was on my Lowa's bucket list, as well.
The soles began to rapidly separate from the shoes about 3 miles from the top. Of course, duct tape was the only option.
I was able to continue to the top and hike all the way back down to the portal (14 more miles with duct tape).
My feet never got wet from any of the half dozen stream crossings and I did not get one blister. RIP sweet Lowas!


Shop with us today and ensure you get the best gear possible!
Make sure that your equipment can stand up to the toughest workdays you ever have.
Outfit yourself with all the supplies you need, and find something durable to carry them in!
When it comes to military grade equipment or survival gear, make us your one-stop shop.
Don't settle when you choose gear! Get out there with our finest selection of active outdoor clothing.
Gear Up and Get Out There is a store that offers gear and clothing for all outdoor activities—from hiking to industrial labor, military surplus, and more. Reimagined as the one-stop shop for all outdoor activities in Casper, WY, we've been helping locals and travelers alike find what they need since 2009.
Find a wide range of gear and apparel for men and women of all ages. We carry everything from active outdoor wear, workwear, accessories, to survival and tactical gear, and everything in between!
Come see us at Gear Up and Get Out There today. You're never treated as just another customer, but as a valued person when you walk through our doors. Call today at 307-235-6353 with any questions you have. We'll be glad to answer them!


text:
The Mission – Destroy Brest!
D-Day 300 years before it happened. Camaret Bay was an exptremely ambitious plan
The raid was a large scale affair for an action of its type. It was months in the planning with the objective of wreaking havoc on a key strategic anchorage for the French fleet at the port of Brest in western Brittany. Naval bombardments of French ports had been undertaken before, one such being that prosecuted against St Malo shortly before the Camaret expedition. The difference with Brest was that the English planned to put around 8,000 infantry ashore and gain a foothold in order to do some real damage. Tollemache would lead the army attack which was to be transported by Admiral Charles, Lord Berkeley. The fleet was substantial, comprising 38 English and 21 Dutch vessels including fire and hospital ships. Troops began assembling in Plymouth from mid-May 1694.
Former enemies sailed together to support the English landing. 69 English and Dutch ships were involved.
Transportation was delayed through adverse weather and it was only by early June that the armada was off Cape Finisterre. The French fleet under de Tourville had recently sailed south from Brest towards the Portuguese coast and bested a combined English and Dutch fleet off Lagos.
Tollemache's plan was to land at Camaret Bay, a small inlet on the opposite shore to Brest and about seven miles south, overcome the batteries and defences there then march on Brest in order to storm it. To do this he had between twelve and fifteen battalions who would be ferried ashore in large open well-boats built specifically for the job and travelling with the fleet. All of this would be carried out under a bombardment from Berkeley's ships. Parallels with the Normandy Landings cannot have passed readers by!
Having John Cutts on the team was never going to calm things down.
Tollemache was a bold, perhaps rash commander and having Cutts on the team will not have added a cool voice of reason. John Cutts had already been wounded near fatally, three times whilst leading breach assaults in Europe and Ireland. He would go on to be wounded several more times. Berkeley too appears to have been a somewhat gung-ho leader and thus the reflective counterweight to English fire-breathing resided with the Dutch. The senior Dutch officers attached to the enterprise were mostly from the navy and would not necessarily have been favourably perceived by English army officers who believed they were not receiving adequate share of the war spoils since the 1688 coup d'état.
What they didn't know!
In an age of true political and military duplicity the bold trio and their Dutch allies had been betrayed well in advance. King James now resident in exile at St Germaine en laye had friends within the English establishment. News of the plan to raid Brest had reached the French and King Louis despatched none other than the great Vauban himself to strengthen the defences of Brest and assume personal command of the forces in west Brittany. Vauban was and perhaps still is considered history's premier military engineer. His genius remains in evidence all over France and modern Belgium and he is quite possibly peerless in his achievements.
Vauban by Le Brun. A military and engineering colossus.
That the King would have assigned he of all people to stymie the enemy's attempts speaks volumes. This battle turned out to be Vauban's only field command during his entire career and he discharged his duties flawlessly.
Vauban strengthened the already formidable castle at Brest, the forts around Camaret and the larger bay in which Brest nestles. He built numerous redoubts and emplacements, constructed trench works behind the beaches and created what could fairly be described as a 17th century Atlantic Wall with one distinct difference - this one worked. The area had over 300 cannon and 90 mortars with converging lines of fire, hidden batteries invisible from the open sea and even from the mouth of the bay itself. It is thought that eight large floating mortar platforms covered the fleet anchorage making the concentration of firepower formidable.
This was built for the GNW but I am sure you get the idea!
I am sure many of you are ahead of me and musing 'that is a lot of prep and would have taken quite some time and effort to complete'. Which begs the question; How far in advance did the French know and who might have tipped them off?
Even I wouldn't want to believe he dobbed in his own team.
Smoking pistol?
Much to the discomfort of Churchill fans everywhere, the most commonly accepted smoking flintlock appears to be in the right hand of John, Earl of Marlborough. He had maintained a correspondence with King James his estranged mentor pretty much throughout the turbulent period since William's arrival in England. A letter exists revealing the plan for the raid written by Marlborough and sent to his old friend. Great men such as Winston Churchill have set out to disprove the betrayal and recently such eminent minds as the late Richard Holmes and David Chandler have contributed to the debate.
Advanced warning of the attack allowed the French time to prepare.
What is interesting is that Holmes and Chandler neither of them reticent about expressing an opinion are somewhat equivocal on the subject of whether he did or he didn't. Why would he? Betraying his own side and being in some way culpable for the death of upwards of 1,500 English soldiers and sailors seems unthinkable even for a political operator of Churchill's calibre. If he did, the reasons may be very human indeed. The first is self-preservation in that he was hedging his bets with James and the French. The Allies had recently experienced bloody defeat at Steenkirke and Neerwinden and the outcome of the whole 1688 adventure may have been in doubt.
Dominance in Flanders had imbued the French with confidence.
Anti-Jacobite purges in the English army continued well into 1696 so fragility of the Williamite position may have driven Churchill the survivor to keep all personal options on the table.
He may simply have been jealous of the advancement in Tollemache's fortunes perceiving them to be at the expense of his own. Marlborough was known to be egotistical, greedy and vain. At a time when truly massive fortunes were being made through military adventurism he may have been smitten by the green eyed monster.
The Battle of La Hogue on May 23rd 1692 had destroyed an invasion fleet destined to return King James to England
Maybe he didn't do it. Great pains have been taken to prove that the letter was written too late to have been the source of the betrayal and that someone else told the French way before Churchill's missive arrived at the Jacobite Court in exile. If this is true, why did he write the letter in the first place? Perhaps as an insurance policy or as an act of conscience. The matter has been obscured by a variety of counter argument and convoluted rationale against yet, the possibility remains that Marlborough was the source of the leak.


text:
Dividends better than 'monuments to CEOs'
Robert GuySenior Writer
Aug 30, 2019 – 6.56pm
Treasurer Josh Frydenberg deserves an A-plus for good intentions following his clarion call for Australian companies to lift their game when it comes to business investment.
Unfortunately, his eyebrow-raising intervention into what has typically been the preserve of the C-suite and boardrooms showcased a Treasurer tone-deaf to the challenges confronting capital allocators and the priorities of the people that own companies - the shareholders.
It's hard to make the case for a capital expenditure splurge when profits are under pressure, there's no pricing power, excess capacity dogs many industries, competition from offshore and digital disruption is intense and growing, and last but not least, there is fragile demand.
It's not surprising then - expect perhaps for the Treasurer - that companies are choosing to husband capital and return it to shareholders via higher dividends and buybacks, and maintaining capital discipline rather than writing novelty-sized cheques.
Investors say capex coyness is a manifestation of the uncertainty that has prevailed since the global financial crisis.
Repeated body blows since, with the Eurozone debt crisis, the US credit rating downgrade, fears about a hard landing in China, and now trade war recession jitters have sapped business sentiment.
"I understand where he's coming from but the reasons for the lack of investment in Australia aren't because shareholders are demanding dividends or the dividend paying culture has come to dominate," says Shane Oliver, AMP Capital's chief economist.
"It reflects a wariness on the part of companies since the GFC and ongoing spare capacity."
Tight grip
And this week's capital expenditure data and forecasts showed companies are likely to keep a tight grip on the purse strings. Businesses estimate they will spend $113 billion this financial year, which will likely result in little growth once the financial year is completed.
Lost amid the heat of the debate sparked by the Treasurer's comments is the reality that the nation's biggest companies are both investing capital and paying dividends or undertaking buybacks.
"Companies can pay dividends and still invest," says Don Hamson, managing director of Plato Investment Management.
"We have no concerns with companies making good investments. The problem is that our research shows that those who invest the most, unfortunately, are often the worst investments to be in because a lot of companies have a tendency to overinvest and waste money".
Financial accounts show executives are doing a pretty good job of balancing the need to invest in their businesses and deliver for shareholders.
Wesfarmers has targeted net capex of between $550 million and $750 million in 2020, up from $363 million and $576 million in 2019 and 2018 respectively. Investors also received a total dividend of $2.78 a share in 2019, compared to $2.23 a share in the prior year.
The mining industry - traditionally a standout destroyer of shareholder value - has found the new religion of capital discipline with the mantra of value over volume. Shareholders are also enjoying dividend rises.
BHP has forecast capex and exploration of "below" $US8 billion in 2020 and $US8 billion ($11.9 billion) in 2021, up slightly from $US7.6 billion in 2019.
It's important to note that net debt is below the miner's target range, and thus it has the firepower to spend more if it wanted.
But it's what the cash is being spent on that's important. For example, the company last year committed $US2.9 billion to the development of its South Flank iron ore mine. The key here is that these new tonnes will just replace those from its Yandi mine and not significantly swell global supply and depress prices.
Fortescue Metals Group also emerged as notable big spender this reporting season. The miner will increase its capex from $US1.04 billion in 2019 to $US2.4 billion. But again, $US700 million will be spent on its Eliwana development that will replace tonnes from its Firetail mine that is at the end of its life.
Top of mind for the Treasurer should be another important destination for spending at the big miners - technology. Big miners are investing in productivity-boosting technology, but innovations like autonomous trucks will cut jobs - a bad outcome for a politician.
But for companies exposed to the sluggish domestic economy, finding opportunities that deliver a return above the cost of capital is difficult when the consumer is under pressure and wages growth is slow.
"In Australia, where we have quite mature companies, what's a marginal investment going to be? If they start breaking out into things where they don't know what they're doing that can cause problems," Dr Hamson says.
That lack of certainty has investors preferring the surety of a dividend rather than burning capital on bad investments or an overpriced acquisition.
"We do have this dividend paying culture and therefore companies give their money back to shareholders if they can't see a use for it, says Dr Oliver.
"I'd much rather that than them building monuments to the CEO and then realising that was a huge mistake".
Expert coverage of Australia's public sector.
Sign up to the Inside Government newsletter.
Robert writes on companies and markets. He is a former New York and Shanghai correspondent, and has worked in Hong Kong. Email Robert at robertguy@afr.com.au
Latest In Economy
Payrolls rebound to pre-crisis levels
Matthew Cranston
Lockdown pain lingers in Sydney's northern beaches
Finbar O'Mallon
Go ahead with Australian Open – and open all borders too
Don't rely on higher house prices for growth, economists warn
John Kehoe and Matthew Cranston
Climate risks unlikely to be priced into government bonds any time soon
Most Viewed In Policy
India ditches protection and takes new ball on Aussie trade partnership
Why are free societies sinking into an anarchic pit of hate?


text:
#include "fennel/common/CommonPreamble.h"
#include "fennel/calculator/SqlString.h"
#include "fennel/calculator/ExtendedInstructionTable.h"

FENNEL_BEGIN_NAMESPACE

void
strCatA2(
    RegisterRef<char*>* result,
    RegisterRef<char*>* str1)
{
    assert(StandardTypeDescriptor::isTextArray(str1->type()));

    // appending to a null results in null
    if (result->isNull() || str1->isNull()) {
        result->toNull();
        result->length(0);
    } else {
        result->length(
            SqlStrCat(
                result->pointer(),
                result->storage(),
                result->length(),
                str1->pointer(),
                str1->stringLength()));
    }
}

void
strCatA3(
    RegisterRef<char*>* result,
    RegisterRef<char*>* str1,
    RegisterRef<char*>* str2)
{
    assert(StandardTypeDescriptor::isTextArray(str1->type()));

    // appending to a null results in null
    if (result->isNull() || str1->isNull() || str2->isNull()) {
        result->toNull();
        result->length(0);
    } else {
        result->length(
            SqlStrCat(
                result->pointer(),
                result->storage(),
                str1->pointer(),
                str1->stringLength(),
                str2->pointer(),
                str2->stringLength()));
    }
}

void
strCmpA(
    RegisterRef<int32_t>* result,
    RegisterRef<char*>* str1,
    RegisterRef<char*>* str2)
{
    assert(StandardTypeDescriptor::isTextArray(str1->type()));

    if (str1->isNull() || str2->isNull()) {
        result->toNull();
    } else {
        result->value(
            SqlStrCmp<1, 1>(
                str1->pointer(), str1->stringLength(),
                str2->pointer(), str2->stringLength()));
    }
}

void
strCmpOct(
    RegisterRef<int32_t>* result,
    RegisterRef<char*>* str1,
    RegisterRef<char*>* str2)
{
    assert(StandardTypeDescriptor::isBinaryArray(str1->type()));

    if (str1->isNull() || str2->isNull()) {
        result->toNull();
    } else {
        result->value(
            SqlStrCmp_Bin(
                str1->pointer(), str1->stringLength(),
                str2->pointer(), str2->stringLength()));
    }
}

void
strCpyA(
    RegisterRef<char*>* result,
    RegisterRef<char*>* str)
{
    assert(result->type() == str->type());
    assert(StandardTypeDescriptor::isTextArray(str->type()));

    // copy to a null results in null
    if (result->isNull() || str->isNull()) {
        result->toNull();
        result->length(0);
    } else {
        if (str->type() == STANDARD_TYPE_CHAR) {
            result->length(
                SqlStrCpy_Fix<1, 1>(
                    result->pointer(),
                    result->storage(),
                    str->pointer(),
                    str->stringLength()));
        } else {
            result->length(
                SqlStrCpy_Var(
                    result->pointer(),
                    result->storage(),
                    str->pointer(),
                    str->stringLength()));
        }
    }
}

void
strLenBitA(
    RegisterRef<int32_t>* result,
    RegisterRef<char*>* str)
{
    assert(StandardTypeDescriptor::isTextArray(str->type()));

    if (str->isNull()) {
        result->toNull();
    } else {
        result->value(SqlStrLenBit(str->stringLength()));
    }
}

void
strLenCharA(
    RegisterRef<int32_t>* result,
    RegisterRef<char*>* str)
{
    assert(StandardTypeDescriptor::isTextArray(str->type()));

    if (str->isNull()) {
        result->toNull();
    } else {
        result->value(
            SqlStrLenChar<1, 1>(
                str->pointer(),
                str->stringLength()));
    }
}

void
strLenOctA(
    RegisterRef<int32_t>* result,
    RegisterRef<char*>* str)
{
    assert(StandardTypeDescriptor::isTextArray(str->type()));

    if (str->isNull()) {
        result->toNull();
    } else {
        result->value(SqlStrLenOct(str->stringLength()));
    }
}

void
strOverlayA4(
    RegisterRef<char*>* result,
    RegisterRef<char*>* str,
    RegisterRef<char*>* overlay,
    RegisterRef<int32_t>* start)
{
    assert(result->type() == STANDARD_TYPE_VARCHAR);
    assert(str->type() == overlay->type());
    assert(StandardTypeDescriptor::isTextArray(str->type()));

    // overlay to a null results in null
    if (result->isNull()
        || str->isNull()
        || overlay->isNull()
        || start->isNull())
    {
        result->toNull();
        result->length(0);
    } else {
        result->length(
            SqlStrOverlay<1, 1>(
                result->pointer(),
                result->storage(),
                str->pointer(),
                str->stringLength(),
                overlay->pointer(),
                overlay->stringLength(),
                start->value(),
                0,
                false));
    }
}

void
strOverlayA5(
    RegisterRef<char*>* result,
    RegisterRef<char*>* str,
    RegisterRef<char*>* overlay,
    RegisterRef<int32_t>* start,
    RegisterRef<int32_t>* len)
{
    assert(result->type() == STANDARD_TYPE_VARCHAR);
    assert(str->type() == overlay->type());
    assert(StandardTypeDescriptor::isTextArray(str->type()));

    // overlay to a null results in null
    if (result->isNull()
        || str->isNull()
        || overlay->isNull()
        || start->isNull()
        || len->isNull())
    {
        result->toNull();
        result->length(0);
    } else {
        result->length(
            SqlStrOverlay<1, 1>(
                result->pointer(),
                result->storage(),
                str->pointer(),
                str->stringLength(),
                overlay->pointer(),
                overlay->stringLength(),
                start->value(),
                len->value(),
                true));
    }
}

void
strPosA(
    RegisterRef<int32_t>* result,
    RegisterRef<char*>* find,
    RegisterRef<char*>* str)
{
    assert(str->type() == find->type());
    assert(StandardTypeDescriptor::isTextArray(str->type()));

    if (str->isNull() || find->isNull()) {
        result->toNull();
    } else {
        result->value(
            SqlStrPos<1, 1>(
                str->pointer(),
                str->stringLength(),
                find->pointer(),
                find->stringLength()));
    }
}

void
strSubStringA3(
    RegisterRef<char*>* result,
    RegisterRef<char*>* str,
    RegisterRef<int32_t>* start)
{
    assert(result->type() == STANDARD_TYPE_VARCHAR);
    assert(StandardTypeDescriptor::isTextArray(str->type()));

    // substring to a null results in null
    if (result->isNull() || str->isNull() || start->isNull()) {
        result->toNull();
        result->length(0);
    } else {
        // Don't try anything fancy with RegisterRef accessors. KISS.
        char * ptr = result->pointer(); // preserve old value if possible
        // TODO: Not sure why cast from char* to char const * is required below.
        int32_t newLen = SqlStrSubStr<1, 1>(
            const_cast<char const **>(&ptr),
            result->storage(),
            str->pointer(),
            str->stringLength(),
            start->value(),
            0,
            false);
        result->pointer(ptr, newLen);
    }
}

void
strSubStringA4(
    RegisterRef<char*>* result,
    RegisterRef<char*>* str,
    RegisterRef<int32_t>* start,
    RegisterRef<int32_t>* len)
{
    assert(result->type() == STANDARD_TYPE_VARCHAR);
    assert(StandardTypeDescriptor::isTextArray(str->type()));

    // substring to a null results in null
    if (result->isNull()
        || str->isNull()
        || start->isNull()
        || len->isNull())
    {
        result->toNull();
        result->length(0);
    } else {
        // Don't try anything fancy with RegisterRef accessors. KISS.
        char * ptr = result->pointer(); // preserve old value if possible
        // TODO: Not sure why cast from char* to char const * is required below.
        int32_t newLen = SqlStrSubStr<1, 1>(
            const_cast<char const **>(&ptr),
            result->storage(),
            str->pointer(),
            str->stringLength(),
            start->value(),
            len->value(),
            true);
        result->pointer(ptr, newLen);
    }
}

void
strToLowerA(
    RegisterRef<char*>* result,
    RegisterRef<char*>* str)
{
    assert(StandardTypeDescriptor::isTextArray(str->type()));
    assert(str->type() == result->type());

    // tolower to a null results in null
    if (result->isNull() || str->isNull()) {
        result->toNull();
        result->length(0);
    } else {
        // fixed width case: length should be harmlessly reset to same value
        assert(
            str->type() == STANDARD_TYPE_CHAR
            ? (result->storage() == str->storage())
            : true);
        result->length(
            SqlStrAlterCase<1, 1, AlterCaseLower>(
                result->pointer(),
                result->storage(),
                str->pointer(),
                str->stringLength()));
    }
}

void
strToUpperA(
    RegisterRef<char*>* result,
    RegisterRef<char*>* str)
{
    assert(StandardTypeDescriptor::isTextArray(str->type()));
    assert(str->type() == result->type());

    // toupper to a null results in null
    if (result->isNull() || str->isNull()) {
        result->toNull();
        result->length(0);
    } else {
        assert(
            str->type() == STANDARD_TYPE_CHAR
            ? (result->storage() == str->storage())
            : true);
        // fixed width case: length should be harmlessly reset to same value
        result->length(
            SqlStrAlterCase<1, 1, AlterCaseUpper>(
                result->pointer(),
                result->storage(),
                str->pointer(),
                str->stringLength()));
    }
}

void
strTrimA(
    RegisterRef<char*>* result,
    RegisterRef<char*>* str,
    RegisterRef<char*>* trimchar,
    RegisterRef<int32_t>* trimLeft,
    RegisterRef<int32_t>* trimRight)
 {
    assert(StandardTypeDescriptor::isTextArray(str->type()));
    assert(result->type() == STANDARD_TYPE_VARCHAR);
    assert(StandardTypeDescriptor::isTextArray(trimchar->type()));

    // trim to a null results in null
    if (result->isNull()
        || str->isNull()
        || trimchar->isNull()
        || trimLeft->isNull()
        || trimRight->isNull())
    {
        result->toNull();
        result->length(0);
    } else {
        // Don't try anything fancy with RegisterRef accessors. KISS.
        char * ptr = result->pointer(); // preserve old value if possible

        if (trimchar->stringLength() != 1) {
            // SQL99 Part 2 Section 6.18 General Rule 8.d) Data
            // Exception - Trim Error
            throw SqlState::instance().code22027();
        }
        // Note: This routine is for ASCII only, so the following is OK.
        char tc = *(trimchar->pointer());

        // Use trim by reference function:
        // TODO: Not sure why cast from char* to char const * is
        // required below.
        int32_t newLen = SqlStrTrim<1, 1>(
            const_cast<char const **>(&ptr),
            str->pointer(),
            str->stringLength(),
            trimLeft->value(),
            trimRight->value(),
            tc);
        result->pointer(ptr, newLen);
    }
}

void
ExtStringRegister(ExtendedInstructionTable* eit)
{
    assert(eit != NULL);

    vector<StandardTypeDescriptorOrdinal> params_2F;
    params_2F.push_back(STANDARD_TYPE_CHAR);
    params_2F.push_back(STANDARD_TYPE_CHAR);

    vector<StandardTypeDescriptorOrdinal> params_2V;
    params_2V.push_back(STANDARD_TYPE_VARCHAR);
    params_2V.push_back(STANDARD_TYPE_VARCHAR);

    eit->add(
        "strCatA2", params_2F,
        (ExtendedInstruction2<char*, char*>*) NULL,
        &strCatA2);
    eit->add(
        "strCatA2", params_2V,
        (ExtendedInstruction2<char*, char*>*) NULL,
        &strCatA2);

    vector<StandardTypeDescriptorOrdinal> params_3F;
    params_3F.push_back(STANDARD_TYPE_CHAR);
    params_3F.push_back(STANDARD_TYPE_CHAR);
    params_3F.push_back(STANDARD_TYPE_CHAR);

    vector<StandardTypeDescriptorOrdinal> params_3V;
    params_3V.push_back(STANDARD_TYPE_VARCHAR);
    params_3V.push_back(STANDARD_TYPE_VARCHAR);
    params_3V.push_back(STANDARD_TYPE_VARCHAR);

    eit->add(
        "strCatA3", params_3F,
        (ExtendedInstruction3<char*, char*, char*>*) NULL,
        &strCatA3);

    eit->add(
        "strCatA3", params_3V,
        (ExtendedInstruction3<char*, char*, char*>*) NULL,
        &strCatA3);

    vector<StandardTypeDescriptorOrdinal> params_1N_2F;
    params_1N_2F.push_back(STANDARD_TYPE_INT_32);
    params_1N_2F.push_back(STANDARD_TYPE_CHAR);
    params_1N_2F.push_back(STANDARD_TYPE_CHAR);

    vector<StandardTypeDescriptorOrdinal> params_1N_2V;
    params_1N_2V.push_back(STANDARD_TYPE_INT_32);
    params_1N_2V.push_back(STANDARD_TYPE_VARCHAR);
    params_1N_2V.push_back(STANDARD_TYPE_VARCHAR);

    vector<StandardTypeDescriptorOrdinal> params_1N_1F_1V;
    params_1N_1F_1V.push_back(STANDARD_TYPE_INT_32);
    params_1N_1F_1V.push_back(STANDARD_TYPE_CHAR);
    params_1N_1F_1V.push_back(STANDARD_TYPE_VARCHAR);

    vector<StandardTypeDescriptorOrdinal> params_1N_1V_1F;
    params_1N_1V_1F.push_back(STANDARD_TYPE_INT_32);
    params_1N_1V_1F.push_back(STANDARD_TYPE_VARCHAR);
    params_1N_1V_1F.push_back(STANDARD_TYPE_CHAR);

    eit->add(
        "strCmpA", params_1N_2F,
        (ExtendedInstruction3<int32_t, char*, char*>*) NULL,
        &strCmpA);

    eit->add(
        "strCmpA", params_1N_2V,
        (ExtendedInstruction3<int32_t, char*, char*>*) NULL,
        &strCmpA);

    eit->add(
        "strCmpA", params_1N_1F_1V,
        (ExtendedInstruction3<int32_t, char*, char*>*) NULL,
        &strCmpA);

    eit->add(
        "strCmpA", params_1N_1V_1F,
        (ExtendedInstruction3<int32_t, char*, char*>*) NULL,
        &strCmpA);

    eit->add(
        "strCpyA", params_2V,
        (ExtendedInstruction2<char*, char*>*) NULL,
        &strCpyA);

    eit->add(
        "strCpyA", params_2F,
        (ExtendedInstruction2<char*, char*>*) NULL,
        &strCpyA);

    vector<StandardTypeDescriptorOrdinal> params_1N_2B;
    params_1N_2B.push_back(STANDARD_TYPE_INT_32);
    params_1N_2B.push_back(STANDARD_TYPE_BINARY);
    params_1N_2B.push_back(STANDARD_TYPE_BINARY);

    vector<StandardTypeDescriptorOrdinal> params_1N_2VB;
    params_1N_2VB.push_back(STANDARD_TYPE_INT_32);
    params_1N_2VB.push_back(STANDARD_TYPE_VARBINARY);
    params_1N_2VB.push_back(STANDARD_TYPE_VARBINARY);

    vector<StandardTypeDescriptorOrdinal> params_1N_1B_1VB;
    params_1N_1B_1VB.push_back(STANDARD_TYPE_INT_32);
    params_1N_1B_1VB.push_back(STANDARD_TYPE_BINARY);
    params_1N_1B_1VB.push_back(STANDARD_TYPE_VARBINARY);

    vector<StandardTypeDescriptorOrdinal> params_1N_1VB_1B;
    params_1N_1VB_1B.push_back(STANDARD_TYPE_INT_32);
    params_1N_1VB_1B.push_back(STANDARD_TYPE_VARBINARY);
    params_1N_1VB_1B.push_back(STANDARD_TYPE_BINARY);

    eit->add(
        "strCmpOct", params_1N_2B,
        (ExtendedInstruction3<int32_t, char*, char*>*) NULL,
        &strCmpOct);

    eit->add(
        "strCmpOct", params_1N_2VB,
        (ExtendedInstruction3<int32_t, char*, char*>*) NULL,
        &strCmpOct);

    eit->add(
        "strCmpOct", params_1N_1B_1VB,
        (ExtendedInstruction3<int32_t, char*, char*>*) NULL,
        &strCmpOct);

    eit->add(
        "strCmpOct", params_1N_1VB_1B,
        (ExtendedInstruction3<int32_t, char*, char*>*) NULL,
        &strCmpOct);

    vector<StandardTypeDescriptorOrdinal> params_1N_1F;
    params_1N_1F.push_back(STANDARD_TYPE_INT_32);
    params_1N_1F.push_back(STANDARD_TYPE_CHAR);

    vector<StandardTypeDescriptorOrdinal> params_1N_1V;
    params_1N_1V.push_back(STANDARD_TYPE_INT_32);
    params_1N_1V.push_back(STANDARD_TYPE_VARCHAR);

    eit->add(
        "strLenBitA", params_1N_1F,
        (ExtendedInstruction2<int32_t, char*>*) NULL,
        &strLenBitA);
    eit->add(
        "strLenBitA", params_1N_1V,
        (ExtendedInstruction2<int32_t, char*>*) NULL,
        &strLenBitA);

    eit->add(
        "strLenCharA", params_1N_1F,
        (ExtendedInstruction2<int32_t, char*>*) NULL,
        &strLenCharA);
    eit->add(
        "strLenCharA", params_1N_1V,
        (ExtendedInstruction2<int32_t, char*>*) NULL,
        &strLenCharA);

    eit->add(
        "strLenOctA", params_1N_1F,
        (ExtendedInstruction2<int32_t, char*>*) NULL,
        &strLenOctA);
    eit->add(
        "strLenOctA", params_1N_1V,
        (ExtendedInstruction2<int32_t, char*>*) NULL,
        &strLenOctA);

    vector<StandardTypeDescriptorOrdinal> params_1V_2F_2I;
    params_1V_2F_2I.push_back(STANDARD_TYPE_VARCHAR);
    params_1V_2F_2I.push_back(STANDARD_TYPE_CHAR);
    params_1V_2F_2I.push_back(STANDARD_TYPE_CHAR);
    params_1V_2F_2I.push_back(STANDARD_TYPE_INT_32);
    params_1V_2F_2I.push_back(STANDARD_TYPE_INT_32);

    vector<StandardTypeDescriptorOrdinal> params_3V_2I;
    params_3V_2I.push_back(STANDARD_TYPE_VARCHAR);
    params_3V_2I.push_back(STANDARD_TYPE_VARCHAR);
    params_3V_2I.push_back(STANDARD_TYPE_VARCHAR);
    params_3V_2I.push_back(STANDARD_TYPE_INT_32);
    params_3V_2I.push_back(STANDARD_TYPE_INT_32);

    eit->add(
        "strOverlayA5", params_1V_2F_2I,
        (ExtendedInstruction5<char*, char*, char*, int32_t, int32_t>*) NULL,
        &strOverlayA5);

    eit->add(
        "strOverlayA5", params_3V_2I,
        (ExtendedInstruction5<char*, char*, char*, int32_t, int32_t>*) NULL,
        &strOverlayA5);

    vector<StandardTypeDescriptorOrdinal> params_1V_2F_1I;
    params_1V_2F_1I.push_back(STANDARD_TYPE_VARCHAR);
    params_1V_2F_1I.push_back(STANDARD_TYPE_CHAR);
    params_1V_2F_1I.push_back(STANDARD_TYPE_CHAR);
    params_1V_2F_1I.push_back(STANDARD_TYPE_INT_32);

    vector<StandardTypeDescriptorOrdinal> params_3V_1I;
    params_3V_1I.push_back(STANDARD_TYPE_VARCHAR);
    params_3V_1I.push_back(STANDARD_TYPE_VARCHAR);
    params_3V_1I.push_back(STANDARD_TYPE_VARCHAR);
    params_3V_1I.push_back(STANDARD_TYPE_INT_32);

    eit->add(
        "strOverlayA4", params_1V_2F_1I,
        (ExtendedInstruction4<char*, char*, char*, int32_t>*) NULL,
        &strOverlayA4);

    eit->add(
        "strOverlayA4", params_3V_1I,
        (ExtendedInstruction4<char*, char*, char*, int32_t>*) NULL,
        &strOverlayA4);

    eit->add(
        "strPosA", params_1N_2F,
        (ExtendedInstruction3<int32_t, char*, char*>*) NULL,
        &strPosA);

    eit->add(
        "strPosA", params_1N_2V,
        (ExtendedInstruction3<int32_t, char*, char*>*) NULL,
        &strPosA);

    vector<StandardTypeDescriptorOrdinal> params_1V_1F_1N;
    params_1V_1F_1N.push_back(STANDARD_TYPE_VARCHAR);
    params_1V_1F_1N.push_back(STANDARD_TYPE_CHAR);
    params_1V_1F_1N.push_back(STANDARD_TYPE_INT_32);

    vector<StandardTypeDescriptorOrdinal> params_2V_1N;
    params_2V_1N.push_back(STANDARD_TYPE_VARCHAR);
    params_2V_1N.push_back(STANDARD_TYPE_VARCHAR);
    params_2V_1N.push_back(STANDARD_TYPE_INT_32);

    eit->add(
        "strSubStringA3", params_1V_1F_1N,
        (ExtendedInstruction3<char*, char*, int32_t>*) NULL,
        &strSubStringA3);

    eit->add(
        "strSubStringA3", params_2V_1N,
        (ExtendedInstruction3<char*, char*, int32_t>*) NULL,
        &strSubStringA3);

    vector<StandardTypeDescriptorOrdinal> params_1V_1F_2N;
    params_1V_1F_2N.push_back(STANDARD_TYPE_VARCHAR);
    params_1V_1F_2N.push_back(STANDARD_TYPE_CHAR);
    params_1V_1F_2N.push_back(STANDARD_TYPE_INT_32);
    params_1V_1F_2N.push_back(STANDARD_TYPE_INT_32);

    vector<StandardTypeDescriptorOrdinal> params_2V_2N;
    params_2V_2N.push_back(STANDARD_TYPE_VARCHAR);
    params_2V_2N.push_back(STANDARD_TYPE_VARCHAR);
    params_2V_2N.push_back(STANDARD_TYPE_INT_32);
    params_2V_2N.push_back(STANDARD_TYPE_INT_32);

    eit->add(
        "strSubStringA4", params_1V_1F_2N,
        (ExtendedInstruction4<char*, char*, int32_t, int32_t>*) NULL,
        &strSubStringA4);

    eit->add(
        "strSubStringA4", params_2V_2N,
        (ExtendedInstruction4<char*, char*, int32_t, int32_t>*) NULL,
        &strSubStringA4);

    eit->add(
        "strToLowerA", params_2F,
        (ExtendedInstruction2<char*, char*>*) NULL,
        &strToLowerA);

    eit->add(
        "strToLowerA", params_2V,
        (ExtendedInstruction2<char*, char*>*) NULL,
        &strToLowerA);

    eit->add(
        "strToUpperA", params_2F,
        (ExtendedInstruction2<char*, char*>*) NULL,
        &strToUpperA);

    eit->add(
        "strToUpperA", params_2V,
        (ExtendedInstruction2<char*, char*>*) NULL,
        &strToUpperA);

    // Result of strTrimA is always VC. Other two arg strings can be VC or C

    vector<StandardTypeDescriptorOrdinal> params_1V_1F_1V_2I;
    params_1V_1F_1V_2I.push_back(STANDARD_TYPE_VARCHAR);
    params_1V_1F_1V_2I.push_back(STANDARD_TYPE_CHAR);
    params_1V_1F_1V_2I.push_back(STANDARD_TYPE_VARCHAR);
    params_1V_1F_1V_2I.push_back(STANDARD_TYPE_INT_32);
    params_1V_1F_1V_2I.push_back(STANDARD_TYPE_INT_32);

    vector<StandardTypeDescriptorOrdinal> params_2V_1F_2I;
    params_2V_1F_2I.push_back(STANDARD_TYPE_VARCHAR);
    params_2V_1F_2I.push_back(STANDARD_TYPE_VARCHAR);
    params_2V_1F_2I.push_back(STANDARD_TYPE_CHAR);
    params_2V_1F_2I.push_back(STANDARD_TYPE_INT_32);
    params_2V_1F_2I.push_back(STANDARD_TYPE_INT_32);

    // VC, VC, VC
    eit->add(
        "strTrimA", params_3V_2I,
        (ExtendedInstruction5<char*, char*, char*, int32_t, int32_t>*) NULL,
        &strTrimA);
    // VC, VC, C
    eit->add(
        "strTrimA", params_2V_1F_2I,
        (ExtendedInstruction5<char*, char*, char*, int32_t, int32_t>*) NULL,
        &strTrimA);
    // VC, C, C
    eit->add(
        "strTrimA", params_1V_2F_2I,
        (ExtendedInstruction5<char*, char*, char*, int32_t, int32_t>*) NULL,
        &strTrimA);
    // VC, C, VC
    eit->add(
        "strTrimA", params_1V_1F_1V_2I,
        (ExtendedInstruction5<char*, char*, char*, int32_t, int32_t>*) NULL,
        &strTrimA);
}

FENNEL_END_NAMESPACE

// End ExtString.cpp

redpajama_set_name: RedPajamaGithub


text:
\section{Introduction}

The development of quantum computing is entering an exciting new era. Prototype quantum processors based on various physical architectures are beginning to appear, such as those superconducting qubits \cite{kelly:14,takita:16}, trapped ions \cite{linke:16} and spin qubits \cite{watson:17}. Such devices are too small and noisy to fully realize the promise of quantum computation. Many more qubits and the ability to achieve fault-tolerance are required before the age of quantum computers truly dawns.  Nevertheless, current and near future devices can and have been used to generate many significant proof-of-principle results.

An important challenge of this new era is to benchmark and compare quantum processors. A quantitative starting point for this is the 'Quantum Volume'\cite{quantumvolume:17}, designed to capture not only the number of qubits in a device, but also some idea of the circuit depth that can be achieved before the effects of noise dominate.

More detail on the capabilities of a device can be obtained by running simple programs. An obvious choice would be to implement small instances of algorithms intended for large fault-tolerant devices, such as Shor's~\cite{shor:97} or Grover's~\cite{grover:96} algorithms. However, a better insight would arguably come from algorithms that have been specifically designed to work on small and noisy devices \cite{awesomeness}.

Fortunately, there are already a class of protocols designed specifically for noisy systems: those of quantum error correction \cite{lidar:13}. Many experiments have already been done based on tasks in this area, such as error detection~\cite{linke:16,vuillot:17,takita:17}, correction~\cite{kelly:14,ofek:16} and proof-of-principle tests of the required techniques~\cite{blatt:14,takita:16,wootton:majorana}.

Several of these experiments have involved large Hilbert spaces. However, most of these have either not allowed both detection and correction \cite{blatt:14}, or not used the standard paradigm of encoding in a many qubit system \cite{ofek:16}. Apart from these, the largest number of qubits used so far for the detection and correction of errors was a repetition code of 9 qubits~\cite{kelly:14}. This code is capable of both detecting and correcting errors on a logical \emph{bit} value stored in an array of qubits. Note that, unlike most quantum error correcting codes, this does not allow a logical \emph{qubit} to be stored. However, the connectivity required to implement codes which store qubits is beyond most current devices~\cite{gambetta:17,bermudez:17}.

Specifically, if the qubits of a device are represented as the vertices of a graph, and edges are placed between all pairs for which entangling gates can be directly performed, full quantum error correcting codes require this graph to be at least a two dimensional planar lattice. Repetition codes, however have much more amenable needs: All they require is a line. This code therefore represents the forefront of current implementations of quantum fault-tolerance, and is an important means to benchmark current devices.

At the time producing this study, the largest quantum processor was the \emph{ibmqx3} of IBM \cite{ibmqx3}. This is a 16 qubit device whose connectivity is described by the $2 \times 8$ square lattice shown in Fig.~\ref{device}. Since repetition code can only be defined on an odd number of qubits, this device can be used to implement a repetition code of up to 15 qubits. It is such an implementation that we consider in this work. By doing so, we can look for evidence of one of the key assumptions and requirements of quantum error correction, namely that the logical error rate decays exponential with code distance.

This exponential decay is typically dependent on another assumption: that noise acts with finite probability on only a finite number of qubits. This could be violated by sufficiently large correlations between code qubits \cite{fowler:correlated,hutter:correlated}, or by the operations used to implement the code inadvertently allowing noise to spread \cite{helsen:18}. In such cases, the noise threshold required for successful error correction would become zero, significantly limiting the degree to which errors can be suppressed. Such effects could be effectively ruled out by demonstrating that the exponential decay of logical error rate persists to arbitrarily large code distances. In this study we will consider this to a limited extent by considering a range of possible code sizes, but it is beyond the scope of this work to fully rule out such effects.

\begin{figure}[t]
\begin{center}
{\includegraphics[width=\columnwidth]{device.png}}
\caption{\label{device} The layout of the \emph{ibmqx3} device, with the numbering of qubits used in this study. Lines connect pairs of qubits for which a CNOT can be performed. Thick black lines are show for the CNOTs used in our implementation of the repetition code.
}
\end{center}
\end{figure}

\section{The Repetition Code}

The repetition code stores classical information through repetition. A code with distance $d$ stores the bit value $b \in \{0,1\}$ by simply repeating the value $b$ across $d$ bits.

For example, this encoding step correponds to the following for $d=5$,
\begin{eqnarray} \nonumber
0 \rightarrow 00000, \,\,\, 1 \rightarrow 11111.
\end{eqnarray}

To implement this code using a quantum device, we simply replace the bits with qubits. The value $0$ is then stored with the state $\ket{0}^{\otimes d}$, and $1$ is stored with $\ket{1}^{\otimes d}$.

For the example of $d=5$, this is then,
\begin{eqnarray} \nonumber
0 \rightarrow \ket{00000}, \,\,\, 1 \rightarrow \ket{11111}.
\end{eqnarray}

If no errors occurred, the result at output would be to simply regain the initial $\ket{0}^{\otimes d}$ or $\ket{1}^{\otimes d}$. Decoding the stored bit value in this case would trivially be an inversion of the encoding, such as,

\begin{eqnarray} \nonumber
\ket{00000} \rightarrow 0, \,\,\, \ket{11111} \rightarrow 1.
\end{eqnarray}

When errors do occur, the result will most likely be a bit string with a mixture of $0$s and $1$s. Decoding is then  typically done by majority voting: If the error rate is low, the majority of qubits can still be expected to be correct. Deducing that the majority value is the one that was encoded will therefore allow the encoded information to be retrieved in most cases. The probability that the decoding is incorrect is known as the logical error probability.

For example, suppose errors are bit flips which occur with probability $p<0.5$. If the result $\ket{01000}$ is obtained for $d=5$, it could have resulted from two possible processes. One is that a logical $0$ was encoded, followed by an error on the second qubit. The other is than a $1$ was encoded, and errors occurred on all but the second qubit. The probability of the former is much higher than that of the latter, due to the much smaller number of errors. So the decoding would be $\ket{01000} \rightarrow 0$.

For the error rate to be low enough for good decoding to be possible, the stored information must be retrieved quickly after being first encoded. However, error correction typically aims to store information over long time scales. When the repetition code is implemented classically, this can be achieved by periodically measuring the bits of the code to keep track of errors as they occur.

This tactic is not compatible with the needs of quantum error correction, in which our techniques should not be allowed to collapse a superposition of a stored $0$ and a stored $1$, which would be encoded in the code qubits as $\alpha\ket{0}^{\otimes d}+\beta\ket{1}^{\otimes d}$. We therefore need a corresponding method that detects errors, but does not need to readout the stored bit at the same time. This process corresponds making to so-called `stabilizer measurements'\cite{gottesman:96}, which lie at the heart of most prominent quantum error correcting codes.

Stabilizer measurements for the repetition code are achieved using the circuit of Fig. \ref{circuit}. In addition to the $d$ code qubits, $d-1$ ancilla qubits are used. The code and ancilla qubits are arranged alternately on a line. Each pair of neighbouring code qubits therefore always has an ancilla located between them. CNOT gates are then performed, with a code qubit as control and an ancilla qubit as target in each case. For each ancilla, a CNOT is applied with both neighbours. The end effect of this on the ancilla does not depend on the encoded bit value. It depends only on whether the computational basis states of the neighbouring code qubits agree (as they should due to the repetition) or not (a signature of error). By measuring the ancillas we can then extract information about errors, without collapsing any encoded superposition.

This portion of the circuit (CNOTs and ancilla measurements) can be repeated indefinitely to keep track of errors as they arise. When it is time to read out the bit value, the code qubits should also be measured. The entire output can then be used to deduce the original intended value. As long as the probability of error between ancilla measurement rounds is sufficiently low, the probability of a logical error will decay exponentially as $d$ is increased.

The decoding in this case can no longer be done simply using majority voting. Instead a decoding method such as the Blossom  algorithm for minimum weight perfect matching can be used \cite{dennis}, as can other methods designed for the case of the surface code with perfect syndrome measurements~\cite{hutter:14,bravyi:14,duclos:14}.

The use of such algorithms is not required if the output is sufficiently small (due to small $d$ and few ancilla measurement rounds). In such cases, a look-up table decoder can be calculated from experimental data.

Specifically, the look-up tables are conditional probability distributions $\pi(R|E)$, where $R$ is a bit string of respresenting the final output of a code, and $E \in \{0,1\}$ is the encoded bit value. These distributions can be determined experimentally for codes of limited size using the results of many runs. Once known, they can be used to decode an arbitrary output $R$. This is done simply by finding the value of $E$ for which $\pi(R|E)$ is highest. This then gives the most likely value for the encoded bit, assuming that the priors for the two values are equal, and so is taken to be the decoded bit value.

The probabilities for logical errors can be determined from the same look-up tables used for the decoding. For a given encoded bit value $E$, the probability $P(R|E)$ that the result $R$ occurs and causes a logical error is clearly

\begin{eqnarray} \label{conditional}
P( R|E ) = \begin{cases}
\pi(R|E), & \text{if $\pi(R|\neg E)>\pi(R|E)$}.\\
\pi(R|E)/2, & \text{if $\pi(R|\neg E)=\pi(R|E)$}.\\
0, & \text{otherwise}.
\end{cases}
\end{eqnarray}

The second case here reflects the possibility that the decoding is ambiguous, and so the decoded value is chosen randomly.

The total probability for a logical error for a given encoded bit value $E$ can then be obtained by summing over all possible outcomes

\begin{eqnarray}
P(E) = \sum_R P(R|E).
\end{eqnarray}

In our experiment we consider codes with a maximum of $d=8$ (and so $15$ qubits in total). Also, due to restrictions of the API for the IBM Quantum Experience~\cite{ibmapi}, it is not possible to measure the ancilla qubits repeatedly. We therefore do only a single round of CNOTs and ancilla measurements, the latter of which are done simultaneously with the final readout of code qubits. The circuit applied is therefore exactly that shown in Fig. \ref{circuit} for $d=3$, or generalizations thereof for higher $d$. Due to this limited size, we perform the lookup table decoding described above.

\begin{figure}[t]
\begin{center}
{\includegraphics[width=7cm]{circuit.png}}
\caption{\label{circuit} The basic circuit for a $d=3$ repetition code.
The case shown is that for which the encoded logical bit value is $1$. This value is encoded in the three code qubits ($c0$, $c1$ and $c2$) by rotating the initial $\ket{0}$ value to $\ket{1}$ using an $X$ gate. The case for an encoded logical $0$ is the same, but without the $X$ gates. The qubit $s$ is not part of the code, but is used to compare the code against the case of encoding the same bit value in a single qubit. The qubits $0$ to $5$, according to the numbering of Fig. \ref{device}, are used to implement this code.
}
\end{center}
\end{figure}

Note that the limited sample size will lead to these results being approximate. Specifically, the method stated above will strictly function as a lower bound due to the possibility of overfitting. An alternative method producing an upper bound is investigated in an alternative version of the source code for this study, which can be found at \cite{repetitionsource}. This is found to give the same qualitative features as the results presented in this work, but is quantitatively different.

\section{Conditions For Success}

In order to determine how well the device implements the repletion code, concrete conditions for success must be defined.

The most straightforward is to compare a bit stored in a code with one stored in only a single qubit. The promise of quantum error correction is that the non-local storage of information across many qubits is more reliable than the single qubits themselves. We must therefore confirm that this the case. To do this, each run of the repetition code with a given encoded bit value is accompanied by a single qubit in which the same value is encoded. This additional qubit, which we will refer to as qubit $s$, is shown at the bottom of Fig. \ref{circuit}.

Another obvious test is to ensure that the probability of a logical error does indeed decrease with $d$, as expected. This should certainly be the trend for large increments $d$, though exceptions may be found between closely related values. These could give an interesting insight in to the nature of noise on the device. Also, note that the minimum number of errors required to cause incorrect decoding is $\lceil d/2 \rceil$ (the number of flips on code qubits required to change (for odd $d$) or create ambiguity regarding (for even $d$) the majority. Since this number is the same for each odd $d$ and the even $d+1$ that follows it, there might not be a significant decrease in the logical error probability between these pairs.

For an additional test, note that the output of the code qubits alone is enough to perform decoding. This would not be true if many rounds of CNOTs and ancilla measurements were applied. In this case, the amount of noise built up on the code qubits would be too high for reliable decoding, and only with the history of ancilla measurement results can the original encoded value be deduced. However, in the case of the single ancilla measurement round as we consider, the noise level should be low enough to allow decoding using the code qubit results alone.

The result of this is that the code could satisfy the previously mentioned conditions (the code performing better than a single qubit, and ever better as $d$ increases) even if the CNOTs completely failed to occur. This would in no way be any proof-of-principle of quantum error correction, and so these conditions are clearly not sufficient to ensure success.

The use of the CNOTs and ancilla measurements in our experiment has both benefits and drawbacks. The former is due to the extra information that can be extracted about the errors that occur. The latter is due to the additional noise suffered by the code qubits due to imperfections in the CNOTs. For a proof-of-principle demonstration of quantum error correction, it must be shown that the benefits significantly outweigh the drawbacks.

To do this, we compare results for two types of decoding. One is `full decoding' in which the look-up tables of Eq. \ref{conditional} use the results from both the code and ancilla qubits (and therefore each $R$ is a string of $2d-1$ bits). The other is `partial decoding', in which only results from the code qubits are used to construct the look-up tables (and so each $R$ is a $d$ bit string). Since only the former benefits from the syndrome measurement round, since this records additional information about the errors on the ancilla qubits, it should lead to significantly lower logical error probabilities. By showing this, we would demonstrate that the effect of the CNOTs and ancilla measurements in extracting additional information truly has a powerful effect. Note that this form of test was originally proposed in \cite{winkler:17} for the surface code.

\section{Results}

Repetition codes of size between $d=3$ and $d=8$ were studied. For each, the lookup tables where populated using $8192$ samples. Note that this is significantly less than the total possible number of measurement outcomes, $2^{2d-1}$, for $d=8$ and not significantly greater than that for $d=6$ or $d=7$. Statistical inaccuracies in the lookup table can therefore be expected to affect the quality of the decoding. In order to get an idea of the extent of this effect, logical error probabilities for each case are calculated from $10$ different runs and a mean is taken. The standard deviation of these values is used as an estimate of error.

Simulated runs were also used to produce data that could be used for comparison. These runs were done in the same way as above, but only up to $d=6$.

The simulations also include artificially introduced noise, since they would be otherwise perfect. This was done using partial rotations about the X axis (which rotates between $\ket{0}$ and $\ket{1}$). The rotation angle depends on whether the qubit was initialized in state $\ket{0}$ or $\ket{1}$ at the encoding step. For the former, an angle of $\pi/20$ was used. For the latter, $\pi/10$ was used. This mimics the greater probability of $\ket{1}\rightarrow\ket{0}$ transitions in the real device. Noise was added to all qubits at three points: immediately after encoding, between the two rounds of CNOTs and immediately before measurement. This noise mechanism is chosen for its simple implementation, and is not expected to accurately reproduce the true noise processes in the real device. The values of $\pi/20$ and $\pi/10$ are chosen because they reproduce some values and features of the results from the real device.

Full details of the implementation for both the real device and the simulation, including source code and raw data, can be found at \cite{repetitionsource}.

\begin{figure}[t]
\begin{center}
{\includegraphics[width=\columnwidth]{singlequbits.pdf}}
\caption{\label{singlequbits} The state of each qubit at the end of the process, characterized by the probability of the outcome $\ket{1}$ when measured. The extreme examples of $d=3$ and $d=8$ are shown. Results for the encoded bit value $0$ are shown in blue (circle markers), and those for $1$ are in orange (triangle markers).  Qubits alternate between code and ancilla qubits, finally ending in a code qubit at $2d-2$. Qubit $s$ is located at $2d-1$. Any remaining qubits are unused.
}
\end{center}
\end{figure}

\begin{figure}[t]
\begin{center}
{\includegraphics[width=\columnwidth]{logicalerrors.pdf}}
\caption{\label{logicalerrors} Probabilities of logical errors for both full and partial decoding. As a comparison, the minimum value of the single qubit memory from all code sizes is plotted across the graph.
}
\end{center}
\end{figure}

The results in Fig. \ref{singlequbits} show the state of each qubit at the end of the process. In the case of no noise, all qubit states should be $\ket{0}$, except for code qubits and qubit $s$ when the bit value $1$ encoded. The results show good agreement to these expectations. Qubits expected to be $\ket{0}$ typically have a fidelity of more than $90\%$, and those expected to be $\ket{1}$ have a fidelity of more than $80\%$. For the bit stored in the single qubit $s$, the lowest probability of a logical error is around $0.5\%$ for a stored $0$ and $10\%$ for a stored $1$. The values for the simulator show good agreement to those for the real device, though this is due only to the fact that the simulated noise parameters were chosen to obtain such an agreement.

The results in Fig. \ref{logicalerrors} show the logical error probabilities as a function of code distance. These probabilities are found to be much lower than the corresponding values for the qubit $s$ in the case of an encoded bit value of $0$. The effect is not so strong for the encoded $0$, however this is due to the fact that the noise tends cause qubits to decay towards $\ket{0}$ in all cases, which happens to be advantageous when $0$ is encoded.

The results show that the trend is indeed for the error probability to decrease with code distance, as we would expect. A notable exception is found at $d=6$ for an encoded bit value $0$. However, note that this is the first code that uses the qubit numbered $9$ in Fig. \ref{singlequbits}, which can be seen to be particularly noisy. Also, the error probability after full decoding is significantly less than that after partial decoding in almost all cases, which is again in line with expectations.

\subsection{Fit to an exponential decay}

To further analyse these trends, the data is fit to an exponential decay. The simplest possible model of the repetition code is used to avoid over fitting, or unstable fits. This model has a single free parameter, $p$, which corresponds to the probability of a bit flip error for each qubit. Decoding is done simply by using the majority voting of the code qubits The logical error probability for a given code distance $d$ is therefore the probability of such errors on at least half of the qubits within the code, and so decays exponentially with a factor of $\left[p/(1-p)\right]^{\ceil{d/2}}$. Note that the supremum here results in this factor being equal for each odd $d$ and the corresponding $d+1$, due to the lack of a clear majority in the even case.

This simple model corresponds most closely to the case considered for partial decoding, and so is directly used to fit this data. The results are shown in Fig. \ref{fit}. The fitting was done using a least squares method on the logarithms of the logical error probabilities. The values for the fitting parameter were found to be $0.088\pm0.001$ for encoded $0$ and $0.102\pm0.001$ for encoded $1$. These values represent the combined effect of preparation, measurement and entangling gate errors, which are each measured to be on the order of $1\%$ using randomized benchmarking \cite{ibmqx3}. The fitting parameters are therefore certainly of the right order to represent their combined effect. However, the possibility that correlated noise can also form a significant contribution cannot be ruled out.

For the fitting of data from full decoding, let us consider two extremes. Firstly, consider the case for which all CNOTs and ancilla qubits are perfect. Full decoding would then effectively factor into two rounds of error correction, each of which can be modelled in the same way as partial decoding. We will refer to the values of the physical error probability for these rounds as $p_0$ and $p_1$, respectively. Clearly $p = p_0(1-p_1)+p_1(1-p_0)$, though we will use the approximation $p=p_0+p_1$ for simplicity.

The second extremal case is that for which the syndrome measurements result in no useful information being placed on the ancillas. This could either be due to the CNOTs being completely ineffective, or the ancillas being completely decohered. In this case, the ancilla results can be ignored. Full decoding could then be treated as a single round of partial decoding.

We will therefore fit the data for full decoding to two rounds of the simple model. This will be done by first assuming that one round has the error probability $p_0 = p$, found from the fit to the partial decoding data, and the other has no errors ($p_1=0)$. The fit will then optimize over all other possible $p_0$ and $p_1$ given the $p=p_0+p_1$ constraint.

The resulting $p_0$ and $p_1$ can then be used to determine the degree to which we can factorize the error correction into two rounds. If one of these probabilities is found to dominate, it would suggest that the effectiveness of the syndrome measurement approaches the worst case scenario described above.

A more even split would support the notion that the syndrome measurement round is indeed effective. However, it is not a complete proof. Similar results could occur if the CNOTs were ineffective, but suffered correlated noise. Full proof of effectiveness would therefore require a deeper understanding of the effects of noise in the system.

Fitting the data for the full decoding in this way yields $p_0=0.054\pm0.001$ and $p_1=0.034\pm0.001$ for stored $0$ and $p_0=p_1=0.051\pm0.001$ for stored $1$. These do show a clear sign of factoring into two distinct rounds, which strengthens the argument that the syndrome measurement round significantly increases the performance of the code.

The data can be seen to show a clear agreement with the exponential decay of the fit lines. However, the data and fitted lines do differ by a typical factor of around $2$. This is due to disagreement in the form of the even/odd effects. In some cases, such as partial decoding for an encoded $0$, the data and fit show opposite even/odd effects. This is likely due to biased noise changing the nature of the decoding, as will be discussed below. The even/odd effects in the data also appear to be less prominent, with partial decoding for an encoded $1$ as the clearest example. These differences could be accounted for by fitting to a more complex model that accounts for biased and correlated noise. However, this would increase the number of fitting parameters. A full study of these effects must therefore be deferred to future experiments with larger devices, such that more data points can be taken. Future experiments would also benefit from greater access to the raw data from devices, rather than the post-processed outputs of $0$ and $1$ as supplied currently.

\begin{figure}[t]
	\begin{center}
		{\includegraphics[width=\columnwidth]{fit.pdf}}
		\caption{\label{fit} Probabilities of logical errors for both full and partial decoding, as shown in Fig. \ref{logicalerrors}, with additional fit lines for an exponential decay. The results for $d=3$ have been omitted to reduce finite size effects.
		}
	\end{center}
\end{figure}

\subsection{Analysis of finite size effects}

An exception to the decay of the logical error rate can be seen in Fig. \ref{logicalerrors} for $d=3$ and an encoded bit value of $0$. This occurs both for the real device and the simulator. It may seem counterintuitive that better results could come from ignoring some information. However, this effect is due to the way the probabilities are calculated  and the biased nature of the noise.

For example, consider an extreme case for which noise on the code qubits causes very strong relaxation, such that the code qubits always end in state $\ket{0}$ when $0$ was encoded, and almost always end in state $\ket{0}$ even when $1$ is encoded. Partial decoding using only these results would then lead to the decoding guessing that $0$ was encoded in almost all cases. There would then never be a logical error for an encoded $0$, but a logical error would be almost certain for an encoded $1$.

More informed decoding could be achieved using the ancilla results. If these show signs that extensive errors have occurred, it would be likely that the code qubits start in in state $\ket{1}$. Many cases for which a logical error would have occurred when using partial decoding could then be successfully decoded using this full decoding. However, for some cases, such as many measurement errors on ancilla qubits, it is possible for an encoded $0$ to be misidentified as a $1$. The use of a less biased decoder therefore may be more effective in overall, but it can be less effective for the specific case of an encoded $0$.

The reason for the effect in this specific case can be seen from Fig. \ref{decoder}. Here results are shown for $d=3$ and $d=6$. These graphs show how probable it is to get each possible number of the outcome $1$ in the output of the code qubits. For an encoded $0$ it is most probable to have a small number of $1$s, since each is an error deviating from the perfect output in which all are $0$. For an encoded $1$ the output is most likely to have a large number of $1$s, since each $0$ would be an error in this case.

\begin{figure}[t]
\begin{center}
{\includegraphics[width=\columnwidth]{decoder.pdf}}
\caption{\label{decoder} Probabilities for different numbers of $1$s in the output of the code qubits.
}
\end{center}
\end{figure}

For unbiased noise, the crossover between the curves for encoded $0$ and encoded $1$ would occur at $d/2$. Any output with less $1$s than this should therefore be decoded as a $0$, and any with more should be decoded as a $1$. For codes with even $d$, for which it is possible for the number of $1$s in the output to be the marginal value of $d/2$, the decoding can be chosen randomly in this case.

For the biased noise, as present in the real device and our simulations, the decoding can deviate from this simple majority voting. This can be seen in the results for $d=6$. The crossover point has shifted, resulting in $d/2$ no longer being the marginal case that would result for unbiased noise. Instead, having this number of $1$s in the output is recognized as being a strong indicator that the encoded bit value was $1$ and would be decoded accordingly. Similar effects occur for all other code distances, with the exception of $d=3$

For $d=3$ there is a similar shift of the crossover point. This shift is by approximately the same fraction of $d$ as in the $d=6$ case. However, the smaller nature of the code means that there is less freedom to alter the decoding accordingly. In fact, since finding two $1$s in the output is still slightly more likely to correspond to an encoded $0$, the optimal decoding will still correspond to majority voting.

Nevertheless, outputs with two ones are found to be very close to being a marginal case, with encoded $0$ only being slightly more likely. Decoding these as $0$ in all cases will therefore lead to a unfair advantage for this encoded value, causing the feature found in Fig. \ref{logicalerrors}.

\section{Conclusions}

The logical error probabilities of the code sizes considered were found to agree with expectations in most cases, showing that current technology is certainly capable of achieving this simple example of quantum error correction on a relatively large scale. The exceptions found shed light on the nature of noise in the system, with the bias induced by relaxation being the dominant effect.

The quantum part of the code is the mapping of information about errors to ancilla qubits via controlled operations. This is a central technique of quantum error correction. Due to only a single round of ancilla measurements being used, it was possible to compare the effectiveness of decoding both with and without the ancilla results. This allowed direct insight into the effectiveness of the quantum part. It was found that it did indeed allow for significantly better results.

The next major goal of experimental quantum error correction is to build a logical qubit that can be stored as successfully as the logical bit here. The analysis used in this paper, such as the lookup table decoding and comparison of full and partial decoding, would be just as valid in that case \cite{winkler:17}. It would therefore be highly interesting to see corresponding results in future.

The most recent version of the Jupyter notebook containing source code for this project can be found at \cite{repetitionsource}. The raw data is also provided, allowing the analysis of this paper to be repeated and expanded upon. The version of the notebook on which this publication is based is included with the arXiv source files.

\section{Acknowledgements}

This work was supported by the Swiss National Science Foundation and the NCCR QSIT. JRW thanks Hanhee Paik for comments on the manuscript.

The IBM Quantum Experience was used to produce results for this work. The views expressed are those of the authors and do not reflect the official policy or position of IBM or the IBM Quantum Experience team.

redpajama_set_name: RedPajamaArXiv


text:
Barbara Windsor has gone downhill rapidly in recent weeks as Alzheimer's disease gives her more bad days than good
The actress, famous for playing Peggy Mitchell in EastEnders and for starring in the Carry On movies, was diagnosed four years ago
Barbara Windsor 'totally aware' of Alzheimer's announcement
Vicki NewmanAssistant Showbiz Editor
A close friend of Dame Barbara Windsor has revealed that her health has deteriorated rapidly in the last couple of weeks.
The actress, famous for playing Peggy Mitchell in EastEnders and for starring in the Carry On movies, was diagnosed with Alzheimer's disease four years ago.
It's got so bad that her husband of 25 years, Scott Mitchell, says she doesn't even remember that they're married.
And now a friend says the heartbreaking diagnosis is taking its toll on Barbara even further, giving her more bad days than good ones.
Dame Barbara Windsor's heartbroken husband Scott Mitchell says TV icon no longer remembers they're married because of Alzheimer's
Her health has deteriorated rapidly (
Getty Images Europe)
Barbara and husband Scott (
Paul Bennett, a close friend of the couple, told the Daily Mail : "I spoke to Scott last week and he said she had gone downhill rapidly over the past couple of weeks. I talked to Barbara as well and she just said, 'I'm not so well now'."
He also spoke of how Barbara was deeply affected by the death of her close friend Dale Winton, who she'd known for a long time.
"I think she took it quite badly," he said. "Since the diagnosis, there have been up days and down days, but I think there are more down days now than up days.
"But she still goes out. Two weeks ago she went to see the Tina Turner musical."
Husband Scott also spoke of his decision to make Barbara's illness public knowledge.
She was affected by the death of close friend Dale (
The People)
He said: "I want the public to know this, because they are naturally very drawn to Barbara and she loves talking to them.
"So rather than me living in fear she might get confused or upset, they'll know that if her behaviour seems strange, it's due to Alzheimer's and accept it for what it is."
The 55-year-old said Barbara has no recollection of their history as a couple.
He said: "She'll look at her wedding ring and say, 'Are we married?' But that's the thing about this cruel disease, isn't it?"
He added: "She's not frightened of me, so I'm thankful for that. Over the last couple of days, the conversation has turned to, 'I just think it's wonderful that you come here to look after me' — and she keeps thanking me."
'This forgetfulness palava can jog on': Shane Richie's heartfelt message for Dame Barbara Windsor during Alzheimer's fight
Babs as Peggy Mitchell (
BBC)
She's an EastEnders legend (
Scott, who has been married to Barbara since 2000, added to The Sun: "I say, 'Barbara I'm not here to look after you, I'm here because I love you'."
He said he shows her photographs of them together over the years to remind her of their past together.
"She said to me the other day, 'It's not fair, because you're a young man and you shouldn't have to look after me. You should have a girlfriend and enjoy your life'.
Scott replied to his wife: "That's not how it works, Bar."
Barbara WindsorDale WintonScott MitchellEastEndersAlzheimer's disease
Don't miss out on the biggest soaps gossip! Get a daily email direct to your inbox with our newsletter
Barbara Windsor


My g2.0 worked until April 1,2019 same as others I'm guessing. How do I receive a code to obtain another device? Don't remember anything in email.
How do I get a code to replace g2.0 pedometer that is now obsolete?
Re: My g2.0 worked until April 1,2019 same as others I'm guessing. How do I receive a code to obtain another device? Don't remember anything in email.
I sincerely apologize that an email was not received. I will send you a personal message with further information.


text:
George Cortina
George Cortina's styling is both creative and timeless. He has spent the better part of his life absorbing fashion, and this passion is reflected in his innovative work. George is the Contributing Fashion Editor at WSJ. Magazine and was previously the Associate Fashion Director-at-Large for Vogue Nippon. He regularly collaborates with The Last Magazine, Porter, and V, and his editorial work has been featured in Interview, Vogue Italia and W.
George's advertising clients include Agent Provocateur, Brandon Maxwell, Bvlgari, Calvin Klein, Carolina Herrera, Clarins, Dundas, Giorgio Armani, Frame, H&M, Hugo Boss, Joe Fresh, Pantene, Roberto Cavalli and Sephora.
In addition, George Cortina has worked with numerous actors, musicians and personalities including Christian Bale, Cate Blanchett, Jessica Chastain, Marion Cotillard, Charlotte Gainsbourg, Jodie Foster, Jared Leto, Robert Pattinson, Michelle Pfeiffer, Winona Ryder and Oprah Winfrey.
Cortina continues to work with many of the most influential photographers of our time. His styling has been featured in the photographs of Mikael Jansson, Karl Lagerfeld, Peter Lindbergh, Mert Alas & Marcus Piggott, Paolo Roversi, Mario Sorrenti, Solve Sundsbo, Mario Testino, and Inez van Lamsweerde and Vinoodh Matadin.
V Magazine, The Last Magazine, Vogue India, Porter Magazine, Industrie Magazine, Vogue Hommes, WSJ, LOVE, Vogue Netherlands, Vogue Germany, Vogue Italia
Emilio Pucci, Agent Provocateur, Brandon Maxwell, Bvlgari, Calvin Klein, Carolina Herrera, Clarins, Dundas, Giorgio Armani, Frame, H&M, Hugo Boss, Joe Fresh, Pantene, Roberto Cavalli, Sephora
@georgecortina
Exposure NY (exposureny.com)
CLM Agency (clm-agency.com)
AGENCY CONTACT:
NYC: clm@clmus.com
LDN: clm@clmuk.com
The Impression 250 is a hand-selected list of fashion's leading creatives shaping the global fashion narrative today.
Coco Capitán
The Impression Team
Carlijn Jacobs
Arielle Bobb-Willis
Charlotte Collet
"); jQuery('body').attr( "data-title", 'George Cortina' ); jQuery('body').attr( "data-id", "10191786" ); jQuery('.menu-left').append('
'); jQuery('.tacpp').val(1); //jQuery('.tipi-modal-bg .lwa-contents').find('a').attr('href','?page_id=1348001'); var id = ""; var zeentitle = 'Stylist'; jQuery('.single-format-video h1').after("


text:
Q: JavaScript Spring Batch SQl to XML insert a space between integers in zip code. Query returns xxxxxx and the xml needs xxx xxx Aa the title says, I'm writing a spring batch to run a sql query and write an overly comolicated xml.  One is for my zip code return.  The SQL database stores CA zip codes as xxxxxx but due to requirements, I need the zip code in the xml to write
xxx xxx
I can't figure out where I would add this function: my model class, or my writer, nor do I know how to write a function to do so.
Would I have to save the sql query to a csv then use an xmlwriter to accomplish this?

redpajama_set_name: RedPajamaStackExchange


With a lot of uncertainty surrounding the economic landscape in Britain in 2019, it should come as good news that the north of England is actually projected to experience an upswing in economic activity this year.
According to Dean Turner at the UK Investment Office of UBS Wealth Management, this will come to fruition if the UK is able to form a transitional arrangement with the European Union. Cities like Leeds have been attracting a great number of businesses, and that trend looks set to continue going into the new year.
The north of England has witnessed a number of returning businesses as well as online companies setting up physical locations in recent times. In 2016, Amazon set an example when it decided to open up a brick and mortar book store in Seattle's University Village. Whereas in the past, the future of retail was seen to be online, this move signified a switch in the other direction and suggested times might be changing. As the e-commerce world is becoming more and more overcrowded, online stores and businesses that branch out into real-world locations are benefiting.
This has been seen with the online bingo industry, a market which has positively boomed in the last five years. Buzz Bingo is a prime example of a bingo site which is expanding in the real world. The site attracts a lot of online players with its range of bingo games and slots, but now it is also looking to conquer other markets by branching out into physical locations. There are more than twenty Buzz Bingo halls in the UK now, with a number of those in the north of the country. Leeds, Bradford, Hull, Sheffield, and Wakefield all have fairly new Buzz Bingo spots for players who enjoy bingo in the more traditional way.
Another industry which is making a comeback to real-world locations is social networking. Since the advent of sites like Myspace and Facebook, people have been doing the bulk of their socialising in the online world. But places like board game cafes are trying to make social interaction a face-to-face occurrence like it was in the pre-internet days, and are finding great success from doing so.
The board game market is projected to be worth $8.12 billion in 2021 thanks to the rise of board game cafes, and the north of England is attracting a number of new operators. Geek Retreat is one such spot, which is a fairly new addition to the Leeds board game scene located in Central Arcade. Players can go and play war games and board games while socialising with other like-minded people.
A lot of new businesses setting up in the north of England are finding success, and this will doubtlessly attract other companies to the area. The fact that economists have predicted the region to flourish in the years to come will also be a contributing factor to its attractiveness for businesses.


With the Hello Side Chair, you can pull off one expression from the corporate cafe to the executive suite. Hello is versatile and it will re-energize your office.
Wood legs or wood front legs with metal rear legs.
Back Options include wood slat, wood perforated or upholstered.


Fashion jewelry,bracelets,body decors, bangles,earrings & tikkas.
Jumka earrings, pearl earrings, rhinestone sets, stone jewellry, Bangles, payaals, tikkas, bindia, dangles, kumkum, sindhur, henna, purses.
India accessories, fancy bangles, duppattas, necklaces, clothing, sarees, patiala kameez.
Gold Anklets: Anklets payaals or payals, silver and gold. anklets with gunguru .. Silver anklets.
Bindis-bindia: Fancy bindis, simple bindis and long bindis in gold, silver and a variety of other colors,Sometimes referred to as tikkas. But these are bindia,bindis, bindie.
Hoop Earrings Fancy Earrings with loop and some without. Both in silver and gold toned..earring with jumka, earring with crystals and more.Jumkai earrings.
Indian Jewelries : Large variety of chokers and necklaces. Jewellery for all occasions. In silver, gold, oxidized and more.Some sets come with matching bindi.
Evening Purses Fancy purses with beads, metallic, silver, Gold, Black, White and more..--out of stock.. Have available potilie purses.
Rings : Large selection of rings all are adjustable..Latest Fashion rings with big stones, Peacock Rings.
Clothing accessories Kurtis, blouses, duppattas,woolen shawls, pasmina shawl, and other fancy accessories, long Kurtis, Long Dresses.
Fashion Shawls Fancy woolen and pasmina shawls. Shawls with prints and various material, large shawls for men , mostly shawls for ladies from $14.99 to $34.99.
Prince Hats for men in a few colors. Wedding hats , Prince hats in medium sizes, also known as turbans or pugri. Plus designer style hats for gents.
Bangle Holder . A Fancy 16 spoke ring bangle holder. Can hold up to 16- 4 doz set bangles . Other styles available.
Petticoats : Ranging in sizes med and Large.Some with frill at the bottom. There are a large variety of colors to match or accent your saree .
Photo Gallery of various clothes and accessories. These are picture are to provide you a collection of different items. Some will be sold out. These are only sample , showing the kinds of goods we carry.