The Kobs lost to Egypt in the 2015 qualifiers (file photo)The Uganda U23 national team, Kobs have been pitted with South Sudan in the AFCON 2019 qualifiers’ first round.Sebastian Desabre’s side who last featured in the continental qualifiers back in 2015 will host the first leg between 12th and 16th of November in Kampala before heading to Juba for the return leg the following week.The winner between the Kobs and their South Sudan counterparts will take on Tunisia in the second round of qualification.The second round is scheduled to be played in March 2019 with the first leg taking place between 18th and 22nd while the return leg happening a week later.From there, will be the final qualification round. It will take place in early June and it’s from the games that eight teams will qualify for the finals’ tournament in Egypt.The tournament will run from 8th to 22nd of November 2019.The Kobs last featured in a two-legged affair against Egypt in which they lost home and away. They first went down 4-0 in Cairo before losing 2-1 at Namboole.The tournament in Egypt will be the 3rd edition of the Africa U23 Cup of Nations, the quadrennial international age-restricted football championship organised by CAF for the men’s under-23 national teams of Africa.The tournament was initially scheduled to take place in Zambia, but they withdrew from hosting in July 2017. Egypt was announced as the new host nation of the tournament by CAF on 23 September 2017.The tournament will determine which three African teams will compete at the 2020 Summer Olympics men’s football tournament in Japan.Nigeria are the defending champions of the tournament having won it in 2015, defeating Algeria 2-1 in the final.Gabon won the first edition in 2011, winning 2-1 against hosts Morocco in the final.Comments Tags: Africa U23 Cup of NationsSebastian Desabretopuganda kobs
Table Mountain towers spectacularly over the city of Cape Town. The mountain is one of three natural South African sites in the running for the seven natural wonders of the world. (Image: Walter Knirr, South African Tourism) New7Wonders founder Bernard Weber with Portuguese soccer star Cristiano Ronaldo at the ceremony in Lisbon announcing the new seven wonders of the world. (Image: New7Wonders of the World)Janine ErasmusSouth Africans have the chance to vote for one of three of the country’s top natural landmarks in the New7Wonders of Nature campaign, the first phase of which is open until the end of 2008.The Kruger National Park, the Cape of Good Hope, and the iconic Table Mountain are all in the running for nomination as one of the world’s seven outstanding natural sites.The Cape of Good Hope, a rocky headland on South Africa’s Atlantic coast, has been a maritime landmark for centuries and is referred to by sailors as “The Cape”.The Kruger National Park, which celebrated its 110th anniversary in June 2008, is South Africa’s largest game reserve and is now an integral part of the 35 000km² Great Limpopo Transfrontier Park, a peace park with no internal borders that joins the Kruger to Zimbabwe’s Gonarezhou National Park and the Limpopo National Park in Mozambique.Table Mountain is one of the country’s major tourist attractions. Part of the Table Mountain National Park on the Cape peninsula, the flat-topped mountain towers impressively over the city of Cape Town.Searching for seven natural wondersIn July 2007 the New7Wonders of the World were announced after an extensive global campaign in which more than 100-million people cast their votes. The second campaign, also organised by the non-profit New7Wonders Foundation, turns the focus to the natural world in the search for the seven greatest natural sites on earth.There are three criteria for selection – only a natural site, natural monument or landscape can be nominated. Natural phenomena such as the Northern lights are not eligible.After the first round of voting a panel of architectural experts will short-list 21 options from the 77 top-ranked sites, based on the number of votes received. The short list will be announced in January 2009. The panel is headed by Prof Federico Mayor Zaragoza, scholar, politician, and former director-general of the United Nations Education, Scientific and Cultural Organisation.South Africa’s Aziz Tayob, the first non-white architect in the country, was a member of the expert panel which selected the New7Wonders. Tayob graduated from the University of the Witwatersrand in 1969.The second round of voting will determine the final seven sites, which will be revealed in the second half of 2010. Nominated places must be backed by an official supporting committee to qualify for the second round. Forms are available on the site for those wishing to establish a committee for their chosen landmark.At the time of writing none of the South African sites were in the top 77, which is updated twice a day. Voters are encouraged to vote for their favourite South African natural site to ensure victory against some stiff competition from elsewhere on the African continent. East Africa’s Great Rift Valley, Mount Kilimanjaro in Tanzania, Zimbabwe’s famous Victoria Falls, and the Serengeti National Park, also in Tanzania, are just a few of the natural African sites vying for a place in the top 21.However, voters may participate only once in each round and must cast their votes for seven sites per round. Only one of the seven sites may be located in the voter’s home country.Safeguarding world heritageEstablished in 2001, the New7Wonders Foundation and its two campaigns are the brainchild of Swiss-born Canadian filmmaker, author, aviator and adventurer Bernard Weber. Weber’s intention in inaugurating the campaign is to help protect the world’s human-made and natural heritage, as well as to unite people by encouraging them to respect earth’s cultural diversity.These philosophies are particularly applicable to South Africa, which possesses an extraordinary wealth of natural and cultural heritage.“I feel very strongly that world heritage, as the name says, belongs to the people of the world,” says Weber. “Over 100-million votes from every corner of the world very clearly legitimises the New7Wonders of the World. And we are estimating over one-billion votes for the New7Wonders of Nature. These are choices made by the people of the world.”The New7Wonders of the World, as voted by 100-million people, are the Great Wall of China, Petra in Jordan, Chichén Itzá in Mexico, the Statue of Christ Redeemer in Brazil, the Colosseum in Italy, Machu Picchu in Peru, and the Taj Mahal in India.The New7Wonders of Nature campaign aims to increase awareness of and respect for the natural beauty of the world and the need to take care of it. Increased awareness, says Weber, will boost the tourism industry and contribute to the care and preservation of important natural sites.Half of all revenue raised by the project is allocated towards monument conservation and documentation. One of the project’s success stories is the high-definition 3D model of the 4th-century Bamiyan Buddha, a cultural treasure that was destroyed by the Taliban in 2001. The 3D model will enable the people of Afghanistan to rebuild the giant statue.“The more we know about each other, spread across continents and time zones, and the more we share, the more we actively create a peaceful and prosperous future for us all,” says Weber, adding that the sites chosen as the New7Wonders have experienced a boost in tourism of up to 40%.Once the New7Wonders of Nature is complete Weber plans to find the New7Wonders of Technology.Useful linksNew7Wonders of NatureCity of Cape TownKruger National ParkTable MountainCape of Good HopeUnited Nations Education, Scientific and Cultural OrganisationDepartment of Environmental Affairs and Tourism
Anant Jhingran Related Posts Tags:#AI Machine Learning#APIs#auto-home#Connected Devices#IoT A Web Developer’s New Best Friend is the AI Wai… Anant Jhingran serves as CTO and leads the product strategy & development at Apigee. AI: How it’s Impacting Surveillance Data Storage AI Will Empower Leaders, Not Replace Them China and America want the AI Prize Title: Who … Application programming interfaces (APIs) are the mechanisms that connect data, services, and apps to create modern digital experiences. If a consumer browses through some products on a retailer’s app, API calls are what seamlessly pull together the details. If a homeowner pays a utility bill online—another few API calls go to work behind the scenes to complete the transaction. If that homeowner then charts directions using a mapping service or orders a car through a ridesharing service, still more API calls are involved. A large portion of API traffic can currently be attributed to some kind of human action and follows a request-response model.What this means is that a person does something that triggers an API call in the first place. API traffic driven by machines instead of humans, in contrast, follows different, programmatic patterns and, to date, has often involved malicious activities, such as bots or attempts to breach security. On Google Cloud’s Apigee team, however, we’ve observed that the API world is experiencing a shift, with benign programmatic API calls generated by algorithms or machine intelligence taking on more prominent roles in digital ecosystems and experiences. This shift is driven by several trends that open new dimensions for how enterprises leverage APIs and expand existing ones.The rise of voice applications.Though adoption estimates for voice technologies vary, it’s clear that tens of millions of people in the U.S. alone regularly use smart speakers and voice-controlled digital assistants. It’s also clear that today’s users are adopting voice much faster than past users adopted disruptive technologies such as television or the Internet. With applications expanding rapidly into new areas such as healthcare and new use cases emerging in the enterprise, voice technologies are poised to grow far beyond their origins on smartphones and smart speakers. There are now even applications that let users raise a toilet seat using only their voice!Voice technologies are complicated and potentially expensive to develop, which is one reason that so many companies have made their natural language processing technologies available to others via APIs. If a voice assistant hears a user say, “Pay my utility bill,” the assistant needs to understand the unstated nuances of the instruction: “Pay my utility bill from PG&E for the current month using my stored credit card.” This sort of task relies heavily on machine learning, with the user’s simple request into the voice system resulting in potentially hundreds of API calls across the backend, all driven by machine intelligence figuring things out. As more use cases integrate voice, the underlying machine learning technologies—and the APIs that make those technologies leverageable—will continue to grow in prominence. The expansion of IoT and home automation.At the recent CES conference, enthusiasm for the Internet of Things (IoT) continued to grow, with connected, communicating devices filling booth after booth and keynote after keynote across Las Vegas. Many analysts estimate there are already more connected devices in use than people on the planet—and the deluge of sensing, communicating, intelligent devices is not stopping. IoT devices integrate with each other and with voice assistants through APIs — and through recipes from organizations such as IFTTT. With hundreds of thousands of different types of devices, bespoke integrations just do not work. Though APIs cannot solve all challenges associated with more profound business logic, they can simplify the mixing and matching, making it easier for all the devices and services to interact with one another. APIs take artificial intelligence mainstream.Artificial intelligence (AI) is arguably most useful when it can be leveraged into applications. However, as alluded in the above point about developing voice technologies, not every team or enterprise has the capability to do AI from scratch. Consequently, we expect to see API-driven AI in which one team, or one business builds an excellent model in some domain, and other firms or teams leverage that work through APIs. These teams or businesses may then develop their own AI models, which, in turn, another team might leverage. We already see examples of this, such as Google’s AutoML for image and text analysis.Bot attacks continue to rise.Though most of the previous trends involve machine-triggered APIs being used for beneficial or neutral purposes, bot attacks and similar malign uses cases are still growing too. Attackers continue to use botnets to take down sites and apps with distributed denial of service campaigns. Crypto-miners have begun leveraging API vulnerabilities to take over container orchestration platforms and steal enterprises’ compute power. Other bad actors are using bots to steal credentials. We anticipate APIs will continue to bear much of the burden of nefarious machine-driven traffic. The traffic could potentially saturate backends unless the right security is built into the APIs. Indeed, in the December 2017 report “How to Build an Effective API Security Strategy,” Gartner analysts Mark O’Neill, Dionisio Zumerle, and Jeremy D’Hoinne predict that “[b]y 2022, API abuses will be the most-frequent attack vector resulting in data breaches for enterprise web applications.” The rise of machine-driven API traffic among bad actors is precipitating a rise in machine-driven API traffic from enterprises working to ward off attackers. Organizations need robust security protections at the API level that include not only standards such as authentication and encryption but also smart algorithms and machine learning that can recognize bad actors and take steps to stop them. Embrace the machines.We should acknowledge and embrace the fact that “robots” are our new partners in the API world. Machine-driven API calls will likely help us to interact with devices and services in new ways, inject dumb devices with new use cases and intelligence.These actions by humans, calling to and from APIs will make AI accessible to more organizations and developers, and spot crooks that would have otherwise evaded human detection. The path forward will include pitfalls and obstacles, but with smarter machines and smarter humans working together, the future is bright.
TUESDAYS7:30 PM – CORONATION STREET (weekdays, back-to-back episodes on Mondays at 7 PM)8 PM – STILL STANDING Season 4 (13×30) premieres Sept. 18 *NEW TO FALL*8:30 PM – THIS HOUR HAS 22 MINUTES Season 26 (19×30, 1×60) premieres Sept. 189 PM – BARONESS VON SKETCH SHOW Season 3 (10×30) premieres Sept. 18 *NEW TO FALL*9:30 PM – HANG UPS British comedy (6×30) starring Stephen Mangan as an online therapist premieres Sept. 199:30 PM – IN THE LONG RUN Idris Elba’s comedy (6×30) inspired by his inner city-London childhood premieres Oct. 3010 PM – THE NATIONAL CBC News’ flagship program continues Sunday to Friday each weekWEDNESDAYS8 PM – THE GREAT CANADIAN BAKING SHOW – Season 2 (8×60) premieres Sept. 198 PM – CANADA’S SMARTEST PERSON JUNIOR – New competition series (6×60) premieres Nov. 149 PM – VANITY FAIR New British adaptation of Thackeray’s 1848 novel (7×60) premieres Sept. 199 PM – MR. D Season 8 (8×30) premieres Nov. 7 *NEW NIGHT, FINAL SEASON*9:30 PM – HALIFAX COMEDY FEST – Season 23 (6×30) premieres Nov. 14THURSDAYS7 PM – THE INVESTIGATORS WITH DIANA SWAIN Season 3 premieres Sept. 20 *NEW NIGHT*8 PM – DRAGONS’ DEN Season 13 (20×60) featuring new investors Vincenzo Guzzo and Lane Merrifield premieres Sept. 209 PM – THE DETECTIVES Season 2 (8×60) premieres Sept. 20 *NEW NIGHT*9 PM – FROM THE VAULTS New music archive series (6×60) premieres Nov. 15 FRIDAYS8 PM – MARKETPLACE Season 46 premieres Sept. 218:30 PM – IN THE MAKING – new original series (8×30) profiling Canadian artists premieres Sept. 219 PM – CBC DOCS POV Season 3 launches Sept. 21 with documentary Just a Regular Kid, exploring what it means to be young, Muslim and growing up in the West *NEW NIGHT*11:30 PM CBC ARTS: EXHIBITIONISTS Season 4 (26×30) premieres Sept. 21SATURDAYSAfternoon – CBC Sports’ ROAD TO THE OLYMPIC GAMES fall season begins Oct. 20 with extensive coverage of Skate America from Everett, Washington6:30 PM – HOCKEY NIGHT IN CANADASUNDAYS11 AM (12 PM AT) – THE WEEKLY WITH WENDY MESLEY Season 2 premieres Aug. 12Afternoon – ROAD TO THE OLYMPIC GAMES7 PM – ANNE WITH AN E Season 2 (10×60) premieres Sept. 238 PM – THE NATURE OF THINGS – Season 58 premieres Sept. 23 with special three-part miniseries Equus: The Story of the Horse9 PM – THE FIFTH ESTATE Season 44 premieres Sept. 23 *NEW NIGHT*MONDAYS8 PM – MURDOCH MYSTERIES Season 12 (18×60) premieres Sept. 249 PM – FRANKIE DRAKE MYSTERIES – Season 2 (10×60) premieres Sept. 24CBC DIGITAL-FIRST PREMIERES AND STREAMING EXCLUSIVESNew CBC original family adventure drama NORTHERN RESCUE (10×60), starring William Baldwin and Kathleen Robertson, will premiere in Canada exclusively on the CBC TV app and cbc.ca/watch starting in December, with all episodes available to stream at once. The series will also broadcast on CBC in 2019.In addition to CBC’s extensive streaming library of original Canadian content spanning more than 4000 hours including a diverse slate of digital original series and award-winning CBC SHORT DOCS, CBC also offers a curated selection of best-in-class drama, comedy, lifestyle and documentary content from around the world. New series streaming exclusively in Canada on the CBC TV app and cbc.ca/watch this fall include Season 3 of THE DURRELLS, BBC period drama THE LAST POST, Australian miniseries SUNSHINE KINGS, British medical drama TRUST ME and Australian comedy RONNY CHIENG: INTERNATIONAL STUDENT, with launch dates and more titles to be announced over the summer.AWARDSCBC will feature the following award celebrations this fall, showcasing Canadian creators, musical artists and storytellers:CANADIAN COUNTRY MUSIC ASSOCIATION AWARDS – live from Hamilton, hosted by Shania Twain. Broadcast live in all time zones on CBC and streaming at CBC Music at 8 p.m. ET (5 p.m. PT) Sept. 9POLARIS MUSIC PRIZE GALA – livestream at CBC Music Sept. 17SCOTIABANK GILLER PRIZE – live broadcast on CBC and livestream at CBC Books Nov. 19.About CBC/Radio-Canada:CBC/Radio-Canada is Canada’s national public broadcaster. Through our mandate to inform, enlighten and entertain, we play a central role in strengthening Canadian culture. As Canada’s trusted news source, we offer a uniquely Canadian perspective on news, current affairs and world affairs. Our distinctively homegrown entertainment programming draws audiences from across the country. Deeply rooted in communities, CBC/Radio-Canada offers diverse content in English, French and eight Indigenous languages. We are leading the transformation to meet the needs of Canadians in a digital world. Advertisement LEAVE A REPLY Cancel replyLog in to leave a comment Advertisement Facebook Frankie Drake Mysteries
Advertisement CBC announced broadcast and streaming premiere dates for its fall 2018 lineup of new and returning series featuring a wide range of original programming produced by Canadian creators for Canadian audiences, including a new primetime schedule launching Tuesday, September 18th. In addition to broadcast on television, all programming will also be available to stream live and on demand for free on the CBC TV app for iOs and Android and cbc.ca/watch.KEY HIGHLIGHTS:CBC’s new fall Tuesday night comedy lineup featuring STILL STANDING, THIS HOUR HAS 22 MINUTES and BARONESS VON SKETCH SHOWlaunches Sept. 18Two British comedies added to Tuesdays, will premiere exclusively on CBC in Canada: HANG UPS starring Episodes’ Stephen Mangan and Idris Elba’s IN THE LONG RUNTHE GREAT CANADIAN BAKING SHOW whips up a second season Wednesdays this fall starting Sept. 19True crime series THE DETECTIVES moves to Thursdays, returns Sept. 20New original series IN THE MAKING profiling Canadian artists debuts Fri. Sept. 21ANNE WITH AN E and THE NATURE OF THINGS return Sept. 23, followed by CBC News’ THE FIFTH ESTATE in a new Sunday night timeslot at 9 PMCBC’s Mystery Mondays return Sept. 24 featuring new seasons of MURDOCH MYSTERIES and FRANKIE DRAKE MYSTERIESThe final season of Gerry Dee’s MR. D kicks off Wed. Nov. 7 on a new nightCANADA’S SMARTEST PERSON JUNIOR hosted by Paul Sun-Hyung Lee debuts Wed. Nov. 14Music archive series FROM THE VAULTS hosted by Amanda Parris and Tom Power premieres Thur. Nov. 15All episodes of family adventure drama NORTHERN RESCUE starring William Baldwin and Kathleen Robertson will stream on the CBC TV app and cbc.ca/watch in DecemberCBC’s Fall 2018 primetime schedule launching Tuesday, September 18th:All following times local with the exception of Newfoundland, please add half an hour to all times. Login/Register With: Twitter
[DefaultValueDateTimeMinValue] public DateTime MaxLightAt = DateTime.MinValue; Storing measured data We are now ready to store our measured data. We use the lastMinute field defined earlier to know when we pass into a new minute. We use that opportunity to store the most recent value, together with the basic statistics we’ve calculated: if (!this.lastMinute.HasValue) this.lastMinute = Timestamp.Minute; else if (this.lastMinute.Value != Timestamp.Minute) { this.lastMinute = Timestamp.Minute; We begin by creating an instance of the LastMinute class defined earlier: LastMinute Rec = new LastMinute() { Timestamp = Timestamp, Light = Light, Motion= D8, MinLight = this.minLight, MinLightAt = this.minLightAt, MaxLight = this.maxLight, MaxLightAt = this.maxLightAt }; Storing this object is very easy. The call is asynchronous and can be executed in parallel, if desired. We choose to wait for it to complete, since we will be making database requests after the operation has completed: await Database.Insert(Rec); We then clear our variables used for calculating peak values, to make sure peak values are calculated within the next period: this.minLight = null; this.minLightAt = DateTime.MinValue; this.maxLight = null; this.maxLightAt = DateTime.MinValue; } Removing old data We cannot continue storing new values without also having a plan for removing old ones. Doing so is easy. We choose to delete all records older than 100 minutes. This is done by first performing a search, and then deleting objects that are found in this search. The search is defined by using filters from the Waher.Persistence.Filters namespace: foreach (LastMinute Rec2 in await Database.Find( new FilterFieldLesserThan(“Timestamp”, Timestamp.AddMinutes(-100)))) { await Database.Delete(Rec2); } You can now execute the application, and monitor how the MinuteValues collection is being filled. We created a simple sensor app for the Raspberry Pi using C#. You read an excerpt from the book, Mastering Internet of Things, written by Peter Waher. This book will help you augment your IoT skills with the help of engaging and enlightening tutorials designed for Raspberry Pi 3. Read Next 25 Datasets for Deep Learning in IoT How IoT is going to change tech teams How to run and configure an IoT Gateway [DefaultValueNull] public double? MinLight = null; foreach (int? Value in this.windowA0) { if (Value.HasValue) { if (Value.Value AvgA0) NrGt++; } } If we only have one value on one side, and this value happens to be in the middle of the window, we identify it as a spike and remove it from the window. We also make sure to adjust our average value accordingly: if (NrLt == 1 || NrGt == 1) { v = this.windowA0[spikePos]; if (v.HasValue) { if ((NrLt == 1 && v.Value AvgA0)) { this.sumA0 -= v.Value; this.nrA0–; this.windowA0[spikePos] = null; Array.Copy(this.windowA0, 1, this.windowA0, 0, windowSize – 1); this.windowA0[windowSize – 1] = A0; this.sumA0 += A0; this.nrA0++; AvgA0 = ((double)this.sumA0) / this.nrA0; } } } } Since we remove the spike when it reaches the middle of the window, it might pollute the average of the entire window up to that point. We therefore need to recalculate an average value for the half of the window, where any spikes have been removed. This part of the window is smaller, so the resolution gain is not as big. Instead, the average value will not be polluted by single spikes. But we will still have increased the resolution by a factor of five: int i, n; [DefaultValue(PinState.LOW)] public PinState Motion= PinState.LOW; if (!this.minLight.HasValue || Light this.maxLight.Value) { this.maxLight = Light; this.maxLightAt = Timestamp; } Defining data persistence The last step in this is to store our values regularly. Later, when we present different communication protocols, we will show how to make these values available to users. Since we will use an object database to store our data, we need to create a class that defines what to store. We start with the class definition: [TypeName(TypeNameSerialization.None)] [CollectionName(“MinuteValues”)] [Index(“Timestamp”)] public class LastMinute { [ObjectId] public string ObjectId = null; } The class is decorated with a couple of attributes from the Waher.Persistence.Attributes namespace. The CollectionName attribute defines the collection in which objects of this class will be stored. The TypeName attribute defines if we want the type name to be stored with the data. This is useful, if you mix different types of classes in the same collection. We plan not to, so we choose not to store type names. This saves some space. The Index attribute defines an index. This makes it possible to do quick searches. Later, we will want to search historical records based on their timestamps, so we add an index on the Timestamp field. We also define an Object ID field. This is a special field that is like a primary key in object databases. We need it to be able to delete objects later. You can add any number of indices and any number of fields in each index. Placing a hyphen (-) before the field name makes the engine use descending sort order for that field. Next, we define some member fields. If you want, you can use properties as well, if you provide both getters and setters for the properties you wish to persist. By providing default values, and decorating the fields (or properties) with the corresponding default value, you can optimize storage somewhat. Only members with values different from the declared default values will then be persisted, to save space: [DefaultValueDateTimeMinValue] public DateTime Timestamp = DateTime.MinValue;
[DefaultValue(0)] public double Light = 0; [DefaultValueNull] public double? MaxLight = null; [DefaultValueDateTimeMinValue] public DateTime MinLightAt = DateTime.MinValue; double AvgA0 = ((double)this.sumA0) / this.nrA0; int? v; Removing random spikes We now have a value that is 10 times more accurate than the original, in cases where our ambient light is not expected to vary quickly. This is typically the case, if ambient light depends on the sun and weather. Calculating the average over a short window has an added advantage: it allows us to remove bad measurements, or spikes. When a physical quantity changes, it normally changes continuously, slowly, and smoothly. This will have the effect that roughly half of the measurements, even when the input value changes, will be on one side of the average value, and the other half on the other side. A single spike, on the other hand, especially in the middle of the window, if sufficiently large, will stand out alone on one side, while the other values remain on the other. We can use this fact to remove bad measurements from our window. We define our middle position first: private const int spikePos = windowSize / 2; We proceed by calculating the number of values on each side of the average, if our window is sufficiently full: if (this.nrA0 >= windowSize – 2) { int NrLt = 0; int NrGt = 0; In today’s tutorial, we will look at how to build a sensor application to measure the ambient light. Preparing our Sensor project We will create a new Universal Windows Platform application project. This time, we call it Sensor. We can use the Raspberry Pi 3, even though we will only use the light sensor and motion detector (PIR sensor) in this project. We will also add the latest version of a new NuGet package, the Waher.Persistence.FilesLW package. This package will help us with data persistence. It takes our objects and stores them in a local object database. We can later load the objects back into the memory and search for them. This is all done by analyzing the metadata available in the class definitions, so there’s no need to do any database programming. Go ahead and install the package in your new project. The Waher.Persistence.Files package contains similar functionality, but it performs data encryption and dynamic code compilation of object serializes as well. These features require .NET standard v1.5, which is not compatible with the Universal Windows Platform in its current state. That is why we use the Light Weight version of the same library, which only requires .NET standard 1.3. The Universal Windows Platform supports .NET Standard up to 1.4. For more information, visit https://docs.microsoft.com/en-us/dotnet/articles/standard/library#net-platforms-support. Initializing the inventory library The next step is to initialize the libraries we have just included in the project. The persistence library includes an inventory library (Waher.Runtime.Inventory) that helps with dynamic type-related tasks, as well as keeping track of available types, interfaces and which ones have implemented which interfaces in the runtime environment. This functionality is used by the object database defined in the persistence libraries. The object database figures out how to store, load, search for, and create objects, using only their class definitions appended with a minimum of metadata in the form of attributes. So, one of the first things we need to do during startup is to tell the inventory environment which assemblies it and, by extension, the persistence library can use. We do this as follows: Log.Informational(“Starting application.”); Types.Initialize( typeof(FilesProvider).GetTypeInfo().Assembly, typeof(App).GetTypeInfo().Assembly); Here, Types is a static class defined in the Waher.Runtime.Inventory namespace. We initialize it by providing an array of assemblies it can use. In our case, we include the assembly of the persistence library, as well as the assembly of our own application. Initializing the persistence library We then go on to initialize our persistence library. It is accessed through the static Database class, defined in the Waher.Persistence namespace. Initialization is performed by registering one object database provider. This database provider will then be used for all object database transactions. In our case, we register our local files object database provider, FilesProvider, defined in the Waher.Persistence.Files namespace: Database.Register(new FilesProvider( Windows.Storage.ApplicationData.Current.LocalFolder.Path + Path.DirectorySeparatorChar + “Data”, “Default”, 8192, 1000, 8192, Encoding.UTF8, 10000)); The first parameter defines a folder where database files will be stored. In our case, we store database files in the Data subfolder of the application local data folder. Objects are divided into collections. Collections are stored in separate files and indexed differently, for performance reasons. Collections are defined using attributes in the class definition. Classes lacing a collection definition are assigned the default collection, which is specified in the second argument. Objects are then stored in B-tree ordered files. Such files are divided into blocks into which objects are crammed. For performance reasons, the block size, defined in the third argument, should be correlated to the sector size of the underlying storage medium, which is typically a power of two. This minimizes the number of reads and writes necessary. In our example, we’ve chosen 8,192 bytes as a suitable block size. The fourth argument defines the number of blocks the provider can cache in the memory. Caching improves performance, but requires more internal memory. In our case, we’re satisfied with a relatively modest cache of 1,000 blocks (about 8 MB). Binary Large Objects (BLOBs), that is, objects that cannot efficiently be stored in a block, are stored separately in BLOB files. These are binary files consisting of doubly linked blocks. The fifth parameter controls the block size of BLOB files. The sixth parameter controls the character encoding to use when serializing strings. The seventh, and last parameter, is the maximum time the provider will wait, in milliseconds, to get access to the underlying database when an operation is to be performed. Sampling raw sensor data After the database provider has been successfully registered, the persistence layer is ready to be used. We now continue with the first step in acquiring the sensor data: sampling. Sampling is normally done using a short regular time interval. Since we use the Arduino, we get values as they change. While such values can be an excellent source for event-based algorithms, they are difficult to use in certain kinds of statistical calculations and error-correction algorithms. To set up the regular sampling of values, we begin by creating a Timer object from the System.Threading namespace, after the successful initialization of the Arduino: this.sampleTimer = new Timer(this.SampleValues, null, 1000 – DateTime.Now.Millisecond, 1000); This timer will call the SampleValues method every thousand milliseconds, starting the next second. The second parameter allows us to send a state object to the timer callback method. We will not use this, so we let it be null. We then sample the values, as follows: privateasync void SampleValues(object State) { try { ushort A0 = this.arduino.analogRead(“A0”); PinState D8= this.arduino.digitalRead(8); … } catch (Exception ex) { Log.Critical(ex); } } We define the method as asynchronous at this point, even though we still haven’t used any asynchronous calls. We will do so, later in this chapter. Since the method does not return a Task object, exceptions are not propagated to the caller. This means that they must be caught inside the method to avoid unhandled exceptions closing the application. Performing basic error correction Values we sample may include different types of errors, some of which we can eliminate in the code to various degrees. There are systematic errors and random errors. Systematic errors are most often caused by the way we’ve constructed our device, how we sample, how the circuit is designed, how the sensors are situated, how they interact with the physical medium and our underlying mathematical model, or how we convert the sampled value into a physical quantity. Reducing systematic errors requires a deeper analysis that goes beyond the scope of this book. Random errors are errors that are induced stochastically and are often unbiased. They can be induced due to a lack of resolution or precision, by background noise, or through random events in the physical world. While background noise and the lack of resolution or precision in our electronics create a noise in the measured input, random events in the physical world may create spikes. If something briefly flutters past our light sensor, it might register a short downwards spike, even though the ambient light did not change. You’ll learn how to correct for both types of random errors. Canceling noise Since the digital PIR sensor already has error correction built into it, we will only focus on how to cancel noise from our analog light sensor. Noise can be canceled electronically, using, for instance, low-pass filters. It can also be cancelled algorithmically, using a simple averaging calculation over a short window of values. The averaging calculation will increase our resolution, at the cost of a small delay in the output. If we perform the average over 10 values, we effectively gain one power of 10, or one decimal, of resolution in our output value. The value will be delayed 10 seconds, however. This algorithm is therefore only suitable for input signals that vary slowly, or where a quick reaction to changes in the input stimuli is not required. Statistically, the expected average value is the same as the expected value, if the input is a steady signal overlaid with random noise. The implementation is simple. We need the following variables to set up our averaging algorithm: privateconstintwindowSize = 10; privateint?[] windowA0 = new int?[windowSize]; privateint nrA0 = 0; privateint sumA0 = 0; We use nullable integers (int?), to be able to remove bad values later. In the beginning, all values are null. After sampling the value, we first shift the window one step, and add our newly sampled value at the end. We also update our counters and sums. This allows us to quickly calculate the average value of the entire window, without having to loop through it each time: if (this.windowA0[0].HasValue) { this.sumA0 -= this.windowA0[0].Value; this.nrA0–; } for (AvgA0 = i = n = 0; i 0) { AvgA0 /= n; Converting to a physical quantity It is not sufficient for a sensor to have a numerical raw value of the measured quantity. It only tells us something if we know something more about the raw value. We must, therefore, convert it to a known physical unit. We must also provide an estimate of the precision (or error) the value has. A sensor measuring a physical quantity should report a numerical value, its physical unit, and the corresponding precision, or error of the estimate. To avoid creating a complex mathematical model that converts our measured light intensity into a known physical unit, which would go beyond the scope of this book, we convert it to a percentage value. Since we’ve gained a factor of five of precision using our averaging calculation, we can report two decimals of precision, even though the input value is only 1,024 bits, and only contains one decimal of precision: double Light = (100.0 * AvgA0) / 1024; MainPage.Instance.LightUpdated(Light, 2, “%”); } Illustrating measurement results Following image shows how our measured quantity behaves. The light sensor is placed in broad daylight on a sunny day, so it’s saturated. Things move in front of the sensor, creating short dips. The thin blue line is a scaled version of our raw input A0. Since this value is event based, it is being reported more often than once a second. Our red curve is our measured, and corrected, ambient light value, in percent. The dots correspond to our second values. Notice that the first two spikes are removed and don’t affect the measurement, which remains close to 100%. Only the larger dips affect the measurement. Also, notice the small delay inherent in our algorithm. It is most noticeable if there are abrupt changes: If we, on the other hand, have a very noisy input, our averaging algorithm helps our measured value to stay more stable. Perhaps the physical quantity goes below some sensor threshold, and input values become uncertain. In the following image, we see how the floating average varies less than the noisy input: Calculating basic statistics A sensor normally reports more than the measured momentary value. It also calculates basic statistics on the measured input, such as peak values. It also makes sure to store measured values regularly, to allow its users to view historical measurements. We begin by defining variables to keep track of our peak values: private int? lastMinute = null; private double? minLight = null; private double? maxLight = null; private DateTime minLightAt = DateTime.MinValue; private DateTime maxLightAt = DateTime.MinValue; We then make sure to update these after having calculated a new measurement: DateTime Timestamp = DateTime.Now;
Share Travelweek Group Friday, August 2, 2019 << Previous PostNext Post >> TORONTO — With hurricane season on the minds of many travellers, Saint Lucia’s top hotels and resorts are offering peace of mind with an expansive Hurricane Guarantee program.Originally created in 2018, the program ensures that visitors can book vacations to the island with confidence at any time of year, particularly during the traditional hurricane season, which runs from June 1 through Nov. 30.“Consumer confidence is extremely important to us in Saint Lucia, so the Hurricane Guarantee is in place to assure our visitors that they are covered in the unlikely instance that an established hurricane will alter their travel plans,” said Beverly Nicholson-Doty, Chief Executive Officer of the Saint Lucia Tourism Authority. “Based on history and statistics, the likelihood of a major hurricane landing in Saint Lucia is low but we want our guests to feel confident booking their holiday.”As part of the program, individual hotel groups plus hotel operators associated with the Saint Lucia Hotel and Tourism Association (SLHTA) are offering the Hurricane Guarantee, which covers cancellations made prior to arrival and if a vacation is cut short due to a hurricane.More news: Carnival Cruise Line enhances HUB app for families and youthDetails of the guarantee include:If a hurricane warning is issued by the Saint Lucia Meteorological Service (MET), guests can cancel their hotel reservation without penalty. (“Hurricane” Storm being classified as a hurricane category force storm)Hotel deposits may be applied to any future bookings.Group booking cancellations will be handled on an individual basis in accordance with the group contract.In the event that a member hotel is not able to continue its operations due to damage incurred by a hurricane (as determined by the Saint Lucia Meteorological Service), the member hotel will invite the guest to return for a complimentary stay within one year from the reopening of the member hotel.Nearly two dozen hotels are participating in the program, including: Anse Chastanet, Bay Gardens Resorts (five properties), Bel Jou Hotel, Calabash Cove, Hotel Chocolat, Jade Mountain, The Landings Resort & Spa, Marigot Bay Resort and Marina, Royalton Saint Lucia Resort & Spa, St. James Club Morgan Bay, Ti Kaye Resort & Spa and Windjammer Landing Villa Beach Resort.More news: Virgin Voyages de-activates Quebec accounts at FirstMates agent portalMoreover, the following hotels offer their own individual hurricane policies: BodyHoliday Saint Lucia, Castles in Paradise, Palm Haven, Oasis Marigot and Sandals Resorts (three properties). Terms and details can be found on the individual websites for these hotels.For more information click here.
Posted by Saint Lucia brings back Hurricane Guarantee Tags: Hurricane, Hurricane Guarantee Program, Saint Lucia, Saint Lucia Hotel and Tourism Association
May 16, 2016Congratulations to Molly Almeida upon graduation from her 3 month internship in the Arcosanti Graphics department.Here is Molly with her teacher, Director of Design Tomiaki Tamura.[photo by Sue Kirsch]We are still sorting through lots of photos from the FORM event, will start posting them on Friday, May 20. 2016.