分类目录归档:未分类

Const指针与类

类的成员函数在调用的时候,会有一个隐式的this指针,默认情况下,这个指针的类型是 ClassName * const this,这意味着this指针不能改变,但this指针指向的对象是可以改变的。

但如果成员函数不会改变对象本身,那么this指针应该被设计为const ClassName * const this,即this指针是一个指向常量的常量指针,其指向的对象不可变更,本身也不可变更。

但因为this是隐式的指针,那么当我们想要声明this指针指向的对象是常量时,我们在哪里声明呢?

就在成员函数的参数后面,加一个const。这就叫常量成员函数。

注意,常量的对象无法调用自身的非常量成员函数,原因就在于,非常量成员函数的this指针是:ClassName * const this,无法指向一个const的对象。

2020-4-13 English Reading.

Reading record.source:https://time.com/5819795/opec-barrel-cut-coronavirus/


DUBAI, United Arab Emirates — OPEC, Russia and other oil-producing nations on Sunday finalized an unprecedented production cut of nearly 10 million barrels, or a tenth of global supply, in hopes of boosting crashing prices amid the coronavirus pandemic and a price war, officials said.

继续阅读

2020-4-12 English Reading.

Reading Record. source:https://time.com/5819074/federal-reserve-fed-coronavirus-lending/


The Federal Reserve may not be done with its all-out blitz to help the U.S. economy survive a coronavirus-induced shutdown, even after launching an unprecedented $2.3 trillion in lending programs.

The central bank used up only about 40% of the as much as $454 billion in seed capital that Congress provided it in extending help to small and mid-sized businesses, state and local governments and some risky corners of the financial markets on Thursday. 继续阅读

2020-4-11 English Reading.

Reading Record.

srocue:https://time.com/5819080/unemployment-coronavirus/

Economists expect the U.S. to suffer its largest-ever contraction this quarter and the unemployment rate to soar to a post-Depression record, followed by a recovery that will be moderate and drawn out.

Gross domestic product will plummet an annualized 25% from April through June after a smaller setback in the first quarter and the jobless rate will hit 12.6%, the highest since the 1940s, according to the median forecasts in Bloomberg’s monthly survey of 69 economists.

继续阅读

2020-4-1 English Reading

The passage of the pandemic stimulus bill to the tune of at least $2.2 trillion dollars was heralded as a major step towards staunching the massive economic toll of the near-complete shutdown of the United States. But of the many moves made by the federal government, the effects of that stimulus bill may ultimately pale in comparison with the radical measures enacted by the Federal Reserve. We are in uncharted and deep waters, but none may prove as revolutionary as what the Fed is about to do.

Graced by Congress and by the Treasury Department, the Federal Reserve is committed to using its balance sheet to inject more than $4 trillion into the economy. That is not a typo. And it is, in fact, likely to be substantially more than that by the time the pandemic crisis has subsided. This will not end up directly in the pockets of individuals, but it will flood the financial system with unprecedented amounts of money and provide a cushion and a floor for almost any tradeable asset.

And by any tradeable asset, that means money market funds, corporate bonds, municipal bonds, bank lines of credit, student loans, mortgage-backed securities, and according to Jerome Powell, the chairman of the Federal Reserve, perhaps even stocks. Asked about the possible outer limits of what the Fed might buy, Powell said, with unusual candor, that in a time of pandemic, “We’re trying to create a bridge from our very strong economy to another place of economic strength, and that’s what our lending really does. It’s very broad. It’s across small, medium and large businesses.” And it extends as well to state and local governments strapped for cash as tax revenues evaporate. It extends, in fact, to just about everything and anything imaginable.

It is impossible to overstate how radical a departure from past precedent these moves are. During the Great Recession of 2008-2009, the Fed cut interest to zero (as it has now) and then began to experiment with what it called “quantitative easing” on a multi-trillion dollar scale; it began to buy up bonds and act as a lender of last resort to large financial institutions that were facing potential insolvency, and to European banks as well as the European Union faced its own crisis into 2011. But as innovative as that was, it took many months for the Fed to act then, after the financial crisis had already metastasized into an economic collapse, and its buying was limited to specific and rather arcane corners of the financial markets.

2020-3-27 English Reading.

As Americans hunkered down at home to protect themselves from the spread of novel coronavirus last week, they filled their pantries with toilet paper, sanitizing products and…oat milk?
pantries (食品)储藏室
 
The milk alternative surged in U.S. sales by 477% during the week ending March 14 compared to the same period last year—one of the biggest increases of any food product, according to new data compiled by Nielsen.
During ordinary times, this increase might seem to have been caused by the milk alternative’s trendiness. But during a pandemic, consumers might have had more practical concerns.
Oat milk is shelf-stable—which means that consumers can keep it in their homes longer.
milk alternative 牛奶替代品
 

Nielsen’s data shows that last week, Americans bought an unusually large amount of non-perishable food, as well as cleaning products, health goods, and lots and lots of toilet paper as they got ready to keep themselves and their homes clean and stocked with food.

non-perishable 不易腐烂的
 

As states    discouraged   Americans from being in large crowds, consumers increasingly shopped for groceries online. Instacart, which delivers goods from local grocery stores, reported that order volume is up by 150% compared to the same period last year; customers were also buying more, with average baskets 15% bigger compared to last month. About 40% of orders used the company’s “leave at my door option” last week—perhaps to reduce contact with the delivery person.

Laura McCullough, at executive vice president of U.S. manufacturer client success at Nielsen, said that Nielsen’s data shows that Americans rearranged their lifestyles last week.

“Early on we saw spikes in health safety product sales correlating with major announcements in those areas and shifts from shopping the perimeter of the store to the center,” McCullough said. “Drastic out-of-stocks may rise if concerns over healthcare provider and government preparedness grow.”

Besides oat milk, Americans also stocked up on dried beans, up 231% compared to last year; canned meat, up 188%; tuna, up 142%, and soup, up 127%, according to Nielsen.

canned meat肉罐头

Snack foods are also up in popularity as consumers geared up to munch at home.

Popcorn is up 48%, pretzels 47%, pastries 24% and ice cream 23%.

Certain fresh fruits and vegetables have also ticked up, as consumers perhaps started to realize they’d rather not live on canned food alone. Apples were up 20%, bananas by 17%, and papayas and celery by 3% each.

Unsurprisingly amidst a pandemic, consumers are also focusing their spending on health products. Thermometers are up 498%; cold and flu remedies 159% and vitamins 93%.

hand sanitizer洗手液

there are also sign还有迹象表明

Though hand sanitizer is very much in high demand (up 208%), there are also signs that Americans are trying to make their own versions at home.

Two ingredients used in DIY recipes, hydrogen peroxide and rubbing alcohol, are up 212% and 277% respectively (although consumers may also be using them for other cleaning purposes).

Other cleaning products, especially aerosol disinfectants, up 519%, and multi-purpose cleaners, up 243%, also saw strong increases in demand.

As consumers spend more time alone and indoors, the pandemic also appears to have repressed demand for certain goods. Perfume is down by 18%; sunscreen by 17%, and vegetable party platters by 7%.

repressed 抑制
sunscreen 防晒霜

2020-3-26 English Reading.

(DES MOINES, Iowa) — Hoping to escape all the coronavirus-caused economic uncertainty by winning a giant lottery jackpot?

a giant lottery jackpot彩票大奖  lottery彩票  jackpot头奖

Think again. Those jackpots are going to shrink as the pandemic tamps down lottery sales.

The group that oversees the Powerball game announced Wednesday night that it would cut minimum jackpots in half, from $40 million to $20 million, after there is a winner of the current big prize.

The jackpot also could grow more slowly, with minimum increases of $2 million instead of the normal $10 million after each twice-weekly drawing.

“Powerball players in many U.S. lottery jurisdictions are under shelter-in-place orders or recommendations from their governors or mayors, which have affected normal consumer behaviors,” said Gregory Mineo, the director of the Maine lottery and chairman of the Powerball Product Group. “Just like other enterprises around the world that are making adjustments, we are making proactive changes to continue to offer the world’s premier lottery product.”

the world’s premier lottery product. 世界一流的产品(彩票)

 

The other national lottery game in the United States, Mega Millions, is considering a similar move.

“The Mega Millions Consortium has begun internal discussions about potential changes to address the slowdown in sales during the current health crisis,” said Gordon Medenica, who heads the Maryland lottery and is director of the national game.

Medenica notes, however, that Mega Millions has a minimum increase of $5 million after each drawing so is in better position to weather the decreased sales.

For most people, the coronavirus causes mild or moderate symptoms, such as fever and cough that clear up in two to three weeks. For some, especially older adults and people with existing health problems, it can cause more severe illness, including pneumonia, or death.

The move by Powerball won’t affect the current $160 million jackpot, which will continue to rise by at least $10 million until there is a winner.

Another thing that won’t change is the odds of winning a jackpot, and they’re puny for both games.

puny 弱小的 微弱的

For Powerball, the odds are one in 292.2 million, and for Mega Millions they’re one in 302.6 million.

Powerball and Mega Millions are played in 45 states plus Washington, D.C., and the U.S. Virgin Islands. Powerball also is offered in Puerto Rico.

2020-3-25 English Reading.

Companies in other, “safer” sectors are also staffing up.

As Americans suddenly find themselves depending more than ever on technology platforms for work and entertainment, listings for temporary tech jobs rose through the end of February into March, according to data from employment marketplace ZipRecruiter.

Tech companies are seeing a surge in demand for their services and their technologies,” says ZipRecruiter labor economist Julia Pollak.They’re seeing kinds of demand that they really didn’t plan for.” Non-tech companies are also beefing up their IT departments as they scramble to move operations online to keep employees home.

Still, these hirings are hardly likely to offset the sobering losses in other areas. And for those without technology expertise, jobs requiring engagement with large numbers of people, some of whom could potentially be infected, may be the only way to survive, even as officials urge people to stay home as much as possible.

Still, these hirings are hardly likely to offset the sobering losses in other areas.
即使如此,他们的招聘 几乎不能抵消 其他领域的严重损失
requiring engagement with large numbers of people需要大量人参与

Even when some degree of normality begins to return, the economic effects of all this will reverberate for years. “Personally I’m expecting a big spike in unemployment, because I think there’s going to be a big drop in spending,” says Richard Rogerson, an economist at Princeton University.

He points out that, even if people find a way to survive the financial fallout from the pandemic, their employers may not. “What you would like is, everyone just goes back to their job,” says Rogerson, about the post-health crisis period. “But what if some of those businesses don’t exist anymore?”

what if  (用于疑问句句首,尤用于询问不希望看到的事发生时的结果)如果…怎么办

For now, there are a variety of efforts afoot to help laid-off workers make ends meet in the short term.

afoot 进行中
make end meet 收支相抵

Massive new relief legislation from Washington may help.

In the meantime, workers are banding together. 

The National Domestic Workers Alliance and UNITE HERE, a union representing hotel, gaming, food service and other employees, are launching relief funds to help the hardest hit, for instance.

hardest hit 重灾区

Other ad-hoc efforts, like donation-based freelancer and creative emergency funds, could also help.

Efforts like these suggest that those who are able are finding ways to help people in need.

“There’s a lot of vulnerable people out there,” says Diaz, the bartender. “It’s going to be up to us normal folks to step in and do what’s right.”

2020-3-21 English Reading.

 

Ford, GM and Fiat Chrysler Are Shutting Down All U.S. Factories to Curb Coronavirus


General Motors Co., Ford Motor Co., and Fiat Chrysler Automobiles NV will temporarily shut down their U.S. plants in an effort to contain the spread of the coronavirus.
in an effort to 为XXX而努力

Ford will halt operations at all North American manufacturing facilities after Thursday evening shifts, according to a statement. GM and Fiat Chrysler also plan to idle their factories, according to people familiar with the matter, who asked not to be identified ahead of official announcements.

familiar熟悉
people familiar with the matter,熟悉此事的人  即知情人士
asked not to be identified要去不能透露姓名
 

The three companies said late Tuesday that they would partially shut down facilities on a rotating basis to protect members of the United Auto Workers union from the spread of Covid-19. But by Wednesday morning, Honda Motor Co. announced its plan to suspend North American production for six days.

partially部分地
shut down facilities on a rotating basis轮流关闭
 
Amazon.com Inc. is prioritizing the stocking and shipping of household staples and medical supplies as it struggles to deal with a surge in demand for online orders from customers avoiding stores during the coronavirus pandemic.
household staples and medical supplies 家用必需品和医疗用品
stocking and shipping 库存和运输
prioritizing优先
 

The online retailer said in a blog post updated on Tuesday morning, that it was making the move “so we can more quickly receive, restock, and ship these products to customers.”

Also on Tuesday, Amazon told third-party sellers on its marketplace that the company wouldn’t accept shipments from sellers in other product categories through at least April 5. Amazon said it was taking a similar approach with the big brands it buys directly from. Business Insider reported the restrictions on other product categories earlier.

”We understand this is a change for our selling partners and appreciate their understanding as we temporarily prioritize these products for customers,” an Amazon spokesman said in an emailed statement. Products already on their way to Amazon warehouses will be accepted, he said.

warehouses仓库

又开始写博客了

时隔一年,记得去年也是这样子,暑假期间开始写博客,后来开学之后加入实验室,就天天在实验室忙,没时间做这些了,突然又到了暑假,一年已经过去了,去年我买的服务器正好到期,于是又买了阿里云的学生版服务器,很实惠很赞,性能也很好,而且正好前几天的数学建模考试考完了,就又打算继续写博客了,今天整理了一会儿,把网站搬了过来~

刚刚整理网站的时候,看到了我很早以前的域名,splashrain.com,才意识到已经好几年过去了,当时注册splashrain这个域名来写的博客,这个域名到期之后觉得不好,于是又换了innsd.cc(去年暑假),重新整理了网站,这样一看,居然已经过去好多年了,但我还是这么菜(雾)。

我挺喜欢innsd.cc这个域名的,但是这个域名在国内没法备案(CC域名不能做实名认证),网站只能暂时用IP来访问咯,哎,不过据说不久就能恢复备案,先等等看了