October 23, 2024
Chicago 12, Melborne City, USA
Android

Error on Using AutoComplete Widget (showing error controller is dispose)

when i am using AutoComplete widget in flutter to take name from list and fill manually also .Now i want to assign a value to its controller and close screen .its ok but if open again it show error , controller is dispose import 'package:shunya_core/models/claims_model/claims_list_model.dart' as c; class OfficeAndEpcExpenseScreen extends StatefulWidget { cData.Data? data; String

Read More
PHP

php ftp fail to keep source file after download into local

Can someone elaborate how this function ftp_get() work? I use this function in code, but file keep missing in source directory either download success or fail. How this function send the file into local? What method did it use? Copy and paste method or cut and paste? You need to sign in to view this

Read More
python

Cannot connect to postgres databes over prisma python client. “prisma.engine.errors.EngineConnectionError: Could not connect to the query engine”

I am trying to use prisma python client to connect to postgres which is deploied locally in docker. However it always report error prisma.engine.errors.EngineConnectionError: Could not connect to the query engine. Can anybody help to resolve this issue? Note: I am using Nextjs as front-end and Python as backend, prisma works fine in nextjs and

Read More
pdf

Delete content from PDF using Python

I need to cleanse a large number of PDFs from PDF content and leave only an image inside (the structure of the PDFs is always the same). Here is a screenshot of the PDF content: The image marked in yellow is the one I want to keep, all those Paths and Texts and the other

Read More
security

Is running a docker container for a single ephemeral process with root user really a security risk in production?

I’m on a project where i have to minimize architecture security concerns. I’ve built a whole micro-services infrastructure with docker containers. To secure the host machine side, the docker environment is in rootless mode. In addition, all the containers are running with non-root user. I’m using docker compose secrets to allow some services to get

Read More
SQL

Two updates to two tables

I have to update two tables UPDATE TableA SET a="a", b = 'b', date = GETDATE() WHERE c="c" IF @@ROWCOUNT = 0 INSERT INTO TableA (c, a, b, date) VALUES ('c', 'a', 'b', GETDATE()) UPDATE TableB SET d = 'd', date = GETDATE() WHERE e="e" AND f="f" IF @@ROWCOUNT = 0 INSERT INTO TableB (e,

Read More
jQuery

AJAX mistake make 500 error after insert to database table

im newbie, i have 500 error, when i wanna send new information in DB. <!DOCTYPE html> <html lang="ru"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="X-UA-Compatible"> <title>WEB ID</title> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&display=swap" rel="stylesheet"> <link rel="stylesheet" href="style.css"> </head> <body> <div class="change-light"> <button>Press to <span>Light</span></button> </div> <div class="form-block light"> <div class="header">

Read More
HTML

How to remove styling if the heght of the screen less than the element height

I have centered the element by the height of the screen using absolute positioning. However, when the height of the screen is less than the element width, it is cutting the part of the element making its top unreachable. How can I add and remove styling if the height of the screen is less than

Read More
Android

onMessage not triggering on Android (working fine on iOS)

I’m implementing a web scraper in my managed Expo app, which requires injecting JavaScript to capture certain elements. Below is a snapshot of my WebView class: import Colors from 'constants/Colors' import React, { useRef } from 'react' import { StyleSheet, View } from 'react-native' import { WebView } from 'react-native-webview' import .... const buildIdDefault="00000000.00_v0.00.0" const

Read More
PHP

Compare two meta key values with between value

Records in CPT are as follow Name Size From Size To Demo 1 900 6000 Demo 2 5000 6000 Demo 3 7500 12000 Demo 4 2500 7500 Demo 5 9000 12000 $meta_query = array( 'relation' => 'OR', array( array( 'key' => '_size', 'value' => array(1000, 5000), 'type' => 'decimal(10, 2)', 'compare' => 'between' ), array(

Read More