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

Comic for March 07, 2022

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

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

Dilbert Daily Strip

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

Laravel Query Log

https://opengraph.githubassets.com/10ff2c561ee9af0da28dbb031cb9b5ad5e961f52b7032cbb54b0d6e3c8ed6c9f/haruncpi/laravel-query-log

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.

Laravel News Links

Multitenant Laravel Notifications

https://s0.wp.com/i/blank.jpg

Laravel Notifications are an awesome tool that provides built-in support for sending notifications, in dozens of different channels, like Slack, Telegram, SMS, etc.

In this tutorial, we will see how we can customise Laravel Notifications core to accommodate a multi-tenant setup in a single database.

Note: This tutorial is using Laravel 9.x but should be working for older Laravel versions as well.

Step 1: The Notifications Table

The first thing we need to do is publish the default notifications table using

php artisan notifications:table

You should now have a new migration file under database/migrations which should look like this

<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
    
    public function up()
    {
        Schema::create('notifications', function (Blueprint $table) {
            $table->uuid('id')->primary();
            $table->string('type');
            $table->morphs('notifiable');
            $table->text('data');
            $table->timestamp('read_at')->nullable();
            $table->timestamps();
        });
    }
};

Ideally, we would like to have a foreign key to the tenant model.

Schema::create('notifications', function (Blueprint $table) {
     $table->uuid('id')->primary();
     $table->string('type');
     $table->morphs('notifiable');
     $table->text('data');
     $table->timestamp('read_at')->nullable();
     $table->timestamps();

     $table->foreignId('tenant_id')->constrained(); // <- Add this
});

If tenants are supposed to be receiving notifications you might want to make the tenant_id column nullable.

Step 2: Override Laravel’s Database Channel

The next step would be to find a way to fill in that column whenever a notification is being stored in the database. For that, we need to extend the default DatabaseChannel class and replace our version in the Laravel Container.

What we need is a new class called DatabaseChannel which extends Illuminate\Notifications\Channels\DatabaseChannel.

<?php

namespace App\Notifications\Channels;

use Illuminate\Notifications\Notification;

class DatabaseChannel extends \Illuminate\Notifications\Channels\DatabaseChannel
{
    public function buildPayload($notifiable, Notification $notification)
    {
        return [
            'id' => $notification->id,
            'type' => get_class($notification),
            'data' => $this->getData($notifiable, $notification),
            'read_at' => null,
            'tenant_id' => $notification->tenant_id,
        ];
    }
}

Step 3: Create a tenant-aware Notification

Now, whenever we create a new notification we need to inject the tenant_id property so that we can insert it into the database.

<?php

namespace App\Notifications;

use Illuminate\Notifications\Notification;

class BaseNotification extends Notification
{
    public $tenant_id;

    public function __construct($tenant_id)
    {
        $this->tenant_id = $tenant_id;
    }

    public function via()
    {
        return ['database'];
    }

    public function toDatabase($notifiable)
    {
        return [
             // your payload
        ];
    }
}

Step 4: Use our implementation of the DatabaseChannel

Finally, we need to switch Laravel’s implementation of the DatabaseChannel with ours. To do that we just need to set this up inside the boot method of the AppServiceProvider.

<?php

namespace App\Providers;

use App\Notifications\Channels\DatabaseChannel;
use \Illuminate\Notifications\Channels\DatabaseChannel as BaseDatabaseChannel;

class AppServiceProvider extends ServiceProvider
{
    public function boot()
    {
        $this->app->instance(BaseDatabaseChannel::class, new DatabaseChannel());
    }
}

Ready!

And that’s it!

You now have multi-tenant notifications set up in your Laravel project!

Laravel News Links

This is the way

 

Every Red state needs to do this.

Systematically go through and weed out every department and degree program that is just accredited Leftist indoctrination.

Fire the professors.

Spend the money on vocational education.

Gun Free Zone