问:
Serialization of 'Illuminate\Http\UploadedFile' is not allowed
in the request payload if i pass files and having Laravel Validation for file type, it shows error Serialization of 'Illuminate\Http\UploadedFile' is not allowed always even validation error is different, suppose having validation like below

```<code>public function rules(): array
    {
        return [
            'request_id' => ['required', 'integer', 'exists:client_requests,id'],
            'client_name' => ['required'],
            'discussion_date_time' => ['sometimes', 'date_format:d/m/Y h:i A'],
            'additional_comments' => ['required'],
            'images'       => ['sometimes'],
            'images.*'     => ['sometimes', 'mimetypes:image/jpeg,image/png,image/heic', 'max:200000'],
        ];
    }
</code>```

If there is an error of lets say "client_name", it will not show like "Client name field is required", it will show 500 with "Serialization of 'Illuminate\Http\UploadedFile' is not allowed"

Below is the stacktrace

```<code>[2022-12-26 06:53:47] local.ERROR: Serialization of 'Illuminate\Http\UploadedFile' is not allowed {"userId":528,"exception":"[object] (Exception(code: 0): Serialization of 'Illuminate\\Http\\UploadedFile' is not allowed at /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Queue/Queue.php:158)
[stacktrace]
#0 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Queue/Queue.php(158): serialize()
#1 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Queue/Queue.php(127): Illuminate\\Queue\\Queue->createObjectPayload()
#2 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Queue/Queue.php(105): Illuminate\\Queue\\Queue->createPayloadArray()
#3 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Queue/DatabaseQueue.php(126): Illuminate\\Queue\\Queue->createPayload()
#4 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Queue/Queue.php(71): Illuminate\\Queue\\DatabaseQueue->later()
#5 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(573): Illuminate\\Queue\\Queue->laterOn()
#6 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(498): Illuminate\\Events\\Dispatcher->queueHandler()
#7 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(424): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}()
#8 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(249): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}()
#9 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(450): Illuminate\\Events\\Dispatcher->dispatch()
#10 /var/www/html/projects/api/app/Http/Controllers/CustomExceptions.php(68): event()
#11 /var/www/html/projects/api/app/Exceptions/Handler.php(261): App\\Http\\Controllers\\CustomExceptions::sendEmail()
#12 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(337): App\\Exceptions\\Handler->App\\Exceptions\\{closure}()
#13 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(51): Illuminate\\Foundation\\Exceptions\\Handler->render()
#14 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Routing\\Pipeline->handleException()
#15 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#16 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle()
#17 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(127): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#18 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(103): Illuminate\\Routing\\Middleware\\ThrottleRequests->handleRequest()
#19 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(55): Illuminate\\Routing\\Middleware\\ThrottleRequests->handleRequestUsingNamedLimiter()
#20 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Routing\\Middleware\\ThrottleRequests->handle()
#21 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(44): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#22 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Auth\\Middleware\\Authenticate->handle()
#23 /var/www/html/projects/api/vendor/laravel/sanctum/src/Http/Middleware/EnsureFrontendRequestsAreStateful.php(33): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#24 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Laravel\\Sanctum\\Http\\Middleware\\EnsureFrontendRequestsAreStateful->Laravel\\Sanctum\\Http\\Middleware\\{closure}()
#25 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#26 /var/www/html/projects/api/vendor/laravel/sanctum/src/Http/Middleware/EnsureFrontendRequestsAreStateful.php(34): Illuminate\\Pipeline\\Pipeline->then()
#27 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Laravel\\Sanctum\\Http\\Middleware\\EnsureFrontendRequestsAreStateful->handle()
#28 /var/www/html/projects/api/app/Http/Middleware/PlatformCheck.php(48): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#29 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Http\\Middleware\\PlatformCheck->handle()
#30 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#31 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(697): Illuminate\\Pipeline\\Pipeline->then()
#32 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(672): Illuminate\\Routing\\Router->runRouteWithinStack()
#33 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(636): Illuminate\\Routing\\Router->runRoute()
#34 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(625): Illuminate\\Routing\\Router->dispatchToRoute()
#35 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(166): Illuminate\\Routing\\Router->dispatch()
#36 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}()
#37 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#38 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle()
#39 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#40 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest()
#41 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Session\\Middleware\\StartSession->handle()
#42 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#43 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#44 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle()
#45 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#46 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#47 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle()
#48 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#49 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle()
#50 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#51 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle()
#52 /var/www/html/projects/api/vendor/fruitcake/laravel-cors/src/HandleCors.php(52): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#53 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\\Cors\\HandleCors->handle()
#54 /var/www/html/projects/api/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#55 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\\Proxy\\TrustProxies->handle()
#56 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#57 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(141): Illuminate\\Pipeline\\Pipeline->then()
#58 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
#59 /var/www/html/projects/api/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle()
#60 /var/www/html/projects/api/server.php(18): require_once('/var/www/html/p...')
#61 {main}
"}
</code>```

Body:
in the request payload if i pass files and having Laravel Validation for file type, it shows error Serialization of 'Illuminate\Http\UploadedFile' is not allowed always even validation error is different, suppose having validation like below

public function rules(): array
    {
        return [
            'request_id' => ['required', 'integer', 'exists:client_requests,id'],
            'client_name' => ['required'],
            'discussion_date_time' => ['sometimes', 'date_format:d/m/Y h:i A'],
            'additional_comments' => ['required'],
            'images'       => ['sometimes'],
            'images.*'     => ['sometimes', 'mimetypes:image/jpeg,image/png,image/heic', 'max:200000'],
        ];
    }

If there is an error of lets say "client_name", it will not show like "Client name field is required", it will show 500 with "Serialization of 'Illuminate\Http\UploadedFile' is not allowed"

Below is the stacktrace

[2022-12-26 06:53:47] local.ERROR: Serialization of 'Illuminate\Http\UploadedFile' is not allowed {"userId":528,"exception":"[object] (Exception(code: 0): Serialization of 'Illuminate\\Http\\UploadedFile' is not allowed at /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Queue/Queue.php:158)
[stacktrace]
#0 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Queue/Queue.php(158): serialize()
#1 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Queue/Queue.php(127): Illuminate\\Queue\\Queue->createObjectPayload()
#2 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Queue/Queue.php(105): Illuminate\\Queue\\Queue->createPayloadArray()
#3 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Queue/DatabaseQueue.php(126): Illuminate\\Queue\\Queue->createPayload()
#4 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Queue/Queue.php(71): Illuminate\\Queue\\DatabaseQueue->later()
#5 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(573): Illuminate\\Queue\\Queue->laterOn()
#6 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(498): Illuminate\\Events\\Dispatcher->queueHandler()
#7 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(424): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}()
#8 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(249): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}()
#9 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(450): Illuminate\\Events\\Dispatcher->dispatch()
#10 /var/www/html/projects/api/app/Http/Controllers/CustomExceptions.php(68): event()
#11 /var/www/html/projects/api/app/Exceptions/Handler.php(261): App\\Http\\Controllers\\CustomExceptions::sendEmail()
#12 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(337): App\\Exceptions\\Handler->App\\Exceptions\\{closure}()
#13 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(51): Illuminate\\Foundation\\Exceptions\\Handler->render()
#14 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Routing\\Pipeline->handleException()
#15 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#16 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle()
#17 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(127): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#18 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(103): Illuminate\\Routing\\Middleware\\ThrottleRequests->handleRequest()
#19 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(55): Illuminate\\Routing\\Middleware\\ThrottleRequests->handleRequestUsingNamedLimiter()
#20 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Routing\\Middleware\\ThrottleRequests->handle()
#21 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(44): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#22 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Auth\\Middleware\\Authenticate->handle()
#23 /var/www/html/projects/api/vendor/laravel/sanctum/src/Http/Middleware/EnsureFrontendRequestsAreStateful.php(33): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#24 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Laravel\\Sanctum\\Http\\Middleware\\EnsureFrontendRequestsAreStateful->Laravel\\Sanctum\\Http\\Middleware\\{closure}()
#25 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#26 /var/www/html/projects/api/vendor/laravel/sanctum/src/Http/Middleware/EnsureFrontendRequestsAreStateful.php(34): Illuminate\\Pipeline\\Pipeline->then()
#27 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Laravel\\Sanctum\\Http\\Middleware\\EnsureFrontendRequestsAreStateful->handle()
#28 /var/www/html/projects/api/app/Http/Middleware/PlatformCheck.php(48): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#29 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Http\\Middleware\\PlatformCheck->handle()
#30 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#31 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(697): Illuminate\\Pipeline\\Pipeline->then()
#32 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(672): Illuminate\\Routing\\Router->runRouteWithinStack()
#33 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(636): Illuminate\\Routing\\Router->runRoute()
#34 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(625): Illuminate\\Routing\\Router->dispatchToRoute()
#35 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(166): Illuminate\\Routing\\Router->dispatch()
#36 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}()
#37 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#38 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle()
#39 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#40 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest()
#41 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Session\\Middleware\\StartSession->handle()
#42 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#43 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#44 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle()
#45 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#46 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#47 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle()
#48 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#49 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle()
#50 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#51 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle()
#52 /var/www/html/projects/api/vendor/fruitcake/laravel-cors/src/HandleCors.php(52): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#53 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\\Cors\\HandleCors->handle()
#54 /var/www/html/projects/api/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#55 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\\Proxy\\TrustProxies->handle()
#56 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#57 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(141): Illuminate\\Pipeline\\Pipeline->then()
#58 /var/www/html/projects/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
#59 /var/www/html/projects/api/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle()
#60 /var/www/html/projects/api/server.php(18): require_once('/var/www/html/p...')
#61 {main}
"}


来源: stackexchange

问:
How to identify monitors by EDID?
My company has so many monitors and HDMI repeaters. So, I want to distinguish and identify those display devices so that a Linux host can detect which monitor/repeater is connected.

Although a Linux host can get EDID from /sys/class/drm/*/edid, I'm not sure how to identify monitors/repeaters.

As long as an EDID data has not been overridden, is it constant forever ?

If so, all I have to do is to collect every EDID binary files (or hashed signatures derived from EDID binaries). If such EDID specification or standard exits, can you tell me ?

I worry that some monitors may change its EDID content when some mode(ex. resolution, rotation) are changed. Transient identifier is useless.

Can I derive an unique identifier data from an EDID ?

If EDID may change, I have to derive an unique identifier data from an EDID binary.
According to EDID specification, EDID binary has some identifier fields.

Manufacturer ID (in header)

product code (in header)

serial number (in header)

Display Product Serial Number (in Display Descriptor)

But both serial number and Display Product Serial Number are optional. Is there any way to derive a correct unique identifier from an EDID binary ?

ContentLicense: CC BY-SA 4.0

Title: How to identify monitors by EDID?


问:
index%1==0 meaning in python enumeration lists
```<code>#I was following a tutorial on enumeration in python

list1=["bhindi","aloo","chsp","choc"] #list1 is a list of foods. I want to ignore "aloo"

#The tutorial gave the following formula:

#without enumeration
i=1
for item in li:
   if i%2 is not 0:
       print(f" jarvis please buy {item}")#used f string
    i+=1

#output given below
   #  jarvis please buy bhindi
   #  jarvis please buy ch

#Question 1: what does "i%2 is not 0" mean? Does "i%2" tell to ignore "chsp" since its the third value (lists go from 0 to forward)? Why did the output ignore "choc"

#with enumerate

list = ["bhindi", "aloo", "chsp", "choc"]
         if index%1==0: #index starts from 0
           print(f"jarvis please buy {item}")

#output given below
# jarvis please buy bhindi
# jarvis please buy chsp

#Question 2: what does "index%1==0" mean? Why is "choc" not printed here?

</code>```

#I thought that enumerate uses lists differently.

#1. I ran the code to get an idea of what index is returning

```<code>list=["bhindi","aloo","chsp","choc"]
list[1]
</code>```

The ouptput is 'aloo'

My understanding is that list function gets values from the list differently than the enumerate function. I cannot really understand whats happening here.

#Any help is greatly appreciated.

Body:
#I was following a tutorial on enumeration in python

list1=["bhindi","aloo","chsp","choc"] #list1 is a list of foods. I want to ignore "aloo"

#The tutorial gave the following formula:

#without enumeration
i=1
for item in li:
   if i%2 is not 0:
       print(f" jarvis please buy {item}")#used f string
    i+=1

#output given below
   #  jarvis please buy bhindi
   #  jarvis please buy ch

#Question 1: what does "i%2 is not 0" mean? Does "i%2" tell to ignore "chsp" since its the third value (lists go from 0 to forward)? Why did the output ignore "choc"

#with enumerate

list = ["bhindi", "aloo", "chsp", "choc"]
         if index%1==0: #index starts from 0
           print(f"jarvis please buy {item}")

#output given below
# jarvis please buy bhindi
# jarvis please buy chsp

#Question 2: what does "index%1==0" mean? Why is "choc" not printed here?

#I thought that enumerate uses lists differently.

#1. I ran the code to get an idea of what index is returning

list=["bhindi","aloo","chsp","choc"]
list[1]

The ouptput is 'aloo'

My understanding is that list function gets values from the list differently than the enumerate function. I cannot really understand whats happening here.

#Any help is greatly appreciated.


问:
I can't run C# on visual studio
i worked on Visual studio a long time (mainly on java and on python) i tried to use C# and when i am running the code it asks me to select an environment, there are two options after that ".Net Frameworkd 4.x (windows only)" and "Ionide Launchsetting". the first does nothing and the second opend a file setting.json
`

```<code>{
  "java.home": "C:\\Users\\Public\\wpilib\\2022\\jdk",
  "extensions.autoUpdate": false,
  "extensions.autoCheckUpdates": false,
  "extensions.ignoreRecommendations": true,
  "extensions.showRecommendationsOnlyOnDemand": false,
  "update.channel": "none",
  "update.showReleaseNotes": false,
  "http.systemCertificates": false,
  "terminal.integrated.env.windows": {
    "JAVA_HOME": "C:\\Users\\Public\\wpilib\\2022\\jdk",
    "PATH": "C:\\Users\\Public\\wpilib\\2022\\jdk\\bin;${env:PATH}"
  },
  "editor.suggestSelection": "first",
  "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
  "files.autoSave": "afterDelay",
  "workbench.colorTheme": "Visual Studio Dark",
  "security.workspace.trust.untrustedFiles": "open",
  "C_Cpp.addNodeAddonIncludePaths": true
}
</code>```

`

i tried using dotnet new console but it didn't word, it opened some files but it changed nothing when i tried running C#

Title: I can't run C# on visual studio

Body:
i worked on Visual studio a long time (mainly on java and on python) i tried to use C# and when i am running the code it asks me to select an environment, there are two options after that ".Net Frameworkd 4.x (windows only)" and "Ionide Launchsetting". the first does nothing and the second opend a file setting.json
`

{
  "java.home": "C:\\Users\\Public\\wpilib\\2022\\jdk",
  "extensions.autoUpdate": false,
  "extensions.autoCheckUpdates": false,
  "extensions.ignoreRecommendations": true,
  "extensions.showRecommendationsOnlyOnDemand": false,
  "update.channel": "none",
  "update.showReleaseNotes": false,
  "http.systemCertificates": false,
  "terminal.integrated.env.windows": {
    "JAVA_HOME": "C:\\Users\\Public\\wpilib\\2022\\jdk",
    "PATH": "C:\\Users\\Public\\wpilib\\2022\\jdk\\bin;${env:PATH}"
  },
  "editor.suggestSelection": "first",
  "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
  "files.autoSave": "afterDelay",
  "workbench.colorTheme": "Visual Studio Dark",
  "security.workspace.trust.untrustedFiles": "open",
  "C_Cpp.addNodeAddonIncludePaths": true
}

`

i tried using dotnet new console but it didn't word, it opened some files but it changed nothing when i tried running C#


问:
What language has the fastest wait speed?
I know we've got processing down to a septillionth of a second in lab grade optics, but how fast can a computer actually wait? Whats the fastest language in processing wait/sleep patterns?

I'm working on a binary algorithm fluxion(0; func(00=1)) and its limited by the passing of time.


问:
Browse multiple file in python using Tkinter
I want to design a user interface to browse multiple files at a time and store file paths in different variables.
I have tried but have not expected the result gets.
I have attached both pics of what I an getting with my code and what I my expectation.[![! getting output with my code]

My expectation.

I am getting this with my code.

```<code>import tkinter as tk
from tkinter import filedialog

root = tk.Tk()
root.withdraw()
my_w=tk.Tk()
my_w.geometry("250x200")
my_w.title("open file")
my_font1=('times',10,'bold')
l1=tk.Label(my_w,text='upload file & read',width=20,font=my_font1)
l1.grid(row=1,column=1)
b1=tk.Button(my_w,text='upload file Requested_data file',width=20,command=lambda:upload_file())
#b2=tk.Button(my_w,text='upload Raw updated data file',width=20,command=lambda:upload_file())
b1.grid(row=2,column=1)

def upload_file():
    FilePath=filedialog.askopenfilename()
    FilePath1 = filedialog.askopenfilename()
    #print(FilePath)

    ob = openpyxl.load_workbook(FilePath)

    ob1 = openpyxl.load_workbook(FilePath1)
</code>```

my expectation is.

Body:
I want to design a user interface to browse multiple files at a time and store file paths in different variables.
I have tried but have not expected the result gets.
I have attached both pics of what I an getting with my code and what I my expectation.[![! getting output with my code]

My expectation.

I am getting this with my code.

import tkinter as tk
from tkinter import filedialog

root = tk.Tk()
root.withdraw()
my_w=tk.Tk()
my_w.geometry("250x200")
my_w.title("open file")
my_font1=('times',10,'bold')
l1=tk.Label(my_w,text='upload file & read',width=20,font=my_font1)
l1.grid(row=1,column=1)
b1=tk.Button(my_w,text='upload file Requested_data file',width=20,command=lambda:upload_file())
#b2=tk.Button(my_w,text='upload Raw updated data file',width=20,command=lambda:upload_file())
b1.grid(row=2,column=1)

def upload_file():
    FilePath=filedialog.askopenfilename()
    FilePath1 = filedialog.askopenfilename()
    #print(FilePath)

    ob = openpyxl.load_workbook(FilePath)

    ob1 = openpyxl.load_workbook(FilePath1)

my expectation is.


问:
Getting both net6 and net7 in bin
I am new to Docker and am working on a two-stage Dockerfile following this guide.

I'm basing my build stage on mcr.microsoft.com/dotnet/sdk:7.0.101-alpine3.16-amd64

After restoring (RUN dotnet restore) and publishing (RUN dotnet publish "./MyWeb/MyWeb.csproj" -c Release -o /app --no-restore) I am seeing both net6.0/ and net7.0/ folders in "./MyWeb/bin/Debug" and "./MyWeb/bin/Release"

In addition to having files for both version of .Net, how come I also have a Debug/ directory if I published with the Release configuration?

Title: Getting both net6 and net7 in bin


问:
log4j.properties file Location for PySaprk
I know for Spark-scala the Location of log4j.properties File is -
src/main/resources/log4j.properties

in Smiler way for PySpark what should be the log4j.properties  File locatioin in Pycharm.
Can anyone please help me. i tried to find anf got one clue here - https://polarpersonal.medium.com/writing-pyspark-logs-in-apache-spark-and-databricks-8590c28d1d51

But its suggesting to update the spark-3.0.1-bin-hadoop2.7\conf and replace log4j.properties.template with my own log4j.properties.

Can we use somether way like src/main/resources/log4j.properties in case of Spark-scala ?


问:
How can use my custom image as icon in leaflet map?
in my asp.net core website. i want use 4 different icon for 4 different subject in leaflet map. i use the sample code, But my custom image not show on the map. how can solve this?
my JavaScript code is:

const map = L.map('map').setView([35.598764, 51.436572], 13);

const tiles = L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
    minZoom: 5,
    maxZoom: 19,
    attribution: '© OpenStreetMap'
}).addTo(map);

var greenIcon = L.icon({

    iconUrl: '~/image/main/icon1.png',
    shadowUrl: '~/image/main/shadow1.png',

    iconSize: [38, 95], // size of the icon
    shadowSize: [50, 64], // size of the shadow
    iconAnchor: [22, 94], // point of the icon which will correspond to marker's location
    shadowAnchor: [4, 62],  // the same for the shadow
    popupAnchor: [-3, -76] // point from which the popup should open relative to the iconAnchor
});

var marker = L.marker([35.585978, 51.434942], { icon: greenIcon }).addTo(map);
marker.bindPopup("Hello world!
I am a popup.");

```


问:
Is there any way to change background color and border margins of grid items in react-grid-layout library
I've been implementing and looking to make a dynamic dashboard using react-grid-layout library and read the docs for the same but I'm unable to change the background and the text color of the grid item. Here's my code

```<code>import React from "react";
import GridLayout from "react-grid-layout";
import "../../node_modules/react-grid-layout/css/styles.css";
import "../../node_modules/react-resizable/css/styles.css";
const Layout = () => {
  const layout = [
    { i: "a", x: 0, y: 0, w: 1, h: 2, static: true },
    { i: "b", x: 1, y: 0, w: 3, h: 2, minW: 2, maxW: 4 },
    { i: "c", x: 4, y: 0, w: 1, h: 2 },
  ];
  return (
    <GridLayout
      className="layout"
      layout={layout}
      cols={12}
      rowHeight={30}
      width={1200}
    >
      <div key="a">a</div>
      <div key="b">b</div>
      <div key="c">c</div>
    </GridLayout>
  );
};

export default Layout;
</code>```
```<code>Changes i made in css at
</code>```

node_modules/react-grid-layout/css/styles.css

```<code>are

`.react-grid-item {
  transition: all 200ms ease;
  background-color: brown;
  color: black;
  transition-property: left, top;
}
`
</code>```

The result still stays the same:-

Any help with respect to changing the color of the items will be greatly appreciated.

Body:
I've been implementing and looking to make a dynamic dashboard using react-grid-layout library and read the docs for the same but I'm unable to change the background and the text color of the grid item. Here's my code

import React from "react";
import GridLayout from "react-grid-layout";
import "../../node_modules/react-grid-layout/css/styles.css";
import "../../node_modules/react-resizable/css/styles.css";
const Layout = () => {
  const layout = [
    { i: "a", x: 0, y: 0, w: 1, h: 2, static: true },
    { i: "b", x: 1, y: 0, w: 3, h: 2, minW: 2, maxW: 4 },
    { i: "c", x: 4, y: 0, w: 1, h: 2 },
  ];
  return (
    <GridLayout
      className="layout"
      layout={layout}
      cols={12}
      rowHeight={30}
      width={1200}
    >

a

b

c

    </GridLayout>
  );
};

export default Layout;

Changes i made in css at

node_modules/react-grid-layout/css/styles.css

are

`.react-grid-item {
  transition: all 200ms ease;
  background-color: brown;
  color: black;
  transition-property: left, top;
}
`

The result still stays the same:-

Any help with respect to changing the color of the items will be greatly appreciated.


问:
I am trying to estimate the input thresholds that would provide high accuracy in a binary classification problem
I have a binary classification dataset with three inputs and one output. Example shown below.
X
y

The task is to find the thresholds of the input parameters that would result in the current classification. For example, for variable "Gas_3", I want to find a threshold, above, or below which, I shall be getting all of the values of "Gas_3" classified as 1.
Same goes for other two input variables.

I have already tried Decision Trees method and used the split thresholds provided by the model. However, I am looking after alternative methods for this problem.

# Load libraries
import pandas as pd
from sklearn.tree import DecisionTreeClassifier # Import Decision Tree Classifier
from sklearn.model_selection import train_test_split # Import train_test_split function
from sklearn import metrics #Import scikit-learn metrics module for accuracy calculation
import seaborn as sns
%matplotlib inline

df= pd.read_csv("Daniel_criterion_2.csv")
#split dataset in features and target variable
feature_cols = ['Gas_3','Wind_3','NetLoad_3']
X = df[feature_cols] # Features
y = df.Class #rget variable
# Split dataset into training set and test set
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42) # 70%     training and 30% test
clf = DecisionTreeClassifier(max_depth=3)

# Train Decision Tree Classifer
clf = clf.fit(X_train,y_train)

#Predict the response for test dataset
y_pred = clf.predict(X_test)
# Model Accuracy, how often is the classifier correct?
print("Accuracy:",metrics.accuracy_score(y_test, y_pred))

from sklearn.tree import export_graphviz

from IPython.display import Image
import pydotplus

dot_data = StringIO()
export_graphviz(clf, out_file=dot_data,
            filled=True, rounded=True,
            special_characters=True,feature_names = feature_cols,class_names=['0','1'])
graph = pydotplus.graph_from_dot_data(dot_data.getvalue())
graph.write_png('ONT.png')
Image(graph.create_png())
```


问:
Unable to load class with custom static final field
I'm trying to add a field that is not base, and does not take into hibernate manager, because it is already final and static.
What am I doing wrong.

```<code>@Entity
@Table(name = "channels")
public class Channel {
    public static final VarType ID = new VarType(Channel.class, "id", Integer.class);
    public static final VarType TITLE = new VarType(Channel.class, "title", String.class);

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;
    @Column(name = "chatid")
    private long chatId;
</code>```

Custom field i should add:

```<code>public class VarType {
    Class<?> cls;
    String name;
    Class<?> type;

    public VarType(Class<?> cls, String name, Class<?> type) {
        this.cls = cls;
        this.name = name;
        this.type = type;
    }

</code>```

Without custom field: ID, TITLE, all work noramlly.
But with:

```<code>Caused by: org.hibernate.MappingException: entity class not found: com.saderty.db.entities.Channel
    at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:144)
    at org.hibernate.cfg.BinderHelper.getPropertyOverriddenByMapperOrMapsId(BinderHelper.java:1147)
    at org.hibernate.cfg.AnnotationBinder.bindBasic(AnnotationBinder.java:1362)
    at org.hibernate.cfg.AnnotationBinder.buildProperty(AnnotationBinder.java:1251)
    at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1112)
    at org.hibernate.cfg.annotations.EntityBinder.processIdPropertiesIfNotAlready(EntityBinder.java:935)
    at org.hibernate.cfg.annotations.EntityBinder.bindEntityClass(EntityBinder.java:273)
    at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:556)
    at org.hibernate.boot.model.source.internal.annotations.AnnotationMetadataSourceProcessorImpl.processEntityHierarchies(AnnotationMetadataSourceProcessorImpl.java:216)
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.processEntityHierarchies(MetadataBuildingProcess.java:247)
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:290)
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:97)
    at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:402)
    at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:90)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:735)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:773)
    at com.saderty.HibernateApi.<init>(HibernateApi.java:34)
    at com.saderty.HibernateApi$HibernateApiFactory.build(HibernateApi.java:280)
    at com.saderty.HibernateApi$HibernateApiFactory.build(HibernateApi.java:265)
    at com.saderty.HibernateApi$HibernateApiFactory.Telegram(HibernateApi.java:300)
    at com.saderty.db.DataApi.<clinit>(DataApi.java:25)
    ... 4 more
Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [com.saderty.db.entities.Channel]
    at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:126)
    at org.hibernate.boot.internal.ClassLoaderAccessImpl.classForName(ClassLoaderAccessImpl.java:67)
    at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:139)
    ... 24 more
Caused by: java.lang.ExceptionInInitializerError
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:495)
    at java.base/java.lang.Class.forName(Class.java:474)
    at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:120)
    ... 26 more
</code>```

Configuration (+annonation on entity classes):

```<code>Configuration configuration = new Configuration();
configuration.addAnnotatedClass(annotatedClass);
new HibernateApi(configuration);
</code>```

Body:
I'm trying to add a field that is not base, and does not take into hibernate manager, because it is already final and static.
What am I doing wrong.

@Entity
@Table(name = "channels")
public class Channel {
    public static final VarType ID = new VarType(Channel.class, "id", Integer.class);
    public static final VarType TITLE = new VarType(Channel.class, "title", String.class);

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;
    @Column(name = "chatid")
    private long chatId;

Custom field i should add:

public class VarType {
    Class<?> cls;
    String name;
    Class<?> type;

    public VarType(Class<?> cls, String name, Class<?> type) {
        this.cls = cls;
        this.name = name;
        this.type = type;
    }

Without custom field: ID, TITLE, all work noramlly.
But with:

Caused by: org.hibernate.MappingException: entity class not found: com.saderty.db.entities.Channel
    at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:144)
    at org.hibernate.cfg.BinderHelper.getPropertyOverriddenByMapperOrMapsId(BinderHelper.java:1147)
    at org.hibernate.cfg.AnnotationBinder.bindBasic(AnnotationBinder.java:1362)
    at org.hibernate.cfg.AnnotationBinder.buildProperty(AnnotationBinder.java:1251)
    at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1112)
    at org.hibernate.cfg.annotations.EntityBinder.processIdPropertiesIfNotAlready(EntityBinder.java:935)
    at org.hibernate.cfg.annotations.EntityBinder.bindEntityClass(EntityBinder.java:273)
    at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:556)
    at org.hibernate.boot.model.source.internal.annotations.AnnotationMetadataSourceProcessorImpl.processEntityHierarchies(AnnotationMetadataSourceProcessorImpl.java:216)
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.processEntityHierarchies(MetadataBuildingProcess.java:247)
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:290)
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:97)
    at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:402)
    at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:90)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:735)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:773)
    at com.saderty.HibernateApi.<init>(HibernateApi.java:34)
    at com.saderty.HibernateApi$HibernateApiFactory.build(HibernateApi.java:280)
    at com.saderty.HibernateApi$HibernateApiFactory.build(HibernateApi.java:265)
    at com.saderty.HibernateApi$HibernateApiFactory.Telegram(HibernateApi.java:300)
    at com.saderty.db.DataApi.<clinit>(DataApi.java:25)
    ... 4 more
Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [com.saderty.db.entities.Channel]
    at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:126)
    at org.hibernate.boot.internal.ClassLoaderAccessImpl.classForName(ClassLoaderAccessImpl.java:67)
    at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:139)
    ... 24 more
Caused by: java.lang.ExceptionInInitializerError
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:495)
    at java.base/java.lang.Class.forName(Class.java:474)
    at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:120)
    ... 26 more

Configuration (+annonation on entity classes):

Configuration configuration = new Configuration();
configuration.addAnnotatedClass(annotatedClass);
new HibernateApi(configuration);


问:
How to fetch records in a Lazy Load format Using Aura Component?
I want to fetch the record using Aura Component, in a lazy loading format. Can someone help me out ?</p>


问:
SpaCy3 ValueError without message
I'm new to Spacy but want to train simply NER with new labels using the en_core_web_trf. So I've created code like below however I keep getting unknown ValueError.

How can I fix this?

```<code>import random
from spacy.training import Example
from spacy.util import minibatch, compounding

def train_spacy_model(data, model='en_core_web_trf', n_iter=30):
    if model is not None:
        nlp = spacy.load(model)  # load existing spaCy model
        print("Loaded model '%s'" % model)
    else:
        nlp = spacy.blank("en")  # create blank Language class
        print("Created blank 'en' model")

    print("ner" in nlp.pipe_names)
    if "ner" not in nlp.pipe_names:
        ner = nlp.create_pipe("ner")
        nlp.add_pipe(ner, last=True)
    else:
        ner = nlp.get_pipe("ner")

    TRAIN_DATA = data

    examples = []
    for text, annotations in TRAIN_DATA:
        examples.append(Example.from_dict(nlp.make_doc(text), annotations))
    nlp.initialize(lambda: examples)

    pipe_exceptions = ["ner"]
    other_pipes = [pipe for pipe in nlp.pipe_names if pipe not in pipe_exceptions]
    with nlp.disable_pipes(*other_pipes):  # only train NER
        optimizer = nlp.create_optimizer()
        for itn in range(n_iter):
            print ("Starting iteration " + str(itn))
            random.shuffle(examples)
            losses = {}
            batches = minibatch(examples, size=2)
            for batch in batches:
                nlp.update(
                    batch,
                    drop=0.20,
                    sgd=optimizer,
                    losses=losses
                )

            print("Losses", losses)

    return nlp
TRAIN_DATA = [
     ("Who is Shaka Khan?", {"entities": [(7, 17, "PERSON")]}),
     ("I like London.", {"entities": [(7, 13, "LOC")]}),
 ]

nlp = train_spacy_model(data=no_verlaps_dataset, n_iter=30)
</code>```

the error:

```<code>---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[22], line 51
     47             print("Losses", losses)
     49     return nlp
---> 51 nlp = train_spacy_model(data=no_verlaps_dataset, n_iter=30)

Cell In[22], line 40, in train_spacy_model(data, model, n_iter)
     36         batches = minibatch(examples, size=2)#compounding(4.0, 64.0, 1.2))
     37         for batch in batches:
     38             # print(batch)
     39             # texts, annotations = zip(*batch)
---> 40             nlp.update(
     41                 batch,
     42                 drop=0.20,
     43                 sgd=optimizer,
     44                 losses=losses
     45             )
     47         print("Losses", losses)
     49 return nlp

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/spacy/language.py:1164, in Language.update(self, examples, _, drop, sgd, losses, component_cfg, exclude, annotates)
   1161 for name, proc in self.pipeline:
   1162     # ignore statements are used here because mypy ignores hasattr
   1163     if name not in exclude and hasattr(proc, "update"):
-> 1164         proc.update(examples, sgd=None, losses=losses, **component_cfg[name])  # type: ignore
   1165     if sgd not in (None, False):
   1166         if (
   1167             name not in exclude
   1168             and isinstance(proc, ty.TrainableComponent)
   1169             and proc.is_trainable
   1170             and proc.model not in (True, False, None)
   1171         ):

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/spacy/pipeline/transition_parser.pyx:398, in spacy.pipeline.transition_parser.Parser.update()

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/thinc/model.py:309, in Model.begin_update(self, X)
    302 def begin_update(self, X: InT) -> Tuple[OutT, Callable[[InT], OutT]]:
    303     """Run the model over a batch of data, returning the output and a
    304     callback to complete the backward pass. A tuple (Y, finish_update),
    305     where Y is a batch of output data, and finish_update is a callback that
    306     takes the gradient with respect to the output and an optimizer function,
    307     and returns the gradient with respect to the input.
    308     """
--> 309     return self._func(self, X, is_train=True)

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/spacy/ml/tb_framework.py:33, in forward(model, X, is_train)
     32 def forward(model, X, is_train):
---> 33     step_model = ParserStepModel(
     34         X,
     35         model.layers,
     36         unseen_classes=model.attrs["unseen_classes"],
     37         train=is_train,
     38         has_upper=model.attrs["has_upper"],
     39     )
     41     return step_model, step_model.finish_steps

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/spacy/ml/parser_model.pyx:217, in spacy.ml.parser_model.ParserStepModel.__init__()

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/thinc/model.py:291, in Model.__call__(self, X, is_train)
    288 def __call__(self, X: InT, is_train: bool) -> Tuple[OutT, Callable]:
    289     """Call the model's `forward` function, returning the output and a
    290     callback to compute the gradients via backpropagation."""
--> 291     return self._func(self, X, is_train=is_train)

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/thinc/layers/chain.py:54, in forward(model, X, is_train)
     52 callbacks = []
     53 for layer in model.layers:
---> 54     Y, inc_layer_grad = layer(X, is_train=is_train)
     55     callbacks.append(inc_layer_grad)
     56     X = Y

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/thinc/model.py:291, in Model.__call__(self, X, is_train)
    288 def __call__(self, X: InT, is_train: bool) -> Tuple[OutT, Callable]:
    289     """Call the model's `forward` function, returning the output and a
    290     callback to compute the gradients via backpropagation."""
--> 291     return self._func(self, X, is_train=is_train)

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/thinc/layers/chain.py:54, in forward(model, X, is_train)
     52 callbacks = []
     53 for layer in model.layers:
---> 54     Y, inc_layer_grad = layer(X, is_train=is_train)
     55     callbacks.append(inc_layer_grad)
     56     X = Y

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/thinc/model.py:291, in Model.__call__(self, X, is_train)
    288 def __call__(self, X: InT, is_train: bool) -> Tuple[OutT, Callable]:
    289     """Call the model's `forward` function, returning the output and a
    290     callback to compute the gradients via backpropagation."""
--> 291     return self._func(self, X, is_train=is_train)

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/spacy_transformers/layers/listener.py:58, in forward(model, docs, is_train)
     56 def forward(model: TransformerListener, docs, is_train):
     57     if is_train:
---> 58         model.verify_inputs(docs)
     59         return model._outputs, model.backprop_and_clear
     60     else:

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/spacy_transformers/layers/listener.py:47, in TransformerListener.verify_inputs(self, inputs)
     45 def verify_inputs(self, inputs):
     46     if self._batch_id is None and self._outputs is None:
---> 47         raise ValueError
     48     else:
     49         batch_id = self.get_batch_id(inputs)

ValueError:
</code>```

Title: SpaCy3 ValueError without message

Body:
I'm new to Spacy but want to train simply NER with new labels using the en_core_web_trf. So I've created code like below however I keep getting unknown ValueError.

How can I fix this?

import random
from spacy.training import Example
from spacy.util import minibatch, compounding

def train_spacy_model(data, model='en_core_web_trf', n_iter=30):
    if model is not None:
        nlp = spacy.load(model)  # load existing spaCy model
        print("Loaded model '%s'" % model)
    else:
        nlp = spacy.blank("en")  # create blank Language class
        print("Created blank 'en' model")

    print("ner" in nlp.pipe_names)
    if "ner" not in nlp.pipe_names:
        ner = nlp.create_pipe("ner")
        nlp.add_pipe(ner, last=True)
    else:
        ner = nlp.get_pipe("ner")

    TRAIN_DATA = data

    examples = []
    for text, annotations in TRAIN_DATA:
        examples.append(Example.from_dict(nlp.make_doc(text), annotations))
    nlp.initialize(lambda: examples)

    pipe_exceptions = ["ner"]
    other_pipes = [pipe for pipe in nlp.pipe_names if pipe not in pipe_exceptions]
    with nlp.disable_pipes(*other_pipes):  # only train NER
        optimizer = nlp.create_optimizer()
        for itn in range(n_iter):
            print ("Starting iteration " + str(itn))
            random.shuffle(examples)
            losses = {}
            batches = minibatch(examples, size=2)
            for batch in batches:
                nlp.update(
                    batch,
                    drop=0.20,
                    sgd=optimizer,
                    losses=losses
                )

            print("Losses", losses)

    return nlp
TRAIN_DATA = [
     ("Who is Shaka Khan?", {"entities": [(7, 17, "PERSON")]}),
     ("I like London.", {"entities": [(7, 13, "LOC")]}),
 ]

nlp = train_spacy_model(data=no_verlaps_dataset, n_iter=30)

the error:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[22], line 51
     47             print("Losses", losses)
     49     return nlp
---> 51 nlp = train_spacy_model(data=no_verlaps_dataset, n_iter=30)

Cell In[22], line 40, in train_spacy_model(data, model, n_iter)
     36         batches = minibatch(examples, size=2)#compounding(4.0, 64.0, 1.2))
     37         for batch in batches:
     38             # print(batch)
     39             # texts, annotations = zip(*batch)
---> 40             nlp.update(
     41                 batch,
     42                 drop=0.20,
     43                 sgd=optimizer,
     44                 losses=losses
     45             )
     47         print("Losses", losses)
     49 return nlp

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/spacy/language.py:1164, in Language.update(self, examples, _, drop, sgd, losses, component_cfg, exclude, annotates)
   1161 for name, proc in self.pipeline:
   1162     # ignore statements are used here because mypy ignores hasattr
   1163     if name not in exclude and hasattr(proc, "update"):
-> 1164         proc.update(examples, sgd=None, losses=losses, **component_cfg[name])  # type: ignore
   1165     if sgd not in (None, False):
   1166         if (
   1167             name not in exclude
   1168             and isinstance(proc, ty.TrainableComponent)
   1169             and proc.is_trainable
   1170             and proc.model not in (True, False, None)
   1171         ):

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/spacy/pipeline/transition_parser.pyx:398, in spacy.pipeline.transition_parser.Parser.update()

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/thinc/model.py:309, in Model.begin_update(self, X)
    302 def begin_update(self, X: InT) -> Tuple[OutT, Callable[[InT], OutT]]:
    303     """Run the model over a batch of data, returning the output and a
    304     callback to complete the backward pass. A tuple (Y, finish_update),
    305     where Y is a batch of output data, and finish_update is a callback that
    306     takes the gradient with respect to the output and an optimizer function,
    307     and returns the gradient with respect to the input.
    308     """
--> 309     return self._func(self, X, is_train=True)

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/spacy/ml/tb_framework.py:33, in forward(model, X, is_train)
     32 def forward(model, X, is_train):
---> 33     step_model = ParserStepModel(
     34         X,
     35         model.layers,
     36         unseen_classes=model.attrs["unseen_classes"],
     37         train=is_train,
     38         has_upper=model.attrs["has_upper"],
     39     )
     41     return step_model, step_model.finish_steps

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/spacy/ml/parser_model.pyx:217, in spacy.ml.parser_model.ParserStepModel.__init__()

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/thinc/model.py:291, in Model.__call__(self, X, is_train)
    288 def __call__(self, X: InT, is_train: bool) -> Tuple[OutT, Callable]:
    289     """Call the model's `forward` function, returning the output and a
    290     callback to compute the gradients via backpropagation."""
--> 291     return self._func(self, X, is_train=is_train)

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/thinc/layers/chain.py:54, in forward(model, X, is_train)
     52 callbacks = []
     53 for layer in model.layers:
---> 54     Y, inc_layer_grad = layer(X, is_train=is_train)
     55     callbacks.append(inc_layer_grad)
     56     X = Y

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/thinc/model.py:291, in Model.__call__(self, X, is_train)
    288 def __call__(self, X: InT, is_train: bool) -> Tuple[OutT, Callable]:
    289     """Call the model's `forward` function, returning the output and a
    290     callback to compute the gradients via backpropagation."""
--> 291     return self._func(self, X, is_train=is_train)

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/thinc/layers/chain.py:54, in forward(model, X, is_train)
     52 callbacks = []
     53 for layer in model.layers:
---> 54     Y, inc_layer_grad = layer(X, is_train=is_train)
     55     callbacks.append(inc_layer_grad)
     56     X = Y

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/thinc/model.py:291, in Model.__call__(self, X, is_train)
    288 def __call__(self, X: InT, is_train: bool) -> Tuple[OutT, Callable]:
    289     """Call the model's `forward` function, returning the output and a
    290     callback to compute the gradients via backpropagation."""
--> 291     return self._func(self, X, is_train=is_train)

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/spacy_transformers/layers/listener.py:58, in forward(model, docs, is_train)
     56 def forward(model: TransformerListener, docs, is_train):
     57     if is_train:
---> 58         model.verify_inputs(docs)
     59         return model._outputs, model.backprop_and_clear
     60     else:

File ~/miniconda3/envs/tvman_ENV/lib/python3.9/site-packages/spacy_transformers/layers/listener.py:47, in TransformerListener.verify_inputs(self, inputs)
     45 def verify_inputs(self, inputs):
     46     if self._batch_id is None and self._outputs is None:
---> 47         raise ValueError
     48     else:
     49         batch_id = self.get_batch_id(inputs)

ValueError:


问:
Deploying the Nvidia Triton Inference Server behind AWS Internal Application Load Balancer
I want to Deploying the Nvidia Triton Inference Server behind AWS Internal Application Load Balancer
My Triton Application Running ubuntu 20.04 with Docker triton image nvcr.io/nvidia/tritonserver:22.08-py3 tritonserver on Docker version 20.10.12, build e91ed57
Here, we use port 8000 to listen to HTTP requestsm for health check (/v2/health/ready) Port 8001 for GRPC, and 8002 for metrics as needed.
But when a going to attach my Triton Machine behind target group my application throw this

errorgRPC: 14 UNAVAILABLE: failed to connect to all addresses

My Alb Target Group Setting as displayed in Screen Shot I want to server my Triton Grpc Request via ALB


问:
How to get the customer type in Woocommerce Order List in Optimal Way
In Woocommerce Order list, i want to add a column of customer type to be either "New" or "Returning" for both guest and registered customers..I have achieved that with following via below link...

How to add a first order column to the admin order list for customers and guests

The code works but there is a problem that it has increased the page load time due to SQL query in for fetching the data of guest customers..it is very slow....is there's any optimal way to achieve the same thing without using SQL queries for both the customers(returning and guest) customers?

I have also tried the using the snippets from below links but it didn't help

Checking if customer has already bought something in WooCommerce


问:
How to connect multiple databases from different subdomain and make a single select query
Is it possible to connect different databases located in different subdomains by using mysqli_connect, and then run a single select query to get data from all the databases?
Suppose I have two databases located in different sub-domain:

```<code>$connect1 = mysqli_connect($hostname1, $username1, $password1,$database1);
$connect2 = mysqli_connect($hostname2, $username2, $password2, $database2);
</code>```

Then I want to select data from the two databases:

```<code>SELECT `Id` FROM `$database1`.`users` WHERE `name` LIKE '%$string_1%'
UNION ALL
SELECT `Id` FROM `$database2`.`masters` WHERE `name` LIKE '%$string_2%';
</code>```

Here users is a database table of $database1 and masters is a table of $database2.
But I don't know how to make a single mysqli_query with this.

Body:
Is it possible to connect different databases located in different subdomains by using mysqli_connect, and then run a single select query to get data from all the databases?
Suppose I have two databases located in different sub-domain:

$connect1 = mysqli_connect($hostname1, $username1, $password1,$database1);
$connect2 = mysqli_connect($hostname2, $username2, $password2, $database2);

Then I want to select data from the two databases:

SELECT `Id` FROM `$database1`.`users` WHERE `name` LIKE '%$string_1%'
UNION ALL
SELECT `Id` FROM `$database2`.`masters` WHERE `name` LIKE '%$string_2%';

Here users is a database table of $database1 and masters is a table of $database2.
But I don't know how to make a single mysqli_query with this.


问:
Not able to return the function result value using flask and pandas
I am developing small web application when we upload the pdf file it takes the file and return response as a plotly curve using pandas dataframe but iam trying to return the number of counts of acceleration but iam not able to get the value in html page here is the pdf file i am using "https://online.flippingbook.com/view/623843533/"
this my script used

```<code>from flask import Flask, request, render_template
import pandas as pd
import numpy as np
import tabula
from flask import Flask, flash, request, redirect, url_for
from werkzeug.utils import secure_filename
import plotly
import plotly.express as px
import json
UPLOAD_FOLDER = '/path/to/the/uploads'
ALLOWED_EXTENSIONS = {'txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'}

app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
def allowed_file(filename):
    return '.' in filename and \
           filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
@app.route('/', methods=['GET', 'POST'])
def upload_file():
    if request.method == 'POST':
        if 'file' not in request.files:
            flash('No file part')
            return redirect(request.url)
        file = request.files['file']
        pdf_file = tabula.read_pdf(file, pandas_options={'header': None}, pages='all', multiple_tables=True, guess=True,
                                   stream=True)

        df = pd.concat(pdf_file)
        df.columns = ["S.No", "Time", "Speed"]
        df1 = df[df["Speed"].str.contains("Speed") == False]
        df1.reset_index(drop=True, inplace=True)
        fig = px.line(df1, x=df1["Time"], y=df1["Speed"])

        graphJSON = json.dumps(fig, cls=plotly.utils.PlotlyJSONEncoder)
        return render_template('upload.html', graphJSON=graphJSON)
    return render_template('upload.html')
    if file and allowed_file(file.filename):
          filename = secure_filename(file.filename)
          file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename))
          return redirect(url_for('download_file', name=filename))
global df1
@app.route('/', methods=['POST',"GET"])
def get_count(id_count):
    op_col = []
    for i in df1['Speed']:
        op_col.append(i)
    np.set_printoptions(threshold=np.inf)
    x = np.array(op_col)
    x1 = x.astype('int32')
    sub_lists = np.split(x1, np.where(np.diff(x1) < 0)[0] + 1)
    id_count = 0
    id_list = []
    for unit in sub_lists:
     if min(unit) <= 13 and max(unit) > 20 and len(set(unit)) > 1:
            id_count += 1
            id_list.append(unit)
     return id_count
    return render_template("upload.html", count_result=get_count(x1))
if __name__ == '__main__':
   app.run(debug = True,port=8081)

<div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<p>Acceleration Count using Speed and Time Data</p>
<form method=post enctype=multipart/form-data>
    <input type=file name=file>
    <input type=submit value=Upload>

</form>
<div id='chart' class='chart'”></div>
<script src='https://cdn.plot.ly/plotly-latest.min.js'></script>
<p>the acceleration count is {{count_result}} </p>
<script type='text/javascript'>
  var graphs = {{graphJSON | safe}};
  Plotly.plot('chart',graphs,{});
</script>
</body>
</html></code>```

```

iam unable to get the count value in html page where i need to change the code for getting output value thanks in adavance

Body:
I am developing small web application when we upload the pdf file it takes the file and return response as a plotly curve using pandas dataframe but iam trying to return the number of counts of acceleration but iam not able to get the value in html page here is the pdf file i am using "https://online.flippingbook.com/view/623843533/"
this my script used

from flask import Flask, request, render_template
import pandas as pd
import numpy as np
import tabula
from flask import Flask, flash, request, redirect, url_for
from werkzeug.utils import secure_filename
import plotly
import plotly.express as px
import json
UPLOAD_FOLDER = '/path/to/the/uploads'
ALLOWED_EXTENSIONS = {'txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'}

app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
def allowed_file(filename):
    return '.' in filename and \
           filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
@app.route('/', methods=['GET', 'POST'])
def upload_file():
    if request.method == 'POST':
        if 'file' not in request.files:
            flash('No file part')
            return redirect(request.url)
        file = request.files['file']
        pdf_file = tabula.read_pdf(file, pandas_options={'header': None}, pages='all', multiple_tables=True, guess=True,
                                   stream=True)

        df = pd.concat(pdf_file)
        df.columns = ["S.No", "Time", "Speed"]
        df1 = df[df["Speed"].str.contains("Speed") == False]
        df1.reset_index(drop=True, inplace=True)
        fig = px.line(df1, x=df1["Time"], y=df1["Speed"])

        graphJSON = json.dumps(fig, cls=plotly.utils.PlotlyJSONEncoder)
        return render_template('upload.html', graphJSON=graphJSON)
    return render_template('upload.html')
    if file and allowed_file(file.filename):
          filename = secure_filename(file.filename)
          file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename))
          return redirect(url_for('download_file', name=filename))
global df1
@app.route('/', methods=['POST',"GET"])
def get_count(id_count):
    op_col = []
    for i in df1['Speed']:
        op_col.append(i)
    np.set_printoptions(threshold=np.inf)
    x = np.array(op_col)
    x1 = x.astype('int32')
    sub_lists = np.split(x1, np.where(np.diff(x1) < 0)[0] + 1)
    id_count = 0
    id_list = []
    for unit in sub_lists:
     if min(unit) <= 13 and max(unit) > 20 and len(set(unit)) > 1:
            id_count += 1
            id_list.append(unit)
     return id_count
    return render_template("upload.html", count_result=get_count(x1))
if __name__ == '__main__':
   app.run(debug = True,port=8081)

<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>Title</title>

Acceleration Count using Speed and Time Data

<form method=post enctype=multipart/form-data>
    <input type=file name=file>
    <input type=submit value=Upload>

</form>

the acceleration count is {{count_result}}

iam unable to get the count value in html page where i need to change the code for getting output value thanks in adavance


问:
Condition if else in karate framework
```<code>How can I create an if else condition with several steps with the karate framework in a scenario?
Knowing that in the if and the else there would be calls to other scenarios?

I saw this:
* def num = 5
* if num == 5
*   print 'num is 5'
* else
*   print 'num is not 5'

But it does not work
</code>```

I try to create an if else condition in karate framework

Title: Condition if else in karate framework

Body:
How can I create an if else condition with several steps with the karate framework in a scenario?
Knowing that in the if and the else there would be calls to other scenarios?

I saw this:
* def num = 5
* if num == 5
*   print 'num is 5'
* else
*   print 'num is not 5'

But it does not work

I try to create an if else condition in karate framework


问:
How to implement the remember device process in Amazon Cognito in Java?
I'm having trouble implementing the process of remembering devices in Amazon Cognito, so that the next time the user logs in it doesn't ask for the 2FA code.

For this I have implemented the first step of 2 that the Amazon website says:

Remembering devices is a two-part process:

Confirming a new device. Initiate authentication from the device, and then confirm it with Amazon Cognito to get unique device identifiers.

Verifying a confirmed device. Initiate authentication from a confirmed device to skip the MFA step on subsequent sign-in attempts.

I am with the first step "Confirming a new device" but it does not work for me. The problem is calculating the "passwordVerifier" value.

According to Amazon these are the steps to follow (section "Call ConfirmDevice"): https://aws.amazon.com/es/premiumsupport/knowledge-center/cognito-user-pool-remembered-devices/

I have the following code:

```<code>String HEX_N =
     "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1"
         + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD"
         + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245"
         + "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED"
         + "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D"
         + "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F"
         + "83655D23DCA3AD961C62F356208552BB9ED529077096966D"
         + "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B"
         + "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9"
         + "DE2BCBF6955817183995497CEA956AE515D2261898FA0510"
         + "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64"
         + "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7"
         + "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B"
         + "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C"
         + "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31"
         + "43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF";

BigInteger N = new BigInteger(HEX_N, 16);

BigInteger g = new BigInteger("2", 16);

Random random = ThreadLocalRandom.current();
byte[] randomBytes = new byte[16];
random.nextBytes(randomBytes);
String salt = Base64.getUrlEncoder().encodeToString(randomBytes);

randomBytes = new byte[40];
random.nextBytes(randomBytes);
String randomPassword = Base64.getUrlEncoder().encodeToString(randomBytes);

String fullPassword = Hashing.sha256().hashString(this.getDeviceGroupKey() + this.getUsername() + ":" + randomPassword, StandardCharsets.UTF_8).toString();

String saltFullPassword = Hashing.sha256().hashString(salt + fullPassword, StandardCharsets.UTF_8).toString();

String passwordVerifier = Base64.getUrlEncoder().encodeToString(g.modPow(new BigInteger(saltFullPassword,16), N).toString(16).getBytes());

DeviceSecretVerifierConfigType deviceSecretVerifierConfigType = new DeviceSecretVerifierConfigType();
deviceSecretVerifierConfigType.setSalt(salt);
deviceSecretVerifierConfigType.setPasswordVerifier(passwordVerifier);

ConfirmDeviceRequest confirmDeviceRequest = new ConfirmDeviceRequest();
confirmDeviceRequest.setDeviceKey(this.getDeviceKey());
confirmDeviceRequest.setDeviceName(this.getDeviceName());
confirmDeviceRequest.setAccessToken(this.getToken());
confirmDeviceRequest.setDeviceSecretVerifierConfig(deviceSecretVerifierConfigType);

ConfirmDeviceResult confirmDeviceResult = awsCognitoIdentityProvider.confirmDevice(confirmDeviceRequest);
</code>```

and the execution returns the following error

"com.amazonaws.services.cognitoidp.model.InvalidParameterException: Found negative value for salt or password verifier."

Although other times it returns another error, it is the following

"com.amazonaws.services.cognitoidp.model.InvalidParameterException: Invalid device key given."

I tried confirming the device and getting it to register with AWS but not enough.

Body:
I'm having trouble implementing the process of remembering devices in Amazon Cognito, so that the next time the user logs in it doesn't ask for the 2FA code.

For this I have implemented the first step of 2 that the Amazon website says:

Remembering devices is a two-part process:

Confirming a new device. Initiate authentication from the device, and then confirm it with Amazon Cognito to get unique device identifiers.

Verifying a confirmed device. Initiate authentication from a confirmed device to skip the MFA step on subsequent sign-in attempts.

I am with the first step "Confirming a new device" but it does not work for me. The problem is calculating the "passwordVerifier" value.

According to Amazon these are the steps to follow (section "Call ConfirmDevice"): https://aws.amazon.com/es/premiumsupport/knowledge-center/cognito-user-pool-remembered-devices/

I have the following code:

String HEX_N =
     "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1"
         + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD"
         + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245"
         + "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED"
         + "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D"
         + "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F"
         + "83655D23DCA3AD961C62F356208552BB9ED529077096966D"
         + "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B"
         + "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9"
         + "DE2BCBF6955817183995497CEA956AE515D2261898FA0510"
         + "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64"
         + "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7"
         + "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B"
         + "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C"
         + "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31"
         + "43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF";

BigInteger N = new BigInteger(HEX_N, 16);

BigInteger g = new BigInteger("2", 16);

Random random = ThreadLocalRandom.current();
byte[] randomBytes = new byte[16];
random.nextBytes(randomBytes);
String salt = Base64.getUrlEncoder().encodeToString(randomBytes);

randomBytes = new byte[40];
random.nextBytes(randomBytes);
String randomPassword = Base64.getUrlEncoder().encodeToString(randomBytes);

String fullPassword = Hashing.sha256().hashString(this.getDeviceGroupKey() + this.getUsername() + ":" + randomPassword, StandardCharsets.UTF_8).toString();

String saltFullPassword = Hashing.sha256().hashString(salt + fullPassword, StandardCharsets.UTF_8).toString();

String passwordVerifier = Base64.getUrlEncoder().encodeToString(g.modPow(new BigInteger(saltFullPassword,16), N).toString(16).getBytes());

DeviceSecretVerifierConfigType deviceSecretVerifierConfigType = new DeviceSecretVerifierConfigType();
deviceSecretVerifierConfigType.setSalt(salt);
deviceSecretVerifierConfigType.setPasswordVerifier(passwordVerifier);

ConfirmDeviceRequest confirmDeviceRequest = new ConfirmDeviceRequest();
confirmDeviceRequest.setDeviceKey(this.getDeviceKey());
confirmDeviceRequest.setDeviceName(this.getDeviceName());
confirmDeviceRequest.setAccessToken(this.getToken());
confirmDeviceRequest.setDeviceSecretVerifierConfig(deviceSecretVerifierConfigType);

ConfirmDeviceResult confirmDeviceResult = awsCognitoIdentityProvider.confirmDevice(confirmDeviceRequest);

and the execution returns the following error

"com.amazonaws.services.cognitoidp.model.InvalidParameterException: Found negative value for salt or password verifier."

Although other times it returns another error, it is the following

"com.amazonaws.services.cognitoidp.model.InvalidParameterException: Invalid device key given."

I tried confirming the device and getting it to register with AWS but not enough.


问:
Inherit a function (incl. docstring) as a class method
Imagine, there is a function like this

```<code>def bar(a: str, b: str):
    """
    Do somehting with a and b.
    """
    print(a, b)
</code>```

Then there is a class, where i would like to adapt this function, but keep the docstring (and also the dynamic autocomplete and help) of the original function.

```<code>class Foo:
    def foo(self, **kwargs):
        bar(a=kwargs.get("a"), b=kwargs.get("b"))
        print("This was called fro the class method")
</code>```

How do i dynamically link the original function to the class, including docstrings?
And are kwargs the best way to pass the arguments, without repeating them in the definition of the class-method?

So when i type Foo.foo() in my IDE or jupyter notebook, i would like to see the docstring of foo().

Body:
Imagine, there is a function like this

def bar(a: str, b: str):
    """
    Do somehting with a and b.
    """
    print(a, b)

Then there is a class, where i would like to adapt this function, but keep the docstring (and also the dynamic autocomplete and help) of the original function.

class Foo:
    def foo(self, **kwargs):
        bar(a=kwargs.get("a"), b=kwargs.get("b"))
        print("This was called fro the class method")

How do i dynamically link the original function to the class, including docstrings?
And are kwargs the best way to pass the arguments, without repeating them in the definition of the class-method?

So when i type Foo.foo() in my IDE or jupyter notebook, i would like to see the docstring of foo().


问:
How can I get similarity rate between columns in different dataframes and filter by some value
I need to compute differences between rows in different dataframes. On one hand I have df1 with 150 different rows with specific phrases. On the other hand I have df2 with 250k of rows with any type of phrases. I want to compare each row in df1 with each row in df2 getting or labeling all the rows in df2 that have a value higher than a threshold (to be determinated) I use SequenceMatcher in order to get the similarity between them.

How could i do it? Any advice in order to do it in the more efficient way? How you code that?

df1 (len = 150)

Phrases

My cat is black

Dog is white

Peter is waiting

Dog is white

df2 (len = 250k)

Phrases

My cat is white

Dog is jumping

Marcos is waiting

Dog is white

Output:

Phrases
Labels

My cat is white
0.75

My cat is white
0

My cat is white
0

My cat is white
0.33

Dog is jumping
0.33

Dog is jumping
0.66

Dog is jumping
0.33

Dog is jumping
0.66

Marcos is waiting
0.33

Marcos is waiting
0.33

Marcos is waiting
0.66

Marcos is waiting
0.33

Dog is white
0.5

Dog is white
0.66

Dog is white
0.33

Dog is white
1


问:
In Viewpager2 position both same change 1 and 2 on next button click after position 0?
```<code>override fun onBindViewHolder(viewHolder: ViewHolder, position: Int) {
    if (position>0){
        val cropbitmapp1 = viewHolder.showgifadapter.crop()
        cropImageArray[position] = cropbitmapp1
    }
    val id = ii[position]
    Log.d("TAG", "onBindViewHolder: adapter position= $position")
    viewHolder.showgifadapter.setImageToCrop(id)

    if(position==0){
        val cropbitmapp1 = viewHolder.showgifadapter.crop()
        cropImageArray[position] = cropbitmapp1
    }
        binding.nextCropImage.setOnClickListener {
        val cropbitmapp1 = viewHolder.showgifadapter.crop()
        cropImageArray[position] = cropbitmapp1
        if (countBack < countNext && countBack >= 1) {
            countBack += 1
            binding.backCropImage.setText(countBack.toString())
        }
        binding.viewpagermain1.currentItem = binding.viewpagermain1.currentItem + 1
    }
}

</code>```

2022-12-22 12:50:59.327 1960-1960/com.example.signaturemakerpdfconverter D/TAG: onBindViewHolder: adapter position= 0
when start position is right 0
then on next click position change

2022-12-22 12:51:35.497 1960-1960/com.example.signaturemakerpdfconverter D/TAG: onBindViewHolder: adapter position= 1
2022-12-22 12:51:35.756 1960-1960/com.example.signaturemakerpdfconverter D/TAG: onBindViewHolder: adapter position= 2

Body:
override fun onBindViewHolder(viewHolder: ViewHolder, position: Int) {
    if (position>0){
        val cropbitmapp1 = viewHolder.showgifadapter.crop()
        cropImageArray[position] = cropbitmapp1
    }
    val id = ii[position]
    Log.d("TAG", "onBindViewHolder: adapter position= $position")
    viewHolder.showgifadapter.setImageToCrop(id)

    if(position==0){
        val cropbitmapp1 = viewHolder.showgifadapter.crop()
        cropImageArray[position] = cropbitmapp1
    }
        binding.nextCropImage.setOnClickListener {
        val cropbitmapp1 = viewHolder.showgifadapter.crop()
        cropImageArray[position] = cropbitmapp1
        if (countBack < countNext && countBack >= 1) {
            countBack += 1
            binding.backCropImage.setText(countBack.toString())
        }
        binding.viewpagermain1.currentItem = binding.viewpagermain1.currentItem + 1
    }
}

2022-12-22 12:50:59.327 1960-1960/com.example.signaturemakerpdfconverter D/TAG: onBindViewHolder: adapter position= 0
when start position is right 0
then on next click position change

2022-12-22 12:51:35.497 1960-1960/com.example.signaturemakerpdfconverter D/TAG: onBindViewHolder: adapter position= 1
2022-12-22 12:51:35.756 1960-1960/com.example.signaturemakerpdfconverter D/TAG: onBindViewHolder: adapter position= 2


问:
Mixed data time series forecasting for solar power output
What am I trying to achieve: lesser MAE in forecasting power output (global horizontal irradiance- ghi) for the next two hours.

Data available: sky images and several sensor's data(in a csv file) from a certain solar farm. The data is captured at a 10 minute interval for 12 hours each day from 6.30am to 6.30pm. Data is available from 2018 - 2022 November.

What have I tried: I built a CNN + LSTM model with two branches (1st branch - CNN for the images, 2nd branch - dense for the sensor data) which flattens and merges into one and is fed to the LSTM to recognize the pattern.

Input for the CNN + LSTM architecture: two hours of sequence data(timeseries) of images and respective sensor data at the same timestamp.

Output for the CNN + LSTM architecture: two hours of forecasted power output(ghi) values (12 values in total with 10 minutes interval).

Framework used: tensorflow/keras

Result: MAE = 0.08 in power output forecasting

Desired result: MAE <= 0.03 in power output forecasting

Latest model architecture idea: use two separate models:

Model 1.) use spatio-temporal (video prediction) model (eg: ConvLSTM, SA-ConvLSTM, etc.) to predict the frames for the next two hours using previous two hours images.

Model 2.) build a model to use forecasted frames(output of spatio-temporal model) with the input data as two hours of sensor data to predict the power output for next two hours.

Idea behind the second architecture: spatio-temporal models perform well in detecting patterns with data that has both space and time factor/features and such is my case. I believe that such a model will help me in detecting cloud movements accurately which affects the power output in a solar farm.

Need help with: I cannot understand the model architecture layers to use in the second model described above in order to use the forecasted frames(for next two hours) along with the sensor input(two hours input) to forecast the power output(for next two hours)

Eg: input duration: 9am to 11am (images and sensor data).
spatio-temporal model forecasts: 12 images at 10 minute intervals from 11am to 1pm using sky images only from 9am to 11am. ( I don't know if and how we can use sensor data directly in such models)

I want to develop a model which takes these forecasted frames (11am to 1pm)(coming from an already trained spatio-temporal model) and sensor data(9am to 11am) to forecast power output (ghi in W/m^2) for 11am to 1pm.
I am not able to understand how to use forecasted frames and sensor data to build the second model architecture (what layers should I use: LSTM, dense, CNN? and where?) for this.

I am willing to try other architectures and ideas as long as they make use of sky images and sensor data to forecast power output.

Thank you for all the responses in advance.


问:
How to identify any one IP is active in sub net mash (range) or non of the IP
I have a subnet and i want to know is there any ip in that range is active or not. In that range any one IP can able to ping and  return the value, if no IP is pingable it has to return none.

e.g: 10.116.126.0/24

I tried but in both scenarios it returning TRUE.


问:
How to use array of objects with the Symfony OptionsResolver Component?
I have the following JSON request structure which I want to validate with the Symfony OptionsResolver and Validator Component:

```<code>{
  "rules": [
    {
      "rule_code": {
        "code": "",
        "message": ""
      }
    },
    {
      "rule_code": {
        "code": "",
        "message": ""
      }
    }
  ]
}
</code>```

But whenever I try to use this structure, I get the following error:

```<code>"The options \"0\", \"1\" do not exist. Defined options are: \"rule_code\"."
</code>```

Can someone provide any possible solution to resolve this issue with array of objects?

I have tried using setAllowedTypes for rules as array[] and the configureParameters for CreateTicketParams class is as follows:

```<code>protected function configureParameters(OptionsResolver $resolver)
{
    $resolver
        ->setRequired('rules')
        ->setAllowedTypes('rules', 'array[]')
        ->setAllowedValues('rules', $this->validatorFactory->createClosureForIterator([
            new Assert\NotBlank(),
        ]))
    ->setNormalizer('rules', function (Options $options, $values) {
            $rulesParams = new CreateTicketRulesParams($this->validatorFactory, $this->beanManager);
        $rulesParams->configure($values);
            return $rulesParams;
        });
}
</code>```

configureParameters for CreateTicketRulesParams class:

```<code>protected function configureParameters(OptionsResolver $resolver)
{
    $resolver
        ->setDefined('rule_code')
        ->setAllowedTypes('rule_code', 'array')
        ->setAllowedValues('rule_code', $this->validatorFactory->createClosure([
            new Assert\NotBlank(),
        ]));
}
</code>```

Since, I have already specified array[] in setAllowedTypes for rules, I am expecting it to iterate through rules array and check if there is a rule_code child present but it's not working as expected.

Body:
I have the following JSON request structure which I want to validate with the Symfony OptionsResolver and Validator Component:

{
  "rules": [
    {
      "rule_code": {
        "code": "",
        "message": ""
      }
    },
    {
      "rule_code": {
        "code": "",
        "message": ""
      }
    }
  ]
}

But whenever I try to use this structure, I get the following error:

"The options \"0\", \"1\" do not exist. Defined options are: \"rule_code\"."

Can someone provide any possible solution to resolve this issue with array of objects?

I have tried using setAllowedTypes for rules as array[] and the configureParameters for CreateTicketParams class is as follows:

protected function configureParameters(OptionsResolver $resolver)
{
    $resolver
        ->setRequired('rules')
        ->setAllowedTypes('rules', 'array[]')
        ->setAllowedValues('rules', $this->validatorFactory->createClosureForIterator([
            new Assert\NotBlank(),
        ]))
    ->setNormalizer('rules', function (Options $options, $values) {
            $rulesParams = new CreateTicketRulesParams($this->validatorFactory, $this->beanManager);
        $rulesParams->configure($values);
            return $rulesParams;
        });
}

configureParameters for CreateTicketRulesParams class:

protected function configureParameters(OptionsResolver $resolver)
{
    $resolver
        ->setDefined('rule_code')
        ->setAllowedTypes('rule_code', 'array')
        ->setAllowedValues('rule_code', $this->validatorFactory->createClosure([
            new Assert\NotBlank(),
        ]));
}

Since, I have already specified array[] in setAllowedTypes for rules, I am expecting it to iterate through rules array and check if there is a rule_code child present but it's not working as expected.


问:
Loading module error when using hpdf in lua
I tried to execute the following code
local hpdf = require "hpdf"

```<code>local pdf = hpdf.New()
if pdf then
  local page = hpdf.AddPage(pdf)
  local height = hpdf.Page_GetHeight(page)
  local width = hpdf.Page_GetWidth(page)
  local font = hpdf.GetFont(pdf, "Helvetica")
  hpdf.Page_SetFontAndSize(page, font, 24)
  hpdf.Page_BeginText(page)
  hpdf.Page_TextOut(page, 60, height - 60, "Hello from Haru")
  hpdf.Page_EndText(page)
  hpdf.SaveToFile(pdf, "hello.pdf")
  hpdf.Free(pdf)
else
  io.write("Error creating PDF object\n")
end
</code>```

The error is
when execute the script
lua hello.lua

error
lua: error loading module 'hpdf' from file
'/usr/lib/lua/5.2/hpdf.so':
/usr/lib/lua/5.2/hpdf.so: undefined symbol:
HPDF_LoadPngImageFromFile2
stack traceback:
[C]: in ?
[C]: in function 'require'
hello.lua:1: in main chunk
[C]: in ?

I am new to lua.Any help would appreciated?

Body:
I tried to execute the following code
local hpdf = require "hpdf"

local pdf = hpdf.New()
if pdf then
  local page = hpdf.AddPage(pdf)
  local height = hpdf.Page_GetHeight(page)
  local width = hpdf.Page_GetWidth(page)
  local font = hpdf.GetFont(pdf, "Helvetica")
  hpdf.Page_SetFontAndSize(page, font, 24)
  hpdf.Page_BeginText(page)
  hpdf.Page_TextOut(page, 60, height - 60, "Hello from Haru")
  hpdf.Page_EndText(page)
  hpdf.SaveToFile(pdf, "hello.pdf")
  hpdf.Free(pdf)
else
  io.write("Error creating PDF object\n")
end

The error is
when execute the script
lua hello.lua

error
lua: error loading module 'hpdf' from file
'/usr/lib/lua/5.2/hpdf.so':
/usr/lib/lua/5.2/hpdf.so: undefined symbol:
HPDF_LoadPngImageFromFile2
stack traceback:
[C]: in ?
[C]: in function 'require'
hello.lua:1: in main chunk
[C]: in ?

I am new to lua.Any help would appreciated?


问:
What is scalable approch to create Zoom bot which can record meeting video with audio concurrently for multiple meeting?
I want to create Zoom bot which can record zoom meeting video with audio.

There are few approches

Browser automation based

a. Using puppeteer

b. Using selenium

Native app automation based

a. Using pyAutoGUI

Zoom API and SDK based

a. Using Zoom Meeting SDK

Virtual browser based

a. Using neko

Mostly I found example based on using pyAutoGUI which is not scalable even if I run that inside docker.

What should be right approach for creating bot which can join and record meeting parallelly?


问:
Linking Base with precompiled Writer in libreoffice
I am facing this new challenge in Libreoffice mainly because I lack of expertise in using databases. This database links have been created on Microsoft Office but I am sure they work on libreoffice as well. What I need to do is to load the record from the database so that I can generate a new document with all fields retrieved from the database.
I have thus my file Database.odb where I have a table with 14 columns and 78 records. the table records are in text format, or date. When I open Writer, I click on the field, then "edit field",  it prompts me with "error" and "General Error". I would click the first field as per logic and then ok, but once I close the edit field dialog the error keeps popping again.

I can further explain as I am sure I most probably have omitted important information, but I am sure this issue is an easy problem as all elements seem to be there but yet they need to be properly linked.


问:
Swift Xcode warning / Expression implicitly coerced from '[NSAttributedString.Key : UIFont?]' to '[NSAttributedString.Key : Any]'
I'm getting this warning  which is showing fairly randomly in XCode14.1, mainly at build but then disappears.

My code is :

```<code>  let attributes = [NSAttributedString.Key.font:UIFont(name: "HelveticaNeue-Bold", size: 14)]
        profile.tabBarItem.setTitleTextAttributes(attributes, for: UIControl.State.normal)
</code>```

I have followed this SO thread :

Swift Expression implicitly coerced from 'Any??' to 'Any?'

but had no luck removing the error. I have tried:

```<code>let attributes:[NSAttributedString.Key:UIFont?] = [NSAttributedString.Key.font:UIFont(name: "HelveticaNeue-Bold", size: 14)]
        profile.tabBarItem.setTitleTextAttributes(attributes, for: UIControl.State.normal)
</code>```

and

let attributes:[NSAttributedString.Key:UIFont?]? = [NSAttributedString.Key.font:UIFont(name: "HelveticaNeue-Bold", size: 14)]
profile.tabBarItem.setTitleTextAttributes(attributes, for: UIControl.State.normal)

But the warning persists.

Any help appreciated.

Thanks

Body:
I'm getting this warning  which is showing fairly randomly in XCode14.1, mainly at build but then disappears.

My code is :

  let attributes = [NSAttributedString.Key.font:UIFont(name: "HelveticaNeue-Bold", size: 14)]
        profile.tabBarItem.setTitleTextAttributes(attributes, for: UIControl.State.normal)

I have followed this SO thread :

Swift Expression implicitly coerced from 'Any??' to 'Any?'

but had no luck removing the error. I have tried:

let attributes:[NSAttributedString.Key:UIFont?] = [NSAttributedString.Key.font:UIFont(name: "HelveticaNeue-Bold", size: 14)]
        profile.tabBarItem.setTitleTextAttributes(attributes, for: UIControl.State.normal)

and

let attributes:[NSAttributedString.Key:UIFont?]? = [NSAttributedString.Key.font:UIFont(name: "HelveticaNeue-Bold", size: 14)]
profile.tabBarItem.setTitleTextAttributes(attributes, for: UIControl.State.normal)

But the warning persists.

Any help appreciated.

Thanks


问:
Timed out retrying after 60000ms: Expected to find element: undefined, but never found it
```<code>.click()
  843 |                 cy.xpath(this.clickOnclickOnClearLocationTextboxFilter)
> 844 |                 .should('be.visible')
      |                  ^
  845 |                 .click()
  846 |                 }
</code>```

I just trying to click on side filter bar close button under a textbox, but it throws an error so just wanted to know how can I resolve it to by using cypress

Body:
.click()
  843 |                 cy.xpath(this.clickOnclickOnClearLocationTextboxFilter)
> 844 |                 .should('be.visible')
      |                  ^
  845 |                 .click()
  846 |                 }

I just trying to click on side filter bar close button under a textbox, but it throws an error so just wanted to know how can I resolve it to by using cypress