text:
The Mermaid: A Conversation with Fides Krucker — Julie Trimingham
I live by the salt water, and look out every day on a rock where seals sunbathe; my distance vision is impressionistic, the bodies lounging where rock meets wave might as well be mermaids. Traditionally half-fish, half-woman, and drop-dead gorgeous, mermaids, at some point, got confused with the traditionally half-bird, half-woman sirens, whose singing voices were notoriously beautiful. Both animal-woman forms caused shipwrecks, or brought bad luck, although some could bestow boons, as well. In today's popular imagination, the mermaid/siren is commonly thought of as possessing great physical beauty and an irresistible soprano, and she seems to have lost her danger along the way. Weeki Wachee Springs, in Florida, has been featuring professional mermaids in an underwater stage with glass walls since 1947. There are now mermaid schools in Los Angeles, Montreal, Colorado, and the Philippines, among others. Students pick out a colorful monofin and dive in. Mermaiding is now a verb, a hobby, a job. It seems all fantasy, fetish, and sparkle. But I was interested in a mermaid's interior life. And now, my friend has become one. A mermaid. So I thought I'd ask her.
Fides Krucker is an internationally acclaimed singer specializing in contemporary vocal repertoire. Based in Toronto, she is also a teacher, writer, and vocal composer. Her current role is the Mermaid in DIVE, a work she co-created with writer Richard Sanger and composer Nik Beeson.
— Julie Trimingham
Fides Krucker singing "The Pearls" from DIVE.
http://numerocinqmagazine.com/wp-content/uploads/2015/07/The-Pearls.mp3
Fides Krucker singing "Lyghea's Idyll" from DIVE.
http://numerocinqmagazine.com/wp-content/uploads/2015/07/Ligheas-Idyll.mp3
Julie Trimingham (JT): Before you were a mermaid, you were a girl in baker's whites. You've told me about arpeggiating in front of your first singing teacher, an Italian soprano who would clasp her left breast, squeeze it, and demand, at the end of your run, Another one for baby Jesus! I love this image. Can you please elaborate?
Fides Krucker (FK): When I was young, hardly twenty, I ran my father's bakery. This was industrial baking, we made thousands of croissants an hour… flaky, buttery, high-end ones… but it was not glamorous or romantic in any way. Lots of flour in the air and in my hair (which was big and curly at that time). I'd show up for singing lessons still in my baker's whites…a short sleeved dress, apron, little socks and safety shoes…practical! Maria would actually do what you describe as she taught…the squeeze, the 'baby Jesus'… What I wish I had done in those first lessons was just imitate the way she sang…not her sound… but her healthy vocal process. She had been taught in Italy and came to Canada as a teenager. She had such an opulent voice, and the real 'bel canto' approach. I was only with her a few years as she did not seem 'intellectual' enough for my tastes. Silly me! If only I had been ready to understand how healthy she was in her animal body, embodying a sustainable singing technique due to a pure and uninterrupted line of operatic training. She would have been a great mermaid.
JT: The Pastry Chef in DIVE, is she drawn from your life?
FK: There is a pastry chef in the original story, but he is male. Even though the scene is not from my life, when I sing the vowels of all those Italian and French pastries, I take them quite personally! The words taste good! Panettone, tiramisu, cream puffs and eclairs I used to bake and brioches , cannoli and palm-leaves, I simply love to eat…I'm a bit sweet and flaky myself.
I ended up marrying too young (the first time) thanks to a cheesecake I had made and given to a cousin, who gave it to a Sicilian friend…who proposed. I think agreeing to that marriage was how I got myself out of the bakery. I did not know how to say 'no' to my father, so accidentally said 'yes' to another man. I wasn't raised by a feminist, you know! I was impulsive and unconscious at that time. It has taken a lifetime to try and change that!
JT: DIVE is based on The Professor and the Siren, by Giuseppe di Lampedusa (http://www.nybooks.com/books/imprints/classics/the-siren/). The story follows the lovelorn narrator as he walks into a bar and strikes up a conversation with an old professor. The Professor tells a story of how he once fell in love with a mermaid. He did not follow his love, and he now regrets the dry life he's lived. The narrator later learns that the Professor has subsequently jumped into the drink, presumably to chase some fishy tail. You are the mermaid, yes?
FK: Oh yes I am! And just at the right time in my life! I am undoing so many things that no longer serve me, and she is part of the undoing.
The mermaid I play in DIVE is amoral. (With the exception of Disney's Ariel I imagine all sirens and silkies live somewhere outside of human rights and wrongs). She is fun to inhabit, she gets to break all sorts of vocal rules, and she will have a great costume. In the script she tells us that she is Lighea, the daughter of Calliope. No little mermaid here…she is descended from the biggest muse of all.
You know, a mermaid is utterly undomesticated. She is not domiciled. She inhabits the ocean. She lives far beyond of my idea of 'house'. To bring her to life I have to use this house, my body.
JT: How did you become her?
FK: The mermaid's songs were a real collaboration between Nik, the composer, and myself. I improvised, singing with wolves and with whales. I imitated their sounds and I let myself be wild…I ululated, howled and shrieked. The mermaid is a stand-in for the parts of me not yet fully present…for the parts of me I have learned to hide because they seem dangerous or threatening to society, to men, to other women. This is not because the sounds I am making are inherently rough or aggressive or damaging…it is because they're real…and unfettered.
JT: What is the hardest thing about being a mermaid?
FK: Getting past predictable behaviour. I realize how conditioned and patterned I can be. Sometimes I overreact, sometimes I repress. These are not part of the mermaid's repertoire. She is animal and divine. An extra challenge is that this mermaid appears as jilted girlfriend, pastry shop waitress, barmaid and house keeper, as well as her elemental self. I play them all, and in each of these assigned female roles, there needs to be a little of her pointy teeth and fishy scent.
One thing I dearly love about this mermaid is that when she asks Rosario to come with her under the sea and he says he can't, she simply slips back into the water and goes about her business. I can feel her sadness, but still, she lets go and returns to her element…swims in what is current.
JT: Are you worried about ocean acidification, or is it only the crustaceans that are complaining?
Yes, I am worried. When I was at college, I took Marine Biology. I thought for a few years that this would be my career. Embodying this big mermaid reminds me of that early passion, takes me out of Toronto, and plunks me back into the ocean. I remember scuba diving at Race Rocks, off the southern tip of Vancouver Island. We were in the water at least twice a week swimming with the extraordinary invertebrate life….colours and shapes galore…sensitive anemones, prickly sea urchins, sluggish sea cucumbers, and masses of bull kelp. Acidification absolutely affects any sea creature that makes a shell. It upsets other processes in virtually all varieties of sea life…reducing an organism's ability to reproduce, heal, grow and respond to stress. Sea life is sensitive life! We need to listen.
JT: DIVE is set in Mussolini's Italy. What's the relationship between fascism and your mermaid?
FK: That's a great question. Fascism refers to a bundling together in order to find strength. This is a good idea. But the fascism or 'bundling together of peasants' in Italy at that time was under the dictatorship of Mussolini.
The mermaid is elemental. She is as wild and powerful as a storm, she has an intrinsic violence. In the way she uses her voice, we can tell that she knows how to reign that violence in. Mussolini just rages and roars. I suggested to the composer that we stretch out his voice to really explore the sounds within his yelled speeches. This made them more musical and more animal all at once. Nik did beautiful work with this stretched vocal material, and I respond as the mermaid to it through my own stretched, nonconforming sounds. Mermaid and Mussolini go toe to toe, howl to howl.
JT: Mermaids can't spread their legs. What do you make of this?
FK: Heaven! Peace of mind! Power! A different type of intimacy…and maybe a little loneliness?
In ancient Greece a woman's voice was equated to a woman's vagina. A physician from that time would say that you could hear when a woman was menstruating, thanks to the sound of her voice. Women were also expected to speak in pleasing tones within the city walls of Athens. Women did not have the vote, could not own property. They were not full citizens. To make loud sound they had to leave civic space. Out in nature or in the suburbs they could engage with the ritualistic female sound called the Ololyga. This high piercing cry would have functioned cathartically, a communal blowing off of steam.
So a mermaid making any sound she pleases…dangerous sound to boot…and not spreading her legs, seems logical and useful to me. Very undomesticated. It makes me want to re-read the Lysistrata. The women in Aristophanes' play withhold sex as a way to try and secure peace and end the Peloponnesian War. That's a whole society of women closing one mouth with the hope that the words coming out of the other will be heard and heeded. This strategy has been used in modern times to protest violence and corruption and effect change…Nigeria, Kenya, Togo, South Sudan, Liberia, The Philippines and Colombia.
JT: Mermaids don't wear clothes.
FK: My voice is an intimate thing. It is my familiar. It knows me and my job is to be naked with it and let it be naked. And then know where I left my clothes!
JT: Your mermaid screams and groans as well as sings.
FK: Screaming is a human survival tool. It sounds alarm. Growling, shrieking, sobbing, whining, these non-verbal sounds express exactly what is going on for us.
JT: When you are singing, where does the song come from?
FK: The place that aches behind my chest. Maybe this is my heart! But it feels more like soul or even a very specific intelligence. It is not always listened to or respected…by me, by others.
The ache is is a disciple of the emotions, learning all of their curves, no matter how painful, or how riskily bright and optimistic. It is devoted to the spaces between the notes on the page.
JT: Diving into the ocean is deep work. What do you think, Mermaid?
FK: This morning, that sentence makes me tired. I am too aware of all the work that needs to be done…in relationships within the family, within society, with the planet itself. For me, a woman with two legs, I am glad that I can go for a vigorous walk and let go of worry for a while.
The mermaid in our piece takes on big things, she represents big things, and even though I try to house her when singing…and many of us are housing these big thoughts and feelings every day…there is only so much any one person can do.
I am so grateful for art…for its ability to point things out and its audacity to imagine…and if that can inspire truthful and hopeful conversation within community, well, that is even better. That's what I am interested in now…imagining a more expansive and flexible and integrated existence for us all.
— Fides Krucker & Julie Trimingham
Watch a bit of DIVE at http://www.nikbeeson.com/dive/
CDs available at http://www.nikbeeson.com/merch/
Sonic Theatre Performance
July 30 – August 9
Array Music Studio
155 Walnut Avenue, Toronto
For more information on the upcoming performances go to http://bit.ly/1KrirH0 or http://www.fideskrucker.com/DIVE/
Julie Trimingham is a filmmaker and writer. Her first novel, Mockingbird, was released in 2013. Way Elsewhere, a collection of fictional essays, is forthcoming from Lettered Streets Press. She loves writing for Numéro Cinq. Stories she has told at The Moth Story Slam are posted at www.julietrimingham.com.
2015, Interviews, NC Magazine, Vol. VI, No. 8, August 2015
5 Responses to "The Mermaid: A Conversation with Fides Krucker — Julie Trimingham"
Very interesting interview. It reminds me of the elemental forces that R. Murray Schafer tries to incorporate into his work. Thank you for this
dg says:
Janice, Great to see you here. Thanks! Also a wonderful singer.
Odd how even the stranger notes of feminist criticism still bear interest. Imagine going by some hill or other in the ancient Greek boondocks and hearing a choir of shrieking, dispossessed women. Now we shut them up or give them a token raise of salary.
Sounds you can get lost in. I am no student of the opera–at all–but such things can make a man interested. Reminded me, for some reason, of Bjork singing Oceania.
Jeremy, Very good to hear from you.
Everyone, Allow me to introduce Jeremy Brunger who has an essay on Nietzsche also coming out in this issue, his second essay in the magazine. He's a wonderful addition to the community.
Julie Trimingham says:
Jeremy, thanks so much for reading! I look forward to seeing your work here in N5.
yes re: Bjork, Oceania!
Making the whole range of human sounds is such a great way to re-possess, reclaim and enlarge, the body/self. Plus, it's fun–
(& if you're interested in Fides' work, there are more references & links to performance in a previous essay I wrote on voice
Numéro Cinq at the Movies: Lisa Gunning's Tales of Us — R. W. Gray Raccoon and Other Poems — Amber Homeniuk


text:
package libcasutil

import (
	"flag"

	"github.com/cloud9-tools/go-cas/client"
	"github.com/cloud9-tools/go-cas/common"
	"github.com/cloud9-tools/go-cas/proto"
	"golang.org/x/net/context"
)

const StatfsHelpText = `Usage: casutil statfs
Usage: casutil stat
	Displays information about the size and health of a CAS backend.
`

type StatfsFlags struct {
	Backend string
}

func StatfsAddFlags(fs *flag.FlagSet) interface{} {
	f := &StatfsFlags{}
	fs.StringVar(&f.Backend, "backend", "", "CAS backend to connect to")
	fs.StringVar(&f.Backend, "B", "", "alias for --backend")
	return f
}

func StatfsCmd(d *Dispatcher, ctx context.Context, args []string, fval interface{}) int {
	f := fval.(*StatfsFlags)

	backend := f.Backend
	if backend == "" {
		backend = d.Backend
	}
	if backend == "" {
		d.Error("must specify --backend")
		return 2
	}

	if len(args) != 0 {
		d.Errorf("statfs takes exactly zero arguments!  got %q", args)
		return 2
	}

	client, err := client.DialClient(backend)
	if err != nil {
		d.Errorf("failed to open CAS %q: %v", backend, err)
		return 1
	}

	reply, err := client.Stat(ctx, &proto.StatRequest{})
	if err != nil {
		d.Errorf("%v", err)
		return 1
	}

	total := reply.BlocksFree + reply.BlocksUsed
	d.Printf("blocks_free=%d\n", reply.BlocksFree)
	d.Printf("blocks_used=%d\n", reply.BlocksUsed)
	d.Printf("blocks_total=%d\n", total)
	d.Printf("bytes_free=%d\n", reply.BlocksFree*common.BlockSize)
	d.Printf("bytes_used=%d\n", reply.BlocksUsed*common.BlockSize)
	d.Printf("bytes_total=%d\n", total*common.BlockSize)
	return 0
}

redpajama_set_name: RedPajamaGithub


text:
Billie Eilish recalls hating her body as a teenager and overcoming her heartbreaking diagnosis
Billie Eilish is opening up about the complicated feelings she had about her body as a teenager.
During a recent interview with Vogue for her first video cover, Eilish spoke about her relationship with her body and what it took for her to work through the negativity associated with it. She explained that years of injuries have left her in a lot of pain and hatred for her body.
Before breaking into the music industry with the release of "Ocean Eyes" in 2015, Eilish had aspirations of being a dancer. Sadly, an injury to her growth plate at age 13 forced her to reevaluate her dreams and find a new passion.
"Going through my teenage years hating myself and all that stupid shit, a lot of that came from my anger towards my body and how angry I was at how much pain it caused me and how much I lost because of it. Things that happened to it" Eilish said. "I got injured right after we made 'Ocean Eyes,' so the music kind of took the place of dancing."
Billie Eilish hated her body due to the pain she was in as a result of various injuries.
(Matt Winkelmeyer/Getty Images for ABA/Archive)
BILLIE EILISH ADMITS SHE HAS A 'TERRIBLE RELATIONSHIP' WITH HER BODY
"I felt like my body had been lighting me up for years," she said. "I had to go through a process of being like, my body is really me. And it's not to get me."
Eilish was eventually diagnosed with hypermobility, a syndrome in which an individual has overly flexible joints, causing them to bend more than they should, which can be painful.
During the interview, Eilish's mother, Maggie Baird, gave more information about her diagnosis, saying that "things that you and I could do to help each other, like certain types of massages or chiropractors, can really hurt you."
Eilish was diagnosed with hypermobility syndrome, which means her joints are more flexible than they should be.
(Ronald Martinez/Getty Images/Archive)
This isn't the first time the "Bad Guy" singer has spoken out about her body, as her style and body image issues remain a topic of interest.
In August 2021, she told The Guardian that she has a "terrible relationship with (her) body" and that she needs to "disassociate herself from the ideas (she has) of (her) body" during performances because, otherwise, her performance would be affected. .
"I wear bigger clothes that are easier to move around without showing everything — they can be really unflattering," she said. "In the pictures they look like I don't even know what. I just completely separate the two. Because I have such a terrible relationship with my body that you wouldn't believe so I just have to dissociate."
CLICK HERE TO SUBSCRIBE TO OUR ENTERTAINMENT NEWSLETTER
She also admitted that she doesn't understand why society is obsessed with bodies, be it their own or others'. During a campaign for Calvin Klein in 2019, the singer discussed the matter further, saying that society's obsession with bodies is the inspiration behind her public image. In the video, she said that the baggy clothes mean that "no one can say because they haven't seen what's underneath".
The obsession with her body in particular had a profound impact on her style. She told Elle magazine in 2019 that, as a woman with larger breasts, she feels more harshly judged for wearing a top that might show a little cleavage. She referenced a time when someone took a picture of her in a tank top after she got off the tour bus, saying, "My boobs were trending on Twitter. … All the media wrote about my boobs."
Eilish used to have to disassociate herself from her body image issues when performing in fear that it would affect her show.
(Matthew Baker/Redferns/Archive)
CLICK HERE TO DOWNLOAD THE FOX NEWS APP
"I was born with shitty boobs, bro. I was born with DNA that was going to give me big boobs. Recently, I was FaceTimeing a friend of mine who's a guy, and I was wearing a tank top. He was like, 'Ugh, put it on a shirt.' And I said, 'I'm wearing a shirt,'" she told the mag. "Someone with smaller breasts could wear a tank top, and I could put on that exact tank top and be embarrassed because my breasts are big. That's stupid. It's the same shirt."
Lori Bashian is an entertainment production assistant at Fox News Digital.

redpajama_set_name: RedPajamaCommonCrawl


text:
Kaloegerovo (Bulgaars: Калугерово) is een dorp in de Bulgaarse gemeente Simeonovgrad, oblast Chaskovo. Op 31 december 2019 telde het dorp 218 inwoners. Het dorp ligt 31 km ten noordoosten van Chaskovo en 219 km ten zuidoosten van Sofia.

Bevolking
De telling van 1934 registreerde 672 inwoners. Dit aantal schommelde tot 1985 tussen de 650 á 750 personen. Sinds 1985 kampt het dorp echter met een intensieve bevolkingskrimp. Op 31 december werden er 218 inwoners geregistreerd.

Van de 300 inwoners reageerden er 269 op de optionele volkstelling van 2011. Zo'n 261 personen identificeerden zichzelf als etnische Bulgaren (97%) en 8 personen als Roma (3%).

Het dorp heeft een ongunstige leeftijdsopbouw. Van de 300 inwoners die in februari 2011 werden geregistreerd, waren er 25 jonger dan 15 jaar oud (8%), terwijl er 105 inwoners van 65 jaar of ouder werden geteld (35%).

Plaats in Chaskovo

redpajama_set_name: RedPajamaWikipedia


text:
The California Review
CALIFORNIA FOCUS, A GLOBAL PERSPECTIVE. EST 1982
[Editorial] Governor Newsom, Compassion Means Taking People Off the Streets
By The California Review on January 17, 2020 • ( Leave a comment )
Rock n' Roll is Dead and Tech Killed It
By Sophie Pollack on January 1, 2020 • ( Leave a comment )
Starbucks, Airpods, and the Fleece Vest: The Rise of Wall Street's Greatest Fixture
By Nicholas Trimble on October 22, 2019 • ( Leave a comment )
How Sanders Lost the Nomination But Won 2020
By Austin Katz on October 7, 2019 • ( Leave a comment )
[Editorial] Ronald Reagan Is Dead and So Is the CAGOP
By The California Review on September 17, 2019 • ( Leave a comment )
The Greatest Threat to Professional Sports: Financial Illiteracy
By Nicholas Trimble on September 7, 2019 • ( Leave a comment )
Get notified of new posts
Flower Boy: A Showcase of Tyler the Creator
By The California Review on August 24, 2018 • ( Leave a comment )
A year ago, rapper, producer and fashion icon Tyler The Creator released his sensational album, Flower Boy awing a new generation of music lovers with its innovative and unique sound. Day one listeners of Tyler were given his most cohesive album yet, and new listeners were shown a side of Tyler that's always been in his music, but has been hidden by Tyler's layered of edginess and overlooked by media hit pieces. Now, having attended a live show and made use of a full year to digest the album, I'm able to give the in depth review this album deserves.
Kiev's New Partner: A Betrayal of U.S. Interests
By Aaron Genin on August 23, 2018 • ( Leave a comment )
A former counsel to the Senate Foreign Relations Committee, William C. Triplet, even went so far as to say that "the Ukrainians are getting away with taking the U.S. taxpayers' money in the one hand while stabbing the U.S. Navy in the back with the other."…the threat to American security stemming from Ukraine must be responded to; the U.S. ought to pressure an ally who may be betraying its interests.
AT&T/Time Warner Merger on Hold as Antitrust Case Develops
By Nicholas Trimble on August 17, 2018 • ( Leave a comment )
Media companies are merging at the fastest pace since the dotcom bubble as the industry faces a major shake-up from technology startups. The recent merger of AT&T Inc. and Time Warner Inc. has made consumers and politicians alike question whether or not the practice of merging international media giants is beneficial for the free market.
Collision Course: Turkey's Intervention in Syria
By John Collison on August 17, 2018 • ( Leave a comment )
As if Russian airstrikes, ISIS suicide attacks, and chemical warfare were not enough, Turkish troops now join the Syrian civil war, a conflict entering its eighth year. On January 20, the media focused on the American government shutdown, providing no coverage on the day's most significant development: Turkish president Recep Erdogan launched his long-promised assault on the Kurds in northern Syria, one of America's closest allies in the campaign against ISIS.
US/China Trade War: A Winning Strategy?
By Isaiah M Henderson on August 17, 2018 • ( Leave a comment )
With the ongoing trade war causing highly volatile relations between the United States and China, new evidence is emerging that the PRC (People's Republic of China) is reevaluating its position in the face of hardening American opposition.
Balderson, GOP Escape Near Upset on Election Night
By Austin Katz on August 8, 2018 • ( Leave a comment )
Yesterday, the GOP escaped a near catastrophic loss in Ohio's 12th congressional district special election. State Senator Troy Balderson eked out a victory in the 12th district north of Columbus Tuesday night over his Democratic challenger, Franklin County Recorder Danny O'Connor.
[Opinion] Nobody Should Ever Want to See What "Real" Socialism Looks Like
By Grant Pecheck on August 7, 2018 • ( Leave a comment )
When talking politics with Sanders or Ocasio-Cortez supporters, advocates of the free-market, myself included, tend to ask these adherents of democratic socialism the following: "If socialism is so fantastic, can you explain the failures of Venezuela, Zimbabwe, and the USSR?"
Janus v. AFSCME: WHAT HAPPENED?
By Paul Anderson on August 7, 2018 • ( Leave a comment )
On June 27, the Supreme Court handed down a decision in Janus v. AFSCME authored by Justice Samuel Alito. Advocates of Big Labor were quick to decry the ruling as a union-busting exercise in judicial activism, while most of the political right lauded it as a refreshing win for workers' rights. But in today's charged political climate, both claims might reasonably be viewed with skepticism by those in the center. What did the ruling actually hold, and what will be its consequences for America?
The Pink Box
By Tatum Shackelford on August 7, 2018 • ( Leave a comment )
The little pink box sits innocently on the break room table. One look inside can melt all willpower.
Editor-in-Chief Kenneth Schrupp Interviewed by the UCSD Guardian
By The California Review on August 7, 2018 • ( Leave a comment )
The California Review was first published on January 7, 1982 to serve as an outlet for conservative in libertarian thought at a time when campus culture suppressed all such thinking. It's equally curious and disheartening how little things have changed in that regard…
‹ Newer 1 2 3 4 5 6 7 Older ›
News & Analysis »
Georgian Protests: Tbilis's Two-Sided Conflict
[Opinion] A Very Small Man: The Sad Legacy of Charlie Kirk and Turning Point USA
[Opinion] San Francisco's Juul Ban Helps Big Tobacco
[Opinion] Beloved Dairy Spoiled By California Regulations
[Opinion] Trump's Silent Crusade and the 24 Hour News Cycle
Culture »
Which Way, Raskolnikov? Žižek v. Peterson
Top categories: News & Analysis US Politics
Proudly powered by WordPress Theme: Chronicle.


Himani Navratna Oil is a multi-purpose oil. It is made up of natural herbs. It can be used on Hair as well as on skin. It repairs damages Hair and help hair to become strong, dandruff free and healthy. Himani Navratna Oil soothes brain and removes head ache. It can also be used as a massage oil to relieve muscular pains and sprains. Himani Navratna Oil does not have any chemical or additive which is harmful for human body. All 9 herbs in it are 100% natural and Healthy.
Himani Navratana Oil is the best oil of extracts from natural which remove or take out, And it gives relief from Sleeplessness, Headache, Body ache, Tension, Hair related problems, Keeps the head cool, Relieves headache, Helpful in sound sleep, An effective memory aid, Tones up body muscles, Removes tiredness, An also it's a cool body massage oil. And this oil gives a very soothing feeling when you apply it on your head. You can feel so relieved and get fresh after applying this oil. And it's very good product. People like it very much specially in the summer. It's a good oil not only gives smoothness but also gives a cool feeling. Just sooth your head and it feels like that somebody puts ice on your head. And this himani navratna oil can't compare to any other oil which helps you to sleep well with cool mind. And the product use natural herbal also which gives strong hair and prevent from hair fall. The best part of this oil had very refreshing effect and the people who use this really enjoy it. Most of the people have problem of head ache but a nice massage with this oil makes your day peace full.
It removes Physical and Mental stress- Tension, Headache, Fatigue, Insomnia and body ache.
It is pure herbal and natural oil.


Members of our Dean's Executive Council are top-level executives in their fields from all over the country. They are both alumni and non-alumni, and they share the common interest of working to better our Scott College of Business. Below are members of this very important advisory group.


text:
478 Battling the Pinnacle of the Arcana Plane
Everyone stared at the prideful figure standing there in dismay. He was too strong, just a single spell could cause all those experts to become injured. The spell's destructive force was appalling.
Boom. At that moment, a figure descended like a flash of lightning. The figure stepped forward and the heavens rumbled, like a mountain crashing down upon Ye Futian who had just finished casting his spell. His brilliant eyes glancing at the other person, Ye Futian's palm stretched out, his Spiritual Qi culminating into the form of a rod.
Golden rays of light shot out suddenly and the crowd saw Ye Futian's body quiver. On his back, a pair of giant Roc wings appeared, like a Roc king attached to him. His wings shuddered and a golden storm started to erupt. Ye Futian's body slowly rose into the air, the golden rod in his hand striking out. The golden light pierced the heavens and with a deafening bang, the mountain was split in two and the rod collided with the figure, sweeping it back.
"Do it." Multiple figures appeared simultaneously and headed towards Ye Futian.
Ye Futian stepped into the air and flashes of lightning appeared. The speed of the Thundering Illusion Step combined with the Roc wings was breakneck. It was as though he teleported in front of a person and his rod struck out with no hesitation. Another resounding crack and another person crashed into the ground.
Bang, bang, bang…. Following that, the crowd could only see Ye Futian's phantom, and few in the Arcana Plane could track his movements. They could only see people continuing to be pummeled into the ground and the sound of them hitting the ground.
In an instant, there were already over ten people in the ground. The dazzling figure flew upwards and appeared in the air, its golden wings flapping gently, perfectly fitting into its aura. Compared to him, Jin Yunxiao would probably feel inferior.
The members of the Jin Clan had extremely piercing gazes. Ye Futian actually had the Roc Life Spirit as well.
Tchh… A brilliant light slashed towards him and the crowd looked towards the air. They saw Chen Liu leading a group of Chen Clan geniuses in slashing the Sun Sword. The glows from the Sun Swords intersected and formed a fearsome sword spectrum which slashed towards Ye Futian like domineering sun rays.
Hissssss… When the Sun Swords collided with Ye Futian, his body ignited and the hungry flames turned into a brilliant light veil, circulating around his body. The flames on his body were blazing like a sun and his body the vessel for the sun. The flames threatened to burn everything to ashes and the Sun Swords actually assimilated within the flames' energy.
In that instant, a sun appeared behind Ye Futian, hanging high up in the sky, its rays blinding.
"A second Life Spirit," the crowd murmured to themselves, with the Sun Spirit, he would be impervious to the flames. His body was like the sun's vessel, able to burn everything. At the same time, within the sun, a symbol of flames appeared. Ye Futian was like the Fire God, he took a step forward and the flame symbol shot out multiple light beams towards all directions.
Chen Liu and his clan members felt an extremely strong flame energy, and they all released their Life Spirit Dharmas to combat it.
In the air, the unparalleled figure swung the rod like the visage of a Divine Ape. The rod in Ye Futian's hands continued to grow bigger and turned into a giant golden rod. The rod continued its rampage, and the skies stormed.
Fwoosh. The golden wings flickered and Ye Futian stormed forward with the rage of the heavens. Chen Liu and his clan members could feel the impending pressure and their faces paled. They saw Ye Futian swing out with his rod, and the shadow of the rod grew at an alarming rate. A golden rod that could rival the skies in length appeared, and with an ear-splitting bang, the air itself appeared to be shaking. Chen Liu and his clan members started to vomit blood, and their bodies fell to the ground.
The group was swept to the ground. Ye Futian continued to step forward towards the direction where most of the crowd was, continuing to wield his rod. From the heavens, colossal shadows appeared and hammered down.
"Spread out!" someone shouted, and many people started to scatter in different directions, yet the rod continued to beat many people into the ground with irresistible force.
People from both sides of Ye Futian assaulted him and the sound of people clashing sounded out as Ye Futian's Fatal Entanglement swathed them and threw them back.
Invincible. This was the thought of the onlookers outside the Starry School at that moment. Under the attack of that many experts, none of them could even withstand a single strike of Ye Futian's rod. He was strong beyond belief.
Today Ye Futian was crowned the Son of the Top Three Schools and bestowed with the holy robes. This meant that he would stand at the peak of his generation with no rival. Zhen Rong was also among those participating in the battle. She was swept to the ground with one strike, blood streaming from her mouth. However, what made her really feel humiliation was that Ye Futian did not even look her in the eye when he injured her with his strike. It was as though to him, the young lady of the Zhen Clan was just a passerby and not deserving of his attention.
Not just her, but there was no shortage of famed geniuses that took part in the battle of the Top Three Schools, yet no matter who it was, no matter how famous they were usually, how strong they were, they were all decimated.
From the start of the battle, not much time had gone by, yet the hundreds of experts that had joined in the battle had all been defeated. In the air, the battle came to a halt. Donned in holy robes and wearing the holy crown, Ye Futian hovered in the air, his wings shining brilliantly, his gaze sharp, looking down upon the crowd.
"Is there anyone else who wishes to challenge me?" Ye Futian's gaze swept across the massive crowd. There was an ample amount of experts, yet not one of them could stand up to Ye Futian. In fact, none of them could even face him in battle; they were all brushed off.
Within the crowd, Wang Yurou stared intently at the figure with a sense of helplessness. He had been like this in Yunyue City as well, even now, when he was facing the geniuses of the Divine Sky City, nobody could mar his brilliance.
In another location, three figures squeezed within the crowd. The skinny teen smiled, blinking and said, "Little brother is still so suave."
"Looks like his days have gotten even more enriching without us seniors to watch over him." Another handsome teen nodded his head and smiled.
The fat teen stood at the back, watching the outstanding figure and thought back to his own days. There was no comparison, his life was simply too pitiful.
"Since the founding of the Top Three Schools, this is the first time they've crowned a Son. Since the Starry School is the first to start off this tradition, the Son that they've crowned should dominate the entire plane in order to receive such preferential treatment. Why should the fights be limited to only the Middle Arcana Plane? Moreover, I've heard that you revealed the strength of an Upper Arcana Plane cultivator at the Evil Dragon Zone," an expert from the Blazing Sun School said. Ye Futian sweeping his entire generation and none of the disciples of the Top Three Schools being a match for him was nothing to the Starry School, but the Blazing Sun School and the Bright Moon School would lose face.
Many people had stunned expressions. Geniuses were plentiful in the Top Three Schools. For an Upper Arcana Plane to challenge the fifth level of the Arcana Plane was a bit of a bully. However, many people were unfamiliar with what happened at the Evil Dragon Zone, but they knew that one's cultivation level could not be forged. Ye Futian was indeed in the fifth level of the Arcana Plane.
"Shameless," Long Ling'er said disdainfully.
Ye Futian's gaze shifted in the direction of the Blazing Sun School and replied, "If the Blazing Sun School wishes to challenge me with an Upper Arcana Plane disciple, go ahead."
Bam. They saw a figure stand up and step forward. Many people's expressions became dumbfounded when they saw the person who had stepped out.
"Shameless!" Long Ling'er's face turned red in anger as she repeated herself. The person who had stepped forward from Chen Wang from the Chen Clan, a cultivator at the pinnacle of the Arcana Plane. He himself was also a prodigy, the difference between the two of them was too great.
Chen Wang stared cruelly at Ye Futian. In the ninth level of the Martial Arts Battlefield, he was defeated in one blow by Ye Futian. At that time, Ye Futian had martial arts fate surrounding him, but not this time.
In an instant, the sun's flames enveloped Chen Wang's body, causing it to become extremely dazzling. He released his Life Spirit Dharma and a sun appeared. Within the sun, there was the statue of a Divine Sun Bird, the Three-legged Golden Raven.
An awe-inspiring aura circulated around Chen Wang's body and wings of flames appeared on his back, firing beams of light towards Ye Futian. In the air, flames from the sun descended from the skies and gathered around his body, causing the flames around his body to burn even brighter, as though he was one with the sun.
He stretched out his arm and the flames turned into an intimidating sun god sword, the flames that it was giving off was strong enough to burn any Middle Arcana Plane expert to ashes. Many people felt worried for Ye Futian. He was easily taunted into accepting the Blazing Sun's challenge, they felt it was a rash decision on his part. The Blazing Sun School did not pull their punches and sent out Chen Wang to battle him.
Ye Futian's body continued to hover in the air, thunder, and lightning at his feet. At that moment, Chen Wang leaped forward and the sun shined down on him, merging with his body and blazing Ye Futian's body with a piercing glow. He struck at Ye Futian with the sun god sword in a straightforward manner.
Bang! Ye Futian kicked off the ground and his Thundering Illusion Step allowed him to rapidly change places. The blade of light slashed towards the Starry School in the distance, where an expert stepped in and an invisible barrier stopped the blade of light from progressing.
Chen Wang let out a grunt and moved at an equally speedy pace, heading straight for Ye Futian. He slashed out yet again and the blade of light appeared to transform into the sun's rays, reaching in an instant. However, Ye Futian had already predicted the lightspeed attack and he avoided it yet again with his Thundering Illusion Step, leaving the destruction of the sun's rays to the experts to stop.
Chen Wang frowned. He had not expected Ye Futian's reaction to be that quick. He stepped foot into the air once again, countless rays spilling off his body. In the air, he slashed out with his sword, this time multiple blades of sun rays were released, leaving Ye Futian with nowhere to dodge.
Ye Futian stared at the oncoming attack, his Freedom Meditation at work. He had obtained the sage legacy and had three divine lights. These three divine lights mirrored the Top Three Schools' abilities. Chen Wang was the genius of the Chen Clan and cultivated in the Blazing Sun School. His expertise was the sun's flames, so he naturally mastered the Blazing Sun's abilities. Ye Futian wanted to observe Chen Wang's cultivation methods.
Just then, blades of sun rays shot towards him, encircling the entire area he was in. Every blade of sun ray contained immense destructive power. In his body, an equally fearsome light was circulating. In an instant, many meteorites appeared and gathered around his body, circulating frantically. Each one of these meteorites appeared to have a dazzling light that glowed and faded, just like a star, like constellations circulating around Ye Futian's body!


text:
Walters could leave Turf Moor
Tony Scholes May 24, 2018 Walters could leave Turf Moor2018-05-24T21:44:45+00:00
Jon Walters is half way through a two year contract at Burnley, but after a difficult first season brought about by ankle and knee injuries, he could be set to depart this summer after talks with manager Sean Dyche.
Speaking on Sky Sports News this evening, Walters, who is currently on international duty with the Republic of Ireland, said: "I had a few little niggly injuries, ankle and knee, and then I've been fit for a while, but not been picked. But I can't moan. The team is doing well and I suppose that's part and parcel of it. I'm delighted to come over and hopefully get some minutes and show I'm still a footballer.
"I've been fit for a while and in the squad and not been picked. Look, I can't moan too much. The team is doing ever so well, but I have spoken to the manager and I think I'm available to go if needs be. I'll assess it and see what's there, but first and foremost, there are these games (internationals). I want to get back playing, get minutes under my belt and show I am still playing."
Walters joined Burnley on 7th July last year. At the time of his signing, Martin Spinks, for the Stoke Sentinel, wrote: "His exit will spell the end for one of the club's most popular players of recent years. Since arriving from Ipswich for £2.75m in 2010, Walters has invariably delivered when it counts most and endeared himself to supporters appreciating his ceaseless endeavour and occasional brilliance."
Meanwhile, former Port Vale legend Robbie Earle said of him: "Jon Walters must be one of Stoke City's finest signings of the last decade. Look at the stats: More than 250 games played, 62 goals scored and thousands of miles covered by one of the hardest working players you could ever wish to see. So, if Walters does complete a move to Burnley then I am sure he will get a rousing reception whenever he returns to the bet365 Stadium. Let's face it, he doesn't owe Stoke anything."
Walters was, as expected, on the bench for our opening game of the season at Chelsea, making his debut as a substitute. He got his first, and only start, at Ewood Park in our easy League Cup win against Blackburn, but suffered an early ankle injury that forced him off before half time. His only appearances since came, again as a substitute, at Manchester United on Boxing Day and at Manchester City in the FA Cup eleven days later.
There was speculation in January that he might go to the car crash at Sunderland, but a knee injury requiring surgery put paid to that and since regaining fitness he's not been able to force his way back in the team.
Given tonight's interview, it does look as though Walters is likely to move on ahead of the new season. There is likely to be no shortage of interest and there is no doubt that the Stoke fans would welcome him back with open arms.
« West Yorkshire Clarets meeting cancelled
More from Defour »


text:
In this recent photo provided by the Wildlife Conservation Society, three male dhole, a species of Asiatic wild dog, that have debuted at the Bronx Zoo, stand in their new habitat adjacent at the zoo in the Bronx borough of New York. The trio, named Roan, Apollo, and Kito, siblings that were born at the San Diego Zoo Safari Park in 2016, are native to portions of southern and central Asia. (Julie Larsen Maher/Wildlife Conservation Society via AP)
Pack of handsome wild dogs debuts at Bronx Zoo
NEW YORK (AP) — A pack of handsome brothers is getting settled at New York's Bronx Zoo. The foxlike wild dogs — called dholes (dohlz) — were born at the San Diego Zoo Safari Park in 2016. The trio, named Roan, Apollo and Kito, have brownish-red coats dappled with white markings, and bushy tails...
In this Oct. 5, 2019, photo released by the Department of National Parks, two elephants are seen stuck on the edge of the Haew Narok Waterfall in Khao Yai National Park, Nakhon Nayok, central Thailand. A herd of wild elephants was swept away by raging waters in Thailand's national park, drowning six, while rangers helped steer two animals out of a deep ravine. (Department of National Parks via AP)
6 elephants drown, 2 rescued in Thai national park
BANGKOK (AP) — A herd of wild elephants was swept away by raging waters in a national park in Thailand, drowning six, while rangers helped steer two of the animals out of a deep ravine. Staff at Khao Yai National Park discovered the two struggling elephants and the carcasses after dawn Saturday...
This photo provide by the Berlin Zoo on Monday, Sept. 2, 2019, shows the newborn panda twins during their first care at the zoo after they are born. Female Panda Meng Meng gave birth to two panda babies in Berlin Zoo on Saturday evening Aug. 31, 2019. (Zoo Berlin/Zoologischer Garten Berlin via AP)
Double cuddle: Berlin zoo celebrates birth of 2 panda cubs
BERLIN (AP) — A zoo in Berlin is celebrating the arrival of two panda cubs, the first time one of the rare mammals has given birth in Germany. Zoo Berlin said Monday that mother Meng Meng gave birth to a hand-sized pink cub at 6:54 p.m. Saturday. According to the zoo, mothering came naturally to...
In this photo taken August 25, 2012 a herd of elephants in the Kruger National Park, South Africa. A CITES (Convention on International Trade in Endangered Species) conference being held in Geneva, Switzerland, Tuesday Aug. 27, 2019, is expected to decide later Tuesday weather to allow the capture of wild African elephants for export beyond Africa, with U.S. and Europe campaigning against the practice and with nations like China, Zimbabwe, and Botswana pressing to allow the trade. (AP Photo/Kevin Andreson)
Countries agree to limit sales of elephants to zoos
GENEVA (AP) — Countries have agreed to limit the controversial sale of wild elephants caught in Zimbabwe and Botswana, to the delight of conservationists but the dismay of some of the African countries involved. Wildlife experts say the Tuesday vote at a conference in Geneva on trade in endangered...
In this Friday, April 5, 2019 file photo taken trough a window female panda Meng Meng eats bamboo at its enclosure at the zoo in Berlin, Germany. The Berlin zoo announced that Meng Meng is probablypregnant after an artificial insemination several months ago. (AP Photo/Michael Sohn, file)
Berlin expects: Zoo's panda pregnant, birth expected soon
BERLIN (AP) — Berlin's zoo is hoping to hear the patter of tiny panda paws soon. The zoo on Tuesday posted on Facebook a few seconds of footage from an ultrasound scan of its 6-year-old Meng Meng, which it said shows "a mini-panda with its heart beating fast." It said that the birth isn't far off,...
This Monday, July 29, 2019 photo provided by the San Diego Zoo shows a day-old southern white rhino calf stands beside its resting mother, Victoria, at the at the Nikita Kahn Rhino Rescue Center at the San Diego Zoo Safari Park in Escondido, Calif. The zoo has announced the first successful artificial insemination birth of a southern white rhino in North America. San Diego Zoo Global says the mother gave birth to a healthy male calf Sunday July 28, 2019, at the San Diego Zoo Safari Park. Mother and calf will remain off-limits to the public for now to allow them to bond. (Ken Bohn/San Diego Zoo via AP)
July 30, 2019 - 1:44 pm
Rhinoceros conceived artificially born at California zoo
LOS ANGELES (AP) — A conservation organization in San Diego says it has achieved the first successful artificial insemination birth of a southern white rhino in North America, an important step in saving another rhino species from extinction. San Diego Zoo Global announced that mother Victoria gave...
Giant panda shocked by electric fence in Scotland
LONDON (AP) — A giant panda has learned the hard way that his new enclosure is protected by an electric fence. Visitors at Edinburgh Zoo were worried Tuesday after watching male panda Yang Guang run back to his den after being zapped by the barrier. The panda and his partner Tian Tian, the only...
FILE - In this Wednesday, Feb. 13, 2019 file photo, female southern white rhino, 17-year-old Hope, is shot with tranquilizing darts, so a team of experts can harvest her eggs, at a zoo park in Chorzow, Poland. Scientists in Europe said Tuesday June 25, 2019, they have successfully transferred a test tube rhino embryo back into the female whose eggs were fertilized in vitro, as part of an effort to save another nearly extinct sub-species of the giant horned mammal. (AP Photo/Petr David Josek, File)
Scientists successfully transfer 1st test tube rhino embryo
BERLIN (AP) — Scientists in Europe said Tuesday they've successfully transferred a test tube rhino embryo back into a female whose eggs were fertilized in vitro, as part of an effort to save another nearly extinct sub-species of the giant horned mammal. The procedure was performed last month on a...
Orangutan Nenette eats a cake as she celebrates her 50th birthday, at the Jardin des Plantes zoo, in Paris, Sunday, June 16, 2019. (AP Photo/Thibault Camus)
Paris zoo gives orangutan Nenette a 50th birthday party
PARIS (AP) — Nenette, one of the world's oldest Borneo orangutans in captivity, has celebrated her 50th birthday at a zoo in Paris, where she has lived almost all her life. Birthday cake, wrapped boxes and visitors singing "Happy Birthday" were part of the party held Sunday for Nenette at Menagerie...
This photo taken on Wednesday, June 5, 2019 and provided by the Phoenix Zoo shows a big-eyed baby pygmy owl, one of four hatched at the zoo three weeks ago under a special breeding program. The cactus ferruginous pygmy owls are being raised by two pairs of adult owls. Three pairs of the tiny owls laid 11 eggs among them, but only four hatched. The owls weigh just 3 ounces as adults and nest in the cavities of the saguaro cactus. Its population has declined in recent decades and the species is now believed to number fewer than 100 in the state. (The Phoenix Zoo via AP)
Phoenix Zoo flying high over 3-week-old baby pygmy owls
PHOENIX (AP) — Conservation specialists at the Phoenix Zoo say they are flying high over the arrival of four big-eyed baby pygmy owls. The cactus ferruginous pygmy owls hatched three weeks ago and are being raised by two pairs of adult owls. Three pairs of the tiny owls laid 11 eggs among them, but...


text:
OEPS
& Evaluation
STD, HIV,
DHHR | BPH | Text size A A A
HIV/AIDS Information
Testing Sites
Ryan White & Care Act History
Ryan White Programs & Clinics
ADAP (AIDS Drug Assistance Program)
Ryan White Eligibility
WV Insurance Continuation Program
HIV/AIDS Organizations
HIV Surveillance
HIV/AIDS Awareness Days
STDHIV/AIDS & STD Hotline
WVDHHR > Office of Epidemiology and Prevention Services > STD, HIV, Hepatitis > HIV/AIDS > Care and Support > ADAP (AIDS Drug Assistance Program)
AIDS Drug Assistance Programs (ADAPs) are state administered programs that provide HIV/AIDS medications to low-income individuals living with HIV disease who have little or no coverage from private or third party insurance. ADAPs were originally authorized by the Ryan White Comprehensive AIDS Resources Emergency (CARE) Act, which was enacted in 1990, and reauthorized in 1996 and again in 2000. Currently, ADAPs are authorized under the Ryan White HIV/ADIS Treatment Modernization Act of 2006. The intent of state and federal legislation is to assure that ADAP funds are used only for the purchase of ADAP formulary drugs that cannot be paid for through other sources. ADAP must be the payor of last resort.
ADAP started as a Health Resources and Services Administration (HRSA) demonstration project to provide zidovudine (AZT), the first drug approved by Food and Drug Administration (FDA) to treat HIV infection. Since that time, ADAPs have significantly expanded to cover other FDA approved drugs to treat HIV infection and HIV-related opportunistic infections.
West Virginia AIDS Drug Assistance Program (ADAP) services are available to all eligible residents. To be eligible, HIV infected residents with a family income less than 400% of the federal poverty level who are not eligible for other forms of reimbursement such as Medicaid or full insurance coverage (ADAP will cover co-pays for eligible residents with insurance) must complete the applications at the Department of Health and Human Resources.
The last several years have seen an unprecedented growth in client demand and program costs for ADAP. This is due to:
The rapid expansion of the HIV/AIDS epidemic among low-income and uninsured populations;
The high cost of protease inhibitors and other antiretroviral medications that are used in multiple-drug regimens;
People with HIV/AIDS who are receiving therapy are living longer; and
The increasing numbers of people with HIV/AIDS seeking combination therapy as a result of widely publicized research that supports new pharmaceutical therapies for improving their health status and quality of life.
Events | News | Media Inquiries | Employment Information | Contact Us | Site Map


text:
Robert Sweet (1783-1835)
Robert Sweet (1783-1835) The Florist's Guide, and cultivator's directory; containing coloured figures of the choicest flowers, cultivated by florists. London: Tilling for James Ridgway, 1827-1832. 2 volumes, 8° (240 x 149mm). 200 hand-coloured engraved plates by J.Watts after Edwin Dalton Smith. Later nineteenth century light brown calf gilt by J.Clarke, covers with triple-fillet border, spines in six compartments with raised bands, green morocco lettering-piece in the second, the third with volume numbers on red morocco circles onlaid onto gilt decorated green morocco onlay, the other compartments with repeat decoration in gilt composed of stars and various floral motifs, gilt turn-ins, marbled endpapers, gilt edges. A FINE COPY OF THE FIRST EDITION OF SWEET'S HIGHLY DECORATIVE PRACTICAL GUIDE TO THE CULTIVATION OF MANY OF THE MOST BEAUTIFUL FLOWERING PLANTS THEN AVAILABLE. Each plate shows a single variety and is accompanied by text giving a taxonomic description and instructions for the plant's cultivation. The work displays a bias towards the Tulip family and includes 61 'biblomen' or multi-coloured varieties. Also included are Carnations (19), 'Picotees' or Dianthus (14), Pinks (18), Ranunculus (38), 'Georgianas' or Dahlias (6), Auriculas (27), Polyanthus (2), Hyacinths (7) and Roses (8). Not included, of course, are any Cistus or Geraniums, both of which were dealt with by Sweet in his two earlier monographs. All but one of the plates are after Edwin Smith (1800-c.1866). Little is known of his early life, but his most productive years were between 1825 and 1836 when, besides his work for Sweet, he also made drawings for Maund's Botanic Garden and the Royal Horfticultural Society. Cleveland 930; Nissen BBI 1925; Great Flower Books (1990) p.143. (2)
More From Books


text:
Andrés Matonte (* 30. března 1988, Uruguay) je uruguayský mezinárodní fotbalový rozhodčí, který působí také jako učitel tělesné výchovy.

Kariéra
S tréninkem začal ve 20 letech v roce 2008 a v roce 2017 debutoval jako rozhodčí v uruguayské fotbalové lize při remíze 0:0 mezi Fénixem a River Plate Montevideo.

Od roku 2019 je mezinárodním rozhodčím FIFA. Pískal jihoamerické turnaje do 15 a 17 let 2019, jihoamerickou kvalifikaci na olympijské hry, Arabský pohár FIFA 2021 a jihoamerickou kvalifikaci na Mistrovství světa 2022 v Kataru. Díky svým výkonům byl Matonte vybrán jako jeden z rozhodčích pro již zmiňované Mistrovství světa 2022.

Odkazy

Reference

Žijící lidé
Muži
Uruguayští fotbaloví rozhodčí
Narození v Uruguayi
Rozhodčí na Mistrovství světa ve fotbale 2022
Narození 30. března
Narození v roce 1988


text:
/*	$NetBSD: pk_usrreq.c,v 1.26 2003/08/07 16:33:05 agc Exp $	*/

/*
 * Copyright (c) 1991, 1992, 1993
 *	The Regents of the University of California.  All rights reserved.
 *
 * This code is derived from software contributed to Berkeley by the
 * Laboratory for Computation Vision and the Computer Science Department
 * of the University of British Columbia and the Computer Science
 * Department (IV) of the University of Erlangen-Nuremberg, Germany.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 *	@(#)pk_usrreq.c	8.2 (Berkeley) 1/9/95
 */

/*
 * Copyright (c) 1984 University of British Columbia.
 * Copyright (c) 1992 Computer Science Department IV,
 * 		University of Erlangen-Nuremberg, Germany.
 *
 * This code is derived from software contributed to Berkeley by the
 * Laboratory for Computation Vision and the Computer Science Department
 * of the University of British Columbia and the Computer Science
 * Department (IV) of the University of Erlangen-Nuremberg, Germany.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *	This product includes software developed by the University of
 *	California, Berkeley and its contributors.
 * 4. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 *	@(#)pk_usrreq.c	8.2 (Berkeley) 1/9/95
 */

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pk_usrreq.c,v 1.26 2003/08/07 16:33:05 agc Exp $");

#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/protosw.h>
#include <sys/errno.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/proc.h>

#include <net/if.h>
#include <net/if_types.h>
#include <net/route.h>

#include <netccitt/x25.h>
#include <netccitt/pk.h>
#include <netccitt/pk_var.h>
#include <netccitt/pk_extern.h>

static void pk_setsockaddr __P((struct pklcd *, struct mbuf *));
static void pk_setpeeraddr __P((struct pklcd *, struct mbuf *));
static void old_to_new __P((struct mbuf *));
static void new_to_old __P((struct mbuf *));

static void
pk_setsockaddr(lcp, nam)
	struct pklcd *lcp;
	struct mbuf *nam;
{

	nam->m_len = sizeof(struct sockaddr_x25);
	bcopy(lcp->lcd_ceaddr, mtod(nam, caddr_t), (size_t)nam->m_len);
	if (lcp->lcd_flags & X25_OLDSOCKADDR)
		new_to_old(nam);
}

static void
pk_setpeeraddr(lcp, nam)
	struct pklcd *lcp;
	struct mbuf *nam;
{

	nam->m_len = sizeof(struct sockaddr_x25);
	bcopy(lcp->lcd_craddr, mtod(nam, caddr_t), (size_t)nam->m_len);
	if (lcp->lcd_flags & X25_OLDSOCKADDR)
		new_to_old(nam);
}

/*
 *
 *  X.25 Packet level protocol interface to socket abstraction.
 *
 *  Process an X.25 user request on a logical channel.  If this is a send
 *  request then m is the mbuf chain of the send data. If this is a timer
 *  expiration (called from the software clock routine) them timertype is
 *  the particular timer.
 *
 */
int
pk_usrreq(so, req, m, nam, control, p)
	struct socket *so;
	int req;
	struct mbuf *m, *nam, *control;
	struct proc *p;
{
	struct pklcd *lcp;
	int s;
	int error = 0;

	if (req == PRU_CONTROL)
		return (pk_control(so, (long)m, (caddr_t)nam,
		    (struct ifnet *)control, p));

	s = splsoftnet();
	lcp = (struct pklcd *)so->so_pcb;
#ifdef DIAGNOSTIC
	if (req != PRU_SEND && req != PRU_SENDOOB && control)
		panic("pk_usrreq: unexpected control mbuf");
#endif
	if (lcp == 0 && req != PRU_ATTACH) {
		error = EINVAL;
		goto release;
	}

	/*
		pk_trace (pkcbhead, TR_USER, (struct pklcd *)0,
			req, (struct x25_packet *)0);
	*/
	switch (req) {

		/*
		 * X.25 attaches to socket via PRU_ATTACH and allocates a
		 * logical channel descriptor.  If the socket is to  receive
		 * connections, then the LISTEN state is entered.
		 */
	case PRU_ATTACH:
		if (lcp != 0) {
			error = EISCONN;
			break;
		}
		lcp = pk_attach(so);
		if (lcp == 0)
			error = ENOBUFS;
		break;

		/*
		 * Detach a logical channel from the socket. If the state of
		 * the channel is embryonic, simply discard it. Otherwise we
		 * have to initiate a PRU_DISCONNECT which will finish later.
		 */
	case PRU_DETACH:
		pk_disconnect(lcp);
		break;

		/*
		 * Give the socket an address.
		 */
	case PRU_BIND:
		if (nam->m_len == sizeof(struct x25_sockaddr))
			old_to_new(nam);
		error = pk_bind(lcp, nam);
		break;

		/*
		 * Prepare to accept connections.
		 */
	case PRU_LISTEN:
		error = pk_listen(lcp);
		break;

		/*
		 * Initiate a CALL REQUEST to peer entity. Enter state
		 * SENT_CALL and mark the socket as connecting. Set timer
		 * waiting for CALL ACCEPT or CLEAR.
		 */
	case PRU_CONNECT:
		if (nam->m_len == sizeof(struct x25_sockaddr))
			old_to_new(nam);
		if (pk_checksockaddr(nam)) {
			error = EINVAL;
			break;
		}
		error = pk_connect(lcp, mtod(nam, struct sockaddr_x25 *));
		break;

	case PRU_CONNECT2:
		error = EOPNOTSUPP;
		break;

		/*
		 * Initiate a disconnect to peer entity via a CLEAR REQUEST
		 * packet. The socket will be disconnected when we receive a
		 * confirmation or a clear collision.
		 */
	case PRU_DISCONNECT:
		pk_disconnect(lcp);
		break;

		/*
		 * Accept an INCOMING CALL. Most of the work has already been
		 * done by pk_input. Just return the callers address to the
		 * user.
		 */
	case PRU_ACCEPT:
		if (lcp->lcd_craddr == NULL)
			break;
		pk_setpeeraddr(lcp, nam);
		break;

	case PRU_SHUTDOWN:
		socantsendmore(so);
		break;

		/*
		 * After a receive, we should send a RR.
		 */
	case PRU_RCVD:
		pk_flowcontrol(lcp, /* sbspace (&so -> so_rcv) <= */ 0, 1);
		break;

		/*
		 * Do send by placing data on the socket output queue.
		 */
	case PRU_SEND:
		if (control) {
			struct cmsghdr *ch = mtod(m, struct cmsghdr *);
			control->m_len -= sizeof(*ch);
			control->m_data += sizeof(*ch);
			error = pk_ctloutput(PRCO_SETOPT, so, ch->cmsg_level,
					     ch->cmsg_type, &control);
			if (error)
				break;
		}
		if (m)
			error = pk_send(m, lcp);
		break;

		/*
		 * Abort a virtual circuit. For example all completed calls
		 * waiting acceptance.
		 */
	case PRU_ABORT:
		pk_disconnect(lcp);
		break;

	case PRU_SENSE:
		/*
		 * stat: don't bother with a blocksize.
		 */
		splx(s);
		return (0);

		/*
		 * Receive INTERRUPT packet.
		 */
	case PRU_RCVOOB:
		if (so->so_options & SO_OOBINLINE) {
			struct mbuf *n = so->so_rcv.sb_mb;
			if (n && n->m_type == MT_OOBDATA) {
				unsigned        len = n->m_pkthdr.len;
				so->so_rcv.sb_mb = n->m_nextpkt;
				SB_EMPTY_FIXUP(&so->so_rcv);
				if (len != n->m_len &&
				    (n = m_pullup(n, len)) == 0)
					break;
				m->m_len = len;
				bcopy(mtod(m, caddr_t), mtod(n, caddr_t), len);
				m_freem(n);
			}
			break;
		}
		m->m_len = 1;
		*mtod(m, char *) = lcp->lcd_intrdata;
		break;

		/*
		 * Send INTERRUPT packet.
		 */
	case PRU_SENDOOB:
		if (control) {
			struct cmsghdr *ch = mtod(m, struct cmsghdr *);
			control->m_len -= sizeof(*ch);
			control->m_data += sizeof(*ch);
			error = pk_ctloutput(PRCO_SETOPT, so, ch->cmsg_level,
					     ch->cmsg_type, &control);
			if (error)
				break;
		}
		if (m) {
			MCHTYPE(m, MT_OOBDATA);
			error = pk_send(m, lcp);
		}
		break;

	case PRU_SOCKADDR:
		if (lcp->lcd_ceaddr == 0) {
			error = EADDRNOTAVAIL;
			break;
		}
		pk_setsockaddr(lcp, nam);
		break;

	case PRU_PEERADDR:
		if (lcp->lcd_state != DATA_TRANSFER) {
			error = ENOTCONN;
			break;
		}
		pk_setpeeraddr(lcp, nam);
		break;

	default:
		panic("pk_usrreq");
	}

release:
	splx(s);
	return (error);
}

/*
 * If you want to use UBC X.25 level 3 in conjunction with some other X.25
 * level 2 driver, have the ifp -> if_ioctl routine assign pk_start to ia ->
 * ia_start when called with SIOCSIFCONF_X25.
 */
/* ARGSUSED */
int
pk_start(lcp)
	struct pklcd *lcp;
{
	pk_output(lcp);
	return (0);		/* XXX pk_output should return a value */
}

struct sockaddr_x25 pk_sockmask = {
	offsetof(struct sockaddr_x25, x25_addr[0]),	/* x25_len */
	0,			/* x25_family */
	-1,			/* x25_net id */
};

/* ARGSUSED */
int
pk_control(so, cmd, data, ifp, p)
	struct socket *so;
	u_long cmd;
	caddr_t data;
	struct ifnet *ifp;
	struct proc *p;
{
	struct ifreq_x25 *ifr = (struct ifreq_x25 *) data;
	struct ifaddr *ifa = 0;
	struct x25_ifaddr *ia = 0;
	int             error = 0, s, old_maxlcn;

	/*
	 * Find address for this interface, if it exists.
	 */
	if (ifp)
		for (ifa = ifp->if_addrlist.tqh_first; ifa != 0;
		     ifa = ifa->ifa_list.tqe_next)
			if (ifa->ifa_addr->sa_family == AF_CCITT)
				break;

	ia = (struct x25_ifaddr *) ifa;
	switch (cmd) {
	case SIOCGIFCONF_X25:
		if (ifa == 0)
			return (EADDRNOTAVAIL);
		ifr->ifr_xc = ia->ia_xc;
		return (0);

	case SIOCSIFCONF_X25:
		if (p == 0 || (error = suser(p->p_ucred, &p->p_acflag)))
			return (EPERM);
		if (ifp == 0)
			panic("pk_control");
		if (ifa == (struct ifaddr *) 0) {
			MALLOC(ia, struct x25_ifaddr *, sizeof(*ia),
			       M_IFADDR, M_WAITOK);
			if (ia == 0)
				return (ENOBUFS);
			bzero((caddr_t) ia, sizeof(*ia));
			TAILQ_INSERT_TAIL(&ifp->if_addrlist, &ia->ia_ifa,
					  ifa_list);
			ifa = &ia->ia_ifa;
			IFAREF(ifa);
			ifa->ifa_netmask = (struct sockaddr *) & pk_sockmask;
			ifa->ifa_addr = (struct sockaddr *) & ia->ia_xc.xc_addr;
			ifa->ifa_dstaddr = (struct sockaddr *) & ia->ia_dstaddr;	/* XXX */
			ia->ia_ifp = ifp;
			ia->ia_dstaddr.x25_family = AF_CCITT;
			ia->ia_dstaddr.x25_len = pk_sockmask.x25_len;
		} else if (ISISO8802(ifp) == 0) {
			rtinit(ifa, (int) RTM_DELETE, 0);
		}
		old_maxlcn = ia->ia_maxlcn;
		ia->ia_xc = ifr->ifr_xc;
		ia->ia_dstaddr.x25_net = ia->ia_xc.xc_addr.x25_net;
		if (ia->ia_maxlcn != old_maxlcn && old_maxlcn != 0) {
			/* VERY messy XXX */
			struct pkcb *pkp;
			FOR_ALL_PKCBS(pkp)
				if (pkp->pk_ia == ia)
				pk_resize(pkp);
		}
		/*
		 * Give the interface a chance to initialize if this
p		 * is its first address, and to validate the address.
		 */
		ia->ia_start = pk_start;
		s = splnet();
		if (ifp->if_ioctl)
			error = (*ifp->if_ioctl) (ifp, SIOCSIFCONF_X25,
						  (caddr_t) ifa);
		if (error)
			ifp->if_flags &= ~IFF_UP;
		else if (ISISO8802(ifp) == 0)
			error = rtinit(ifa, (int) RTM_ADD, RTF_UP);
		splx(s);
		return (error);

	default:
		if (ifp == 0 || ifp->if_ioctl == 0)
			return (EOPNOTSUPP);
		return ((*ifp->if_ioctl) (ifp, cmd, data));
	}
}

int
pk_ctloutput(cmd, so, level, optname, mp)
	struct socket  *so;
	struct mbuf   **mp;
	int             cmd, level, optname;
{
	struct proc *p = curproc;		/* XXX */
	struct mbuf *m = *mp;
	struct pklcd *lcp = (struct pklcd *) so->so_pcb;
	int             error = EOPNOTSUPP;

	if (m == 0)
		return (EINVAL);
	if (cmd == PRCO_SETOPT)
		switch (optname) {
		case PK_FACILITIES:
			if (m == 0)
				return (EINVAL);
			lcp->lcd_facilities = m;
			*mp = 0;
			return (0);

		case PK_ACCTFILE:
			if (p == 0 || (error = suser(p->p_ucred, &p->p_acflag)))
				error = EPERM;
			else if (m->m_len)
				error = pk_accton(mtod(m, char *));
			else
				error = pk_accton((char *) 0);
			break;

		case PK_RTATTACH:
			error = pk_rtattach(so, m);
			break;

		case PK_PRLISTEN:
			error = pk_user_protolisten(mtod(m, u_char *));
		}
	if (*mp) {
		(void) m_freem(*mp);
		*mp = 0;
	}
	return (error);

}

/*
 * Do an in-place conversion of an "old style"
 * socket address to the new style
 */

static void
old_to_new(m)
	struct mbuf *m;
{
	struct x25_sockaddr *oldp;
	struct sockaddr_x25 *newp;
	char  *ocp, *ncp;
	struct sockaddr_x25 new;

	oldp = mtod(m, struct x25_sockaddr *);
	newp = &new;
	bzero((caddr_t) newp, sizeof(*newp));

	newp->x25_family = AF_CCITT;
	newp->x25_len = sizeof(*newp);
	newp->x25_opts.op_flags = (oldp->xaddr_facilities & X25_REVERSE_CHARGE)
		| X25_MQBIT | X25_OLDSOCKADDR;
	if (oldp->xaddr_facilities & XS_HIPRIO)	/* Datapac specific */
		newp->x25_opts.op_psize = X25_PS128;
	bcopy((caddr_t) oldp->xaddr_addr, newp->x25_addr,
	      (unsigned) min(oldp->xaddr_len, sizeof(newp->x25_addr) - 1));
	if (bcmp((caddr_t) oldp->xaddr_proto, newp->x25_udata, 4) != 0) {
		bcopy((caddr_t) oldp->xaddr_proto, newp->x25_udata, 4);
		newp->x25_udlen = 4;
	}
	ocp = (caddr_t) oldp->xaddr_userdata;
	ncp = newp->x25_udata + 4;
	while (*ocp && ocp < (caddr_t) oldp->xaddr_userdata + 12) {
		if (newp->x25_udlen == 0)
			newp->x25_udlen = 4;
		*ncp++ = *ocp++;
		newp->x25_udlen++;
	}
	bcopy((caddr_t) newp, mtod(m, char *), sizeof(*newp));
	m->m_len = sizeof(*newp);
}

/*
 * Do an in-place conversion of a new style
 * socket address to the old style
 */

static void
new_to_old(m)
	struct mbuf *m;
{
	struct x25_sockaddr *oldp;
	struct sockaddr_x25 *newp;
	char  *ocp, *ncp;
	struct x25_sockaddr old;

	oldp = &old;
	newp = mtod(m, struct sockaddr_x25 *);
	bzero((caddr_t) oldp, sizeof(*oldp));

	oldp->xaddr_facilities = newp->x25_opts.op_flags & X25_REVERSE_CHARGE;
	if (newp->x25_opts.op_psize == X25_PS128)
		oldp->xaddr_facilities |= XS_HIPRIO;	/* Datapac specific */
	ocp = (char *) oldp->xaddr_addr;
	ncp = newp->x25_addr;
	while (*ncp) {
		*ocp++ = *ncp++;
		oldp->xaddr_len++;
	}

	bcopy(newp->x25_udata, (caddr_t) oldp->xaddr_proto, 4);
	if (newp->x25_udlen > 4)
		bcopy(newp->x25_udata + 4, (caddr_t) oldp->xaddr_userdata,
		      (unsigned) (newp->x25_udlen - 4));

	bcopy((caddr_t) oldp, mtod(m, char *), sizeof(*oldp));
	m->m_len = sizeof(*oldp);
}

int
pk_checksockaddr(m)
	struct mbuf    *m;
{
	struct sockaddr_x25 *sa = mtod(m, struct sockaddr_x25 *);
	char  *cp;

	if (m->m_len != sizeof(struct sockaddr_x25))
		return (1);
	if (sa->x25_family != AF_CCITT ||
	    sa->x25_udlen > sizeof(sa->x25_udata))
		return (1);
	for (cp = sa->x25_addr; *cp; cp++) {
		if (*cp < '0' || *cp > '9' ||
		    cp >= &sa->x25_addr[sizeof(sa->x25_addr) - 1])
			return (1);
	}
	return (0);
}

int
pk_send(m, v)
	struct mbuf *m;
	void *v;
{
	struct pklcd   *lcp = v;
	int             mqbit = 0, error = 0;
	struct x25_packet *xp;
	struct socket *so;

	if (m->m_type == MT_OOBDATA) {
		if (lcp->lcd_intrconf_pending)
			error = ETOOMANYREFS;
		if (m->m_pkthdr.len > 32)
			error = EMSGSIZE;
		M_PREPEND(m, PKHEADERLN, M_WAITOK);
		if (m == 0 || error)
			goto bad;
		*(mtod(m, octet *)) = 0;
		xp = mtod(m, struct x25_packet *);
		X25SBITS(xp->bits, fmt_identifier, 1);
		xp->packet_type = X25_INTERRUPT;
		SET_LCN(xp, lcp->lcd_lcn);
		sbinsertoob((so = lcp->lcd_so) ?
			    &so->so_snd : &lcp->lcd_sb, m);
		goto send;
	}
	/*
	 * Application has elected (at call setup time) to prepend
	 * a control byte to each packet written indicating m-bit
	 * and q-bit status.  Examine and then discard this byte.
	 */
	if (lcp->lcd_flags & X25_MQBIT) {
		if (m->m_len < 1) {
			m_freem(m);
			return (EMSGSIZE);
		}
		mqbit = *(mtod(m, u_char *));
		m->m_len--;
		m->m_data++;
		m->m_pkthdr.len--;
	}
	error = pk_fragment(lcp, m, mqbit & 0x80, mqbit & 0x40, 1);
send:
	if (error == 0 && lcp->lcd_state == DATA_TRANSFER)
		lcp->lcd_send(lcp);	/* XXXXXXXXX fix pk_output!!! */
	return (error);
bad:
	if (m)
		m_freem(m);
	return (error);
}


text:
package jsystem.extensions.sourcecontrol;

import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.swing.JOptionPane;

import jsystem.extensions.sourcecontrol.SourceControlI.Status;
import jsystem.framework.FrameworkOptions;
import jsystem.framework.JSystemProperties;
import jsystem.framework.report.ListenerstManager;
import jsystem.framework.scenario.Parameter;
import jsystem.framework.scenario.Scenario;
import jsystem.framework.scenario.ScenarioChangeType;
import jsystem.framework.scenario.ScenarioListener;
import jsystem.framework.scenario.ScenariosManager;
import jsystem.framework.sut.SutFactory;
import jsystem.framework.sut.SutListener;
import jsystem.treeui.TestRunner;
import jsystem.treeui.actionItems.IgnisAction;
import jsystem.treeui.actionItems.SaveScenarioAction;
import jsystem.treeui.actionItems.ScenarioSCStatusAction;
import jsystem.treeui.actionItems.SutSCStatusAction;
import jsystem.utils.FileUtils;

public class SourceControlHandler implements ScenarioListener, SutListener {

	private static Logger log = Logger.getLogger(SourceControlHandler.class
			.getName());

	private boolean enabled;

	IgnisAction scenarioStatusAction = null;

	IgnisAction sutStatusAction = null;

	private Status scenarioStatus = Status.NONE;

	private Status sutStatus = Status.NONE;

	private SourceControlI sourceControl;

	private String repository;

	private String user;

	private String password;

	/**
	 * Get the required parameters, connect and init working copy.
	 */
	public void init() {
		enabled = true;
		fetchParameters();
		if (!enabled) {
			JOptionPane
					.showConfirmDialog(
							TestRunner.treeView,
							"Please specify all required parameters in JSystem properties file",
							"Source Control Warning",
							JOptionPane.DEFAULT_OPTION,
							JOptionPane.INFORMATION_MESSAGE);
			return;
		}

		instantiateSourceControl();
		connect();
		initWorkingCopy();
		if (!enabled) {
			JOptionPane.showConfirmDialog(TestRunner.treeView,
					"Failed to connect to repository",
					"Source Control Failure", JOptionPane.DEFAULT_OPTION,
					JOptionPane.ERROR_MESSAGE);
			return;
		}
		ListenerstManager.getInstance().addListener(this);
		scenarioStatusAction = ScenarioSCStatusAction.getInstance();
		updateScenarioStatus(ScenariosManager.getInstance()
				.getCurrentScenario());
		sutStatusAction = SutSCStatusAction.getInstance();
		updateSutStatus(SutFactory.getInstance().getSutFile().getName());
	}

	/**
	 * Get all the required parameters from the JSystem properties file.
	 */
	private void fetchParameters() {
		repository = JSystemProperties.getInstance().getPreference(
				FrameworkOptions.SCM_REPOSITORY);
		if (null == repository || repository.isEmpty()) {
			log.fine("No SVN repository was defined");
			enabled = false;
		}
		user = JSystemProperties.getInstance().getPreference(
				FrameworkOptions.SCM_USER);
		if (null == user) {
			user = "";
		}
		password = JSystemProperties.getInstance().getPreference(
				FrameworkOptions.SCM_PASSWORD);
		if (null == password) {
			password = "";
		}
	}

	private void initWorkingCopy() {
		if (!enabled) {
			return;
		}
		if (!sourceControl.isWorkingCopyInitialize()) {
			try {
				int answer = JOptionPane
						.showConfirmDialog(
								TestRunner.treeView,
								"All scnearios and SUT files will be deleted and replaced with repository files",
								"Checkout warning", JOptionPane.YES_NO_OPTION);
				if (JOptionPane.NO_OPTION == answer) {
					log.fine("User select not to initialize working copy");
					enabled = false;
					return;
				}
				sourceControl.initWorkingCopy();
			} catch (SourceControlException e) {
				log.log(Level.WARNING, "Failed to initialize working copy", e);
				enabled = false;
				JOptionPane.showConfirmDialog(TestRunner.treeView,
						"Failed to initialize working copy",
						"Source Control Failure", JOptionPane.DEFAULT_OPTION,
						JOptionPane.ERROR_MESSAGE);

			}
		}
	}

	/**
	 * Connect to the remote repository
	 */
	private void connect() {
		if (!enabled) {
			return;
		}
		try {
			sourceControl.connect(repository, user, password);
		} catch (SourceControlException e) {
			enabled = false;
			log.log(Level.WARNING, "Failed to connect to SCM repository", e);
			e.printStackTrace();
		}

	}

	/**
	 * Verifies that the JSystem is connected to the repository. If not, will
	 * pop dialog that allows the user to connect to repository.
	 *
	 * @return If connected to repository.
	 */
	private boolean verifyEnabled() {
		if (!enabled) {
			int answer = JOptionPane
					.showConfirmDialog(
							TestRunner.treeView,
							"Source control connection is not enabled. Do you want to connect?",
							"Source Control Disabled",
							JOptionPane.YES_NO_OPTION,
							JOptionPane.INFORMATION_MESSAGE);
			if (answer == JOptionPane.YES_OPTION) {
				init();
				return true;
			}
		}
		return enabled;
	}

	/**
	 * Get the source control class name and instantiate it.
	 */
	private void instantiateSourceControl() {
		final String svnClass = JSystemProperties.getInstance().getPreference(
				FrameworkOptions.SCM_PLUGIN_CLASS);
		if (null == svnClass || svnClass.isEmpty()) {
			log.fine("No SVN class was defined");
			enabled = false;
			return;
		}
		try {
			Class<?> myclass = Class.forName(svnClass);
			sourceControl = (SourceControlI) myclass.newInstance();
		} catch (Exception e) {
			log.log(Level.WARNING, "Failed to instanciate source control", e);
			enabled = false;
			e.printStackTrace();
			JOptionPane.showConfirmDialog(TestRunner.treeView,
					"Failed to instanciate source control",
					"Source Control Failure", JOptionPane.DEFAULT_OPTION,
					JOptionPane.ERROR_MESSAGE);
		}

	}

	// ********Scenario Handling***********

	/**
	 * Updates the current root scenario and all sub scenarios.
	 */
	public void updateCurrentScenario() {
		if (!verifyEnabled()) {
			return;
		}
		Scenario scenario = ScenariosManager.getInstance().getCurrentScenario();
		try {
			sourceControl.updateScenario(scenario);
		} catch (SourceControlException e) {
			log.log(Level.WARNING, "Failed to update scenario", e);
			e.printStackTrace();
			JOptionPane.showConfirmDialog(TestRunner.treeView,
					"Failed to update scenario", "Source Control Failure",
					JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);

		}
		loadScenario(scenario);
		updateScenarioStatus(scenario);

	}

	/**
	 * Update the scenarios file.
	 *
	 * @param scenario
	 */
	private void updateScenarioStatus(Scenario scenario) {
		if (!verifyEnabled()) {
			return;
		}
		try {
			scenarioStatus = sourceControl.getScenarioStatus(scenario);
			scenarioStatusAction.actionPerformed(null);
		} catch (SourceControlException e) {
			System.out.println("Failed to get status of scenario");
			e.printStackTrace();
			JOptionPane.showConfirmDialog(TestRunner.treeView,
					"Failed to update scenario status",
					"Source Control Failure", JOptionPane.DEFAULT_OPTION,
					JOptionPane.ERROR_MESSAGE);
		}
	}

	/**
	 * Adds the root scenario and all sub scenarios to the repository
	 */
	public void addCurrentScenario() {
		if (!verifyEnabled()) {
			return;
		}
		Scenario scenario = ScenariosManager.getInstance().getCurrentScenario();
		try {
			sourceControl.addScenario(scenario);
		} catch (SourceControlException e) {
			log.log(Level.WARNING, "Failed to add scenario", e);
			e.printStackTrace();
			JOptionPane.showConfirmDialog(TestRunner.treeView,
					"Failed to add scenario", "Source Control Failure",
					JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);

		}
		updateScenarioStatus(scenario);
	}

	/**
	 * Commit current root scenarios and all sub scenarios to the repository.
	 */
	public void commitCurrentScenario() {
		if (!verifyEnabled()) {
			return;
		}
		Scenario scenario = ScenariosManager.getInstance().getCurrentScenario();
		try {
			sourceControl.commitScenario(scenario);
		} catch (SourceControlException e) {
			log.log(Level.WARNING, "Failed to commit scenario", e);
			e.printStackTrace();
			JOptionPane.showConfirmDialog(TestRunner.treeView,
					"Failed to commit scenario", "Source Control Failure",
					JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);
		}
		updateScenarioStatus(scenario);
	}

	public void revertCurrentScenario() {
		if (!verifyEnabled()) {
			return;
		}

		if (!revertConfirmation()){
			return;
		}
		final Scenario scenario = ScenariosManager.getInstance()
				.getCurrentScenario();
		try {
			sourceControl.revertScenario(scenario);
		} catch (SourceControlException e) {
			log.log(Level.WARNING, "Failed to revert scenario", e);
			e.printStackTrace();
		}
		loadScenario(scenario);
		updateScenarioStatus(scenario);
		if (Status.NORMAL != scenarioStatus) {
			JOptionPane.showConfirmDialog(TestRunner.treeView,
					"Failed to revert scenario", "Source Control Failure",
					JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);
		}
	}

	private void loadScenario(final Scenario scenario) {
		TestRunner.treeView.getTableController()
				.clearExpandSelected(true, true);
		try {
			TestRunner.treeView.getTableController().selectScenario(
					scenario.getName());
		} catch (Exception e) {
			log.log(Level.WARNING, "Failed to select scenario after reverting",
					e);
			e.printStackTrace();
		}
		TestRunner.treeView.getTableController().expandAll();
		TestRunner.treeView.getTableController()
				.updateEnabledAndDisabledActions(null);
		TestRunner.treeView.getTableController().loadScenario(
				scenario.getName(), false);
		ScenariosManager.setDirty();
		try {
			SaveScenarioAction.getInstance().saveCurrentScenario();
		} catch (Exception e) {
			log.log(Level.WARNING, "Failed to save scenario after change", e);
			e.printStackTrace();
		}

	}

	// ********SUT Handling***********

	private void updateSutStatus(String sutName) {
		if (!verifyEnabled()) {
			return;
		}
		try {
			sutStatus = sourceControl.getSutStatus(sutName);
			sutStatusAction.actionPerformed(null);
		} catch (SourceControlException e) {
			JOptionPane.showConfirmDialog(TestRunner.treeView,
					"Failed to update sut", "Source Control Failure",
					JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);

			System.out.println("Failed to get status of sut");
			e.printStackTrace();
		}

	}

	public void addCurrentSut() {
		if (!verifyEnabled()) {
			return;
		}
		final String sutName = SutFactory.getInstance().getSutFile().getName();
		try {
			sourceControl.addSut(sutName);
		} catch (SourceControlException e) {
			log.log(Level.WARNING, "Failed to add sut", e);
			e.printStackTrace();
			JOptionPane.showConfirmDialog(TestRunner.treeView,
					"Failed to add sut", "Source Control Failure",
					JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);

		}
		updateSutStatus(sutName);

	}

	public void commitCurrentSut() {
		if (!verifyEnabled()) {
			return;
		}
		final String sutName = SutFactory.getInstance().getSutFile().getName();
		try {
			sourceControl.commitSut(sutName);
		} catch (SourceControlException e) {
			log.log(Level.WARNING, "Failed to commit file", e);
			e.printStackTrace();
			JOptionPane.showConfirmDialog(TestRunner.treeView,
					"Failed to commit scenario", "Source Control Failure",
					JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);

		}
		updateSutStatus(sutName);

	}

	public void revertCurrentSut() {
		if (!verifyEnabled()) {
			return;
		}

		if (!revertConfirmation()){
			return;
		}

		final File sutFile = SutFactory.getInstance().getSutFile();
		try {
			sourceControl.revertSut(sutFile.getName());
		} catch (SourceControlException e) {
			log.log(Level.WARNING, "Failed to revert sut", e);
			e.printStackTrace();
		}
		updateSutStatus(sutFile.getName());
		if (Status.NORMAL != sutStatus) {
			JOptionPane.showConfirmDialog(TestRunner.treeView,
					"Failed to revert sut", "Source Control Failure",
					JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);
		}
		try {
			copySutToTestsFolder(sutFile);
		} catch (IOException e) {
			JOptionPane.showConfirmDialog(TestRunner.treeView,
					"Failed to copy SUT file to tests folder",
					"Source Control Failure", JOptionPane.DEFAULT_OPTION,
					JOptionPane.ERROR_MESSAGE);
			log.severe("Failed to copy SUT file to tests folder");
			e.printStackTrace();
		}
		SutFactory.getInstance().setSut(sutFile.getName());

	}

	public void updateCurrentSut() {
		if (!verifyEnabled()) {
			return;
		}
		final File sutFile = SutFactory.getInstance().getSutFile();
		try {
			sourceControl.updateSut(sutFile.getName());
		} catch (SourceControlException e) {
			log.log(Level.WARNING, "Failed to update sut", e);
			e.printStackTrace();
		}
		updateSutStatus(sutFile.getName());
		try {
			copySutToTestsFolder(sutFile);
		} catch (IOException e) {
			log.severe("Failed to copy SUT file to tests folder");
			e.printStackTrace();
			JOptionPane.showConfirmDialog(TestRunner.treeView,
					"Failed to copy SUT file to tests folder",
					"Source Control Failure", JOptionPane.DEFAULT_OPTION,
					JOptionPane.ERROR_MESSAGE);
		}
		SutFactory.getInstance().setSut(sutFile.getName());

	}

	/**
	 * Copies the SUT file from the classes folder to the source folder.
	 *
	 * @param sutFile
	 * @throws IOException
	 */
	private void copySutToTestsFolder(File sutFile) throws IOException {
		File classDir = new File(JSystemProperties.getCurrentTestsPath());
		if (sutFile.getAbsolutePath().startsWith(classDir.getAbsolutePath())) {
			File sutSrcFile = new File(JSystemProperties.getInstance()
					.getPreference(FrameworkOptions.RESOURCES_SOURCE_FOLDER)
					+ sutFile.getAbsolutePath().substring(
							classDir.getAbsolutePath().length()));
			FileUtils.copyFile(sutFile, sutSrcFile);
		}
	}

	/**
	 * Confirm that the user knows that the revert will cause the local files to
	 * be deleted.
	 *
	 * @return true if user confirmed
	 */
	private static boolean revertConfirmation() {
		int answer = JOptionPane
				.showConfirmDialog(
						TestRunner.treeView,
						"Local files will be deleted, are you sure you want to proceed?",
						"Revert Warning", JOptionPane.YES_NO_OPTION,
						JOptionPane.WARNING_MESSAGE);
		if (answer == JOptionPane.NO_OPTION) {
			return false;
		}
		return true;
	}

	// ****** Events Handling**************

	/**
	 * Will update the scenario state when scenario change event is triggered.
	 */
	@Override
	public void scenarioChanged(Scenario current, ScenarioChangeType changeType) {
		updateScenarioStatus(current);

	}

	@Override
	public void scenarioDirectoryChanged(File directory) {
	}

	/**
	 * Will update the scenario state when scenario change event is triggered.
	 */
	@Override
	public void scenarioDirtyStateChanged(Scenario s, boolean isDirty) {
		updateScenarioStatus(s);

	}

	@Override
	public void testParametersChanged(String testIIUUD, Parameter[] oldValues,
			Parameter[] newValues) {

	}

	@Override
	public void sutChanged(String sutName) {
		updateSutStatus(sutName);
	}

	public Status getScenarioStatus() {
		return scenarioStatus;
	}

	public Status getSutStatus() {
		return sutStatus;
	}

	public boolean isEnabled() {
		return enabled;
	}

}