text:
Download Transcript (112.98 KB)
Dr. Lawrence Friedhoff from Axovant Sciences was our guest for this Alzheimer's Talks. Dr. Friedhoff has worked in pharmaceutical research and development for more than thirty years. He has led teams that developed and obtained approval for six new drugs, including donepezil (commonly known as Aricept) and he is also the author of the book New Drugs: An Insider's Guide to the FDA Approval Process for Scientists, Investors, and Patients. Dr. Friedhoff described the clinical trial called MINDSET, which is currently enrolling participants.
CLICK THE PLAY BUTTON AT LEFT TO HEAR THE DISCUSSION.
MINDSET is a new trial that is testing a promising new drug
MINDSET is a Phase-III clinical study evaluating whether an investigational Alzheimer's treatment known as RVT-101 could improve cognition and ability to perform daily living tasks for those with mild-to-moderate Alzheimer's disease. RVT-101 works by raising levels of an important neurotransmitter, acetylcholine, in the brain, and is being developed as a once-daily oral pill. To find out more, visit www.alzheimersglobalstudy.com.
Clinical trials are the key to drug development
Because scientists still don't understand the cause of Alzheimer's disease, there are not good models in test tubes or animals, so clinical trials with human subjects are the best way to see if drugs can help or not. By participating you receive access to potential new medications, study-related medical care from expert doctors, and contribute to research that may help future generations.
Hope in future, practicality at present
Though there may someday be one single medicine to treat Alzheimer's, Dr. Friedhoff drew comparisons between the treatment for Alzheimer's and the treatment for other serious illnesses—once acutely fatal, now manageable—that involves combination therapy with multiple drugs, and said that in the shorter term, multiple drugs may be a way to bring benefit to people afflicted with Alzheimer's.
Thank you to Dr. Friedhoff for describing his research and answering questions about the MINDSET trial and Alzheimer's in general.
And follow our new Alzheimer's Talks Pinterest board.
What if a blood test or other simple exam could one day detect Alzheimer's? Scientists are in pursuit of ways to test for Alzheimer's by measuring a biomarker, any substance in the body that may indicate or rule out the presence of a disease. Currently many people with Alzheimer's are...


Sanjha Chulha, Faridabad, Delhi is apt for hosting grand weddings and other pre-wedding functions like sangeet and mehendi. It is located near the famous QRG Health City which is well-known among the locals. Sanjha Chulha Delhi serves a wide range of tasty delicacies to choose from in both vegetarian and non-vegetarian food to your guests. It has a banquet hall and a spacious lawn which can be combined together to fit in a large crowd for your function. The Sanjha Chulha, Faridabad, Delhi caters to the needs of its invitees and the hospitable staff plays an important role in making your event a grand success.
The Sanjha Chulha located in Faridabad, Delhi has Banquet Halls and Wedding Lawns. Hall can accommodate upto 80 guests in seating and 120 guests in floating. Hall + Lawn can accommodate upto 250 guests in seating and 400 guests in floating. Lawn can accommodate upto 200 guests in seating and 300 guests in floating.
Vegetarian and Non Vegetarian food is served at this venue. Features of this wedding venues are : Food provided by the venue , Non-Veg allowed at the venue , Alcohol allowed at the venue , Outside alcohol allowed at the venue , Halls are air Conditioned , Ample parking , Baarat allowed , Hawan allowed , Overnight wedding allowed , Decor provided by the venue , Packages starts at Rs 800 per plate for vegetarian menu and at Rs 1200 for non veg menu.


text:
Wild Illusion (foaled 18 February 2015) is a British Thoroughbred racehorse. She was the highest-rated horse of her age and sex trained in Britain in 2017 when she won two of her three races including the Group 1 Prix Marcel Boussac. In the following year she finished fourth in the 1000 Guineas and second in the Epsom Oaks before winning the Nassau Stakes and the Prix de l'Opéra.

Background
Wild Illusion is a bay mare with a white sock on her left foreleg who was bred and owned by Sheikh Mohammed's Godolphin organisation. She is trained by Charlie Appleby, whose stable is based at Newmarket, Suffolk, but typically relocates to Dubai in winter.

She was sired by Dubawi a top-class son of Dubai Millennium, whose wins included the Irish 2,000 Guineas and the Prix Jacques Le Marois. At stud, Dubawi has been a highly-successful breeding stallion, siring major winners such as Monterosso, Al Kazeem, Makfi, Lucky Nine and Night of Thunder. Wild Illusion's dam Rumh was a German mare who won four races in England including the Listed Ballymacoll Stud Stakes. She was a descendant of the Irish mare Le Melody (foaled 1971), the dam of Ardross and the female-line ancestor of Electrocutionist and Scorpion.

Racing career

2017: two-year-old season
Wild Illusion was ridden in all of her 2017 races by James Doyle. She began her racing career in a minor race over one mile at Yarmouth Racecourse on 22 August in which she started the 15/8 favourite and won "comfortably" by two and a half lengths from Give And Take. The filly was immediately stepped up in class and sent to France for the Prix d'Aumale over 1600 metres at Chantilly Racecourse on 3 September and finished third behind Soustraction and Efaadah. On 1 October, over the same course and distance, she started a 25/1 outsider in a seven-runner field for the Group 1 Prix Marcel Boussac. Polydream (winner of the Prix du Calvados), started favourite ahead of Magical (Debutante Stakes) and Soustraction. After racing in second place behind Soustraction, Wild Illusion took the lead 400 metres from the finish and kept on well to win by a length from Polydream. After the race Appleby said "She came forward a lot for her last run and we were delighted with her at home... She's as genuine as the day is long and is a lovely filly".

In the official European Classification for 2017, Wild Illusion was rated the second-best two-year-old filly of the season, one pound behind the Irish-trained Clemmie.

2018: three-year-old season
On her three-year-old debut, Wild Illusion started the 11/2 third choice in the betting for the 1000 Guineas over the Rowley Mile at Newmarket Racecourse on 6 May and after briefly reaching second place she came home fourth behind Billesdon Brook, Laurens and Happily. William Buick took the ride when the filly was stepped up in distance and started 5/2 favourite for the Oaks Stakes over one and a half miles at Epsom Racecourse on 1 June. She took the lead two furlongs out but was soon overtaken by the Aidan O'Brien-trained Forever Together and was beaten four and a half lengths into second place. She was then dropped back to Group 2 level for the Ribblesdale Stakes at Royal Ascot but despite starting favourite she was beaten by Magic Wand, to whom she was conceding three pounds in weight.

At Goodwood Racecourse on 2 August Wild Illusion was matched against older fillies and mares in the Nassau Stakes over ten furlongs. She started at odds of 4/1 against five opponents, namely Rhododendron, Billesdon Brook, Urban Fox (Pretty Polly Stakes), Veracious and Wilamina. In a change of tactics, Buick sent the filly into the lead from the start, and after holding off several challengers she drew away in the closing stages to win by two lengths from Urban Fox. Appleby commented "I felt the drop back was going to help and tactically we couldn't see where the pace was going to come from. So I asked William to go out there and do what he is good at. He is great on the front end and he gave her a lovely tactical ride."

On 7 October, just over a year after her win in the Prix Marcel Boussac Wild Illusion was sent back to France for the Prix de l'Opéra over 2000 metres at Longchamp Racecourse. She started the 2/1 favourite ahead of fourteen opponents including Magic Wand, With You (Prix Rothschild), Lady Frankel (Prix de Lieurey), Rhododendron, Urban Fox, Homerique (Prix de Psyché), Catellar (Prix de la Nonette) and My Sister Nat (Prix Bertrand de Tarragon). The favourite started well and was settled in fifth place by Buick as the other Godolphin runner Winter Lightning set the pace. Wild Illusion moved up on the outside entering the straight, took the lead 300 metres out and stayed on well to win by a length from Magic Wand and the fast-finishing Homerique. After the race Appleby said "All credit to the filly, she's danced every dance and is so tough. She was the only filly on the bridle turning in and I couldn't see her getting beat because there's one thing she won't do, she won't lie down and she'll gallop all the way to the line".

For her final run of the year Wild Illusion was sent to the United States to contest the Breeders' Cup Filly & Mare Turf at Churchill Downs on 3 November and was made the 9/4 favourite in a fourteen-runner field. After being reluctant to enter the starting gate she recovered from a poor start to take the lead in the straight but was overtaken in the final strides and was beaten a neck by the Irish-bred four-year-old Sistercharlie. Appleby commented "I'm delighted with her run. She's run a fantastic race and has lost nothing in defeat".

2019: four-year-old season
For her first run of 2019 Wild Illusion was sent to Longchamp for the Prix d'Ispahan over 1800 metres on 26 May and started favourite against eight opponents. Ridden by Doyle she briefly took the lead 200 metres from the finish but faded in the final strides and came home sixth behind the Roger Varian-trained Zabeel Prince. Doyle was again in the saddle when the filly was sent to Ireland to contest the Pretty Polly Stakes at the Curragh on 28 June. She led for most of the way but was overtaken in the last quarter mile and finished fourth of the five runners in a race won by the three-year-old Iridessa. At Deauville Racecourse in August the filly started second favourite for the Prix Jean Romanet but after leading the race until the last 300 metres she dropped back and finished sixth of the eight runners behind Coronet.

Pedigree

References

External links
 Career 1-2-3 Colour Chart – Wild Illusion

2015 racehorse births
Racehorses bred in the United Kingdom
Racehorses trained in the United Kingdom
Thoroughbred family 23

redpajama_set_name: RedPajamaWikipedia


Former youth leader, sometime writer, avid reader, very casual cyclist, missions advocate, amateur photographer … who wonders in words about the world in which we live.
My world is guided by the Word. This one, especially.
I noticed the link to my blog. Thanks! Much appreciated.
I think I found your blog through the mysterious journey that is the Internet . . . somewhere, someone linked to something on your blog and I kept lurking … so that's how I found your blog.
Other than that, I'm a volunteer youth worker (please note that I fully obey the late Mike Yaconelli's insistence not to use the word "just" when talking about volunteer status . . . as in "I'm just a volunteer.") and probably fully addicted to reading blogs.
Hi Tammie, I wanted to e-mail you but couldn't find your e-mail address. would you drop me a line?
Pingback: Meet our Community Team!


Thank you for your interest in supporting RCABC with an Agency Membership!
Agency memberships are a great way for businesses or any other type of organization or agency to support RCABC and have their logo posted on our homepage. All of the money from your Agency Membership goes directly to helping RCABC, a volunteer run organization, operate. A one year Agency Membership from April 1st to March 31st the following year costs $50.
To renew your Agency Membership, log in to your member account and renew online by using PayPal or send a cheque. You can also print off a paper form and mail it to our Treasurer with a cheque.
If you haven't been a member before, click on the "Online Application" to create you acccount and use PayPal or send a cheque. If you wish to use a paper form and mail a cheque, click on the "Mail in Application".
RCABC is a volunteer run organization that provides certification for instructors, leaders and paddlers that are getting kids, youth and adults outside, active and appreciating nature. Many of our instructors work for alternate schools and youth at risk programs, as well as camps, high schools, clubs and guiding.


But how do you really keep in touch with your neighbors? How do you keep each other informed about what's happening around you?
That is where a web based community group comes to use. You can easily setup an online group on Yahoo, Google, MSN, etc. These are free, and you can invite your neighbors to sign up.
A Yahoo group, for example, serves many purposes. It can be your neighborhood mailing list; it is easy to send an email to all your neighbors without having to maintain a mailing list of your own. The group mailing list is available to everyone in the group, and it also allows each member to update their email address in the group. This makes it very easy to maintain an up to date mailing list.
All mails sent to the group are stored as messages on the group home page. You can always come here to view messages if you have deleted the emails you received from the group. This also serves as a way to document all the happenings around the neighborhood, so that the police can make use of it in pursuing any crime.
The group portal also allows you to store files, web links, pictures and pieces of information in the form of a database. The database is a particularly useful feature. It lets you create customizable tables. You can easily create a "Neighborhood Roster" with people's names, address, emergency contact information, etc. By letting people update their own entries, the entire group will have one place to go and find contact information for others in the group.
Another great advantage of using the group mailing list is that you can set up a mail filter in your own account that sends you an alert (like an SMS message), whenever someone posts a message to the group. For example, if your neighbor wanted to alert everyone about a suspicious guy driving around, he could post a message saying "Suspicious car in front of house #123," and everyone would get that email, and you would also get a quick alert SMS on your cell phone.
Besides using the group for alerting everyone, the group can also use this as forum for discussing and debating about things you want to do in the neighborhood to make it safer. If installing security cameras is one of the ideas, then this would be a great place to make a proposal, present some available options, discuss costs, and any other thoughts or concerns that everyone may have.
My NCW group has used a Yahoo Group very effectively for several years and it has proved to be a great tool.
» Neighborhood Crimebusters - Create A Group Technic Alley: Technology buzz and more.


text:
import { Disposable } from 'vs/base/common/lifecycle';
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
import { Registry } from 'vs/platform/registry/common/platform';
import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions';
import { CellKind } from 'vs/workbench/contrib/notebook/common/notebookCommon';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { CellEditState, getNotebookEditorFromEditorPane, NotebookEditorOptions } from 'vs/workbench/contrib/notebook/browser/notebookBrowser';
import { RedoCommand, UndoCommand } from 'vs/editor/browser/editorExtensions';

class NotebookUndoRedoContribution extends Disposable {

	constructor(@IEditorService private readonly _editorService: IEditorService) {
		super();

		const PRIORITY = 105;
		this._register(UndoCommand.addImplementation(PRIORITY, 'notebook-undo-redo', () => {
			const editor = getNotebookEditorFromEditorPane(this._editorService.activeEditorPane);
			if (editor?.viewModel) {
				return editor.viewModel.undo().then(cellResources => {
					if (cellResources?.length) {
						editor?.viewModel?.viewCells.forEach(cell => {
							if (cell.cellKind === CellKind.Markup && cellResources.find(resource => resource.fragment === cell.model.uri.fragment)) {
								cell.updateEditState(CellEditState.Editing, 'undo');
							}
						});

						editor?.setOptions(new NotebookEditorOptions({ cellOptions: { resource: cellResources[0] }, preserveFocus: true }));
					}
				});
			}

			return false;
		}));

		this._register(RedoCommand.addImplementation(PRIORITY, 'notebook-undo-redo', () => {
			const editor = getNotebookEditorFromEditorPane(this._editorService.activeEditorPane);
			if (editor?.viewModel) {
				return editor.viewModel.redo().then(cellResources => {
					if (cellResources?.length) {
						editor?.viewModel?.viewCells.forEach(cell => {
							if (cell.cellKind === CellKind.Markup && cellResources.find(resource => resource.fragment === cell.model.uri.fragment)) {
								cell.updateEditState(CellEditState.Editing, 'redo');
							}
						});

						editor?.setOptions(new NotebookEditorOptions({ cellOptions: { resource: cellResources[0] }, preserveFocus: true }));
					}
				});
			}

			return false;
		}));
	}
}

const workbenchContributionsRegistry = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench);
workbenchContributionsRegistry.registerWorkbenchContribution(NotebookUndoRedoContribution, LifecyclePhase.Ready);

redpajama_set_name: RedPajamaGithub


In previous posts, I've shown how to write custom converters and how to skip fields while mapping using ModelMapper. For those who aren't familiar with it, ModelMapper is a library for handling mapping between two similar classes. A common use case is mapping between data transfer objects (dtos) and entity objects in a web application. In this post, I'm going to demonstrate the deep mapping feature of ModelMapper in a Spring Boot application. If you want to follow along with the example, use the Spring Initializr to create an empty application. My example uses Gradle. Choose Web, JPA, H2 and Thymeleaf dependencies. Or you can just get the working code from github.
We're going to be using two entity classes Item and Location. The Location class represents a location in a warehouse.
The Item class represents an imaginary inventory item (Disclaimer: this is not a super realistic example…) that has a Location. Note: For the sake of making the example work easily, the Location relationship is set to Cascade.ALL. That's not something I'd normally do lightly (if at all).
We also need our Repository interfaces. For this example, they extend JpaRepository and have no custom methods. Additionally, we need an ItemDto for transferring between our user input form to our entity. For user input, we've flattened out the Location into the Item.
The code that's important for this example is found in the ItemController class.
In the ItemController, we define two custom property maps that do the deep mapping. We need one for each direction. This mapping, sets the fields on the Location entity in the Item entity from the specified Warehouse fields on the entry form for the Item. Using the map() method overrides the default mapping that ModelMapper tries to figure out automatically only for the fields specified.
We do the same thing in the other direction to map the fields from the Location object in the Item entity into the flattened form fields, so we can see the warehouse fields in the list.
Each custom mapping can only be applied once, so we inject the ModelMapper instance into the constructor and add the mappings there.
ModelMapper is used as it typically would in the actions on the controller. The mappings are automatically applied based on the class types of the objects being mapped.
This is used for the list. ModelMapper will automatically apply the warehouseFieldMapping property map.
This is how it's used when saving after adding or editing. ModelMapper will automatically apply the warehouseMapping.
If we enter an Item like this, the warehouse fields will map to a Location object and get stored in the Location table.
The list of Items will reflect the location fields.
When we list the locations, we see our Location has been saved into it, having been properly populated on the Item entity.
This is a way of using Model Mapper to map from fields on a form into an object that belongs to another object. Please feel free to comment with any questions or observations.


text:
Q: HTML5 Canvas: Image crops when x and y values are greater than its width and height I'm making a dungeon crawler on canvas. When you move the monsters as well. Skeletons make a square movement.
    function enemymove(){
    if(enemyreturn==0){
        if(enemyx<tilesize*3){
            enemyx+=1;
        }
        else{
            if(enemyy<tilesize*3){
                enemyy+=1;
            }
            else{
                enemyreturn=1;
            }
        }
    }
    else{
        if(enemyx>0){
            enemyx-=1;
        }
        else{
            if(enemyy>0){
                enemyy-=1;
            }
            else{
                enemyreturn=0;
            }
        }
    }
}

tilesize is the default size for each square.
It all sums up in the positioning code:
skeltal.x=(tilesize*j)+tilex+enemyx;
skeltal.y=(tilesize*i)+tiley+enemyy;
tilex and tiley is the value to move the map. i and j means it's inside a "for loop".
Here are some screens.
Skeleton normal
skeleton starts hiding when x value is increasing
[almost hidden][3]

redpajama_set_name: RedPajamaStackExchange


text:
Home » News Articles » Carolinas Superintendents Honor Champion Allen
Carolinas Superintendents Honor Champion Allen
Randy Allen, CGCS, a long-time champion of professional advancement for golf course superintendents, has won the Carolinas Golf Course Superintendents Association Distinguished Service Award. Allen is director of golf course operations for The Burroughs and Chapin Company, which owns five golf courses and manages three others in the Myrtle Beach, S.C. area.
The Carolinas GCSA represents close to 1,800 members in North and South Carolina and commands a $1-million operating budget to provide further education and professional services. The Distinguished Service Award is the highest honor bestowed by the association, which formed in 1954, and recognizes outstanding achievement and contribution. Allen will receive his award during the Carolinas GCSA annual Conference and Trade Show in Myrtle Beach in November.
Allen led the association as president in 1989 and continues to contribute through the association�s committee of past presidents. He established a national reputation as a successful four-time superintendent host of the PGA Senior Tour�s Tour Championship while at The Dunes Golf and Beach Club in Myrtle Beach. He began his career in Shelby, N.C., and later moved to historic Camden Country Club in Camden, SC. There, Allen played a major role in restoring South Carolina�s only 18-hole Donald Ross-designed course to its former glory. In 1986 he moved to The Dunes Club. Since joining The Burroughs and Chapin Company in 1999, Allen has overseen construction, grow-in and maintenance of the highly acclaimed Resort and Members Club courses at Grande Dunes Resort.
Throughout his career Allen has worked to bring public and industry perception of golf course superintendents in line with changes within the profession. Many of today�s golf course superintendents hold college degrees and command extensive personnel, budgeting, and operations programs in addition to their agronomic skills. Allen instigated a Superintendent Image Campaign in the �80s that continues in the Carolinas today. The campaign strives to improve awareness, understanding and appreciation of the role golf course superintendents play in what is an industry that contributes $2.3-billion to the South Carolina economy each year.

redpajama_set_name: RedPajamaCommonCrawl


Today I won worst mom of the year.
My youngest son does not eat. Allow me to rephrase that – he does not eat anything that is not a noodle or bread. He has a very small appetite combined with a very small list of foods that he will willingly eat. It's infuriating at times and exhausting on a regular basis.
At one point, he was actually shrinking because his intake was so inadequate. If that doesn't make me sound like an awful mother, I'm not sure what will. I promise I was feeding him, but he simply wasn't eating enough. So, here we are in food therapy.
I didn't even know there was such a thing, but through his OT – his amazing, patient, couldn't parent without her OT – we are increasing his pallet and have increased his weight so that he is once again on the chart. It's a tedious process that includes steps and charts and a number of things that one usually does not associate with eating. I can usually muster the patience to coax a new food into his mouth, but today, I lost it.
My patience ran dry, my tolerance evaporated and I just lost it.
We were preparing to leave for OT and he had one space left on his food chart. One. He has been working on this particular chart for weeks and I wanted to turn it in. I wanted him to proudly show his therapist and I wanted her to know that I wasn't a complete slacker mother and we had not in fact lost the chart. I really did have good intentions!
I excitedly tell him that he has only one space left and I list three options for him to try to complete the chart. Hard boiled egg, chicken nugget or broccoli were his choices and his task is to take five bites. I'm not asking him to eat dog poop (I may have actually said this to him) and I'm not asking him to eat an obnoxious amount. Five bites of a relatively normal food – that's all!
He chooses broccoli. I cut a sliver off, warm it up and pass it over. The piece is smaller than a toothpick and honestly, he could swallow it without it even touching his tongue. He waffles and whines. Whines and waffles. As the time he sits there increases, my patient decreases.
I encourage him and tell him how proud his OT will be. I offer a drink of water if he'll just put it in his mouth.
Waffle and whine. Whine and waffle.
I yell. I threaten time out.
Him and haw. Whine and waffle.
I walk over to him and squish the sliver of broccoli into his pursed lips. I hand him his cup of water and tell him to swallow the broccoli. The broccoli ended up in the cup, I ended up crying with him and we never got the final line on his chart filled in.
I've traumatized my son with a piece of broccoli.


This architecture exemplifies what should be true of the life of every Christian: that it is founded on the heritage of the past, but takes always new forms relevant to the present age.
First Methodist Church was established in Palo Alto in 1894, the year the city was incorporated. Land, encompassing most of the current site at Hamilton Avenue and Webster Street, had been donated and money and been pledged for construction of a church building. During the planning and construction period, the 24 charter members of the church met for Sunday services in Nortree Hall, a meeting room over a store on University Avenue. By the time the picturesque redwood church was completed two years later, the membership had grown to 58.
Within the next 15 years, the membership flourished and outgrew the original redwood church. The congregation built an esthetically pleasing traditional style white stucco house of worship, dedicated in 1914, on the site of the redwood church, which had been moved to the other side of Webster for use as at a temporary meeting house during the construction. The stucco church building was enlarged and remodeled with a new parsonage in 1948, major remodeling in 1949, and a new education building and fellowship hall in 1952 (designed by Carlton Arthur Steiner, architect of the present church building, remodeled in 2000).
But in 1957, the congregation recognized the need for a newer, larger house of worship. At this time, they also made a commitment to remain on the same site to build a major downtown church, rather than move to another area of Palo Alto where land was less expensive.
The next four years compromised a massive planning effort by the committees of church members lead by Dr. (later Bishop) R. Marvin Stuart and aided by professional consultants. They grappled with the issue of probable needs of the church in coming decades, and they were committed to creating a nontraditional and architecturally spectacular house of worship that would inspire greater participation by the congregation. In addition, they wanted the new church to be a place where the community could meet for musical and cultural events.
During this period, Carlton Arthur Steiner of Berkeley was selected to be the architect for this challenging project. The building site included area covered by the old church building and one additional lot acquired by Webster Street. Finally the plans were drawn and approved and construction on the 1,050-person capacity "Contemporary Gothic" building began. The general contractor was Theo G. Meyer and Sons of San Francisco.
Adjacent to the sanctuary, accessed by the narthex, the simple, intimate 140-person capacity Dwelle Memorial Chapel was constructed. Architecturally conventional, it utilized several items from the prior church on that site: altar, pulpit, communion rail, and two beautiful stained glass windows: "Christ Kneeling in Gethsemane" and "Christ Knocking at the Door of Everyman's Life". The 14,000-square foot lower level compromises meeting and storage rooms, a kitchen, and two sunken gardens.
The actual building process took two years and cost approximately $1,350,000 all inclusive (sanctuary, chapel, lower level, organ, furnishings, landscaping, and all fees).
The circle, without beginning and end, a symbol for expressing the eternalness of God, can be seen throughout the sanctuary: on the hand-carved reredos (screen) framing the cross, in the chancel railing, in the pew ends, and in the light fixtures. The cross is Latin, shown empty, representing the risen and living Christ. Each of the candelabra represents the three lights of the Trinity. The communion table and baptismal font, made of white Vermont marble, represent the two sacraments.
Colorful banners on each side of the sanctuary are symbolic reminders of God's two promises to us: On the left side, the blue/green banners represent baptism and God's offering of grace and unending love. On the right sight, the red/gold banners stand for the wind and flame of Pentecost, God's gift of presence and power, and promise to be with us in the here and now and always.
The Merritt C. Speidel Memorial Organ, recently extensively renovated and enhanced, occupies a unique niche in the Bay Area. Capable of satisfying the requirements of all liturgical and concert literature, it can additionally render 19th and 20th century organ literature with distinctive flair and fidelity. Thanks to its outstanding acoustic and esthetic qualities, the sanctuary regularly hosts performances of groups such as the Philarmonia Baroque, New Century Chamber Orchestra, and Midsummer Mozart Festival.


text:
Gillo is a given name and surname.

Notable people with the given name include:
Gillo Dorfles (1910–2018), Italian art critic, painter, and philosopher
Gillo Pontecorvo (1919–2006), Italian filmmaker

Notable people with the surname include:
Hank Gillo (1894–1948), American football player

Notable people with the nickname include:
Michele Frangilli (1976-), Italian archer


text:
Psychotria microcarpa är en måreväxtart som beskrevs av Johannes Müller Argoviensis. Psychotria microcarpa ingår i släktet Psychotria och familjen måreväxter. Inga underarter finns listade i Catalogue of Life.

Källor

Måreväxter
microcarpa


326 Harman Street, Brooklyn, NY, New York 11237. Opportunity knocks! This rare 6 unit apartment building features some tremendous upside potential. There are (6) two bedroom 1 bathroom apartments spread over 3 floors with one unit on each side equaling a total of approximately 4,130sq ft. plus a full basement that opens into a huge outdoor space. The building also has approximately an additional 2,700sq ft of unused air rights allowing a total of almost 6,900sq ft in total if the property is to be developed in the future. It also features some charming touches like 9 1/2 foot ceiling on the top floor with original tin ceilings. It is a rare opportunity to purchase a 25ft wide 6 unit in a great area of Bushwick.
326 Harman is only 4 short blocks from the L and M trains , Myrtle and wyckoff 7 minutes from the J, and Z lines. This is a prime Bushwick location with new art galleries, yoga studios, coffee shops and fantastic new restaurants cropping up every week including 6 Michelin rated restaurants like Le Garage, Amaranto, Faro and the incredible 2 Michelin starred restaurant Blanca only 5 minutes away. Forget about judging a neighborhood by how many starbucks are there, look at how many Michelin rated restaurants are here and don't miss out on this incredible neighborhood's rapid transformation.


At the Barclays Center in Brooklyn, SHoP Architects went all the way to Washington state to consult with Dissimilar Metal Design on its weathered steel façade. With over 30 years of experience within the science and art of natural weatherization, they were the best choice to help realize the look that the architect was looking for. On episode 1 on Performance Spaces, SHoP principal, Gregg Pasquarelli explained how the panels on the façade were aged prematurely in a warehouse before installation.
Check out this cool time lapse video of the construction process at the Barclay Center.


Finally a fly swat to be seen and admired in the house! A beautifully made English leather fly swat.
With oiled leather and beech wood handle, this fly swat has a leather strap, to hang, as why would you hide it?
Please note: Leather tones may vary.


The much rarer and original press and version of a song so ably covered by Emanuel Laskey, this is Detroit Soulful dance at it's very finest.
Note this is it's first neighbourhood incarnation of the 45, with no mention of "Detroit" on the label, just the street number and street address.
A stunning recording that Milton wrote himself, telling the story of family struggle, pride and determination. The wonderfully descriptive lyrics are cradled by swirling synth, a fanfare of lush horns; delivered by a persuasive vocal supported by a razored girl-group chorus response. A searing slab of late 70's dance Soul.
So what happened to Clyde Milton? For us it's a complete mystery, as surely a man with such an impressive voice and the gift to conjure up poetic lyrics like "I'd Rather Leave On My Feet, Than Live On My Knees" couldn't have just had this singular release, then vanish into Motor City music wilderness.
This tune is top-drawer, a rare mix a poignant lyrics embroidered into a fabulous dance arrangement, elusive, under-played and memorable..


The Vaughan Bassett Transitions King Upholstered Panel Bed features a subtly arched headboard and footboard with the paneled headboard upholstered in padded linen. This transitional-style king bed features a versatile driftwood oak finish that coordinates easily with modern or traditional bedrooms.
Comment: Includes: King Upholstered Headboard, King Footboard and King Rails. Price may vary based on option(s) selected.


The entries which follow have been prepared by the Calendar Editor for information only. If needed, official definitions should be obtained from a member of the Registrar's Office staff.
Academic Schedule-A schedule of events and deadlines of importance to students and prospective students, covering the period of the University's academic year, July 1 to June 30.
Academic Year-The consecutive twelve-month period from July 1 through June 30.
Admission or Readmission-Acceptance of a candidate for enrolment in a specified program and Faculty.
Admission Grade Point Average (AGPA)-AGPA is calculated on all university transferable coursework completed in the most recent two terms of study, provided they contain a minimum of ★24. If those two terms contain less than ★24, then all work in the next most recent term(s) will be included in the calculation until the minimum total of ★24 has been achieved. Two-term courses will be considered as second-term courses in these calculations. For applicants who have attempted less than ★24 of transferable postsecondary work, the AGPA will be based on all university or university transfer credits attempted.
Advanced Placement-The process whereby students are excused from taking a particular course (usually at the junior level), because they have already acquired the knowledge necessary to proceed into another course in the subject at a more advanced level. Advanced placement, unlike advanced standing, does not serve to reduce the number of courses that a student must complete for the degree.
Aegrotat Standing-Provision whereby a Faculty may grant deserving students credit in one or more courses in which they have missed the final examination because of illness.
Audit Only Students (Auditors)-Are those registered in one or more courses, exclusively on a not-for-credit basis.
Calendar-An annual publication of academic regulations, schedules, programs of study, and course descriptions.
Cooperative Education Program-A program that formally integrates a student's academic studies with work experience in employer organizations. These work experiences are paid.
Course Weight-See Units of Course Weight.
Course Load Requirement-The number of courses a student is expected to take while in attendance in a given academic session.
Credit-The quantitative measurement assigned to a course. At the University of Alberta a credit is equivalent to one unit of course weight.
Credit by Special Assessment (Credit by Challenge)-The procedure whereby a student may seek credit in certain specified courses without actually registering in and taking the courses at the University of Alberta. This privilege is limited to students who have been admitted to the University.
Credit Course-A course that carries credit toward a degree or diploma.
Degree with Distinction-The notation which is inscribed on the permanent record and graduation parchment of a candidate for any degree, except an honors or graduate degree, if the candidate has obtained a grade point average of 3.5 or higher over the last two years of the program.
Degree with Honors (Honors Program)-A four-year concentrated course of study under the supervision of one of the departments in the Faculty of Arts or Faculty of Science.
Entrance Requirements-Academic background necessary for admission to a particular program of study.
Extension Students-Students who are registered in any of the courses offered by the Faculty of Extension. These courses may or may not lead to certificate, degree, diploma or citation credit.
Faculty-A formal subdivision within the University whose mission is the administration of programs and courses relating (usually) to common fields of study and academic disciplines.
Fall Term-The period of the academic year which runs from September through December.
Fall/Winter (September-April)-The period of the academic year which runs from September through April.
Fee Index-See Units of Fee Index and Fee Index Value. Represented in this Calendar by the symbol fi.
Fee Index Value-A dollar value set, normally annually, by the Board of Governors and used in the calculation of instructional fees. See also Units of Fee Index.
First-Class Standing-A distinction awarded to students who obtain a grade point average of not less than 3.5 while enrolled in a full, normal academic course load in the academic year in question.
Fresh Start Program-An Open Studies program that allows some first- and second-year students who are assigned unsatisfactory academic standing to reestablish satisfactory standing.
Full-Time Students-Students who are registered for credit in the equivalent of ★9 or more in a Fall/Winter Term. In Spring/Summer Terms, a student is considered full-time if one of these conditions applies: a class of 3 weeks duration with 3 or more units of course weight; or a class of 6 weeks duration with 6 or more units of course weight; or a class of 6 weeks duration with 3 course units of course weight and attendance of 10 hours per week.
GFC (General Faculties Council)-The University's governing body that has statutory authority over academic matters and student affairs.
Grade Point Average (GPA)-A measure of a student's weighted average obtained by dividing the total number of grade points earned by the total units of course weight attempted.
Grade Points-A weighted value assigned to the grade a student receives in a course, obtained by multiplying the grade by the units of course weight. Used in computing grade point averages.
Graduate Students-Students admitted to the Faculty of Graduate Studies and Research.
Interdisciplinary Course-A course that is offered jointly by two or more departments, not necessarily in the same Faculty.
Nonmatriculated Applicants-Students who are at least 21 years of age, and who are given permission to enrol in a degree program although they do not meet the regular admission requirements of a Faculty.
Off-campus student-A student whose registration in a given term consists exclusively of designated off-campus sections of courses (including, but not limited to, Internet delivery, project, thesis, internship, practicum, study-abroad, and individual study courses as well as courses taught at locations other than the University of Alberta campuses).
On-campus student-A student whose registration in a given term consists primarily of designated on-campus sections of courses (courses taught at any University of Alberta campus).
Open Studies-A program in which students may register in selected credit courses, but are not admitted or committed to a degree or diploma program.
Part-Time Students-Students who are registered for credit in the equivalent of fewer than ★9 in a term. See Course Load Requirement.
Practicum Program-A program that formally integrates a student's academic studies with volunteer or work experience in employer organizations. These work experiences are generally unpaid.
Prerequisite-A preliminary requirement, usually another course, which must be met or waived before a course can be taken.
Reading Week-A recess near the middle of the second term designed to allow students to catch up on outstanding reading and to prepare for the oncoming final examinations.
Residence Requirements-See Transfer Credit, Course Load Requirement.
Seminar-A group of students who meet regularly for reports and discussion in an area of research under the guidance of a professor.
Single Term Course-A course with a weighting factor of less than six that normally extends over one University term.
Spring/Summer (May-August)-A period of lessons and study during the months of May through August which is divided into two, six-week terms. The first term runs from the first week of May to the second week of June, inclusive; the second term runs from the first week of July to the second week of August, inclusive.
Spring Term-The period of the academic year which runs from May through June.
Statement of Results-An unofficial copy of the student's year-end academic results, with neither an original signature nor a seal.
Summer Term-The period of the academic year which runs from July through August.
Term-The academic year is divided into four (Fall, Winter, Spring, Summer) terms for the purposes of registration and the scheduling of classes and examinations.
Term Examination-An examination which is conducted prior to the time that the instructional portion of a course has been completed.
TOEFL-Test of English as a Foreign Language.
Transcript-A statement of the student's entire official academic record bearing the original signature of an authorized member of the Registrar's staff and the official seal of the University.
Tutorial-Instruction given to students individually or in small groups.
Two-Term Course-A course with a weighting factor of six or greater that normally extends over two consecutive University terms.
Undergraduate Students-Students registered at the University of Alberta in a Faculty other than the Faculties of Graduate Studies and Research; or Extension; or Open Studies.
Units of Course Weight-A numerical used in computing grade point average, which reflects the amount of class time devoted to the course and represented in the Calendar by the symbol ★.
Units of Fee Index-A numerical used in computing instructional fees for courses. It is normally twice the value of the Units of Course Weight for a course, but can be set differently by the Board of Governors when special fees considerations are made. See also Fee Index Value.
Visiting Student Certificate Program-A unique program that allows international students the opportunity to spend one calendar year at the University of Alberta enrolled in intensive English as a Second Language classes as well as regular academic courses alongside Canadian students.
Weighting Factor-A unit used in the calculation of a student's overall grade point average. In most Faculties a weight of six is assigned to a two-term course (or equivalent) and a weight of three to a single term course.
Winter Term-The period of the academic year which runs from January through April.


The monastic life in the eastern orthodox Church, by Pan. Christou [at Myriobiblos Library] * * * Origen, [at the Internet Encyclopedia of Philosophy]. * * * A biography of St. Basil of Caesarea, [at The Russian Orthodox Cathedral of St. John the Baptist, Washington, D.C].
Albert Michael Seul, O.P., St. Basil the Great - his person and his preaching. * * * The Fathers on the meaning of illness * * * Hilarius of Arles' Life of Honoratus, [at EcoleInitiative]. * * * The Rule of Saint Benedict: Introduction, by +Abbot Primate Jerome Theisen OSB STD, [at the Order of Saint Benedict].
St. Benedict and His Order: A Brief History [anonymous, at The Monastery of Christ in the Desert]. * * * On computer-assisted methodology for the study of the Rule of Saint Benedict, by Scott Rains. * * * The Case for 'the Celtic Church': Further Considerations, by Allison Veronica Carroll. * * * The Cistercians, An Introductory History, by M. Basil Pennington, O.C.S.O.
Ησυχαστές και Ζηλωτές - Πνευματική ακμή και κοινωνική κρίση στον Βυζαντινό 14ο αιώνα , του π. Γεωργίου Μεταλληνού [Myriobiblos Library]. * * * "Sanctum Basilium dico...": ο Μέγας Βασίλειος και ο Ιωάννης Κασσιανός για την κοινοβιακή άσκηση, του Γ. Βαλσάμη [Myriobiblos Library].


Prior to taking part in health related experiences abroad, students or practitioners may desire a period of time to study a host country language. A number of resources are available in the area, and a variety of methods may be useful for language acquisition, both in formal study programs and by utilizing more informal techniques. Medical students in particular have significant schedule constraints; the resources listed are therefore intended to guide those who must maximize learning in a short period of time. This guide lists a number of general study resources. However, of note is the recent establishment of several new programs for development of competence in the Spanish language with a special medical orientation.
Language departments at local universities, in addition to providing courses, make tapes and other learning aids available, and may have access to native speakers, even in relatively less commonly spoken languages. The Foreign Service Institute of the U.S. Department of State and the Defense Department's Defense Language Institute, as well as universities and other non-government organizations, have developed comprehensive text and tape courses. For those who are progressing in their learning, video movies in the language of choice and short wave radio broadcasts from abroad may help with listening skills. Additionally, several excellent interactive computerized language study programs have recently been developed.
In many countries, enrollment in well organized intensive courses can be arranged for periods ranging from a few days to several months. A number of U.S. organizations facilitate short term coursework overseas, and national consulates and tourist offices can be helpful with questions about specific opportunities. Some of these programs are designed principally for health care personnel (see listings in resources). We emphasize Spanish in this guide since it is the primary language for millions of North Americans, and resources are correspondingly more abundant.
Among more active centers of Spanish language instruction for short term visitors include the cities of Cuernavaca and San Miguel de Allende, Mexico; Antigua, Guatemala; and Quito, Ecuador. Language academies frequently structure half-day courses for groups of three to ten people (in Guatemala and Ecuador individual tutoring is a more common format), provide regional culture study, and locate housing with local residents. It is possible to write for information; offerings vary considerably, however, so the prospective student may wish to compare programs in person before enrolling. Those who make arrangements prior to arrival generally will pay a premium for the convenience, a not insignificant consideration for students attempting to make ends meet with education loans. On the other hand, prearranged programs with North American academic affiliations may offer university level credits for those who have such needs.
Once inside a country, local tourist offices list addresses, and it can be worthwhile to ask in places where foreigners congregate, such as hotels and museums. Schedules are generally flexible, and students may frequently begin on most Mondays during the year, enrolling for periods of one week at a time. In general, academies are able to arrange for students to begin instruction with as little as one day advance notice. Appropriate study levels are determined by a brief examination administered upon enrollment. If making arrangements onsite, one would expect to pay $75-200 per week for tuition and a similar amount for a family homestay. Special visa arrangements beyond those required for tourists are generally not necessary for limited visits.
For aspiring francophones, the Alliance Française and Eurocentres operate language and culture centers in France, the United States, and other countries around the world. Additionally, numerous universities and private organizations in French-speaking countries of Europe and Africa and, closer to home, in Canada offer short term studies for foreigners. Electing to study in a medium-size university city with an active cultural calendar may be an appropriate choice for the student who wishes a relatively brief immersion experience.
Program Advantages : Programs are structured for progressively improving skills; a secure environment is provided; and it's easy to meet others working in and traveling around a host country. Special cultural activities provided through language academies can be a good introduction to unique aspects of a specific region.
Program Disadvantages : Surrounded by other North Americans, the temptation to speak English is nearly irresistible. Also, a school environment may limit opportunities for interaction with local residents. Participants observe that spending more than three or four hours a day, or longer than two weeks in an intensive course can become tedious for some.
The following seems so obvious as to be hardly worth mentioning; but it may be the most disregarded advice….Contrary to what many students think, English will not suffice everywhere! Many nuances of meaning are lost through translation or interpretation. A language the student studied in junior high [school] will not necessarily "come back" with use either; nor can a language usually be learned in the two weeks before one leaves for an elective – at least not well enough for one to follow the innuendos of health – and illness – related conversation.
 Krogh C, Pust R. International Health: A Manual for Advisors and Students, 1990. Kansas City: Society of Teachers of Family Medicine.
With good advice as a starting point, below are resource lists to help readers meet their foreign language needs.
Editors' note: While all efforts have been made to provide accurate information, no guarantees about current availability or quality can be made, and the user of this guide is urged to use personal discretion before expending significant resources on programs or study materials.
1.  Intensive language courses are available domestically through a number of North American universities, primarily during summer sessions. Especially diverse programs are offered by Boston University, Yale University, the University of Wisconsin, and the University of California campuses in Berkeley and Los Angeles. For those anticipating work in Africa the Summer Cooperative African Language Institute (SCALI) presents an eight week program each summer at one of the member universities on a rotating basis. Several languages are taught, and a small amount of tuition assistance is available. The summer 2002 program is located at Michigan State University, http://isp.msu.edu/africanstudies/scali/scali.htm. The University of Wisconsin also coordinates the Southeast Asian Studies Summer Institute (SEASSI), an eight week program with instruction in nine Southeast Asian languages. Information from Center for Southeast Asian Studies, 207 Ingraham Hall, 1155 Observatory Dr., Madison, WI 53706, 608-263-1755, http://seassi.wisc.edu/. As the name implies, the Less Commonly Taught Languages Project of the Center for Advanced Research on Language Acquisition (CARLA) at the University of Minnesota provides resources on less commonly spoken languages worldwide, 612-624-9016, http://carla.acad.umn.edu/lctl/access.html, with the web site listing summer 2002 courses.
19.  Fuller G, How to Learn a Foreign Language, Storm King Press; and Brown-Azarowicz M, Stannard C, Goldin M, Yes! You Can Learn a Foreign Language, Passport Books. Short handbooks with practical advice for those who have not previously studied a foreign language, or who have had a disappointing experience trying to learn one.
Books in the McGraw-Hill Schaum's Foreign Language Series are designed to assist users become more proficient at communicating in French or Spanish about different professions or fields of study. Readers with some understanding of the subject matter and background in the language may utilize them most effectively. For health professions, the French is Lutz K, Schmitt C, Médecine et Soins Médicaux; Lectures et Vocabulaire en Français. At press time some titles in the series were out of print, including the medical Spanish text in the series. Dollinger R., Pocket Medical French, JDV Publishing, utilizes basic phrases for non speakers of the language, available with audio cassette.


text:
Study on the structural and electrical properties of MgxNi1-xMn2O4 thin films
School of Material Science and Engineering,University of Shanghai for Science and Technology;National Laboratory for Infrared Physics,Shanghai Institute of Technical Physics,Chinese Academy of Sciences,School of Material Science and Engineering,University of Shanghai for Science and Technology,National Laboratory for Infrared Physics,Shanghai Institute of Technical Physics,Chinese Academy of Sciences,School of Material Science and Engineering,University of Shanghai for Science and Technology;National Laboratory for Infrared Physics,Shanghai Institute of Technical Physics,Chinese Academy of Sciences
The MgxNi1-xMn2O4(MNM x=0, 0.05, 0.10, 0.15, 0.20) films were grown on Al2O3 substrate by chemical solution deposition method. The effect of Mg doping on the structural properties of MNM thin films was studied by x-ray diffraction and field emission scanning electron microscopy. The results show that the films have a single cubic spinel structure and the films aresmooth and uniform, which have good crystallinity. The electrical measurements show that the conduction of MNM thin films was described by a variable range hopping model. The values of resistivity, characteristic temperature T0, negative resistance temperature coefficient α for MNM thin films were obtained. The Mg concentration dependence of structural and electrical properties for MNM films was investigated.
ZHANG Zeng-Hui, LIU Fang, HOU Yun, DI Wen-Qi. Study on the structural and electrical properties of MgxNi1-xMn2O4 thin films[J]. Journal of Infrared and Millimeter Waves,2017,36(4):415~419
Received:January 21,2017
Revised:February 16,2017
Adopted:February 22,2017


That's the simple goal at the heart of everything we do, working with government, employers and partners to help thousands of people start or develop a career.
NCG is one of the largest not-for-profit education and training groups in the UK. With seven colleges and two national training providers, we help connect learners and employers on their journey to success.
Our nationwide portfolio of businesses includes seven colleges and two training providers. We work with 45,000 learners and 7,800 businesses every year, operating in 61 locations across the UK.


Home Archive for category "autocad"
This is a basic introduction for AutoCAD for beginners.
Here are some basic AutoCAD tutorials from AutoDesk.
Tutorial about Basic Rhnio Modeling.
Basic Rhino, transfer Rhino to AutoCAD, Boolean.


~ I know damn well why, lol. Thrill of the chase. The game. and the unavailable-ness is a bit of a safety net if I keep my guard up like I'm supposed to.
Chase theory, remember? It is a challenge.
~ *smiles* yup. I know. That's why I know I'm in trouble.
Don't we all need challenges in our lives. Not to mention looking for trouble sometimes.
Definitely sounds like trouble. Could be some fun trouble though… just try not to get hurt!
Trouble with a capital T is an understatement.
It's probably karma for teasing us readers so much!


Christmas Tri Fold Brochure Template christmas tri fold brochure template brochure christmas trifold vector layout design stock vector template. christmas tri fold brochure template red and white christmas sales trifold brochure templates canva printable. christmas tri fold brochure template christmas trifold brochure template abstract flyer.


Russian Olympian Denis Ablyazin and the German women won double golds on the first day of finals at the 38th Tournament of Masters, a World Challenge Cup held Saturday in Cottbus, Germany.
Ablyazin claimed the gold medal on floor exercise and still rings. On floor exercise, he tumbled a seven-pass marathon routine with a Randi; layout double-double; double-twisting front, double front; layout Thomas, piked Arabian double front; 2 1/2, front full; and a triple twist dismount.
Switzerland's Claudio Capelli took second over top qualifier Diego Hypolito (Brazil), who took a very low landing on his own triple twist dismount.
On pommel horse, Olympic champion Krisztián Berki easily took the title. The former world champion outscored reigning world champion Kohei Kameyama, 15.550-14.900. Croatian specialist Robert Seligman won the bronze with 14.875.
Ablyazin claimed his second gold medal on still rings, edging Greek specialist Eleftherios Petrounias, 15.800-15.750. Former European champion Alexander Balandin (Russia) won the bronze.
Germany both women's titles, with top qualifiers Janine Berger (vault) and Sophie Scheder (uneven bars) repeating their ranking.
On uneven bars, Scheder and runner-up Anna Rodionova were both outstanding with similar routines. Scheder showed off outstanding line and handstand as she swung to victory (inside Slalder-full to inside-Stalder-Shaposhnikova; inside Stalder; inside Stalder-blind to Jaeger; high full-twisting double back).
Looking much taller than she had at the 2013 World Championships,Rodioniova impressed with an inside-Stalder; toe-on full to toe-on to Stalder-Shaposhnikova to Pak salto; Maloney-half; toe-blind to Jaeger and a full-twisting double.
Hungary's Noémi Makra, another gymnast with gorgeous lines, won the bronze.
Competition concludes Sunday with the remaining finals.


text:
import libvirt
import os
import random
import tempfile
import time
import urlparse
import re

from kvmagent import kvmagent
from zstacklib.utils import jsonobject
from zstacklib.utils import linux
from zstacklib.utils import lock
from zstacklib.utils import log
from zstacklib.utils import shell
from zstacklib.utils import http
from zstacklib.utils import xmlobject
from zstacklib.utils.bash import in_bash
from zstacklib.utils.plugin import completetask
from zstacklib.utils.report import *

logger = log.get_logger(__name__)

class AgentRsp(object):
    def __init__(self):
        self.success = True
        self.error = None

class VolumeInfo(object):
    def __init__(self):
        self.name = None       # type: str
        self.size = -1         # type: long
        self.physicalSize = -1 # type: long
        self.type = None       # type: str
        self.bus = None        # type: str
        self.protocol = None   # type: str
        self.endTime = None    # type: float

class VmInfo(object):
    def __init__(self):
        self.name = None        # type: str
        self.description = None # type: str
        self.uuid = None        # type: str
        self.cpuNum = -1        # type: int
        self.memorySize = -1    # type: long
        self.macAddresses = []  # type: list[str]
        self.volumes = []       # type: list[VolumeInfo]
        self.v2vCaps = {}       # type: dict[str, bool]
        self.cdromNum = 0       # type: int

class ListVmCmd(object):
    @log.sensitive_fields("libvirtURI", "sshPassword", "saslPass", "sshPrivKey")
    def __init__(self):
        self.libvirtURI = None
        self.sshPassword = None
        self.sshPrivKey = None
        self.saslUser = None
        self.saslPass = None

class ListVmRsp(AgentRsp):
    def __init__(self):
        super(ListVmRsp, self).__init__()
        self.qemuVersion = None    # type: str
        self.libvirtVersion = None # type: str
        self.vms = []              # type: list[VmInfo]

class CheckBitsRsp(AgentRsp):
    def __init__(self):
        super(CheckBitsRsp, self).__init__()
        self.existing = False

class ConvertRsp(AgentRsp):
    def __init__(self):
        super(ConvertRsp, self).__init__()
        self.rootVolumeInfo = None
        self.dataVolumeInfos = []
        self.bootMode = None

def getHostname(uri):
    return urlparse.urlparse(uri).hostname

def getUsername(uri):
    u = urlparse.urlparse(uri)
    return u.username if u.username else 'root'

def getSshTargetAndPort(uri):
    u = urlparse.urlparse(uri)
    target = u.username+'@'+u.hostname if u.username else u.hostname
    port = 22 if not u.port else u.port
    return target, port

def uriAddQuery(uri, key, val):
    if urlparse.urlparse(uri).query:
        return "{}&{}={}".format(uri, key, val)
    return "{}?{}={}".format(uri, key, val)

class LibvirtConn(object):
    @staticmethod
    def get_connection(uri=None, sasluser=None, saslpass=None):
        def request_cred(credentials, user_data):
            for credential in credentials:
                if credential[0] == libvirt.VIR_CRED_AUTHNAME:
                    credential[4] = sasluser
                elif credential[0] == libvirt.VIR_CRED_PASSPHRASE:
                    credential[4] = saslpass
            return 0

        if sasluser and saslpass:
            auth = [[libvirt.VIR_CRED_AUTHNAME, libvirt.VIR_CRED_PASSPHRASE],
                    request_cred, None]
            return libvirt.openAuth(uri, auth, 0)

        return libvirt.open(uri)

    def __init__(self, uri, sasluser=None, saslpass=None, keystr=None):
        self.uri = uri
        self.sasluser = sasluser
        self.saslpass = saslpass
        self.keystr = keystr
        self.conn = None

    def __enter__(self):
        tmpkeyfile = None
        if self.keystr:
            with tempfile.NamedTemporaryFile(delete=False) as f:
                f.write(self.keystr)
                tmpkeyfile = f.name
            self.uri = uriAddQuery(self.uri, 'keyfile', tmpkeyfile)
        elif os.path.exists(V2V_PRIV_KEY):
            self.uri = uriAddQuery(self.uri, 'keyfile', V2V_PRIV_KEY)

        try:
            self.conn = self.get_connection(self.uri, self.sasluser, self.saslpass)
            return self.conn
        except Exception as e:
            e.args = (re.sub(":[^:]*@", ":*****@", arg) for arg in e.args)
            e.message = re.sub(":[^:]*@", ":*****@", e.message)
            raise
        finally:
            if tmpkeyfile:
                os.remove(tmpkeyfile)

    def __exit__(self, exc_type, exc_val, exc_tb):
        if self.conn:
            self.conn.close()

@in_bash
def runSshCmd(libvirtURI, keystr, cmdstr):
    target, port = getSshTargetAndPort(libvirtURI)
    ssh_opts = DEF_SSH_OPTS
    ssh_cmd = "ssh" if not os.path.exists(V2V_PRIV_KEY) else "ssh -i {}".format(V2V_PRIV_KEY)

    if not keystr:
        return shell.check_run( "{} {} -p {} {} {}".format(
            ssh_cmd,
            target,
            port,
            DEF_SSH_OPTS,
            linux.shellquote(cmdstr)))

    tmpkeyfile = None
    with tempfile.NamedTemporaryFile(delete=False) as f:
        f.write(keystr)
        tmpkeyfile = f.name
    try:
        return shell.check_run("ssh {} -p {} {} -i {} {}".format(
            target,
            port,
            DEF_SSH_OPTS,
            tmpkeyfile,
            linux.shellquote(cmdstr)))
    finally:
        os.remove(tmpkeyfile)

def getCdromNum(dom, dxml=None):
    if not dxml:
        dxml = xmlobject.loads(dom.XMLDesc(0))

    def countCdrom(domain_xml):
        disk = domain_xml.devices.disk

        if not disk:
            return 0

        if isinstance(disk, list):
            counter = 0
            for disk_xml in disk:
                if disk_xml.device_ == 'cdrom':
                    counter += 1

            return counter
        else:
            return 0

    return countCdrom(dxml)

def buildFilterDict(filterList):
    fdict = {}
    if not filterList:
        return fdict
    for f in filterList:
        fdict[f.deviceId] = f
    return fdict

def skipVolume(fdict, name):
    f = fdict.get(name)
    return f and f.skip

def getVolumes(dom, dxml=None):
    def getVolume(dom, diskxml):
        v = VolumeInfo()
        if diskxml.device_ in [ 'cdrom', 'floppy' ]:
            return None

        if diskxml.hasattr('boot') and diskxml.boot and diskxml.boot.hasattr('order_') and diskxml.boot.order_ == '1':
            v.type = 'ROOT'
        else:
            v.type = 'DATA'

        v.name = diskxml.target.dev_
        v.bus = diskxml.target.bus_
        if hasattr(diskxml.source, 'protocol_'):
            v.protocol = diskxml.source.protocol_
        v.size, _, v.physicalSize = dom.blockInfo(v.name)
        return v

    def listVolumes(dom, disk):
        if not disk:
            return []
        if isinstance(disk, list):
            return [ getVolume(dom, d) for d in disk ]
        return [ getVolume(dom, disk) ]

    if not dxml:
        dxml = xmlobject.loads(dom.XMLDesc(0))

    volumes = filter(lambda v:v, listVolumes(dom, dxml.devices.disk))

    if len(volumes) == 0:
        raise Exception("no disks found for VM: "+dom.name())

    if len(filter(lambda v: v.type == 'ROOT', volumes)) == 0:
        volumes[0].type = 'ROOT'

    return volumes

def getVerNumber(major, minor, build=0):
    return major * 1000000 + minor * 1000 + build

def listVirtualMachines(url, sasluser, saslpass, keystr):
    def getMac(ifxml):
        return ifxml.mac.address_ if ifxml.mac else ""

    def getMacs(iface):
        if not iface:
            return []
        if isinstance(iface, list):
            return [ getMac(inf) for inf in iface ]
        return [ getMac(iface) ]

    def getV2vCap(qemuver, libvirtver, vminfo):
        if qemuver < getVerNumber(1, 1):
            return False

        if any(map(lambda v: v.protocol == 'rbd', vminfo.volumes)):
            return libvirtver >= getVerNumber(1, 2, 16)
        return libvirtver >= getVerNumber(1, 2, 9)

    vms = []
    v2vCaps = {}
    qemuVersion, libvirtVersion = None, None
    with LibvirtConn(url, sasluser, saslpass, keystr) as c:
        qemuVersion = c.getVersion()
        libvirtVersion = c.getLibVersion()

        for dom in filter(lambda d: d.isActive(), c.listAllDomains()):
            info = VmInfo()

            info.name = dom.name()
            info.uuid = dom.UUIDString()

            dinfo = dom.info()
            info.memorySize = dinfo[1] * 1024
            info.cpuNum = dinfo[3]

            try:
                info.description = dom.metadata(libvirt.VIR_DOMAIN_METADATA_DESCRIPTION, None)
            except libvirt.libvirtError as ex:
                pass

            xmldesc = dom.XMLDesc(0)
            logger.info("domain xml for vm: {}\n{}".format(info.name, xmldesc))

            dxml = xmlobject.loads(xmldesc)
            if dxml.devices.hasattr('interface'):
                info.macAddresses = getMacs(dxml.devices.interface)
            else:
                info.macAddresses = []

            info.volumes = getVolumes(dom, dxml)
            cap = getV2vCap(qemuVersion, libvirtVersion, info)
            v2vCaps[info.uuid] = cap
            info.cdromNum = getCdromNum(dom, dxml)

            vms.append(info)

    return qemuVersion, libvirtVersion, vms, v2vCaps

QOS_IFB = "ifb0"

def getRealStoragePath(storagePath):
    return os.path.abspath(os.path.join(storagePath, "v2v-cache"))

V2V_PRIV_KEY = os.path.join(os.path.expanduser("~"), ".ssh", "id_rsa_v2v")
V2V_PUB_KEY = V2V_PRIV_KEY+".pub"
DEF_SSH_OPTS = "-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"

class KVMV2VPlugin(kvmagent.KvmAgent):
    INIT_PATH = "/kvmv2v/conversionhost/init"
    LIST_VM_PATH = "/kvmv2v/conversionhost/listvm"
    CONVERT_PATH = "/kvmv2v/conversionhost/convert"
    CLEAN_PATH = "/kvmv2v/conversionhost/clean"
    CHECK_BITS = "/kvmv2v/conversionhost/checkbits"
    CONFIG_QOS_PATH = "/kvmv2v/conversionhost/qos/config"
    DELETE_QOS_PATH = "/kvmv2v/conversionhost/qos/delete"
    CANCEL_CONVERT_PATH = "/kvmv2v/conversionhost/convert/cancel"

    def start(self):
        random.seed()
        http_server = kvmagent.get_http_server()
        http_server.register_async_uri(self.INIT_PATH, self.init)
        http_server.register_async_uri(self.LIST_VM_PATH, self.listvm, cmd=ListVmCmd())
        http_server.register_async_uri(self.CONVERT_PATH, self.convert)
        http_server.register_async_uri(self.CLEAN_PATH, self.clean)
        http_server.register_async_uri(self.CANCEL_CONVERT_PATH, self.cancel_and_clean_convert)
        http_server.register_async_uri(self.CHECK_BITS, self.check_bits)
        http_server.register_async_uri(self.CONFIG_QOS_PATH, self.config_qos)
        http_server.register_async_uri(self.DELETE_QOS_PATH, self.delete_qos)

    def stop(self):
        pass

    @in_bash
    @kvmagent.replyerror
    def init(self, req):
        rsp = AgentRsp()
        cmd = jsonobject.loads(req[http.REQUEST_BODY])
        spath = None
        if cmd.storagePath:
            spath = getRealStoragePath(cmd.storagePath)
            linux.mkdir(spath)

            if not os.path.isdir("/etc/exports.d"):
                linux.mkdir("/etc/exports.d")
            with open('/etc/exports.d/zs-v2v.exports', 'w') as f:
                f.write("{} *(rw,sync,no_root_squash)\n".format(spath))

        shell.check_run('systemctl restart nfs-server')

        if spath is not None:
            fstype = shell.call("""stat -f -c '%T' {}""".format(spath)).strip()
            if fstype not in [ "xfs", "ext2", "ext3", "ext4", "jfs", "btrfs", "ext2/ext3" ]:
                raise Exception("unexpected fstype '{}' on '{}'".format(fstype, cmd.storagePath))

        return jsonobject.dumps(rsp)

    @in_bash
    @kvmagent.replyerror
    def listvm(self, req):
        cmd = jsonobject.loads(req[http.REQUEST_BODY])
        rsp = ListVmRsp()

        if cmd.sshPassword and not cmd.sshPrivKey:
            target, port = getSshTargetAndPort(cmd.libvirtURI)
            ssh_pswd_file = linux.write_to_temp_file(cmd.sshPassword)
            if not os.path.exists(V2V_PRIV_KEY) or not os.path.exists(V2V_PUB_KEY):
                shell.check_run("yes | ssh-keygen -t rsa -N '' -f {}".format(V2V_PRIV_KEY))
            cmdstr = "HOME={4} timeout 30 sshpass -f {0} ssh-copy-id -i {5} -p {1} {2} {3}".format(
                    ssh_pswd_file,
                    port,
                    DEF_SSH_OPTS,
                    target,
                    os.path.expanduser("~"),
                    V2V_PUB_KEY)
            shell.check_run(cmdstr)
            linux.rm_file_force(ssh_pswd_file)

        rsp.qemuVersion, rsp.libvirtVersion, rsp.vms, rsp.v2vCaps = listVirtualMachines(cmd.libvirtURI,
                cmd.saslUser,
                cmd.saslPass,
                cmd.sshPrivKey)
        return jsonobject.dumps(rsp)

    @kvmagent.replyerror
    @completetask
    def convert(self, req):
        def get_mount_command(cmd):
            timeout_str = "timeout 30"
            username = getUsername(cmd.libvirtURI)
            if username == 'root':
                return "{0} mount".format(timeout_str)
            if cmd.sshPassword:
                return "echo {0} | {1} sudo -S mount".format(cmd.sshPassword, timeout_str)
            return "{0} sudo mount".format(timeout_str)

        def validate_and_make_dir(_dir):
            exists = os.path.exists(_dir)
            if not exists:
                linux.mkdir(_dir)
            return exists

        def do_ssh_mount(cmd, local_mount_point, vm_v2v_dir, real_storage_path):
            mount_cmd = get_mount_command(cmd)
            mount_paths = "{}:{} {}".format(cmd.managementIp, real_storage_path, local_mount_point)
            alternative_mount = mount_cmd + " -o vers=3"

            with lock.NamedLock(local_mount_point):
                cmdstr = "mkdir -p {0} && ls {1} 2>/dev/null || {2} {3} || {4} {3}".format(
                            local_mount_point,
                            vm_v2v_dir,
                            mount_cmd,
                            mount_paths,
                            alternative_mount)
                try:
                    runSshCmd(cmd.libvirtURI, cmd.sshPrivKey, cmdstr)
                except shell.ShellError as ex:
                    if "Stale file handle" in str(ex):
                        cmdstr = "umount {0} && {1} {2} || {3} {2}".format(
                                local_mount_point,
                                mount_cmd,
                                mount_paths,
                                alternative_mount)
                        runSshCmd(cmd.libvirtURI, cmd.sshPrivKey, cmdstr)

        def do_blockcopy(cmd, dom, volumes, storage_dir, flags):
            for v in volumes:
                localpath = os.path.join(storage_dir, v.name)
                info = dom.blockJobInfo(v.name, 0)
                if os.path.exists(localpath) and not info:
                    os.remove(localpath)
                if not os.path.exists(localpath) and info:
                    raise Exception("blockjob already exists on disk: "+v.name)
                if info:
                    continue

                logger.info("start copying {}/{} ...".format(cmd.srcVmUuid, v.name))

                # c.f. https://github.com/OpenNebula/one/issues/2646
                linux.touch_file(localpath)

                dom.blockCopy(v.name,
                    "<disk type='file'><source file='{}'/><driver type='{}'/></disk>".format(os.path.join(vm_v2v_dir, v.name), cmd.format),
                    None,
                    flags)

        cmd = jsonobject.loads(req[http.REQUEST_BODY])
        real_storage_path = getRealStoragePath(cmd.storagePath)
        storage_dir = os.path.join(real_storage_path, cmd.srcVmUuid)

        rsp = ConvertRsp()
        last_task = self.load_and_save_task(req, rsp, validate_and_make_dir, storage_dir)
        if last_task and last_task.agent_pid == os.getpid():
            rsp = self.wait_task_complete(last_task)
            return jsonobject.dumps(rsp)

        local_mount_point = os.path.join("/tmp/zs-v2v/", cmd.managementIp)
        vm_v2v_dir = os.path.join(local_mount_point, cmd.srcVmUuid)
        libvirtHost = getHostname(cmd.libvirtURI)

        try:
            do_ssh_mount(cmd, local_mount_point, vm_v2v_dir, real_storage_path)
        except shell.ShellError as ex:
            logger.info(str(ex))
            raise Exception('host {} cannot access NFS on {}'.format(libvirtHost, cmd.managementIp))

        if linux.find_route_interface_by_destination_ip(linux.get_host_by_name(cmd.managementIp)):
            cmdstr = "tc filter replace dev %s protocol ip parent 1: prio 1 u32 match ip src %s/32 flowid 1:1" \
                     % (QOS_IFB, cmd.managementIp)
            shell.run(cmdstr)

        volumes = None
        filters = buildFilterDict(cmd.volumeFilters)
        startTime = time.time()
        with LibvirtConn(cmd.libvirtURI, cmd.saslUser, cmd.saslPass, cmd.sshPrivKey) as c:
            dom = c.lookupByUUIDString(cmd.srcVmUuid)
            if not dom:
                raise Exception('VM not found: {}'.format(cmd.srcVmUuid))

            xmlDesc = dom.XMLDesc(0)
            dxml = xmlobject.loads(xmlDesc)
            if dxml.os.hasattr('firmware_') and dxml.os.firmware_ == 'efi' or dxml.os.hasattr('loader'):
                rsp.bootMode = 'UEFI'

            volumes = filter(lambda v: not skipVolume(filters, v.name), getVolumes(dom, dxml))
            oldstat, _ = dom.state()
            needResume = True
            needDefine = False

            if cmd.pauseVm and oldstat != libvirt.VIR_DOMAIN_PAUSED:
                dom.suspend()
                needResume = False

            try:
                do_blockcopy(cmd, dom, volumes, storage_dir, libvirt.VIR_DOMAIN_BLOCK_COPY_TRANSIENT_JOB)
            except libvirt.libvirtError as ex:
                if 'unsupported flags' in str(ex):
                    if dom.isPersistent():
                        dom.undefine()
                        needDefine = True
                    do_blockcopy(cmd, dom, volume, storage_dir, 0)
                else:
                    raise ex

            end_progress = 60
            total_volume_size = sum(volume.size for volume in volumes)

            if cmd.sendCommandUrl:
                Report.url = cmd.sendCommandUrl

            report = Report(cmd.threadContext, cmd.threadContextStack)
            report.processType = "KVM-V2V"
            while True:
                current_progress = 0.0
                job_canceled = False
                for v in volumes:
                    if v.endTime:
                        current_progress += 1.0 * float(v.size) / float(total_volume_size)
                        continue

                    info = dom.blockJobInfo(v.name, 0)
                    if not info:
                        err_msg = 'blockjob not found on disk %s, maybe job has been canceled' % v.name
                        logger.warn(err_msg)
                        job_canceled = True
                        continue
                    end = info['end']
                    cur = info['cur']
                    if cur == end :
                        v.endTime = time.time()
                        logger.info("completed copying {}/{} ...".format(cmd.srcVmUuid, v.name))
                        progress = 1.0
                    else:
                        progress = float(cur) / float(end)

                    current_progress += progress * float(v.size) / float(total_volume_size)

                report.progress_report(str(int(current_progress * float(end_progress))), "start")
                if all(map(lambda v: v.endTime, volumes)) or job_canceled:
                    break
                time.sleep(5)

            if job_canceled:
                rsp.success = False
                rsp.error = "cannot find blockjob on vm %s, maybe it has been canceled" % cmd.srcVmUuid

            if not cmd.pauseVm and oldstat != libvirt.VIR_DOMAIN_PAUSED:
                dom.suspend()
                needResume = True

            try:
                for v in volumes:
                    if dom.blockJobInfo(v.name, 0):
                        dom.blockJobAbort(v.name)
            finally:
                if needResume:
                    dom.resume()
                if needDefine:
                    c.defineXML(xmlDesc)

        # TODO
        #  - monitor progress

        def makeVolumeInfo(v, startTime, devId):
            return { "installPath": os.path.join(storage_dir, v.name),
                     "actualSize":  v.physicalSize,
                     "virtualSize": v.size,
                     "virtioScsi":  v.bus == 'scsi',
                     "deviceName":  v.name,
                     "downloadTime": int(v.endTime - startTime),
                     "deviceId":    devId }

        if not rsp.success:
            return jsonobject.dumps(rsp)

        idx = 1
        rv, dvs = None, []
        for v in volumes:
            if v.type == 'ROOT':
                rv = makeVolumeInfo(v, startTime, 0)
            else:
                dvs.append(makeVolumeInfo(v, startTime, idx))
                idx += 1

        rsp.rootVolumeInfo = rv
        rsp.dataVolumeInfos = dvs

        return jsonobject.dumps(rsp)

    @in_bash
    @kvmagent.replyerror
    def clean(self, req):
        cmd = jsonobject.loads(req[http.REQUEST_BODY])
        rsp = AgentRsp()
        real_storage_path = getRealStoragePath(cmd.storagePath)
        if not cmd.srcVmUuid:
            cleanUpPath = real_storage_path
        else:
            cleanUpPath = os.path.join(real_storage_path, cmd.srcVmUuid)

        linux.rm_dir_force(cleanUpPath)
        return jsonobject.dumps(rsp)

    @in_bash
    @kvmagent.replyerror
    def cancel_and_clean_convert(self, req):
        def abort_block_job(conn, filters):
            with LibvirtConn(conn.libvirtURI, conn.saslUser, conn.saslPass, conn.sshPrivKey) as c:
                dom = c.lookupByUUIDString(cmd.srcVmUuid)
                if not dom:
                    logger.info('VM not found: {}'.format(cmd.srcVmUuid))
                    return

                xmlDesc = dom.XMLDesc(0)
                dxml = xmlobject.loads(xmlDesc)

                volumes = filter(lambda v: not skipVolume(filters, v.name), getVolumes(dom, dxml))

                for v in volumes:
                    info = dom.blockJobInfo(v.name, 0)
                    if info:
                        dom.blockJobAbort(v.name)

        cmd = jsonobject.loads(req[http.REQUEST_BODY])
        rsp = AgentRsp()
        abort_block_job(cmd.libvirtConn, buildFilterDict(cmd.volumeFilters))
        real_storage_path = getRealStoragePath(cmd.storagePath)
        clean_up_path = os.path.join(real_storage_path, cmd.srcVmUuid)
        linux.rm_dir_force(clean_up_path)

        return jsonobject.dumps(rsp)

    @in_bash
    @kvmagent.replyerror
    def check_bits(self, req):
        cmd = jsonobject.loads(req[http.REQUEST_BODY])
        rsp = CheckBitsRsp()
        rsp.existing = os.path.exists(cmd.path)
        return jsonobject.dumps(rsp)

    @kvmagent.replyerror
    def config_qos(self, req):
        cmd = jsonobject.loads(req[http.REQUEST_BODY])
        rsp = AgentRsp()

        shell.run("modprobe ifb; ip link set %s up" % QOS_IFB)

        if not cmd.sourceHosts:
            return jsonobject.dumps(rsp)

        interfaces_to_setup_rule = {}

        def set_up_qos_rules(target_interface):
            # a bare number in tc class use bytes as unit
            config_qos_cmd = "tc qdisc add dev {0} ingress;" \
                             "tc filter add dev {0} parent ffff: protocol ip u32 match " \
                             "u32 0 0 flowid 1:1 action mirred egress redirect dev {1};" \
                             "tc qdisc del dev {1} root >/dev/null 2>&1;" \
                             "tc qdisc add dev {1} root handle 1: htb;" \
                             "tc class add dev {1} parent 1: classid 1:1 htb rate {2} burst 100m" \
                             .format(target_interface, QOS_IFB, cmd.inboundBandwidth)
            return shell.run(config_qos_cmd)

        for host in cmd.sourceHosts:
            host_ip = linux.get_host_by_name(host)
            interface = linux.find_route_interface_by_destination_ip(host_ip)
            if interface:
                interfaces_to_setup_rule[host_ip] = interface

        for interface in set(interfaces_to_setup_rule.values()):
            if set_up_qos_rules(interface) != 0:
                logger.debug("Failed to set up qos rules on interface %s" % interface)

        for host_ip, interface in interfaces_to_setup_rule.items():
            cmdstr = "tc filter replace dev %s protocol ip parent 1: prio 1 u32 match ip src %s/32 flowid 1:1" \
                     % (QOS_IFB, host_ip)
            if shell.run(cmdstr) != 0:
                logger.debug("Failed to set up tc filter on interface %s for ip %s"
                             % (interface, host_ip))

        return jsonobject.dumps(rsp)

    @kvmagent.replyerror
    def delete_qos(self, req):
        cmd = jsonobject.loads(req[http.REQUEST_BODY])
        rsp = AgentRsp()

        if not cmd.sourceHosts:
            return jsonobject.dumps(rsp)

        def delete_qos_rules(target_interface):
            if target_interface:
                # delete ifb interface tc rules
                cmdstr = "tc qdisc del dev %s root >/dev/null 2>&1" % QOS_IFB
                shell.run(cmdstr)
                # delete target interface tc rules
                cmdstr = "tc qdisc del dev %s ingress >/dev/null 2>&1" % target_interface
                shell.run(cmdstr)

        for host in cmd.sourceHosts:
            host_ip = linux.get_host_by_name(host)
            interface = linux.find_route_interface_by_destination_ip(host_ip)

            if interface:
                delete_qos_rules(interface)

        return jsonobject.dumps(rsp)


Brian Burke, President and General Manager of the Toronto Maple Leafs, announced Friday that the hockey club has signed 2012 first-round draft choice Morgan Rielly to a three-year entry level contract. Rielly, 18, was selected fifth overall at the NHL Entry Draft by the Maple Leafs on June 22.
The 6-1, 200-pound defenceman appeared in 18 games with the Moose Jaw Warriors of the Western Hockey League last season, registering 18 points (three goals, 15 assists) and two penalty minutes. Rielly missed the majority of the 2011-12 season due to a knee injury. In 83 career games over two seasons with Moose Jaw, he has collected nine goals, 37 assists, 46 points and 23 penalty minutes.
Rielly, a native of Vancouver, British Columbia, will represent Canada at the 2012 Canada-Russia Challenge in Yaroslavl, Russia and Halifax, Nova Scotia from August 8-14. He has played for Canada twice previously, recording four points (one goal, three assists) in five games and winning a gold medal at the 2011 Under-18 Ivan Hlinka Memorial Tournament in the Czech Republic/Slovakia, and posting two goals and an assist in seven games at the 2011 IIHF World Under-18 Championship in Germany.


Cozy Cabot Cove, Maine, has a country luncheonette, but not much high culture. Mystery author Jessica Fletcher is the only writer in residence, but the renovation of the local Worrell mansion into an art colony may bring scores of artistic people to town. No one, however, expected a creative killer.
The posh retreat offers struggling aritsts a European spa, psychiatry, and even hypnotism. But soon the retreat begins to look like a health hazzard. A suicide attempt and a brutal murder quickly arouse the sheriff`s attention—and Jessica`s. And when an old friend mysteriously disappears, Jessica fears a twisted genius is at work writing a scenario for murder—putting Jessica`s own life on the line. ..


text:
Hate globalization? Try localism, not nationalism
By The Conversation February 1, 2019
shutterstock. italianestro/Shutterstock
Kevin Albertson, Manchester Metropolitan University
It hardly needs saying, but there are changes afoot in the political economy of the world. Where there is globalisation, there are globalisation protestors. This is nothing new, but it is becoming mainstream.
The antithesis of globalization, nationalism, and the pursuit of your own country's interests over those of everyone else, has bubbled back up in Europe. And it's not just Europe, of course. In the US, president Donald Trump is (among other initiatives) rethinking the American commitment to free trade.
In the rest of the world, the experience of globalization shows it creates some winners and some losers. This varies geographically and in different economic fields, and is shown in different aspects of our lives.
And so, someone in London might find their house is worth more. As foreign capital flows in to buy up large swaths of the capital it increases their wealth, while others might be priced out of the market. In some sectors of the market, wages might be declining as a result of global competition, migration, casualisation or automation. In the final analysis, however, it is not a matter of whether globalization causes these changes, it is rather more that people feel that it does.
Wealth curve. Tana888/Shutterstock
Walls and Wails
Globalization is not, however, merely a matter of trade, migration, and foreign outsourcing. To many, it seems Britain itself is for sale as an increasing proportion of UK businesses and assets answer to foreign owners.
Economic theory suggests, therefore, the nation will increasingly be run for the benefit of foreign capital, rather than the citizens. On top of this, there is the danger that inflows of foreign capital will cause the exchange rate to appreciate, making it more difficult to export, reducing manufacturing output and reducing employment in those sectors affected.
To protect them from forces beyond their control, citizens across the world are increasingly looking to the nation-state for protection, hence the rise of what is often called nationalism. As Abraham Lincoln noted:
The legitimate object of government is to do for a community of people whatever they need to have done, but can not do at all, or can not so well do, for themselves – in their separate, and individual capacities.
It is clear, no individual or community can stand against the forces of global capital, and Western governments appear averse to giving the workforce the means to protect itself, through, for example, increasing employment rights and unionization. However, in their search for a strong government to protect them, citizens are in danger of giving the state too much power over their lives.
It is by no means assured that the policies which suit a strong domestic government will be better than those which suit foreign owned multi-national corporations. Also, history indicates the fear of global capital may be coopted by unscrupulous politicians into a fear of other nations or fear of other peoples.
Think Locally
Rather than nationalism, therefore, we might turn to localism. In the UK context, this might be devolution with real (financial) localised power, and that power realised through local government and local business.
An economy of big businesses (operated for the benefit of global owners) is less than ideal for the individual and society. In contrast, a society of many small local businesses is more resilient, more empowering and more in keeping with the spirit of capitalism and of the market. We must also bear in mind that increasing business concentration (fewer, but larger firms) is a driver of increasing inequality. If a business is too big to (be allowed to) fail, then the government has failed in its duty to keep business small.
Small enough? Ekaterina_Minaeva
Economic theory indicates that those with no stake in a community other than profit extraction avoid suffering from localised ill effects such as unemployment, poverty, want and homelessness. It follows those who live and work in a community have a greater stake in its prosperity.
The government might likewise consider how we might prevent those who do not even live in the country from driving up house prices.
Local protection from exploitation by global interests requires the right mix of global and local policies. And local government policies require adequate financing. By local financial power, I don't mean local taxes. That has the potential to fragment the nation, as it has, to some extent, in the EU (whether perceived rightly or wrongly).
If we fund education or social care out of local taxes, for example, there will tend to be a race to the bottom as local authorities will be motivated to underperform to encourage vulnerable families to go and live elsewhere. It follows taxes should be collected nationally, and shared proportionally (on the basis of demographic profile) to the devolved authorities.
There is no space here to discuss in detail other possible localism policies here, but there are many ways to promote local ownership and local empowerment. That could include local currencies, boosts to council housing, local authority ownership of utilities or support for locally-owned high street shops. However, it is not a policy mix I suggest, rather it is an emphasis.
Ultimately, the only viable alternative to the choice currently on offer, the choice of Big State or Big Business, is Small State and Small Business, or more appropriately Local Government and Local Business. To pursue localism will require a systemic shift in how the national government goes about shaping society, but I suggest it is possible to promote social justice in a capitalist context in no other way.
Kevin Albertson, Professor of Economics, Manchester Metropolitan University


text:
Q: How do I use the same object across two classes? I have a total of three classes...
1. Source.cpp (Where the main function is.)
2. Variables.h (Where I declared all my variables in, Variables.cpp is pretty much irrelevant)
3. Functions.cpp & .h (Where I make the functions to run in the main function in Source.cpp)
In main i have this
#include <iostream>
#include <cstdlib>
#include "Variables.h"
#include "Functions.h"
#include <ctime>
using namespace std;

    Variables vari;
    Functions func;

int main(){
cout << "\n\n>>> ";
        cin >> vari.answer;
        func.choiceChecker();
}

In Functions.cpp I have this
    Variables vari;
void Functions::choiceChecker(){

        if (vari.answer == 1){
            scenario1();
        }
        else{
            cout << "Failed";
        }
    }

I always get the output failed, instead of running the scenario1 function. I also get two errors.
1.Error 1   error LNK2005: "class Variables vari" (?vari@@3VVariables@@A) already defined in Source.obj C:\Users...\Desktop\Projects\ConsoleApplication1\ConsoleApplication1\Functions.obj ConsoleApplication1
2.Error 2   error LNK1169: one or more multiply defined symbols found   C:\Users...\Desktop\Projects\ConsoleApplication1\Debug\ConsoleApplication1.exe ConsoleApplication1
I've tried using a new object in Functions.cpp, i get no errors but it doesn't get the same value from
   cin >> vari.answer;

A: To use one global variable, you have to declare it once, then define it once (WhozCraig linked this question with its explanation).
The following should work in your situation:

*

*Add extern Variables vari; in Variables.h (below the declaration of the Variables class or struct).

*At the bottom of Variables.cpp add Variables vari;

*In Functions.h you add #include Variables.h

*In Source.cpp you remove #include Variables.h (because Functions.h already includes this)

Now you should be able to use vari in both Functions.cpp and Source.cpp.