所有数据均采集与网络或网友提供, 仅供学习参考使用
Paul Ducklin / 2020-01-14 5 years ago / 未收藏/ nakedsecurity发送到 kindle
The apps itself isn't malicious - the treachery lies in the payment model.
Lisa Vaas / 2020-01-14 5 years ago / 未收藏/ nakedsecurity发送到 kindle
A former contractor in Beijing: “It sounds a bit crazy now [...] that they gave me the URL, a username and password sent over email.”
Lisa Vaas / 2020-01-14 5 years ago / 未收藏/ nakedsecurity发送到 kindle
We don't care how little you made from your crimes, the judge said. We care that you went after an outfit that gives a ton to charities.
Danny Bradbury / 2020-01-14 5 years ago / 未收藏/ nakedsecurity发送到 kindle
Google is testing out a feature to make Android's built-in password manager safer.
John E Dunn / 2020-01-14 5 years ago / 未收藏/ nakedsecurity发送到 kindle
A fortnight in to 2020 and we have the first security flaw to be given its own name: Cable Haunt - complete with eye-catching logo.
Naked Security writer / 2020-01-13 5 years ago / 未收藏/ nakedsecurity发送到 kindle
From a Firefox zero-day to a military ban on TikTok - and everything in between. It's the weekly security roundup.
Lisa Vaas / 2020-01-13 5 years ago / 未收藏/ nakedsecurity发送到 kindle
If that bill passes, you can say bye-bye to YouTube, says one content creator.
John E Dunn / 2020-01-13 5 years ago / 未收藏/ nakedsecurity发送到 kindle
A letter sent to the Google CEO by Privacy International claims bloatware has allowed a privacy and security hole to open almost unnoticed.
Lisa Vaas / 2020-01-13 5 years ago / 未收藏/ nakedsecurity发送到 kindle
Relax: Nic Cage deepfakes aren't going anywhere. It's only "maliciously misleading" impersonations that are now verboten.
Danny Bradbury / 2020-01-13 5 years ago / 未收藏/ nakedsecurity发送到 kindle
New research has heightened an already urgent call to abandon SHA-1, a cryptographic algorithm still used in many popular online services.
Paul Ducklin / 2020-01-13 5 years ago / 未收藏/ nakedsecurity发送到 kindle
Looks like the Snake ransomware was created especially for network-wide attacks.
2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-14T06:11:44Z

BAGHDAD (AP) — Young Iraqis who drove mass protests demanding sweeping political reforms are worried that the conflict between the U.S. and Iran, which is playing out in part on Iraqi soil, is killing their momentum.

Even before the U.S. drone attack that killed Iranian Gen. Qassem Soleimani, the 4-month-old protests against government corruption, poor services and rising Iranian influence in state affairs were beset by internal divisions. A violent security crackdown heightened tensions, leading to hundreds of deaths and thousands of injuries as well as targeted killings of sympathizers.

And in the stormy aftermath of the U.S. drone strike that also killed top Iraqi militia commander Abu Mahdi al-Muhandis, avoiding another war in Iraq became a top priority for state officials as they scrambled to contain hostilities between Washington and Tehran.

“We are afraid that the uprising is being forgotten and (officials) are focusing on things we don’t want, not our main goals,” said Noor, an activist in Baghdad’s Tahrir Square who asked to be identified only by her first name, fearing reprisal, like all other protesters interviewed for this story. “On the other hand, we are trying to be calm and keep people on the street to make the point that we are not with the Americans or the Iranians. We are with Iraq.”

There are hopeful signs as Iran and the U.S. appeared to back down — at least in the short term — after Tehran retaliated for Soleimani’s killing by firing missiles at two Iraqi bases housing American troops. No one was seriously injured and Iran was unexpectedly forced to shift gears to manage the fallout from its accidental downing of a Ukrainian airliner filled with Iranians.

Nevertheless, the issue of U.S. troop withdrawal in response to the attack that killed Soleimani minutes after he landed at Baghdad airport has monopolized Iraqi politics, with caretaker Prime Minister Adel Abdul-Mahdi openly calling for their ouster.

“Everyone is busy with America and Iran, but we are still facing attacks on the street,” said Zaid, a protester in Baghdad. “Now we’ve become an easy goal for the militias; they can harm us because no one is focusing on them.”

The rejection of Iranian influence over Iraqi state affairs was a core component of the protest movement and demonstrators fear that as tensions between Tehran and Washington ease, Iranian-backed militias will turn on them for vengeance.

The protests began Oct. 1, when thousands took to the streets in Baghdad and in the country’s predominantly Shiite south. Since then, about 500 people have been killed, most of them shot by security forces who also used tear gas to disperse crowds.

While Friday protests brought out thousands countrywide, the turnout was lower than expected. Adding to their worries, two local journalists known for their coverage of the anti-government protests were found shot dead in a car parked near a Basra police station. And more people were wounded in clashes Saturday between protesters and security forces in Karbala, in southern Iraq, when police fired into the crowd.

“Protesters are certainly more afraid now than they were a few weeks ago but at the same time they want to maintain their ground,” said Ruba Ali Hassan, a researcher at York University in Toronto. “They’ve had such great momentum over the past three plus months and there’s great fears this momentum might die down. People are trying to show great support and make sure that the protesters can still move forward but they’re on shaky ground unfortunately.”

A growing concern among protesters is their belief that Iran-backed militias are seizing on some demonstrators’ refusal to grieve over Soleimani as an excuse to attack them. In turn, the attacks fuel the differences of opinion over Soleimani, deepening the rifts between the demonstrators and distracting them from their original purpose.

In the southern city of Nasiriyah, for instance, protesters refused to let a symbolic funeral procession for the Iranian general enter the square where they were camped. Violence broke out and at least one protester was killed and three wounded when an Iran-backed militia fired on crowds. Demonstrators then burned the headquarters of Popular Mobilization Forces, an umbrella organization for multiple militia groups and part of the Iraqi security forces.

“Political parties and militias have attempted to create discord within the demonstration square in the center of Nasiriyah — they took advantage of the rifts between protesters,” said Ali, a protester based in the city. “We have concerns the emotions arising from his death will rob the protests of its true aims.”

The events in Nasiriyah have spooked protesters in Baghdad’s Tahrir Square, the epicenter of the movement, who fear similar attacks, several activists said.

Since Soleimani’s death, protest organizers have been trying to refocus attention on their movement, three activists said. With that in mind, they issued a statement last week saying their goals had not changed.

At the top of their list is preventing Abdul-Mahdi, who has headed a caretaker government since his resignation in December, from being renamed prime minister, which many suspect the country’s political elites would like.

“All the news is about America and Iran, and the elites are trying to make the people forget about the protests in Iraq, and our goal for change and we don’t want that,” said the protester, Noor. “We are trying to be calm and study what is going on around us. We are telling everyone, stay with Iraq. This is not our war.”

___

Associated Press writer A. J. Naddaff in Beirut contributed to this report.

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-14T10:11:41Z

VATICAN CITY (AP) — The Vatican cardinal who co-authored a bombshell book with Emeritus Pope Benedict XVI reaffirming priestly celibacy on Tuesday strongly denied he manipulated the retired pope into publishing.

Guinean Cardinal Robert Sarah, who heads the Vatican’s liturgy office, spoke out after news reports quoting “sources close to Benedict” claimed the retired pope never saw or approved the finished product.

Sarah reproduced letters from Benedict making clear the 92-year-old pope had written the text and approved of publishing it as a book. “These defamations are of exceptional gravity,” Sarah tweeted.

The controversy underscores the conservative-progressive battle lines that have deepened in the Catholic Church following Benedict’s 2013 decision to retire, and his successor Pope Francis’ more reform-minded papacy.

Benedict’s involvement in the book, “From the Depths of Our Hearts,” had the appearance of being an attempt to interfere with Pope Francis’ ministry. Francis has said he will publish a document in the coming weeks that is expected to touch on whether married men could be ordained priests in the Amazon, to deal with a priest shortage there.

Benedict’s reaffirmation of the “necessity” of priestly celibacy implied that the former pope was trying to influence the thinking of the current one.

His intervention was all the more surprising, given he had vowed to live “hidden from the world” when he retired in 2013, specifically to avoid any suggestion that he still wielded papal authority.

The book includes an introduction and a conclusion, said to be written jointly by Benedict and Sarah, as well as a chapter apiece. The Associated Press obtained galleys of the English text after the French daily Le Figaro published excerpts Sunday.

After the first reports, Francis’ supporters quickly alleged Benedict had been manipulated by members of his right-wing entourage into writing something that amounted to a frontal attack on Francis. Some claimed it was evidence of elder abuse, given Benedict’s 92 years and increasing frailty.

Conservatives, many of whom long for Benedict’s orthodoxy, argued it was no such thing and noted that Francis too has reaffirmed the “gift” of priestly celibacy.

The Vatican tried to tamp down the furor by insisting the book was a mere “contribution” to the discussion about priestly celibacy written by two bishops in “filial obedience” to Francis.

Sarah denied there was any manipulation on his part and said Benedict was very much a part of the process. He spoke out after Spanish daily ABC, citing “sources very close to Benedict” reported the retired pope had nothing to do with the project and had been manipulated. Argentine daily La Nacion carried a similar report.

Sarah tweeted three 2018 letters from Benedict making clear the retired pope had provided him the text and participated in discussions about publishing it. As he wrote in the book, Benedict said he had begun writing “some reflections on the priesthood” before Sarah even proposed the book in September, but had put the project aside because of his waning strength.

In a statement Tuesday, Sarah chronicled all his interactions with Benedict and said the retired pope had approved the final text, including the joint introduction, conclusion and cover.

He quoted his own correspondence to Benedict saying: “I imagine that you might think your reflections might not be opportune because of the polemics they might provoke in newspapers, but I am convinced that the whole church needs this gift, which could be published around Christmas or the start of 2020.”

Sarah reproduced a letter from Benedict, dated Nov. 25, that reads: “From my side, the text can be published in the form you have foreseen.”

“I sincerely forgive all those who defamed me or wanted to put me in opposition to Pope Francis,” Sarah said in his statement. “My attachment to Benedict XVI remains intact and my filial obedience to Pope Francis absolute.”

The “sources close to Benedict” who suggested that the retired pope hadn’t co-authored the book have not been identified. But Benedict’s entourage is small, and is headed by his longtime secretary, Archbishop Georg Gaenswein, who also is head of Francis’ papal household.

Benedict’s letters to Sarah make clear the retired pope had written a text prior to Francis’ Amazon synod, in which a majority of bishops backed ordaining married men as priests. After the synod concluded, Francis announced he would write his own reflections on its outcome.

The U.S. publisher of the book, Ignatius Press, which has been Benedict’s English-language publisher since before he became pope, has defended the book and Benedict’s participation in it.

The Rev. Joseph Fessio, Ignatius’ founder and editor, said he had read the text in French and English, and said only Benedict could have written it.

“Is it really believable that Sarah would perpetrate a fraud?” Fessio asked in an email. “Or alter something from Benedict? Or claim that Benedict didn’t collaborate and agree to the intro and epilogue?”

Ignatius in November published another book by Sarah, “The Day is Now Far Spent,” in which the cardinal — a hero to liturgical purists and conservatives and a quiet critic of Francis — again defended priestly celibacy.

In the book, Sarah criticized the proposal to ordain married men in the Amazon, saying it actually showed disdain for the indigenous population and suggested God couldn’t find real priests among them willing to make the sacrifice of celibacy.



2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-14T05:04:50Z

WASHINGTON (AP) — For all of the Trump administration’s insistence that the threat of an “imminent” attack led to the American drone strike on Iran’s top general, U.S. officials behind the scenes say the strike was motivated as much, if not more, by a broader effort to rein in a dangerously emboldened Iran.

Secretary of State Mike Pompeo and Attorney General William Barr gave voice to the broader rationale on Monday, saying deterrence was a key component of the strike. But they, like other U.S. officials interviewed by The Associated Press, stopped short of saying definitively that no specific plot was broken up.

Still, the shifting rationale has raised questions about the nature and credibility of the threat posed by Gen. Qassem Soleimani, the architect of a decades-long reign of terror in which Iranian proxy fighters killed hundreds of Americans and contributed to the deaths of hundreds of thousands in the region. Critics of President Donald Trump’s decision say he should have consulted Congress before taking an action that brought the United State and Iran to the brink of war.

As lawmakers protested, the Trump administration seized on the “imminent threat” rationale, though Pompeo later said he didn’t know the time frame for Soleimani’s next attack and other officials indicated that there was no clear sense of the next targets either. Trump on Friday told Fox News that the threat was against four American embassies, but two days later Defense Secretary Mark Esper said he’d seen no such evidence.

In the latest round of confusion, the president maintained Monday that there was no contradiction in their comments.

In recent days a clearer picture of the decision-making process leading up to the strike has emerged. While U.S. officials stopped short of saying definitively that there was no specific plot disrupted by Soleimani’s death, they have acknowledged in recent days that the long-considered operation had a more fundamental purpose: breaking up what they viewed to be a perilous cycle of violence that could have brought the United States and Iran even closer to hostilities.

Soleimani was undoubtedly planning other potentially deadly operations against American interests as he had for decades, the officials said. But a driving concern was that the Trump administration feared a loss of “deterrence” with Iran, according to three senior administration officials who spoke on the condition of anonymity to discuss sensitive internal deliberations surrounding the strike and its aftermath.

Two of Trump’s most prominent Cabinet officials echoed that message on Monday.

“Our ability to deter attacks had obviously broken down,” Barr said . Pompeo said, “President Trump and those of us in his national security team are re-establishing deterrence – real deterrence ‒ against the Islamic Republic.”

Trump himself implicitly acknowledged the deterrence aim, telling reporters Monday that the strike against Soleimani “should have been done 20 years ago.” And he implied as much in a tweet that day: “The Fake News Media and their Democrat Partners are working hard to determine whether or not the future attack by terrorist Soleimani was “imminent” or not, & was my team in agreement,” he tweeted. “The answer to both is a strong YES., but it doesn’t really matter because of his horrible past!”

Concerns about increasingly brazen attacks by Iran and its proxies, including the downing of an American drone and strikes on Saudi Arabian oil field last year, have mounted within the U.S. national security community for months, the officials said. Trump had decided against military retaliation to those attacks, which damaged equipment but did not result in loss of life, but U.S. officials worried that Iran might confuse its restraint with weakness.

Soleimani, the officials said, had been identified as the target for potential U.S. lethal action months ago, at least since the aftermath of Trump’s September decision to call off what was seen to be an imminent strike on Iran. Military planners and other officials viewed a targeted strike at Soleimani as a potentially more agreeable option for the president, who publicly expressed concerns for the collateral damage predicted for the September option.

Those fears, the officials said, led them to view the broader matrix of threats from Iran and its proxies with greater severity, an assessment compounded by the swiftness with which the Iranian proxy in Iraq, Kata’ib Hezbollah, helped organize the siege of the U.S. Embassy after the Dec. 29 U.S. strike against the group believed responsible for killing a U.S. contractor on Dec. 27.

Soleimani had been in the crosshairs of the U.S. before — at least once in 2007 — but two administrations had rejected operations to kill him, wary of the consequences of striking down Iranian military leader. The final go-ahead to strike Soleimani came two weeks ago, once it became apparent that there was a window of opportunity because of new intelligence on his travel plans.

The strike against Soleimani, among the most powerful figures in Iran, was deliberately disproportionate to reset the cycle of violence and reinstate “deterrence” by demonstrating that the U.S. could respond overwhelmingly and decisively at its choosing, the officials said in relating how the strike was conceived.

The killing was a risky move that brought the two nations closer to war than at any point in recent memory. Iran’s ballistic missile strikes last week on two Iraqi bases that house American troops was one of the most directs attacks by Iran on the U.S. since the 1979 U.S. Embassy hostage taking in Tehran.

Even as tensions appear to cool, the long-term effects of the strike are unclear and will likely be difficult to predict, given the wide breadth and capabilities of Iran’s network of proxies.

Still, U.S. officials defend the strike as restoring a check on Iran’s aggression. Speaking to CNN on Sunday, Esper quoted CIA Director Gina Haspel, who, on a secure video conference, had summed up the stakes for the president: “The risk of inaction is greater than risk of action.”

___

Associated Press writers Matthew Lee, Robert Burns and Michael Balsamo contributed to this report.

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-14T05:52:28Z

WASHINGTON (AP) — Senate Republicans signaled they would reject the idea of simply voting to dismiss the articles of impeachment against President Donald Trump as the House prepares to send the charges to the chamber for the historic trial.

“I think our members, generally are not interested in the motion to dismiss. They think both sides need to be heard,” Sen. Roy Blunt, R-Mo., who is part of GOP leadership, said Monday.

It will be only the third presidential impeachment trial in American history, a serious and dramatic endeavor coming amid the backdrop of a politically divided nation and the start of an election year.

Speaker Nancy Pelosi has not set the timing for the House vote that will launch the Senate action. Trump was impeached by the Democratic-led House last month on charges of abuse of power over pushing Ukraine to investigate Democratic rival Joe Biden and obstruction of Congress in the probe. Democrats said the vote could be Wednesday.

With the impeachment trial starting in a matter of days, senators are still debating the rules of the proceedings. GOP senators are conferring privately about whether to allow a motion to dismiss the charges against the president or to call additional witnesses for testimony.

Trump suggested over the weekend he might prefer simply dismissing the charges rather than giving legitimacy to charges from the House, which he considers a “hoax.”

It was an extraordinary suggestion, but one being proposed by Trump allies with support from some GOP senators, including Majority Leader Mitch McConnell.

But it is clear McConnell does not have the votes needed from his GOP majority to do that.

One key Republican, Sen. Susan Collins of Maine, said she, too, would oppose a motion to dismiss the charges.

Collins is leading an effort among some Republicans, including Sens. Mitt Romney of Utah and Lisa Murkowski of Alaska, to ensure the ground rules include plans to eventually consider voting to call witnesses.

“My position is that there should be a vote on whether or not witnesses should be called,” Collins said.

Romney said he wants to hear from John Bolton, the former national security adviser at the White House, who others have said raised alarms about the alternative foreign policy toward Ukraine being run led by Trump’s personal lawyer Rudy Giuliani.

“I’ve said I’d like to hear from John Bolton,” Romney told reporters Monday. “I expect that barring some kind of surprise, I’ll be voting in favor of hearing from witnesses after those opening arguments.”

Democrats have been pushing Republicans, who have the majority in the Senate, to consider new testimony, arguing that fresh information has emerged during Pelosi’s monthlong delay in transmitting the charges.

McConnell is drafting an organizing resolution that will outline the steps ahead. Approving it will be among the first votes senators take after they are sworn as jurors by Supreme Court Chief Justice John Roberts for the Court of Impeachment.

Republicans control the chamber, 53-47, and are all but certain to acquit Trump. McConnell is hesitant to call new witnesses who would prolong the trial. He prefers to model Trump’s trial partly on the process used for then-President Bill Clinton’s trial in 1999.

It takes just 51 votes during the impeachment trial to approve rules or call witnesses. Just four GOP senators could form a majority with Democrats to insist on new testimony. It also would take only 51 senators to vote to dismiss the charges against Trump.

Most Republicans appear willing to go along with McConnell’s plan to start the trial first then consider witnesses later, rather than upfront, as Democrats want.

Collins is pushing to have at least the promise of witness votes included in the organizing resolution. She and the others appear to be gathering support.

“I’ve been working to make sure that we will have a process that we can take a vote on whether or not we need additional information, and yes, that would include witnesses,” Murkowski told reporters.

McConnell is expected to huddle privately with senators at their weekly lunch Tuesday.

House Majority Leader Steny Hoyer told reporters the House vote might come Wednesday. “Could be,” he said.

___

Associated Press writers Matthew Daly, Andrew Taylor and Padmananda Rama contributed to this report.

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-14T06:02:12Z

BEIJING (AP) — A bus plunged into a sinkhole on a city street in northwestern China, killing at least six people and leaving four missing, authorities said.

Some 1,000 emergency workers and 30 vehicles were sent to the site, the emergency management bureau in the city of Xining said. A crane was called in to lift the bus above the sinkhole so rescue workers could look for victims.

Video apparently shot by security cameras just after the accident showed the bus gradually settling into the hole while people nearby scrambled for safety.

Other video showed the bus tipped more than halfway into the chasm that had opened up at a bus stop just outside a health clinic. Light and smoke were coming to the surface, possibly as a result of the rupture of gas or electricity lines. Workers using backhoes, dump trucks and other equipment excavated earth around the collapse.

The collapse Monday afternoon left 16 people in the hospital. The the emergency management bureau said the bus had been raised from the collapsed 80-square-meter (860-square-foot) section into which it had fallen.

The hilly city of Xining is the capital of Qinghai province, one of China’s poorest regions, sitting atop the Tibetan Plateau.

The expedited building of roads, tunnels, bridges and other infrastructure to keep China’s economy strong has often led to corner-cutting on safety, causing fatal workplace and industrial accidents. Mining had also caused instability in the ground in many areas after years of barely restricted mineral extraction.

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-14T08:19:07Z

TEHRAN, Iran (AP) — Iran said Tuesday that authorities have made arrests for the accidental shootdown of a Ukrainian passenger plane, which killed all 176 people on board and set off protests in the country demanding accountability after officials initially concealed the cause of the crash.

Iran’s Judiciary spokesman Gholamhossein Esmaili said “some individuals” were arrested after “extensive investigations.” His statement on the judiciary’s website did not say how many people had been detained or name those arrested.

Iran at first dismissed allegations that a missile had brought down the plane, but in the face of mounting evidence officials acknowledged on Saturday — three days after — that its Revolutionary Guard had shot down the plane by mistake as the force braced for a possible military confrontation with the United States.

The plane, en route from Tehran to the Ukrainian capital of Kyiv, was carrying 167 passengers and nine crew members from several countries, including 82 Iranians and 57 Canadians, many of whom were Iranians with dual citizenship. There were several children among the passengers, including an infant.

Iran’s president on Tuesday called for a special court with “a ranking judge and dozens of experts” to be set up to probe the incident.

“The responsibility falls on more than just one person,” President Hassan Rouhani said in a televised speech, adding that those found culpable “should be punished.”

“There are others, too, and I want that this issue is expressed honestly,” he said, without elaborating.

Rouhani called the incident “a painful and unforgivable” mistake and promised that his administration would pursue the case “by all means.”

“This is not an ordinary case. The entire the world will be watching this court,” he said.

Tensions have been escalating since President Donald Trump pulled the U.S. out of Iran’s 2015 nuclear deal with world powers, then reimposed sanctions that had been lifted under the accord.

The deal has quickly unraveled since then, with Iran steadily breaking away from limits on its nuclear program and Europe unable to find ways to keep Tehran committed.

The U.S. sanctions have devastated Iran’s economy.

On Tuesday, Britain, France and Germany triggered the so-called “dispute mechanism” action that paves way for possible further sanctions in response to Iran’s moves.

Tensions sharply escalated further after on Jan. 3, when a U.S. airstrike killed Iran’s most powerful commander, Revolutionary Guard Gen. Qassem Soleimani, in Baghdad.

In response, Iran launched ballistic missiles on military bases housing U.S. troops in Iraq to avenge Soleimani’s killing. The Ukrainian plane was shot down in Tehran as Iranian forces were on alert for possible U.S. retaliation.

While Rouhani pointed to mistakes and negligence, he also repeated the government’s line that the plane tragedy was ultimately rooted in U.S. aggression.

“It was the U.S. that made for an agitated environment. It was the U.S. that created an unusual situation. It was the U.S. that threatened and took our beloved (Soleimani),” he said.

Rouhani called the government’s admission that Iranian forces shot down the plane a “first good step.”

He added that Iranian experts who retrieved the Ukrainian plane’s flight recorder, the so-called black box, have sent it to France for analysis.

Gen. Amir Ali Hajizadeh, the head of the Guard’s aerospace division, said over the weekend his unit accepts full responsibility for the shootdown. He said when he learned about the downing of the plane, “I wished I was dead.”

The incident raised questions about why Iran did not shut down its international airport or airspace the day it was on alert for U.S. military retaliation.

The shootdown and the lack of transparency around it has reignited anger in Iran at the country’s leadership. Online videos appeared to show security forces firing live ammunition and tear gas to disperse protests in the streets.

Also Tuesday, Iran’s judiciary said that 30 people had been detained in the protests, and that some were released, without elaborating further. An Iranian film director who’d called for protests in Tehran’s Azadi, or Freedom, Square is among those released.

Iranian authorities briefly arrested British Ambassador Rob Macaire on Saturday evening. He’s said he went to a candlelight vigil to pay his respects for the victims of the Ukrainian plane shootdown and left as soon as the chanting began and it turned into a protest.

Iran’s Foreign Ministry summoned the British ambassador on Sunday to protest what it said was his presence at an illegal protest. Britain, in turn, summoned Iran’s ambassador on Monday “to convey our strong objections” over the weekend arrest.

Iran’s top prosecutor, Mohammad Javad Montazeri, was quoted in local media Tuesday saying the British ambassador must be expelled from the country as soon as possible.

___

Batrawy reported from Dubai, United Arab Emirates.

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-14T11:33:27Z

Your daily look at late-breaking news, upcoming events and the stories that will be talked about today:

1. GOP WEIGHS IMPEACHMENT TRIAL OPTIONS Republican senators are conferring privately about whether to allow a motion to dismiss the charges against President Trump or to call additional witnesses for testimony.

2. TRUMP ADMINISTRATION SHIFTS RATIONALE ON IRAN GENERAL’S KILLING Secretary of State Mike Pompeo and Attorney General William Barr give voice to the broader rationale, saying deterrence was a key component of the strike.

3. FALLOUT FROM DOWNED JETLINER CONTINUES Iran’s judiciary says arrests have been made for the accidental shootdown of a Ukrainian passenger plane that killed all 176 people on board just after takeoff from Tehran last week.

4. 2020 PRIMARY HEATS UP WITH IOWA DEBATE The prime-time faceoff comes just 20 days before the state’s caucuses as polls suggest the nomination is truly up for grabs.

5. PHILIPPINE VOLCANO RESTIVE Tens of thousands of people flee as the Taal volcano near Manila spews lava into the sky and trembles constantly, raising fears of a more dangerous eruption.

6. ’I CAN’T GIVE UP UNTIL I FIND HIM’ An Australian villager whose small community was devastated by wildfires is not giving up hope of finding his “little man,” a dog named Kozi.

7. ‘I THOUGHT A WOMAN COULD WIN; HE DISAGREED’ Elizabeth Warren says Bernie Sanders told her during a private meeting two years ago that he didn’t think a woman could win the White House, an accusation Sanders denies.

8. RUSSIANS HACK COMPANY KEY TO UKRAINE SCANDAL A U.S. cybersecurity company says Russian military agents hacked Burisma Holdings, the Ukrainian gas company at the center of the scandal that led to Trump’s impeachment.

9. LSU BEATS CLEMSON FOR TITLE Joe Burrow throws five touchdown passes, capping one of the greatest seasons in college football history by leading No. 1 LSU to a 42-25 victory against No. 3 Clemson to win the national championship.

10. BASEBALL PUNISHES ASTROS IN SIGN-STEALING SCANDAL Houston fires their manager and general manager after the pair were suspended by Major League Baseball for a sign-stealing scheme during the Astros’ run to the 2017 World Series title.

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-14T07:10:18Z

NERRIGUNDAH, Australia (AP) — Ash Graham’s dog, Kozi, wakes him at 8 a.m., eager for his morning walk. Then Graham realizes he was dreaming, and gets up from the one-man tent he’s been sleeping in each night since a wildfire swept through his village on New Year’s Eve.

Graham, a volunteer firefighter, resumes his weary search for Kozi: hiking south down the dried-up creek bed, past the wallabies that were burned to death as they fled the fire, knocking on doors, trying to keep track of the grids he’s already covered.

Graham’s Austrian wife, Melanie, died from cancer a year or so ago, and his house burned down in the Dec. 31 fire. His truck and his few belongings are with him in the yard of the fire station, the last place he saw Kozi. Graham had left his dog at the station and was driving around warning people to leave when 3-year-old Kozi bolted as flames approached the building.

“He’s my little man. He’s been there for me,” Graham said, his face crumpling. “I can’t give up, really, until I find him.”

Graham’s tiny village of Nerrigundah in southeastern Australia has been among the places hardest hit by the country’s devastating wildfires, with about two-thirds of the homes destroyed. A man in his 70s who lived near the village was killed in the disaster — one of the 27 lives claimed by the wildfires, which also have destroyed more than 2,000 homes.

ratio
Youtube video thumbnail

Like many small communities in Australia that have been scorched by the wildfires, Nerrigundah will never be the same.

Once a thriving gold mining town with over 1,000 people, the village, located in New South Wales state, has lately been home to just a few dozen who love the peace of the Australian bush, a place far from the bustling cities where dogs can run free. But now a landmark building that was once a store has burned down. The village’s old schoolhouse is also gone, and so is the building that used to be the church.

The wildfire caught Nerrigundah by surprise, after it was expected to hit a day or two later. And nobody could believe its ferocity.

The Threlfall family home was one of only a half dozen houses to survive. Outside stands an exploded gas canister, its sides peeled open like arms seeking an embrace. The stone sculptures made by Ron Threlfall, the fire captain, that depict people in anguish now have scorch marks running up their sides.

Skye Threlfall, 21, who was home for the Christmas holidays along with her two siblings, said she woke up at 4 a.m. on New Year’s Eve.

“My mum was screaming to us, and then we all ran out and looked up at the sky over here and it was just red,” she said. “You could see the flames up in there, and it was just roaring.”

She said the fire closed in like a storm. She screamed at her sister to come to the car, terrified she wouldn’t make it.

Across the other side of town, Lyle Stewart, 65, was retching from the thick black smoke as he tried to save his house by dousing it with water. Then his hose caught fire.

“I thought, ‘Time’s come,’” Stewart said.

But he and his buddy made it to Stewart’s car. The air conditioning helped filter the gunk they were breathing. It took them 90 minutes to drive the short distance to the fire station as they used a chainsaw to cut through a half dozen flaming trees that had fallen across the road.

Skye Threlfall and her sister also made it to the fire station. But inside, the howling winds buckled the roller doors off their supports.

“Embers were just flying through,” Threlfall said.

Residents leaned up against the doors, trying to keep the fire out. Marilyn Brennan poured water on the embers as they blasted through, then retreated to a back room with some of the others.

“Down on the ground, hugging each other, hoping like hell we’d get out,” she said.

Townsfolk credit the sprinkler system installed on the exterior of the fire station a few years back for saving them. Such sprinklers aren’t standard at rural fire stations, but the town had raised money for its own.

Residents are still coming to terms with what they have lost. Stewart, who moved here in 1985, had just finished restoring a caravan that has been reduced to ash. Then there are the thousands of comics his son had collected and that he was storing. What really irks him, he jokes, is the carton of Victoria Bitter beer he’d just bought and hadn’t taken a single drink from.

“This is everything we’ve worked for for the last 35 years, gone,” he said.

He doesn’t know whether he’ll return.

“My wife and I don’t want to leave here. But when you get older it’s a bit different, too. I’m not as fit as what I was when I was 35,” he said.

Brennan and her husband, Colin, said they’re planning to rebuild.

“I’ll be back,” Colin Brennan said. “This is home. This is where I live. This is me, here. I’ve got a life.”

Skye Threlfall said she hopes the community survives and rebuilds, but she knows that quite a few people won’t return.

“It’s just scary, because you don’t want to go through this again,” she said.

Graham said he plans to cut down some trees on his property to make it safe so he can set up his camp trailer. He keeps meaning to leave from the fire station yard, although he can’t quite bring himself to do it just yet. And he said that Nerrigundah is home.

“I’ll never move,” he said.

But then he considers it a bit more. A roofer by trade, Graham worked all sorts of jobs before spending six years caring for his wife before she died. He said maybe he could spend some time in Austria, where Melanie is buried, or maybe in Australia’s Snowy Mountains, where the air is cooler.

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-14T03:12:01Z

TAGAYTAY, Philippines (AP) — A volcano near the Philippine capital spewed lava into the sky and trembled constantly Tuesday, possibly portending a bigger and more dangerous eruption, as tens of thousands of people fled villages darkened and blanketed by heavy ash.

Government work was suspended and schools were closed in a number of towns and cities, including Manila, because of health risks from the ash. Hundreds of flights were canceled or delayed, affecting tens of thousands of passengers.

The continued restiveness of the Taal volcano and several new fissures in the ground nearby likely mean magma is rising and may lead to further eruptive activity, the Philippine Institute of Volcanology and Seismology said.

The volcano was spurting fountains of red-hot lava 800 meters (half a mile) into the sky, and the massive column of ash and volcanic debris at times lit up with streaks of lightning.

The alert level since the eruption began Sunday has been 4, indicating a hazardous eruption is possible in hours to days. Level 5, the highest, means such an eruption is underway.

About 50 volcanic earthquakes were detected over eight hours Tuesday, indicating rising magma, the institute said. It also warned that heavy and prolonged ash fall was possible in nearby villages.

“The speed in the rise of magma is important (in determining) when the volcano will have a strong eruption and if it will slow down and freeze,” said Renato Solidum, who heads the institute. “As of now, we don’t see activities slowing down and the earthquakes still continue.”

The picturesque volcano in the middle of a lake in Batangas province south of Manila rumbled to life Sunday in a powerful explosion that blasted a 15-kilometer (9-mile) column of ash, steam and rock into the sky. Clouds of volcanic ash blowing over Manila, 65 kilometers (40 miles) to the north, closed the country’s main airport Sunday and part of Monday until the ash fall eased.

More than 500 international and domestic flights were canceled or delayed due to the overnight airport closure, affecting about 80,000 passengers, airport manager Ed Monreal told The Associated Press.

“Hopefully the wind direction does not change. As long as the ash fall does not reach us, then we can be back to normalcy,” Monreal said.

The disaster-response agency counted more than 40,000 evacuees in Batangas and nearby Cavite provinces who took shelter in nearly 200 evacuation centers. Officials expected the number to swell.

Solidum warned residents from returning to high-risk villages based on perceptions that the eruption was easing. He warned of pyroclastic flows, super-heated material from the volcano that can travel at great speed and incinerate anything in their path.

Solidum said it would take time for Taal’s restiveness to ease and the lives of affected villagers to return to normal but added it’s difficult to predict the volcano’s behavior with certainty.

“We have to make sure that people understand and, of course, government, that this is not an activity that will just be a short while,” Solidum told a news conference.

President Rodrigo Duterte visited hard-hit Batangas, which has been declared a calamity zone for faster disbursement of emergency funds. Accompanied by top disaster-response officials and Cabinet members, he promised the national government would help with the cleanup and reconstruction of the devastated province once the eruption ends.

The government disaster-response agency has not provided details of damage but journalists saw dozens of houses ruined by heavy ash and frequent quakes in two Batangas areas.

At least six people have been taken to a hospital in Tagaytay city in Cavite due to respiratory ailments caused by the ash, Health Secretary Francisco Duque III said.

The eruption has not directly caused deaths or major damage. The death of a driver in a crash on an ash-covered road was linked to slippery conditions.

The small island where the 1,020-foot (311-meter) volcano lies has long been designated a “permanent danger zone,” though fishing villages have long existed there. Those villages were all evacuated, though volcanology officials have called for a total evacuation of endangered communities within a 14-kilometer (8.7-mile) radius of Taal.

Taal’s last disastrous eruption, in 1965, killed hundreds of people. It is the second-most restive of about two dozen active volcanoes in the Philippines, which lies along the Pacific “Ring of Fire,” where much of the world’s seismic activity occurs.

A long-dormant volcano, Mount Pinatubo, blew its top north of Manila in 1991 in one of the biggest volcanic eruptions of the 20th century, killing hundreds of people.

___

Gomez reported from Manila. Associated Press journalists Celine Rosario and Kiko Rosario in Manila and Aaron Favila in Tagaytay contributed to this report.

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-14T11:21:51Z

BRUSSELS (AP) — Britain, France and Germany ratcheted up pressure on Iran Tuesday to cease its violations of a landmark nuclear deal, stressing that they want to resolve differences through talks while starting the clock on a process that could result in a so-called “snapback” of United Nations sanctions.

The three countries, which signed the international agreement in 2015 along with the United States, Russia and China, said in a letter to the European Union’s foreign policy chief that they had no choice but to trigger the deal’s “dispute mechanism,” given Iran’s ongoing transgressions.

The three said they rejected Tehran’s argument that Iran was justified in violating the deal because the United States broke the agreement by pulling out unilaterally in 2018.

“We have therefore been left with no choice, given Iran’s actions, but to register today our concerns that Iran is not meeting its commitments,″ the countries said in a joint statement.

EU foreign policy chief Josep Borrell, who coordinates the agreement on behalf of the world powers, said the pressure on Iran from Europe does not mean international sanctions will automatically be slapped on the Islamic Republic.

The aim of the move by France, Germany and Britain is “to find solutions and return (Iran) to full compliance within the framework of this agreement. he said.

Hours later, Iran’s Foreign Ministry warned of a “serious and strong response” to the European move.

However, Foreign Ministry spokesman Abbas Mousavi said Iran was is “fully ready to answer any good will and constructive effort” that preserves the nuclear deal. He was quoted Tuesday by the official IRNA news agency.

The Europeans stressed that they want to “resolve the impasse through constructive diplomatic dialogue” and made no threat of sanctions in their statement.

They also specifically distanced themselves from sanctions imposed by the U.S., which Washington has said is part of a “maximum pressure” campaign against Tehran.

“Our three countries are not joining a campaign to implement maximum pressure against Iran,” they said. “Our hope is to bring Iran back into full compliance with its commitments.”

The 2015 nuclear deal, known as the Joint Comprehensive Plan of Action, or JCPOA, seeks to prevent Iran from producing a nuclear weapon — something Iran insists it does not want to do — by putting curbs on its atomic program in exchange for economic incentives.

Under its dispute resolution mechanism, countries have 30 days to resolve their problem, though that can be extended. If it cannot be solved, the matter could be brought before the U.N. Security Council and could then result in the snapback of sanctions that had been lifted under the deal.

U.S. President Donald Trump unilaterally pulled the U.S. out in May 2018, saying the pact was insufficient and should be re-negotiated because it didn’t address Iran’s ballistic missile program or its involvement in regional conflicts. Since then he has reinstated American sanctions, which have been having a devastating effect on Iran’s economy.

In response, Iran has rolled back its commitments in stages to try and pressure the other countries involved to provide economic incentives to offset the American sanctions, but efforts from them so far have been insufficient.

China and Russia had been against invoking the dispute mechanism, but German Foreign Minister Heiko Maas said in a statement that the three European countries “could no longer leave the growing Iranian violations of the nuclear agreement unanswered.”

“Our goal is clear: we want to preserve the accord and come to a diplomatic solution within the agreement,” Maas readded. “We will tackle this together with all partners in the agreement. We call on Iran to participate constructively in the negotiation process that is now beginning.”

Following the announcement, Russia’s ambassador to international organizations in Vienna, Mikhail Ulyanov, tweeted that he hoped the decision wouldn’t “complicate the situation further.”

After its top general was killed in a U.S. drone attack earlier this month, Iran announced what it said was its fifth and final step in violating the deal, saying it no longer will abide by any limitation to its enrichment activities. At the same time it again said all of its violations were reversible if it gets the economic relief it wants.

With the growing skepticism that the deal will be able to saved, British Prime Minister Boris Johnson on Tuesday suggesting that maybe the agreement could be somehow re-worked to address some of the concerns raised by Trump when he pulled the U.S. out.

“Let’s work together to replace the JCPOA with the Trump deal,” he told the BBC.

Borrell refused to comment on the suggestion, but again emphasized that the remaining signatories to the deal, which took years to negotiate, feel it is the best solution to limiting Iran’s nuclear ambitions.

“We have to preserve the nuclear deal and work to go back to full and effective implementation,” Borrell told reporters in Strasbourg, France. He described the pact as a “significant achievement” and underlined that “there is no alternative to this agreement.”

Britain’s Foreign Secretary Dominic Raab told Parliament that “the government in Iran has a choice.”

“The regime can take the steps to de-escalate tensions and adhere to the basic rules of international law. Or sink deeper and deeper into political and economic isolation,” he said. “We urge Iran to work with us to save the deal.”

___

Rising reported from Beirut. Danica Kirka in London, Frank Jordans and Geir Moulson in Berlin and Daria Litvinova in Moscow contributed.

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-13T16:20:32Z

NEW YORK (AP) — White evangelical support for President Donald Trump has sparked debate for years -- particularly this winter, with his impeachment trial looming. But for all the focus it commands, uncertainty continues to surround Trump’s bond with a religious constituency that has long leaned GOP.

Trump won a clear majority of white evangelical Protestant votes in 2016, and about 8 in 10 of that group approved of his job performance in an AP-NORC poll conducted last month. But those evangelicals’ alignment with the Republican Party predated Trump and has risen steadily since 2009, according to data from the nonpartisan Pew Research Center.

Given that Trump has not greatly outperformed his GOP predecessors with white evangelicals, why has his presidency drawn outsize attention to a relatively small religious bloc? It’s partly because conservative evangelical leaders have amassed notable influence in Trump’s administration. But another reason the relationship is scrutinized is that Trump’s political vulnerability could grow if more white evangelicals sour on him over perceived moral missteps.

“Their support for Trump just doesn’t match the story they’ve been telling about themselves since their evolution as a kind of active political group among conservatives,” said Robert Jones, CEO of the Public Religion Research Institute, an independent Washington-based nonprofit.

The prospect of white evangelicals defecting from Trump in greater numbers is an appealing one to his critics, including the Lincoln Project, an anti-Trump Republican group that last week tried to undercut his evangelical appeal in a video that asked whether he is “the best American Christians can do.” Democrats also have grounded some arguments against Trump in moral values as they court voters of faith, including evangelicals.

Mike Madrid, a California-based adviser to the Lincoln Project, said that white evangelicals have been the strongest element of Trump’s base but are starting to show signs of weakness.

“That’s literally the only voter segment that he is holding onto,” Madrid said. “We’re going right at it.”

But challenging Trump’s hold on white evangelicals who have proven stalwart conservatives since the Reagan era may require flawed assumptions about their decision-making.

Evangelicals are generally defined by several traits, including a “born again” connection to their faith, an emphasis on sharing the gospel through evangelism or other activity, a view of the Bible as an essentially authoritative text, and a belief in the centrality of Jesus Christ’s sacrifice through crucifixion. A majority of self-described white evangelicals have leaned GOP since Pew began its surveys in 1994, with about 6 in 10 identifying with or leaning toward the Republican Party starting with President Bill Clinton’s administration. That proportion grew from 63% in 2009 to 77% in 2017.

Some who have bolstered the twice-divorced, occasionally profane Trump’s credentials with white evangelicals warn against underestimating the current president’s connection with those born-again Christian voters.

Conservative strategist Ralph Reed, among Trump’s most prominent evangelical allies, said those who argue “erroneously and unconvincingly” that the president’s support from that bloc “somehow represents a contradiction and hypocrisy” are missing the keys to his appeal.

Evangelical voters look for a candidate who aligns with their approach to key policies, Reed said, noting that “Trump was solid on the issues and remains so.” Reed also singled out one quality that might appear to be a liability with religious voters -- Trump’s “counter-puncher” persona -- as valuable in a bitterly partisan political environment.

“Does he occasionally say or tweet something evangelicals prefer he would not? Yes, he does,” Reed said. “But in an overarching way, they believed many of the other people who ran against him weren’t tough enough to withstand what they were going to get from the media and the Democrats.”

Andrew Whitehead, an associate professor at Clemson University who studies Christian nationalism, said that Trump has achieved “a lot of” evangelical priorities, “no matter what he’s done personally or whether he fits in line with their religious beliefs. He’s privileged Christ in the public sphere and provided them access to those levers of power they’ve sought for decades.”

Among the most frequently touted areas where Trump has made progress on evangelicals’ goals are restricting funding for abortion access and installing new conservative judges on the federal bench.

Trump is already reminding his evangelical supporters of his record ahead of his reelection bid, an effort that took on new urgency following last month’s Christianity Today editorial calling for his removal. At this month’s launch of an “Evangelicals for Trump” coalition, the president cast himself as a peacemaker in “the federal government’s war on religion.”

What’s harder to gauge, though, is whether the same criticisms of Trump’s moral compass that have shown scant signs of fraying his popularity among self-described white evangelicals could bear fruit with other devout voters.

White evangelical Protestants account for just 16% of U.S. adults, according to Pew’s data. But as that group’s affinity for Trump propels more activism on the religious left -- and makes the evangelical label itself more politically polarizing -- some other voters of faith may be receptive to a case that Trump-era conservatives are not governing in accordance with Christian values.

“Are we evangelistic? Yes. Are we motivated by a political agenda that has come to define the word evangelical? No,” said Mark Wingfield, associate pastor at the Dallas-area Wilshire Baptist Church, which made news in November 2016 by voting to allow full membership by LGBTQ people.

“What we’re all casting about now is, what’s a new word for those of us who want to call people into a saved relationship with God but don’t want that to be associated with a political agenda,” Wingfield added.

Christianity Today’s president said the evangelical magazine saw a “significant net gain” in subscribers following its anti-Trump editorial, which focused on his impeachment by the House of Representatives last month.

The anti-Trump Lincoln Project also sees room for its new religion-focused digital ad to pick off more than just evangelical voters. Madrid, the group’s adviser, said that the ad’s messaging can also move college-educated white suburban women who helped Democrats take back the House in the 2018 midterm elections.

Pew’s study shows that while evangelicals continue to comprise a majority of white Protestants, their share of the nation’s total population has fallen amid lower affiliation with Christianity in general. Black evangelicals have typically leaned heavily toward the Democratic Party, while Latino evangelicals -- whom Trump’s team is courting ahead of the general election -- made up about one-quarter of the total Latino vote in 2018, according to AP’s VoteCast data, and have split between the parties.

—-

Associated Press writer Kathleen Ronayne contributed from Sacramento, Calif., and Associated Press writer Hannah Fingerhut contributed from Washington.

__

Associated Press religion coverage receives support from the Lilly Endowment through the Religion News Foundation. The AP is solely responsible for this content.

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-13T22:07:09Z

WASHINGTON (AP) — The Trump administration is dropping its designation of China as a currency manipulator in advance of the signing Wednesday of a Phase 1 U.S.-China trade agreement.

The preliminary pact that the two sides are set to sign includes a section that’s intended to prevent China from manipulating its currency to gain trade advantages.

The action announced Monday comes five months after the Trump administration had branded China a currency manipulator — the first time that any country had been so named since 1994 during the Clinton administration.

Even while removing China from its currency black list, the Treasury Department does name China as one of 10 countries it says require placement on a watch list that will mean their currency practices will be closely monitored. In addition to China, the countries on that monitoring list are Germany, Ireland, Italy, Japan, South Korea, Malaysia, Singapore, Switzerland and Vietnam.

Treasury Secretary Steven Mnuchin said the administration had dropped China’s designation as a currency manipulator because of commitments in the Phase 1 trade agreement that President Donald Trump is to sign with China on Wednesday at the White House.

“China has made enforceable commitments to refrain from competitive devaluation, while promoting transparency and accountability,” Mnuchin said in a statement accompanying the current report.

The Treasury Department is required to report to Congress twice a year in April and October on whether any countries are manipulating their currencies to gain unfair trade advantages against U.S. businesses and workers.

The new report is technically three months late, apparently because the Trump administration had delayed its release until it had achieved the currency Phase 1 commitments from China.

The initial decision to brand China as a manipulator had come in a surprise announcement in August which reversed a Treasury finding in May that no country was manipulating its currency. The United States had not put any country on the manipulation blacklist since the Clinton administration branded China a manipulator 26 years ago.

The designation is largely symbolic. It requires the United States to enter into negotiations to resolve the currency problem and could ultimately lead to the imposition of economic sanctions such as higher tariffs on Chinese goods, something the Trump administration was already doing in its tit-for-tat trade war with China.

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-13T19:22:57Z

HOUSTON (AP) — Astros manager AJ Hinch and general manager Jeff Luhnow were fired Monday after the pair were suspended by Major League Baseball for the team’s use of electronics for sign-stealing during Houston’s run to the 2017 World Series title and again in the 2018 season.

In U.S. sports’ largest scandal since the New England Patriots’ “Spygate,” Commissioner Rob Manfred announced the discipline Monday and strongly hinted that current Boston manager Alex Cora — the Astros bench coach in 2017 — will face equal or more severe punishment. Manfred said Cora developed the sign-stealing system used by the Astros. The Red Sox are under investigation for sign-stealing in Cora’s first season as manager in 2018, when Boston won the World Series.

Houston was fined $5 million, the maximum allowed under the Major League Constitution. The Astros will forfeit their next two first- and second-round amateur draft picks.

The investigation found that the Astros used the video feed from the center-field camera to see and decode the opposing catcher’s signs. Players banged on a trash can to signal to batters what was coming. Knowing what pitch is coming improves a batter’s odds of getting a hit.

Sign-stealing is a legal and time-honored part of baseball as long as it is done with the naked eye — say, by a baserunner standing on second. Using technology is prohibited.

Astros players disputed whether knowing the pitches seconds in advance helped batters. Houston had fewer wins at home than on the road, winning 94 home games and 110 on the road during the two seasons. There was no sign-stealing system on the road.

“While it is impossible to determine whether the conduct actually impacted the results on the field, the perception of some that it did causes significant harm to the game,” Manfred said.

Manfred, in his most significant action since becoming commissioner five years ago, said Hinch failed to stop the sign stealing and that Luhnow was responsible for the players’ conduct even though he made the dubious claim he was not aware. Manfred said owner Jim Crane was not informed.

An hour after MLB announced its decision, Crane opened a news conference by saying Hinch and Luhnow were fired.

“I have higher standards for the city and the franchise, and I’m going above and beyond, MLBs penalty,” he said. “We need to move forward with a clean slate.”

Houston was a big league-best 204-120 during the two years in question, winning its first title. Hinch, a 45-year-old former catcher with a degree from Stanford, was the most successful manager in the history of the Astros, who have won two of the last three AL pennants and came within one victory of another World Series title. Luhnow, 53, earned an MBA at Northwestern and fostered an analytic-based culture during eight seasons as Astros GM, but also a toxic one with high turnover.

“It is very clear to me that the culture of the baseball operations department, manifesting itself in the way its employees are treated, its relations with other clubs, and its relations with the media and external stakeholders, has been very problematic,” Manfred wrote in a nine-page statement. “At least in my view, the baseball operations department’s insular culture -- one that valued and rewarded results over other considerations, combined with a staff of individuals who often lacked direction or sufficient oversight, led ... finally, to an environment that allowed the conduct described in this report to have occurred.”

Crane, who hired Luhnow weeks after buying the Astros, denied a widespread problem, saying “I think there was some isolated situations.”

Hinch and Luhnow did not respond to phone messages and texts from The Associated Press.

Baseball’s response was far greater than that of the NFL to a similar infraction. New England coach Bill Belichick was fined $500,000 in 2007 and the Patriots were fined $250,000 for using video to capture an opponent’s signals. In the scandal known as Spygate, the Patriots also were stripped of a first-round draft choice. They were penalized again for $1 million eight years later for deflating footballs used in the AFC championship game. The NFL took away a first-round draft pick and suspended quarterback Tom Brady for four games.

Manfred said Hinch was aware of the system but did not tell Luhnow.

“As the person with responsibility for managing his players and coaches, there simply is no justification for Hinch’s failure to act,” Manfred said.

The GM told Major League Baseball he was unaware of the system, but Manfred held him accountable for the team’s actions.

“Although Luhnow denies having any awareness that his replay review room staff was decoding and transmitting signs, there is both documentary and testimonial evidence that indicates Luhnow had some knowledge of those efforts.”

Current New York Mets manager Carlos Beltrán, then a player with the Astros, was among the group involved. Manfred said no Astros players will be disciplined because he decided in September 2017 to hold a team’s manager and GM responsible.

“Virtually all of the Astros’ players had some involvement or knowledge of the scheme, and I am not in a position based on the investigative record to determine with any degree of certainty every player who should be held accountable.”

Baseball’s investigation began when former Astros pitcher Mike Fiers, now with Oakland, made the allegations in a report by The Athletic on Nov. 12.

Sign stealing has a long history in baseball — the New York Giants used a military field scope and buzzer during their 1951 tiebreaker playoff against the Brooklyn Dodgers. While decoding with the naked eye is allowed, MLB has enacted increasingly stringent prohibitions in recent years against the use of electronics to spy on opponents.

MLB’s Department of Investigations interviewed 27 witnesses, including 23 current and former Houston players, and reviews tens of thousands of emails, Slack communications, text messages, video clips and photographs.

Astros employees in the team’s video replay room started to decode signs using the center field camera at the start of the 2017 season. A player would act as a runner to bring the information to the dugout, where a runner on second would be signaled. The runner would decode the catcher’s sign and signal the batter. At times, an employee in the replay room would convey the information by text message to the watch or phone of a staff member in the dugout.

Cora began calling the replay room for the information early in the season. After a group of players that included Beltrán discussed how to improve the system about two months into the season, Cora arranged for a video monitor of the center field camera to be installed next to the dugout and players would communicate pitches by banging a bat or massage gun on a trash can. Two bangs usually were used for off-speed pitches and no sound for fastballs.

Manfred said the banging system was not used in 2018 but that signs were stolen by the replay room and communicated to the dugout during at least part of that season. There was no evidence signs were stolen during the 2018 playoffs.

The Mets and Beltrán declined to comment, spokesman Harold Kaufman said.

Also Monday, former Astros assistant GM Brandon Taubman was suspended through the World Series for his conduct during last year’s AL Championship Series, when his profane remarks directed at female reporters led to his firing by Houston, which at first denied the incident and later apologized.

Taubman can apply to Manfred for reinstatement after the World Series, and any future violations of Major League Rules would lead to a lifetime ban.

___

Blum reported from New York.

___

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-13T18:10:58Z

DALLAS (AP) — A subtle design feature of the AR-15 rifle has raised a technical legal question that is derailing cases against people who are charged with illegally buying and selling the gun’s parts or building the weapon.

At issue is whether a key piece of one of America’s most popular firearms meets the definition of a gun that prosecutors have long relied on.

For decades, the federal government has treated a mechanism called the lower receiver as the essential piece of the semiautomatic rifle, which has been used in some of the nation’s deadliest mass shootings. Prosecutors regularly bring charges based on that specific part.

But some defense attorneys have recently argued that the part alone does not meet the definition in the law. Federal law enforcement officials, who have long been concerned about the discrepancy, are increasingly worried that it could hinder some criminal prosecutions and undermine firearms regulations nationwide.

“Now the cat is out of the bag, so I think you’ll see more of this going on,” said Stephen Halbrook, an attorney who has written books on gun law and history. “Basically, the government has gotten away with this for a long time.”

Cases involving lower receivers represent a small fraction of the thousands of federal gun charges filed each year. But the loophole has allowed some people accused of illegally selling or possessing the parts, including convicted felons, to escape prosecution. The issue also complicates efforts to address so-called ghost guns, which are largely untraceable because they are assembled from parts.

Since 2016, at least five defendants have challenged the government and succeeded in getting some charges dropped, avoiding prison or seeing their cases dismissed entirely. Three judges have rejected the government’s interpretation of the law, despite dire warnings from prosecutors.

Federal regulations define a firearm’s “frame” or “receiver” as the piece considered to be the gun itself. But in an AR-15, the receiver is split into upper and lower parts — and some of the components listed in the definition are contained in the upper half. That has led judges to rule that a lower receiver alone cannot be considered a gun.

The lower receiver sits above the pistol grip, holds the trigger and hammer, and has a slot for the magazine. By itself, it cannot fire a bullet. But by treating the piece as a firearm, the Bureau of Alcohol, Tobacco, Firearms and Explosives is able to regulate who can obtain it. Because authorities consider the part to be a gun, people prohibited from having firearms have been charged for possessing them.

In 2018, prosecutors said a ruling against the government would “seriously undermine the ATF’s ability to trace and regulate firearms nationwide.” CNN first reported the case and its implications.

Last month, a federal judge in Ohio dealt the latest blow, dismissing charges against two men accused of making false statements to buy lower receivers.

“Any public citizen would be concerned about this loophole that we exploited,” said attorney Thomas Kurt, who represented defendant Richard Rowold. “As a citizen, I hope the ATF corrects this. As Mr. Rowold’s attorney, I’m grateful the judge followed the law in getting to the correct result.”

The gun industry estimates there are more than 17 million AR-15-style rifles in circulation, and the National Rifle Association once dubbed it “America’s rifle.” AR-15-style weapons were used in attacks in Newtown, Connecticut, Las Vegas and Parkland, Florida.

In the case of Rowold, who is prohibited from buying or possessing firearms because of felony convictions, the government claimed that he used another man as a proxy to purchase 50 lower receivers. The 2018 indictment also charged him with having 15 lower receivers. Kurt declined to comment on why his client had the parts.

The case rested on the ATF’s claim that the components were legally firearms. Judge James Carr called that a “plainly erroneous” reading of the law and said the agency has a duty to fix the problem.

“Misapplying the law for a long time provides no immunity from scrutiny,” Carr wrote in his order to dismiss.

Federal prosecutors in Rowold’s case and several others declined to comment. An ATF spokeswoman would not answer questions posed by The Associated Press but said the agency is “keenly assessing” Carr’s decision.

The problem has attracted attention at the highest levels of law enforcement.

In 2016, then-Attorney General Loretta Lynch wrote a letter to House Speaker Paul Ryan after a judge dismissed a case in Northern California involving a man with a felony record who was accused of buying an unmarked AR-15 lower receiver from an undercover agent.

Prosecutors argued that the case against Alejandro Jimenez should proceed even if the part “does not perfectly fit” the legal definition. The judge dismissed the charges.

The decision prompted Lynch to write that if the ATF wants an AR-15 lower receiver to be considered a firearm under the law, then it should pursue “regulatory or administrative action.” But there’s no public record of the ATF taking such a step.

“I can’t imagine why no one has taken the initiative to correct this,” said Dan O’Kelly, a former senior ATF agent and director of a gun-training company known as International Firearm Specialist Academy. His testimony has guided several defense attorneys.

Since Lynch’s letter, such prosecutions have continued to secure prison sentences.

In April, for instance, an Oklahoma man was charged with illegally possessing a firearm after police who pulled him over found loaded high-capacity magazines and the lower receiver of an AR-15-style rifle in his truck.

Jason Scott Pedro, a 37-year-old with a felony record for domestic violence, was sentenced in November to seven years in prison.

There’s no evidence in court records that Pedro’s lawyer challenged whether the lower receiver was rightly considered a gun. The attorney did not respond to requests for comment but has filed a notice of appeal.

“I think the criminal defense bar has kind of let their clients down for letting this go on for all these years,” Halbrook said.

In one case, an ATF expert testified that the same principle could apply to many other firearms. Prosecutors worry that more rulings against the government could allow people prohibited from having guns to purchase weapons piece by piece with no regulation or background check.

Franklin Zimring, a professor at the University of California, Berkeley School of Law, is skeptical of that claim and said the same behavior could often be prosecuted under state laws.

The AR-15 is a popular model for gun enthusiasts to legally build at home. The rifles are sometimes constructed out of partially machined receivers, often called “80% receivers,” which can be bought and sold without background checks and need not have serial numbers because they are unfinished.

If federal officials want to maintain control in this growing do-it-yourself gun market they need to first establish functional regulation of lower receivers, said Kristen Rand, legislative director at the Washington, D.C.-based Violence Policy Center.

“From a public safety standpoint,” she said, ”this is very important and isn’t just an in-the-weeds legal definitional problem.”

___

Dazio reported from Los Angeles. Associated Press Writer Lisa Marie Pane in Boise, Idaho, and researcher Jennifer Farrar in New York City contributed to this report.

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-13T18:32:19Z

DES MOINES, Iowa (AP) — Democrat Cory Booker dropped out of the presidential race Monday, ending a campaign whose message of unity and love failed to resonate in a political era marked by chaos and anxiety.

His departure now leaves a field that was once the most diverse in history with just one remaining African American candidate, former Massachusetts Gov. Deval Patrick, who is struggling to register in the polls amid a late entry into the race.

Since launching his campaign last February, Booker, a U.S. senator from New Jersey, struggled to raise the type of money required to support a White House bid. He was at the back of the pack in most surveys and failed to meet the polling requirements needed to participate in Tuesday’s debate. Booker also missed last month’s debate and exits the race polling in low single digits in the early primary states and nationwide.

In an email to supporters, Booker said that he “got into this race to win” and that his failure to make the debates prevented him from raising raise the money required for victory.

“Our campaign has reached the point where we need more money to scale up and continue building a campaign that can win -- money we don’t have, and money that is harder to raise because I won’t be on the next debate stage and because the urgent business of impeachment will rightly be keeping me in Washington,” he said.

For African Americans, Booker’s exit is more meaningful than just being one less option to consider.

“It means that we don’t count,” said Helen Moore, a member of the Detroit-based Keep the Vote-No Takeover grassroots organization. “Now, we can’t look forward to any black candidate being considered from now until it’s time to vote. They are completely out of the picture.”

Booker had warned that the looming impeachment trial of President Donald Trump would deal a “big, big blow” to his campaign by pulling him away from Iowa in the final weeks before the Feb. 3 Iowa caucuses. He hinted at the challenges facing his campaign last week in an interview on The Associated Press’ “Ground Game” podcast.

“If we can’t raise more money in this final stretch, we won’t be able to do the things that other campaigns with more money can do to show presence,” he said.

In his email to supporters, Booker pledged to do “everything in my power to elect the eventual Democratic nominee for president,” though his campaign says he has no immediate plans to endorse a candidate in the primary.

It’s a humbling finish for someone who was once lauded by Oprah Winfrey as the “rock star mayor” who helped lead the renewal of Newark, New Jersey. During his seven years in City Hall, Booker was known for his headline-grabbing feats of local do-goodery, including running into a burning building to save a woman, and his early fluency with social media, which brought him 1.4 million followers on Twitter when the platform was little used in politics. His rhetorical skills and Ivy League background often brought comparisons to President Barack Obama, and he’d been discussed as a potential presidential contender since his arrival in the Senate in 2013.

Now, Massachusetts Sen. Elizabeth Warren has mastered the art of the selfie on social media. Another former mayor, Pete Buttigieg of South Bend, Indiana, is seen as the freshest face in the field. Former Vice President Joe Biden has built a strong base of support with black voters. And Booker’s message of hope and love seemed to fall flat during an era characterized perhaps most strongly by Democratic fury over the actions of the Trump administration.

An early focus on building out a strong and seasoned campaign operation in Iowa and South Carolina may have hampered his campaign in the long run, as the resources he spent early on staff there left him working with a tight budget in the later stages of the primary, when many of his opponents were going on air with television ads. That meant that even later in the campaign, after he had collected some of the top endorsements in Iowa and visited South Carolina almost more than any other candidate, a significant portion of the electorate in both states either said they were unfamiliar with his campaign or viewed him unfavorably.

On the stump, Booker emphasized his Midwestern connections — often referencing the nearly 80 family members he has still living in Iowa when he campaigned there — and delivered an exhortation to voters to use “radical love” to overcome what he considered Trump’s hate. But he rarely drew a contrast with his opponents on the trail, even when asked directly, and even some of Booker’s supporters worried his message on Trump wasn’t sharp enough to go up against a Republican president known for dragging his opponents into the mud.

Booker struggled to land on a message that would resonate with voters. He’s long been seen as a progressive Democrat in the Senate, pushing for criminal justice reform and marijuana legalization. And on the campaign trail, he proposed establishing a $1,000 savings account for every child born in the U.S. to help close the racial wealth gap.

He was among the first candidates to release a gun control plan, and at the time it was the most ambitious in the field, as it included a gun licensing program that would have been seen as political suicide just a decade before. He also released an early criminal justice reform plan that focused heavily on addressing sentencing disparities for drug crimes.

But he also sought to frame himself as an uplifting, unifying figure who emphasized his bipartisan work record. That didn’t land in a Democratic primary that has often rewarded candidates who promised voters they were tough-minded fighters who could take on Trump.

Booker’s seat is up for a vote this year, and he will run for reelection to the Senate. A handful of candidates has launched campaigns for the seat, but Booker is expected to have an easy path to reelection.

Booker’s exit from the presidential race further narrows the once two dozen-strong field, which now stands at 12 candidates.

___

Associated Press writer Corey Williams in Detroit contributed to this report.

___

Catch up on the 2020 election campaign with AP experts on our weekly politics podcast, “Ground Game.”

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-13T05:16:15Z

WASHINGTON (AP) — The U.S. sent home 21 Saudi military students following an investigation into a deadly shooting last month by one of their fellow trainees at the Pensacola Naval Air Station, an attack that Attorney General William Barr said was an act of terrorism driven by some of the same motivations of the Sept. 11 plot.

The trainees who were removed had jihadist or anti-American sentiments on social media pages or had “contact with child pornography,” including in internet chat rooms, officials said. None is accused of having had advance knowledge of the shooting or helped the 21-year-old gunman carry it out.

The Justice Department reviewed whether any of the trainees should face charges, but concluded that the conduct did not meet the standards for federal prosecution, Barr said.

The Dec. 6 shooting at the base in Pensacola in which Saudi Air Force officer Mohammed Alshamrani killed three U.S. sailors and injured eight other people focused public attention on the presence of foreign students in American military training programs and exposed shortcomings in the screening of cadets. Monday’s resolution singled out misconduct by individual students but also allows for continued training of pilots from Saudi Arabia, an important ally in the Middle East.

“The Kingdom of Saudi Arabia gave complete and total support for our counter-terrorism investigation, and ordered all Saudi trainees to fully cooperate,” Barr said. “This assistance was critical to helping the FBI determine whether anyone assisted the shooter in the attack.”

Barr said the kingdom has agreed to review the conduct of all 21 to see if they should face military discipline and to send back anyone the U.S. later determines should face charges.

Separately, the attorney general on Monday asked Apple to help extract data from two iPhones that belonged to the gunman, including one that authorities say Alshamrani damaged with a bullet after being confronted by law enforcement.

Law enforcement officials left no doubt that Alshamrani was motivated by jihadist ideology, saying he visited a New York City memorial to the attacks of Sept. 11, 2001, over the Thanksgiving holiday weekend and posted anti-American and anti-Israeli messages on social media just two hours before the shooting. Last Sept. 11, Barr said, Alshamrani posted a message that said “the countdown has started.”

Officials had earlier said that Alshamrani hosted a party before the shooting, where he and others watched videos of mass shootings. Alshamrani, who also traveled back and forth between Saudi Arabia and the U.S., was undergoing flight training at Pensacola, where foreign military members routinely receive instruction.

On the morning of Dec. 6, the gunman walked into a building on the grounds of the Navy base and shot his victims “in cold blood” as Marines who heard the gunfire from outside yanked a fire extinguisher off the wall and rushed to confront him. He was ultimately killed by a sheriff’s deputy during the rampage.

The gunman shot at a photo of President Donald Trump and another former U.S. president and witnesses reported he was making statements “critical of American military actions overseas” during the attack, FBI Deputy Director David Bowdich said.

The December shooting raised questions about how well international military students are screened before they attend training at American bases. Some lawmakers, including a top Republican ally of Trump, have called for Saudi Arabia to be suspended from the American military training program.

Trump called for the program to be reviewed. But Sen. Lindsey Graham, R-S.C., said the program needed to be reevaluated after the attack.

National security adviser Robert O’Brien said Sunday in an interview on Fox News that the shooting “showed that there had been errors in the way that we vetted” the students. The actions being taken by the Justice Department and Defense Department to remove the Saudi students are to “protect our service men and women,” he said.

The Pentagon has done a broad review of the vetting process for international students, and officials have said they are likely to increase the Defense Department’s role in the screening.

Navy Capt. Brook DeWalt, a Pentagon spokesman, said Monday that Defense Secretary Mark Esper has the results of the vetting review and the department will release appropriate information in the near future.

Twelve of the trainees who were removed were assigned to the base in Pensacola and nine others were assigned to Air Force bases in the U.S., including in Mississippi, Texas and Oklahoma, a senior Justice Department official said. The trainees were all removed from the U.S. on a Saudi government aircraft on Monday, the official said.

Of the 21 sent home, 17 had social media containing jihadi or anti-American content. Fifteen had some kind of contact with child pornography. One of the trainees had possessed over 100 images of child pornography and had searched for the material but the U.S. attorney’s office determined there wasn’t enough evidence to warrant federal prosecution.

In a statement, the Saudi embassy called the shooter a “disturbed and radicalized” individual who acted alone and who does not represent the values of Saudi Arabia or the hundreds of thousands of Saudis who have lived and studied in the U.S. over the decades. It said it had cooperated with the investigation and would continue to do so.

“It is worth noting that the military training that the US provides to Saudi military personnel has enabled Saudi soldiers, pilots and sailors to fight along their American counterparts and against our common foes,” the statement said.

Investigators, meanwhile, have been trying to access two of Alshamrami’s devices — an iPhone 7 and an iPhone 5 — but have been unable to access them because the phones are locked and encrypted, according to a letter from the FBI’s general counsel, Dana Boente. The FBI has received a court authorization to search the phones and the devices have been sent to the bureau’s lab in Quantico, Virginia, he said.

The investigation is considered a “high-priority national security matter,” Boente said in the letter.

FBI officials have sought help from other federal agencies and other experts, and investigators have been trying to guess the passwords, but those efforts have been unsuccessful, according to the letter.

Apple said in a statement Monday that it rejected any characterization it had not provided substantive assistance in the investigation. It said it has “produced a wide variety of information” as part of the probe, including iCloud backups, account information and other data about transactions.

While Apple and the FBI have been in discussions over the last week, Apple has not yet told the Justice Department whether the company has the capability of accessing the phones, another senior Justice Department official said. The official spoke on condition of anonymity to discuss an ongoing investigation.

Apple said it only learned last week that the gunman had a second iPhone and that the FBI had been unable to access the devices. The company said its engineers had a call with the FBI to “provide additional technical assistance” and it would continue to cooperate with investigators.

___

This story corrects an earlier version to reflect that authorities now say that Alshamrani shot the phone himself.



2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-13T22:16:55Z

Actress Issa Rae was ready with her quip, as if she had predicted the Oscar nominations that were announced Monday. “Congratulations to those men,” she said dryly, as the best director nominees — yes, five men — were announced.

Rae’s expertly thrown shade echoed through social media as observers took stock of what was, yet again, a pretty bad day for diversity and inclusion in Hollywood. Not only were there no female nominees in directing for the 87th time in Oscar history — a direct snub to Greta Gerwig, director of the acclaimed “Little Women,” as well as several other worthy candidates. There was also only one person of color, Cynthia Erivo, among the 20 acting nominees.

Those slights overshadowed the happier news that across all categories, a record 62 women (about a third of nominees) were nominated.

They also had people asking: Why is this happening again, when diversity has been on the front burner for years now, and the Academy has taken steps to overhaul its overwhelmingly white, male membership? And what will it take to accomplish real change?

“So here we are again,” said Stacy L. Smith, director of the USC Annenberg Inclusion Initiative at the University of Southern California, of the nominations. She said the results were particularly frustrating because 2019 was a breakout year for female directors.

“They were out in strong numbers. This was the year of the highest percentage of female directors that we’ve seen,” she said. “And yet they’re not allowed to be lauded by these cultural institutions for their directing prowess.”

There’s a “complete disconnect,” Smith added, “between objective criteria of merit and what we are seeing in the nominations for directing at the Academy Awards.”

In terms of race and ethnicity, there was disappointment that only Erivo’s nomination for “Harriet” prevented an entirely white slate in all four categories — a scenario that first happened in 2015, resulting in the #OscarsSoWhite hashtag, and again in 2016.

The Academy sought thereafter to diversity its ranks. Since 2015, the group’s overall female membership has grown from 25% to 32%, and overall membership of people of color has doubled, from 8% to 16%.

Erivo, a double nominee for both best actress and best original song, said in an interview from Japan that she hoped this year would be a “stepping stone to opening the doors” to honoring the work of a more diverse group of artists. She paid special tribute to “so much good work specifically by women” like Gerwig and other female directors who were overlooked.

Gil Robertson, president of the African American Film Critics Association, said he wished the acting nominations had been more diverse, but he felt hopeful they were more of a blip than a slide backwards. “I think we’re making strides in the right direction,” he said.

Among the most glaring snubs was that of Jennifer Lopez, who had been seen as a virtual shoo-in for a supporting actress nod for playing a stripper in “Hustlers.” In the lead actress category, Awkwafina, who a week ago won a Golden Globe, was denied a nod for her role in “The Farewell.” She would have become just the second Asian American nominated for best actress (the first, 1936 nominee Merle Oberon, hid her South Asian heritage).

The omission was a reflection of the difficulty Asian Americans in Hollywood have long had in cracking the acting categories in particular.

“It’s been a long, slow battle,” said Chris Tashima, an actor-director and a member of the Academy Asians Action Committee, an informal group of Asian and Pacific Islander members of the Academy. “We’ve been very much absent. We’ve been trying to create opportunities for years. But you can’t even get nominated if you don’t get the roles.”

Tashima added, though, that progress is happening, albeit slowly — with television leading the way in terms of new opportunities. “It’s night and day from five years ago,” he said.

Smith said that for women directors, the key problem is an outmoded view that some Academy members have of what a leader is — a very masculine view.

“What needs to change is that stereotypical view of WHO can lead,” Smith said. “And until that changes, this is going to keep happening.”

She added: “Research globally suggests that when people think ‘manager,’ they think male. We found the exact same thing with directors. ... The research is very clear. Women aren’t being considered for top leadership positions, and when they are, they are often criticized more sharply. We’re seeing that playing out right now in the awards process.”

At Time’s Up, the Hollywood-based organization devoted to fighting sexual harassment and sexual assault, Chief Operating Officer Rebecca Goldman pledged to work for change.

“This is why TIME’S UP exists — to ensure women in entertainment and across industries get the opportunities and recognition they deserve,” she said. “And we won’t stop fighting until they do.”

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-14T00:40:31Z

SAN DIEGO (AP) — A U.S. judge ruled Monday that the Trump administration is operating within its authority when separating families stopped at the Mexico border, rejecting arguments that it was quietly returning to widespread practices that drew international condemnation.

The American Civil Liberties Union argued that the administration was splitting families over dubious allegations and minor transgressions including traffic offenses.

It asked the judge in July to rule on whether the government was justified in separating 911 children during the first year after the judge halted the general practice in June 2018.

U.S. District Judge Dana Sabraw indicated he was uncomfortable second-guessing government decisions to separate children on grounds that parents were considered unfit or dangerous, or in other limited circumstances like criminal history, communicable diseases and doubts about parentage. He found no evidence that the government was abusing its discretion.

“It is an invitation that is potentially massive in scope, invades an area that is particularly within the province of the executive branch to secure the nation’s border, and goes beyond this court’s class certification and preliminary injunction orders, which were focused on the administration’s practice of separating families at the border for the purpose of deterring immigration, and failing to reunify those families,” Sabraw wrote in a 26-page decision.

In a partial victory for the ACLU, the judge said the government must settle any doubts about parentage before separating families by using DNA tests that deliver results in about 90 minutes.

The ruling was a rare instance of the San Diego judge siding with the administration. In June 2018, he halted the practice of separating families under a “zero tolerance” policy to deter illegal immigration and ordered that about 2,800 children be quickly reunited with family. Lack of adequate tracking systems at the time made reunification a monumental task.

The judge later ordered the administration to identify more than 1,500 additional children who were separated earlier in Trump’s presidency, starting in July 2017. The government is providing information to the ACLU, which, in some cases, has volunteers going door to door in Guatemala.

The ACLU said it was considering its next move.

“The court strongly reaffirmed that the Trump administration bears the burden if it attempts to separate families based on an accusation that the adult is not the child’s parent,” said ACLU attorney Lee Gelernt. “We are evaluating the decision to determine next steps on how to ensure that children are not separated from their parents based on minor infractions.”

The Justice Department didn’t immediately respond to a request for comment.

The judge noted that the administration acknowledged it erred by separating a mother who needed emergency surgery and a father who was HIV-positive. He rejected the ACLU’s contention that some accusations of gang affiliation were unfounded, saying that the government relies on “objective evidence, not allegations or intuition.”

Days before the judge halted the widespread practice of separating families in 2018, Trump retreated under extraordinary criticism by exempting families from his “zero tolerance” policy to criminally prosecute every adult who crosses the border illegally.



2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-14T01:37:11Z

WASHINGTON (AP) — Elizabeth Warren said Monday that fellow Democratic presidential candidate Bernie Sanders told her he didn’t think a woman could win the White House when they met privately in 2018.

Sanders has denied telling Warren that a woman couldn’t win. But the Massachusetts senator said in a statement that during their two-hour meeting to discuss the 2020 election, “among the topics that came up was what would happen if Democrats nominated a female candidate. I thought a woman could win; he disagreed.”

The dispute marked an extraordinary turning point in a Democratic primary that, with few exceptions, has been characterized by genial differences over domestic issues such as health care. The feud brewing between Warren and Sanders will likely change the tone of the campaign going into Tuesday’s debate and comes less than three weeks before the Iowa caucuses launch the Democratic contest. It also marks a jarring split between the two longtime progressive allies, potentially giving an opening for a more moderate rivals such as former Vice President Joe Biden to attempt unifying the party.

In her statement, Warren said she and Sanders “have far more in common than our differences on punditry.”

“I’m in this race to talk about what’s broken in this country and how to fix it -- and that’s what I’m going to continue to do,” she said. “I know Bernie is in the race for the same reason. We have been friends and allies in this fight for a long time, and I have no doubt we will continue to work together to defeat Donald Trump and put our government on the side of the people.”

CNN first reported Sanders’ comment earlier Monday, based on the accounts of anonymous people with knowledge of the meeting. That drew a swift and strong denial from Sanders, a Vermont senator, who said, “It is ludicrous to believe that at the same meeting where Elizabeth Warren told me she was going to run for president, I would tell her that a woman couldn’t win.”

Sanders aides then accused Warren’s campaign of leaking what they said was an inaccurate description of what was said during the meeting.

That helped prompt Warren’s statement hours later. Jeff Weaver, a senior adviser to Sanders, then seemed to try and defuse the situation, refusing to refute Warren’s version and instead saying only on CNN on Monday night that “those conversations can sometimes get misconstrued.”

Still, the controversy is likely to revive anxiety among Democrats about whether — nearly four years after Hillary Clinton lost her White House bid — voters are willing to support another woman running for president. Such questions have dogged Warren and other female candidates throughout the 2020 campaign.

Hawaii Rep. Tulsi Gabbard tweeted Monday night that she had also met with Sanders before announcing her presidential campaign. “In that meeting, he showed me the greatest respect and encouragement, just as he always has,” Gabbard wrote.

The clash between Sanders and Warren comes on the eve of a Democratic presidential debate in Iowa, the last before that state kicks off the Democratic primary with its leadoff caucuses on Feb. 3. Warren and Sanders, both of whom support universal health care, tuition-free public college and raising the minimum wage, have for months competed for their party’s most liberal wing while refraining from attacking each other.

But following a Politico story over the weekend that reported the Sanders campaign had instructed some volunteers to characterize Warren as a candidate for wealthy and well-educated voters in conversations with undecided voters, Warren issued a rare critique of her opponent. She said she was “disappointed” Sanders was instructing staffers to “trash” her.

That set the stage for Monday’s hours of additional squabbling -- and may well spell a lively debate Tuesday.

Stephanie Taylor and Adam Green, co-founders of the Progressive Change Campaign Committee, which has at times praised both Warren and Sanders, released its own statement Monday night saying they “believe that a back-and-forth about this private meeting is counter-productive for progressives.”

“In this pivotal moment of the campaign, progressives must work together to defeat Donald Trump,” Taylor and Green said.

___

Catch up on the 2020 election campaign with AP experts on our weekly politics podcast, “Ground Game.”

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-13T19:05:11Z

NEW ORLEANS (AP) — The latest from the College Football Playoff championship game between No. 1 LSU and No. 3 Clemson in New Orleans (all times local):

10:45 p.m.

No. 1 LSU has extended its lead to 42-25 over No. 3 Clemson early the fourth quarter in the College Football Playoff championship game.

LSU had already scored more points against Clemson than any other team this season before Burrow hit Terrace Marshall Jr. with a 24-yard TD pass.

Burrow is 29 of 45 passing for 442 yards and four touchdowns, giving him an NCAA record 60 in a season. Burrow also is LSU’s leading rusher with 60 yards and a TD on 13 rushes.

Chase has nine catches for 221 yards and two TDs, while Thaddeus Moss also has two TD catches.

Trevor Lawrence entered the fourth quarter 16 of 32 for 201 yards and no touchdowns, but rushed for the opening score of the game.

___

10:20 p.m.

Joe Burrow’s magical season continues as the Heisman Trophy winner has set an NCAA record in the College Football Playoff championship game.

The quarterback’s 4-yard touchdown pass to Thaddeus Moss has given No. 1 LSU a 35-25 lead over No. 3 Clemson in the third quarter of the national championship game.

The throw also gave Burrow an NCAA single-season record 59 TD passes. It was also the second touchdown catch of the game for Moss, the son of Hall-of-Fame NFL receiver Randy Moss.

Moss’ first TD came at the end of the first half from 6 yards out.

LSU’s latest score was set up Ja’Marr Chase’s 43-yard gain on a catch-and-run on third-and 11. That gave Chase, who also has two touchdowns, 218 yards receiving on eight catches.

Shortly after, Clemson’s leading tackler James Skalski, was ejected for targeting after his hit on LSU receiver Justin Jefferson. The linebacker’s personal foul set up LSU on the Clemson 4.

Clemson had cut LSU’s 11-point halftime lead to 28-25 earlier in the quarter on Louisiana native Travis Etienne’s 3-yard run, followed by Trevor Lawrence’s pass to Amari Rodgers

___

9:25 p.m.

The College Football Playoff championship hasn’t disappointed after a long layoff.

Joe Burrow’s 6-yard touchdown pass to Thaddeus Moss, set up by the quarterback’s 29-yard, third down scramble, has given No. 1 LSU a 28-17 lead over No. 3 Clemson at halftime of Monday night’s title game.

After a slow start that saw LSU fail to cross its own 11 on its first two series, Burrow and Co. found their rhythm. LSU finished the second quarter with three unanswered touchdowns to erase a 10-point deficit that was its largest this season.

The Heisman Trophy winner is 16 of 28 for 270 yards with three TDs to go with 55 yards and a touchdown on eight rushes. Burrow enters the second half tied with ex-Hawaii QB Colt Brennan for the NCAA single-season record for TD passes in a season with 58.

Burrrow’s top target has been New Orleans native Ja’Marr Chase, who has six catches for 162 yards and two touchdowns. Two of his catches have gone for more than 50 yards.

Clemson scored first on Trevor Lawrence’s short TD run and went up 17-7 on receiver Tee Higgins’ 36-yard run on a reverse in second quarter.

LSU, which won the toss and elected to kick off, will receive the kickoff to start the second half.

___

8:45 p.m.

The national championship game is turning into the shootout many expected between No. 1 LSU and No. 3 Clemson.

After Clemson scored 10 straight points on B.T. Potter’s 52-yard field goal and Tee Higgins 36-yard touchdown run, LSU answered on Joe Burrow’s 3-yard scoring run to cut the lead to 17-14 in the second quarter.

The 17 points put up by both teams were scored in less than five minutes.

Potter’s field goal was his career best. Higgins took the handoff, faked a reverse and rolled through several LSU defenders near the goal line to finish in the end zone.

The 10-point deficit was the largest LSU had faced all season.

8:05 p.m.

Joe Burrow’s 52-yard pass to Ja’Marr Chase has tied the national championship game at 7-7.

Clemson’s defense didn’t allow No. 1 LSU to cross its own 11 on its first two possessions and LSU still hadn’t crossed midfield when it took possession for the fourth time in the game late in the first quarter.

With the help of a couple of tough runs by Clyde Edwards-Helaire, LSU finally found its rhythm.

Still, this national title performance so far stands in stark contrast to the semifinal against Oklahoma in the Peach Bowl, when Burrow passed for seven TDs in the first half.

___

7:50 p.m.

Clemson is on the scoreboard first — although it took longer than may have been expected.

The third-ranked Tigers scored on a 1-yard touchdown run by Trevor Lawrence to take a 7-0 lead on No. 1 LSU with 6:34 left in the first quarter.

It is LSU’s first time trailing in 25 quarters.

The game was billed as a high-scoring, back-and-forth affair. But the teams each punted twice on the their opening two possessions.

LSU’s potent offense has only six yards after its first two series.

___

7:20 p.m.

Thunderous applause and chants of “Four More Years” welcomed President Donald Trump and first lady Melania Trump as they took the field at the New Orleans Superdome before college football’s championship game between LSU and Clemson.

The crowd also broke into chants of “USA, USA.”

The president and first lady walked onto the field Monday night for the singing of the national anthem.

Trump won a nearly 20-point victory in Louisiana in the 2016 presidential election.

LSU then won the coin toss and kicked off to Clemson, which was forced to punt on its first possession.

___

6:55 p.m.

President Donald Trump has arrived at the New Orleans Superdome to watch No. 1 LSU and No. 3 Clemson battle square off in the College Football Playoff championship game.

Trump arrived at the domed stadium shortly before the game’s scheduled kickoff. He was accompanied by his wife, first lady Melania Trump and South Carolina U.S. senators Lindsey Graham and Tim Scott. Graham and Scott are Republican, like the president.

Trump predicted that it will be a “great game” as he departed the White House.

Trump is familiar with LSU. He took attended a November game in Tuscaloosa, Alabama, when the Tigers beat the Crimson Tide.

The president hosted many of Clemson’s players and coaches at the White House in January 2019 after the team won the 2018 national championship.

___

2:45 p.m.

The College Football Playoff has extended the contract of executive director Bill Hancock.

The 11 university presidents and chancellors that make up the Board of Managers unanimously approve the extension Monday, a few hours before the national championship game in New Orleans between Clemson and LSU.

Terms were not disclosed. Hancock’s current three-year deal was set to expire in June.

Hancock has been executive director of the playoff since its start in 2014 and helped craft the current postseason system through the transition from the Bowl Championship Series.

“It’s a rolling agreement, so I intend to be here as long as they’ll have me and as long as I want to,” Hancock said. “I’m having a blast. I’m honored and delighted to get to do what I do.”

Hancock was the first executive director of the BCS, appointed in 2009 after working as an administrator for the FBS conference commissioners who manage the postseason.

___

1 p.m.

Top-ranked LSU faces No. 3 Clemson for the college football national championship Monday night at the Superdome in New Orleans.

Both sets of Tigers are 14-0, seeking to cap a perfect season. President Donald Trump is expected to be among those in attendance.

It’s practically a home game for LSU. Its campus is just 90 minutes away and purple-and-gold clad supporters could be found all around New Orleans.

There were plenty of orange-wearing Clemson fans on the streets, hoping their team wins a second straight national championship. A second-story veranda near Jackson Square boasted Clemson flags from its 2016 and 2018 national titles, along with an inflatable Tiger figure.

Clemson is after its third crown in four seasons and its 30th straight victory.

LSU is seeking its first national championship since 2007 and first in the CFP era.

___

More AP college football: https://apnews.com/APTop25CollegeFootballPoll and https://apnews.com/Collegefootball and https://twitter.com/AP_Top25

2020-01-13 5 years ago / 未收藏/ ap发送到 kindle
2020-01-13T05:04:51Z

WASHINGTON (AP) — Defense Secretary Mark Esper and other administration officials joined President Donald Trump in trying to draw attention to dissent in Iran instead of lingering questions about the scale of the threat used to justify a drone strike on Iran’s top military leader.

Esper added to the uncertainty over the intelligence behind this month’s killing of Gen. Qassem Soleimani when he said Sunday that he had seen no hard evidence that four American embassies had been under possible threat. Trump said last Friday that Soleimani had been planning such an attack.

In appearances on Sunday news shows, both Esper and national security adviser Robert O’Brien said they agreed that Iran might have hit more than just the U.S. Embassy in the Iraqi capital. “It is certainly consistent with the intelligence to assume that they would have hit embassies in at least four countries,” O’Brien said.

But Esper, when asked whether there was a specific piece of evidence, replied: “I didn’t see one with regard to four embassies.″ And in response to a question about whether Trump was “embellishing″ the threat, Esper said, ”I don’t believe so.”

In a tweet both defiant and dismissive, Trump turned his attention again to supporting Iranian protesters and warning the Iranian government not to attack them or to pursue nuclear weapons. He tweeted: “National Security Adviser suggested today that sanctions & protests have Iran ‘choked off’, will force them to negotiate. Actually, I couldn’t care less if they negotiate. Will be totally up to them but, no nuclear weapons and ‘don’t kill your protesters.’

O’Brien had suggested the United States sees this moment as an opportunity to further intensify pressure on Iran’s leaders, with whom the U.S. has been at odds for four decades. Iran’s leaders already are under enormous strain from economic sanctions that have virtually strangled Iran’s main source of income — oil exports. Esper said street protests in Tehran show the Iranian people are hungry for a more accountable government after leaders denied, then admitted shooting down a Ukrainian passenger plane.

“You can see the Iranian people are standing up and asserting their rights, their aspirations for a better government — a different regime,” Esper said.

Trump’s order to strike at Soleimani came as he was already under pressure ahead of an impeachment trial in the Senate. Many in Congress complained that the administration did not consult them in advance and did not adequately brief members afterward.

After the U.S. killed Soleimani in Baghdad, it appeared the backlash in Iran and elsewhere had helped Tehran by shifting the focus away from its internal problems. The strike also seemed to divert attention away from domestic unrest in Iraq over government corruption, and it intensified efforts by Iraqi politicians to expel American and other foreign forces.

But the shootdown of the Ukrainian plane on the night of the Soleimani strike, killing all 176 people aboard, opened a new avenue of pressure for the Trump administration.

“I think the regime is having a very bad week,” O’Brien said.

“This was a regime that’s reeling from maximum pressure, they’re reeling from their incompetence in this situation and the people of Iran are just fed up with it,” he said, adding that regime change is not U.S. policy.

“The people of Iran are going to hopefully have the ability at some point to elect their own government and to be governed by the leaders they choose,” O’Brien said.

In Tehran, Iran’s security forces deployed in large numbers on Sunday. Demonstrators defied the heavy police presence to protest their country’s days of denials that it shot down the Ukrainian plane. Videos posted online showed protesters shouting anti-government slogans and moving through subway stations and sidewalks.

Iranians have expressed anger over the downing of the Ukrainian flight and the misleading explanations from senior officials in the immediate aftermath. Later the government took the blame for the shootdown, saying it was caused by human error.

Reviewing the dramatic sequence of events that preceded the downing of the Ukrainian jetliner Wednesday, Esper justified the U.S. killing of Soleimani as an act of self defense, and he said the U.S. foresees no more Iranian military attacks in retaliation for that. Even so, the leader of the Lebanese militant group Hezbollah, which is closely aligned with Iran, said Sunday that Iran’s missile attacks on two bases in Iraq housing U.S. forces last week were only the start of the retaliation.

Hassan Nasrallah described Iran’s military response, which caused no casualties, as a “slap” at the U.S. He called it the “first step down a long path” that will ensure U.S. troops withdraw from the region.

Democratic Sen. Chris Coons of Delaware, a member of the Senate Foreign Relations Committee, said he was concerned that “Iran has lots of ways that they can take action against us, both overt and covert, and I don’t think they’re done trying to seek revenge.″

Esper spoke hopefully of getting the NATO alliance more involved in Iraq to help train Iraqi security forces. He said this could allow him to reduce the number of American troops in Iraq, currently numbering more than 5,200, but he did not say any reduction was in the works yet.

Esper appeared on CBS’ “Face the Nation″ and CNN’s “State of the Union.″ O’Brien appeared on ABC’s ”This Week,″ “Fox News Sunday” and NBC’s “Meet the Press.” Coon was on Fox.

___

This story has been corrected to show the general’s killing was this month, not last week.

2020-01-13 5 years ago / 未收藏/ ap发送到 kindle
2020-01-13T12:08:56Z

DUBAI, United Arab Emirates (AP) — The demonstrations that erupted after Iran admitted to accidentally shooting down a passenger plane during a tense standoff with the United States last week are the latest of several waves of protest going back to the 1979 Islamic Revolution — all of which have been violently suppressed.

Iranians were shocked and appalled by the shootdown of the Ukrainian jetliner, which killed all 176 people on board, mostly Iranians. Many are also angry at the government’s misleading statements in the wake of the tragedy, which it initially blamed on a technical problem.

Iranians are also suffering from an economic crisis exacerbated by severe sanctions imposed by President Donald Trump after he withdrew the U.S. from Iran’s 2015 nuclear deal with world powers.

Trump has encouraged the protests — even as he has long embraced other autocrats who smother dissent. His administration hopes that the demonstrations, along with crippling U.S. sanctions, will bring about fundamental change in a longtime adversary.

But large numbers of Iranians still support the clerically led government, as seen by the massive turnout for the funeral of Gen. Qassem Soleimani, Iran’s top general, who was killed in a U.S. airstrike in Baghdad. Even many critics of the government saw him as a war hero who had helped defeat the Islamic State group and resisted Western hegemony in the Middle East.

Iran’s security forces have shown in the past that they will use deadly force against anyone threatening the Islamic Republic, most recently in November, when rights groups say hundreds of people were killed in demonstrations sparked by a hike in gasoline prices.

Here is a look at past protests in Iran, and how its theocracy prevailed.

___

THE ISLAMIC REVOLUTION

The 1979 Islamic Revolution began with broad-based mass protests that eventually forced the Western-backed monarchy from power. But in the resulting chaos, hard-line followers of Ayatollah Ruhollah Khomeini quickly moved to sideline left-wing and moderate opposition groups, forcing many Iranians into prison or exile and establishing a firm foundation for clerical rule. Iran also suppressed a rebellion from among its Kurdish minority in a yearslong military campaign. In 1988, at the close of the disastrous Iran-Iraq war, Iran is believed to have executed thousands of political prisoners, something authorities have yet to publicly acknowledge.

___

A STUDENT UPRISING

The closure of a reformist newspaper in 1999 ignited a week of student protests. On July 9, security forces and hard-line vigilantes stormed a student dormitory at Tehran University. At least three people were killed and 1,200 were arrested in the unrest, which spread to other cities. The protests unfolded amid a power struggle between President Mohammad Khatami, a popular reformist, and hard-liners who dominate the Revolutionary Guard and the security apparatus. The hard-liners eventually prevailed, and the resulting crackdown set back reform efforts for a decade.

___

THE GREEN MOVEMENT

The largest and most sustained protests since the Islamic Revolution erupted in the summer of 2009, after the reformist opposition disputed the re-election of hard-line President Mahmoud Ahmadinejad. Millions of Iranians took part in months of protests in several major cities. Green Movement leaders did not call for the overthrow of the system, but for the reversal of the allegedly rigged election, greater social freedoms and the reining in of the security forces.

Authorities nevertheless responded with a massive crackdown. The Revolutionary Guard and its volunteer force, the Basij militia, opened fire on protesters and launched a wave of arrests. Opposition leaders were placed under house arrest and silenced in the largely state-run media.

Among those killed was Neda Agha Soltan, a 27-year-old woman who became an icon of the protest movement after she was shot and bled to death in a video seen by millions on social media.

President Barack Obama came under criticism for not offering a full-throated endorsement of the protests. But it’s unclear if that would have made a difference, and it might have fed into hard-liners’ allegations that the protests were part of a Western plot.

___

ECONOMIC PROTESTS

Since withdrawing from the 2015 nuclear agreement between Iran and world powers, Trump has imposed “maximum” sanctions on Iran that he says are aimed at countering its nuclear program and its support for armed groups across the region. The sanctions, including those targeting the vital oil industry, have eviscerated Iran’s economy, wiping away many people’s life savings and fueling high unemployment.

In the 18 months since the U.S. began restoring sanctions, Iran has seen waves of sporadic, leaderless protests initially focused on economic grievances and perceived corruption among the clerical elite and the Revolutionary Guard. Each time, the protests rapidly escalated into chants against Supreme Leader Ayatollah Ali Khamenei and calls for the end of clerical rule.

The protests have often turned violent and security forces have responded with deadly force. In the most recent and deadly wave of protests, in November, authorities shut down the internet for several days, making it difficult to discern the scale of the protests and the resulting crackdown.

Amnesty International estimates that more than 300 people were killed.

___

Follow Joseph Krauss on Twitter at www.twitter.com/josephkrauss .

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-13T10:47:31Z

Your daily look at late-breaking news, upcoming events and the stories that will be talked about today:

1. IRAN CRACKS DOWN ON PROTESTERS Videos verified by The Associated Press show police and security forces firing live ammunition and tear gas to disperse demonstrators protesting against the Islamic Republic’s initial denial that it shot down a Ukrainian jetliner.

2. PRESIDENT’S SUGGESTION FOR HIS LOOMING IMPEACHMENT TRIAL Donald Trump says the Senate should simply dismiss the impeachment case against him, a reversal from suggesting his own ideas for trial witnesses.

3. PHILIPPINE VOLCANO ERUPTS GUSHING RED-HOT LAVA More than 13,000 villagers have moved to evacuation centers in the hard-hit provinces of Batangas and Cavite, but officials expect the number to swell.

4. WHO THE US IS SENDING HOME AFTER FATAL SHOOTING More than a dozen Saudi military students could be removed from a military training program after an investigation into a deadly shooting by a Saudi aviation student at a Florida navy base last month

5. NO CLEAR FRONT-RUNNER AS IOWA CAUCUSES NEAR A poll released Friday by The Des Moines Register and CNN found the four leading Democrat contenders, Bernie Sanders, Elizabeth Warren, Joe Bid and Pete Buttigieg share similar levels of support.

6. TRUMP ADMINISTRATION FOCUSES ON TEHRAN DISSENT Top officials have joined the president in trying to draw attention to protests in Iran rather than answering questions about uncertainty over the intelligence behind the killing of Gen. Qassem Soleimani.

7. ‘RANGE OF POSSIBILITIES’ TO BE DISCUSSED AT ROYAL FAMILY SUMMIT Britain’s Queen Elizabeth II seeks to contain the fallout from Prince Harry and his wife Meghan’s decision to walk away from their royal roles.

8. DEMOCRATS STRUGGLE WITH HOW MUCH CHANGE IS TOO MUCH It is a question that has plagued candidates and voters alike over the last year in the Democratic Party’s quest to identify the person best positioned to defeat Trump in November

9. “JOKER,” “THE IRISHMAN” LEAD OSCAR NOMINATIONS Nine movies are nominated for best picture at the 92nd Academy Awards.

10. GREEN BAY IS ONE STEP CLOSER TO SUPER BOWL AFTER DIVISIONAL WIN OVER SEATTLE The Packers have reached the NFC championship game by beating the Seattle Seahawks 28-23.

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-12T23:18:52Z

VATICAN CITY (AP) — The Vatican on Monday sought to downplay the decision by retired Pope Benedict XVI to reaffirm the “necessity” of a celibate priesthood at the same time that Pope Francis is considering ordaining married men, calling his book a mere contribution that was written in full obedience to Francis.

The Vatican’s editorial director, Andrea Tornielli, penned an editorial that sought to put Benedict’s bombshell book in the context of a continuity between the two popes. He noted that Francis, too, has upheld the “gift” of priestly celibacy and refused to make it optional across the board.

The French daily Le Figaro late Sunday published excerpts of the book “From the Depths of Our Hearts: Priesthood, Celibacy and the Crisis of the Catholic Church,” co-authored with conservative Cardinal Robert Sarah; The Associated Press obtained galleys of the English edition, which is being published Feb. 20 by Ignatius Press.

Benedict’s intervention was extraordinary, given he had promised to remain “hidden from the world” when he retired in 2013, and pledged his obedience to the new pope. He has largely held to that pledge, though he penned an odd essay last year that blamed the sexual abuse crisis on the sexual revolution of the 1960s.

His reaffirmation of priestly celibacy, however, gets to the heart of a fraught policy issue that Francis is expected to weigh in on in the coming weeks, and could well be considered a public attempt by the former pope to sway the thinking of the current one.

The implications for such an intervention are grave, given that conservative and traditionalist Catholics nostalgic for Benedict’s orthodoxy are already deeply opposed to Francis, with some even considering Benedict’s resignation illegitimate.

The book is likely to fuel renewed anxiety about the wisdom of Benedict’s decision to call himself “emeritus pope,” rather than merely a retired bishop, and create the unprecedented situation of a former pope living in the Vatican gardens near a current one, and wearing the white cassock of the papacy.

In that light, it is significant that the English edition of the book lists the author as “Benedict XVI,” with no mention of his emeritus papal status on the cover.

The authors clearly anticipated the potential interpretation of their book as criticism of the current pope, and stressed in their joint introduction that they were two bishops penning it “in a spirit of filial obedience, to Pope Francis.” But they also said that the current “crisis” in the church required they not remain silent.

Francis has said he will write a document based on the outcome of the October 2019 synod of bishops on the Amazon. A majority of bishops at the meeting called for the ordination of married men to address the priest shortage in the Amazon, where the faithful can go months without having a Mass.

Francis has expressed sympathy with the Amazonian plight, though it is not clear how he will come down on the issue. While he has long reaffirmed the gift of a celibate priesthood in the Latin rite church, he has stressed that celibacy is a tradition, not doctrine, and therefore can change.

Speaking to reporters last January en route home from Panama, he noted that theologians had debated pastoral reasons to allow for an exception in a particular place. But he said his decision at that time was to say “no.”

“I don’t feel able to put myself before God with this decision,” he said.

In his editorial on Vatican News, entitled “A contribution on priestly celibacy in filial obedience to the pope,” Tornielli recalled Francis’ words from Panama, and noted that Francis didn’t refer to the issue at all when he addressed the Amazon synod at its conclusion.

The Catholic Church already has married priests in its eastern rites, and Benedict himself made it easier for Anglicans to convert to Catholicism — including married Anglican priests who are allowed to remain married. But he has long held that Latin, or Roman rite, priests must be celibate.

Benedict addresses the issue head-on in his chapter in the brief book, explaining in scholarly and biblical terms what he says is the “necessary” criterion for the celibate priesthood that dates from the times of the apostles.

“The priesthood of Jesus Christ causes us to enter into a life that consists of becoming one with him and renouncing all that belongs only to us,” he writes. “For priests, this is the foundation of the necessity of celibacy but also of liturgical prayer, meditation on the Word of God and the renunciation of material goods.”

Marriage, he writes, requires man to give himself totally to his family. “Since serving the Lord likewise requires the total gift of a man, it does not seem possible to carry on the two vocations simultaneously.”

The jointly written introduction and conclusion of the book makes the case even more strongly. Dedicating the book to priests of the world, the two authors urge them to persevere, and for all faithful to hold firm and support them in their celibate ministry.

“It is urgent and necessary for everyone — bishops, priests and lay people — to stop letting themselves be intimidated by the wrong-headed pleas, the theatrical productions, the diabolical lies and the fashionable errors that try to put down priestly celibacy,” they write.

The book is being published at a moment of renewed interest in — and confusion about — the nature of the relationship between Francis and Benedict, thanks to the Netflix drama “The Two Popes.”

The film stars Anthony Hopkins as Benedict and Jonathan Pryce as Francis — both received Oscar nominations on Monday for their roles. It imagines a days-long conversation between the two men before Benedict announced his historic resignation Feb. 11, 2013 — conversations in which their different views of the state of the church become apparent.

Those meetings never happened, and the two men didn’t know one another well before Francis was elected pope. But while the film takes artistic liberties for the sake of narrative, it gets the point across that Francis and Benedict indeed have some very different ideas.

Catholic social media was abuzz Monday after Benedict’s bombshell, with Francis’ supporters saying it showed the problems of having an “emeritus pope” seemingly undermining the current one, and suggesting that Benedict — at age 92 and increasingly feeble — was being manipulated by his conservative entourage.

“Not only there is no canon law concerning the situation created by an incapacitated pope,” tweeted Villanova theologian Massimo Faggioli. “The Catholic Church evidently also needs a law concerning the situation created by an incapacitated ‘pope emeritus’ and his entourage.”

Mark Brumley, the president of Ignatius Press, however, denounced such conspiracies and said Benedict isn’t being used.

“Why some folks choose to interpret the new book by Pope Emeritus Benedict and Cardinal Sarah in anti-Pope Francis ways speaks volumes,” he tweeted. “Let’s pray for healing for the critics that they can rejoice in a new work from two great churchmen of our time, including a major theologian.”

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-12T18:33:32Z

Female filmmakers were shut out, “Parasite” made history and “The Joker” just edged out “The Irishman,” “1917” and “Once Upon a Time ... in Hollywood” in Monday’s Oscar nominations.

Todd Phillips’ R-rated superhero smash “Joker” topped all films with 11 nominations, while Martin Scorsese’s elegiac crime epic “The Irishman,” Quentin Tarantino’s 1960s Los Angeles fairy tale “Once Upon a Time ... in Hollywood” and Sam Mendes’ continuous World War I tale “1917” all trailed close behind with 10 nods apiece.

Those four were among the nine films nominated for best picture, in nominations to the 92nd Academy Awards. The others were: Greta Gerwig’s Louisa May Alcott adaptation “Little Women,” Noah Baumbach’s divorce drama “Marriage Story,” Taika Waititi’s Nazi Germany romp “Jojo Rabbit,” James Mangold’s racing drama “Ford v Ferrari” and Bong Joon Ho’s class satire “Parasite” — the first Korean film to nominated and only the 11th non-English best-picture nominee.

While “Joker,” which gives the DC Comics villain an antihero spin cribbed from Scorsese, was expected to do well Monday, the academy’s overwhelming support for a movie that was far from a critical favorite was unexpected. The film’s nominations included best actor for Joaquin Phoenix and best director for Phillips.

Though a record 62 women (or about a third of nominees) were nominated Monday, the Academy of Motion Pictures Arts and Sciences put the most weight behind a handful of swaggering male-driven and man-made movies predicated on virtuosity, spectacle and celebrity. For the 87th time, the directors category was all male.

Hollywood, in the midst of a streaming upheaval, also gave Netflix more nominations, 24, than ever before. The 10 nominations for “The Irishman” tied the most for a Netflix film, following “Roma” last year. Scorsese, a one-time winner for “The Departed,” was nominated for best director for the ninth time. The film also won nods for Al Pacino, Joe Pesci and its de-aging special effects. “We put all of ourselves into this picture,” said Scorsese in a statement.

“1917” followed up its Golden Globes win and strong opening weekend at the box office with nominations not just for its technical achievement (including Mendes’ directing and Roger Deakins’ cinematography) but for best screenplay, too.

“Once Upon a Time ... in Hollywood” was nominated in just about every category it was expected to, including Tarantino for directing and screenplay, best actor for Leonardo DiCaprio and best supporting actor for Brad Pitt.

Despite a year in which women made historic gains behind the camera, female directors were again shut out of best director. The most likely candidate was Greta Gerwig (“Little Women”), who was the last woman nominated, two years ago for “Lady Bird.”

“Congratulations to those men,” said Issa Rae, who presented the nominees alongside John Cho.

There were many surprises. Awkwafina, who was poised to become just the second Asian American nominated for best actress (the first, 1936 nominee Merle Oberon, hid her South Asian heritage), wasn’t nominated for her acclaimed leading performance in “The Farewell.” Also overlooked for best animated film was “Frozen 2,” the highest grossing animated film ever; Beyonce, for her “Lion King” song; and the hit documentary “Apollo 11.”

Most glaringly, Jennifer Lopez, long considered a supporting actress front-runner for her performance in “Hustlers,” was also denied her first Oscar nomination.

Those oversights left the Oscars with their least diverse field since the fallout of #OscarsSoWhite pushed the film academy to diversify its membership. The only actor of color nominated was Cynthia Erivo, the British actress, for her Harriet Tubman in “Harriet.” Last week, the British film academy nominated only white performers, leading Erivo to decline an invitation to perform.

Bong Joon Ho’s “Parasite,” however, made history for South Korea. It’s not only the first Korean film to be nominated for best international film but it became just the 11th non-English movie nominated for best picture. “Parasite,” which won the Palme d’Or at last year’s Cannes Film Festival, also won nods for Bong’s direction, best editing and best production design.

No filmmaking couple has had an Oscar nominations morning quite like Gerwig and Noah Baumbach, director of the divorce drama “Marriage Story.” Their movies were each nominated for best picture, best screenplay (adapted for Gerwig; original for Baumbach) and six nominations in total.

Nominations for “Marriage Story” included nods for its leads, Adam Driver and Scarlett Johansson, and Laura Dern for best supporting actress. Johansson, also nominated for her supporting turn in “Jo Jo Rabbit,” became the first two-time acting nominee since Cate Blanchett managed the feat in 2007.

Also nominated for best actress was Renée Zellweger, considered the front-runner for her Judy Garland in “Judy,” Charlize Theron (“Bombshell”) and Soairse Ronan (“Little Women”). Just 25 years old, Ronan now has four Oscar nominations.

Joining Driver, DiCaprio and Phoenix for best actor were Antonio Banderas, who plays a semi-fictionalized version of director Pedro Almodovar in “Pain and Glory”; and Jonathan Pryce, who stars as Pope Francis in “The Two Popes.”

Tom Hanks received his first Oscar nomination since “Cast Away” 19 years ago for his Mister Rogers in “A Beautiful Day in the Neighborhood.” But Pitt is the overwhelming favorite among the supporting actor nominees. Joining Pacino and Pesci was Pryce’s papal co-star, Anthony Hopkins.

Along with Dern and Johnson, the nominees for best supporting actress were Kathy Bates (“Richard Jewell”), Florence Pugh (“Little Women”) and Margot Robbie (“Bombshell”).

“American Factory,” the first film from Barack and Michelle Obama’s recently launched production company, Higher Ground, was nominated for best documentary. Said Obama: “It’s the kind of story we don’t see often enough and it’s exactly what Michelle and I hope to achieve with Higher Ground.”

“Honeyland,” about a bee keeper in rural Macedonia, became the first film ever nominated for both best documentary and best international film.

Also up for best documentary are: “For Sama,” “The Edge of Democracy” and the Syrian Civil War film “The Cave.” Feras Fayyad, director of “The Cave,” was nominated in 2018 for his “Last Men in Aleppo” but was unable to attend the Oscars when his visa was rejected because of President Donald Trump’s travel ban.

The other nominees for best international film were “Pain and Glory” from Spain, “Les Miserables” from France and “Corpus Christi” from Poland.

The nominees for best animated feature film: “How to Train a Dragon: The Hidden World”; “Toy Story 4”; “I Lost My Body”; “Klaus”; “Missing Link.”

After the most dominant box-office year in Hollywood history, the Walt Disney Co.’s top films — including the record-setting Marvel blockbuster “Avengers: Endgame” — were largely relegated to categories like best visual effects. The studio, which has never won a best picture Academy Award, does have a few contenders via its acquisition in April of 20th Century Fox: best-picture nominees “Ford v Ferrari” and “Jojo Rabbit.”

The 92nd Academy Awards will take place Feb. 9 in Los Angeles at the Dolby Theatre. ABC will again broadcast the show, viewership for which last year rose 12% to 29.6 million. Like last year, this year’s ceremony will go without a host.

___

Follow AP Film Writer Jake Coyle on Twitter at: http://twitter.com/jakecoyleAP

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-13T05:07:23Z

WASHINGTON (AP) — President Donald Trump says the Senate should simply dismiss the impeachment case against him, an extraordinary suggestion as the House prepares to transmit the charges to the chamber for the historic trial.

The Republican president is giving mixed messages ahead of the House’s landmark vote that will launch the Senate proceedings in a matter of days, only the third presidential impeachment trial in American history. Trump faces charges that he abused power by pushing Ukraine to investigate Democratic rival Joe Biden and then obstructed Congress.

First Trump was suggesting his own ideas for trial witnesses, then he said almost the opposite Sunday by tweeting that the trial shouldn’t happen at all.

“Many believe that by the Senate giving credence to a trial” over charges he calls a hoax, Trump tweeted, “rather than an outright dismissal, it gives the partisan Democrat Witch Hunt credibility that it otherwise does not have. I agree!”

The idea of dismissing the charges against Trump is as unusual as it is unlikely. Senate Majority Leader Mitch McConnell signed on to an outlier proposal circulating last week among conservative senators, but he does not have enough support in the Republican-held chamber to actually do it. It would require a rare rules change similar to the approach McConnell used for Supreme Court confirmations.

Speaker Nancy Pelosi warned Sunday that senators will “pay a price” if they block new witness testimony with a trial that Americans perceive as a “cover-up” for Trump’s actions.

“It’s about a fair trial,” Pelosi told ABC’s “This Week.” “The senators who are thinking now about voting for witnesses or not, they will have to be accountable.”

She said, “Now the ball is in their court to either do that or pay a price.”

Voters are divided over impeachment largely along the nation’s deeply partisan lines and the trial is becoming a high-stakes undertaking at the start of a presidential election year.

A House vote to transmit the articles to the Senate will bring to a close a standoff between Pelosi and McConnell over the rules for the trial. The House voted to impeach Trump last month.

Yet ending one showdown merely starts another across the Capitol as the parties try to set the terms of debate over high crimes and misdemeanors.

Democrats want new testimony, particularly from former White House national security adviser John Bolton, who has indicated he will defy Trump’s orders and appear if subpoenaed.

Trump doesn’t want his brash former aide to testify. Republican allies led by McConnell, R-Ky., are ready to deliver swift acquittal without new testimony.

Trump first said Sunday it’s Pelosi and House Intelligence Committee Chairman Adam Schiff who should both testify, which would be unlikely.

The president said he shouldn’t have to carry the “stigma” of impeachment because he’s done nothing wrong. Pelosi said the House vote last month means Trump will be “impeached forever” and “for life.”

McConnell is reluctant to enter a divisive Senate debate over witnesses that could split his party and prolong a trial that is already expected to consume weeks of floor time.

He is seeking a speedy acquittal and has proposed a process similar to the presidential impeachment trial of Bill Clinton in 1999, which would start the proceedings and then vote later on hearing new testimony.

One leading Republican, Sen. Lindsey Graham of South Carolina, has already predicted that the trial would end ”in a matter of days.″ Graham and Sen. Josh Hawley, R-Mo. are leading the effort to dismiss the charges against Trump.

Trump delayed nearly $400 million in aide as Ukraine battled Russia on its border while he pushed the country’s new president to investigate political rival Joe Biden. Trump pays close attention to a conspiracy theory pushed by his personal lawyer Rudy Giuliani about Biden and his son Hunter Biden, who served on the board of a gas company in Ukraine while his father was vice president. No evidence of wrongdoing by the Bidens has emerged.

Some GOP senators want to turn the impeachment trial away from the Democrats’ case and toward the theories being pursued by Giuliani. GOP Sen. Rick Scott of Florida said Sunday he wants to hear from the Bidens “and find out — get to the bottom of that.”

At least one Republican up for reelection, Sen. Susan Collins of Maine, said last week she was in talks with GOP colleagues on a process that would allow them to hear more testimony as Democrats want.

The Democratic-run House has not yet set the timing for this week’s vote to transmit the impeachment articles to the Senate. Pelosi will meet behind closed doors with House Democrats to decide next steps on Tuesday morning ahead of the party’s presidential primary debate that evening, the last before the Iowa caucuses Feb. 3.

Once the Republican-led Senate receives the charges, the trial is expected to begin swiftly.

While some Democrats have grumbled about the delay, Pelosi and other party leaders defended the strategy, saying it produced new potential evidence and turned public attention on the upcoming trial.

“One of the things that holding on to the articles has succeeded doing is fleshing out McConnell and the president’s desire to make this a cover up,” Schiff, D-Calif., said on CBS’ “Face the Nation.”

Bolton’s remarks, which were recalled by witnesses in the House investigation, could cut different ways in testimony. He was said to have compared the Ukraine actions to a “drug deal” he wanted no part of and warned that Giuliani was a “hand grenade” about to go off.

House Democrats, who did not issue a subpoena for Bolton last year, did not rule out doing so now. Pelosi also left open the door to filing more articles of impeachment against Trump.

“Let’s be optimistic about the future ... a future that will not have Donald Trump in the White House, one way or another. Ten months from now we will have an election, if we don’t have him removed sooner,” she said.

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-13T15:05:14Z

WASHINGTON (AP) — The Supreme Court on Monday left in place the conviction of a Massachusetts woman who sent her boyfriend text messages urging him to kill himself.

Michelle Carter is serving a 15-month sentence after being convicted of involuntary manslaughter in the 2014 death of her boyfriend, Conrad Roy III. A judge determined that Carter, who was 17, caused the death of the 18-year-old Roy when she ordered him in a phone call to get back in his carbon monoxide-filled truck that he’d parked in a Kmart parking lot.

The phone call wasn’t recorded, but the judge relied on a text Carter sent her friend in which she said she told Roy to get back in. In text messages sent in the days leading up to Roy’s death, Carter also encouraged Roy to follow through with his suicide plan and chastised him when he didn’t, Massachusetts courts found.

The case has garnered national attention and sparked legislative proposals in Massachusetts to criminalize suicide coercion.

Carter’s lawyers argued in their Supreme Court appeal that the conviction should be thrown out because it was an “unprecedented” violation of her free speech rights that raised crucial questions about whether “words alone” are enough to hold someone responsible for another person’s suicide.

The lawyers also argued there was simply not enough evidence to prove Carter urged Roy to to get back in his truck to die, or that he would have lived if she had called for help or taken other actions to try and save his life.

Joseph Cataldo, one of Carter’s lawyers, said Monday’s decision was an “injustice” and that the legal team is weighing its next steps. He didn’t elaborate.

“The U.S. Supreme Court not accepting Michelle Carter’s petition at this time is unfortunate,” he said in a statement. “Clearly many legal scholars and many in the legal community understand the dangers this precedent created by the Massachusetts courts.”

Carter has been serving her sentence at the Bristol County House of Correction in Dartmouth, Massachusetts.

She was initially set to be released in May, but now may be released in March, if not sooner. Jail officials said Carter has accrued enough “good time” credits for good behavior and attending programs while incarcerated after she was denied parole last September.

The jail declined to provide an updated release date Monday.

“Ms. Carter continues to attend programs, is getting along with other inmates, is polite to our staff and volunteers, and we’ve had no discipline issues at all,” Jonathan Darling, a spokesman for the Bristol County Sheriff’s Office, said in an email.

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-13T16:00:20Z

DES MOINES, Iowa (AP) — Democrat Cory Booker dropped out of the presidential race Monday, ending a campaign whose message of unity and love failed to resonate in a political era marked by chaos and anxiety.

His departure now leaves a field that was once the most diverse in history with just one remaining African American candidate, former Massachusetts Gov. Deval Patrick.

Since launching his campaign last February, Booker, a U.S. senator from New Jersey, struggled to raise the type of money required to support a White House bid. He was at the back of the pack in most surveys and failed to meet the polling requirements needed to participate in Tuesday’s debate. Booker also missed last month’s debate and exits the race polling in low single digits in the early primary states and nationwide.

In an email to supporters, Booker said that he “got into this race to win” and that his failure to make the debates prevented him from raising raise the money required for victory.

“Our campaign has reached the point where we need more money to scale up and continue building a campaign that can win -- money we don’t have, and money that is harder to raise because I won’t be on the next debate stage and because the urgent business of impeachment will rightly be keeping me in Washington,” he said.

Booker had warned that the looming impeachment trial of President Donald Trump would deal a “big, big blow” to his campaign by pulling him away from Iowa in the final weeks before the Feb. 3 Iowa caucuses. He hinted at the challenges facing his campaign last week in an interview on The Associated Press’ “Ground Game” podcast.

“If we can’t raise more money in this final stretch, we won’t be able to do the things that other campaigns with more money can do to show presence,” he said.

In his email to supporters, Booker pledged to do “everything in my power to elect the eventual Democratic nominee for president,” though his campaign says he has no immediate plans to endorse a candidate in the primary.

It’s a humbling finish for someone who was once lauded by Oprah Winfrey as the “rock star mayor” who helped lead the renewal of Newark, New Jersey. During his seven years in City Hall, Booker was known for his headline-grabbing feats of local do-goodery, including running into a burning building to save a woman, and his early fluency with social media, which brought him 1.4 million followers on Twitter when the platform was little used in politics. His rhetorical skills and Ivy League background often brought comparisons to President Barack Obama, and he’d been discussed as a potential presidential contender since his arrival in the Senate in 2013.

Now, Massachusetts Sen. Elizabeth Warren has mastered the art of the selfie on social media. Another former mayor, Pete Buttigieg of South Bend, Indiana, is seen as the freshest face in the field. Former Vice President Joe Biden has built a strong base of support with black voters. And Booker’s message of hope and love seemed to fall flat during an era characterized perhaps most strongly by Democratic fury over the actions of the Trump administration.

An early focus on building out a strong and seasoned campaign operation in Iowa and South Carolina may have hampered his campaign in the long run, as the resources he spent early on staff there left him working with a tight budget in the later stages of the primary, when many of his opponents were going on air with television ads. That meant that even later in the campaign, after he had collected some of the top endorsements in Iowa and visited South Carolina almost more than any other candidate, a significant portion of the electorate in both states either said they were unfamiliar with his campaign or viewed him unfavorably.

On the stump, Booker emphasized his Midwestern connections — often referencing the nearly 80 family members he has still living in Iowa when he campaigned there — and delivered an exhortation to voters to use “radical love” to overcome what he considered Trump’s hate. But he rarely drew a contrast with his opponents on the trail, even when asked directly, and even some of Booker’s supporters worried his message on Trump wasn’t sharp enough to go up against a Republican president known for dragging his opponents into the mud.

Booker struggled to land on a message that would resonate with voters. He’s long been seen as a progressive Democrat in the Senate, pushing for criminal justice reform and marijuana legalization. And on the campaign trail, he proposed establishing a $1,000 savings account for every child born in the U.S. to help close the racial wealth gap.

He was among the first candidates to release a gun control plan, and at the time it was the most ambitious in the field, as it included a gun licensing program that would have been seen as political suicide just a decade before. He also released an early criminal justice reform plan that focused heavily on addressing sentencing disparities for drug crimes.

But he also sought to frame himself as an uplifting, unifying figure who emphasized his bipartisan work record. That didn’t land in a Democratic primary that has often rewarded candidates who promised voters they were tough-minded fighters who could take on Trump.

Booker’s seat is up for a vote this year, and he will run for reelection to the Senate. A handful of candidates has launched campaigns for the seat, but Booker is expected to have an easy path to reelection.

Booker’s exit from the presidential race further narrows the once two dozen-strong field, which now stands at 12 candidates.

___

Catch up on the 2020 election campaign with AP experts on our weekly politics podcast, “Ground Game.”

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-13T17:10:46Z

Good luck finding any team in the country that notches a better pair of road wins in the same week than Baylor, which followed up a victory at Texas Tech by invading Allen Fieldhouse and thumping Kansas on its home floor.

As a result? The Bears leapfrogged the Jayhawks and Duke into the second spot in The Associated Press men’s college basketball poll on Monday. They finished with 1,567 points in voting by 65 media members who regularly cover the game, just seven back of top-ranked Gonzaga — even though Baylor had 31 first-place votes and the Bulldogs had 30.

“I think to have a special team you first need to have that work ethic, you need to have that character, but most of all you have to have guys that buy into roles and celebrate each other’s success,” Bears coach Scott Drew explained. “As the year has gone on we’ve done better and better at that. We call it ‘playing with joy.’ If you do that, good things happen.”

Great things, as a matter of fact. Baylor (13-1, 3-0 Big 12) hasn’t lost since playing Washington in Alaska in its second game of the season. Along the way, the boys from Waco, Texas, have notched nonconference wins over ranked teams Villanova, Arizona and Butler along with league wins over the Red Raiders, the Jayhawks and Texas.

The win over Kansas was the first for Baylor in 18 tries at Allen Fieldhouse and the first over a top-five team on the road.

“We came with the expectation to win, the expectation to do great things in the Big 12,” Baylor guard Jerad Butler said, “and it shows when you expect to win versus just trying to survive.”

The Blue Devils fell to third in the AP poll, followed by unbeaten Auburn and Butler. The Jayhawks were next with another unbeaten, San Diego State, staying at No. 7. Oregon, Florida State and Kentucky rounded out the top 10.

The Wildcats climbed four spots by squeezing out tougher-than-expected wins over Georgia and Alabama.

“I’m telling you, I believe in every one of these kids. I wouldn’t have recruited them here. But I’ll tell you, it’s really hard here,” Kentucky coach John Calipari said. “Every game we play is someone’s Super Bowl.”

The biggest climb came from Wichita State, which jumped seven spots to No. 16 after soundly beating new No. 22 Memphis and turning back Connecticut in double overtime. The Shockers’ only loss came against No. 12 West Virginia in the championship game of the Cancun Classic in late November.

“We are at 15 wins now and I don’t even know when we got that last year, so the jump has been crazy,” said Shockers guard Erik Stevenson, who leads the team in scoring. “National recognition is cool and all, but we feel like we’ve been slept on for a while now. We feel like we could beat anybody in the country.”

The biggest fall by a team that remains in the poll came from Ohio State, whichdropped two more games — to Maryland and Indiana — to make it four consecutive losses. The Buckeyes were once in the top five but are now No. 21.

“We have to find a way to figure some things out here quickly,” Ohio State coach Chris Holtmann said. “You know, I think it’s a work in progress right now. I think we definitely have some offensive issues that we have to work out.”

Here are some other takeaways from the latest edition of the college basketball poll:

RISING

West Virginia climbed five spots to No. 12 by following a tough road loss to Kansas with wins over Oklahoma State and Texas Tech. Colorado also jumped five spots to No. 20 after the Buffaloes throttled Utah 91-52 in its only game of the week.

FALLING

Ohio State wasn’t the only Big Ten team to take a tumble. Michigan State dropped seven spots to No. 15 after the Spartans were pounded 71-42 at Purdue, and Penn State fell from No. 20 all the way out of the poll after the Nittany Lions lost consecutive games to unranked teams in Wisconsin and Rutgers.

IN/OUT

Seton Hall returned to the poll at No. 18 thanks to back-to-back wins over Xavier and Marquette that ran the Pirates’ record to 4-0 in the Big East. A pair of newcomers in Illinois and Creighton rounded out the Top 25, and Virginia and Arizona joined the Nittany Lions in falling out. The Cavaliers lost to Boston College and the Wildcats fell to Oregon State last week.

___

More AP college basketball: https://apnews.com/Collegebasketball and https://twitter.com/AP_Top25

2020-01-14 5 years ago / 未收藏/ ap发送到 kindle
2020-01-13T19:07:44Z

The U.S. budget deficit through the first three months of this budget year is up 11.8% from the same period a year ago, putting the country on track to record its first $1 trillion deficit in eight years.

In its monthly budget report, the Treasury Department said Monday that the deficit from October through December totaled $356.6 billion, up from $318.9 billion for the same period last year.

Both government spending and revenues set records for the first three months of this budget year but spending rose at a faster clip than tax collections, pushing the deficit total up.

The Congressional Budget Office is projecting that the deficit for the current 2020 budget year will hit $1 trillion and will remain over $1 trillion for the next decade. The country has not experienced $1 trillion annual deficits since the period from 2009 through 2012 following the 2008 financial crisis.

The actual deficit for the 2019 budget year, which ended Sept. 30, was $984.4 billion, up 26% from the 2018 imbalance, reflecting the impact of the $1.5 trillion tax cut President Donald Trump pushed through Congress in 2017 and increased spending for military and domestic programs that Trump accepted as part of a budget deal with Democrats.

The projections of trillion-dollar deficits are in contrast to Trump’s campaign promise in 2016 that even with his proposed tax cuts, he would be able to eliminate future deficits with cuts in spending and growth in revenues that would result from a stronger economy.

For the first three months of the 2020 budget year, revenues have totaled $806.5 billion, up 4.8% from the same three months a year ago, while government spending has totaled $948.9 billion, an increase of 6.3% from a year ago.

Both the spending amounts and revenue amounts are records for the first three months of a budget year. The deficit in December totaled $13.3 billion, slightly lower than the $13.5 billion deficit in December 2019.

2020-01-14 5 years ago / 未收藏/ guardian发送到 kindle
2020-01-13T16:57:33Z
Oceans off China
The heat in the world’s oceans reached a new record level in 2019, showing “irrefutable and accelerating” heating of the planet.
The world’s oceans are the clearest measure of the climate emergency because they absorb more than 90% of the heat trapped by the greenhouse gases emitted by fossil fuel burning, forest destruction and other human activities.
The new analysis shows the past five years are the top five warmest years recorded in the ocean and the past 10 years are also the top 10 years on record. The amount of heat being added to the oceans is equivalent to every person on the planet running 100 microwave ovens all day and all night.
Hotter oceans lead to more severe storms and disrupt the water cycle, meaning more floods, droughts and wildfires, as well as an inexorable rise in sea level. Higher temperatures are also harming life in the seas, with the number of marine heatwaves increasing sharply.
The most common measure of global heating is the average surface air temperature, as this is where people live. But natural climate phenomena such as El Niño events mean this can be quite variable from year to year.
“The oceans are really what tells you how fast the Earth is warming,” said Prof John Abraham at the University of St Thomas, in Minnesota, US, and one of the team behind the new analysis. “Using the oceans, we see a continued, uninterrupted and accelerating warming rate of planet Earth. This is dire news.”
“We found that 2019 was not only the warmest year on record, it displayed the largest single-year increase of the entire decade, a sobering reminder that human-caused heating of our planet continues unabated,” said Prof Michael Mann, at Penn State University, US, and another team member.
ocean heat graphic
The analysis, published in the journal Advances In Atmospheric Sciences, uses ocean data from every available source. Most data is from the 3,800 free-drifting Argo floats dispersed across the oceans, but also from torpedo-like bathythermographs dropped from ships in the past.
The results show heat increasing at an accelerating rate as greenhouse gases accumulate in the atmosphere. The rate from 1987 to 2019 is four and a half times faster than that from 1955 to 1986. The vast majority of oceans regions are showing an increase in thermal energy.
This energy drives bigger storms and more extreme weather, said Abraham: “When the world and the oceans heat up, it changes the way rain falls and evaporates. There’s a general rule of thumb that drier areas are going to become drier and wetter areas are going to become wetter, and rainfall will happen in bigger downbursts.”
Bleached coral on the Great Barrier Reef, Australia.
Bleached coral on the Great Barrier Reef, Australia. Photograph: Helmut Corneli/Alamy Stock Photo
Hotter oceans also expand and melt ice, causing sea levels to rise. The past 10 years also show the highest sea level measured in records dating back to 1900. Scientists expect about one metre of sea level rise by the end of the century, enough to displace 150 million people worldwide.
Dan Smale, at the Marine Biological Association in the UK, and not part of the analysis team, said the methods used are state of the art and the data is the best available. “For me, the take-home message is that the heat content of the upper layers of the global ocean, particularly to 300 metre depth, is rapidly increasing, and will continue to increase as the oceans suck up more heat from the atmosphere,” he said.
“The upper layers of the ocean are vital for marine biodiversity, as they support some of the most productive and rich ecosystems on Earth, and warming of this magnitude will dramatically impact on marine life,” Smale said.
The new analysis assesses the heat in the top 2,000m of the ocean, as that is where most of the data is collected. It is also where the vast majority of the heat accumulates and where most marine life lives.
The analysis method was developed by researchers at the Chinese Academy of Sciences in Beijing and uses statistical methods to interpolate heat levels in the few places where there was no data, such as under the Arctic ice cap. An independent analysis of the same data by the US National Oceanographic and Atmospheric Administration shows that same increasing heat trend.
Reliable ocean heat measurements stretch back to the middle of the 20th century. But Abraham said: “Even before that, we know the oceans were not hotter.”
“The data we have is irrefutable, but we still have hope because humans can still take action,” he said. “We just haven’t taken meaningful action yet.”
2020-01-14 5 years ago / 未收藏/ guardian发送到 kindle
2020-01-13T19:19:06Z
Members of the media are seen at the Sandringham Estate
The Queen has given her reluctant blessing to the Duke and Duchess of Sussex to split their time between the UK and Canada, making it clear that though she had wanted the couple to remain as full-time working royals, she supported their decision.
After a historic summit of senior royals at Sandringham, details over exactly how Harry and Meghan will carve out the new “progressive” roles they seek remained unclear. The Queen has, however, agreed to a “period of transition” and stressed the couple remain “a valued part of my family”.
But there were “complex matters” still to resolve, and “more work to be done” as she said she wants final decisions to be reached in the coming days.
The Queen’s statement came after 90 minutes of talks, which began against the backdrop of Prince William and Prince Harry attempting to stem rancorous speculation about their relationship in a joint statement.
Shortly after the Sandringham summit ended, the Queen issued a personal and informal statement in which she also struck a conciliatory tone.
“Today my family had very constructive discussions on the future of my grandson and his family.
“My family and I are entirely supportive of Harry and Meghan’s desire to create a new life as a young family. Although we would have preferred them to remain full-time working members of the royal family, we respect and understand their wish to live a more independent life as a family while remaining a valued part of my family”.
“Harry and Meghan have made clear that they do not want to be reliant on public funds in their new lives.
“It has therefore been agreed that there will be a period of transition in which the Sussexes will spend time in Canada and the UK.
“These are complex matters for my family to resolve, and there is some more work to be done, but I have asked for final decisions to be reached in the coming days”.
In a highly unusual move Harry and Meghan were not referred to as the duke and duchess in the statement, only as the Sussexes and by their first names, raising questions about whether they will retain their titles in the future.
Monday’s unprecedented summit was attended by the Queen, Charles, William and Harry, and was the first time the senior royals had met since the Sussexes made their shock statement last Wednesday. Meghan was due to join by conference call from Canada, where she has been since Friday, with the couple’s son, Archie, and their two dogs.
The couple want to “step back” as senior royals, perform royal duties “as called upon”, continue their charitable work and, crucially, be allowed to earn a income.
The palace had been blindsided by the timing of the couple’s announcement, made without warning, which left family members feeling “disappointed” and “hurt” according to sources.
Ahead of Monday’s meeting William and Harry broke their silence over the royal crisis to condemn speculation about their relationship as “offensive and potentially harmful”
In a show of unity, the brothers jointly attacked a UK newspaper report, thought to be in the Times, though senior aides did not specify. A statement, issued through the princes’ respective offices, said: “Despite clear denials, a false story ran in a UK newspaper today speculating about the relationship between the Duke of Sussex and the Duke of Cambridge”.
“For brothers who care so deeply about the issues surrounding mental health, the use of such inflammatory language in this way is offensive and potentially harmful”.
Monday’s Times cited a source claiming Harry and Meghan regarded themselves as having been pushed away by what they saw as a “bullying” attitude from William. It reported the source, said to be close to the couple, as saying William was insufficiently welcoming to Meghan when she first started dating Harry. The source claimed that William’s attitude resulted from the competitive nature of his relationship with his younger brother.
The last year has seen repeated reports of a suspected rift between the brothers. Harry then appeared to confirm the speculation when he told an ITV documentary in October that the brothers, once so close, were on “different paths”.
It is unusual for palace aides to issue such vehement public denials on such personal matters. The fact they did so is indicative of just how sensitive feelings are within the family as they seek to reconcile differences and contain the crisis to prevent further damage to the monarchy. The palace is also desperate to avoid a repeat of any narrative such as the so-called “War of the Waleses”, which accompanied the breakdown of Charles and Diana’s marriage.
Final decisions yet to be made on the Sussex’s severance from full-time royal duties will have huge implications for the shape of the monarchy, and for the future roles of young royals including Princess Charlotte and Prince Louis, the youngest of the Cambridge’s three children.
No details were given of issues discussed, but they were likely to have included how much time the couple intend to spend in Canada, where their son will be raised, what royal duties they will still perform, and what commercial activities would it be feasible for them to undertake in order to become self-funding yet not risk tarnishing the royal brand.
One possible blueprint regarding how the couple could approach commercial enterprises are guidelines devised almost 20 years ago after the Countess of Wessex was accused of cashing in on her royal status in a bid to win business for her PR firm from a “fake sheikh” undercover reporter.
Those rules advise royals to first consult the Lord Chamberlain – the most senior official of the royal household – before taking on any new business activity. They also require that anyone connected with a business activity “should be carefully briefed not to try to exploit , either deliberately or inadvertently, the member of the royal family’s position, associations or access.”
Both Edward, who worked in television, and Sophie, who worked in PR, stepped down from their jobs after aides accepted they worked in areas prone to accusations of exploitation.
The move has raised questions over whether Canadian taxpayers would have to pay for the couple’s security costs during their time in North America but the country’s prime minister Justin Trudeau said no discussions had taken place.
Speaking to Canadian broadcaster Global News on Monday, he said: “There will be many discussions to come on how that works.
“But there’s still a lot of decisions to be taken by the royal family and by the Sussexes themselves as to what level of engagement they choose to have and these are things that we are supportive of.”
Earlier, Penny Junor, a royal biographer, said the Queen’s statement on Monday was “friendly and warm” and gave the couple space to find some perspective.
“I think it will take the pressure off them. I think they’re in a very vulnerable state at the moment. I think they’re unhappy, they feel isolated and unloved, unappreciated and they needed careful handling,” she said. “My reading from that statement is that the family has been sensitive to their vulnerability.”

2020-01-14 5 years ago / 未收藏/ guardian发送到 kindle
2020-01-13T17:25:23Z
Iranians protest in Tehran in solidarity for victims of the Ukraine passenger plane shot down by the military.
Iranian authorities fired live ammunition to disperse protesters in Tehran on Sunday night, wounding several people, according to witness accounts provided to the Guardian and footage circulating on social media.
Hundreds of protesters had defied a heavy security presence in the Iranian capital to hold vigils and demonstrations after the government belatedly admitted its own forces had shot down a Ukraine International Airlines passenger jet last Wednesday, killing all 176 people on board.
There were fresh protests on Monday in at least two universities in the country. Though campus protests are not unusual in Iran, they come during a period of extraordinary tumult in the Islamic Republic, with an economy suffocated by US sanctions, the largest protests in the regime’s history crushed by violent force in November, and popular revulsion that the country’s armed forces shot down a jet loaded with Iranian citizens – then denied doing so.
Analysts said the renewed protests were still concentrated among the restive middle classes and students and not an existential threat to the government. But the backlash had wiped out any momentum the government had hoped to gain from the outpouring of grief and rage that followed the killing of Gen Qassem Suleimani by a US drone strike on 3 January, and Iran’s missile strikes on American forces in Iraq five days later.
“It was thought they would have gotten a break, but they have … ruined it for themselves,” said Dina Esfandiary, an Iran specialist at the Century Foundation thinktank.
A witness told the Guardian that groups, many led by women, gathered in Tehran’s central Azadi Square on Sunday evening wearing masks and scarves to hide their identities, confronting riot police and officers in plain clothes.
__YOUTUBE_MEDIA_PLACEHOLDER_3b940a7d-7dfe-47bb-bd2b-6e2553838290__
“One of [the officers] with a white beard was filming regular people and smiling flagrantly while we were shouting in their faces,” Ronak, 35, said. “Thirty minutes later, the shooting of teargas started and the crowd was shouting in between cries and coughs: ‘For so many years of crimes, down with this wilayat [Iran’s theocratic system of government].’”
She said the crowd rushed away from the teargas but continued chanting, and security forces started to fire “compact and hard black bullets”, a form of non-lethal ammunition. “[They fired] constantly, without stop,” she said.
“People were on the ground. One of the teargas canisters was fired near us. My friend was shot by paintball bullets in his head. For a few seconds I thought he had lost his eye, but the bullet hit his eyebrows. Blood was dripping from his eyebrows. His face was wet and he was constantly coughing.”
The crowd dispersed after security forces began “shooting bullets that were aimed at heads”, she said.
“The crackdown was too intense, so our comrades dispersed,” she said.
The witness’s account could not be independently confirmed, but accorded with another witness’s report that security forces initially fired teargas to disperse the crowds and then started firing bullets. “It was a very bad situation,” the woman, who asked not to be identified, said in a message provided to the Iranian activist Masih Alinejad.
“They were firing teargas repeatedly. We couldn’t see anywhere and we were screaming. We were getting blinded. Forces were firing teargas back to back. A young girl beside me was shot in the leg. It was terrible, terrible.”
She provided a video from near Azadi Square showing bloodstains along the pavement, one of several similar videos being circulated by Iranian activists on Sunday evening and Monday morning. “It’s the blood of our people,” a woman said in one clip.
Another video purportedly from near Azadi Square shows several people appearing to be wounded on the ground including a woman lying on a bloodied pavement. “They shot her with a bullet,” a man says.
Tehran’s police chief said in a statement on Monday that no shots were fired during Sunday’s events and that officers were under orders to show restraint. “At protests, police absolutely did not shoot because the capital’s police officers have been given orders to show restraint,” Hossein Rahimi said.
There were demonstrations in several other cities but it was unclear whether similar force had been used to disperse those. A protester in the southern city of Shiraz said demonstrations there were relatively small and short. “People were sad and they lit some candles and shouted slogans,” said Mehdi, 49. “But most were middle-class and so didn’t do any radical acts. They were dispersed by police after two hours.”
Iran’s revelation that it shot down the jet sparked anger and disgust even among ordinarily pro-regime figures including several journalists. A former news anchor with a state-run TV2 channel said on Monday she would never return to the network, writing in an Instagram post: “Forgive me for the 13 years I told you lies.”
Protests map
The incident has also led to unprecedented statements of contrition from Iran’s hardline Revolutionary Guards. Ali Hajizadeh, the organisation’s aerospace commander, said at the weekend that an air defence unit near Tehran’s airport had been advised a cruise missile had been fired at the country and was on its highest alert.
He said the unit first observed the passenger jet around 19 miles away and a missile operator had identified it as a cruise missile. Due to a breakdown in his communications system, the operator was unable to seek approval to fire at the cruise missile.
“He had 10 seconds to decide: he could hit or not hit [the target],” Hajizadeh said. “Under such circumstances, he decided to make that bad decision: he engages, the missile is fired, and the plane is hit.”
2020-01-14 5 years ago / 未收藏/ guardian发送到 kindle
2020-01-13T23:58:55Z
Bernie Sanders hosts a climate rally in Iowa City, Iowa, Sunday.


2020-01-14 5 years ago / 未收藏/ guardian发送到 kindle
2020-01-13T20:00:14Z
A xenobot
Be warned. If the rise of the robots comes to pass, the apocalypse may be a more squelchy affair than science fiction writers have prepared us for.
Researchers in the US have created the first living machines by assembling cells from African clawed frogs into tiny robots that move around under their own steam.
One of the most successful creations has two stumpy legs that propel it along on its “chest”. Another has a hole in the middle that researchers turned into a pouch so it could shimmy around with miniature payloads.
“These are entirely new lifeforms. They have never before existed on Earth,” said Michael Levin, the director of the Allen Discovery Center at Tufts University in Medford, Massachusetts. “They are living, programmable organisms.”
Roboticists tend to favour metal and plastic for their strength and durability, but Levin and his colleagues see benefits in making robots from biological tissues. When damaged, living robots can heal their wounds, and once their task is done they fall apart, just as natural organisms decay when they die.
graphic
Their unique features mean that future versions of the robots might be deployed to clean up microplastic pollution in the oceans, locate and digest toxic materials, deliver drugs in the body or remove plaque from artery walls, the scientists say.
“It’s impossible to know what the applications will be for any new technology, so we can really only guess,” said Joshua Bongard, a senior researcher on the team at the University of Vermont.
The robots, which are less than 1mm long, are designed by an “evolutionary algorithm” that runs on a supercomputer. The program starts by generating random 3D configurations of 500 to 1,000 skin and heart cells. Each design is then tested in a virtual environment, to see, for example, how far it moves when the heart cells are set beating. The best performers are used to spawn more designs, which themselves are then put through their paces.
Because heart cells spontaneously contract and relax, they behave like miniature engines that drive the robots along until their energy reserves run out. The cells have enough fuel inside them for the robots to survive for a week to 10 days before keeling over.
The scientists waited for the computer to churn out 100 generations before picking a handful of designs to build in the lab. They used tweezers and cauterising tools to sculpt early-stage skin and heart cells scraped from the embryos of African clawed frogs, Xenopus laevis. The source of the cells led the scientists to call their creations “xenobots”.
A xenobot with four limbs
A xenobot with four ‘limbs’. Photograph: Douglas Blackiston
Writing in the Proceedings of the National Academy of Sciences, the researchers describe how they set the robots loose in dishes of water to keep the frog cells alive. Some crept along in straight lines, while others looped around in circles or teamed up with others as they moved around.
“These are very small, but ultimately the plan is to make them to scale,” said Levin. Xenobots might be built with blood vessels, nervous systems and sensory cells, to form rudimentary eyes. By building them out of mammalian cells, they could live on dry land.
Sam Kriegman, a PhD student on the team at the University of Vermont, acknowledged that the work raised ethical issues, particularly given that future variants could have nervous systems and be selected for cognitive capability, making them more active participants in the world. “What’s important to me is that this is public, so we can have a discussion as a society and policymakers can decide what is the best course of action.”
Traces left by xenobots as they move through a field of particulate matter
Traces left by xenobots as they move through a field of particulate matter. Photograph: Douglas Blackiston
He was less concerned about xenobots posing any threat to humankind. “If you watch the video, it’s hard to fear that these things are taking over any time soon,” he said.
But the work aims to achieve more than just the creation of squidgy robots. “The aim is to understand the software of life,” Levin said. “If you think about birth defects, cancer, age-related diseases, all of these things could be solved if we knew how to make biological structures, to have ultimate control over growth and form.”
The research is funded by the US Defense Advanced Research Projects Agency’s lifelong learning machines programme, which aims to recreate biological learning processes in machines.
Thomas Douglas, a senior research fellow at the Oxford Uehiro Centre for Practical Ethics, said: “There are interesting ethical questions about the moral status of these xenobots. At what point would they become beings with interests that ought to be protected? I think they’d acquire moral significance only if they included neural tissue that enabled some kind of mental life, such as the ability to experience pain.
“But some are more liberal about moral status. They think that all living creatures have interests that should be given some moral consideration. For these people, difficult questions could arise about whether these xenobots should be classified as living creatures or machines.”


2020-01-14 5 years ago / 未收藏/ guardian发送到 kindle
2020-01-13T19:21:30Z
The decision to drop the designation comes ahead of the announcement of a trade deal between the two sides.
The Trump administration is preparing to drop charges that China has been unfairly manipulating its currency as the two economic superpowers move closer to a trade deal.
The decision to drop the designation, first reported by Fox Business News, comes ahead of the announcement of a trade deal between the two sides, expected on Wednesday. The trade dispute has rocked US manufacturing and caused an economic slowdown in China.
The treasury department is expected to release its currency report on Monday afternoon, its first public analysis since the US labeled Beijing a “currency manipulator” last August.
That designation, the first the US had made against China since 1994, escalated the long-running trade dispute between the two countries with Beijing accusing the US of “deliberately destroying international order” and undermining world stability.
Senior Chinese officials arrived in Washington on Monday to finalize the “phase one” trade agreement, which will be signed at the White House.
Last month, the US and China agreed to a partial trade deal with Beijing pledging to purchase up to $200bn of American products over the next two years, including agricultural goods from the US’s hard-hit farmers.
Donald Trump has long argued that China undervalues its currency in order to game international trade, charging the country was perpetrating one of the “greatest thefts in the history of the world”.
But the dispute has hurt both sides. On Monday the car giant Ford said its China sales had fallen for the third year in a row in 2019, dropping to less than half of what it sold at its peak in 2016.
Wednesday’s agreement is expected to contain a promise from both sides that they will not use their currency to unfair advantage.


2020-01-14 5 years ago / 未收藏/ guardian发送到 kindle
2020-01-13T21:43:19Z
Toni Comín, Roger Torrent, Carles Puigdemont and others
Catalonia’s former president has arrived in the European parliament to take his seat, vowing to continue fighting for the jailed Catalan leader Oriol Junqueras, who lost his bid to become an MEP.
Carles Puigdemont, who fled to Belgium after organising Catalonia’s illegal referendum in October 2017, posed for pictures with a “Free Junqueras” poster on Monday, alongside his ally and fellow new MEP, Toni Comín.
The pair were caught in an extended legal tangle over whether they could take their seats after being elected to the European parliament in May 2019, as was Junqueras, who is serving a 13-year jail term for his role in the failed bid for secession.
European parliamentary authorities announced last Friday that Puigdemont and Comín had begun their mandate on 2 July, the day the new parliament met for the first time, following a ruling from the European court of justice that boosted the separatist leaders’ cause.
However, the parliament said Junqueras was no longer an MEP, because Spain’s supreme court had ruled last week that he was not eligible to serve because of his conviction for sedition and misuse of public funds.
Flanked by Comín and six MEP supporters at a news conference, Puigdemont said: “We are proud to be here, but we are not happy because we miss Oriol Junqueras. And we will continue fighting until Mr Junqueras returns to his house, because he was a member of [this] parliament for several years before.”
Junqueras, chairman of the separatist party Esquerra Republicana de Catalunya (ERC), served as an MEP from 2009 to 2011.
Puigdemont, who made a home in the Belgian town of Waterloo after fleeing Spain in 2017, also made clear that he intended to continue his efforts to make the bitterly fought Catalonia crisis a European question.
He hopes to join other separatist parties, such as the Scottish National party and Plaid Cymru, as a member of the Greens-European Free Alliance group, the fourth largest group in the parliament. But the group has not decided yet whether to admit the new Catalans.
In 2017, Puigdemont organised a referendum, criticised for violating the rules of the Catalan parliament and trampling on democratic norms, before making an illegal declaration of independence. He avoided trial on charges of sedition, rebellion and misuse of public funds by fleeing to Belgium. Last October, nine Catalan separatist leaders were jailed for their part in the failed bid for independence, including Junqueras.
The European parliament announced last Friday that Junqueras would no longer be recognised as an MEP, the day after Spain’s supreme court ruled that he was not eligible because of his conviction.
“Taking into account the decision of the Junta Electoral Central [Spain’s electoral commission] of 3 January 2020 and pursuant to the decision of the Tribunal Supremo of 9 January 2020, the mandate of Junqueras i Vies terminated with effect on 3 January 2020,” the European parliament president, David Sassoli, said in a statement.
Catalan independence supporters vowed to continue to press parliamentary authorities to reinstate his immunity. The separatists have also said they are appealing to Spain’s supreme court, but their prospects of success are unclear.
Officials from the European parliament said they were still considering whether Junqueras was entitled to six months’ pay, as he is considered to have been an MEP from 2 July until last week.
Its rules mean an MEP cannot be subject to detention or legal proceedings because of views expressed or votes cast as an MEP, but it cannot be claimed if the person has committed an offence.


2020-01-14 5 years ago / 未收藏/ guardian发送到 kindle
2020-01-13T22:09:40Z
People wear breathing masks to protect themselves from a thick smoke haze that hangs over Melbourne from the bushfires. Tuesday, January 14, 2020. (AAP Image/David Crosling) NO ARCHIVING
Melbourne has been hit by hazardous air pollution as smoke from bushfires in Victoria’s east and in New South Wales drifts through the state.
The city centre recorded hazardous levels of fine particles in the air from 12am to 4am and had since been categorised as very poor by the Environmental Protection Authority.
Air quality forecasts for Geelong, Latrobe Valley, Melbourne, central region, all of Gippsland and the north central region were all listed as hazardous for Tuesday by the EPA.
Firefighters spent the night being called out to fire alarms triggered by the smoke haze.
The Metropolitan Fire Brigade told radio station 3AW on a normal night crews would attend about 20 false alarms, but overnight they were called out to about 200, but each had to be treated as a potential fire.
Those with heart and respiratory issues were being told to keep out of the smoke, but even healthy people were being warned to stay inside.
The fires burning through Victoria’s east and north-east have claimed four men’s lives, 353 homes and 548 other structures.
Sixteen fires were still burning and 1.4m hectares had been destroyed across the state.
Slightly calmer weather forecast was allowing firefighters to try to build containment lines, while military personnel were working to make isolated towns accessible by road.
2020-01-14 5 years ago / 未收藏/ guardian发送到 kindle
2020-01-13T20:56:21Z
Woman in front of Huawei sign.
Senior US officials told British ministers on Monday that using Huawei technology in UK 5G networks would put transatlantic intelligence sharing at risk, warning that allowing the Chinese firm access would be “nothing short of madness”.
The extraordinary American ultimatum came as a special delegation led by Donald Trump’s deputy national security advisor, Matt Pottinger, presented an incendiary dossier which they said featured new evidence of the security risks of relying on Huawei technology in future phone networks.
The intense and public lobbying presents an immediate headache for Boris Johnson, the prime minister, who had been expected to make a final decision about Huawei shortly, having been repeatedly advised by the UK’s security establishment that any security risks can be contained.
Ahead of the UK decision the head of MI5, Andrew Parker, said over the weekend that he saw “no reason to think” that using Huawei technology should threaten intelligence sharing with the US, suggesting that Britain was poised to give the Chinese company the go-ahead.
But that assertion was flatly contradicted by a senior US official who was part of the delegation, who said: “Congress has made it clear they will want an evaluation of our intelligence sharing.”
A second member said that the US president hoped not to fall out with the UK over the issue but added: “Donald Trump is watching closely”.
Last spring, the UK had indicated it would allow Huawei to supply non-core technology such as mobile phone masts and antennas in future 5G networks, after a cabinet committed had voted by 5 to 4 in favour. But even that would not be enough to allay Washington’s concerns, the US officials said.
Huawei has consistently denied that it has ever been asked by the Chinese government to introduce secret “back doors” into its technology, and has even offered to sign a “no spy agreement” with countries adopting it. But the US insists there is a surveillance risk.
The officials, who had flown in specially from the US, would not spell out what the “relatively recent information” that they had shared with their UK counterparts was, but it is understood to be of a technical nature.
Although the long-standing intelligence-sharing relationship between the US and the UK would not be immediately compromised, they said that members of Congress would want to review it in future legislation.
A final decision will also be seen as a crucial early signal in how far the UK wants to move towards the US orbit as trade talks with both Washington and Brussels loom after Britain formally leaves the EU at the end of January.
As well as Pottinger, key officials in the US delegation of six included Chris Ford, an assistant secretary in the US state department, and Robert Blair, the special envoy for international telecoms.
The delegation claimed that Chinese spies, working for the People’s Liberation Army, also worked simultaneously for Huawei – and that the company “had played a role” in supporting the “re-education camps” for the country’s Muslim Uighur minority.
British sources initially said that they were only going to meet civil servants, but the US delegation said they had spoken to at least one cabinet minister.
Huawei is one of three companies that supply equipment to Vodafone, BT and other mobile phone companies for high-speed 5G networks, alongside Ericsson of Sweden and Nokia from Finland.
Its kit is recognised by UK phone companies as being cheaper and more advanced than rivals, and some believe that the Trump administration wants to weaken China’s advanced position in the market for trade reasons.
A Huawei spokesperson said it was a private company that has supplied the UK for the past 15 years and that parliamentary committees had concluded there is no technical reason to ban it from supplying 5G equipment.
The spokesman added: “And now, Andrew Parker, the head of MI5, says he has ‘no reason to think’ that the UK’s intelligence-sharing relationship with the US would be hit if Britain continued to use Huawei technology. We’re confident the government will take a decision based on evidence – not unsubstantiated allegations.”


2020-01-14 5 years ago / 未收藏/ guardian发送到 kindle
2020-01-13T19:01:13Z
Gigi Hadid exits the courthouse in New York City Monday.
Model Gigi Hadid was revealed on Monday to be one of the potential jurors at the rape trial of disgraced movie mogul Harvey Weinstein now under way in New York.
As lawyers for Weinstein and his accusers continue to winnow down a pool of more than a hundred potential jurors, Hadid was seen in the long line of potential jurors filing into the courtroom in Manhattan on Monday morning.
Sitting in the jury box, Hadid told James Burke, the judge, that she had met the defendant and she knew Salma Hayek, an actor who has accused Weinstein of sexual harassment and aggression when she rebuffed his advances. Hadid is also known to be a friend of Cara Delevingne, who also has gone public with accusations of sexual harassment against Weinstein and talked about the #MeToo movement.
When Burke asked Hadid if she could be an impartial juror, she said: “I think I’m still able to keep an open mind on the facts.”
Weinstein has pleaded not guilty to five counts that include raping a woman in 2013 and forcing another woman to engage in oral sexual conduct in 2006. The most serious charge is predatory sexual assault, carrying a maximum sentence of life.
Hadid’s appearance is the latest controversy in the high-profile trial that is still in its early stages.
Last week, Burke blasted Weinstein for using his cellphone in the courtroom, threatening to revoke his bail if he does not behave and, outside, activists staged a protest, following a silent demonstration by other famous women accusing the producer that took place when the trial began a week ago.
Forty jurors were dismissed from the trial last week. Burke said he hopes to have a jury set by next week. The case continues.
2020-01-14 5 years ago / 未收藏/ guardian发送到 kindle
2020-01-13T21:46:26Z
Soldiers stand guard with a military coalition in Yemen that backed by Saudi Arabia and the United Arab Emirates.
Australian companies are selling weapons and military technology to countries around the world accused of war crimes, but the Australian government has refused to say what weapons are being sent overseas and to whom.
Nearly 100 permits were issued to export weapons and military technology to the United Arab Emirates, Saudi Arabia, Sri Lanka and the Democratic Republic of Congo over the 2018-2019 financial year. But the Australian defence department has refused to reveal how many weapons have been sold, for how much, or for what purpose.
The extent of and extreme secrecy surrounding Australia’s foreign weapons sales are revealed by documents obtained by the Guardian under freedom of information laws.
Save for their existence and confirmation of country of destination, the documents are almost entirely redacted by the government, which has argued the information is commercial-in-confidence. That decision is being challenged by the Guardian.
Between June of 2018 and July 2019, Australia issued 45 weapons export permits to the United Arab Emirates, 23 to Saudi Arabia, 14 to Sri Lanka and four to the Democratic Republic of Congo.
Some of the weapons permits are extraordinarily detailed. One single permit, for a weapons technology export, runs to 403 pages, and contains hundreds of items. All of these details are redacted by the defence department.
Nearly $5bn worth of declared value defence permits were issued by Australia in 2018-19, a dramatic increase on the $1.6bn approved the previous year.
Redacted pages from The Guardian’s freedom of information request regarding Australia’s defence exports for 2018-19. More than 1,200 pages have been heavily redacted regarding exports to Saudi Arabia, the United Arab Emirates, the Democratic Republic of Congo, and Sri Lanka.
The UAE’s military, whose Presidential Guard is commanded by retired Australian army major general Mike Hindmarsh, has been accused of war crimes in the brutal conflict in Yemen, where a coalition of UAE, Saudi and Yemeni government military forces are engaged in a bitter battle with Houthi rebels believed to be backed by Iran.
Saudi Arabia’s military has led the coalition fighting in the five-year conflict, which has been plagued by human rights abuses including hospitals being bombed, civilians being targeted by shelling and sniper fire, civilian populations being deliberately starved, medical supplies being blocked, rape, murder, enforced disappearances, torture, and forcing children to fight.
Australian weapons systems manufacturer Electro Optics Systems (EOS) – which supplies the Saudi military with remote weapon stations – has told the Guardian their equipment does not cross the border into Yemen.
But a report by a United Nations panel of experts, including former Australian MP and international lawyer Melissa Parke, said countries who supplied weapons to the militaries of the UAE or Saudi Arabia could be complicit in war crimes being committed in the Yemen conflict.
The Sri Lankan military has been accused of war crimes over several years and complicity in the continued disappearance, abuse and torture of Tamil citizens, democracy activists, journalists and opponents of the government.
Recently re-elected prime minister, former president Mahinda Rajapaksa, led the military at the conclusion of the country’s civil war: the 2009 operation to end the war left up to 40,000 civilians dead, according to a UN experts’ report.
The current head of the military, Shavendra Silva, led the Sri Lankan army’s 58 Division unit in 2009, which was accused of intentional and indiscriminate attacks on civilians, no-fire zones and hospitals.
The Democratic Republic of Congo has had a number of arms embargoes imposed upon it since 2003 because of a supply of weapons fuelling mass killings, human rights abuses and torture. The government’s military was previously included in sanctions banning the supply of all arms and related material, but was removed from the sanctions list in 2008. Arms embargoes still apply to non-government forces.
All exports of arms require licences from the defence department’s export controls branch. The department has previously told Senate estimates that export licences are not issued if the weapons are likely to be used in human rights abuses.
“If we assess that they would be used [to commit human rights abuses], we would not approve the permit,” Tom Hamilton, then acting deputy secretary of the defence department’s strategic policy and intelligence group, said in February.
Defence says it runs rigorous risk assessments on weapons prior to export. That process involves examining human rights, Australia’s international obligations, foreign policy, national security and regional security.
“This assessment includes consideration of whether there is an overriding risk that the exported items could be used to commit or facilitate a serious violation of international humanitarian law,” a spokeswoman said last year.
Dr Margaret Beavis, vice president of the Medical Association for Prevention of War, said it was well past time for the defence department’s “notorious secrecy” around Australian arms sales to end.
“If Australia is complying with all its legal obligations, as defence claims, what have they got to hide? This claim that they are protecting the commercial interests of weapons sellers is woefully insufficient justification for the blanket secrecy surrounding Australian weapons sales to nations accused of war crimes.”
Freedom of information expert Peter Timmins said failing to tell the Australian public which countries the government was exporting arms to was “quite remarkable”, given former defence minister Christopher Pyne was open about his intention to sell arms to Saudi Arabia.
“Having put on the public record that we intend to increase our arms sales to a country like Saudi Arabia, to then not disclose that we might have issued an export permit to enable the export of arms to Saudi Arabia seems quite remarkable,” he told the Guardian.
Timmins is concerned the spirit and intent of the FoI Act are increasingly being disregarded in favour of secrecy.
“The proper test of the act is to make information available promptly that goes to accountability, transparency, good government, or poor government as the case may be,” he said.


2020-01-14 5 years ago / 未收藏/ nasa发送到 kindle
2020-01-14 08:00:11
Are volcanoes still active on Venus? More volcanoes are known on Venus than Earth, but when Venusian volcanoes last erupted is not directly known. Evidence bolstering very recent volcanism on Venus has recently been uncovered, though, right here on Earth. Lab results showed that images of surface lava would become dim in the infrared in only months in the dense Venusian atmosphere, a dimming not seen in ESA's Venus Express images. Venus Express entered orbit around Venus in 2006 and remained in contact with Earth until 2014. Therefore, the infrared glow (shown in false-color red) recorded by Venus Express for Idunn Mons and featured here on a NASA Magellan image indicates that this volcano erupted very recently -- and is still active today. Understanding the volcanics of Venus might lead to insight about the volcanics on Earth, as well as elsewhere in our Solar System.

Image Copyright: Image Credit: NASA, JPL-Caltech, ESA, Venus Express: VIRTIS, USRA, LPI
2020-01-14 5 years ago / 未收藏/ nasa发送到 kindle
2020-01-13 08:00:07
A good place to see a ring-of-fire eclipse, it seemed, would be from a desert. In a desert, there should be relatively few obscuring clouds and trees. Therefore late last December a group of photographers traveled to the United Arab Emirates and Rub al-Khali, the largest continuous sand desert in world, to capture clear images of an unusual eclipse that would be passing over. A ring-of-fire eclipse is an annular eclipse that occurs when the Moon is far enough away on its elliptical orbit around the Earth so that it appears too small, angularly, to cover the entire Sun. At the maximum of an annular eclipse, the edges of the Sun can be seen all around the edges of the Moon, so that the Moon appears to be a dark spot that covers most -- but not all -- of the Sun. This particular eclipse, they knew, would peak soon after sunrise. After seeking out such a dry and barren place, it turned out that some of the most interesting eclipse images actually included a tree in the foreground, because, in addition to the sand dunes, the tree gave the surreal background a contrasting sense of normalcy, scale, and texture.

Image Credit & Copyright: Maxime Daviron
2020-01-14 5 years ago / 未收藏/ nasa发送到 kindle
2020-01-13 17:00:06
NASA's next destination in the solar system is the unique, richly organic world Titan. Advancing our search for the building blocks of life, the Dragonfly mission will fly multiple sorties to sample and examine sites around Saturn's icy moon.


Dragonfly is slated to launch in 2026 and arrive in 2034. The rotorcraft will fly to dozens of promising locations on Titan looking for prebiotic chemical processes common on both Titan and Earth. Dragonfly marks the first time NASA will fly a multi-rotor vehicle for science on another planet; it has eight rotors and flies like a large drone. It will take advantage of Titan's dense atmosphere – four times denser than Earth's – to become the first vehicle ever to fly its entire science payload to new places for repeatable and targeted access to surface materials.

Titan is an analog to the very early Earth, and can provide clues to how life may have arisen on our planet. During its 2.7-year baseline mission, Dragonfly will explore diverse environments from organic dunes to the floor of an impact crater where liquid water and complex organic materials key to life once existed together for possibly tens of thousands of years. Its instruments will study how far prebiotic chemistry may have progressed. They also will investigate the moon's atmospheric and surface properties and its subsurface ocean and liquid reservoirs. Additionally, instruments will search for chemical evidence of past or extant life.

Image Credit: NASA/JHU-APL
2020-01-14 5 years ago / 未收藏/ behance发送到 kindle

2020-01-14 5 years ago / 未收藏/ behance发送到 kindle

This is a selection of drawings I did in winter and spring of 2019.
2020-01-14 5 years ago / 未收藏/ behance发送到 kindle

Un Feu Distinct Series IV
2020-01-14 5 years ago / 未收藏/ behance发送到 kindle

In packaging design, we give priority to how to distinguish it from the existing instant food in the market, and cope with hundreds of individual products that may appear in the future through systematic design.
2020-01-14 5 years ago / 未收藏/ behance发送到 kindle

2020-01-14 5 years ago / 未收藏/ behance发送到 kindle

The Movement Festival is the main Italian indoor event for electronic music and a well-testified place among leading electronic music events in Europe. This continuous aim to grow and expand its limits, quality and quantity wise, led to a prestigious recognition ? the patronage of the European Commission (shared with the "twin", open-air event Kappa FuturFestival). But most of all, it led to a loyal following: all people attending feel, in a way, that they're part of something special, something unique, where the line up and the numbers are a just a part of the whole experience. An experience-based on brotherhood, intensity, innovation, challenges, quality. Along with Kakia Konstantinaki, we had the honour to design the video teaser and the graphics for the Movement Festival 2019 (a Smiling Sisters production).
2020-01-14 5 years ago / 未收藏/ howtoforge发送到 kindle
YetiForce is a free and open-source Customer Relationship Management system that helps to manage relations with customers, suppliers, partners and staff. In this tutorial, we will show you how to install YetiForce on Debian 10 with Let's Encrypt free SSL.
2020-01-13 5 years ago / 未收藏/ howtoforge发送到 kindle
phpMyAdmin is a free and open-source tool to manage MySQL and MariaDB servers over a web-based interface. In this tutorial, we will show you how to install and secure phpMyAdmin on CentOS 8 server.
民工哥 / 2020-01-14 5 years ago / 未收藏/ SegmentFault 最新的文章发送到 kindle
Linux系统集群架构线上项目配置实战(一)
Linux系统集群架构线上项目配置实战(二)
前面介绍了分发文件管理、前端反向代理与管理后台服务器的配置操作,今天介绍下前端负载与APP服务器(用户与商家)、官网、FTP服务器的配置操作

1、前端负载均衡配置

安装所需的依赖包
yum install pcre-devel zlib-devle openssl-devel gcc-c++ –y
编译安装nginx
cd /download/tools/

wget http://nginx.org/download/nginx-1.12.1.tar.gz

tar zxf nginx-1.12.1.tar.gz

cd nginx-1.12.1

./configure --prefix=/app/nginx-1.12.1

make && make install

[root@centos ~]# cd /app/

[root@centos app]# ln -s nginx-1.12.1 nginx

[root@centos ~]# cd /app/nginx/conf/

[root@centos conf]# mkdir extra

[root@centos conf]# cp nginx.conf nginx.conf.bak
在nginx.conf文件后增加下面的配置
include extra/*.conf;

  

[root@centos conf]# cd extra/

 [root@centos extra]# vim user.app.conf

#

# HTTPS server configuration

#

upstream userapp {

      server 10.0.0.4:8080;

      server 10.0.0.4:8081;

}

server {

    listen       80;

    server_name app.mingongge.com;

    location / {

        proxy_pass http://userapp;

        proxy_connect_timeout 600;

        proxy_read_timeout 600;

        proxy_send_timeout 600;

  

}
[root@centos conf]# cd extra/

[root@centos conf]# vim sj.app.conf

#

# HTTPS server configuration

#

upstream sjapp {

      server 10.0.0.5:8080;

      server 10.0.0.5:8081;

}

  

server {

    listen       80;

    server\_name sjapp.mingongge.com;

    location / {

        proxy_pass http://sjapp;

        proxy_connect_timeout 600;

        proxy_read_timeout 600;

        proxy_send_timeout 600;

}

}
2、后端APP服务器配置
后端APP服务器JAVA环境安装配置
[root@centos tools]# ll

total 181168

-rw-r--r-- 1 root root 185515842 Sep 20 15:52 jdk-8u144-linux-x64.tar.gz

[root@centos tools]# tar zxf jdk-8u144-linux-x64.tar.gz -C /usr/local/

[root@centos tools]# ln -s /usr/local/jdk1.8.0_144 /usr/local/jdk

[root@centos tools]# cat >>/etc/profile<<EOF

export JAVA_HOME=/usr/local/jdk

export CLASSPATH=.CLASSPATH:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

export PATH=$JAVA_HOME/bin:$PATH

EOF

[root@centos tools]# tail -3 /etc/profile

export JAVA_HOME=/usr/local/jdk

export CLASSPATH=.CLASSPATH:/lib/dt.jar:/lib/tools.jar

export PATH=$JAVA_HOME/bin:$PATH

[root@centos tools]# source /etc/profile

[root@centos tools]# java -version

java version "1.8.0_144"

Java(TM) SE Runtime Environment (build 1.8.0_144-b01)

Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
后端tomcat 配置
wget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.5.20/bin/apache-tomcat-8.5.20.tar.gz

[root@centos tools]# tar zxf apache-tomcat-8.5.20.tar.gz -C /usr/local/

[root@centos tools]# ln -s /usr/local/apache-tomcat-8.5.20 /usr/local/tomcat

[root@centos tools]# cd /usr/local/apache-tomcat-8.5.20/conf/

[root@centos conf]# vim server.xml

-------------此处省略N行--------------

<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"

   prefix="localhost_access_log" suffix=".txt"

   pattern="%h %l %u %t &quot;%r&quot; %s %b" />

**<Context path="" docBase="/www/userapp" debug="0" reloadable="true" crossContext="true" />**

#增加上述站点目录  

[root@centos conf]# mkdir /www/userapp -p

echo "this is the frist userapp server" >/www/userapp/index.html
[root@centos conf]# ../bin/startup.sh

Using CATALINA_BASE:   /usr/local/apache-tomcat-8.5.20

Using CATALINA_HOME:   /usr/local/apache-tomcat-8.5.20

Using CATALINA_TMPDIR: /usr/local/apache-tomcat-8.5.20/temp

Using JRE_HOME:  /usr/local/jdk

Using CLASSPATH: /usr/local/apache-tomcat-8.5.20/bin/bootstrap.jar:/usr/local/apache-tomcat-8.5.20/bin/tomcat-juli.jar

Tomcat started.

[root@centos conf]# lsof -i :8080

COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME

java 1587 root 48u IPv6 18137 0t0 TCP *:webcache (LISTEN)
另外一台用户APP 服务器按上述的配置进行
[root@centos conf]# mkdir /www/userapp -p

echo "this is the second userapp ">/www/userapp/index.html

商家APP环境配置请参考上面的配置
[root@centos conf]# mkdir /www/sjapp -p

echo "this is the frist sjapp ">/www/userapp/index.html

echo "this is the second sjapp ">/www/userapp/index.html
接下来测试下负载均衡
前端负载均衡测试
[root@centos conf]# curl http://10.0.0.1

this is the userapp server

[root@centos conf]# curl http://10.0.0.1

this is the second userapp

[root@centos conf]# curl http://app.mingongge.com

this is the userapp server

[root@centos conf]# curl http://app.mingongge.com

this is the second userapp

[root@centos extra]# curl http://sjapp.mingongge.com

this is the first sjapp server

[root@centos extra]# curl http://sjapp.mingongge.com

this is the second sjapp
浏览器访问测试
本地浏览器测试需要配置hosts文件
10.0.0.1 app.mingongge.com

10.0.0.1 sjapp.mingongge.com


3、官网与图片服务器配置

基本的架构也是一样使用反向代理,为了后期整体架构扩展
Nginx FTP的安装就不再描述了,太简单了,扯多了累
前面反向代理配置如下

[root@centos extra]# vim web.mingongge.conf
#

# HTTPS server configuration

# 

server {

    listen       80;

    server_name www.mingongge.com;

    location / {

        proxy_pass http://10.0.0.8;

        proxy_connect_timeout 600;

        proxy_read_timeout 600;

        proxy_send_timeout 600;  

}

}
[root@centos extra]# vim ftp.mingongge.com
#
# HTTPS server configuration
#

server {

    listen       80;

    server\_name ftp.mingongge.com;

    location / {

        proxy_pass http://10.0.0.8:88;

        proxy_connect_timeout 600;

        proxy_read_timeout 600;

        proxy_send_timeout 600;  

}

}
后端WEB服务器配置
[root@centos html]# vim index.html

welcome to mingongge.s web stie!!!!!!!!!!!!!

[root@centos ~]# /usr/local/nginx/sbin/nginx -t

nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok

nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

[root@centos ~]# /usr/local/nginx/sbin/nginx

[root@centos ~]# curl 10.0.0.8

welcome to mingongge.s web stie!!!!!!!!!!!!!
FTP这块的配置其实是就是管理后台通过应用程序上传图片,前面用户通过nginx能访问到正确的页面即可,由于线下测试环境,不可能拿生产代码来做实验,因此管理后台上传图片无法模拟,过程就是后台上传图片是通过FTP的功能上传到指定的目录,然后前端通过nginx来调用这个图片去显示
因此就配置下访问图片即可
[root@centos conf]# cd extra/

[root@centos extra]# vim ftp.mingongge.conf

server {

   listen       88;

    server_name  localhost;  

 location / {

    root   /www/ftp;

      }
上传图片进行测试

通过前端反向代理直接访问域名来读取图,来实现应用程序调用图片的功能在其它前台页面展示的功能

发现也是可以正常访问的
jrainlau / 2020-01-14 5 years ago / 未收藏/ SegmentFault 最新的文章发送到 kindle
一座被设计为能避开气流的建筑 (https://pixelz.cc)
软件应用程序在计算机的主存储器中运行,我们称之为随机存取存储器(RAM)。JavaScript,尤其是 NodeJS (服务端 JS)允许我们为终端用户编写从小型到大型的软件项目。处理程序的内存总是一个棘手的问题,因为糟糕的实现可能会阻塞在给定服务器或系统上运行的所有其他应用程序。C 和 C++ 程序员确实关心内存管理,因为隐藏在代码的每个角落都有可能出现可怕的内存泄漏。但是对于 JS 开发者来说,你真的有关心过这个问题吗?
由于 JS 开发人员通常在专用的高容量服务器上进行 web 服务器编程,他们可能不会察觉多任务处理的延迟。比方说在开发 web 服务器的情况下,我们也会运行多个应用程序,如数据库服务器( MySQL )、缓存服务器( Redis )和其他需要的应用。我们需要知道它们也会消耗可用的主内存。如果我们随意地编写应用程序,很可能会降低其他进程的性能,甚至让内存完全拒绝对它们的分配。在本文中,我们通过解决一个问题来了解 NodeJS 的流、缓冲区和管道等结构,并了解它们分别如何支持编写内存有效的应用程序。
我们使用 NodeJS v8.12.0 来运行这些程序,所有代码示例都放在这里:
narenaryan/node-backpressure-internals
原文链接:Writing memory efficient software applications in Node.js

问题:大文件复制

如果有人被要求用 NodeJS 写一段文件复制的程序,那么他会迅速写出下面这段代码:
const fs = require('fs');

let fileName = process.argv[2];
let destPath = process.argv[3];

fs.readFile(fileName, (err, data) => {
    if (err) throw err;

    fs.writeFile(destPath || 'output', data, (err) => {
        if (err) throw err;
    });
    
    console.log('New file has been created!');
});
这段代码简单地根据输入的文件名和路径,在尝试对文件读取后把它写入目标路径,这对于小文件来说是不成问题的。
现在假设我们有一个大文件(大于4 GB)需要用这段程序来进行备份。就以我的一个达 7.4G 的超高清4K 电影为例子好了,我用上述的程序代码把它从当前目录复制到别的目录。
$ node basic_copy.js cartoonMovie.mkv ~/Documents/bigMovie.mkv
然后在 Ubuntu(Linux )系统下我得到了这段报错:
/home/shobarani/Workspace/basic_copy.js:7
    if (err) throw err;
             ^
RangeError: File size is greater than possible Buffer: 0x7fffffff bytes
    at FSReqWrap.readFileAfterStat [as oncomplete] (fs.js:453:11)
正如你看到的那样,由于 NodeJS 最大只允许写入 2GB 的数据到它的缓冲区,导致了错误发生在读取文件的过程中。为了解决这个问题,当你在进行 I/O 密集操作的时候(复制、处理、压缩等),最好考虑一下内存的情况。

NodeJS 中的 Streams 和 Buffers

为了解决上述问题,我们需要一个办法把大文件切成许多文件块,同时需要一个数据结构去存放这些文件块。一个 buffer 就是用来存储二进制数据的结构。接下来,我们需要一个读写文件块的方法,而 Streams 则提供了这部分能力。

Buffers(缓冲区)

我们能够利用 Buffer 对象轻松地创建一个 buffer。
let buffer = new Buffer(10); # 10 为 buffer 的体积
console.log(buffer); # prints <Buffer 00 00 00 00 00 00 00 00 00 00>
在新版本的 NodeJS (>8)中,你也可以这样写。
let buffer = new Buffer.alloc(10);
console.log(buffer); # prints <Buffer 00 00 00 00 00 00 00 00 00 00>
如果我们已经有了一些数据,比如数组或者别的数据集,我们可以为它们创建一个 buffer。
let name = 'Node JS DEV';
let buffer = Buffer.from(name);
console.log(buffer) # prints <Buffer 4e 6f 64 65 20 4a 53 20 44 45 5>
Buffers 有一些如 buffer.toString()buffer.toJSON() 之类的重要方法,能够深入到其所存储的数据当中去。
我们不会为了优化代码而去直接创建原始 buffer。NodeJS 和 V8 引擎在处理 streams 和网络 socket 的时候就已经在创建内部缓冲区(队列)中实现了这一点。

Streams(流)

简单来说,流就像 NodeJS 对象上的任意门。在计算机网络中,入口是一个输入动作,出口是一个输出动作。我们接下来将继续使用这些术语。
流的类型总共有四种:
  • 可读流(用于读取数据)
  • 可写流(用于写入数据)
  • 双工流(同时可用于读写)
  • 转换流(一种用于处理数据的自定义双工流,如压缩,检查数据等)
下面这句话可以清晰地阐述为什么我们应该使用流。
Stream API (尤其是 stream.pipe() 方法)的一个重要目标是将数据缓冲限制在可接受的水平,这样不同速度的源和目标就不会阻塞可用内存。
我们需要一些办法去完成任务而不至于压垮系统。这也是我们在文章开头就已经提到过的。
image
上面的示意图中我们有两个类型的流,分别是可读流和可写流。.pipe() 方法是一个非常基本的方法,用于连接可读流和可写流。如果你不明白上面的示意图,也没关系,在看完我们的例子以后,你可以回到示意图这里来,那个时候一切都会显得理所当然。管道是一种引人注目的机制,下面我们用两个例子来说明它。

解法1(简单地使用流来复制文件)

让我们设计一种解法来解决前文中大文件复制的问题。首先我们要创建两个流,然后执行接下来的几个步骤。
  1. 监听来自可读流的数据块
  2. 把数据块写进可写流
  3. 跟踪文件复制的进度
我们把这段代码命名为 streams_copy_basic.js
/*
    A file copy with streams and events - Author: Naren Arya
*/

const stream = require('stream');
const fs = require('fs');

let fileName = process.argv[2];
let destPath = process.argv[3];

const readabale = fs.createReadStream(fileName);
const writeable = fs.createWriteStream(destPath || "output");

fs.stat(fileName, (err, stats) => {
    this.fileSize = stats.size;
    this.counter = 1;
    this.fileArray = fileName.split('.');
    
    try {
        this.duplicate = destPath + "/" + this.fileArray[0] + '_Copy.' + this.fileArray[1];
    } catch(e) {
        console.exception('File name is invalid! please pass the proper one');
    }
    
    process.stdout.write(`File: ${this.duplicate} is being created:`);
    
    readabale.on('data', (chunk)=> {
        let percentageCopied = ((chunk.length * this.counter) / this.fileSize) * 100;
        process.stdout.clearLine();  // clear current text
        process.stdout.cursorTo(0);
        process.stdout.write(`${Math.round(percentageCopied)}%`);
        writeable.write(chunk);
        this.counter += 1;
    });
    
    readabale.on('end', (e) => {
        process.stdout.clearLine();  // clear current text
        process.stdout.cursorTo(0);
        process.stdout.write("Successfully finished the operation");
        return;
    });
    
    readabale.on('error', (e) => {
        console.log("Some error occured: ", e);
    });
    
    writeable.on('finish', () => {
        console.log("Successfully created the file copy!");
    });
    
});
在这段程序中,我们接收用户传入的两个文件路径(源文件和目标文件),然后创建了两个流,用于把数据块从可读流运到可写流。然后我们定义了一些变量去追踪文件复制的进度,然后输出到控制台(此处为 console)。与此同时我们还订阅了一些事件:
data:当一个数据块被读取时触发
end:当一个数据块被可读流所读取完的时候触发
error:当读取数据块的时候出错时触发
运行这段程序,我们可以成功地完成一个大文件(此处为7.4 G)的复制任务。
$ time node streams_copy_basic.js cartoonMovie.mkv ~/Documents/4kdemo.mkv
然而,当我们通过任务管理器观察程序在运行过程中的内存状况时,依旧有一个问题。
image
4.6GB?我们的程序在运行时所消耗的内存,在这里是讲不通的,以及它很有可能会卡死其他的应用程序。

发生了什么?

如果你有仔细观察上图中的读写率,你会发现一些端倪。
Disk Read: 53.4 MiB/s
Disk Write: 14.8 MiB/s
这意味着生产者正在以更快的速度生产,而消费者无法跟上这个速度。计算机为了保存读取的数据块,将多余的数据存储到机器的RAM中。这就是RAM出现峰值的原因。
上述代码在我的机器上运行了3分16秒……
17.16s user 25.06s system 21% cpu 3:16.61 total

解法2(基于流和自动背压的文件复制)

为了克服上述问题,我们可以修改程序来自动调整磁盘的读写速度。这个机制就是背压。我们不需要做太多,只需将可读流导入可写流即可,NodeJS 会负责背压的工作。
让我们将这个程序命名为 streams_copy_efficient.js
/*
    A file copy with streams and piping - Author: Naren Arya
*/

const stream = require('stream');
const fs = require('fs');

let fileName = process.argv[2];
let destPath = process.argv[3];

const readabale = fs.createReadStream(fileName);
const writeable = fs.createWriteStream(destPath || "output");

fs.stat(fileName, (err, stats) => {
    this.fileSize = stats.size;
    this.counter = 1;
    this.fileArray = fileName.split('.');
    
    try {
        this.duplicate = destPath + "/" + this.fileArray[0] + '_Copy.' + this.fileArray[1];
    } catch(e) {
        console.exception('File name is invalid! please pass the proper one');
    }
    
    process.stdout.write(`File: ${this.duplicate} is being created:`);
    
    readabale.on('data', (chunk) => {
        let percentageCopied = ((chunk.length * this.counter) / this.fileSize) * 100;
        process.stdout.clearLine();  // clear current text
        process.stdout.cursorTo(0);
        process.stdout.write(`${Math.round(percentageCopied)}%`);
        this.counter += 1;
    });
    
    readabale.pipe(writeable); // Auto pilot ON!
    
    // In case if we have an interruption while copying
    writeable.on('unpipe', (e) => {
        process.stdout.write("Copy has failed!");
    });
    
});
在这个例子中,我们用一句代码替换了之前的数据块写入操作。
readabale.pipe(writeable); // Auto pilot ON!
这里的 pipe 就是所有魔法发生的原因。它控制了磁盘读写的速度以至于不会阻塞内存(RAM)。
运行一下。
$ time node streams_copy_efficient.js cartoonMovie.mkv ~/Documents/4kdemo.mkv
我们复制了同一个大文件(7.4 GB),让我们来看看内存利用率。
image
震惊!现在 Node 程序仅仅占用了61.9 MiB 的内存。如果你观察到读写速率的话:
Disk Read: 35.5 MiB/s
Disk Write: 35.5 MiB/s
在任意给定的时间内,因为背压的存在,读写速率得以保持一致。更让人惊喜的是,这段优化后的程序代码整整比之前的快了13秒。
12.13s user 28.50s system 22% cpu 3:03.35 total
由于 NodeJS 流和管道,内存负载减少了98.68%,执行时间也减少了。这就是为什么管道是一个强大的存在。
61.9 MiB 是由可读流创建的缓冲区大小。我们还可以使用可读流上的 read 方法为缓冲块分配自定义大小。
const readabale = fs.createReadStream(fileName);
readable.read(no_of_bytes_size);
除了本地文件的复制以外,这个技术还可以用于优化许多 I/O 操作的问题:
  • 处理从卡夫卡到数据库的数据流
  • 处理来自文件系统的数据流,动态压缩并写入磁盘
  • 更多……

源码(Git)

你可以在我的仓库底下找到所有的例子并在自己的机器上测试。
narenaryan/node-backpressure-internals

结论

我写这篇文章的动机,主要是为了说明即使 NodeJS 提供了很好的 API,我们也可能会一不留神就写出性能很差的代码。如果我们能更多地关注其内置的工具,我们便可以更好地优化程序的运行方式。
你在此可以找到更多关于“背压”的资料:
backpressuring-in-streams

完。
捷叔叔 / 2020-01-14 5 years ago / 未收藏/ SegmentFault 最新的文章发送到 kindle

DDD 入门

  1. 《领域驱动设计之PHP实现》全书翻译 - DDD入门
  2. 《领域驱动设计之PHP实现》全书翻译 - 架构风格
  3. 《领域驱动设计之PHP实现》全书翻译 - 值对象
  4. 《领域驱动设计之PHP实现》全书翻译 - 实体
  5. 《领域驱动设计之PHP实现》全书翻译 - 服务
  6. 《领域驱动设计之PHP实现》全书翻译 - 领域事件
  7. 《领域驱动设计之PHP实现》全书翻译 - 模块
  8. 《领域驱动设计之PHP实现》全书翻译 - 聚合
  9. 《领域驱动设计之PHP实现》全书翻译 - 工厂
  10. 《领域驱动设计之PHP实现》全书翻译 - 仓储
  11. 《领域驱动设计之PHP实现》全书翻译 - 应用服务
  12. 《领域驱动设计之PHP实现》全书翻译 - 集成上下文
  13. 《用PHP实现六边形架构》
如果你已经读过 Vaughn Vernon 和 Eric Evans 著作里的这些主题,你可能会很熟悉我们讲的是什么,因为我们大量借鉴了他们的定义和解释。领域驱动设计(DDD)是一种帮助我们理解和构建软件模型设计的方法。它提供了战略和战术模型工具来帮助我们设计高质量的软件从而达到我们的业务目标。
本书的主要目标是向你展示领域驱动设计战略模式的 PHP 代码实例。如果你想了解更多战略模式和领域驱动设计的核心,你最好去读 Vaughn Vernon 的《领域驱动设计精简版》和 Eric Evans 的《领域驱动设计参考:定义和模式摘要》。
更重要的是,领域驱动设计不是关于技术的。相反的,它是关于围绕业务挖掘知识,用技术来提供商业价值的。只有当你有能力理解你公司的业务时,你才可能参与到软件模型的探索过程,从而得到一个通用语言(Ubiquitous Language)。

为什么领域驱动设计重要

软件不仅仅是代码。如果你好好思考过这一点,代码绝非我们所追求的最终目标。代码只不过是解决业务问题的手段。领域驱动设计强调要确保业务和软件使用同一语言。所以为什么非要用不同的语言来讲述呢?只要打破其中壁垒,就不再需要翻译或者繁琐的同步过程,信息也不会丢失。每个人都可以为探索业务领域做出贡献,而不仅仅是程序员。最终所产出的软件就是公共语言的真实体现。
领域驱动设计同时提供了战略和战术设计的框架 -- 战略设计精确定位业务中最重要的领域,根据业务价值来进行开发;战术设计则通过久经考验构建块和模式来建立可工作的领域模型。

领域驱动设计的三个核心

领域驱动设计是交付软件的一种方法,它主要聚集三个核心要点:

1. 通用语言

为了建立业务领域的共同语言,领域专家和软件开发人员需要一起工作。这里没有我们与他们之分,这里只有我们。开发软件是一种商业投资而不仅是花销。为构建通用语言而作出的努力将帮助团队所有成员对领域有更深的认识。

2. 战略设计

领域驱动设计指明业务方向背后的战略,而不仅仅是技术层面。这有助于定义内部关系和早期预警反馈系统。在技术面,战略设计通过提供如何实现面向服务架构的动机来保护每个业务服务。

3. 战术设计

领域驱动设计提供工具和构建块来持续交付软件。战术设计工具产出的软件,不仅是正确,而且同时是易测试的和出错少的。

通用语言

通用语言,以及第十二章整合限界上下文,是领域驱动设计最具威力的一部分。
就上下文而言
现在设想一个限界上下文就是一个系统内的概念边界,边界内的通用语言是有其特殊含义的,而边界外的上下文概念可能有不同的含义。

那么,如何寻找,发现和捕获这些非常特别的语言呢,下面将列出几个要点:
  • 识别业务流程的关键点,输入和输出
  • 创建一些词汇和定义
  • 用一些文档来捕获重要的软件概念
  • 与团队其他人分享和扩展以上知识(开发人员和领域专家)
自从领域驱动设计诞生以来,改进构建通用语言进程的新技术层出不穷。其中最重要的也是现今使用最普遍的,就是事件风暴

事件风暴

Alberto Brandolini 在一个博客帖子上介绍了事件风暴及其好处,他解释得比我们简洁多了。事件风暴,就是一种快速发现复杂业务领域的研讨会形式:
  • 它非常强大:它让自己和许多参与者在数小时内提出一个完整业务流的综合模型,而以前往往需要数周。
  • 它非常吸引人:它整个想法就是为了构建一个模型而把有疑问的人和知道答案的人聚在同一个屋子里。
  • 它非常高效:它所得到的模型完全切合领域驱动设计的实施方式(尤其适合一种事件源方法),并可以快速确定上下文和聚合边界。
  • 它很简单:它的表示符号非常简单,也没有复杂的 UML 以致参会者想从讨论核心中抽身离开。
  • 它很有乐趣:我总是能主持一个美妙的工作会议,大家总是很投入并能提出超出他们预期的东西。正确的问题浮现了,气氛也是融洽的。
如果你想对事件风暴了解更多,请查阅 Brandolini 的书 《Introducing EventStorming》

关于领域驱动设计

领域驱动设计并不是银弹,就像软件里的一切都依赖于上下文。作为一个经验法则,使用它可以让你的领域模型简单化,绝不会增加复杂性。
如果你的应用仅仅是以数据为中心,用例也主要是在数据库行列上做 CRUD 操作,即增删改查,那么你并不需要领域驱动设计。你所需要的仅仅是在数据库之上做一个漂亮的前端。
如果你的应用少于 30 个用例,那最好使用像 Symfony 或者 Laravel 这样的框架来简单处理你的业务逻辑。
可是,如果你的应用超 30 个用例,你的系统可能走向一个可怕的大泥球。如果你知道你的系统确定无疑会变得越来越复杂,那么你应该考虑用领域驱动设计来应对这些复杂度。
如果你并不理解你工作中那些领域,因为它们很陌生,之前也没有任何人给出解决方案,那么对你来说应用领域驱动设计将变得很复杂。在这种情况下,你最需要与领域专家紧密工作来得到正确的模型。

棘手的部分

应用领域驱动设计并不容易。它需要时间和努力来投入到业务领域,术语,文献中,而不是代码堆里。你需要领域专家承诺参与到整个进程当中。这需要一个开放的,友好的持续交流,来将他们的行话(spoken lauguage)转化为我们的软件模型。另外我们要努力避免使用技术思维,而应该首先认真思考对象的行为和通用语言。

战略总结

为了给出领域驱动设计战略这部分一个总体概括,我们将用 Jimmy Nilsson 的书《应用领域驱动设计与模式》中的一种方法,即考虑两个空间:问题空间和解空间。
在问题空间里,领域驱动设计用领域和子域来规划和规类公司想要解决的问题。在在线旅行社(OTA)这个例子当中,问题是关于处理像航班机票,酒店预订这样的事情。这样的领域就可以规划为不同的子域,如价格,库存,用户管理等等。
在解空间里,领域驱动设计提供两种模式:限界上下文和上下文映射图。其目标是定义如何为所有已识别的子域提供一个实现,通过定义他们的交互和这些交互的细节。继续用 OTA 这个例子,每个子域问题都将用一个限界上下文实现来解决。例如,一个由价格管理子域团队开发的自定义 web 应用,以及用户管理子域的一个现成解决方案。上下文映射图将展示每个限界上下文是怎样与其它部分发生关联的。在上下文映射图内,我们可以看到两个限界上下文间有什么关联形式(例如:客户-供应商,伙伴)。理想的方案是每个子域由一个限界上下文实现,但实现不可能总是如此。就实现来说,依照领域驱动设计你就最终以一个分布式架构结束。正如你已经知道的,分布式架构远比单体架构复杂,那么为什么这个方法有意思,尤其是对大而复杂的公司来说?这真的值得吗?是的,它值得!
分布式架构被证明能提高企业整体生产效率,因为它能为你的产品定义好边界,从而让专门的团队来开发。
如果你需要解决的领域问题不是很复杂,应用领域驱动设计的战略部分会增加不必要的开销同时会拖慢你的研发速度。
如果你想了解更多关于领域驱动设计的战略部分,你应该去看看Vaughn Vernon的书《实现领域驱动设计》的前三章,或者Eric Evans的《领域驱动设计:软件核心复杂性应对之道》,二者对于这方面都有专门的讲解。

相关趋势:微服务与自包含系统

现在还有一些其他遵循领域驱动设计的相关运动正蓬勃发展,微服务和自包含系统就是很好的例子。James Lewis 和 Martin Fowler 在 Microservices Resource Guide 里是这样定义微服务
微服务架构风格是把单个应用的开发分解为一个个小的服务的方法,每个服务都有自己独立的进程和轻量的通信机制,通常是用 HTTP 资源的 API。这些服务都是围绕其业务能力构建,可独立部署自动升级,去中心管理。服务可以用不同的程序语言编写,使用不同的数据存储技术。
如果你想了解更多关于微服务的内容,他们的指导就是一个良好的开端。微服务是怎样与领域驱动设计发生关系的?按照 Sam Newman 《微服务设计》 一书中的解释,微服务就是领域驱动设计的限界上下文的实现。
除了微服务,另外一个相关的趋势就是自包含系统(SCS),依据自包含系统官网的解释:
自包含系统是关注将功能分离至许多独立系统的一种架构,由这些独立系统相互协作来提供一个完整的逻辑系统。这可以避免单体系统不断成长导致最后变得不可维护的问题。纵观过去的几年里,我们看到许多中型和大型项目受益于此。这个思路是把一个大型系统分解为一些更小的自包含系统,依照下列确定的规则(官网上同样有阐明自包含系统 的七个特征):
  1. 每个自包含系统是一个自治的web应用。对于自包含系统里的所有处理数据的逻辑和所有渲染 web 界面的代码都包含在其中。一个自包含系统可以完全自主处理其所有的用例,不用依赖其它可用的系统。
  2. 每个自包含系统由一个团队管理。这并不是必然意味着只有一个团队才可以改变代码,不过所有者团队可以最终决定什么可以放进代码库,例如合并,拉取请求。
  3. 不同自包含系统或者第三方系统间的通信任何情况下都应该是异步的。尤其是其他自包含系统或扩展系统不应该同步访问自包含系统内的请求/回复。这一点能帮助解耦系统,减少失败结果,因此能支持自治性。其目的是关于时间上的解耦:一个自包含系统可以很好的工作即使其它自包含系统临时离线。即使通信技术层次是同步的也能实现,例如复制数据或缓存请求。
  4. 一个自包含系统有可选的服务 API。因为每个自包含系统都有自己的 web UI 同用户交互,所以不需要一个 UI 服务。不过即便如此,为移动客户端或者其他自包含系统而存在的 API 仍然是有用的。
  5. 每个自包含系统必须包含数据与逻辑。要真正实现任何有意义的功能,两者都是必需的。一个自包含系统应该通过自身实现所有功能因此两者缺一不可。
  6. 一个自包含系统通过自身的UI将功能交给最终用户使用。因此自包含系统不应该与其他自包含系统共享UI。自包含系统可能仍旧与其它系统有关联。不过,异步整合意味着即使在其他自包含系统不可用的情况下还应该能正常工作。为避免紧耦合,一个自包含系统不应该与其他自包含系统共享业务代码。也许可以通过创建一个自包含系统或者公共库,例如:数据驱动层或者认证客户端。

练习

与你的同事讨论例如分布式架构的利弊。考虑用不同语言,部署过程,责任心等等。

小结

在这一章里你将学到:
  • 领域驱动设计不是关于技术的;它的价值实际上是通过聚焦你工作领域中的模型体现的。每个人都参与到领域发现的过程,开发人员和领域专家用相同的语言来共同建立知识,即通用语言。
  • 领域驱动设计提供战术和战略模型工具来设计高质量软件。战略设计关注业务方向,帮助明确内部关系,用明确的强边界严格地保护好每个业务服务。战术则为迭代设计提供有用的构建块。
  • 领域驱动设计只有在明确的上下文中才有意义。它并不是软件中所有问题的银弹,所以是否用它应根据你手中工作的复杂度来决定。
  • 领域驱动设计是一项长期投资;它需要长期努力。开发人员需要与领域专家紧密合作,同时要根据业务思考。最后,业务中的客户因素也是需要你考虑的。
实现领域驱动设计需要努力。如果它很简单,那每个人都可以写出高质量代码了。准备好了,因为你马上就要开始学习怎么写这些代码了,在读的过程中,你将可以完美地描述清晰你公司现有的业务。享受这段旅程吧!
徐九 / 2020-01-14 5 years ago / 未收藏/ SegmentFault 最新的文章发送到 kindle

clipboard.png

微软官方消息,从今天(2020年1月14日)起,微软将正式停止对 Windows 7 系统的外延支持。服务停止后,微软不会再对 Windows 7 有相关的技术支持、软件更新或程序修正,用户如果继续使用,电脑的安全问题将受到威胁。
今天,我们就来回顾一下 Windows 历代操作系统,以及为什么 Windows 7 会这么受欢迎?Windows 7 不更新了你会选择 Windows 10 么?

Windows 历代操作系统

clipboard.png
clipboard.png
clipboard.png
clipboard.png
16 位图形用户界面
clipboard.png
早期版本的 Windows 通常被看作仅仅是运行于 MS-DOS 系统中的一个图形用户界面,不是操作系统。主要因为它们在 MS-DOS 上运行并且被用作文件系统服务。
不过,即使最早的 16 位版本的 Windows 也已经具有了许多典型的操作系统的功能,包括拥有自己的可执行文件格式以及为应用程序提供自己的设备驱动程序(计时器、图形、打印机、鼠标、键盘以及声卡)。
clipboard.png
与 MS-DOS 不同,Windows 通过协作式多任务允许用户在同一时刻执行多个图形应用程序。
最后,Windows 还实现了一个设计精良的、基于存储器分段的软件虚拟内存方案,使其能够运行大于物理内存的应用程序。代码段和资源在内存不足的时候进行交换,并且当一个应用程序释放处理器控制时,特别是等待用户输入的时候,数据段会被移入内存。
16 位版本的 Windows 包括 Windows 1.0(1985),Windows 2.0(1987)及最后版本Windows 3.X。
16 位和 32 位混合图形用户界面
clipboard.png
包括 Windows 95(第一版发行于 1995 年,后来的改进版本发行于 1996 年和 1997 年),以及两个版本的 Windows 98(1998 年、1999 年)。
这个系列的 16 位的 Windows 的升级版本,仍然需要依赖 16 位的 DOS 基层程序才能运行,不算是真正意义上的 32 位操作系统,由于使用 DOS 代码,架构也与 16 位 DOS 一样,核心属于单核心,但也引入了部分 32 位操作系统的特性,具有一定的 32 位的处理能力。
它可视为微软将 MS-DOS 操作系统和早期 Windows 图形用户界面集成出售,或本身也晋升为操作系统,因此用户就不用再单独购买 MS-DOS 以运行「Windows 图形用户界面」了。
32 位操作系统
clipboard.png
这个系列大家就比较常见了,包含:Windows XP、Windows Vista、Windows 7、Windows 8、Windows 8.1、Windows 10和Windows Server 2003/2003R2/2008。也是从这个版本开始,Windows 有了开始菜单。
这个系列是 Windows NT 体系结构操作系统,是真正的纯32位操作系统。Windows NT 架构操作系统是完整独立的操作系统,不同于依然需要 DOS 基层程序的混合 16/32 位的 Windows 9x。
这个操作系统是为更高性能需求的商业市场而编写的 32 位操作系统,核心采用混合式核心即改良式微核心。
64 位操作系统
clipboard.png
64 位 Windows NT 架构操作系统,分为支持于 IA-64 架构和 x64 架构的两种不同版本。
在历史上微软曾对两种不同的 64 位架构提供支持,其一是 Intel 公司和 HP 联合开发具有革新化的 Itanium 家族架构,或称之为 IA-64;和 AMD 公司开发的演进化的 x86-64 架构。
由于两种架构的核心设计思想不同,因此两种架构的操作系统和应用软件不具有互通性,但都对传统的 IA-32 架构的软件一定程度上提供支持。微软在发布 Windows Server 2012 R2 前放弃了对 Itanium 架构的支持。因此现在微软的 64 位产品指的单单是 x86-64 架构,而在微软的词汇中称为 x64。
支持 x64 架构的 Windows 产品有:Windows XP Professional x64 Edition Windows Server 2003/2003R2全线产品(Web版除外),Windows Vista/7/8/8.1,Windows Server 2008/2008R2/2012/2012R2 全线产品和 最终的 Windows 10。
移动设备操作系统
clipboard.png
微软针对移动产品而开发的精简移动设备操作系统。包括 Windows Mobile、Windows Phone 和 Windows 10 Mobile。这块儿不是我们今天讨论的重点,就一笔带过了。

Windows 7 停止更新,你会选择 Windows 10 么?

clipboard.png
市场占有率概览(参照 2019 年 7 月 Net Applications 和 StatCounter 的数据)
通过这个市场占有率的数据,我们可以看到 WIndows 7 仍然占据着很大的市场,而国内的第三方数据公司提供的数据显示,Windows 7 的占有率仍占据 50% 以上。
那么为什么大家会选择 Windows 7 ,微软要硬推 Windows 10 呢?他们又各自有哪些优缺点?
简单来说,主要还是因为 Windows 7 和Windows 10 的视觉风格和操作逻辑差别很大,升级之后需要多一些时间才能适应操作上的差别。而 Windows 7 因为已经推出 10 年,大家已经用的非常顺手了。没有强力引导的情况下,用户的习惯很难被改变。
另一方面就是因为 Windows 10 的发布时间尚短,稳定性还稍差一些。并且对企业用户来说,更换系统的难度也是他们仍然使用 Windows 7 的主要原因之一。
但随着 Windows 7 这次全面停止更新,硬件产品的不断更新换代,Windows 可能会和之前的 Windows XP 一样,慢慢的被全面替换掉。
毕竟,WIndows 10 也还是有他走进新时代的优势的:比如跨平台的兼容性好、性能提升明显、安全保障方面也做的更好。
随着时间、计算机硬件、移动设备的的发展,Windows 10 终将会逐步取代 Windows 7 。毕竟,无论是个人用户的使用体验,还是企业用户从 IT 运维、企业价值、安全性来讲,升级 Windows 10 都将是应对 Windows 7 停止服务支持的最佳解决办法。
总之,Windows 7 即将退役,我们老了,操作系统也老了。可能是时候对那片蓝天、白云,还有青青草原说再见了。
你打算什么时候更新到 Windows 10?
clipboard.png
-END-
部分参考资料:1.维基百科:Microsoft Windows
2.放毒:Win7 再见了~~~
3.腾讯数码:【争议】Windows 7该升级到Windows 10吗?该!
4.钛媒体App:再见Win7!微软正式停止Windows 7操作系统更新
5.昆仑联通:Windows 7停服在即,升级Windows 10刻不容缓!


clipboard.png
star7th / 2020-01-13 5 years ago / 未收藏/ SegmentFault 最新的文章发送到 kindle

前言

我开发的开源文档工具在github上上升到了5300+的star ,受到了部分开发者的欢迎。于是便想写文章与大家分享一下我在整个创作过程中所用到的技术以及相关技能。

任务管理

无论是做自己规划的产品功能,还是做用户反馈过来的bug,最终都需要把这些点细化成一个个单独的小任务,串联执行(毕竟自己是单个人力)。在这点上,我主要是利用团队看板来实现我的任务管理。团队看板工具有好多,搜索一下就好,我个人目前在用tower.im
看板上我新建五个清单,分别是“在做”、“要做-高优先级”、“要做-低优先级”、“待定”、“遗留问题”,我这样分类是有技巧的。首先,它有优先级划分,保证先做重要的事。其次,它有状态管理,方便我随时中断某个任务,过一段时间再回来继续任务。同时,它也能应对新任务——比如说新需求进来,我先放在“待定”,等有空了再分配到其他清单去。最后,它还有“遗留问题”清单,可以让我不在某个“疑难杂症”上卡住太多时间,快速推进下一个任务。

本地开发

用Linux或者MAC会非常方便开发、搭建测试环境等,对开发者的方便是毋庸置疑的。但是电脑有时候需要玩游戏,需要装一些专业大型软件。从兼容性和广泛性的角度来考虑,我个人还是使用windows系统。在win上,我使用的是Vagrant + virtualbox这个组合。Vagrant是一套工具,帮助你快速在win系统上,利用virtualbox搭建起虚拟机,从而方便使用linux或者MAC(比如上架苹果app的时候我需要MAC虚拟机)。关于这点,可以参考我几年前写的一篇教程:blog.star7th.com/2015/06/1538.html

代码管理

我用git作为代码版本管理工具,同时使用tortoisegit进行可视化操作。
说一下我是怎么维护官网在线版showdoc和开源版showdoc的。我在自己的服务器安装一个私有版的gogs作为私有git管理平台。功能开发好了,我再推送到github上去。官网版和开源版一开始是同一个仓库里的不同分支。后面它们的差异(尤其是后端代码的差异)越来越大,所以我干脆把它们分成两个不同的仓库了。做开发的时候,我一般是现在官网版上做开发以及测试验证,然后再用tortoisegit的代码修改差异比较功能,把功能迁移到开源版去。

说一下分支管理策略。我至少建立两个分支——主分支和开发分支。新功能会在开发分支做,验证好了再合并到主分支来。用开发分支的时候也有技巧。比如说,一个大的功能可以基于开发分支再新开一个分支去做。例如我今天想做A功能,那就在A分支上操作。但是A功能遇到瓶颈了,这会儿我暂时没精力去找bug,所以此时我可以再基于开发分支开启B分支,继续做B功能。这很重要,因为在人力有限的情况下,我做什么事情都是串联的,同一时刻只能做一件事。这样的策略有利于保证自己随时中断、随时上手任务,灵活地安排不同的时间去处理容易的或者棘手的问题。这个过程也需要配合上面说到的团队看板使用。中断前要记录好进度,方便自己随时恢复工作。

shell自动化脚本

我为showdo写了三个shell自动化脚本。其作用分别是自动化部署showdoc,自动生成api文档到showdoc,自动生成数据字典到showdoc。之所以选择shell而不是其他脚本语言(如python),是因为shell基本可以运行在绝大部分linux上,部分运行到win上(需要安装工具),兼容性超好,依赖非常少。根据反馈,受到的好评比负面评论多得多。自动化脚本大大节省了使用者安装环境的麻烦,降低了showdoc的使用门槛。showdoc大部分的用户不是php开发者,要他们安装php环境还是挺折腾的。有了一键脚本,他们用得方便,我也省心,不需要在解决新手反馈上花太多功夫。这个方法是具有普适性的,并且语言无关(因为一键脚本使用docker跑服务)。是可以大量应用到开源项目中,非常有利于开源项目的代码分发。
顺便强调一下,做web应用开发的人,尤其需要克服一下对shell脚本的疏远感。我以前以web开发为主的时候就会潜意识地疏远shell。在腾讯的时候向另一个技术栈的同事请教了下,发现其实还是蛮简单的。只是因为自己过去心理上的疏远感导致自己没想过要去写shell。跨过这个心理槛,就会扩展自身的能力边界,写起来跟其他语言没有太多区别,仅仅是需要多搜索查询下语法而已。

后端开发

可能是因为showdoc仅是一个小产品,涉及到的后台逻辑并不复杂,所以我在开发后端花的时间不多,基本上都是CRUD,对数据库进行增删改查操作。需要多动点脑力的地方在于团队管理功能,新建多几张数据表联合实现精细化权限控制。
showdoc后端主要采用的是国产框架thinkPHP。这个框架有好也有不好。不好的地方在于它的框架约定、生态共享比较一般,好的地方在于它可以快速撸出一个东西来,而且兼容性还可以。这是四年前我刚开发showdoc时的决定,后来也懒得换框架重写了,所以沿用至今。技术是相对落后了一些,但是也胜在兼容性好,可以兼容老的php环境和一些老的服务器。这个还是挺重要的,因为showdoc是开发辅助性质的工具,协助写文档。兼容性越好就越容易被各种各样的群体接受。个人觉得这一点比用各种先进技术要更实用一些。当然了,如果是现在新开发其他项目,我应该会使用laravel,或者NodeJS写的eggjs。

前端开发和UI

我在前端开发上花费的时间比后端开发时间多很多。可能是因为这是个体验型产品,需要把前端体验做好。起步一个产品的前端页面时候,我建议一定要选好一个UI框架。比如我选择的是ElementUI做showdoc,而runapi则使用museUI(runapi是辅助showdoc用的一个在线api测试工具)。
showdoc用的编辑器是editor.md,是几年前的产品。虽然说它代码组织方式可能有点落后,且原作者似乎有放弃维护的趋势。但我觉得它功能强大且简洁美观,所以我花了时间将它封装成了vue组件,并且修改其源码增加了安全性。
项目拖拽和页面排序我用的是vue组件vuedraggable,还蛮好用的。以后有拖拽的需求我估计还是用它。
图标设计方面,可以使用UI框架内置的字体图标,也可以用阿里妈妈的矢量图标库。或者自己使用Iconion进行图标设计。这里我强调一下Iconion。这个工具可以非常简单快捷地使用一些预定的图案和背景,组合成一个快速可用的产品图标。showdc的产品图标就是这样制作的,快速省时地做到媲美专业的效果。如果以后把产品做大了,可以考虑请设计师设计。但在项目前期,用Iconion就够了。
在这里要提一下前端技能的重要性。虽然说UI框架以及相应的工具能够帮助你节省很多时间。但如果想做好一个产品的体验,那么其涉及到的UI和交互可能超出框架自带的范围。因此自己必须学会使用原生css,会js交互,会封装组件。而且,前端技能跟下面要说的app多端开发也有帮助。

app多端开发

关于移动app产品原型设计,我很建议使用“墨刀”来做简单的原型规划。有了一个可视化的原型,真的能节省很多大脑时间,让你在开发阶段的时候可以专注代码,而不需要写一下代码,又回头思考下一步做什么功能,这样的来回切换相当耽误效率。
app开发我用的是uniapp,使用html5等前端技术把代码封装成手机本地app,包括安卓app、苹果app,甚至小程序。这种技术几年前就有了,但是性能一直不温不火。2019年的时候我看到了这块发展得还是可以的。所以就产生了做showdoc app端的想法。不过由于showdoc重在pc web端,手机只是起到辅助作用,所以我没有很精心去做。大概把web版简化一下,复用一些组件,重写下前端,然后就上线了。顺便说一下,我做得比较精细化的app是时光树洞(blog.star7th.com/2019/09/2380.html) ,这款app的UI就花了点心思。
如果要让我评价这种混合型app和原生app,我会说,肯定原生app最好。只是出于成本和人力的考虑,对一些展示型的、交互体验要求不那么高的产品,可以采用这种h5技术处理。大家如果在验证市场阶段,可以采用类似技术快速做一个可用产品出来。
此外说一下苹果app上架的问题。我是利用虚拟机安装了一个黑苹果系统,然后装相应工具,把app上传到苹果商店去。关于如何开通苹果开发者账号,如何在虚拟机安装苹果系统,这个你可以自行搜索。

用户反馈和社区运营

一开始,用户反馈消耗了我不少精力。敢情自己成为一个客服了。后来我开始做了一些改变,基本把自己从这些反馈中抽身出来了。
首先我分开了官网在线版和开源版的反馈,开源版的反馈统一到github(gitbug的使用门槛能过滤掉一些非常新的新手,避免新手问题),在线版的反馈统一发邮箱。有功能或者bug要改,我先记在团队看板。而对于一些常见问题,我整理好了文档,和一些固定的回复术语。另外我也开了三个qq群,供showdoc使用者自身交流。不过我要提的一点是,千万别试图回答qq群里提的每一个问题,会把人逼疯的。所以我更改了群公告,改写了群定位,将qq群定位为用户自行交流的地方。让热心用户去回答新手在使用showdoc时遇到的问题。而我则只需要很偶尔看一下。需要官方的支持还是让用户走github或者邮件通道。
不过值得一提的是,我这种运营思路是不适合所有团队的。我是人力有限,效率优先,所以过滤了很多不太必要的反馈。假如说有很足够的人力,我倒建议可以多花时间帮助用户解决问题,既扩大用户量,又提高产品口碑。
山青咏芝 / 2020-01-14 5 years ago / 未收藏/ strengthen发送到 kindle
【摘要】★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★➤微信公众号:山青咏芝(let_us_code)➤博主域名:https://www.zengqiang.org➤GitHub地址:https://github.com/strengthen/LeetCode➤原文地址:h 阅读全文
山青咏芝 / 2020-01-14 5 years ago / 未收藏/ strengthen发送到 kindle
【摘要】★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★➤微信公众号:山青咏芝(let_us_code)➤博主域名:https://www.zengqiang.org➤GitHub地址:https://github.com/strengthen/LeetCode➤原文地址:h 阅读全文
2020-01-14 5 years ago / 未收藏/ funteas发送到 kindle
前端日刊
2020-01-14 5 years ago / 未收藏/ funteas发送到 kindle
前端日刊
2020-01-14 5 years ago / 未收藏/ funteas发送到 kindle
前端日刊
2020-01-14 5 years ago / 未收藏/ funteas发送到 kindle
前端日刊
2020-01-14 5 years ago / 未收藏/ funteas发送到 kindle
前端日刊
2020-01-14 5 years ago / 未收藏/ funteas发送到 kindle
前端日刊
2020-01-14 5 years ago / 未收藏/ funteas发送到 kindle
前端日刊
2020-01-14 5 years ago / 未收藏/ funteas发送到 kindle
前端日刊
2020-01-14 5 years ago / 未收藏/ funteas发送到 kindle
前端日刊
2020-01-14 5 years ago / 未收藏/ funteas发送到 kindle
前端日刊
2020-01-14 5 years ago / 未收藏/ funteas发送到 kindle
前端日刊
2020-01-14 5 years ago / 未收藏/ funteas发送到 kindle
前端日刊
2020-01-14 5 years ago / 未收藏/ funteas发送到 kindle
前端日刊
2020-01-14 5 years ago / 未收藏/ funteas发送到 kindle
前端日刊
2020-01-14 5 years ago / 未收藏/ funteas发送到 kindle
前端日刊
2020-01-14 5 years ago / 未收藏/ funteas发送到 kindle
前端日刊
Abdulwahab Adebowale Ashimi / 2020-01-14 5 years ago / 未收藏/ Dunebook.com发送到 kindle
In this article, I will be introducing you to 20 of the amazing and best Coding fonts out there, some of which you might have/haven’t...
The post 20 Amazing Coding Fonts for Developers appeared first on Dunebook.
Lana Miro / 2020-01-14 5 years ago / 未收藏/ Dunebook.com发送到 kindle
When it comes to site-building, you can’t skip working with its admin panel. All in all, the dashboard is the central part of any online...
The post Top Bootstrap Admin Dashboard Templates to Start With appeared first on Dunebook.
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
This is what my Container looks like: new Container( width: 500.0, height: 250.0, padding: new EdgeInsets.fromLTRB(20.0, 40.0, 20.0, 40.0), decoration: new BoxDecoration( color: const Color(0xFF66BB6A), boxShadow: [new BoxShadow( color: Colors.black, blurRadius: 20.0, ),] ), child: new Column( mainAxisAlignment: MainAxisAlignment.center, children: [ new Container( padding: new EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 10.0), child: new Text("Testtext", style: new TextStyle(fontSize: […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
This issue occurs when updating the dependencies classpath from ‘com.android.tools.build:gradle:3.2.1’ to *’com.android.tools.build:gradle:3.3.2′ project-level build.gradle buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.3.2' } } allprojects { repositories { google() jcenter() } } rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') } task clean(type: Delete) { delete rootProject.buildDir } app-level build.gradle def localProperties = […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I’m new to Flutter and was trying to change the child icon color of FloatingActionButton. Child icon color is white by default. How can i change that?? Given below is the code that i have worked on. floatingActionButton: new FloatingActionButton( onPressed: _incrementCounter, tooltip: 'Increment', child: new Icon(Icons.add), backgroundColor: Colors.yellow, ), // This trailing comma makes auto-formatting nicer […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
In iOS, we have a UITabBarController which stays permanently at the bottom of the screen when we push to a new ViewController. In Flutter, we have a bottomNavigationBar of a Scaffold. However, unlike iOS, when we Navigator.push to a new screen, this bottomNavigationBar disappears. In my app, I want to fulfil this requirement: Home screen has a bottomNavigationBar with 2 items […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
Doing UI for a flutter app at uni, I just want the text typed into the TextFormField to be white. It seems unnecessarily difficult. I’ve tried googling etc but can’t see an obvious answer.
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I’m reading in user-provided input (in this case a zip code) from a TextField that I need to check against a database for validity. However, I need to make an asynchronous database query inside of the submit button’s (a RaisedButton in this case) onPressed: () {} lambda function. In most programming languages, this is a fairly straightforward and simple task. The […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I would like to create an Image widget that sizes to the height of it’s parent, but then overflows the width of the parent based on the aspect ratio of the displayed image. I’ve tried FittedBox and a combination of LayoutBuilder and SizedOverflowBox, but no luck. So far I’ve only been able to get the image to size to the […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
Code will explain all:- class ResultOverlay extends StatefulWidget { final bool _isCorrect; VoidCallback _onTap; ResultOverlay(this._isCorrect, this._onTap); ...... ...... } Its state class class ResultOverlayState extends State<ResultOverlay>{ @override Widget build(BuildContext context) { ........ child: new InkWell( onTap: () => widget._onTap, ..... ..... } Passing of callback function:- new ResultOverlay(isCorrect, () { () => CallAnswerPage(); }) What […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
Trying to use an API to build the grid. Everything renders fine but after the last row of tiles the page goes blank & just keeps scrolling & scrolling &… the grid is built like so: body: new GridView.builder( gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: (orientation == Orientation.portrait) ? 2 : 3), itemBuilder: (BuildContext context, int index) { […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I would like to make my Flutter application to run always in background. With android, we have to create a Service that runs always in background. I don’t find something about Services in the Flutter documentation. Is it possible to do this kind of things with Flutter?
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I’m developing android and ios app with Google flutter. when I add a new dependency like shared_preferences to pubspec.yaml and then execute flutter run in terminal, I got this error: What went wrong: A problem occurred configuring project ‘:shared_preferences’. You have not accepted the license agreements of the following SDK components: [Android SDK Platform 27]. I know why it happens! because the […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I was trying to build a border for my text field like: return TextField( ... border: OutlineInputBorder( borderSide: BorderSide( color: Colors.red, width: 5.0), ) ) ) But it always return a black border with 1.0 as width. The only way that I found to change the color was to create a ThemeData where I specify […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I wanted to convert a string to map. String value = "{first_name : fname,last_name : lname,gender : male, location : { state : state, country : country, place : place} }" into Map = { first_name : fname, last_name : lname, gender : male, location = { state : state, country : country, place : […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I was wondering when I should use the future builder. For example, if I want to make an http request and show the results in a list view, as soon as you open the view, should I have to use the future builder or just build a ListViewBuilder like: new ListView.builder( itemCount: _features.length, itemBuilder: (BuildContext context, int […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I am using Retrofit for Android. It is easy to retrieve and upload JSON via a REST based web service. Can we get any library which is equivalent to Retrofit for web services in Flutter?
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I am currently building an app to read data through an api and I am trying to parse a JSON api from JSON Placeholder. The error i am currently running into is: Error type 'List<dynamic>' is not a subtype of type 'Map<String, dynamic>' How do i rectify this error?
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I have this very interesting issue, where I can run my application on the emulator just fine, flutter build apk is successful, I can either release the new version on Google Play or just install the apk on my phone (Pixel 2 XL, currently on April security patch). But when I launch it on my phone, it instantly crashes. […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
This might be a very simple question but I am having trouble finding an answer. I have a object/map that I would not like to iterate but access a specific key/value at an index. For example: var _results = { 'Key_1' : 'Value_1', 'Key_2' : 'Value_2', }; How would I access the index[1]’s key_2 and […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
All I need is my text to be multi-line. Am giving the property of maxLines but its still getting RenderFlex overflowed error to the right as the next is not going to 2nd line, Align( alignment: Alignment.bottomCenter, child: new ButtonBar( alignment: MainAxisAlignment.center, children: <Widget>[ Padding( padding: EdgeInsets.all(20.0), child: new Text( "This is a very bigggggggg text !!!",textDirection: TextDirection.ltr, style: […]
Whenever i try to do an http call after about 20 seconds i get in console the folowing error: E/flutter ( 8274): [ERROR:flutter/shell/common/shell.cc(184)] Dart Error: Unhandled exception: E/flutter ( 8274): SocketException: Failed host lookup: 'flutter-project-xxxxx.firebaseio.com' (OS Error: No address associated with hostname, errno = 7) This error happens for every method and every route i […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
This method submits a simple HTTP request and calls a success or error callback just fine: void _getSimpleReply( String command, callback, errorCallback ) async { try { HttpClientRequest request = await _myClient.get( _serverIPAddress, _serverPort, '/' ); HttpClientResponse response = await request.close(); response.transform( utf8.decoder ).listen( (onData) { callback( onData ); } ); } on SocketException catch( […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
In Android we have, Settings.Secure.ANDROID_ID. I do not know the iOS equivalent. Is there a flutter plugin or a way to get a unique device id for both Android and IOS in flutter?
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I have built an application with flutter that works like a reminder. How can I display notifications to the user even though the app is closed?
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
Hi I am trying to implement push notification in flutter how to display as notification can any one help,I am able to listen as I am getting notification but I am not able to see the msg and it is appearing as alert but I want as notification can any one help and in android […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I’m trying to have a Widget align to the bottom of my NavDrawer while still keeping a DrawerHeader and a list at the top of the Drawer. Here’s what I’m trying: drawer: new Drawer( child: new Column( mainAxisSize: MainAxisSize.max, children: <Widget>[ new Text('Top'), new Align( alignment: FractionalOffset.bottomCenter, child: new Text('Bottom'), ), ], ), ), The […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
By using this : Text(new DateTime.fromMillisecondsSinceEpoch(values[index]["start_time"]*1000).toString(), I am getting the type of format attached in the picture, however I was wondering if I could get it in dd/MM/YYYY hh:mm??
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I need format string like "Send %d seconds ago", "Harry like %s", "I think %1$s like %2$s". These can be implemented in Android, but i don’t how to implement in Dart of Flutter.
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I’m trying to run a hello world flutter app for the first time on my device, but when I hit run on android studio, it shows initilizing gradle, and it stays like that for more than 20 minutes with no logging or error, I have an intel i5 as a CPU and I’m running it […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I have a problem with my Flutter Layout. I have a simple container with a Margin right and left of 20.0 Inside this container i have another container. But this container does not fit to the parent container only on the left side. I dont know why this happens. Here is my Code: @override Widget […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I am using a long list in flutter. All the items are rendering fine but also following error : RangeError (index): Invalid value: Not in range 0..2, inclusive: 3 Following is my code : @override Widget build(BuildContext context) { return Container( child: getList(), ); } Following is my getList() method : Widget getList (){ List<String> […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
In Android, we can call setOnFocusChangeListener(), do something in onFocusChanged() method, but flutter does not provider onFocus() interface like onTap() in GestureDetector or onKey() in RawKeyboardListener. I have read flutter api about focus, https://docs.flutter.io/flutter/widgets/FocusManager-class.html but I can’t find a way to realize my request, anyone who can give me a hand?
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I have a function loadData that loads some text from a file: Future<String> loadAsset() async { return await rootBundle.loadString('assets/data/entities.json'); } The loadString method is from Flutter SDK, and is asynchronous. The loadAsset method is then called in another method, that must me marked as async, since loadAsset is async and I need to use await: Future<List<Entity>> loadEntities() async { String jsonData = await loadAsset(); return […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
In flutter, is there an option to draw a vertical line between components as in the image.
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I just created a new flutter project, added a few plugins and I’m getting the plugin switched to android x therefore i need to switch to android x. I’ve tried all the different ways of moving to android x and none has worked for me so far. Right now i don’t even know what to […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I am new to flutter programming and I’ve created a demo app, its running fine on both android and iOS devices. I want to see .apk and .ipa file in flutter. Can anyone help me to get these files from Flutter? Where can I see these files in folders or is there any other solution.
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
How do you correctly add query parameters to a Dart http get request? I been unable to get my request to respond correctly when trying to append the ‘?param1=one&param2=two’ to my url, yet it works correctly in Postman. Here’s the gist of my code: final String url = "https://www.myurl.com/api/v1/test/"; String workingStringInPostman = "https://www.myurl.com/api/v1/test/123/?param1=one&param2=two"; Map<String, String> […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I know its possible to add a WebView as a full page but couldn’t find any sample code to do it. I assume you could use a PageView as it’s base but not sure how to call the native android WebView and add it to the PageView. Can anyone point me in the right direction?
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
I’m debugging an app, but I need to know some values in the fly, I was wondering if there’s a way to print a message in console like console.log using Javascript. I appreciate the help.
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
In a Flutter application, I need to check if a string matches a specific RegEx. However, the RegEx I copied from the JavaScript version of the app always returns false in the Flutter app. I verified on regexr that the RegEx is valid, and this very RegEx is already being used in the JavaScript application, so it should be […]
krunalPatel / 2020-01-14 5 years ago / 未收藏/ icetutor发送到 kindle
How can I replace the AppBar title with image logo in Flutter?
2020-01-14 5 years ago / 未收藏/ guanzhi发送到 kindle
我问过许多实习生,有时间能不能帮我做做校对工作?回答几乎无一例外:这活儿太没技术含量了,想学点更实用的招数,比如选题策划、采访技巧,以及编辑秘诀等等。
这多少让我有些失望,我看过他们编出来的同期稿,勉强能达到文通字顺的标准,可是一涉及到专有名词,往往错得离谱——我很奇怪,为什么就没人去翻翻工具书,哪怕百度一下也成啊,这不都是校对的基本功吗?
我想起了我师父,他就是一位校对高手,人送外号“天下第一校”。在遇到他之前,我根本不信校对还能校出花来,前人说得好:校书如扫尘,一面扫一面生,能把错误几率降低零点零几个百分点,已经是阿弥陀佛了,要想完全不出错,怎么可能呢?后来,我才领略到他的“恐怖”之处:我的每一封邮件,他几乎都能找出错误来,要么是错别字,要么是分段不够准确,或者标点符号使用不到位。平心而论,我不是个粗心大意的人,可要想不被他抓住小辫子,太难了。我印象最深的是一篇两百字的稿子,两百字,计入标点的话,在Word文档中也就五行而已,可他逼着我修改了不下十遍,从标题到标点,足足磨了四五个小时。
有人看不下去了,劝他:“不就一篇稿子嘛,犯得着这么较真吗?”
他倒是想得通:“不这么磨,怎么提高?”
我差点崩溃。接着,师父又给我下了一个任务:不管写什么稿子,都在两百字内解决。
那段时间,两百字成了我写作的核心标准。一条评论稿,从引用相关报道,阐述基本事实,直至展开讨论,再加上个人意见,要想“随心所欲不逾矩”,还真不是个轻松活儿。为了完成这个任务,我把能想到的招都使上了,就差没用文言文写作,我的邮箱里留下了一堆以“两百字”为题头的稿件,不消说,很多都是被打回来修改的。慢慢地,我才理解了他的良苦用心:这样的约束,能让人在短时间内养成精准使用文字的习惯,回复到写作的“本来面目”。
师父只是我见过的众多爱较真的人之一。
我曾经接过一个棘手的活儿,去采访一位“不太好伺候”的著名教授。
有关这位教授的传言很多,先期接触过他的同事告诉我,这位教授有“三不为”:一不参加集体活动,二不接受媒体采访,三不兼行政职务。他甚至连照相都没时间,他们学校网站上的“学人介绍”一栏,挂的还是他十年前工作证上的照片。
好在有热心的师长帮忙,我和教授联系上了,他没有传说中那样难以亲近,只是提了一个要求:“你采访我可以,不要问那些小儿科的问题,你能不能先读一读我的书?这样交流起来更顺畅一点。”我想都没想就答应了,他研究的领域正是我比较关注的,他的著作我也曾拜读过一些,这不算很为难。可第二天教授将书单发来之后,我还是吓了一跳:这是开给他门下研究生的书目啊!截稿日期一天天临近,我只能抛开手头的工作,窝在图书馆一本一本啃下去,读书之余,还顺手做了些札记,算是意外收获。
结束了这段苦读之后,我把拟出的问题和札记一起发给了教授。教授很快作了答复:所提问题太过宽泛,不易作答,还请再考虑考虑。我做的札记中有一处引文出错,他也做了订正,并特意指出,札记有些模棱两可之处,说明我还没有读懂,应该参看某些著作,接下来,又是一列书单。
我又回到了图书馆,就像卡夫卡《城堡》中的主人公那样,原来的目的已经不重要,我只是想弄明白,要完成这次采访,到底还要经过哪些煎熬。
让我完全没想到的是,最后的采访过程波澜不惊,问题大致还是那些问题,教授很认真地作了答复。我纳闷了:其实您完全可以在一开始就接受采访,为什么要让我绕上这么大一个圈子?教授笑了笑:“你如果没有读我的书,对这些问题的理解就完全不一样了,又怎么可能和我平等交流呢?”这一瞬间,我几乎有种错位的感觉,好像教授是记者,我才是他精心培养的采访对象。
每逢遭遇困难,我总会回忆一下这些“恐怖”的经历,借此给自己打气。我尊重这些爱较真的人,他们看似偏执,其实只是在以自己的行动诠释一条再平凡不过的准则:敬业精神。
2020-01-14 5 years ago / 未收藏/ bingenwallpaper发送到 kindle
20200113-Mount Fuji Sunrise, New Year
Mount Fuji is one of Japan's "Three Holy Mountains". It is the highest volcano in Japan, the 2nd-highest volcano of an island in Asia, and the 7th-highest peak of an island in the world. It is an active stratovolcano that last erupted in 1707-1708. Mt.Fuji is also a Special Place of Scenic Beauty and one of Japan's Historic Sites.
2020-01-14 5 years ago / 未收藏/ cddual发送到 kindle
2020.01.14
动物王国隐藏着无限的奥秘,等着你去发现。今天我们就来介绍42个关于动物的有趣事实,看完了你会惊叹:世界真奇妙!
 
图片来源:Flickr
 
1. Cats don't think of us as humans. Instead, they see us as equals, just like other cats.
猫不把我们看作人类。事实上,它把我们看做同类,在它眼里我们和其他猫一样。

 
 
图片来源:Flickr
 
2. Sea otters hold hands while they’re sleeping so that they don’t drift apart.
海獭在睡觉时手握着手,这样它们就不会漂离。

 
 
图片来源:Flickr
 
3. Tiger populations are on the rise.
老虎数量正在增加。

 
 
图片来源:Flickr
 
4. When a baby elephant is born, other mothers in the social group will trumpet to celebrate or announce the baby's arrival.
当一只象宝宝出生时,社交圈子里的其他象妈妈会高声鸣叫,庆祝或宣布宝宝的降生。

 
 
图片来源:Flickr
 
5. Dogs sneeze when play fighting to show they are playing and don’t wanna hurt you.
狗狗在假装打架的时候会打喷嚏,表明自己是在逗着玩而不会伤害你。

 
 
图片来源:Flickr
 
6. Cows have "best friends" and are happier when they're with them.
牛有“好友”,它们和好友在一起时更快乐。

 
 
图片来源:Flickr
 
7. There's an abandoned minefield that has accidentally created a penguin sanctuary. The mines keep poachers out, but the penguins are too small to set them off.
一个荒废的布雷区偶然间成了企鹅的避难所。这里埋的雷让偷猎者不敢靠近,而企鹅们体积太小,不会引爆地雷。

 
 
图片来源:Flickr
 
8. An otter will find a pebble as a juvenile and keep it for their whole life.
一只水獭会将一颗鹅卵石当作幼崽,并终生守护它。

 
 
图片来源:Flickr
 
9. Your dog probably dreams about you.
你的狗很可能会梦到你。

 
 
图片来源:Flickr
 
10. There are little tiny harvest mice that sleep inside flowers.
体积微小的巢鼠睡在花朵中。

 
 
图片来源:Flickr
 
11. Pandas are no longer considered an endangered species.
熊猫不再是濒危物种。

 
 
图片来源:Flickr
 
12. Dogs can tell when you're due to come home by how much of your scent is remaining in the house.
狗可以通过你留在房子里的气息还有多少来判断出你回家的时间。

 
 
图片来源:Flickr
 
13. Dolphin mothers sing to their babies while they're in the womb.
海豚妈妈会对着子宫内的胎儿唱歌。

 
 
图片来源:Flickr
 
14. Bees get sleepy after drinking nectar and occasionally take naps on flowers.
蜜蜂在喝完花蜜后会发困,偶尔会在花朵上打盹。

 
 
图片来源:Flickr
 
15. Ravens can remember faces and you can befriend them.
渡鸦能记住人脸,你可以和它们做朋友。

 
 
图片来源:Flickr
 
16. When dogs appear in movies and TV, sometimes they have to have CGI tails because they wag too much during the scene.
狗出演影视剧时,有时候得用特效编辑它们的尾巴,因为它们在拍摄过程中摇尾太频繁。

 
 
图片来源:Flickr
 
17. Squirrels adopt other baby squirrels if they're orphaned.
松鼠会收养失去双亲的松鼠宝宝。

 
 
图片来源:Flickr
 
18. Your dog actually loves you, not just because you give them food and walks.
你的狗真的爱你,不只是因为你给它们吃食,带它们遛弯。

 
 
图片来源:Flickr
 
19. Bees make a "whoop!" sound when they bump into each other or are startled.
蜜蜂在相撞或受惊时会发出“呜呜”声。

 
 
图片来源:Flickr
 
20. Goats and cows have accents.
山羊和奶牛有口音。

 
 
图片来源:Flickr
 
21. Penguins not only mate for life, they will also spend time to find a beautiful pebble for their mate and then "propose" with it.
企鹅不仅一生只有一个伴侣,而且它们会花时间为伴侣找一颗美丽的鹅卵石,用这颗鹅卵石来“求婚”。

 
英文来源:Boredpanda
翻译&编辑:丹妮


2020-01-14 5 years ago / 未收藏/ cddual发送到 kindle
2020.01.14
2020年国资委将持续推进央企兼并重组步伐,以提高央企的效率和竞争力。国资委指出,此次央企兼并重组重点将在重复投资、同质化竞争问题突出领域,下一步装备制造、化工产业、海工装备、海外油气资产等专业化整合将提速,还将研究启动炼化业务整合。
China's state asset regulator will continue to push mergers and restructurings among centrally-administered State-owned enterprises (SOEs) in 2020 to improve their efficiency and competitiveness. Consolidations will focus on areas with overlapping investments and homogeneous competition, according to the State-owned Assets Supervision and Administration Commission (SASAC) of the State Council. Equipment manufacturing, chemicals, marine engineering equipment and overseas gas and oil assets are among the sectors that will see accelerated restructurings. The regulator will also study the integration of oil refining businesses.

2019年9月27日拍摄的夕阳中的大庆油田第一采油厂的井排。(图片来源:新华社)
 
【知识点】
推动中央企业兼并重组是深化国资国企改革的一大看点。为了解决国企发展过程中暴露出的国有资本布局结构不合理、资源配置效率不高、同质化发展等问题。国资委自成立以来一直在推动央企兼并重组。党的十八大以来,更是将兼并重组作为本轮深化改革的重点。国资委明确,下一步将按照市场化原则,成熟一户、推动一户,积极稳妥地做好央企重组整合的工作,推动企业提升资源配置效率和竞争力。
业内人士认为,2020年国有企业兼并重组预计将沿三个方向发力:一是推动企业内部或跨企业的专业化整合,以提高国有企业的产业集中度,解决国有资本布局分散化,难以形成集中优势的问题。二是鼓励优势企业并购重组经营困难企业,帮助困难企业盘活资源,复苏振兴,有效控制与化解国有企业经营风险。三是继续推进强强联合,做强做优国有企业,打造一批高质量发展引领示范企业。

 
【重要讲话】
要完善各类国有资产管理体制,改革国有资本授权经营体制,加快国有经济布局优化、结构调整、战略性重组,促进国有资产保值增值,推动国有资本做强做优做大,有效防止国有资产流失。深化国有企业改革,发展混合所有制经济,培育具有全球竞争力的世界一流企业。
We will improve the systems for managing different types of state assets, and reform the system of authorized operation of state capital. In the State-owned sector, we will step up improved distribution, structural adjustment, and strategic reorganization. We will work to see that state assets maintain and increase their value; we will support state capital in becoming stronger, doing better, and growing bigger, and take effective measures to prevent the loss of state assets. We will further reform of State-owned enterprises, develop mixed-ownership economic entities, and turn Chinese enterprises into world-class, globally competitive firms.
——2017年10月18日,习近平在中国共产党第十九次全国代表大会上的报告

 
【相关词汇】
国之重器
advanced equipment for the country

自主创新能力
independent innovation capacity

国有资本
state capital

2020-01-14 5 years ago / 未收藏/ cddual发送到 kindle
2020.01.14
随着中国市场的扩大,越来越多的国家和地区开始把汉语教育纳入中小学课程,以增强未来一代在国际市场上的竞争力。最近,英国威尔士政府表示,为了促进贸易发展,威尔士中学将教授普通话。
 
Agence Olloweb/unsplash
Mandarin could be taught in Welsh secondary schools in a bid to raise Wales' international profile.
为了提升威尔士的国际形象,威尔士的中学将教授普通话。
The Welsh Government wants to establish the country as a visitor destination for Chinese people as part of its new strategy to boost trade.
作为贸易促进新战略的一部分,威尔士政府希望将本地建成中国游客的旅游目的地。
It is also looking to have a "Wales in Germany" themed year in 2021, and have an increased presence in EU countries.
威尔士还计划在2021年举办“威尔士在德国”主题年,并扩大在欧盟国家的业务。
International relations minister Eluned Morgan said she wanted to sell Wales to the world.
威尔士国际关系部长埃莉内德·摩根表示,她希望向全世界推介威尔士。
Welsh businesses sold more than £17bn of goods abroad in 2018 and at present 60% of those exports go to the EU, with Germany as the top destination.
2018年,威尔士企业向海外销售了价值逾170亿英镑(约合人民币1521亿元)的商品,目前其中60%出口到欧盟,其中德国是最大的出口目的地。
But after Brexit, ministers want "to ensure that the European Union remains our strongest partner" as well as developing markets elsewhere. Its goal is a 5% increase in exports.
但在英国脱欧之后,部长们希望“确保欧盟仍是我们最强大的合作伙伴”,同时其他地区的发展中市场也要保持强劲增长,其目标是出口增长5%。
To make that happen, the Welsh Government has launched a new international strategy to focus on three areas - cyber-security, compound semi-conductors, and creative industries - chosen in part for their "resilience to Brexit" and because of their "global recognition as areas of excellence".
为了实现这一目标,威尔士政府启动了一项新的国际战略,重点在三个领域——网络安全、复合半导体和创意产业——之所以选择这三个领域,部分原因在于它们“对英国脱欧的适应力”,以及“表现卓越,得到全球认可”。
resilience [rɪˈzɪliəns]:n.恢复力;弹力;顺应力
 
In its report, it also listed a number of ideas, including:
威尔士政府在报告中还列出了一些想法,包括:
Raise Wales' profile by exploring the feasibility of teaching Mandarin in secondary schools as part of a long-term vision to establish the country as a visitor destination for the Chinese market
通过探索在中学教授普通话的可行性来提升威尔士的形象,这是将威尔士打造成中国旅游目的地这一长期愿景的一部分;
Work with education institutions to increase the number of international students studying in Wales
与教育机构合作,增加在威尔士学习的国际学生数量;
Hold a "Wales in Germany" themed year in 2021
2021年举办“威尔士在德国”主题年;
Working with existing networks to build a global Welsh Diaspora social network of 500,000 people, focusing in the first year on the USA and Japan and use cultural and sporting events to "open doors" in difficult markets
利用现有网络,建立一个50万人的全球威尔士移民社交网络,第一年重点关注美国和日本,利用文化和体育赛事在困难的市场“打开大门”;
Promoting Wales as the "go-to nation" for advice on minority language development
使威尔士成为提供少数群组语言发展建议的“首选之地”。
go-to[ˈɡoʊ tuː]:adj.(为解决某个问题或做某件事情的)必找的(人);(为找到某件物品或服务的)必去的(地方)
 
Ms Morgan said she was "anxious" to change the Welsh Government's relationship with the UK government to help sell Wales abroad, adding they wanted the best possible Brexit deal and would be "constructive partners".
摩根女士表示,她“急于”改变威尔士政府与英国政府的关系,以帮助威尔士走向海外。她补充称,希望达成最佳的英国脱欧协议,并使双方成为“建设性的合作伙伴”。
 
英文来源:BBC
翻译&编辑:yaning
2020-01-14 5 years ago / 未收藏/ cddual发送到 kindle
2020.01.14
1月13日,美国财政部公布半年度汇率政策报告,取消对中国“汇率操纵国”的认定。
图片来源:东方IC
 
In its semiannual Report on Macroeconomic and Foreign Exchange Policies of Major Trading Partners of the United States, the Treasury Department said no major US trading partner at this time met the relevant legislative criteria for currency manipulation.
美国财政部发布的《主要贸易伙伴的宏观经济和外汇政策》半年报告指出,目前,美国主要的贸易伙伴中,无一符合汇率操纵国法定标准。

知识点】
根据美国对“汇率操纵国(currency manipulator)”最新的认定标准,当一国在过去四个季度满足以下三个标准时会被认定为“汇率操纵国”:1.对美国贸易顺差超过200亿美元(a bilateral trade surplus of $20 billion or more with the US);2.经常账户顺差占GDP比重超过2%(a current account surplus of 2 percent or more of its gross domestic product);3.单边汇率干预持续时长超过6个月(one-sided intervention in foreign exchange markets for more than 6 months)。
如果一个经济体满足三个标准,则被认定为“汇率操纵国”;如果只满足两个标准,会被列入观察名单(monitoring list);如果只满足第一个标准,但该经济体对美国的总体贸易逆差贡献较大,也可能被列入观察名单。

美国财政部去年8月宣布将中国列为“汇率操纵国”,遭到中方、经济学界和权威国际机构的普遍反对。

Mark Sobel, US chairman of the Official Monetary and Financial Institutions Forum, an independent think tank, said on Twitter that this is "good news," calling the designation "blatant" and "errant" political act. "China shouldn't have been designated to start with," said Sobel, who was served as deputy assistant secretary at the US Treasury Department. He noted China's current account surplus is small as a share of GDP, and there is "scant intervention."
前美国财政部官员、官方货币与金融机构论坛主席马克·索贝尔在推特上表示,美国财政部此举是“好消息”,中国从一开始就不应被认定为“汇率操纵国”,中国经常账户顺差占国内生产总值比重较小,几乎不构成干涉,美国政府此前的认定是“错误的政治行为”。


【相关词汇】

国际储备货币 global reserve currency
结算货币 settlement currency
汇率微调 rate fine-tuning
估值偏低货币 undervalued currency


参考来源:新华网

(中国日报网英语点津 Helen)
2020-01-14 5 years ago / 未收藏/ cddual发送到 kindle
2020.01.14
“福无双至,祸不单行”是一个汉语成语,指“幸运的事不会连续到来,祸事却会接踵而至(literally blessings never come in pairs and misfortunes never come singly)”,与俗语“屋漏偏逢连夜雨”意思相同,可以用“it never rains but it pours”表示。“福无双至”和“祸不单行”也可分开使用。
 
Photo by Min An from Pexels
 
例句:
zhè zhēn shì yǒu yì sī de yī nián dān ní shī yè le,wǒ bìng xiū le sān gè yuè,qiáo xī shuāi duàn le tuǐ。zhèng rú sú huà shuō de,zhēn shì fú wú shuāng zhì,huò bù dān xíng
这真是有意思的一年——丹尼失业了,我病休了三个月,乔希摔断了腿。俗话说的,真是福无双至,祸不单行。
It was an interesting year - Danny lost his job, I was off sick for three months and Josh broke his leg. It never rains but it pours, as they say!

wū lòu piān féng lián yè yǔ,xiān shì wǒ de chē bèi tōu le,rán hòu wǒ yòu diū le bàn gōng shì de yào shi
屋漏偏逢连夜雨,先是我的车被偷了,然后我又丢了办公室的钥匙。
It never rains but it pours! First I found that the car had been stolen and then I lost the keys to my office.

 
Editor: Jade


2020-01-14 5 years ago / 未收藏/ cddual发送到 kindle
2020.01.14
"Facepalm" is said to be based on Hong Kong top star Stephen Chow's classic role in the movie. [Photo provided to chinadaily.com.cn]
>'Facepalm' top emoji
'捂脸'成微信年度表情包

The top five most popular emojis used by WeChat users in 2019 were facepalm, grin, chuckle, thumb-up and rose, according to a report released by Tencent's WeChat, China's most popular messaging app.
国内最受欢迎消息应用——腾讯微信近日发布的一份报告显示,2019年人们使用最多的五种表情符号分别是"捂脸","呲牙","偷笑","强(大拇指)"和"玫瑰"。

WeChat had 1.15 billion active users every month, and the peak time for using the super app was before lunch and after work, according to the report.
报告显示,微信月活跃用户数达11.51亿,其活跃高峰期为午饭前和下班后。

Young people focused on cartoons and animations, while older people preferred content on pregnancy, childbirth and parenting.
年轻人关注的内容是动漫,中年人则更青睐妊娠、分娩和育儿方面的讯息。

Men shared work and games on WeChat Moments, and women, food and emotions.
男性会在微信朋友圈分享的内容是工作和游戏,女性分享的是食品和情感。

Each WeChat user walked an average of 6,932 steps a day, and on weekends, some 12 million users walked fewer than 100 steps.
每个微信用户平均每天所行步数为6932步,而周末约有1200万用户所行步数不足100步。

 
People look at the Oscar statuettes displayed at an exhibition held at Grand Central Station in New York, the United States, Feb 23, 2012. [Photo/Xinhua]
>Oscars will be host-free again
今年奥斯卡仍无主持人

The 2020 Oscars ceremony will once again go forward without a host.
2020年奥斯卡颁奖典礼将再次不设主持人。

ABC Entertainment president Karey Burke made the announcement in a presentation at the Television Critics Association press tour.
美国广播公司娱乐集团总裁凯瑞·伯克近日在电视评论家协会媒体邀请会上宣布了这一消息。

Burke said organizers planned on "repeating what worked for us last year - huge entertainment value, big musical numbers, big comedy."
伯克表示,主办方计划"重复去年的模式——无限的娱乐价值,大型音乐演出以及大型喜剧效果"。

The 2019 Oscars was the first in 30 years to have no host and saw the audience on broadcaster ABC rise to 29.6 million Americans, breaking a four-year trend of falling viewership for the live ceremony.
2019年奥斯卡颁奖礼是30年来首个不设主持人的奥斯卡颁奖礼,但通过美国广播公司观看颁奖礼直播的美国观众人数上升至2960万人,收视率一反前4年下滑颓势。

 
Navy warship Nanchang sails in the parade marking the Navy's 70th anniversary in Qingdao, April 23, 2019. [Photo by Xu Jingxing/China Daily]
>Destroyer Nanchang rolled out
万吨驱逐舰南昌舰入列

The Nanchang, China's first Type 055 guided-missile destroyer, was commissioned in the People's Liberation Army Navy on Sunday morning in the port city of Qingdao, Shandong province.
中国人民解放军海军055型导弹驱逐舰首舰南昌舰归建入列仪式12日上午在山东青岛某军港码头举行。

The 10,000 ton-class destroyer officially debuted at the multinational naval parade in celebration of the Chinese Navy's 70th founding anniversary on April 23, 2019. Launched on June 28, 2017, the destroyer was equipped with new air defense, anti-missile, anti-ship and anti-submarine weapons, said a statement from the Navy. The commission of Nanchang marks the Navy's leap from the third generation to the fourth generation of destroyers, according to the statement.
这艘万吨级驱逐舰于2017年6月28日下水,首次正式亮相是在2019年4月23日参加庆祝人民海军成立70周年海上阅兵。海军发布的声明称,南昌舰装备有新型防空、反导、反舰、反潜武器,其入列标志着海军驱逐舰实现由第三代向第四代的跨越。

 
An attendee places flowers at a candle light vigil for the victims of Ukraine International Airlines flight PS-752 on Parliament Hill in Ottawa, Ontario, Canada January 9, 2020. [Photo/Agencies]
>Plane shot down by mistake
伊朗承认误击乌航客机

Iran has announced on Saturday morning that its military "unintentionally" shot down a Ukrainian jetliner, killing all 176 aboard.
11日上午,伊朗宣布其军方"无意中"击落了一架乌克兰客机,导致机上176人全部死亡。

A military statement carried by state media said the plane was mistaken for a "hostile target" after it turned toward a "sensitive military center" of the Revolutionary Guard.
伊朗官方媒体发布的一份军方声明称,这架飞机在转向伊朗伊斯兰革命卫队的"敏感军事中心"后被误认为是"敌对目标"。

The military was at its "highest level of readiness", it said, amid heightened tensions with the US.
在与美国紧张局势加剧的情况下,军方当时处于"最高警戒水平"。

"In such a condition, because of human error and in an unintentional way, the flight was hit," the military said.
军方称,"在此情况下,由于人为错误,飞机被意外击中。"

It apologized and said it would upgrade its systems to prevent future tragedies.
伊朗军方为这次灾难道歉,并表示将升级其系统,以防止将来再发生此类悲剧。

Those responsible for the strike on the plane would be prosecuted, the statement added.
声明还称,相关责任方将被起诉。

 
Find more audio news on the China Daily app.
Xueyuan Jia / 2020-01-14 5 years ago / 未收藏/ W3C News发送到 kindle
W3C announced today a Workshop on Web & Machine Learning, 24-25 March 2020, in Berlin, Germany. The event is hosted by Microsoft. The primary goal of the workshop is to bring together providers of Machine Learning tools and frameworks with Web platform practitioners to enrich the Open Web Platform with better foundations for machine learning. […]
luoyjx / 2020-01-14 5 years ago / 未收藏/ 搞起博客发送到 kindle
luoyjx / 2020-01-13 5 years ago / 未收藏/ 搞起博客发送到 kindle
package main

import (
	"fmt"
	"math/rand"
	"sync"
	"time"
)

func main() {
	// 创建一个 100 个空匿名结构的数组
	var times [100]struct{}
	// 创建一个缓冲长度为 3 的 channel
	conccuryChan := make(chan struct{}, 3)
	// wait group
	var wg sync.WaitGroup
	// 循环 times
	for k := range times {
		// push 一个空数组到 channel 中,当
		conccuryChan <- struct{}{}
		// wait group add 1
		wg.Add(1)

		go func(index int) {
			defer func() {
				// 完成后从 channel 取出一个,下一个可以添加 channel
				<-conccuryChan
			}()
			fmt.Println("=>>>>>>>>>> ", index)
			// 模拟随机时长的逻辑
      		time.Sleep(time.Duration((rand.Intn(3) + 1)) * time.Second)
      		// 标记完成一次
			wg.Done()
		}(k)
	}

	close(conccuryChan)
	wg.Wait()
}

williamlong / 2020-01-14 5 years ago / 未收藏/ 月光博客发送到 kindle
  终于,随着2020年1月14日的到来,服役十年之久的Windows 7操作系统终于正式退休了。自今日起,微软将会正式终止支持Win7,这意味着用户仍旧可以正常使用这一经典的操作系统,但微软已经不会再进行任何为何和更新了。
  微软表示,“2020年1月14日之后,微软将不再为安装Windows 7的电脑提供安全升级或支持。”Windows 7系统诞生于2009年,至今已有10年多,微软在发布的时候承诺10年的维护,因此这次停止服务影响不小。
  而Windows 10系统首次发布时,推出过免费升级活动,不过该活动已结束。因此,微软建议直接买台新电脑上手Windows 10。

微软正式终止支持Windows7
  不过,Windows 7作为一款已经问世十年的操作系统,用户基数依旧庞大。据市场调查机构Netmarketshare发布的报告显示,2019年12月,Windows 10系统市场份额占比达到54.62%,而Windows 7位居第二,为26.64%。
  在国内,这部分人群尤其庞大,截至2019年10月份,依然有超过57%的用户在使用Windows 7。
  Windows 7诞生于2009年,2015年1月14日微软停止了Windows 7的主流支持,不再添加新特性功能。同年7月,Windows 10面市,随后微软就一直在劝说用户升级系统,但是很多用户都已经习惯了Windows 7甚至Windows XP的使用。
  按照Windows 10国内市场份额2019年才超过Windows 7的速度,Windows 10要收获国内超一半用户的芳心,可能还需要一定的时间。
  技术升级和变化不可避免,Windows 7的停更,或许就是Windows 10的最佳时机。但如何让用户更愿意接受和转移,对微软来说是个挑战。
  微软官方给的建议是:保持安全的最好方式是采用 Windows 10。使用新电脑是体验Windows 10 的最佳方式。虽然可以在旧设备上安装 Windows 10,但不推荐。

Rafal Kuć / 2020-01-13 5 years ago / 未收藏/ sematext发送到 kindle
Java Garbage CollectionIn this tutorial, we will talk about how different Java Garbage Collectors work and what you can expect from them. This will give us the necessary background to start tuning the garbage collection algorithm of your choice. Before going into Java […]
The post A Quick Start on Java Garbage Collection: What it is, and How it works appeared first on Sematext.
Sean Metcalf / 2020-01-13 5 years ago / 未收藏/ adsecurity发送到 kindle
Many are familiar with Active Directory, the on-premises directory and authentication system that is available with Windows Server, but exactly what is Azure Active Directory? Azure Active Directory (Azure AD or AAD) is a multi-tenant cloud directory and authentication service. Azure AD is the directory service that Office 365 (and Azure) leverages for account, groups, …
Continue reading
2020-01-14 5 years ago / 未收藏/ seebug发送到 kindle
Author:LoRexxar@Knownsec 404Team &amp; Dawu@Knownsec 404Team Chinese version: https://paper.seebug.org/1112/ This may be a vulnerability that has been released a long time ago, but I saw Dragon S...
2020-01-14 5 years ago / 未收藏/ seebug发送到 kindle
作者:LoRexxar@知道创宇404实验室 &amp; Dawu@知道创宇404实验室 英文版本:https://paper.seebug.org/1113/ 这应该是一个很早以前就爆出来的漏洞,而我见到的时候是在TCTF2018 final线下赛的比赛中,是被 Dragon Sector 和 Cykor 用来非预期h4x0r's club这题的一个技巧。 http://russian...
王柏元 / 2020-01-14 5 years ago / 未收藏/ ThoughtWorks洞见发送到 kindle
摘要: 对于敏捷团队,安全卡应该提到比业务卡更高的优先级,同样需要放在backlog里面进行track,需要k ... [阅读更多]
美通社 / 2020-01-14 5 years ago / 未收藏/ CSDN最新资讯发送到 kindle
2020年1月6日,希鸥网主办的全球CEO新年峰会暨第五届中国CEO新年峰会在北京亚洲大酒店举办,超1400位创业者参会交流,来自5个国家和地区的共42位创业菁英在台上演讲分享,活动还得到了170家媒体的报道关注。
美通社 / 2020-01-14 5 years ago / 未收藏/ CSDN最新资讯发送到 kindle
人工智能为自动驾驶鸣锣开道,移动计算创新迈入全新时代,沉浸式体育和娱乐正开启未来……在今天的2020年国际消费电子展(CES 2020)上,英特尔演示了这一系列场景
美通社 / 2020-01-14 5 years ago / 未收藏/ CSDN最新资讯发送到 kindle
近期,在美国拉斯维加斯举行的2020全球消费电子展上,全球供应链和制造公司伟创力(NASDAQ: FLEX)与QuickLogic公司和英飞凌科技公司合作
美通社 / 2020-01-14 5 years ago / 未收藏/ CSDN最新资讯发送到 kindle
2020年1月9日,由印度驻广州总领事馆、India Global Soft及国内高端空间运营商Bee+联合主办的India Soft 2020 -- 印度数字市场信息交流会在Bee+深圳“OFC+@ BEEPLUS”空间举办
美通社 / 2020-01-14 5 years ago / 未收藏/ CSDN最新资讯发送到 kindle
TCL电子控股有限公司(“TCL电子”或“公司”,港交所股份编号:01070.HK)于美国拉斯维加斯举行的2020国际消费电子产品展(以下简称“ 2020美国CES”)发布中国首款消费级8K电视TCL X9 8K QLED TV
美通社 / 2020-01-14 5 years ago / 未收藏/ CSDN最新资讯发送到 kindle
2019年10月,数据猿推出了“大数据的2019,我的2020”大型年度主题策划活动,旨在通过媒体的方式,发掘过去的2019年中,那些大家值得关注的企业,那些大家值得关心的人
阮一峰 / 2020-01-14 5 years ago / 未收藏/ 阮一峰的网络日志发送到 kindle
FFmpeg 是视频处理最常用的开源软件。
它功能强大,用途广泛,大量用于视频网站和商业软件(比如 Youtube 和 iTunes),也是许多音频和视频格式的标准编码/解码实现。

FFmpeg 本身是一个庞大的项目,包含许多组件和库文件,最常用的是它的命令行工具。本文介绍 FFmpeg 命令行如何处理视频,比桌面视频处理软件更简洁高效。
如果你还没安装,可以根据官方文档 先完成安装。

一、概念

介绍 FFmpeg 用法之前,需要了解一些视频处理的基本概念。

1.1 容器

视频文件本身其实是一个容器(container),里面包括了视频和音频,也可能有字幕等其他内容。
常见的容器格式有以下几种。一般来说,视频文件的后缀名反映了它的容器格式。
  • MP4
  • MKV
  • WebM
  • AVI

下面的命令查看 FFmpeg 支持的容器。

$ ffmpeg -formats

1.2 编码格式

视频和音频都需要经过编码,才能保存成文件。不同的编码格式(CODEC),有不同的压缩率,会导致文件大小和清晰度的差异。
常用的视频编码格式如下。
  • H.262
  • H.264
  • H.265

上面的编码格式都是有版权的,但是可以免费使用。此外,还有几种无版权的视频编码格式。
  • VP8
  • VP9
  • AV1

常用的音频编码格式如下。
  • MP3
  • AAC

上面所有这些都是有损的编码格式,编码后会损失一些细节,以换取压缩后较小的文件体积。无损的编码格式压缩出来的文件体积较大,这里就不介绍了。
下面的命令可以查看 FFmpeg 支持的编码格式,视频编码和音频编码都在内。

$ ffmpeg -codecs

1.3 编码器

编码器(encoders)是实现某种编码格式的库文件。只有安装了某种格式的编码器,才能实现该格式视频/音频的编码和解码。
以下是一些 FFmpeg 内置的视频编码器。
  • libx264:最流行的开源 H.264 编码器
  • NVENC:基于 NVIDIA GPU 的 H.264 编码器
  • libx265:开源的 HEVC 编码器
  • libvpx:谷歌的 VP8 和 VP9 编码器
  • libaom:AV1 编码器

音频编码器如下。
  • libfdk-aac
  • aac

下面的命令可以查看 FFmpeg 已安装的编码器。

$ ffmpeg -encoders

二、FFmpeg 的使用格式

FFmpeg 的命令行参数非常多,可以分成五个部分。

$ ffmpeg {1} {2} -i {3} {4} {5}

上面命令中,五个部分的参数依次如下。
  1. 全局参数
  2. 输入文件参数
  3. 输入文件
  4. 输出文件参数
  5. 输出文件

参数太多的时候,为了便于查看,ffmpeg 命令可以写成多行。

$ ffmpeg \
[全局参数] \
[输入文件参数] \
-i [输入文件] \
[输出文件参数] \
[输出文件]

下面是一个例子。

$ ffmpeg \
-y \ # 全局参数
-c:a libfdk_aac -c:v libx264 \ # 输入文件参数
-i input.mp4 \ # 输入文件
-c:v libvpx-vp9 -c:a libvorbis \ # 输出文件参数
output.webm # 输出文件

上面的命令将 mp4 文件转成 webm 文件,这两个都是容器格式。输入的 mp4 文件的音频编码格式是 aac,视频编码格式是 H.264;输出的 webm 文件的视频编码格式是 VP9,音频格式是 Vorbis。
如果不指明编码格式,FFmpeg 会自己判断输入文件的编码。因此,上面的命令可以简单写成下面的样子。

$ ffmpeg -i input.avi output.mp4

三、常用命令行参数

FFmpeg 常用的命令行参数如下。
  • -c:指定编码器
  • -c copy:直接复制,不经过重新编码(这样比较快)
  • -c:v:指定视频编码器
  • -c:a:指定音频编码器
  • -i:指定输入文件
  • -an:去除音频流
  • -vn: 去除视频流
  • -preset:指定输出的视频质量,会影响文件的生成速度,有以下几个可用的值 ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow。
  • -y:不经过确认,输出时直接覆盖同名文件。

四、常见用法

下面介绍 FFmpeg 几种常见用法。

4.1 转换编码格式

转换编码格式(transcoding)指的是, 将视频文件从一种编码转成另一种编码。比如转成 H.264 编码,一般使用编码器libx264,所以只需指定输出文件的视频编码器即可。

$ ffmpeg -i [input.file] -c:v libx264 output.mp4

下面是转成 H.265 编码的写法。

$ ffmpeg -i [input.file] -c:v libx265 output.mp4

4.2 转换容器格式

转换容器格式(transmuxing)指的是,将视频文件从一种容器转到另一种容器。下面是 mp4 转 webm 的写法。

$ ffmpeg -i input.mp4 -c copy output.webm

上面例子中,只是转一下容器,内部的编码格式不变,所以使用-c copy指定直接拷贝,不经过转码,这样比较快。

4.3 调整码率

调整码率(transrating)指的是,改变编码的比特率,一般用来将视频文件的体积变小。下面的例子指定码率最小为964K,最大为3856K,缓冲区大小为 2000K。

$ ffmpeg \
-i input.mp4 \
-minrate 964K -maxrate 3856K -bufsize 2000K \
output.mp4

4.4 改变分辨率(transsizing)

下面是改变视频分辨率(transsizing)的例子,从 1080p 转为 480p 。

$ ffmpeg \
-i input.mp4 \
-vf scale=480:-1 \
output.mp4

4.5 提取音频

有时,需要从视频里面提取音频(demuxing),可以像下面这样写。

$ ffmpeg \
-i input.mp4 \
-vn -c:a copy \
output.aac

上面例子中,-vn表示去掉视频,-c:a copy表示不改变音频编码,直接拷贝。

4.6 添加音轨

添加音轨(muxing)指的是,将外部音频加入视频,比如添加背景音乐或旁白。

$ ffmpeg \
-i input.aac -i input.mp4 \
output.mp4

上面例子中,有音频和视频两个输入文件,FFmpeg 会将它们合成为一个文件。

4.7 截图

下面的例子是从指定时间开始,连续对1秒钟的视频进行截图。

$ ffmpeg \
-y \
-i input.mp4 \
-ss 00:01:24 -t 00:00:01 \
output_%3d.jpg

如果只需要截一张图,可以指定只截取一帧。

$ ffmpeg \
-ss 01:23:45 \
-i input \
-vframes 1 -q:v 2 \
output.jpg

上面例子中,-vframes 1指定只截取一帧,-q:v 2表示输出的图片质量,一般是1到5之间(1 为质量最高)。

4.8 裁剪

裁剪(cutting)指的是,截取原始视频里面的一个片段,输出为一个新视频。可以指定开始时间(start)和持续时间(duration),也可以指定结束时间(end)。

$ ffmpeg -ss [start] -i [input] -t [duration] -c copy [output]
$ ffmpeg -ss [start] -i [input] -to [end] -c copy [output]

下面是实际的例子。

$ ffmpeg -ss 00:01:50 -i [input] -t 10.5 -c copy [output]
$ ffmpeg -ss 2.5 -i [input] -to 10 -c copy [output]

上面例子中,-c copy表示不改变音频和视频的编码格式,直接拷贝,这样会快很多。

五、参考链接

(完)

文档信息

  • 版权声明:自由转载-非商用-非衍生-保持署名(创意共享3.0许可证
  • 发表日期: 2020年1月14日
Ben Popper / 2020-01-14 5 years ago / 未收藏/ Stack Overflow Blog发送到 kindle
This week on the Stack Overflow Podcast: the best way for engineers to give feedback to executives. Plus, a quick dive into Blazor.
The post Podcast: Occam’s Blazor appeared first on Stack Overflow Blog.
Cassidy Williams / 2020-01-13 5 years ago / 未收藏/ Stack Overflow Blog发送到 kindle
Burnout is difficult to describe to people who haven’t felt it. But it was also a valuable lesson. Here's a few tips on how to take care of your ambitious self and avoid burning out.
The post Avoiding burnout as an ambitious developer appeared first on Stack Overflow Blog.
Drew McLellan / 2020-01-14 5 years ago / 未收藏/ smashingmagazine发送到 kindle
Have you ever wondered how design systems are used within a government? Also, if you’d want to document a design system the best way you could, how would you do it? I spoke to Design Systems advocate, Amy Hupe, who shares her advice and lessons learned. Show Notes The GOV.UK Design System Follow Amy on Twitter Amy’s website Weekly Update “Understanding CSS Grid: Creating A Grid Container,”
Pat Walls / 2020-01-14 5 years ago / 未收藏/ starterstory发送到 kindle
Read the full story here.
Fred Perrotta / 2020-01-14 5 years ago / 未收藏/ starterstory发送到 kindle
Read the full story here.
Marvin Collins Hosea / 2020-01-14 5 years ago / 未收藏/ starterstory发送到 kindle
Read the full story here.
Christopher Eyre / 2020-01-14 5 years ago / 未收藏/ Java Code Geeks发送到 kindle
How not to break the internet. Introduction A Content Delivery Network (CDN) is a cache that sits between your website and the user. This is useful when your site becomes popular and you don’t want to have to keep scaling up your webserver to handle the load. This avoids the ‘breaks the internet’ moment when ...
四月的奥德赛 / 2020-01-14 5 years ago / 未收藏/ azurew发送到 kindle
最近单位有用户反映登录虚拟桌面的时候总是提示,由于没有可用的许可证,无法访问此会话。 如图所示   1、首先到 […]
王哥哥 / 2020-01-14 5 years ago / 未收藏/ azurew发送到 kindle
  我不说太细,各位下载的自己体会 vmdk的,直接导入 大家测试下看看,好用记得花钱 Network Con […]
Worktile / 2020-01-14 5 years ago / 未收藏/ Worktile Blog发送到 kindle
未命名_自定义px_2020-01-14-0.png
VPS侦探 / 2020-01-14 5 years ago / 未收藏/ vpser发送到 kindle
LOCVPSKVM方案新上香港云地机房,该机房CN2+BGP混合接入,适合亚太地区、中国内地访问!LOCVPS […]
Atman Rathod / 2020-01-13 5 years ago / 未收藏/ cmarix发送到 kindle
Just a few days ago, the Netflix developer team came with the announcement to open-source Metaflow, their proprietary Python-based library for data science projects. The Netflix developer team in their address mentioned that Metaflow for more than two years has been used by their company across a variety of data science projects for real-life use …
Atman Rathod / 2020-01-13 5 years ago / 未收藏/ cmarix发送到 kindle
Data science is continuing to gain traction as a field over the past several years and is now an intrinsic aspect of business strategy for many leading companies around the globe. With the changes in enterprise data science, new and innovative tools for data scientists are also emerging to help to solve complex problems. There …
Erik Bernhardsson / 2020-01-13 5 years ago / 未收藏/ Erik Bernhardsson发送到 kindle
Let’s consider a toy model where you’re hiring for two things and that those are equally valuable. It’s not very important what those are, so let’s just call them “thing A” and “thing B” for now. For one set of abilities, the scatter plot looks like this:
plot
The assumption here is that A and B are drawn from a 2D-Gaussian with a mild positive correlation. I crammed a whole lot of stuff into this plot: the scatter plot shows the distribution of A vs B, and the two histograms (on top and on the right) shows the distribution over A and over B.
We’re going to hire some people, so we look at a bunch of resumes and try to decide who’s going to make it to the next stage. The best candidates are the ones that are great at both A and B, and we’ll obviously bring them in. But some candidates are going to be good at A but not B, or vice versa. So you might choose to evaluate candidates on some combination of the two. For instance, bring in people for which $$ A + B > k $$ where $$ k $$ is some constant:
plot
We can already see something interesting here, which is that the candidates we bring in exhibit a negative correlation between thing A and B, despite those being independent. This is something that’s called Berkson’s paradox.
I’ve written about a particular example of this previously: Google found that experience with programming competitions was negatively correlated with actual work success. This would happen if we relabel the x-axis above to say “general interview feedback” and the y-axis as “programming competition success”. The problem isn’t that programming competition success is somehow bad: it might have a strongly positive correlation with future work performance. The problem is that Google probably overweighted programming competition success in their hiring process versus other things that would more accurately predict future work performance. This caused an “artificial” negative correlation between those two qualities among the group that were hired.
An interesting paper claims a negative correlation between sales performance and management performance for sales people promoted into managers. The conclusion is that “firms prioritize current job performance in promotion decisions at the expense of other observable characteristics that better predict managerial performance”. While this paper isn’t about hiring, it’s the exact same theory here: the x-axis would be something like “expected future management ability” and the y-axis “sales performance”.
This problem of overweighting is a consistent theme throughout this post and we’ll get back to it!

It gets worse: the market forces

Because you’re hiring in a market with many other players, the really good candidates may simply have so many options that they are going to go to whatever company they want to and make a zillion dollars. Let’s say A and B are equally valued by you, as well as the market. We end up we something like this:
plot
Look at the green segment here: now there’s an even stronger negative correlation between A and B.

Recruiting is like buying a home

This isn’t only for recruiting, and I think this negative correlation is intuitively more clear in the context of buying a home. You might value an extra bathroom as worth +$50,000, and an extra bedroom as +$100,000, but so does the market. As a result, given your budget, you’ll see a negative correlation between having an extra bathroom and having an extra bedroom, because the market prices you out of having both.
But this also presents an opportunity. The tradeoffs forces you to focus on the things that you value more than the market. Maybe you don’t think a 4th floor walk-up is more than a -$10,000 penalty for you, but the market values it as -$20,000: then in fact you should hone in and target exactly those apartments. As we will see with recruiting, the trick to figure out your own preference versus the market. Let’s dig into a few cases.

A few case studies

A common human bias is to interpret confidence as a sign of competence, and as a first order approximation, let’s say the market prices both equally. But let’s assume that we decide we’re not going to succumb to the same bias as the market as a whole. We conclude that the market overvalues confidence, and that we’re going to do everything we can to eliminate this bias from our interviewing process. While competence isn’t easy to observe, let’s say we can get very close by having a carefully thought out interview process. The resulting chart is something like this:
confidence
Our cutoff is going to be a vertical line, since we only care about competence, not confidence. The “market cutoff” is going to be the diagonal line. The people we end up considering will be the green triangle.
Here’s the weird thing though: our group of people that we consider will:
  • On average have low confidence
  • Exhibit a negative correlation with confidence and competence
The same phenomenon arises in more complex situation. Let’s say everything else equals, it is better to hire someone from a fancy school, but that the market overvalues it. In contrast, let’s say we value general competence slightly more than the market. The market cutoff will be a 45 degree line, but our cutoff will be a line with a different angle. We end up with something like this:
confidence
There’s a similar conclusion here: we actually see that the candidates we’re interested in went to a less than average fancy school.
More generally, the conclusion when you’re hiring in a competitive market is that even if you think some quality is desirable, if you think the market overvalues that quality, you should look at the other side of the spectrum. This goes back to my example about buying a home.

A model for finding the best candidates

The model so far is easy to understand and helps us explore a few tradeoffs when hiring but I think it falls short in a few areas. Let’s create a slightly more complex model that is a bit less intuitive but I think slightly more realistic. This section is a bit more math, so feel free to skip if it’s not your thing.
What we really want to optimize for is our estimated value divided by the market’s value since the market determines the salary, roughly. Assumptions:
  • The value to the company is $$ v_c = \exp(\alpha_c x + \beta_c y) $$ where $$ (\alpha_c, \beta_c) $$ is a vector with parameters we pick
  • The market value (i.e. the salary) is $$ v_m = \exp(\alpha_m x + \beta_m y) $$ where $$ (\alpha_m, \beta_m) $$ is a vector with parameters that the market values
  • The quantity we’re trying to optimize is $$ z = v_c / (v_m + k) $$ where $$ k $$ is a constant.
  • The constant (which I set to $$ k = 1 $$) represents some combination of
    1. We don’t want to just take the market price for candidates: we pay them a fair base wage that ramps up with market demand.
    2. The cost of hiring/onboarding/training.
Throughout the next few plots, let’s set the “market vector” for all of them to $$ (\alpha_m, \beta_m) = (1, 1)$$ i.e. the market values the two things equally. We then vary how much we care about those things.
First of all, let’s say we value A and B equally, but we care about them a bit less than the market. We bucket the candidates into three different buckets based on the value $$ z = v_c / (v_m + k) $$. If we plot this, we see the same negative correlation (the blue line):
plot
If we decide we’re going to outbid the market we can set $$ (\alpha_c, \beta_c) = (2, 2) $$ on the other hand:
plot
The more interesting things happen if we decide we don’t care about quantity B, but the market still does. This would correspond to the competence-confidence case where the x-axis is competence and the y-axis is confidence. The market values both, but we are smarter and we only value the former. We set $$ (\alpha_c, \beta_c) = (1, 0) $$:
plot
Similarly to what we saw earlier, we see that we if we go after the “best” people (in terms of the quantity $$ z = v_c / (v_m + k) $$ then we actually end up hiring the people that have less-than-average confidence. This is because the market systematically underprices those.
In the other case when we think thing A and B are both positive, but we think the market overvalues thing B, we can set $$ (\alpha_c, \beta_c) = (1, 0.5) $$. This would correspond to the example where A is the fanciness of the school they went to.
plot
The outcome is somewhat similar. Even though we prefer candidates from fancy schools, we still end of being better off hiring people from “average” schools. Again, this is because the market systematically undervalues those. The fact that we consider B a “good” quantity is less relevant than the fact that we consider it less valuable than the market does.
A different case would be a company that only pays attention to some superficial measurement at the cost of things that matter more. For instance, let’s say the x-axis is “task-relevant experience” and the y-axis is “fanciness of their degree”. This situation isn’t so contrived: I’ve talked to recruiters at bigcorp enterprises, where there’s a strong mandate to only hire Ph.D.’s but where (my guess) the interview process is pretty noisy. We set $$ (\alpha_c, \beta_c) = (0, 1) $$:
plot
The interesting observation is the histogram at the top: the blue distribution of hired candidates end up having a much lower task-relevant experience than the ones that were rejected. Not a hiring strategy I would endorse. There is however one odd twist to this. Let’s say we keep ignoring feature A (task-relevant experience), but we throw all our money bidding out basically anyone else based on B (fanciness of their degree):
plot
Because there’s some small correlation between A and B, we actually do end up at this point getting higher-than-average skills in terms of A. The cost is that we’re going to have to out-spend everyone else. A far more cost-conscious way would be instead to pay a medium premium for A and a small for B, rather than a huge for B but none for A.

Conclusions and opportunities

If you ask the average recruiter how they find people, it’s usually some type of Boolean search on LinkedIn, and when you ask them how they grade resumes, it’s typically some combination of having CS degrees from fancy schools, having the exact experience with the tech stack you have (down to frameworks), etc. God forbid if someone has a gap on their resume, or if they need visa sponsorship.
What my model implies, is that there’s an “arbitrage opportunity” here. In fact, it’s a bit of a silver lining to the fact that the market is biased. Are companies systematically putting a premium on something? Then bet against them! Go after the underdogs. If every hiring manager acts in their own rational self-interest (which unfortunately, they don’t) then over time these biases will vanish and the market will converge towards efficiency.
You might have your own personal preferences here, and I’m not going to judge you, but here’s a few thoughts on things that may be undervalued by the market:
  • Candidates from non-fancy schools
  • Candidates who didn’t go to school at all and are self taught, or have some non-traditional path into the field
  • Candidates who didn’t get a CS degree
  • Candidates who never worked at any well-respected company
  • Candidates who are low confidence or “interview poorly”
  • Candidates that could experience discrimination for other reasons, like being from an underrepresented groups, or not fitting some stereotype of what a software engineer should look like
  • Candidates who need visa sponsorships
  • Candidates who don’t have experience with your exact tech stack, but a strong generalist foundation (this is especially prevalent in complex industries, which I tweeted something about this a few weeks ago)
  • Candidates who left the workforce for a while to take care of family
  • … many more things
I want to be extra clear about what my conclusion here is. I’m not saying you should think of it as a bad thing that someone is coming from a fancy school. Everything else equals, it’s typically a good thing! What I’m saying is that if you’re hiring, then you will be more successful going after candidates that the market undervalues. And this doesn’t just apply to measurable things (what school they went to), but also things that people subconsciously value (eg. confidence of a candidate). On the other hand, overvaluing things (that are less predictive of future work performance) can lead you to hire worse candidates.
In all these cases, it turns out your preference versus the market’s preference matters more than your preference in itself.
All of this stuff may or may not sound obvious to you!

Appendix

  • I only talked about tradeoffs between two traits (A and B), but the model extends well into many more ones. But computer screens are two-dimensional and it’s harder to plot more dimensions than 2!
  • These models may seem a bit arbitrary to you, and of course every model is a somewhat arbitrary simplification of reality! I’m not claiming that it’s perfect.
  • That being said, both models gave the answer my intuition told me on basically the first attempt: the conclusions are very robust to the inputs, and I spent almost zero time trying to pick the right parameters.
  • Even without the screening step and without a competitive market, you might still end up with a negative correlation for the people you make an offer to. I’ve mentioned this in the past talking about Pareto frontiers. It’s a slightly different phenomenon, though.
  • I don’t mean to pick on recruiters, and there are some absolutely outstanding ones that I’ve worked with in my life!
  • I accidentally published a draft of this a few days ago, sorry about that!
  • The (very simple) code is on Github, as always.
黄集伟 / 2020-01-14 5 years ago / 未收藏/ 读写人发送到 kindle
Marcin Wanago / 2020-01-13 5 years ago / 未收藏/ wanago发送到 kindle
Cypress has proven to be an appropriate tool for writing E2E tests. In the previous parts of this series, we’ve gone through its basics. That’s a proper moment to take a look at a useful addition: the Gherkin syntax. In this article, we look into its principles and how to make a Cypress Cucumber integration. […]
The post JavaScript testing #8. Integrating Cypress with Cucumber and Gherkin appeared first on Marcin Wanago Blog - JavaScript, both frontend and backend.
Sergey Kargopolov / 2020-01-14 5 years ago / 未收藏/ appsdeveloperblog发送到 kindle
In this Spring Security tutorial, you will learn how to enable and use the Method Level Security with @Secured annotation. Add Spring Security Dependency To use Spring Method Level security and the @Secured annotation in your Spring Boot application you will need to add Spring Security dependency to pom.xml file. Below is a code snippet that…
The post Spring Security @Secured Annotation Example appeared first on Apps Developer Blog.
Admin / 2020-01-13 5 years ago / 未收藏/ freeebooksblog发送到 kindle
The Boyfriend Experience By Carly Phillips / Genre: Romance, Contemporary Fiction He’s the total package. Except … Eric Miller isn’t looking for a long term relationship. And he definitely isn’t thrilled when a friend signs him up for The Boyfriend Experience app behind his back. It’s not like he has a problem getting women on […]
The post Best Free and Bargain Kindle Books: 01-13-20 appeared first on Free Ebooks Blog.
Sandy Ong / 2020-01-13 5 years ago / 未收藏/ spectrum发送到 kindle
Jenax wants to power a new generation of wearables with its flexible batteries
Emily Waltz / 2020-01-14 5 years ago / 未收藏/ spectrum发送到 kindle
A new software program attempts to recognize students’ emotions to aid teachers, but faces aren’t so easy to read
Valentino Gagliardi / 2020-01-14 5 years ago / 未收藏/ valentinog发送到 kindle
In this post we’ll shed some light on JavaScript private class fields and see how they compare to the TypeScript private modifier. JavaScript private class fields and the need for privacy Historically JavaScript had no native mechanism for protecting variables from access, unless of course, the quintessential closure. Closures are the foundation for a lot …
John Anderer / 2020-01-13 5 years ago / 未收藏/ studyfinds发送到 kindle
Woman holding pill, glass of waterANN ARBOR, Mich. — Given the option, would you avoid the gym altogether and simply pop a pill or drink a supplement that brings about the same benefits as a workout? It sounds farfetched, but the idea of lounging around all day yet still enjoying the health benefits of an intense workout may soon be possible.…
The post Could A Pill Replace Exercise? Scientists Discover Protein Mimics Effects Of Working Out appeared first on Study Finds.
John Anderer / 2020-01-13 5 years ago / 未收藏/ studyfinds发送到 kindle
Tired man suffering from lack of sleepUPPSALA, Sweden — The “all-nighter,” in which students stay up all night studying or completing school work, has become synonymous with the modern college experience. While it’s obviously unhealthy to stay up all night frequently, the occasional all-nighter isn’t typically considered detrimental to one’s well being. Now, quite surprisingly, a new study conducted at Uppsala University…
The post Power Of One: Losing Single Night’s Sleep May Raise Levels Of Alzheimer’s Biomarker appeared first on Study Finds.
John Anderer / 2020-01-13 5 years ago / 未收藏/ studyfinds发送到 kindle
Anxious, nervous woman biting her fingernailsNEW YORK — In comparison to the seemingly endless trek from Monday to Friday, the weekend often feels like it’s over in a flash. Staring down another Monday morning, many report feeling anxious about the coming work week by the time Sunday night comes around. Now, a new survey of 2,000 Americans finds, on average, people…
The post Weekend Worry: Americans Begin Feeling Workweek Anxiety Just Before 4 P.M. On Sundays appeared first on Study Finds.
John Anderer / 2020-01-13 5 years ago / 未收藏/ studyfinds发送到 kindle
Man eating salad, enjoying healthy dietCHICAGO — It’s been shown that losing excess weight can help men diagnosed with low testosterone raise their levels of the essential male sex hormone. However, a new set of research performed in Chicago finds a low-fat diet probably isn’t the best choice for many men looking to lose weight and raise their testosterone. Researchers say…
The post Study Finds A Low-Fat Diet May Lower Testosterone Levels In Men appeared first on Study Finds.
2020-01-14 5 years ago / 未收藏/ egghead.io - Bite-sized Web Development Video Tutorials & Training发送到 kindle
Web Previews offer you and your team a way to preview changes from pull requests before merging code to a production or integration branch. In this video, I show how to integrate pull request previews using GitHub and the Amplify Console.
<a href="https://linux.cn/" target=_blank>Linux中国</a> / 2020-01-14 5 years ago / 未收藏/ linuxChina发送到 kindle

Google 在 2017 年宣布了对 SHA-1 哈希算法的首个成功碰撞攻击。
所谓碰撞攻击是指两个不同的信息产生了相同的哈希值。在 Google 的研究中,攻击所需的计算量十分惊人,用 Google 说法,它用了 6,500 年的 CPU 计算时间去完成了碰撞的第一阶段,然后用了 110 年的 GPU 计算时间完成第二阶段。
去年五月,一组来自新加坡和法国的研究人员演示了首个构造前缀碰撞攻击,即攻击者可以自由选择两个碰撞信息的前缀。
当时构造前缀碰撞攻击所需的计算费用不到 10 万美元,现在研究人员在最新演示中进一步将攻击成本降至 4.5 万美元。
研究人员在线租赁了 900 台 Nvidia GTX 1060 GPU 执行攻击,几个月前费用还高达 7.4 万美元,优化实现和计算成本的下降使得攻击成本降至 4.5 万美元,他们估计到 2025 年攻击成本会降至 1 万美元。
SHA-1 的使用率在下降,但距离淘汰还很遥远。
来源:solidot.org

更多资讯

国家计算机病毒应急处理中心:监测发现 24 款违法 App
国家计算机病毒应急处理中心近期在“净网 2020”专项行动中通过互联网监测发现,多款违法、违规有害移动应用存在隐私不合规行为,违反《网络安全法》相关规定,涉嫌超范围采集个人隐私信息。
来源:新华社
详情链接:https://www.dbsec.cn/blog/article/5727.html 

DuckDuckGo 将成为欧盟 Android 设备的默认搜索引擎选项
欧盟监管机构正强迫 Google 向  Android 用户展示选项选择他们自己的默认搜索引擎。
Google 此前在 Android 操作系统设置自己为默认搜索引擎,这一做法被欧盟裁定为非法,它向搜索巨人开出了 50 亿美元的创纪录罚单。
来源:solidot.org
详情链接:https://www.dbsec.cn/blog/article/5728.html 

谷歌公布 iOS 12.4 漏洞详情:黑客可远程破解 iPhone、打开相机与麦克风
屡屡在安全事件中立功的谷歌 Project Zero 团队表示,只需要花费几分钟就可以远程破解掉一台 iOS 设备。
苹果用户不用太担心,该漏洞出现于 iOS 12.4 系统中,在谷歌发现并报告给苹果后,后者已经在 iOS 12.4.1 中予以修复。
来源:快科技
详情链接:https://www.dbsec.cn/blog/article/5729.html 

黑客组织入侵捐款平台 澳洲森林火灾善款遭窃取
从 2019 年 9 月开始至今,一场持续了 100 多天的大火一直在澳大利亚的土地上肆虐,2 万多只考拉在大火中丧生,1000 万公顷森林化作焦土,2000 多处房屋毁于一旦,上千居民被迫迁移,死亡人数已接近 30 人......面对天灾,世界各地的人都通过网上募捐平台向澳大利亚捐款,以求大火早点熄灭。
来源:手机中国
详情链接:https://www.dbsec.cn/blog/article/5730.html 

(信息来源于网络,安华金和搜集整理)


完美阅读及吐槽,请猛击:https://linux.cn/article-11782-1.html?utm_source=qqmail&utm_medium=qqmail

<a href="https://linux.cn/" target=_blank>Linux中国</a> / 2020-01-13 5 years ago / 未收藏/ linuxChina发送到 kindle

密码强制策略对所有操作系统和应用程序都是通用的。如果要在 Linux 上实现密码强制策略,请参阅以下文章。
默认情况下,大多数公司都会强制执行密码强制策略,但根据公司的要求,密码的时间周期会有所不同。通常每个人都使用 90 天的密码周期。用户只会在他们使用的一些服务器上更改密码,而不会在他们不经常使用的服务器上更改密码。
特别地,大多数团队忘记更改服务帐户密码,这可能导致日常工作的中断,即使他们配置有基于 SSH 密钥的身份验证。如果用户帐户密码过期,基于SSH密钥的身份验证和 cronjob 将不起作用。
为了避免这种情况,我们创建了一个 shell 脚本来向你发送 10 天内到期的用户帐户列表。
本教程中包含两个 bash 脚本可以帮助你收集系统中用户到期天数的信息。

1) 检查 10 天后到期的用户帐户列表

此脚本将帮助你在终端上检查 10 天内到期的用户帐户列表。
# vi /opt/script/user-password-expiry.sh
#!/bin/sh
/tmp/user-expiry-1.txt
/tmp/user-expiry.txt
echo "-------------------------------------------------"
echo "UserName  The number of days the password expires"
echo "-------------------------------------------------"
for usern in u1 u2 u3 u4
do
today=$(date +%s)
userexpdate=$(chage -l $usern | grep 'Password expires' |cut -d: -f2)
passexp=$(date -d "$userexpdate" "+%s")
exp=`expr \( $passexp - $today \)`
expday=`expr \( $exp / 86400 \)`
echo "$usern $expday" >> /tmp/user-expiry.txt
done
cat /tmp/user-expiry.txt | awk '$2 <= 10' > /tmp/user-expiry-1.txt
cat /tmp/user-expiry-1.txt | column -t
将文件 user-password-expiry.sh 设置为可执行的 Linux 文件权限。
# chmod +x /opt/script/user-password-expiry.sh
你将得到如下输出,但用户与天数可能不同。
# sh /opt/script/user-password-expiry.sh

-------------------------------------------------
UserName  The number of days the password expires
-------------------------------------------------
u1         -25
u2          9
u3          3
u4          5

2) 发送包含 10 天内到期的用户帐户列表的电子邮件

此脚本将发送一封包含 10 天内到期的用户帐户列表的邮件。
# vi /opt/script/user-password-expiry-mail.sh
#!/bin/sh
SUBJECT="Information About User Password Expiration on "`date`""
MESSAGE="/tmp/user-expiry.txt"
MESSAGE1="/tmp/user-expiry-1.txt"
TO="magesh.m@rentacenter.com"
echo "-------------------------------------------------" >> $MESSAGE1
echo "UserName  The number of days the password expires" >> $MESSAGE1
echo "-------------------------------------------------" >> $MESSAGE1
for usern in u1 u2 u3 u4
do
today=$(date +%s)
userexpdate=$(chage -l $usern | grep 'Password expires' |cut -d: -f2)
passexp=$(date -d "$userexpdate" "+%s")
exp=`expr \( $passexp - $today \)`
expday=`expr \( $exp / 86400 \)`
echo "$usern $expday" >> $MESSAGE
done
cat $MESSAGE | awk '$2 <= 10' >> $MESSAGE1
mail -s "$SUBJECT" "$TO" < $MESSAGE1
rm $MESSAGE
rm $MESSAGE1
将文件 user-password-expiry-mail.sh 设置为可执行的 Linux 文件权限。
# chmod +x /opt/script/user-password-expiry-mail.sh
最后,添加一个 cronjob 去自动执行脚本。每天早上 8 点运行一次。
# crontab -e
0 8 * * * /bin/bash /opt/script/user-password-expiry-mail.sh
你将收到一封与第一个脚本输出类似的电子邮件。

via: https://www.2daygeek.com/bash-script-to-check-user-account-password-expiry-linux/
作者:Magesh Maruthamuthu 选题:lujun9972 译者:qianmingtian 校对:wxy
本文由 LCTT 原创编译,Linux中国 荣誉推出


完美阅读及吐槽,请猛击:https://linux.cn/article-11781-1.html?utm_source=qqmail&utm_medium=qqmail

<a href="https://linux.cn/" target=_blank>Linux中国</a> / 2020-01-13 5 years ago / 未收藏/ linuxChina发送到 kindle
学习如何使用 Python 的 Pygame 模块编程电脑游戏,并开始操作引力。


真实的世界充满了运动和生活。物理学使得真实的生活如此忙碌和动态。物理学是物质在空间中运动的方式。既然一个电脑游戏世界没有物质,它也就没有物理学规律,使用游戏程序员不得不模拟物理学。
从大多数电脑游戏来说,这里基本上仅有两个方面的物理学是重要的:引力和碰撞。
当你添加一个敌人到你的游戏中时,你实现了一些碰撞检测,但是这篇文章要添加更多的东西,因为引力需要碰撞检测。想想为什么引力可能涉及碰撞。如果你不能想到任何原因,不要担心 —— 它会随着你开发示例代码工作而且显然。
在真实世界中的引力是有质量的物体来相互吸引的倾向性。物体(质量)越大,它施加越大的引力作用。在电脑游戏物理学中,你不必创建质量足够大的物体来证明引力的正确;你可以在电脑游戏世界本身中仅编程一个物体落向假设的最大的对象的倾向。

添加一个引力函数

记住你的玩家已经有了一个决定动作的属性。使用这个属性来将玩家精灵拉向屏幕底部。
在 Pygame 中,较高的数字更接近屏幕的底部边缘。
在真实的世界中,引力影响一切。然而,在平台游戏中,引力是有选择性的 —— 如果你添加引力到你的整个游戏世界,你的所有平台都将掉到地上。反之,你可以仅添加引力到你的玩家和敌人精灵中。
首先,在你的 Player 类中添加一个 gravity 函数:
    def gravity(self):
        self.movey += 3.2 # 玩家掉落的多快
这是一个简单的函数。首先,不管你的玩家是否想运动,你设置你的玩家垂直运动。也就是说,你已经编程你的玩家总是在下降。这基本上就是引力。
为使引力函数生效,你必须在你的主循环中调用它。这样,当每一个处理循环时,Python 都应用下落运动到你的玩家。
在这代码中,添加第一行到你的循环中:
    player.gravity() # 检查引力
    player.update()
启动你的游戏来看看会发生什么。要注意,因为它发生的很快:你是玩家从天空上下落,马上掉出了你的游戏屏幕。
你的引力模拟是工作的,但是,也许太好了。
作为一次试验,尝试更改你玩家下落的速度。

给引力添加一个地板

你的游戏没有办法发现你的角色掉落出世界的问题。在一些游戏中,如果一个玩家掉落出世界,该精灵被删除,并在某个新的位置重生。在另一些游戏中,玩家会丢失分数或一条生命。当一个玩家掉落出世界时,不管你想发生什么,你必须能够侦测出玩家何时消失在屏幕外。
在 Python 中,要检查一个条件,你可以使用一个 if 语句。
你必需查看你玩家是否正在掉落,以及你的玩家掉落的程度。如果你的玩家掉落到屏幕的底部,那么你可以做一些事情。简化一下,设置玩家精灵的位置为底部边缘上方 20 像素。
使你的 gravity 函数看起来像这样:
    def gravity(self):
        self.movey += 3.2 # 玩家掉落的多快
       
        if self.rect.y > worldy and self.movey >= 0:
            self.movey = 0
            self.rect.y = worldy-ty
然后,启动你的游戏。你的精灵仍然下落,但是它停在屏幕的底部。不过,你也许不能看到你在地面层之上的精灵。一个简单的解决方法是,在精灵碰撞游戏世界的底部后,通过添加另一个 -ty 到它的新 Y 位置,从而使你的精灵弹跳到更高处:
    def gravity(self):
        self.movey += 3.2 # 玩家掉落的多快
       
        if self.rect.y > worldy and self.movey >= 0:
            self.movey = 0
            self.rect.y = worldy-ty-ty
现在你的玩家在屏幕底部弹跳,恰好在你地面精灵上面。
你的玩家真正需要的是反抗引力的方法。引力问题是,你不能反抗它,除非你有一些东西来推开引力作用。因此,在接下来的文章中,你将添加地面和平台碰撞以及跳跃能力。在这期间,尝试应用引力到敌人精灵。
到目前为止,这里是全部的代码:
#!/usr/bin/env python3
# draw a world
# add a player and player control
# add player movement
# add enemy and basic collision
# add platform
# add gravity

# GNU All-Permissive License
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.  This file is offered as-is,
# without any warranty.

import pygame
import sys
import os

'''
Objects
'''

class Platform(pygame.sprite.Sprite):
    # x location, y location, img width, img height, img file    
    def __init__(self,xloc,yloc,imgw,imgh,img):
        pygame.sprite.Sprite.__init__(self)
        self.image = pygame.image.load(os.path.join('images',img)).convert()
        self.image.convert_alpha()
        self.rect = self.image.get_rect()
        self.rect.y = yloc
        self.rect.x = xloc

class Player(pygame.sprite.Sprite):
    '''
    Spawn a player
    '''
    def __init__(self):
        pygame.sprite.Sprite.__init__(self)
        self.movex = 0
        self.movey = 0
        self.frame = 0
        self.health = 10
        self.score = 1
        self.images = []
        for i in range(1,9):
            img = pygame.image.load(os.path.join('images','hero' + str(i) + '.png')).convert()
            img.convert_alpha()
            img.set_colorkey(ALPHA)
            self.images.append(img)
            self.image = self.images[0]
            self.rect  = self.image.get_rect()

    def gravity(self):
        self.movey += 3.2 # how fast player falls
       
        if self.rect.y > worldy and self.movey >= 0:
            self.movey = 0
            self.rect.y = worldy-ty-ty
       
    def control(self,x,y):
        '''
        control player movement
        '''
        self.movex += x
        self.movey += y
       
    def update(self):
        '''
        Update sprite position
        '''

        self.rect.x = self.rect.x + self.movex
        self.rect.y = self.rect.y + self.movey

        # moving left
        if self.movex < 0:
            self.frame += 1
            if self.frame > ani*3:
                self.frame = 0
            self.image = self.images[self.frame//ani]

        # moving right
        if self.movex > 0:
            self.frame += 1
            if self.frame > ani*3:
                self.frame = 0
            self.image = self.images[(self.frame//ani)+4]

        # collisions
        enemy_hit_list = pygame.sprite.spritecollide(self, enemy_list, False)
        for enemy in enemy_hit_list:
            self.health -= 1
            print(self.health)

        ground_hit_list = pygame.sprite.spritecollide(self, ground_list, False)
        for g in ground_hit_list:
            self.health -= 1
            print(self.health)

class Enemy(pygame.sprite.Sprite):
    '''
    Spawn an enemy
    '''
    def __init__(self,x,y,img):
        pygame.sprite.Sprite.__init__(self)
        self.image = pygame.image.load(os.path.join('images',img))
        #self.image.convert_alpha()
        #self.image.set_colorkey(ALPHA)
        self.rect = self.image.get_rect()
        self.rect.x = x
        self.rect.y = y
        self.counter = 0
       
    def move(self):
        '''
        enemy movement
        '''
        distance = 80
        speed = 8

        if self.counter >= 0 and self.counter <= distance:
            self.rect.x += speed
        elif self.counter >= distance and self.counter <= distance*2:
            self.rect.x -= speed
        else:
            self.counter = 0

        self.counter += 1

class Level():
    def bad(lvl,eloc):
        if lvl == 1:
            enemy = Enemy(eloc[0],eloc[1],'yeti.png') # spawn enemy
            enemy_list = pygame.sprite.Group() # create enemy group
            enemy_list.add(enemy)              # add enemy to group
           
        if lvl == 2:
            print("Level " + str(lvl) )

        return enemy_list

    def loot(lvl,lloc):
        print(lvl)

    def ground(lvl,gloc,tx,ty):
        ground_list = pygame.sprite.Group()
        i=0
        if lvl == 1:
            while i < len(gloc):
                ground = Platform(gloc,worldy-ty,tx,ty,'ground.png')
                ground_list.add(ground)
                i=i+1

        if lvl == 2:
            print("Level " + str(lvl) )

        return ground_list

    def platform(lvl,tx,ty):
        plat_list = pygame.sprite.Group()
        ploc = []
        i=0
        if lvl == 1:
            ploc.append((0,worldy-ty-128,3))
            ploc.append((300,worldy-ty-256,3))
            ploc.append((500,worldy-ty-128,4))

            while i < len(ploc):
                j=0
                while j <= ploc[2]:
                    plat = Platform((ploc[0]+(j*tx)),ploc[1],tx,ty,'ground.png')
                    plat_list.add(plat)
                    j=j+1
                print('run' + str(i) + str(ploc))
                i=i+1

        if lvl == 2:
            print("Level " + str(lvl) )

        return plat_list

'''
Setup
'''
worldx = 960
worldy = 720

fps = 40 # frame rate
ani = 4  # animation cycles
clock = pygame.time.Clock()
pygame.init()
main = True

BLUE  = (25,25,200)
BLACK = (23,23,23 )
WHITE = (254,254,254)
ALPHA = (0,255,0)

world = pygame.display.set_mode([worldx,worldy])
backdrop = pygame.image.load(os.path.join('images','stage.png')).convert()
backdropbox = world.get_rect()
player = Player() # spawn player
player.rect.x = 0
player.rect.y = 0
player_list = pygame.sprite.Group()
player_list.add(player)
steps = 10 # how fast to move

eloc = []
eloc = [200,20]
gloc = []
#gloc = [0,630,64,630,128,630,192,630,256,630,320,630,384,630]
tx = 64 #tile size
ty = 64 #tile size

i=0
while i <= (worldx/tx)+tx:
    gloc.append(i*tx)
    i=i+1

enemy_list = Level.bad( 1, eloc )
ground_list = Level.ground( 1,gloc,tx,ty )
plat_list = Level.platform( 1,tx,ty )

'''
Main loop
'''
while main == True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit(); sys.exit()
            main = False

        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_LEFT or event.key == ord('a'):
                print("LEFT")
                player.control(-steps,0)
            if event.key == pygame.K_RIGHT or event.key == ord('d'):
                print("RIGHT")
                player.control(steps,0)
            if event.key == pygame.K_UP or event.key == ord('w'):
                print('jump')

        if event.type == pygame.KEYUP:
            if event.key == pygame.K_LEFT or event.key == ord('a'):
                player.control(steps,0)
            if event.key == pygame.K_RIGHT or event.key == ord('d'):
                player.control(-steps,0)
            if event.key == pygame.K_UP or event.key == ord('w'):
                print('jump')

            if event.key == ord('q'):
                pygame.quit()
                sys.exit()
                main = False

    world.blit(backdrop, backdropbox)
    player.gravity() # check gravity
    player.update()
    player_list.draw(world)
    enemy_list.draw(world)
    ground_list.draw(world)
    plat_list.draw(world)
    for e in enemy_list:
        e.move()
    pygame.display.flip()
    clock.tick(fps)

( ↓↓ —— 未完 —— ↓↓ )


完美阅读及吐槽,请猛击:https://linux.cn/article-11780-1.html?utm_source=qqmail&utm_medium=qqmail

<a href="https://linux.cn/" target=_blank>Linux中国</a> / 2020-01-13 5 years ago / 未收藏/ linuxChina发送到 kindle

当我开始在个人计算机上使用 Linux 时,首先令我兴奋的就是轻巧的窗口管理器,这主要是因为当时我的笔记本电脑只有有 32MB 的内存,其它的都运行不了了。
接着我开始接触 xmonad 之类的平铺窗口管理器!我可以用键盘管理窗口了!它们是如此之快!我可以通过编写 Haskell 程序来配置 xmonad!我可以用各种有趣的方式自定义所有内容(例如使用 dmenu 作为启动器)!这些年来,我用过 3、4 个不同的平铺窗口管理器,它们都很有趣。
大约 6 年前,我觉得配置平铺窗口管理器对我来说不再是一件有趣的事情,因此转而使用 Ubuntu 桌面环境 Gnome。(现在,我的笔记本电脑中的内存增加了 500 倍,这要快得多
我使用 Gnome 已有很长时间了,但是我仍然有点想念平铺窗口管理器。六个月前,一个朋友告诉我有关 PaperWM 的消息,它使你可以在 Gnome 中平铺窗口!我立即安装了它,并从那时起我一直在使用它。

PaperWM:Gnome 下的平铺窗口管理

PaperWM 的基本思想是:你想继续使用 Gnome(因为在 Gnome 中各种任务都能完成),但是你也希望使用平铺窗口管理器。
它是一个 Gnome 扩展程序(而不是一个独立的窗口管理器),并且使用 Javascript。

&ldquoaper” 表示你的所有窗户都在一行中

PaperWM 的主要想法是将所有窗口排成一行,这实际上与传统的平铺窗口管理器大不相同,在传统的平铺窗口管理器中,你可以按任意方式平铺窗口。这是我写这篇博客时在几个窗口之间切换/调整大小的 gif 图像(有一个浏览器和两个终端窗口):

PaperWM 的 Github README 链接了此视频:http://10gui.com/video/,它描述为一个类似的”线性窗口管理器“。
我以前从未听说过这种组织窗口的方式,但是我喜欢它的简单性。如果要查找特定的窗口,只需向左/向右移动,直到找到它。

我在 PaperWM 中所做的一切

还有很多其他功能,但这是我使用的功能:
  • 在窗口之间左右移动(Super + ,Super + .
  • 按顺序向左/向右移动窗口(Super+Shift+,Super+Shift+.
  • 全屏显示窗口(Super + f
  • 缩小窗口(Super + r

我喜欢不需要配置的工具

我在笔记本上使用 PaperWM 已经 6 个月了,我真的很喜欢它!即使它是可配置(通过编写 Javascript 配置文件),我也非常欣赏它,它自带我想要的功能,我无需研究如何去配置。
fish shell 是另一个类似的令人愉悦的工具,我基本上没有配置 fish(除了设置环境变量等),我真的很喜欢它的默认功能。

via: https://jvns.ca/blog/2020/01/05/paperwm/
作者:Julia Evans 选题:lujun9972 译者:geekpi 校对:wxy
本文由 LCTT 原创编译,Linux中国 荣誉推出


完美阅读及吐槽,请猛击:https://linux.cn/article-11779-1.html?utm_source=qqmail&utm_medium=qqmail

Nwose Lotanna Victor / 2020-01-14 5 years ago / 未收藏/ Telerik Blogs发送到 kindle
This post takes you through the top features in the newly released Create React App 3.3. See how the latest updates help speed your development of React apps.
Create React App is a tool built by developers at Facebook to help you build React applications. It saves you from time-consuming setup and configuration. You simply run one command and create react app sets up the tools you need to start your React project . — Guil Hernandez

Create-React-App, which is arguably one of the most popular boilerplates of all times with over 1.5 million projects currently using it, released a new version (3.3) recently with a whole lot of improvements. Even though we all know React does not require build dependencies, it does depend on several important tools to make the magic we see when we run npm start. Some of these tools have been updated and CRA has been maintained to retain constant support.

Custom Templates

The team at Create React App has shipped this new version with custom templates. You can now create new applications with either the base template (which you already use), now called cra-template, or the TypeScript boilerplate, called cra-template-typescipt. This can be done by running the command below:
npx create-react-app my-app --template typescript
This spins up a new React app in TypeScript configuration. For TypeScript users, this is great news. This has already been possible for a while now; however, the initial --typescript has been removed and now replaced with --template typescript, as you see above. Starting a new app the way you know, it works perfectly:
npx create-react-app my-app
React community members can now create their own templates too and get it added in the list of templates.

Optional Chaining and Nullish Coalescing Operators

Optional chaining operators are useful for checking if nodes in a tree structure exists or not. If you want to find a property value, you might want to check for intermediate nodes like this:
var street = user.address && user.address.street;
Also, many APIs return either an object or null/undefined, and one may want to extract a property from the result only when it is not null:
var fooInput = myForm.querySelector('input[name=foo]')  
var fooValue = fooInput ? fooInput.value : undefined
According to the TC39 proposal, the Optional Chaining Operator allows a developer to handle many of those cases without repeating themselves or assigning intermediate results in temporary variables:
var street = user.address?.street  
var fooValue = myForm.querySelector('input[name=foo]')?.value
When some other value than undefined is desired for the missing case, this can usually be handled with the Nullish coalescing operator:
// falls back to a default value when response.settings is missing or nullish  
// (response.settings == null) or when response.settings.animationDuration is missing  
// or nullish (response.settings.animationDuration == null)  
const animationDuration = response.settings?.animationDuration ?? 300;
The call variant of Optional Chaining is useful for dealing with interfaces that have optional methods:
iterator.return?.() // manually close an iterator
or with methods not universally implemented:
if (myForm.checkValidity?.() === false) { // skip the test in older web browsers  
    // form validation fails  
    return;  
}
CRA 3.3 now supports these operators and if your TypeScript version is not up to date, you will have to update it for these new operator changes to be accessible to you.
// Optional chaining  
a?.(); // undefined if `a` is null/undefined  
b?.c; // undefined if `b` is null/undefined  

// Nullish coalescing  
undefined ?? 'some other default'; // result: 'some other default'  
null ?? 'some other default'; // result: 'some other default'  
'' ?? 'some other default'; // result: ''  
0 ?? 300; // result: 0  
false ?? true; // result: false
Also, for IDEs like VS Code you have to also update it to understand these new operators when you code.

Numeric Separators

When an integer is large, like 1000000000, you might find it hard to immediately scan through and say what it actually represents, a billion, 10 billion or 100 million. This is where commas come in when you write, to improve readability.
1000000000; // Is this a billion? a hundred million? Ten million?  
101475938.38; // what scale is this? what power of 10?

1_000_000_000; // Ah, so a billion  
101_475_938.38; // And this is hundreds of millions
Separators like underscores between digits can be used to ensure that numeric literals are always readable and not be so difficult to parse with the eye.
const FEE = 12300;  
// is this 12,300? Or 123, because it's in cents?

const AMOUNT = 1234500;  
// is this 1,234,500? Or cents, hence 12,345? Or financial, 4-fixed 123.45?
Using underscores (_, U+005F) as separators helps improve readability for numeric literals, both integers and floating-point (and in JS, it's all floating-point anyway):
1_000_000_000           // Ah, so a billion  
101_475_938.38          // And this is hundreds of millions

let fee = 123_00;       // $123 (12300 cents, apparently)  
let fee = 12_300;       // $12,300 (woah, that fee!)  
let amount = 12345_00;  // 12,345 (1234500 cents, apparently)  
let amount = 123_4500;  // 123.45 (4-fixed financial)  
let amount = 1_234_500; // 1,234,500
Also, this works on the fractional and exponent parts, too:
0.000_001 // 1 millionth  
1e10_000  // 10^10000 -- granted, far less useful / in-range...

No-unexpected-multiline

There is an ESLint config error that was found to not be compatible with Prettier, the unexpected multiline warnings. It has been removed from the CRA project. However, you can re-enable it if you want by extending the ESLint config and adding this line of code to it:
{  
  "extends": "react-app",  
  "rules": {  
    "no-unexpected-multiline": "warn"  
  }  
}

Documentation Updates

A few updates took place on the official documentation page that included template docs, React code splitting and tightening TypeScript docs too.

No Breaking Change

There is really no breaking change with this new version. However, for developers who use react-dev-utils outside of Create React App, you will have to update the webpack dev server dependency to 3.9.0

Upgrading from 3.2 to 3.3

To upgrade, use any of the package managers you are familiar with. For npm:
npm install --save --save-exact react-scripts@3.3.0
or for Yarn:
yarn add --exact react-scripts@3.3.0

Conclusion

Here is the link to the official change log. You have been shown all the new features that shipped with this version of Create React App. You can see how much thought is put into constant improvement of this boilerplate. My favorite new feature is the support for numeric separators. What is yours?
Mikhail Vink / 2020-01-14 5 years ago / 未收藏/ Company Blog发送到 kindle
Dear customers! Please be informed that on January 19, 2020, at 08:00 GMT JetBrains Account and JetBrains Stores will be undergoing routine maintenance that is planned to last for 3 hours. During this time the following services will NOT be … Continue reading
Ned Batchelder / 2020-01-13 5 years ago / 未收藏/ Ned Batchelder's blog发送到 kindle
Yesterday I pleaded, Bug #915: please help! It got posted to Hacker News, where Robert Xiao (nneonneo) did some impressive debugging and found the answer.
The user’s code used mocks to simulate an OSError when trying to make temporary files (source):
with patch('tempfile._TemporaryFileWrapper') as mock_ntf:
    mock_ntf.side_effect = OSError()

Inside tempfile.NamedTemporaryFile, the error handling misses the possibility that _TemporaryFileWrapper will fail (source):
(fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
try:
    file = _io.open(fd, mode, buffering=buffering,
                    newline=newline, encoding=encoding, errors=errors)

    return _TemporaryFileWrapper(file, name, delete)
except BaseException:
    _os.unlink(name)
    _os.close(fd)
    raise

If _TemporaryFileWrapper fails, the file descriptor fd is closed, but the file object referencing it still exists. Eventually, it will be garbage collected, and the file descriptor it references will be closed again.
But file descriptors are just small integers which will be reused. The failure in bug 915 is that the file descriptor did get reused, by SQLite. When the garbage collector eventually reclaimed the file object leaked by NamedTemporaryFile, it closed a file descriptor that SQLite was using. Boom.
There are two improvements to be made here. First, the user code should be mocking public functions, not internal details of the Python stdlib. In fact, the variable is already named mock_ntf as if it had been a mock of NamedTemporaryFile at some point.
NamedTemporaryFile would be a better mock because that is the function being used by the user’s code. Mocking _TemporaryFileWrapper is relying on an internal detail of the standard library.
The other improvement is to close the leak in NamedTemporaryFile. That request is now bpo39318. As it happens, the leak had also been reported as bpo21058 and bpo26385.
Lessons learned:
  • Hacker News can be helpful, in spite of the tangents about shell redirection, authorship attribution, and GitHub monoculture.
  • There are always people more skilled at debugging. I had no idea you could script gdb.
  • Error handling is hard to get right. Edge cases can be really subtle. Bugs can linger for years.
I named Robert Xiao at the top, but lots of people chipped in effort to help get to the bottom of this. ikanobori posted it to Hacker News in the first place. Chris Caron reported the original #915 and stuck with the process as it dragged on. Thanks everybody.
Erlang Central / 2020-01-14 5 years ago / 未收藏/ Erlang Central发送到 kindle
An OTP library lager_iowrite_formatter
Bruce Schneier / 2020-01-14 5 years ago / 未收藏/ Schneier on Security发送到 kindle
Presidential campaign season is officially, officially, upon us now, which means it's time to confront the weird and insidious ways in which technology is warping politics. One of the biggest threats on the horizon: artificial personas are coming, and they're poised to take over political debate. The risk arises from two separate threads coming together: artificial intelligence-driven text generation and social media chatbots. These computer-generated "people" will drown out actual human discussions on the Internet.
Text-generation software is already good enough to fool most people most of the time. It's writing news stories, particularly in sports and finance. It's talking with customers on merchant websites. It's writing convincing op-eds on topics in the news (though there are limitations). And it's being used to bulk up "pink-slime journalism" -- websites meant to appear like legitimate local news outlets but that publish propaganda instead.
There's a record of algorithmic content pretending to be from individuals, as well. In 2017, the Federal Communications Commission had an online public-commenting period for its plans to repeal net neutrality. A staggering 22 million comments were received. Many of them -- maybe half -- were fake, using stolen identities. These comments were also crude; 1.3 million were generated from the same template, with some words altered to make them appear unique. They didn't stand up to even cursory scrutiny.
These efforts will only get more sophisticated. In a recent experiment, Harvard senior Max Weiss used a text-generation program to create 1,000 comments in response to a government call on a Medicaid issue. These comments were all unique, and sounded like real people advocating for a specific policy position. They fooled the Medicaid.gov administrators, who accepted them as genuine concerns from actual human beings. This being research, Weiss subsequently identified the comments and asked for them to be removed, so that no actual policy debate would be unfairly biased. The next group to try this won't be so honorable.
Chatbots have been skewing social-media discussions for years. About a fifth of all tweets about the 2016 presidential election were published by bots, according to one estimate, as were about a third of all tweets about that year's Brexit vote. An Oxford Internet Institute report from last year found evidence of bots being used to spread propaganda in 50 countries. These tended to be simple programs mindlessly repeating slogans: a quarter million pro-Saudi "We all have trust in Mohammed bin Salman" tweets following the 2018 murder of Jamal Khashoggi, for example. Detecting many bots with a few followers each is harder than detecting a few bots with lots of followers. And measuring the effectiveness of these bots is difficult. The best analyses indicate that they did not affect the 2016 US presidential election. More likely, they distort people's sense of public sentiment and their faith in reasoned political debate. We are all in the middle of a novel social experiment.
Over the years, algorithmic bots have evolved to have personas. They have fake names, fake bios, and fake photos -- sometimes generated by AI. Instead of endlessly spewing propaganda, they post only occasionally. Researchers can detect that these are bots and not people, based on their patterns of posting, but the bot technology is getting better all the time, outpacing tracking attempts. Future groups won't be so easily identified. They'll embed themselves in human social groups better. Their propaganda will be subtle, and interwoven in tweets about topics relevant to those social groups.
Combine these two trends and you have the recipe for nonhuman chatter to overwhelm actual political speech.
Soon, AI-driven personas will be able to write personalized letters to newspapers and elected officials, submit individual comments to public rule-making processes, and intelligently debate political issues on social media. They will be able to comment on social-media posts, news sites, and elsewhere, creating persistent personas that seem real even to someone scrutinizing them. They will be able to pose as individuals on social media and send personalized texts. They will be replicated in the millions and engage on the issues around the clock, sending billions of messages, long and short. Putting all this together, they'll be able to drown out any actual debate on the Internet. Not just on social media, but everywhere there's commentary.
Maybe these persona bots will be controlled by foreign actors. Maybe it'll be domestic political groups. Maybe it'll be the candidates themselves. Most likely, it'll be everybody. The most important lesson from the 2016 election about misinformation isn't that misinformation occurred; it is how cheap and easy misinforming people was. Future technological improvements will make it all even more affordable.
Our future will consist of boisterous political debate, mostly bots arguing with other bots. This is not what we think of when we laud the marketplace of ideas, or any democratic political process. Democracy requires two things to function properly: information and agency. Artificial personas can starve people of both.
Solutions are hard to imagine. We can regulate the use of bots -- a proposed California law would require bots to identify themselves -- but that is effective only against legitimate influence campaigns, such as advertising. Surreptitious influence operations will be much harder to detect. The most obvious defense is to develop and standardize better authentication methods. If social networks verify that an actual person is behind each account, then they can better weed out fake personas. But fake accounts are already regularly created for real people without their knowledge or consent, and anonymous speech is essential for robust political debate, especially when speakers are from disadvantaged or marginalized communities. We don't have an authentication system that both protects privacy and scales to the billions of users.
We can hope that our ability to identify artificial personas keeps up with our ability to disguise them. If the arms race between deep fakes and deep-fake detectors is any guide, that'll be hard as well. The technologies of obfuscation always seem one step ahead of the technologies of detection. And artificial personas will be designed to act exactly like real people.
In the end, any solutions have to be nontechnical. We have to recognize the limitations of online political conversation, and again prioritize face-to-face interactions. These are harder to automate, and we know the people we're talking with are actual people. This would be a cultural shift away from the internet and text, stepping back from social media and comment threads. Today that seems like a completely unrealistic solution.
Misinformation efforts are now common around the globe, conducted in more than 70 countries. This is the normal way to push propaganda in countries with authoritarian leanings, and it's becoming the way to run a political campaign, for either a candidate or an issue.
Artificial personas are the future of propaganda. And while they may not be effective in tilting debate to one side or another, they easily drown out debate entirely. We don't know the effect of that noise on democracy, only that it'll be pernicious, and that it's inevitable.

This essay previously appeared in TheAtlantic.com.

EDITED TO ADD: Jamie Susskind wrote a similar essay.
左岸 / 2020-01-14 5 years ago / 未收藏/ 左岸读书发送到 kindle
文/zsd 如帅是我听过最好听的名字,至少在那时候我这样深信不疑。 这是一段狂热的痴迷。男猪脚是我的学长,当了 […]
Geir Hoydalsvik / 2020-01-13 5 years ago / 未收藏/ MySQL Server Blog发送到 kindle
The MySQL Development team is very happy to announce that MySQL 8.0.19 is now available for download at dev.mysql.com. In addition to bug fixes there are a few new features added in this release.  Please download 8.0.19 from dev.mysql.com or from the MySQL  YumAPT, or SUSE repositories.…
Kenny Gryp / 2020-01-13 5 years ago / 未收藏/ MySQL Server Blog发送到 kindle
Following MySQL InnoDB Cluster as our first, fully integrated MySQL Hight Availability solution based on Group Replication, MySQL Shell 8.0.19 includes MySQL InnoDB ReplicaSet which delivers another complete solution, this time based on MySQL Replication.
The basic idea for InnoDB ReplicaSet is to do the same for classic MySQL Replication as InnoDB Cluster did for Group Replication.…
Miguel Araújo / 2020-01-13 5 years ago / 未收藏/ MySQL Server Blog发送到 kindle
The MySQL Development Team is thrilled to announce a new 8.0 Maintenance Release of MySQL Shell AdminAPI – 8.0.19!
This release sets the bar higher, by introducing a new integrated solution based on a very well known Replication technology – MySQL InnoDB ReplicaSet!
Rene Ramirez / 2020-01-14 5 years ago / 未收藏/ MySQL Server Blog发送到 kindle
The MySQL Development team is proud to announce version 8.0.19 of the MySQL Shell, with the following features:
  • Admin API
    • MySQL InnoDB ReplicaSet
    • MySQL Router Management Functions
    • Metadata Upgrade
    • Router Management Functions
  • Shell JavaScript Plugins: require() function enhancements.
  • Upgrade Checker Updates

MySQL InnoDB ReplicaSet

Similar to MySQL InnoDB Cluster (based on Group Replication), this release of the Shell introduces the MySQL InnoDB Replicaset which provides an easy to use management solution for MySQL Replication.…
Lindsey O'Donnell / 2020-01-13 5 years ago / 未收藏/ Threatpost | The first stop for security news发送到 kindle
Over 25,000 servers globally are vulnerable to the critical Citrix remote code execution vulnerability.
Tara Seals / 2020-01-13 5 years ago / 未收藏/ Threatpost | The first stop for security news发送到 kindle
The issue lies in underlying reference software used by multiple cable-modem manufacturers to create device firmware.
Lindsey O'Donnell / 2020-01-14 5 years ago / 未收藏/ Threatpost | The first stop for security news发送到 kindle
CES wiz-bang surveillance tech gives privacy advocates the willies.
Tara Seals / 2020-01-14 5 years ago / 未收藏/ Threatpost | The first stop for security news发送到 kindle
Google has removed 17,000 Joker-infested apps from the Play store to date.
Lindsey O'Donnell / 2020-01-14 5 years ago / 未收藏/ Threatpost | The first stop for security news发送到 kindle
The wide-scale phishing scam reportedly started in early November and continued through December, before it was discovered by the Texas school district.
2020-01-14 5 years ago / 未收藏/ Feed for FT中文网 - 双语阅读发送到 kindle

康河信香港报道
在中美紧张降温的背景下,人民币出现进一步升值势头,抹去了去年夏季的大幅下降。
人民币对美元汇率昨日一度上涨0.5%,自去年8月以来首次突破1美元兑6.9元人民币大关,并使2020年的累计涨幅接近1%。它在今年初的攀升突显全球投资者的看涨情绪,以及各方对世界两个最大经济体之间关系改善的谨慎乐观。
去年8月,人民币遭遇四分之一世纪以来最严重的抛售,最终跌至近1美元兑7...
比目鱼 / 2020-01-13 5 years ago / 未收藏/ 比目鱼博客发送到 kindle
苏轼书法:《相思帖》
苏轼不但是著名文学家,也是著名的书法家,与黄庭坚、米芾、蔡襄并称“宋四家”。
在这里给大家介绍苏轼的一幅著名字帖:《相思帖》。原文如下:
去年一滴相思泪,
今日方流到嘴边。
未出房门三五步,
额头先到画堂前。


文章分类: 视觉训练 | 评论 | 阅读原文 | 访问博客

2020-01-14 5 years ago / 未收藏/ Land-book - the finest hand-picked website inspirations发送到 kindle
holdandflip
2020-01-14 5 years ago / 未收藏/ Land-book - the finest hand-picked website inspirations发送到 kindle
Bonfire - Design & Sell Custom Shirts Online
2020-01-14 5 years ago / 未收藏/ Land-book - the finest hand-picked website inspirations发送到 kindle
qoals
C7210 / 2020-01-10 5 years ago / 未收藏/ Be For Web发送到 kindle
开始读《猫头鹰在黄昏起飞》对谈集,才意识到很久没有读过村上春树相关的东西了。那像是在居酒屋边吃毛豆边咂摸着温热的烧酒。
说起来也是不得了,还有两周就要过年了;期盼着春节间回去北方看看老同学老朋友。上周被雪景刷屏时艳羡的心情依然未退。
今天是“机器学习”的第二篇,进入“模型”层面的讨论,内容相比于之前一篇“基本原理与设计要素”来说抽象了很多。接下来进入“界面”层面的话题后会更易于理解。
希望在下周结束前,这个系列可以完结掉。之后大约会暂时停更一段日子;届时详细说。各位周末愉快~

第二部分:数据与指标

首先,我们来了解“模型”层面的一系列设计原则,涉及“数据”与“指标”两个方面。

为了让 app 能够识别狗狗的照片,我们首先要通过一系列范例内容帮助机器训练相关的模型。这些范例就是我们所说的“数据”。

数据(Data)

要实现优秀的照片搜索体验,我们需要大量的、种类繁多的数据。要确保人们在搜索“dog”时能够得到狗狗的照片而非其他相似的小动物,我们需要同时提供狗狗和其他动物的照片来训练模型进行识别。

进一步来说,真正的搜索体验应该支持人们日常可能搜索的成千上万种对象类型。对于其中的每一类,我们都需要提供数据;要新增一个类型或是改善现有类型的搜索,我们同样需要提供数据。

如何选择有效的训练数据,这是打造搜索体验的关键。数据决定了模型的行为方式。
数据与设计目标相匹配
如果你的数据无法捕捉到特定场景,那么训练出的模型也很难在那个场景中良好地运作。由于数据决定着模型的行为,而后者又直接决定着产品的功能体验,因此数据的选择也必须能够反映出目标用户的实际需求与利益。

听起来有些抽象,我们实际看个例子。在“相机”的人像模式中,机器学习被用于探测人脸,并将身体与背景分离开来。

从技术发展的历史角度看,人脸识别对于有色人种并不十分友好;然而对于 Apple 而言,我们必须确保产品体验具有足够的包容性。因此,我们的团队从不同的人种、文化与场景当中收集了大量的数据;只有这样,训练出的模型才能提供具备高度包容性的体验。

简而言之,我们的数据规模与我们期望打造的产品体验是相匹配的;我们会根据产品设计目标有针对性地收集数据用以训练模型。
对你而言也是同理。在训练模型之前确认一些问题,例如由谁来收集数据,具体应该收集哪些数据,如何收集,如何确保数据的客观性?
如果你的设计目标是塑造丰富有趣的产品体验,那么数据也要反映出这一目标;如果你的产品主要用于户外活动,那么数据也应该来自于相关的场景。数据必须意图明确。

开发者们很容易忽略产品体验的实际场景而盲目制定数据收集策略。必须首先充分理解你们的产品设计目标,进而确定需要为机器提供怎样的数据来训练出最为有效的模型。
在前期花些时间思考如何收集正确的数据,往往可以为后期节省大量的时间和金钱。
随着产品的迭代,以及你们对于用户及市场的理解的加深,你可能还需要不断更新数据,使模型始终适应于不断变化的设计目标。
另外还需要留意所谓的“标准化数据集”。由学术界或行业制定的标准化数据或许可以帮你更好地了解机器学习的原理,从而易于起步,或是加速开发流程;但这些数据并非面向真实场景与体验而设计,更无法代表你们的产品设计目标。因此如果必须使用这类数据,首先考虑清楚它们的覆盖范围,在必要的时候进行补充,使其更符合你们的特定需求。

指标(Metrics)

数据用于训练模型;接下来要聊的“指标”则用于评估模型。

我们需要通过测试来评估模型的有效性。仍以照片搜索为例。完成训练后,我们会为模型提供一系列包含各种小动物的照片,观察其判断的结果,对比其中正确与错误的数量。

在这个例子当中,模型的正确率是 75%。

这就是一个指标。诸如此类的指标可以帮助我们判断模型的训练是否成功,是否达到了产品应用的标准,或是需要继续训练。
我们可以从很多不同的维度对模型进行测试,譬如观察它的运行速度,或是能够支持的对象类型数量等等。你需要充分权衡,从众多维度当中选择出最能代表你们设计目标的那些,作为判断模型成功与否的指标。
指标与设计目标相匹配
指标可以衡量模型的质量,而模型的质量决定了产品体验能否达到设计标准,因此你所选择的指标必须能够代表你对于优质体验的定义。

指标同样体现着产品的关键价值所在。

我们来看个例子。Face ID 正是基于机器学习来探测你的面孔并实现设备解锁的。

其整个机制背后蕴藏着一系列明确的体验目标与设计意图,而其中最为首要的就是安全性,因为用户信任我们,他们会将重要的个人数据交托于我们所提供的设备。
安全问题涉及到方方面面,我们必须通过多种不同的指标来判断模型是否足够可靠;其中非常关键的一个指标就是“任意一个人拿到你的手机之后能成功刷脸解锁的几率”。

我们一直追踪着这个指标,下了很大功夫去进行优化。在 Face ID 发布时,这一几率已经下降到了百万分之一。

由于 Face ID 在当时还是新事物,我们需要让人们知道这项技术是足够可信的,因此我们也会通过这个指标与人们进行沟通,让人们了解 Face ID 的安全性。
关于技术局限
但无论如何,“百万分之一”并非绝对完美。模型有可能产生的任何一次失误,都会在一个真实的使用场景里影响到一个真实的人;产品设计者必须考虑到这一点。
如果另一个时空当中的我突然出现在了我的身边,我显然不希望他能通过 Face ID 来解锁我的手机,因此我还会设置密码进行额外的保护。在现实当中,这类问题对于双胞胎亲属来说是真实存在的;这也是新技术当中所存在的局限,设计者无法回避。因此我们也会和消费者就这一点进行沟通,并建议他们进行额外的安全设置。

出错,这对于机器学习来说是难以避免的。很少有模型可以达到 100% 的正确率,作为设计者,你必须了解到这一局限。但这是可以接受的,因为产品设计本就是一个迭代的过程,模型同样可以不断进化。
模型自身所存在的出错概率并不意味着你无法为人们提供优秀的产品体验。分析出错的原因,改善模型,或是清晰直白地让人们知道技术自身所存在的局限性。
指标不是全部
另外不要忘记,指标,永远只是产品设计目标的一系列量化表现形式;不要仅着眼于统计数字的优化而无法自拔,却忽略了在真实场景中可能产生的实际体验问题;必要的时候,你可能需要结合其他方式来塑造更完整的体验。
通过机器学习,App Store 会根据你已经安装的 app 来为你推荐更多类似的产品。

用户在某个 app 中的停留时长确实是个不错的指标,毕竟人们在一件事情上所花费的时间越多,越代表他们喜欢这件事。但是,如果 App Store 完全以这个指标及相关模型作为驱动,那么人们最终只能看到一个又一个和自己当前使用的 app 非常相似的推荐。对我而言,这就意味着我将看到越来越多的游戏推荐。我固然喜欢游戏,但我不止需要游戏。
需求、兴趣及场景是多种多样的;人们在一个 app 当中花费的时间未必真的代表他的实际需求。为了补足推荐模型的固有局限性,实现更加完整的体验,App Store 同时提供了人工参与编辑的推荐内容,帮助人们探索更多类型的优秀产品。

模型的进化
上线后,你会越来越多地了解到产品的实际表现,进而也会对用户需求产生更加深入的理解。设计目标会因此而逐渐进化,模型与相应的指标也是如此。

譬如你可以通过实际的统计来评估人们对于多样化内容的需求,进而创建相关的模型,在推荐内容的“多样性”与“喜好相关性”之间找到最佳平衡点。
无论如何变化发展,你都要确保通过正确的指标来持续追踪模型在进化过程中的表现,进而对设计目标的实现程度保持了解。
如何确保指标能够始终体现出不断进化的产品设计目标呢?

  • 理解错误:对模型出错的状况进行分析,将失败案例按照不同的类型与场景归类,并考虑不同的处理方式:是否需要通过非机器学习的方式进行处理,譬如改善界面层面的设计?还是需要一个更好的模型?
  • 针对失败场景的设计:在设计的过程中有针对性地考虑到失败场景,考虑到人们在实际使用时可能经历的各种情况,提供必要的额外保障措施,而不只是面向一切运作正常的情况而设计。
  • 评估实际体验:指标可以给到我们关于模型质量的客观数字;模型的表现决定了体验,但不等同于体验。作为设计师,仍然需要对体验本身进行持续评估。进行必要的用研,通过原型进行体验评估,与用户交流并获取反馈。如果评估结论是体验欠佳,但指标显示一切良好,那么你的指标本身很可能存在问题。
  • 持续优化指标:始终对指标的有效性保持质疑和评估。你越需要依赖某件事物,就越需要评估它的正确性。以不断进化的产品设计目标为核心,持续追踪和思考当前模型指标的合理性。
“数据”与“指标”代表着模型层面的设计要素。接下来,我们将进入界面设计的层面,了解基于机器学习的产品在界面输出与输入方面的一系列设计原则。

C7210 / 2020-01-13 5 years ago / 未收藏/ Be For Web发送到 kindle
聊过了机器学习的基本原理及模型层面的设计要素,即“数据”和“指标”,接下来我们将探讨界面层面的设计。
优秀的机器学习体验一方面取决于底层模型的质量,另一方面取决于界面能否帮助人们以符合直觉的方式与信息互动。
模型的处理结果会经由界面转化为易于人们认知和互动的信息,即“输出”;模型从人机互动过程中接收到的,可以被用于模型优化的反馈信息,即“输入”。

第三部分:输出的设计

聊过了机器学习的基本原理及模型层面的设计要素,即“数据”和“指标”,接下来我们将探讨界面层面的设计。
优秀的机器学习体验一方面取决于底层模型的质量,另一方面也取决于界面能否帮助人们以符合直觉的方式与信息进行互动。

模型的处理结果会经由界面转化为易于人们认知和互动的信息,即“输出”。
模型从人机互动过程中接收到的,可以被用于模型优化的反馈信息,即“输入”。
我们已经在 HIG (人机界面设计指南)文档中创建了一系列关于“输出”与“输入”的设计模式说明;今天,我们将从中选择一部分进行深入讨论,帮助你更好地理解如何将相关设计原则应用到实际产品的体验设计当中。

输出(Outputs)

你可以将“输出”理解为一种设计媒介,通过它来为人们提供更加情境化的无缝体验。
接下来我们将从四个方面来了解关于“输出”的设计原则,包括:
  • 多重选项:如何同时呈现多个相关的输出值。
  • 释义:诠释输出机制,避免带来困惑。
  • 可信度:以恰当的方式体现输出的可靠程度。
  • 局限性:如何解决功能与预期之间的冲突。

多重选项
多重选项使人们可以从模型输出的一系列相关结果当中进行选择。

在实际当中,模型针对特定问题所输出的结果可能不止一个。然而设计者往往倾向于只为人们提供一个“最优选项”;在真实场景中,这未必能带来最优体验。
来看个现实中的例子。上周末,我想来一次从旧金山到纳帕谷的短途旅行,于是我向同事们打听最优路线是哪条。
取决于我所询问的对象及时间,他们的回答各有不同。路线预测是一件复杂的任务,当中涉及到很多变量,且始终在发生变化,譬如拥堵、施工、交通意外等等。

在“地图”中,我们同样基于这些变量信息来预测最佳路线。通常情况下,单一的输出结果是不够的,因为我们无法了解特定用户的关注点,他们有可能喜欢风景秀丽的路线,有可能倾向于收费较少的路线,或是希望避开高速公路,等等。
如何弥补多种多样的需求喜好与模型输出局限性之间的鸿沟?答案就是同时提供多个输出选项供人选择。譬如“地图”会为我提供三条不同的路线,使我可以根据具体情况来切实掌控自己的行程。

在可能的情况下,尽量提供多个相关的输出结果,帮助人们更好地根据个人需求或喜好来进行选择。
进入实际行程之后,人们同样需要用到地图;对于那些看上去非常相似的路线选项,人们可能很难迅速理解其中的差异并进行选择。
我们可以进一步帮助人们了解不同选项之间的具体差异,譬如通过辅助信息告诉人们哪条路线需要收费,哪条路线会经过高速;甚至可以高亮突出那些滨水景观路线。

这些信息有助于人们快速了解多个选项之间的差异,从而更易于在行动场景当中进行选择。
或许地图的例子有些过于显而易见,因为我知道自己在哪,要到哪里去,输入和输出都很明确。而对于那些需求和场景都比较模糊的情况,多重选项依然非常有用。我们以 Apple Watch 为例。

一日之计在于晨。每天早上,我都需要了解当天的天气状况,查看我的当日安排与待办事项等等。Watch 的“Siri”表盘可以为我提供多达 19 个来自于不同 app 的信息。

要在这块小屏幕上浏览 19 个 app 的信息并不轻松。还好 Siri 会根据当前的时间、地点和我的最近操作来优先选择其中的某些信息,呈现在最顶端的几张卡片当中。这使得我每天早上的惯例任务变得非常轻松。

而对于系统来说,人们进行的每一个选择都是一次“隐性输入”。对于这些选项保持长久的学习,模型在模糊场景下优先提供的若干选项将会变得越发符合人们的实际需求。

释义
释义信息用于向人们解释 app 做出特定决策的具体原因。譬如 App Store 会通过释义信息告诉人们为什么会向他推荐特定的 app,这样也可以帮助人们了解相关数据的用途,使他们更加放心。

来看一些具体的设计原则。假设 App Store 因为我曾经下载过烹饪类 app 而为我做了一系列相关推荐。实际上,我下载过相关 app 并不意味着我一定是要下厨,也不意味着我真的喜欢那个 app;因此,在通过辅助信息解释推荐原因时,一定要反映出客观的关联条件,而不要自作聪明地替用户做任何主观假设。
App Store 的做法是简明地陈述出“因为你下载过 NYT 烹饪”。

我们无法完整客观地了解某个人的口味和喜好,这些会随着每一天的生活而发生变化;而且人们也很有可能在和家人分享账号。任何关于用户的主观假设都有可能令他们感到困惑。不要在释义信息当中对用户的喜好或情绪进行任何看似聪明的理解和判断。
释义元素还可以用于描述输出结果的权威性。我是一个天文爱好者,我有时候需要了解当晚的天空中有哪些星体是可见的。譬如我会问 Siri:“什么时候可以看到木星?” 我所得到的答案当中会包含该信息的来源,譬如著名的知识引擎 Wolfram Alpha,使我了解到信息具备足够的可靠性。

特别是在涉及科学或政治一类的场景时,相关的数据来源信息对于人们的进一步决策是非常必要的。

可信度
有时候,我们还需要通过一些信息来描述输出结果的可信度。
仍以 App Store 为例。其实我们可以更具体地告诉人们,那些推荐 app 与他有 85% 的匹配度,但这样的表达方式非常难于理解,因此我们会使用上文当中提到的释义方式。
但是 85% 这个数字本身是可信程度的一种量化体现,意味着模型的输出结果可能被人们所喜欢的几率。

有时候,我们需要将可信度以更加易于理解的方式提供给人们进行判断;而有时,我们又需要直接将可信度的数字呈现出来。
譬如“天气”中的“降雨概率”,人们如何根据“30%”这个数字来判断是否需要带伞?确实不太容易。但是一方面,这是约定俗成的表述方式,另一方面,人们也会随着时间而逐渐掌握概率数字与天气情况的对应关系。

对于具有统计学意义的信息,譬如天气、体育赛事或大选一类的预测结果,直接使用数字是符合人们认知的方式。而另一些则不然。
以廉价机票订购服务 Hopper 为例。他们也需要通过可信度来呈现价格上涨或下跌的可能性。对于这个需求场景,人们很难通过百分比来决定下一步的行动。如果当前价格继续下跌的可能性是 65%,那么是否该下单呢?在这里 65% 和 70% 之间又存在着这样的区别呢?
因此 Hopper 会直接提供行动建议,譬如继续等待或立刻购买。同时他们还会进一步提供额外的信息,包括继续等待可能帮你节省下的最高金额,以及等待不要超过的最晚日期。这些信息综合起来就可以帮助人们更加有据可依地进行决策。

然而在某些情况下,仅提供可信度仍然无法帮助人们有效地评估风险。例如我询问“现在从这里出发去到旧金山需要多长时间”,得到的答案是“一点三十分到达那里的可能性是 72%”,这会让人无从判断。
这种情况下,提供区间范围是更好的做法。譬如 Lyft 在呈现车辆选项时,会让人们知道这辆车到达当前位置所需要的时长区间,以及到达目的地时的具体时间区间。这可以为我提供更加真实有效的判断依据。


局限性
以上关于可信度的“好例子”都不难理解。然而如果信息的可信度过低,即模型难以提供足够有效的输出,我们应该如何处理呢?
很多时候,我们还需要请用户参与进来,帮忙解决技术局限性所造成的问题。
例如“照片”可以自动识别图像中的人物,但当可信度较低时,它还会邀请人们对相关照片进行额外的确认。我帮助 app 标注了这些照片,之后它便能更准确的对我进行自动识别。

所谓局限性,即是指系统功能的执行结果与人们的预期之间存在错位。在我的预期当中,“照片”应该始终能够识别出我,即便客观来讲照片可能拍得太糊或是亮度过低。

出于设计、硬件能力或环境等各方面因素,任何功能都会存在局限性。要增强人们的信任感,设计者必须让人们对这些局限性保持知情,并告诉人们如何进行相应的处理。
我个人非常喜欢 Memoji,但这个功能在某些情况下是无法正常工作的,例如人脸不在取景范围当中,或是摄像头被遮盖,或是环境较暗,等等。每当这些状况发生时,系统都会立刻进行提示,引导人们进入正确的使用状态。

如果缺乏对于局限性的告知和引导,人们就会对功能失去信任感。你必须管理人们对于功能的预期,通过各种方法引导人们解决问题。
帮助人们在异常状态下继续完成任务的另一种方式,就是提供备选方案。这需要你对人们使用产品时的实际目标有着清楚的认知。
例如人们有可能会在 Mac 上试图让 Siri 开启计时器,然而 macOS 并没有提供这项功能。这种情况下,Siri 不会简单的回复“无法执行”,毕竟那样会带来负面体验;取而代之地,它会提供创建提醒事项的建议。

这个建议是符合场景的,因为人们的实际目标很可能是为了在特定的时间收到提醒,而“提醒事项”同样可以帮助人们完成这个目标。

小结
希望上述四个方面的设计原则可以帮助你更好地为模型的输出进行设计。
请始终记住,“输出”是一种设计媒介,我们可以根据实际的设计目标去选择最适合自己产品的输出模式。

我们要确保输出信息能够被人们在实际场景当中快速地理解;有时还需要将模型的输出转化成为更有利于人们进行决策的形式;在必要的情况下还要引导人们处理问题,实现目标。
“输出”并不是一成不变的,它会根据人们的输入而始终发生变化。接下来,我们将探讨如何面向交互输入进行设计。

Joshua Kraus / 2020-01-14 5 years ago / 未收藏/ sitepoint发送到 kindle
How Four Programmers Got Their First Python JobsNo one really knows how to do a job before they do it. Most people land a coveted position through a strange alchemy of related experience, networking, and hard work. The real experience is the job itself. That’s when you get the opportunity to apply what you know to real-world problems and see it pay off.
The following four programmers earned their first Python jobs in different ways. Some had prior Python experience, some didn’t. Some knew what they were getting into, others found out later. Understanding how they landed their first Python job might help you land yours. Here’s how they did it.

Nathan Grieve

First Python job: Data Scientist

How Nathan Got the Job

While completing my Physics degree, I applied for a data science job with a small tech startup that primarily used Python (and SQL). The thing is, I didn’t have experience with Python at the time. When the interview came around, I answered the programming questions by using pseudocode to demonstrate I understood the concepts.
Pseudocode uses coding logic without using coding syntax. So by using the same logic that Python does, I could show an understanding of the concepts without being specific to any language.
For example, any computer scientist can understand the simple pseudocode below, but they may not understand the Python function unless they've worked with it before.
Python
loop_index = 0
while loop_index < 5:
    print(loop_index)
    loop_index += 1
Pseudocode
Set loop index to 0
Loop while loop index is less than 5
    print loop index
    Increase loop index by 1
Pseudocode is more readable to humans, too. It’s not actually much different from code, it just avoids using language-specific syntax. And using it it worked! They gave me the job. But of course, before I arrived I had to actually learn the language.

Nathan's Advice

My advice for those wanting to enter the field is to tackle real-world problems as soon as you can. At Project Hatch, a company I cofounded that analyzes startups and provides them with analytics to grow their businesses, we do hire people who are self taught, but there's a huge skill gap between those who only do Codecademy-style courses and those who actually apply their knowledge. I would say keep working through Codewars challenges until you’re at a point where you don’t have to repeatedly look up what arguments you should be using and what order they should be used in.
If you’re looking for real-world problems to solve, go on Kaggle, which has a huge number of data sets to play with, and practice pulling useful information out of them. For example, if you’re looking at a data set for food recipes, align the data set with local food prices to find all of the recipes that create meals for under $5. When you’re ready for a real challenge, try Kaggle competitions. You'll find problems to solve and companies willing to pay. These challenges will be incredibly difficult to begin with, but you'll learn a lot discussing solutions with other computer scientists on the forum.

Bill Price

First Python job: Cyber Security Architect

How Bill Got the Job

I had supported Python developers for a number of years as a NASA network administrator and security engineer, so I was aware of the power and flexibility of the language before a new opportunity presented itself.
In 2017, I was approached by a major financial institution to join a team charged with developing a new assessment program to identify monitoring gaps in a particular business process and its supporting applications. I believe they came to me because of my:
  • network and security experience
  • lack of experience in the financial sector, as they wanted a fresh set of technical eyes on their problem
  • ability to tease out what actual requirements are
  • ability to approach a new project with an open mind and no preconceived notions.
Funnily enough, and unbeknownst to me, this turned out to be my first Python job.
Our team was expected to triage the gaps, identify possible mitigations, and report our findings to leadership. We began by mapping applications to each business process, but quickly realized that the size of the different data sets we needed to review (application and hardware inventories, Qualys vulnerability scans, daily BladeLogic reports, Splunk logs, etc.) were too large for import into Excel spreadsheets. Furthermore, we didn't have access to traditional UNIX text processing resources or administrative access to our workstation, where we might have installed any new data management tools. And we didn’t have the budget to purchase new tools.
We did, however, have access to Python, a full set of Python libraries, and the ability to install Python using existing enterprise support software.
I didn’t know Python going in. I had to learn on the job, and good thing I did. Python was critical in our being able to parse hardware inventories based on applications used by the business process, isolate vulnerabilities associated with the appropriate hardware, and identify unauthorized services running on any device that supported one (or more) applications.

Bill’s Advice

My advice to aspiring Python developers is threefold.
First, familiarize yourself with the different libraries available in Python that might assist you in a potential job. Our team used mechanize, cookielib, urlib, urlib2, and csv extensively. If you're looking at a machine-learning project, pay attention to libraries like TensorFlow, Numpy, and Keras.
Next, be on the lookout for processes that need to be automated, or where existing automation can be improved. There's likely an opportunity for applying Python.
Lastly, have a good Python reference book to supplement all of the online resources that are available. I recommend T.J. O'Connor's Violent Python.
The post How Four Programmers Got Their First Python Jobs appeared first on SitePoint.
Scott Hanselman / 2020-01-08 5 years ago / 未收藏/ hanselman发送到 kindle
I did a post on the difference between a console, a terminal, and a shell a while back. We talk a lot about alternative "Terminals" like the Windows Terminal (that you should download immediately) but not shells. You do see a lot of choices in the Linux space with the top give being Bash, Zsh, Fish, Tcsh, and Ksh but not a lot about alternative shells for Windows. Did you love 4DOS? Well, READ ON. (Yes I know TCC is a thing, but Yori is a different thing)
So let's talk about a quiet little CMD replacement shell that is quietly taking over my life. You should check it out and spend some time with it. It's called Yori and it's open source and it's entirely written by one Malcolm Smith. It deserves your attention and respect because Yori has quickly become my goto "DOS but not DOS" prompt.
Yori is DOS, kinda
Of course, cmd.exe isn't DOS but it's evocative of DOS and it's "Close enough to be DOS." It'll run .cmd files and batch files. If dir, and del *.*, and rd /s feels more intuitive to you than bash shell commands, Yori will fit into your life nicely.
I use PowerShell a lot as a shell and I use Bash via WSL and Ubuntu but since I started on CMD (or command.com, even) Yori feels very comfortable because it's literally "CMD reimagined."Yori offers a number of cmd++ enhancements like:
  • Autocomplete suggestions as you type
  • Ctrl+to select Values
  • WAY better Tab completiion
  • Awesome file matching
  • Beyond MAX_PATH support for "DOS"
  • Rich Text Copy!
  • Backquote support
  • Background Jobs like Unix but for DOS. SO you can use & like a real person!
  • Alias! My goodness!
  • which (like where, but it's which!) command
  • hexdump, lines, touch, and more great added tools
  • lots of "y" utils like ydate and ymem and ymore.
  • New Environment variables make your batch files shine
  • ANSI colors/UTF-8 support!
Download Yori, make a link, pin it, or add it to your Windows Terminal of choice (see below), and then explore the extensive Guide To Yori.
Did I mention & jobs support! How often have you done a copy or xcopy and wanted to &! it and then check it later with job? Now you can!
C:\Users\Scott\Desktop>dir &!
Job 2: c:\Program Files\Yori\ydir.exe
C:\Users\Scott\Desktop>job
Job 1 (completed): c:\Program Files\Yori\ydir.exe
Job 2 (executing): c:\Program Files\Yori\ydir.exe
Job 2 completed, result 0: c:\Program Files\Yori\ydir.exe
Yori also support updating itself with "ypm -u" which is clever. Other lovely Yori-isms that will make you smile?
  • cd ~ - it works
  • cd ~desktop - does what you think it'd do
  • Win32 versions of UNIX favorites including cut, date, expr, fg, iconv, nice, sleep, split, tail, tee, wait and which
  • dir | clip - supports HTML as well!
  • durable command history
And don't minimize the amount of work that's happened here. It's a LOT. And it's a great balance between compatibility and breaking compatibility to bring the best of the old and the best of the new into a bright future.

Other must-have Malcolm Smith Tools

Now that I've "sold" you Yori (it's free!) be sure to pick up sdir (so good, a gorgeous dir replacement) and other lovely tools that Malcolm has written and put them ALL in your c:\utils folder (you have one, right? Make one! Put it in DropBox/OneDrive! Then add it to your PATH on every machine you have!) and enjoy!
Yori is lovely, paired with SDIR

Adding Yori to the Windows Terminal

Yori includes it's own improved Yori-specific terminal (to go with the Yori shell) but it also works with your favorite terminal.
If you are using the Windows Terminal, head over to your settings file (from the main Windows Terminal menu) and add something like this for a Yori menu. You don't need all of this, just the basics like commandline. I added my own colorScheme and tabTitle. You can salt your own to taste.
{
"acrylicOpacity": 0.85000002384185791,
"closeOnExit": true,
"colorScheme": "Lovelace",
"commandline": "c://Program Files//Yori//yori.exe",
"cursorColor": "#00FF00",
"cursorHeight": 25,
"cursorShape": "vintage",
"fontFace": "Cascadia Code",
"fontSize": 20,
"guid": "{7d04ce37-c00f-43ac-ba47-992cb1393215}",
"historySize": 9001,
"icon": "ms-appdata:///roaming/cmd-32.png",
"name": "DOS but not DOS",
"padding": "0, 0, 0, 0",
"snapOnInput": true,
"startingDirectory": "C:/Users/Scott/Desktop",
"tabTitle": "DOS, Kinda",
"useAcrylic": true
},
Great stuff!
I want YOU, Dear Reader, to head over to https://github.com/malxau/yori right now and give Yori and Malcolm a STAR. He's got 110 as of the time of this posting. Let's make that thousands. There's so many amazing folks out there quietly writing utilities for themselves, tirelessly, and a star is a small thing you can do to let them know "I see you and I appreciate you."

Sponsor: Curious about the state of software security as we head into 2020? Check out Veracode’s 2019 SOSS X report to learn common vulnerability types, how to improve fix rates, and crucial industry data.


© 2019 Scott Hanselman. All rights reserved.
     
Scott Hanselman / 2020-01-10 5 years ago / 未收藏/ hanselman发送到 kindle
JSON LogoNow that .NET Core 3.1 is LTS (Long Term Support) and will be supported for 3 years, it's the right time for me to update all my .NET Core 2.x sites to 3.1. It hasn't take long at all and the piece of mind is worth it. It's nice to get all these sites (in the Hanselman ecosystem LOL) onto the .NET Core 3.1 mainline.
While most of my sites working and running just fine - the upgrade was easy - there was an opportunity with the podcast site to move off the venerable Newtonsoft.Json library and move (upgrade?) to System.Text.Json. It's blessed by (and worked on by) James Newton-King so I don't feel bad. It's only a good thing. Json.NET has a lot of history and existed before .NET Standard, Span<T>, and existed in a world where .NET thought more about XML than JSON.
Now that JSON is essential, it was time that JSON be built into .NET itself and System.Text.Json also allows ASP.NET Core to existed without any compatibility issues given its historical dependency on Json.NET. (Although for back-compat reasons you can add Json.NET back with one like using AddJsonOptions if you like).
Everyone's usage of JSON is different so your mileage will depend on how much of Json.NET you used, how much custom code you wrote, and how deep your solution goes. My podcast site uses it to access a number of JSON files I have stored in Azure Storage, as well as to access 3rd party RESTful APIs that return JSON. My podcast site's "in memory database" is effectively a de-serialized JSON file.
I start by bringing in two namespaces, and removing Json.NET's reference and seeing if it compiles! Just rip that Band-Aid off fast and see if it hurts.
using System.Text.Json;
using System.Text.Json.Serialization;
I use Json Serialization in Newtonsoft.Json and have talked before about how much I like C# Type Aliases. Since I used J as an alias for all my Attributes, that made this code easy to convert, and easy to read. Fortunately things like JsonIgnore didn't have their names changed so the namespace was all that was needed there.
NOTE: The commented out part in these snippets is the Newtonsoft bit so you can see Before and After

//using J = Newtonsoft.Json.JsonPropertyAttribute;
using J = System.Text.Json.Serialization.JsonPropertyNameAttribute;

/* SNIP */

public partial class Sponsor
{
[J("id")]
public int Id { get; set; }

[J("name")]
public string Name { get; set; }

[J("url")]
public Uri Url { get; set; }

[J("image")]
public Uri Image { get; set; }
}
I was using Newtonsoft's JsonConvert, so I changed that DeserializeObject call like this:
//public static v2ShowsAPIResult FromJson(string json) => JsonConvert.DeserializeObject<v2ShowsAPIResult>(json, Converter.Settings);
public static v2ShowsAPIResult FromJson(string json) => JsonSerializer.Deserialize<v2ShowsAPIResult>(json);
In other classes some of the changes weren't stylistically the way I'd like them (as an SDK designer) but these things are all arguable either way.
For example, ReadAsAsync<T> is a super useful extension method that has hung off of HttpContent for many years, and it's gone in .NET 3.x. It was an extension that came along for the write inside Microsoft.AspNet.WebApi.Client, but it would bring Newtonsoft.Json back along for the ride.
In short, this Before becomes this After which isn't super pretty.
return await JsonSerializer.DeserializeAsync<List<Sponsor>>(await res.Content.ReadAsStreamAsync());
//return await res.Content.ReadAsAsync<List<Sponsor>>();
But one way to fix this (if this kind of use of ReadAsAsync is spread all over your app) is to make your own extension class:
public static class HttpContentExtensions
{
public static async Task<T> ReadAsAsync<T>(this HttpContent content) =>
await JsonSerializer.DeserializeAsync<T>(await content.ReadAsStreamAsync());
}
My calls to JsonConvert.Serialize turned into JsonSerializer.Serialize:
//public static string ToJson(this List<Sponsor> self) => JsonConvert.SerializeObject(self);
public static string ToJson(this List<Sponsor> self) => JsonSerializer.Serialize(self);
And the reverse of course with JsonSerializer.Deserialize:
//public static Dictionary<string, Shows2Sponsor> FromJson(string json) => JsonConvert.DeserializeObject<Dictionary<string, Shows2Sponsor>>(json);
public static Dictionary<string, Shows2Sponsor> FromJson(string json) => JsonSerializer.Deserialize<Dictionary<string, Shows2Sponsor>>(json);
All in all, far easier than I thought. How have YOU found System.Text.Json to work in your apps?

Sponsor: When DevOps teams focus on fixing new flaws first, they can add to mounting security debt. Veracode’s 2019 SOSS X report spotlights how developers can reduce fix rate times by 72% with frequent scans.

© 2019 Scott Hanselman. All rights reserved.
     
Cindy Duong / 2020-01-13 5 years ago / 未收藏/ Trello Blog发送到 kindle
How do you stay on track with your most important life and career goals? Do you have people cheering you on and keeping you accountable?

I’ve achieved a lot in the past few years thanks to a core group of friends, some Trello boards, and a weekly meeting. We call it “Life Watchers,” and it’s changed our lives.

2020-01-14 5 years ago / 未收藏/ DreamHost Status发送到 kindle
January 13, 2020 11:28AM PST
Investigating - We are currently investigating connectivity issues affecting the DreamHost Web Panel. We are closely monitoring the situation and will be posting periodic updates as further information becomes available.

January 13, 2020 11:39AM PST
Identified - We have identified the cause of the DreamHost Web Panel connectivity issues and are working on a resolution. We’ll update this post with new information as it becomes available.

January 13, 2020 11:43AM PST
Monitoring - A fix has now been pushed out and we are now monitoring the situation to ensure we’re back in a fully operational state. We’ll update this post when we’re all clear.

January 13, 2020 12:03PM PST
Resolved - This incident has been resolved, and systems are fully operational. Please contact support via the DreamHost panel if you are still experiencing related issues.

2020-01-14 5 years ago / 未收藏/ DreamHost Status发送到 kindle
January 13, 2020 1:28PM PST
Investigating - Our Technical Operations team is currently investigating connectivity issues affecting a number of DreamPress instances. We are closely monitoring the situation and will be posting periodic updates as further information becomes available.

January 13, 2020 1:30PM PST
Identified - The Technical Operations team have identified the cause of this incident, and are working toward a resolution. We’ll update this post as new information becomes available.

January 13, 2020 1:39PM PST
Monitoring - Our team has pushed out a fix, and are currently monitoring the situation to ensure that we’re fully in the clear.

January 13, 2020 1:49PM PST
Resolved - This incident has been resolved, and systems are fully operational. Please contact support via the DreamHost Web Panel if you are still experiencing related issues.

2020-01-14 5 years ago / 未收藏/ gdoodle发送到 kindle
Doodle Type : simple
Today’s Doodle celebrates Indian poet, songwriter, and social change advocate Kaifi Azmi on his 101st birthday. With work ranging from passionate love poems and activist verses to Bollywood songs lyrics and screenplays, Azmi has become one of the most renowned poets of the 20th century in India, and his humanitarian efforts continue to impact people’s lives today.
Amzi was born Syed Athar Hussain Rizvi on this day in 1919 in the Azmargh district of Uttar Pradesh, India. At age 11, he composed his first poem, a ghazal-style piece. Inspired by Gandhi's 1942 Quit India freedom movement, he later left for Bombay (now Mumbai) to write for an Urdu newspaper. He then published his first collection of poems, Jhankar (1943), as well as became a member of the influential Progressive Writers’ Association that used writing to try to achieve socioeconomic reforms.
Azmi was prolific and won numerous awards for his contributions, including three Filmfare Awards for Garm Hawa (“Scorching Winds,” 1973), the prestigious Padma Shri Award for Literature and Education (1974), and one of India’s highest literary honors, the Sahitya Akademi Fellowship (2002). 
In one of his early and most famous poems, “Aurat,” Amzi advocated for women’s equality, one of the causes he championed in his lifetime. He also founded the NGO Mijwan Welfare Society (MWS) to support various educational initiatives to improve the lives of rural women and families, and to this day, MWS continues its work in the spirit of its founder.

This day in history

Chava Flores’s 97th Birthday
Children's Day 2017 (Thailand)
Celebration of Chinese Culture
Mahasweta Devi’s 92nd Birthday
Taiwan Elections 2012
National Children's Day 2012
Festival of Kites 2010
Carrie Derick’s 155th Birthday
Dr. Martin Luther King Day 2007
Festival of Kites 2011

This Doodle's Reach

India
Taylor Blau / 2020-01-14 5 years ago / 未收藏/ Todd Motto发送到 kindle
Take a look at some of the new features in the latest Git release.
The post Highlights from Git 2.25 appeared first on The GitHub Blog.
Daniel Rosenwasser / 2020-01-11 5 years ago / 未收藏/ TypeScript发送到 kindle
Today we’re announcing the availability of TypeScript 3.8 Beta! This Beta release contains all the new features you should expect from TypeScript 3.8’s final release.
To get started using the beta, you can get it through NuGet, or through npm with the following command:

npm install typescript@beta
You can also get editor support by
Downloading for Visual Studio 2019/2017
Following directions for Visual Studio Code and Sublime Text.

The post Announcing TypeScript 3.8 Beta appeared first on TypeScript.
Artem Konev of F5 / 2020-01-14 5 years ago / 未收藏/ NGINX发送到 kindle
It’s been quite a while since our last post, and we’ve got major news to share about our latest NGINX Unit releases, namely 1.13.0 and 1.14.0. They introduce new features that add to our toolset and extend the range of scenarios where you can take advantage of NGINX Unit – reverse proxying in NGINX Unit 1.13.0 and address‑based routing in [...]
Read More...
The post NGINX Unit 1.13.0 and 1.14.0 Introduce Reverse Proxying and Address-Based Routing appeared first on NGINX.
Daniel Stepanic / 2020-01-14 5 years ago / 未收藏/ Elasticsearch发送到 kindle
This year at BSidesDFW, my local security conference, I highlighted a continuing trend of adversaries using open source offensive tools. The talk reviewed one of these post-exploitation frameworks named Koadic and walked through different ways defenders can build behavioral detections through the use of Event Query Language (EQL). In this post, I wanted to review this research by providing background into Koadic and its features, why it’s relevant, and then dive into some EQL examples where I will share different detection strategies against the Koadic framework.
Adversaries continue to adopt open source attack frameworks as part of their toolset. By using these off-the-shelf tools, attackers are able to complete their objectives while reducing their development costs and present attribution problems for incident responders. These tools challenge traditional investigative techniques by creating the idea of plausible deniability and leave fewer toolmarks that can be traced back to an adversary. Even with strong threat intelligence capabilities and proper defensive visibility, it’s not always an easy task to differentiate red team operations from real adversary behavior — especially in the early phases of an attack.
As defenders, we are required to actively monitor offensive open source projects. These projects serve as canaries in a coal mine, giving us an opportunity to gain insights into new attacker tradecraft. Not only does this get us into an attacker mindset, but all the code is freely available for emulation and review. Some different ways to get value from dissecting these tools can be through validating your detection capabilities, generating new analytics, developing threat hunting hypotheses, or by simply transferring knowledge around an underlying behavior.

Why Koadic?

Koadic is a great candidate to demonstrate behavior-based detections due its interesting way of leveraging technologies built into the Windows OS — such as Windows Script Host (WSH) and the Component Object Model (COM). COM and WSH fall into the general category of “living off the land” tools, which allow adversaries to proxy the execution of their toolset through built-in Windows programs.
This can be very desirable from an attacker’s standpoint, as it allows them to blend in better within the network while producing less of a forensic footprint — rather than dropping and executing a file on disk. COM and WSH are particularly attractive to attackers because of a lack of robust, built-in logging capabilities in contrast to tools like PowerShell (for which Windows has added extensive logging capabilities in newer versions). Koadic is good enough for mature threat groups such as APT28 and has received frequent updates over the last couple years.
Koadic overview
Koadic overview & features

EQL

Some of the more exciting parts of my job as a practitioner come when writing behavioral detections using EQL. This process brings out my inner detective skills that I find to be fulfilling and challenging at the same time. The language enables practitioners to go beyond matching static values such as Indicators of Compromise (IoCs) to a much more comprehensive and flexible way to detect adversary behaviors. With the ability to leverage features like time-bound sequencing or track process lineage, more options are opened up to us as defenders to build reliable and lasting detections.
I find this to be rewarding, as I can directly apply my previous SOC work experience around host-based forensics into a much more dynamic detection that holds up against the latest attacker tradecraft. The best part is that EQL has a very simple syntax with a short learning curve, so if you aren’t able to adopt EQL today, hopefully the logic within these queries can be applied to your current solution.
For a quick recap into the language itself and its core capabilities, I recommend reviewing our previous blog post: Introducing Event Query Language. In summary, EQL is a schema-independent and OS-agnostic language built for real-time detection with stream processing. It supports multiple-event behaviors and also offers post-processing commands used to analyze large amounts of data. With that background, let’s start diving into some of the different ways to detect Koadic using EQL.

Initial access

Spearphishing Attachment (T1193)
Validating parent-child process relationships continues to be a fruitful technique for hunting and building detections. As attacker activity becomes more evasive, however, we also have a need for flexibility as defenders. This first example shows off the value of tracking process ancestry using EQL’s descendant function, which lets us maintain state and track full process genealogy. This is an important concept because it goes beyond the typical parent-child process paradigm that many languages are limited to.
By tracking further descendant processes, defenders have the ability to follow process chains infinitely down the process tree. This provides more freedom in how we can express suspicious behavior together while also allowing tighter controls around process ancestry.
Descendant process tree
Descendant process tree visualization (APT28)
This process chain comes from a sample reported by Palo Alto Networks in June 2018 associated with APT28 activity. In this EQL expression, we are monitoring all descendant processes of our email client (Outlook.exe) and only looking for new process creation events tied to Mshta. This allows us to focus on the initial attack vector (Spearphishing email) and then filter on Windows programs being used to execute attacker code. This is a great foundation for strong analytics — if we wanted to create something more robust, we could build out a longer array of cohorts associated with initial compromise stages, as well as add the entire Microsoft Office suite as descendants.
Initial access and execution - spearfishing
Initial access & execution - Spearphishing example
EQL query:
process where process_name == "mshta.exe"  and descendant of
        [process where process_name == "outlook.exe"]

Defense evasion/execution

Mshta (T1170), Rundll32 (T1085)
Tools like Koadic often include some usability features that help facilitate payload building, also known as stagers. These small pieces of code get executed on the victim machine and are used to establish a network connection back to the attacker in order to bring in a staged payload for execution. Stagers represent a significant portion of the early phases of the intrusion process. The following example continues exploring the detection strategy for a variety of Windows utilities used to proxy execution with Koadic stagers.
The EQL query below uses the sequence operator, a function of EQL that matches based on the order of events in a sequence. In this case, we are matching when one of these standard Windows administration utilities initiates a network connection. Where another language might require an analyst to write several rules — one for each of these utilities — EQL enables us to build an array capable of matching many permutations.
Using the filter operator joins these events in sequence by their process identifier (PID). I like this example because it’s capable of detecting malware and other offensive tools that aren’t specific to Koadic. With that said, it might take a little filtering to remove potentially benign events such as network administrative activity, but this kind of behavior is something every organization should be tracking and reviewing on a certain cadence.

Defense evasion and execution - Mshta
Defense evasion & execution - stagers
EQL query:
sequence by unique_pid
  [process where subtype.create and process_name in
    ("mshta.exe", "regsvr32.exe", "rundll32.exe", "wmic.exe")]
  [network where process_name in
    ("mshta.exe", "regsvr32.exe", "rundll32.exe", "wmic.exe")]
One of the more interesting takeaways when reviewing offensive tooling is finding the different artifacts that get left behind unintentionally. All it takes is one “loud” artifact, such as a file or registry modification that sticks out, to quickly find suspicious activity.
In Koadic’s case, HTTP stagers use Internet Explorer’s core architecture to make a web request by default, which causes the stager to be created within the Temporary Internet Files directory. This behavior occurs due to the way Internet Explorer caches browser content to quickly load web pages. Monitoring this kind of behavior with certain executables can lead to reliable detections outside Koadic, such as generic cradles used to download and execute malicious code.
Defense evasion & execution - cached stager
Defense evasion & execution - cached stager
EQL query:
file where process_name in
  ("mshta.exe","regsvr32.exe", "rundll32.exe", "wmic.exe")
  and subtype.create and file_path == "*Content.IE5*"

Discovery

Account Discovery (T1087), Remote System Discovery (T1096)
Discovery - macro
Discovery - macro
A feature of EQL is the ability to share or reuse similar logic between queries. By using macro declaration, we can bundle a collection of items together and call the array like a variable. A good example would be grouping Microsoft Office applications into a macro, or, in this case, several different Windows programs that can be used for discovery and enumeration.
EQL query (macro):
macro KOADIC_DISCOVERY(name)
    name in (
        "arp.exe", "findstr.exe", "hostname.exe", "ipconfig.exe",
        "nbtstat.exe", "net.exe", "net1.exe", "netsh.exe",
        "nltest.exe", "ping.exe", "systeminfo.exe", "tasklist.exe",
        "tracert.exe", "whoami.exe"
         )
The Elastic Endpoint Resolver view below helps provide some context about how Koadic spawns child processes. By using the Koadic module (exec_cmd), and running a natively supported command such as “whoami /groups”, we can see the Rundll32.exe application was invoked by WmiPrvse.exe and passes instructions down to the command prompt before launching the Whoami.exe application.
Elastic Endpoint Resolver
Elastic Endpoint Resolver visualization
Now that we have a better understanding of the attack chain, let’s tie our previous macro (KOADIC_DISCOVERY) into a sequence-based detection looking for three process creation events from any one of those enumeration programs within a period of 10 minutes, executed by the same user. This same feature would let you monitor for processes that were previously observed. For example, maybe 15 days later the process makes a network connection to pull down an additional payload. What other language lets you find long-term payloads that sit dormant for weeks or months?

EQL query:
sequence by user_name with maxspan=10m
  [process where subtype.create and KOADIC_DISCOVERY(process_name)]
  [process where subtype.create and KOADIC_DISCOVERY(process_name)]
  [process where subtype.create and KOADIC_DISCOVERY(process_name)]
| unique user_name
The query above is fully-functional and can be used as a generic detection for initial discovery and enumeration. But what if we had some reason to tighten the logic around Koadic specifically? Understanding the process genealogy of Koadic at the endpoint level, we can leverage different process relationship tracking functions in EQL such as child of and descendant of.
By using the child of function and setting the parent process to Rundll32.exe, we are essentially getting the grandchildren of Rundll32.exe. Then if we wanted to take it even further, we can add the descendant of parent process WmiPrvse.exe. This example demonstrates the flexibility of EQL to provide powerful detection capabilities for real adversary behavior.
Process tree visualization - child of and descendant of
Process tree visualization - child of and descendant of
EQL query:
sequence by user_name with maxspan=10m
  [process where child of [process where parent_process_name == "rundll32.exe"]  
     and KOADIC_DISCOVERY(process_name) and
     descendant of [process where parent_process_name == "wmiprvse.exe"]]
  [process where child of [process where parent_process_name == "rundll32.exe"]  
     and KOADIC_DISCOVERY(process_name) and
     descendant of [process where parent_process_name == "wmiprvse.exe"]]
| unique user_name

Privilege escalation

Bypass User Account Account (T1088)
While attackers control targeting of victims in many cases, they don’t always wind up with an elevated user during initial compromise. Even when a spearphishing victim is a local administrator, the attacker will oftentimes need to escalate from a Medium to High integrity process before continuing. Off-the-shelf offensive tools like Koadic can enable that transition with relative ease, including several different UAC Bypass modules out of the box.
For this example, we’ll examine a well-known UAC Bypass technique published by Matt Nelson (@enigma0x3) while leveraging the Computer Management launcher — CompMgmtLauncher.exe — which is interoperable with the Microsoft Management Console (MMC). Details about this technique, which still works on Windows 7 endpoints, can be found here.
This technique involves modifying the Windows Registry to change the default association of files the MMC interacts with (HKCU\Software\Classes\mscfile\shell\open\command) to an application of the attacker’s choice. By deploying a malicious script object with a compatible extension and altering this registry key value to launch a built-in script interpreter, an adversary is able to circumvent controls.
Right after this registry modification, look for the new process creation event tied to the auto-elevated Microsoft program (CompMgmtLauncher.exe), followed by common Koadic stager descendant processes such as Mshta.exe or Rundll32.exe — processes that should be running in a high integrity context. We can combine those events into an ordered sequence and constrain the total run-time for all the steps to complete within 10 seconds.

Privilege escalation - UAC bypass
Privilege escalation - UAC bypass
EQL query:
sequence with maxspan=10s
  [registry where length(bytes_written_string) > 0 and key_type in
    ("sz", "expandSz") and key_path == "*\\mscfile\\shell\\open\\command\\"
    and user_name != "SYSTEM"]
  [process where process_path == "C:\\Windows\\System32\\CompMgmtLauncher.exe"]
  [process where process_name in ("mshta.exe","rundll32.exe") and
    integrity_level == "high"]

Collection/exfiltration

Data from Local System (T1005)
Koadic’s method of C2 may be interesting to analysts of several kinds due to the transactional way it exchanges data between implants and server. This behavior is highlighted through some direct examples of specific commands executed below:
Specific commands
Command shell redirection into text files
Koadic redirects STDOUT/STDERR to a temporary text file that stores the output of the operator’s commands as they were presented to the server. These commands are then read back into the Koadic C2 terminal. One second after this file is initially created, it is automatically deleted.
With the right endpoint visibility, malicious behaviors you might be incapable of otherwise detecting stand out. To demonstrate a detection around this, we will use the event of function to filter only for processes that come from cmd.exe that contain a redirector (>), then tie the PID of that process to same PID that performed file activity related to the text (.txt) file activity.
EQL query:
file where file_name == "*.txt" and
    event of [process where process_name == "cmd.exe" and command_line == "*>*"]
Example results
Example results showing file modification
If you wanted to get more context, such as what command was passed from Koadic, we can turn the detection into a sequence and add the process event.
EQL query:
sequence with maxspan=5s by unique_pid
  [process where subtype.create and process_name == "cmd.exe" and command_line == "*>*" and
    descendant of [process where process_name == "wmiprvse.exe"]]
  [file where subtype.create and wildcard(file_name, "*.txt", "*.log")]
Example results
Example results combining process and file modification

Conclusion

To summarize, we analyzed one offensive framework (Koadic) and several of its prominent features, reviewed a flexible query language (EQL) to express detection logic, and stepped through several ways to identify behavior tied to Koadic with example analytics.
I see the availability of offensive frameworks like Koadic as an opportunity for defenders, and a motivation to stay vigilant. Thinking creatively about how to detect these post-exploitation behaviors and assessing how these tools perform against their own detection capabilities will put an organization on a path to greater success in stopping similar threats.
To help enable organizations, we’ve added all the queries in this post into the EQLLib repository. For readers interested in the original presentation from BSidesDFW this year, here is a link to the slides.
EQL support is being added to Elasticsearch. Get notified about Elastic Endpoint Security developments or apply to be part of the Early Access Program.
Taylor Blau / 2020-01-14 5 years ago / 未收藏/ The GitHub Blog发送到 kindle
The open source Git project just released Git 2.25 with features and bug fixes from over 84 contributors, 32 of them new. Here’s our look at some of the most exciting features and changes introduced since Git 2.24.

Sparse checkout management made easy

In the past few releases, you might have read mentions of topics like “partial clone support” and “sparse checkouts” in blog posts such as these. In 2.25, Git takes another step closer to bringing mature and configurable partial clone support to all users.

What are “partial clones”

Before we dive into the new changes, it’s worth taking some time to discuss what partial clones are, and where they’re at today.
A clone of a Git repository copies all of its data: every version of every file in the history. For very large repositories, the cost of network transfer and local storage can make this awkward or even impossible, even if you’re only interested in a subset of the files. In the past several versions, Git learned the ability to execute a “partial” clone, which means that it can now clone and work with repositories without having all of their contents.
Partial clones are still considered an experimental feature from Git’s point of view. For instance, many providers (such as GitHub) don’t support this feature yet, and it’s continually changing and evolving within Git from release to release.
For now, let’s focus on better understanding partial cloning by reviewing the perspective from both the server and client. The client must do two things: First, it must be able to tell the server that it wants only some objects from a repository. Likewise, it must also be able to tolerate local repositories which lack a complete set of objects. On the other hand, the server must be able to interpret the client’s request to serve only some objects, and be able to generate an adequate response.
How does this get done today? Let’s say that your repository has a manageable amount of history, but too many files to fit comfortably on your hard drive. In this case, you might want to clone only part a repository’s contents, by executing something like:
$ git clone --filter=blob:none --no-checkout /your/repository/here
Let’s break down what that means. First, specifying –filter= allows you to tell the server you’re cloning from the objects you choose. (In our example, we asked the server to avoid sending us blobs, but you can use a number of possible qualifiers). Next, we have to tell Git that it can skip checking out the repository after it receives a response from the server. Why? Because if Git tries to check out the contents, it will realize that it has missing objects, and try to request them from the server. We can prevent this from happening with--no-checkoutwhich tells Git to avoid checking out the repository entirely.
Now we have a repository on disk that has some of the objects from the server, but none of them are checked out to be read/written to/etc. What do we do now? Somehow, we have to tell Git which objects are okay to skip when checking out the repository to be able to actually check out. Thankfully, we can use a sparse checkout in order to make this happen.

Sparse checkouts

A sparse checkout is nothing more than a list of file path patterns that Git should attempt to populate in your working copy when checking out the contents of your repository. Effectively, it works like a .gitignore, except it acts on the contents of your working copy, rather than on your index. The downside is that sparse checkouts can be rather difficult to specify. For instance, here’s the incantation to avoid checking out files having depth two or greater:
$ git clone --filter=blob:none --no-checkout /your/repository/here repo
$ cd repo
$ cat >.git/info/sparse-checkout <<EOF
/*
!/*
EOF
$ git config core.sparseCheckout 1
$ git checkout .

Partial clones and git sparse-checkout

In Git 2.25, the previous example gets a lot easier with the introduction of a new git sparse-checkout command. We’ll review the new features shortly, but to give you a sense of how your workflow might change, here’s the same example using git sparse-checkout:
$ git clone --filter=blob:none --sparse /your/repository/here repo
The idea behind the git sparse-checkoutcommand is simple: allow users to play with partial clones and sparse-checkouts as easily as possible. It can do four things: set the list of paths to checkout, print the current list, and enable or disable sparse checkouts entirely. (Note: That’s the set, list, enable, and disable subcommands, respectively).
Instead of writing complicated .gitignore patterns into .git/info/sparse-checkout, git sparse-checkout handles the work for you. To checkout a new path, simply execute the following:
$ git sparse-checkout set /path/to/check/out
However, with great power comes great responsibility. If you have both an exceptionally large repository and an exceptionally long list of sparse-checkout patterns, it may take Git a substantial time to compute whether a given path does or doesn’t need to be checked out.
Thankfully, git sparse-checkout again comes to our rescue with “cone mode”.  When working in cone mode (opted into by running git config core.sparseCheckoutCone, the set of allowed patterns becomes more restrictive. Instead of arbitrary .gitignore patterns, you can specify whether all paths, or all files (within a given subdirectory) should be checked out.
For example, if you have a directory A/B/C, within a large repository and C is where you do most of your work, you’ll probably want to have C fully checked out. You’ll also want to have A and B checked out enough so that you can get to C, but not much more. When in cone mode, git sparse-checkout set A/B/C will do exactly that. To learn more about cone mode, check out the documentation.
For now the git sparse-checkout command is experimental, and its behavior is subject to change. Likewise, many providers (including GitHub) are still experimenting with partial clone support and it’s not yet generally available. We’ll make sure to keep you updated with the progress of both.
In the meantime, we’re publishing an in-depth overview of the sparse checkout feature by the author, Derrick Stolee. We’ll have lots more information about different workflows including cone mode—check back within the next couple of days, and we’ll share the link once it’s published.

Tidbits

Several blog posts ago, we talked about the --rebase-merges option, which is used to preserve the branch structure of your repository when rebasing. In v2.22.0 the option that --rebase-merges replaced, --preserve-merges, was deprecated. This release takes that deprecation even further by removing all mentions of --preserve-merges from the help text for git rebase.
If you’re still relying on scripts that use git rebase --preserve-merges, this release is a good time to update them.
[source]

Even though pull requests and issues may feel familiar to us on GitHub, the Git project itself works differently and uses a mailing list to email patches back and forth.
A feature Git has that makes this workflow easier is called branch descriptions. A branch’s description is used to fill the cover letter when sending a series of patches, and can be useful if you wish to send multiple versions of the same patches.
Git can now be instructed to use a branch description’s first paragraph to fill in the placeholder value for the Subject: header in the cover-letter email. To tell Git to do this, use git format-patch --cover-from-description subject.
[source]

Here’s a pair of Git features that you might not have known about: git apply --3way and the merge.conflictStyle setting.  You may have used git apply to apply a *.patch file to your repository, and perhaps even the --3way option to leave yourself in a conflict resolution state when the patch didn’t apply cleanly. Likewise, the latter configuration value is used to control how Git formats merge conflicts for you to resolve.
Now in Git 2.25, the two can work together so that git apply honors the conflict style you’ve set when it encounters patches that require merge conflict resolution before applying.
[source]

You may recall from our Git 2.23 blog post that Git supports function signature detection for features like git <diff|grep> --show-function and --function-context. (To use these, you’ll need to mark the file type using one of your repository’s .gitattributes files).
In Git 2.25, support has been improved to also detect function boundaries for programs written in the Elixir language.
[source]

Many commands that take a pathspec, for example, git add, git commit, git reset and so on understand a new option --pathspec-from-file. If you have many pathspecs to pass to one of these commands, you might write git add $(cat your-pathspecs). If your-pathspecs is too long, you might instead use xargs, which works fine in this example since xargs will simply run git add more than once. However, what if your command is git commit, in which case running it more than once no longer works?
Now, you can write git commit --pathspec-from-file=your-pathspecs and add as many pathspecs as arguments as you desire, which can be handy if you’re scripting around Git in especially large repositories.
[source, source, source]

In an older blog post, we talked about Git’s ability to detect renames at the directory level when writing your commits. Until now there’s been a subtle bug that caused this detection mechanism to fail when the contents of a subdirectory moved to the root of your repository. In Git 2.25, this bug has been squashed.
[source]

One of the very first Git commands you likely learned was git add. One particularly neat way to use this command that you may not have learned is with that same option we were discussing earlier, -i.
When invoked with -i, git add splits the changes you’re trying to stage into piece (colloquially, “hunks”) and asks you whether or not you want to stage each one. This is really useful if you want to split the changes from your working copy into multiple commits.
Some Git trivia is that this command has, since its inception, been backed by Perl. In 2018, an effort has begun to rewrite the engine powering git add -i in C, like the majority of the rest of Git. Cooler still is that this project is from an Outreachy internship. This work is still waiting on a few remaining changes to make git add -p feature-complete, but expect those features soon.
[source, source, source, source]

You may have used git log --graph to look at an ASCII rendering of the graph of history in your repository. If you’ve ever used this on a particularly large repository with a lot of long-running branches, the output may have filled the width of your terminal.
In Git 2.25, this command got a lot of love: a careful refactoring made it possible to significantly improve and simplify the output of git log --graph while still being faithful to the structure of history.
The before-and-after shots don’t quite fit here, but they’re too cool to ignore. So, if you’re into gratuitously awesome ASCII art, it’s the place to be.
[source]

Why stop at just one git log tidbit? If you wanted more, here’s another one. Back when Git 2.22 was released, we talked about ways to change the output of your log with git log --format=....In Git 2.25, --format learned the verb l/L, to use the part of an email address preceding the @[1].
If you’re working on a repository where everybody at your company shares the same email domain address, this can be useful for seeing usernames without wasting space printing the same domain over and over. If you’re curious, try git log --format='%h %C(cyan)%al %C(yellow)%s on one of your company’s repositories.
[source]

Learn more

That’s just a sample of changes from the latest version. Check out the release notes for 2.25 or any previous version in the Git repository.
[1]: The casing on this verb indicates whether to show the email address with or without applying the .mailmap translation(s).
The post Highlights from Git 2.25 appeared first on The GitHub Blog.
Innost / 2020-01-13 5 years ago / 未收藏/ Innost的专栏发送到 kindle
缘起从今天开始,对Android 10中的ART进行“了解一下”之旅。我本来以为一篇就能拿下,但谁想谷歌从8.0开始对ART进行了更细致和难度更高的改进。粗看了几遍代码,我觉得谷歌不管怎...
作者:Innost 发表于 2020/01/13 21:17:00 原文链接 https://blog.csdn.net/Innost/article/details/103966432
阅读:6
Curt Warfield / 2020-01-13 5 years ago / 未收藏/ fedoramagazine发送到 kindle
The Domain Name System, or DNS, as it’s more commonly known, translates or converts domain names into the IP addresses associated with that domain. DNS is the reason you are able to find your favorite website by name instead of typing an IP address into your browser. This guide shows you how to configure a […]
Desirae / 2020-01-13 5 years ago / 未收藏/ ecommerce发送到 kindle
Printful vs Printify… which ranks better?
It’s never an easy task to be the judge.
We’ve been asked every so often to give an in-depth summary and recommend the best platform to launch a T-shirt business. 
The print-on-demand business model seems to take a blooming knock in the ecommerce industry. Data-backed numbers show that the custom T-shirt printing niche alone is expected to hit $10 billion by 2025. 
And it’s no secret that there are hundreds, if not thousands, of new products emerging in the market that suit the POD model.
Certainly, low overheads, huge mark-up potential, and low barrier to entry are some of the selling points that make the print-on-demand model ideal for beginners looking to start an eCommerce business. 

It’s now easier than ever to custom-print stuff like drawstring bags, hoodies, or cushion covers, in just a click. So far, both Printful and Printify stand as the two biggest print-on-demand services.
But ultimately, this comparison will put a pivotal consideration on the strengths and snags of each print-on-demand solution. 

To brief you up.

This guide gives a full account of how each platform stacks up in the market. To brief you up on the main segments, we’ll take a closer look at these productive factors:
  • Ease of Use
  • Pricing
  • Order fulfillment
  • Customer support
  • Print quality
  • Integrations
That sort of rounds up what we’re about to review on each platform. We’ll give credit where it’s due, as well as point out all the pitfalls on both Printful and Printify
In the end, you’ll get to know which particular POD solution is right for your soon-to-be, ecommerce business
But before we share deep insights on these services, let’s first define what print-on-demand entails. 

What is Print on Demand?

Print-on-demand, as the term suggests, is an online fulfillment process where the seller works with a supplier to make custom-print products on an order basis.
The supplier who is mostly a print-on-demand service with a warehouse and an online platform that integrates with the drop shippers online selling channel customizes white labels products under the seller’s brand or a customer's pre-made print design.
These products include caps, T-shirts, tote bags, leggings, hoodies, pillows, and curtains. This list goes on and on. 
Same as drop shipping, the model allows you not to hold any inventory or pay any upfront fees until a product is sold to the customer. This makes it the best solution to test a business idea since it has low overheads and a marginal barrier to entry.
If you’ve built an audience whether organically or through campaigns, print-on-demand is an option to help you monetize your content. 
It’s easier to create an income stream since you don’t have to deal with the fulfillment process. 
So let’s compare both services a little further to find out which works best for newbies. 

How Printful works


Printful runs production houses in the USA, Mexico, and Europe. The company covers a large geographical scope to fulfill customers’ orders on time. 
To get started, you need to sign up and connect your store to Printful. Why do you need to integrate your store to this POD service? 
Here’s the hint. 
Well, it’s accurate to term print-on-demand as any other dropshipping method. As soon as you’re done with all the integrations, you’ll need to work on your custom products using its mockup generator. 
You might want to ask– what the heck is a mockup generator? 
In all technical terms, the mockup generator is more like a design tool to help you virtually create custom prints for your listed products. It helps you create amazing and high-resolution photos using the suggested templates. 
On Printful, you can reach out to any of its categories and pick any of its POD items that you want to upload on your online store. There are over 200 products to choose from.

Printful's high-selling  categories:


  • Clothing: T-shirts, Hoodies, Sweatshirts, Leggings, Shorts, Tank tops, Polo shirts, Long sleeve shirts. 
  • Accessories: stickers, Phone cases, Bracelets, Necklaces.
  • Bags: Tote bags, Laptop cases, Drawstring bags, Backpacks, Fanny packs. 
  • Home & Living: Coffee mugs, Blankets, Pillows, Posters, Canvas prints, Bean bags, Beach towels, Embroidered aprons.
  • Collections: Sportswear, Streetwear, Workwear, Beachwear. 
There’s literary a whole library of products to post on your dropshipping store. Printful gives users a multifold approach due to its large volume of custom branding options.
After putting your mockups together, Printful allows you to import all the products designs to your store. The next step is to promote your products to your target audience and wait for the order automation feature to take effect. 
Printful prints, packs, and ships all orders made by customers from your store. The drop shipper has to pay for the fulfillment costs once an order is fulfilled. 
This gets you off the hook from the daunting process of manually designing a print design and shipping orders to your customers. 
So basically, two concurrent transactions happen anytime a customer makes an order for a print-on-demand product. First, you need to draw a pricing formula to set your profit margins. As a result, it’s much easier to have competitive retail prices on your listed products. 
The subsequent transaction, which Printful charges, is used to purchase the product and settle the fulfillment fees. 
And that’s it. 
So simple. Right? 
Here's an extra guide on Printful's overall perfomance:
Printful Review: Higher Quality Printing and Dropshipping.

How Printify works


Printify attempts to make the order automation process as simple as it can. 
Same as it’s top competitor, Printify uses a mockup generator to lessen the burden of designing the print designs. It has easy drag and drop tools that are enormously friendly to beginners. 
To create a 3D high-quality product image, Printify has all sorts of color options you can ever think of. There’s also a rich product catalog to work with. 
The POD service works with print designers and brands that use state of the art technology to improve on products’ overall quality.
Printify sorts these print-on-demand gurus according to bestselling, location, and prices. So picking the right print provider to fulfill your orders is such a plentiful accessory to your POD dropshipping business. 
Its huge directory of products is similar to that of its rival. You can customize your print designs to appear on products such as hoodies, T-shirts, mugs, canvas prints, leggings, and so on. 
The option to handpick your supplier makes it convenient for both ends; your business and the customers. As a dropshipping business, you get to reserve your brand’s authority by working with the most suitable print provider. 
You have an option to request for samples. This allows you to feel and make first-hand ratings on the products’ quality and print design. If you’re pleased with what you see, you can take a step to the next level and list the variety of products in your store. 
And quite as expected, Printify takes care of the whole fulfillment process. To break out of the deficit territory, the print-on-demand service promises not to fall short of any order management priorities.
Whenever you make a sale, be certain that the quality control is in check and that you can track each shipment.  
All that is left for you to decide is the marketing strategy. As far as its mode of operation goes, it seems like Printify runs in the same line of action as its competitor. 
Below is a descriptive afterthought on Printify's functionality:
Printify Review: Easy and Quick Way to Create Products With Your Designs.
Winner: It’s a tie. The ease of use of of both Printful and Printify is equally convenient for new users. 

Printful vs Printify: Pricing

There’s always a significant shift that pricing holds when it comes to picking the right solution. As the middleman, you need to factor in whether a POD channel is cost-effective. 
That allows you to build momentum when maxing out on the potential profit margin.
You’ll be gratified, or if you prefer, complacent that both companies are outrightly transparent with their pricing. There are no hidden fees. You can bank on this fact. A new user doesn’t pay to sign up on their platform. 
Both print-on-demand solutions can identify their customers’ imminent needs. And as a result, they don’t charge any membership or subscription fees. 

Printful’s pricing plans


If you want to sell white-label products, Printful has a modest price for all your needs. You can request for inside labels to be tagged on any POD product you want to sell. 
An inside label mostly includes the garment’s size, material information, and the manufacturer’s tag, or logo. 
With print-on-demand, you have the option to personalize the label to display your brand. Printful charges $2.49 per label. This is a proven marketing hack used by most entrepreneurs to make their brands visible on the market. 
As part of building authentic customer loyalty, you might want to set a budget for Inside labels. The technical aspect of it is pretty simple. You can pick a label template and customize it to fit your brand. 
Other services that Printful offers to drop shippers include; 
  • Outside label – $2.49 per label
  • Long sleeve print- $ 5.95 per sleeve
  • Short sleeve print- $ 2.49 per sleeve
  • Embroidered logo- $2.95 per additional placement
Printful allows you to create a design that captures your logo and prints it on the packing slips for free. Most sellers use this option to build better a customer relationship, issue discounts, and introduce a new product in the already existing market. 
For pack-ins such as flyers, business cards, or stickers, you’ll need to pay $0.75 per order. You can opt to pay this small fee to promote your products.
As you can see above, each customization has its price.
 So how much profit I’m I left with? 
That’s a safety concern for all print-on-demand drop shippers. Looking on the bright side, Printful gives you pricing strategies that are proven to work. 
There’s a profit calculator to help you descend on the most practical profit margin suggestions. It shows you how much to expect in net profit per product sold.
While there are no limits to pricing, Printful recommends a 30% minimum profit margin. Printful issues volume discounts to users when they reach a specified amount of sales per month. 

Printify’s pricing plans


Printify has three unique plans. On each package, the drop shipper gets access to these headline features:
  • An advanced mockup generator
  • Integration with selling channels such as Shopify, eBay, Etsy, WooCommerce, among other ecommerce cart solutions. 
  • 27/7 live support
  • Manual order creation. 

Free plan

Printify recommends this plan to a merchant who's merely starting their dropshipping business. There are no limits to the number of product designs you wish to upload to your online store. 
This free account allows you to integrate with up to 5 POD dropshipping stores. There’s nothing more to depend on from this plan. As you know, cheap never comes easy. 

Premium plan

If you want to scale up a little further, this is the right package to bank on. It’s ideal for merchants with multiple stores since it has a capacity for 10. Printify charges $29 per month for the premium plan. 
This package is the most popular since the drop shipper gets up to a 20% discount on all ordered products. 
The extra perk to consider is that this option gives you access to sell personalized products in your store. That’s not available on the free plan.  

 Enterprise plan

To fulfill over 10,000+ orders per day, you’d need to go with the most pricey package. The merchant gets a custom API integration that’s doesn’t limit the number of stores to sync your account with.
It comes with a dedicated customer support team to help the seller resolve any pitfalls. Printify promptly keeps all the enterprise plan users posted on any new features which they add on the platform. 
Winner: Printify. Its pricing is way cheaper. But the pricing isn’t clearly defined. Printiful has classified all its services accordingly( in-labels, packing slips).

Printful vs Printify: Integration

Both platforms have in-built APIs to help the merchant integrate with large ecommerce platforms. 
Printful and Printify can integrate with Shopify and WooCommerce selling channels. Printful has a longer integration list, unlike its rival. It syncs with other channels such as:
  • Squarespace
  • BigCommerce
  • Weebly
  • Ecwid
  • PrestaShop
  • Big Cartel
  • Gumroad
  • Magneto
  • 3rdcart 
  • Launch Cart. 
  • Wix
Printify’s premium plan only connects to two marketplaces; Etsy and eBay. In contrast, Printful makes headway for other product listing platforms such as Amazon, Storenvy, Inktale, Wish, and Bonanza. 
If you want to start selling print-on-demand products on ecommerce channels, Printful recommends Shopify, Etsy, Ecwid, and BigCommerce since they’re quick to setup. Its API automates the order fulfillment process and the plugin is available on the above-mentioned stores. 
If you plan to use an enterprise-oriented channel such as Magneto, it’s worth hiring a developer to help you launch your POD store. 
Winner: Printful.

Printful vs Printify: Fulfillment and Shipping costs

If shipping takes way longer, your business risks plunging into slow sales. Printful explains in detail, how the entire fulfillment process works. 
The process begins right after an order is made. Printful estimates that it can take between 2-7 business days to make apparel products, and 2-5 business days for non-apparel products. 
For shipping, it depends on where the product has to be shipped to. On average, Printful suggests that it might take about 4 business days. Printful hits the target of over 3 million orders each year by working with global carrier companies.  
Some of the listed shipping solutions include FedEx, DHL, USPS.com, and DPD. The company has a full-detailed guide on how to calculate the shipping rates. 
For print products like T-shirts, long sleeve shirts, crop tops, or tank tops, this is what your customers will need to pay as shipping:
First product
  • USA: $3.99
  • Europe: $4.39
  • Canada: $6.49
  • Australia/ New Zealand: $6.99
  • Worldwide: $5.99
Additional product
  • USA: $1.25
  • Europe: $1.09
  • Canada: $1.25
  • Australia/ New Zealand: $1.25
  • Worldwide: $1.25
You can choose to let the customer calculate the shipping at checkout or include it in the retail price. Customs fees may also apply depending on the geographical location where your customer is located. 
Printify also fulfills orders using top carrier companies. The company has also partnered with local fulfillment companies to effectively support drop shippers selling products from different corners of the world. The rates on some of these solutions are, however, a bit higher. 
Shipping solutions on Printify take longer to deliver international orders since they have fewer fulfillment centers. Here’s a breakdown of the shipping times:
Location
  • USA: 7-15 business days
  • Canada: 10- 15 business days
  • International: 10-30 days
Printify doesn’t explain much about how long it’d take to manufacture a product. Printful, on the other hand, updates, in real-time the shipping rates during checkout. 
To take the bad with the good, Printify offers a faster solution for merchants using the Advanced Shopify plan. 
Winner: Printful. It has a dedicated page that gives full disclosure on the whole shipping and fulfillment process. Printify isn’t optimized for international orders.  

Printful vs Printify: Customer support

Printful has a deep-dyed set of tactics to engage with their customers at a more snappy level. The company offers an onboarding session to all new users at no cost. 
Its blog section is pretty much resourceful and has useful insights on how to run a successful print-on-demand business. You can give them a call, start a chat, or send an email. 
On Printify, you’ll find a help center with articles on important topics like integrations, troubleshooting, products, payments, and mockup designs. 
They also run a gainful blog that has tips on marketing, design trends, and success stories. But what makes it fall behind Printful is that it lacks a 24-hour clock live support. 
There’s a wave of mixed reactions on the internet regarding Printful’s customer support. We have a group that upvotes the print-on-demand service for its responsive dashboard while others bash out claims that its customer support is slow to answer any pressing questions from users. 
Winner: Tie. Both have equal wins and noticeable flaws.

Printful vs Printify: Overall features

Which one takes the lead? Let’s find out. 
Printful has an organized structure that classifies its services concisely. The Printful ecommerce photography service is one rare feature that’s hardly available on other print-on-demand services. 
If you need high-resolution images to help you build your brand’s persona, Printful has got you covered. As we pointed out earlier in this comparison guide, the service offers discounts on bulk orders. 
For products that need to be photographed and fulfilled, Printful gives a 20% discount; which sounds like a good deal. They have a stock of pre-made samples so you don’t need to wait much longer to have images for your products. 
Printful also promises same-day fulfillment for orders made before noon through it’s automated order processing solution. Best of all features is its pricing calculator which helps users set competitive retail prices.  
In comparison, Printify racks up with a rich catalog of products. On the contrary, it hits the fan when it comes to design services. Printful steps up with graphic design options for business branding, promotions, and accessories. 
The company displays some of their design work and a professional team of in-house graphic designers to customers on their official page. 
Winner: Printful.

Printful vs Printify: Product designs and quality

This was a pretty hard factor to gauge. So I decided to do some research on the internet and gather some user-generated reviews. 
Printful has taken a keen interest in hunting for winning product designs in the market. Printify, on the other side, seems like a conventional channel with long-established print-on-demand products like T-shirts and hoodies.
And there’s nothing wrong about that. But the fact is, having a variety of trendsetting products goes a long way.
Looking at the comments online, Printful looks a bit more compelling when it comes to curating merchandise and boosting customers’ confidence in a brand.
The little feedback that I managed to gather regarding product quality happens to rank Printful as a better alternative.

Most complaints point to Printify’s print quality. It’s claimed that some of their apparel products fade and crack within a short time. What could perhaps drive this to happen is the fact that Printify acts as a middleman.
Literary, they don’t do the printing. Rather, they source this service from 3rd party companies; which isn’t the case with their close competitor. Printful has invested so much in printing machines, warehouses, and graphic designers.
With this kind of infrastructure, it’s much easier to maintain the products’ quality.
 Winner: Printful.

Printful vs Printify vs Print Aura

Print Aura is far less effective as compared to Printify and Printful. It branches off from most of the print-on-demand merchants’ expectations. 
The website looks static which is a bit off if we picture in the pressing need to work with a user-friendly and responsive POD service. Without a savvy platform in place, that would cripple the entire order fulfillment process by far. 
The standard shipping for a T-shirt order on Print Aura only takes between 3-5 business days in the US. If we’re to rank these three services based on shipping speed, it’s clear that Print Aura takes a narrow lead. 
 Its mockup tool is, unfortunately, not the perfect blend for custom printing. Even worse, the design tool’s page isn’t optimized to load fast. Printful and Printify have taken good care of this key performance indicator. 
I’d recommend Print Aura to a beginner who needs a basic punchline of selling bare bone print designs. Its capacity to scale is a bit crappy and their print designs are less fancier than those you’d find on Printful. 
Another snag you might not like about this print-on-demand service is its mockup generator. On Print Aura’s landing page, they barely talk about how their mockup tool operates. 
Despite it being functional, new users might find it pretty difficult to navigate through any technical curves. 
You may find selling your brand as an objective that’s within reach but you might miss out on the extra level of workflow precision that both Printful and Printify equally have.
Printify, unlike the two other POD sites, has an option to upgrade to a more advanced plan. On the other hand, Printful is the only service here with a diverse production network. A drop shipper gets to pick a print designer of their choice. This freedom is limited in both Printify and Print Aura.

Printful vs Printify vs Teelaunch

These three solutions at least have one thing in common. They all have a candid customer support system. 
But there’s one ‘out of the way’ fact about Teelaunch. It’s designed to only work for Shopify users. Teelaunch holds a modest position in the print-on-demand market since it’s not as popular as the two captains of the print-on-demand model.
In spite of that, Teelaunch has unique products that are hard to find on other platforms. You can sell rare print items such as branded power banks, shower curtains, UV printed bracelets, kids beanies, monogram gloves, journal hardcovers, jewelry boxes, dog bowls, and so on.
Among the three print-on-demand solutions, I’d rank Printful as the most productive solution in terms of brand designs and quality. Teelaunch being a newbie in the dropshipping model, has a lot of stuff to catch up on. 
To reach where Printful stands at the moment, they’d need to invest more in fulfillment centers. Since Printful has more warehouses across the US, they take shorter shipping times as compared to Teelaunch.
 If Teelaunch attempts to work on their lead time, then it would be on an equal footing with its competitors. But this would require Teelaunch to have an in-house team for all their fulfillment priorities.
At the moment, they outsource this service which denies the POD company a greater control on product quality and quick turnaround time. 
If we make a head-to-head comparison on the ease of use, all three services seem to have a newbie-friendly interface. They all have an up to snuff reputation when it comes to the ease of use factor.
In terms of pricing, Teelaunch gives the drop shipper a more competitive markup potential without leaving out the quality aspect of all their print designs. 

What to like about Printful

  • Printful has a significant number of unique products to work with
  • Has an automated order fulfillment solution
  • Integrates with major shopping cart channels and marketplaces
  • It has a quick turnaround time. 
  • Centralized fulfillment locations. Printful has warehouses in Los Angeles, North Carolina, Latvia, and Mexico. They’re planning to launch another base in Spain. Since they do in-house printing, drop shippers can sell their print products globally and fulfill orders promptly. 
  • Its ease of use is up to scratch
  • Great quality of products
  • Printful has a large customer base across the US and Europe

What not to like about Printful

  • While the product quality is streets ahead of its competitors, Printful’s products are slightly overpriced. You might want to research your customer base to know how much they’re willing to spend on custom branded products. 

What to like about Printify

  • You can choose your printing provider
  • A flexible pricing model
  • Over 200 products to choose from
  • Products are a bit cheaper

What not to like about Printify

  • A limited number of integrations
  • The branding services are quite limited
  • Its print quality is sometimes fluctuating

Printful vs Printify- Final Verdict

It’s promising to see how print-on-demand products are receiving an upward trendline in the drop-shipping model. 
This comparison would be great for merchants who aren’t only interested in how to start a print-on-demand business but want to launch using a top-notch POD service. 
While these two have their selling points to consider, product quality is the top-tier factor that helps a brand make repeat sales. 
From all the facts we’ve pointed out in this guide, it’s no secret that Printful has an acute edge over Printify
Printful is a grandmaster in the print-on-demand game. The company has been in existence since 2013 while its close rival is 2 years younger.
From a factual context, Printful has a quicker shipping model and a better print quality which, in essence, is a great deal for dropshippers.
Since customers are mostly interested in the quality you need to be consistent on each print order. And no solution is better at print quality than Printful. 
Consequently, each platform has its pros and downsides. So you want to test both POD services to see which works perfect on your dropshipping goals. 
For that to come about the easy way, you need to perhaps take a stroll on the internet and run a market analysis, order samples, or even better, test these two solutions separately. 
After all, it’s free to integrate both POD services to your dropshipping store. That way, you’ll learn better which service is likely going to make your online store bank more on repeat customers. 
If you want nothing else but quality and customer satisfaction, Printful has an unmatched strategy to work with. 
Ultimately, Printful takes the lead. 
The post Printful vs Printify: The Ultimate Print-on-Demand Services Comparison in 2020 appeared first on Ecommerce Platforms.
Kevin Hartnett / 2020-01-13 5 years ago / 未收藏/ quantamagazine发送到 kindle
A startling experimental discovery about how fluids behave started a wave of important mathematical proofs.
corinne@heysparkbox.com (Corinne Ling) / 2020-01-13 5 years ago / 未收藏/ seesparkbox发送到 kindle
This video series teaches you to build accessible components through progressive enhancement. In this video, learn how to start building a component with HTML.
Jessie / 2020-01-14 5 years ago / 未收藏/ cncf发送到 kindle
Launched in 2007 with a mission of making customer service easy for organizations, Zendesk offers products involving real-time messaging, voice chat, and data analytics. All of this was built as...
The post Zendesk: ‘Kubernetes Seemed Like It Was Designed to Solve the Problems We Were Having’ appeared first on Cloud Native Computing Foundation.
Emmanuella / 2020-01-13 5 years ago / 未收藏/ techcrub发送到 kindle
Influencer
If you have been keeping up with trends, especially on the internet, you would have heard or read about influencers and influencer marketing. This may prompt you to ask the question who or what are influencers? In this article, we will be taking you on a journey through the history of influencer marketing and giving […]
The post What is an Influencer and Influencer Marketing? appeared first on Techcrub.
2020-01-14 5 years ago / 未收藏/ Martin Fowler发送到 kindle
My colleagues often talk about the important advantages of organizing a software development organization using products rather than projects. While this is an effective organizational approach, it does have its downsides. One of these is handling programs that require coordinating across multiple product teams. Luiza Nunes and James Lewis share their experiences dealing with this situation, outlining the kinds of problems they see and the practices they've found to make it work.
more…
2020-01-12 5 years ago / 未收藏/ 分享技术,品味人生发送到 kindle
可能是因为小时候穷过,我是一个安全感不是很强的人。我又是一个不愿意被事物禁锢的人,不愿意因为一件事让我不能脱身。
基于这样的一个背景,工作后我就不断的在尝试扩宽我的副业,为了就是让我在某些情况下,有另外的一个选择。
不出意料的前 6 年的所有尝试都失败了。
尝试过接外包,很多专业接外包的项目都是要求做页面的,刚开始只对后端比较熟悉,所以搞不定。
不过工作很多年后,倒是真的做过几个外包,还是给欧美做项目,才发现做外部不但挣不了钱,反而会把人累死,慢慢就放弃了。
后来听说炒域名挣钱,天天研究怎么买卖域名,国内外不同的域名厂商下注册了300多个域名吧,最后一个都没有卖出去,现在手上还有近 100 个域名。
尝试过投稿,从2016年写博客之后,慢慢有一些媒体有邀稿,写过一段时间后就有了自己的公众号,开始专心做自己的内容了。
还在很多技术社区开了技术课程,在知乎做过 Live ,去企业尝试做过内训,还有很多其它的尝试,不是失败了就是觉得没有搞头。
后面我终于再次遇到了公众号,2年多的时间,公号的收入就已经超过我的主业了。
为什么说终于再次遇到了公众号,因为2012年我就注册了公号 Flyever,一直不知道怎么搞就放下了,后面每年都会尝试做一个方向的公号,最后都失败了。
2017年开始的时候,也没有太大信心,结果反而成了。
它也是我前面 N 多次尝试失败后换来的,当然其中也有很多的运气成分在里面,遇到了这么好的一个自媒体创业环境。
2019年我开始做自由职业了,曾经的副业变成了主业,收入又开始变得单一了,于是我又开始寻找我的副业,半年时间也尝试了很多方向。
有的从现在来看还不错,但远还没有到达盈利的标准,有的还在投入期估计还需要很多时间才能知道结果,有的已经和小伙伴们玩了起来。
反正人生不就是折腾吗?
2019年末的时候我遇到了芬香,其实在这之前我一直都对淘宝客很感兴趣,也看了很多关于淘宝客的案例,但苦于没有切入的时机。
所以当一个朋友邀请我的时候,我立刻马上进行了尝试。
12 月11开始尝试当天收入90,第二天 400,后面几天没有任何操作每天也能收入 20-50。刚开始只是觉得这个可以做,但不太了解这里面的风险。
12月21号,就聊挣钱知识星球北京线下见面会就在律师事务所举行,借着这个机会我让律师帮忙给我分析了一下这个模式是否合规。
得到确定的答案后,12月22号正式开搞。
12月24号积分到达导师标准。
2020年新年的第一天,获得了导师晋升的证书。

到现在,基本上每天的收入都在 500 +,我只用了一个月,芬香的收入就已经超过我月收入的 1/10,并且后面的收入会越来越好。
于是我决定把它,当做我在2020年的副业正式搞起。
在这期间我也给许多朋友进行了推荐,毕竟它是一个新的东西,大部分表示了拒绝,少数人还在观望,部分小伙伴参与了进行。
目前参与进来的这些朋友中,有两个也都升级到了导师,收入也慢慢都稳定了下来,随着时间的积累和持续的工作,他们的收入也会比较可观。
观望的朋友比较可惜,因为芬香正在快速发展,早加入 1 天就有多 1 天的机会。特别是对于手上有一定资源的朋友,做芬香其实就是对身边资源的进一步整合。
只有一块做事情,你才能真正了解一个人。

最后如果你也对芬香感兴趣,可以扫描上方二维码注册,然后再扫描下方二维码加我的私人微信,我来告诉你芬香是不是一个值得做的副业!

很期待和大家一起搞事情!
Frederick O'Brien / 2020-01-13 5 years ago / 未收藏/ LogRocket - Medium发送到 kindle
User engagement data is only as good as the scrutiny it is subjected to. As such, you need to put metrics in their proper context.
The post Balancing quantitative and qualitative user engagement appeared first on LogRocket Blog.
Nkere-Awaji Inwan / 2020-01-14 5 years ago / 未收藏/ LogRocket - Medium发送到 kindle
In this tutorial, we'll learn how to put basic input validation in place with validatorJS. We'll also learn how to define custom validation rules for two use cases.
The post How to handle data validation in Node using validatorJS appeared first on LogRocket Blog.
前端集合 / 2020-01-13 5 years ago / 未收藏/ 前端集合 - 关注前端技术和互联网免费资源发送到 kindle
又到年底了。今年过得很没有成就感,感觉一事无成。业务时间基本都花在了小孩身上。越来越没有时间搞一点自己的事情了。这是个很大的问题。工作上危机感也越来越重。留给我的时间不多了,最多2年。2020,...