Comic for March 07, 2022

https://assets.amuniversal.com/4db8fdf078a3013a9a6f005056a9545d

Oops! We could not find a Dilbert strip for that date.

Dilbert Daily Strip

How to Stop Your iPhone Camera From Recognizing Text Everywhere

https://i.kinja-img.com/gawker-media/image/upload/c_fill,f_auto,fl_progressive,g_center,h_675,pg_1,q_80,w_1200/460aa26097c46a15db4eb0c00a5513d1.jpg

Back when it was first released, we called Live Text the best new feature in iOS 15, and it’s not hard to see why—the tool can recognize any text in any photo (or within the camera view) so you can copy and share it. But the more we use it, the more annoying we find it can be. When you’re in the camera view, for example, and you point your camera toward something that you want to capture, you tap the subject to focus, and instead, your iPhone selects some text. Similarly, when you’re browsing your photo library, you may try to zoom into a picture, and instead, you get a pop-up asking if you’d like to navigate to an address instead.

If you’re similarly annoyed, you can disable the Live Text feature in the camera view, in the Photos app, and everywhere on the Mac, as well.

How to disable Live Text in Camera view on iPhone and iPad

Let’s deal with the most annoying part first. If Live Text gets in the way of your photography, you can disable it only for the Camera app. Go to Settings > Camera and disable the “Show Detected Text” feature.

How to disable Live Text everywhere on iPhone and iPad

If you want to disable the text recognition feature across the board, there’s a separate setting. This option will disable the feature in the Photos app, and in places like Safari, or the screenshot editor (where you can use Live Text on any image). To do this, go to Settings > General > Language & Region and disable the “Live Text” feature.

Once you disable the Live Text feature from here, it’s disabled everywhere, including the Camera app.

How to disable Live Text everywhere on Mac

macOS Monterey brought Live Text to the Mac, helping you simply select and copy text from any image. But if you’re not a fan, you can disable it across the entire OS: Click the Apple icon from the top menu bar, go to “System Preferences” > Language & Region > General, and from the “Live Text” section, disable the “Select Text in Images” feature.

If you change your mind, you can always go back to System Preferences to enable the feature.

   

Lifehacker

(Almost) Perfect: ORCA Walker Tote Ultralight Soft Cooler Review

https://s3.amazonaws.com/images.gearjunkie.com/uploads/2022/02/ORCA-Walker-Tote-cooler.jpg

Ideal for that quick, spur-of-the-moment day trip or tailgating party, the ORCA Walker Tote is an ultralight soft-sided cooler that offers great durability and ice retention.

These days there is a glut of coolers on the market. It can be hard to tell the difference between various kinds and what makes them worth the price tag. The ORCA Walker Tote is an ultralight option, weighing 3.6 pounds dry, that is versatile, holds 18 cans, and is very easy to use for a variety of trips from camping to backyard barbecues.

So, out of all the coolers, why this one?

In short: ORCA’s big brother, the Walker 20 Cooler, made GearJunkie’s Best Soft Coolers list, so we were intrigued to see a new Walker cooler hitting the shelves. This is a slightly smaller version, for those looking for the same level of cold storage in a more compact form. And aside from boasting a tote style, this Walker has an updated, slimmer design and new volume.

ORCA Walker Tote Cooler Review: First Impressions

ORCA Walker Tote cooler
(Photo/David Young)

While touted as a soft-sided cooler, the ORCA is very stout and well built. From top to bottom, the cooler is crafted with durability in mind. The zipper is a Master Seal #10 waterproof zipper, ensuring the ORCA is leakproof and will keep contents cold for 24 hours and beyond.

The sides are heavily insulated, and the underside has tough, rubberized padded skin for added protection when you set the cooler down on sand and rocks. The bottom line, it is ready to rock right out of the box.

Opening and carrying the ORCA Walker Tote cooler is a breeze with the easy-open magnetic split handle. Rather than clasping together, the two-sided handles interlock and hold in place easily with strong magnets.

It’s an intuitive and simple mechanism to carry the cooler. The opposing magnets also stay open when unzipping the cooler, making access to the interior a breeze.

Compared to the Walker 20, the Walker Tote is a bit smaller: ½-inch shorter in length, 2 inches shorter in height, and 1½-inch shorter in width. They share similar designs, materials, and features.

ORCA Walker Tote Specs

  • Length: 15 in.
  • Width: 9.5 in.
  • Height: 15.25 in.
  • Dry weight: 3.6 lbs.
  • Max load: 50 lbs.
  • Claimed hours iced/cold: 12-24 hrs.
  • Ice retention test: ~28 hrs. iced

ORCA Walker Tote Ultralight Cooler

Cooler Test While Chilling Poolside

With a trip set for Arizona, I loaded up the cooler with some beer — 16 cans, to be exact — and set out on the road. The just over foot-high cooler fit snugly in the trunk of my car as I headed to the desert.

The cooler started about a quarter full of ice, and I let it sit in the trunk for the 2-day drive in some 70-degree weather. When I arrived, I opened the cooler to find most of the ice melted, but the drinks were still cold.

I restocked the ice and brews and tested out the ORCA poolside. And here is where it excels. This is what the ORCA Walker Tote is made for: a grab-and-go poolside session. The exterior side pocket held a paperback book and my sunglasses, while the cooler transported the canned brews with ease. (There’s an interior waterproof pocket as well.)

The detachable padded shoulder strap made it simple to carry the cooler to and from the pool, and the tote fits nicely by a chair or table without getting in the way. It really is an ideal size for a day out.

Carrying - ORCA Walker Tote Ultralight Soft Sided Cooler
(Photo/David Young)

A Known Issue

Overall, I was impressed by the ORCA Walker Tote. However, during my trip, the metal clasp holding the shoulder harness to the Tote broke, rendering the shoulder carry option useless. For the price of the cooler and the “durability” tag, I was disappointed to see this during the use of a normal road trip.

ORCA stated that this is an issue they are aware of and that clasps have broken from time to time. ORCA has a 3-year warranty that includes manufacturer defects such as a break like this. It’s worth noting that ORCA does expect to have the issue fixed in updated versions of both the Walker Tote and Walker 20 slated for fall 2022. (We’ll keep you updated.)

The other drawback is that the mouth of the cooler has difficulty staying open and, as a result, can be hard to fill with ice. Aside from this, the cooler performed well.

Conclusion

The Walker Tote’s body is strong, it keeps its contents cold, it’s easy to transport, and it looks good. (You may even get some jealous glances of cooler envy!) If it were not for the broken shoulder strap clasp and small guarded entry, it’d be the ideal tote for nearly any road trip or waterfront adventure.

Overall, this is a durable light cooler that looks good and offers great ice retention for a day trip. It’s compact, capable, and tough — throw it in the back of your vehicle, and beverages or food will be good to go when you hit the beach or pool.

Check Price at ORCA CoolersCheck Price at AmazonCheck Price at Walmart

couple setting up camp with electric cooler
The Best Electric Coolers of 2022

We tested the best electric coolers of 2022 with options for every budget and need. Top picks include Dometic, ARB, Engel, and more! Read more…

The post (Almost) Perfect: ORCA Walker Tote Ultralight Soft Cooler Review appeared first on GearJunkie.

GearJunkie

Make pivot tables using the new Laravel 9 migration closures

https://opengraph.githubassets.com/e6160907e12387e0dfc32f03979df89b1707fa8fb48f4fc8f4ebc613d2e29ed8/josezenem/laravel-make-migration-pivot

Make Laravel Pivot Tables using the new Laravel 9 closure migration format

Latest Version on Packagist
GitHub Code Style Action Status
Total Downloads

This will allow you to create pivot table migration files using the new Laravel 9 closure migration format by simply passing two models. Under the hood the system will inspect the two models to generate the pivot table and foreign key names.

php artisan make:pivot Category Blog

Will generate the following migration

return new class extends Migration {
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('blog_category', function (Blueprint $table) {
            $table->foreignIdFor(Blog::class)->constrained()->onDelete('cascade');
            $table->foreignIdFor(Category::class)->constrained()->onDelete('cascade');
            $table->primary(['blog_id', 'category_id']);

            $table->index('blog_id');
            $table->index('category_id');
        });
    }

Installation

You can install the package via composer:

composer require josezenem/laravel-make-migration-pivot

Usage

php artisan make:pivot Category Blog

Optionally, you can publish the stubs using

php artisan vendor:publish --tag="laravel-make-migration-pivot-stubs"

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel News Links

Comic for March 02, 2022

https://assets.amuniversal.com/22e032c0730b013a9919005056a9545d

Thank you for voting.

Hmm. Something went wrong. We will take a look as soon as we can.

Dilbert Daily Strip

Backup/Restore Performance Conclusion: mysqldump vs MySQL Shell Utilities vs mydumper vs mysqlpump vs XtraBackup

https://www.percona.com/blog/wp-content/uploads/2022/02/MySQL-Restore-Backup-Comparison.pngMySQL Restore Backup Comparison

MySQL Restore Backup ComparisonA little bit ago, I released a blog post comparing the backup performance of different MySQL tools such as mysqldump, the MySQL Shell feature called Instance Dump, mysqlpump, mydumper, and Percona XtraBackup. You can find the first analysis here:

Backup Performance Comparison: mysqldump vs. MySQL Shell Utilities vs. mydumper vs. mysqlpump vs. XtraBackup

However, we know the backups are just the first part of the story. What about the restore time? And which tool performs better for the complete operation (backup+restore)?

Let’s see the results and the conclusion in the following sections.

Benchmark Results

I ran the benchmark on an m5dn.8xlarge instance, with 128GB RAM, 32 vCPU, and two io1 disks of 600GB (one for backup and the other one for MySQL data) with 5000 provisioned IOPS. The MySQL version was 8.0.26 and configured with 89Gb of the buffer pool, 20Gb of redo log, and a sample database of 96 GB (more details below).

When we sum the backup time and the restore time, we can observe the results in the chart below:

MySQL Backup and Restore

And if we analyze the chart without mysqldump to have a better idea of how the other tools performed:


The backup size created by each tool:

MySQL Backup Size

Note that the backup size of XtraBackup (without compression) is the size of the datadir without the binary logs. Next, we can see the backup time:

Time to execute MySQL backup

And the restore time:

Time to restore MySQL

Analyzing The Results

When we sum backup and restore times, we observe that the fastest tool is Percona XtraBackup. The main point of XtraBackup is not even the speed but its capacity to perform PITR backups. Also, the tool supports compression and encryption.

We can also observe that mydumper/myloader and MySQL Shell utilities produce good results in both phases. The difference from Xtrabackup is that both tools perform logical backups, which means that these tools connect to MySQL and extract the data to dump files. Because they have to extract data from MySQL, these tools are more sensitive for the MySQL configuration and backup/restore parametrization. For example, MyDumper/MyLoader has some extra options that can improve the backup and restore performance, such as --rows, --chunk-filesize, and --innodb-optimize-keys.

Note that  XtraBackup, MyDumper, and mysqldump support stream restore, reducing overall timing to perform the backup and restore operation. 

The tool that has the most inconsistent behavior is mysqlpump where the tool can make speedy backups, but the restore performance is terrible since it is single-threaded the same way as mysqldump. 

Based on the tests, we can observe that compression, TLS, socket, or TCP/IP do not significantly impact the time needed to perform the whole operation. Because there is no significant impact, tools that can perform compression and use TLS like MySQL Shell, mydumper/myloader, and XtraBackup have a good advantage since their backups are safer and use less disk space (less disk space = fewer costs). The trade-off between the features of these tools and the time spent to backup and restore the database is something that all DBAs should evaluate.

And to answer some questions/comments about this topic:

The difference you see between MySQL Shell and mydumper can be explained by the use of SSL in one and clear transfer in the other. Encryption has a cost, unfortunately. 

A: Indeed, SSL has a cost. However, when we put the security benefits of the SSL and consider the whole process, it is a small cost (in the same way as compression).

Does XtraBackup support ZSTD? 

A: At this moment, no. However, there is a feature request for this (you can follow the JIRA ticket to receive updates about it):

https://jira.percona.com/browse/PXB-2669

Is there any difference substituting mysqldump | gzip with a different compression tool?

A: The difference is neglectable piping with gzip or sending the uncompressed dump to the disk. The mysqldump tool is the most inefficient option due to its single-thread nature, severely impacting performance. Because of its single-thread nature, the tool cannot extract maximum performance from hardware resources (in particular I/O).

How is the performance impact on MySQL when running the backups?

A: Unfortunately, I did not measure this. Based on my experience, there is a dedicated replica server for backup most of the time. If the MySQL community is interested in this test, I can write another post about this (leave in the comments your opinion). 

It is possible to squeeze more juice from MySQL in the restore phase. We can take some actions like disabling the binary log and making asynchronous writes. You can check the advice (pros and cons) in these two blog posts:

https://www.percona.com/blog/2020/05/14/tuning-mysql-innodb-flushing-for-a-write-intensive-workload/

https://www.percona.com/blog/2014/05/23/improve-innodb-performance-write-bound-loads/

To conclude, this blog post is intended to give an overall idea of how these tools perform. I tried to stick with the default options of each tool (except the number of threads) to keep the test as fair as possible. Also, time is not the only thing that companies consider to adopt a backup method (security, encryption, and data protection are very important). In my daily tasks, I use mydumper/myloader and XtraBackup because I’m more familiar with the commands, and I have used them for a long time. However, I would advise keeping an eye on the MySQL Shell utilities since it is becoming a fascinating tool to perform many tasks (backup and restore have excellent results).

Hardware and Software Specs

These are the specs of the benchmark:

  • 32 CPUs
  • 128GB Memory
  • 2x io1 disks 600 GB with 5000 IOPS each
  • Centos 7.9
  • MySQL 8.0.26
  • MySQL shell 8.0.26
  • mydumper 0.11.5 – gzip
  • mydumper 0.11.5 – zstd
  • Xtrabackup 8.0.26

Useful Resources

Finally, you can reach us through the social networks, our forum, or access our material using the links presented below:

Planet MySQL