James Reads


Week of Mar 17th, 2019

  • Trevor Noah Isn’t Buying Conservative Arguments Against Reparations

    Reparations have become a hot-button topic in the 2020 election, as more than a few of the growing legion of Democratic candidates pledge to address persistent racial inequities with some form of accounting—including possible compensation for descendants of slaves.

    Read at 10:02 am, Mar 23rd

  • A Flight Attendant's Immigration Nightmare

    This post contains references to products from one or more of our advertisers. We may receive compensation when you click on links to those products. For an explanation of our Advertising Policy, visit this page. UPDATE: Selene Saavedra Roman has been freed. Read the story here.

    Read at 09:56 am, Mar 23rd

  • Joe Biden Is Hillary Clinton 2.0 — Democrats Would Be Mad to Nominate Him

    Have the Democrats gone mad? Are they really planning on putting up the same type of candidate against Donald Trump in 2020 that they put up against him in 2016? Is the party bent on nominating Hillary 2.0?

    Read at 09:49 am, Mar 23rd

  • Democratic Socialists of America back Bernie: 'The best chance to beat Trump'

    The Democratic Socialists of America has officially endorsed Bernie Sanders for president, with the organization throwing its growing political clout behind the Vermont senator ahead of the 2020 election.

    Read at 09:43 am, Mar 23rd

  • 'Change Is Closer Than We Think.' Inside Alexandria Ocasio-Cortez's Unlikely Rise

    Every 10 minutes or so, someone knocks on the big wooden door of Alexandria Ocasio-Cortez’s office on Capitol Hill. The noise makes staffers stiffen. It’s almost always a harmless fan, one of dozens who arrive each day, leaving neon-colored Post-it notes as devotional offerings.

    Read at 06:28 pm, Mar 22nd

  • Doomed Boeing Jets Lacked 2 Safety Features That Company Sold Only as Extras

    As the pilots of the doomed Boeing jets in Ethiopia and Indonesia fought to control their planes, they lacked two notable safety features in their cockpits. One reason: Boeing charged extra for them.

    Read at 06:15 pm, Mar 22nd

  • Nazis Have Always Been Trolls

    The coward who gunned down 49 Muslim worshippers in New Zealand left behind a white-nationalist screed rationalizing his mass murder as a necessary act to preserve the white race. The manifesto is striking for its trolling—its combination of fanaticism, insincerity, and attempts at irony.

    Read at 06:09 pm, Mar 22nd

  • How Trump is on track for a 2020 landslide

    President Donald Trump has a low approval rating. He is engaging in bitter Twitter wars and facing metastasizing investigations.

    Read at 06:05 pm, Mar 22nd

  • Joe Biden Weighing Unique Steps to Reassure Voters Concerned About His Age

    Former Vice President Joseph R. Biden Jr., aware that concerns about his age could weigh on his candidacy if he runs for the White House, has discussed two steps that could reassure voters about electing a 78-year-old president next year. Mr.

    Read at 05:59 pm, Mar 22nd

  • Scoop: Biden advisers debate Stacey Abrams as out-of-the-gate V.P. choice

    Close advisers to former Vice President Joe Biden are debating the idea of packaging his presidential campaign announcement with a pledge to choose Stacey Abrams as his vice president. Biden's position on the issue couldn't be learned — we were just told about the advisers' debate.

    Read at 09:39 am, Mar 22nd

  • There are plenty of good reasons to do open source for free

    We recently covered a post on TideLift’s blog1, where Havoc Pennington makes the argument that open source has a working-for-free problem.

    Read at 09:38 am, Mar 22nd

  • A complete guide to threads in Node.js

    Many people wonder how a single-threaded Node.js can compete with multithreaded back ends. As such, it may seem counterintuitive that so many huge companies pick Node as their back end, given its supposed single-threaded nature.

    Read at 09:36 am, Mar 22nd

  • Doug Jones wants federal probe into disinformation tactics in his race

    Alabama Sen. Doug Jones is calling for a federal investigation into online tactics used in his Senate race last year that mimicked Russian election meddling, the Democrat said in an interview on Thursday.

    Read at 09:20 am, Mar 22nd

  • Leaked Memo Shows Kickstarter Senior Staffers Are Pushing Back Against Colleagues' Union Efforts

    Tuesday afternoon, a contingent of Kickstarter employees went public with their intention to unionize under the name Kickstarter United.

    Read at 09:18 am, Mar 22nd

  • Facebook Stored Hundreds of Millions of User Passwords in Plain Text for Years

    Hundreds of millions of Facebook users had their account passwords stored in plain text and searchable by thousands of Facebook employees — in some cases going back to 2012, KrebsOnSecurity has learned.

    Read at 08:32 am, Mar 22nd

  • Joe Rogan’s Galaxy Brain

    On Feb. 7, on the 1,241st episode of his podcast, comedian Joe Rogan kicked off a discussion of one of the signal injustices of our time: the deplatforming of jerks on the internet.

    Read at 08:27 am, Mar 22nd

  • Michael Steinhardt, a Leader in Jewish Philanthropy, Is Accused of a Pattern of Sexual Harassment

    Sheila Katz was a young executive at Hillel International, the Jewish college outreach organization, when she was sent to visit the philanthropist Michael H. Steinhardt, a New York billionaire. He had once been a major donor, and her goal was to persuade him to increase his support.

    Read at 09:58 pm, Mar 21st

  • Instagram Is the Internet’s New Home for Hate

    When Alex, now a high-school senior, saw an Instagram account he followed post about something called QAnon back in 2017, he’d never heard of the viral conspiracy theory before. But the post piqued his interest, and he wanted to know more.

    Read at 09:43 pm, Mar 21st

  • In Defense of YAML

    If you follow me on Twitter, you may think I hate YAML. I'm not against YAML, just against abuse of YAML. I want to help prevent people  abusing YAML and being cruel to themselves and their coworkers in the process.

    Read at 04:56 pm, Mar 21st

  • A surprising number of people trust AI to make better policy decisions than politicians

    The Center for the Governance of Change at Spain’s IE University polled 2,500 adults in the UK, Spain, Germany, France, Ireland, Italy, and the Netherlands in January.

    Read at 11:32 am, Mar 21st

  • Stepping Into the Uncanny, Unsettling World of Shen Yun

    Just as it is impossible for me to articulate with any certainty the moment I entered adulthood or began to believe that human life on Earth would not last past the twenty-second century, I cannot tell you when I first became aware of Shen Yun.

    Read at 09:43 am, Mar 21st

  • Nunes sues Twitter, some users, seeks over $250M alleging anti-conservative 'shadow bans,' smears

    California GOP Rep.

    Read at 09:28 am, Mar 21st

  • Brexit: Theresa May to discuss next steps after Bercow ruling

    Prime Minister Theresa May will meet her cabinet later as she considers her next steps on Brexit, after her plans were thrown into doubt by the House of Commons Speaker, John Bercow. Mrs May had been considering a third vote on her Brexit deal, which has already been rejected twice.

    Read at 09:22 am, Mar 21st

  • WordPress Ends Support for PHP 5.2 – 5.5, Bumps Minimum Required PHP Version to 5.6

    WordPress has officially ended support for PHP 5.2 – 5.5 and bumped its minimum required PHP version to 5.6. The plan announced last December was to bump the minimum required version in early 2019 and, depending on the results, bump it again to PHP 7 in December 2019. Sites on PHP 5.

    Read at 09:19 am, Mar 21st

  • Chrome Lite Pages

    Twitter Facebook Twitter Facebook

    Read at 07:13 pm, Mar 20th

  • Amazon and Union at Odds Over Firing of Staten Island Warehouse Worker

    Amazon’s plan for a major corporate presence in New York ran headlong into concerns about the company’s labor practices in the city. The giant project fell apart, but the labor friction lives on.

    Read at 06:54 pm, Mar 20th

  • Facebook Won’t Let Employers, Landlords or Lenders Discriminate in Ads Anymore

    ProPublica is a nonprofit newsroom based in New York. Sign up for ProPublica's Big Story newsletter to receive stories like this one in your inbox as soon as they are published.

    Read at 06:49 pm, Mar 20th

  • Beto, Biden and Bernie: The B-Boys and the media’s dangerous, self-fulfilling prophecy

    As amorous embraces go, few could be more ardent than the one Beto O’Rourke got this month from Vanity Fair magazine.

    Read at 06:46 pm, Mar 20th

  • No, really, George W. Bush lied about WMDs

    The best estimates available suggest that more than 250,000 people have died as a result of George W. Bush and Tony Blair's decision to invade Iraq in 2003.

    Read at 06:43 pm, Mar 20th

  • 10 HTML Elements You Didn't Know You Needed

    I’ve heard the sentiment “HTML is easy” more times than I can count. And while I would agree that HTML is perhaps easier to learn than other programming languages, you shouldn’t take it for granted.

    Read at 06:40 pm, Mar 20th

  • The Supreme Court's 5-4 Ruling on Indefinite Detention of Noncitizens Is Appalling

    It is profoundly wrong to believe that, just because the president* is a vulgar talking yam, his policies are not succeeding in several important places.

    Read at 06:38 pm, Mar 20th

  • O’Rourke’s sprint out of the gate leaves Democratic field gasping

    With no day job, the Texas Democrat's breakneck pace of campaign stops is driving some of his competitors nuts. PLYMOUTH, N.H.

    Read at 06:34 pm, Mar 20th

  • You are not a commodity

    I’ll be going to [a coding boot camp].

    Read at 09:23 am, Mar 20th

  • Kickstarter’s CEO, Perry Chen, is resigning

    Kickstarter CEO and co-founder Perry Chen has resigned from his role as chief executive of the company. Chen wrote in a blog post today that he will remain chairman of Kickstarter’s board, and that he intends to focus on “high-level and long-term company needs” from that position.

    Read at 09:20 am, Mar 20th

  • Kickstarter co-founder Perry Chen resigns as CEO after employees announce they're unionizing

    Kickstarter co-founder Perry Chen announced Monday that he is stepping down as CEO following the announcement that staff at the company will attempt to form a union. The news came hours after staff announced that they would form a union.

    Read at 09:20 am, Mar 20th

  • Kickstarter CEO Perry Chen steps down

    Kickstarter CEO Perry Chen issued an open letter on the site’s blog today, noting that he will be stepping down from his role. The executive served as one of three cofounders for the service, launching the site in 2009, with Yancey Strickler and Charles Adler.

    Read at 09:19 am, Mar 20th

  • Should I Report a Do-Nothing Co-Worker?

    I work in a department of about 10 people, within a smaller team of four people. The culture is relaxed, even more so as you accrue seniority. One of my teammates, who has been here for many years, has managed to adjust her schedule to be present for only 7.

    Read at 09:19 am, Mar 20th

  • HBO Theranos doc's director: Elizabeth Holmes is like Steve Jobs, Scientology

    It would be easy to compare Alex Gibney's new HBO documentary The Inventor: Out for Blood in Silicon Valley with the recent films about the failed Fyre Festival. All involve a certain glee that comes with watching the wealthy and powerful lie and get their comeuppance.

    Read at 09:15 am, Mar 20th

  • Atlanta’s Big Transit Vote Is a Referendum on Race

    On March 19, voters in Gwinnett County, to the northeast of Atlanta, will decide on whether to approve a possible rail extension and a lot of better bus routes.

    Read at 09:11 am, Mar 20th

  • A Homepage for the JavaScript Specification – Mozilla Hacks : the Web developer blog

    Ecma TC39, the JavaScript Standards Committee, is proud to announce that we have shipped a website for following updates to the JavaScript specification. This is the first part of a two-part project aimed at improving our information distribution and documentation.

    Read at 10:43 pm, Mar 19th

  • Introducing the OpenJS Foundation: The Next Phase of JavaScript Ecosystem Growth

    After six months of careful consideration and an immense amount of community feedback and collaboration, the Node.js Foundation and the JS Foundation are merging to form the OpenJS Foundation.

    Read at 10:28 pm, Mar 19th

  • Open source has a working-for-free problem

    It's a necessary part of open source that we do some work for free. But when it is an expectation—or at least a strong norm—to do everything for free, we have a problem. Look around. We do have a problem, and it’s time we do something about it.

    Read at 10:26 pm, Mar 19th

  • Only 7 Black Students Got Into Stuyvesant, N.Y.’s Most Selective High School, Out of 895 Spots

    Only a tiny number of black students were offered admission to the highly selective public high schools in New York City on Monday, raising the pressure on officials to confront the decades-old challenge of integrating New York’s elite public schools.

    Read at 10:18 pm, Mar 19th

  • Kickstarter’s staff is unionizing

    The staff of Kickstarter announced plans to unionize today. If recognized, Kickstarter would be the first major tech company with union representation in the United States. Members of the union, which goes by Kickstarter United, say they want to improve inclusivity and transparency at the company.

    Read at 10:05 pm, Mar 19th

  • Canary in a Coal Mine: How Tech Provides Platforms for Hate

    As I write this, the world is sending its thoughts and prayers to our Muslim cousins.

    Read at 10:02 pm, Mar 19th

  • Why Obama Didn’t Cure White Supremacy, Explained

    For all their faults, there is one thing both ultra-conservatives and super-progressive black radicals can both agree on: Barack Obama made America worse. Right-wingers will attest that Obama did not do as much for Black America as their great purveyor of equality and tolerance, Donald Trump.

    Read at 02:11 pm, Mar 19th

  • How We Improved Composer Support For Our Premium Plugins Again

    Composer is my go-to method of managing free plugins in WordPress sites. However, managing premium plugins is a little more tricky.

    Read at 09:36 am, Mar 19th

  • A Quick Introduction to WordPress’ Date/Time Component

    At WordCamp Nordic’s contributor day I had the opportunity to chat with Andrey “Rarst” Savchenko about WordPress’ Date/Time component, the code that manages date, time, and timezone functionality.

    Read at 09:33 am, Mar 19th

  • The Whole Spreadsheets as Databases Thing is Pretty Cool

    Actiondesk looks interesting in that it's in the category of a modern take on the power of spreadsheets. While it's connected to a database in that it looks like it can yank in data from something like MySQL or PostgreSQL, it doesn't look like it has database-like read/write APIs.

    Read at 09:32 am, Mar 19th

  • How Wall Street’s Bankers Stayed Out of Jail

    On May 27, in her first major prosecutorial act as the new U.S. attorney general, Loretta Lynch unsealed a 47-count indictment against nine FIFA officials and another five corporate executives. She was passionate about their wrongdoing.

    Read at 09:28 am, Mar 19th

  • Why Tech Didn't Stop the New Zealand Attack From Going Viral

    At least 49 people were murdered Friday at two mosques in Christchurch, New Zealand, in an attack that followed a grim playbook for terrorism in the social media era.

    Read at 10:37 pm, Mar 18th

  • Writing Resilient Components

    When people start learning React, they often ask for a style guide. While it’s a good idea to have some consistent rules applied across a project, a lot of them are arbitrary — and so React doesn’t have a strong opinion about them.

    Read at 10:18 pm, Mar 18th

  • Ilhan Omar: We must apply our universal values to all nations. Only then will we achieve peace.

    Since I began my first term in Congress, I have sought to speak openly and honestly about the scale of the issues our country faces — whether it is ending the crippling burden of student debt, tackling the existential threat of climate change or making sure no one in one of the richest countries i

    Read at 10:02 pm, Mar 18th

  • Elegance / fuzzy notepad

    Programmers sometimes like to compliment code as elegant, yet I can’t recall ever seeing a satisfying explanation of what “elegant code” is. Perhaps it’s telling that I see “elegant” used much less often by more experienced programmers, who opt for more concrete commentary.

    Read at 09:53 pm, Mar 18th

  • Python Application Dependency Management in 2018

    We have more ways to manage dependencies in Python applications than ever. But how do they fare in production? Unfortunately this topic turned out to be quite polarizing and was at the center of a lot of heated debates. This is my attempt at an opinionated review through a DevOps lens.

    Read at 09:34 pm, Mar 18th

  • Slack hands over control of encryption keys to regulated customers

    Slack announced today that it is launching Enterprise Key Management (EKM) for Slack, a new tool that enables customers to control their encryption keys in the enterprise version of the communications app. The keys are managed in the AWS KMS key management tool.

    Read at 06:50 pm, Mar 18th

  • New York City Gets An 'F' When It Comes To Awarding City Contracts To Black-Owned Businesses, According To City Comptroller 

    New York City sucks when it comes to awarding contracts to women and minority-owned businesses, according to the city comptroller office’s grading scale, as detailed in its 2018 report.

    Read at 06:49 pm, Mar 18th

  • Pressure is mounting on food delivery app DoorDash to change its controversial tipping policy

    For a moment, it seemed like the food delivery app DoorDash would get away largely unscathed over allegations that it was pocketing its workers’ tips. Now, with an official investigation and a tech worker boycott, there’s a growing problem for the company over its tipping policies.

    Read at 06:44 pm, Mar 18th

  • Amazon lobbies to exempt employees from labor protections

    OLYMPIA, Wash. (AP) — Many of Amazon’s Seattle-area employees would be exempt from new labor protections in a bill passed by the state Senate after lobbyists for the tech giant pushed to change a key threshold in the rules.

    Read at 03:02 pm, Mar 18th

  • Optimize What?

    Silicon Valley is full of the stupidest geniuses you’ll ever meet. The problem begins in the classrooms where computer science is taught.

    Read at 03:00 pm, Mar 18th

  • “Go Live in a Cave if You’re Really Anti-Capitalist:” On Having a Smartphone and Hating Capitalism Too

    Whether or not you consider yourself anti-capitalist, you’ve probably heard that tired retort that socialists regularly encounter: “If you hate capitalism so much, why do you have a smartphone? If you were really against capitalism, you’d become an off-the-grid caveman instead of participating

    Read at 09:27 am, Mar 18th

  • Deploy WordPress Plugins from GitHub to the WordPress.org Plugin Repository

    10up has released a GitHub Action that enables developers to deploy to the WordPress.org Plugin repository by tagging a new version on GitHub.

    Read at 09:23 am, Mar 18th

  • Our Union Is the Only Morale Booster That Job Has: The campaign at CallUs

    CallUs (not the real business name) is a call center in the Midwest with roughly 750 employees. We spoke to three workers who have been part of an organizing effort there at various times.

    Read at 09:23 am, Mar 18th

  • Virtual filesystems in Linux: Why we need them and how they work

    What is a filesystem? According to early Linux contributor and author Robert Love, "A filesystem is a hierarchical storage of data adhering to a specific structure." However, this description applies equally well to VFAT (Virtual File Allocation Table), Git, and Cassandra (a NoSQL database).

    Read at 09:16 am, Mar 18th

  • Sorry to bother you, but do you say “sorry” too much? What to say instead

    When we needlessly apologize, we end up making ourselves small and diminish what we’re trying to express, says sociologist Maja Jovanovic. This post is part of TED’s “How to Be a Better Human” series, each of which contains a piece of helpful advice from someone in the TED community.

    Read at 11:54 am, Mar 17th

  • Types are moving to the right

    If you take a look at statically-typed programming languages that are still popular today but were designed in the previous century, before the turn of the millennium, you’d notice that most of them and, at the same time, the more popular and mainstream ones, like C (circa 1972), C++ (1985), and J

    Read at 11:49 am, Mar 17th

  • Cory Booker Joins Senate Republicans to Kill Measure to Import Cheaper Medicine From Canada

    Bernie Sanders introduced a very simple symbolic amendment Wednesday night, urging the federal government to allow Americans to purchase pharmaceutical drugs from Canada, where they are considerably cheaper. Such unrestricted drug importation is currently prohibited by law.

    Read at 11:48 am, Mar 17th

  • What the Fork, Amazon?

    Sharone Revah Zitzman Sharone Zitzman is a marketing technologist and open source community builder, who likes to work with teams building products that developers love.

    Read at 11:28 am, Mar 17th

  • Making money with licenses

    I’m often asked about the role of licenses in open source: e.g. would a commercial license help pay maintainers for their work? I figured I should write a quick post summarizing my thoughts. Disclaimer: broadly speaking, I’m always in favor of running more experiments.

    Read at 11:06 am, Mar 17th

  • Coalition threatens to back more insurgent Democrats against incumbents

    A group that helped Alexandria Ocasio-Cortez defeat veteran Rep. Joe Crowley is threatening to back other insurgents against Democrats in the Assembly next year, The Post has learned.

    Read at 10:58 am, Mar 17th

  • Why Japan Is So Strict About Drugs

    If you’re in Japan, keep this mantra in mind: Never do drugs in this country. Ever. As previously reported, actor and musician Pierre Taki was arrested earlier this week on suspected cocaine use. What happened next seemed inevitable.

    Read at 10:52 am, Mar 17th

  • When Elon Musk Tried to Destroy a Tesla Whistleblower

    It started with a Twitter meltdown and ended with a fake mass shooter. A former security manager says the company also spied and spread misinformation. The world, that is, except Elon Musk.

    Read at 10:52 am, Mar 17th

  • Fearing for his life

    Ramsey Orta and Eric Garner were deciding where to eat when the police approached. Orta immediately raised his cellphone and hit record. He’d been doing that a lot lately.

    Read at 10:27 am, Mar 17th

  • if statements and for loops in CSS

    I am likely going to write a “CSS for JavaScripters” book, and therefore I need to figure out how to explain CSS to JavaScripters. This series of article smippets are a sort of try-out — pre-drafts I’d like to get feedback on in order to figure out if I’m on the right track.

    Read at 10:00 am, Mar 17th

  • Socialism, Internationalism, and the Climate Crisis

    What we need is an internationalist movement, rooted in local democracy and grassroots empowerment, that can forge new alliances to take on the challenge that faces us. There is a growing understanding that our current economic system is driving the climate crisis.

    Read at 09:58 am, Mar 17th

  • Tips & Tricks for Gatsby

    For some time now I've been trying to publish quick tips about Gatsby on Twitter, because the community loves such short, useful tips.

    Read at 09:31 am, Mar 17th

  • Catholic Bishops Stopped My Surgery Because I’m Transgender | American Civil Liberties Union

    After years of working to affirm my identity in a world where transgender people are questioned constantly about their decisions, I felt hopeful as I arrived for the surgery I had waited so long for. I was 27, and I would finally be closer to calling my body home. Since I was a kid, I’ve felt like my body didn’t match my soul. I felt uncomfortable in clothes. I felt disgusting when I showered. Everything felt wrong, but it took me a while to figure out why. Once I discovered that I am a man, I went to my doctor to start the process of medically transitioning. I began taking testosterone. I had a double mastectomy. The next step was a hysterectomy. My surgery was scheduled for Aug. 30, 2017, at St. Joseph Hospital in Eureka, California. It’s the only hospital in the area, and I was so excited that my community offered transgender care. I could get the operation close to home and then recover with my loved ones. I had a pre-op appointment on Aug. 24 that went smoothly, and I followed all the instructions to prepare for my surgery. On Aug. 30, I arrived at the hospital and they checked me in and did the surgery prep, which was extremely uncomfortable and triggering. I was given a pink gown. I asked the nurse if I could have a blue gown, but she told me I was having a “female surgery” and should wear the pink. I felt like a child all over again, sitting uncomfortably in a pink dress. But I forced myself to do it, I had been waiting so long for this. They hooked me up to an IV to get ready to put me to sleep. About an hour after waiting, my surgeon finally came to get me. But when I saw the look on his face, I got a terrible feeling. He told me my surgery was canceled. It was denied by the Catholic Church for ethical reasons. I didn’t understand how this could be happening. The Catholic bishops didn’t approve of my surgery. It seemed unreal. I had an anxiety attack and thought about all the pre-op and mental preparedness I had to go through just to get here. I freaked out and started crying. I was given medication to calm me down. Fifteen minutes after that, the hospital staff asked me to leave. I still had booties on my feet as a nurse led me outside. I felt humiliated and queasy as I sat on the curb waiting for my roommate to pick me up. It seems the hospital does not understand how it feels to be treated inhumanely just because your body parts do not match your soul. This surgery was important — it was meant to balance my hormones. The delay disrupted my life. I felt like the hospital’s bigotry had set me back years. Today, with the help of the ACLU, I filed a lawsuit. It’s unfair for St. Joseph to deny me care because I’m a transgender man. I should be able to go to the hospital where I live. Life in Humboldt County has been tough enough. Everyone thinks it’s a liberal place, but it’s not for trans people. I am regularly harassed and called names. I didn’t expect discrimination from a hospital. The sting from the rejection remains, but I hope my story lets others know that this is unacceptable. And we should continue to fight until we are all treated fairly. No one should be denied health care because of who they are. Source: Catholic Bishops Stopped My Surgery Because I’m Transgender | American Civil Liberties Union

    Read at 04:18 pm, Mar 21st

  • React Training: React Router v5

    Expert React training from the creators of React Router and Reach UISource: React Training: React Router v5

    Read at 02:34 pm, Mar 21st

  • NYU Journalism School Hires Ex-New Yorker Fact Checker Who Falsely Said ICE Agent Had Nazi Tattoo

    NYU Journalism School Hires Ex-New Yorker Fact Checker Who Falsely Said ICE Agent Had Nazi Tattoo Talia Lavin’s undergraduate course “Reporting on the Far Right” will kick off in the fall semester of 2019 Jon Levine | March 20, 2019 @ 9:08 AM New York University has hired Talia Lavin as an adjunct journalism professor less than a year after the former New Yorker fact checker resigned after falsely accusing an Immigration and Customs Enforcement agent of having a Nazi tattoo. Lavin’s undergraduate course “Reporting on the Far Right” will kick off in the fall semester of 2019 at NYU’s Arthur L. Carter Journalism Institute. In its official faculty bio, the university billed Lavin as an expert in “far-right extremism and social justice.” At least one current NYU journalism student questioned the decision to hire Lavin. “I sympathize with Lavin’s politics, but I don’t know why someone who had to quit their journalism job for falsely implying someone is a Nazi should be teaching at NYU,” said the student, who requested anonymity for fear of academic reprisal. “I know there are plenty of reporters out there in need of work who haven’t made a mistake like that.” Lavin declined to comment for this story. Reps for NYU, the school’s journalism department and university president Andrew Hamilton did not respond to requests for comment. Also Read: Media Matters Hires Ex-New Yorker Fact Checker Who Falsely Said ICE Agent Had Nazi Tattoo After leaving the New Yorker last June, Lavin was hired by the liberal media watchdog group Media Matters for America less than a month later to focus on “far right extremism.” Though her LinkedIn profile lists that she currently works there, a spokesperson for the organization confirmed that she was no longer employed there. An additional person with knowledge of the matter said she left several months ago. Neither Lavin’s three-year tenure at the New Yorker nor her stint at Media Matters are mentioned on her official NYU faculty bio. /30981161/TheWrapRemnantOOP Lavin’s career promptly blew up last June after she accused Justin Gaertner, a wheelchair-bound ICE agent, of having a Nazi Iron Cross tattoo over his left elbow. Lavin made the charge in a tweet after viewing a photo of Gaertner online. She later deleted her tweet after she said a number of people responded and informed her that the tattoo in question appeared to be a Maltese Cross — a symbol commonly used by members of the U.S. Veterans of Foreign Wars. Also Read: Media Matters Says No Boycott for Joy Reid, Blasts 'Right-Wing Chicanery' That, however, was not enough for the critics. The story blew up on social media and Lavin even earned a lengthy rebuke from ICE itself as well as The New Yorker. “The personal social-media accounts of staff members do not represent the magazine, and we in no way share the viewpoint expressed in this tweet,” a magazine spokesperson told National Review. “The tweet has been deleted, and we deeply regret any harm that this may have caused Mr. Gaertner.” In a Twitter thread, Lavin soon announced her resignation from the magazine and apologized to Gaertner over the error. She also criticized ICE, saying it was not “acceptable” for the agency to attack her personally over her mistake. “This has been a wild and difficult week. I owe ICE agent Justin Gaertner a sincere apology for spreading an rumor about his tattoo,” she said. “However, I do not think it is acceptable for a federal agency to target a private citizen for a good faith, hastily rectified error.” Source: NYU Journalism School Hires Ex-New Yorker Fact Checker Who Falsely Said ICE Agent Had Nazi Tattoo

    Read at 01:51 pm, Mar 21st

  • How to Use Sass and Styled Components in a React JS Application | Tim Smith

    Today we will be covering a few popular methods to style our React JS applications such as Styled Components and Sass to explain the benefits of both. There is a battle raging in the online development community about whether or not people should be using CSS-in-JS, or CSS-in-Javascript. This post is not to agree or disagree with any of those viewpoints, but rather to give an introduction so you can decide for yourself. The two tools we'll be covering today are Styled Components, which is a CSS-in-JS library that makes it easy to implement in a React js project. The other tool is called Sass, which has been a popular tool for the past few years in the javascript world. For each example, we'll be creating a social card component with an image, username, timestamp, user photo, and status. It should also be noted that these aren't React specific. You could use these in Vuejs, Angular, or anything else you're building in javascript. Why Do People Argue Over CSS-in-JS? The primary reason for the debate has to do with separation of concerns. Is it better to write our styles right inside our component? Should we keep our styles separate from our javascript? I don't know that there is necessarily a "correct" answer. I'm sure there are use cases where each is more appropriate, although I find myself reaching for Sass more often. Let's get into each a bit more so you can decide which you prefer! CSS-in-JS The concept of CSS-in-JS started making waves when it was discussed in 2014. Since then, many different libraries have been created to try and make this concept a reality. A few of these libraries are: Styled Components, Radium, Aphrodite, or Emotion. I will be using Styled Components in this post, although I'd suggest checking out each of these since each has it's own syntax and works a bit differently. The documentation for each of these is pretty good to learn the basics and see which feels most comfortable. Installing Styled Components Assuming we already have a React js project set up, we can add Styled Components to the project by running npm install styled-components or yarn add styled-components in the terminal. This will add the dependencies to the project and get us ready to style our application. Creating a Card with Styled Components The next step will be to create a component to show our card. We can use the code below to do this: Let's talk about the code above. You'll probably see some stuff that looks familiar if you're comfortable with CSS and you'll see some stuff that looks a bit weird. Styled Components lets us write styles just like we would in a CSS file, although some other CSS-in-JS libraries would require us to use Camel Casing because it's actually just creating a javascript object. What the code above is doing is creating a const variable called Card which says that styled should create a div with the following properties. This can be done for any DOM element, so if you wanted to style an h1 tag you would use styled.h1. Adding Media Queries and Nesting Inside of the Card variable, we can also drop in media queries to make things a bit more responsive. If we add a media query like the code below, you can see that when we reach a max-width of 1000px the card background turns red. This isn't a style we actually want to add, it's just for demonstration purposes. We can also nest our styles inside of the styled component, which simplifies the code we're writing. If you have used sass or less, you are already familiar with this concept. The example below shows how we can do this to handle styles for the image in our card component: Using Javascript in Styles Another benefit of using CSS-in-JS is that we can mix javascript with styles. I realize this sounds kind of obvious from the concept name, but what I mean is that we can use logic to display things and we can pass variables into our styles. This can become a very powerful tool with a library like React js. We won't keep this style since it's a bit obnoxious, but for the purposes of illustration we can do this with string literals like so: Using CSS-in-JS allows us to keep styles local instead of everything being global or having to add a ton of classes to everything to make it work. This means things can be more concise and we don't have to worry about one style overriding another. In addition, it means we always know where to look if we need to change the style. We don't have to go rooting around in a bunch of CSS files looking for a class. To do this, we should import the ThemeProvider component from styled-components and provide a theme variable. The theme variable will contain any global variables we wish to use with our styles. For instance, if you have a primary color you are using for the navbar, buttons, and links, it doesn't make sense to hardcode that in every time you want to use it. Using a Global Theme What if you have to update it someday? That sounds like a lot of search and replace waiting to happen. Instead we can declare the global theme variable and access it from any of our styled components. Doing so is pretty simple and is illustrated below. These theme variables can be used in any of our components since the ThemeProvider is wrapped around our entire application. We can then add a styled component to wrap our site in which will take care of all of the global styles such as typography, input styles, and other things that should be standard across all pages. To demonstrate this, let's add some global styles and some content for our social card. The code below adds the necessary content to the social card and also adds a few global styles to be applied to text. This is obviously a pretty basic example but it's a simple way to get our feet wet with Styled Components. There are also some more in-depth things we can do with it, which we can learn about in the documentation. Styled Components are very nice because it allows us to throw our styles in the same file as our component rather than opening several different files to find the correct styles. Here is what our finished social card with Styled Components looks like: Using Sass in a React Application Sass was created several years ago and was originally implemented in applications built using Ruby. In recent years, it has been adapted to work with Node.js which is how we will be using it today. You may notice that we are creating "scss" files but calling it sass. This is because Sass was originally created with a certain syntax which is actually known as "Sass". Later an alternative syntax was created to closer resemble CSS, and this is called "Scss". Because Scss has the same functionality of Sass, it still falls into the category of Sass. It is generally pretty simple to get up and running with Sass in a React js application, although it does make a difference how you go about bundling or compiling your application. In the code for this tutorial, I will be using Parcel js which is pretty easy to get up and running and handles the Sass for us. There are other libraries which are sometimes necessary such as node-sass, gatsby-plugin-sass, or next-sass. Setting Up Our Sass Files There are a few different ways to use Sass within a React js application. The first would be to create a component in a folder and include the styles for the component as a .scss file within that folder and import them directly into the component. I have done it this way and have found it to be easy but I didn't care for the organization so much. An alternative is to create a Sass folder within our project and this is where our styles will live. This is the organizational method we will be using today. That being said, we will create a folder in the project called "Sass" and add a file called "app.scss". While we could put all of our styles into this app.scss file, that would get messy and wouldn't provide much benefit over normal CSS. Instead, we will create separate files and just import them into the app.scss file. We can then import the app.scss file into our app.js file and Parcel will do the rest. Structure of Sass Folder There are lots of different opinions on how to organize the folder with our styles. We could spend a TON of time going down a rabbit hole of organizational techniques, but I find that the way I like to do it is to organize my Sass folder the same as my project. Typically this would translate out to having the following layout: /Sass /Components - A directory which has a .scss file for each React component /Pages - A directory which has a .scss file for each page that requires custom styles /Templates (optional) - A directory for templates if using them (for tools such as gatsby) /_elements.scss - Any generic styles for the site. Shouldn't have any classes or ids for selectors. /_keyframes.scss (optional) - Any keyframes or animations I will be using for the site. /_mixins.scss - Any mixins (style snippets) that will be used over and over /_variables.scss - Any variables that will be used throughout styles /app.scss - The file that imports all other scss files The first thing you may notice about the file names is that several of them start with an underscore. This is because outside of node, Sass is actually compiled to a CSS file. Any SCSS file without an underscore at the beginning is compiled as a different stylesheet. Since we are pulling all of our stylesheets into the app.scss file rather than separating them out, they should all start with an underscore. Since our application is only one social media card, we won't need all of these. For the sake of simplicity while explaining this, we will be using the app.scss, the _variables.scss, and the _elements.scss files as well as the components directory. That being said, let's get started! Setting up variables in Sass Since we have some variables in our Styled Components styles, we can go ahead and set them up here too. To do this, create a file called _variables.scss in the Sass file for our styles. Inside of the _variables.scss file, add the following code. Once we have some variables added, we should import this into the app.scss file. Since we want to use these variables anywhere in our styles, this import should be toward the top of the import list. The following line of code will add the variables to our styles. We can also see that we don't have to include the underscore or file extension in the import statement because Sass is smart enough to know that's what we mean. Creating global styles for elements We created some global styles for our styled components application which set our font to a sans-serif font and set the color of our text to #333. Let's go ahead and create those styles in Sass too. To start, we will create a _elements.scss file in our Sass folder. Below are the styles I'm using for this file and you will notice that I'm using the variables that we created just like we did with the styled components. Now we can import the _elements.scss file into our app.scss file. See if you can do it without looking. Our app.scss file should now look like this: Adding Classes to Elements in Component So we can target the elements in our React js component, we should add some classes and/or ids. CSS frameworks like Boostrap and Foundation require a lot of classes which can get pretty messy. My favorite code is the code that doesn't have 30+ classes on an element for styles, so with that in mind let's go ahead and add some classes to our component with the code below: Awesome! Let's start styling our component! Inside the Sass folder, create a new folder called "components". This folder will hold the styles for all of our React js components. Typically, I would put each component into it's own file, this is a pretty simple application so we will keep it in the app.js file. We can set up styles the same way as our styled components since Sass can also handle nesting and media queries as well. Since our import statement will occur after the variables import in app.scss, we can use anything that was imported before this file. This is useful with mixins, which are code snippets that you can reuse. You can even create a sort of function where you pass in an argument and use that throughout the mixin code. The code below will style the social card to look the same as our styled components social card: Now we can go ahead and write the import statement in the app.scss file so we are pulling in the styles for the card. And just like that, here is the final Social Card component with our sass styles. It looks the same as the component did in Styled Components. Final thoughts on Sass vs Styled Components As you can see, both Sass and Styled Components are valuable ways to supercharge styles in React js applications. Ultimately, I think that you should use the one that you enjoy using the most. I find myself reaching for Sass more often, but I also enjoy using CSS-in-JS in some of my personal projects. If you'd like the code referenced in this post to look at or play around with, it can be found here.Source: How to Use Sass and Styled Components in a React JS Application | Tim Smith

    Read at 03:01 pm, Mar 20th

  • Ocarina Of Time Is Now Playable In Co-Op

    The Legend of Zelda: Ocarina Of Time is one of the quintessential singleplayer video game experiences. But now, thanks to the work of some modders, it can also be played with another Link there to fight alongside you.Beginning development last year, OoT Online is an effort by a small team of fans to transform the Zelda classic into something that runs on a server, with friends able to team up like Nintendo went back in time to 1996 and started granting wishes.And it works! As you can see in the video below, two players are able to run around the world and just do their own thing, entering and leaving areas and picking their own fights.Video: BSoD GamingThose fights are only against the AI at the moment though, with no PvP enabled, though the team are looking at implementing that in the future.OoT Online is still very much in development—there are plans to support up to 15 players at once—but you can follow its progress here at the team’s Twitch channel.Thanks Zach!Source: Ocarina Of Time Is Now Playable In Co-Op

    Read at 10:21 am, Mar 19th

  • Warren, Harris, Gillibrand back efforts to add justices to Supreme Court | TheHill

    Three Democratic presidential candidates are saying they’re willing to consider adding justices to the Supreme Court as a response to the Senate GOP’s refusal to consider former President Obama’s last pick for the court.Sens. Elizabeth WarrenElizabeth Ann WarrenO'Rourke faces pressure from left on 'Medicare for all' O'Rourke says he won't use 'f-word' on campaign trail O'Rourke not planning, but not ruling out big fundraisers MORE (Mass.), Kamala HarrisKamala Devi HarrisO'Rourke faces pressure from left on 'Medicare for all' O'Rourke says he won't use 'f-word' on campaign trail O'Rourke not planning, but not ruling out big fundraisers MORE (Calif.) and Kirsten GillibrandKirsten Elizabeth GillibrandNew York Rep. Maloney endorses Gillibrand for president Actress Connie Britton endorses former roommate Gillibrand for president Trump singles out local union boss over GM's decision to shutter Ohio plant MORE (N.Y.) all told Politico that they were willing to at least consider packing the courts, something liberal groups are increasingly suggesting.“We are on the verge of a crisis of confidence in the Supreme Court,” Harris told Politico. “We have to take this challenge head on, and everything is on the table to do that.”Warren said adding justices to the Supreme Court deserves consideration, as does bringing appellate judges into Supreme Court cases. “It’s not just about expansion, it’s about depoliticizing the Supreme Court,” she told Politico.Democrats have been up in arms over the Republican Senate majority’s decision to block Obama nominee Merrick GarlandMerrick Brian GarlandHolder says next Dem president should consider packing courts GOP advances rules change to speed up confirmation of Trump nominees New battle lines in war over Trump’s judicial picks MORE from the court.After President TrumpDonald John TrumpJoint Chiefs chairman denies report that US is planning to keep 1K troops in Syria Kansas Department of Transportation calls Trump 'delusional communist' on Twitter Trump has privately voiced skepticism about driverless cars: report MORE was elected, the GOP Senate also ended the filibuster on Supreme Court nominees, which led to the confirmation of two justices picked by Trump.Those picks are expected to tilt the court to the right given Justice Brett KavanaughBrett Michael KavanaughGeorgia's heartbeat abortion bill is dangerous for women nationwide Senate votes to confirm Neomi Rao to appeals court Battle over Trump's judicial nominees enters new phase MORE’s confirmation to succeed Justice Anthony Kennedy.Politico reported that Gillibrand said she also would not rule out adding justices to the Supreme Court, and that she called for the Senate to impose stringent ethics rules for justices.Former Rep. Beto O’Rourke (D-Texas) floated the idea of expanding the court last week, along with term limits for current justices.“What if there were five justices selected by Democrats, five justices selected by Republicans and those 10 then pick five more justices independent of those who picked the first 10,” O’Rourke, who announced his presidential bid last week, said in Iowa on Thursday. “I think that’s an idea we should explore.”Non-candidates have expressed support for the idea as well. “The court should not be a court that you can figure out who the Republican judges are and who aren’t,” Sen. Mazie HironoMazie Keiko HironoLiberal commentator: Trump's warning that supporters could play tough is a 'violent dog whistle' Hirono calls out Trump for 'appalling' comments she says encourage violence Overnight Defense: Senate rejects border emergency in rebuke to Trump | Acting Pentagon chief grilled on wall funding | Warren confronts chief over war fund budget MORE (D-Hawaii) told the publication.The idea of adding justices to the court is increasingly popular with grass-roots and advocacy groups.Pack the Courts, launched in October, has raised $500,000 and plans to spend $2 million leading up to the 2020 presidential campaign to make the issue central to the election. Source: Warren, Harris, Gillibrand back efforts to add justices to Supreme Court | TheHill

    Read at 01:35 pm, Mar 18th

Week of Mar 10th, 2019

  • White Nationalism’s Deep American Roots

    Robert Bowers wanted everyone to know why he did it. “I can’t sit by and watch my people get slaughtered,” he posted on the social-media network Gab shortly before allegedly entering the Tree of Life synagogue in Pittsburgh on October 27 and gunning down 11 worshippers.

    Read at 07:24 pm, Mar 16th

  • The Climate of Socialism

    It’s no longer socialists alone who are placing capitalism at the center of an understanding of anthropogenic climate change.

    Read at 07:20 pm, Mar 16th

  • Scheduling in React

    In modern applications, user interfaces often have to juggle multiple tasks at the same time.

    Read at 07:06 pm, Mar 14th

  • Reputed Gambino Mob Boss Is Shot and Killed on Staten Island

    Francesco Cali, the reputed boss of the Gambino crime family, was fatally shot outside his home on Staten Island on Wednesday night, a senior police official said. Mr. Cali, 53, was shot six times, the official said.

    Read at 06:58 pm, Mar 14th

  • Beto O'Rourke Is the Candidate For Vapid Morons

    Let me draw your attention to the most horrifying paragraphs of this Vanity Fair profile of Beto O’Rourke, the Texas congressman who announced his presidential campaign Thursday morning: O’Rourke is careful to pay homage to progressive icons, crediting Bernie Sanders and Elizabeth Warren with ad

    Read at 06:51 pm, Mar 14th

  • GMB launches Scotland's first sex workers' union

    Sex workers in Scotland can join a trade union for the first time. The GMB union has launched a new adult entertainment branch, which will invite members from across Scotland, and include transgender and BME representatives.

    Read at 11:39 am, Mar 14th

  • Trashtag and the Long History of Corporate Greenwashing

    Less than a week ago Byron Román made the above Facebook post challenging “bored teens” to pick up trash and post before and after photos on social media.

    Read at 11:38 am, Mar 14th

  • The Impact of Expressing Gratitude and Appreciation at Work

    A few weekends ago, I was at Edmond's weekend birthday gathering, lightly facilitating some sharing of impact — what we appreciated in Edmond, what we saw in him that he might not see in himself.

    Read at 09:43 am, Mar 14th

  • The Simple Secret to Effective One-on-Ones

    Whenever I start a new one-on-one work relationship — whether it’s with a new person on my team, a new mentee, a new manager, a new project partner, or a new coaching client — I’ll inevitably begin the conversation with some version of that question. Something new always surfaces.

    Read at 09:37 am, Mar 14th

  • Awkward 1:1s: The Art of Getting Honest Feedback

    If you’re not constantly getting honest, hard feedback on yourself, your growth will be slow. If you’re a manager, not knowing the truth means your team will suck. Most people claim they want feedback, but they don’t just go out and get it — or don’t know how to get honest answers.

    Read at 09:34 am, Mar 14th

  • Facebook’s Data Deals Are Under Criminal Investigation

    Federal prosecutors are conducting a criminal investigation into data deals Facebook struck with some of the world’s largest technology companies, intensifying scrutiny of the social media giant’s business practices as it seeks to rebound from a year of scandal and setbacks.

    Read at 09:27 am, Mar 14th

  • The Art of the Awkward 1:1

    You probably do a lot of one-on-one meetings at work: with your manager, teammates, folks from other teams. Unfortunately, most people totally waste their 1:1 time. The problem: the 1:1s aren’t awkward enough. Here’s how to make them better. (This is part of a series.

    Read at 09:23 am, Mar 14th

  • ‘Colony of Hell’: 911 Calls From Inside Amazon Warehouses

    Warning: This story addresses suicidal threats by Amazon employees. Operator: Lebanon Police and Fire. Where’s your emergency?

    Read at 07:39 pm, Mar 13th

  • Pelosi rejects Republican bill to change national emergencies act

    FILE PHOTO: U.S. House Speaker Nancy Pelosi (D-CA) speaks at a memorial event for Kasur Gyari, former special envoy of Dalay Lama to the U.S., on Capitol Hill in Washington, U.S., March 12, 2019. REUTERS/Yuri GripasWASHINGTON (Reuters) - U.S.

    Read at 07:21 pm, Mar 13th

  • Take Back the Grid: DSA and the Fight for Energy Democracy

    Last September, over-pressurization of natural gas lines owned by Columbia Gas resulted in a series of explosions in 40 homes in the Massachusetts towns of Lawrence, Andover and North Andover.

    Read at 07:21 pm, Mar 13th

  • 'Corporations Are People' Is Built on an Incredible 19th-Century Lie

    Somewhat unintuitively, American corporations today enjoy many of the same rights as American citizens. Both, for instance, are entitled to the freedom of speech and the freedom of religion.

    Read at 09:37 am, Mar 13th

  • Nancy Pelosi on Impeaching Trump: ‘He’s Just Not Worth It’

    Nancy Pelosi stands up in her spacious office in the U.S. Capitol, walks past an enormous window with a commanding view of the Mall and the Washington Monument, and picks up a small plaque from her desk. A gift from Rep. Cheri Bustos (D-Ill.

    Read at 09:31 am, Mar 13th

  • Proud Boys Cite Twitter CEO Jack Dorsey to Attack Antifa

    A recent interview by Twitter CEO Jack Dorsey inspired far-right group the Proud Boys in a Twitter campaign to ban anti-fascists, according to chat logs reviewed by The Daily Beast.

    Read at 09:19 am, Mar 13th

  • JavaScript Symbols: But Why?

    Symbols, the newest JavaScript primitive, bring a few benefits to the language and are particularly useful when used as object properties. But, what can they do for us that strings cannot?

    Read at 09:14 am, Mar 13th

  • Pete Davidson made a joke on SNL about the Catholic Church. Now officials are demanding an apology.

    The comedian opened his appearance on the faux-news “Weekend Update” segment with a line that drew some titters and stunned “oooooohs” from the audience: “This guy is a monster and he should go to jail forever,” Davidson said, referring to R&B singer R.

    Read at 09:13 am, Mar 13th

  • Union Employees Authorize A Strike Against Their Own Union

    Workers at the Service Employees International Union headquarters are accusing the union behind the Fight for $15 of hypocrisy.

    Read at 09:12 am, Mar 13th

  • Should I Use Apollo for GraphQL?

    There is something new happening almost every day in the world of technology.

    Read at 08:10 am, Mar 13th

  • How to Combine GraphQL Type Definitions Quickly and Easily with Apollo-Server

    If you’re adding more types, queries, and mutations to a GraphQL project, you may quickly find your initial type definition file growing in line length and complexity.

    Read at 08:06 am, Mar 13th

  • The Brexit Plan Failed Again: What Happened, and What’s Next?

    • Britain’s Parliament on Tuesday soundly defeated Prime Minister Theresa May’s plan to exit the European Union, a 391 to 242 vote that is likely to delay Brexit and could derail it entirely. It is a devastating blow to Mrs. May that threatens her hold on power.

    Read at 09:56 pm, Mar 12th

  • 'F---in insane’: De Blasio allies warn against 2020 run

    The New York mayor has been flirting with a presidential bid, but has few backers. NEW YORK — New York City Mayor Bill de Blasio may be thinking of running for president, but many of those closest to him aren’t on board.

    Read at 07:56 pm, Mar 12th

  • Digital Witness

    Digital witnesses What’s the point of even sleeping? Each day seemingly brings new revelations as to the extent of our Faustian bargain with the purveyors of the digital world in which we find ourselves.

    Read at 07:30 pm, Mar 12th

  • Facebook’s new move isn't about privacy. It’s about domination

    If you have visited China in recent years you might have discovered how difficult it is to make your way through without WeChat, an all-purpose mobile phone application.

    Read at 07:19 pm, Mar 12th

  • A Complete Guide to useEffect

    You wrote a few components with Hooks. Maybe even a small app. You’re mostly satisfied. You’re comfortable with the API and picked up a few tricks along the way. You even made some custom Hooks to extract repetitive logic (300 lines gone!) and showed it off to your colleagues.

    Read at 07:16 pm, Mar 12th

  • What Kind of Mother

    As Dan Reed’s HBO documentary, Leaving Neverland, caused me to revisit the allegations against Michael Jackson as they were covered at the time, I was unnerved, most of all, by the mothers.

    Read at 10:48 am, Mar 12th

  • Footage Contradicts U.S. Claim That Nicolás Maduro Burned Aid Convoy

    CÚCUTA, Colombia — The narrative seemed to fit Venezuela’s authoritarian rule: Security forces, on the order of President Nicolás Maduro, had torched a convoy of humanitarian aid as millions in his country were suffering from illness and hunger.

    Read at 10:39 am, Mar 12th

  • A Class Struggle Strategy for A Green New Deal

    On the morning of November 13th, 2018, the Twitter account of the Sunrise Movement, a youth-based organization demanding a Green New Deal (GND), posted the following message: BREAKING: we’ve begun a sit in inside @NancyPelosi’s office because @HouseDemocrats have failed our generation time and

    Read at 09:22 am, Mar 12th

  • The Democrats’ Dilemma

    What Ilhan Omar and Dean Phillips tell us about the future of the Democratic Party.

    Read at 09:03 am, Mar 12th

  • Violence | ContraPoints

    A fictional dialogue between some voices in my head on the philosophy of violence. No dolls or mannequins were harmed in the making of this film.✿Patreon: https://www.patreon.com/contrapoints✿Donate: https://www.paypal.com/cgi-bin/webscr...✿Merch: https://www.teepublic.com/stores/cont...✿Sub

    Read at 09:29 pm, Mar 11th

  • AngularNYC - Complex Features Made Easy With RxJS - Ben Lesh

    Demo repo:https://github.com/benlesh/add-featur...RxJS Basics Videohttps://youtu.be/KOOT7BArVHQRxJS Animation Videohttps://youtu.be/X_RnO7KSR-4

    Read at 09:16 pm, Mar 11th

  • Elizabeth Warren Proposes Breaking Up Tech Giants Like Amazon and Facebook

    Senator Elizabeth Warren, the Massachusetts Democrat who is bidding to be the policy pacesetter in the Democratic presidential primary, championed another expansive idea on Friday evening in front of a crowd of thousands in Queens: a regulatory plan aimed at breaking up some of America’s largest t

    Read at 07:09 pm, Mar 11th

  • Elizabeth Warren's new plan: Break up Amazon, Google and Facebook

    Sen. Elizabeth Warren released an aggressive plan on Friday to break up tech giants like Amazon, Google and Facebook, targeting the power of Silicon Valley with her populist message as sprawling Internet giants face mounting political backlash ahead of the 2020 presidential election.

    Read at 07:06 pm, Mar 11th

  • The Case for Reparations

    I’ve been traveling around the country for the past few years studying America’s divides — urban/rural, red/blue, rich/poor. There’s been a haunting sensation the whole time that is hard to define. It is that the racial divide doesn’t feel like the other divides.

    Read at 07:02 pm, Mar 11th

  • Uninstalling Hayek

    For non-economists on the left, “Economics After Neoliberalism” is a welcome arrival.

    Read at 06:59 pm, Mar 11th

  • JavaScript Performance Pitfalls in V8

    In recent years, JavaScript engines have improved on all fronts. The performance of JavaScript has reached a level where it can easily compete with programming languages that have traditionally been considered more appropriate for high-performance computing.

    Read at 06:47 pm, Mar 11th

  • The biggest political scandal in American history

    Historians tell Axios that the only two scandals that come close to Trump-Russia are Watergate, which led to President Richard Nixon's resignation in 1974, and the Teapot Dome scandal of the early 1920s, in which oil barons bribed a corrupt aide to President Warren Harding for petroleum leases.

    Read at 06:37 pm, Mar 11th

  • Source: Leaked Documents Show the U.S. Government Tracking Journalists and Immigration Advocates Through a Secret Database

    This story has been updated with a new statement from Customs and Border Protection and a response from the ACLU. Documents obtained by NBC 7 Investigates show the U.S.

    Read at 06:34 pm, Mar 11th

  • Ilhan Omar Prompted Democrats to Pass an Anti-Semitism Resolution That Puts Republicans in a Corner

    The outrage, manufactured and/or inflated, over Rep. Ilhan Omar's remarks concerning the influence of lobbyists on behalf of Israel has been a prime performative opportunity for Republican legislators, and for pundits whom the makeup of the new House of Representatives makes nervous.

    Read at 06:27 pm, Mar 11th

  • The Ilhan Omar controversy shows how little we care about Palestinian lives

    A controversy is brewing in Washington, DC, over Rep. Ilhan Omar’s comments about the influence of Israel lobby groups and the uncritical support that many members of Congress give Israel’s increasingly hardline, right-wing government.

    Read at 06:26 pm, Mar 11th

  • Episode 277: Mixing It Up

    Nate and Andrew put out an hour of pure strategy, brought to you by our friends at Tournament Poker Edge. Topics include limp-raising, thin value three-betting, donk betting, overbetting, and mixing up your play (or not). It’s a 2c/5c NLHE zoom poker game, 6 handed, on Bovada. I have $10.

    Read at 05:36 pm, Mar 11th

  • 101 Questions to Ask in One on Ones

    So you’re having one on ones with your team. Awesome. It’s an essential element to being a good manager. But are you making the most of them?

    Read at 01:19 pm, Mar 11th

  • Catch Problems Early and Build Trust

    You have a problem that you want to talk about, but your boss always seems so busy. So you keep it quiet and hope it goes away. Yet, as a manager yourself, you're not sure how to approach a shy member of the team without causing him or her undue worry.

    Read at 12:22 pm, Mar 11th

  • The Update, The Vent, and The Disaster

    Business is noisy. Business is full of people worrying loudly about projects, process, and other people. These people have opinions and they share them all over the place — all the time.

    Read at 09:35 am, Mar 11th

  • Democratic Socialists of America (DSA)

    Eugene Victor Debs was America’s foremost socialist in the early decades of the 20th century, and, until Bernie Sanders, its all-time best vote-winner, attracting nearly a million voters as the Socialist Party’s presidential candidate in 1912, 6% of the total.

    Read at 09:22 am, Mar 11th

  • Teen who defied anti-vax mom says she got false information from one source: Facebook

    An 18-year-old from Ohio who famously inoculated himself against his mother’s wishes in December says he attributes his mother’s anti-vaccine ideology to a single source: Facebook.

    Read at 03:45 pm, Mar 10th

  • Algorithms in CSS

    I am likely going to write a “CSS for JavaScripters” book, and therefore I need to figure out how to explain CSS to JavaScripters. This series of article smippets are a sort of try-out — pre-drafts I’d like to get feedback on in order to figure out if I’m on the right track.

    Read at 02:03 pm, Mar 10th

  • GitHub Is Testing Commits on Behalf of Organizations – WordPress Tavern

    .entry-header GitHub users may soon be able to contribute to projects on behalf of an organization. This feature has often been requested by developers who are contributing on behalf of their employers. “Corporate contributions to the third-party open source projects can still be a source of friction and ambiguity,” GitHub Product Manager Ben Balter said. “We’re beta testing a new platform-agnostic commit pattern we hope can help you contribute on behalf of your employer.” Committers who are members of an organization can add a commit trailer in the following format: On-behalf-of: @ORG <ORG CONTACT EMAIL> The committer must use an email that matches the organization’s verified domain and sign the commit. Committing on behalf of an organization can also be done via the command line. Balter posted a demo of how the organization’s badge appears next to the committer’s. The feature is now in public beta: It will be interesting to see how well this is adopted among individuals and organizations committing to open source projects. Some projects have more overt contribution from commercial entities than others. Having individuals commit on behalf of their employers makes it easier to track contributions funded by organizations. It may also provide project owners a more accurate picture of how deeply companies are invested in a project, especially in scenarios where the lines between individual and employer contributions are blurry or unclear. Like this:Like Loading... Related .entry-content 
 .entry-footer Source: GitHub Is Testing Commits on Behalf of Organizations – WordPress Tavern

    Read at 01:58 pm, Mar 16th

  • How I ruined my JavaScript code and still won the Coding Challenge | TSH.io

    All developers want to write readable and maintainable code. It has always been my personal programming goal too. However, one time I did something different and totally opposite. It was a fun journey and I regret nothing. Please, sit comfortably and I will tell you the story about how overcomplicated JavaScript code impressed the judges. TSH Coding Challenge At TSH, we have a recurring event called Coding Challenge – you write a piece of code in the language you choose and solve a problem specified by the judges. What are the criteria for winning? You literally write anything that fits into requirements, but also convince the jury that your code is simply the best. (Tina Turner playing in the background). So, if you want to get more votes, do something clever, surprising or elegant in your work (or better, everything at once!). This edition, the goal was to write a simple function that validates postal codes. The function should take a string to test and return a boolean answer if the provided code is OK: a simple TRUE or FALSE. Every postal code should have five digits with an optional separator between second and third character. Space, dash and underline are the only allowed separators here. In other words, those postal codes are correct: 00000 12345 67-890 00 111 66_666 And those aren’t: a1-234 12.345 7890 111-11 Unimpressive expressions The first solution that came up to everyone’s mind were regular expressions. This is the best practice when it comes to format validation, especially when we have established rules about what’s good and what’s not. Of course, I didn’t use a regular expression. Not because it would be the easiest method. I simply expected that most people at the Coding Challenge will use them (I was totally right by the way). So, I took a different approach. I wanted to go against the tide and make my code as complicated as possible. However, making a mess in the code seemed too trivial so I decided to be more specific and… play some golf. Code golf. Do developers play golf? Rules of golf are pretty simple: players try to put a small white ball in multiple holes of a grass field, using as few golf club strokes as possible. Code golf is kinda similar. You have to write code with the lowest number of characters. You can say that instead of counting the ball strokes we count the keyboard taps. The shorter the code is, the better is your result, but it still has to work according to rules. Going with a regular expression is still a good solution here because the code will be super short. That’s true, but also far too easy (and it’s a Coding Challenge, for Pete’s sake!). I decided that a regular expression is a no-no, as it would kill the fun. I also hoped that this would impress the judges. Oh, and I picked JavaScript, because why not? Enough theory, now let’s write some messy code! Solid foundations I started working on my code by writing some tests in the Jest framework. I made 18 small unit tests for a single function to cover all edge cases. A perfect Test-Driven Development approach. All the tests failed as expected. And I haven’t even started writing mine postal code validator yet. To do it, I had to create the function first. I used an anonymous arrow function because its signature is shorter compared to a normal one with the function and return keywords. Don’t mind the long variable names. I am keeping them only to make the code more readable for now and I will remove them later. The digits problem Now, we need to check if the code has only digits in the appropriate places. Notice that postal code is really just a number with an optional separator between some digits. In other words, if we ignore that separator, we can just treat the postal code as a five digit number! So, let’s use that in our validation. I did it by picking the first two characters, last three characters and checking if they make a number together. For example, for the code 12-345 we are slicing the “12” from the start, “345” from the end and concatenating it into “12345”. Note that this code is insensitive to how many separator characters you have in between or how long the provided code is – we always use the first two and last three characters. Now, we have to validate the result. I cast it to a number type with the Number function. It returns a proper number value from the string when possible and NaN (not a number type) otherwise. Side note: we can already make this code a little bit shorter by using a + sign operator instead of the Number function. This code will work exactly the same as the one above: We’re not done yet because our function is currently returning the number, but it has to return a TRUE or FALSE value. We can easily fix it by using a double exclamation sign which works as a double negation: it changes everything into a boolean value. Great! But there’s a problem here which I need to address. If the code is, for example, “1a-234” after converting it to a number we will get a NaN, which is FALSE after casting to boolean. Good! 12-345 will be properly interpreted as a number (12345), and we will get TRUE and the end. Fantastic! How about 00-000? The “00000” will be nicely interpreted as a number (zero) but casting it to bool will give as FALSE because zero is false! That’s why we have to do a trick here with adding 1 to the result. It will take only two more characters in our code, but it will make our number always positive and true. No more problem with the 00-000 edge case. Unfortunately, our code still has some problems. Did you know that in JavaScript some numbers can contain letters? It’s for writing binary or hexadecimal numbers. Because of those numbers, 0b10111 and 0x30 are totally valid. Those 0b and 0x prefixes are key here. In the checking function, we must take care of them and “broke” inputs like 0b-101 and 0x-111 which would return TRUE during the validation. Luckily for us, it’s very easy. We may use the fix done earlier and tweak it a little bit by moving the added 1 at the beginning of concatenation. Now, postal code like 0b-101 will be concatenated into 10b101 which is not a binary number anymore because of the wrong prefix. Neat, we are slowly moving forward! There’s only one more edge case here to solve, for numbers with a dot: “0.123”. They are not a valid postal code, but currently, our validator will return TRUE for them because they are a proper number. So, what can we do? The same thing as last time: somehow break those numbers with a full stop. And I decided to do it by… introducing a second full stop! Now, whenever a postal code has only digits, the validator will be internally making one full stop-something number, e.g.: 12-345 into 1.12345 which is a proper number. This will return TRUE. However, when the function will be provided with a problematic postal code like “1.-234” then the validator will be making a 1.1.234 which is nowhere proper and will return FALSE. The only downside of this solution is that we lose three more characters in our code golf. This is something I can live with for now. Phew, the hardest part is over. Now let’s talk about separators. Meet the separators In the examples above, we were using mostly dashes but there are three separators allowed: dash, underline, space and an empty string (no separator). If we’d like to define an array with them, we’d get this: A lot of apostrophes. We are playing code golf here so no way we’re leaving it like that. Do you know the spread operator from ES6? It allows putting elements from one array into one another without manually rewriting all elements. Like this: Ok, but why am I talking about it? Because strings can also be treated as arrays so – thanks to it, and the spread operator – we can save some characters by spreading the string of allowed “visible” separators. This array is the same as the one above. Here, however, we use only 12 characters instead of 15. Do you remember three lost characters from fixing the dot problem before? We’ve just found them and made up for them in the code golf. Of course, we not only need to check if the separator is of an allowed type but, also, if it’s in the proper place.  Now, we’ll repeat the trick with splitting the string: we’ll take all the characters from the provided code starting after the second character and ending before the third character from the end. If the separator is correct, it should be included in the array of available separators. Thanks to it, if someone provides, for example, “12___345” we will be testing “___”. Also, a code without the separator, like 12345, will be tested with an empty string which is in our array of allowed separators. By gluing everything together, I got this: The final stroke Currently, almost everything is done and done. The only way the user can bypass our validator is by passing a string of three or four digits. Let’s analyze this example”: “1234”. The function will concatenate the fix “1.”, the first two characters “12”, and the last three “234”. We will get “1.12245” which is a fine number and our validator will not find the problem. So, we have to additionally check if the string has at least 5 characters. How to do it? By just checking if the fifth character of the string exists. I added the checking at the beginning of the function body. That was the last thing we had to check. Other incorrect postal codes, such as a code with too many characters, will be rejected by mechanisms I’ve added earlier. Knowing that we can jump straight to removing all unnecessary spaces and characters from the code, gives us more points in the code golf. The final result? Only 86 characters. And the validator passes each of the 18 unit tests. You can check it out yourself by using the repl.it service. And the trophy goes to… Did TSH judges like my crazy solution? Yes. I got most of the votes and I won the Coding Challenge. My award? A bottle of great Belgian beer! You may ask yourself, is this the best solution I could come up with? I am not sure. Maybe someone can rewrite this validator using even fewer characters? Exercising your brain and changing your patterns once in a while will do wonders! If you, dear reader, want to beat me in the code golf, please send your code to this email address. I will be excited to see a better solution. We want to have the same chances, so just remember the rules: use plain JavaScript and no regular expressions are allowed. Maybe we can even get you a tasty Belgian beer too. Good luck! Source: How I ruined my JavaScript code and still won the Coding Challenge | TSH.io

    Read at 05:17 pm, Mar 15th

  • KV Storage: the Web's First Built-in Module  |  Web  |  Google Developers

    wf_template: src/templates/contributors/include.html Browser vendors and web performance experts have been saying for the better part of the last decade that localStorage is slow, and web developers should stop using it. To be fair, the people saying this are not wrong. localStorage is a synchronous API that blocks the main thread, and any time you access it you potentially prevent your page from being interactive. The problem is the localStorage API is just so temptingly simple, and the only asynchronous alternative to localStorage is IndexedDB, which (let's face it) is not known for its ease of use or welcoming API. So developers are left with a choice between something hard to use and something bad for performance. And while there are libraries that offer the simplicity of the localStorage API while actually using asynchronous storage APIs under the hood, including one of those libraries in your app has a file-size cost and can eat into your performance budget. But what if it were possible to get the performance of an asynchronous storage API with the simplicity of the localStorage API, without having to pay the file size cost? Well, soon there may be. Chrome is experimenting with a new feature known as built-in modules, and the first one we're planning to ship is an asynchronous key/value storage module called KV Storage. But before I get into the details of the KV Storage module, let me explain what I mean by built-in modules. What are built-in modules? Built-in modules are just like regular JavaScript modules, except that they don't have to be downloaded because they ship with the browser. Like traditional web APIs, built-in modules must go through a standardization process — each will have its own specification that requires a design review and positive signs of support from both web developers and other browser vendors before it can ship. (In Chrome, built-in modules will follow the same launch process we use to implement and ship all new APIs.) Unlike traditional web APIs, built-in modules are not exposed on the global scope — they're only available via imports. Not exposing built-in modules globally has a lot of advantages: they won't add any overhead to starting up a new JavaScript runtime context (e.g. a new tab, worker, or service worker), and they won't consume any memory or CPU unless they're actually imported. Furthermore, they don't run the risk of naming collisions with other variables defined in your code. To import a built-in module you use the prefix std: followed by the built-in module's identifier. For example, in supported browsers, you could import the KV Storage module with the following code (see below for how to use a KV Storage polyfill in unsupported browsers): The KV Storage module The KV Storage module is similar in its simplicity to the localStorage API, but its API shape is actually closer to a JavaScript Map. Instead of getItem(), setItem(), and removeItem(), it has get(), set(), and delete(). It also has other map-like methods not available to localStorage, like keys(), values(), and entries(), and like Map, its keys do not have to be strings. They can be any structured-serializable type. Unlike Map, all KV Storage methods return either promises or async iterators (since the main point of this module is it's not synchronous, in contrast to localStorage). To see the full API in detail, you can refer to the specification. As you may have noticed from the code example above, the KV Storage module has two named exports: storage and StorageArea. storage is an instance of the StorageArea class with the name 'default', and it's what developers will use most often in their application code. The StorageArea class is provided for cases where additional isolation is needed (e.g. a third-party library that stores data and wants to avoid conflicts with data stored via the default storage instance). StorageArea data is stored in an IndexedDB database with the name kv-storage:${name}, where name is the name of the StorageArea instance. Here's an example of how to use the KV Storage module in your code: Note: The KV Storage module is currently available in Chrome 74 if you have the experimental web platform features flag turned on: (chrome://flags/#enable-experimental-web-platform-features). What if a browser doesn't support a built-in module? If you're familiar with using native JavaScript modules in browsers, you probably know that (at least up until now) importing anything other than a URL will generate an error. And std:kv-storage is not a valid URL. So that raises the question: do we have to wait until all browsers support a built-in module before we can use it in our code? Thankfully, the answer is no! You can actually use built-in modules as soon as even one browser supports them thanks to the help of another feature we're experimenting with called import maps. Import maps Import maps are essentially a mechanism by which developers can alias import identifiers to one or more alternate identifiers. This is powerful because it gives you a way to change (at runtime) how a browser resolves a particular import identifier across your entire application. In the case of built-in modules, this allows you to reference a polyfill of the module in your application code, but a browser that supports the built-in module can load that version instead! Here's how you would declare an import map to make this work with the KV Storage module: <!-- The import map is inlined into your page --> <script type="importmap"> { "imports": { "/path/to/kv-storage-polyfill.mjs": [ "std:kv-storage", "/path/to/kv-storage-polyfill.mjs" ] } } </script> <!-- Then any module scripts with import statements use the above map --> <script type="module"> import {storage} from '/path/to/kv-storage-polyfill.mjs'; // Use `storage` ... </script> The key point in the above code is the URL /path/to/kv-storage-polyfill.mjs is being mapped to two different resources: std:kv-storage and then the original URL again, /path/to/kv-storage-polyfill.mjs. So when the browser encounters an import statement referencing that URL (/path/to/kv-storage-polyfill.mjs), it first tries to load std:kv-storage, and if it can't then it falls back to loading /path/to/kv-storage-polyfill.mjs. Again, the magic here is that the browser doesn't need to support import maps or built-in modules for this technique to work since the URL being passed to the import statement is the URL for the polyfill. The polyfill is not actually a fallback, it's the default. The built-in module is a progressive enhancement! What about browsers that don't support modules at all? In order to use import maps to conditionally load built-in modules, you have to actually use import statements, which also means you have to use module scripts, i.e. <script type="module">. Currently, more than 80% of browsers support modules, and for browsers that don't, you can use the module/nomodule technique to serve a legacy bundle to older browsers. Note that when generating your nomodule build, you'll need to include all polyfills because you know for sure that browsers that don't support modules will definitely not support built-in modules. KV Storage demo To illustrate that it's possible to use built-in modules while still supporting older browsers, I've put together a demo that incorporates all the techniques described above and runs in all browsers today: Browsers that support modules, import maps, and the built-in module do not load any unneeded code. Browsers that support modules and import maps but do not support the built-in module load the KV Storage polyfill (via the browser's module loader). Browsers that support modules but do not support import maps also load the KV Storage polyfill (via the browser's module loader) Browsers that do not support modules at all get the KV Storage polyfill in their legacy bundle (loaded via <script nomodule>). The demo is hosted on Glitch, so you can view its source. I also have a detailed explanation of the implementation in the README. Feel free to take a look if you're curious to see how it's built. Note: the demo uses Rollup to bundle the application code and the polyfill, and to generate the various versions required to get it working cross-browser. I wanted to make a similar demo built with webpack, but it doesn't currently support a module output format, so this isn't yet possible. I've filed a feature request to add support for built-in modules in webpack. If you'd like to see this supported in webpack as well, please voice your support in the issue. In order to actually see the native built-in module in action, you have to load the demo in Chrome 74 (currently Chrome Dev or Canary) with the experimental web platform features flag turned on (chrome://flags/#enable-experimental-web-platform-features). You can verify that the built-in module is being loaded because you won't see the polyfill script in the source panel in DevTools; instead you'll see the built-in module version (fun fact: you can actually inspect the module's source code or even put breakpoints in it!): Please give us feedback This introduction should have given you a taste of what may be possible with built-in modules. And hopefully you're excited! We'd really love for developers to try out the KV Storage module (as well as all the new features discussed here) and give us feedback. Here are the GitHub links where you can give us feedback for each of the features mentioned in this article: If your site currently uses localStorage, you should try switching to the KV Storage API to see if it meets all your needs. And if you sign up for the KV Storage origin trial, you can actually deploy these features today. All your users should benefit from better storage performance, and Chrome 74+ users won't have to pay any extra download cost. Source: KV Storage: the Web’s First Built-in Module  |  Web  |  Google Developers

    Read at 05:12 pm, Mar 15th

  • The Senate’s emergency declaration vote is a betrayal.

    ':""},t.getDefinedParams=function(e,t){return t.filter(function(t){return e[t]}).reduce(function(t,n){return l(t,function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},n,e[n]))},{})},t.isValidMediaTypes=function(e){var t=["banner","native","video"];return!!Object.keys(e).every(function(e){return(0,b.default)(t,e)})&&(!e.video||!e.video.context||(0,b.default)(["instream","outstream"],e.video.context))},t.getBidderRequest=function(e,t,n){return(0,v.default)(e,function(e){return e.bids.filter(function(e){return e.bidder===t&&e.adUnitCode===n}).length>0})||{start:null,auctionId:null}},t.getUserConfiguredParams=function(e,t,n){return e.filter(function(e){return e.code===t}).map(function(e){return e.bids}).reduce(s,[]).filter(function(e){return e.bidder===n}).map(function(e){return e.params||{}})},t.getOrigin=function(){return window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")},t.getDNT=function(){return"1"===navigator.doNotTrack||"1"===window.doNotTrack||"1"===navigator.msDoNotTrack||"yes"===navigator.doNotTrack},t.isAdUnitCodeMatchingSlot=function(e){return function(t){return B(e,t)}},t.isSlotMatchingAdUnitCode=function(e){return function(t){return B(t,e)}},t.unsupportedBidderMessage=function(e,t){var n=Object.keys(e.mediaTypes||{banner:"banner"}).join(", ");return"n "+e.code+" is a "+n+" ad unitn containing bidders that don't support "+n+": "+t+".n This bidder won't fetch demand.n "},t.deletePropertyFromObject=function(e,t){var n=l({},e);return delete n[t],n},t.removeRequestId=function(e){return t.deletePropertyFromObject(e,"requestId")},t.isInteger=function(e){return Number.isInteger?Number.isInteger(e):"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},t.convertCamelToUnderscore=function(e){return e.replace(/(?:^|.?)([A-Z])/g,function(e,t){return"_"+t.toLowerCase()}).replace(/^_/,"")},t.transformBidderParamKeywords=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"keywords",r=[];return t._each(e,function(e,i){if(t.isArray(e)){var o=[];t._each(e,function(e){(e=t.getValueString(n+"."+i,e))&&o.push(e)}),e=o}else{if(e=t.getValueString(n+"."+i,e),!t.isStr(e))return;e=[e]}r.push({key:i,value:e})}),r},t.convertTypes=function(e,n){return Object.keys(e).forEach(function(r){var i,o;n[r]&&(t.isFn(e[r])?n[r]=e[r](n[r]):n[r]=(i=e[r],o=n[r],"string"===i?o&&o.toString():"number"===i?Number(o):o), isNaN(n[r])&&delete n.key)}),n};var g=n(3),h=r(n(63)),v=r(n(10)),b=r(n(5)),y=n(11),m=n(4),_=!1,A=Object.prototype.toString,E=Boolean(window.console),w=Boolean(E&&window.console.log),S=Boolean(E&&window.console.info),I=Boolean(E&&window.console.warn),T=Boolean(E&&window.console.error);t.replaceTokenInString=function(e,n,r){return t._each(n,function(t,n){t=void 0===t?"":t;var i=r+n.toUpperCase()+r,o=new RegExp(i,"g");e=e.replace(o,t)}),e};var x,j=(x=0,function(){return++x});t.getUniqueIdentifierStr=i,t.generateUUID=function e(t){return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)},t.getBidIdParameter=function(e,t){return t&&t[e]?t[e]:""},t.tryAppendQueryString=function(e,t,n){return n?e+(t+"=")+encodeURIComponent(n)+"&":e},t.parseQueryStringParameters=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t+=n+"="+encodeURIComponent(e[n])+"&");return t},t.transformAdServerTargetingObj=function(e){return e&&Object.getOwnPropertyNames(e).length>0?c(e).map(function(t){return t+"="+encodeURIComponent(d(e,t))}).join("&"):""},t.getTopWindowLocation=function(){if(t.inIframe()){var e=void 0;try{e=t.getAncestorOrigins()||t.getTopFrameReferrer()}catch(e){logInfo("could not obtain top window location",e)}if(e)return(0,y.parse)(e,{decodeSearchAsString:!0})}return t.getWindowLocation()},t.getTopFrameReferrer=function(){try{window.top.location.toString();for(var e="",t=void 0;(t=t?t.parent:window).document&&t.document.referrer&&(e=t.document.referrer),t!==window.top;);return e}catch(e){return window.document.referrer}},t.getAncestorOrigins=function(){if(window.document.location&&window.document.location.ancestorOrigins&&window.document.location.ancestorOrigins.length>=1)return window.document.location.ancestorOrigins[window.document.location.ancestorOrigins.length-1]},t.getWindowTop=function(){return window.top},t.getWindowSelf=function(){return window.self},t.getWindowLocation=function(){return window.location},t.getTopWindowUrl=function(){var e=void 0;try{e=t.getTopWindowLocation().href}catch(t){e=""}return e},t.getTopWindowReferrer=function(){try{return window.top.document.referrer}catch(e){return document.referrer}},t.logMessage=function(){C()&&w&&console.log.apply(console,a(arguments,"MESSAGE:"))},t.logInfo=function(){C()&&S&&console.info.apply(console,a(arguments,"INFO:"))},t.logWarn=function(){C()&&I&&console.warn.apply(console,a(arguments,"WARNING:"))},t.logError=function(){C()&&T&&console.error.apply(console,a(arguments,"ERROR:"))},t.hasConsoleLogger=function(){return w};var C=function(){if(!1===g.config.getConfig("debug")&&!1===_){var e="TRUE"===O(m.DEBUG_MODE).toUpperCase();g.config.setConfig({debug:e}),_=!0}return!!g.config.getConfig("debug")};t.debugTurnedOn=C,t.createInvisibleIframe=function(){var e=document.createElement("iframe");return e.id=i(),e.height=0,e.width=0,e.border="0px",e.hspace="0",e.vspace="0",e.marginWidth="0",e.marginHeight="0",e.style.border="0",e.scrolling="no",e.frameBorder="0",e.src="about:blank",e.style.display="none",e};var O=function(e){var t=new RegExp("[\?&]"+e+"=([^]*)").exec(window.location.search);return null===t?"":decodeURIComponent(t[1].replace(/+/g," "))};t.getParameterByName=O,t.hasValidBidRequest=function(e,n,r){function i(e,t){t===n[a]&&(o=!0)}for(var o=!1,a=0;a0);for(var n in e)if(hasOwnProperty.call(e,n))return!1;return!0},t.isEmptyStr=function(e){return t.isStr(e)&&(!e||0===e.length)},t._each=function(e,n){if(!t.isEmpty(e)){if(t.isFn(e.forEach))return e.forEach(n,this);var r=0,i=e.length;if(i>0)for(;r'},t.createTrackPixelIframeHtml=function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e?(n&&(e=encodeURI(e)),r&&(r='sandbox="'+r+'"'),"'):""},t.getIframeDocument=function(e){if(e){var n=void 0;try{n=e.contentWindow?e.contentWindow.document:e.contentDocument.document?e.contentDocument.document:e.contentDocument}catch(e){t.logError("Cannot get iframe document",e)}return n}},t.getValueString=function(e,n,r){return null==n?r:t.isStr(n)?n:t.isNumber(n)?n.toString():void t.logWarn("Unsuported type for param: "+e+" required type: String")},t.getHighestCpm=f("timeToRespond",function(e,t){return e>t}),t.getOldestHighestCpmBid=f("responseTimestamp",function(e,t){return e>t}),t.getLatestHighestCpmBid=f("responseTimestamp",function(e,t){return e1?arguments[1]:void 0)}}),n(27)(o)},11:function(e,t,n){"use strict";function r(e){return e?e.replace(/^?/,"").split("&").reduce(function(e,t){var n=t.split("="),r=o(n,2),i=r[0],a=r[1];return/[]$/.test(i)?(e[i=i.replace("[]","")]=e[i]||[],e[i].push(a)):e[i]=a||"",e},{}):{}}function i(e){return Object.keys(e).map(function(t){return Array.isArray(e[t])?e[t].map(function(e){return t+"[]="+e}).join("&"):t+"="+e[t]}).join("&")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.parseQS=r,t.formatQS=i,t.parse=function(e,t){var n=document.createElement("a");t&&"noDecodeWholeURL"in t&&t.noDecodeWholeURL?n.href=e:n.href=decodeURIComponent(e);var i=t&&"decodeSearchAsString"in t&&t.decodeSearchAsString;return{href:n.href,protocol:(n.protocol||"").replace(/:$/,""),hostname:n.hostname,port:+n.port,pathname:n.pathname.replace(/^(?!/)/,"/"),search:i?n.search:r(n.search||""),hash:(n.hash||"").replace(/^#/,""),host:n.host||window.location.host}},t.format=function(e){return(e.protocol||"http")+"://"+(e.host||e.hostname+(e.port?":"+e.port:""))+(e.pathname||"")+(e.search?"?"+i(e.search||""):"")+(e.hash?"#"+e.hash:"")}},12:function(e,t,n){"use strict";function r(e){var t=this,n=e.url,r=e.config,a=e.id,u=e.callback,s=e.loaded;this.url=n,this.config=r,this.handlers={},this.id=a,this.loaded=s,this.cmd=[],this.push=function(e){"function"==typeof e?t.loaded?e.call():t.cmd.push(e):o.logError("Commands given to Renderer.push must be wrapped in a function")},this.callback=u||function(){t.loaded=!0,t.process()},(0,i.loadScript)(n,this.callback,!0)}Object.defineProperty(t,"__esModule",{value:!0}),t.Renderer=r;var i=n(22),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0));r.install=function(e){return new r({url:e.url,config:e.config,id:e.id,callback:e.callback,loaded:e.loaded})},r.prototype.getConfig=function(){return this.config},r.prototype.setRender=function(e){this.render=e},r.prototype.setEventHandlers=function(e){this.handlers=e},r.prototype.handleVideoEvent=function(e){var t=e.id,n=e.eventName;"function"==typeof this.handlers[n]&&this.handlers[n](),o.logMessage("Prebid Renderer event for id "+t+" type "+n)},r.prototype.process=function(){for(;this.cmd.length>0;)try{this.cmd.shift().call()}catch(e){o.logError("Error processing Renderer command: ",e)}}},13:function(e,t){var n=e.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},14:function(e,t,n){var r=n(19),i=n(13),o=n(32),a=n(47),u="prototype",s=function e(t,n,s){var c,d,f,l=t&e.F,p=t&e.G,g=t&e.S,h=t&e.P,v=t&e.B,b=t&e.W,y=p?i:i[n]||(i[n]={}),m=y[u],_=p?r:g?r[n]:(r[n]||{})[u];for(c in p&&(s=n),s)(d=!l&&_&&void 0!==_[c])&&c in y||(f=d?_[c]:s[c],y[c]=p&&"function"!=typeof _[c]?s[c]:v&&d?o(f,r):b&&_[c]==f?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[u]=e[u],t}(f):h&&"function"==typeof f?o(Function.call,f):f,h&&((y.virtual||(y.virtual={}))[c]=f,t&e.R&&m&&!m[c]&&a(m,c,f)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},15:function(e,t){e.exports=function(e){return"object"==(void 0===e?"undefined":_typeof(e))?null!==e:"function"==typeof e}},16:function(e,t,n){"use strict";var r=n(0);t.createBid=function(e,t){return new function(e,t){var n=t&&t.bidId||r.getUniqueIdentifierStr(),i=t&&t.src||"client",o=e||0;this.bidderCode=t&&t.bidder||"",this.width=0,this.height=0,this.statusMessage=function(){switch(o){case 0:return"Pending";case 1:return"Bid available";case 2:return"Bid returned empty or error response";case 3:return"Bid timed out"}}(),this.adId=n,this.mediaType="banner",this.source=i,this.getStatusCode=function(){return o},this.getSize=function(){return this.width+"x"+this.height}}(e,t)}},17:function(e,t,n){"use strict";function r(e){function t(){if(l.syncEnabled&&e.browserSupportsCookies&&!a){try{!function(){(l.pixelEnabled||f.image)&&u.shuffle(r.image).forEach(function(e){var t=i(e,2),n=t[0],r=t[1];u.logMessage("Invoking image pixel user sync for bidder: "+n),u.triggerPixel(r)})}(),function(){(l.iframeEnabled||f.iframe)&&u.shuffle(r.iframe).forEach(function(e){var t=i(e,2),n=t[0],r=t[1];u.logMessage("Invoking iframe user sync for bidder: "+n),u.insertUserSyncIframe(r)})}()}catch(e){return u.logError("Error firing user syncs",e)}r={image:[],iframe:[]},a=!0}}var n={},r={image:[],iframe:[]},a=!1,c={},f={image:!1,iframe:!1},l=e.config;return s.config.getConfig("userSync",function(e){l=o(l,e.userSync)}),n.registerSync=function(e,t,n){if(!l.syncEnabled||!u.isArray(r[e]))return u.logWarn('User sync type "'+e+'" not supported');if(!t)return u.logWarn("Bidder is required for registering sync");if(Number(c[t])>=l.syncsPerBidder)return u.logWarn('Number of user syncs exceeded for "'+t+'"');if(l.filterSettings){if(function(e,t){var n=l.filterSettings;if(function(e,t){if(e.all&&e[t])return u.logWarn('Detected presence of the "filterSettings.all" and "filterSettings.'+t+'" in userSync config. You cannot mix "all" with "iframe/image" configs; they are mutually exclusive.'),!1;var n=e.all?e.all:e[t],r=e.all?"all":t;if(!n)return!1;var i=n.filter,o=n.bidders;return i&&"include"!==i&&"exclude"!==i?(u.logWarn('UserSync "filterSettings.'+r+".filter" setting '"+i+"' is not a valid option; use either 'include' or 'exclude'."),!1):!!("*"===o||Array.isArray(o)&&o.length>0&&o.every(function(e){return u.isStr(e)&&"*"!==e}))||(u.logWarn('Detected an invalid setup in userSync "filterSettings.'+r+".bidders"; use either '*' (to represent all bidders) or an array of bidders."),!1)}(n,e)){f[e]=!0;var r=n.all?n.all:n[e],i="*"===r.bidders?[t]:r.bidders,o=r.filter||"include";return{include:function(e,t){return!(0,d.default)(e,t)},exclude:function(e,t){return(0,d.default)(e,t)}}[o](i,t)}return!1}(e,t))return u.logWarn("Bidder '"+t+"' is not permitted to register their userSync "+e+" pixels as per filterSettings config.")}else if(l.enabledBidders&&l.enabledBidders.length&&l.enabledBidders.indexOf(t)0&&void 0!==arguments[0]?arguments[0]:0;if(e)return setTimeout(t,Number(e));t()},n.triggerUserSyncs=function(){l.enableOverride&&n.syncUsers()},n}Object.defineProperty(t,"__esModule",{value:!0}),t.userSync=void 0;var i=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:10;"function"==typeof e&&(a.push({fn:e,priority:t}),a.sort(function(e,t){return t.priority-e.priority}))},removeHook:function(e){a=a.filter(function(n){return n.fn===t||n.fn!==e})},hasHook:function(e){return a.some(function(t){return t.fn===e})}};return"string"==typeof n&&(o[n]=s),r(function(){for(var n=arguments.length,r=Array(n),i=0;in n n prebid.org wrappern n "+(n?"":"")+"n n n n ")}}Object.defineProperty(t,"__esModule",{value:!0}),t.store=function(e,t){var n={puts:e.map(r)};(0,i.ajax)(o.config.getConfig("cache.url"),(a=t,{success:function(e){var t=void 0;try{t=JSON.parse(e).responses}catch(e){return void a(e,[])}t?a(null,t):a(new Error("The cache server didn't respond with a responses property."),[])},error:function(e,t){a(new Error("Error storing video ad in the cache: "+e+": "+JSON.stringify(t)),[])}}),JSON.stringify(n),{contentType:"text/plain",withCredentials:!0});var a},t.getCacheUrl=function(e){return o.config.getConfig("cache.url")+"?uuid="+e};var i=n(7),o=n(3)},21:function(e,t,n){n(102),e.exports=n(13).Array.findIndex},22:function(e,t,n){"use strict";function r(e,t){var n=document.createElement("script");n.type="text/javascript",n.async=!0,t&&"function"==typeof t&&(n.readyState?n.onreadystatechange=function(){"loaded"!==n.readyState&&"complete"!==n.readyState||(n.onreadystatechange=null,t())}:n.onload=function(){t()}),n.src=e;var r=document.getElementsByTagName("head");(r=r.length?r:document.getElementsByTagName("body")).length&&(r=r[0]).insertBefore(n,r.firstChild)}var i,o=n(5),a=(i=o)&&i.__esModule?i:{default:i},u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),s={},c=["criteo"];t.loadExternalScript=function(e,t){if(t&&e)if((0,a.default)(c,t)){if(!s[e]){u.logWarn("module "+t+" is loading external JavaScript");var n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=e,u.insertElement(n),s[e]=!0}}else u.logError(t+" not whitelisted for loading external JavaScript");else u.logError("cannot load external script without url and moduleCode")},t.loadScript=function(e,t,n){e?n?s[e]?t&&"function"==typeof t&&(s[e].loaded?t():s[e].callbacks.push(t)):(s[e]={loaded:!1,callbacks:[]},t&&"function"==typeof t&&s[e].callbacks.push(t),r(e,function(){s[e].loaded=!0;try{for(var t=0;tt.max?e:t},{max:0}),b=(0,u.default)(t.buckets,function(t){if(e>v.max*n){var i=t.precision;void 0===i&&(i=c),r=(t.max*n).toFixed(i)}else if(e=t.min*n)return t});return b&&(o=e,s=n,d=void 0!==(a=b).precision?a.precision:c,f=a.increment*s,l=a.min*s,p=Math.pow(10,d+2),g=(o*p-l*p)/(f*p),h=Math.floor(g)*f+l,r=(h=Number(h.toFixed(10))).toFixed(d)),r}function i(e){if(s.isEmpty(e)||!e.buckets||!Array.isArray(e.buckets))return!1;var t=!0;return e.buckets.forEach(function(e){void 0!==e.min&&e.max&&e.increment||(t=!1)}),t}Object.defineProperty(t,"__esModule",{value:!0}),t.isValidPriceConfig=t.getPriceBucketString=void 0;var o,a=n(10),u=(o=a)&&o.__esModule?o:{default:o},s=n(0),c=2,d={buckets:[{min:0,max:5,increment:.5}]},f={buckets:[{min:0,max:20,increment:.1}]},l={buckets:[{min:0,max:20,increment:.01}]},p={buckets:[{min:0,max:3,increment:.01},{min:3,max:8,increment:.05},{min:8,max:20,increment:.5}]},g={buckets:[{min:0,max:5,increment:.05},{min:5,max:10,increment:.1},{min:10,max:20,increment:.5}]};t.getPriceBucketString=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=parseFloat(e);return isNaN(i)&&(i=""),{low:""===i?"":r(e,d,n),med:""===i?"":r(e,f,n),high:""===i?"":r(e,l,n),auto:""===i?"":r(e,g,n),dense:""===i?"":r(e,p,n),custom:""===i?"":r(e,t,n)}},t.isValidPriceConfig=i},32:function(e,t,n){var r=n(46);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},33:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},34:function(e,t,n){var r=n(32),i=n(35),o=n(54),a=n(36),u=n(55);e.exports=function(e,t){var n=1==e,s=2==e,c=3==e,d=4==e,f=6==e,l=5==e||f,p=t||u;return function(t,u,g){for(var h,v,b=o(t),y=i(b),m=r(u,g,3),_=a(y.length),A=0,E=n?p(t,_):s?p(t,0):void 0;_>A;A++)if((l||A in y)&&(v=m(h=y[A],A,b),e))if(n)E[A]=v;else if(v)switch(e){case 3:return!0;case 5:return h;case 6:return A;case 2:E.push(h)}else if(d)return!1;return f?-1:c||d?d:E}}},35:function(e,t,n){var r=n(24);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},36:function(e,t,n){var r=n(37),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},37:function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},38:function(e,t,n){var r=n(24);e.exports=Array.isArray||function(e){return"Array"==r(e)}},39:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.adunitCounter=void 0;var r=n(0),i={},o={incrementCounter:function(e){return i[e]=i[e]||{},i[e].counter=(0,r.deepAccess)(i,e+".counter")+1||1,i[e].counter},getCounter:function(e){return(0,r.deepAccess)(i,e+".counter")||0}};t.adunitCounter=o},4:function(e,t){e.exports={JSON_MAPPING:{PL_CODE:"code",PL_SIZE:"sizes",PL_BIDS:"bids",BD_BIDDER:"bidder",BD_ID:"paramsd",BD_PL_ID:"placementId",ADSERVER_TARGETING:"adserverTargeting",BD_SETTING_STANDARD:"standard"},REPO_AND_VERSION:"prebid_prebid_1.22.0",DEBUG_MODE:"pbjs_debug",STATUS:{GOOD:1,NO_BID:2},CB:{TYPE:{ALL_BIDS_BACK:"allRequestedBidsBack",AD_UNIT_BIDS_BACK:"adUnitBidsBack",BID_WON:"bidWon",REQUEST_BIDS:"requestBids"}},EVENTS:{AUCTION_INIT:"auctionInit",AUCTION_END:"auctionEnd",BID_ADJUSTMENT:"bidAdjustment",BID_TIMEOUT:"bidTimeout",BID_REQUESTED:"bidRequested",BID_RESPONSE:"bidResponse",BID_WON:"bidWon",BIDDER_DONE:"bidderDone",SET_TARGETING:"setTargeting",REQUEST_BIDS:"requestBids",ADD_AD_UNITS:"addAdUnits",AD_RENDER_FAILED:"adRenderFailed"},AD_RENDER_FAILED_REASON:{PREVENT_WRITING_ON_MAIN_DOCUMENT:"preventWritingOnMainDocuemnt",NO_AD:"noAd",EXCEPTION:"exception",CANNOT_FIND_AD:"cannotFindAd",MISSING_DOC_OR_ADID:"missingDocOrAdid"},EVENT_ID_PATHS:{bidWon:"adUnitCode"},GRANULARITY_OPTIONS:{LOW:"low",MEDIUM:"medium",HIGH:"high",AUTO:"auto",DENSE:"dense",CUSTOM:"custom"},TARGETING_KEYS:["hb_bidder","hb_adid","hb_pb","hb_size","hb_deal","hb_source","hb_format"],S2S:{SRC:"s2s",DEFAULT_ENDPOINT:"https://prebid.adnxs.com/pbs/v1/openrtb2/auction",SYNCED_BIDDERS_KEY:"pbjsSyncs"}}},40:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGlobal=function(){return window.pbjs},window.pbjs=window.pbjs||{},window.pbjs.cmd=window.pbjs.cmd||[],window.pbjs.que=window.pbjs.que||[]},41:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=[],r=(0,c.groupBy)(e,"adUnitCode");return Object.keys(r).forEach(function(e){var i=(0,c.groupBy)(r[e],"bidderCode");Object.keys(i).forEach(function(e){return n.push(i[e].reduce(t,o()))})}),n}function o(e){return{adUnitCode:e,cpm:0,adserverTargeting:{},timeToRespond:0}}function a(e){function n(t){return"string"==typeof t?[t]:h.isArray(t)?t:e.getAdUnitCodes()||[]}function a(){return i(e.getBidsReceived().filter(A).filter(t.isBidNotExpired),c.getOldestHighestCpmBid)}function s(){return e.getStandardBidderAdServerTargeting().map(function(e){return e.key}).concat(v.TARGETING_KEYS).filter(c.uniques)}function l(e,t,n,r){return Object.keys(t.adserverTargeting).filter(p()).forEach(function(n){var r,i;e.length&&e.filter((i=n,function(e){return e.adUnitCode===t.adUnitCode&&e.adserverTargeting[i]})).forEach((r=n,function(e){h.isArray(e.adserverTargeting[r])||(e.adserverTargeting[r]=[e.adserverTargeting[r]]),e.adserverTargeting[r]=e.adserverTargeting[r].concat(t.adserverTargeting[r]).filter(c.uniques),delete t.adserverTargeting[r]}))}),e.push(t),e}function p(){var e=s();return function(t){return-1===e.indexOf(t)}}function y(e){return r({},e.adUnitCode,Object.keys(e.adserverTargeting).filter(p()).map(function(t){return r({},t.substring(0,_),[e.adserverTargeting[t]])}))}var m={};return m.resetPresetTargeting=function(t){if((0,c.isGptPubadsDefined)()){var r=n(t),i=e.getAdUnits().filter(function(e){return(0,g.default)(r,e.code)});window.googletag.pubads().getSlots().forEach(function(e){b.forEach(function(t){i.forEach(function(n){n.code!==e.getAdUnitPath()&&n.code!==e.getSlotElementId()||e.setTargeting(t,null)})})})}},m.getAllTargeting=function(e){var t,o,p,A,E,w,S,I,T,x=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a(),j=n(e),C=(w=j,S=x,I=m.getWinningBids(w,S),T=s(),I=I.map(function(e){return r({},e.adUnitCode,Object.keys(e.adserverTargeting).filter(function(t){return void 0===e.sendStandardTargeting||e.sendStandardTargeting||-1===T.indexOf(t)}).map(function(t){return r({},"hb_deal"===t?(t+"_"+e.bidderCode).substring(0,_):t.substring(0,_),[e.adserverTargeting[t]])}))})).concat((A=j,E=x,E.filter(function(e){return(0,g.default)(A,e.adUnitCode)}).map(function(e){return u({},e)}).reduce(l,[]).map(y).filter(function(e){return e}))).concat(d.config.getConfig("enableSendAllBids")?(t=j,o=x,p=v.TARGETING_KEYS.concat(f.NATIVE_TARGETING_KEYS),i(o,c.getHighestCpm).map(function(e){if(e.adserverTargeting&&t&&(h.isArray(t)&&(0,g.default)(t,e.adUnitCode)||"string"==typeof t&&e.adUnitCode===t))return r({},e.adUnitCode,(n=e,p.filter(function(t){return void 0!==e.adserverTargeting[t]}).map(function(e){return r({},(e+"_"+n.bidderCode).substring(0,_),[n.adserverTargeting[e]])})));var n}).filter(function(e){return e})):[]);return C.map(function(e){Object.keys(e).map(function(t){e[t].map(function(e){-1===b.indexOf(Object.keys(e)[0])&&(b=Object.keys(e).concat(b))})})}),C=C.map(function(e){return r({},Object.keys(e)[0],e[Object.keys(e)[0]].map(function(e){return r({},Object.keys(e)[0],e[Object.keys(e)[0]].join(", "))}).reduce(function(e,t){return u(t,e)},{}))}).reduce(function(e,t){var n=Object.keys(t)[0];return e[n]=u({},e[n],t[n]),e},{}),j.forEach(function(e){C[e]||(C[e]={})}),C},m.setTargetingForGPT=function(e,t){window.googletag.pubads().getSlots().forEach(function(n){Object.keys(e).filter(t?t(n):(0,c.isAdUnitCodeMatchingSlot)(n)).forEach(function(t){return Object.keys(e[t]).forEach(function(r){var i=e[t][r].split(",");(i=i.length>1?[i]:i).map(function(e){return h.logMessage("Attempting to set key value for slot: "+n.getSlotElementId()+" key: "+r+" value: "+e),e}).forEach(function(e){n.setTargeting(r,e)})})})})},m.getWinningBids=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a(),r=n(e);return t.filter(function(e){return(0,g.default)(r,e.adUnitCode)}).filter(function(e){return e.cpm>0}).map(function(e){return e.adUnitCode}).filter(c.uniques).map(function(e){return t.filter(function(t){return t.adUnitCode===e?t:null}).reduce(c.getHighestCpm,o(e))})},m.setTargetingForAst=function(){var e=m.getAllTargeting();Object.keys(e).forEach(function(t){return Object.keys(e[t]).forEach(function(n){if(h.logMessage("Attempting to set targeting for targetId: "+t+" key: "+n+" value: "+e[t][n]),h.isStr(e[t][n])||h.isArray(e[t][n])){var r={};n.search(/pt[0-9]/)(0,c.timestamp)()},function(e){return e&&(e.status&&!(0,g.default)([y,m],e.status)||!e.status)});t.targeting=a(l.auctionManager)},42:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){t.timeToRespond>e.getTimeout()+y.config.getConfig("timeoutBuffer")&&e.executeCallback(!0)}function o(e,t){T.emit(x.EVENTS.BID_RESPONSE,t),e.addBidReceived(t),i(e,t)}function a(e){var t=y.config.getConfig("mediaTypePriceGranularity."+e),n="string"==typeof e&&t?"string"==typeof t?t:"custom":y.config.getConfig("priceGranularity"),r=pbjs.bidderSettings;return r[x.JSON_MAPPING.BD_SETTING_STANDARD]||(r[x.JSON_MAPPING.BD_SETTING_STANDARD]={}),r[x.JSON_MAPPING.BD_SETTING_STANDARD][x.JSON_MAPPING.ADSERVER_TARGETING]||(r[x.JSON_MAPPING.BD_SETTING_STANDARD][x.JSON_MAPPING.ADSERVER_TARGETING]=[{key:"hb_bidder",val:function(e){return e.bidderCode}},{key:"hb_adid",val:function(e){return e.adId}},{key:"hb_pb",val:function(e){return n===x.GRANULARITY_OPTIONS.AUTO?e.pbAg:n===x.GRANULARITY_OPTIONS.DENSE?e.pbDg:n===x.GRANULARITY_OPTIONS.LOW?e.pbLg:n===x.GRANULARITY_OPTIONS.MEDIUM?e.pbMg:n===x.GRANULARITY_OPTIONS.HIGH?e.pbHg:n===x.GRANULARITY_OPTIONS.CUSTOM?e.pbCg:void 0}},{key:"hb_size",val:function(e){return e.size}},{key:"hb_deal",val:function(e){return e.dealId}},{key:"hb_source",val:function(e){return e.source}},{key:"hb_format",val:function(e){return e.mediaType}}]),r[x.JSON_MAPPING.BD_SETTING_STANDARD]}function u(e,t){if(!t)return{};var n={},r=pbjs.bidderSettings;return r&&(s(n,a(t.mediaType),t),e&&r[e]&&r[e][x.JSON_MAPPING.ADSERVER_TARGETING]&&(s(n,r[e],t),t.sendStandardTargeting=r[e].sendStandardTargeting)),t.native&&(n=l({},n,(0,h.getNativeTargeting)(t))),n}function s(e,t,n){var r=t[x.JSON_MAPPING.ADSERVER_TARGETING];return n.size=n.getSize(),S._each(r,function(r){var i=r.key,o=r.val;if(e[i]&&S.logWarn("The key: "+i+" is getting ovewritten"),S.isFn(o))try{o=o(n)}catch(e){S.logError("bidmanager","ERROR",e)}(void 0===t.suppressEmptyKeys||!0!==t.suppressEmptyKeys)&&"hb_deal"!==i||!S.isEmptyStr(o)&&null!=o?e[i]=o:S.logInfo("suppressing empty key '"+i+"' from adserver targeting")}),e}function c(e){var t=e.bidderCode,n=e.cpm,r=void 0;if(pbjs.bidderSettings&&(t&&pbjs.bidderSettings[t]&&"function"==typeof pbjs.bidderSettings[t].bidCpmAdjustment?r=pbjs.bidderSettings[t].bidCpmAdjustment:pbjs.bidderSettings[x.JSON_MAPPING.BD_SETTING_STANDARD]&&"function"==typeof pbjs.bidderSettings[x.JSON_MAPPING.BD_SETTING_STANDARD].bidCpmAdjustment&&(r=pbjs.bidderSettings[x.JSON_MAPPING.BD_SETTING_STANDARD].bidCpmAdjustment),r))try{n=r(e.cpm,l({},e))}catch(e){S.logError("Error during bid adjustment","bidmanager.js",e)}n>=0&&(e.cpm=n)}function d(e,t){return e[t.adUnitCode]||(e[t.adUnitCode]={bids:[]}),e[t.adUnitCode].bids.push(t),e}Object.defineProperty(t,"__esModule",{value:!0}),t.addBidResponse=t.AUCTION_COMPLETED=t.AUCTION_IN_PROGRESS=t.AUCTION_STARTED=void 0;var f="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof(e)},l=Object.assign||function(e){for(var t=1;t=1})&&(S.logInfo("Bids Received for Auction with id: "+v,g),b=O,t(!1,!0))}var r=e.adUnits,i=e.adUnitCodes,o=e.callback,a=e.cbTimeout,u=e.labels,s=r,c=u,f=i,l=[],g=[],h=void 0,v=S.generateUUID(),b=void 0,m=o,_=void 0,P=a,U=[];return{addBidReceived:function(e){g=g.concat(e)},executeCallback:t,callBids:function(){function e(e){var t=!0,n=y.config.getConfig("maxRequestsPerOrigin")||R;return e.bidRequests.some(function(e){var r=1,i=void 0!==e.src&&e.src===x.S2S.SRC?"s2s":e.bidderCode;return k[i]&&(!1===k[i].SRA&&(r=Math.min(e.bids.length,n)),B[k[i].origin]+r>n&&(t=!1)),!t}),t&&e.run(),t}function r(e,t){void 0===e[t]?e[t]=1:e[t]++}var i=this;b=j,h=Date.now();var o=I.makeBidRequests(s,h,v,P,c);S.logInfo("Bids Requested for Auction with id: "+v,o),o.forEach(function(e){var t;t=e,l=l.concat(t)});var a={},u={bidRequests:o,run:function(){var u,c;u=t.bind(null,!0),c=setTimeout(u,P),_=c,b=C;var d={timestamp:h,auctionId:v,timeout:P};T.emit(x.EVENTS.AUCTION_INIT,d),I.callBids(s,o,D.bind(i),function(e){var t=e;return(0,p.delayExecution)(function(){(0,A.default)(l,function(e){return t===e.bidderRequestId}).doneCbCallCount+=1,n()},1)}.bind(i),{request:function(e,t){r(B,t),r(a,e),k[e]||(k[e]={SRA:!0,origin:t}),a[e]>1&&(k[e].SRA=!1)},done:function(t){B[t]--,N[0]&&e(N[0])&&N.shift()}},P)}};e(u)||(S.logWarn("queueing auction due to limited endpoint capacity"),N.push(u))},bidsBackAll:n,addWinningBid:function(e){U=U.concat(e),I.callBidWonBidder(e.bidder,e)},getWinningBids:function(){return U},getTimeout:function(){return P},getAuctionId:function(){return v},getAuctionStatus:function(){return b},getAdUnits:function(){return s},getAdUnitCodes:function(){return f},getBidRequests:function(){return l},getBidsReceived:function(){return g}}},t.getStandardBidderSettings=a,t.getKeyValueTargetingPairs=u,t.adjustBids=c;var p=n(0),g=n(31),h=n(18),v=n(203),b=n(12),y=n(3),m=n(17),_=n(20),A=r(n(10)),E=r(n(5)),w=m.userSync.syncUsers,S=n(0),I=n(8),T=n(9),x=n(4),j=t.AUCTION_STARTED="started",C=t.AUCTION_IN_PROGRESS="inProgress",O=t.AUCTION_COMPLETED="completed";T.on(x.EVENTS.BID_ADJUSTMENT,function(e){c(e)});var R=4,B={},k={},N=[],D=t.addBidResponse=(0,_.createHook)("asyncSeries",function(e,t){var n,r,a,s,c=this.getBidRequests(),d=this.getAuctionId(),h=(0,p.getBidderRequest)(c,t.bidderCode,e),m=function(e){var t=e.adUnitCode,n=e.bid,r=e.bidRequest,i=e.auctionId,o=r.start,a=l({},n,{auctionId:i,responseTimestamp:(0,p.timestamp)(),requestTimestamp:o,cpm:parseFloat(n.cpm)||0,bidder:n.bidderCode,adUnitCode:t});a.timeToRespond=a.responseTimestamp-a.requestTimestamp,T.emit(x.EVENTS.BID_ADJUSTMENT,a);var s=r.bids&&(0,A.default)(r.bids,function(e){return e.adUnitCode==t}),c=s&&s.renderer;c&&c.url&&(a.renderer=b.Renderer.install({url:c.url}),a.renderer.setRender(c.render));var d,h=y.config.getConfig("mediaTypePriceGranularity."+n.mediaType),v=(0,g.getPriceBucketString)(a.cpm,"object"===(void 0===h?"undefined":f(h))?h:y.config.getConfig("customPriceBucket"),y.config.getConfig("currency.granularityMultiplier"));return a.pbLg=v.low,a.pbMg=v.med,a.pbHg=v.high,a.pbAg=v.auto,a.pbDg=v.dense,a.pbCg=v.custom,a.bidderCode&&(a.cpm>0||a.dealId)&&(d=u(a.bidderCode,a)),a.adserverTargeting=l(a.adserverTargeting||{},d),a}({adUnitCode:e,bid:t,bidRequest:h,auctionId:d});"video"===m.mediaType?(n=this,r=m,a=h,s=!0,y.config.getConfig("cache.url")&&(r.videoCacheKey?r.vastUrl||(S.logError("videoCacheKey specified but not required vastUrl for video bid"),s=!1):(s=!1,(0,v.store)([r],function(e,t){e?(S.logWarn("Failed to save to the video cache: "+e+". Video bid must be discarded."),i(n,r)):(r.videoCacheKey=t[0].uuid,r.vastUrl||(r.vastUrl=(0,v.getCacheUrl)(r.videoCacheKey)),a.doneCbCallCount+=1,o(n,r),n.bidsBackAll())}))),s&&o(n,r)):o(this,m)},"addBidResponse")},45:function(e,t,n){"use strict";var r=n(14),i=n(34)(5),o="find",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(27)(o)},46:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},47:function(e,t,n){var r=n(48),i=n(53);e.exports=n(23)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},48:function(e,t,n){var r=n(49),i=n(50),o=n(52),a=Object.defineProperty;t.f=n(23)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},49:function(e,t,n){var r=n(15);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},5:function(e,t,n){n(59),e.exports=n(13).Array.includes},50:function(e,t,n){e.exports=!n(23)&&!n(33)(function(){return 7!=Object.defineProperty(n(51)("div"),"a",{get:function(){return 7}}).a})},51:function(e,t,n){var r=n(15),i=n(19).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},52:function(e,t,n){var r=n(15);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},53:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},54:function(e,t,n){var r=n(25);e.exports=function(e){return Object(r(e))}},55:function(e,t,n){var r=n(56);e.exports=function(e,t){return new(r(e))(t)}},555:function(e,t,n){e.exports=n(556)},556:function(e,t,n){"use strict";function r(e,t,n){e.defaultView&&e.defaultView.frameElement&&(e.defaultView.frameElement.width=t,e.defaultView.frameElement.height=n)}function i(e,t,n){var r={};r.reason=e,r.message=t,n&&(r.bid=n),S.logError(t),x.emit(N,r)}function o(e){e.forEach(function(e){if(void 0===e.called)try{e.call(),e.called=!0}catch(e){S.logError("Error processing command :","prebid.js",e)}})}var a,u="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof(e)},s=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.bidsBackHandler,n=e.timeout,r=e.adUnits,i=e.adUnitCodes,o=e.labels;x.emit(B);var a=n||g.config.getConfig("bidderTimeout");if(r=r||E.adUnits,S.logInfo("Invoking pbjs.requestBids",arguments),i&&i.length?r=r.filter(function(e){return(0,_.default)(i,e.code)}):i=r&&r.map(function(e){return e.code}),r.forEach(function(e){var t=Object.keys(e.mediaTypes||{banner:"banner"}),n=e.bids.map(function(e){return e.bidder}),r=I.bidderRegistry,i=g.config.getConfig("s2sConfig"),o=i&&i.bidders,a=o?n.filter(function(e){return!(0,_.default)(o,e)}):n;e.transactionId||(e.transactionId=S.generateUUID()),a.forEach(function(n){var i=r[n],o=i&&i.getSpec&&i.getSpec(),a=o&&o.supportedMediaTypes||["banner"];t.some(function(e){return(0,_.default)(a,e)})||(S.logWarn(S.unsupportedBidderMessage(e,n)),e.bids=e.bids.filter(function(e){return e.bidder!==n}))}),A.adunitCounter.incrementCounter(e.code)}),r&&0!==r.length){var u=h.auctionManager.createAuction({adUnits:r,adUnitCodes:i,callback:t,cbTimeout:a,labels:o});return u.callBids(),u}if(S.logMessage("No adUnits configured. No bids requested."),"function"==typeof t)try{t()}catch(e){S.logError("Error executing bidsBackHandler",null,e)}}),E.addAdUnits=function(e){S.logInfo("Invoking pbjs.addAdUnits",arguments),S.isArray(e)?E.adUnits.push.apply(E.adUnits,e):"object"===(void 0===e?"undefined":u(e))&&E.adUnits.push(e),x.emit(O)},E.onEvent=function(e,t,n){S.logInfo("Invoking pbjs.onEvent",arguments),S.isFn(t)?!n||W[e].call(null,n)?x.on(e,t,n):S.logError('The id provided is not valid for event "'+e+'" and no handler was set.'):S.logError('The event handler provided is not a function and was not set on event "'+e+'".')},E.offEvent=function(e,t,n){S.logInfo("Invoking pbjs.offEvent",arguments),n&&!W[e].call(null,n)||x.off(e,t,n)},E.registerBidAdapter=function(e,t){S.logInfo("Invoking pbjs.registerBidAdapter",arguments);try{I.registerBidAdapter(e(),t)}catch(e){S.logError("Error registering bidder adapter : "+e.message)}},E.registerAnalyticsAdapter=function(e){S.logInfo("Invoking pbjs.registerAnalyticsAdapter",arguments);try{I.registerAnalyticsAdapter(e)}catch(e){S.logError("Error registering analytics adapter : "+e.message)}},E.createBid=function(e){return S.logInfo("Invoking pbjs.createBid",arguments),T.createBid(e)},E.loadScript=function(e,t,n){S.logInfo("Invoking pbjs.loadScript",arguments),(0,p.loadScript)(e,t,n)},E.enableAnalytics=function(e){e&&!S.isEmpty(e)?(S.logInfo("Invoking pbjs.enableAnalytics for: ",e),I.enableAnalytics(e)):S.logError("pbjs.enableAnalytics should be called with option {}")},E.aliasBidder=function(e,t){S.logInfo("Invoking pbjs.aliasBidder",arguments),e&&t?I.aliasBidAdapter(e,t):S.logError("bidderCode and alias must be passed as arguments","pbjs.aliasBidder")},E.getAllWinningBids=function(){return h.auctionManager.getAllWinningBids().map(d.removeRequestId)},E.getAllPrebidWinningBids=function(){return h.auctionManager.getBidsReceived().filter(function(e){return e.status===v.BID_TARGETING_SET}).map(d.removeRequestId)},E.getHighestCpmBids=function(e){return v.targeting.getWinningBids(e).map(d.removeRequestId)},E.markWinningBidAsUsed=function(e){var t=[];e.adUnitCode&&e.adId?t=h.auctionManager.getBidsReceived().filter(function(t){return t.adId===e.adId&&t.adUnitCode===e.adUnitCode}):e.adUnitCode?t=v.targeting.getWinningBids(e.adUnitCode):e.adId?t=h.auctionManager.getBidsReceived().filter(function(t){return t.adId===e.adId}):S.logWarn("Inproper usage of markWinningBidAsUsed. It'll need an adUnitCode and/or adId to function."),t.length>0&&(t[0].status=v.RENDERED)},E.getConfig=g.config.getConfig,E.setConfig=g.config.setConfig,E.que.push(function(){return(0,f.listenMessagesFromCreative)()}),E.cmd.push=function(e){if("function"==typeof e)try{e.call()}catch(e){S.logError("Error processing command :",e.message,e.stack)}else S.logError("Commands written into pbjs.cmd.push must be wrapped in a function")},E.que.push=E.cmd.push,E.processQueue=function(){o(E.que),o(E.cmd)}},557:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t,n,r,i,u,l,p,g,h,v,b,y,m=e.message?"message":"data",_={};try{_=JSON.parse(e[m])}catch(e){return}if(_&&_.adId){var A=(0,d.default)(c.auctionManager.getBidsReceived(),function(e){return e.adId===_.adId});"Prebid Request"===_.message&&(u=A,l=_.adServerDomain,p=e.source,g=u.adId,h=u.ad,v=u.adUrl,b=u.width,y=u.height,g&&(n=(t=u).adUnitCode,r=t.width,i=t.height,["div","iframe"].forEach(function(e){var t,o=(t=e,document.getElementById((0, d.default)(window.googletag.pubads().getSlots().filter((0,s.isSlotMatchingAdUnitCode)(n)),function(e){return e}).getSlotElementId()).querySelector(t)).style;o.width=r,o.height=i}),p.postMessage(JSON.stringify({message:"Prebid Response",ad:h,adUrl:v,adId:g,width:b,height:y}),l)),c.auctionManager.addWinningBid(A),o.default.emit(f,A)),"Prebid Native"===_.message&&((0,a.fireNativeTrackers)(_,A),c.auctionManager.addWinningBid(A),o.default.emit(f,A))}}Object.defineProperty(t,"__esModule",{value:!0}),t.listenMessagesFromCreative=function(){addEventListener("message",i,!1)};var o=r(n(9)),a=n(18),u=n(4),s=n(0),c=n(29),d=r(n(10)),f=u.EVENTS.BID_WON},558:function(e,t,n){"use strict";function r(e){(0,d.logMessage)("DEBUG: "+e)}function i(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];c.config.setConfig({debug:!0}),r("bidder overrides enabled"+(n?" from session":"")),p&&f.addBidResponse.removeHook(p),t.boundHook=p=a.bind(null,e),f.addBidResponse.addHook(p,5)}function o(){p&&(f.addBidResponse.removeHook(p),r("bidder overrides disabled"))}function a(e,t,n,i){if(Array.isArray(e.bidders)&&-1===e.bidders.indexOf(n.bidderCode))return o="bidder '"+n.bidderCode+"' excluded from auction by bidder overrides",void(0,d.logWarn)("DEBUG: "+o);var o;Array.isArray(e.bids)&&e.bids.forEach(function(e){e.bidder&&e.bidder!==n.bidderCode||e.adUnitCode&&e.adUnitCode!==t||(n=s({},n),Object.keys(e).filter(function(e){return-1===["bidder","adUnitCode"].indexOf(e)}).forEach(function(i){var o=e[i];r("bidder overrides changed '"+t+"/"+n.bidderCode+"' bid."+i+" from '"+n[i]+"' to '"+o+"'"),n[i]=o}))}),i(t,n)}function u(e){if(e.enabled){try{window.sessionStorage.setItem(l,JSON.stringify(e))}catch(e){}i(e)}else{o();try{window.sessionStorage.removeItem(l)}catch(e){}}}Object.defineProperty(t,"__esModule",{value:!0}),t.boundHook=void 0;var s=Object.assign||function(e){for(var t=1;t1?arguments[1]:void 0)}}),n(27)("includes")},60:function(e,t,n){var r=n(61),i=n(36),o=n(62);e.exports=function(e){return function(t,n,a){var u,s=r(t),c=i(s.length),d=o(a,c);if(e&&n!=n){for(;c>d;)if((u=s[d++])!=u)return!0}else for(;c>d;d++)if((e||d in s)&&s[d]===n)return e||d||0;return!e&&-1}}},61:function(e,t,n){var r=n(35),i=n(25);e.exports=function(e){return r(i(e))}},62:function(e,t,n){var r=n(37),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))0&&void 0!==arguments[0]?arguments[0]:{},n=t.labels,r=void 0===n?[]:n,o=t.labelAll,a=void 0!==o&&o,s=t.activeLabels,f=void 0===s?[]:s,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],p=(e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d,e.reduce(function(e,t){return"object"===(void 0===t?"undefined":i(t))&&"string"==typeof t.mediaQuery?matchMedia(t.mediaQuery).matches&&(Array.isArray(t.sizesSupported)&&(e.shouldFilter=!0),["labels","sizesSupported"].forEach(function(n){return(t[n]||[]).forEach(function(t){return e[n][t]=!0})})):(0,u.logWarn)('sizeConfig rule missing required property "mediaQuery"'),e},{labels:{},sizesSupported:{},shouldFilter:!1})),g=void 0;return g=p.shouldFilter?l.filter(function(e){return p.sizesSupported[e]}):l,{active:g.length>0&&(0===r.length||!a&&(r.some(function(e){return p.labels[e]})||r.some(function(e){return(0,c.default)(f,e)}))||a&&r.reduce(function(e,t){return e?p.labels[t]||(0,c.default)(f,t):e},!0)),sizes:g}};var o,a=n(3),u=n(0),s=n(5),c=(o=s)&&o.__esModule?o:{default:o},d=[];a.config.getConfig("sizeConfig",function(e){return r(e.sizeConfig)})},65:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasNonVideoBidder=t.videoBidder=t.videoAdUnit=void 0,t.isValidVideoBid=function(e,t){var n=(0,o.getBidRequest)(e.adId,t),r=n&&(0,o.deepAccess)(n,"mediaTypes.video"),i=r&&(0,o.deepAccess)(r,"context");return!n||r&&i!==c?a.config.getConfig("cache.url")||!e.vastXml||e.vastUrl?!(!e.vastUrl&&!e.vastXml):((0,o.logError)('n This bid contains only vastXml and will not work when a prebid cache url is not specified.n Try enabling prebid cache with pbjs.setConfig({ cache: {url: "..."} });n '),!1):i!==c||!(!e.renderer&&!n.renderer)};var r,i=n(8),o=n(0),a=n(3),u=n(5),s=(r=u)&&r.__esModule?r:{default:r},c="outstream",d=(t.videoAdUnit=function(e){var t="video"===e.mediaType,n=(0,o.deepAccess)(e,"mediaTypes.video");return t||n},t.videoBidder=function(e){return(0,s.default)(i.videoAdapters,e.bidder)});t.hasNonVideoBidder=function(e){return e.bids.filter(function(e){return!d(e)}).length}},7:function(e,t,n){"use strict";function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.request,r=t.done;return function(t,d,f){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};try{var p=void 0,g=l.method||(f?"POST":"GET"),h=document.createElement("a");h.href=t;var v="object"===(void 0===d?"undefined":o(d))&&null!==d?d:{success:function(){s.logMessage("xhr success")},error:function(e){s.logError("xhr error",null,e)}};if("function"==typeof d&&(v.success=d),(p=new window.XMLHttpRequest).onreadystatechange=function(){if(p.readyState===c){"function"==typeof r&&r(h.origin);var e=p.status;e>=200&&e0})})}var x,j,C=(x=e,(j=m.deepClone(x)).forEach(function(e){e.bids=e.bids.filter(function(e){return!a()||e.finalSource!==E.SERVER})}),j=j.filter(function(e){return 0!==e.bids.length}));return g.forEach(function(e){var t=m.getUniqueIdentifierStr(),a={bidderCode:e,auctionId:r,bidderRequestId:t,bids:o({bidderCode:e,auctionId:r,bidderRequestId:t,adUnits:C,labels:u}),auctionStart:n,timeout:i},c=w[e];c||m.logError("Trying to make a request for bidder that does not exist: "+e),c&&a.bids&&0!==a.bids.length&&s.push(a)}),t.gdprDataHandler.getConsentData()&&s.forEach(function(e){e.gdprConsent=t.gdprDataHandler.getConsentData()}),s},t.checkBidRequestSizes=function(e){function t(e){return Array.isArray(e)&&2===e.length&&m.isInteger(e[0])&&m.isInteger(e[1])}return e.forEach(function(e){var n=e.mediaTypes,r=m.getAdUnitSizes(e);if(n&&n.banner){var i=n.banner;i.sizes?(i.sizes=r,e.sizes=r):(m.logError("Detected a mediaTypes.banner object did not include sizes. This is a required field for the mediaTypes.banner object. Removing invalid mediaTypes.banner object from request."),delete e.mediaTypes.banner)}else e.sizes&&(m.logWarn("Usage of adUnits.sizes will eventually be deprecated. Please define size dimensions within the corresponding area of the mediaTypes.");var s=b[r.size_id].split("x").map(function(e){return Number(e)}),l=c(s,2);u.width=l[0],u.height=l[1]}u.rubiconTargeting=(Array.isArray(r.targeting)?r.targeting:[]).reduce(function(e,t){return e[t.key]=t.values[0],e},{rpfl_elemid:a.adUnitCode}),t.push(u)}else f.logError("Rubicon bid adapter Error: bidRequest undefined at index position:"+i,n,e);return t},[]).sort(function(e,t){return(t.cpm||0)-(e.cpm||0)})},getUserSyncs:function(e,t,n){if(!m&&e.iframeEnabled){var r="";return n&&"string"==typeof n.consentString&&("boolean"==typeof n.gdprApplies?r+="?gdpr="+Number(n.gdprApplies)+"&gdpr_consent="+n.consentString:r+="?gdpr_consent="+n.consentString),m=!0,{type:"iframe",url:"https://eus.rubiconproject.com/usync.html"+r}}},transformBidParams:function(e,t){return f.convertTypes({accountId:"number",siteId:"number",zoneId:"number"},e)}},m=!1;(0,l.registerBidder)(y)},433:function(e,t){}},[431]),pbjsChunk([36],{467:function(e,t,n){n(468),e.exports=n(469)},468:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return e.params.sizes?(0,f.parseSizesInput)(e.params.sizes).join(","):(0,f.parseSizesInput)(e.sizes).join(",")}function o(e){return e.params.floor?"|f="+e.params.floor:""}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=m(e);return t(0,768)?"mobile":t(768,992)?"tablet":"desktop"}Object.defineProperty(t,"__esModule",{value:!0}),t._isInbounds=t.spec=void 0;var u=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=Object.assign||function(e){for(var t=1;t'}},m=t._isInbounds=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_SAFE_INTEGER;return e.innerWidth>=t&&e.innerWidth-1}function s(t){return!!e.document.hasFocus()&&n.isElementInViewport(t)}function c(e){var t=[];return e&&e.length&&(e=e.split(","),r.map(e,function(e){e=e.split("x");var n=parseInt(e[0]),r=parseInt(e[1]);t.push([n,r])})),t}function d(){var e=document.querySelector("div[data-adnode]"),t="";return e&&(t=e.getAttribute("data-adnode")),t}function f(e){return"true"===e.prebid}e.googletag=e.googletag||{},e.googletag.cmd=e.googletag.cmd||[],e.pbjs=e.pbjs||{},e.pbjs.que=e.pbjs.que||[];var l={},p=[],g=function(){var t=/[?&]test_ads=([^?]+)/,n=t.exec(e.location.search);return n?n[1]:""}(),h=function(){return"91898098/slate.com/"+d()}(),v=function(){return window.document.documentElement.getAttribute("data-uri").split("/")[2].replace("@published","")}(),b=[];e.googletag.cmd.push(function(){e.googletag.pubads().disableInitialLoad(),e.googletag.enableServices();var t=Math.floor(1e13*Math.random()),n=document.querySelectorAll('meta[name="dfp-cache-buster"]')[0];n&&n.content&&(t=n.content),e.googletag.pubads().setTargeting("dfp_cache_buster",t).setTargeting("page_id",v),g&&googletag.pubads().setTargeting("kw","test_"+g),e.Krux&&e.Krux.segments&&googletag.pubads().setTargeting("ksg",e.Krux.segments),e.Krux&&e.Krux.user&&googletag.pubads().setTargeting("kuid",e.Krux.user),i()}),this.requestAd=function(n){e.googletag.cmd.push(function(){var r=e.googletag.defineSlot(h,n.dfpSizes,n.id);b[n.id]=n,r.addService(googletag.pubads()),r.setTargeting("site","redux"),r.setTargeting("refresh","no"),r.setTargeting("pos",n.id), r.setTargeting("page_type",n.pageType),e.googletag.display(n.id),f(n)?t.prebid(n,r):googletag.pubads().refresh([r],{changeCorrelator:!1})})},this.createAd=function(e){var t=e.getAttribute("data-type"),n=e.getAttribute("data-page-type"),r=e.getAttribute("data-prebid"),i=e.getAttribute("data-sizes"),o=e.getAttribute("data-prebid-sizes"),a=e.getAttribute("data-zone-id"),u=e.getAttribute("data-placement-id"),s=e.getAttribute("data-trustx-id"),d=e.getAttribute("data-criteo-id"),f=e.getAttribute("data-site-id");return l[t]||(l[t]=1),e.id=t+"-"+l[t],l[t]++,{id:e.id,type:t,pageType:n,prebid:r,dfpSizes:c(i),prebidSizes:c(o),rubiconZoneId:a,appnexusPlacementId:u,trustxId:s,criteoZoneId:d,indexSiteId:f}}}]),DS.service("$cid",function(){var e=Math.floor(100*Math.random());return function(){return"cid-"+ ++e}}),DS.service("dom",["$document",function(e){this.find=function(t,n){return n||(n=t,t=e),t.querySelector(n)},this.findAll=function(t,n){return n||(n=t,t=e),t.querySelectorAll(n)},this.getFirstChildElement=function(e){for(var t=e.firstChild;t&&1!==t.nodeType;)t=t.nextSibling;return t},this.prependChild=function(e,t){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)},this.insertAfter=function(e,t){t.parentNode.insertBefore(e,t.nextSibling)},this.clearChildren=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},this.removeElement=function(e){e.parentNode.removeChild(e)},this.preventDefault=function(e){e&&e.preventDefault&&e.preventDefault()},this.replaceElement=function(e,t){var n=e.parentNode;n&&n.replaceChild(t,e)},this.matches=function(t,n){var r,i,o;if(t.matches)return t.matches(n);for(r=t.parentElement||e,i=r.querySelectorAll(n),o=0;i[o]&&i[o]!==t;)o++;return!!i[o]},this.closest=function(e,t){for(var n=e;n&&!this.matches(n,t);)n=n.parentElement||n.parentNode;return n||null},this.getPos=function(e){var t=e.getBoundingClientRect(),n=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;return{top:t.top+n,bottom:t.top+t.height+n,height:t.height}}}]),DS.service("headerBidding",function(){var e,t;this.prebid=function(n,r){e=n,t=r,this.requestBidsFromExchanges()},this.requestBidsFromExchanges=function(){this.getBidsFromPrebidExchanges(),this.getBidsFromAmazon()},this.getBidsFromPrebidExchanges=function(){var n=this.createPrebidAdUnit();pbjs.que.push(function(){pbjs.addAdUnits([n]);var r=e,i=t;pbjs.requestBids({adUnitCodes:[e.id],bidsBackHandler:function(){googletag.cmd.push(function(){pbjs.que.push(function(){pbjs.setTargetingForGPTAsync([r.id]),googletag.pubads().refresh([i],{changeCorrelator:!1}),pbjs.removeAdUnit(r.id)})})}})})},this.getBidsFromAmazon=function(){var e=this.createApsAdUnit(),t=pbjs.getConfig("bidderTimeout"),n=t||800;apstag&&apstag.fetchBids({slots:[e],timeout:n},function(e){googletag.cmd.push(function(){apstag.setDisplayBids()})})},this.createPrebidAdUnit=function(){return{code:e.id,mediaTypes:{banner:{sizes:e.prebidSizes}},bids:this.getBids()}},this.getBids=function(){var t=[this.appnexus(),this.rubicon(),this.trustx(),this.sonobi(),this.criteo(),this.openx()];if(!this.isEuUser())for(var n=0;n-1}});var instance=window.Layzr({threshold:100});instance.on("src:before",function(e){e.addEventListener("load",function(t){e.parentElement.classList.add("loaded")})}),document.addEventListener("DOMContentLoaded",function(e){instance.update().check().handlers(!0)}),DS.service("teadsBackfill",["$window",function(e){e.teadsNoFill=function(e){var t,n=window.innerWidth>969,r=window.innerWidtht?e:t}function a(){A.forEach(c)}function u(e,t){var n=t.visiblePx,r=t.visiblePercent;n&&r>=e.shownThreshold&&!e.seen?(e.seen=!0,setTimeout(function(){e.trigger("shown",new _("shown",t))},15)):(!n||r=0&&r.left>=0&&r.bottom1&&(a+=h(o,Math.floor(t/r),n-1,r)),a}function v(e,t){return i(t,o(e.bottom,0))-i(o(e.top,0),t)}function b(e){for(var t=e.offsetLeft,n=e.offsetTop;e=e.offsetParent;)t+=e.offsetLeft,n+=e.offsetTop;return{left:t,top:n}}function y(t,r){var i,o;return t=t.split(","),o=n.filter(n.map(t,function(t){return(i=e.querySelector(t))&&new m(i).on("shown",function(){n.invokeMap(o,"destroy"),r()})}))}var m,_,A=[];m=function(e,t){t=t||{},this.el=e,this.seen=!1,this.preload=!1,this.preloadThreshhold=t&&t.preloadThreshhold||0,this.shownThreshold=t&&t.shownThreshold||0,this.hiddenThreshold=t&&i(t.shownThreshold,t.hiddenThreshold)||0,A.push(this),c(this)},m.prototype={destroy:function(){A.splice(A.indexOf(this),1)}},r.enable(m.prototype),_=function(e,t){this.type=e,n.assign(this,t)},e.addEventListener("scroll",n.throttle(a,200)),this.getPageOffset=b,this.getLinearSpacialHash=h,this.getVerticallyVisiblePixels=v,this.getViewportHeight=d,this.getViewportWidth=f,this.isElementNotHidden=l,this.isElementInViewport=p,this.watchForAny=y,this.Visible=m}]);"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(){function e(t,n,o){function r(c,s){if(!n[c]){if(!t[c]){var a="function"==typeof require&&require;if(!s&&a)return a(c,!0);if(i)return i(c,!0);var u=new Error("Cannot find module '"+c+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[c]={exports:{}};t[c][0].call(l.exports,function(e){return r(t[c][1][e]||e)},l,l.exports,e,t,n,o)}return n[c].exports}for(var i="function"==typeof require&&require,c=0;c1){if(i=e({path:"/"},o.defaults,i),"number"==typeof i.expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*i.expires),i.expires=s}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[{[]/.test(c)&&(r=c)}catch(e){}r=n.write?n.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[()]/g,escape);var a="";for(var u in i)i[u]&&(a+="; "+u,!0!==i[u]&&(a+="="+i[u]));return document.cookie=t+"="+r+a}t||(c={});for(var l=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,f=0;f-1&&(console.log("removing serviceworker"),a.unregister())}}catch(r){t=!0,n=r}finally{try{!e&&o.return&&o.return()}finally{if(t)throw n}}});var e=r("../../services/client/analytics-js");window.addEventListener("load",function(){navigator.serviceWorker.register("/sw.js").then(function(r){},function(r){console.error("ServiceWorker registration failed: ",r)})}),window.addEventListener("beforeinstallprompt",function(r){r.userChoice.then(function(r){"dismissed"===r.outcome?e.track("PWA - dismissed install prompt"):e.track("PWA - Added to Home Screen")})})}}()},{"../../services/client/analytics-js":2}],2:[function(r,e,t){var n=function(r){r=r||document.querySelectorAll("script.js-analytics-js-data")[0];var e=r.textContent;return JSON.parse(e)},i=function(r,e,t,i){var o=n(),a={};Object.assign(a,o,e),analytics.track(r,a,t,i)};e.exports.getDomEventData=n,e.exports.track=i},{}]},{},[1]);"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(){function e(t,o,n){function r(c,s){if(!o[c]){if(!t[c]){var u="function"==typeof require&&require;if(!s&&u)return u(c,!0);if(i)return i(c,!0);var a=new Error("Cannot find module '"+c+"'");throw a.code="MODULE_NOT_FOUND",a}var f=o[c]={exports:{}};t[c][0].call(f.exports,function(e){return r(t[c][1][e]||e)},f,f.exports,e,t,o,n)}return o[c].exports}for(var i="function"==typeof require&&require,c=0;ct&&o-t1){if(i=e({path:"/"},n.defaults,i),"number"==typeof i.expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*i.expires),i.expires=s}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[{[]/.test(c)&&(r=c)}catch(e){}r=o.write?o.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[()]/g,escape);var u="";for(var a in i)i[a]&&(u+="; "+a,!0!==i[a]&&(u+="="+i[a]));return document.cookie=t+"="+r+u}t||(c={});for(var f=document.cookie?document.cookie.split("; "):[],p=/(%[0-9A-Z]{2})+/g,l=0;l1){if(i=e({path:"/"},o.defaults,i),"number"==typeof i.expires){var u=new Date;u.setMilliseconds(u.getMilliseconds()+864e5*i.expires),i.expires=u}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[{[]/.test(c)&&(r=c)}catch(e){}r=t.write?t.write(r,n):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=encodeURIComponent(String(n)),n=n.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),n=n.replace(/[()]/g,escape);var f="";for(var s in i)i[s]&&(f+="; "+s,!0!==i[s]&&(f+="="+i[s]));return document.cookie=n+"="+r+f}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],a=/(%[0-9A-Z]{2})+/g,l=0;l1){if(i=e({path:"/"},o.defaults,i),"number"==typeof i.expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*i.expires),i.expires=s}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[{[]/.test(c)&&(r=c)}catch(e){}r=t.write?t.write(r,n):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=encodeURIComponent(String(n)),n=n.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),n=n.replace(/[()]/g,escape);var u="";for(var a in i)i[a]&&(u+="; "+a,!0!==i[a]&&(u+="="+i[a]));return document.cookie=n+"="+r+u}n||(c={});for(var d=document.cookie?document.cookie.split("; "):[],l=/(%[0-9A-Z]{2})+/g,f=0;f-1&&(e.gdprConsent="1"),analytics.page(null,"pageView",e,{integrations:{All:!1,comScore:!0}})}function d(){var t=e("../../services/universal/membership");if(t.isMember())return t.getMembershipType()}function f(){return!window.sessionStorage.getItem("visitstarted")&&(window.sessionStorage.setItem("visitstarted","1"),!0)}function p(e,n){I(function(){function o(e){var t=document.body.querySelector("."+e);if(t){var n=t.dataset.uri;if(n&&n.split("/")[2]===e)return t}}var a=window.amplitude.getInstance(),u=n||0,l=a.options&&a.options.deviceId;if(!l&&u0&&(m["Affiliate Link"]="✅"),o("product")&&(m["Product Component"]="✅");var g=o("newsletter-signup");m["Includes Newsletter Signup"]=r(g),g&&(m["Newsletter Signup Placement"]="In Content"),analytics.page(m,{integrations:{All:!0,"Google Analytics":!1,comScore:!1}}),t.removeFromLocation()})}function m(e){var t=d();t&&(e.plan=t)}function v(e){var t=window.Scroll&&Scroll.config.detected;t&&(e.scrollUser=t)}function g(e){try{return parseInt(e)E?void console.error("RETRY LIMIT EXCEEDED"):void setTimeout(function(){e(t,n+1)},k)},A=void 0;return S}])},{"../../services/client/adblock-detector":3,"../../services/client/analytics-js":4,"../../services/universal/membership":5}],2:[function(e,t,n){!function(e){var o=!1;if("function"==typeof define&&define.amd&&(define(e),o=!0),"object"===(void 0===n?"undefined":_typeof(n))&&(t.exports=e(),o=!0),!o){var r=window.Cookies,i=window.Cookies=e();i.noConflict=function(){return window.Cookies=r,i}}}(function(){function e(){for(var e=0,t={};e1){if(i=e({path:"/"},o.defaults,i),"number"==typeof i.expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[{[]/.test(c)&&(r=c)}catch(e){}r=n.write?n.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[()]/g,escape);var s="";for(var u in i)i[u]&&(s+="; "+u,!0!==i[u]&&(s+="="+i[u]));return document.cookie=t+"="+r+s}t||(c={});for(var l=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,f=0;f1){if(i=e({path:"/"},r.defaults,i),"number"==typeof i.expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(o),/^[{[]/.test(c)&&(o=c)}catch(e){}o=n.write?n.write(o,t):encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[()]/g,escape);var u="";for(var s in i)i[s]&&(u+="; "+s,!0!==i[s]&&(u+="="+i[s]));return document.cookie=t+"="+o+u}t||(c={});for(var f=document.cookie?document.cookie.split("; "):[],p=/(%[0-9A-Z]{2})+/g,d=0;dSource: The Senate’s emergency declaration vote is a betrayal.

    Read at 02:12 pm, Mar 15th

  • How to easily cancel useEffect HTTP calls with RxJS

    Why have I been blocked? This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data. Source: How to easily cancel useEffect HTTP calls with RxJS

    Read at 10:48 am, Mar 15th

  • Give me back my monolith - Craig Kerstiens

    Give Me Back My Monolith It feels like we’re starting to pass the peak of the hype cycle of microservices. It’s no longer multiple times a week we now see a blog post of “How I migrated my monolith to 150 services”. Now I often hear a bit more of the counter: “I don’t hate my monolith, I just care that things stay performant”. We’ve actually seen some migrations from micro-services back to a monolith. When you go from one large application to multiple smaller services there are a number of new things you have to tackle, here is a rundown of all the things that were simple that you now get to re-visit: more Setup went from intro chem to quantum mechanics Setting up a basic database and my application with a background process was a pretty defined process. I’d have the readme on Github, and often in an hour or maybe a few I’d be up and running when I started on a new project. Onboarding a new engineering, at least for an initial environment would be done in the first day. As we ventured into micro-services onboarding time skyrocketed. Yes, we have docker and orchestration such as K8s these days to help, but the time from start to up and running a K8s cluster just to onboard a new engineer is orders of magnitude larger than we saw a few years ago. For many junior engineers this is a burden that really is unnecessary complexity. So long for understanding our systems Lets stay on the junior engineer perspective for just a moment. Back when we had monolithic apps if you had an error you had a clear stacktrace to see where it originated from and could jump right in and debug. Now we have a service that talks to another service, that queues something on a message bus, that another service processes, and then we have an error. We have to piece together all of these pieces to eventually learn that service a was on version 11 and service q was expecting vesion 12 already. This in contrast to my standard consolidated log, and lets not forget my interactive terminal/debugger for when I wanted to go step by step through the process. Debugging and understanding is now inherintly more complicated. If we can’t debug them, maybe we can test them Continuous integration and continuous development is now starting to become common place. Most new apps I see now days automatically build and run their tests with a new PR and require tests to pass and review before check-in. These are great processes to have in place and have been a big shift for a lot of companies. But now to really test my service I have to bring up a complete working version of my application. Remember back to onboarding that new engineer with their 150 service K8s cluster? Well now we get to teach our CI system how to bring up all those systems to actually test that things are working. That is probably a bit too much effort so we’re just going to test each piece in isolation, I’m sure our specs were good enough that APIs are clean and service failure is isolated and won’t impact others. All the trade-offs are for a good reason. Right? There are a lot of reasons to migrate to micro-services. I’ve heard cases for more agility, for scaling your teams, for performance, to give you a more resilient service. The reality we’ve invested decades into development practices and tooling around monoliths that are still maturing. In my day to day I work with a lot of folks from all different stacks. Usually we’re talking about scaling because they’re running into limits of a single node Postgres database. Most of our conversation focuses on scaling the database. But in all the conversations I’m fascinated to learn about their architecture. Where are they in their journey to micro-services. It has been an interesting trend to see more and more reactions “We’re happy with our monolithic app.” The road to micro-services may work fine for lots, and the benefits may outweigh the bumpy road to get there, but personally give me my monolithic app and a beach somewhere and I’ll be happy. Source: Give me back my monolith – Craig Kerstiens

    Read at 10:41 am, Mar 15th

  • Writing readable code with TypeScript enums – LogRocket

    Why have I been blocked? This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data. Source: Writing readable code with TypeScript enums – LogRocket

    Read at 05:54 pm, Mar 14th

  • Brexit latest: MPs to vote on giving UK public second referendum | The Independent

    MPs will vote today on whether to give the public a fresh referendum on Brexit after John Bercow selected an amendment that could lead to a Final Say vote. It will be the first time the Commons has held a formal vote on the issue of another referendum and will take place during another day of high drama in Westminster. The motion, tabled by The Independent Group's Sarah Wollaston, will be voted on tonight during a debate on whether to seek a delay to Brexit.  We’ll tell you what’s true. You can form your own view. From 15p €0.18 $0.18 USD 0.27 a day, more exclusives, analysis and extras. Subscribe now It orders Theresa May to seek to delay Brexit “for the purposes of legislating for and conducting a public vote in which the people of the United Kingdom may give their consent" for either leaving the EU on the terms of a deal agreed by Parliament or remaining in the bloc. The amendment is backed by MPs from Labour, the SNP, Plaid Cymru, the Liberal Democrats and The Independent Group. Watch more However, it is unlikely to pass unless it is supported by the Labour leadership and around 25 Conservative rebels. Labour's position on another referendum has been unclear in recent days, with shadow Brexit secretary Keir Starmer saying he was "proud" to support one while shadow education secretary Angela Rayner said it would be "disastrous". Other pro-referendum MPs had wanted to hold off on tabling a motion calling for a fresh public vote until it was more likely to be approved by MPs. A spokesperson for the People's Vote campaign said: "We do not think today is the right time to test the will of the House on the case for a new public vote. Instead, this is the time for parliament to declare it wants an extension of Article 50 so that, after two and a half years of vexed negotiations, our political leaders ca finally decide on what Brexit means." Mr Bercow, the Commons speaker, did not select a rival amendment that suggested another referendum "would be divisive and expensive, and therefore should not take place". That prompted anger from Tory Brexiteers, with senior Eurosceptic Sir Bernard Jenkin suggesting it was a sign of the speaker's pro-EU bias. "What are we to conclude on your own views on these matters?", he asked Mr Bercow. perform eplayer The vote on the proposal for another public vote will take place shortly before MPs vote on a government motion proposing a short delay to Brexit until June if MPs pass a withdrawal agreement by 20 March, or a much longer extension if they do not. mpu0 ads for mobile A number of amendments have been put forward suggesting different courses of action. One, tabled by a group of senior cross-party backbenchers, calls for Brexit to be delayed "to enable the House of Commons to find a way forward that can command majority support". It proposes holding a series of "indicative votes" to determine what kind of Brexit MPs might support.  Another motion, put forward by Labour's Chris Bryant, seeks to stop Ms May holding another vote on her Brexit deal next week. It says that parliamentary rules prevent a vote being held on a motion or amendment that is the same as one that has already been voted on in the current session. As such, the motion "orders the government not to move a further motion" asking MPs to approve the exit plan that has already been twice rejected by the Commons.   mpu0 ads for mobile Generator: Sketch 50.2 (55047) - http://www.bohemiancoding.com/sketch Created with Sketch. Generator: Sketch 50.2 (55047) - http://www.bohemiancoding.com/sketch Created with Sketch. Generator: Sketch 50.2 (55047) - http://www.bohemiancoding.com/sketch Created with Sketch.A historic moment: thousands march to demand Final Say on Brexit 1/65 An estimated 700,000 people marched through London to demand a final say on the withdrawal agreement Angela Christofilou/The Independent 2/65 Red smoke from a canister hangs in the air as around 100,000 demonstrators march through London during a People's Vote anti-brexit demonstration savings banners and placards Anti-Brexit People's Vote March for the Future in London Rex 3/65 Angela Christofilou/The Independent 4/65 Mayor of London Sadiq Khan takes part in the People's Vote March for the Future in London, a march and rally in support of a second EU referendum. PA 5/65 Final Say campaigners take part in the peoples vote march for the future in London 20/10/2018 Protesters wearing final Say shirts and holding placards Angela Christofilou 6/65 Angela Christofilou/The Independent 7/65 Angela Christofilou/The Independent 8/65 Angela Christofilou/The Independent 9/65 MP Chuka Umunna (left) and MP Vince Cable (right) as MP Anna Soubry (centre) addresses Anti-Brexit campaigners at a rally after the People's Vote March for the Future in London, a march and rally in support of a second EU referendum. PA 10/65 Angela Christofilou/The Independent 11/65 Angela Christofilou/The Independent 12/65 A People’s Vote march attendee calls for a Final Say Angela Christofilou 13/65 Demonstrators with banners 'We're with EU' during the People's Vote March for the Future in London, Britain, 20 October 2018. Reports state that the 'March for the Future' is to be led by a column of young people and call for a People’s Vote on the Brexit deal. After marching through central London, there will be a rally on stage in Parliament Square, including speeches from Mayor of London Sadiq Khan. EPA 14/65 Angela Christofilou/The Independent 15/65 Angela Christofilou/The Independent 16/65 Angela Christofilou/The Independent 17/65 Protesters at London’s march for the future in October The Independent 18/65 Editor of The Independent Christian Broughton speaks to demonstrators in Parliament Sqaure after they take part in a march calling for a People's Vote on the final Brexit deal, in central London on October 20, 2018. - Britons dreading life outside Europe gathered from all corners of the UK to London on Saturday to try to stop their country's looming breakup with the EU. AFP/Getty 19/65 A poster at the March for the Future in October The Independent 20/65 Anti-Brexit campaigners take part in the People's Vote March for the Future in London, a march and rally in support of a second EU referendum. PA 21/65 Angela Christofilou/The Independent 22/65 Final Say campaigners take part in the peoples vote march for the future in London 20/10/2018 Angela Christofilou 23/65 Angela Christofilou/The Independent 24/65 Angela Christofilou/The Independent 25/65 Anti-Brexit campaigners take part in the People's Vote March for the Future in London, a march and rally in support of a second EU referendum. PA 26/65 Angela Christofilou/The Independent 27/65 Angela Christofilou/The Independent 28/65 Angela Christofilou/The Independent 29/65 Angela Christofilou/The Independent 30/65 Angela Christofilou/The Independent 31/65 Angela Christofilou/The Independent 32/65 Angela Christofilou/The Independent 33/65 Demonstrators hold placards as they take part in a march calling for a People's Vote on the final Brexit deal, in central London on October 20, 2018. - Britons dreading life outside Europe gathered from all corners of the UK to London on Saturday to try to stop their country's looming breakup with the EU. AFP/Getty 34/65 Angela Christofilou/The Independent 35/65 Angela Christofilou/The Independent 36/65 Angela Christofilou/The Independent 37/65 Angela Christofilou/The Independent 38/65 Angela Christofilou/The Independent 39/65 Angela Christofilou 40/65 Angela Christofilou/The Independent 41/65 Angela Christofilou/The Independent 42/65 Angela Christofilou/The Independent 43/65 Angela Christofilou/The Independent 44/65 Angela Christofilou/The Independent 45/65 Angela Christofilou/The Independent 46/65 Angela Christofilou/The Independent 47/65 Angela Christofilou/The Independent 48/65 Angela Christofilou/The Independent 49/65 Angela Christofilou/The Independent 50/65 Angela Christofilou/The Independent 51/65 Angela Christofilou 52/65 Final Say campaigners take part in the peoples vote march for the future in London 20/10/2018 campaigner wrapped in EU flag Angela Christofilou 53/65 Angela Christofilou/The Independent 54/65 Angela Christofilou/The Independent 55/65 Final Say campaigners take part in the peoples vote march for the future in London 20/10/2018 Angela Christofilou 56/65 Demonstrators pass Trafalgar Square as they take part in a march calling for a People's Vote on the final Brexit deal, in central London on October 20, 2018. - Britons dreading life outside Europe gathered from all corners of the UK to London on Saturday to try to stop their country's looming breakup with the EU. AFP/Getty 57/65 Demonstrators wave Union and European flags and hold up placards as they pass Trafalgar Square, taking part in a march calling for a People's Vote on the final Brexit deal, in central London on October 20, 2018. - Britons dreading life outside Europe gathered from all corners of the UK to London on Saturday to try to stop their country's looming breakup with the EU. AFP/Getty 58/65 Demonstrators hold placards as they take part in a march calling for a People's Vote on the final Brexit deal, in central London on October 20, 2018. - Britons dreading life outside Europe gathered from all corners of the UK to London on Saturday to try to stop their country's looming breakup with the EU. AFP/Getty 59/65 A demonstrator holds a message during a march calling for a People's Vote on the final Brexit deal, in central London on October 20, 2018. - Britons dreading life outside Europe gathered from all corners of the UK to London on Saturday to try to stop their country's looming breakup with the EU. AFP/Getty 60/65 Anti-Brexit campaigners take part in the People's Vote March for the Future in London, a march and rally in support of a second EU referendum. PA 61/65 Demonstrators take part in the 'People's Vote March for the Future,' in central London, Britain, 20 October 2018. Reports state that the 'March for the Future' is to be led by a column of young people and call for a People’s Vote on the Brexit deal. After marching through central London, there will be a rally on stage in Parliament Square, including speeches from Mayor of London Sadiq Khan EPA 62/65 A protester brandishes an Independent t-shirt during the Brexit March Angela Christofilou 63/65 Anti-Brexit campaigners take part in the People's Vote March for the Future in London, a march and rally in support of a second EU referendum PA 64/65 Tens of thousands of people take part in People's Vote March for the Future in central London. The march organised by the People's Vote campaign is led by young people calling for a People's Vote on the Brexit deal Rex 65/65 Anti-Brexit campaigners take part in the People's Vote March for the Future in London, a march and rally in support of a second EU referendum PA 1/65 An estimated 700,000 people marched through London to demand a final say on the withdrawal agreement Angela Christofilou/The Independent 2/65 Red smoke from a canister hangs in the air as around 100,000 demonstrators march through London during a People's Vote anti-brexit demonstration savings banners and placards Anti-Brexit People's Vote March for the Future in London Rex 3/65 Angela Christofilou/The Independent 4/65 Mayor of London Sadiq Khan takes part in the People's Vote March for the Future in London, a march and rally in support of a second EU referendum. PA 5/65 Final Say campaigners take part in the peoples vote march for the future in London 20/10/2018 Protesters wearing final Say shirts and holding placards Angela Christofilou 6/65 Angela Christofilou/The Independent 7/65 Angela Christofilou/The Independent 8/65 Angela Christofilou/The Independent 9/65 MP Chuka Umunna (left) and MP Vince Cable (right) as MP Anna Soubry (centre) addresses Anti-Brexit campaigners at a rally after the People's Vote March for the Future in London, a march and rally in support of a second EU referendum. PA 10/65 Angela Christofilou/The Independent 11/65 Angela Christofilou/The Independent 12/65 A People’s Vote march attendee calls for a Final Say Angela Christofilou 13/65 Demonstrators with banners 'We're with EU' during the People's Vote March for the Future in London, Britain, 20 October 2018. Reports state that the 'March for the Future' is to be led by a column of young people and call for a People’s Vote on the Brexit deal. After marching through central London, there will be a rally on stage in Parliament Square, including speeches from Mayor of London Sadiq Khan. EPA 14/65 Angela Christofilou/The Independent 15/65 Angela Christofilou/The Independent 16/65 Angela Christofilou/The Independent 17/65 Protesters at London’s march for the future in October The Independent 18/65 Editor of The Independent Christian Broughton speaks to demonstrators in Parliament Sqaure after they take part in a march calling for a People's Vote on the final Brexit deal, in central London on October 20, 2018. - Britons dreading life outside Europe gathered from all corners of the UK to London on Saturday to try to stop their country's looming breakup with the EU. AFP/Getty 19/65 A poster at the March for the Future in October The Independent 20/65 Anti-Brexit campaigners take part in the People's Vote March for the Future in London, a march and rally in support of a second EU referendum. PA 21/65 Angela Christofilou/The Independent 22/65 Final Say campaigners take part in the peoples vote march for the future in London 20/10/2018 Angela Christofilou 23/65 Angela Christofilou/The Independent 24/65 Angela Christofilou/The Independent 25/65 Anti-Brexit campaigners take part in the People's Vote March for the Future in London, a march and rally in support of a second EU referendum. PA 26/65 Angela Christofilou/The Independent 27/65 Angela Christofilou/The Independent 28/65 Angela Christofilou/The Independent 29/65 Angela Christofilou/The Independent 30/65 Angela Christofilou/The Independent 31/65 Angela Christofilou/The Independent 32/65 Angela Christofilou/The Independent 33/65 Demonstrators hold placards as they take part in a march calling for a People's Vote on the final Brexit deal, in central London on October 20, 2018. - Britons dreading life outside Europe gathered from all corners of the UK to London on Saturday to try to stop their country's looming breakup with the EU. AFP/Getty 34/65 Angela Christofilou/The Independent 35/65 Angela Christofilou/The Independent 36/65 Angela Christofilou/The Independent 37/65 Angela Christofilou/The Independent 38/65 Angela Christofilou/The Independent 39/65 Angela Christofilou 40/65 Angela Christofilou/The Independent 41/65 Angela Christofilou/The Independent 42/65 Angela Christofilou/The Independent 43/65 Angela Christofilou/The Independent 44/65 Angela Christofilou/The Independent 45/65 Angela Christofilou/The Independent 46/65 Angela Christofilou/The Independent 47/65 Angela Christofilou/The Independent 48/65 Angela Christofilou/The Independent 49/65 Angela Christofilou/The Independent 50/65 Angela Christofilou/The Independent 51/65 Angela Christofilou 52/65 Final Say campaigners take part in the peoples vote march for the future in London 20/10/2018 campaigner wrapped in EU flag Angela Christofilou 53/65 Angela Christofilou/The Independent 54/65 Angela Christofilou/The Independent 55/65 Final Say campaigners take part in the peoples vote march for the future in London 20/10/2018 Angela Christofilou 56/65 Demonstrators pass Trafalgar Square as they take part in a march calling for a People's Vote on the final Brexit deal, in central London on October 20, 2018. - Britons dreading life outside Europe gathered from all corners of the UK to London on Saturday to try to stop their country's looming breakup with the EU. AFP/Getty 57/65 Demonstrators wave Union and European flags and hold up placards as they pass Trafalgar Square, taking part in a march calling for a People's Vote on the final Brexit deal, in central London on October 20, 2018. - Britons dreading life outside Europe gathered from all corners of the UK to London on Saturday to try to stop their country's looming breakup with the EU. AFP/Getty 58/65 Demonstrators hold placards as they take part in a march calling for a People's Vote on the final Brexit deal, in central London on October 20, 2018. - Britons dreading life outside Europe gathered from all corners of the UK to London on Saturday to try to stop their country's looming breakup with the EU. AFP/Getty 59/65 A demonstrator holds a message during a march calling for a People's Vote on the final Brexit deal, in central London on October 20, 2018. - Britons dreading life outside Europe gathered from all corners of the UK to London on Saturday to try to stop their country's looming breakup with the EU. AFP/Getty 60/65 Anti-Brexit campaigners take part in the People's Vote March for the Future in London, a march and rally in support of a second EU referendum. PA 61/65 Demonstrators take part in the 'People's Vote March for the Future,' in central London, Britain, 20 October 2018. Reports state that the 'March for the Future' is to be led by a column of young people and call for a People’s Vote on the Brexit deal. After marching through central London, there will be a rally on stage in Parliament Square, including speeches from Mayor of London Sadiq Khan EPA 62/65 A protester brandishes an Independent t-shirt during the Brexit March Angela Christofilou 63/65 Anti-Brexit campaigners take part in the People's Vote March for the Future in London, a march and rally in support of a second EU referendum PA 64/65 Tens of thousands of people take part in People's Vote March for the Future in central London. The march organised by the People's Vote campaign is led by young people calling for a People's Vote on the Brexit deal Rex 65/65 Anti-Brexit campaigners take part in the People's Vote March for the Future in London, a march and rally in support of a second EU referendum PA Reports suggest the government is planning to hold a third "meaningful vote" on the plan on Monday or Tuesday next week in the hope of winning over Eurosceptics by presenting them with the threat of Brexit being delayed. Speaking after MPs voted last night to rule out a no-deal Brexit, Ms May told the Commons: "If the House finds a way in the coming days to support a deal, it would allow the government to seek a short limited technical extension to Article 50 to provide time to pass the necessary legislation and ratify the agreement we have reached with the EU. "But let me be clear: such a short technical extension is only likely to be on offer if we have a deal in place. mpu0 ads for mobile   "Therefore, the House has to understand and accept that, if it is not willing to support a deal in the coming days, and as it is not willing to support leaving without a deal on 29 March, then it is suggesting that there will need to be a much longer extension to Article 50.  Such an extension would undoubtedly require the United Kingdom to hold European Parliament elections in May 2019.   "I do not think that would be the right outcome, but the House needs to face up to the consequences of the decisions it has taken." We’ll tell you what’s true. You can form your own view. At The Independent, no one tells us what to write. That’s why, in an era of political lies and Brexit bias, more readers are turning to an independent source. Subscribe from just 15p a day for extra exclusives, events and ebooks – all with no ads. Subscribe now. Source: Brexit latest: MPs to vote on giving UK public second referendum | The Independent

    Read at 02:57 pm, Mar 14th

  • GOP lawmaker: Green New Deal is like genocide - Axios

    A top Republican House lawmaker equated the Green New Deal with genocide on Thursday morning.Driving the news: Rep. Rob Bishop (R-Utah) said the ideas behind the progressive policy are "tantamount to genocide. That may be an overstatement but not by a whole lot," Bishop said at a press conference Thursday morning on Capitol Hill.Reality check: The Green New Deal is not at all related to genocide, which is defined as "the deliberate killing of a large group of people, especially those of a particular ethnic group or nation." Instead, it's a sweeping progressive goal, supported by prominent freshman Rep. Alexandria Ocasio-Cortez and many Democrats, of reducing greenhouse gas emissions along with other policies, like a federal jobs guarantee and universal healthcare.Between the lines: Bishop may have been referring to what Republicans say would be skyrocketing energy costs, which could make it more difficult for people to afford electricity.The intrigue: I caught up with Bishop after the press conference to ask him to elaborate on his comments. Here’s our exchange. Axios: Genocide is defined as “the deliberate killing of a large group of people, especially those of a particular ethnic group or nation." How is the Green New Deal like genocide?Bishop: I’m an ethnic. I’m a westerner. Axios: And you think the Green New Deal is going to kill you?Bishop: If you actually implement everything they want to. Killing would be positive if you implement everything the Green New Deal actually wants to. That’s why the the Green New Deal is not ready for prime time.Bottom line: Genocide has nothing to do with this debate, so invoking the term could further inflame the already deep partisan divide over climate change. Go deeper: House GOP pushes back against Green New DealSource: GOP lawmaker: Green New Deal is like genocide – Axios

    Read at 02:46 pm, Mar 14th

  • Add Animations to React Apps with React-Lottie ― Scotch.io

    So your designer just came up with an amazing new animation on Adobe After Effects for your web application, fantastic! Just one problem, how do you convert this to a format usable within your web app? No worries, the awesome folks at Airbnb Design have your back. Introducing, Lottie , a fantastic new technology that allows you to use these animations in real time in a lightweight and flexible format just as easily as static images. How does this work you ask? Well, here's the explanation from Airbnb Design: Lottie uses animation data exported as JSON files from an open-source After Effects extension called Bodymovin. The extension is bundled with a JavaScript player that can render the animations on the web. Lottie is amazing for 3 main reasons: It makes use of Adobe Effects flexible features to come up with high quality animations It allows you to manipulate your animation in whatever way you would like The animations have a small file size as they are they are in vector format In this article, we'll be looking at how we can leverage the power of Lottie to add more life to our React Applications. To do this, we'll be using an npm package called react-lottie to generate viewable animations from JSON files exported by Bodymovin. Since we'll be focusing on the app side of things, we won't look into how these animations are created in After Effects but rather use animations created and open sourced by designers on Lottiefiles. If you have animations on After effects that you would like to use, you can export them to JSON using the Bodymovin plugin for After Effects. For this tutorial, we'll build this application which consists of two types of Lotties, one regular one and another with controlled animations depending on certain values in state. https://codesandbox.io/embed/github/austinroy/lottie-demo/tree/master/ Let's get started. We'll be using create-react-app to create our app. If you don't have it installed yet run the following command to do so: npm install --g create-react-app Now let's create our application: create-react-app lottie-demo This will create some boilerplate code for our app and configure our react development environment. Open up the lottie-demo directory and let's get coding. Yarn is create-react-app's default package manager and it's what we'll use to handle our dependencies(or rather dependency since there's only one for this project) so it's worth looking into as well. Now let's install our one and only dependency, react-lottie , to do this run this command in the terminal: yarn add react-lottie Great, we are all set to go, now let's add our animations. We'll bve getting our sample animations from LottieFiles, so head over there and create a free account. Free Node eBook Build your first Node apps and learn server-side JavaScript. Nice! Check your email to confirm your subscription. LottieFiles gives you access to a curated library of awesome animations from designers all over the globe, it also provides a platform to test, upload and share your own animations and is a great resource in general. Simply browse through the animations, tweak the settings if necessary and when you are happy with what you have click Download JSON to get the animation. Now inside the src directory of our application create two more directories, components and lotties . These will hold or React components and Lottie animation data respectively. Place the downloaded JSON files inside the lotties directory. Awesome, now we are ready to create components that display these animations. Animations can be allowed to run freely or be manipulated by data in state. First, let's look at the first case and create an animation that simply imports and renders a lottie. Create a file called UncontrolledLottie.jsx inside the components directory and place the following code inside it. import React, { Component } from 'react' import Lottie from 'react-lottie' import animationData from '../lotties/4203-take-a-selfie.json' class UncontrolledLottie extends Component { render(){ const defaultOptions = { loop: true, autoplay: true, animationData: animationData, rendererSettings: { preserveAspectRatio: 'xMidYMid slice' } }; return( <div> <h1>Lottie</h1> <p>Base animation free from external manipulation</p> <Lottie options={defaultOptions} height={400} width={400} /> </div> ) } } export default UncontrolledLottie In this case, 4204-take-a-selfie.json is the JSON file of the lottie I had downloaded. Feel free to replace that with whichever you had downloaded. Now let's go through the information provided in the configuration. You will notice we pass an options prop to the Lottie component, this contains the configuration data for the animation to be rendered. This consists of animationData - an Object with the exported animation data, in our case, the json file autoplay - a boolean determining if it will start playing as soon as it is ready loop - a boolean or number, this determines if the animation will repeat or how many times it should repeat rendererSettings - configuration data for the renderer These are just some of the options you can provide. We also provide the dimensions(length and width) of out animation as props to Lottie. Great, this animation is now ready for use by importing it into our App.js and will look like this: But first let's add our controlled Lottie. Lotties can be manipulated in React to change some of their properties using data in state. In our case, we'll look at how we can play, stop and pause the animations in our lottie. Let's create a file in components and name it ControlledLottie.jsx . Place the following code in that file import React, { Component } from 'react' import Lottie from 'react-lottie' import animationData from '../lotties/77-im-thirsty.json' class ControlledLottie extends Component { state = {isStopped: false, isPaused: false} render(){ const buttonStyle = { display: 'inline-block', margin: '10px auto', marginRight: '10px', border: 'none', color: 'white', backgroundColor: '#647DFF', borderRadius: '2px', fontSize: '15px' }; const defaultOptions = { loop: true, autoplay: true, animationData: animationData, rendererSettings: { preserveAspectRatio: 'xMidYMid slice' } }; return( <div className="controlled"> <h1>Controlled Lottie</h1> <p>Uses state manipulation to start, stop and pause animations</p> <Lottie options={defaultOptions} height={400} width={400} isStopped={this.state.isStopped} isPaused={this.state.isPaused} /> <button style={buttonStyle} onClick={() => this.setState({isStopped: true})}>Stop</button> <button style={buttonStyle} onClick={() => this.setState({isStopped: false, isPaused: false })}>Play</button> <button style={buttonStyle} onClick={() => this.setState({isPaused: !this.state.isPaused})}>Pause</button> </div> ) } } export default ControlledLottie Let's analyse this code. At first glance it is pretty much identical to the code in ControlledLottie.jsx but there's a few key differences. We've added 3 buttons at the bottom along with their styling. These buttons are used to toggle the values of the data in state. The Lottie component also has two more props: isStopped - a boolean indicating whether the animation is active or not isPaused - a boolean that indicates if the animation is paused or not Here's whar our controlled lottie component will look like: Both our animations are ready to use now so let's import them into App.js and display them in our app. Edit the code in App.js , importing our components and adding them inside the render function. import React, { Component } from 'react'; import './App.css'; import UncontrolledLottie from './components/UncontrolledLottie'; import ControlledLottie from './components/ControlledLottie'; class App extends Component { render() { return ( <div className="App"> <h1>REACT LOTTIES</h1> <div className="lotties"> <UncontrolledLottie /> <ControlledLottie /> </div> </div> ); } } export default App; Let's style the our app to make it mobile responsive, we can do this using css grid. Add the following code to your App.css file. .lotties{ display: grid; grid-template-columns: auto auto; } @media only screen and (min-device-width : 320px) and (max-device-width: 480px){ .lotties{ display: grid; grid-template-columns: auto; } } This places our lotties in two columns that will be reduced to a single column on devices with a smaller width. Now fire up the application and watch the magic happen. yarn start Your browser will open up and you should be able to see the two animations active. Clicking Pause will have the controlled animation freeze in it's current frame, clicking it again should resume it as well as clicking Play . Clicking Stop returns the animation to it's default position and holds it there. Pretty nice, right? https://codesandbox.io/embed/github/austinroy/lottie-demo/tree/master/ Lottie can be used to really add life to an application, be it on web or mobile. They can be used to make applications more interactive and provide visually appealing feedback, for example animations indicating the state of certain processes. Lotties are also amazingly easy to use and extremely lightweight so they shouldn't have a massive impact on the perfomance of your application. Source: Add Animations to React Apps with React-Lottie ― Scotch.io

    Read at 07:58 am, Mar 13th

  • Pay equity SaaS startup, Syndio, appoints new CEO, and closes $5.2 million seed round

    Searching for your content... /.modal-content /.modal-dialog ');
 newsFlag = true;
 }//end of if condition
 if( msg.result.static.hits != null && msg.result.static.hits.length > 0)
 var prod_data = '';
 var resource_data = '' ;
 var prefix = $('#pathPrefix').val();
 $.each(msg.result.static.hits, function(idx, dataObj) { 
 if( dataObj._source.type === 'products')
 prod_data += ''+dataObj._source.title+''; 
 else if( dataObj._source.type === 'resources' || dataObj._source.type === 'Case Studies' || dataObj._source.type === 'White Papers'
 || dataObj._source.type === 'User Guides' || dataObj._source.type === 'Articles' || dataObj._source.type === 'Tip Sheets' 
 || dataObj._source.type === 'Videos' || dataObj._source.type === 'Podcasts' || dataObj._source.type === 'Quizzes' 
 || dataObj._source.type === 'Research Reports' || dataObj._source.type === 'Videos & Webinars')
 resource_data += ''+dataObj._source.title+''; 
 if( resource_data != null && resource_data != 'undefined' && resource_data != '')
 ul.append('Resources view all'); ul.append(resource_data); ul.append('');
 prodFlag = true;
 if( prod_data != null && prod_data != 'undefined' && prod_data != '')
 ul.append('Products view all'); ul.append(prod_data); ul.append(''); 
 prodFlag = true;
 if( msg.result.release.facets != null && msg.result.release.facets.source_company != null && msg.result.release.facets.source_company.buckets != null)
 str = $("#sitesearchbox").val();
 vanityNewsPath = $("#newsVanityPathURL").val();
 var org_data = '';
 $.each(msg.result.release.facets.source_company.buckets, function(idx, dataObj) 
 key = dataObj.key;
 if((key.toLowerCase().includes(str.toLowerCase())) && idx '+key+''; 
 if( org_data != null && org_data != 'undefined' && org_data != '')
 ul.append('Organisations view all '); ul.append(org_data); ul.append('');
 orgFlag = true;
 else if( msg.result.release.facets != null && msg.result.release.facets.company != null && msg.result.release.facets.company.buckets != null)
 str = $("#sitesearchbox").val();
 vanityNewsPath = $("#newsVanityPathURL").val();
 var org_data = '';
 $.each(msg.result.release.facets.company.buckets, function(idx, dataObj) 
 key = dataObj.key;
 if((key.toLowerCase().includes(str.toLowerCase())) && idx '+key+''; 
 if( org_data != null && org_data != 'undefined' && org_data != '')
 ul.append('Organisations view all '); ul.append(org_data); ul.append('');
 orgFlag = true;
 if( !orgFlag && !prodFlag && !newsFlag)
 error : function (XMLHttpRequest, textStatus, errorThrown) {
 console.log('Error in LoadLayout');
 function splitNewReleaseUrl(releaseUrl)
 var newsUrl = "";
 var release = releaseUrl.toString();
 if(release != null )
 var myarray = release.split(',');
 for(var i = 0; i > "+newsUrl);
 return newsUrl;
 Source: Pay equity SaaS startup, Syndio, appoints new CEO, and closes $5.2 million seed round

    Read at 06:25 pm, Mar 12th

  • 7 Reasons to Host WordPress Yourself

    Four years ago Ashley published part 1 of what would become our most popular posts to date, our Hosting WordPress Yourself series. The article jumps right into setting up your server, but doesn’t ask the question: Why host WordPress yourself? To begin to answer this question, we have to first understand the options for hosting WordPress. WordPress Hosting Options There are three main categories for hosting a WordPress site these days: Shared web hosting Managed WordPress hosting Do-It-Yourself hosting Shared Web Hosting Shared web hosting is as old as the web hosting industry itself. For a ridiculously low monthly fee, you get space on a server with dozens if not hundreds of other customers, all sharing CPU and memory resources. If you’re wondering if this is GoDaddy’s $3/month plan, you’ve got it. Your plan usually comes with cPanel or Plesk control panel access where you can 1-click install WordPress and dozens of other web apps. If you run into trouble, technical support is available via email but at $3/month don’t expect to get the sharpest replies to your support requests. Managed WordPress Hosting With managed WordPress hosting, the hosting platform is tailored to WordPress. Hosting another web app might be possible, but it’s not what it was designed for and problems are likely. This category of WordPress hosting was pioneered by Pagely in 2006 but really hit mainstream when WP Engine burst onto the scene in 2010. These days it’s tough to find a web host who doesn’t offer a managed WordPress hosting option. Control panels for these platforms are custom-built and offer WordPress-specific tools and controls. Technical support via email is included as well should you need assistance and responses are usually pretty sharp. Do-It-Yourself (DIY) DIY hosting has been around since the beginning of the internet. Back in the day you might set up a machine in your closet (bonus: toasty shirts on-demand), but nowadays a 1 CPU / 1 GB RAM virtual private server (VPS) costs just $5/month and has all the benefits of a modern data center. As is evident from our Hosting WordPress Yourself series, the DIY approach requires some knowledge and experience managing servers or a willingness to learn, and troubleshooting skills. If something goes wrong, you have Google, your own brain, and maybe some friends you can bother. There’s no safety net unless you’ve paid extra for one. For example, Linode currently offers 24×7 managed incident response for $100/month/server. DIY with Help Out of the above three options, it might seem like a no-brainer that you should go with managed WordPress hosting, but there is a kind of hosting service that lies in-between managed and DIY. This service has been available in the non-WordPress world for years, but is relatively new to the WordPress scene. The idea is a simple one: spinning up a server, configuring it, and maintaining it is a pain, so let’s solve some of those problems and make the unsolvable ones far less painful. You get all the benefits of DIY minus most of the negatives. This is the idea behind Laravel Forge, ServerPilot, and our new app SpinupWP. 7 Reasons to Host WordPress Yourself 1. Level Up If you aren’t already comfortable managing your own server, by far the best reason to host WordPress yourself is to learn something new. Start with a low-risk site like a personal blog, go through our Hosting WordPress Yourself series, and see what happens. If you manage to get through it, you’ll have a much better understanding of how to set up a server for hosting WordPress. And after 6-12 months of hosting your own site you’ll have confidence to try hosting another site. With time, you’ll be ready to take the next step and host a site of slightly higher risk like a client’s brochure site. With every site you host and every day that goes by with you in control, you gain confidence. Before long you’ll be using an app like SpinupWP to help you quickly spin up more servers and help you maintain them. 2. Page Speed Time is money and nowhere is that more true than ecommerce. If you’re running a WooCommerce store, your pages should be loading in under 300 milliseconds, otherwise you’re leaving money on the table. By hosting WordPress yourself, you have control to tweak caching rules and optimize your sites at the server level. And you can have dedicated CPU and memory that won’t be shared with anyone else. With shared web hosting and some managed WordPress hosts, you can experience slow-downs due to other customers on the platform using more than their fair share of CPU and memory resources. 3. Cost Managed WordPress hosting is expensive. You can expect to spend $400 per year for just a single site and over $1,200/year for 2-5 sites. And that’s just assuming you have moderate traffic. If you have high traffic, the costs balloon. The more sites and the more traffic you have, the more expensive it gets. With your own server you can have as many sites as you like with as much traffic as it can handle (which is probably a lot more than you might think). If you have a few dozen brochure sites that are rarely updated and have full-page caching enabled, you could easily have them all on a $10/month VPS and handle a lot of traffic without issue. If you’d like the convenience and help that comes with an app like SpinupWP, your costs only go up an extra $12/month. Shared web hosting is cheap, but in both senses of the word. Sure it’s inexpensive, but you get what you pay for: competing with other customers for server resources and support that’s not very technical or helpful. 4. Full Control One of the biggest advantages of having your own server is that you are in full control. You have root access to do whatever you like on the server. Need to install a PHP extension? Do it. Think tweaking the caching rules will speed your site up? For sure try that. Want to install a fancy little Go app you found on GitHub? Go ahead. But of course, with great power comes great responsibility. The more customizations, the more you will need to maintain and keep track of for the next time you rebuild the server. Many would say that full control is as much a disadvantage as it is an advantage. That an advantage of shared and managed WordPress hosting is that you aren’t tempted to make customizations so you’re forced to keep things simple. But what’s simple about a low conversion rate and leaving money on the table? The reality is that your hosting environment is restricted with managed WordPress hosts. Many don’t even offer SSH access or have support for Git. 5. Simplicity Promotes Stability A single VPS configured to host a single WordPress site with standard Ubuntu packages is the simplest, most stable way I know to host WordPress sites. It’s a tried-and-tested setup that is easy to understand and maintain. The biggest flaw in this setup is a lack of redundancy. All your eggs are in one basket. If your server goes down, your site is down until you can get it back up. This usually leads people to explore server clusters, where requests for your site are served by several servers and if one server goes down, the rest continue to serve requests. I first learned about clustering in 2004 and it was exciting. It sounded like the perfect system. But in practice, it’s a lot more moving parts, harder to maintain, and creates more problems. Not to mention a lot more costly. Many managed WordPress hosts tout the advanced technology they’ve built into their clustered platforms and their redundancy. But I’m certain it’s not as reliable as they say, and likely not as reliable as a boring ‘ol, single VPS. In my experience hosting VPSs over the past seven years, a VPS going down is a rare event and not worth protecting against. DigitalOcean, Linode, and other VPS providers are incredibly good at avoiding downtime due to physical hardware failure. In fact, I haven’t experienced it myself. The much more common cause of downtime that I’ve endured many times is network-level issues. In fact, this site experienced some downtime just a couple of weeks ago due to connectivity issues at Linode’s Newark data center, where our VPS resides. Although their diagnosis of the problem was inconclusive, it is very interesting and shows just how complex the underlying network infrastructure is before you even get to the server-level. A cluster is typically set up within one data center, so it’s not going to save you from a networking issue. And a multi data center cluster would be even more complex and fragile and probably cause more downtime than the network issues it’s protecting against. In the end, you just have to accept that even Twitter, Google, and Facebook experience some downtime and you will too. 6. Hands Off My Server The web hosting industry and most web hosts are constantly innovating and trying to enhance their platform to gain an edge on their competition. They’re constantly working on better load balancers, bigger log aggregators, optimized server settings, etc. But in this race to outdo one another, problems are born. Even the most responsible web hosts make mistakes. And even without mistakes, some problems show up in production that didn’t show in staging. It probably won’t happen often, but when it does it’s unlikely you will be expecting downtime and the timing probably won’t be convenient for you. With your own server, no one will be working on it except you or your team. You can work on your server when you know you’ll be online for awhile, can keep an eye on things, and deal with any problems that arise. To be clear, we’re not talking about security updates here. Whether it’s managed WordPress hosting or your own server, everyone should be installing security updates as they are released. 7. Productize Your Service If you’re a freelancer or an agency, you know all too well the feast or famine cash flow of your business. What would you give for nice, predictable recurring monthly income? Selling a maintenance plan to your clients is a great start, but it’s not sticky. It will be the first thing to go when a client is looking at cutting their costs. But what if you created a bundle that included hosting and maintenance? It’s certainly a lot harder to move hosting providers than it is to cancel a maintenance plan. Hosting client sites is hardly a new concept, but the profitability of hosting can lead many freelancers and agencies to abandon the idea. How much will your client be willing to pay over the cost of a managed WordPress host? And who will they contact when their site is down? As we’ve already discussed in #3, the cost of hosting your own server is extremely low and so the profitability per client is much higher. So revisit #1 and start learning how to host WordPress sites yourself, start your journey to hosting your client sites and bringing in nice, predictable monthly recurring revenue. Conclusion Although hosting WordPress yourself can seem scary to those who haven’t done it, it’s really just fear of the unknown. By taking an educational approach and starting with low-risk sites, you can ease into it with little-to-nothing to lose and plenty to gain. Eventually you end up with faster sites that you’re in full control of. You’ll have confidence in your hosting, knowing every part of it, and find that your sites are more stable than ever. No one will be tinkering with your server infrastructure while you’re not around. Finally, with your new confidence and the high profit margins of hosting WordPress yourself, you can start hosting client sites, receive monthly recurring revenue, and transform your business to predictable cash flow. How does that sound to you? What’s preventing you from getting started on this journey? About the Author Source: 7 Reasons to Host WordPress Yourself

    Read at 05:31 pm, Mar 12th

  • Eli Valley is Not Sorry – Popula

    In a discussion on The View, Meghan McCain was reduced to tears over Ilhan Omar’s recent comments on the American pro-Israel lobby. “Just because I don’t technically have Jewish family that are blood-related to me doesn’t mean that I don’t take this seriously,” she said. In response, cartoonist and writer Eli Valley drew a now-infamous comic that depicted her performing her new role as spokeswoman for American Jews. McCain called it “one of the most anti-semitic things I have ever seen.” It’s not the first time such things have been said about Eli Valley and his work, much of which is collected in the anthology Diaspora Boy. But McCain seemed unaware of the controversy that has long followed Valley’s satirical commentary on American and Israeli culture and politics, adding, “this reveals so much more about you than it does me…” What does it reveal about Eli Valley? I gave him a call to find out. First of all, I had no idea that Meghan McCain is Jewish. What’s the story behind that? It’s been fascinating just from the point of view of how satire becomes reality. It’s an old story, reality eclipsing satire. There’s that Tom Lehrer line, that satire died when Henry Kissinger won the Nobel Peace Prize. You can add Bret Stephens getting a Pulitzer for writing. Anyway, reality has been eclipsing satire throughout the Trump administration, but this is such a perfect example of it. She claimed it was her friendship with Joe and Hadassah Lieberman that made her personally traumatized by what Ilhan Omar said. So I just took it to the absurdist step of her claiming to be Jewish herself. And then her reaction was that I am antisemitic towards her, which makes the hyperbole reality. Okay, so let’s get this established for readers who may not be familiar with your work. We’ve already established that Meghan McCain is Jewish. Are you Jewish? By her standard, no. But I consider myself Jewish. What’s your own relationship to Jewishness? My father was a rabbi. My mother is a secular Jew. By the way, I don’t say my father’s a rabbi for street cred or any kind of clout. Meghan McCain’s dad, if I’m not mistaken, I don’t think was a rabbi. I once published a Jewish travel guide to Central and Eastern Europe, and at the time I actually did think it would help the book, noting that my father was a rabbi. But right now, saying my dad’s a rabbi, I’m not saying it to establish any kind of street cred, it’s just the facts. I grew up observant until my parents got divorced. Then I was observant when I was visiting my dad, and at my mom’s I was secular. So it created a sort of multiple affiliation background. So there’s a kind of—as a non-Jew myself you can correct me here—but there’s one sense of being Jewish as being a member of the religion, and then there’s what’s colloquially called something like the “lox-and-bagel” type of being Jewish, where it’s an American cultural/ethnic group. Sounds like your parents represented both of those. Yeah, I think the lox-and-bagel description, certainly for secular Jews, is slightly a caricature, and I think it’s used often by Orthodox or Zionist Jews to erase the validity of the majority of American Jews. It’s one of the tools at their disposal, basically. You know, saying we’re just Seinfeld Jews, we’re just lox-and-bagel Jews. When I say secular I don’t just mean purely Yentl or Fiddler on the Roof. It’s definitely informed by Jewish values, but not in a religiously observant sense. What about now, do you see yourself as belonging to one or the other? I’m not religiously observant at all. But it’s not only cultural either! Judaism is such a multi-faceted identity, and expression of one’s essence, that it encompasses both culture and values. That’s something that comes up in regards to your work, the latest being this depiction of Meghan McCain. You have an eye for the grotesque. I look at the comic and I recognize that it’s Meghan McCain, but I also wouldn’t have seen her that way unless you showed her to me that way. I’m thinking in terms of this idea, and it might be a diasporic idea, of “Jewish humor.” Usually when people say that they’re talking about Henny Youngman or Woody Allen, but for you, it’s embodied more by Mad Magazine. Yeah. I mean, I do think there’s an overlap! Do you see yourself as having a specifically “Jewish” aesthetic? I’m thinking in terms of your satirical approach. Yes, for sure. I draw from what I call my own “ethnic pride” over the creators of Mad—Harvey Kurtzman, Will Elder, and the rest of the crew of Jewish children of immigrants living in New York City, with an office in what is now condos and a Duane Reade. That’s where they were revolutionizing American comedy in the 1950s. Do you see that as bearing on your visual aesthetic as well? Do you see monsters in the right-wingers you draw, just when you look at them, or does it emerge as you draw them? You’re asking if I see them in—what’s that film noir word? Chiaroscuro? Yeah, thank you, no, I’m not quite a dog who sees things in, such, whatever. But I do see them as monstrous personalities, and ethically beyond the pale of what we’re supposed to be when we’re acting with empathy towards other humans, and I try to convey that in my art. But I’ll be honest with you, it’s my personal aesthetic, I like drawing this way, even when I’m drawing friends. I find the art to be aesthetically appealing, but others might find it offensive. The NibI don’t think you make everyone look like a monster. But when you do, it’s uncanny to me how much I can recognize them in the grotesque image you present. Do you think Meghan McCain looked like a monster? Yeah. But it also looked like her. Good, good. It’s difficult when drawing women in particular, because the grotesquerie is more easily matched with male-presenting figures. And you’ve certainly done that. Well it just happens that people in power happen to be more men than women. I’ve gotten a couple responses concerning fat-shaming, and I am sensitive to that. It’s sort of an impasse when it comes to this, because all of my art involves like, folds of flesh. Whether the person is a certain weight or not. Flesh is central to your aesthetic. It can be interpreted as being fat-shaming, but that’s not the goal. And I do apologize if it increases societal judgment of people of different weights. That’s not it. I find it, aesthetically, visually enticing—bodies and flesh—when working on the art. Let’s put this in context. I’ll start with what happened afterward and then we’ll go to what happened beforehand. McCain said, this cartoon is “one of the most anti-semitic things I’ve ever seen.” I’m assuming she was in a coma during Charlottesville and Pittsburgh. Right. I mean, a drawing of someone who is not Jewish, by the son of a rabbi, she called the most antisemitic thing she’d ever seen. How does that work? I think she identified so much as a victimized Jewish person under the onslaught of the supposed terrorist Ilhan Omar that any criticism of her is a criticism of the Jewish people. So when you’re in such a warped mindset, it’s natural you’re going to call a piece of Jewish art antisemitic. What did you think of Ilhan Omar’s statements themselves? Honestly, I think there is room for nuance here in the discussion. Let’s establish this first: she didn’t make antisemitic remarks, she criticized monolithic support for Israel. In America, that’s led by mostly rapture-thirsty Evangelical Zionist antisemites, and to equate Israel with Jews is itself antisemitic—à la Trump’s insistence that Israel is “our” country, and American Jews aren’t exactly American. Having said that, and knowing the discourse will be tainted from the start by bad-faith assholes, it’s worth the trouble to be sensitive about the language. Don’t give them an open! Some people, especially among older generations, will be triggered by certain phrases even if you’re not talking about Jews. So with that in mind, ideally she could have phrased things to avoid any unintentional or momentary overlap with the historic vernacular of antisemitism. But what she said doesn’t make her an antisemite. People are making it a big deal because they’re pretending Israel equals Jews, and antisemitism is now defined as criticism of AIPAC and Likud. When talking about fealty to Israel, by, let’s be honest, mostly fucking Evangelicals, okay, the language can unfortunately overlap, or be confused with, this mythology. And if we were operating in good faith—and I’m thinking especially of Democrats here—we could have her back and help her understand these nuances instead of appeasing right-wing creeps with show trials. This is how you correct it. You say to them, listen, certain people are sensitive about this, particularly people who have experienced the horrors that this mythology has led to. So keep the criticism, just don’t make it about puppetmasters and shit. The reason I’m saying that is partly because my mom, who is very progressive, she initially said to me, “Oh, dual loyalty, that’s really antisemitic.” And then I explained to her the context, and the fact that she wasn’t singling out Jews in particular, and my mom said, Oh my god, yes. And she saw that. So it’s sort of a tonal thing, sensitivity to that. But that’s the problem: It could have been addressed easily, and move on. Maybe three to five seconds out of the 24-hour news cycle. Then let’s move on to the actual national crisis at hand. And the way we know that we’re dealing with bad faith, that it was actually about her stance on Israel, is that people who have been criticizing her, and pretending she’s some kind of antisemitic terrorist, have turned this from seconds into multiple 24-hour days. We entered all-hands-on-deck catastrophe mode, while we have the hero of American Nazism sitting in the Oval Office. When you’re talking about “both sides,” it’s true, your whole argument shouldn’t be “Oh, the other side is so much worse.” But here’s the thing—aside from the fact that Republican members of Congress say much worse things than what Ilhan Omar said, and on an hourly basis. We are dealing with a crisis unlike anything we’ve seen in decades in this country. We’re in a national crisis. And we’ve been in a national crisis since November 2016. Some of Omar’s biggest antagonists have devoted more time to maybe three words that she said than to the man who has galvanized ethnic cleansing and white supremacy in the United States. And that is reprehensible. It’s morally outlandish, and we should not stand for this shit. Name some names. Oh, Seth Mandel, Bethany Mandel, who rejoiced at the White House six weeks after Trump inspired the biggest mass murder of Jews in American history. John Podhoretz, who claims to be a “never-Trumper,” but when push comes to shove, they all line up. Bret Stephens, Bari Weiss. Just run down the list of people who pretend to be concerned about antisemitism but it turns out that they’re only concerned with criticism of Israel, and to hell with American Jews. If we go back to Omar’s original statement, an editor at the Forward asked her who she “thinks is paying American politicians to be pro-Israel.” And she said, “AIPAC,” which is literally a group that exists for that exact purpose. Somehow that was antisemitic? You know what’s funny is, just as the reaction to the comic proves the premise of the comic, so the reaction to the claim that AIPAC wields excessive power proves that they wield that power. Jewish CurrentsOne of the worst antisemitic stereotypes is that “Jews run the media,” but Jewish media is fairly limited. You used to work for the Forward, and you and I have both contributed to Jewish Currents, which takes a different political stance. Do these publications serve the same cultural purpose? Tablet is right-wing. Forward was center-left, now it’s just hot takes, plus Josh Nathan-Kazis’s reporting. But the hot takes: two headlines that they did about Ilhan Omar said she was separating the Jews from the left, which I thought was such a false dichotomy. Right, historically, the American left has always been highly populated by Jewish immigrants. Not just historically, but today! We are the left. For me, as a person of an ethnically Muslim background, looking at the politics of the Middle East, I was for a long time scared to speak out about it, or even hold my own opinions about it, until I realized that there is a robust and conscientious group of Jewish people in America and Israel who see the plight of the Palestinians as a human rights issue and are dedicated to addressing it. Personally it’s been empowering to me to see people like you, and the staff at Jewish Currents, just not compromising. I appreciate that. I remember once this woman I knew, she didn’t really know the Jewish institutional world, so when I mentioned the right-wing bent she was just like, absolutely in awe, because she said, every Jew I know is on the left! Did you have a moment when you changed your perspective? Were you raised with an equation between Jewish identity and Zionism? Was there a moment of a break from that? Well my parents couldn’t afford to send me to Israel as much as the other kids in my day school, but I was able to finally go when I was in college, and one of the things was that I was staying in a youth hostel in Safed, and it was run by Jewish outreach types—”Kiruv” is the Orthodox term for it. Trying to bring in like, less than observant Jews into the fold. They were saying atrocious things about Palestinians. It was an extremist place. In Jerusalem going to Shabbat dinner via another one of these Kiruv places, and this patriarch, this elderly man, starts singing “Ha’aravim klavim”—”the Arabs are dogs.” So that shook you? Yeah, in terms of the fact that the religion could be used for racial and ethnic hatred. But it wasn’t until I became more active in the American Jewish community that I saw it wasn’t just among religiously observant people that this attitude permeated. I’m not going to say American Jewish leaders are saying “Arabs are dogs,” but there is this rightward bent that foundationally has the premise that Palestinians are less-than. And you see it filtered through the statements of Bret Stephens about the “disease of the Arab mind,” or Marty Peretz saying “Muslim life is cheap,” and all that. That is a central aspect to your work, the tension between “Diaspora Boy” and “Israel Man.” That’s a satire of Zionist attitudes towards world Jewry, since the inception of Zionism. I initially came up with that ten years ago but it’s becoming so accelerated now that Trump is in the White House and Netanyahu is helming Israel. Netanyahu is choosing alliances with neo-Nazi nationalist white supremacists over the welfare and safety of the world’s Jews. You can’t get more clear-cut than that. It’s not even a punchline. It’s absurd, but it’s true. Satire is eclipsed by reality. Meghan McCain isn’t the only one who’s called your work antisemitic. People like Abe Foxman, former Director of the Anti-Defamation League, have denounced you. Some detractors call you a “self-hating Jew.” But if your subject is antisemitism, and you’re using the mode of satire, your work has to include representations of antisemitism. How do you navigate that line? Well with the comic what I was doing was mocking exploitation of Jewish kitsch. I’m mocking her for taking on our history and also our trauma. In one incarnation I actually considered putting her in the actual garb of a prison camp, or Auschwitz. But then I decided no, I’m going to go more towards the kitsch aspect, but I’m going to keep the Star of David in German, Jude. That was necessary, a sign of the trauma too. There’s a bit of the lox-and-bagel aspect too. Just a little bit, with the matzo ball soup, that she’s pouring without any liquid into the bowl. That was the centerpiece for me. I considered putting pickles, but I actually wanted to stay away from what we were talking about earlier—that’s a stereotype of secular Jews by Orthodox Jews and by Zionists who say that Jewish life will wither outside of Israel. And I didn’t want to do that. What I wanted to do is try and imagine what a person who fetishizes Jews imagines Jews are like. And that’s why, boom, Yentl. I was thinking of Seinfeld too actually, but it’s kind of a cliché. Fiddler on the Roof was possible as well. Yentl was the right one. I thought so. And a little dreidel. Matisyahu was the deep cut for Jews of a certain age who remember there being that like Jewish intra-communal kitsch of 10 years ago. And just the idea that she would do it now in 2019 made it absurd. Josh Nathan-Kazis of the Forward said his favorite thing about it was that tons of gentiles were totally confused. Flabbergasted. “What is Matisyahu?” So that was good. That was actually one of the signs that this was a piece of Jewish art. That’s why it’s even more absurd that she’s calling it antisemitic. It’s absurd that all these right-wing Jews who hate the majority of American Jews are calling it antisemitic. The reason they call me a self-hater is because they define Jewish authenticity as Zionist. And the punchline to that is, the people who were the proponents of what they consider to be authentic Judaism and self-love, have now, in the aggregate, allied with forces seeking to destroy the Jewish people. Eli Valley’s collection Diaspora Boy is available from OR Books. Source: Eli Valley is Not Sorry – Popula

    Read at 08:24 am, Mar 12th

  • What You Need To Know About Meghan McCain's Jewish Heritage

    Meghan McCain seen here holding the Not A Jewish Person Of The Year award.Photo: Cindy Ord (Getty Images)Meghan McCain, daughter of the late statesman and presidential candidate John McCain and co-host of ABC’s The View, has taken an increasingly prominent role during the recent national conversation over the troubling rise of antisemitism in American politics. Here’s what you need to know about one of the leading voices in this important debate:Meghan McCain Is Not Jewish — The child of John McCain and his second wife, the former Cindy Hensley, Meghan McCain is not a member of the Jewish faith.At No Point Did Meghan McCain Convert To Judaism — Meghan McCain married the writer Ben Domenech, the founder and publisher of the mysteriously funded conservative website The Federalist, in November of 2017. At no point before or after that did either of them convert to Judaism.She’s Christian — Born and raised!Her Father Was Friends With Former Connecticut Senator Joe Lieberman — McCain, a longtime United States Senator from Arizona, served alongside Lieberman, an observant orthodox Jewish person, in the United States Senate for many years. McCain and his family were also friendly with Lieberman’s wife, Hadassah, who is also Jewish. McCain mentioned this earlier this week during an emotional moment on The View.She Enjoys Pastrami Sandwiches [Note: Please Check This] — A staple of Jewish deli fare, pastrami is beef brisket that has been brined, seasoned with a mix of spices and seasonings that traditionally goes heavy on the black pepper, and which is then smoked and steamed. It’s traditionally served in a sandwich, on rye bread—and always with plenty of spicy mustard!At the risk of editorializing, here’s a final thought: Antisemites might do well to consider how upset their hatred of Jewish people has made Meghan McCain and take a long look in the mirror.Source: What You Need To Know About Meghan McCain’s Jewish Heritage

    Read at 07:35 am, Mar 12th

  • /dev/lawyer Deprecation Notice: MIT and BSD

    Deprecation Notice: MIT and BSDit's time to retire thirty-year-old academic licenses MIT and BSD open source licenses are well known, popular, and legally deprecated. They served long and well, but they’re older than many open source software developers, and haven’t been maintained. With licenses like Blue Oak available, it’s time open source upgraded from academic forms of the ’80s. There are good social, practical, and especially legal reasons to do so. MIT and BSD don’t handle patents. Both copyrights and patents apply to software, but the word “patent” does not appear in MIT or BSD terms. MIT and Cal’s tech transfer offices say they never intended to license any patents. There is some argument that other words, like “use”, imply permission under patents, anyway. And there is some law that may or may not imply patent permission, when giving someone a copy of software. But a license can avoid all that uncertainty by spelling out plainly that it covers all relevant intellectual property. MIT and BSD don’t. Licenses like Apache 2.0 show how lawyers do this in legal terms for private deals every day. Blue Oak shows the same job done in everyday English, without long lists, run-on sentences, or complex scope rules. Patents are a problem that MIT and BSD do not solve. Open source developers have better options, at no real cost, with significant additional benefits. Even developers and companies that despise software patents, and will never seek them, benefit by choosing modern terms. It’s one thing to know that you won’t seek or enforce any patents. It’s quite another to have legal assurance from others that they, or their successors, won’t lay a patent trap. MIT and BSD are hard to read. When you tell a lawyer to keep it short, their first draft will cheat by drawing heavily on background law and legal vocabulary. They’ll invoke complex concepts, rather than identifying or explaining them, often with cues non-lawyers won’t catch. It’s an extra, laborious, intellectually grueling step to translate the whole legal message into everyday words and phrases. Blue Oak made that extra investment. MIT and Cal did not. As a result, the shortness of MIT and BSD are reassuring only until you actually try to understand them, and find you need a decoder ring. The terms are actually dangerous if you read them without knowing you need that decoder ring, believing you see the whole picture, which often turns out to be just the picture you wanted to see. My most popular piece of writing to date is thousands of words only partly explaining the 171 words of The MIT License. Having commentary to guide you through a dense license is better than not having it. But it’s a distant second-best to having a license that’s readable and actionable on its own, like Blue Oak. Blue Oak starts with a summary of its purpose, a built-in TL;DR. You should read the whole license, because it’s easy and it matters. Blue Oak wants to be understood. It’s not clear what MIT and BSD are, legally. We call terms for open source software “licenses”. But there’s a long-running debate in open source theory about whether they’re just licenses, licenses and contracts, both, or potentially both. I call the question theoretical, because pragmatically, dealing with that kind of uncertainty is always a distant second-best to avoiding it entirely. For open source, the keys are permission given and the rules that come along with it. Legal characterization is an implementation detail, and implementation details shouldn’t constrain high-level goals. Licenses like AFL make clear that they can be contracts. Other forms, and now Blue Oak, make clear their terms have to be agreed, and not just received. License or contract? The answer is both. And that is a very good thing. Eliminating that question clarifies many other issues. Another long-running debate in open source licensing theory concerns revocation. When someone releases code under an open source license for nothing, can they take it back? Other popular licenses dating back decades, like GPLv2 and v3, say specifically that developers cannot revoke their licenses, but also insist that they are just licenses, and not contracts. That’s still a head-scratcher—fortunately not a particularly threatening one—because the legal rules about revocation and relying on others’ words come from contract law, which covers agreements, not intellectual property law, which covers licenses. Blue Oak says it’s both a license and an agreement, and also that contributors can’t take their licenses back. The title of that section, Reliability, is just the point. We can say much the same about warranty disclaimers and damages exclusions, the parts of licenses, often needlessly set in illegible ALL CAPS, that protect open source contributors from legal liability. How do those disclaimers and exclusions work? Under contract law, we have a pretty good idea. Under intellectual property law alone, we don’t really know. The specific terms about warranties that we see in nearly all open source licenses—“as is”, “implied warranties”—actually come from statutes about contracts, not copyright or patent statutes. MIT and BSD attribution is a land mine. With very rare exception, even permissively licensed open source software under terms like MIT and BSD comes with rules to follow. By far the most common rule is attribution, which requires those who make copies of the software, in source or compiled form, to include copies of terms, copyright notices, and other information about who licenses the software, and how. A byproduct of those notices is credit. Open source developers who want credit should get it. Traditional attribution rules, like those in MIT and BSD terms, arguably don’t go far enough, especially in the software-as-a-service era. But many companies don’t even do what the old licenses say they have to do, especially for client-side JavaScript libraries. The contract-or-license question muddies the waters here again. But most lawyers I’ve heard from believe that violating the attribution rule of an open source license kills your license. In other words, if you use someone’s software under MIT or BSD and share a copy without including their copyright notices and license terms, they can sue you for infringement, since the open source license no longer applies to you. The same risk applies to copyleft rules under licenses like GPLv2. That makes it possible for money-minded developers, or those who acquire their rights, to sue unknowning violators for money, even when the point was originally to get patches back, not cash. That has led to coordinated efforts like Principles for Community-Oriented Enforcement and the GPL Cooperation Commitment. The latter essentially backports a fix from GPLv3 to GPLv2: Pave a path to forgiveness in the license, to ensure companies who break the rule have a chance to make good, and opportunistic plaintiffs can’t use it to spring a trap. Blue Oak applies the same fix to its attribution rule. If someone fails to provide a copy of the license with a copy of the software, you can call them out in writing. If they do what they should have done in thirty days’ time, they’re back on track. If they refuse, then poof goes their license. MIT and BSD breed confusion. Nobody knows how many variants of MIT and BSD terms there are. I see a new one twice a year or so. In that sense, MIT and BSD have mutated over the years, but not evolved. Aimless diversification just makes identification and compliance harder. Neither, apparently, do we really know how to fill out the standardized MIT and BSD templates we have. Some projects continue for years, attracting scores of meaningful contributors, with only the long-departed, initial contributor’s name in the license. Some projects replace the name with “project contributors”, rendering the line meaningless. Some projects institute chores for adding names to the copyright line and bumping the year each January. We treat projects doing all of those things the same. Apparently, none of that is essential. Blue Oak follows modern licenses like the GPLs, Apache 2.0, Mozilla Public License, and Eclipse Public License in offering a fixed form. All you have to do is copy the terms into your project and reference it in any header comments, metadata, or documentation about licensing. There’s no copyright line or other template field to fill out or update. There’s no temptation to munge the terms, intentionally or accidentally. Authorship information for open source software is nearly always available online. Notice rules designed for projects from single institutions, distributed on magnetic tape by mail, back in the ’80s, don’t make sense in 2019. Hyperlinks to terms should count. Under Blue Oak, they do. MIT and BSD don’t expect more contributors. MIT and BSD terms include a space for a single copyright notice, because they were written for releases from academic institutions that own all the copyrights in their employees’ work. What about other contributors to the project? They hold copyright in their contributions. Modern permissive licenses, like Apache 2.0, expect contributions from others, and express rules and expectations about how they’ll be licensed. Those rules are some of the most complex in the Apache license. In part to be double sure, in part because it’s not clear if or how the contribution-licensing conditions of Apache 2.0 work, the Apache Foundation also publishes and uses standardized contributor license agreements. Blue Oak takes the next logical step. The license speaks from all contributors to the project, not just the first. It clearly expresses the expectation that all contributors will make their work available on the same terms. It’s still worth getting a record of contributors’ intent to license on Blue Oak terms. But Blue Oak takes the correct approach, documenting that expectation to build a case that it goes without saying, rather than trying to write it into rules folks may not read. Blue Oak expects more contributors. MIT and BSD expect everyone to work for one university. Use Blue Oak for new work. I had a hand in drafting the Blue Oak license, and I’m executive director of Blue Oak Council, the license steward. But I was not alone. Several lawyers came together, in GitHub private repos, to do what we couldn’t have done apart. Blue Oak is the best permissive open source software license we know how to write. We didn’t originally set out to write a license, but no existing form offered all the features we were looking for. A whole lot of great software is out there under MIT and BSD terms. Those licenses will always be with us. As licensing lawyers, we know from firsthand experience how difficult relicensing multi-contributor projects can be. But for new work, there’s a clear choice. Blue Oak is a good permissive license in 2019. Old, unpatched MIT- and BSD-style terms are not. Your thoughts and feedback are always welcome by e-mail. more articles — revision history — back to top Source: /dev/lawyer Deprecation Notice: MIT and BSD

    Read at 06:12 pm, Mar 11th

  • Ruby Quirks: Ruby Study Notes - Best Ruby Guide, Ruby Tutorial

    Ruby Quirks Ruby Quirks - peculiarity of behavior? I know this topic is debatable and remember 'one man's meat is another man's poison! I plan to write down here (in no particular order), some of the little Ruby quirks that I've picked up and which, I now use comfortably. 1. Peter Cooper, the author of the book, 'Beginning Ruby' introduced me to Real-Time chat using an IRC client. On the #ruby channel at irc://irc.freenode.net/ I heard of this quirk: InstanceBeginEditable name="Code" class MotorCycle def initialize(make, color) @make, @color = make, color end end m = MotorCycle.new('Honda', 'blue') m.instance_variable_set(:@make, 'Kawasaki') m.instance_variable_set(:@gears, 4) puts m.inspect InstanceEndEditable Check the output of the above program. In the code above, InstanceBeginEditable name="Code" m.instance_variable_set(:@gears, 4) InstanceEndEditable sets the instance variable names by symbol to object, thereby frustrating the efforts of the class's author to attempt to provide proper encapsulation. The variable did not have to exist prior to this call.Update: Hal Fulton in his excellent book 'The Ruby Way' has this to say about instance_variable_set: It's true these methods are powerful and potentially dangerous. They should be used cautiously, not casually. But it's impossible to say whether encapsulation is violated without looking at how these tools are used. If they are used intentionally as part of a good design, then all is well. If they are used to violate the design, or to circumvent a bad design, then all is not well. 2. This one is not really a quirk but appears to be one, especially for people coming from a Java background. Last year, Shashank Date gave the PuneRuby members a presentation on 'Why Ruby Shines' and three points stood out - 'Expressions everywhere', 'Active Class Definitions' and 'Everything is an Object'. Expressions everywhere - In Ruby, everything returns some value. Therefore a class definition is an expression and one can say something like: InstanceBeginEditable name="Code" c = class C end InstanceEndEditable The value of c is nil. Active Class Definitions - Look at the following program: InstanceBeginEditable name="Code" class C puts 'In class C' end InstanceEndEditable When this class is read the first time, it executes puts and the output is - 'In class C'. Everything is an Object - After being with Java since 1995, the concept that classes in Ruby are first-class objects, is hard to digest at first - each is an instance of class Class. When a new class is defined (typically using class Name ... end), an object of type Class is created and assigned to a constant (Name. in this case). Hal Fulton's suggests a mantra to be recited everyday - "Class is an object, and Object is a class." 3. If I want to swap two variables, I would normally use an additional temporary variable. In Ruby, this is not necessary: InstanceBeginEditable name="Code" x, y = y, x InstanceEndEditable will interchange the values of x and y. 4. Jaaron, a reader of the Learning Ruby Blog has this quirk for us. This one is well known and is the cause of much frustration. InstanceBeginEditable name="Code" x = 7 [1,2,3].each do |x| end InstanceEndEditable If the name of a block parameter conflicts with the name of a local variable, the behavior is to assign the local variable to the argument. In this case, the local variable x gets assigned the value 1, then the value 2, then the value 3. The value 7 is lost. If you refer to Programming Ruby Second Edition eBook (page 99) it says: The while, until, and for loops are built into the language and do not introduce new scope; previously existing locals can be used in the loop, and any new locals created will be available afterward.The blocks used by iterators (such as loop and each) are a little different. Normally, the local variables created in these blocks are not accessible outside the block.However, if at the time the block executes a local variable already exists with the same name as that of a variable in the block, the existing local variable will be used in the block. Its value will therefore be available after the block finishes.The whole issue with variable scope and blocks is one that generates considerable discussion in the Ruby community. The current scheme has definite problems (particularly when variables are unexpectedly aliased inside blocks), but at the same time no one has managed to come up with something that's both better and acceptable to the wider community. Matz is promising changes in Ruby 2.0. 5. Are instance variables inherited by a sub-class? David Black, the author of Ruby for Rails has this to say: Instance variables are per-object, not per-class, and they're not inherited. But if a method uses one, and that method is available to subclasses, then it will still use the variable -- but "the variable" in the sense of one per object. See the following program: InstanceBeginEditable name="Code" class C def initialize @n = 100 end def increase_n @n *= 20 end end class D < C def show_n puts "n is #{@n}" end end d = D.new d.increase_n d.show_n InstanceEndEditable The output is: InstanceBeginEditable name="Code" >ruby p049instvarinherit.rb n is 2000 >Exit code: 0 InstanceEndEditable 6. Morgan Schweers, a reader of the Learning Ruby Blog has this quirk for us. Imagine for a moment, that you want to be able to set a variable, but if it's not set, you default to a known value. You'd rather do it on a single line.One of my co-workers tried this: InstanceBeginEditable name="Code" expand = defined?( expand ) ? expand : true InstanceEndEditable but 'expand' is *defined* by being on the left hand side, BEFORE the RHS is evaluated, so defined? returns true, but because expand hasn't got a value yet, it returns nil.I tried: InstanceBeginEditable name="Code" expand = true unless defined?(expand) InstanceEndEditable and it doesn't help either, which really shocked me. I always believed that the postfix-conditional was evaluated before even beginning to evaluate the operation, but I was distinctly disabused of this notion by testing.Note that 'defined?' operator returns nil if its argument (which can be an arbitrary expression) is not defined; otherwise it returns a description of that argument.I don't understand the reason for the behavior, and I think it's a bug, but I'd love to know a good language reason for it. Kip, a reader writes in with this answer: Here is a work-around using the defined? method: InstanceBeginEditable name="Code" if !defined?(expand) then; expand = true; end InstanceEndEditable However, there is probably a much better way to accomplish this: InstanceBeginEditable name="Code" expand = expand || true InstanceEndEditable And Ruby even has a shortcut for that: InstanceBeginEditable name="Code" expand ||= true InstanceEndEditable Anyway, just thought I'd share that (even though my guess is that you already knew this). I am sure that you would have noticed many other Ruby quirks. I'd definitely like to hear and add them here. <Solutions | TOC | Ruby ActiveRecord and MySQL> Source: Ruby Quirks: Ruby Study Notes – Best Ruby Guide, Ruby Tutorial

    Read at 06:11 pm, Mar 11th

  • 15 Weird Things About Ruby That You Should Know

    15 Weird Things About Ruby That You Should KnowBy Jesus CastelloRuby is an amazing language with a lot of interesting details that you may not have seen before...…in this post I compiled some of those details for your own enjoyment in a nice-looking list :)​ 10 Spaces, Spaces Everywhere!You can put as many spaces as you want between a method call & the receiver of that call. a = [1,2,3] a    [0]a .sizea   . empty? Yes, this is valid Ruby syntax 🙂 11 Infinite Nesting of ConstantsYou can have an infinite amount of nested constants like this: String::String::Fixnum::Float The reason this works is that all top-level constants (defined outside any class) are contained in the Object class & every class inherits from Object by default. Try Object.constants to see what I mean. 12 Chaining the Shovel OperatorYou can chain the shovel << operator multiple times: a = [] a << 1 << 2 << 3 # a = [1, 2, 3] ConclusionYou learned about a few cool Ruby tricks & tips. If you want more see my other post here.Don’t forget to share this post so more people can see it!Source: 15 Weird Things About Ruby That You Should Know

    Read at 06:01 pm, Mar 11th

  • jwz: Uber has literally gotten away with murder.

    "After a very thorough review of all the evidence presented, this Office has determined that there is no basis for criminal liability for the Uber corporation arising from this matter."Arizona prosecutors' decision to not criminally charge Uber for the March self-driving-car death of Herzberg signals that tech companies won't be punished for taking egregious risks with their untested technology even when the worst happens -- in this case, the crash death of Herzberg, a homeless woman in Tempe who became the first person killed by a self-driving car.Uber has already settled a civil case with Herzberg's family. And the National Transportation Safety Board has yet to release its full findings of an ongoing investigation. And local authorities say that the car's "backup driver," an ex-con, may still be charged with vehicular manslaughter because she was watching "The Voice" on her phone when the car hit Herzberg. She did not hit the brakes until after the collision.But Uber isn't blameless; a preliminary report by NTSB found that Uber had deactivated the car's emergency braking system. And that decision comes down to money. Self-driving cars can be programmed to brake whenever there is an object that the computer system can't identify, which in tech jargon is called an "edge case." But programming the car that way can make the journey jerky and nauseating. Uber was in a rush to start its self-driving taxi service that summer, so it had programmed the car to take chances.Indeed, the car's detection system had noticed Herzberg six seconds before the collision. But it did not brake because it read her shape -- she was pushing a bicycle with bags -- as benign.So of course they're going to throw their lowest-level Uber employee "non-employee independent contractor" under the bus. But it's Travis Kalanick who should be in jail.Previously, previously. #respond Source: jwz: Uber has literally gotten away with murder.

    Read at 10:16 am, Mar 11th

  • Utility Functions | benmccormick.org

    Utility FunctionsAs I’ve gone through projects over time, I’ve found a few functions that I end up creating for every significant project that I’ve worked on. Some of the details differ from project to project, but the basic function remains the same. I thought it would be helpful to do a rundown: React/JSX Some of my utils are focused on making JSX nicer to deal with. 2 situations that I’ve run into a lot in JSX are conditionally showing an item in JSX, and determining which of several classes to add to an element based on logic. Scenarios like these: These are both ok, and you’ll see plenty of examples of code like them out there, but the first puts a big chunk of code in a ternary, and it’s not always going to be clear to a reader where that : null came from at the end, or why it’s there by the time they reach the end. In the second example, we’re dealing with a lot of ugly string concatenation. There are other ways to handle this, like using template strings + ternaries but generally they each provide their own messy pieces. To solve these situations, I like to define these 2 small functions: The first just formalizes the most common use of ternaries in JSX (conditionally showing an item) and adds an easy to understand name to it. The second lets us work with an array of classNames instead of handling string concat ourselves, and will automatically filter out undefined or empty classNames. This implementation does silently swallow errors on anything that is not a string, which may not be your preference. Usage looks like this: the showIf reads much more clearly than the previous ternary, especially for language newbies who might not be used to ternaries. Here we’ve gotten rid of the extra string code and are working on arrays, which is a nicer data structure for dealing with lists of stuff. Also since we’re auto-filtering falsy stuff, we don’t have to worry about whether extraClass was defined if it was passed as a prop to our component or something. Formatting So the next few may be different for everyone. The details here aren’t important, the important thing is that you centralize your formatting of numbers and dates. For instance, here are functions for formatting dates, normal numbers and percentages from a current project: The first one will take a date object and format it to something like 05/30/17 01:16 PM. The second will take a number and return a string formatted with appropriate commas: 1234567 -> '1,234,567'. The last one will convert a decimal to a percentage string: 0.5 -> '50%'. Note that none of these functions are very long. I’m relying on a date library for the first piece and toLocaleString for the other 2. So I could inline this in most places and not have it get much longer. The benefit of these types of functions is not in saving typing. It’s in standardizing how you format or don’t format things throughout an application. This has 2 benefits: It’s easy to fix bugs, add features or switch between libraries for these common tasks across your application because all of the logic is centralized. If I needed to start supporting more locales than just the US for percentage formatting, or use moment for my date formatting library I could easily do so with edits to only one file. That file is also well unit tested, so those transitions would be safe. It lets us control which formats are allowed. For instance we’re allowing the function caller to specify how many decimal points to show for the numeric functions, but not giving options to change the date format for the formatting function, because we want that to be the same everywhere. If we need to support multiple formats for different scenarios, like a date-only format or a format for communicating with the API, we can add options for that which don’t open up all formats, or expose them as separate functions. With dates in particular, I want imports of libraries like moment or date-fns to be limited to 2 or 3 files at the most, and not used ad-hoc throughout the codebase. Note that all my examples so far have utilized other utility libraries like lodash and date-fns. The best utility functions are those that you don’t have to maintain yourself. I do recommend looking for libraries that you can tree-shake and only take what you need though. Other ones like moment.js can make a big difference on your JavaScript bundle size if you let them. Timing Timeout functions are useful, but the browsers built in functions are callback based and don’t play well with promises or async await. We can fix that: I now have a promisified version of setTimeout (sleep) and a special case version with a 0 timeout (useful for things that should happen as soon as possible after the current event loop executes. I prefer dealing with things in seconds over milliseconds, so I changed the API to use that. That is probably not everyone’s cup of tea, so feel free to copy and modify. Usage looks like this: And Even More! This is just a sample of the small functions I usually create in projects. Pretty much all of them exist for one or more of the reasons that were already discussed: Smoothing over awkward library syntax like multiple classes in JSX or HTML templates Making user intention clear with a well named function, like showIf or stdDateFormat Ensuring consistent application-specific behavior across common low-level operations like formatting or logging Making it easy to replace 3rd party utility libraries like date-fns by wrapping them in an application specific function Improving browser level APIs, or shaping them to have useful defaults for the current application, like we did with toLocaleString and setTimeout. You Might Also Like These ArticlesSource: Utility Functions | benmccormick.org

    Read at 08:18 am, Mar 11th

  • Book Review: Deep Work & The Common Rule | benmccormick.org

    Book Review: Deep Work & The Common RuleI’m trying something different today. This is a review of 2 books I’ve read recently; I’m combining them because their similarities and differences are just as interesting to me as the practical steps they encourage. Deep Work is a 3 year old book from Cal Newport focused on encouraging readers to spend more time on their most important work. It starts out with sections defining and motivating “Deep Work”: focusing without distraction on cognitively demanding tasks. Then it goes on to give a series of recommended strategies for creating more and better deep work time in your life. The Common Rule is a new book by Justin Earley focused on building habits that allow living life with purpose. It is a “Christian book”, and recommends practices like daily prayer and fasting. But it is mainly focused on encouraging habits to combat some universal challenges of modern American life: distracting technologies, all consuming work environments, and increasing isolation. A Shared Diagnosis Deep Work and The Common Rule share a common view on the challenges facing many American adults today: they each tackle tech distractions, work expectations of constant availability, and time spent on shallow activities disconnected from our core goals and desires. Both authors are skeptical of modern “networking tools” like social networks, chat tools, news sites and email without dismissing them. The primary issue both authors identify as the problem with technology is our non-critical acceptance of new tools into our lives as progress, the addictive nature of these services, and how they then impact our brains. Because we turn to technology for distraction and easy comfort whenever we’re bored, we lose our capacity for deeper engagement with the world and can lose sight of more important things. Each book also decries the problems with “constant connectivity culture”. Deep Work comes at it from a pure productivity standpoint: expectations of constant availability create distractions that prevent us from getting into the flow of meaningful work, and when we’re answering emails at all hours of the day, we don’t get the context shifts where our brains can rest and help us be more productive later. The Common Rule shares these concerns but is more interested in how these distractions can shape our thinking and emotions: when we get sucked into the world of social media news for instance, is the anger we feel about issues a reflection of our true priorities or a path that we’ve fallen down. It also asks us to consider how long term media-consumption may shape these believes and not just distract from them. Finally, both authors touch on the amount of time we spend on meaningless activities. Whether it is busy work, meetings, social media usage we feel we “have to do” or “real work” that just isn’t the most important work, both books encourage readers to value their time and be strategic about how to spend it. They share a rare humble view of the human condition: we really do need to work with only 24 hours a day. How to “make the most of them” is a core focus of each book. A Suprisingly Similar Recommendation In addition to a shared view of the problems people face, both books share a fairly similar approach to solving them. Both books recommend ritualized structuring of life to reduce time spent on shallow, distracting activities and enable time for “the good life”. So… what is “ritualized structuring”? Both books spend significant time outlying a series of recommended habits/rituals that combine to help make us more aware of how our time is spent, and also serve as enabling spaces for “the good life”. Deep work recommends (among other things) structured work hours, work-free evenings, social media avoidance and end of the day “shutdown rituals” where you clean up todos and make a schedule for the next day. The Common Rule advocates for taking an hour away from your phone each day, a meal with others each day, curating media to 4 hours each week as well as more obviously religious habits like daily prayer and a sabbath day. Each book offers these habits as “focusing tools”, ways to spend time on what is important and focus on the “good life”. So what is the “good life”? Well… A Subtly Different Motivation The biggest difference between Deep Work and The Common Rule is what they’re aiming to enable. What is the “good life” that we want to unlock as we wade out of the shallows? Deep Work sees “Deep Work” as both a good in itself and a means to career success. Deep Work allows for craftsmanship and an impact on the world greater than we’re normally able to achieve. And because it is both important and implicitly discouraged by the modern office environment, clearing space for it is a tremendous competitive advantage when it comes to career success. The Common Rule is explicitly focused on habits that turn us outward from ourselves; habits like a daily meal with others and a weekly hour of conversation with a friend are about connecting with the people around us, while daily prayer and weekly fasting are about connecting with God. And ultimately they’re about health: when we connect well with God and others, we’re able to live in a way where we can accept our limitations and thrive where we are. I don’t think the 2 philosophies are incompatible per say: you can work efficiently at work while valuing your relationships, as long as you’re willing to accept the inherent limitations of the 24 hour day. But reading these 2 books back to back reminded me that “efficiency” is never an end to itself. It’s always important to make sure you’re heading efficiently in the right direction. Recommendation I highly recommend both of these books. They are full of fantastic suggestions that I plan on implementing over time (I’m trying to avoid my classic blunder of trying to change everything about my life at once and look for bits and pieces to attempt first). But as you take in the ideas, make sure to reflect on what the “good life” looks like to you. Amazon Links Source: Book Review: Deep Work & The Common Rule | benmccormick.org

    Read at 08:15 am, Mar 11th