text
stringlengths
1
80.5k
// I initialize the app component.
constructor() {
this.contacts = [];
this.isShowingContacts = false;
this.maxID = 0;
for ( var i = 1 ; i < 50 ; i++ ) {
this.pushContact();
}
}
// ---
// PUBLIC METHODS.
// ---
// I remove a contact from the top of the collection.
public popContact() : void {
this.contacts.shift();
}
// I add a new contact to the bottom of the collection.
public pushContact() : void {
this.contacts.push({
id: ++this.maxID,
name: "Frances McDormand",
avatarUrl: `./app/frances-mcdormand.jpg?id=${ this.maxID }`
});
}
// I toggle the showing of the contact list.
public toggleContacts() : void {
this.isShowingContacts = ! this.isShowingContacts;
}
}
As you can see, instead of using a traditional src attribute, my IMG tag is using the [lazySrc] directive:
<img [lazySrc]="contact.avatarUrl" lazySrcVisible="visible" />
Now, when we load the application and toggle the contact list, we can see from the network activity that only the visible portion of the avatars have loaded:
As you can see from the network activity, only the four visible avatars have actually been loaded over the network. The rest don't get loaded until you scroll them into view, at which time the IntersectionObserver API let's our LazyViewport service know; which, in turn, let's our [lazySrc] directives know.
That is just insanely awesome! And, if we start using the polyfilly, then the code gets even more simple as we can make more assumptions about support and code less defensively.
As a final note, passing around Document Object Model elements is always a little stressful because this is where so many memory leaks have come from historically. As such, I wanted to peek at the memory usage to see how the IntersectionObserver behaves when adding and removing targets. The following graph is Chrome's performance monitoring that I recorded while toggling the contact list into and out of existence.
As you can see, when I toggled the contact list, thereby adding and removing targets to and from the IntersectionObserver, respectively, the memory graph jumped up as we would expect. But, the important part is that when I triggered a Garbage Collection, the baseline memory usage dropped back down to the same level, indicating that there are no values suck in memory purgatory.
I have to say, I am really loving this IntersectionObserver API. It has solid support in the most popular browsers; and, it has polyfills that can be applied in lieu of support. It's going to make lazy-loading of images (and other types of content) so much easier.
Tweet This Provocative thoughts by @BenNadel - Lazy Loading Images With The IntersectionObserver API In Angular 5.0.0 Woot woot — you rock the party that rocks the body!
On October 13, our teams will be performing an extended maintenance to make networking improvements on our servers. This maintenance will affect our Arc platform as well as all pages on our arcgames.com domain and games hosted from our servers that are launched from Arc and other platforms. The following games and services will be inaccessible during maintenance:
Arc Games forums
Arc Games main website, product pages and news pages
Arc Games platform including billing and messaging
Arc Games support websites
Battle of the Immortals
Blacklight Retribution (launched from Arc Games)
Champions Online
Forsaken World
Fortuna
Jade Dynasty
Neverwinter (PC & Xbox One)
PWI
Star Trek Online
Swordsman
War of the Immortals
Additional games launched from Arc Games
We anticipate this maintenance to run from October 13 starting at 6:00 am PT and running to 6:00 pm PT. We will be providing updates via our Arc Twitter page and Facebook page as well as social channels for each of our titles.
We appreciate your patience as we work to improve our platform.
Arc Team
Traditionally, when referring to the president, a certain shorthand is used: the Obama administration, the Bush presidency, the Clinton White House, Reagan’s executive branch, etc. But these phrases are little more than euphemisms. The president, and not his subordinates, is selected by the national electorate. The president, and not his cabinet, is charged directly with the duty of faithful execution. If his underlings obstruct that duty, the president can typically remove—or order to have removed—that
officer. In keeping with the concept of a “unitary” executive, the president’s cabinet, even those confirmed by the Senate, are at bottom extensions of his own power. When these officers speak, they are not speaking strictly for themselves, but on behalf of the president’s executive branch.
President Trump has disrupted this traditional account of Article II. Rather than serving as a “unitary” executive, Trump is something of a “solitary executive,” who is increasingly isolated within his own administration. This dynamic has manifested itself in two ways. First, the President often makes public statements (usually on Twitter) that conflict with positions his administration takes in court pleadings, Federal Register notices, or press releases. I refer to this phenomenon as presidential
dissonance. Second, members of the government have publicly distanced themselves from several of the President’s impromptu missives. Call it presidential isolation. As President Trump continues to isolate himself from his own cabinet, this executive branch can only grind to a painful halt.
Presidential Dissonance
When the president speaks for the nation, he speaks with one voice as the “sole organ” of the United States government. This oft-cited dictum from United States v. Curtiss-Wright Export Corp., originally voiced by Representative John Marshall in 1800, is seldom taken literally. Historically, courts listen to the “sole organ” speak through the form of general policy statements issued by an executive branch agency, or developed by the Justice Department during the course of litigation. However, in the Trump
presidency, courts have looked directly to the President to ascertain the position of the executive branch. Inevitably, this has created conflicts, which have irreparably stalled his agenda.
Trump’s pre-dawn tweet storm in June 2017 concerning the travel ban personifies such presidential dissonance. Throughout the course of this litigation, the Justice Department has assiduously avoided calling the executive order a “travel ban.” Yet President Trump took to Twitter: “the lawyers and the courts can call it whatever they want, but I am calling it what we need and what it is, a TRAVEL BAN!” The Justice Department has insisted that the government’s decision to implement the second executive order
was designed to remedy flaws in the first executive order. In contrast, President Trump tweeted, “The Justice Dept. should have stayed with the original Travel Ban, not the watered down, politically correct version they submitted to S.C.” The Justice Department has taken a fairly conservative approach to the litigation by not asking the Supreme Court for expedited oral arguments. President Trump preempted his lawyers, tweeting “The Justice Dept. should ask for an expedited hearing of the watered down Travel
Ban before the Supreme Court - & seek much tougher version!” As I noted at the time, his “tweets show utter disregard for the Justice Department’s legal strategy,” and “undermines the Solicitor General’s arguments about the nature of the policy.”
In the early days of the travel ban litigation, there was a dispute about whether the initial executive order barred the entry of lawful permanent residents (i.e., green card holders). White House Counsel Don McGahn sent a memorandum to the acting Secretaries of State and Attorney General, as well as the Secretary of Homeland Security, which stated, “to remove any confusion I now clarify that [the ban does] not apply” to “the entry” of “lawful permanent residents.” McGahn instructed the secretaries to
“immediately convey this interpretive guidance to all individuals responsible for the administration and implementation of the Executive Order.” The Ninth Circuit declined to rely on McGahn’s memorandum, stating that “[t]he Government has offered no authority establishing that the White House counsel is empowered to issue an amended order superseding the Executive Order signed by the President and now challenged by the States, and that proposition seems unlikely” (pp. 21-22). Moreover, the court concluded,
the government had not “the White House counsel’s interpretation of the Executive Order is binding on all executive branch officials responsible for enforcing the Executive Order” (p. 22).
Perhaps in a regular scenario, the President could have simply issued a revised executive order. But, for reasons unknown, that was not done. As a result, conflicting signals within the White House resulted in the frustration of the President’s signature policy.
Presidential Isolation
If the President tweets in the Oval Office, and no cares to follow it, does it make a difference? Far from a philosophical thought experiment, such is the dilemma of the solitary executive. There is nothing special about the form of an executive order. Whether the President issues a directive orally, in writing, or even on social media, the effect is the same: subordinates must comply. Sean Spicer, the former White House press secretary, explained: “The president is the president of the United States, so
they’re considered official statements by the president of the United States.”
In the Trump presidency, however, @realDonaldTrump’s ill-considered tweets rarely go into effect. As I noted in May, “the President’s tweets have very short shelf lives, and seldom translate to actual policy.” Increasingly, executive branch officers have distanced themselves publicly from the President’s statements. This separation has resulted in the unprecedented isolation of the commander-in-chief.
Perhaps the clearest illustration of this dynamic was the President’s tweets about a ban on transgender service members. Almost immediately afterwards, the President’s cabinet rejected the proposal. Defense Secretary James Mattis was “appalled,” and stated he would not enforce the directive. The head of the Coast Guard said he would not “break faith” with his transgender personnel. In any other presidency, such open disagreement would be unthinkable, but here, it passed without any disapprobation.
Last week Secretary Mattis walked back President Trump’s “fire and fury” remarks with respect to North Korea. “The rhetoric is up to the president,” the Pentagon chief explained. “This is my rhetoric.” It is remarkable that the Secretary of Defense felt compelled to label the President’s war footing mere “rhetoric,” which he disagrees with. But such is our polity today.
More recently, President Trump’s contemptible remarks concerning both “sides” of the Battle of Charlottesville occasioned widespread repudiation within his own government. The U.S. Joint Chiefs of Staff—the heads of the Navy, Marine Corps, Army and Air Force—each subtweeted their commander-in-chief.
Events in Charlottesville unacceptable & musnt be tolerated @USNavy forever stands against intolerance & hatred...https://t.co/tg0cETibaq — Adm. John Richardson (@CNORichardson) August 13, 2017
The Army doesn't tolerate racism, extremism, or hatred in our ranks. It's against our Values and everything we've stood for since 1775. — GEN Mark A. Milley (@ArmyChiefStaff) August 16, 2017
No place for racial hatred or extremism in @USMC. Our core values of Honor, Courage, and Commitment frame the way Marines live and act. — Robert B. Neller (@GenRobertNeller) August 15, 2017
I stand with my fellow service chiefs in saying we're always stronger together-it's who we are as #Airmen pic.twitter.com/9XxOry93nf — Gen. Dave Goldfein (@GenDaveGoldfein) August 16, 2017
These social media posts, which all rejected racism and hatred, were unmistakably directed at Trump’s bizarre press conference. Indeed, their tweets were not merely contrarian but were intended to protect the well-being of their service members. To that end, a senior White House official told NBC News that the President “went rogue.” In any other context, subordinates that fail to toe the President’s line go “rogue”; by definition, the President himself cannot. But here, it was the sole organ himself that
went outside the bounds of his office and undermined the presidency.
Yet the President invites this isolation. According to Politico, “The president had grown tired of White House lawyers telling him what he could and could not do on the [transgender] ban.” According to an unnamed adviser, with his tweets about the transgender ban, Trump “let his lawyers know that it’s his job to make decisions and their job to figure out how to implement it.” But that’s not how government works. Unless the President and his administration are on the same page, nothing can be implemented.
***
Jack Goldsmith has described President Trump as a “non-unitary” executive, in part because his “senior officials act as if Trump were not the chief executive.” He adds that “[n]ever has a president been so regularly ignored or contradicted by his own officials.” Jack is exactly right. The ultimate consequence of the fractured presidency is no presidency at all. As Trump takes more and more outlandish positions, and his cabinet publicly repudiates those policies, the executive branch will grind to a painful
halt. The President cannot enforce policies on his own; in this isolation, all he can do is tweet.
Sources: Heaps out as Revolution coach
New England has moved on from the longtime coach, who led the club to the MLS Cup final in 2014
The New Revolution have parted ways with head coach Jay Heaps, sources confirmed to Goal on Monday night.
The news comes after a week that saw the Revs suffer a pair of emphatic defeats, including a 7-0 thrashing against with New England down to nine men.
The recent losses effectively took New England out of playoff contention, leaving the Revs seven points behind the sixth-place despite having played one more match.
Article continues below
Hired after the 2011 season to replace longtime coach Stevie Nicol, Heaps spent six seasons in charge of the Revolution, leading New England to an Cup final in 2014, which the Revs lost to the in extra time.
Things have gone downhill for the Revs since that MLS Cup appearance, with a first-round playoff exit in 2015 before the club missed out on the playoffs on goal difference in 2016. New England tried revamping its roster last offseason, bringing in new defenders to help the team return to the playoffs. But the Revs instead have had the worst defense in the Eastern Conference, and a 10-14-5 record.
Rock bottom came Wednesday in a 7-0 loss to . Although the Revs were down to nine men, the blowout served to rip open wounds that had been festering within the organization through what had become another disappointing season. By the end of Saturday's 3-1 loss to Kansas City, it was clear that Heaps' once-ironclad job security in New England had eroded.
With Heaps gone, the pressure will now be on general manager Mike Burns to help turn things around for an organization with a widespread reputation for frugality, unpopular treatment of players and a dismal track of player acquisitions. Burns has been the team's general manager for the past six seasons — he was named to the position at the same time Heaps was hired as head coach — and was the vice president for player personnel for four seasons prior to that. Burns will now be tasked with appointing the
team's first new head coach since 2011.