text:
<!doctype html>

<meta charset="utf-8">

<link rel="alternate" type="application/rss+xml" title="Default home feed" href="rss.xml"/>

<link rel="pingback" href="http://www.mirror.co.uk/xmlrpc"/>

<link rel="stylesheet" type="text/css" href="http://s.mirror.co.uk/skins/mirror/minified-code/1560299?v=63-1422547131" />

<link rel="stylesheet" type="text/css" href="http://s.mirror.co.uk/skins/mirror/minified-code/2936834?v=12-1422547131" />

<link rel="dns-prefetch" href="//s.mirror.co.uk">
<link rel="dns-prefetch" href="//i1.mirror.co.uk">
<link rel="dns-prefetch" href="//i2.mirror.co.uk">
<link rel="dns-prefetch" href="//i3.mirror.co.uk">
<link rel="dns-prefetch" href="//i4.mirror.co.uk">
<link rel="dns-prefetch" href="//community.mirror.co.uk">
<link rel="dns-prefetch" href="//images.mirror.co.uk">
<link rel="dns-prefetch" href="//videos.mirror.co.uk">

<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="All the latest news, sport and celebrity gossip at Mirror.co.uk. Get all the big headlines, pictures, analysis, opinion and video on the stories that matter to you." />
<title>Mirror Online: The intelligent tabloid. #madeuthink</title>

<link href="https://plus.google.com/u/0/b/105580316071937139547" rel="publisher" />

<meta property="fb:page_id" content="6149699161" />	<meta property="fb:app_id" content="123792601022133" />
<meta property="og:site_name" content="mirror"/>
<meta property="og:language" content="en"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="http://www.mirror.co.uk/"/>

<meta name="google-site-verification" content="Ggl6LltNAg5EqthLrEJRfgZQgqlFsUR27pAupuojTU0" />

<meta name="msvalidate.01" content="17DA4C91A126705A8B1E2A5FD7CAC9EF" />

<link rel="alternate" href="http://www.irishmirror.ie" hreflang="en-ie" />

Offers
Fantasy Football
Bingo
Dating
Jobs
Competitions
Horoscopes
Cartoons
Crosswords

Cookie Policy

Facebook
Twitter
GooglePlus
Newsletters

<form method="get" action="/search/simple.do">
<input type="hidden" name="destinationSectionId" value="219">
<input type="hidden" name="publicationName" value="mirror">
<input type="hidden" name="sortString" value="publishdate">
<input type="hidden" name="sortOrder" value="desc">
<input type="hidden" name="sectionId" value="69">
<input type="hidden" name="articleTypes" value=" news opinion advice">
<input type="hidden" name="pageNumber" value="1">
<input type="hidden" name="pageLength" value="5">
<input type="text" class="query-input" placeholder="Search" value="" name="searchString"><button type="submit" class="icon-search submit-button" title="Search mirror"></button>
</form>

All the January transfer moves & gossip

Mirror
Mirror

Subscriptions
Sign up now for
25% OFF

Most read

Live feeds

Top Videos

News

Sections
Latest News
UK News
World News
Weird News
Ampp3d
Crime
Real Life Stories
Health

Top News

Punch 4 Punch: Man charged with manslaughter after dad dies taking part in dangerous craze

Most Read in News

A man is selling his Lamborghini for just £4,000 - there's just one catch

Kendra Sunderland: Teenager 'arrested after making x-rated porn-style video in university library'

UK weather: Plummeting temperatures of -11C means it will be warmer inside FRIDGE

'I had sex with Dolly the dolphin in year-long affair after she SEDUCED me at theme park'

The fastest road marker in the world? Watch council worker paint white lines at high speed

Trending Today
Kendra Sunderland
Alan Barnes
Ched Evans
David Cameron
Russell Brand

Popular this week
General election
Anne Kirkbride
FGM
Blue Monday
Education

Politics

Football

Celebs

Sections
Latest Celebs
Celebrity News
US Gossip
Style
Weird Celeb News

Top Celebs

Fears for Whitney Houston's daughter Bobbi Kristina as she 'fights for her life' after being found unconscious in bath

Most Read in Celebs

Harry Styles throws star-studded 21st birthday with Cara Delevingne, David Beckham and Kendall Jenner on the guest list

Fears for Whitney Houston's daughter Bobbi Kristina as she 'fights for her life' after being found unconscious in bath

Gary Lineker's son George on beating leukaemia, living with a legend and having a "hot" stepmum

Bruce Jenner 'transitioning into a woman': Recap as Kardashians star's sex change is confirmed by family sources

Trending Today
Bruce Jenner
Kim Kardashian
Whitney Houston
Bobbi Kristina Brown
Gary Lineker

Popular this week
Anne Kirkbride dead
Critics Choice Awards
Celebrity Big Brother evictions
Josie Cunningham
Oscar nominations

TV & Film

Weird News

Trending
Sunday People
Bobbi Kristina
Ted Robbins
Super Bowl
ISIS
Transfer window

Sport

Sections
Latest Sport
Football
Formula 1
Boxing
Cricket
Horse Racing
Row Zed

Top Sport

Arsenal 5-0 Aston Villa: All smiles for Arsene Wenger

Most Read in Sport

Transfer news LIVE: The latest done deals, rumours and reaction including Marco Reus, Liverpool's late dash and more

West Ham defender Winston Reid set to move to London rivals Tottenham in the summer

Arsenal fan's innocent Instagram post accidentally becomes the funniest thing on the internet

Arsenal 5-0 Aston Villa: All smiles for Arsene Wenger after ruthless victory for the Gunners

Arsenal news and transfers: Marco Reus wants Arsenal move to work with Arsene Wenger?

Man United face having to accept David de Gea buy-out clause to get him to sign new deal

Trending Today
Zlatan Ibrahimovic
David de Gea
Winston Reid
Andy Murray
Novak Djokovic

Popular this week
Liverpool FC
Australian Open
Arsene Wenger
Brendan Rodgers

Technology

Money

Travel

Motoring

Your Account

Edit Profile

Logout

Man charged with manslaughter after dad dies taking part in dangerous 'Punch 4 Punch' craze

Video

Crime

<time datetime="2015-02-01T19:38+0000" pubdate="" data-stories-time="1422819488000">
01 Feb 2015
</time>

Tommy Main collapsed after trading heavy punches with another man in the violent 'game' during a birthday party last June

Young dad collapses and dies after playing internet craze 'Punch 4 Punch' at a party

<div class="article ma-teaser type-news clearfix medium-teaser first-medium-teaser" data-context="medium-teaser-4522493_0" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="0" data-title="Plummeting temperatures of -11C mean it will be warmer inside a FRIDGE than in the UK" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/uk-weather-plummeting-temperatures--11c-5086789","id": "5086789","galleryUrl": "http://www.mirror.co.uk/news/uk-news/uk-weather-plummeting-temperatures--11c-5086789"}'>

Plummeting temperatures of -11C mean it will be warmer inside a FRIDGE than in the UK

Weather

 The big freeze is set to continue all week, weathermen have warned, with more snow on the way

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522493_1" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="1" data-title="Mums are being 'forced into sex work to pay off loan debts by criminal gangs'" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/world-news/mums-being-forced-sex-work-5087126","id": "5087126","galleryUrl": "http://www.mirror.co.uk/news/world-news/mums-being-forced-sex-work-5087126"}'>

Mums are being 'forced into sex work to pay off loan debts by criminal gangs'

Crime

 Ruthless loan-shark gangs are exploiting penniless and vulnerable women, it has been reported

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522493_2" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="2" data-title=""I can't thank you enough": Disabled mugging victim meets kind-hearted stranger who set up fund to help him - as it hits a staggering £260,000" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/alan-barnes-fund-disabled-pensioner-5087646","id": "5087646","galleryUrl": "http://www.mirror.co.uk/news/uk-news/alan-barnes-fund-disabled-pensioner-5087646"}'>

"I can't thank you enough": Disabled mugging victim meets kind-hearted stranger who set up fund to help him - as it hits a staggering £260,000

Alan Barnes

exclusive

 Partially-sighted Mr Barnes was left with a broken collarbone and afraid to return home after being targeted

<div class="article ma-teaser type-news clearfix medium-teaser first-medium-teaser" data-context="medium-teaser-4522571_0" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="0" data-title="Martin Luther King's family 'have milked his legacy... he would feel betrayed by them'" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/world-news/martin-luther-kings-family-milked-5087665","id": "5087665","galleryUrl": "http://www.mirror.co.uk/news/world-news/martin-luther-kings-family-milked-5087665"}'>

Martin Luther King's family 'have milked his legacy... he would feel betrayed by them'

Martin Luther King

Martin Luther King died for his dream where people would be "free at last" but his family charge charge people huge sums to use his quotes

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522571_1" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="1" data-title="A man is selling his Lamborghini for just £4,000 - there's just one catch" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/world-news/man-selling-lamborghini-just-4000-5087060","id": "5087060","galleryUrl": "http://www.mirror.co.uk/news/world-news/man-selling-lamborghini-just-4000-5087060"}'>

A man is selling his Lamborghini for just £4,000 - there's just one catch

Lamborghini

 The sports car originally cost £186,000 but is now available at just a fraction of the price

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="0" data-title="Police confirm body found in search is missing mother-of-four Samantha Henderson" data-video-type="news" data-context="large-teaser-4523202_0" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/samantha-henderson-police-confirm-body-5087322","id": "5087322","galleryUrl": "http://www.mirror.co.uk/news/uk-news/samantha-henderson-police-confirm-body-5087322"}'>

Police confirm body found in search is missing mother-of-four Samantha Henderson

Her partner Dominic Isom has denied her murder and will go on trial for her alleged killing in July

updated

Samantha Henderson: Police searching for missing mother of four find body in lake

James Hilton missing: Fears grow after 39-year-old in 'distressed state of mind' disappears

<div class="article ma-teaser type-news clearfix medium-teaser first-medium-teaser" data-context="medium-teaser-4522494_0" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="0" data-title="Paedophile caught in vigilante 'sting' after he drove 300 miles to meet 14-year-old girl" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/paedophile-caught-vigilante-sting-after-5086329","id": "5086329","galleryUrl": "http://www.mirror.co.uk/news/uk-news/paedophile-caught-vigilante-sting-after-5086329"}'>

Paedophile caught in vigilante 'sting' after he drove 300 miles to meet 14-year-old girl

Crime

 Pervert Roger Lee was jailed for more than two years after he was trapped by a group calling themselves Dark Justice

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522494_1" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="1" data-title="British man wanted by Thai murder cops after bar girl found chopped into pieces in suitcase" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/british-man-wanted-thai-murder-5085692","id": "5085692","galleryUrl": "http://www.mirror.co.uk/news/uk-news/british-man-wanted-thai-murder-5085692"}'>

British man wanted by Thai murder cops after bar girl found chopped into pieces in suitcase

Murder

 Shane Looker is thought to have fled the country to Malaysia where police believe he was then trying to make his way to Ibiza

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522494_2" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="2" data-title="Police name 17-year-old boy stabbed to death in Enfield street" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/enfield-murder-police-name-17-year-old-5087613","id": "5087613","galleryUrl": "http://www.mirror.co.uk/news/uk-news/enfield-murder-police-name-17-year-old-5087613"}'>

Police name 17-year-old boy stabbed to death in Enfield street

Crime

 Shaquan Sammy-Plummer - known to his friends as Shaq - was found with stab wounds on Friday evening and died shortly afterwards

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522494_3" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="3" data-title="Drunk went 'on patrol' in town centre in friend's special constable uniform" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/drunk-went-on-patrol-town-5086970","id": "5086970","galleryUrl": "http://www.mirror.co.uk/news/uk-news/drunk-went-on-patrol-town-5086970"}'>

Drunk went 'on patrol' in town centre in friend's special constable uniform

Stupid criminals

 Michael Houlihan has been jailed for 14 months after he ordered a taxi driver driver to 'Take me home, I'm the law'

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="0" data-title="I refused to marry love of my life for 11 years - until I lost 8 STONE" data-video-type="news" data-context="large-teaser-4523208_0" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/real-life-stories/refused-marry-love-life-11-5087123","id": "5087123","galleryUrl": "http://www.mirror.co.uk/news/real-life-stories/refused-marry-love-life-11-5087123"}'>

I refused to marry love of my life for 11 years - until I lost 8 STONE

Unwilling to be a size 24 bride, Alex Hook kept her fiance waiting for their big day until she could conquer her weight problem

exclusive

Struggling to lose weight? You could be on the wrong diet - but help is here

Chatting online can help you lose weight

<div class="article ma-teaser type-news clearfix medium-teaser first-medium-teaser" data-context="medium-teaser-4522572_0" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="0" data-title="'I had sex with Dolly the dolphin in year-long affair after she SEDUCED me at theme park'" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/world-news/i-sex-dolly-dolphin-year-long-5084025","id": "5084025","galleryUrl": "http://www.mirror.co.uk/news/world-news/i-sex-dolly-dolphin-year-long-5084025"}'>

'I had sex with Dolly the dolphin in year-long affair after she SEDUCED me at theme park'

Weird sex

 Malcolm Brenner, 63, says the 'relationship' took place in Florida and has now given a graphic account of their romance and 'love making' in a new documentary

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522572_1" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="1" data-title="Twitter troll told to pay £10,000 after betting football club couldn't clear snow-covered pitch before game" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/twitter-troll-told-pay-10000-5087792","id": "5087792","galleryUrl": "http://www.mirror.co.uk/news/uk-news/twitter-troll-told-pay-10000-5087792"}'>

Twitter troll told to pay £10,000 after betting football club couldn't clear snow-covered pitch before game

Twitter

 The tweeter had taunted Ashton United fans, claiming their pitch wouldn't be fit for play - but they proved him wrong

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522572_2" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="2" data-title="The weirdest and most wonderful images caught on Google Street View around the world" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/world-news/google-street-view-weirdest-most-5083610","id": "5083610","galleryUrl": "http://www.mirror.co.uk/news/world-news/google-street-view-weirdest-most-5083610"}'>

The weirdest and most wonderful images caught on Google Street View around the world

Google Street View

 An escaped inmate, a penguin riding in a side car and a woman giving birth are just a few

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522572_3" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="3" data-title="Phoenix Nights' Ted Robbins' wife in hunt for audience doctor who saved his life as she reveals star is 'doing well' in hospital" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/tv/tv-news/ted-robbins-wife-hunt-doctor-5084349","id": "5084349","galleryUrl": "http://www.mirror.co.uk/tv/tv-news/ted-robbins-wife-hunt-doctor-5084349"}'>

Phoenix Nights' Ted Robbins' wife in hunt for audience doctor who saved his life as she reveals star is 'doing well' in hospital

Ted Robbins

updated

 The actor fell to the floor after appearing to clutch his chest during a solo performance

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="0" data-title="Schoolboy shoots his step-sister in the head after boasting of his hatred for her" data-video-type="news" data-context="large-teaser-4523217_0" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/real-life-stories/schoolboy-shoots-step-sister-head-after-5072073","id": "5072073","galleryUrl": "http://www.mirror.co.uk/news/real-life-stories/schoolboy-shoots-step-sister-head-after-5072073"}'>

Schoolboy shoots his step-sister in the head after boasting of his hatred for her

After teenager Levi Elliot told school friends he wouldn't care if his sister died, he made sure that it happened...

<div class="article ma-teaser type-news clearfix medium-teaser first-medium-teaser" data-context="medium-teaser-4522495_0" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="0" data-title="Jailed bank boss who ripped off customers to live high life ordered to pay back £73,000" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/jailed-bank-boss-who-ripped-5087419","id": "5087419","galleryUrl": "http://www.mirror.co.uk/news/uk-news/jailed-bank-boss-who-ripped-5087419"}'>

Jailed bank boss who ripped off customers to live high life ordered to pay back £73,000

Court case

Sarah Gibbs, 33, stole £275,000 – some of it from her own friends – and has been warned she will get an extra year in prison if she fails to repay HSBC

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522495_1" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="1" data-title="Dying teen fulfils wish to take girlfriend to prom after pals bring date forward following cancer diagnosis" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/jak-trueman-teen-terminal-cancer-5083218","id": "5083218","galleryUrl": "http://www.mirror.co.uk/news/uk-news/jak-trueman-teen-terminal-cancer-5083218"}'>

Dying teen fulfils wish to take girlfriend to prom after pals bring date forward following cancer diagnosis

Cancer

  After being told he has just a short time to live, Jak Trueman was determined to take Hannah Boyd to the school dance

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522495_2" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="2" data-title="Teen mental health patients put on ADULT wards because of bed shortage" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/nhs-crisis-teen-mental-health-5087474","id": "5087474","galleryUrl": "http://www.mirror.co.uk/news/uk-news/nhs-crisis-teen-mental-health-5087474"}'>

Teen mental health patients put on ADULT wards because of bed shortage

NHS

NHS England, a leaked email reveals, have told regional health bosses the shortage of beds is so bad that older teenagers are set to be admitted to adult wards

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522495_3" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="3" data-title="Elderly grandma 'beaten with hammer and chucked out of house by relatives' after husband died" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/world-news/elderly-grandma-beaten-hammer-chucked-5084930","id": "5084930","galleryUrl": "http://www.mirror.co.uk/news/world-news/elderly-grandma-beaten-hammer-chucked-5084930"}'>

Elderly grandma 'beaten with hammer and chucked out of house by relatives' after husband died

Crime

 The 70-year-old was allegedly told to find somewhere else to live by her son and grandson, and wandered the streets for three days before going to police

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522495_4" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="4" data-title="David Cameron's doctor brother-in-law warns of crisis in A&E" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/nhs-meltdown-david-camerons-doctor-5087386","id": "5087386","galleryUrl": "http://www.mirror.co.uk/news/uk-news/nhs-meltdown-david-camerons-doctor-5087386"}'>

David Cameron's doctor brother-in-law warns of crisis in A&E

NHS

Cardiologist Carl Brookes, who is married to the Tory leader's sister Tania, spoke of the "extraordinary" challenges faced by his own hospital

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="0" data-title="Beauty queen bullied over 'ugly ducking' looks has the last word with new campaign" data-video-type="news" data-context="large-teaser-4523270_0" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/real-life-stories/beauty-queen-bullied-over-ugly-5086603","id": "5086603","galleryUrl": "http://www.mirror.co.uk/news/real-life-stories/beauty-queen-bullied-over-ugly-5086603"}'>

Beauty queen bullied over 'ugly ducking' looks has the last word with new campaign

Self-confessed ugly duckling Skye Mitchell posted a picture of herself daubed in the vile and insulting words her tormentors used against her for years

<div class="article ma-teaser type-news clearfix medium-teaser first-medium-teaser" data-context="medium-teaser-4522580_0" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="0" data-title="'I'm no longer going to pose naked': Ex-Playboy girl turns her back on glamour modelling" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/ex-playboy-model-sophia-cahill-im-5084658","id": "5084658","galleryUrl": "http://www.mirror.co.uk/news/uk-news/ex-playboy-model-sophia-cahill-im-5084658"}'>

'I'm no longer going to pose naked': Ex-Playboy girl turns her back on glamour modelling

Playboy

 Former lover of Dane Bowers and Welsh rugby ace Ian Gough explains her change of heart, saying she is now a different person

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522580_1" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="1" data-title="Jim Davidson cancels comedy gig because the stage is too HIGH" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/celebrity-big-brothers-jim-davidson-5086375","id": "5086375","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/celebrity-big-brothers-jim-davidson-5086375"}'>

Jim Davidson cancels comedy gig because the stage is too HIGH

Jim Davidson

 The funnyman, 61, tweeted: "I have done 68 gigs since September and have not cancelled one! I just could not stand on a stage that high."

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522580_2" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="2" data-title="Queen 'phasing out' beloved corgis because she is worried about TRIPPING OVER them" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/queen-phasing-out-beloved-corgis-5086699","id": "5086699","galleryUrl": "http://www.mirror.co.uk/news/uk-news/queen-phasing-out-beloved-corgis-5086699"}'>

Queen 'phasing out' beloved corgis because she is worried about TRIPPING OVER them

The Queen

She once had eight corgis, bred from the first one, Susan, given to her at the age of 18, but she is worried pups could get under her feet

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522580_3" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="3" data-title="'Zombie' cat who clawed his way out of grave after he was hit by car now at centre of custody battle" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/world-news/zombie-cat-who-clawed-way-5085740","id": "5085740","galleryUrl": "http://www.mirror.co.uk/news/world-news/zombie-cat-who-clawed-way-5085740"}'>

'Zombie' cat who clawed his way out of grave after he was hit by car now at centre of custody battle

Cats

 Animal shelter says returning Bart to his owner would not be in the 'best interests of the cat' after questions were raised about his home environment

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522580_4" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="4" data-title="It's all kicking off! Uzbekistan under-22s prove themselves to be football's most violent team" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/sport/row-zed/its-kicking-off-uzbekistan-under-22s-5084792","id": "5084792","galleryUrl": "http://www.mirror.co.uk/sport/row-zed/its-kicking-off-uzbekistan-under-22s-5084792"}'>

It's all kicking off! Uzbekistan under-22s prove themselves to be football's most violent team

Funny football videos

A head-height kung-fu kick, a flurry of punches… anyone due to play Uzbekistan's under-22 side might want to watch this clip and quickly reconsider

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="0" data-title="Grandfather feared drowned at sea - after he was swept away while scattering sister's ashes" data-video-type="news" data-context="large-teaser-4523218_0" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/shane-galliers-first-picture-grandfather-5086907","id": "5086907","galleryUrl": "http://www.mirror.co.uk/news/uk-news/shane-galliers-first-picture-grandfather-5086907"}'>

Grandfather feared drowned at sea - after he was swept away while scattering sister's ashes

First picture emerges of Shane Galliers - hit by a wave while saying farewell to sister Michelle, who passed away in November

<div class="article ma-teaser type-news clearfix medium-teaser first-medium-teaser" data-context="medium-teaser-4522496_0" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="0" data-title="'I'll always feel I'm in my dad's shadow': Gary Lineker's son George on beating leukaemia and his 'hot' stepmum" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/gary-linekers-son-george-beating-5081818","id": "5081818","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/gary-linekers-son-george-beating-5081818"}'>

'I'll always feel I'm in my dad's shadow': Gary Lineker's son George on beating leukaemia and his 'hot' stepmum

George Lineker

exclusive

 The England football legend and Match of the Day anchor's oldest son tells of life with the legend

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522496_1" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="1" data-title="Vicar who posted conspiracy article blaming Israel for 9/11 attacks apologises" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/rev-stephen-sizer-vicar-probed-5087636","id": "5087636","galleryUrl": "http://www.mirror.co.uk/news/uk-news/rev-stephen-sizer-vicar-probed-5087636"}'>

Vicar who posted conspiracy article blaming Israel for 9/11 attacks apologises

9/11 attacks

 The Rev Stephen Sizer's Facebook post coincided with Holocaust Memorial Day and the 70th anniversary of liberation of Auschwitz

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522496_2" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="2" data-title="Ched Evans' rape victim is 'outed' online again as foreign news website posts her picture" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/ched-evans-rape-victim-outed-5081509","id": "5081509","galleryUrl": "http://www.mirror.co.uk/news/uk-news/ched-evans-rape-victim-outed-5081509"}'>

Ched Evans' rape victim is 'outed' online again as foreign news website posts her picture

Ched Evans

exclusive

 The woman, who is entitled to lifelong anonymity, has been in hiding and has had to move home five times

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522496_3" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="3" data-title="Mum-of-six with learning disabilities faces being sterilised after social services and medics forced entry to home and restrained her" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/mum-of-six-learning-disabilities-faces-being-5084084","id": "5084084","galleryUrl": "http://www.mirror.co.uk/news/uk-news/mum-of-six-learning-disabilities-faces-being-5084084"}'>

Mum-of-six with learning disabilities faces being sterilised after social services and medics forced entry to home and restrained her

Social services

 Officials say the woman's health and life could be at "grave" risk if action is not taken

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="0" data-title="Pale and drawn.. How Nigella has changed in just a month as TV series faces chop" data-video-type="news" data-context="large-teaser-4523272_0" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/nigella-lawson-looks-curve-free-pale-5081721","id": "5081721","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/nigella-lawson-looks-curve-free-pale-5081721"}'>

Pale and drawn.. How Nigella has changed in just a month as TV series faces chop

The TV cook, renowned for her shapely figure, appeared glum as she walked alone on her phone

exclusive

<div class="article ma-teaser type-news clearfix medium-teaser first-medium-teaser" data-context="medium-teaser-4522582_0" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="0" data-title="'George can do the London Marathon!' Prince Harry jokes Wills and Kate can push royal tot around course" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/prince-harry-jokes-training-prince-5086274","id": "5086274","galleryUrl": "http://www.mirror.co.uk/news/uk-news/prince-harry-jokes-training-prince-5086274"}'>

'George can do the London Marathon!' Prince Harry jokes Wills and Kate can push royal tot around course

Prince Harry

Watch Prince Harry visit the rugby training ground at Twickenham

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522582_1" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="1" data-title="Parents of siblings struck down with rare disease plan amazing bucket list for their children" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/parents-siblings-struck-down-rare-5086247","id": "5086247","galleryUrl": "http://www.mirror.co.uk/news/uk-news/parents-siblings-struck-down-rare-5086247"}'>

Parents of siblings struck down with rare disease plan amazing bucket list for their children

Health

Ellie Mae, six, and Caleb, four, are brother and sister from Leeds who have both been diagnosed with the extremely rare Late Infantile Batten Disease

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522582_2" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="2" data-title="Star Wars-themed funeral for brave Liverpool fan after he loses battle with cancer" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/star-wars-themed-funeral-brave-liverpool-5086518","id": "5086518","galleryUrl": "http://www.mirror.co.uk/news/uk-news/star-wars-themed-funeral-brave-liverpool-5086518"}'>

Star Wars-themed funeral for brave Liverpool fan after he loses battle with cancer

Star Wars

 Dad requested that mourners don't wear black to his funeral but instead celebrate his two big passions in life - Darth Vaders are not allowed, though

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4522582_3" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="3" data-title="Watch the amazing moment a live SNAKE is pulled out of a car engine" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/weird-news/watch-amazing-moment-live-snake-5085984","id": "5085984","galleryUrl": "http://www.mirror.co.uk/news/weird-news/watch-amazing-moment-live-snake-5085984"}'>

Watch the amazing moment a live SNAKE is pulled out of a car engine

Animals

 Stunned onlookers scream as the large serpent is pulled from the vehicle and stuffed into a sack

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="0" data-title="Watch shocking video of riots inside Brazil's most dangerous prison where gang killings are commonplace" data-video-type="news" data-context="large-teaser-4819943_0" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/world-news/watch-shocking-video-riots-inside-5080992","id": "5080992","galleryUrl": "http://www.mirror.co.uk/news/world-news/watch-shocking-video-riots-inside-5080992"}'>

Watch shocking video of riots inside Brazil's most dangerous prison where gang killings are commonplace

WARNING GRAPHIC IMAGES Gang warfare and overcrowding have produced violence, decapitations and disorder at the country's most notorious jail

<div class="article ma-teaser type-news clearfix medium-teaser first-medium-teaser" data-context="medium-teaser-4819958_0" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="0" data-title="Drug-addled patient who attacked A&E doctor and spat on nurse as cops arrested her avoids jail" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/drug-addled-patient-who-attacked-ae-5086450","id": "5086450","galleryUrl": "http://www.mirror.co.uk/news/uk-news/drug-addled-patient-who-attacked-ae-5086450"}'>

Drug-addled patient who attacked A&E doctor and spat on nurse as cops arrested her avoids jail

Hospitals

 The woman abused patients, including an 81-year-old during the rampage at a hospital in Manchester after an amphetamines binge

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4819958_1" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="1" data-title="Tory Education Secretary 'doesn't know what's going on in primary schools'" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/tory-education-secretary-doesnt-know-5087609","id": "5087609","galleryUrl": "http://www.mirror.co.uk/news/uk-news/tory-education-secretary-doesnt-know-5087609"}'>

Tory Education Secretary 'doesn't know what's going on in primary schools'

Schools

Labour's David Blunkett said her demands that all children aged 11, should know up to their 12 times table was already covered by a numeracy programme introduced in 1997

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4819958_2" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="2" data-title="Death row drugs mule gran launches desperate final plea for Bali pardon" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/death-row-drugs-mule-gran-5086511","id": "5086511","galleryUrl": "http://www.mirror.co.uk/news/uk-news/death-row-drugs-mule-gran-5086511"}'>

Death row drugs mule gran launches desperate final plea for Bali pardon

Lindsay Sandiford

Lindsay Sandiford, 57, could face a firing squad in weeks and has written to Foreign Secretary Philip Hammond ahead of his trip to Indonesia

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4819958_3" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="3" data-title="'Lost generation' don't even know how to SHAKE HANDS at a job interview, Barclays boss claims" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/lost-generation-dont-even-know-5086762","id": "5086762","galleryUrl": "http://www.mirror.co.uk/news/uk-news/lost-generation-dont-even-know-5086762"}'>

'Lost generation' don't even know how to SHAKE HANDS at a job interview, Barclays boss claims

Teenagers

Antony Jenkins said he was issuing a "call to arms" for parents and teachers to teach them the social skills needed for the world of work

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4819958_4" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="4" data-title="Teenage twins accused of tying up and robbing 'sugar daddy' pensioner could face life in prison" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/world-news/teenage-twins-accused-tying-up-5082717","id": "5082717","galleryUrl": "http://www.mirror.co.uk/news/world-news/teenage-twins-accused-tying-up-5082717"}'>

Teenage twins accused of tying up and robbing 'sugar daddy' pensioner could face life in prison

Court case

 But lawyers for Shalaine and Shaina Foster say 85-year-old Paul Aronson had been 'looking for action' with he met the underage girls

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="0" data-title="New cancer agony for ex-EastEnder Gillian Taylforth as lover battles same disease that killed ex" data-video-type="news" data-context="large-teaser-4819977_0" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/gillian-taylforth-cancer-shock-second-5080719","id": "5080719","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/gillian-taylforth-cancer-shock-second-5080719"}'>

New cancer agony for ex-EastEnder Gillian Taylforth as lover battles same disease that killed ex

Despite losing her mum and ex-partner Geoff Knights to cancer, the actress says she's been unfazed since Dave' Fairbairn's diagnosis

exclusive

<div class="article ma-teaser type-news clearfix medium-teaser first-medium-teaser" data-context="medium-teaser-4819986_0" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="0" data-title="Paul Lambert slams Aston Villa for "throwing in the towel" during 5-0 horror show at Arsenal" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/sport/football/news/paul-lambert-slams-aston-villa-5087202","id": "5087202","galleryUrl": "http://www.mirror.co.uk/sport/football/news/paul-lambert-slams-aston-villa-5087202"}'>

Paul Lambert slams Aston Villa for "throwing in the towel" during 5-0 horror show at Arsenal

Aston Villa FC

 The Villans have now played over 10 hours of football since their last Premier League goal and Lambert was brutal in his assessment

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4819986_1" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="1" data-title="'I was offered £10k for SEX': Stripper who danced for Russell Brand tells of indecent proposals" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/news/uk-news/i-offered-10k-sex-stripper-5083089","id": "5083089","galleryUrl": "http://www.mirror.co.uk/news/uk-news/i-offered-10k-sex-stripper-5083089"}'>

'I was offered £10k for SEX': Stripper who danced for Russell Brand tells of indecent proposals

Nudity

 Midlands beauty reveals she has also spurned advances of a Birmingham City footballer and a motor racing star who offered her £1,000 for a night of passion

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4819986_2" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="2" data-title="Benidorm's Tim Healy to marry girlfriend and ex-wife Denise Welch is invited" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/benidorms-tim-healy-marry-girlfriend-5081979","id": "5081979","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/benidorms-tim-healy-marry-girlfriend-5081979"}'>

Benidorm's Tim Healy to marry girlfriend and ex-wife Denise Welch is invited

Tim Healy

exclusive

 The Auf Wiedersehen Pet star, 63, popped the question to Joan Anderton, 53, last year in Turkey and is now making plans for the big day

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4819986_3" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="3" data-title="X Factor star Rebecca Ferguson's new heartache as boyfriend faces drug dealing trial" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/x-factor-star-rebecca-fergusons-5081431","id": "5081431","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/x-factor-star-rebecca-fergusons-5081431"}'>

X Factor star Rebecca Ferguson's new heartache as boyfriend faces drug dealing trial

Rebecca Ferguson

exclusive

 Karl Dures, father of two of her children, will be tried on April 9 on charges of possessing the Class B drug mephedrone with intent to supply

<div class="article ma-teaser type-news clearfix medium-teaser " data-context="medium-teaser-4819986_4" data-friendly-name="Medium Teaser Link Click" data-max-times-to-track-links="5" data-index="4" data-title="If a referee wants to talk to Zlatan then the referee must go to Zlatan" data-video-type="news" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/sport/row-zed/referee-wants-talk-zlatan-referee-5080570","id": "5080570","galleryUrl": "http://www.mirror.co.uk/sport/row-zed/referee-wants-talk-zlatan-referee-5080570"}'>

If a referee wants to talk to Zlatan then the referee must go to Zlatan

Zlatan Ibrahimovic

Zlatan lives life by his own rules, he does NOT like people wasting his time and he most certainly will not walk over to talk to a ref referee

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="0" data-title="Fears for Whitney's girl Bobbi Kristina as she 'fights for her life'" data-video-type="news" data-context="large-teaser-4523282_0" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/fears-whitney-houstons-daughter-bobbi-5087417","id": "5087417","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/fears-whitney-houstons-daughter-bobbi-5087417"}'>

Fears for Whitney's girl Bobbi Kristina as she 'fights for her life'

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="1" data-title="Harry Styles parties with Kendall, Cara and David Beckham for 21st" data-video-type="news" data-context="large-teaser-4523282_1" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/harry-styles-throws-star-studded-21st-5086722","id": "5086722","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/harry-styles-throws-star-studded-21st-5086722"}'>

Harry Styles parties with Kendall, Cara and David Beckham for 21st

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="2" data-title="It's a boy! Dawn O'Porter and Chris O'Dowd announce baby news" data-video-type="news" data-context="large-teaser-4523282_2" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/dawn-oporter-chris-odowd-welcome-5087833","id": "5087833","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/dawn-oporter-chris-odowd-welcome-5087833"}'>

It's a boy! Dawn O'Porter and Chris O'Dowd announce baby news

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="3" data-title="Scarlett Johansson praises "shockingly handsome" Chris Hemsworth" data-video-type="news" data-context="large-teaser-4523282_3" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/scarlett-johansson-says-avengers-co-star-5087376","id": "5087376","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/scarlett-johansson-says-avengers-co-star-5087376"}'>

Scarlett Johansson praises "shockingly handsome" Chris Hemsworth

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="4" data-title="Phil Tufnell and Dom Parker eliminated from The Jump" data-video-type="news" data-context="large-teaser-4523282_4" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/tv/tv-news/jump-2015-phil-tufnell-dom-5087536","id": "5087536","galleryUrl": "http://www.mirror.co.uk/tv/tv-news/jump-2015-phil-tufnell-dom-5087536"}'>

Phil Tufnell and Dom Parker eliminated from The Jump

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="5" data-title="Who copied who? Zayn Malik and Kelly Osbourne are hair twins" data-video-type="news" data-context="large-teaser-4523282_5" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/zayn-malik-kelly-osbourne-send-5087651","id": "5087651","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/zayn-malik-kelly-osbourne-send-5087651"}'>

Who copied who? Zayn Malik and Kelly Osbourne are hair twins

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="6" data-title="Miranda Kerr strips down to flaunt her bloomin' stunning curves" data-video-type="news" data-context="large-teaser-4523282_6" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/miranda-kerr-strips-down-flaunt-5086267","id": "5086267","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/miranda-kerr-strips-down-flaunt-5086267"}'>

Miranda Kerr strips down to flaunt her bloomin' stunning curves

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="7" data-title="'Enough!': Katie Hopkins blasts Pricey and Cami-Li over explicit sex chats" data-video-type="news" data-context="large-teaser-4523282_7" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/tv/tv-news/celebrity-big-brother-katie-hopkins-5085628","id": "5085628","galleryUrl": "http://www.mirror.co.uk/tv/tv-news/celebrity-big-brother-katie-hopkins-5085628"}'>

'Enough!': Katie Hopkins blasts Pricey and Cami-Li over explicit sex chats

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="8" data-title="Bobbi Kristina's family "praying for a speedy recovery" for her" data-video-type="news" data-context="large-teaser-4523282_8" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/family-praying-speedy-recovery-bobbi-5087256","id": "5087256","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/family-praying-speedy-recovery-bobbi-5087256"}'>

Bobbi Kristina's family "praying for a speedy recovery" for her

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="9" data-title="Harry Styles turns 21: The most outrageous rumours about the 1D star" data-video-type="news" data-context="large-teaser-4523282_9" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/one-directions-harry-styles-turned-5087739","id": "5087739","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/one-directions-harry-styles-turned-5087739"}'>

Harry Styles turns 21: The most outrageous rumours about the 1D star

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="10" data-title="Pregnant Billi Mucklow shows off growing bump in bikini on her babymoon" data-video-type="news" data-context="large-teaser-4523282_10" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/pregnant-billi-mucklow-flashes-growing-5086463","id": "5086463","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/pregnant-billi-mucklow-flashes-growing-5086463"}'>

Pregnant Billi Mucklow shows off growing bump in bikini on her babymoon

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="11" data-title="Did Nicki Minaj accuse her ex-boyfriend of cheating live on stage?" data-video-type="news" data-context="large-teaser-4523282_11" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/nicki-minaj-accuse-ex-boyfriend-safaree-5087336","id": "5087336","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/nicki-minaj-accuse-ex-boyfriend-safaree-5087336"}'>

Did Nicki Minaj accuse her ex-boyfriend of cheating live on stage?

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="12" data-title="Coronation Street cast want public memorial service for Anne Kirkbride" data-video-type="news" data-context="large-teaser-4523282_12" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/coronation-street-cast-hoping-public-5086298","id": "5086298","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/coronation-street-cast-hoping-public-5086298"}'>

Coronation Street cast want public memorial service for Anne Kirkbride

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="13" data-title=""It's hardcore girls!" Lucy Mecklenburgh is proud of her perfect abs" data-video-type="news" data-context="large-teaser-4523282_13" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/lucy-mecklenburgh-shows-perfect-abs-5086721","id": "5086721","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/lucy-mecklenburgh-shows-perfect-abs-5086721"}'>

"It's hardcore girls!" Lucy Mecklenburgh is proud of her perfect abs

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="14" data-title="Simon Cowell 'collapses after being hypnotised by a DOG on BGT'" data-video-type="news" data-context="large-teaser-4523282_14" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/tv/tv-news/simon-cowell-collapses-after-being-5085583","id": "5085583","galleryUrl": "http://www.mirror.co.uk/tv/tv-news/simon-cowell-collapses-after-being-5085583"}'>

Simon Cowell 'collapses after being hypnotised by a DOG on BGT'

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="15" data-title="Perez says everyone hating him is "traumatic" - too late?" data-video-type="news" data-context="large-teaser-4523282_15" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/tv/tv-news/perez-says-everyone-hating-him-5085490","id": "5085490","galleryUrl": "http://www.mirror.co.uk/tv/tv-news/perez-says-everyone-hating-him-5085490"}'>

Perez says everyone hating him is "traumatic" - too late?

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="16" data-title="Danielle Lloyd shows off endless legs in white mini dress" data-video-type="news" data-context="large-teaser-4523282_16" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/danielle-lloyd-shows-legs-days-5083325","id": "5083325","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/danielle-lloyd-shows-legs-days-5083325"}'>

Danielle Lloyd shows off endless legs in white mini dress

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="17" data-title="Kim Kardashian showers "snuggle bear" North with kisses" data-video-type="news" data-context="large-teaser-4523282_17" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/kim-kardashian-plants-kisses-snuggle-5083103","id": "5083103","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/kim-kardashian-plants-kisses-snuggle-5083103"}'>

Kim Kardashian showers "snuggle bear" North with kisses

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="18" data-title="Dane Bowers on the terrifying night Katie Price overdosed" data-video-type="news" data-context="large-teaser-4523282_18" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/dane-bowers-katie-price-attempted-5082568","id": "5082568","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/dane-bowers-katie-price-attempted-5082568"}'>

Dane Bowers on the terrifying night Katie Price overdosed

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="19" data-title="John Legend's wife Chrissy Teigen wows in daring thigh-split skirt" data-video-type="news" data-context="large-teaser-4523282_19" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/john-legends-wife-chrissy-teigen-5085033","id": "5085033","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/john-legends-wife-chrissy-teigen-5085033"}'>

John Legend's wife Chrissy Teigen wows in daring thigh-split skirt

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="0" data-title="Bruce Jenner couldn't look happier as 'sex change' news emerges" data-video-type="news" data-context="large-teaser-4820362_0" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/bruce-jenner-is-changing-woman-5082809","id": "5082809","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/bruce-jenner-is-changing-woman-5082809"}'>

Bruce Jenner couldn't look happier as 'sex change' news emerges

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="1" data-title="Grumpy Kanye is back! Rapper fails to raise a smile" data-video-type="news" data-context="large-teaser-4820362_1" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/grumpy-kanye-west-back-rapper-5083800","id": "5083800","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/grumpy-kanye-west-back-rapper-5083800"}'>

Grumpy Kanye is back! Rapper fails to raise a smile

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="2" data-title="What to expect from Katy Perry's Super Bowl performance" data-video-type="news" data-context="large-teaser-4820362_2" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/katy-perry-super-bowl-what-5072438","id": "5072438","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/katy-perry-super-bowl-what-5072438"}'>

What to expect from Katy Perry's Super Bowl performance

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="3" data-title="Justin Timberlake confirms Jessica Biel is expecting with sweet photo" data-video-type="news" data-context="large-teaser-4820362_3" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/justin-timberlake-confirms-wife-jessica-5082348","id": "5082348","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/justin-timberlake-confirms-wife-jessica-5082348"}'>

Justin Timberlake confirms Jessica Biel is expecting with sweet photo

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="4" data-title="Is this Brit model Kelly Brook's hunky new boyfriend?" data-video-type="news" data-context="large-teaser-4820362_4" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/kelly-brook-new-boyfriend-model-5082387","id": "5082387","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/kelly-brook-new-boyfriend-model-5082387"}'>

Is this Brit model Kelly Brook's hunky new boyfriend?

<div class="article lg-teaser type-news lc-teaser clearfix " data-index="5" data-title="Whitney Houston's daughter Bobbi Kristina Brown rushed to hospital" data-video-type="news" data-context="large-teaser-4820362_5" data-friendly-name="Large Teaser Link Click" data-max-times-to-track-links="5" data-widget="tm.omniture.omniLinkTracking " data-config='{"url": "http://json.mirror.co.uk/3am/celebrity-news/live-updates-whitney-houstons-daughter-5080712","id": "5080712","galleryUrl": "http://www.mirror.co.uk/3am/celebrity-news/live-updates-whitney-houstons-daughter-5080712"}'>

null

Whitney Houston's daughter Bobbi Kristina Brown rushed to hospital

Sport

updated

Arsenal 5-0 Aston Villa: All smiles for Arsene Wenger

Video

Arsenal FC

The Gunners hit five against a miserable Villa side with Mesut Ozil shining and Theo Walcott back among the goals at the Emirates Stadium

Arsenal new boy Gabriel Paulista believes move can help make his Brazil dream come true

Arsenal news and transfers: Marco Reus wants Arsenal move to work with Arsene Wenger?

Lewis Hamilton confirms talks over new £90m Mercedes deal have started

Lewis Hamilton

"It's not something I have to rush to satisfy anyone else. In the near future it will be sorted" says world champ. Plus: The only trophy in star's home ISN'T from F1

Australian Open 2015: Novak Djokovic beats Andy Murray in four sets to win fifth Melbourne crown

Australian Open

updated

After the first two sets went to a tie-break, the quality of the Serbian shone through as he claimed his fifth Australian Open championship

England thumped by Australia in final of ODI Tri Series as Mitchell Johnson runs riot

England Cricket Team

England got themselves into a strong position at the break but a dismal batting display saw the tourists beaten soundly

West Ham defender Winston Reid set to move to London rivals Tottenham

Winston Reid

exclusive

The defender will head to White Hart Lane on a lucrative Bosman free transfer after snubbing various offers of a new deal with the Hammers

Dougie Freedman named new manager of Nottingham Forest

Nottingham Forest FC

The former Crystal Palace and Bolton Wanderers boss returns to the City Ground, where he spent time as a player between 1998-2000

Southampton 0-1 Swansea: Jonjo Shelvey nets only goal for away side

Southampton FC

The home side dominated for large periods at St. Mary's but could not break their opponents down before Shelvey's smash-and-grab raid

Weird News

Drunk went 'on patrol' in town centre in friend's special constable uniform

Stupid criminals

Michael Houlihan has been jailed for 14 months after he ordered a taxi driver driver to 'Take me home, I'm the law'

Dopey criminal uses world's worst robbery disguise to hold up his local bookies

Watch bungling burglar who took TAXI between robberies forget to put on balaclava before raid

'Zombie' cat who clawed his way out of grave after he was hit by car now at centre of custody battle

Cats

Animal shelter says returning Bart to his owner would not be in the 'best interests of the cat' after questions were raised about his home environment

Watch the amazing moment a live SNAKE is pulled out of a car engine

Video

Animals

Stunned onlookers scream as the large serpent is pulled from the vehicle and stuffed into a sack

Star Wars fan spends 65 hours creating Darth Vader helmet using 1,000 GUMMY BEARS

Star Wars

Artist Crummy Gummy painstakingly created the life-size mask, which will now go on display at galleries across America after building a Gladiator-style headpiece

Google Street View: The weirdest and most wonderful images caught on camera around the world

Google Street View

A Russian man chasing a bear, an escaped inmate, a penguin riding in a side car and a woman giving birth are just a few of things going on

'I had sex with Dolly the dolphin in year-long affair after she SEDUCED me at theme park'

Weird sex

Malcolm Brenner, 63, says the 'relationship' took place in Florida and has now given a graphic account of their romance and 'love making' in a new documentary

Police officer seizes pot - only it was POT POURRI and not a stash of drugs

Police

The officer rushed 10 strongly-smelling boxes to his station after they were reported at a sorting office in Stafforshire

Today's newspaper free on iPad & Android

Download to your tablet here >

Most Read

Lamborghini

A man is selling his Lamborghini for just £4,000 - there's just one catch

Kendra Sunderland

Kendra Sunderland: Teenager 'arrested after making x-rated porn-style video in university library'

Weather

UK weather: Plummeting temperatures of -11C means it will be warmer inside FRIDGE

Weird sex

'I had sex with Dolly the dolphin in year-long affair after she SEDUCED me at theme park'

January transfer window

Transfer news LIVE: The latest done deals, rumours and reaction including Marco Reus, Liverpool's late dash and more

TV

exclusive

EastEnders' Pam St Clement: My lonely, miserable childhood influenced my love life - and my weight

Pam St Clement

In the final extract from her revealing autobiography, The End of an Earring, EastEnders star Pam St Clement describes the turbulent childhood which shaped her life

Pam St Clement: EastEnders promised Pat wouldn't be killed off - I felt empty and let down

EastEnders Pam St Clement: 'I had a lesbian affair behind my husband's back'

The Jump 2015: Phil Tufnell and Dom Parker eliminated as Louie Spence beats Mike Tindall

The Jump

Tiny dancer Louie Spence somehow managed to beat Mike Tindall on the skeleton

Celebrity Big Brother Freak Show: Michelle Visage's psychic energy gives Katie Price a few home truths

Celebrity Big Brother

You can always count on the RuPaul's Drag Race star to tell it how it is

Celebrity Big Brother: Perez Hilton tries to stir up drama with 'excluded' Katie Price and Keith Chegwin

Video

Perez Hilton in Celebrity Big Brother

With Nadia gone, Perez has a vacancy for some house allies so what better way to do it than tell them they've all been excluded?

Celebrity Big Brother: Katie Hopkins is over CBB sex chats after hearing quite enough of them

Star Wars fan spends 65 hours creating Darth Vader helmet using 1,000 GUMMY BEARS

Katie Hopkins blasts Katie Price after she says she caught an ex in bed with someone else

Simon Cowell 'collapses after being hypnotised by a DOG on Britain's Got Talent'

Money

'Lost generation' don't even know how to SHAKE HANDS at a job interview, Barclays boss claims

Teenagers

Antony Jenkins said he was issuing a "call to arms" for parents and teachers to teach them the social skills needed for the world of work

Are chocolate bars getting smaller? It's all down to dark art of 'shrinkflation', say experts

Pension pot hunt fund to help millions trace lost money to be massively expanded

When the sales are just a cheap stunt

Plastic leads the way in 2015 as card payments set to overtake cash

Travel

Gatwick Airport set for big changes in 2016 as BA and easyJet move terminals in £2.2bn upgrade

Gatwick Airport

North gets world's largest self-service bag drop and new security area, while South will have automated security and queue-busting immigration lanes

Where are we? Win a travel guide if you can identify the location of our mystery picture

Affordable Ireland: Cash in on the weak Euro to enjoy a trip to the Emerald Isle

Holiday deals of the week: Last minute bargain sunshine holidays, cottages, theatre and USA breaks

Wish you were here: Fuerteventura is the place for sunshine and surfing

Madrid is the Real deal for a city break whether you like football or not

Top 10 Valentine's breaks: Holiday deals and ideas for that perfect romantic getaway

Most recent

Government cuts

Tory RAF cuts 'create risk to force readiness' as flight and aircraft numbers plummet

Pam St Clement

EastEnders' Pam St Clement: My lonely, miserable childhood influenced my love life - and my weight

James Bulger

James Bulger's mum wants Jon Venables back in jail for blaming HER for tot's murder

Lewis Hamilton

Lewis Hamilton confirms contract talks over new £90million Mercedes deal have started

Football League One

Is this Italian reality show lip-synching the cringiest video ever filmed at a League One ground?

View:

Desktop

Mobile

Find a job

Find a home

Find a new home

Find a local business

About Us

Contact Us

Sell Your Story

How to Complain

Corrections & Clarifications

Google Survey

Privacy Statement

Cookie Policy

Terms and Conditions

Paper Subscription to the Daily Mirror

Paper Subscription to the Sunday Mirror

Irish Mirror

News

UK News

Politics

World news

Weird News

Crime

Real Life Stories

Technology

Play

Bingo

Casino

Crosswords

Competitions

Dating

Poker

Sport

Football

Formula 1

Boxing

Tennis

Rugby League

Rugby Union

Cricket

Golf

Horse racing

Other Sports

Fantasy Football

TV

TV News

TV Previews

TV Reviews

Celebs

Celebrity News

US gossip

Style

TV & film news

Weird celeb news

Money

City News

Personal finance

Jobs

Quids In

Opinion

News Opinion

Sport Opinion

3am Opinion

Lifestyle Opinion

Lifestyle

Health

Horoscopes

Staying in

Going out

Reader Offers

Sex & Relationships

Dieting

Cartoons

Family

Gardening

Travel

Motoring


text:
define(['chimera/tabs', 'chimera/global'], function (Tabs, Chi) {

  return describe('Chimera Tabs', function () {

    var countKey = 'tabCount';

    beforeEach(function () {
      localStorage.removeItem('tabs');
      sessionStorage.removeItem('tabId');
    });

    afterEach(function () {
      Chi.clearProfiles();
    });

    it('should increment when loaded', function () {
      Tabs.addTab();
      expect(Tabs.tabCount()).toEqual(1);
    });

    it('should decrement when unloaded', function () {
      Tabs.addTab();
      Tabs.removeTab();
      expect(Tabs.tabCount()).toEqual(0);
    });

    it('should decrement when unload is triggered', function () {
      Tabs.addTab();
      $(window).trigger('unload');
      expect(Tabs.tabCount()).toEqual(0);
    });

    it('should persist tab ID across refreshes', function () {
      Tabs.addTab();
      var tabId = sessionStorage.getItem('tabId');
      // simulate refresh
      Tabs.removeTab();
      Tabs.addTab();
      expect(sessionStorage.getItem('tabId') === tabId).toBe(true);
    });

    it('should accurately reflect reloads', function () {
      Tabs.addTab();
      expect(Tabs.tabCount()).toEqual(1);

      // page loaded, simulate 1 refresh.
      Tabs.removeTab();
      Tabs.addTab();
      expect(Tabs.tabCount()).toEqual(1);

      // simulate another refresh
      Tabs.removeTab();
      Tabs.addTab();
      expect(Tabs.tabCount()).toEqual(1);
    });

    it('should not log someone out if they refresh in a single tab', function () {
      Tabs.addTab();
      Chi.loginProfile();
      // tab loaded, simulate 1 refresh.
      Tabs.removeTab();
      Tabs.addTab();
      expect(Chi.currentProfile.active()).toBe(true);
    });

    describe('while logged in after closing last tab', function () {
      beforeEach(function () {
        Chi.loginProfile();
        Tabs.addTab();
        Tabs.removeTab();
      });

      it('user should be logged out', function () {
        Tabs.addTab();
        expect(Chi.currentProfile.active()).toBe(false);
      });
    });
  });
});

redpajama_set_name: RedPajamaGithub


text:
class CheckingHelper
{
public:
	inline CheckingHelper() :
		initState(false)
	{}
	inline virtual ~CheckingHelper() {}

	inline void resetInitState() {
		this->initState = this->testChecked();
	}
	virtual void doCheck() = 0;
	inline bool checkedChanged() const {
		return this->initState != this->testChecked();
	}
	virtual bool testChecked() const = 0;
	virtual void disableLabel() = 0;

private:
	bool initState;
};

class CheckingLabel : public QLabel, public CheckingHelper
{
public:
	inline CheckingLabel(QWidget *parent = nullptr) :
		QLabel(parent),
		CheckingHelper()
	{}

	inline void doCheck() override {}

	inline bool testChecked() const override {
		return true;
	}

	inline void disableLabel() override {
		this->setEnabled(false);
	}
};

class CheckingCheckBox : public QCheckBox, public CheckingHelper
{
public:
	inline CheckingCheckBox(QWidget *parent = nullptr) :
		QCheckBox(parent),
		CheckingHelper()
	{}

	inline void doCheck() override {
		this->setChecked(true);
	}

	inline bool testChecked() const override {
		return this->isChecked();
	}

	inline void disableLabel() override {
		this->setEnabled(false);
	}
};

class GroupCheckingHelper : public CheckingHelper
{
public:
	inline GroupCheckingHelper(QSettingsGroupWidgetBase *element, QSharedPointer<QSettingsEntry> entry) :
		CheckingHelper(),
		element(element),
		entry(entry)
	{
		QObject::connect(element->asWidget(), &QWidget::destroyed, [this](){
			delete this;
		});
	}

	inline void doCheck() override {
		this->element->setEntryChecked(this->entry, true);
		this->element->setChecked(true);
	}

	inline bool testChecked() const override {
		if(this->element->isChecked())
			return this->element->isEntryChecked(this->entry);
		else
			return false;
	}

	inline void disableLabel() override {
		this->element->setEntryLabelEnabled(this->entry, false);
	}

private:
	QSettingsGroupWidgetBase *element;
	QSharedPointer<QSettingsEntry> entry;
};

#endif // CHECKINGHELPER_H


text:
package main

//AddGroup Add group to datastore
func (ds *DoitServer) AddGroup(d *Domain, name string) (g *Group, err error) {
	domain, err := ds.GetDomain(d.ID)
	if err != nil {
		return g, err
	}
	g = &Group{Name: name, Domain: domain}
	ds.Store.Conn.NewRecord(g)
	gormErr := ds.Store.Conn.Create(&g)
	return g, gormErr.Error
}

//AddGroupVars Add new Vars to Host
func (ds *DoitServer) AddGroupVars(d *Domain, id int, vars ...Var) error {
	domain, err := ds.GetDomain(d.ID)
	if err != nil {
		return err
	}
	g, err := ds.GetGroup(domain, id)
	if err != nil {
		return err
	}
	gormErr := ds.Store.Conn.Model(&g).Association("Vars").Append(&vars)
	return gormErr.Error
}

//RemoveGroupVars Remove Vars from Host
func (ds *DoitServer) RemoveGroupVars(d *Domain, id int, vars ...Var) error {
	domain, err := ds.GetDomain(d.ID)
	if err != nil {
		return err
	}
	g, err := ds.GetGroup(domain, id)
	if err != nil {
		return err
	}
	gormErr := ds.Store.Conn.Model(&g).Association("Vars").Delete(&vars)
	if gormErr != nil {
		return gormErr.Error
	}
	return nil
}

//AddGroupHosts Add new Vars to Host
func (ds *DoitServer) AddGroupHosts(d *Domain, id int, hosts ...Host) error {
	domain, err := ds.GetDomain(d.ID)
	if err != nil {
		return err
	}
	g, err := ds.GetGroup(domain, id)
	if err != nil {
		return err
	}
	gormErr := ds.Store.Conn.Model(&g).Association("Hosts").Append(hosts)
	return gormErr.Error
}

//RemoveGroupHosts Remove Vars from Host
func (ds *DoitServer) RemoveGroupHosts(d *Domain, id int, hosts ...Host) error {
	domain, err := ds.GetDomain(d.ID)
	if err != nil {
		return err
	}
	g, err := ds.GetGroup(domain, id)
	if err != nil {
		return err
	}
	gormErr := ds.Store.Conn.Model(&g).Association("Hosts").Delete(&hosts)
	if gormErr != nil {
		return gormErr.Error
	}
	return nil
}

//AddGroupDomains Add new Vars to Host
func (ds *DoitServer) AddGroupDomains(d *Domain, id int, domains ...Domain) error {
	domain, err := ds.GetDomain(d.ID)
	if err != nil {
		return err
	}
	g, err := ds.GetGroup(domain, id)
	if err != nil {
		return err
	}
	gormErr := ds.Store.Conn.Model(&g).Association("Domains").Append(domains)
	return gormErr.Error
}

//RemoveGroupDomains Remove Vars from Host
func (ds *DoitServer) RemoveGroupDomains(d *Domain, id int, domains ...Domain) error {
	domain, err := ds.GetDomain(d.ID)
	if err != nil {
		return err
	}
	g, err := ds.GetGroup(domain, id)
	if err != nil {
		return err
	}
	gormErr := ds.Store.Conn.Model(&g).Association("Domains").Delete(&domains)
	if gormErr != nil {
		return gormErr.Error
	}
	return nil
}

//RemoveGroup Remove group and its relationships to other objects
func (ds *DoitServer) RemoveGroup(d *Domain, group *Group) error {
	domain, err := ds.GetDomain(d.ID)
	if err != nil {
		return err
	}
	g, err := ds.GetGroup(domain, group.ID)
	if err != nil {
		return err
	}
	if len(g.Vars) > 0 {
		gormErr := ds.Store.Conn.Model(&g).Association("Vars").Delete(&g.Vars)
		if gormErr.Error != nil {
			return gormErr.Error
		}
	}
	if len(g.Hosts) > 0 {
		gormErr := ds.Store.Conn.Model(&g).Association("Hosts").Delete(&g.Hosts)
		if gormErr.Error != nil {
			return gormErr.Error
		}
	}
	hostErr := ds.Store.Conn.Delete(&g)
	if hostErr.Error != nil {
		return hostErr.Error
	}
	return nil
}

//GetGroup Get Var from datastore
func (ds *DoitServer) GetGroup(d *Domain, id int) (*Group, error) {
	g := &Group{ID: id, Domain: d}
	gormErr := ds.Store.Conn.First(&g).Related(&g.Vars, "Vars").Related(&g.Hosts, "Hosts")
	if gormErr.Error != nil {
		return nil, gormErr.Error
	}
	return g, nil
}

//GetGroupByName Get host from datastore
func (ds *DoitServer) GetGroupByName(d *Domain, name string) (*Group, error) {
	g := &Group{Name: name, Domain: d}
	gormErr := ds.Store.Conn.Where("name = ? and domain_id = ?", name, d.ID).First(&g).Related(&g.Vars, "Vars").Related(&g.Hosts, "Hosts")
	if gormErr.Error != nil {
		return nil, gormErr.Error
	}
	return g, nil
}

//GetGroupsByDomain Get Var from datastore
func (ds *DoitServer) GetGroupsByDomain(d *Domain) ([]*Group, error) {
	g := []*Group{}
	gormErr := ds.Store.Conn.Find(&g).Related("Vars").Related("Hosts")
	if gormErr.Error != nil {
		return nil, gormErr.Error
	}
	return g, nil
}


text:
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)

if System.get_property('platform') != 'ANDROID'
ruby_version_is '1.8.7' do
  describe "IO#lines" do
    before :each do
      @io = IOSpecs.io_fixture "lines.txt"
    end

    after :each do
      @io.close unless @io.closed?
    end

    it "returns an Enumerator" do
      @io.lines.should be_an_instance_of(enumerator_class)
    end

    it "returns a line when accessed" do
      enum = @io.lines
      enum.first.should == IOSpecs.lines[0]
    end

    ruby_version_is ''...'1.9' do
      it "ignores a given block" do
        @io.lines{ raise "oups" }.should be_an_instance_of(enumerator_class)
      end
    end

    ruby_version_is '1.9' do
      it "yields each line to the passed block" do
        ScratchPad.record []
        @io.lines { |s| ScratchPad << s }
        ScratchPad.recorded.should == IOSpecs.lines
      end
    end
  end
end
end


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sba.lib.gui.bean;

import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import javax.swing.JButton;
import javax.swing.JPasswordField;
import sba.lib.DLibConsts;
import sba.lib.gui.DGuiConsts;
import sba.lib.gui.DGuiValidation;
import sba.lib.gui.DGuiField;
import sba.lib.gui.DGuiFieldText;

/**
 *
 * @author Sergio Flores
 */
public class DBeanFieldPassword extends JPasswordField implements DGuiFieldText {

    protected String msFieldName;
    protected String msDefaultValue;
    protected int mnMinLength;
    protected int mnMaxLength;
    protected int mnTextCaseType;
    protected DGuiField moNextField;
    protected JButton moNextButton;
    protected JButton moFormButton;
    protected int mnTab;

    public DBeanFieldPassword() {
        msFieldName = "";
        msDefaultValue = "";
        mnMinLength = 1;
        mnMaxLength = 16;
        mnTextCaseType = DLibConsts.UNDEFINED;
        moNextField = null;
        moNextButton = null;
        moFormButton = null;
        mnTab = -1;

        setPreferredSize(new Dimension(100, 23));

        addActionListener(new java.awt.event.ActionListener() {
            @Override
            public void actionPerformed(ActionEvent evt) {
                processActionPerformed(evt);
            }
        });

        addKeyListener(new KeyAdapter() {
            @Override
            public void keyReleased(KeyEvent evt) {
                processKeyReleased(evt);
            }
        });

        addFocusListener(new FocusAdapter() {
            @Override
            public void focusGained(FocusEvent evt) {
                processFocusGained(evt);
            }
            @Override
            public void focusLost(FocusEvent evt) {
                processFocusLost(evt);
            }
        });

        resetField();
    }

    /*
     * Class private methods:
     */

    private void processActionPerformed(ActionEvent evt) {
        if (moNextButton != null && moNextButton.isEnabled()) {
            moNextButton.requestFocus();
        }
        else if (moNextField != null) {
            moNextField.processFocus();
        }
        else if (moFormButton != null && moFormButton.isEnabled()) {
            moFormButton.requestFocus();
        }
    }

    private void processKeyReleased(KeyEvent evt) {
        String text = new String(getPassword());
        if (text.length() > mnMaxLength) {
            int pos = getCaretPosition();
            setText(text.substring(0, mnMaxLength));
            setCaretPosition(pos < mnMaxLength ? pos : mnMaxLength);
        }
    }

    private void processFocusGained(FocusEvent evt) {
        selectAll();
    }

    private void processFocusLost(FocusEvent evt) {

    }

    /*
     * Class public methods:
     */

    /*
     * Implemented and overrided methods:
     */

    @Override
    public void setFieldName(final String name) {
        msFieldName = name;
    }

    @Override
    public int getDataType() {
        return DLibConsts.DATA_TYPE_TEXT;
    }

    @Override
    public int getGuiType() {
        return DGuiConsts.GUI_TYPE_TEXT;
    }

    @Override
    public String getFieldName() {
        return msFieldName;
    }

    @Override
    public JPasswordField getComponent() {
        return this;
    }

    @Override
    public boolean isMandatory() {
        return mnMinLength > 0;
    }

    @Override
    public void setValue(final Object value) {
        setText((String) value);
        setCaretPosition(0);
    }

    @Override
    public void setDefaultValue(final Object value) {
        msDefaultValue = (String) value;
    }

    @Override
    public void setEnabled(final boolean enabled) {
        super.setEnabled(enabled);
    }

    @Override
    public void setEditable(final boolean editable) {
        super.setEditable(editable);
        super.setFocusable(editable);
    }

    @Override
    public void setNextField(final DGuiField field) {
        moNextField = field;
    }

    @Override
    public void setNextButton(final JButton button) {
        moNextButton = button;
    }

    @Override
    public void setFormButton(final JButton button) {
        moFormButton = button;
    }

    @Override
    public void setTab(int tab) {
        mnTab = tab;
    }

    @Override
    public int getTab() {
        return mnTab;
    }

    @Override
    public boolean isEnabled() {
        return super.isEnabled();
    }

    @Override
    public boolean isEditable() {
        return super.isEditable();
    }

    @Override
    public boolean isFocusable() {
        return super.isEnabled()&& super.isEditable() && super.isFocusable();
    }

    @Override
    public DGuiField getNextField() {
        return moNextField;
    }

    @Override
    public JButton getNextButton() {
        return moNextButton;
    }

    @Override
    public JButton getFormButton() {
        return moFormButton;
    }

    @Override
    public void processFocus() {
        if (isFocusable()) {
            requestFocus();
        }
        else {
            processActionPerformed(null);
        }
    }

    @Override
    public void resetField() {
        setValue(msDefaultValue);
    }

    @Override
    public DGuiValidation validateField() {
        String text = "";
        DGuiValidation validation = new DGuiValidation();

        processFocusLost(null);

        text = new String(getPassword());

        if (text.length() < mnMinLength) {
            validation.setMessage("La longitud del campo '" + msFieldName + "' no puede ser menor que " + mnMinLength + ".");
        }
        else if (text.length() > mnMaxLength) {
            validation.setMessage("La longitud del campo '" + msFieldName + "' no puede ser mayor que " + mnMaxLength + ".");
        }

        if (!validation.isValid()) {
            validation.setComponent(this);
            validation.setTab(mnTab);
        }

        return validation;
    }

    /*
     * Implementation of DGuiFieldText
     */

    @Override
    public String getValue() {
        return new String(getPassword());
    }

    @Override
    public String getDefaultValue() {
        return msDefaultValue;
    }

    @Override
    public void setTextSettings(final String name, final int max) {
        setFieldName(name);
        setMaxLength(max);
    }

    @Override
    public void setTextSettings(final String name, final int max, final int min) {
        setFieldName(name);
        setMaxLength(max);
        setMinLength(min);
    }

    @Override
    public void setMinLength(final int min) {
        mnMinLength = min;
    }

    @Override
    public void setMaxLength(final int max) {
        mnMaxLength = max;
    }

    @Override
    public void setTextCaseType(final int type) {
        mnTextCaseType = type;
    }

    @Override
    public int getMinLength() {
        return mnMinLength;
    }

    @Override
    public int getMaxLength() {
        return mnMaxLength;
    }

    @Override
    public int getTextCaseType() {
        return mnTextCaseType;
    }
}


text:
#include <stdio.h>
#include <stdlib.h>

#include <string.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>

#include "contest.h"
#include "client.h"
#include "error.h"

int main(int argc, char *argv[]) {
  int parentfd;                   // listening socket
  int childfd;                    // connection socket
  int port = DEFAULT_PORT;        // port to listen on
  unsigned int clientlen;         // byte size of client's address
  struct sockaddr_in serveraddr;  // server's addr
  struct sockaddr_in clientaddr;  // client addr
  struct hostent *hostp;          // client host info
  char *h_name;                   // client host name
  int optval = 1;                 // flag value for `setsockopt`

  pthread_t thread_id;            // thread id

  // initialize global variables
  clientcount = 0;
  clientlatest = 0;
  params = NULL;

  /*
    check command line arguments
   */
  if (argc > 1) {
    if (strcmp(argv[1], "-h") == 0 ||
            strcmp(argv[1], "--help") == 0 ||
            argc > 2) {
      printf("Usage: %s <Port>\n", argv[0]);
      exit(EXIT_FAILURE);
    }
    port = atoi(argv[1]);
  }

  pthread_mutex_init(&mutex, NULL);
  // create the parent socket
  if ((parentfd = socket(PF_INET, SOCK_STREAM, 0)) < 0)
    error("socket() opening ERROR");

  // build server's internet addr and initialize
  memset((char *) &serveraddr, 0, sizeof(serveraddr));
  serveraddr.sin_family = AF_INET;                // an internet addr
  serveraddr.sin_addr.s_addr = htonl(INADDR_ANY); // let the system figure out our IP addr
  serveraddr.sin_port = htons(port);              // the port we will listen on

  // setsockopt: handy debugging trick
  // that lets us rerun the server immediately after we kill it
  if (setsockopt(parentfd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)) < 0)
    error("setsockopt() ERROR");
  if (bind(parentfd, (struct sockaddr *) &serveraddr, sizeof(serveraddr)) < 0)
    error("bind() ERROR. Not enough privilleges(<1024) or already in use");
  if (listen(parentfd, BACKLOG) < 0)
    error("listen() ERROR");

  printf("Listening on %d\n", port);
  clientlen = sizeof(clientaddr);

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmissing-noreturn"
  /*
    enter an infinite loop to respond to client requests
   */
  while (1) {
    /*
      wait for a connection, then accept() it
     */
    if ((childfd = accept(parentfd, (struct sockaddr *) &clientaddr, &clientlen)) < 0)
      error("accept() ERROR");

    // determine who sent the message
    if ((hostp = gethostbyaddr(
            (const char *) &clientaddr.sin_addr.s_addr,
            sizeof(clientaddr.sin_addr.s_addr),
            AF_INET)) == NULL) {
      h_name = "";
    } else {
      h_name = hostp->h_name;
    }

    pthread_mutex_lock(&mutex);
    clientcount++;
    clientlatest++;
    printf("#%d - Connected from %s(%s:%d), TOTAL:%d\n",
            clientlatest,
            h_name, inet_ntoa(clientaddr.sin_addr), ntohs(clientaddr.sin_port),
            clientcount);
    pthread_mutex_unlock(&mutex);

    // memory allocation for `thread_param_t` struct
    params = malloc(sizeof(thread_param_t));
    params->client_id   = clientlatest;
    params->client_sock = childfd;

    // 1 client, 1 thread
    pthread_create(&thread_id, NULL, handle_client, (void *) params);
    pthread_detach(thread_id);
  }
#pragma clang diagnostic pop
}


text:
<?php

namespace CafeMedia\Feature;

/**
 * Construct a Config object from its config stanza.
 *
 * A feature that can be enabled, disabled, ramped up, and A/B tested,
 * as well as enabled for certain classes of users. These objects
 * should not be accessed directly but rather through the API provided
 * by Feature.php which is more convenient and provides some caching.
 */
class Config
{
    private $cache = [];
    private $world;
    private $stanza;
    private $name = '';

    public function __construct(World $world)
    {
        $this->world = $world;
    }

    public function addName($name)
    {
        $this->name = $name;
        $this->stanza = new Stanza($this->world->configValue($name));
        return $this;
    }

    ////////////////////////////////////////////////////////////////////////
    // Public API, though note that Feature.php is the only code that
    // should be using this class directly.

    /**
     * Is this feature enabled for the default id and the logged i user, if any?
     */
    public function isEnabled()
    {
        return $this->chooseVariant($this->bucketingID()) !== 'off';
    }

    /**
     * What variant is enabled for the default id and the logged in
     * user, if any?
     */
    public function variant()
    {
        return $this->chooseVariant($this->bucketingID());
    }

    /**
     * Is this feature enabled for the given user?
     */
    public function isEnabledFor(User $user)
    {
        return $this->chooseVariant($user->id) === 'on';
    }

    /**
     * Is this feature enabled, bucketing on the given bucketing
     * ID? (Other methods of enabling a feature and specifying a
     * variant such as users, groups, and query parameters, will still
     * work.)
     */
    public function isEnabledBucketingBy($bucketingID)
    {
        return $this->chooseVariant($bucketingID) !== 'off';
    }

    /**
     * What variant is enabled for the given user?
     */
    public function variantFor(User $user)
    {
        return $this->chooseVariant($user->id);
    }

    /**
     * What variant is enabled, bucketing on the given bucketing ID, if any?
     */
    public function variantBucketingBy($bucketingID)
    {
        return $this->chooseVariant($bucketingID);
    }

    /**
     * Description of the feature.
     */
    public function description()
    {
        return $this->stanza->description;
    }

    ////////////////////////////////////////////////////////////////////////
    // Internals

    /**
     * Get the name of the variant we should use. Returns OFF if the
     * feature is not enabled for $id. When $inVariantMethod is
     * true will also check the conditions that should hold for a
     * correct call to variant or variantFor: they should not be
     * called for features that are completely enabled (i.e. 'enabled'
     * => 'on') since all such variant-specific code should have been
     * cleaned up before changing the config and they should not be
     * called if the feature is, in fact, disabled for the given id
     * since those two methods should always be guarded by an
     * isEnabled/isEnabledFor call.
     *
     * @param $bucketingID - the id used to assign a variant based on
     * the percentage of users that should see different variants.
     */
    private function chooseVariant($bucketingID)
    {
        if (!$bucketingID) {
            throw new \InvalidArgumentException('no bucketing ID supplied.');
        }

        $bucketingID = (string)$bucketingID;
        if (isset($this->cache[$bucketingID])) {
            return $this->cache[$bucketingID];
        }

        return $this->cache[$bucketingID] = (new Variant($this->world))
                                                 ->addStanza($this->stanza)
                                                 ->addBucketingID($bucketingID)
                                                 ->addName($this->name)
						 ->getVariant();
    }

    /**
     * Return the globally accessible ID used by the one-arg isEnabled
     * and variant methods based on the feature's bucketing property.
     */
    private function bucketingID()
    {
        if ($this->stanza->bucketing === 'random' ||
            $this->stanza->bucketing === 'uaid'
        ) {
            // In the RANDOM case we still need a bucketing id to keep
            // the assignment stable within a request.
            // Note that when being run from outside of a web request
            // (e.g. crons),
            // there is no UAID, so we default to a static string
            $uaid = $this->world->uaid();
            return $uaid ? $uaid : 'no uaid';
        }
        if ($this->stanza->bucketing === 'user') {
            $userID = $this->world->userID();
            // Not clear if this is right. There's an argument to be
            // made that if we're bucketing by userID and the user is
            // not logged in we should treat the feature as disabled.
            return $userID ? $userID : $this->world->uaid();
        }
        throw new \InvalidArgumentException(
            "Bad bucketing: {$this->stanza->bucketing}"
        );
    }
}


text:
layout: post
title: 'Online Activists Lash Out'
date: 2004-08-19 22:36
comments: true
categories : []
---

So a group of online-activists (I refuse to call them hackers) are planning an online protest during the Republican National Convention.

They are providing scripts that will target GOP sites with Denial of Service attacks. This for the most part is very stupid in my opinion. These people refer to themselves as "hackers" yet are providing tools that destroy the very heart of Hacking. Free Speech and Freedom of Expression. Worse is the fact that they are doing it under an umbrella of secrecy.

Over the next couple of days I'll be modifying the tools that they are providing to not target the GOP websites but their very own websites.

Stay Tuned.


text:
{-# LANGUAGE GeneralizedNewtypeDeriving #-}

-- Tests newtype deriving with
-- a non-type constructor in the representation

module Main where

newtype Wrap m a = Wrap { unWrap :: m a }
    deriving (Monad, Eq)

foo :: Int -> Wrap IO a -> Wrap IO ()
foo 0 a = return ()
foo n a = do { a; foo (n-1) a }

main = do { unWrap (foo 3 (Wrap (putChar 'x'))); putChar '\n' }


text:
module Data.API.Tools
    ( generate
    , generateAPITools

      -- * Tool settings
    , generateAPIToolsWith
    , defaultToolSettings
    , warnOnOmittedInstance

      -- * Individual tools
    , enumTool
    , exampleTool
    , jsonTool
    , jsonTestsTool
    , lensTool
    , quickCheckTool
    , safeCopyTool
    , samplesTool
    ) where

import           Data.API.Tools.Combinators
import           Data.API.Tools.Datatypes
import           Data.API.Tools.Enum
import           Data.API.Tools.Example
import           Data.API.Tools.JSON
import           Data.API.Tools.JSONTests
import           Data.API.Tools.Lens
import           Data.API.Tools.QuickCheck
import           Data.API.Tools.SafeCopy
import           Data.API.Types

import           Data.Monoid
import           Language.Haskell.TH

-- | Generate the datatypes corresponding to an API.
generate :: API -> Q [Dec]
generate api = generateAPITools api [datatypesTool]

-- | Apply a list of tools to an 'API', generating TH declarations.
-- See the individual tool descriptions for details.  Note that
-- 'generate' must be called first, and some tools have dependencies,
-- which must be included in the same or a preceding call to
-- 'generateAPITools'.
generateAPITools :: API -> [APITool] -> Q [Dec]
generateAPITools = generateAPIToolsWith defaultToolSettings

-- | Apply a list of tools to an 'API', generating TH declarations.
-- This form allows the 'ToolSettings' to be overridden.
generateAPIToolsWith :: ToolSettings -> API -> [APITool] -> Q [Dec]
generateAPIToolsWith ts api tools = runTool (mconcat tools) ts api