text:
J.P. Crawford: A Gold Glover at Shortstop… but is it enough?
By Christopher O'Day
Sep 26, 2020; Oakland, California, USA; Seattle Mariners Gold Glove shortstop J.P. Crawford throws the ball to first base. Mandatory Credit: Darren Yamashita-USA TODAY Sports /
OAKLAND, CALIFORNIA – SEPTEMBER 25: J.P. Crawford, Gold Glover winner of the Seattle Mariners hits a base hit. (Photo by Thearon W. Henderson/Getty Images) /
J.P. Crawford is the most recent recipient of the gold glove, taking home the honors for the first time. The question needs to be asked… Is it enough to make him the long term answer at shortstop?
Heading into the winter meetings in 2018, the Seattle Mariners decided to trade away Jean Segura for J.P Crawford. Crawford had entered 2017 as the number 54 prospect in all of baseball, a great fielder with a great arm, and a decent bat.
Throughout his minor league career, he had been a top-five pick, the top shortstop prospect, and the number two prospect in all of baseball.
Yet, his value was diminishing as he failed to produce to expectations throughout 2017 and 2018. Where others may have seen someone who couldn't perform in professional baseball, Jerry Dipoto saw something else. A chance to trade away Segura before his contract extension even kicked in, in exchange for a prospect that could be had for a great price.
Sending away a 29-year-old shortstop who was involved in a midseason fight with his double-play teammate, that had possibly derailed the team's stellar start, for a 23-year-old that was under control through 2024. I'm guessing that Jerry Dipoto would do this 100 out of 100 times if he had the opportunity.
The team now had a legit shortstop prospect set to fill long-empty shoes. At least by anyone that fans wanted filling them. A former top pick/prospect? Sign us up, and let's see what the 23-year-old can do.
We've now seen 600+ plate appearances from Crawford in a Mariners uniform. The youngster is out of prospect status and will be 26 when the 2021 season starts. Is it a big enough sample to make the all-important decision?
Is J.P. Crawford the answer for the Seattle Mariners at shortstop?
Keep him… trade him… Let's take a glimpse at each side of the argument for what to do with J.P. Crawford.

redpajama_set_name: RedPajamaCommonCrawl


Bearded Dragon - Grant the male bearded dragon shares his exhibit at the zoo with the female Puff. Grant came to the zoo in 2002 and is a few years older than Puff who arrived in 2010. They both love crickets to eat but Grant is sometimes lazy and will not chase his meal, but waits to be hand fed. Puff is slightly smaller and has a brighter color than the grey Grant.
Russian Tortoise - The zoo's trio of Russian tortoises share the same exhibit with the bearded dragons. Anastasia, Alfred, and Annabelle get along well with the dragons sharing the space and their diet of vegetables and fruit. Want more information on the Russian Tortoise? Click here to learn more about the care, housing, diet of the Russian Tortoise and more.
When threatened or when establishing territory the bearded dragon flexes muscles in the throat to flare their beard to appear larger.
The bearded dragon can change their color slightly. They can become lighter to regulate temperature or darker to show agitation or illness.
The bearded dragon shows a hand-waving behavior to show submission and head bobbing to show dominance.
The tail of a male Russian tortoise is longer than the female's.
Russian tortoises become sexually mature at 10 years old but will not be full grown until the age of 20-30 years.
The bony portion of the shell is covered with plates (scutes) that offer additional strength and protection.
The bearded dragon is an animal of least concern for extinction. Their populations are stable.
Russian tortoises are vulnerable and their trade is restricted.
There are no threats to the bearded dragon.
Russian tortoises' habitat is being lost to human construction and are hunted to be used in traditional folk medicines as well as the pet trade.


The Office for European Integration (Government of Montenegro) is organising two workshops/info sessions related to the Targeted Call for Proposal, which will be published soon under the Interreg IPA CBC Italy-Albania-Montenegro Programme.
The Targeted Call for Proposals is planned to be launched end of February 2019 and the purpose of these workshops is to raise the capacities of potential beneficiaries (public and local institutions, non-profit organisations) and submission of high quality applications.
The presentations shall be delivered in Montenegrin language. Download the agenda.
The deadline for application is Wednesday, 13.02.2019. Contact mail: dunja.nelevic[at]gsv.gov.me.


This is the second No Limbo Lasso tape that Greg Kushner sent us. Birds Walk South was the band's first demo with Rodney filling in the gaps. My Heart Sings for You…Sort Of is a different guitarist and drummer, and so's the sound. This is more punky, less twangy.
"Compare the early 'Hunger' with the later 'Sally in the Garden' to chart Sue's descent into rock'n'roll hell," says Greg. "You'd swear you were listening to 'Raw Power'-era Iggy!"
Rodney Brent has sent along scans of the booklet that came with this tape, upping the awesome factor here.
Fantastic stuff. Get it here.


text:
Breaking the Record: Public Records Under the North Carolina Public Records Act
Breaking the Record: Public Records Under …
Public records can be important tools for a variety of business purposes. Need to know the winning bid for a similar government project like the one up for bid? Check the records. Need to know whether a business partner or potential customer is mired in lawsuits? Check the records. How about whether someone already has a lien on a piece of business equipment you are looking to buy? Check the records.
What is a public record?
The North Carolina Public Records Act defines a public record as:
All documents, papers, letters, maps, books, photographs, films, sound recordings, magnetic or other tapes, electronic data‑processing records, artifacts, or other documentary material, regardless of physical form or characteristics, made or received pursuant to law or ordinance in connection with the transaction of public business by any agency of North Carolina government or its subdivisions.
In evaluating the scope of the definition of a public record, the North Carolina Supreme Court has stated that the rule as to public records is inclusion, with any exclusion being the exception. In simple terms, public records consist of nearly every "thing" that has to do with a public agency.
What are examples of public records?
Examples of public records that may be useful to a business include the following:
Court records;
Records of bids on government projects;
Motor vehicle accident reports and other records;
Real property tax and conveyance records, including liens;
Election records, including voter registration lists;
Corporate organizational records filed with the Secretary of State;
Government-issued permits and licenses;
State audit reports issued by the state auditor;
Agriculture records, such as hog, fertilizer, and animal health data;
Law enforcement records;
Legislative records; and,
Vital statistics, including birth, death, and marriage certificates as well as divorce and annulment records.
While public agencies can charge fees for the production of certain records, these fees can pale in comparison to the costs of repairing the problems that a public records search would have avoided.
What is an "agency of North Carolina government or its subdivisions"?
Agencies with public records (i.e., public agencies) are broadly defined as "every public office, public officer or official, institution, board, commission, bureau, council, department, authority or other unit of government of the state or of any county, unit, special district or other political subdivision of government." To highlight the breadth of this definition, the North Carolina Court of Appeals has held that the Wake County hospital system is a public agency within the meaning of the public records laws. Even though the hospital is a private, not-for-profit corporation, the County's ownership of hospital premises and the County's control over the approval of the hospital's budget and board members render the hospital a public agency for public records purposes.
How are public records obtained?
Each public agency is responsible for keeping its own public records. Many public agencies have created indexes of computer databases containing public records that include the following:
A list of the data fields;
A description of the format or record layout;
Information as to the frequency with which the database is updated;
A list of any data fields to which public access is restricted;
A description of each form in which the database can be copied or reproduced using the agency's computer facilities; and,
A schedule of fees for the production of copies in each available form.
Public agencies also are responsible for maintaining the safety or integrity of their public records. Public agencies are required to store public records in safe locations to the extent practicable. Records often are kept in fireproof safes, vaults, or other locations, and electronic records frequently are protected through a delineated system used to backup the electronic data.
Since each public agency maintains its own public records, each agency is in a position to respond to a request or "demand" for its public records. The Public Records Act provides that:
Every custodian of public records shall permit any record in the custodian's custody to be inspected and examined at reasonable times and under reasonable supervision by any person, and shall, as promptly as possible, furnish copies thereof upon payment of any fees as may be prescribed by law.
Any person or entity is entitled to inspect public records. Out-of-state businesses and residents have the same inspection rights as North Carolina businesses and residents. The Public Records Act also protects a person requesting public records from having to disclose the purpose or motive for the request. A reason or justification for inspection is not required. Furthermore, even if confidential information is commingled with non‑confidential information, a public agency is not allowed to deny any request for such public records. The agency must undertake the task of separating the confidential information from the public information, and the public agency must bear all costs associated with this separation of non-confidential information.
The specific inspection procedures are set by each public agency, so it is helpful to contact each relevant public agency to discuss its specific inspection parameters. Many public agencies provide some or all of their public records online, and some agencies may be willing to fax such information, if an appropriate fee is paid.
What if access is denied?
In the event a public records request is denied, the party requesting the record is allowed to file a lawsuit in the North Carolina courts to compel the release of the public records. If the court rules that access was denied improperly, it will order the agency to disclose the records. Additionally, the court can order the agency to pay attorneys' fees to the party denied access if the agency acted without "substantial justification in denying access" and if "there are no special circumstances that would make the award of attorneys' fees unjust." Courts, in fact, on numerous occasions have awarded attorneys' fees to persons denied access to public records, and the potential for a public agency to have to pay these costs encourages public agencies to satisfy their obligations under the Public Records Act.
Public records are wonderful tools which, when properly used, can open up a world of information to a person or business. Business owners should take the time to understand the vast nature of public records and how to make use of them.
© 2010 Ward and Smith, P.A.
For further information regarding the issues described above, please contact Alexander C. Dale or Allen N. Trask, III.
This article is not intended to give, and should not be relied upon for, legal advice in any particular circumstance or fact situation. No action should be taken in reliance upon the information contained in this article without obtaining the advice of an attorney.
We are your established legal network with offices in Asheville, Greenville, New Bern, Raleigh, and Wilmington, NC.
Written By Alexander C. Dale and Allen N. Trask, III
Zoning and Land Use Planning
Troubled Waters: Leading Through a Pandemic
Who is the Declarant? And Why Does it Matter?
Can Our Community Association Still Hold its Annual Meeting?


text:
Huang Bokai (Chinese: 黄博凯; born 26 September 1996) is a Chinese athlete specialising in the pole vault. He represented his country at the 2016 Summer Olympics without qualifying for the final.

His personal bests in the event are 5.75 metres outdoors (Doha 2019) and 5.75 metres indoors (Doha 2016).

International competitions

References

1996 births
Living people
Chinese male pole vaulters
Athletes (track and field) at the 2016 Summer Olympics
Olympic athletes of China
Athletes (track and field) at the 2020 Summer Olympics

redpajama_set_name: RedPajamaWikipedia


[A little background information: I put out a sensory bin full of scraps of paper for students to practice their cutting with. Also, we read a book about fall leaves at Morning Meeting today.] When play time rolled around, I walk over and see that, through several trips back and forth, this motivated student has transferred much of the scrap paper from the sensory bin onto the carpet and mixed in fabric leaves and plastic people. Cue my initial cringe at the horrible MESS!
Thankfully, my Pre-K teacher brain kicked in right away after my first gut reaction (which only lasted a few milliseconds, I am proud to say). I asked the student what he was using the items for. He replied that the people were jumping in the leaves (just like in the story we had read earlier).
Rather than squash this play experience and demand he clean it up right away, I accepted the "mess" and entered into the play myself. I suggested students rake the leaves into a pile so they could jump in, which drew more classmates to the play.
Finally (and this is how I REALLY know that I am a Pre-K teacher and have accepted the "mess" as it relates to students' learning and play), I actually suggested that students throw the leaves up in the air, as that is what I like to do with the leaves. So yes, you heard that right, I actually encouraged students to make more of a "mess!" This made for some beautiful action shots that capture the joy of this full-body experience.
How do you honour student learning and play?
Do you find it hard to accept "mess"?


Recently get a lowball bid? Maybe you want to let the world know you don't intend on playing toss-the-bids-back-and-forth. Yeah, we know. Share this meme with your shere today and let the world know... you're serious about a solid buyer and seller experience.


The train between Tiel and Amsterdam takes 1h 20m. On an average weekday, there are 37 trains per day travelling from Tiel to Amsterdam. The journey time may be longer on weekends and holidays; use the search form on this page to search for a specific travel date.
All available trains travelling from Tiel to Amsterdam. To see full schedules, alternative transport and to book your tickets online click here.
Is there a direct train between Tiel and Amsterdam?
No, there is no direct train from Tiel to Amsterdam. However, there are services departing from Tiel and arriving at Amsterdam Centraal via Utrecht Centraal. The journey, including transfers, takes approximately 1h 20m.
How far is it from Tiel to Amsterdam?
The distance between Tiel and Amsterdam is 66 km. The road distance is 83.1 km.
Where do I catch the Tiel to Amsterdam train from?
Tiel to Amsterdam train services, operated by Dutch Railways (NS), depart from Tiel station.
Where does the Tiel to Amsterdam train arrive?
Tiel to Amsterdam train services, operated by Dutch Railways (NS), arrive at Amsterdam Centraal station.
How do I get a train ticket from Tiel to Amsterdam?
Book your Tiel to Amsterdam train tickets online with Loco2 and Loco2.


Just now I killed a thumb-sized cockroach in my bathroom. I stabbed him with an umbrella and crushed him with a garbage can. We were both naked. He died, but in the grand scheme I think it was me that truly lost.
I feel the same way when I kill a bug. On the other hand, sometimes I let them go (not roaches) and then I get the skin crawlies real bad. I let an albino spider with red edges go last night and it's still crawling around in my brain (and my bathroom).


I'm researching a house for a book I'm writing. The house doesn't have a sure year built but it can be assumed to be 1880-1881. I have a possible record that a contractor took out a building permit in 1881. In 1882 a woman bought the home AND the lot for $16,000 through a real estate company. The city directory doesn't show anyone living there before 1882. The house was likely architect designed. What I'm essentially trying to figure out is, given this woman bought BOTH the home and the lot (and there's no record of a public listing then), does this mean the home had a different original owner who commissioned an architect and contractor to build the home and only lived there a year and sold it to this woman (but as I said, the City Directories have nothing before 1882) OR is it possible this woman had the home commissioned and the contractor owned the lot and the house then sold it to her? Is the latter remotely possible? I was under the impression to have a home commissioned by an architect and contractor you first had to own the lot but maybe this isn't so. The third option is the one my boss in real estate told me, that the contractor built the home and then just sold it but the home is so clearly architect designed. Why would a contractor hire an architect to build an extremely custom home to sell? Seeing as speculative building wasn't an idea then, this seems a bit strange.
This is pretty much all the record I have. I might try and see if the City of Detroit still has the 1882 warranty deed but that's about it.
Gosh yes, houses were built on speculation in cities in the 1880's. It was seen as a very quick way to get ahead if you had a few extra thousand bucks.
If a building permit was issued in 1880, it would most likely indicate the owner of the property, assuming the government was as nosy then as it is now. After all, they need to know whose property taxes to raise due to the improvements. If the contractor is the only name on the permit, it very likely could have been a spec house.
I didn't know that there were building departments and inspectors back then.


Forget everything you know about four-stroke outboards. Ours change the game. Completely. They're tougher, smaller, and lighter than any other four-stroke on the water. With a combination of performance and efficiency that will take your time on the water to a whole new level. World class engines, world class support, that's what you get when you buy a Mercury. All recreational Mercury outboard models from the 2.5 - 350hp range now come with 3+3= 6 years of warranty coverage.
44 listing matched your search.


text:
PM Johnson charts Britain's path out of lockdown
m@ldives	25 views May 29, 2020
UK Prime Minister Boris Johnson said Thursday some English schools and shops would reopen from next week as he tried to end a scandal over what police said appeared to be a "minor" lockdown breach by his closest adviser.
Johnson's attempts to navigate Britain through a health disaster that has officially claimed 37,837 lives — second only to the United States — and devastated the economy are being complicated by the cross-country travels of his top aide Dominic Cummings.
The Brexit campaign mastermind has become Johnson's most trusted adviser and one of the chief architects of Britain's coronavirus response plan.
But police ruled Thursday that "there might have been a minor breach of the regulations" when he made a 60-mile (100-kilometre) round-trip in April to a picturesque castle in northern England from a family home where he had been self-isolating with his wife and four-year-old son.
Durham Constabulary said it had closed the case because other Britons who committed similar offences were not being prosecuted retroactively.
Cummings had justified the journey by claiming he had needed to test his eyesight after experiencing COVID-19 symptoms in late March and subsequently developing blurry vision.
But the controversial aide has also sparked fury for relocating his family from London to his parents' house about 260 miles away during the lockdown's strictest phase.
He has insisted the decision was within the government's guidelines because he needed to ensure he had childcare.
Johnson said the police statement vindicated his decision to stand by Cummings during what has turned into arguably the biggest political scandal of his year in office.
"They are not taking any action and I intend to draw a line under it," Johnson told reporters.
'Joyful moment'
The British leader tried to focus the nation's attention instead on his decision to reopen schools for younger children on Monday and for older students on June 15.
People will be able to meet in groups of up to six people in England — and eight people in Scotland — from next week.
Johnson said that would mark the "long-awaited and joyful moment" when people will be able to see "both parents at once, or both grandparents at once" in cases where families live apart.
All shops still solvent after being forced to lock up for 12 weeks can open their doors on June 15.
But the British leader insisted everyone must continue observing social distancing measures and exercise common sense — a policy that government critics argue is being gravely undermined by the premier's rule-breaking aide.
Johnson's most senior adviser — dubbed by some media as Britain's second-most powerful man — staged an unusual press conference Monday in which he made no apologies and blamed the media for misrepresenting his case.
But the police said they had "examined the circumstances surrounding the journey to Barnard Castle… and have concluded that there might have been a minor breach of the regulations that would have warranted police intervention".
'Desperate'
The police findings could still pose a political problem for Johnson later down the line.
More than 40 members of his Conservative party have called on Johnson to part with Cummings and several top Brexit-supporting newspapers have mounted campaigns to force out the adviser they once adored.
Durham police found that Dominic Cummings committed only a "minor" lockdown violation and have closed their investigation. PHOTO: AFP / Justin TALLIS
Some opposition lawmakers seized on the police report to redouble their calls for Cummings to either be fired or to quit.
Labour leader Keir Starmer — until Thursday relatively reserved in his statements — said Johnson has "shown himself to be weak".
"I mean, he's so desperate for this adviser he'll cling on to him through thick and thin," Starmer told the BBC.
The left-wing Mirror newspaper separately accused Johnson of acting in a "Putin-esque" manner by jumping in before government scientists could answer questions about Cummings during Thursday's briefing.
Reporting and photo: AFP
TagsWorld News


text:
Trump Urges People To Boycott 'Woke' Companies: 'We Have More People Than They Do—By Far!'
By Ryan Saavedra
Apr 4, 2021 DailyWire.com
Elijah Nouvelage/Bloomberg via Getty Images
Former President Donald Trump encouraged people late on Saturday evening to boycott companies and organizations that are caving to the political left. The former president made the statement just days after Major League Baseball announced that it was moving the All Star Game and Draft out of Atlanta, Georgia, following democratically-elected Georgia officials' vote to enact a comprehensive new law aimed at securing the state's elections.
"For years the Radical Left Democrats have played dirty by boycotting products when anything from that company is done or stated in any way that offends them," Trump said in a statement. "It is finally time for Republicans and Conservatives to fight back—we have more people than they do—by far!"
"Boycott Major League Baseball, Coca-Cola, Delta Airlines, JPMorgan Chase, ViacomCBS, Citigroup, Cisco, UPS, and Merck," Trump added. "Don't go back to their products until they relent. We can play the game better than them."
Trump said that the left boycotts and scares "companies into submission" and that people must "never submit" and "never give up" otherwise "the Radical Left will destroy our Country."
The statement comes after Major League Baseball announced last week that it was moving the events after because it "opposes restrictions to the ballot box."
The Washington Post noted that the changes that were made to early voting in the state, according to experts, resulted in "expand[ing] the opportunities to vote for most Georgians, not limit[ing] them." The new law requires that a drivers' license or state ID number be given when voting via absentee ballot which is something that 74% of Georgians, including 63% of black Georgians, support. Fox News noted that MLB requires fans to use a photo ID to pick up tickets at Will Call.
Trump also called for boycotting MLB late last week, saying in a statement:
Baseball is already losing tremendous numbers of fans, and now they leave Atlanta with their All-Star Game because they are afraid of the Radical Left Democrats who do not want voter I.D., which is desperately needed, to have anything to do with our elections. Boycott baseball and all of the woke companies that are interfering with Free and Fair Elections. Are you listening Coke, Delta, and all!
MLB pulled the events out of Georgia after Democrat President Joe Biden said last week that he would "strongly support" the league doing so. Biden falsely claimed, "You are going to close a polling place at 5 o'clock when working folks just get off."
The White House was pressed about the matter late last week during a press conference when a reporter asked when Biden would weigh in on the upcoming Olympics in Beijing.
"The President had voiced his support for MLB making a decision about the All-Star Game in Georgia," the reporter said. "I'm wondering, when can we expect a final determination from the President about the United States participating in the Beijing Olympics, given that he said the Chinese President doesn't have a democratic bone in his body?"
"Well, I think the U.S. Olympic Committee would play a big role in—" Psaki deflected.
"But he's weighed in on Major League Baseball here in United States," the reporter responded.
"He actually didn't," Psaki falsely claimed. "I think, I don't know if you heard the, the answer, the question and the answer that happened a few minutes ago where we addressed this, and I answered the question. And I gave you a little more context, but maybe you weren't paying attention to that part."


text:
Affinity Architects Ltd
http://www.affinityarchitects.co.uk/ | Architect
Affinity Architects is a small but creative practice with a big heart that aims to provide exceptional personal service and find design solutions that work for both client and building.
Founded in 2014 by director Melanie Latham just outside the city of Salisbury in Wiltshire we focus on high quality design, specialising in alterations and modern extensions to historic and listed buildings. Melanie is passionate about modern design, but also qualified in historic building conservation and a Registered Conservation Architect with the RIBA, a member of the IHBC and has over 20 years' experience in the construction industry.
As a member of both The Green Register and the AECB, her design solutions will always consider conservation of energy and 'green' building, hand in hand with the conservation of historic building fabric. The aim is to ensure that old buildings find a new lease of life and a forward looking perspective, meeting the challenges of the next generation as they adapt but conserving the qualities of the historic structure.
We love working closely with people to find the best possible solution for their project, and most enjoy solving complex design challenges to suit each unique situation - be that an extension to a listed building, a barn conversion, a straw bale building, or a new build house.
We have good affinity with people, and work hard to find ingenious design solutions that have an affinity with the places they inhabit, and the planet on which we live.
"We worked with Melanie on the design and build of a brand new family house. From the outset, Melanie was a delight to work with and balanced her creative ingenuity with a healthy dose of pragmatism regarding what was possible/affordable. She was also an inspirational voice of reason and calm during an otherwise quite stressful new experience for us…" M Hanbury
"Melanie is a joy to work with - creative, structured, disciplined, reliable and highly personable. Mel is a great listener who works very hard to understand her clients personal requirements, but most critically adds in her own limitless flair and highly original thought - the resulting plans deliver the needs of the client plus features and design elements which the client never thought possible. Mel's designs exceed expectations through satisfying the client's original aims whilst stretching the client in the most constructive and productive way." N Martin
"We have recently finished a delightful Cathedral project with Melanie which has been a joy to work on. As with all historic projects the building imposes a number of constraints. Melanie, as design team leader and contract administrator, has sought to thoroughly understand each of these. The result has been motivated team, a sensitive design, a building that has come back to life, and real sense of achievement from all involved." G Wood
56 North Street, Salisbury, United Kingdom, SP2 0HH
admin@affinityarchitects.co.uk
Click here for information about 'A Straw Bale Adventure'
Click here for information about 'A Victorian Rescue'


text:
#include <AppMain.h>
#include <platform/CHIPDeviceLayer.h>
#include <platform/PlatformManager.h>

#include <app-common/zap-generated/af-structs.h>

#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app/ConcreteAttributePath.h>
#include <app/EventLogging.h>
#include <app/chip-zcl-zpro-codec.h>
#include <app/reporting/reporting.h>
#include <app/util/af-types.h>
#include <app/util/af.h>
#include <app/util/attribute-storage.h>
#include <app/util/util.h>
#include <credentials/DeviceAttestationCredsProvider.h>
#include <credentials/examples/DeviceAttestationCredsExample.h>
#include <lib/core/CHIPError.h>
#include <lib/support/CHIPMem.h>
#include <lib/support/ZclString.h>
#include <platform/CommissionableDataProvider.h>
#include <setup_payload/QRCodeSetupPayloadGenerator.h>
#include <setup_payload/SetupPayload.h>

#include <pthread.h>
#include <sys/ioctl.h>

#include "CommissionableInit.h"
#include "Device.h"
#include "main.h"
#include <app/server/Server.h>

#include <cassert>
#include <iostream>
#include <vector>

using namespace chip;
using namespace chip::Credentials;
using namespace chip::Inet;
using namespace chip::Transport;
using namespace chip::DeviceLayer;
using namespace chip::app::Clusters;

namespace {

const int kNodeLabelSize = 32;
// Current ZCL implementation of Struct uses a max-size array of 254 bytes
const int kDescriptorAttributeArraySize = 254;

EndpointId gCurrentEndpointId;
EndpointId gFirstDynamicEndpointId;
Device * gDevices[CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT];
std::vector<Room *> gRooms;
std::vector<Action *> gActions;

const int16_t minMeasuredValue     = -27315;
const int16_t maxMeasuredValue     = 32766;
const int16_t initialMeasuredValue = 100;

// ENDPOINT DEFINITIONS:
// =================================================================================
//
// Endpoint definitions will be reused across multiple endpoints for every instance of the
// endpoint type.
// There will be no intrinsic storage for the endpoint attributes declared here.
// Instead, all attributes will be treated as EXTERNAL, and therefore all reads
// or writes to the attributes must be handled within the emberAfExternalAttributeWriteCallback
// and emberAfExternalAttributeReadCallback functions declared herein. This fits
// the typical model of a bridge, since a bridge typically maintains its own
// state database representing the devices connected to it.

// Device types for dynamic endpoints: TODO Need a generated file from ZAP to define these!
// (taken from matter-devices.xml)
#define DEVICE_TYPE_BRIDGED_NODE 0x0013
// (taken from lo-devices.xml)
#define DEVICE_TYPE_LO_ON_OFF_LIGHT 0x0100
// (taken from matter-devices.xml)
#define DEVICE_TYPE_POWER_SOURCE 0x0011
// (taken from matter-devices.xml)
#define DEVICE_TYPE_TEMP_SENSOR 0x0302

// Device Version for dynamic endpoints:
#define DEVICE_VERSION_DEFAULT 1

// ---------------------------------------------------------------------------
//
// LIGHT ENDPOINT: contains the following clusters:
//   - On/Off
//   - Descriptor
//   - Bridged Device Basic

// Declare On/Off cluster attributes
DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(onOffAttrs)
DECLARE_DYNAMIC_ATTRIBUTE(ZCL_ON_OFF_ATTRIBUTE_ID, BOOLEAN, 1, 0), /* on/off */
    DECLARE_DYNAMIC_ATTRIBUTE_LIST_END();

// Declare Descriptor cluster attributes
DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(descriptorAttrs)
DECLARE_DYNAMIC_ATTRIBUTE(ZCL_DEVICE_LIST_ATTRIBUTE_ID, ARRAY, kDescriptorAttributeArraySize, 0),     /* device list */
    DECLARE_DYNAMIC_ATTRIBUTE(ZCL_SERVER_LIST_ATTRIBUTE_ID, ARRAY, kDescriptorAttributeArraySize, 0), /* server list */
    DECLARE_DYNAMIC_ATTRIBUTE(ZCL_CLIENT_LIST_ATTRIBUTE_ID, ARRAY, kDescriptorAttributeArraySize, 0), /* client list */
    DECLARE_DYNAMIC_ATTRIBUTE(ZCL_PARTS_LIST_ATTRIBUTE_ID, ARRAY, kDescriptorAttributeArraySize, 0),  /* parts list */
    DECLARE_DYNAMIC_ATTRIBUTE_LIST_END();

// Declare Bridged Device Basic information cluster attributes
DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(bridgedDeviceBasicAttrs)
DECLARE_DYNAMIC_ATTRIBUTE(ZCL_NODE_LABEL_ATTRIBUTE_ID, CHAR_STRING, kNodeLabelSize, 0), /* NodeLabel */
    DECLARE_DYNAMIC_ATTRIBUTE(ZCL_REACHABLE_ATTRIBUTE_ID, BOOLEAN, 1, 0),               /* Reachable */
    DECLARE_DYNAMIC_ATTRIBUTE(ZCL_FEATURE_MAP_SERVER_ATTRIBUTE_ID, BITMAP32, 4, 0),     /* feature map */
    DECLARE_DYNAMIC_ATTRIBUTE_LIST_END();

// Declare Cluster List for Bridged Light endpoint
// TODO: It's not clear whether it would be better to get the command lists from
// the ZAP config on our last fixed endpoint instead.
constexpr CommandId onOffIncomingCommands[] = {
    app::Clusters::OnOff::Commands::Off::Id,
    app::Clusters::OnOff::Commands::On::Id,
    app::Clusters::OnOff::Commands::Toggle::Id,
    app::Clusters::OnOff::Commands::OffWithEffect::Id,
    app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Id,
    app::Clusters::OnOff::Commands::OnWithTimedOff::Id,
    kInvalidCommandId,
};

DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(bridgedLightClusters)
DECLARE_DYNAMIC_CLUSTER(ZCL_ON_OFF_CLUSTER_ID, onOffAttrs, onOffIncomingCommands, nullptr),
    DECLARE_DYNAMIC_CLUSTER(ZCL_DESCRIPTOR_CLUSTER_ID, descriptorAttrs, nullptr, nullptr),
    DECLARE_DYNAMIC_CLUSTER(ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, bridgedDeviceBasicAttrs, nullptr,
                            nullptr) DECLARE_DYNAMIC_CLUSTER_LIST_END;

// Declare Bridged Light endpoint
DECLARE_DYNAMIC_ENDPOINT(bridgedLightEndpoint, bridgedLightClusters);
DataVersion gLight1DataVersions[ArraySize(bridgedLightClusters)];
DataVersion gLight2DataVersions[ArraySize(bridgedLightClusters)];

DeviceOnOff Light1("Light 1", "Office");
DeviceOnOff Light2("Light 2", "Office");

DeviceTempSensor TempSensor1("TempSensor 1", "Office", minMeasuredValue, maxMeasuredValue, initialMeasuredValue);
DeviceTempSensor TempSensor2("TempSensor 2", "Office", minMeasuredValue, maxMeasuredValue, initialMeasuredValue);

DeviceTempSensor ComposedTempSensor1("Composed TempSensor 1", "Bedroom", minMeasuredValue, maxMeasuredValue, initialMeasuredValue);
DeviceTempSensor ComposedTempSensor2("Composed TempSensor 2", "Bedroom", minMeasuredValue, maxMeasuredValue, initialMeasuredValue);

// Declare Bridged endpoints used for Action clusters
DataVersion gActionLight1DataVersions[ArraySize(bridgedLightClusters)];
DataVersion gActionLight2DataVersions[ArraySize(bridgedLightClusters)];
DataVersion gActionLight3DataVersions[ArraySize(bridgedLightClusters)];
DataVersion gActionLight4DataVersions[ArraySize(bridgedLightClusters)];

DeviceOnOff ActionLight1("Action Light 1", "Room 1");
DeviceOnOff ActionLight2("Action Light 2", "Room 1");
DeviceOnOff ActionLight3("Action Light 3", "Room 2");
DeviceOnOff ActionLight4("Action Light 4", "Room 2");

Room room1("Room 1", 0xE001, Actions::EndpointListTypeEnum::kRoom, true);
Room room2("Room 2", 0xE002, Actions::EndpointListTypeEnum::kRoom, true);
Room room3("Zone 3", 0xE003, Actions::EndpointListTypeEnum::kZone, false);

Action action1(0x1001, "Room 1 On", Actions::ActionTypeEnum::kAutomation, 0xE001, 0x1, Actions::ActionStateEnum::kInactive, true);
Action action2(0x1002, "Turn On Room 2", Actions::ActionTypeEnum::kAutomation, 0xE002, 0x01, Actions::ActionStateEnum::kInactive,
               true);
Action action3(0x1003, "Turn Off Room 1", Actions::ActionTypeEnum::kAutomation, 0xE003, 0x01, Actions::ActionStateEnum::kInactive,
               false);

// ---------------------------------------------------------------------------
//
// POWER SOURCE ENDPOINT: contains the following clusters:
//   - Power Source
//   - Descriptor
//   - Bridged Device Basic

DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(powerSourceAttrs)
DECLARE_DYNAMIC_ATTRIBUTE(ZCL_POWER_SOURCE_BAT_CHARGE_LEVEL_ATTRIBUTE_ID, ENUM8, 1, 0),
    DECLARE_DYNAMIC_ATTRIBUTE(ZCL_POWER_SOURCE_ORDER_ATTRIBUTE_ID, INT8U, 1, 0),
    DECLARE_DYNAMIC_ATTRIBUTE(ZCL_POWER_SOURCE_STATUS_ATTRIBUTE_ID, ENUM8, 1, 0),
    DECLARE_DYNAMIC_ATTRIBUTE(ZCL_POWER_SOURCE_DESCRIPTION_ATTRIBUTE_ID, CHAR_STRING, 32, 0), DECLARE_DYNAMIC_ATTRIBUTE_LIST_END();

DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(bridgedPowerSourceClusters)
DECLARE_DYNAMIC_CLUSTER(ZCL_DESCRIPTOR_CLUSTER_ID, descriptorAttrs, nullptr, nullptr),
    DECLARE_DYNAMIC_CLUSTER(ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, bridgedDeviceBasicAttrs, nullptr, nullptr),
    DECLARE_DYNAMIC_CLUSTER(ZCL_POWER_SOURCE_CLUSTER_ID, powerSourceAttrs, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END;

DECLARE_DYNAMIC_ENDPOINT(bridgedPowerSourceEndpoint, bridgedPowerSourceClusters);

DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(tempSensorAttrs)
DECLARE_DYNAMIC_ATTRIBUTE(ZCL_TEMP_MEASURED_VALUE_ATTRIBUTE_ID, INT16S, 2, 0),         /* Measured Value */
    DECLARE_DYNAMIC_ATTRIBUTE(ZCL_TEMP_MIN_MEASURED_VALUE_ATTRIBUTE_ID, INT16S, 2, 0), /* Min Measured Value */
    DECLARE_DYNAMIC_ATTRIBUTE(ZCL_TEMP_MAX_MEASURED_VALUE_ATTRIBUTE_ID, INT16S, 2, 0), /* Max Measured Value */
    DECLARE_DYNAMIC_ATTRIBUTE(ZCL_FEATURE_MAP_SERVER_ATTRIBUTE_ID, BITMAP32, 4, 0),    /* FeatureMap */
    DECLARE_DYNAMIC_ATTRIBUTE_LIST_END();

// ---------------------------------------------------------------------------
//
// TEMPERATURE SENSOR ENDPOINT: contains the following clusters:
//   - Temperature measurement
//   - Descriptor
//   - Bridged Device Basic
DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(bridgedTempSensorClusters)
DECLARE_DYNAMIC_CLUSTER(ZCL_TEMPERATURE_MEASUREMENT_CLUSTER_ID, tempSensorAttrs, nullptr, nullptr),
    DECLARE_DYNAMIC_CLUSTER(ZCL_DESCRIPTOR_CLUSTER_ID, descriptorAttrs, nullptr, nullptr),
    DECLARE_DYNAMIC_CLUSTER(ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, bridgedDeviceBasicAttrs, nullptr, nullptr),
    DECLARE_DYNAMIC_CLUSTER_LIST_END;

// Declare Bridged Light endpoint
DECLARE_DYNAMIC_ENDPOINT(bridgedTempSensorEndpoint, bridgedTempSensorClusters);
DataVersion gTempSensor1DataVersions[ArraySize(bridgedTempSensorClusters)];
DataVersion gTempSensor2DataVersions[ArraySize(bridgedTempSensorClusters)];

// ---------------------------------------------------------------------------
//
// COMPOSED DEVICE ENDPOINT: contains the following clusters:
//   - Descriptor
//   - Bridged Device Basic

// Composed Device Configuration
DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(bridgedComposedDeviceClusters)
DECLARE_DYNAMIC_CLUSTER(ZCL_DESCRIPTOR_CLUSTER_ID, descriptorAttrs, nullptr, nullptr),
    DECLARE_DYNAMIC_CLUSTER(ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, bridgedDeviceBasicAttrs, nullptr, nullptr),
    DECLARE_DYNAMIC_CLUSTER_LIST_END;

DECLARE_DYNAMIC_ENDPOINT(bridgedComposedDeviceEndpoint, bridgedComposedDeviceClusters);
DataVersion gComposedDeviceDataVersions[ArraySize(bridgedComposedDeviceClusters)];
DataVersion gComposedTempSensor1DataVersions[ArraySize(bridgedTempSensorClusters)];
DataVersion gComposedTempSensor2DataVersions[ArraySize(bridgedTempSensorClusters)];
DataVersion gComposedPowerSourceDataVersions[ArraySize(bridgedPowerSourceClusters)];

} // namespace

// REVISION DEFINITIONS:
// =================================================================================

#define ZCL_DESCRIPTOR_CLUSTER_REVISION (1u)
#define ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_REVISION (1u)
#define ZCL_BRIDGED_DEVICE_BASIC_FEATURE_MAP (0u)
#define ZCL_FIXED_LABEL_CLUSTER_REVISION (1u)
#define ZCL_ON_OFF_CLUSTER_REVISION (4u)
#define ZCL_TEMPERATURE_SENSOR_CLUSTER_REVISION (1u)
#define ZCL_TEMPERATURE_SENSOR_FEATURE_MAP (0u)
#define ZCL_POWER_SOURCE_CLUSTER_REVISION (1u)

// ---------------------------------------------------------------------------

int AddDeviceEndpoint(Device * dev, EmberAfEndpointType * ep, const Span<const EmberAfDeviceType> & deviceTypeList,
                      const Span<DataVersion> & dataVersionStorage, chip::EndpointId parentEndpointId = chip::kInvalidEndpointId)
{
    uint8_t index = 0;
    while (index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT)
    {
        if (nullptr == gDevices[index])
        {
            gDevices[index] = dev;
            EmberAfStatus ret;
            while (true)
            {
                // Todo: Update this to schedule the work rather than use this lock
                DeviceLayer::StackLock lock;
                dev->SetEndpointId(gCurrentEndpointId);
                dev->SetParentEndpointId(parentEndpointId);
                ret =
                    emberAfSetDynamicEndpoint(index, gCurrentEndpointId, ep, dataVersionStorage, deviceTypeList, parentEndpointId);
                if (ret == EMBER_ZCL_STATUS_SUCCESS)
                {
                    ChipLogProgress(DeviceLayer, "Added device %s to dynamic endpoint %d (index=%d)", dev->GetName(),
                                    gCurrentEndpointId, index);
                    return index;
                }
                if (ret != EMBER_ZCL_STATUS_DUPLICATE_EXISTS)
                {
                    return -1;
                }
                // Handle wrap condition
                if (++gCurrentEndpointId < gFirstDynamicEndpointId)
                {
                    gCurrentEndpointId = gFirstDynamicEndpointId;
                }
            }
        }
        index++;
    }
    ChipLogProgress(DeviceLayer, "Failed to add dynamic endpoint: No endpoints available!");
    return -1;
}

int RemoveDeviceEndpoint(Device * dev)
{
    uint8_t index = 0;
    while (index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT)
    {
        if (gDevices[index] == dev)
        {
            // Todo: Update this to schedule the work rather than use this lock
            DeviceLayer::StackLock lock;
            EndpointId ep   = emberAfClearDynamicEndpoint(index);
            gDevices[index] = nullptr;
            ChipLogProgress(DeviceLayer, "Removed device %s from dynamic endpoint %d (index=%d)", dev->GetName(), ep, index);
            // Silence complaints about unused ep when progress logging
            // disabled.
            UNUSED_VAR(ep);
            return index;
        }
        index++;
    }
    return -1;
}

std::vector<EndpointListInfo> GetEndpointListInfo(chip::EndpointId parentId)
{
    std::vector<EndpointListInfo> infoList;

    for (auto room : gRooms)
    {
        if (room->getIsVisible())
        {
            EndpointListInfo info(room->getEndpointListId(), room->getName(), room->getType());
            int index = 0;
            while (index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT)
            {
                if ((gDevices[index] != nullptr) && (gDevices[index]->GetParentEndpointId() == parentId))
                {
                    std::string location;
                    if (room->getType() == Actions::EndpointListTypeEnum::kZone)
                    {
                        location = gDevices[index]->GetZone();
                    }
                    else
                    {
                        location = gDevices[index]->GetLocation();
                    }
                    if (room->getName().compare(location) == 0)
                    {
                        info.AddEndpointId(gDevices[index]->GetEndpointId());
                    }
                }
                index++;
            }
            if (info.GetEndpointListSize() > 0)
            {
                infoList.push_back(info);
            }
        }
    }

    return infoList;
}

std::vector<Action *> GetActionListInfo(chip::EndpointId parentId)
{
    return gActions;
}

namespace {
void CallReportingCallback(intptr_t closure)
{
    auto path = reinterpret_cast<app::ConcreteAttributePath *>(closure);
    MatterReportingAttributeChangeCallback(*path);
    Platform::Delete(path);
}

void ScheduleReportingCallback(Device * dev, ClusterId cluster, AttributeId attribute)
{
    auto * path = Platform::New<app::ConcreteAttributePath>(dev->GetEndpointId(), cluster, attribute);
    PlatformMgr().ScheduleWork(CallReportingCallback, reinterpret_cast<intptr_t>(path));
}
} // anonymous namespace

void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask)
{
    if (itemChangedMask & Device::kChanged_Reachable)
    {
        ScheduleReportingCallback(dev, BridgedDeviceBasic::Id, BridgedDeviceBasic::Attributes::Reachable::Id);
    }

    if (itemChangedMask & Device::kChanged_Name)
    {
        ScheduleReportingCallback(dev, BridgedDeviceBasic::Id, BridgedDeviceBasic::Attributes::NodeLabel::Id);
    }
}

void HandleDeviceOnOffStatusChanged(DeviceOnOff * dev, DeviceOnOff::Changed_t itemChangedMask)
{
    if (itemChangedMask & (DeviceOnOff::kChanged_Reachable | DeviceOnOff::kChanged_Name | DeviceOnOff::kChanged_Location))
    {
        HandleDeviceStatusChanged(static_cast<Device *>(dev), (Device::Changed_t) itemChangedMask);
    }

    if (itemChangedMask & DeviceOnOff::kChanged_OnOff)
    {
        ScheduleReportingCallback(dev, OnOff::Id, OnOff::Attributes::OnOff::Id);
    }
}

void HandleDevicePowerSourceStatusChanged(DevicePowerSource * dev, DevicePowerSource::Changed_t itemChangedMask)
{
    using namespace app::Clusters;
    if (itemChangedMask &
        (DevicePowerSource::kChanged_Reachable | DevicePowerSource::kChanged_Name | DevicePowerSource::kChanged_Location))
    {
        HandleDeviceStatusChanged(static_cast<Device *>(dev), (Device::Changed_t) itemChangedMask);
    }

    if (itemChangedMask & DevicePowerSource::kChanged_BatLevel)
    {
        MatterReportingAttributeChangeCallback(dev->GetEndpointId(), PowerSource::Id, PowerSource::Attributes::BatChargeLevel::Id);
    }

    if (itemChangedMask & DevicePowerSource::kChanged_Description)
    {
        MatterReportingAttributeChangeCallback(dev->GetEndpointId(), PowerSource::Id, PowerSource::Attributes::Description::Id);
    }
}

void HandleDeviceTempSensorStatusChanged(DeviceTempSensor * dev, DeviceTempSensor::Changed_t itemChangedMask)
{
    if (itemChangedMask &
        (DeviceTempSensor::kChanged_Reachable | DeviceTempSensor::kChanged_Name | DeviceTempSensor::kChanged_Location))
    {
        HandleDeviceStatusChanged(static_cast<Device *>(dev), (Device::Changed_t) itemChangedMask);
    }
    if (itemChangedMask & DeviceTempSensor::kChanged_MeasurementValue)
    {
        ScheduleReportingCallback(dev, TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::MeasuredValue::Id);
    }
}

EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer,
                                                    uint16_t maxReadLength)
{
    ChipLogProgress(DeviceLayer, "HandleReadBridgedDeviceBasicAttribute: attrId=%d, maxReadLength=%d", attributeId, maxReadLength);

    if ((attributeId == ZCL_REACHABLE_ATTRIBUTE_ID) && (maxReadLength == 1))
    {
        *buffer = dev->IsReachable() ? 1 : 0;
    }
    else if ((attributeId == ZCL_NODE_LABEL_ATTRIBUTE_ID) && (maxReadLength == 32))
    {
        MutableByteSpan zclNameSpan(buffer, maxReadLength);
        MakeZclCharString(zclNameSpan, dev->GetName());
    }
    else if ((attributeId == ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID) && (maxReadLength == 2))
    {
        *buffer = (uint16_t) ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_REVISION;
    }
    else if ((attributeId == ZCL_FEATURE_MAP_SERVER_ATTRIBUTE_ID) && (maxReadLength == 4))
    {
        *buffer = (uint32_t) ZCL_BRIDGED_DEVICE_BASIC_FEATURE_MAP;
    }
    else
    {
        return EMBER_ZCL_STATUS_FAILURE;
    }

    return EMBER_ZCL_STATUS_SUCCESS;
}

EmberAfStatus HandleReadOnOffAttribute(DeviceOnOff * dev, chip::AttributeId attributeId, uint8_t * buffer, uint16_t maxReadLength)
{
    ChipLogProgress(DeviceLayer, "HandleReadOnOffAttribute: attrId=%d, maxReadLength=%d", attributeId, maxReadLength);

    if ((attributeId == ZCL_ON_OFF_ATTRIBUTE_ID) && (maxReadLength == 1))
    {
        *buffer = dev->IsOn() ? 1 : 0;
    }
    else if ((attributeId == ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID) && (maxReadLength == 2))
    {
        *buffer = (uint16_t) ZCL_ON_OFF_CLUSTER_REVISION;
    }
    else
    {
        return EMBER_ZCL_STATUS_FAILURE;
    }

    return EMBER_ZCL_STATUS_SUCCESS;
}

EmberAfStatus HandleWriteOnOffAttribute(DeviceOnOff * dev, chip::AttributeId attributeId, uint8_t * buffer)
{
    ChipLogProgress(DeviceLayer, "HandleWriteOnOffAttribute: attrId=%d", attributeId);

    if ((attributeId == ZCL_ON_OFF_ATTRIBUTE_ID) && (dev->IsReachable()))
    {
        if (*buffer)
        {
            dev->SetOnOff(true);
        }
        else
        {
            dev->SetOnOff(false);
        }
    }
    else
    {
        return EMBER_ZCL_STATUS_FAILURE;
    }

    return EMBER_ZCL_STATUS_SUCCESS;
}

EmberAfStatus HandleReadPowerSourceAttribute(DevicePowerSource * dev, chip::AttributeId attributeId, uint8_t * buffer,
                                             uint16_t maxReadLength)
{
    using namespace app::Clusters;
    if ((attributeId == PowerSource::Attributes::BatChargeLevel::Id) && (maxReadLength == 1))
    {
        *buffer = dev->GetBatChargeLevel();
    }
    else if ((attributeId == PowerSource::Attributes::Order::Id) && (maxReadLength == 1))
    {
        *buffer = dev->GetOrder();
    }
    else if ((attributeId == PowerSource::Attributes::Status::Id) && (maxReadLength == 1))
    {
        *buffer = dev->GetStatus();
    }
    else if ((attributeId == PowerSource::Attributes::Description::Id) && (maxReadLength == 32))
    {
        MutableByteSpan zclDescpitionSpan(buffer, maxReadLength);
        MakeZclCharString(zclDescpitionSpan, dev->GetDescription().c_str());
    }
    else if ((attributeId == PowerSource::Attributes::ClusterRevision::Id) && (maxReadLength == 2))
    {
        uint16_t rev = ZCL_POWER_SOURCE_CLUSTER_REVISION;
        memcpy(buffer, &rev, sizeof(rev));
    }
    else if ((attributeId == PowerSource::Attributes::FeatureMap::Id) && (maxReadLength == 4))
    {
        uint32_t featureMap = dev->GetFeatureMap();
        memcpy(buffer, &featureMap, sizeof(featureMap));
    }
    else
    {
        return EMBER_ZCL_STATUS_FAILURE;
    }

    return EMBER_ZCL_STATUS_SUCCESS;
}

EmberAfStatus HandleReadTempMeasurementAttribute(DeviceTempSensor * dev, chip::AttributeId attributeId, uint8_t * buffer,
                                                 uint16_t maxReadLength)
{
    if ((attributeId == ZCL_TEMP_MEASURED_VALUE_ATTRIBUTE_ID) && (maxReadLength == 2))
    {
        int16_t measuredValue = dev->GetMeasuredValue();
        memcpy(buffer, &measuredValue, sizeof(measuredValue));
    }
    else if ((attributeId == ZCL_TEMP_MIN_MEASURED_VALUE_ATTRIBUTE_ID) && (maxReadLength == 2))
    {
        int16_t minValue = dev->mMin;
        memcpy(buffer, &minValue, sizeof(minValue));
    }
    else if ((attributeId == ZCL_TEMP_MAX_MEASURED_VALUE_ATTRIBUTE_ID) && (maxReadLength == 2))
    {
        int16_t maxValue = dev->mMax;
        memcpy(buffer, &maxValue, sizeof(maxValue));
    }
    else if ((attributeId == ZCL_FEATURE_MAP_SERVER_ATTRIBUTE_ID) && (maxReadLength == 4))
    {
        uint32_t featureMap = ZCL_TEMPERATURE_SENSOR_FEATURE_MAP;
        memcpy(buffer, &featureMap, sizeof(featureMap));
    }
    else if ((attributeId == ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID) && (maxReadLength == 2))
    {
        uint16_t clusterRevision = ZCL_TEMPERATURE_SENSOR_CLUSTER_REVISION;
        memcpy(buffer, &clusterRevision, sizeof(clusterRevision));
    }
    else
    {
        return EMBER_ZCL_STATUS_FAILURE;
    }

    return EMBER_ZCL_STATUS_SUCCESS;
}

EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId,
                                                   const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer,
                                                   uint16_t maxReadLength)
{
    uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint);

    EmberAfStatus ret = EMBER_ZCL_STATUS_FAILURE;

    if ((endpointIndex < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) && (gDevices[endpointIndex] != nullptr))
    {
        Device * dev = gDevices[endpointIndex];

        if (clusterId == ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID)
        {
            ret = HandleReadBridgedDeviceBasicAttribute(dev, attributeMetadata->attributeId, buffer, maxReadLength);
        }
        else if (clusterId == ZCL_ON_OFF_CLUSTER_ID)
        {
            ret = HandleReadOnOffAttribute(static_cast<DeviceOnOff *>(dev), attributeMetadata->attributeId, buffer, maxReadLength);
        }
        else if (clusterId == chip::app::Clusters::PowerSource::Id)
        {
            ret = HandleReadPowerSourceAttribute(static_cast<DevicePowerSource *>(dev), attributeMetadata->attributeId, buffer,
                                                 maxReadLength);
        }
        else if (clusterId == TemperatureMeasurement::Id)
        {
            ret = HandleReadTempMeasurementAttribute(static_cast<DeviceTempSensor *>(dev), attributeMetadata->attributeId, buffer,
                                                     maxReadLength);
        }
    }

    return ret;
}

EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId,
                                                    const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer)
{
    uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint);

    EmberAfStatus ret = EMBER_ZCL_STATUS_FAILURE;

    // ChipLogProgress(DeviceLayer, "emberAfExternalAttributeWriteCallback: ep=%d", endpoint);

    if (endpointIndex < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT)
    {
        Device * dev = gDevices[endpointIndex];

        if ((dev->IsReachable()) && (clusterId == ZCL_ON_OFF_CLUSTER_ID))
        {
            ret = HandleWriteOnOffAttribute(static_cast<DeviceOnOff *>(dev), attributeMetadata->attributeId, buffer);
        }
    }

    return ret;
}

void runOnOffRoomAction(Room * room, bool actionOn, EndpointId endpointId, uint16_t actionID, uint32_t invokeID, bool hasInvokeID)
{
    if (hasInvokeID)
    {
        Actions::Events::StateChanged::Type event{ actionID, invokeID, Actions::ActionStateEnum::kActive };
        EventNumber eventNumber;
        chip::app::LogEvent(event, endpointId, eventNumber);
    }

    // Check and run the action for ActionLight1 - ActionLight4
    if (room->getName().compare(ActionLight1.GetLocation()) == 0)
    {
        ActionLight1.SetOnOff(actionOn);
    }
    if (room->getName().compare(ActionLight2.GetLocation()) == 0)
    {
        ActionLight2.SetOnOff(actionOn);
    }
    if (room->getName().compare(ActionLight3.GetLocation()) == 0)
    {
        ActionLight3.SetOnOff(actionOn);
    }
    if (room->getName().compare(ActionLight4.GetLocation()) == 0)
    {
        ActionLight4.SetOnOff(actionOn);
    }

    if (hasInvokeID)
    {
        Actions::Events::StateChanged::Type event{ actionID, invokeID, Actions::ActionStateEnum::kInactive };
        EventNumber eventNumber;
        chip::app::LogEvent(event, endpointId, eventNumber);
    }
}

bool emberAfActionsClusterInstantActionCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
                                                const Actions::Commands::InstantAction::DecodableType & commandData)
{
    bool hasInvokeID      = false;
    uint32_t invokeID     = 0;
    EndpointId endpointID = commandPath.mEndpointId;
    auto & actionID       = commandData.actionID;

    if (commandData.invokeID.HasValue())
    {
        hasInvokeID = true;
        invokeID    = commandData.invokeID.Value();
    }

    if (actionID == action1.getActionId() && action1.getIsVisible())
    {
        // Turn On Lights in Room 1
        runOnOffRoomAction(&room1, true, endpointID, actionID, invokeID, hasInvokeID);
        commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::Success);
        return true;
    }
    if (actionID == action2.getActionId() && action2.getIsVisible())
    {
        // Turn On Lights in Room 2
        runOnOffRoomAction(&room2, true, endpointID, actionID, invokeID, hasInvokeID);
        commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::Success);
        return true;
    }
    if (actionID == action3.getActionId() && action3.getIsVisible())
    {
        // Turn Off Lights in Room 1
        runOnOffRoomAction(&room1, false, endpointID, actionID, invokeID, hasInvokeID);
        commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::Success);
        return true;
    }

    commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::NotFound);
    return true;
}

void ApplicationInit() {}

const EmberAfDeviceType gBridgedOnOffDeviceTypes[] = { { DEVICE_TYPE_LO_ON_OFF_LIGHT, DEVICE_VERSION_DEFAULT },
                                                       { DEVICE_TYPE_BRIDGED_NODE, DEVICE_VERSION_DEFAULT } };

const EmberAfDeviceType gBridgedComposedDeviceTypes[] = { { DEVICE_TYPE_BRIDGED_NODE, DEVICE_VERSION_DEFAULT } };

const EmberAfDeviceType gComposedTempSensorDeviceTypes[] = { { DEVICE_TYPE_TEMP_SENSOR, DEVICE_VERSION_DEFAULT } };

const EmberAfDeviceType gComposedPowerSourceDeviceTypes[] = { { DEVICE_TYPE_POWER_SOURCE, DEVICE_VERSION_DEFAULT } };

const EmberAfDeviceType gBridgedTempSensorDeviceTypes[] = { { DEVICE_TYPE_TEMP_SENSOR, DEVICE_VERSION_DEFAULT },
                                                            { DEVICE_TYPE_BRIDGED_NODE, DEVICE_VERSION_DEFAULT } };

#define POLL_INTERVAL_MS (100)
uint8_t poll_prescale = 0;

bool kbhit()
{
    int byteswaiting;
    ioctl(0, FIONREAD, &byteswaiting);
    return byteswaiting > 0;
}

const int16_t oneDegree = 100;

void * bridge_polling_thread(void * context)
{
    bool light1_added = true;
    bool light2_added = false;
    while (true)
    {
        if (kbhit())
        {
            int ch = getchar();

            // Commands used for the actions bridge test plan.
            if (ch == '2' && light2_added == false)
            {
                // TC-BR-2 step 2, Add Light2
                AddDeviceEndpoint(&Light2, &bridgedLightEndpoint, Span<const EmberAfDeviceType>(gBridgedOnOffDeviceTypes),
                                  Span<DataVersion>(gLight2DataVersions), 1);
                light2_added = true;
            }
            else if (ch == '4' && light1_added == true)
            {
                // TC-BR-2 step 4, Remove Light 1
                RemoveDeviceEndpoint(&Light1);
                light1_added = false;
            }
            if (ch == '5' && light1_added == false)
            {
                // TC-BR-2 step 5, Add Light 1 back
                AddDeviceEndpoint(&Light1, &bridgedLightEndpoint, Span<const EmberAfDeviceType>(gBridgedOnOffDeviceTypes),
                                  Span<DataVersion>(gLight1DataVersions), 1);
                light1_added = true;
            }
            if (ch == 'b')
            {
                // TC-BR-3 step 1b, rename lights
                if (light1_added)
                {
                    Light1.SetName("Light 1b");
                }
                if (light2_added)
                {
                    Light2.SetName("Light 2b");
                }
            }
            if (ch == 'c')
            {
                // TC-BR-3 step 2c, change the state of the lights
                if (light1_added)
                {
                    Light1.Toggle();
                }
                if (light2_added)
                {
                    Light2.Toggle();
                }
            }
            if (ch == 't')
            {
                // TC-BR-4 step 1g, change the state of the temperature sensors
                TempSensor1.SetMeasuredValue(static_cast<int16_t>(TempSensor1.GetMeasuredValue() + oneDegree));
                TempSensor2.SetMeasuredValue(static_cast<int16_t>(TempSensor2.GetMeasuredValue() + oneDegree));
                ComposedTempSensor1.SetMeasuredValue(static_cast<int16_t>(ComposedTempSensor1.GetMeasuredValue() + oneDegree));
                ComposedTempSensor2.SetMeasuredValue(static_cast<int16_t>(ComposedTempSensor2.GetMeasuredValue() + oneDegree));
            }

            // Commands used for the actions cluster test plan.
            if (ch == 'r')
            {
                // TC-ACT-2.2 step 2c, rename "Room 1"
                room1.setName("Room 1 renamed");
                ActionLight1.SetLocation(room1.getName());
                ActionLight2.SetLocation(room1.getName());
            }
            if (ch == 'f')
            {
                // TC-ACT-2.2 step 2f, move "Action Light 3" from "Room 2" to "Room 1"
                ActionLight3.SetLocation(room1.getName());
            }
            if (ch == 'i')
            {
                // TC-ACT-2.2 step 2i, remove "Room 2" (make it not visible in the endpoint list), do not remove the lights
                room2.setIsVisible(false);
            }
            if (ch == 'l')
            {
                // TC-ACT-2.2 step 2l, add a new "Zone 3" and add "Action Light 2" to the new zone
                room3.setIsVisible(true);
                ActionLight2.SetZone("Zone 3");
            }
            if (ch == 'm')
            {
                // TC-ACT-2.2 step 3c, rename "Turn on Room 1 lights"
                action1.setName("Turn On Room 1");
            }
            if (ch == 'n')
            {
                // TC-ACT-2.2 step 3f, remove "Turn on Room 2 lights"
                action2.setIsVisible(false);
            }
            if (ch == 'o')
            {
                // TC-ACT-2.2 step 3i, add "Turn off Room 1 renamed lights"
                action3.setIsVisible(true);
            }

            // Commands used for the Bridged Device Basic Information test plan
            if (ch == 'u')
            {
                // TC-BRBINFO-2.2 step 2 "Set reachable to false"
                TempSensor1.SetReachable(false);
            }
            if (ch == 'v')
            {
                // TC-BRBINFO-2.2 step 2 "Set reachable to true"
                TempSensor1.SetReachable(true);
            }
            continue;
        }

        // Sleep to avoid tight loop reading commands
        usleep(POLL_INTERVAL_MS * 1000);
    }

    return nullptr;
}

int main(int argc, char * argv[])
{
    // Clear out the device database
    memset(gDevices, 0, sizeof(gDevices));

    // Setup Mock Devices
    Light1.SetReachable(true);
    Light2.SetReachable(true);

    Light1.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
    Light2.SetChangeCallback(&HandleDeviceOnOffStatusChanged);

    TempSensor1.SetReachable(true);
    TempSensor1.SetReachable(true);

    TempSensor1.SetChangeCallback(&HandleDeviceTempSensorStatusChanged);
    TempSensor2.SetChangeCallback(&HandleDeviceTempSensorStatusChanged);

    // Setup devices for action cluster tests
    ActionLight1.SetReachable(true);
    ActionLight2.SetReachable(true);
    ActionLight3.SetReachable(true);
    ActionLight4.SetReachable(true);

    ActionLight1.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
    ActionLight2.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
    ActionLight3.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
    ActionLight4.SetChangeCallback(&HandleDeviceOnOffStatusChanged);

    // Setup composed device with two temperature sensors and a power source
    ComposedDevice ComposedDevice("Composed Device", "Bedroom");
    DevicePowerSource ComposedPowerSource("Composed Power Source", "Bedroom", EMBER_AF_POWER_SOURCE_FEATURE_BATTERY);

    ComposedDevice.SetReachable(true);
    ComposedTempSensor1.SetReachable(true);
    ComposedTempSensor2.SetReachable(true);
    ComposedPowerSource.SetReachable(true);
    ComposedPowerSource.SetBatChargeLevel(58);

    ComposedTempSensor1.SetChangeCallback(&HandleDeviceTempSensorStatusChanged);
    ComposedTempSensor2.SetChangeCallback(&HandleDeviceTempSensorStatusChanged);
    ComposedPowerSource.SetChangeCallback(&HandleDevicePowerSourceStatusChanged);

    if (ChipLinuxAppInit(argc, argv) != 0)
    {
        return -1;
    }

    // Init Data Model and CHIP App Server
    static chip::CommonCaseDeviceServerInitParams initParams;
    (void) initParams.InitializeStaticResourcesBeforeServerInit();

#if CHIP_DEVICE_ENABLE_PORT_PARAMS
    // use a different service port to make testing possible with other sample devices running on same host
    initParams.operationalServicePort = LinuxDeviceOptions::GetInstance().securedDevicePort;
#endif

    initParams.interfaceId = LinuxDeviceOptions::GetInstance().interfaceId;
    chip::Server::GetInstance().Init(initParams);

    // Initialize device attestation config
    SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider());

    // Set starting endpoint id where dynamic endpoints will be assigned, which
    // will be the next consecutive endpoint id after the last fixed endpoint.
    gFirstDynamicEndpointId = static_cast<chip::EndpointId>(
        static_cast<int>(emberAfEndpointFromIndex(static_cast<uint16_t>(emberAfFixedEndpointCount() - 1))) + 1);
    gCurrentEndpointId = gFirstDynamicEndpointId;

    // Disable last fixed endpoint, which is used as a placeholder for all of the
    // supported clusters so that ZAP will generated the requisite code.
    emberAfEndpointEnableDisable(emberAfEndpointFromIndex(static_cast<uint16_t>(emberAfFixedEndpointCount() - 1)), false);

    // Add light 1 -> will be mapped to ZCL endpoints 3
    AddDeviceEndpoint(&Light1, &bridgedLightEndpoint, Span<const EmberAfDeviceType>(gBridgedOnOffDeviceTypes),
                      Span<DataVersion>(gLight1DataVersions), 1);

    // Add Temperature Sensor devices --> will be mapped to endpoints 4,5
    AddDeviceEndpoint(&TempSensor1, &bridgedTempSensorEndpoint, Span<const EmberAfDeviceType>(gBridgedTempSensorDeviceTypes),
                      Span<DataVersion>(gTempSensor1DataVersions), 1);
    AddDeviceEndpoint(&TempSensor2, &bridgedTempSensorEndpoint, Span<const EmberAfDeviceType>(gBridgedTempSensorDeviceTypes),
                      Span<DataVersion>(gTempSensor2DataVersions), 1);

    // Add composed Device with two temperature sensors and a power source
    AddDeviceEndpoint(&ComposedDevice, &bridgedComposedDeviceEndpoint, Span<const EmberAfDeviceType>(gBridgedComposedDeviceTypes),
                      Span<DataVersion>(gComposedDeviceDataVersions), 1);
    AddDeviceEndpoint(&ComposedTempSensor1, &bridgedTempSensorEndpoint,
                      Span<const EmberAfDeviceType>(gComposedTempSensorDeviceTypes),
                      Span<DataVersion>(gComposedTempSensor1DataVersions), ComposedDevice.GetEndpointId());
    AddDeviceEndpoint(&ComposedTempSensor2, &bridgedTempSensorEndpoint,
                      Span<const EmberAfDeviceType>(gComposedTempSensorDeviceTypes),
                      Span<DataVersion>(gComposedTempSensor2DataVersions), ComposedDevice.GetEndpointId());
    AddDeviceEndpoint(&ComposedPowerSource, &bridgedPowerSourceEndpoint,
                      Span<const EmberAfDeviceType>(gComposedPowerSourceDeviceTypes),
                      Span<DataVersion>(gComposedPowerSourceDataVersions), ComposedDevice.GetEndpointId());

    // Add 4 lights for the Action Clusters tests
    AddDeviceEndpoint(&ActionLight1, &bridgedLightEndpoint, Span<const EmberAfDeviceType>(gBridgedOnOffDeviceTypes),
                      Span<DataVersion>(gActionLight1DataVersions), 1);
    AddDeviceEndpoint(&ActionLight2, &bridgedLightEndpoint, Span<const EmberAfDeviceType>(gBridgedOnOffDeviceTypes),
                      Span<DataVersion>(gActionLight2DataVersions), 1);
    AddDeviceEndpoint(&ActionLight3, &bridgedLightEndpoint, Span<const EmberAfDeviceType>(gBridgedOnOffDeviceTypes),
                      Span<DataVersion>(gActionLight3DataVersions), 1);
    AddDeviceEndpoint(&ActionLight4, &bridgedLightEndpoint, Span<const EmberAfDeviceType>(gBridgedOnOffDeviceTypes),
                      Span<DataVersion>(gActionLight4DataVersions), 1);
    gRooms.push_back(&room1);
    gRooms.push_back(&room2);
    gRooms.push_back(&room3);

    gActions.push_back(&action1);
    gActions.push_back(&action2);
    gActions.push_back(&action3);

    {
        pthread_t poll_thread;
        int res = pthread_create(&poll_thread, nullptr, bridge_polling_thread, nullptr);
        if (res)
        {
            printf("Error creating polling thread: %d\n", res);
            exit(1);
        }
    }

    // Run CHIP

    chip::DeviceLayer::PlatformMgr().RunEventLoop();

    return 0;
}

redpajama_set_name: RedPajamaGithub


text:
Review of Las Estaciones (The Seasons) Spanish Video and Cha, cha, cha, Spanish Music CD
Research shows that children who learn a second language exhibit more flexible thinking and creativity, have stronger listening skills, and score better on standardized tests. And what dad wouldn't want that for his kids? The Whistlefritz programs (videos and CDs) use a playful combination of live-action, animation, music, skits and more to start exposing your children to Spanish. And the Whistlefritz folks know that parents are the best teachers, dads (and moms) are encouraged to participate as well. It's a great way to have fun with the kids–and you'll learn a little something too. Ages 3 years and up.
Mr. Dad
A colorful clever collection of Spanish songs for children performed by award-winning singer and songwriter Jorge Anaya, Whistlefritz's latest release is a delightful mix of lively Latin rhythms that everyone will enjoy listening to and moving to the beat. Samba to Las Vocales (The Vowels), cha cha to Los Números (The Numbers), and polka to Que Llueva (Let it Rain). Cha, cha, cha makes learning Spanish exhilirating, educational, and fun! Celebrate the vibrant sounds of Spanish, at home and in the classroom! A collection of catchy, upbeat originals – plus well-known, popular favorites such as La Cucaracha, El Barco Chiquito, Los Elefantes, and Bingo. Cha, cha, cha is a fun, festive introduction to Spanish vocabulary. Dance, sing, and enjoy learning the letters of the alphabet, numbers, parts of the body, articles of clothing, and more. This is a dynamic, multi-sensory learning method, inspiring kids to get on their feet, clap, jump, and move while singing the days of the week. A translation guide is included, providing an easy reference for parents and teachers. A great way to expand vocabulary and become bilingual.
Dr. Toy
K-Gr 4–The Latin rhythms of this high-energy compilation of 14 traditional and original Spanish language songs will have listeners dancing and singing along. Jorge Anaya's clear and pleasant voice makes it easy to understand the Spanish lyrics. English translations for each song are included in the pamphlet, but instead of paraphrasing the songs, each song is translated word-for-word, helping listeners learn specific Spanish vocabulary. The arrangement and performance of traditional songs such as "B-I-N-G-O," "Los Elefantes," and "La Cucuracha" encourage participation. Most impressive however, are the original songs covering a multitude of topics such as "Las Vocales (The Vowels)," "Los Meses (The Months)," and "Los Números (Numbers)." These songs do a superb job of introducing fundamental topics while incorporating movement. For example, "Los Dias de la Semana (Days of the Week)" encourages listeners to raise their arms on Monday, jump on one foot on Tuesday, etc. The musicianship and the production values are excellent. It is refreshing to have a Spanish language CD for children that is fun for adults too! A great tool for preschool Spanish/bilingual story times and a welcome addition to any library's foreign language collection for young children.
Caitlyn Walsh, Fayetteville Public Library, AR
Founded in 2006, the children's Spanish language company Whistlefritz was started by a mom who wanted to teach her own children Spanish. Frustrated by the lack of high-quality Spanish immersion programs, she decided to create her own Spanish Videos and CDs for children. Cha, cha, cha is Whistlefritz's second CD for kids (there are also three videos), and with it, families can learn to cantar (sing), bailar (dance), and aprender (learn) Spanish. The CD is a lively collection of Spanish songs performed by the award-winning singer and songwriter Jorge Anaya. Children explore educational concepts through a plethora of Latin rhythms, as in the Samba of "Las Vocales" (The Vowels), the cha cha of "Los Números" (The Numbers), and the polka of "Que Llueva" (Let it Rain). Cha, cha, cha is a load of fun, and along the way it makes learning Spanish exhilarating and alive. The CD features a collection of upbeat originals, as well as popular and traditional favorites such as "La Cucaracha," "El Barco Chiquito," "Los Elefantes," and "Bingo." Children can dance and sing as they learn vocabulary words, the alphabet, and numbers in Spanish. A handy translation guide is included, which provides an easy reference for parents and teachers who may be first-time Spanish learners, themselves.
Parents' Choice Foundation


Wondering when we can get oil to your home? Here is our delivery schedule to help you plan ahead to help you avoid a fuel run-out. Need a little help? Check out ordering oil to determine how much fuel you should order.
*Holidays will delay your delivery by one day.


Boxed set of 10 Disposable Plastic, 5 oz., Clear Champagne Flutes.
4 Disposable plastic, 4 oz. Clear Champagne Glasses. Comes in 2 separate pieces.
Get your Bubbly On with the Original RedNek Champagne Flutes! Make all yer friends jealous when you raise your glass at the next shindig. Celebrate in high flautin' style. Enjoy all beverages Redneck style, not just for Champagne. Made in USA, includes screw on lids, dishwasher safe, and individually retail boxed. 12 ounces Each, Set of 2. Priced for the set of 2.
10 Disposable plastic, 5 oz. Elegant Deluxe Champagne Flutes. Comes in 2 separate pieces.
This set of two champange glasses (21 cl, 7.25 oz), made in partnership with Royal Leerdam in The Netherlands using only raw materials of the highest quality to produce elegant, functional and crystal clear glass. Set combines optimal drinking enjoyment with contemporary design preserves the bouquet and taste. Dishwasher safe.
Made in Colombia with quality raw materials and exported to more than 30 countries.


The Square Peg Show promotes Controller Freaks by celebrating* and bashing certain video-game movies and movie-based video games, after discussing with our guest Brandon (returning from season one!) some upcoming flicks. All this, plus a pantheon of kaiju, bad director boxing matches, inexplicable weapon-tossing, and practical four-armed guys.
Stuff we mentioned on the show: the music video; Cracked's "Six Insane Sequels That Almost Ruined Classic Movies," and lists of DC animated movies and their great shorts (a lot of those can be found on YouTube; here are the recent Bruce Timm and Darwyn Cooke ones).


text:
Attributed to Johann Liss, German, c. 1597–1631, The Vision of Saint Jerome, c. 1629, Oil on canvas, 81 x 61 in., Saint Vincent Archabbey Collection, Gift of King Ludwig I of Bavaria. Photo: Richard Stoner.
Lauded as the most important German Baroque artist of the 17th century, Johann Liss is noted for his dramatic compositions rendered with vibrant color. Based on the only known official commission the artist received for the Venetian church of San Nicolò da Tolentino, this painting is slightly smaller in size than that its Venetian predecessor. Over a dozen other iterations of this painting can be found in European and American collections; testifying to the admiration a subsequent generation of artists maintained well after Liss' death.
The Archabbey's painting brims with symbols from the hagiography of Saint Jerome commonly employed by artists of this period. The 4th century Doctor of the Church is said to have befriended a lion after removing a thorn from the beast's paw, seen here reclining beneath him. Saint Jerome is depicted loosely clad indicating the severity of his penitence as a desert hermit. While the role of cardinal had not been formed until several centuries after his death, Jerome served as an adviser to Pope Damascus I, thus a winding red cloth and galero, or wide-brimmed hat donned by clergy, symbolize this common mis-attribution. Putti hold an open book referencing Jerome's translation of the Bible into Latin, later to become the official scriptural text of the Roman Catholic Church.


text:
Q: Why doesn't gphoto2 trigger in time I want to remote-controle my DSLR with an Ubuntu-PC and make a timelapse-video. I found out, that i should use gphoto2 for that. But i've got a problem with it.I type into the terminal:
gphoto2 --capture-image -F 10 -I 5

Thereby gphoto2 should take 10 Pictures with a interval of 5 seconds. But now gphoto2 sometimes needs more time than 5 seconds for one picture and it sometimes doesn't trigger before 6 to 8 seconds. For a timelapse-video thats very bad of course.
But that's not a problem of the shutter speed. The shutter speed is only a split second. When i trigger by myself on the camera the picture is saved in approx. half a second and the camera is ready to take the next picture. But gphoto2 calculates up and down and saves something and needs much more time for one photo.
Is it possible to turns this fuss?
I'd be very thankful if you could help me.
btw: I'm using 13.10, the cmera is a Canon EOS 700d (Canon EOS Rebel T5i) and it's attached to my pc via the included USB-cble.

redpajama_set_name: RedPajamaStackExchange