Yeh, I know -- you're quivering with excitement. Well, *The Secret Lives of Dentists* will not upset your expectations: it's solidly made but essentially unimaginative, truthful but dull. It concerns the story of a married couple who happen to be dentists and who share the same practice (already a recipe for trouble: if it wasn't for our separate work-lives, we'd all ditch our spouses out of sheer irritation). Campbell Scott, whose mustache and demeanor don't recall Everyman so much as Ned Flanders from *The Simpsons*, is the mild-mannered, uber-Dad husband, and Hope Davis is the bored-stiff housewife who channels her frustrations into amateur opera. One night, as Dad & the daughters attend one of Davis' performances, he discovers that his wife is channeling her frustrations into more than just singing: he witnesses his wife kissing and flirting with the director of opera. (One nice touch: we never see the opera-director's face.) Dreading the prospect of instituting the proceedings for separation, divorce, and custody hearings -- profitable only to the lawyers -- Scott chooses to pretend ignorance of his wife's indiscretions.

Already, the literate among you are starting to yawn: ho-hum, another story about the Pathetic, Sniveling Little Cuckold. But Rudolph, who took the story from a Jane Smiley novella, hopes that the wellworn-ness of the material will be compensated for by a series of flashy, postmodern touches. For instance, one of Scott's belligerent patients (Denis Leary, kept relatively -- and blessedly -- in check) will later become a sort of construction of the dentist's imagination, emerging as a Devil-on-the-shoulder advocate for the old-fashioned masculine virtues ("Dump the b---h!", etc.). When not egged-on by his imaginary new buddy, Scott is otherwise tormented by fantasies that include his wife engaged in a three-way with two of the male dental-assistants who work in their practice. It's not going too far to say that this movie is *Eyes Wide Shut* for Real People (or Grown-Ups, at least). Along those lines, Campbell Scott and Hope Davis are certainly recognizable human beings as compared to the glamourpuss pair of Cruise and Kidman. Further, the script for *Secret Lives* is clearly more relevant than Kubrick's. As proof, I offer the depiction of the dentists' children, particularly the youngest one who is about 3 or 4 years old, and whose main utterance is "Dad! Dad! Dad! Dad! Dad! DAD!!!" This is Family Life, all right, with all its charms.

The movie would make an interesting double-bill with *Kramer vs. Kramer*, as well. One can easily trace the Feminization of the American Male from 1979 to 2003. In this movie, Dad is the housewife as in *Kramer*, but he is in no way flustered by the domestic role, unlike Dustin Hoffman, who was too manly to make toast. Here, Scott gets all the plumb chores, such as wiping up the children's vomit, cooking, cleaning, taking the kids to whatever inane after-school activity is on the docket. And all without complaint. (And without directorial commentary. It's just taken for granted.)

The film has virtues, mostly having to do with verisimilitude. However, it's dragged down from greatness by its insistence on trendy distractions, which culminate in a long scene where a horrible five-day stomach flu makes the rounds in the household. We must endure pointless fantasy sequences, initiated by the imaginary ringleader Leary. Whose existence, by the way, is finally reminiscent of the Brad Pitt character in *Fight Club*. And this finally drives home the film's other big flaw: lack of originality. In this review, I realize it's been far too easy to reference many other films. Granted, this film is an improvement on most of them, but still. *The Secret Lives of Dentists* is worth seeing, but don't get too excited about it. (Not that you were all that excited, anyway. I guess.)


While this movie's style isn't as understated and realistic as a sound version probably would have been, this is still a very good film. In fact, it was seen as an excellent film in its day, as it was nominated for the first Best Picture Oscar (losing to WINGS). I still consider WINGS to be a superior film, but this one is excellent despite a little bit of overacting by the lead, Emil Jannings.

Jannings is a general from Czarist Russia who is living out his final days making a few bucks in the 1920s by being a Hollywood extra. His luck appears to have changed as he gets a casting call--to play an Imperial Russian general fighting against the Communists during the revolution. Naturally this isn't much of a stretch acting-wise, but it also gets the old man to thinking about the old days and the revolution.

Exactly what happens next I'll leave to you, but it's a pretty good film--particularly at the end. By the way, look for William Powell as the Russian director. Despite being made in 1928, with the makeup he doesn't look much younger than he did in many of his later films.


I give this movie 7 out of 10 because the villains were interesting in their roles and the unknown batwoman creates an interesting "guess who" game. The movie, however, needs more Robin in it. He appeared in the movie in the beginning and sporadically throughout the rest. I always thought the new animated series did little justice to the neat new Robin character, let alone Knightwing. This movie just continues that bad tradition. The movie spends too much time on Bruce Wayne and his romance which wouldn't be so bad in one movie if the romance wasn't so unbelievable. It is still a good movie if you are a Batman fan and I would recommend watching it.


Home Room deals with a Columbine-like high-school shooting but rather than hashing over the occurrence itself the film portrays the aftermath and what happened to the survivors, their trauma, guilt and denial.

*Spoilers* The shooting itself is treated as a foregone conclusion, with no action footage other than the reaction of an almost teenage SWAT commando after shooting the high school killer. The film has three protagonists; the detective investigating the crime of which no guilty parties are left to convict and two teenage girls surviving the incident, played by a very young Erika Christensen and Busy Philipps.

The two girls having nothing in common besides the shooting are put together because of it and the drama ensues.

Erika Christensen, though only 24 has been around the block so much that film viewers are pretty much acquainted with her solid and reliable style of acting. Busy Philipps, three years older than Christensen and altogether unknown to me, blew me away with her overwhelming dramatic strength and screen presence. This girl was the part.

It's a great movie and it connects to you with its intimate focus on the fragile yet growing relationship between the two traumatized girls. Gus van Sant's Elephant (2003) though good, seems almost superficial and paltry compared to Home Room when it comes to dramatic flair and acting. What I can see this film got very little screen time and exposure - so much more a loss for an equally traumatized America.

Ten out of Ten


Context: This is the most common method of construction procurement and is well established and recognized. In this arrangement, the architect or engineer acts as the project coordinator. His or her role is to design the works, prepare the specifications and produce construction drawings, administer the contract, tender the works, and manage the works from inception to completion. There are direct contractual links between the architect's client and the main contractor. Any subcontractor has a direct contractual relationship with the main contractor. The procedure continues until the building is ready to occupy.

Question: There are direct contractual links between who?


Context: After strengthening his government in northern China, Kublai pursued an expansionist policy in line with the tradition of Mongol and Chinese imperialism. He renewed a massive drive against the Song dynasty to the south. Kublai besieged Xiangyang between 1268 and 1273, the last obstacle in his way to capture the rich Yangzi River basin. An unsuccessful naval expedition was undertaken against Japan in 1274. Kublai captured the Song capital of Hangzhou in 1276, the wealthiest city of China. Song loyalists escaped from the capital and enthroned a young child as Emperor Bing of Song. The Mongols defeated the loyalists at the battle of Yamen in 1279. The last Song emperor drowned, bringing an end to the Song dynasty. The conquest of the Song reunited northern and southern China for the first time in three hundred years.

Question: What area was Kublai trying to capture by defending Xiangyang?


Context: The neighborhood of Sunnyside is on Fresno's far southeast side, bounded by Chestnut Avenue to the West. Its major thoroughfares are Kings Canyon Avenue and Clovis Avenue. Although parts of Sunnyside are within the City of Fresno, much of the neighborhood is a "county island" within Fresno County. Largely developed in the 1950s through the 1970s, it has recently experienced a surge in new home construction. It is also the home of the Sunnyside Country Club, which maintains a golf course designed by William P. Bell.

Question: Where is the home of the Sunnyside Country Club?


Context: The historical measure of a steam engine's energy efficiency was its "duty". The concept of duty was first introduced by Watt in order to illustrate how much more efficient his engines were over the earlier Newcomen designs. Duty is the number of foot-pounds of work delivered by burning one bushel (94 pounds) of coal. The best examples of Newcomen designs had a duty of about 7 million, but most were closer to 5 million. Watt's original low-pressure designs were able to deliver duty as high as 25 million, but averaged about 17. This was a three-fold improvement over the average Newcomen design. Early Watt engines equipped with high-pressure steam improved this to 65 million.

Question: What was the ideal duty of a concept engine?


Context: Imperialism and colonialism both dictate the political and economic advantage over a land and the indigenous populations they control, yet scholars sometimes find it difficult to illustrate the difference between the two. Although imperialism and colonialism focus on the suppression of an other, if colonialism refers to the process of a country taking physical control of another, imperialism refers to the political and monetary dominance, either formally or informally. Colonialism is seen to be the architect deciding how to start dominating areas and then imperialism can be seen as creating the idea behind conquest cooperating with colonialism. Colonialism is when the imperial nation begins a conquest over an area and then eventually is able to rule over the areas the previous nation had controlled. Colonialism's core meaning is the exploitation of the valuable assets and supplies of the nation that was conquered and the conquering nation then gaining the benefits from the spoils of the war. The meaning of imperialism is to create an empire, by conquering the other state's lands and therefore increasing its own dominance. Colonialism is the builder and preserver of the colonial possessions in an area by a population coming from a foreign region. Colonialism can completely change the existing social structure, physical structure and economics of an area; it is not unusual that the characteristics of the conquering peoples are inherited by the conquered indigenous populations.

Question: what do conquering people take away from native populations?


Context: Bills can be introduced to Parliament in a number of ways; the Scottish Government can introduce new laws or amendments to existing laws as a bill; a committee of the Parliament can present a bill in one of the areas under its remit; a member of the Scottish Parliament can introduce a bill as a private member; or a private bill can be submitted to Parliament by an outside proposer. Most draft laws are government bills introduced by ministers in the governing party. Bills pass through Parliament in a number of stages:

Question: Who may also submit private bills to Parliament?

an outside proposer
an outside proposer
an outside proposer


Diesel model Winnie Harlow, who suffers from vitiligo, the same rare skin condition that singer Michael Jackson was diagnosed with, has been pictured enjoying a cozy night on the town with albino fashion star Shaun Ross. The pair attended a launch event for Popular magazine at Siren Studios in Hollywood, California, on Tuesday night, and were snapped holding hands while making their way into the venue. Winnie, 19, who was unveiled as one of the newest faces of fashion label Diesel earlier this year, was wearing a short and simple black and gold mini dress, which she accessorized with a pair of gold strappy heels. Scroll down for video . Looking cozy: Winnie Harlow, 19, who suffers from the same rare skin condition as Michael Jackson, was pictured hand-in-hand with albino model Shaun Ross on Tuesday night . Out on the town: The duo were attending the launch for Popular magazine at Hollywood venue Siren Studios . Skingraft black and gold dress . Get it from Pasar here . Visit site . This look is all types of yes. Winnie Harlow looks incredible in her leather tunic dress which features striking gold trims on the sleeves and hemline. The loose fit creates a flattering silhouette too. Winnie's dress is from LA-based fashion house Skingraft, and you can still buy it by clicking right to Paser's website now. It'll be your go-to party piece! It is however, slightly pricey coming in at $750, so if you want to add a golden standard to your style for less, why not check out these various finds below? We are particularly dazzled by this Mynt 1792 number at Nordstrom. A pair of strappy metallic heels will finish off your look to perfection! Choice's black and gold stamping dress . Visit site . Mynt 1792 color block dress at Nordstrom . Visit site . Maykool black and gold dress . Visit site . Dailylook fit and flare dress . Visit site . Meanwhile Shaun, 23, opted for a more low-key look, wearing an all-black ensemble, which he topped off with a unique tall baseball hat and a pair of leather sneaker-style boots. And while it appears to be the first time that the duo have been spotted enjoying an evening out together, it is likely not the first occasion that they have met. Both stars have made regular appearances on the catwalks at various Fashion Weeks, while Shaun has also starred in campaigns for the likes of Alexander McQueen and Givenchy. Coincidentally, the models also each had a helping hand from fellow fashion star Tyra Banks. Fashion stars: While Evan opted for an all-black ensemble, topped off with a bizarre baseball cap, Winnie wore a black and gold mini dress and strappy sandals . Rising stars: Both Shaun and Winnie have each achieved global recognition in the fashion indsutry, appearing in numerous high-profile fashion campaigns . Strut your stuff: Both Winnie (L), pictured at the Desigual fall/winter 2015 show, and Shaun (R), pictured on the catwalk in February, boast impressive runway credentials . Winnie, whose real name is Chantelle Brown-Young, was one of the contestants on Tyra's hit reality series America's Next Top Model, while Shaun made an appearance on the former model's eponymous talk show in 2009. Despite their cozy appearance, it's not thought that the two are dating - however Shaun did take the time to post a heartwarming message to the model on his Instagram account, just hours after the pair attended the Popular magazine event. Alongside an image of the two of them, Shaun wrote: 'So much fun last night @winnieharlow keep up the good work. From an original believer in you.' And it seems his sweet sentiments were reciprocated by Winnie, who posted a similar image on her own account, saying: 'Sweet nothings with my fly friend @shaundross'

Winnie, 19, was diagnosed with the rare condition when she was four-years-old .
Condition causes a lack of melanin which forms white patches on the skin .


(CNN)When Melissa Atkins Wardy, author of "Redefining Girly" and a passionate advocate for fighting gender stereotypes, heard from a frustrated mom on Facebook, she knew she needed to do something. So she shared the mom's story. In a blog post, Wardy told how the mom, Veronica of Richland, Washington, wanted to buy "Big Hero 6" fabric to make pillows for her two children. The problem? The fabric didn't include two of the heroes from the movie: the female characters, Honey Lemon and GoGo. So Veronica decided to send an email to Springs Creative, the company that makes the fabric, saying that as a woman and an engineer, she was offended. She got an answer from the company but it didn't help. Girl empowerment ads like GoldieBlox: Do they work? A licensing manager for Springs Creative responded that the company has found that boys don't want girl characters on their things. "Eeeww girls! Yuck! Haha," the licensing manager wrote. It will come as no surprise that Veronica was none too pleased to receive that response. "I was frustrated and disgusted that a manager, and a female manager too, would laugh off my initial contact with the company. It was unprofessional. So I responded," Veronica told CNN. She asked that we not use her last name, in order to maintain her privacy. In an email back to the company, Veronica wrote, "By eliminating the women in your fabric design, you are telling boys that it's OK to think girls are yucky, unworthy and less than a boy. "You are also telling girls they are unworthy, unwanted and that it's un-cool to be smart and confident." What happened next shows that parents, aided by social media outrage, may have more leverage to combat gender stereotyping in our culture than they realize. And the "Big Hero 6" example -- along with a similar recent one involving TOMS, the shoes retailer -- suggests that manufacturers may be finally getting it, too. First, the rest of the story about Springs Creative and the "Big Hero" fabric: After sharing Veronica's story with her readers and her 6,700 Twitter followers, Wardy encouraged people to give Springs Creative a piece of their mind. She also invited them to tweet their own stories with the hashtag #IncludeTheGirls. Women responded in droves, pointing out how Black Widow, the female character in the popular "Avengers" superhero movie franchise, is often excluded from merchandise and how cereal boxes rarely include female characters. "This sends the direct message to both boys and girls that females are forgettable, unimportant, undesirable. What a horrible thing to teach our children!" said Wardy, who is also the founder and chief executive officer of Pigtail Pals & Ballcap Buddies, a company that makes empowering clothing for boys and girls. "The prevailing theory is, 1. boys are the default audience, and 2. boys won't want an item with a girl on it," Wardy said. "Yet, I talk with thousands of parents every week who say otherwise." Why trying to make our kids happy can backfire . Those parents are clearly making their voices heard. Because not too long after Veronica received her initial response from Springs Creative, Wardy said she got a call from the company, asking her to post a statement from Springs Creative on her site. "It is sometimes difficult to hear negative feedback but the message was clear and we intend to act upon your message," the statement read. "Most importantly, Springs Creative does not condone sexism in any shape or form and does not design products to shine a negative light on females OR males." The company said it would be talking with Disney "immediately" about additional designs for "Big Hero 6" that would incorporate all the characters. "We would never intentionally offend any segment of the population. We are a strong company with positive morals and values and we respect and see both genders equally," said the statement. Springs Creative told CNN it would have no further comment. Veronica said she was surprised the company responded so quickly. "I do not believe this would have happened without the Pigtail Pals and Ballcap Buddies community also raising their voices." The real March Madness: When will women's teams get equal buzz? Around the same time, Wardy heard from another follower about an issue with TOMS and wrote about it on her site. On the normally progressive retailer's Web landing page for kids were photos that some parents felt played into gender stereotypes. One photo suggested "Playtime Approved" shoes for boys, and the other, this one on a pink background, included the caption "Little Ladies: adorn their feet for spring." "Really, TOMS? Girls are not ornaments we adorn. Girls play, too!" Wardy wrote on her Facebook page. Two hours later, Wardy received a comment from TOMS on her Facebook page, saying that the company completely agrees and that the wording has been changed to now say "new arrivals for kids." "We're really grateful whenever our community brings something like this to our attention," said Doug Piwinski, senior vice president, global marketing and communications for TOMS. "Perhaps as much or more than any other brand, I mean we really listen to our customers in our community." So, here's my question: Are the two speedy responses from companies after women spoke out on social media more a sign that companies are truly getting it about gender stereotypes and girl and boy empowerment, or more a sign of the power of parents? Or are they a mixture of both? How to Super Bowl #LikeAGirl . Wardy said there's no doubt that companies are in business to protect their bottom line, and that will always be a motivator. But she said these back-to-back incidents show what can happen when parents make it clear they won't buy products from companies that sell gender stereotypes. " 'Be not silent' is my mantra. Speak up!" Wardy said. "The success with Springs Creative and TOMS and other wins we've had in the past is an example of the power of parents (moms and dads) and children's advocates aggregating their voices to say, 'Enough is enough.' " Veronica said it's a sign of the power of parents becoming "more aware, reactive and using social media to make their voices heard by companies that market to children." She added, "One voice can be dismissed; the hailstorm of voices collectively cannot be ignored so easily." It is clear, from these two examples, that parents using their voices online and with their wallets can encourage companies to change. There's no question that raising awareness about stereotypes helps, said Wardy. "If companies aren't paying attention by now, they most certainly should be." Pink, princess-y and sexy too soon . Do you think more companies are getting the message to include girl characters on merchandise? Share your thoughts with Kelly Wallace on Twitter or CNN Living on Facebook.

A mom of two got upset when "Big Hero 6" fabric didn't include the two female characters .
Another mom called attention to gender stereotypes on a TOMS Web page .
In both cases, the companies responded quickly to answer parents' concerns .


(CNN)Blinky and Pinky on the Champs Elysees? Inky and Clyde running down Broadway? Power pellets on the Embarcadero? Leave it to Google to make April Fools' Day into throwback fun by combining Google Maps with Pac-Man. The massive tech company is known for its impish April Fools' Day pranks, and Google Maps has been at the center of a few, including a Pokemon Challenge and a treasure map. This year the company was a day early to the party, rolling out the Pac-Man game Tuesday. It's easy to play: Simply pull up Google Maps on your desktop browser, click on the Pac-Man icon on the lower left, and your map suddenly becomes a Pac-Man course. Twitterers have been tickled by the possibilities, playing Pac-Man in Manhattan, on the University of Illinois quad, in central London and down crooked Lombard Street in San Francisco, among many locations: .

Google Maps has a temporary Pac-Man function .
Google has long been fond of April Fools' Day pranks and games .
Many people are turning their cities into Pac-Man courses .


(CNN)Would you want a TV program about your family history to include details of a distant, long-deceased relative who had owned slaves? Seriously, who in their right mind would want to be tarnished by the sins of an ancestor you had no connection to other than a remote bloodline? I wouldn't, and neither did Ben Affleck, who lobbied producers of a PBS show, "Finding Your Roots," to remove any reference to his great-great-great grandfather Benjamin Cole, a Georgia slave owner in the mid-1800's, in an episode that looked at Affleck's family history. (Affleck revealed Cole's name Wednesday night.) Here's the thing that might surprise many, given the tendency of the media to exploit any potentially scandalous material: The show's producer, Harvard professor Henry Louis Gates Jr., apparently acquiesced to Affleck's request, because when the episode aired in October 2014, there was no mention of the star's slave-owning ancestor. Affleck's attempt to alter the content of the program only publicly became known a few days ago after WikiLeaks released hacked emails revealing an exchange between Gates and Sony Pictures chief Michael Lynton. When Gates asked how he should respond to Affleck's request to delete the material, Lynton responded, "all things being equal, I would definitely take it out." And on Tuesday, Affleck, via Facebook, admitted that he had urged Gates to excise any reference to his slave-owning relative. Affleck explained, "I didn't want any television show about my family to include a guy who owned slaves. I was embarrassed. The very thought left a bad taste in my mouth." Now Gates has publicly denied that he made his decision about the content of the program based on Affleck's request, but it seems likely that he did. After all, Affleck noted as much in his Facebook post, writing that Gates "agreed with me on the slave owner but made other choices I disagreed with." And three other celebrities profiled on the series last season were shown to have been related to slave owners. So it's unlikely that it was simply happenstance that it left out any reference to Affleck's familial slave ownership connection. In any event, PBS has launched an internal review to determine if the show violated its own editorial standards. Whatever the results of the review, Affleck and Gates did the right thing. Let's be clear: "Finding Your Roots" is not an investigative news show; it's an entertainment program. In fact, as Affleck noted, much of the material is provided directly by the celebrity being profiled. It's not "60 Minutes" but more in the nature of a sophisticated profile of celebrities, using their marquee names to attract viewers. There's not even a hint that Affleck strong-armed the producers or made any type of threats against them if they included the information. In the emails between Gates and Lynton, which they presumably believed at the time were confidential and would remain so, there was no mention of undue pressure by Affleck. Instead, Gates simply noted that Affleck  "asked us to edit out something." After the emails were revealed, Gates issued a statement, saying, "Ultimately, I maintain editorial control on all of my projects and, with my producers, decide what will make for the most compelling program. In the case of Mr. Affleck we focused on what we felt were the most interesting aspects of his ancestry -- including a Revolutionary War ancestor, a third great-grandfather who was an occult enthusiast, and his mother who marched for civil rights during the Freedom Summer of 1964." My view would be different if Affleck had a history of uttering racist remarks or engaging in racist conduct. That would have made the information truly newsworthy. But instead we have a man known for championing progressive causes, which I'm sure made him even more acutely sensitive that some on the right might possibly use this information against him in the future. Perhaps that's what Affleck meant in his Facebook post when he wrote that this information made him feel "vulnerable." Affleck has noted that he regrets asking PBS to not include information about his "distant relative."  That's a nice gesture, but it was not needed. Affleck had every right to ask for the information about a long-deceased distant relative to be left out of the show. And PBS had the choice to include it or leave it out. I applaud PBS for doing the right thing at a time when media outlets rarely show any restraint on the lives of people in the public eye.

Ben Affleck admits he asked PBS show "Finding Your Roots" to avoid mentioning his slave-owning ancestor .
Dean Obeidallah says the actor and the show were right to leave the detail out .


Whenever I hear anyone arguing for slavery, I feel a strong impulse to see it tried on him personally.


There are no bad pictures; that's just how your face looks sometimes.


I can see how it might be possible for a man to look down upon the earth and be an atheist, but I cannot conceive how a man could look up into the heavens and say there is no God.


When you reach the end of your rope, tie a knot and hang on.


hose who look for the bad in people will surely find it.


I am not bound to win, but I am bound to be true. I am not bound to


succeed, but I am bound to live up to what light I have.


be sure you put your feet in the right place, then stand firm.


You can fool some of the people all of the time, and all of the people some of the time, but you can not fool all of the people all of the time


Question: There are direct contractual links between who?

the architect's client and the main contractor


Question: What area was Kublai trying to capture by defending Xiangyang?


Question: Where is the home of the Sunnyside Country Club?


Question: What was the ideal duty of a concept engine?


Question: what do conquering people take away from native populations?


Question: Who may also submit private bills to Parliament?

an outside proposer
an outside proposer
an outside proposer


I just did a bad thing
I regret the thing I did
And youre wondering what it is
Ill tell you what I did
I did a bad thing
Im having a bad day
Its turning into a bad year
All the things Im supposed to do
And the places Im supposed to go
Are canceled
Hey, whats the name of this game?
And how do you play it?
And how long does it take?
And how many times is the game going to change?
Hey, let me out of this place
Out into the real world
Where maybe things can go my way
Oh, everything goes my way
Oh, everyone knows my name
Im having a bad dream
I wonder what this bad dream means
I wonder if Im sad
I wonder if Im glad
Or if Im just having a sad, glad dream
Its a sad, mad, and bad, glad dream
And I wont get mad about the dream
If you promise to believe in me
Its a sad, bad, and mad, glad scheme
Its the best scheme I have
And thats bad enough for me
And I wont get sad if you dont
See just how mad, glad my schemes can be
Just did a bad thing
Ive ruined everything
And Ive let the things Ive ruined ruin me
Hey, whats the name of this game?
And how do you play it?
And how long shall it take?
And how many times is the game supposed to change?
Hey, get me out of this place
Out into the real world
Where maybe things can go my way
Oh, everything goes my way
Oh, everything goes astray
Just did a strange thing
Now everythings pink


I dont have enough time
To say the things I wanna say
To do the things I wanna do
Or to be like you
I just want some time
To express the things I feel
Just to express the things I feel
And believe them too
2 + 2 has been 4 for
So many darn years, oh Lord
I wanna write a song
Oh baby, is that so wrong?
And it goes
La de da de da de da de day oh
La de da de, where did all the good times go?
La de da de la da dee dum dom, la da de day
When will you come back home?
I went down to the mall
Then they closed down the mall
Guess they dont want me going to the mall
Cause Im just too small
Then I built some trains
And Im traveling somewhere new
Its a wonderful world, but still no you
Its a wonderful world for two
Singin
La de da de da de da de day oh
La de da de, where did all the bad times roll?
 La de da de la da dee dum dom, la da de day
When can you come back home?
I just went online
To explain the things I feel
To express the things I mean
And it felt so real
Now Im doing alright
And Im downright feeling okay
Its the end of the world and I just cant wait
I know that you can relate
La de da de da de da de day oh
La de da de, where did all the good times go?
 La de da d-de dum de da, d-d-dim
Dwaayah d-de dum dwee-ayy
Thats okay
De day way oh, be dot do
When did all the windmills start to turn so slow?
 La de da de la d-de dum dom, la da de day
When will you come back home?
Just got home, got no home
La de da d-de where did it go?
Oh no
I cant go home


Mount St. Helens is about to blow up
And its gonna be a fine, swell day
Everythings gonna fall down to the ground and turn grey
All of my friends, family, and animals are probably going to run away
But me, Im feeling curious, so I think I just might stay
The Dow Jones just fell down to zero and its gonna be a fine, swell day
And I wonder if its gonna be as good a day as yesterday
All of these business suits that Ive just purchased
Gonna have to throw them all away
And slip into something more reasonable and then dance the night away
Im riding a pony
Into the sunset
Everythings green and gold
So Im not in hell yet
And the people who work in my office went on vacation
Cause they say that I havent been paying them very much anymore
Mount St. Helens has a pretty cool gift shop
And I havent been there in a while
And Ive been wondering if its even still there?
And the climate has been changing
And soon its gonna change more
And well figure out all of the details in climate change court
Take a ride on my blimp
Oh, its a very strong blimp
You can watch movies and play games
While riding on it
When the sun goes down and the sky burns out
Well never slow down
Oh, were not going down
Mount St. Helens is feeling crazy and adventurous
Thats the reason that its so special
And it takes no answers
And it gives no questions
And it makes no excuses
And it really doesnt listen
And it seems so eccentric
And it looks so active
And it dreams of puppies
And its filled with music


Woke up in the morning
Traveling straight into the sun
Told my friends and family I was gone
Looked back in the mirror
Thought about who I had become
And, I dont think that anythings gone wrong
Jumped out of my suitcase
And went traveling down the road
Went back to the place where I was born
Thinking about my future
Thinkin bout how far we have come
Oh, I dont think Im gonna be going home
And the day goes on, goes on, goes on, goes on
And the day goes on
And the day goes on, goes on, goes on, hold on
And the day goes on
Went down to Virginia
Thinkin bout how to change my name
Just in case I have to fly away
Jumped onto a spaceship
Then I went to outer space
And, now I think Im gonna be okay
And the day goes on, goes on, goes on, goes on
And the day goes on
And the day goes on, goes on
Hold on
Whenst the day goes
And Im long gone
And Im long gone
And Im right where I belong
I went to the future
Thinkin bout how to spend my day
Thinkin bout the things I cant explain
Its 1900 and the times are going to change
Oh, now I think were gonna be okay
And the day goes on, goes on, goes on, goes on
And it goes along
And the day goes on, hold on, hold on, stay strong
And the day goes on


Its the first day of school
And I think I might quit
Cause the things Ive been seeing in here dont make sense
So I packed up my things
And I walked through the door
And Im going somewhere else instead
So, I chopped down some trees
And I built a small house
And I just might be small enough to live in it
Then the rain came pouring down
And it made some cool sounds
And theyll tell you what those sounds said
Said, Hello and Goodbye,
Do you feel alright with the days gone by?
Ill never waste my time, Ill never say goodbye
Yes, I will, but I wont say it tonight
So I picked a new character
And Ive just chose my shirt
And Im going to the Land of the Two Letter Words
On in up at or so, by if to of no it
Its a feeling we cant forget
Said, Hello and Goodnight, Do you feel alright?
Do you remember the days gone by?
Do you remember the way that we dreamed we could change our lives?
Do you feel like changing your mind?
Its the first day of school
And I think I might quit
Cause the things that Im feeling still dont make sense
And Ive tried to explain
And it hurts to describe
So Ill sing this song instead
Hello and goodbye
Do you think Im dying?
Do you think Im going somewhere else this time?
Do you remember the day we pretended to be every star in the sky?
Its the first day of school, but I think I might quit
Gonna learn some new lessons I wont forget
Gonna write them all down
In the language of love
And Ill teach them to everyone


All day and all night
We lay about and wonder what were gonna do
We speak to ourselves
Havin a conversation and wonderin who were talking to
Then sadness takes over
And sadness wonders what were gonna do
And sadness comes closer
Then sadness comes to sing a song for you
Oh, what a wonderful world
Oh, how youve got to have more
When darkness covers the Earth
And I know its the end for sure
Here comes the sun
Here comes the sun
Here comes the sun
Bringing you love and shining on everyone
Here comes the sun
Here come the raging sun
And its raging on and so we rage as one
On until the day is done
High on the mountain
The postman comes and says theres still no news
Deep in the city, oh yeah
The buildings wonder if theyll ever be built
Oh, what an interesting day
Looks like theres nobody in my way
But the roads gonna end
And the storms comin in
Looks like nobody wins today
Here comes the sun
Here comes the sun
Here comes the sun
Bringing you love and shining on everyone
Here comes the sun
Here come the blazing amazing miracle sun
And its raging on and still, well blaze along
On until the day is done
Til the day is won and done
Gonna rage on into the sun
Call up your friends and neighbours
Tell em a new day has just begun
I hope you know that theres no stranger strange enough
Tell all your friends and neighbours
Youre no stranger to fallin in love
Im just fallin in love
Stop, times up
Is it really over?
Time waits for no one
And I cant explain the way that Im feelin
Put it into words and then
Send it all over the world!
Here comes the sun
Here comes the sun
Here comes the sun
Bringing you love and shining on everyone
Here comes the sun
Here comes the raging sun, yeah
And its raging on and so we rage as one
On until the day is done
Oh, until the day is done
If this song aint good enough Ill erase it


STEVE: Hi, Im Steve. I drive a car. Its in a tree.
Just kidding, my names not Steve.
NOT STEVE: Im filing for an extension for my taxes because I didnt pay them and Im not going to.
CHORUS: Cause thats the way I like to live my life, and I feel like everythings gonna be fine!
NOT STEVE: Im skipping work again. Thats because I dont have a job.
The mailman was late today, and she was actually a woman, and she said,
MAILMAN: Thats the way I like to live my life, and I know that everythings gonna be just fine.
NOT STEVE: I dont remember why I first saw the mountains, but theyve always been here.
Now that Im seeing them, Im wondering why theyre there.
But theyre here.
I cant climb them. But I can.
CHORUS: Cause thats the-
PIGEON: Hey, heres the mail:
NOT STEVE: Dear Steve-
Thats not my name, but whatever.
LETTER:
Dear Steve,
How did you climb this mountain?
NOT STEVE: Well, Im glad you asked that! Its part of a two-step program.
Find the mountain, climb the thing.
CHORUS: Thats the way we can get things done and thats how I do it.
Its easy and simple cause you know what to do.
STEVE: Bye, Im Steve.


Seven bodies found after dam burst at Brazil mine, hundreds missing

Fears rise for 300 missing in Brazil dam disaster; 9 bodies recovered


Dam collapses in Brazil: mud sludge leaves over 200 miners missing

Brazil dam collapse: At least seven dead and hundreds missing after disaster triggers mudslides


Remember Savita': father's plea for voters to end Ireland's abortion ban

Ireland referendum could lift strict ban on abortion


Brazilian despair turns to anger as toll from Vale dam disaster hits 60

Brazil dam: Startling pictures of Brumadinho collapse


Ireland Votes to End Abortion Ban in Rebuke to Catholic Church

Sturgeon takes Brexit concerns to Brussels


Ireland votes resoundingly to repeal abortion ban

Irish abortion referendum: Ireland overturns abortion ban


Facebook Loses EU Friends as Bloc's Lawmakers Weigh Break Up

EU privacy watchdog: Big tech firms are 'blackmailing' users into agreeing with their new data terms


What is the eighth amendment and what happens if Ireland repeals it?

Ireland to start abortion law reform after historic vote


EU Parliament grills Zuckerberg - but Facebook CEO slips away without giving solid answers

EU data protection regulation comes into force


// @flow

/* eslint-env browser */
import React from 'react';
import { BrowserRouter as Router, Route } from 'react-router-dom';
import { Switch } from 'react-router'; // eslint-disable-line
import App from './010-app';
import LargeMessage from './200-largeMessage';

// ==========================================
// Component
// ==========================================
const Root = () => (
  <Router>
    <Switch>
      <Route exact path="/" component={App} />
      <Route path="/suite/*" component={App} />
      <Route path="/folder/*" component={App} />
      <Route render={() => <LargeMessage>Ooops! 404!</LargeMessage>} />
    </Switch>
  </Router>
);

// ==========================================
// Public
// ==========================================
export default Root;

/* eslint-env jest */
/* eslint-disable global-require, import/newline-after-import */
import React from 'react';
import renderer from 'react-test-renderer';
import Root from '../000-root';

// https://github.com/facebook/react/issues/7386#issuecomment-238091398
jest.mock('react-dom');
jest.mock('react-router', () => ({
  Switch: require('./mockComponent')('Switch'),
}));
jest.mock('react-router-dom', () => ({
  BrowserRouter: require('./mockComponent')('BrowserRouter'),
  Route: require('./mockComponent')('Route'),
}));
jest.mock('../010-app', () => require('./mockComponent')('App'));
jest.mock('../200-largeMessage', () =>
  require('./mockComponent')('LargeMessage')
);

describe('Root', () => {
  it('renders correctly', () => {
    const tree = renderer.create(<Root />).toJSON();
    expect(tree).toMatchSnapshot();
  });
});


// @flow

/* eslint-env browser */
import React from 'react';
import socketio from 'socket.io-client';
import type { FolderT, SnapshotSuiteT } from '../../common/types';
import AppContents from './015-appContents';

const socket = socketio.connect();
const socketDisconnect = () => {
  socket.close();
};

// ==========================================
// Declarations
// ==========================================
type SidebarTypeT = 'FOLDER' | 'SUITE';
type Props = {
  /* eslint-disable react/no-unused-prop-types */
  match: Object,
  /* eslint-enable react/no-unused-prop-types */
  location: Object,
};
type State = {
  fetchedItemType: ?SidebarTypeT,
  fetchedItem: ?(FolderT | SnapshotSuiteT),
  fetchedItemPath: ?string,
  error: ?string,
  fRedirectToRoot: boolean,
};

// ==========================================
// Component
// ==========================================
class App extends React.Component<Props, State> {
  state = {
    fetchedItemType: null,
    fetchedItem: null,
    fetchedItemPath: null,
    error: null,
    fRedirectToRoot: false,
  };

  // unit testing
  _setState(state: Object) {
    this.setState(state);
  }

  componentDidMount() {
    this.fetchSidebarData(undefined, this.props);
    socket.on('REFRESH', this.refetch);
  }

  componentWillUnmount() {
    socket.off('REFRESH', this.refetch);
  }

  componentWillUpdate(nextProps: Props) {
    this.fetchSidebarData(this.props, nextProps);
  }

  fetchSidebarData(prevProps?: Props, nextProps: Props) {
    const { match } = nextProps;
    const { path, url, params } = match;
    if (prevProps != null && url === prevProps.match.url) return;
    if (path === '/') {
      this.fetchFolder('-');
    } else if (path === '/folder/*') {
      this.fetchFolder(params[0]);
    } else if (path === '/suite/*') {
      this.fetchSuite(params[0]);
    }
  }

  // ------------------------------------------
  render() {
    return (
      <AppContents
        fetchedItemType={this.state.fetchedItemType}
        fetchedItem={this.state.fetchedItem}
        fetchedItemPath={this.state.fetchedItemPath}
        error={this.state.error}
        onRedirectToRoot={() => {
          this.setState({ fRedirectToRoot: true });
        }}
        fRedirectToRoot={this.state.fRedirectToRoot}
        location={this.props.location}
        saveAsBaseline={this.saveAsBaseline}
      />
    );
  }

  // ------------------------------------------
  refetch = () => {
    if (!this.state.fetchedItem) return;
    if (this.state.fetchedItemType === 'FOLDER') {
      this.fetchFolder(this.state.fetchedItemPath);
    } else {
      this.fetchSuite(this.state.fetchedItemPath);
    }
  };

  async fetchFolder(folderPath: ?string) {
    if (folderPath == null) return;
    try {
      const res = await fetch('/api/folder', {
        method: 'POST',
        headers: { 'content-type': 'application/json' },
        body: JSON.stringify({ folderPath }),
      });
      const folder: FolderT = await res.json();
      this.setState({
        fetchedItemType: 'FOLDER',
        fetchedItem: folder,
        fetchedItemPath: folderPath,
      });
    } catch (err) {
      this.setState({ error: `Could not find ${folderPath}` });
    }
  }

  async fetchSuite(filePath: ?string) {
    if (filePath == null) return;
    try {
      const res = await fetch('/api/suite', {
        method: 'POST',
        headers: { 'content-type': 'application/json' },
        body: JSON.stringify({ filePath }),
      });
      const suite: SnapshotSuiteT = await res.json();
      this.setState({
        fetchedItemType: 'SUITE',
        fetchedItem: suite,
        fetchedItemPath: filePath,
      });
    } catch (err) {
      this.setState({ error: `Could not find ${filePath}` });
    }
  }

  saveAsBaseline = (snapshotId: string) => {
    fetch('/api/saveAsBaseline', {
      method: 'POST',
      headers: { 'content-type': 'application/json' },
      body: JSON.stringify({
        filePath: this.state.fetchedItemPath,
        id: snapshotId,
      }),
    });
  };
}

// ==========================================
// Public
// ==========================================
export default App;
export { socketDisconnect };

/* eslint-env jest */
/* eslint-disable global-require, import/newline-after-import */
import React from 'react';
import renderer from 'react-test-renderer';
import App, { socketDisconnect } from '../010-app';

// https://github.com/facebook/react/issues/7386#issuecomment-238091398
jest.mock('react-dom');
jest.mock('../015-appContents', () =>
  require('./mockComponent')('AppContents')
);

describe('App', () => {
  beforeEach(() => {
    require('whatwg-fetch');
  });

  it('renders correctly', () => {
    const match = {
      path: '/',
      url: '/',
      params: {},
    };
    const tree = renderer.create(<App match={match} location={{}} />).toJSON();
    expect(tree).toMatchSnapshot();
  });

  afterEach(() => {
    socketDisconnect();
  });
});


/* eslint-disable react/no-string-refs */
import React from 'react';
import * as ReactRedux from 'react-redux';
import {
  TextInput, PasswordInput,
  Icon, Spinner,
} from 'giu';
import Promise from 'bluebird';
import * as actions from '../actions/actions';

const RETURN_KEY = 13;

const mapStateToProps = ({ cx: { fLoginRequired, loginState, login } }) => ({
  fLoginRequired,
  loginState,
  login,
});

class Login extends React.PureComponent {
  static propTypes = {
    colors: React.PropTypes.object.isRequired,
    fLoginRequired: React.PropTypes.bool,
    loginState: React.PropTypes.string.isRequired,
    login: React.PropTypes.string,
    logIn: React.PropTypes.func.isRequired,
    logOut: React.PropTypes.func.isRequired,
  };

  // -----------------------------------------------------
  render() {
    const { fLoginRequired, loginState, colors } = this.props;
    if (fLoginRequired == null) {
      return (

          <Spinner size="lg" fixedWidth />

      );
    }
    if (!fLoginRequired) {
      return
No login required to see server logs
;
    }
    return loginState === 'LOGGED_IN'
      ? this.renderLogOut()
      : this.renderLogIn();
  }

  renderLogOut() {
    const { login, colors } = this.props;
    const msg = login ? `Logged in as ${login}` : 'Logged in';
    return (

        {msg}
        {' '}
        <Icon
          icon="sign-out"
          title="Log out"
          size="lg"
          fixedWidth
          onClick={this.logOut}
        />

    );
  }

  renderLogIn() {
    const { loginState, colors } = this.props;
    let btn;
    switch (loginState) {
      case 'LOGGED_OUT':
        btn = (
          <Icon
            icon="sign-in"
            title="Log in"
            size="lg"
            fixedWidth
            onClick={this.logIn}
          />
        );
        break;
      case 'LOGGING_IN':
        btn = <Spinner title="Logging in" size="lg" fixedWidth />;
        break;
      default:
        btn = '';
        break;
    }
    return (

        Server logs:
        {' '}
        <TextInput
          ref="login"
          id="login"
          placeholder="Login"
          onKeyUp={this.onKeyUpCredentials}
          style={style.field}
          required errorZ={12}
        />
        <PasswordInput
          ref="password"
          id="password"
          placeholder="Password"
          onKeyUp={this.onKeyUpCredentials}
          style={style.field}
          required errorZ={12}
        />
        {btn}

    );
  }

  // -----------------------------------------------------
  logIn = () => {
    const credentials = {};
    Promise.map(['login', 'password'], (key) =>
      this.refs[key].validateAndGetValue()
        .then((val) => { credentials[key] = val; })
    )
      .then(() => this.props.logIn(credentials));
  }

  logOut = () => { this.props.logOut(); }

  onKeyUpCredentials = (ev) => {
    if (ev.which !== RETURN_KEY) return;
    this.logIn();
  }
}

// -----------------------------------------------------
const style = {
  outer: (colors, fHighlight) => ({
    padding: '4px 10px',
    backgroundColor: fHighlight ? colors.colorServerBg : colors.colorUiBg,
    color: fHighlight ? colors.colorServerFg : colors.colorUiFg,
  }),
  field: {
    marginRight: 4,
    width: 70,
    backgroundColor: 'transparent',
  },
};

// -----------------------------------------------------
const connect = ReactRedux.connect(mapStateToProps, actions);
export default connect(Login);
export { Login as _Login };

/* eslint-env jest */
/* eslint-disable no-extend-native, react/jsx-no-duplicate-props */
import React from 'react';
import renderer from 'react-test-renderer';
import { Floats } from 'giu';
import { _Login as Login } from '../010-login';
import { BASE_COLORS } from './fixtures';

jest.mock('react-dom');

describe('Login', () => {
  it('renders correctly when login needs are still unknown', () => {
    const tree = renderer.create(
      <Login
        colors={BASE_COLORS}
        loginState="LOGGED_OUT"
        logIn={() => {}}
        logOut={() => {}}
      />
    ).toJSON();
    expect(tree).toMatchSnapshot();
  });

  it('renders correctly when no login is required', () => {
    const tree = renderer.create(
      <Login
        colors={BASE_COLORS}
        fLoginRequired={false}
        loginState="LOGGED_OUT"
        logIn={() => {}}
        logOut={() => {}}
      />
    ).toJSON();
    expect(tree).toMatchSnapshot();
  });

  it('renders correctly when LOGGED_IN', () => {
    const tree = renderer.create(
      <Login
        colors={BASE_COLORS}
        fLoginRequired
        loginState="LOGGED_IN"
        login="Guille"
        logIn={() => {}}
        logOut={() => {}}
      />
    ).toJSON();
    expect(tree).toMatchSnapshot();
  });

  it('renders correctly when LOGGED_OUT', () => {
    const tree = renderer.create(

        <Floats />
        <Login
          colors={BASE_COLORS}
          fLoginRequired
          loginState="LOGGED_OUT"
          logIn={() => {}}
          logOut={() => {}}
        />

    ).toJSON();
    expect(tree).toMatchSnapshot();
  });

  it('renders correctly when LOGGING_IN', () => {
    const tree = renderer.create(

        <Floats />
        <Login
          colors={BASE_COLORS}
          fLoginRequired
          loginState="LOGGING_IN"
          logIn={() => {}}
          logOut={() => {}}
        />

    ).toJSON();
    expect(tree).toMatchSnapshot();
  });
});


import React from 'react';
import * as ReactRedux from 'react-redux';
import { Icon, isDark, hintShow } from 'giu';
import Login from './010-login';
import Settings from './016-settings';
import * as actions from '../actions/actions';

const mapStateToProps = (state) => ({
  wsState: state.cx.wsState,
});
const mapDispatchToProps = {
  expandAllStories: actions.expandAllStories,
  collapseAllStories: actions.collapseAllStories,
  clearLogs: actions.clearLogs,
  quickFind: actions.quickFind,
};

class Toolbar extends React.PureComponent {
  static propTypes = {
    colors: React.PropTypes.object.isRequired,
    // From Redux.connect
    wsState: React.PropTypes.string.isRequired,
    expandAllStories: React.PropTypes.func.isRequired,
    collapseAllStories: React.PropTypes.func.isRequired,
  };

  constructor(props) {
    super(props);
    this.state = {
      fSettingsShown: false,
    };
  }

  // -----------------------------------------------------
  render() {
    const { colors } = this.props;
    return (

        {this.renderSettings()}

            <Icon
              id="sbBtnShowSettings"
              icon="cog"
              size="lg"
              title="Show settings..."
              onClick={this.toggleSettings}
              style={style.icon(colors)}
            />
            <Icon
              icon="chevron-circle-down"
              size="lg"
              title="Expand all stories"
              onClick={this.props.expandAllStories}
              style={style.icon(colors)}
            />
            <Icon
              icon="chevron-circle-right"
              size="lg"
              title="Collapse all stories"
              onClick={this.props.collapseAllStories}
              style={style.icon(colors)}
            />
            <Icon
              icon="remove"
              size="lg"
              title="Clear logs"
              onClick={this.props.clearLogs}
              style={style.icon(colors)}
            />
            <Icon
              icon="info-circle"
              size="lg"
              title="Show hints"
              onClick={this.showHints}
              style={style.icon(colors)}
            />
            {' '}
            <input
              id="quickFind"
              type="search"
              results={0}
              placeholder="Quick find..."
              onChange={this.onChangeQuickFind}
              style={style.quickFind(colors)}
            />
            {this.renderWsStatus()}

          <Login colors={colors} />

    );
  }

  renderSettings() {
    if (!this.state.fSettingsShown) return null;
    return (
      <Settings
        onClose={this.toggleSettings}
        colors={this.props.colors}
      />
    );
  }

  renderWsStatus() {
    const fConnected = this.props.wsState === 'CONNECTED';
    const icon = fConnected ? 'chain' : 'chain-broken';
    const title = fConnected
      ? 'Connection with the server is UP'
      : 'Connection with the server is DOWN';
    return (
      <Icon
        id="sbWsStatusIcon"
        icon={icon}
        size="lg"
        title={title}
        style={style.wsStatus(fConnected)}
      />
    );
  }

  // -----------------------------------------------------
  toggleSettings = () => {
    this.setState({ fSettingsShown: !this.state.fSettingsShown });
  }

  showHints = () => {
    hintShow('main', true);
  }

  onChangeQuickFind = (ev) => {
    this.props.quickFind(ev.target.value);
  }
}

// -----------------------------------------------------
const style = {
  outer: (colors) => {
    const rulerColor = isDark(colors.colorUiBg) ? '#ccc' : '#555';
    return {
      position: 'fixed',
      top: 0,
      left: 0,
      height: 30,
      width: '100%',
      backgroundColor: colors.colorUiBg,
      borderBottom: `1px solid ${rulerColor}`,
      display: 'flex',
      flexDirection: 'row',
      whiteSpace: 'nowrap',
      zIndex: 10,
    };
  },
  icon: (colors) => ({
    cursor: 'pointer',
    color: colors.colorUiFg,
    marginRight: 10,
  }),
  wsStatus: (fConnected) => ({
    marginRight: 5,
    marginLeft: 10,
    color: fConnected ? 'green' : 'red',
    cursor: 'default',
  }),
  placeholder: { height: 30 },
  left: { padding: '4px 4px 4px 8px' },
  right: { padding: '4px 8px 4px 4px' },
  spacer: { flex: '1 1 0px' },
  quickFind: (colors) => ({
    backgroundColor: 'transparent',
    color: colors.colorUiFg,
    borderWidth: 1,
  }),
};

// -----------------------------------------------------
const connect = ReactRedux.connect(mapStateToProps, mapDispatchToProps);
export default connect(Toolbar);
export { Toolbar as _Toolbar };

/* eslint-env jest */
/* eslint-disable global-require, import/newline-after-import */
import React from 'react';
import renderer from 'react-test-renderer';
import { _Toolbar as Toolbar } from '../015-toolbar';
import { BASE_COLORS } from './fixtures';
import $ from './jestQuery';

jest.mock('react-dom');
jest.mock('../010-login', () => require('./mockComponent')('Login'));
jest.mock('../016-settings', () => require('./mockComponent')('Settings'));

describe('Toolbar', () => {
  it('renders correctly when disconnected', () => {
    const tree = renderer.create(
      <Toolbar
        colors={BASE_COLORS}
        wsState="DISCONNECTED"
        expandAllStories={() => {}}
        collapseAllStories={() => {}}
      />
    ).toJSON();
    expect(tree).toMatchSnapshot();
  });

  it('renders correctly when connected', () => {
    const tree = renderer.create(
      <Toolbar
        colors={BASE_COLORS}
        wsState="CONNECTED"
        expandAllStories={() => {}}
        collapseAllStories={() => {}}
      />
    ).toJSON();
    expect(tree).toMatchSnapshot();
  });

  it('shows settings when the corresponding icon is clicked', () => {
    const component = renderer.create(
      <Toolbar
        colors={BASE_COLORS}
        wsState="CONNECTED"
        expandAllStories={() => {}}
        collapseAllStories={() => {}}
      />
    );
    let tree = component.toJSON();
    const showSettingsBtn = $(tree, '#sbBtnShowSettings');
    expect(showSettingsBtn).not.toBeNull();
    showSettingsBtn.props.onClick();
    tree = component.toJSON();
    expect(tree).toMatchSnapshot();
  });
});


/* eslint-env browser */
/* eslint-disable react/no-string-refs */
import React from 'react';
import * as ReactRedux from 'react-redux';
import { merge, omit } from 'timm';
import {
  Icon, Modal, Button,
  Checkbox, TextInput, NumberInput, ColorInput,
} from 'giu';
import Promise from 'bluebird';
import * as actions from '../actions/actions';
import { DEFAULT_SETTINGS } from '../reducers/settingsReducer';  // eslint-disable-line import/no-unresolved, import/extensions

const FORM_KEYS = [
  'fShowClosedActions',
  'fShorthandForDuplicates',
  'fCollapseAllNewStories',
  'fExpandAllNewAttachments',
  'fDiscardRemoteClientLogs',
  'serverFilter', 'localClientFilter',
  'maxRecords', 'forgetHysteresis',
  'colorClientBg', 'colorServerBg', 'colorUiBg',
];

let idxPresetColors = 2;  // next one will be dark!
const PRESET_COLORS = [
  { colorClientBg: 'aliceblue', colorServerBg: 'rgb(214, 236, 255)', colorUiBg: 'white' },
  { colorClientBg: 'rgb(255, 240, 240)', colorServerBg: 'rgb(255, 214, 215)', colorUiBg: 'white' },
  { colorClientBg: 'rgb(250, 240, 255)', colorServerBg: 'rgb(238, 214, 255)', colorUiBg: 'white' },
  { colorClientBg: 'rgb(17, 22, 54)', colorServerBg: 'rgb(14, 11, 33)', colorUiBg: 'black' },
];

const mapStateToProps = (state) => ({
  settings: state.settings,
  serverFilter: state.cx.serverFilter,
  localClientFilter: state.cx.localClientFilter,
});

class Settings extends React.Component {
  static propTypes = {
    onClose: React.PropTypes.func.isRequired,
    colors: React.PropTypes.object.isRequired,
    // From Redux.connect
    settings: React.PropTypes.object.isRequired,
    serverFilter: React.PropTypes.string,
    localClientFilter: React.PropTypes.string,
    updateSettings: React.PropTypes.func.isRequired,
    setServerFilter: React.PropTypes.func.isRequired,
    setLocalClientFilter: React.PropTypes.func.isRequired,
  };

  constructor(props) {
    super(props);
    this.state = merge({}, this.props.settings, {
      _fCanSave: true,
      cmdsToInputs: null,
    });
  }

  componentDidMount() {
    this.checkLocalStorage();
  }

  // -----------------------------------------------------
  render() {
    const { colors } = this.props;
    const buttons = [
      { label: 'Cancel', onClick: this.props.onClose, left: true },
      { label: 'Reset defaults', onClick: this.onReset, left: true },
      {
        label: 'Save',
        onClick: this.onSubmit,
        defaultButton: true,
        style: style.modalDefaultButton(colors),
      },
    ];
    const { cmdsToInputs } = this.state;
    return (
      <Modal
        buttons={buttons}
        onEsc={this.props.onClose}
        style={style.modal(colors)}
      >
        {this.renderLocalStorageWarning()}
        <Checkbox
          ref="fShowClosedActions"
          label={Show CLOSED actions}
          value={this.state.fShowClosedActions}
          cmds={cmdsToInputs}
        />

        <Checkbox
          ref="fShorthandForDuplicates"
          label={

              Use shorthand notation for identical consecutive
              logs ( <Icon icon="copy" style={style.icon} disabled /> )

          }
          value={this.state.fShorthandForDuplicates}
          cmds={cmdsToInputs}
        />

        <Checkbox
          ref="fCollapseAllNewStories"
          label="Collapse all new stories (even if they are still open)"
          value={this.state.fCollapseAllNewStories}
          cmds={cmdsToInputs}
        />

        <Checkbox
          ref="fExpandAllNewAttachments"
          label="Expand all attachments upon receipt"
          value={this.state.fExpandAllNewAttachments}
          cmds={cmdsToInputs}
        />

        <Checkbox
          ref="fDiscardRemoteClientLogs"
          label="Discard stories from remote clients upon receipt"
          value={this.state.fDiscardRemoteClientLogs}
          cmds={cmdsToInputs}
        />

        {this.renderLogFilters()}
        {this.renderForgetSettings()}
        {this.renderColors()}
        {this.renderVersion()}
      </Modal>
    );
  }

  renderLogFilters() {
    const { cmdsToInputs } = this.state;
    return [

        Log filters, e.g. foo, ba*:INFO, -test, *:WARN{' '}

          (more examples here)
        :

,
      // ------------------------------------------------

            Server:
          {' '}
          <TextInput
            ref="serverFilter"
            id="serverFilter"
            value={this.props.serverFilter}
            required errorZ={52}
            style={style.textNumberInput(300)}
            cmds={cmdsToInputs}
          />

            Local client:
          {' '}
          <TextInput
            ref="localClientFilter"
            id="localClientFilter"
            value={this.props.localClientFilter}
            required errorZ={52}
            style={style.textNumberInput(300)}
            cmds={cmdsToInputs}
          />

,
    ];
  }

  // For maxRecords and forgetHysteresis, we keep track of their current values
  // to update the tooltip accordingly
  renderForgetSettings() {
    const { cmdsToInputs } = this.state;
    return (

          Number of logs and stories to remember:
        {' '}
        <NumberInput
          ref="maxRecords"
          id="maxRecords"
          step={1} min={0}
          value={this.state.maxRecords}
          onChange={(ev, maxRecords) => this.setState({ maxRecords })}
          style={style.textNumberInput(50)}
          required errorZ={52}
          cmds={cmdsToInputs}
        />{' '}

          with hysteresis:
        {' '}
        <NumberInput
          ref="forgetHysteresis"
          id="forgetHysteresis"
          step={0.05} min={0} max={1}
          value={this.state.forgetHysteresis}
          onChange={(ev, forgetHysteresis) => this.setState({ forgetHysteresis })}
          style={style.textNumberInput(50)}
          required errorZ={52}
          cmds={cmdsToInputs}
        />{' '}
        <Icon
          icon="info-circle"
          title={this.maxLogsDesc()}
          style={style.maxLogsDesc}
        />

    );
  }

  renderColors() {
    const { cmdsToInputs } = this.state;
    return (

        Colors:
        client stories:
        {' '}
        <ColorInput
          ref="colorClientBg"
          id="colorClientBg"
          value={this.state.colorClientBg}
          floatZ={52}
          styleOuter={style.colorInput}
          cmds={cmdsToInputs}
        />
        {' '}
        server stories:
        {' '}
        <ColorInput
          ref="colorServerBg"
          id="colorServerBg"
          value={this.state.colorServerBg}
          floatZ={52}
          styleOuter={style.colorInput}
          cmds={cmdsToInputs}
        />
        {' '}
        background:
        {' '}
        <ColorInput
          ref="colorUiBg"
          id="colorUiBg"
          value={this.state.colorUiBg}
          floatZ={52}
          styleOuter={style.colorInput}
          cmds={cmdsToInputs}
        />

          (Use very light or very dark colors for best results, or choose a
          {' '}
          <Button onClick={this.onClickPresetColors}>preset</Button>)

    );
  }

  renderVersion() {
    if (!process.env.STORYBOARD_VERSION) return null;
    return (

        Storyboard DevTools v{process.env.STORYBOARD_VERSION}

        (c)
          Guillermo Grau
         2016

    );
  }

  renderLocalStorageWarning() {
    if (this.state._fCanSave) return null;
    const txt1 = "Changes to these settings can't be saved (beyond your current session) " +
      'due to your current Chrome configuration. Please visit ';
    const url = 'chrome://settings/content';
    const txt2 = ' and uncheck the option "Block third-party cookies and site' +
      ' data". Then close the Chrome DevTools and open them again.';
    return (

        {txt1}{url}{txt2}

    );
  }

  maxLogsDesc() {
    const hyst = this.state.forgetHysteresis;
    const hi = this.state.maxRecords;
    const lo = hi - (hi * hyst);
    return `When the backlog reaches ${hi}, Storyboard will ` +
      `start forgetting old stuff until it goes below ${lo}`;
  }

  // -----------------------------------------------------
  onSubmit = () => {
    const settings = {};
    Promise.map(FORM_KEYS, (key) => {
      const ref = this.refs[key];
      if (!ref) throw new Error('Could not read form');
      return this.refs[key].validateAndGetValue()
        .then((val) => { settings[key] = val; });
    })
      .then(() => {
        const persistedSettings = omit(settings, ['serverFilter', 'localClientFilter']);
        this.props.updateSettings(persistedSettings);
        if (settings.serverFilter !== this.props.serverFilter) {
          this.props.setServerFilter(settings.serverFilter);
        }
        if (settings.localClientFilter !== this.props.localClientFilter) {
          this.props.setLocalClientFilter(settings.localClientFilter);
        }
        this.props.onClose();
      });
  }

  onReset = () => {
    this.setState(DEFAULT_SETTINGS);
    this.setState({
      cmdsToInputs: [{ type: 'REVERT' }],
    });
  }

  onClickPresetColors = () => {
    idxPresetColors = (idxPresetColors + 1) % PRESET_COLORS.length;
    const presetColors = PRESET_COLORS[idxPresetColors];
    this.setState(presetColors);
  }

  checkLocalStorage() {
    try {
      /* eslint-disable no-unused-vars */
      const ls = localStorage.foo;
      /* eslint-enable no-unused-vars */
      this.setState({ _fCanSave: true });
    } catch (error) {
      this.setState({ _fCanSave: false });
    }
  }
}

// -----------------------------------------------------
const style = {
  modal: (colors) => ({
    backgroundColor: colors.colorUiBgIsDark ? 'black' : 'white',
    color: colors.colorUiBgIsDark ? 'white' : 'black',
  }),
  modalDefaultButton: (colors) => ({
    border: colors.colorUiBgIsDark ? '1px solid white' : undefined,
  }),
  version: {
    textAlign: 'right',
    color: '#888',
    marginTop: 8,
    marginBottom: 8,
  },
  link: { color: 'currentColor' },
  icon: { color: 'currentColor' },
  localStorageWarning: {
    color: 'red',
    border: '1px solid red',
    padding: 15,
    marginBottom: 10,
    borderRadius: 2,
    maxWidth: 500,
  },
  maxLogsDesc: { cursor: 'pointer' },
  filters: {
    list: { marginTop: 0 },
    itemLabel: {
      display: 'inline-block',
      width: 80,
    },
  },
  colorInput: {
    position: 'relative',
    top: 1,
  },
  textNumberInput: (width) => ({
    backgroundColor: 'transparent',
    width,
  }),
};

// -----------------------------------------------------
const connect = ReactRedux.connect(mapStateToProps, actions);
export default connect(Settings);
export { Settings as _Settings };

/* eslint-env jest */
/* eslint-disable global-require, import/newline-after-import */
import React from 'react';
import renderer from 'react-test-renderer';
import { Floats } from 'giu';
import { _Settings as Settings } from '../016-settings';
import { BASE_COLORS } from './fixtures';

jest.mock('react-dom');

describe('Settings', () => {
  it('renders correctly', () => {
    const settings = {
      colorClientBg: 'aliceblue',
      colorClientBgIsDark: false,
      colorClientFg: 'black',
      colorServerBg: 'rgb(214, 236, 255)',
      colorServerBgIsDark: false,
      colorServerFg: 'black',
      colorUiBg: 'white',
      colorUiBgIsDark: false,
      colorUiFg: 'rgb(64, 64, 64)',
      fCollapseAllNewStories: false,
      fDiscardRemoteClientLogs: false,
      fExpandAllNewAttachments: false,
      fShorthandForDuplicates: true,
      fShowClosedActions: false,
      forgetHysteresis: 0.25,
      maxRecords: 800,
      timeType: 'LOCAL',
    };
    const tree = renderer.create(
      <div>
        <Floats />
        <Settings
          onClose={() => {}}
          colors={BASE_COLORS}
          settings={settings}
          serverFilter="*:INFO"
          localClientFilter="*:DEBUG"
          updateSettings={() => {}}
          setServerFilter={() => {}}
          setLocalClientFilter={() => {}}
        />
      </div>
    ).toJSON();
    expect(tree).toMatchSnapshot();
  });
});


import { merge } from 'timm';
import React from 'react';
import { ansiColors } from 'storyboard-core';

class ColoredText extends React.PureComponent {
  static propTypes = {
    text: React.PropTypes.string.isRequired,
    onClick: React.PropTypes.func,
    style: React.PropTypes.object,
  };

  // -----------------------------------------------------
  render() {
    const segments = ansiColors.getStyledSegments(this.props.text);
    if (segments.length === 1) {
      const segment = segments[0];
      const extraProps = {
        onClick: this.props.onClick,
        style: merge(segment.style, this.props.style),
      };
      return this.renderMsgSegment(segment, 0, extraProps);
    }
    return (

        {segments.map((segment, idx) => this.renderMsgSegment(segment, idx))}

    );
  }

  renderMsgSegment(segment, idx, extraProps = {}) {
    return (

        {segment.text}

    );
  }
}

// -----------------------------------------------------
export default ColoredText;

/* eslint-env jest */
/* eslint-disable no-extend-native */
import React from 'react';
import renderer from 'react-test-renderer';
import { chalk } from 'storyboard-core';
import ColoredText from '../030-coloredText';

describe('ColoredText', () => {
  it('renders correctly with unstyled text', () => {
    const tree = renderer.create(
      <ColoredText text="Hello" />
    ).toJSON();
    expect(tree).toMatchSnapshot();
  });

  it('renders correctly with styled text', () => {
    const text = `That's ${chalk.red('red')} and that's ${chalk.cyan.bold('very important')}`;
    const tree = renderer.create(
      <ColoredText text={text} />
    ).toJSON();
    expect(tree).toMatchSnapshot();
  });

  it('renders nested styles correctly', () => {
    const text = `That's ${chalk.red(`${chalk.bold('very')} important`)}`;
    const tree = renderer.create(
      <ColoredText text={text} />
    ).toJSON();
    expect(tree).toMatchSnapshot();
  });

  it('respects the style prop', () => {
    const tree = renderer.create(
      <ColoredText text="Hello" style={{ border: '1px solid black' }} />
    ).toJSON();
    expect(tree).toMatchSnapshot();
  });

  it('respects the onClick prop', () => {
    const tree = renderer.create(
      <ColoredText text="Hello" onClick={() => {}} />
    ).toJSON();
    expect(tree).toMatchSnapshot();
  });
});


// @flow

import React from 'react';
import { Link } from 'react-router-dom';
import { Icon, flexContainer, flexItem } from 'giu';

// ==========================================
// Declarations
// ==========================================
type Props = {
  title: any,
  subtitle: ?string,
  linkBack: ?string,
  children?: any,
  fRaw: boolean,
  toggleRaw: () => void,
};

// ==========================================
// Component
// ==========================================
const Sidebar = ({
  title,
  subtitle,
  linkBack,
  children,
  fRaw,
  toggleRaw,
}: Props) => (

        <Link to={linkBack || '#'} style={style.back}>
          <Icon icon="chevron-left" size="lg" disabled={linkBack == null} />
        </Link>

        {title}

        <Icon
          id="jh-toggle-raw"
          icon="file-code-o"
          size="lg"
          onClick={toggleRaw}
          style={style.raw(fRaw)}
          title="Toggle raw/HTML snapshot"
        />

    {children}

);

// ------------------------------------------
const style = {
  outer: flexItem('0 0 18em', {
    padding: '0.3em 0',
    backgroundColor: '#eee',
    fontFamily: 'sans-serif',
    fontSize: '0.8em',
    overflow: 'auto',
    borderRight: '2px solid #ddd',
  }),
  back: {
    margin: '0.3em',
    padding: '0.3em',
    color: 'currentColor',
  },
  titleBar: flexContainer('row', {
    alignItems: 'baseline',
    marginTop: '0.4em',
    marginBottom: '1.1em',
  }),
  title: flexItem(1, {
    textAlign: 'center',
    fontWeight: 'bold',
  }),
  raw: fRaw => ({
    color: fRaw ? 'black' : 'gray',
  }),
};

// ==========================================
// Public
// ==========================================
export default Sidebar;

/* eslint-env jest */
/* eslint-disable global-require, import/newline-after-import */
import React from 'react';
import renderer from 'react-test-renderer';
import Sidebar from '../110-sidebar';

// https://github.com/facebook/react/issues/7386#issuecomment-238091398
jest.mock('react-dom');
jest.mock('react-router-dom', () => ({
  Link: require('./mockComponent')('Link'),
}));

describe('Sidebar', () => {
  it('renders correctly', () => {
    const tree = renderer
      .create(
        <Sidebar
          title="Title"
          subtitle="Subtitle"
          linkBack="link/to/parent/folder"
        >
          {['one', 'two']}
        </Sidebar>
      )
      .toJSON();
    expect(tree).toMatchSnapshot();
  });

  it('renders correctly without linkBack', () => {
    const tree = renderer
      .create(
        <Sidebar title="Title" subtitle="Subtitle">
          {['one', 'two']}
        </Sidebar>
      )
      .toJSON();
    expect(tree).toMatchSnapshot();
  });
});


A Porthcawl RNLI crew with a medic and the coastguard search and rescue helicopter were sent to Sker Beach, near Kenfig Nature Reserve, at 12:50 GMT on Sunday.
Crewman Chris Page said the rider had head injuries and was very cold from lying unconscious on wet sand.
She was treated before being flown to Cardiff's University Hospital of Wales.

A woman has been airlifted to hospital after falling from a horse on a Bridgend county beach.


Verheydt, who had been with Maastricht since 2015, has signed a three-year contract with Harry Kewell's side.
The 25-year-old scored 13 goals in 43 appearances in all competitions last season.
Meanwhile, Watford winger Dennon Lewis, 20, has joined the Reds on a loan deal until 31 December.
Lewis, who made 29 National League appearances on loan at Woking last season, played under Kewell when the Australian was coach of Watford's under-23 team.
Find all the latest football transfers on our dedicated page.

League Two side Crawley Town have signed striker Thomas Verheydt from Dutch second-tier side MVV Maastricht for an undisclosed fee.


The 32-year-old had been playing in the Isthmian Premier Division with Leatherhead following his release by Newport at the end of last season.
Pidgeley has made 260 appearances in spells with nine clubs, including Chelsea, Watford and Millwall.
Forest Green are currently second in the National League table, one point behind leaders Cheltenham Town.
Pidgeley could make his Rovers debut when they host Aldershot on Friday.

National League side Forest Green Rovers have signed goalkeeper Lenny Pidgeley until the end of the season.


The suspected green mamba was found on a ship that had docked in Aberdeen from west Africa last month.
The snake died after it was placed in a freezer by the animal charity after attempts to rehome it with specialist reptile keepers failed.
The snake was later identified as a harmless green tree snake.
Police Scotland said a complaint was under consideration.
Scottish SPCA Ch Supt Mike Flynn said: "We were called out after a green snake arrived in Aberdeen on a boat from Africa.
"The snake was thought to be a green mamba, one of the deadliest snakes in the world. The snake was taken by police escort to our Aberdeenshire animal rescue and rehoming centre.
"Sadly the snake, which staff genuinely believed to be a green mamba, had to be put to sleep after our attempts to rehome it to specialist reptile keepers were unsuccessful."
He added: "We could not keep the snake in our centre due to severe health and safety concerns, as the closest anti-venom is held in Bedford. Green mambas also require a Dangerous Wild Animal Licence which the society does not have.
"The safety of our staff and the public is paramount and as such the snake was placed in a freezer where it passed away.
"The Scottish SPCA is proud of its policy not put healthy animals to sleep. Animals are only put to sleep on veterinary advice if they are too ill or too aggressive to be rehomed, or where we are legally required to do so.
"The decision to euthanise the snake was not taken lightly. Unfortunately, the snake has since been identified as a harmless green tree snake. This has been an honest mistake on the society's part as we genuinely believed this was an extremely deadly snake."
The western green mamba feeds on small animals and rodents and is mainly found in the coastal tropical rainforests of western Africa.
Experts say its bite can be fatal in as little as 30 minutes.

A complaint about the Scottish SPCA putting what was thought to be one of the world's most deadly snakes to sleep is being investigated by police.


The all-rounder has been included in the T20 squad to face Sri Lanka on 5 July at the Ageas Bowl, having been part of the World T20 squad in March.
"It's nice to be involved again," the 26-year-old slow left-armer and right-handed batsman told BBC Radio Solent.
"I wasn't expecting to be as I thought Moeen Ali would, but him being rested hands me another opportunity."
Dawson failed to make an appearance during England's run to the World T20 final in India this year, but his limited-overs performances for Hampshire this season have kept him in contention.
"I'm not sure what team they'll go with," he said.
"I've had some good performances for Hampshire in one-day and T20 cricket and if I keep going with that, hopefully I might get a chance."

Hampshire's Liam Dawson says it would be "amazing" to make his England Twenty20 debut on his home ground.


The Egypt-backed plan had envisaged a regional forum which analysts say might have forced Israel to reveal whether or not it has nuclear weapons.
The proposal was blocked by the US, the UK and Canada. The next review is set for  2020.
Israel neither confirms nor denies it has a stockpile of nuclear weapons.
Speaking after four weeks of negotiations, US Under-Secretary of State Rose Gottemoeller accused Egypt and other Arab countries of "not willing to let go of these unrealistic and unworkable conditions" for future talks.
She also said some participants tried to "cynically manipulate" the whole process.
But Egypt warned that the failure to reach a deal "will have consequences in front of the Arab world and public opinion", the Associated Press news agency reports.
Last month, Egypt had proposed to stage a regional conference - with or without Israel's participation and without an agreed agenda.
Some analysts suggested that this move might have forced Israel - which is not a party to the Treaty on the Non-Proliferation of Nuclear Weapons (NPT) - to publicly clarify its position on nuclear weapons.
Decisions at NPT review conferences - held every five years - are made by consensus.
The failure of the current talks means the next gathering could only be held in 2020 at the earliest.

A UN conference aimed at preventing the proliferation of nuclear weapons has ended in failure after a row over a nuclear-free Middle East proposal.


Mothers-to-be are more likely to get malaria as their immunity is lowered, says the Royal College of Obstetricians and Gynaecologists (RCOG).
Malaria carries serious risks for mother and baby including miscarriage, stillbirth and premature labour.
The tropical disease is transmitted by mosquitoes and causes a fever, flu-like symptoms, vomiting and diarrhoea.
There have been no malaria-related deaths in pregnant or recently pregnant women in the UK in the past decade but the RCOG says it has been receiving inquires from worried women.
In the UK, about 1,500 cases of malaria are reported each year and about 10 people will die, said the RCOG.
It says all non-essential trips to areas with a high risk of malaria should be avoided.
Risk areas include large areas of Africa, Asia including China and India, Central and South America, parts of the Middle East and some Pacific Islands.
If the trip is unavoidable, the college advises women to seek advice from a centre with expertise in malaria which will provide information on ways to reduce the risk of infection.
Women should make sure they are aware of the risk, take out measures such as mosquito nets for bite prevention and take anti-malarial medication.
Philippa Marsden, who chairs the RCOG's patient information committee, said although the risks were still relatively small it was important that women were well-informed.
Cath Broderick of the RCOG women's network said: "If women are worried about symptoms after returning from a high-risk country and think they may have malaria, they should see a doctor immediately and inform them of their recent travels."
Symptoms can take a week or more to develop after being bitten.

Pregnant women should visit countries with a risk of malaria only if their trip is essential, experts are warning.


Researchers at the University of Sheffield said the tumours were effectively "fertilising" the bone to help themselves grow.
The study, in the journal Nature, said it may be possible to protect bone from a tumour's nefarious influence and consequently stop the cancer's spread.
Cancer charities said this opened up "a whole new avenue for research".
Around 85% of breast cancers that spread around the body end up in bone, at which point the cancer is difficult to treat and more deadly.
The scientists, in Sheffield and the University of Copenhagen, discovered patients with secondary cancers had higher levels of an enzyme called LOX being produced by their tumours and released into the blood.
Bone is constantly being broken down and rebuilt. But in a series of experiments on mice, the research team showed LOX was disrupting the process and leaving lesions and holes in the bone.
Using drugs to block LOX prevented the cancer from spreading.
Dr Alison Gartland, a reader in bone and cancer biology at the university, told the BBC News website: "We think it's a significant breakthrough in trying to prevent metastases (secondary tumours) in breast cancer.
"The cancer cells in the primary tumour are actually fertilising the soil for the future growth of itself, LOX is changing the environment in bone to make it better to grow."
The animal tests also showed that a set of osteoporosis drugs called bisphosphonates could prevent the spread of cancer.
Bisphosphonates also interfere with the way bone is recycled in order to strengthen it.
They are already given to some cancer patients, but the Sheffield team believe they could have a much larger role.
The effect was discovered only in oestrogen-negative breast cancers. They account for around a third of cases, but are far more deadly.
Katherine Woods, from Breast Cancer Campaign and Breakthrough Breast Cancer, said: "By unveiling the role that the protein LOX is playing, these results open up a whole new avenue for research and treatments that could stop breast cancer spreading to the bone.
"The research also adds weight to the growing body of evidence supporting the role of bisphosphonates in stopping secondary breast cancer in its tracks.
"The reality of living with secondary breast cancer in the bone is a stark one, which leaves many women with bone pain and fractures that need extensive surgery just when they need to be making the most of the time they have left with friends and family."
The findings may also apply in colon cancer.

Breast cancers can manipulate the structure of bone to make it easier to spread there, a study has found.


Kita perlu pastikan juga supaya suasana hari raya ini tidak dirosakkan oleh gajet yang melekakan untuk kemas kini laman sosial daripada mengeratkan silaturahim.

Kekeliruan mantik Kekeliruan mantik didefinasikan sebagai hujjah yang tidak sahih.

"Ingin ditegaskan sekali lagi bahawa Menteri Kewangan dan Kementerian Kewangan tidak sekali-kali pernah mengeluarkan arahan seperti yang dinyatakan dalam artikel Malaysia Today.

Bekzat Sattarkhanov Bekzat Sattarkhanov (Bahasa Kazakh dan Rusia: Bekzat Sattarkhanov) (4 April 1980, Turkistan, 31 Disember 2000, Shymkent, 20 tahun) merupakan seorang peninju yang bertanding dalam bahagian kelas bulu lelaki (57 kg), di Sukan Olimpik Musim Panas 2000 dan memenangi pingat emas.

Pelajar Tahun Satu maut digilis kenderaan

Pelbagai aktiviti diadakan antaranya gotong-royong membersihkan kawasan Masjid Sematang Gunung dan kawasan pembiakan nyamuk, pemeriksaan kesihatan, ziarah warga emas dan pasar percuma barangan terpakai.

Like many New Yorkers several decades her junior, she often orders takeout rather than bother with cooking.

Ia merupakan filemnya yang menerima penarafan tertinggi di laman ulasan agregator Rotten Tomatoes.

Wings tampil dengan kelainan tersendiri dengan muzik yang dibawakan mereka cukup mantap walaupun ini adalah album pertama.

Melemahnya rupiah terhadap dolar akan mengakibatkan harga emas meningkat, apabila terjadi krisis atau resesi dunia, emas akan meningkat drastis.

"Tetapi setahu saya dalam tempoh itu ada jawatankuasa kenaikan pangkat di bahagian Sumber Manusia yang mengendalikan urusan berkaitan dengan kenaikan pangkat dan pertukaran.

Pada 2009, Sekolah Kebangsaan Kampung Baharu memiliki 59 pelajar lelaki dan 42 pelajar perempuan, menjadikan jumlah keseluruhan murid seramai 101 orang.

Chad akhirnya menembak beberapa siri tenaga semangat tetapi kesemuanya berjaya dielak atau dihadang oleh Shunsui.

The Cleveland Show The Cleveland Show ialah sitkom animasi dewasa Amerika yang dicipta oleh Seth MacFarlane, Richard Appel, dan Mike Henry untuk Fox sebagai spin-off "Family Guy".

"Itu saya kata, yang baling kerusi (timbul kekecohan) harus dibaling keluar dari parti tapi kena siasat dululah.

We also need to make sure that the atmosphere of the holiday is not ruined by the gadgets that are trying to update social sites rather than foster friendships.

Misty Misty Misty is defined as an invalid verdict.

"We want to reiterate that the Minister of Finance and the Ministry of Finance have never issued instructions as stated in a Malaysia Today article.

Sattarkhanov's Curse Sattarkhanov (Kazakh and Russian: Sattarkhanov's Curse) (April 4, 1980, Turkistan, December 31, 2000, Shymkent, 20) is a boxer competing in the men's (57kg) division, at the 2000 Summer Olympics and won a gold medal.

One Year One student was killed in a vehicle

Various activities were held such as gotong-royong cleaning of Sematang Mountain Mosque and mosquito breeding areas, health checks, elderly pilgrimages and free markets of used goods.

It is the highest rated movie on the Rotten Tomatoes aggregator review site.

The Wings came up with their own distinctions with the music they played quite well even though this was their first album.

The weakening of the rupee against the dollar will lead to rising gold prices, in the event of a global crisis or recession, gold will increase sharply.

"But to my knowledge at that time there was a promotion committee in the Human Resources division that handled matters related to promotion and exchange.

In 2009, the New Baharu National School had 59 boys and 42 girls, making a total of 101 students.

Chad eventually fired a series of energies but all succeeded in avoiding or blocking Shunsui.

The Cleveland Show The Cleveland Show is an American animated sitcom created by Seth MacFarlane, Richard Appel, and Mike Henry for Fox as a spin-off of "Family Guy".

"I said, the seat propeller should be thrown out of the party but it will be investigated.


Cabaye beraksi dalam perlawanan akhir Coupe de France dimana mereka mengalahkan Paris Saint-Germain 1-0 di Stade de France.

Pandangan Horus sebagai firaun nampaknya telah digantikan oleh konsep firaun sebagai anak Ra pada Dinasti Kelima "Teks Piramid" (c.

Dalam contoh, 0.698 970 (004 336 018 ...) akan disenaraikan sekali diindekskan dengan 5, atau mungkin dengan 0.5 atau 500 dsb.

Because digital imaging has provided multiple opportunities for radiologists in the private sector, there has been a shift of radiologists' activity from academia to the private sector.

Bagi penjawat awam di bawah skim pencen, pelepasan cukai adalah sehingga RM7,000.

Selepas jurulatih Hugo Broos dipecar pada Februari 2006, beliau menjadi pengurus baru dan memenangi dua trofi liga.

Pada 19 November 2016, Presiden JR Hokkaido mengumumkan rancangan untuk merasionalisasikan rangkaiannya dengan penarikan balik perkhidmatan dari sehingga 1,237 km, atau kira-kira 50% rangkaian semasa, termasuk penutupan bahagian yang tersisa di Laluan Utama Rumoi (bahagian Rumoi - Mashike ditutup pada 4 Disember 2016), bahagian Shin-Yubari - Yubari dari Laluan Sekisho, seksyen bukan elektrik Laluan Sassho dan Laluan Nemuro antara Furano dan Kami-Ochiai Junction.

Manakala jika pemegang MyKad mempunyai siri nombor terakhir berangka ganjil, jantina pemegang adalah lelaki.

Daripada penganut agama Hindu, 1,644,072 terdiri daripada kaum India, 111,329 adalah bukan warganegara, 14,878 adalah Cina, 4,474 lain-lain, dan 2,941 orang asli (termasuk 554 Iban di Sarawak).

Ada pula kompetitor dengan reputasi selangit.

PUTAJAYA: The Royal Customs Department today defended the issue of the goods and services tax (GST) exemption given to China Communications Construction Company (CCCC), which is building the RM55 billion East Coast Rail Link (ECRL).

Jayah dipilih untuk Majlis Undangan bersama dua orang lain dari pengundi ini.

Angka penjualan Cadbury Malaysia sebenarnya hanya berjumlah 15 persen dari pendapatan perusahaan di Asia Pasifik.

Menurut sebuah teks Hippokrates dari tahun 400 SM, "On the Sacred Disease", Poseidon mampu membuat orang menderita epilepsi.

Cabaye played in the Coupe de France final where they defeated Paris Saint-Germain 1-0 in the Stade de France.

Horus' view of the pharaoh appears to have been replaced by the concept of pharaoh as the son of Ra in the Fifth Dynasty "Pyramid Text" (c.

For example, 0.698 970 (004 336 018 ...) will be listed once indexed by 5, or maybe by 0.5 or 500, etc.

For civil servants under the pension scheme, the tax relief is up to RM7,000.

After coach Hugo Broos was sacked in February 2006, he became the new manager and won two league trophies.

On November 19, 2016, President JR Hokkaido announced plans to rationalize his network by retracting services from up to 1,237 km, or about 50% of the current network, including closing the remaining sections of the Rumoi Main Line (Rumoi - Mashike section closed on December 4, 2016 ), the Shin-Yubari - Yubari section of the Sekisho Line, the non-electric section of the Sassho Line and the Nemuro Line between Furano and Kami-Ochiai Junction.

Whereas if the MyKad holder has a series of odd numbered numbers, the gender of the holder is male.

Of the Hindus, 1,644,072 were Indians, 111,329 were non-citizens, 14,878 were Chinese, 4,474 others, and 2,941 were indigenous (including 554 Ibans in Sarawak).

There are competitors with a bad reputation.

Jayah was elected to the Legislative Assembly along with two other voters.

Cadbury Malaysia's sales figures represent only 15 percent of the company's revenue in Asia Pacific.

According to a Hippocrates text from 400 BC, "On the Sacred Disease," Poseidon was able to make people suffer from epilepsy.


Abstract: A statistical model for segmentation and word discovery in child directed speech is presented. An incremental unsupervised learning algorithm to infer word boundaries based on this model is described and results of empirical tests showing that the algorithm is competitive with other models that have been used for similar tasks are also presented.

Model Based Dynamic Programming, hereafter referred to as MBDP-1 @cite_0 , is probably the most recent work that addresses the exact same issue as that considered in this paper. Both the approach presented in this paper and Brent's MBDP-1 are based on explicit probability models. Approaches not based on explicit probability models include those based on information theoretic criteria such as MDL , transitional probability or simple recurrent networks . The maximum likelihood approach due to Olivier:SGL68 is probabilistic in the sense that it is geared towards explicitly calculating the most probable segmentation of each block of input utterances. However, it is not based on a formal statistical model. To avoid needless repetition, we only describe Brent's MBDP-1 below and direct the interested reader at Brent:EPS99 which provides an excellent review of many of the algorithms mentioned above.

Abstract: This paper presents a model-based, unsupervised algorithm for recovering word boundaries in a natural-language text from which they have been deleted. The algorithm is derived from a probability model of the source that generated the text. The fundamental structure of the model is specified abstractly so that the detailed component models of phonology, word-order, and word frequency can be replaced in a modular fashion. The model yields a language-independent, prior probability distribution on all possible sequences of all possible words over a given alphabet, based on the assumption that the input was generated by concatenating words from a fixed but unknown lexicon. The model is unusual in that it treats the generation of a complete corpus, regardless of length, as a single event in the probability space. Accordingly, the algorithm does not estimate a probability distribution on wordss instead, it attempts to calculate the prior probabilities of various word sequences that could underlie the observed text. Experiments on phonemic transcripts of spontaneous speech by parents to young children suggest that our algorithm is more effective than other proposed algorithms, at least when utterance boundaries are given and the text includes a substantial number of short utterances.


Abstract: We present an open architecture for just-in-time code generation and dynamic code optimization that is flexible, customizable, and extensible. While previous research has primarily investigated functional aspects of such a system, architectural aspects have so far remained unexplored. In this paper, we argue that these properties are important to generate optimal code for a variety of hardware architectures and different processor generations within processor families. These properties are also important to make system-level code generation useful in practice.

Pioneering research in dynamic runtime optimization was done by Hansen @cite_8 who first described a fully automated system for runtime code optimization. His system was similar in structure to our system---it was composed of a loader, a profiler, and an optimizer---but used profiling data only to decide when to optimize and what to optimize, not how to optimize. Also, his system interpreted code prior to optimization, since load time code generation was too memory and time consuming at the time.

Abstract: Abstract : This thesis investigates adaptive compiler systems that perform, during program execution, code optimizations based on the dynamic behavior of the program as opposed to current approaches that employ a fixed code generation strategy, i.e., one in which a predetermined set of code optimizations are applied at compile-time to an entire program. The main problems associated with such adaptive systems are studied in general: which optimizations to apply to what parts of the program and when. Two different optimization strategies result: an ideal scheme which is not practical to implement, and a more basic scheme that is. The design of a practical system is discussed for the FORTRAN IV language. The system was implemented and tested with programs having different behavioral characteristics.