476 N.W.2d 523 (1991)
SCHOOL SISTERS OF NOTRE DAME AT MANKATO, MINNESOTA, INC., Appellant,
v.
STATE FARM MUTUAL AUTOMOBILE INSURANCE COMPANY, Respondent.
No. C5-91-829.
Court of Appeals of Minnesota.
October 29, 1991.
Thomas B. Wieser, John C. Gunderson, Meier, Kennedy & Quinn, Chartered, St. Paul, for appellant.
Michael J. Ford, John A. Nelson, Quinlivan, Sherwood, Spellacy & Tarvestad, P.A., St. Cloud, for respondent.
Considered and decided by RANDALL, P.J., and SCHUMACHER and KALITOWSKI, JJ.

*524 OPINION
SCHUMACHER, Judge.
Appellant School Sisters sought survivors economic loss benefits from respondent State Farm following the death of Sister Delores Wagner, who was struck and killed by an automobile. Both parties moved for summary judgment. The trial court granted State Farm's motion for summary judgment, holding that a non-human could not be considered a "dependent" for purposes of survivors economic loss benefits. School Sisters appeals. We affirm.

FACTS
The parties stipulated to the relevant facts. Appellant School Sisters of Notre Dame at Mankato, Minnesota, Inc. (School Sisters) is a Minnesota non-profit corporation. In 1989, School Sisters was comprised of approximately 585 religious women of the Catholic faith. The members of School Sisters take a vow of, among other things, poverty. Pursuant to their vow of poverty, each member vows "to be dependent upon the community in the use and disposition of material goods." The members express their vow of poverty by "holding all things in common, living simply, sharing materially and spiritually, receiving gratefully and reverencing created things."
One of the members of School Sisters, Sister Delores Wagner, was employed as principal at St. Francis School in Benson, Minnesota. For Sister Wagner's services, School Sisters received $950 per month plus benefits of $278.41 per month. On September 28, 1989, while a pedestrian, Sister Wagner was fatally injured when she was struck by a motor vehicle insured by respondent State Farm. State Farm paid medical, hospital and funeral expenses on behalf of School Sisters in the approximate sum of $1,500.
School Sisters sought survivors economic loss benefits from State Farm. State Farm denied that any survivors economic loss benefits were payable, and School Sisters commenced the present action. Both parties moved for summary judgment.
The trial court granted State Farm's motion for summary judgment. The trial court determined that although School Sisters depended on the income of its members, a non-human, such as a non-profit corporation, could not be considered a "dependent" for purposes of survivors economic loss benefits. School Sisters appeals.

ISSUE
Did the trial court err in determining School Sisters is not entitled to survivors economic loss benefits?

ANALYSIS

1. STANDARD OF REVIEW
Summary judgment is appropriate when there is no genuine issue as to any material fact and a party is entitled to a judgment as a matter of law. Minn.R.Civ.P. 56.03. On appeal from a summary judgment, this court must determine whether there are any genuine issues of material fact and whether the trial court correctly applied the law. Offerdahl v. Univ. of Minn. Hosps. & Clinics, 426 N.W.2d 425, 427 (Minn.1988). The trial court's grant of summary judgment in the present case was based on its application of the No-Fault Act to undisputed facts. Statutory construction is a question of law which this court reviews de novo. A.J. Chromy Constr. Co. v. Commercial Mechanical Servs., Inc., 260 N.W.2d 579, 582 (Minn. 1977).

2. SURVIVORS ECONOMIC LOSS BENEFITS
As an initial matter, State Farm contends School Sisters lacks standing to bring this action because it has not appealed the trial court's determination that it is not a person or an insured under the State Farm policy. We disagree. The question before the court is whether a non-human entity, School Sisters, can be a dependent. School Sisters does not claim to be an insured; School Sisters claims to be a dependent of an insured.
*525 Survivors economic loss benefits are among the mandatory basic economic benefits which must be included in every automobile insurance policy issued in Minnesota. See Minn.Stat. §§ 65B.42(1), 65B.44, subd. 6 (1990). These benefits are intended to
cover loss accruing after decedent's death of contributions of money or tangible things of economic value, not including services, that surviving dependents would have received from the decedent for their support during their dependency had the decedent not suffered the injury causing death.
Minn.Stat. § 65B.44, subd. 6. Under the statute, certain people are presumed to be dependents of a deceased person:
(a) a wife is dependent on a husband with whom she lives at the time of his death; (b) a husband is dependent on a wife with whom he lives at the time of her death; (c) any child while under the age of 18 years, or while over that age but physically or mentally incapacitated from earning, is dependent on the parent with whom the child is living or from whom the child is receiving support regularly at the time of the death of such parent. Questions of the existence and the extent of dependency shall be questions of fact, considering the support regularly received from the deceased.

Id. (emphasis added).
The statute lists three categories of persons who are presumed to be dependents. The enumerated presumed dependents do not include corporations. In addition to persons presumed to be dependents, the statute indicates an intent to create a category of persons whose dependent status is a question of fact. Peevy v. Mutual Servs. Casualty Ins. Co., 346 N.W.2d 120, 122 (Minn.1984). Where general language in a statute follows an enumeration of specific subjects, the general language is presumed to include only subjects of a class similar to those enumerated. This canon of statutory construction is known as ejusdem generis. See Core v. City of Traverse City, 89 Mich.App. 492, 500, 280 N.W.2d 569, 573 (1979). Applying this doctrine to the present case, we believe the trial court was correct in concluding that a non-human cannot be a dependent for purposes of section 65B.44, subd. 6.[1]
In addition, under the statute, payment of survivors economic loss benefits must cease when the recipient ceases to be dependent. Minn.Stat. § 65B.44, subd. 6. A nonprofit religious corporation, however, may have perpetual duration. Minn.Stat. § 300.13, subd. 3 (1990). This perpetual duration is inconsistent with the termination of benefits contemplated by section 65B.44, subd. 6.

DECISION
The doctrine of ejusdem generis and the fact of perpetual corporate existence preclude recovery by a corporation of survivors economic loss benefits.
Affirmed.
RANDALL, Judge, dissenting.
I respectfully dissent.
NOTES
[1]  We do not decide whether any individual members of School Sisters might have a claim for such benefits. We are only concerned in this case with the corporate entity.


“You want us to wash our hands?” asked Fadi Mesaher, the Idlib director for the Maram Foundation for Relief and Development. “Some people can’t wash their kids for a week. They are living outdoors.”

Syrian doctors believe the virus has already swept into the camps, with deaths and illness that bear the hallmarks of the outbreak. But the international response has been slow to nonexistent, according to more than a dozen experts and Syrian medical professionals.

The World Health Organization has not yet delivered coronavirus testing kits to the opposition-held northwest, despite making its first delivery of such kits to the Syrian government more than a month ago.

Doctors said the delay has probably allowed the virus to spread undetected for weeks in a uniquely dangerous environment.

“We currently have cases that are similar, and we’ve had people die,” said Dr. Mohamed Ghaleb Tennari, who manages the Syrian American Medical Society’s hospitals in the region. “But unfortunately because we don’t have the test, we can’t confirm that these cases are truly corona or not.”


VANCOUVER -- When you think of retail giant Walmart, you may think of great bargains, or the death of small businesses, or convenience. What you probably don't think about is the software behind the supply chain that enables Walmart to offer its "everyday low prices." That would be OpenStack.

In a keynote and panel discussion at OpenStack Summit, Amandeep Singh Juneja, Walmart Lab's Senior Director for Cloud Operations and Engineering, explained that "Walmart's decision to invest in cloud infrastructure might not be something you'd expect from a brick and mortar retailer with over $480-billion in annual revenue," but it was a necessity.

Why? Because to keep a supply chain running that can profitably deliver goods at very low prices, Walmart needs software that can track 245-million customers a week in 11,000 stores in 27 countries. On top of that Walmart is moving to eCommerce 3.0 with 11 e-commerce websites that had to handle 1.5 billion page views over 2014's Black Friday weekend.

To do this, Juneja said "Walmart has always relied on cutting-edge technology, from satellites in the 80s to OpenStack today, to fuel our growth: At the same time Walmart Global eCommerce is growing at a rate of more than 30 percent per year."

On top of that, Walmart's "customers want to use our eCommerce platform from many different access points, not only from their home computers but also from mobile phones, tablets, and kiosks within Walmart retail stores and they're always expecting a seamless experience."

To meet this demand "Walmart needed a technology stack that would scale to meet the explosive demand, flexible enough to build applications that adapt to ever-changing user preferences, and with enough big data smarts to predict what customers want and provide them with recommendations."

After long consideration, Walmart bet in August 2014 that OpenStack was that technology. It moved its entire ecommerce stack to OpenStack running on Canonical's Ubuntu Linux.

Walmart chose OpenStack as its cloud platform, not only because it's best of the breed, but also because open-source software comes with several big advantages. The biggest of these is that with OpenStack, Walmart avoided long-term lock-ins with any single proprietary vendor.

In the nine months since Walmart started using OpenStack the company has built an OpenStack Compute layer with more than 150K cores and counting. Next, Walmart will add more block storage and venture into software-defined networks using OpenStack projects such as Neutron and Cinder. The company is also currently building a multi-petabyte object storage using Swift. By the 2015 holiday season Walmart will have also moved its OpenStack cloud to 2014's Juno release.

So, the next time someone tells you that OpenStack isn't mature enough to be used in a business product environment, just remind them that the world's largest retailer has bet the house that OpenStack is ready for prime-time.

Related Stories:


Back to Santiago

April 17, 2019

I decided to write this series of posts out of the order in which I experienced the places, so this entry takes us back to Santiago after a week in Easter Island.

My boutique hotel, the Casa Bellavista, could not have been more different from the dreary B&B I stayed in the weekend before. It was strategically located in the midst of the Bellavista barrio, a hip and artsy neighborhood with plenty of restaurants, wine bars, cafés and shops. Patio Bellavista, a covered city block, is chock full of shops and restaurants and is great for nightlife.

The distinguishing feature of the barrio is the abundance of murals painted on storefronts and walls. I guess you could call it graffiti, but it’s so much more, obviously the work of very talented artists.

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

Wandering the streets of Bellavista is a treat for the eyes!

My friend Laura, who was on the Easter Island trip and also the expedition to Bali in January, had secured a driver for a day, so Arturo took us to the Underraga Winery in the Maipo Valley, just a short hop south of Santiago. The winery was established in 1885, and we were able to taste sauvignon blanc, carmenere, and a 100% cabernet sauvignon, finishing with a dessert blend of sauvignon blanc and semillon. All yummy! It’s going into fall here, and the grapes have all been harvested, so we got a peek at the process of selecting and destemming.

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

We wandered through the rustic village of nearby Pomaire, home to many potters — all of whom seemed to make the same thing: ollas in every size imaginable, bean pots, round, square and rectangular baking pans, outdoor flower pots, pitchers and cups. While the town is normally crowded with tourists on weekends, the crafters take Mondays off, so many shops were closed and the town had a sleepy air, with dogs taking their siestas in the street.

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

A restaurant tried to lure us in with a 10 kilo empanada! I got indigestion just looking at it!

We wound our way down the coast through the exceptionally lovely community of Santo Domingo Beach, landing at Isla Negra, made famous by Pablo Neruda, who built his favorite house here overlooking the wild, windswept beach. Huge rock formations add interest to the landscape, and one even has a bust of the poet carved on top. The rip tides and huge waves make the area too dangerous to swim, but one can imagine how this untamed place inspired him. This is where he died and is buried. Once again, it being Monday, the house was closed to visitors; on the other hand, there were no hordes of tourists to contend with.

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

My final days in Santiago took me by metro to Pueblo los Dominicos, a rustic village at the western edge of the city, with a warren of streets lined with shops selling high-quality handicrafts: hand-knitted shawls and sweaters, jewelry, pottery, paintings — you name it.

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

That bird you see above is a chicken I named Phyllis Diller, which was pecking around in a cage with a number of other birds (which is why she’s sort of blurry). I saw an amazing variety of colorful chickens during this trip.

One morning I took the funicular up Cerro San Cristóbal, the highest point in Santiago, with its expansive views of the sprawling city, and St. Christopher looking down from the peak. Especially up here you see the smog that bathes the skyline every day (except after heavy rains) and obscures any glimpse of the Andes. Santiago lies in a basin, with the Andes to the east and a coastal mountain range to the west, trapping all the nasty brown air.

These two shots show an unprocessed image right out of the camera (left), and one with dehaze applied during processing (right) . Goes to show you how much more the camera can see than I can with my naked eye — and how thick the smog is.

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

I left Santiago and Chile with more to see and more restaurants to try; more day trips, to Valparaiso and back to Isla Negra when Neruda’s house is open; more wineries to visit; and excursions further afield to Torres del Paine National Park in Patagonia and the Atacama Desert. For a long thin country — nearly 2700 miles long but, on average, only 110 miles wide — it has remarkable geographic diversity and stunning beauty. I loved it, and want to go back!

Amazing murals! Love Phyllis Diller the chicken! My free day was on a Monday and everything I wanted to do was closed- even the zoo and the funicular! I’m so happy you got to a winery and the coast in Chile! I should have scheduled a few more days to see more. I, like you, would like to go back to explore Atacama and Patagonia. Welcome home!


Less Coal, But More What?

It’s not hot yet across the entire U.S., but it soon will be. Power plant rules haven’t changed yet, but they will.

With the unofficial start of summer just around the corner, utilities and independent system operators are looking for ways to relieve peak loads and congestion on the electricity grid for the coming season and down the road.

Although every region of the country claims it has adequate generation for even the hottest days of summer, each ISO is also looking forward as U.S. Environmental Protection Agency rules will take affect in coming years.

Grid operators are planning now for how to replace coal with natural gas, along with a side of demand response and a dash of renewables. Many of the changes won’t come for years, but the planning is happening now and changes to pricing and rules, will happen ahead of the EPA rules.

“From a PJM perspective, the lights aren’t going to go out,” Paul Sotkiewicz, chief economist at PJM Interconnection, said during a Restructuring Today webinar on Wednesday.

There are two EPA rules that are putting pressure on older coal generation, the cross-state air pollution rule, which is currently on stay until further ruling, and the MATS rule, which regulates mercury and other heavy metals and is scheduled to go into effect in April 2015.

PJM Invests in Transmission

In PJM’s territory, the problem is not a lack of capacity. Sotkiewicz said that there’s quite a bit of natural gas that isn’t being used to its full capacity. PJM expects that nearly 14,000 megawatts of coal-fired generation will retire by 2016. Most of the plants are over 40 years old or 400 megawatts or less, which makes up about 30 percent of PJM’s current coal fleet.

In anticipation of the changes, the capacity auctions for the 2015 to 2016 year in PJM territory procured a record amount of new generation for one year, nearly 5,000 megawatts. Almost all of the new generation is gas-fired. For the first time ever, new combined-cycle gas plants are the same price as a northern Appalachian coal plant, according to Joseph Bowring, independent market monitor for PJM and president of Monitoring Analytics.

Overall, PJM has 164,561 megawatts of capacity resources. Along with new gas resources, the capacity auction procured nearly 15,000 megawatts of demand response and energy efficiency. Energy efficiency, solar and wind saw double-digit growth since the year before, although the renewables are still just a drop in the bucket in terms of generation. Solar, for example, increased to 56 megawatts, a 22 percent increase from the year before.

To combat retiring coal generation, PJM recently announced $2 billion in transmission upgrades. There will be more than 130 projects that range from substation upgrades to rebuilding transmission lines. More than half the projects will be in Ohio, where there is a lot of coal retiring. However, the upgrades could also be a boon to renewables like wind, which has various transmission constraints.

MISO Seeks More Wind, Demand Response

The Midwest Independent System Operator is facing essentially the same problem as PJM, although it is even more pronounced, since more than 70 percent of its fleet is coal-fired. MISO also has transmission constraints that are being revisited, but there have been no announcements about upgrades similar to what PJM is doing.

The constraints will mean a change to demand response rules, said Jameson Smith, manager of regulatory studies at MISO. “Demand response qualification requirements and deployment procedures will be reviewed and given a potential increase in use.”

For MISO, there’s more wind that’s currently slated to be built than gas, but that could also change in coming years, said Smith. Any new gas could need new pipeline infrastructure, which can take at least five years to develop. At this time, “there’s limited ability to increase existing gas-fired unit capacity,” said Smith. But wind needs transmission too, which means that no matter what comes on-line to replace coal in the next five years, there will have to be substantial investment.

ERCOT Pushes Up Prices

In Texas, ERCOT is already planning to spur new generation by raising the system-wide offer cap. Last summer, prices hit $2,500 per megawatt-hour as ERCOT’s grid was strained by high temperatures. If a ruling now being considered is approved, that could jump to at least $4,000 as early as this August, and perhaps rise considerably more in coming years. “There’s a consensus that the system-wide offer cap will have to go significantly higher,” Ken Anderson, commissioner of the public utility commission of Texas, said during a Restructuring Today webinar. “We need to at least double it -- and maybe triple it.”

A bump to the SWOC will also come with a change to a variety of other rules, including a potential increase of 200 megawatts to come from energy efficiency programs and a decision that could allow waste gas and energy storage to play in ERCOT’s markets. The cost of a negawatt is still considerably cheaper than building new generation.

Anderson said that he believed that the commission was removing most of the barriers to energy storage coming into the wholesale market, and now it was just a matter of economics. The next few years will also be rosier for negawatts. “Eventually, I’d like to get demand response out of energy efficiency completely and into the competitive space,” he said during the webinar. “We need to give some certainty to where the market will be in 2014, 2015 and beyond.”


In view of the current status of file management, the traditional management methods can no longer meet the actual needs. Informatization of archive management urgently requires a more advanced and complete solution for automated management systems. In this context, an archive management system based on radio frequency identification (RFID) technology emerged.

By RFID technology, the classified files are continuously monitored, their status and whereabouts are known at any time, and they can be managed and controlled accordingly, effectively avoiding loopholes in traditional management tools.

The working principle is: an RFID electronic tag is affixed to each file box or secret product that needs to be controlled, and the information stored in the tag and the name, category, and secret level of the file or secret product are passed through the software of the information management system. Information such as belonging archives is bound and the archives are put into the filing cabinet.

1. Double Encryption: The opening of the cabinet door adopts the fingerprint authentication and the digital password dual authentication method to control the access. Only when the fingerprint and the password are verified correctly, can the cabinet door be opened.

2. Smart Inventory: Click the “Inventory” button on the touch screen interface. After waiting for dozens of seconds, all file names in the cabinet will be displayed on the screen and the total number of files will be counted.

3. Smart alarm: When you want to open the file cabinet, if the fingerprint is incorrect or the fingerprint password does not match, the file cabinet itself will sound an alarm and prompt and retain the record on the control platform.

When the door opening time exceeds the specified time, the cabinet itself will sound an alarm. The control platform will also have an alarm and store it in the form of a log.

After the file or confidential product was borrowed, it was not returned on time and there will be an alarm and records will be kept.

4. Status display: After starting the intelligent file management and control system software, all the file cabinets in the management will be displayed on the interface. In the log below, the working status of each file cabinet will be displayed. All the configuration information in the management file cabinet can be passed. The "Parameter Configuration" function is modified.

6. Business setting: The application setting function consists of three parts, namely, setting the closing prompt alarm time, setting the morning and evening inventory time, emergency unlocking and active inventory. "Close prompt delay" means the upper limit of time for closing the door; "morning inventory time" and "afternoon inventory time" refer to the time for setting automatic checking in the morning and afternoon.

7. Log Management: Through the "Log Management" button on the main interface of the intelligent file management and control system software, you can easily query the system operation log, such as screening according to time, operation type and other information, and screening against file data or confidential products.

Xminnov's one stop service of RFID security solution include RFID research and development, RFID production, personalized services, RFID hardware and software development etc.


Mirror yesterday and revealed some bad news for Newcastle United, but some good news for QPR, as he admitted that the Magpies don’t have an option to buy Loic Remy at the end of his season-long loan.

Loic Remy’s Newcastle career hasn’t exactly started well, as the Frenchman is yet to wear the famous black and white shirt in a Premier League encounter.

The 26-year-old has been ruled out of Newcastle’s opening fixtures against Manchester City and West Ham with a niggling calf injury, and he still has to face a trial on suspicion of gang rape next month.

So he may never even play for Newcastle and now Director of Football Joe Kinnear has revealed that, contrary to prior reports, there is no option to buy as part of the deal.

Kinnear firstly said: “I sanctioned the one-year loan deal for Loic Remy, and if it goes pear-shaped I will take responsibility for it,” so it seems like Joe has been acting alone.

He continued: “But if he scores goals and does well for us, Alan will be happy with our end of the deal; the player will be happy because he will come into contention for a World Cup place with France,” which is all fine.

However, Kinnear concluded: “If both those things happen, Remy will go back to QPR as a World Cup player with a higher value than when he joined them, so everyone will come out of it well.”

Thus Kinnear is inferring that Remy will go back to QPR whatever happens during his time at Newcastle, which just seems ludicrous.

It would be amateurish not to have an agreed fee in place for the end of the deal, but then that’s a word that describes Newcastle’s activities pretty much perfectly right now.


Tom Brady talks up Falcons quarterback Matt Ryan’s MVP candidacy

After New England Patriots quarterback Tom Brady fell short of an All-Pro selection, it appears the 39-year-old passer will not be winning NFL MVP this season.

After missing the first four games of the season due to suspension, Brady blitzed the league. The 17-year quarterback completed 67.4 percent of his passes for 3,554 yards and set the NFL record for touchdown to interception ratio tossing 28 scores to just 2 picks.

Even still, Falcons quarterback Matt Ryan earned 29 votes for the All-Pro quarterback position compared to just 14 for Brady.

And in his weekly interview on WEEI’s “Kirk and Callahan” program, Brady mentioned Ryan’s name unprompted when asked if it would mean something to him if he didn’t win MVP.

“I’ve been fortunate to win it (2007, 2010), so it’s a very cool thing because you think about how far you’ve come as a player. Everyone starts and kind of has their own football experience,” Brady said.

“To realize, ‘Man, I won that award — they only choose one guy and they chose me’ is very cool. But I think Matt has had an incredible year. I think he is as deserving as anybody. He’s got that team playing well.”


Angry Tour de France riders want to put doping talks to rest

Porto Vecchio: Tour de France riders protested angrily on the eve of this year's race on Friday against the burden of suspicion they have been forced to carry because of a previous generation's doping.

"It is degrading to be dragged through the mud and be run down by some who look to make money on our backs," the riders said in a statement on Friday after Le Monde newspaper printed a headline quoting Lance Armstrong saying it was impossible to win the Tour de France without doping.

"Enough is enough!" a riders' statement said after Armstrong's statement that the Tour can't be won without doping.

American Armstrong, who was stripped of his seven Tour titles for doping and later admitted taking performance-enhancing drugs, had been speaking about the 1999-2005 era during which he crushed the opposition.

Earlier in the week, sports daily L'Equipe said a urine sample from Frenchman Laurent Jalabert in 1998 showed traces of the banned blood-booster EPO when it was re-tested in 2004.

"Enough is enough!!!!!!" the riders' statement further read. "Today the limits of the bearable have been reached!!!! We have for many years shown our will to work for a flawless fight against doping.

"If there was a culture of doping in the 1990s, in the past 15 years our sport has been fighting alone against the plague of doping. We are professional bike riders and we are proud of that. But do not treat us like sub-citizens as you have been doing for too long," the riders' statement continued.

In 2011, blood tests accounted for 35 percent of tests in cycling while 17.6 percent in athletics and less than 6 percent in tennis. Cycling pioneered biological passports in 2008, a programme that according to the World Anti-Doping Agency (WADA) "indirectly reveals the effects of doping".

'RACING IS CLEANER'

Garmin-Sharp manager Jonathan Vaughters told Reuters he thought cycling was cleaning up its act. "The science points to a trend that racing is cleaner, that it is possible to win the Tour de France clean," he said.

"When you look at the climbing speed and look at the numbers. The science firmly points to the fact that doping is on the decline. Racing is slower even though the equipment and the training are better. To me, there is only one explanation for that - doping has decreased a lot," Vaughters added.

Tour de France director Christian Prudhomme backed the riders' complaints, saying that almost every year a doping-related story breaks days before the Tour. I can appreciate that some agendas have nothing to do with cycling but 14 times in the last 15 years, it cannot be a coincidence," he told Reuters.

"For some, the Tour is a unique opportunity to communicate their message."

Referring to the report about Jalabert, Prudhomme added: "Why give on June 24, 2013, the name of a rider whom it is said doped after a control that occurred on July 22, 1998?"

Garmin-Sharp rider David Millar, a former doper turned anti-doping campaigner, thought it was essential cycling learned from previous mistakes. "What needs to change is that we need complete truth and transparency into what happened in the 15-year era of the 1990s and early 2000s," said the former Armstrong team-mate, who served a two-year ban after admitting taking EPO. "So we can understand what mistakes were made and we can make sure those mistakes do not happen again. "Because I think racing has cleaned up a lot; I think the Tour de France can be won clean."

For all the effort it has been making to clean up, cycling cannot let its guard down, according to Vaughters. "What I hope is that we gather information from the past to find a way to correct those mistakes the next time around."


/*
 *	$Id: w_display.c,v 1.25 2008-07-27 03:18:38 haley Exp $
 */
/************************************************************************
*                                                                       *
*                Copyright (C)  2000                                    *
*        University Corporation for Atmospheric Research                *
*                All Rights Reserved                                    *
*                                                                       *
*    The use of this Software is governed by a License Agreement.       *
*                                                                       *
************************************************************************/

/*
 *	w_display.c
 *
 *	Author		John Clyne
 *
 *	Date		Mon Sep 17 14:02:33 MDT 1990
 *
 *	This file contains widget code necessary to dynamically create the
 *	'display' panels for idt. A maximum of MAX_DISPLAYS may be
 *	created simultaneously.
 */

#include <stdio.h>
#include <stdlib.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Shell.h>

#include <X11/Xaw/Dialog.h>
#include <X11/Xaw/Paned.h>
#include <X11/Xaw/AsciiText.h>
#include <X11/Xaw/Command.h>
#include <X11/Xaw/Toggle.h>
#include <X11/Xaw/Form.h>
#include <X11/Xaw/Scrollbar.h>

#include <X11/Xaw/MenuButton.h>
#include <X11/Xaw/SimpleMenu.h>
#include <X11/Xaw/Sme.h>
#include <X11/Xaw/SmeBSB.h>

#include <ncarg/c.h>
#include "idt.h"
#include "w_dialog.h"
#include "display.h"
#include "talkto.h"
#include "bits.h"
#include "commands.h"
#include "scroll.h"
#include "xrubber.h"

extern	void	Animate(
#ifdef	NeedFuncProto
	Widget		widget,
	XtPointer	client_data,
	XtPointer	call_data
#endif
);

/*
 *	simple_command
 *	[internal]
 *
 * on entry
 *	id		: connection of translator
 *	command		: command this box represents
 */
static	void	simple_command(wd, format, command)
	WidgetData	*wd;
	char		*format;
	DisplayCommands	command;

{
	Command(wd->id, format, NULL);
}

static	void	update_frame_by_num(data, num)
	Voidptr		*data;
	int		num;
{
	WidgetData	*wd = (WidgetData *) data;
	char		frame_string[10];

	sprintf(frame_string, "%d", num);
	UpdateFrameLabel(wd, frame_string);
}

static	void	update_frame_by_num_cb(data, num)
	Voidptr		*data;
	int		num;
{
	update_frame_by_num(data, num + 1);
}

/*
 *	The Callbacks
 */
/*ARGSUSED*/
static  void    Playback(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id	*/
			call_data;	/* not used	*/
{
	WidgetData	*wd = (WidgetData *) client_data;

	wd->do_play = True;

	if (wd->do_animate) {
		Arg		args[2];
		XtSetArg(args[0], XtNsensitive, False);
		XtSetValues(wd->animate, args, 1);
		XtSetValues(wd->done, args, 1);
#ifdef	DEAD
		AnimateDispContReverse(wd->a, (int (*)()) NULL, (Voidptr) NULL);
#endif
		AnimateDispContReverse(
			wd->a, update_frame_by_num_cb, (Voidptr) wd
		);
		XtSetArg(args[0], XtNsensitive, True);
		XtSetValues(wd->done, args, 1);
		XtSetArg(args[1], XtNstate, True);
		XtSetValues(wd->animate, args, 2);
	}
	else {
		simple_command(wd, PLAYBACK_STRING, PLAYBACK);
		UpdateFrameLabel(wd, "");
	}
}

/*ARGSUSED*/
static  void    Jogback(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id	*/
			call_data;	/* not used	*/
{
	WidgetData	*wd = (WidgetData *) client_data;

	if (wd->do_animate) {
		(void) AnimateDisplayPrev(wd->a);
		update_frame_by_num((Voidptr) wd, AnimateGetImageNum(wd->a)+1);
	}
	else {
		simple_command(wd, JOGBACK_STRING, JOGBACK);
		UpdateFrameLabel(wd, "");
	}

}

/*ARGSUSED*/
static  void    Stop(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id	*/
			call_data;	/* not used	*/
{
	WidgetData	*wd = (WidgetData *) client_data;

	if (wd->do_animate) {
#ifdef	DEAD
		wd->do_play = False;
#endif
		AnimateStop(wd->a);
	}
	else {
		if (wd->do_play) {
			SignalTo(wd->id, STOP_SIGNAL);
			wd->do_play = False;
		}
		else {
			simple_command(wd, REDRAW_STRING, REDRAW);
		}
	}

}

/*ARGSUSED*/
static  void    Jog(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id	*/
			call_data;	/* not used	*/
{
	WidgetData	*wd = (WidgetData *) client_data;

	if (wd->do_animate) {
		(void) AnimateDisplayNext(wd->a);
		update_frame_by_num((Voidptr) wd, AnimateGetImageNum(wd->a)+1);
	}
	else {
		simple_command(wd, JOG_STRING, JOG);
		UpdateFrameLabel(wd, "");
	}

}

/*ARGSUSED*/
static  void    Play(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id	*/
			call_data;	/* not used	*/
{
	WidgetData	*wd = (WidgetData *) client_data;

	wd->do_play = True;

	if (wd->do_animate) {
		Arg		args[2];
		XtSetArg(args[0], XtNsensitive, False);
		XtSetValues(wd->animate, args, 1);
		XtSetValues(wd->done, args, 1);
#ifdef	DEAD
		AnimateDispContForward(wd->a, (int (*)()) NULL, (Voidptr) NULL);
#endif
		AnimateDispContForward(
			wd->a, update_frame_by_num_cb, (Voidptr) wd
		);
		XtSetArg(args[0], XtNsensitive, True);
		XtSetValues(wd->done, args, 1);
		XtSetArg(args[1], XtNstate, True);
		XtSetValues(wd->animate, args, 2);
	}
	else {
		simple_command(wd, PLAY_STRING, PLAY);
		UpdateFrameLabel(wd, "");
	}
}

/*ARGSUSED*/
static  void    Loop(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id	*/
			call_data;	/* not used	*/
{
	WidgetData	*wd = (WidgetData *) client_data;

	if (wd->do_animate) {
		AnimateLoop(wd->a);
	}
	else {
		simple_command(wd, LOOP_STRING, LOOP);
	}
}

void	DupSelect(data, value)
	Voidptr	data;
	char	*value;
{
	WidgetData	*wd = (WidgetData *) data;

	Command(wd->id, DUP_STRING, value);
	wd->pcv.dup = atoi(value);
}
/*ARGSUSED*/
static  void    Dup(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id	*/
			call_data;	/* not used	*/
{
	WidgetData	*wd = (WidgetData *) client_data;
	char		buf[MAX_DATA_LEN];

	sprintf(buf, "%d", wd->pcv.dup);
	CreateSimpleDialogPopup(widget, "dup:", DupSelect, (Voidptr) wd, buf);

}
/*ARGSUSED*/
static  void    Scroll(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id		*/
			call_data;	/* percent scrolled	*/
{
	WidgetData	*wd = (WidgetData *) client_data;
	float		percent = *(float *) call_data;

	ScrollTo(wd, percent);

}

void	GotoSelect(data, value)
	Voidptr	data;
	char	*value;
{
	WidgetData	*wd = (WidgetData *) data;

	if (wd->do_animate) {
		int	frame = atoi(value);
		AnimateDisplayImage(wd->a, frame-1);
		update_frame_by_num((Voidptr) wd, AnimateGetImageNum(wd->a)+1);
	}
	else {
		Command(wd->id, GOTO_STRING, value);
	}
	wd->pcv.goto_ = atoi(value);
}
/*ARGSUSED*/
static  void    Goto_(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id	*/
			call_data;	/* not used	*/
{
	WidgetData	*wd = (WidgetData *) client_data;
	char		buf[MAX_DATA_LEN];

	sprintf(buf, "%d", wd->pcv.goto_);
	CreateSimpleDialogPopup(widget, "goto:", GotoSelect, (Voidptr) wd, buf);

}

void	SkipSelect(data, value)
	Voidptr	data;
	char	*value;
{
	WidgetData	*wd = (WidgetData *) data;

	Command(wd->id, SKIP_STRING, value);
	wd->pcv.skip = atoi(value);
}
/*ARGSUSED*/
static  void    Skip(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id	*/
			call_data;	/* not used	*/
{
	WidgetData	*wd = (WidgetData *) client_data;
	char		buf[MAX_DATA_LEN];

	sprintf(buf, "%d", wd->pcv.skip);
	CreateSimpleDialogPopup(widget, "skip:", SkipSelect, (Voidptr) wd, buf);

}

void	DelaySelect(data, value)
	Voidptr	data;
	char	*value;
{
	WidgetData	*wd = (WidgetData *) data;

	wd->pcv.delay = atoi(value);
	AnimateSetDelay(wd->a, wd->pcv.delay);
}

/*ARGSUSED*/
static  void    Delay(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id	*/
			call_data;	/* not used	*/
{
	WidgetData	*wd = (WidgetData *) client_data;
	char		buf[MAX_DATA_LEN];

	sprintf(buf, "%d", wd->pcv.delay);
	CreateSimpleDialogPopup(
		widget, "delay in 1/100 sec:", DelaySelect, (Voidptr) wd, buf
	);
}

void	StartSegmentSelect(data, value)
	Voidptr	data;
	char	*value;
{
	WidgetData	*wd = (WidgetData *) data;

	Command(wd->id, START_SEGMENT_STRING, value);
	wd->pcv.start_segment = atoi(value);
}
/*ARGSUSED*/
static  void    Start_Segment(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id	*/
			call_data;	/* not used	*/
{
	WidgetData	*wd = (WidgetData *) client_data;
	char		buf[MAX_DATA_LEN];

	sprintf(buf, "%d", wd->pcv.start_segment);
	CreateSimpleDialogPopup(
		widget, "start segment:", StartSegmentSelect, (Voidptr) wd, buf
	);

}

void	StopSegmentSelect(data, value)
	Voidptr	data;
	char	*value;
{
	WidgetData	*wd = (WidgetData *) data;

	Command(wd->id, STOP_SEGMENT_STRING, value);
	wd->pcv.stop_segment = atoi(value);
}
/*ARGSUSED*/
static  void    Stop_Segment(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id	*/
			call_data;	/* not used	*/
{
	WidgetData	*wd = (WidgetData *) client_data;
	char		buf[MAX_DATA_LEN];

	sprintf(buf, "%d", wd->pcv.stop_segment);
	CreateSimpleDialogPopup(
		widget, "stop segment:", StopSegmentSelect, (Voidptr) wd, buf
	);

}

void	SetWindowSelect(data, value)
	Voidptr	data;
	char	*value;
{
	WidgetData	*wd = (WidgetData *) data;

	Command(wd->id, SET_WINDOW_STRING, value);
	strncpy(wd->pcv.set_window, value, sizeof(wd->pcv.set_window));

	/*
	 * SetWindow should really update wd->ar, wd->llx, etc in the
	 * same manner as  Zoom() does. Some day...
	 */
}
/*ARGSUSED*/
static  void    Set_Window(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id	*/
			call_data;	/* not used	*/
{
	WidgetData	*wd = (WidgetData *) client_data;

	CreateSimpleDialogPopup(
		widget, "set device window coordinates:",
		SetWindowSelect, (Voidptr) wd, wd->pcv.set_window
	);

}

/*
 *
 */
/*ARGSUSED*/
static  void    Done(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id	*/
			call_data;	/* not used	*/
{

	WidgetData	*wd = (WidgetData *) client_data;

	if (wd->do_animate) {
		/*
		 * turn animation off by calling animation callback.
		 * The animation button is a toggle
		 */
		Animate(widget, (XtPointer) wd, (XtPointer) NULL);
	}

	simple_command(wd, DONE_STRING, DONE);

	CloseDisplay(wd->id);
	XtDestroyWidget(wd->popup);
}

/*
 *
 */
/*ARGSUSED*/
static  void    CurrentFrame(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id	*/
			call_data;	/* not used	*/
{
	WidgetData	*wd = (WidgetData *) client_data;
	char	*current;

	current = TalkTo(wd->id, "current\n", SYNC);

	wd->pcv.current_frame = atoi(current);
	UpdateFrameLabel(wd, current);

}

/*ARGSUSED*/
static  void    PrintSelect(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id	*/
			call_data;	/* not used	*/
{
	WidgetData	*wd = (WidgetData *) client_data;
	char	*spooler = XtName(widget);

	Command(wd->id, PRINT_STRING, spooler);
}

/*
 *
 */
void	SaveSelect(data, value)
	Voidptr	data;
	char	*value;
{
	WidgetData	*wd = (WidgetData *) data;

	Command(wd->id, SAVE_STRING, value);
	strncpy(wd->pcv.save, value, sizeof(wd->pcv.save));
}
/*ARGSUSED*/
static  void    Save(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id	*/
			call_data;	/* not used	*/
{
	WidgetData	*wd = (WidgetData *) client_data;

	CreateSimpleDialogPopup(
		widget, "Please enter file name:",
		SaveSelect, (Voidptr) wd, wd->pcv.save
	);

}

/*
 *
 */
/*ARGSUSED*/
static  void    Zoom(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id	*/
			call_data;	/* not used	*/
{
	WidgetData	*wd = (WidgetData *) client_data;
        Window  root;
	float	llx, lly, urx, ury;	/* coords of rubber band	*/
	float	new_llx, new_lly,	/* zoom coords			*/
		new_urx, new_ury;
	float	ax, bx, ay, by;
	char	buf[80];

	root = RootWindowOfScreen(XtScreen(widget));

	/*
	 * get the new mapping
	 */
	(void) TalkTo(wd->id, NOOP_STRING, SYNC);
        if (ZoomCoords(
		XtDisplay(widget), root, wd->ar, &llx,&lly,&urx,&ury) == NULL){

                (void) fprintf(stderr, "Zoom failed\n");
		return;
	}

	/*
	 * map the new mapping into the old
	 */
	bx = wd->llx;
	ax = wd->urx - bx;
	by = wd->lly;
	ay = wd->ury - by;

	new_llx = (ax * llx) + bx;
	new_lly = (ay * lly) + by;
	new_urx = (ax * urx) + bx;
	new_ury = (ay * ury) + by;

	/*
	 * remember the new coords and aspect ratio
	 */
	wd->ar = (new_urx - new_llx) / (new_ury - new_lly);
	wd->llx = new_llx;
	wd->lly = new_lly;
	wd->urx = new_urx;
	wd->ury = new_ury;

	sprintf(buf, "%6.4f %6.4f %6.4f %6.4f",new_llx,new_lly,new_urx,new_ury);

	Command(wd->id, ZOOM_STRING, buf);

	/*
	 * remember the zoom coordinates as if the SET_WINDOW command
	 * was called
	 */
	strcpy(wd->pcv.set_window, buf);
}

/*ARGSUSED*/
static  void    UnZoom(widget, client_data, call_data)
	Widget  widget;
	XtPointer       client_data,	/* display id	*/
			call_data;	/* not used	*/
{
	WidgetData	*wd = (WidgetData *) client_data;

	wd->ar = 1.0;
	wd->llx = wd->lly = 0.0;
	wd->urx = wd->ury = 1.0;
	simple_command(wd, UNZOOM_STRING, UNZOOM);
}

UpdateFrameLabel(wd, frame_string)
	WidgetData	*wd;
	char		*frame_string;
{
	Arg		args[10];
	char		buf[80];

	sprintf(buf, "%s %s", FRAME_LABEL_DISPLAY, frame_string);

	XtSetArg(args[0], XtNlabel, buf);
	XtSetValues(wd->frame_label, args, 1);
}

void	create_tip_top_panel(paned, wd)
	Widget		paned;
	WidgetData	*wd;
{
	Widget	form;

	Cardinal	n;
	Arg		args[10];

        n = 0;
	XtSetArg(args[n], XtNskipAdjust, True);	n++;
	form = XtCreateManagedWidget("form", formWidgetClass,paned, args,n);

        n = 0;
        wd->scrollbar = XtCreateManagedWidget("scrollbar",
			scrollbarWidgetClass,form, (ArgList) args,n);

	XtAddCallback(wd->scrollbar, XtNjumpProc, Scroll, (XtPointer) wd);

        n = 0;
	XtSetArg(args[n], XtNfromHoriz, wd->scrollbar);	n++;
	XtSetArg(args[n], XtNborderColor, XtDefaultBackground);	n++;
        wd->frame_label = XtCreateManagedWidget(FRAME_LABEL_DISPLAY,
			labelWidgetClass,form,args,n);
}

/*
 * 	The top panel consists of the scrollbar; "playback", "jogback", "stop",
 *	"jog", and "play" buttons.
 */
void	create_top_panel(paned, wd)
	Widget		paned;
	WidgetData	*wd;
{
	Widget	form;

	Pixmap	pixmap;

	Cardinal	n;
	Arg		args[10];

        n = 0;
	XtSetArg(args[n], XtNskipAdjust, True);	n++;
	form = XtCreateManagedWidget("form", formWidgetClass,paned, args,n);

	/*
	 * create a pixmap for the playback button
	 */
	pixmap = XCreateBitmapFromData(
		XtDisplay(paned), RootWindowOfScreen(XtScreen(paned)),
		 (const char *) playback_bits, playback_width,playback_height
	);

        n = 0;
	XtSetArg(args[n], XtNbitmap, pixmap);	n++;
        wd->playback = XtCreateManagedWidget("playback",
			commandWidgetClass,form,args,n);

	XtAddCallback(wd->playback, XtNcallback, Playback, (XtPointer) wd);

	/*
	 * the jogback button
	 */
	pixmap = XCreateBitmapFromData(
		XtDisplay(paned), RootWindowOfScreen(XtScreen(paned)),
		(const char *) jogback_bits,jogback_width,jogback_height
	);

        n = 0;
	XtSetArg(args[n], XtNbitmap, pixmap);	n++;
	XtSetArg(args[n], XtNfromHoriz, wd->playback);	n++;
        wd->jogback = XtCreateManagedWidget("jogback",
			commandWidgetClass,form,args,n);

	XtAddCallback(wd->jogback, XtNcallback, Jogback, (XtPointer) wd);

	/*
	 * the stop button
	 */
	pixmap = XCreateBitmapFromData(
		XtDisplay(paned), RootWindowOfScreen(XtScreen(paned)),
		 (const char *) stop_bits,stop_width,stop_height
	);

        n = 0;
	XtSetArg(args[n], XtNbitmap, pixmap);	n++;
	XtSetArg(args[n], XtNfromHoriz, wd->jogback);	n++;
        wd->stop = XtCreateManagedWidget("stop",commandWidgetClass,form,args,n);
	XtAddCallback(wd->stop, XtNcallback, Stop, (XtPointer) wd);

	/*
	 * the jog button
	 */
	pixmap = XCreateBitmapFromData(
		XtDisplay(paned), RootWindowOfScreen(XtScreen(paned)),
		(const char *) jog_bits,jog_width,jog_height
	);

        n = 0;
	XtSetArg(args[n], XtNbitmap, pixmap);	n++;
	XtSetArg(args[n], XtNfromHoriz, wd->stop);	n++;
        wd->jog = XtCreateManagedWidget("jog",commandWidgetClass,form,args,n);
	XtAddCallback(wd->jog, XtNcallback, Jog, (XtPointer) wd);

	/*
	 * the play button
	 */
	pixmap = XCreateBitmapFromData(
		XtDisplay(paned), RootWindowOfScreen(XtScreen(paned)),
		(const char *) play_bits,play_width,play_height
	);

        n = 0;
	XtSetArg(args[n], XtNbitmap, pixmap);	n++;
	XtSetArg(args[n], XtNfromHoriz, wd->jog);	n++;
        wd->play = XtCreateManagedWidget(
		"play", commandWidgetClass,form,args,n
	);
	XtAddCallback(wd->play, XtNcallback, Play, (XtPointer) wd);

}

/*
 * The middle panel consists of the "loop", "goto", "dup", "skip",
 * "start segment" and the "stop segment" buttons.
 */
static	void	create_middle_panel(paned, wd)
	Widget		paned;
	WidgetData	*wd;
{
	Widget	form;

	Cardinal	n;
	Arg		args[10];

        n = 0;
	XtSetArg(args[n], XtNskipAdjust, True);	n++;
	form = XtCreateManagedWidget("form", formWidgetClass,paned, args,n);

        n = 0;
        wd->loop = XtCreateManagedWidget("loop", toggleWidgetClass,form,args,n);
	XtAddCallback(wd->loop, XtNcallback, Loop, (XtPointer) wd);

        n = 0;
	XtSetArg(args[n], XtNfromHoriz, wd->loop);	n++;
        wd->dup = XtCreateManagedWidget("dup",commandWidgetClass,form,args,n);
	XtAddCallback(wd->dup, XtNcallback, Dup, (XtPointer) wd);
	wd->pcv.dup = DEFAULT_DUP;

        n = 0;
	XtSetArg(args[n], XtNfromHoriz, wd->dup);	n++;
        wd->goto_ = XtCreateManagedWidget(
		"goto",commandWidgetClass,form,args,n
	);
	XtAddCallback(wd->goto_, XtNcallback, Goto_, (XtPointer) wd);
	wd->pcv.goto_ = DEFAULT_GOTO;

        n = 0;
	XtSetArg(args[n], XtNfromHoriz, wd->goto_);	n++;
        wd->skip = XtCreateManagedWidget("skip",commandWidgetClass,form,args,n);
	XtAddCallback(wd->skip, XtNcallback, Skip, (XtPointer) wd);
	wd->pcv.skip = DEFAULT_SKIP;

        n = 0;
	XtSetArg(args[n], XtNfromHoriz, wd->skip);	n++;
	XtSetArg(args[n], XtNsensitive, False);		n++;
        wd->delay = XtCreateManagedWidget(
		"delay",commandWidgetClass,form,args,n
	);
	XtAddCallback(wd->delay, XtNcallback, Delay, (XtPointer) wd);
	wd->pcv.delay = DEFAULT_DELAY;

        n = 0;
	XtSetArg(args[n], XtNfromHoriz, wd->delay);	n++;
        wd->start_segment = XtCreateManagedWidget("start segment",
		commandWidgetClass,form,args,n);
	XtAddCallback(
		wd->start_segment, XtNcallback, Start_Segment,(XtPointer) wd
	);
	wd->pcv.start_segment = DEFAULT_START;

        n = 0;
	XtSetArg(args[n], XtNfromHoriz, wd->start_segment);	n++;
        wd->stop_segment = XtCreateManagedWidget("stop segment",
		commandWidgetClass,form,args,n);
	XtAddCallback(wd->stop_segment,XtNcallback,Stop_Segment,(XtPointer) wd);
	wd->pcv.stop_segment = DEFAULT_STOP;

        n = 0;
	XtSetArg(args[n], XtNfromHoriz, wd->stop_segment);	n++;
        wd->set_window = XtCreateManagedWidget("set window",
		commandWidgetClass,form,args,n);
	XtAddCallback(wd->set_window,XtNcallback,Set_Window,(XtPointer) wd);
	strcpy(wd->pcv.set_window, DEFAULT_SET_WINDOW);
}

static	Widget	create_bottom_panel(paned, wd)
	Widget		paned;
	WidgetData	*wd;
{
	Arg		args[10];
	Widget	form;
	Cardinal	n;

        n = 0;
	XtSetArg(args[n], XtNskipAdjust, True);	n++;
	form = XtCreateManagedWidget("form", formWidgetClass,paned, args,n);

        n = 0;
        wd->done = XtCreateManagedWidget("done",commandWidgetClass,form,args,n);
	XtAddCallback(wd->done, XtNcallback, Done, (XtPointer) wd);

        n = 0;
	XtSetArg(args[n], XtNfromHoriz, wd->done);	n++;
        wd->current_frame = XtCreateManagedWidget("current frame",
				commandWidgetClass,form,args,n);
	XtAddCallback(wd->current_frame,XtNcallback,CurrentFrame,(XtPointer)wd);
	wd->pcv.current_frame = DEFAULT_CURRENT;

	n = 0;
	XtSetArg(args[n], XtNfromHoriz, wd->current_frame);	n++;
	wd->print = XtCreateManagedWidget("print",menuButtonWidgetClass,
								form,args,n);

        n = 0;
	XtSetArg(args[n], XtNfromHoriz, wd->print);	n++;
        wd->save = XtCreateManagedWidget("save",commandWidgetClass,form,args,n);
	XtAddCallback(wd->save, XtNcallback, Save, (XtPointer) wd);
	strcpy(wd->pcv.save, DEFAULT_SAVE);

        n = 0;
	XtSetArg(args[n], XtNfromHoriz, wd->save);	n++;
        wd->zoom = XtCreateManagedWidget("zoom",commandWidgetClass,form,args,n);
	XtAddCallback(wd->zoom, XtNcallback, Zoom, (XtPointer) wd);
	wd->ar = 1.0;
	wd->llx = wd->lly = 0.0;
	wd->urx = wd->ury = 1.0;

        n = 0;
	XtSetArg(args[n], XtNfromHoriz, wd->zoom);	n++;
        wd->unzoom = XtCreateManagedWidget(
		"unzoom",commandWidgetClass,form,args,n
	);
	XtAddCallback(wd->unzoom, XtNcallback, UnZoom, (XtPointer) wd);

        n = 0;
	XtSetArg(args[n], XtNfromHoriz, wd->unzoom);	n++;
        wd->animate = XtCreateManagedWidget(
		"animate",toggleWidgetClass,form,args,n
	);
	XtAddCallback(wd->animate, XtNcallback, Animate, (XtPointer) wd);
	wd->do_animate = False;

	return(wd->print);
}

/*
 *	dyanmically create a print menu by polling the translator to see
 *	what printing devices are available
 */
void	create_print_menu(print, wd)
	Widget		print;
	WidgetData	*wd;
{

	Widget		menu, entry;
	Arg		args[10];
	char		*alias_list,
			**spooler_list,
			**ptr;

	extern	char	**SpoolerList();

	alias_list = TalkTo(wd->id, "alias\n", SYNC);
	spooler_list = SpoolerList(alias_list);
	if (*spooler_list) {

		menu = XtCreatePopupShell("menu",
				simpleMenuWidgetClass, print, (ArgList) NULL,0);

		for (ptr = spooler_list; *ptr; ptr++) {
			entry = XtCreateManagedWidget(*ptr, smeBSBObjectClass,
					menu, (ArgList) NULL, 0);

			XtAddCallback(entry, XtNcallback,
					PrintSelect, (XtPointer) wd);
		}
	}
	else {
		Message(wd->id, "Can't find  any spooled devices for printing");
		XtSetArg(args[0], XtNsensitive, False);
		XtSetValues(print, args, 1);
	}
}

#ifdef	DEAD

static	Visual	*get_best_8bit_visual(depth, dpy)
	int	*depth;
	Display	*dpy;
{
	XVisualInfo	vinfo;
	int	screen = DefaultScreen(dpy);

	/*
	 * find best 8-bit depth visual
	 */
	if (XMatchVisualInfo(dpy, screen, 8, PseudoColor, &vinfo)) {
		*depth = vinfo.depth;
		return(vinfo.visual);
	}
	else if (XMatchVisualInfo(dpy, screen, 8, StaticColor, &vinfo)) {
		*depth = vinfo.depth;
		return(vinfo.visual);
	}
	else if (XMatchVisualInfo(dpy, screen, 8, GrayScale, &vinfo)) {
		*depth = vinfo.depth;
		return(vinfo.visual);
	}
	else if (XMatchVisualInfo(dpy, screen, 8, StaticGray, &vinfo)) {
		*depth = vinfo.depth;
		return(vinfo.visual);
	}

	/*
	 * yuck, can't find anything. return the default
	 */
	*depth = DefaultDepth(dpy, screen);
	return (DefaultVisual(dpy, screen));
}

#endif /* DEAD */

/*
 *	CreateDisplayPopup
 *	[exported]
 *
 *	Dynamically create a popup 'display'. This popup is located with its
 *	top left corner in the center of the calling widget.
 *
 * on entry
 *	button		: widget used to position the display
 *	*metafile	: name of the metafile to translate
 */
void	CreateDisplayPopup(button, metafile)
	Widget	button;
	char	*metafile;
{

	Widget	paned;		/* constraint widget		*/
	Widget	canvas;		/* the drawing canvas		*/
	Widget	popup;		/* top-level popup		*/
	Widget	print;		/* "print" button widget	*/
	Window	win;		/* drawing canvas window id	*/
	WidgetData	*wd;
	char		*s;

#ifdef	DEAD
	Arg		args[10];
	Cardinal	n;
	Visual		*visual;
	int		dsp_depth;
	Colormap	cmap;
#endif	/* DEAD */

	if (!(wd = (WidgetData *) malloc(sizeof(WidgetData)))) {
		(void) fprintf(stderr, "Malloc failed\n");
		return;
	}

	wd->dpy = XtDisplay(button);

	/* init some fields */
	wd->current_frame_num = -1; /* none initially */

#ifdef	DEAD
	visual = get_best_8bit_visual(&dsp_depth, wd->dpy);
	if (visual == DefaultVisual(wd->dpy, DefaultScreen(wd->dpy))) {
		cmap = DefaultColormap(wd->dpy, DefaultScreen(wd->dpy));
		dsp_depth = DefaultDepth(wd->dpy, DefaultScreen(wd->dpy));
	}
	else {
		cmap = XCreateColormap(
			wd->dpy, RootWindow(wd->dpy, DefaultScreen(wd->dpy)),
			visual, AllocAll
		);
	}

        n = 0;
	XtSetArg(args[n], XtNcolormap, cmap);		n++;
        XtSetArg(args[n], XtNvisual, visual);		n++;
        XtSetArg(args[n], XtNdepth, dsp_depth);		n++;
	popup = XtCreatePopupShell(metafile, topLevelShellWidgetClass,
				button, args, n);
#endif
	popup = XtCreatePopupShell(metafile, topLevelShellWidgetClass,
				button, (ArgList) NULL, 0);

	paned = XtCreateManagedWidget("paned",
				panedWidgetClass,popup, (ArgList) NULL,0);

	if (! App_Data.oldidt) {
		canvas = XtCreateManagedWidget("canvas",
				widgetClass,paned, (ArgList) NULL,0);
		wd->canvas = canvas;
	}

	/*
	 * open a connection to a translator
	 */
	if ((wd->id = OpenDisplay())< 0) {
		(void) fprintf(stderr, "Translator aborted\n");
		return;
	}
	wd->popup = popup;
	wd->app_context = XtWidgetToApplicationContext(popup);

	/*
	 * The main display is made up of four sub-panels
	 */
	create_tip_top_panel(paned, wd);

	create_top_panel(paned, wd);

	create_middle_panel(paned, wd);

	print = create_bottom_panel(paned, wd);

	XtPopup(wd->popup, XtGrabNone);

	if (! App_Data.oldidt) {
                unsigned long mask = CWBackingStore;
                XSetWindowAttributes xswa;

		/*
		 * enable button click events in the drawing canvas so the
		 * rubber-banding code in ZoomCoords() can get events from
		 * the drawing window, not the top-level window
		 */
		win = (Window) XtWindow(canvas);
		XSelectInput(XtDisplay(canvas), win, ButtonPressMask);

		/*
		 * turn on backing store for drawing canvas. Wish we
		 * could do this from an Xt resource.
		 */
                xswa.backing_store = WhenMapped;
                XChangeWindowAttributes(wd->dpy, win, mask, &xswa);

	}
	else {
		win = (Window) -1;
	}
	wd->win = win;

	if (App_Data.debug) {
		fprintf(stderr, "Canvas window id(%d)\n", win);
	}

	/*
	 * now that our drawing window has been mapped we can spawn
	 * the translator and request it to drawn in the idt canvas
	 */
	if (StartTranslator(wd->id, metafile, win)< 0) {
		(void) fprintf(stderr, "Translator aborted\n");
		return;
	}

	/*
	 * now that the translator is up and running we can poll it to
	 * find out what printing devices are available so we can create
	 * our print menu dynamically
	 */
	create_print_menu(print, wd);

	/*
	 * find out how many frames are in the metafile now that the
	 * translator is up
	 */
	s = TalkTo(wd->id, "stop\n", SYNC);
	wd->pcv.stop_segment = atoi(s);
}


// @flow
import { Given, When, Then } from 'cucumber';
import { expect } from 'chai';
import { initialSettingsHelpers } from './helpers';
import type { Daedalus } from '../../../types';

declare var daedalus: Daedalus;
const { ensureLanguageIsSelected } = initialSettingsHelpers;
const INITIAL_SETTINGS_FORM = '.InitialSettings_component';

Given(/^I have selected English language$/, async function() {
  await ensureLanguageIsSelected(this.client, {
    language: 'en-US',
  });
});

Given(/^I dont have a language set$/, async function() {
  await this.client.execute(() => {
    daedalus.reset();
  });
});

When(/^I am on the language selection screen$/, function() {
  return this.client.waitForVisible('.InitialSettings_component');
});

When(/^I open language selection dropdown$/, function() {
  return this.waitAndClick(
    '.InitialSettings_component .SimpleInput_input'
  );
});

When(/^I select Japanese language$/, function() {
  return this.waitAndClick(
    '//*[@class="SimpleOptions_option"]//*[contains(text(), "Japanese")]'
  );
});

When(/^I submit the language selection form$/, function() {
  return this.waitAndClick('.ProfileSettingsForm_submitButton');
});

Then(/^I should not see the language selection screen anymore$/, function() {
  return this.client.waitForVisible(INITIAL_SETTINGS_FORM, null, true);
});

Then(/^I should have Japanese language set$/, async function() {
  const result = await this.client.executeAsync(done => {
    daedalus.stores.profile.getProfileLocaleRequest
      .execute()
      .then(done)
      .catch(error => done(error));
  });
  expect(result.value).to.equal('ja-JP');
});


When you think 7,8,9 years ago; before the
ago of unicorns startups was still a very
exotic world. And I remember talking with
some of my clients and I was telling them:
"why don't you go and work with startups"
and they were telling me "Julien we are a
25 million euro company and those guys they
work out of a garage and they wear blue jeans."
There is no way we can work with them. So
there has been a shift of mindset. So the
big question I want to ask you is 'Is it possible
that working with social entrepreneurs will
be just as obvious and necessary 5years from
now as it has become to work with startups
today. We will see this shift of mindset in
the coming years. This is the bet we are making.
We believe social entrepreneur is the new
startup. We believe it is going to be the
norm to engage with social entrepreneurs when
you are a big company. And when you think
about it it makes a lot of sense because all
the advantages we saw of engaging with startups
make a lot of sense when you engage with social
entrepreneurs as well.


Peter Penashue's campaign had to settle up after taking 28 illegal contributions in his 2011 federal election campaign, including more than $18,000 from Provincial Airlines and $5,500 from construction company Pennecon, newly released records show.

The records, posted on Elections Canada's website, show Penashue's campaign first made amends last November, almost four months before he told Conservative officials that he wanted to step down and fight for his seat again in a byelection.

Penashue resigned his seat in the House of Commons Thursday, as well as his role as intergovernmental affairs minister, in the wake of controversy over taking corporate donations and going over his election campaign spending limit.

Revised campaign spending records published Friday show:

Penashue's campaign accepted 28 ineligible, or illegal, donations.

The illegal monetary donations totalled $27,850, with an additional $18,710.54 in in-kind contributions from Provincial Airlines.

The donations included money from Pennecon Ltd., a company whose contribution was revealed last fall by CBC News.

Penashue's campaign wrote two big cheques to the federal government through the Receiver General of Canada to cover the ineligible contributions. Candidates can pay back ineligible donors or pay the ineligible amount to the Receiver General.

$26,850 was paid on Nov. 28, 2012 to cover the monetary contributions (one ineligible contribution had been paid off shortly after the 2011 election, for a total of $27,850).

The in-kind contribution of $18,710.54 was paid March 4, 2013, a week-and-a-half before Penashue resigned.

Party gave campaign $44,350

The campaign had just under $4,000 in its account by the end of the summer after the 2011 election, with $15,000 owing to an Innu group that had loaned it $25,000. Innu Development Limited Partnership, which was run at the time by Penashue's brother-in-law, Paul Rich, made the loan without setting out an interest rate in the contract, although an interest-free loan isn't allowed under Canadian election law.

The Conservative Party came to Penashue's rescue last November, transferring $10,000 and then $20,000 to the campaign on Nov. 23, 2012.

The party transferred another $14,350 to the campaign on March 1, 2013.

Penashue's resignation forces a byelection in Labrador, a large and sparsely populated riding. Prime Minister Stephen Harper must announce the date of the byelection within six months.

Yvonne Jones, currently a member of the Newfoundland and Labrador house of assembly, said Friday morning she'll run for the federal Liberals.

A CBC News investigation first revealed last fall that Penashue's campaign may have taken corporate donations. Had it paid for the flights around Labrador, the campaign would have gone about 21 per cent over the spending maximum allowed by Elections Canada.

Now that he has compensated the federal government, the amount spent on the flights no longer counts toward his $84,468.09 cap. It is listed in a separate category for expenses that don't count toward a candidate's spending limit. The records show he was slightly over his cap, at $89,997.85.

'I haven't done anything wrong'

In an interview with a Labrador radio station, Penashue said he was waiting for Elections Canada to finish its report into the campaign spending, which he said he expects soon.

"What I saw, I wasn't pleased. So I thought that the best and appropriate thing to do was to resign," he said.

"I'm not comfortable with those illegitimate contributions and ... I don't think Labradorians feel comfortable with it either so I think it's proper that I resign and have the people of Labrador decide as to who they would like to have them represented in Ottawa."

"I haven't done anything wrong because I didn't have any knowledge to it," he added.

Penashue told the radio station that he thinks he'll win the byelection.


Q:

How can i switch this option menu on fragment to activity

I want this option menu on my add apartment fragment to intent here at the add apartment class. while running this code my app gets crashed, I might have missed something could someone please help me, what should I do??
LandlordAddApartment.java
public class LandlordAddApartment extends Fragment {

@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setHasOptionsMenu(true);

}
@Nullable
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {

    inflater.inflate(R.menu.add_apartment, menu);
    super.onCreateOptionsMenu(menu, inflater);
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    int id = item.getItemId();
    if (id == R.id.landlord_add_apartment) {

            LanlordMapFragment mapFragment = new LanlordMapFragment();
            FragmentManager manager = getFragmentManager();
            manager.beginTransaction().replace(R.id.landlord_apartment, mapFragment, mapFragment.getTag()).commit();

            return true;

    }

    return super.onOptionsItemSelected(item);
}

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    getActivity().setTitle("Manage Apartment");
}

@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View v =  inflater.inflate(R.layout.landlord_add_apartment, container, false);

    return v;

A:

You can use from switching from Fragment to Activity:
startActivity(new Intent(getActivity,YourActivity.Class));

And while moving from Activity to Fragment:
YourFragment mapFragment = new YourFragment();
FragmentManager manager = getFragmentManager();
manager.beginTransaction().replace(R.id.landlord_apartment, mapFragment, mapFragment.getTag()).commit();


William Taylor (New South Wales politician)

William Taylor (1862 – 15 February 1922) was an Australian politician.

He was born at Bay of Biscay in Victoria to merchant James Taylor and Elizabeth Park. Educated at Ballarat, he left school at fourteen and entered the product merchandise trade. He married Elizabeth Laverick at Ballarat around 1884; they would have two daughters. He moved to Sydney in 1884, where he opened a branch of the firm he worked for, John Gray and Sons. He was a Rockdale alderman from 1890 to 1922, serving as mayor from 1892 to 1894 and from 1904 to 1909. In 1908 he was elected to the New South Wales Legislative Assembly as the Liberal member for St George, serving until his retirement in 1913. Taylor died in Sydney in 1922.

References

Category:1862 births
Category:1922 deaths
Category:Members of the New South Wales Legislative Assembly
Category:Mayors of Rockdale


Q:

how to build Xamarin Visual Studio Project without Login Xamarin Account

I have Xamarin.Android8.0.2.1 installed version on visual studio 2015 when i try to build Xamarin Application it ask me to login to xamarin account
Must I login to build and run Xamarin application?

A:

The Problem has been solved,the problem was in the license file, i reinstall the Xamarin, the login window still appears but the build operation continues without problem


Dry Brushing 101

When was the last time you rubbed a dry brush against your dry skin? If you haven’t done so recently, then you are missing out!

Dry brushing (the name of this painful sounding technique) is just that–dry brushing your dry skin in order to induce a plethora of amazing benefits.

Well, what are these so called “amazing” benefits, you ask?:

Improves circulation

Removes layers of dead skin

Tones muscles

Strenghtens immune system

Cleanses lymphatic system

Stimulates cell production

Reduces appearance of cellulite

Relieves stress

So, now that you’re eager to get started, here’s how:

Starting at your feet, work the brush upwards in a circular motion, using gentle pressure. The key here is to slowly work your way toward your heart–hence starting at your feet! Continue this gentle motion until each body part is done (feet, calves, thighs, buttocks, hands, arms, back, abdomen, chest) Avoid areas that may be more sensitive than others.

It is recommended that you dry brush before showering. This prevents any potential moisture from interrupting the process. Not to mention you may want to shower after this process in order to rinse away any of the dead skin cells. (if you decide to skip the shower all together, no judgment here, my friend!)

Avoid dry brushing if you are suffering from any wounds, acne, ezcema, or any other skin condition that may be further irritated by dry brushing.

If the process ever feels painful or uncomfortable, STOP! Your brush bristles may be too rough or your skin may be very sensitive. Feel free to work your way up to completing your whole body. No rush!

Did I mention that natural bristle brushes tend to be more effective and less irritating than the hard, synthetic brushes you may find in your local pharmacy.

Dry brush as many times as you’d like, but at least 1x per week. If your skin is sensitive, feel free to do even less than this amount.

What benefits have you noticed from dry brushing? We want to hear all about it! Comment below!


Section: News & Summaries

Militants concentrate a task group with armored vehicles near Triokhizbenka, Luhansk region. Head of the Information Resistance group Dmytro Tymchuk wrote on Facebook. “Near the settlement of Triokhizbenka, the enemy reinforced task group is concentrated, which includes 16 armored vehicles. The artillery group for support is deployed to the south...

Over the previous day, six Ukrainian military were wounded in fighting in the ATO area. The ATO press center informs. “In battles, which continued during the previous day, six Ukrainian soldiers were wounded,” a statement reads. According to the ATO headquarters, currently, they are at medical establishments, where qualified medical aid was given...

Ukrainian President Petro Poroshenko will make a working visit to Slovakia this weekend, the presidential press service has reported. “On November 15-16, Ukrainian President Petro Poroshenko will make a working visit to the Slovak Republic,” reads the report.

Striking forces of terrorists move to advanced positions near Mariupol. Head of the Information Resistance group Dmytro Tymchuk wrote on Facebook. “Near Mariupol, advance movement of the enemy attack groups is observed, totaling up to two squadrons (advanced guard),” Tymchuk wrote.

Militants are actively engaged in strengthening their front line in Donetsk and near Makiyivka. Coordinator of the Information Resistance group Dmytro Tymchuk wrote on his Facebook page. “Russian-terrorist forces strengthened their frontline in Petrivsky, Kyivsky and Kirovsky districts of Donetsk, as well as near Spartak. Actually, all “internal”...

Ukrainian military have destroyed two firing positions of terrorists near Donetsk and Krasnohorivka. Information Resistance group leader Dmytro Tymchuk reported this on his Facebook page. “As a result of the actions of Ukrainian troops one firing position of the enemy was destroyed in the area of Spartak and one between the settlements of...

Terrorists have violated the terms of the ceasefire in Donbas 50 times over the past 24 hours and again tried to seize the Donetsk airport, the press center for the anti-terrorist operation has reported. “Trying to take control of the Donetsk airport militants focused their actions on attempts to destroy the communications between the...

Maidan Community Sector, Lviv: Dear friends! November 13 – On the evening of November 12th Russian military intelligence warship was observed in Latvia’s exclusive economic zone. November 13 – A record number of people wearing military uniform report has crossed Ukrainian-Russian border last week – weekly report of OSCE’s monitoring...

Russian-terrorist forces continue to violate the agreement on a temporary ceasefire. Over the past day, ATO position forces suffered more than 40 attacks by Russian occupation forces and illegal armed groups. In particular, enemy troop activity is most noted in the Luhansk, Donetsk and Debaltseve directions – 13, 12 and 11 fire strikes each,...

Ukrainian law enforcement agencies have drafted a joint action plan under the conditions of Russian aggression. An advisor to the Ukrainian interior minister, Zorian Shkiriak, said this at a press briefing on Thursday, a Ukrinform correspondent reported. “The Interior Ministry, the Defense Ministry and SBU worked out a systemic model of...


Q:

Conditionally merge dictionaries using ternary operators

I have a function that build a header according to the type of data it receives. I know I could make it with ifs, this is just a curiosity on how ternary operators can be embedded for some sort of dictionary comprehension.
I tried implementing the ternary just inside the dictionary and have it always output a dictionary.
def _create_header(self, data):
    base_header = {
        'type': data["type"],   # arg provided
        'dest_ID' : 1,          # arg provided
        'src_ ID': 2,           # arg provided
    }
    dest_header = {
        'dst_addr': 0,          # arg provided
    }
    data_header = {
        'priority': 0,          # arg provided
        'length': 0,            # arg provided
        'data_format': 0,       # arg provided
        'data_type': 0,         # arg provided
    }
    index_header = {
        'x_of_y': 0,            # len dependant
        'y': 0,                 # len dependant
    }
    protocol_header = {
        'check_type': 0,        # sys dependant
        'rev': 0,               # sys dependant
        'reserved': 0,          # rev dependant
    }
    header = {}
    return {**base_header, **dest_header if data["type"] in range(4,9) else {}, **data_header, **index_header, **protocol_header}

I always get Invalid Syntax, so I guess it might not be possible. Just wanted to know if anyone has tried it.

A:

The unary operator ** binds stronger than you think.
Paranthesize the ternary expression and it should work:
return {
    **base_header,
    **(dest_header if data["type"] in range(4,9) else {}),
    **data_header,
    **index_header,
    **protocol_header,
}


Q:

How can I confirm if an async EF6 await db.SaveChangesAsync() worked as expected?

My code looks like this:
    public async Task<IHttpActionResult> Delete(int id)
    {
        var userId = Int32.Parse(User.Identity.GetUserId());
        UserTest userTest = await db.UserTests.FindAsync(id);
        if (userTest == null)
        {
            return NotFound();
        }
        if (userTest.UserId != userId)
        {
            return Unauthorized();
        }
        db.UserTests.Remove(userTest);
        await db.SaveChangesAsync();
        return Ok();
    }

I think everything up to the db.SaveChangesAsync is okay but how can I confirm if the db.SaveChangesAsync works before doing a return Ok() ? Ideally I think I should be checking for exceptions and things but I am not sure how I could fit that into this code block.

A:

From msdn:
public virtual Task<int> SaveChangesAsync()

Return Value Type: System.Threading.Tasks.Task A task that
  represents the asynchronous save operation. The task result contains
  the number of objects written to the underlying database.

Check if the result is greater than 0:
if(await db.SaveChangesAsync() > 0)
{
     .....
}

More info here
Another option is to wrap this with try ... catch block:
try
{
    await db.SaveChangesAsync();
    return Ok();
}
catch (Exception ex)
{
    return NotFound(ex.Message);
}

A:

You can use the following below :)
try {
    int isSaved = await db.SaveChangesAsync();
    if(isSaved > 0){
      // is saved
    }else{
     // is not saved
    }
} catch(e) {
    // handle error here
}