问:
How to copy and paste a get() function into a web page?
I am trying to automate web entry for my work, I was wondering, is there a way to copy a user entry and paste it into the web page? I have 0 experience with this kind of stuff so any help is much appreciated!

I'll attach the code below:

import tkinter as tk
import pyautogui
pyautogui.FAILSAFE = True

#Define text to copy into website

def bus():
    business.get()
def ECN():
    eCName.get("1.0",END)
def ECnum():
    eCNumber.get("1.0",END)
def AOW():
    aOWaste.get("1.0",END)
def DOP():
    dOPickup.get("1.0",END)
def ad():
    address.get("1.0",END)

def clear_text():
   text.delete(0, END)

#Key press (Put above window creation and change close to WTC for command)
#Page 1 of WTC
def WTC():
    pyautogui.click(x=505, y=282, clicks=1, interval=0.03, button='left')
    pyautogui.press('f5')
    time.sleep(3)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('right',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    #Business name entry
    #Need to find a way to store business
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.hotkey('ctrl','c',interval=0.1)
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.hotkey('ctrl','v',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    #Emergency contact name
    #Need a way to store ecName
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.hotkey('ctrl','c',interval=0.1)
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.hotkey('ctrl','v',interval=0.1)
    pyautogui.press('tab')
    #Emergency contact number
    #Need a way to store contact number
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.hotkey('ctrl','c',interval=0.1)
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.hotkey('ctrl','v',interval=0.1)
    pyautogui.hotkey('tab', interval=0.1)
    pyautogui.hotkey('enter', interval=0.1)
    time.sleep(5)
    #Page 2 of WTC
    #move mouse to middle of page (need to find coordinates)
    pyautogui.click(x=500, y=339, clicks=1, interval=0.03, button='left')
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter', interval='0.1')
    time.sleep(2)
    #Waste code
    pyautogui.press('tab',interval='0.1')
    pyautogui.press('tab',interval='0.1')
    pyautogui.write('J120', interval=0.1)
    time.sleep(1)
    pyautogui.press('enter', interval='0.1')
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter', interval=0.1)
    time.sleep(1)
    #Intended treatment option
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('down',interval=0.1)
    pyautogui.press('down',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter', interval='0.05')
    time.sleep(4)
    #Waste Origin
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.write('9419', interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(1.5)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(1)
    #Amount of waste, unit of waste, dispatch date and contaminant code
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    #Need a way to store amount of waste
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.hotkey('ctrl','c',interval=0.1)
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.hotkey('ctrl','v',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('down',interval=0.1)
    pyautogui.press('down',interval=0.1)
    pyautogui.press('down',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    #Need a way to store unit of waste
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.hotkey('ctrl','c',interval=0.1)
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.hotkey('ctrl','v',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.write('67',interval=0.1)
    time.sleep(1.5)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(8)
    #WTC Page 3
    #Map
    pyautogui.click(x=699, y=475, clicks=1, interval=0.05, button='left')
    pyautogui.press('up',interval=0.1)
    pyautogui.press('enter', interval=0.1)
    time.sleep(1)
    #Address of pickup
    #Need a way to store address
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.hotkey('ctrl','c',interval=0.1)
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.hotkey('ctrl','v',interval=0.1)
    time.sleep(1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    #Wait time incase it picked the wrong address
    time.sleep(2)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(7)
    #WTC Page 4
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(5)
    #Transporter
    pyautogui.press('tab',interval=0.1)
    pyautogui.write('J.J',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    #Reciever
    time.sleep(2)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.write('J.J',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(2)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    #WTC Page 5
    time.sleep(3)
    #Add in last enter once confirmed working
    pyautogui.press('tab')

def ContPage4():
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(5)
    #Transporter
    pyautogui.press('tab',interval=0.1)
    pyautogui.write('J.J',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    #Reciever
    time.sleep(2)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.write('J.J',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(2)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    #WTC Page 5
    time.sleep(3)
    #Add in last enter once confirmed working
    pyautogui.press('tab')

window = tk.Tk()
#Business name
label = tk.Label(text="Business name").grid(row=1, column=0)
business= tk.Entry().grid(row=1, column=1)
#Emergency contact name
label = tk.Label(text="Emergency contact name").grid(row=2, column=0)
eCName=entry = tk.Entry().grid(row=2, column=1)
#Emergency contact number
label = tk.Label(text="Emergency contact number").grid(row=3, column=0)
eCNumber= tk.Entry().grid(row=3, column=1)
#Amount of waste
label = tk.Label(text="Amount of waste").grid(row=4, column=0)
aOWaste=entry = tk.Entry().grid(row=4, column=1)
#Date of pickup
label = tk.Label(text="Date of Pickup DD/MM/YYYY").grid(row=5, column=0)
dOPickup= tk.Entry().grid(row=5, column=1)
#Address
label = tk.Label(text="Address").grid(row=6, column=0)
address= tk.Entry().grid(row=6, column=1)
#Start Button
button = tk.Button(
text="Start",
width=5,
height=2,
command= WTC
).grid(row=8,column=0)
#Continue from page 4 Button
button = tk.Button(
text="Page 4 ->",
width=8,
height=2,
command= ContPage4
).grid(row=8,column=1)

window.mainloop()
```

I tried pyautogui.write(business.get()) as an example in the wtc chain but it errors saying that there is nothing there. I dont know the error off the top of my head as I'm at work currently and been doing it on my home computer. I also tried alt tabing to the window with the information and copy and pasting from that but the window is not responsive.

Body:
I am trying to automate web entry for my work, I was wondering, is there a way to copy a user entry and paste it into the web page? I have 0 experience with this kind of stuff so any help is much appreciated!

I'll attach the code below:

import tkinter as tk
import pyautogui
pyautogui.FAILSAFE = True

#Define text to copy into website

def bus():
    business.get()
def ECN():
    eCName.get("1.0",END)
def ECnum():
    eCNumber.get("1.0",END)
def AOW():
    aOWaste.get("1.0",END)
def DOP():
    dOPickup.get("1.0",END)
def ad():
    address.get("1.0",END)

def clear_text():
   text.delete(0, END)

#Key press (Put above window creation and change close to WTC for command)
#Page 1 of WTC
def WTC():
    pyautogui.click(x=505, y=282, clicks=1, interval=0.03, button='left')
    pyautogui.press('f5')
    time.sleep(3)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('right',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    #Business name entry
    #Need to find a way to store business
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.hotkey('ctrl','c',interval=0.1)
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.hotkey('ctrl','v',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    #Emergency contact name
    #Need a way to store ecName
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.hotkey('ctrl','c',interval=0.1)
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.hotkey('ctrl','v',interval=0.1)
    pyautogui.press('tab')
    #Emergency contact number
    #Need a way to store contact number
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.hotkey('ctrl','c',interval=0.1)
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.hotkey('ctrl','v',interval=0.1)
    pyautogui.hotkey('tab', interval=0.1)
    pyautogui.hotkey('enter', interval=0.1)
    time.sleep(5)
    #Page 2 of WTC
    #move mouse to middle of page (need to find coordinates)
    pyautogui.click(x=500, y=339, clicks=1, interval=0.03, button='left')
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter', interval='0.1')
    time.sleep(2)
    #Waste code
    pyautogui.press('tab',interval='0.1')
    pyautogui.press('tab',interval='0.1')
    pyautogui.write('J120', interval=0.1)
    time.sleep(1)
    pyautogui.press('enter', interval='0.1')
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter', interval=0.1)
    time.sleep(1)
    #Intended treatment option
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('down',interval=0.1)
    pyautogui.press('down',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter', interval='0.05')
    time.sleep(4)
    #Waste Origin
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.write('9419', interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(1.5)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(1)
    #Amount of waste, unit of waste, dispatch date and contaminant code
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    #Need a way to store amount of waste
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.hotkey('ctrl','c',interval=0.1)
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.hotkey('ctrl','v',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('down',interval=0.1)
    pyautogui.press('down',interval=0.1)
    pyautogui.press('down',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    #Need a way to store unit of waste
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.hotkey('ctrl','c',interval=0.1)
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.hotkey('ctrl','v',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.write('67',interval=0.1)
    time.sleep(1.5)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(8)
    #WTC Page 3
    #Map
    pyautogui.click(x=699, y=475, clicks=1, interval=0.05, button='left')
    pyautogui.press('up',interval=0.1)
    pyautogui.press('enter', interval=0.1)
    time.sleep(1)
    #Address of pickup
    #Need a way to store address
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.press('tab',interval=0.1)
    #pyautogui.hotkey('ctrl','c',interval=0.1)
    #pyautogui.hotkey('alt','tab',interval=0.1)
    #pyautogui.hotkey('ctrl','v',interval=0.1)
    time.sleep(1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    #Wait time incase it picked the wrong address
    time.sleep(2)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(7)
    #WTC Page 4
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(5)
    #Transporter
    pyautogui.press('tab',interval=0.1)
    pyautogui.write('J.J',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    #Reciever
    time.sleep(2)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.write('J.J',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(2)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    #WTC Page 5
    time.sleep(3)
    #Add in last enter once confirmed working
    pyautogui.press('tab')

def ContPage4():
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(5)
    #Transporter
    pyautogui.press('tab',interval=0.1)
    pyautogui.write('J.J',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    #Reciever
    time.sleep(2)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.write('J.J',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    time.sleep(2)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('tab',interval=0.1)
    pyautogui.press('enter',interval=0.1)
    #WTC Page 5
    time.sleep(3)
    #Add in last enter once confirmed working
    pyautogui.press('tab')

window = tk.Tk()
#Business name
label = tk.Label(text="Business name").grid(row=1, column=0)
business= tk.Entry().grid(row=1, column=1)
#Emergency contact name
label = tk.Label(text="Emergency contact name").grid(row=2, column=0)
eCName=entry = tk.Entry().grid(row=2, column=1)
#Emergency contact number
label = tk.Label(text="Emergency contact number").grid(row=3, column=0)
eCNumber= tk.Entry().grid(row=3, column=1)
#Amount of waste
label = tk.Label(text="Amount of waste").grid(row=4, column=0)
aOWaste=entry = tk.Entry().grid(row=4, column=1)
#Date of pickup
label = tk.Label(text="Date of Pickup DD/MM/YYYY").grid(row=5, column=0)
dOPickup= tk.Entry().grid(row=5, column=1)
#Address
label = tk.Label(text="Address").grid(row=6, column=0)
address= tk.Entry().grid(row=6, column=1)
#Start Button
button = tk.Button(
text="Start",
width=5,
height=2,
command= WTC
).grid(row=8,column=0)
#Continue from page 4 Button
button = tk.Button(
text="Page 4 ->",
width=8,
height=2,
command= ContPage4
).grid(row=8,column=1)

window.mainloop()

I tried pyautogui.write(business.get()) as an example in the wtc chain but it errors saying that there is nothing there. I dont know the error off the top of my head as I'm at work currently and been doing it on my home computer. I also tried alt tabing to the window with the information and copy and pasting from that but the window is not responsive.


来源: stackexchange

问:
React - infinite loop calling function in JSX
I'm calling a function in my JSX that uses a value passed through props.

```<code>render() {
        return (
            <tr key={this.props.breakdownId}>
                <td>
                    {this.updateRate(this.props.rateType)}
                </td>

            </tr>
        )
    }
</code>```

It is this function, which tells it which values to return for display.

```<code>updateRate(rateType) {
        if (rateType === "non-profit") {
            const index = this.state.rateChartNonProfit.findIndex(type => type.type === this.state.employee_type);
            let rate = this.state.rateChartNonProfit[index].rate;
            this.updateTotals(rate);
            return rate;
        } else {
            const index = this.state.rateChartForProfit.findIndex(type => type.type === this.state.employee_type);
            let rate = this.state.rateChartForProfit[index].rate;
            this.updateTotals(rate);
            return rate;
        }
    }
</code>```

and that in turns calls a third function which does the math and updates the database...

```<code>updateTotals(rate) {
        const totalHours = parseInt(this.state.hours1) + parseInt(this.state.hours2) + parseInt(this.state.hours3) + parseInt(this.state.hours4) + parseInt(this.state.hours5) + parseInt(this.state.hours6) + parseInt(this.state.hours7) + parseInt(this.state.hours8) + parseInt(this.state.hours9) + parseInt(this.state.hours10) + parseInt(this.state.hours11) + parseInt(this.state.hours12);

        const totalCosts = parseInt(totalHours) * parseInt(this.state.cost);

        const totalBill = parseInt(totalHours * parseInt(rate));

        const margin = (parseFloat(totalBill) - parseFloat(totalCosts)) / parseFloat(totalBill);

        this.updateDB(totalHours, totalCosts, totalBill, margin);
    };
</code>```

Set data to go to the database...

```<code>updateDB  = debounce((totalHours, totalCosts, totalBill, margin) => {
        let data = {
            total_hours: totalHours,
            total_costs: totalCosts,
            total_bill: totalBill,
            margin: margin
        };
        this.updateBreakdown(data);
    }, 1500);
</code>```

and then actual API call

```<code>updateBreakdown(data) {
        fetch(API_URL + `/billingcalculator/breakdown/update`, {
            method: "PUT",
            body: JSON.stringify({
                breakdownId: this.props.breakdownId,
                data: data,
            }),
            headers: {"Content-Type": "application/json"},
        })
            .then((res) => {
                if (!res.ok) {
                    throw new Error();
                }
                return res.json();
            })
            .then((data) => console.log(data))
            .then(() => this.props.getSectionBreakdowns(this.props.secId))
            .catch((err) => console.log(err))
    }
</code>```

at the end of this, is is calling a function from the parent so that it can grab that data and use it for something else.  But then it just loops indefinitely.  How can I stop that?

ContentLicense: CC BY-SA 4.0

Body:
I'm calling a function in my JSX that uses a value passed through props.

render() {
        return (

                    {this.updateRate(this.props.rateType)}

        )
    }

It is this function, which tells it which values to return for display.

updateRate(rateType) {
        if (rateType === "non-profit") {
            const index = this.state.rateChartNonProfit.findIndex(type => type.type === this.state.employee_type);
            let rate = this.state.rateChartNonProfit[index].rate;
            this.updateTotals(rate);
            return rate;
        } else {
            const index = this.state.rateChartForProfit.findIndex(type => type.type === this.state.employee_type);
            let rate = this.state.rateChartForProfit[index].rate;
            this.updateTotals(rate);
            return rate;
        }
    }

and that in turns calls a third function which does the math and updates the database...

updateTotals(rate) {
        const totalHours = parseInt(this.state.hours1) + parseInt(this.state.hours2) + parseInt(this.state.hours3) + parseInt(this.state.hours4) + parseInt(this.state.hours5) + parseInt(this.state.hours6) + parseInt(this.state.hours7) + parseInt(this.state.hours8) + parseInt(this.state.hours9) + parseInt(this.state.hours10) + parseInt(this.state.hours11) + parseInt(this.state.hours12);

        const totalCosts = parseInt(totalHours) * parseInt(this.state.cost);

        const totalBill = parseInt(totalHours * parseInt(rate));

        const margin = (parseFloat(totalBill) - parseFloat(totalCosts)) / parseFloat(totalBill);

        this.updateDB(totalHours, totalCosts, totalBill, margin);
    };

Set data to go to the database...

updateDB  = debounce((totalHours, totalCosts, totalBill, margin) => {
        let data = {
            total_hours: totalHours,
            total_costs: totalCosts,
            total_bill: totalBill,
            margin: margin
        };
        this.updateBreakdown(data);
    }, 1500);

and then actual API call

updateBreakdown(data) {
        fetch(API_URL + `/billingcalculator/breakdown/update`, {
            method: "PUT",
            body: JSON.stringify({
                breakdownId: this.props.breakdownId,
                data: data,
            }),
            headers: {"Content-Type": "application/json"},
        })
            .then((res) => {
                if (!res.ok) {
                    throw new Error();
                }
                return res.json();
            })
            .then((data) => console.log(data))
            .then(() => this.props.getSectionBreakdowns(this.props.secId))
            .catch((err) => console.log(err))
    }

at the end of this, is is calling a function from the parent so that it can grab that data and use it for something else.  But then it just loops indefinitely.  How can I stop that?


问:
Errors trying to install JCL in Delphi Alexandria
I am attempting to install the JCL library into Delphi RAD Studio 11. Git placed the jcl tree in my Users directory (say C:\Users\xxx); I followed instructions and made sure I updated the modules, etc.

I then attempted to execute the install.bat file, located in the C:\Users\xxx\jcl\jcl directory. When I did that I got a message to the effect that my version of RAD Studio/Delphi does not support command line compiling. That's fine, I simply opened the JDIInstaller.bdsproj (located in the C:\Users\xxx\jcl\jcl\installer folder) with RAD Studio and built it, successfully.

I then tried running the project from within RAD Studio, but I couldn't, I got an error message telling me to shut down all running instances of Delphi. Instead, I ran the EXE file directly from the C:\Users\xxx\jcl\jcl\bin folder; it ran to completion and said the installation finished. So far, so good. I should note that the JCL installer set the BPL path to C:\Users\Public\Documents\Embarcadero\Studio\22.0\Bpl and the DCP path to C:\Users\xxx\jcl\jcl\lib\d28\win32.

The issue is this: When I then go to open RAD Studio, I get a number of messages like below. The text of the error message is:

Can't load package C:\Users\Public\Documents\Embarcadero\Studio\22.0\Bpl\JclBaseExpert280.bpl.

The specified module could not be found.

Do you want to attempt to load this package the next time a package is loaded?

This dialog is repeated an additional six times (i.e. there are a total of seven messages). The file names are as follows (they all end with "Expert280.bpl", so I'm just giving the beginning part): Debug, FavoriteFolders, ProjectAnalysis, Repository, JCLSIMDView, JCLStackTraceViewer.

If I open Components->Install Packages in the RAD Studio IDE, the seven files appear in the Design Packages list, but unchecked. They all appear as "File C:\Users\Public\Documents\Embarcadero\Studio\22.0\Bpl" followed by the specific file name.

I checked, and the files exist in that location, but I know from my research that the message can be misleading; i.e., the message is returned by Windows which may be looking for a support file.

I don't know where to go from here.

I should note that previously I attempted to install JCL/JVCL into RAD Studio 2010 and initially got the same error message, but solved it by using a more recent version of JCL. However, there IS no more recent version of JCL that I can find.

Of course, it may be this cannot be done; i.e. install JCL/JVCL into Alexandria. Any information whether this is the case and, if not, what I might try would be appreciated.


问:
Why do I have to use style= to get the height and width to work in next/image?
```<code>import Image from 'next/image';

<Image src={meuItem.ImageUrl}
width={310}
height={260}
style={{ width: '310px', height: '260px' }} />
</code>```

For some reason it seems like the next/image component from nextjs doesn't respect the width and height property.

The only way I could get it to work was to add a style property and set the width and the height with that.

It's strange becuase if I remove the the properties from the Image component, nextjs throughs an error, saying that it is expecting those properties.

So if you have to put them in, then why doesn't it actually apply them?

Body:
import Image from 'next/image';

<Image src={meuItem.ImageUrl}
width={310}
height={260}
style={{ width: '310px', height: '260px' }} />

For some reason it seems like the next/image component from nextjs doesn't respect the width and height property.

The only way I could get it to work was to add a style property and set the width and the height with that.

It's strange becuase if I remove the the properties from the Image component, nextjs throughs an error, saying that it is expecting those properties.

So if you have to put them in, then why doesn't it actually apply them?


问:
How to use image url with a query string in discord.py embed
Code:

embed.set_thumbnail(url="https://firebasestorage.googleapis.com/v0/b/sandtable-8d0f7.appspot.com/o/creations%2F" + id + ".png?alt=media")
```

result

my best guess is that discord checks to make sure there's a .png at the end, however the image url requires ?alt=media to return an image

I tried adding #.png at the end, but it didn't change the result

Body:
Code:

embed.set_thumbnail(url="https://firebasestorage.googleapis.com/v0/b/sandtable-8d0f7.appspot.com/o/creations%2F" + id + ".png?alt=media")

result

my best guess is that discord checks to make sure there's a .png at the end, however the image url requires ?alt=media to return an image

I tried adding #.png at the end, but it didn't change the result


问:
Chrome reports my static HTML website website is a faulty xml file whilst Edge just says ‘page isn’t working’
Chrome reports my static HTML website website is a faulty xml file whilst Edge just says ‘page isn’t working’.

The HTML code in my GoogleCloud bucket displays and works correctly when called by
https://storage.googleapis.com/abacus-aa9/index.html

It fails when called by my GoogleCloud URL items   abacusarts.org.uk   or 34.111.180.80

Help please.  Are the problems in my CloudGoogle entries, my GoDaddy DNS, or both.?

Many thanks in advance. Graeme.

My Chrome search for  AbacusArts.org.uk  gives this screen display

```<code>https://www.abacusarts.org.uk/
=========================================================
This XML file does not appear to have any style information associated with it.  The document tree is shown below.
---------------------------------------------------
<ListBucketResult xmlns="http://doc.s3.amazonaws.com/2006-03-01">
<Name>abacus-aa9</Name>
<Prefix/>
<Marker/>
<IsTruncated>false</IsTruncated>
<Contents>
<Key>AA-gmail.jpg</Key>
<Generation>1672222666184747</Generation>
<MetaGeneration>1</MetaGeneration>
<LastModified>2022-12-28T10:17:46.186Z</LastModified>
<ETag>"1b04d81a17b8c46240bc46d29107efa7"</ETag>
<Size>2434</Size>
</Contents>
<Contents>
  ...snip.. similar info for all pages ====.
</Contents>
</ListBucketResult>
</code>```

=========================================================

Additional info.

My CloudGoogle bucket contains a public set of static HTML pages which display and work correctly using this in a browser  https://storage.googleapis.com/abacus-aa9/index.html

My related CloudGoogle load balancer shows
Name       : aa9-load-balancer
Certificate: abacusarts-ssl

Domain     : www.abacusarts.org.uk
IP address : 34.111.180.80   and port :443

My CloudGoogle VPC network front end shows
External address: https://34.111.180.80/

Target: aa9-load-balancer-target-proxy

4.My domain name is  AbacusArts.org.uk  registered at GoDaddy where I have included this in the DNS records
NAME          TYPE     DATA
@             A        34.111.180.80

Testing several days later,
AbacusArts.org.uk  in Chrome says its an xml file with missing style info.
34.111.180.80     in Edge and Chrome says Not working no data
AbacusArts.org.uk  in Edge says Not working no data.

Blog suggestions which I have not tried are.

add this to GoDaddy DNS
NAME    TYPE    VALUE    TTL
CNAME   WWW      @     default

creating a DNS zone page.
Zone type: Public.

Name:  aa9-zone

DNS name suffix: abacusarts.org.uk

DNSSEC: Off

Body:
Chrome reports my static HTML website website is a faulty xml file whilst Edge just says ‘page isn’t working’.

The HTML code in my GoogleCloud bucket displays and works correctly when called by
https://storage.googleapis.com/abacus-aa9/index.html

It fails when called by my GoogleCloud URL items   abacusarts.org.uk   or 34.111.180.80

Help please.  Are the problems in my CloudGoogle entries, my GoDaddy DNS, or both.?

Many thanks in advance. Graeme.

My Chrome search for  AbacusArts.org.uk  gives this screen display

https://www.abacusarts.org.uk/
=========================================================
This XML file does not appear to have any style information associated with it.  The document tree is shown below.
---------------------------------------------------
<ListBucketResult xmlns="http://doc.s3.amazonaws.com/2006-03-01">
<Name>abacus-aa9</Name>
<Prefix/>
<Marker/>
<IsTruncated>false</IsTruncated>
<Contents>
<Key>AA-gmail.jpg</Key>
<Generation>1672222666184747</Generation>
<MetaGeneration>1</MetaGeneration>
<LastModified>2022-12-28T10:17:46.186Z</LastModified>
<ETag>"1b04d81a17b8c46240bc46d29107efa7"</ETag>
<Size>2434</Size>
</Contents>
<Contents>
  ...snip.. similar info for all pages ====.
</Contents>
</ListBucketResult>

=========================================================

Additional info.

My CloudGoogle bucket contains a public set of static HTML pages which display and work correctly using this in a browser  https://storage.googleapis.com/abacus-aa9/index.html

My related CloudGoogle load balancer shows
Name       : aa9-load-balancer
Certificate: abacusarts-ssl

Domain     : www.abacusarts.org.uk
IP address : 34.111.180.80   and port :443

My CloudGoogle VPC network front end shows
External address: https://34.111.180.80/

Target: aa9-load-balancer-target-proxy

4.My domain name is  AbacusArts.org.uk  registered at GoDaddy where I have included this in the DNS records
NAME          TYPE     DATA
@             A        34.111.180.80

Testing several days later,
AbacusArts.org.uk  in Chrome says its an xml file with missing style info.
34.111.180.80     in Edge and Chrome says Not working no data
AbacusArts.org.uk  in Edge says Not working no data.

Blog suggestions which I have not tried are.

add this to GoDaddy DNS
NAME    TYPE    VALUE    TTL
CNAME   WWW      @     default

creating a DNS zone page.
Zone type: Public.

Name:  aa9-zone

DNS name suffix: abacusarts.org.uk

DNSSEC: Off


问:
Magenta Colormap match the Greens colormap in Matplotlib
I am publishing a paper and want to create a Magenta colormap just like the Greens/Blues default colormap. But I want the Magenta colormap to match the exact behavior of the Greens colormap like the same intensity change. How should I do that?</p>
```<code>plt.scatter(x=subset[x_column],y=(subset[y_column]),s=200,cmap='Greens_r',c=subset['distance'],edgecolor='black',linewidth=3,vmin=-0.5,vmax=0)
</code>```

Body:
I am publishing a paper and want to create a Magenta colormap just like the Greens/Blues default colormap. But I want the Magenta colormap to match the exact behavior of the Greens colormap like the same intensity change. How should I do that?

plt.scatter(x=subset[x_column],y=(subset[y_column]),s=200,cmap='Greens_r',c=subset['distance'],edgecolor='black',linewidth=3,vmin=-0.5,vmax=0)


问:
Why must Jetpack Compose tests be Instrumentation tests?
In this code lab, it says that “Compose tests are instrumented tests. This means they require a device (physical device or emulator) to run on.” This implies they must be in the androidTest package.

Can anyone explain why this is? I am able to run my compose tests as unit tests using Robolectric (test package) so not sure why the documentation explicitly calls this out.


问:
Applying methods conditionally across columns in a pivot table
Really enjoying chaining in polars. Almost feels like dplyr in R. Question: Is there a way to apply fill_null conditionally across columns in the table (i.e., replace with 0 for numerics and "0%" for str in the example below)? Like the old mutate_if in R-dplyr.

import polars as pl

scores = pl.DataFrame(
    {
        "zone": ["North", "North", "North", "South", "South", "East", "East", "East", "East"],
        "funding": ["yes", "yes", "no", "no", "no", "no", "no", "yes", "yes"],
        "score": [78, 39, 76, 56, 67, 89, 100, 55, 80],
    }
)

(
    scores.groupby(["zone", "funding"])
    .agg(pl.count().alias("count"))
    .with_columns(
        [
            pl.col("count").over("funding"),
            pl.format(
                "{}%",
                (pl.col("count") * 100 / pl.sum("count"))
                .over("funding")
                .round(2),
            ).alias("perc"),
        ]
    )
    .pivot(["count", "perc"], "zone", "funding")
    .with_columns(
        [
            pl.col("count_yes").fill_null(0),
            pl.col("perc_yes").fill_null("0%")
        ]
    )
)
```
<p>EDIT: Based on @jquiros' excellent suggestions the below works if you want to explicitly column types to apply the <code>is_null</code> method to columns of different types</p>
<pre class="lang-py prettyprint-override"><code>(
    scores.groupby(["zone", "funding"])
    .agg(pl.count().alias("count"))
    .with_columns(
        [
            pl.col("count").over("funding"),
            pl.format(
                "{}%",
                (pl.col("count") * 100 / pl.sum("count"))
                .over("funding")
                .round(2),
            ).alias("perc"),
        ]
    )
    .pivot(["count", "perc"], "zone", "funding")
    .with_columns(
        [
            pl.col("*").exclude(pl.Utf8).fill_null(0),
            pl.col(pl.Utf8).fill_null("0%")
        ]
    )
)
</code>```

Body:
Really enjoying chaining in polars. Almost feels like dplyr in R. Question: Is there a way to apply fill_null conditionally across columns in the table (i.e., replace with 0 for numerics and "0%" for str in the example below)? Like the old mutate_if in R-dplyr.

import polars as pl

scores = pl.DataFrame(
    {
        "zone": ["North", "North", "North", "South", "South", "East", "East", "East", "East"],
        "funding": ["yes", "yes", "no", "no", "no", "no", "no", "yes", "yes"],
        "score": [78, 39, 76, 56, 67, 89, 100, 55, 80],
    }
)

(
    scores.groupby(["zone", "funding"])
    .agg(pl.count().alias("count"))
    .with_columns(
        [
            pl.col("count").over("funding"),
            pl.format(
                "{}%",
                (pl.col("count") * 100 / pl.sum("count"))
                .over("funding")
                .round(2),
            ).alias("perc"),
        ]
    )
    .pivot(["count", "perc"], "zone", "funding")
    .with_columns(
        [
            pl.col("count_yes").fill_null(0),
            pl.col("perc_yes").fill_null("0%")
        ]
    )
)

EDIT: Based on @jquiros' excellent suggestions the below works if you want to explicitly column types to apply the is_null method to columns of different types

(
    scores.groupby(["zone", "funding"])
    .agg(pl.count().alias("count"))
    .with_columns(
        [
            pl.col("count").over("funding"),
            pl.format(
                "{}%",
                (pl.col("count") * 100 / pl.sum("count"))
                .over("funding")
                .round(2),
            ).alias("perc"),
        ]
    )
    .pivot(["count", "perc"], "zone", "funding")
    .with_columns(
        [
            pl.col("*").exclude(pl.Utf8).fill_null(0),
            pl.col(pl.Utf8).fill_null("0%")
        ]
    )
)


问:
MDB Error Element not present in library. There is MDBCarouselInner element which is not in library
it says MDBCarouselInner is not in mdb-react-ui-kit. Why is this a problem?? I am getting code straight from MDB website and it says MDBCarouselInner is not in mdb-react-ui-kit package!!!!</p>


问:
JSDoc subclass properties for prop
I'm trying to get syntax highlighting for the properties on my subclasses

class TextField extends Field {
    constructor(fieldData) {
        super(fieldData);
    }
}

...

class Checkbox extends Field {
    constructor(fieldData) {
        super(fieldData);
    }
}

class Field {
    constructor(fieldData) {
        this.authors = fieldData.authors;// array of strings
        this.fieldName = fieldData.fieldName;// string
        this.value = fieldData.value;// string or boolean
    }
}
```
<p>When I try creating an instance of TextField and accessing the value property, I want visual studio code to know that the value is a string. However, when I know I have a Textinput, the value property shows me that I have an "any" type.</p>
<p><img src="https://i.stack.imgur.com/f0I8j.png" alt="vscode highlighting" /></p>
<p>Is there a way to tell the visual studio code that my TextField instances have values of type string? It usually understands JSDoc, so I've been trying different JSDoc tags. I tried this technique, which did what I wanted, but when I tried creating TextFields, it overrode the values of each property to undefined after calling the super()</p>
<pre class="lang-js prettyprint-override"><code>class TextField extends Field {
    /** @type {string} */
    value;

    constructor(fieldData) {
        super(fieldData);
    }
}

</code>```

Title: JSDoc subclass properties for prop

Body:
I'm trying to get syntax highlighting for the properties on my subclasses

class TextField extends Field {
    constructor(fieldData) {
        super(fieldData);
    }
}

...

class Checkbox extends Field {
    constructor(fieldData) {
        super(fieldData);
    }
}

class Field {
    constructor(fieldData) {
        this.authors = fieldData.authors;// array of strings
        this.fieldName = fieldData.fieldName;// string
        this.value = fieldData.value;// string or boolean
    }
}

When I try creating an instance of TextField and accessing the value property, I want visual studio code to know that the value is a string. However, when I know I have a Textinput, the value property shows me that I have an "any" type.

Is there a way to tell the visual studio code that my TextField instances have values of type string? It usually understands JSDoc, so I've been trying different JSDoc tags. I tried this technique, which did what I wanted, but when I tried creating TextFields, it overrode the values of each property to undefined after calling the super()

class TextField extends Field {
    /** @type {string} */
    value;

    constructor(fieldData) {
        super(fieldData);
    }
}


问:
Pyinstaller Onefile frozendict temp _MEI FILENOTFOUNDERROR
I have a script that uses the yfinance package from conda-forge. It pulls in some information from that package on certain stocks and then will copy said information to the clipboard so it can be quickly pasted into an text based doc. The script runs from my Pycharm IDE with zero issues but as soon as I use Pyinstaller to package it up into one file I run into a FileNotFoundError. Here is the traceback I get:

```<code>Traceback (most recent call last):
  File "pw_news_aggregator.py", line 2, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "yfinance\__init__.py", line 23, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "yfinance\ticker.py", line 29, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "yfinance\base.py", line 32, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "yfinance\data.py", line 18, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "frozendict\__init__.py", line 33, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\USER~1\\AppData\\Local\\Temp\\_MEI151882\\frozendict\\VERSION'
[27792] Failed to execute script 'pw_news_aggregator' due to unhandled exception!
</code>```

My Pyinstaller powershell command is: pyinstaller --onefile --name
Very basic and it has worked with zero issues in the past.

Here is my .spec file too:

```<code># -*- mode: python ; coding: utf-8 -*-

block_cipher = None

a = Analysis(
    ['C:\\Users\\USER\\Coding\\Projects\\Portfolio_Watch\\pw_news_aggregator.py'],
    pathex=[],
    binaries=[],
    datas=[],
    hiddenimports=[],
    hookspath=[],
    hooksconfig={},
    runtime_hooks=[],
    excludes=[],
    win_no_prefer_redirects=False,
    win_private_assemblies=False,
    cipher=block_cipher,
    noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

exe = EXE(
    pyz,
    a.scripts,
    a.binaries,
    a.zipfiles,
    a.datas,
    [],
    name='PW News Aggregator',
    debug=False,
    bootloader_ignore_signals=False,
    strip=False,
    upx=True,
    upx_exclude=[],
    runtime_tmpdir=None,
    console=True,
    disable_windowed_traceback=False,
    argv_emulation=False,
    target_arch=None,
    codesign_identity=None,
    entitlements_file=None,
)

</code>```

I tried to make a new conda env thinking it was maybe corrupted. But the same error occurs every time. I am at a loss as to why the frozendict is causing any issues, it is installed seemingly.

Also, in the traceback, the C path contains an incorrect user name. I'm not sure if that is a redaction done by Pyinstaller or what. It is: 'C:\Users\FirstNameLastInitial~1...' while it should be 'C:\Users\FirstNameLastName...'

Any ideas are much appreciated! Thank you!

Body:
I have a script that uses the yfinance package from conda-forge. It pulls in some information from that package on certain stocks and then will copy said information to the clipboard so it can be quickly pasted into an text based doc. The script runs from my Pycharm IDE with zero issues but as soon as I use Pyinstaller to package it up into one file I run into a FileNotFoundError. Here is the traceback I get:

Traceback (most recent call last):
  File "pw_news_aggregator.py", line 2, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "yfinance\__init__.py", line 23, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "yfinance\ticker.py", line 29, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "yfinance\base.py", line 32, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "yfinance\data.py", line 18, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "frozendict\__init__.py", line 33, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\USER~1\\AppData\\Local\\Temp\\_MEI151882\\frozendict\\VERSION'
[27792] Failed to execute script 'pw_news_aggregator' due to unhandled exception!

My Pyinstaller powershell command is: pyinstaller --onefile --name
Very basic and it has worked with zero issues in the past.

Here is my .spec file too:

# -*- mode: python ; coding: utf-8 -*-

block_cipher = None

a = Analysis(
    ['C:\\Users\\USER\\Coding\\Projects\\Portfolio_Watch\\pw_news_aggregator.py'],
    pathex=[],
    binaries=[],
    datas=[],
    hiddenimports=[],
    hookspath=[],
    hooksconfig={},
    runtime_hooks=[],
    excludes=[],
    win_no_prefer_redirects=False,
    win_private_assemblies=False,
    cipher=block_cipher,
    noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

exe = EXE(
    pyz,
    a.scripts,
    a.binaries,
    a.zipfiles,
    a.datas,
    [],
    name='PW News Aggregator',
    debug=False,
    bootloader_ignore_signals=False,
    strip=False,
    upx=True,
    upx_exclude=[],
    runtime_tmpdir=None,
    console=True,
    disable_windowed_traceback=False,
    argv_emulation=False,
    target_arch=None,
    codesign_identity=None,
    entitlements_file=None,
)

I tried to make a new conda env thinking it was maybe corrupted. But the same error occurs every time. I am at a loss as to why the frozendict is causing any issues, it is installed seemingly.

Also, in the traceback, the C path contains an incorrect user name. I'm not sure if that is a redaction done by Pyinstaller or what. It is: 'C:\Users\FirstNameLastInitial~1...' while it should be 'C:\Users\FirstNameLastName...'

Any ideas are much appreciated! Thank you!


问:
How to get localized name of NSBundle*
I try to get the localized name of an app on MacOS.

static void printBundleInfo(NSBundle *bundle)
{
  auto printNSString = [](NSString *s){ INFO << QString::fromNSString(s); };
  INFO << "------ BundleInfo ------";
  printNSString(bundle.bundlePath);
  //printNSString(bundle.bundleURL);
  printNSString(bundle.bundleIdentifier);

  printNSString([bundle objectForInfoDictionaryKey:(NSString*)kCFBundleNameKey]);
  printNSString([bundle objectForInfoDictionaryKey:(NSString*)kCFBundleVersionKey]);
//    printNSString([bundle objectForInfoDictionaryKey:(NSString*)kCFBundleLocalizationsKey]);
  printNSString([bundle.localizedInfoDictionary objectForKey:(NSString*)kCFBundleNameKey]);
  printNSString(bundle.localizedInfoDictionary[@"CFBundleDisplayName"]);

  //NSString *language = bundle.preferredLocalizations.firstObject;
  //printNSString(language);

  NSString *countryCode = [NSLocale.currentLocale objectForKey:NSLocaleCountryCode];
  printNSString(countryCode);

  NSString *preferred_language = NSLocale.preferredLanguages[0];
  printNSString(preferred_language);

//  NSString *local_ns_name = [bundle objectForInfoDictionaryKey:(NSString*)kCFBundleNameKey];
//  printNSString(local_ns_name);

  DEBG << "bundle.localizations";
  for (NSString *nss in bundle.localizations)
    printNSString(nss);
}
```
<p>If i run this for the clock.app i get</p>
```23:20:33 [info:applications] ------ BundleInfo ------
23:20:33 [info:applications] /System/Applications/Clock.app
23:20:33 [info:applications] com.apple.clock
23:20:33 [info:applications] Clock
23:20:33 [info:applications] 62
23:20:33 [info:applications] Clock
23:20:33 [info:applications] Clock
23:20:33 [info:applications] DE
23:20:33 [info:applications] de
23:20:33 [debg:applications] bundle.localizations
23:20:33 [info:applications] de
23:20:33 [info:applications] he
23:20:33 [info:applications] en_AU
23:20:33 [info:applications] ar
23:20:33 [info:applications] el
23:20:33 [info:applications] ja
23:20:33 [info:applications] en
23:20:33 [info:applications] uk
23:20:33 [info:applications] es_419
23:20:33 [info:applications] zh_CN
23:20:33 [info:applications] es
23:20:33 [info:applications] da
23:20:33 [info:applications] it
23:20:33 [info:applications] sk
23:20:33 [info:applications] pt_PT
23:20:33 [info:applications] ms
23:20:33 [info:applications] sv
23:20:33 [info:applications] cs
23:20:33 [info:applications] ko
23:20:33 [info:applications] no
23:20:33 [info:applications] hu
23:20:33 [info:applications] zh_HK
23:20:33 [info:applications] tr
23:20:33 [info:applications] pl
23:20:33 [info:applications] zh_TW
23:20:33 [info:applications] en_GB
23:20:33 [info:applications] vi
23:20:33 [info:applications] ru
23:20:33 [info:applications] fr_CA
23:20:33 [info:applications] fr
23:20:33 [info:applications] fi
23:20:33 [info:applications] id
23:20:33 [info:applications] nl
23:20:33 [info:applications] th
23:20:33 [info:applications] pt
23:20:33 [info:applications] ro
23:20:33 [info:applications] hr
23:20:33 [info:applications] hi
23:20:33 [info:applications] ca
```

Obviously something is wrong. Preferred localization is de, but localizedInfoDictionary returns the english version. Launchpad shows the german localization Uhr.app. How can I get a localized name?

Title: How to get localized name of NSBundle*

Body:
I try to get the localized name of an app on MacOS.

static void printBundleInfo(NSBundle *bundle)
{
  auto printNSString = [](NSString *s){ INFO << QString::fromNSString(s); };
  INFO << "------ BundleInfo ------";
  printNSString(bundle.bundlePath);
  //printNSString(bundle.bundleURL);
  printNSString(bundle.bundleIdentifier);

  printNSString([bundle objectForInfoDictionaryKey:(NSString*)kCFBundleNameKey]);
  printNSString([bundle objectForInfoDictionaryKey:(NSString*)kCFBundleVersionKey]);
//    printNSString([bundle objectForInfoDictionaryKey:(NSString*)kCFBundleLocalizationsKey]);
  printNSString([bundle.localizedInfoDictionary objectForKey:(NSString*)kCFBundleNameKey]);
  printNSString(bundle.localizedInfoDictionary[@"CFBundleDisplayName"]);

  //NSString *language = bundle.preferredLocalizations.firstObject;
  //printNSString(language);

  NSString *countryCode = [NSLocale.currentLocale objectForKey:NSLocaleCountryCode];
  printNSString(countryCode);

  NSString *preferred_language = NSLocale.preferredLanguages[0];
  printNSString(preferred_language);

//  NSString *local_ns_name = [bundle objectForInfoDictionaryKey:(NSString*)kCFBundleNameKey];
//  printNSString(local_ns_name);

  DEBG << "bundle.localizations";
  for (NSString *nss in bundle.localizations)
    printNSString(nss);
}

If i run this for the clock.app i get

23:20:33 [info:applications] ------ BundleInfo ------
23:20:33 [info:applications] /System/Applications/Clock.app
23:20:33 [info:applications] com.apple.clock
23:20:33 [info:applications] Clock
23:20:33 [info:applications] 62
23:20:33 [info:applications] Clock
23:20:33 [info:applications] Clock
23:20:33 [info:applications] DE
23:20:33 [info:applications] de
23:20:33 [debg:applications] bundle.localizations
23:20:33 [info:applications] de
23:20:33 [info:applications] he
23:20:33 [info:applications] en_AU
23:20:33 [info:applications] ar
23:20:33 [info:applications] el
23:20:33 [info:applications] ja
23:20:33 [info:applications] en
23:20:33 [info:applications] uk
23:20:33 [info:applications] es_419
23:20:33 [info:applications] zh_CN
23:20:33 [info:applications] es
23:20:33 [info:applications] da
23:20:33 [info:applications] it
23:20:33 [info:applications] sk
23:20:33 [info:applications] pt_PT
23:20:33 [info:applications] ms
23:20:33 [info:applications] sv
23:20:33 [info:applications] cs
23:20:33 [info:applications] ko
23:20:33 [info:applications] no
23:20:33 [info:applications] hu
23:20:33 [info:applications] zh_HK
23:20:33 [info:applications] tr
23:20:33 [info:applications] pl
23:20:33 [info:applications] zh_TW
23:20:33 [info:applications] en_GB
23:20:33 [info:applications] vi
23:20:33 [info:applications] ru
23:20:33 [info:applications] fr_CA
23:20:33 [info:applications] fr
23:20:33 [info:applications] fi
23:20:33 [info:applications] id
23:20:33 [info:applications] nl
23:20:33 [info:applications] th
23:20:33 [info:applications] pt
23:20:33 [info:applications] ro
23:20:33 [info:applications] hr
23:20:33 [info:applications] hi
23:20:33 [info:applications] ca

Obviously something is wrong. Preferred localization is de, but localizedInfoDictionary returns the english version. Launchpad shows the german localization Uhr.app. How can I get a localized name?


问:
How to fix a SQL Join query on MySQL Workbench
I'm working on MySQL Workbench and A SQL join query is not working for me.

```<code>SELECT OI.OrderName, count(OI.OrderNo)
FROM onns.es_orderInfo as OI
JOIN onns.es_order as O
ON  OI.OrderNo = O.OrderNo
JOIN onns.es_orderGoods OG
ON O.OrderNo = OG.OrderNo
GROUP BY OI.OrderName;
</code>```

I don't get any response; the code keeps running.

Could anyone help me figure out my mistake?

Body:
I'm working on MySQL Workbench and A SQL join query is not working for me.

SELECT OI.OrderName, count(OI.OrderNo)
FROM onns.es_orderInfo as OI
JOIN onns.es_order as O
ON  OI.OrderNo = O.OrderNo
JOIN onns.es_orderGoods OG
ON O.OrderNo = OG.OrderNo
GROUP BY OI.OrderName;

I don't get any response; the code keeps running.

Could anyone help me figure out my mistake?


问:
Set project ant classpath programatically
I'm working on a Java project that exec Ant target task on runtime.
On my pom file I have this dependency:

pom.xml

```<code>     <dependency>
        <groupId>org.apache.ant</groupId>
        <artifactId>ant</artifactId>
        <version>${ant.version}</version>
     </dependency>
</code>```

I have to run <scp> task that is included in a target container task (called scp-test-target).
Below you can see the ant file:

deploy.xml

```<code><?xml version="1.0" encoding="UTF-8"?>
<project name="test" basedir="./">

    <target name="scp-test-target" description="scp desc">
        <echo message="Test SCP"/>
        <scp file="..." todir="..."/>
    </target>

</project>
</code>```

I have created a junit file to exec 'scp-test-target':

Test.java

```<code> @Test
 public void testAnt1(){
 Project antProject = new Project();
 ProjectHelper projectHelper = ProjectHelper.getProjectHelper();
 antProject.addReference("ant.projectHelper", projectHelper);
 antProject.setUserProperty("ant.file", "deploy.xml");

 antProject.fireBuildStarted();
 antProject.init();
 projectHelper.parse(antProject, new File("deploy.xml"));
 antProject.executeTarget("scp-test-target");
 antProject.fireBuildFinished(null);

     }
</code>```

But when I run my junit test, the program failed because it not find jsch library.

```<code>Problem: failed to create task or type scp
Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found.
        This looks like one of Ant's optional components.
</code>```

So, how can I tell to Ant  to link jsch libraries on my file system in programmatically way (so in my Test.java)?

Thanks in advance

Body:
I'm working on a Java project that exec Ant target task on runtime.
On my pom file I have this dependency:

pom.xml

     <dependency>
        <groupId>org.apache.ant</groupId>
        <artifactId>ant</artifactId>
        <version>${ant.version}</version>
     </dependency>

I have to run <scp> task that is included in a target container task (called scp-test-target).
Below you can see the ant file:

deploy.xml

<?xml version="1.0" encoding="UTF-8"?>
<project name="test" basedir="./">

    <target name="scp-test-target" description="scp desc">
        <echo message="Test SCP"/>
        <scp file="..." todir="..."/>
    </target>

</project>

I have created a junit file to exec 'scp-test-target':

Test.java

 @Test
 public void testAnt1(){
 Project antProject = new Project();
 ProjectHelper projectHelper = ProjectHelper.getProjectHelper();
 antProject.addReference("ant.projectHelper", projectHelper);
 antProject.setUserProperty("ant.file", "deploy.xml");

 antProject.fireBuildStarted();
 antProject.init();
 projectHelper.parse(antProject, new File("deploy.xml"));
 antProject.executeTarget("scp-test-target");
 antProject.fireBuildFinished(null);

     }

But when I run my junit test, the program failed because it not find jsch library.

Problem: failed to create task or type scp
Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found.
        This looks like one of Ant's optional components.

So, how can I tell to Ant  to link jsch libraries on my file system in programmatically way (so in my Test.java)?

Thanks in advance


问:
How to move the camera around with gestures in RealityKit?
In SceneKit when you have a scene you can use gestures to move around the 3D space. How can you do this in RealityKit (using non-AR), or is it not possible? I am using SwiftUI as well.</p>


问:
SQL function to generate UUID, update nested jsonb in table with it, and return it
I'm learning SQL and I'm running into an issue trying to use a local variable in a SQL function and update some jsonb. I would like to have a function that:

accepts a row id (the primary key for the table) and some properties (jsonb)

generates a UUID (as a local variable?)

puts the UUID into the properties jsonb

inserts the properties jsonb at the end of a nested array in a jsonb column of the table

returns the UUID

I'm obviously not understanding local variables or functions with multiple commands, but this is my attempt:

```<code>CREATE OR REPLACE FUNCTION add_object(main_id uuid, props jsonb)
RETURNS uuid
SECURITY INVOKER
AS $$
  -- The local variable for the UUID, to be returned.  Wrong syntax for local variable?
  SELECT uuid_generate_v4() as new_id

  -- Put the UUID in props.  Can you do this with an input parameter?
  -- Currently fails to compile here with "syntax error at or near "props""
  props = jsonb_set(props, STRING_TO_ARRAY ('id', ','), props, true)

  -- Put the props in the "data" column at the end of the nested "objects" array
  UPDATE "sites"
  SET
    data = jsonb_set(data, STRING_TO_ARRAY ('objects' || ',' || jsonb_array_length(data->'objects'), ','), props, true)
  WHERE id = main_id

  -- Return the UUID
  RETURN new_id
$$
LANGUAGE sql;
</code>```

A solution in plpgsql would also be fine. I'm currently using supabase, but I'm defining the function manually instead of with their SQL function editor, as it doesn't seem to have all the functionality I need for this.  Any help or suggestions is much appreciated, thank you!

Body:
I'm learning SQL and I'm running into an issue trying to use a local variable in a SQL function and update some jsonb. I would like to have a function that:

accepts a row id (the primary key for the table) and some properties (jsonb)

generates a UUID (as a local variable?)

puts the UUID into the properties jsonb

inserts the properties jsonb at the end of a nested array in a jsonb column of the table

returns the UUID

I'm obviously not understanding local variables or functions with multiple commands, but this is my attempt:

CREATE OR REPLACE FUNCTION add_object(main_id uuid, props jsonb)
RETURNS uuid
SECURITY INVOKER
AS $$
  -- The local variable for the UUID, to be returned.  Wrong syntax for local variable?
  SELECT uuid_generate_v4() as new_id

  -- Put the UUID in props.  Can you do this with an input parameter?
  -- Currently fails to compile here with "syntax error at or near "props""
  props = jsonb_set(props, STRING_TO_ARRAY ('id', ','), props, true)

  -- Put the props in the "data" column at the end of the nested "objects" array
  UPDATE "sites"
  SET
    data = jsonb_set(data, STRING_TO_ARRAY ('objects' || ',' || jsonb_array_length(data->'objects'), ','), props, true)
  WHERE id = main_id

  -- Return the UUID
  RETURN new_id
$$
LANGUAGE sql;

A solution in plpgsql would also be fine. I'm currently using supabase, but I'm defining the function manually instead of with their SQL function editor, as it doesn't seem to have all the functionality I need for this.  Any help or suggestions is much appreciated, thank you!


问:
Firebase Realtime Database onValue does not rebuild the UI
I have the code for get Children and thier locations from realtime database

But the UI did not update when the listen function call [due to update in realtime database]

The print function in listen function is call when data is changed in realtime

```<code>_childrenList = [];
    for (QueryDocumentSnapshot<Map<String, dynamic>> doc in data.docs) {
      _childrenList.add(childrenList.fromSnapshot(doc));
      http.Response response =
          await http.get(Uri.parse(_childrenList.last.childImagePath!));
      dbReferences[doc.id] = FirebaseDatabase.instance.ref("devices/${doc.id}");
      DataSnapshot temp = await dbReferences[doc.id]!.get();
      Map deviceData = temp.value as Map;
      childrenLatLong[doc.id] = {
        "lat": deviceData["lat"],
        "long": deviceData["long"]
      };
      markers[doc.id] = Marker(
        markerId: MarkerId(doc.id),
        position: LatLng(
            childrenLatLong[doc.id]!["lat"], childrenLatLong[doc.id]!["long"]),
        // icon: BitmapDescriptor.fromBytes(response.bodyBytes),
      );
        dbReferences[doc.id]!.onValue.listen((event) {
          print(event.snapshot.value);
          Map newData = event.snapshot.value as Map;
          setState(() {

          markers[doc.id] = Marker(
            markerId: MarkerId(doc.id),
            position: LatLng(childrenLatLong[doc.id]!["lat"],
                childrenLatLong[doc.id]!["long"]),
            // icon: BitmapDescriptor.fromBytes(response.bodyBytes),
          );
          });
        });
    }
    setState(() {});
</code>```

Body:
I have the code for get Children and thier locations from realtime database

But the UI did not update when the listen function call [due to update in realtime database]

The print function in listen function is call when data is changed in realtime

_childrenList = [];
    for (QueryDocumentSnapshot<Map<String, dynamic>> doc in data.docs) {
      _childrenList.add(childrenList.fromSnapshot(doc));
      http.Response response =
          await http.get(Uri.parse(_childrenList.last.childImagePath!));
      dbReferences[doc.id] = FirebaseDatabase.instance.ref("devices/${doc.id}");
      DataSnapshot temp = await dbReferences[doc.id]!.get();
      Map deviceData = temp.value as Map;
      childrenLatLong[doc.id] = {
        "lat": deviceData["lat"],
        "long": deviceData["long"]
      };
      markers[doc.id] = Marker(
        markerId: MarkerId(doc.id),
        position: LatLng(
            childrenLatLong[doc.id]!["lat"], childrenLatLong[doc.id]!["long"]),
        // icon: BitmapDescriptor.fromBytes(response.bodyBytes),
      );
        dbReferences[doc.id]!.onValue.listen((event) {
          print(event.snapshot.value);
          Map newData = event.snapshot.value as Map;
          setState(() {

          markers[doc.id] = Marker(
            markerId: MarkerId(doc.id),
            position: LatLng(childrenLatLong[doc.id]!["lat"],
                childrenLatLong[doc.id]!["long"]),
            // icon: BitmapDescriptor.fromBytes(response.bodyBytes),
          );
          });
        });
    }
    setState(() {});


问:
Puppeteer scraper taking too long
I'm trying to scrape little pieces of data from a webpage, but it is taking soo long to scrape... any reason why this is happening ? Initially, it stops scraping, then i had to set the default timeout to 0. This same code was     working perfectly fine earlier..

Now it's taking forever to scrape the data i need
code below

```<code>const puppeteer = require("puppeteer");
const express = require("express");
//const ejs = require("ejs");
const port = 5000;

const app = express();
app.set('view engine', 'ejs');
app.use(express.static(__dirname + '/public', {
     types: {
          'js': "text/javascript"
     }
}));

var usdBuy;
var usdSell;

var gbpBuy;
var gbpSell;

var eurBuy;
var eurSell;

app.get('/', function(req, res) {

     async function start() {
          const browser = await puppeteer.launch();
          const page = await browser.newPage();
          await page.setDefaultNavigationTimeout(0);
          await page.goto("URL");
          const prices = await page.evaluate(() => {
               return Array.from(document.querySelectorAll(".overlay-text")).map(x => x.textContent)
          })

          usdBuy = prices[0]
          usdSell = prices[1]

          gbpBuy = prices[2]
          gbpSell = prices[3]

          eurBuy = prices[4]
          eurSell = prices[5]

          console.log(usdBuy);
          console.log(usdSell);

          console.log(gbpBuy);
          console.log(gbpSell);

          console.log(eurBuy);
          console.log(eurSell);
          await page.close();
          await browser.close();
     }
     start();
     res.render("home", {
          usdBuy: usdBuy,
          usdSell: usdSell,
          gbpBuy: gbpBuy,
          gbpSell: gbpSell,
          eurBuy: eurBuy,
          eurSell: eurSell

     });
})

app.listen(process.env.PORT || port,  function () {
     console.log(`Listening on port ${port}`)
})
</code>```

Title: Puppeteer scraper taking too long

Body:
I'm trying to scrape little pieces of data from a webpage, but it is taking soo long to scrape... any reason why this is happening ? Initially, it stops scraping, then i had to set the default timeout to 0. This same code was     working perfectly fine earlier..

Now it's taking forever to scrape the data i need
code below

const puppeteer = require("puppeteer");
const express = require("express");
//const ejs = require("ejs");
const port = 5000;

const app = express();
app.set('view engine', 'ejs');
app.use(express.static(__dirname + '/public', {
     types: {
          'js': "text/javascript"
     }
}));

var usdBuy;
var usdSell;

var gbpBuy;
var gbpSell;

var eurBuy;
var eurSell;

app.get('/', function(req, res) {

     async function start() {
          const browser = await puppeteer.launch();
          const page = await browser.newPage();
          await page.setDefaultNavigationTimeout(0);
          await page.goto("URL");
          const prices = await page.evaluate(() => {
               return Array.from(document.querySelectorAll(".overlay-text")).map(x => x.textContent)
          })

          usdBuy = prices[0]
          usdSell = prices[1]

          gbpBuy = prices[2]
          gbpSell = prices[3]

          eurBuy = prices[4]
          eurSell = prices[5]

          console.log(usdBuy);
          console.log(usdSell);

          console.log(gbpBuy);
          console.log(gbpSell);

          console.log(eurBuy);
          console.log(eurSell);
          await page.close();
          await browser.close();
     }
     start();
     res.render("home", {
          usdBuy: usdBuy,
          usdSell: usdSell,
          gbpBuy: gbpBuy,
          gbpSell: gbpSell,
          eurBuy: eurBuy,
          eurSell: eurSell

     });
})

app.listen(process.env.PORT || port,  function () {
     console.log(`Listening on port ${port}`)
})


问:
Use CI/CD Pipeline in Gitlab to periodically retrieve data from a REST endpoint and save to Gitlab repo
I've got a Dash Enterprise app that uses some monthly data reports. Every month I manually upload the new data files which are stored at a Rest endpoint. I want to automate this process using GitLab. Can the GitLab CI/CD Pipeline retrieve data from a REST endpoint and upload it to the GitLab repo?

I was thinking something like this:

YAML file specifies a stage in the pipeline that runs a python script

The python script pulls the data from the REST endpoint
example:
data = requests.post('<some rest endpoint url>', params=dict(criteria='foo')).json()

Somehow python or the YAML file pushes this data to the GitLab repo.

Is this possible or am I using the wrong tool for the job?

I've created a GitLab repo and created a CI/CD pipeline. I create a job in the YAML file that calls a python file which can pull data from the REST endpoint. I just don't know how this data can be pushed to the GitLab repo that the YAML and python files reside in.


问:
AssertionError: No api proxy found for service "taskqueue"
I am facing issue while enqueuing pull queue on gcp cloud task with python 3.8  . I am getting AssertionError: No api proxy found for service "taskqueue" .

Here is the code snippet of what I am currently doing :

```<code>from google.appengine.api import taskqueue

q = taskqueue.Queue('my-queue')
tasks = []
payload_str = 'hello world'
tasks.append(taskqueue.Task(payload=payload_str, method='PULL'))
q.add(tasks)

</code>```

Please let me know if this is the right approach , Thanks !

I have tried it enqueuing the queue via cloud function as well.

Body:
I am facing issue while enqueuing pull queue on gcp cloud task with python 3.8  . I am getting AssertionError: No api proxy found for service "taskqueue" .

Here is the code snippet of what I am currently doing :

from google.appengine.api import taskqueue

q = taskqueue.Queue('my-queue')
tasks = []
payload_str = 'hello world'
tasks.append(taskqueue.Task(payload=payload_str, method='PULL'))
q.add(tasks)

Please let me know if this is the right approach , Thanks !

I have tried it enqueuing the queue via cloud function as well.


问:
Unable to connect to the configured development web server: IIS 10.0 Express, .NET Framework 4.6.1 web site, Windows Server 2019, Visual Studio 2022
I've been at this problem for a while now. I've been following references of all sorts and have tried out solutions that I think pertain to my issue.

This is the information I currently have:

I have a web site that uses IIS to be hosted on the web but it should also be possible to use IIS Express for development. I am personally using the windows 11 Remote Desktop Connection application to access the dev server which runs Window Server 2019, IIS 10, Visual Studio 2022, and the web site (not web application) is running on .NET framework 4.6.1

When I click 'IIS Express (Google Chrome)' I get

I thought that perhaps the GUI wasn't properly setup so I ran iisexpress thru the command line:

```<code>C:\Program Files (x86)\IIS Express> /path:c\website-data\dev.site.com\
</code>```

I checked that this runs by clicking on IIS Express System Tray App which shows my website running:

My path points to the folder correctly and the config points to C:\Users

{me_the_user}\AppData\Local\Temp\3\iisexpress\applicationhost2023

I've also ran trace but the information seems like nonsense to me:

This just verified that my previous command to run iisexpress through the cmd line went through successfully. I navigated to the localhost (and to the web URL directly) and got redirected to the proper website name but weirdly enough, if I stop IIS Express and then navigate to the web URL from this dev server using chrome as my web client then I am met with "This site can't be reached". However, I can access this published site from any other web client (mobile, the laptop that I'm using, etc.)

I fiddled around my dev server and went to Server Manager and looked at *Events. When I click the GUI for the debugger I seem to be getting events at the same time.

The events:

The Module DLL 'C:\Users{me_the_user}\AppData\Local\iisnode\iisnode.dll' could not be loaded due to a configuration problem. The current configuration only supports loading images built for a AMD64 processor architecture. The data field contains the error number. To learn more about this issue, including how to troubleshooting this kind of processor architecture mismatch error, see http://go.microsoft.com/fwlink/?LinkId=29349. ID 2282

The worked process failed to initialize correctly and therefore could not be started. The data is the error. ID 2276

What I've tried
I've deleted .vs folder, using visual studio with admin rights (even enforced to always open with admin rights), and other stuff but I refuse to reset. I'm sure there's something I haven't though of yet. Hopefully all this info means something to someone.

Extra
Also, this web site folder is part of a folder that has two other web sites. With how I open Visual Studio (continue without code -> File -> Open -> Website -> c:\website-data\dev.site.com) I hope that there isn't some conflict but just thought I should throw this in here.

Body:
I've been at this problem for a while now. I've been following references of all sorts and have tried out solutions that I think pertain to my issue.

This is the information I currently have:

I have a web site that uses IIS to be hosted on the web but it should also be possible to use IIS Express for development. I am personally using the windows 11 Remote Desktop Connection application to access the dev server which runs Window Server 2019, IIS 10, Visual Studio 2022, and the web site (not web application) is running on .NET framework 4.6.1

When I click 'IIS Express (Google Chrome)' I get

I thought that perhaps the GUI wasn't properly setup so I ran iisexpress thru the command line:

C:\Program Files (x86)\IIS Express> /path:c\website-data\dev.site.com\

I checked that this runs by clicking on IIS Express System Tray App which shows my website running:

My path points to the folder correctly and the config points to C:\Users

{me_the_user}\AppData\Local\Temp\3\iisexpress\applicationhost2023

I've also ran trace but the information seems like nonsense to me:

This just verified that my previous command to run iisexpress through the cmd line went through successfully. I navigated to the localhost (and to the web URL directly) and got redirected to the proper website name but weirdly enough, if I stop IIS Express and then navigate to the web URL from this dev server using chrome as my web client then I am met with "This site can't be reached". However, I can access this published site from any other web client (mobile, the laptop that I'm using, etc.)

I fiddled around my dev server and went to Server Manager and looked at *Events. When I click the GUI for the debugger I seem to be getting events at the same time.

The events:

The Module DLL 'C:\Users{me_the_user}\AppData\Local\iisnode\iisnode.dll' could not be loaded due to a configuration problem. The current configuration only supports loading images built for a AMD64 processor architecture. The data field contains the error number. To learn more about this issue, including how to troubleshooting this kind of processor architecture mismatch error, see http://go.microsoft.com/fwlink/?LinkId=29349. ID 2282

The worked process failed to initialize correctly and therefore could not be started. The data is the error. ID 2276

What I've tried
I've deleted .vs folder, using visual studio with admin rights (even enforced to always open with admin rights), and other stuff but I refuse to reset. I'm sure there's something I haven't though of yet. Hopefully all this info means something to someone.

Extra
Also, this web site folder is part of a folder that has two other web sites. With how I open Visual Studio (continue without code -> File -> Open -> Website -> c:\website-data\dev.site.com) I hope that there isn't some conflict but just thought I should throw this in here.


问:
Linear model. How to fix my very slow R loop?
I have some specific linear regression model Y~X. My task is to repeat the generation of X and Y and some other steps 1000 times. For each of the sub-problems estimate the expected number of the false discoveries. I wrote a code, but it is working about... 10 minutes for k = 2, and than I have k = 950... so... What can I change in my code, to speed it up?</p>
```<code>testing <- function(k){
  M <- matrix(0,1000,1)
  for (i in 1:1000){
    X <- matrix(rnorm(1000*950, 0, 0.1), nrow=1000, ncol=950)
    B <- c(rep(3, times=5), rep(0, times=945))
    eps <- rnorm(1000)
    Y <- X %*% B + eps
    lmodel <- lm(Y ~ X-1)
    beta1 <- lmodel$coefficients
    beta <- sort(beta1, index.return=TRUE, decreasing = TRUE)
    X2 <- X[,beta$ix]
    Y <- X2 %*% B + eps
    lm1 <- lm(Y ~ X[ ,1:k]-1)
    p.value <- summary(lm1)$coefficients[1, 4]
    M[i,1] = ifelse(p.value < 0.05, 1, 0)
  }
  return(sum(M)/1000)
}

testing(1) #0.328
testing(10)
</code>```

Body:
I have some specific linear regression model Y~X. My task is to repeat the generation of X and Y and some other steps 1000 times. For each of the sub-problems estimate the expected number of the false discoveries. I wrote a code, but it is working about... 10 minutes for k = 2, and than I have k = 950... so... What can I change in my code, to speed it up?

testing <- function(k){
  M <- matrix(0,1000,1)
  for (i in 1:1000){
    X <- matrix(rnorm(1000*950, 0, 0.1), nrow=1000, ncol=950)
    B <- c(rep(3, times=5), rep(0, times=945))
    eps <- rnorm(1000)
    Y <- X %*% B + eps
    lmodel <- lm(Y ~ X-1)
    beta1 <- lmodel$coefficients
    beta <- sort(beta1, index.return=TRUE, decreasing = TRUE)
    X2 <- X[,beta$ix]
    Y <- X2 %*% B + eps
    lm1 <- lm(Y ~ X[ ,1:k]-1)
    p.value <- summary(lm1)$coefficients[1, 4]
    M[i,1] = ifelse(p.value < 0.05, 1, 0)
  }
  return(sum(M)/1000)
}

testing(1) #0.328
testing(10)


问:
NestJS SSE over TCP (aka Microservices)
I'm building a distributes architecture where several clients connect to a microservice to push data. Authentication is implemented through Messages and data pushes from clients to the microservice are done through Events.

The server analyses the data pushed by the clients and, at some point, it needs to push an event back to the client in case it detects any deviance in the event data being pushed by a specific client. This is where I'm stuck, because all references to SSE point to the HTTP transport and I'm using TCP.

I'm using TCP instead of HTTP to avoid the overhead of sending multiple requests/responses to push the events from the client and also beacuse timing is important in the context of the application, so having a stablished connection to just push data was the best scenario I could think of.

It would be easy if NestJS exposes the client connections somehow, but I wasn't able to find it :shrug:

I didn't try this, but I'm leaning towards to implement a custom transport for NestJS to try to, somehow, add SSE on top of it, but if anyone can point an easier approach, I would appreciate that!

Title: NestJS SSE over TCP (aka Microservices)


问:
@Autowired not working on EC2 instance after Corretto Java 17 upgrade, but works fine on local instance
I recently used Corretto to upgrade our EC2 instance from Java 11 to Java 17.  Since then, I am unable to start the existing application on EC2 instance, even though it runs fine locally

See below:

LOCAL

```<code>$ java --version
java 17.0.5 2022-10-18 LTS
Java(TM) SE Runtime Environment (build 17.0.5+9-LTS-191)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.5+9-LTS-191, mixed mode, sharing)
</code>```

EC2 INSTANCE

```<code>[ec2@ip-172-xx-xx-xx ~]$ java --version
openjdk 17.0.5 2022-10-18 LTS
OpenJDK Runtime Environment Corretto-17.0.5.8.1 (build 17.0.5+8-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.5.8.1 (build 17.0.5+8-LTS, mixed mode, sharing)
</code>```

Everything looks similar enough with the JDK 17.0.5 on both local and
EC2 instance

But I get this error when attempting to start the app on EC2 instance

```<code>2023-01-12T16:43:53.161Z  WARN 11397 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authController': Unsatisfied dependency expressed through field 'clientService': Error creating bean with name 'clientService': Unsatisfied dependency expressed through field 'dao': No qualifying bean of type 'com.orders.persistence.jpa.repository.ClientRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
2023-01-12T16:43:53.162Z  INFO 11397 --- [           main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2023-01-12T16:43:53.179Z  INFO 11397 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2023-01-12T16:43:53.227Z  INFO 11397 --- [           main] .s.b.a.l.ConditionEvaluationReportLogger :

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2023-01-12T16:43:53.294Z ERROR 11397 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************

Description:

Field dao in com.orders.persistence.service.ClientService required a bean of type 'com.orders.persistence.jpa.repository.ClientRepository' that could not be found.

The injection point has the following annotations:
        - @org.springframework.beans.factory.annotation.Autowired(required=true)

Action:

Consider defining a bean of type 'com.orders.persistence.jpa.repository.ClientRepository' in your configuration.
</code>```

Not seeing any differences between this and other Repository classes in the same pacakge (which do not appear to be error'ing out)

```<code>@Service
@Transactional
public class ClientService extends AbstractService<Client> {

    @Autowired
    private ClientRepository dao;

    @Override
    protected CrudRepository<Client, Long> getDao() {
        return this.dao;
    }
    ..... other methods
}

public interface ClientRepository extends CrudRepository<Client, Long> {

    Client findByClientId(Integer clientId);

}
</code>```

I believe I don't need to annotate the ClientRepository with @Repository because it is already defined in my JPAConfig class like this (it makes no difference anyway compile or run wise):

```<code>@Configuration
@EnableJpaRepositories(
        basePackages = "com.orders.persistence.jpa.repository",
        entityManagerFactoryRef = "entityManager",
        transactionManagerRef = "transactionManager")
@EnableTransactionManagement
public class PersistenceJPAConfig {

}
</code>```

Body:
I recently used Corretto to upgrade our EC2 instance from Java 11 to Java 17.  Since then, I am unable to start the existing application on EC2 instance, even though it runs fine locally

See below:

LOCAL

$ java --version
java 17.0.5 2022-10-18 LTS
Java(TM) SE Runtime Environment (build 17.0.5+9-LTS-191)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.5+9-LTS-191, mixed mode, sharing)

EC2 INSTANCE

[ec2@ip-172-xx-xx-xx ~]$ java --version
openjdk 17.0.5 2022-10-18 LTS
OpenJDK Runtime Environment Corretto-17.0.5.8.1 (build 17.0.5+8-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.5.8.1 (build 17.0.5+8-LTS, mixed mode, sharing)

Everything looks similar enough with the JDK 17.0.5 on both local and
EC2 instance

But I get this error when attempting to start the app on EC2 instance

2023-01-12T16:43:53.161Z  WARN 11397 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authController': Unsatisfied dependency expressed through field 'clientService': Error creating bean with name 'clientService': Unsatisfied dependency expressed through field 'dao': No qualifying bean of type 'com.orders.persistence.jpa.repository.ClientRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
2023-01-12T16:43:53.162Z  INFO 11397 --- [           main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2023-01-12T16:43:53.179Z  INFO 11397 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2023-01-12T16:43:53.227Z  INFO 11397 --- [           main] .s.b.a.l.ConditionEvaluationReportLogger :

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2023-01-12T16:43:53.294Z ERROR 11397 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************

Description:

Field dao in com.orders.persistence.service.ClientService required a bean of type 'com.orders.persistence.jpa.repository.ClientRepository' that could not be found.

The injection point has the following annotations:
        - @org.springframework.beans.factory.annotation.Autowired(required=true)

Action:

Consider defining a bean of type 'com.orders.persistence.jpa.repository.ClientRepository' in your configuration.

Not seeing any differences between this and other Repository classes in the same pacakge (which do not appear to be error'ing out)

@Service
@Transactional
public class ClientService extends AbstractService<Client> {

    @Autowired
    private ClientRepository dao;

    @Override
    protected CrudRepository<Client, Long> getDao() {
        return this.dao;
    }
    ..... other methods
}

public interface ClientRepository extends CrudRepository<Client, Long> {

    Client findByClientId(Integer clientId);

}

I believe I don't need to annotate the ClientRepository with @Repository because it is already defined in my JPAConfig class like this (it makes no difference anyway compile or run wise):

@Configuration
@EnableJpaRepositories(
        basePackages = "com.orders.persistence.jpa.repository",
        entityManagerFactoryRef = "entityManager",
        transactionManagerRef = "transactionManager")
@EnableTransactionManagement
public class PersistenceJPAConfig {

}