Wednesday, November 16, 2022

亚马逊创始人亿万富翁杰夫-贝索斯

 亚马逊创始人亿万富翁杰夫-贝索斯告诉家庭不要购买新车和电视,因为美国经济面临衰退,家庭债务飙升至16.5亿美元,美国人利用信贷来维持生计,而亚马逊正在准备 "本周解雇1万名员工


在周一播出的CNN采访中,贝佐斯建议人们在这段时间放慢购买新车、电视和家电等大件商品的速度,同时应该在手头存点钱,以防最终的经济衰退。

贝佐斯说道:“我能告诉你的是,现在的经济看起来并不好。经济正在放缓。你会看到很多行业都在裁员。人们也在减缓消费。预测美国经济到2023年可能会陷入收缩。”

他补充说,他无法预测经济衰退会持续多久,但他说,如果美国还没有陷入经济衰退,那么它可能 "很快 "就会陷入衰退。

这一警告从美国最大的零售商之一的创始人口中说出,显得非同寻常,该公司依靠强劲的消费者支出来推动收入。

在通货膨胀的打击下,消费者已经捉襟见肘,越来越多地使用信贷额度,本周的新数据显示,上季度家庭债务激增至16.51万亿美元,以2008年以来最快的速度增长。

尽管上个月年度通货膨胀率下降到7.7%,是1月以来的最低水平,但许多经济学家认为,以大量失业为标志的急剧衰退可能在明年不可避免。

裁员对那些为了应付杂货、汽油和公用事业价格上涨而耗尽积蓄的家庭来说可能尤其艰难。

商务部的数据显示,在大流行病封锁期间,由于人们被困在家里,个人储蓄余额激增,现在已经暴跌到大流行病之前达到的水平的一半左右。

同样,9月份个人储蓄率降至3.1%,远低于2019年大流行前8.8%的平均值。

这是自贝佐斯上个月发推表示“是时候踩刹车”之后,第二次对经济衰退发出警告。

最近,随着新一轮裁员和削减成本措施在过去几周生效,许多高管都警告称,未来经济将面临艰难时期。《纽约时报》周一报道称,亚马逊计划本周在其技术和企业部门裁员约1万名员工,预计这将是该公司历史上规模最大的一次裁员。

贝佐斯说,很难预测经济低迷何时结束,所以“你必须试着理性地看待它,尽可能地为自己减少风险。抱最好的希望,做最坏的打算”。

Amazon layoff | Sai Chiligireddy

 

Sai Chiligireddy
Today, we had to let go some of the most hardworking and talented individuals, that I have ever worked with, from our team. I haven't fully processed my thoughts as I write this message, but some of them are on work visas and need help before running out of grace period.

If you are looking for great software engineers in US or Canada, please let me know and I can put you in touch with our team members.

#amazon #layoff #help #canada #software #engineers

Amazon Vancouver | Hang Hu | Vancouver, Amazon, Alexa team

Here is the post from Hang Hu.  

It has been almost three years since I joined Amazon. I've been enjoying the time delivering customer focused features and collaborating with my colleagues.


Today, the entire Alexa-hosted skill team is impacted by the layoff and I am given 60 days to find another internal or external position. It's pretty sad to see Alexa-hosted skill is no longer getting invested. I won't forget the time when being blocked by challenges and the happiness when the solution was found, the excitement when we launched new features, and the time working with my colleagues. I learned a lot from my brilliant and passionate colleagues, I feel grateful to work with them.

I also want to thank my manager Sai Chiligireddy, Ilia Pak, Umur Kontacı, Veer Yuganter Singh, Harry Harim Park, Beichen Zhang and other colleagues, friends for your efforts to try to find a position for me. The layoff is cold, but the recognition and the help from you make me feel so warm and supported.

Moving forward, I am looking for both Amazon internal and external SDE opportunities. I am #opentowork for positions in Canada or in the US that accepts remote from Canada. I don't need visa sponsor to work in Canada. I am proficient in Java, and familiar with AWS architectural design and development, Spring framework, Javascript, React. Here follows some of the features I launched.

Code import: https://lnkd.in/gKwPC2DN

Song request: https://lnkd.in/gkPxz3D7

#amazon #layoff #help #canada #software #engineers

WordPress database | 12 tables

12 tables inside the database

  1. wp_termmeta
  2. wp_users
  3. wp_usermeta
  4. wp_terms
  5. wp_term_taxonomy
  6. wp_term_relationships
  7. wp_posts
  8. wp_users
  9. wp_comments
  10. wp_commentmeta
  11. wp_links
  12. wp_postmeta

From version 4.4.2 onwards, WordPress has 12 tables inside the database. These tables are used to perform various default functionalities of WordPress. However, this number can vary depending upon the number of themes and plugins installed in your WordPress.

Each plugin and theme create its own tables and it won’t be wrong to say that more the plugins you install the more tables you will have in your database. Let’s see the WordPress Database Diagram, so we can have a basic understanding of how a database works in WordPress.

Let’s take a look at what each database table stores:

  1. wp_users: Whenever you create a user is stored in this table along with its details and status.
  2. wp_usermeta: Stores meta information of users.
  3. wp_posts: Custom post types, pages data, and post data are stored in this table.
  4. wp_postmeta: Post meta information store here.
  5. wp_comments: This table stores comments placed on your site.
  6. wp_commentmeta: Meta information for comments stored here.
  7. wp_terms: Tags and categories for both posts and links are stored here.
  8. wp_termmeta: Meta information for terms stored here.
  9. wp_term_relationships: This stores the relationship between the members of wp_terms.
  10. wp_term_texonomy: Description of a category, link, or tag used in a wp_term table stored here.
  11. wp_links: This stores blogroll links that are depreciated but can be activated using Link Manager.
  12. wp_options: Options set in admin are stored here.

WP-Optimize | WordPress plugin | How to optimize WordPress database

WP-Optimize is another WordPress plugin used for database optimization. It cleans up the WordPress database effectively and automatically. You can install and activate this plugin from your WordPress dashboard.

It also has a list of options for removing unwanted revisions, comments, posts data, and transient options. Make your selection and click on the “Run all selected optimizations” button to initialize the process.

Summary

I discussed WordPress database optimization in detail and why it is important to run these cleanups every now and then. You have also learned two different methods of optimizing databases on WordPress. If you find this article useful or would like to add something, please share your feedback in the comments section below.

Frequently Asked Questions

Q: How Do I Optimize my WordPress Database?

You can optimize your WordPress database by accessing phpMyAdmin via your hosting provider. You will be required to log in to the cPanel, but if your hosting provider does not use a cPanel, look for the alternative MySQL management tool. You may then optimize your database from there. Also, you can use a WordPress database plugin to optimize your database easily.

Q: Is WordPress Good for Database?

Yes, WordPress is good for a database and uses MySQL as its database management system. MySQL is an open-source software used for creating a database and retrieving data when required.

Q: How Does WordPress Store Database Data?

WordPress stores database data in the form of tables. All the unique data is presented in rows in each table. WordPress automatically creates the tables by default as soon as you set up your website.

Q: How Do I Use WordPress to Create a Database?

You can use WordPress to create a database using Plesk, cPanel, phpMyAdmin, or MySQL client.

If you are a Cloudways user, you can create a database via phpMyAdmin by following the steps below:

  • Access phpMyAdmin from Application Management.
  • You will see the database management window.
  • Click Create Table.
  • Now set your preferences by either using the SQL commands or via the UI option.

Amazon | Alexa | Vancouver layoff

Here is the link.

Amazon is reportedly laying off thousands of people starting this week, and its Canadian teams are not exempt.

The New York Times was first to report earlier this week on the retail giant’s downsizing, noting Amazon plans to cut 10,000 jobs In recent days, LinkedIn posts from stated Amazon employees have indicated that the layoffs have begun.

According to some LinkedIn posts, Canadians have been part of the cuts. The posts indicate that those affected include developers for Alexa, Amazon’s voice-controlled assistant device.

The Verge reported today that senior vice president Dave Limp sent an email to employees on Wednesday confirming the layoffs. In

Per Amazon’s LinkedIn page, it has about 19,800 employees based in Canada. The exact number of Canadian employees impacted by the layoffs at Amazon is unclear.

Amazon did not immediately respond to BetaKit for comment.

The New York Times noted that the 10,000 employee number will likely remain fluid, according to sources familiar with the matter. The cuts would amount to three percent of Amazon’s corporate staff and less than one percent of its global workforce.

Burnaby-based software development engineer Hang Hu wrote on LinkedIn that the entire Alexa-hosted skill team was impacted by the cuts at Amazon.

As reported by The New York Times, the downsizing will focus on Amazon’s devices organization. In addition to Alexa, impacted teams are reported to comprise Amazon’s retail and human resources divisions, among others.

The layoffs at Amazon follows its previous commitment to Canada last year of hiring 1,800 tech and corporate roles by the end of 2021. At that time, it confirmed it had about 25,000 Canadian employees across its fulfillment centres, corporate offices, development centres, and other facilities. Amazon has locations in British Columbia, Ontario, Alberta, Manitoba, and Québec.

RELATED: Amazon to add 1,800 Canadian tech, corporate jobs this year as part of broader hiring plans

Amazon’s stock price has declined by almost 43 percent year to date, trading at $97.77 USD on Nasdaq at the time of publication. This time last year it was trading at $177.04 USD. The change represents a 45 percent dip.

The US retail giant is the latest major tech company to implement mass staff cuts as they go into survival mode amid the macroeconomic downturn.

Last week, Meta’s broad reductions across its organization also affected Canadian employees as part of the 11,000 people laid off last week. And the week prior, Twitter’s job cuts hit its Canadian offices, which saw top levels of its team let go. This includes managing director Paul Burns, director of public policy for Canada Michele Austine, and Twitter Canada communications lead Cam Gordon.

Google | Layoff analysis

Even today, Google has no problem making plenty of money. But the fact that it is getting a little harder is still painful.

The internet giant’s parent company, Alphabet Inc., GOOG 0.68%increase; green up pointing triangle

 generated operating income of $78.6 billion for the trailing 12-month period ended September—the third-highest among S&P 500 companies over that span, according to S&P Global Market Intelligence. But margins have taken a hit as a big jump in costs has run headlong into a broad-based slowdown in online advertising. The operating margin for the third quarter came in at 24.8%—a drop of nearly 8 percentage points from a year earlier, as the company added 12,765 workers to its rolls in the most recent period.  

The big jump in head count and costs stunned even analysts who had been bracing for the ad slowdown; Alphabet shed 20% of its market value in the week following its release of third-quarter results on Oct. 25. The number of new hires was a record for a company that hardly pays peanuts. Alphabet’s median employee pay for 2021 totaled $295,884—the highest in the S&P 500, according to a tabulation by The Wall Street Journal. It is also more than twice the median income for the metropolitan statistical area that is home to the company’s Silicon Valley headquarters. 

Chief Executive Sundar Pichai said on last month’s earnings call that head-count growth “will be significantly lower” in the current quarter. That still hasn’t satisfied those who think the company is spending too lavishly for an advertising business potentially facing even further slowdowns if a global recession hits. Activist investor TCI Fund Management released a letter Tuesday calling on Google to join fellow tech companies Amazon and Facebook parent Meta Platforms in cutting both its head count and employee-compensation levels. A reduction on the scale of Meta’s 13% cut announced last week would cost about 24,000 Googlers their jobs. 

How to Install and Configure Redis on WordPress (Boost Your Site’s Performance)

How to Set Up a Redis Server And Use With PHP

Install Redis on Xampp - Windows - Gist de GitHub

What is the best alternative for MySQL Query Cache?

Here is the article. 

The alternative to query cache is to write code to cache data yourself, in the application. You decide which query results need to be cached, for how long, and in what format.

  • Many queries are against constantly-changing data, and your application requires viewing the current data.

  • Other queries are tolerant of viewing data that is not strictly current, so it's fine to use the cached copy for a few minutes, even though the underlying data has been updated.

  • Caching the data in the form of a result set isn't the only option. I have an application where I format results from several queries into one string which is a fragment of HTML, that store that string in the cache. It avoids having to re-format that part of the HTML every time someone views the page.

You can also use a shared cache like Redis or Memcached so if your app is deployed as multiple appserver instances, they can all share the same cache.

This is more work for you as a developer. There's no automatic solution for a server like MySQL to know which queries deserve to be cached.

Optimizing is often more work than simple, non-optimal solutions.

8.10.3 The MySQL Query Cache

Here is the article. 

 The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. If an identical statement is received later, the server retrieves the results from the query cache rather than parsing and executing the statement again. The query cache is shared among sessions, so a result set generated by one client can be sent in response to the same query issued by another client.

The query cache can be useful in an environment where you have tables that do not change very often and for which the server receives many identical queries. This is a typical situation for many Web servers that generate many dynamic pages based on database content.

The query cache does not return stale data. When tables are modified, any relevant entries in the query cache are flushed.

Tuesday, November 15, 2022

MySQL - max_queries_per_hour

 


Fatal error: Uncaught mysqli_sql_exception: User '' has exceeded the 'max_queries_per_hour' resource (current value: 600) in C:\xampp\htdocs\testsite\exercises\FixtureToChip\private\classes\Fixture.class.php:13 Stack trace: #0 C:\xampp\htdocs\testsite\exercises\FixtureToChip\private\classes\Fixture.class.php(13): mysqli->query('SELECT id FROM ...') #1 C:\xampp\htdocs\testsite\exercises\FixtureToChip\private\classes\Fixture.class.php(57): Fixture::find_by_sql('SELECT id FROM ...') #2 C:\xampp\htdocs\testsite\exercises\FixtureToChip\public\indexLearning.php(42): Fixture::find_by_name('L227W-S') #3 {main} thrown in C:\xampp\htdocs\testsite\exercises\FixtureToChip\private\classes\Fixture.class.php on line 13

https://dev.mysql.com/doc/refman/8.0/en/user-resources.html

mysql> ALTER USER 'francis'@'localhost' WITH MAX_QUERIES_PER_HOUR 100;