问:
index 1 is out of bounds for axis 0 with size 1 in decision tree classifier
Here I use from the DecisionTreeClassifier the attribute tree_, to access the low level attributes such as node_count, the total number of nodes and max_depth, the maximal depth of the tree. By using the arrays:
children_left[i]: id of the left child of node i or -1 if leaf node

children_right[i]: id of the right child of node i or -1 if leaf node

feature[i]: feature used for splitting node i

threshold[i]: threshold value at node i

n_node_samples[i]: the number of training samples reaching node i

impurity[i]: the impurity at node i

I can traverse the tree structure to compute various properties. Below, we will compute the depth of each node and whether or not it is a leaf.

```<code>n_nodes = classifier.tree_.node_count
children_left = classifier.tree_.children_left
children_right = classifier.tree_.children_right
feature = classifier.tree_.feature
threshold = classifier.tree_.threshold

node_depth = np.zeros(shape=n_nodes, dtype=np.int64)
is_leaves = np.zeros(shape=n_nodes, dtype=bool)
stack = [(0, 0)]  # start with the root node id (0) and its depth (0)
while len(stack) > 0:
    # `pop` ensures each node is only visited once
    node_id, depth = stack.pop()
    node_depth[node_id] = depth

    # If the left and right child of a node is not the same we have a split
    # node
    is_split_node = children_left[node_id] != children_right[node_id]
    # If a split node, append left and right children and depth to `stack`
    # so we can loop through them
    if is_split_node:
        stack.append((children_left[node_id], depth + 1))
        stack.append((children_right[node_id], depth + 1))
    else:
        is_leaves[node_id] = True

print(
    "The binary tree structure has {n} nodes and has "
    "the following tree structure:\n".format(n=n_nodes)
)
for i in range(n_nodes):
    if node_depth[i] == 12:
        break
    if is_leaves[i]:
        print(
            "{space}node={node} is a leaf node. with amount of values for Class SOURCE {predicted_value}: {value[0][0]} AND Class TARGET {predicted_value}: {value[0][1]}".format(
                space=node_depth[i], node=i, value = classifier.tree_.value, predicted_value = classifier.classes_
            )
        )
    else:
        print(
            "{space}node={node} is a split node: "
            "go to node {left} if {feature}] <= {threshold} "
            "else to node {right}.".format(
                space=node_depth[i],
                node=i,
                left=children_left[i],
                feature= X.columns[feature[i]+2],
                threshold=threshold[i],
                right=children_right[i],
            )
        )

</code>```

I want to access the second value [index1] of the first value[Index0] from classifier.tree_.value. And also the Index 0 and Index 1 from predicted_Value, but it throws the error:

```<code>---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
Cell In [36], line 36
     33     break
     34 if is_leaves[i]:
     35     print(
---> 36         "{space}node={node} is a leaf node. with amount of values for Class SOURCE {predicted_value[0]}: {value[0][0]} AND Class TARGET {predicted_value[1]}: {value[0][1]}".format(
     37             space=node_depth[i], node=i, value = classifier.tree_.value, predicted_value = classifier.classes_
     38         )
     39     )
     40 else:
     41     print(
     42         "{space}node={node} is a split node: "
     43         "go to node {left} if {feature}] <= {threshold} "
   (...)
     51         )
     52     )

IndexError: index 1 is out of bounds for axis 0 with size 1
</code>```

Body:
Here I use from the DecisionTreeClassifier the attribute tree_, to access the low level attributes such as node_count, the total number of nodes and max_depth, the maximal depth of the tree. By using the arrays:
children_left[i]: id of the left child of node i or -1 if leaf node

children_right[i]: id of the right child of node i or -1 if leaf node

feature[i]: feature used for splitting node i

threshold[i]: threshold value at node i

n_node_samples[i]: the number of training samples reaching node i

impurity[i]: the impurity at node i

I can traverse the tree structure to compute various properties. Below, we will compute the depth of each node and whether or not it is a leaf.

n_nodes = classifier.tree_.node_count
children_left = classifier.tree_.children_left
children_right = classifier.tree_.children_right
feature = classifier.tree_.feature
threshold = classifier.tree_.threshold

node_depth = np.zeros(shape=n_nodes, dtype=np.int64)
is_leaves = np.zeros(shape=n_nodes, dtype=bool)
stack = [(0, 0)]  # start with the root node id (0) and its depth (0)
while len(stack) > 0:
    # `pop` ensures each node is only visited once
    node_id, depth = stack.pop()
    node_depth[node_id] = depth

    # If the left and right child of a node is not the same we have a split
    # node
    is_split_node = children_left[node_id] != children_right[node_id]
    # If a split node, append left and right children and depth to `stack`
    # so we can loop through them
    if is_split_node:
        stack.append((children_left[node_id], depth + 1))
        stack.append((children_right[node_id], depth + 1))
    else:
        is_leaves[node_id] = True

print(
    "The binary tree structure has {n} nodes and has "
    "the following tree structure:\n".format(n=n_nodes)
)
for i in range(n_nodes):
    if node_depth[i] == 12:
        break
    if is_leaves[i]:
        print(
            "{space}node={node} is a leaf node. with amount of values for Class SOURCE {predicted_value}: {value[0][0]} AND Class TARGET {predicted_value}: {value[0][1]}".format(
                space=node_depth[i], node=i, value = classifier.tree_.value, predicted_value = classifier.classes_
            )
        )
    else:
        print(
            "{space}node={node} is a split node: "
            "go to node {left} if {feature}] <= {threshold} "
            "else to node {right}.".format(
                space=node_depth[i],
                node=i,
                left=children_left[i],
                feature= X.columns[feature[i]+2],
                threshold=threshold[i],
                right=children_right[i],
            )
        )

I want to access the second value [index1] of the first value[Index0] from classifier.tree_.value. And also the Index 0 and Index 1 from predicted_Value, but it throws the error:

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
Cell In [36], line 36
     33     break
     34 if is_leaves[i]:
     35     print(
---> 36         "{space}node={node} is a leaf node. with amount of values for Class SOURCE {predicted_value[0]}: {value[0][0]} AND Class TARGET {predicted_value[1]}: {value[0][1]}".format(
     37             space=node_depth[i], node=i, value = classifier.tree_.value, predicted_value = classifier.classes_
     38         )
     39     )
     40 else:
     41     print(
     42         "{space}node={node} is a split node: "
     43         "go to node {left} if {feature}] <= {threshold} "
   (...)
     51         )
     52     )

IndexError: index 1 is out of bounds for axis 0 with size 1


来源: stackexchange

问:
Where do I insert the loader?
I've been trying to add a preloader to my website, but it just ends up spinning the text, appear in random places. CSS is fine, HTML part is the thing I'm having trouble with, I'm trying to place this code in div class="loader" div

           A WINTER TALE

```

ContentLicense: CC BY-SA 4.0

Title: Where do I insert the loader?


问:
Changing domain of all requests in postman workspace
We are developing a rest API and giving it to many customers. For testing purpose for each customer we create a new workspace in postman and add some collections contains of requests to that. Each customer has its own domain name obviously so each workspace contains request with unique domain address and also unique x-api-key header.
When we release our API for new customer, we must add a new workspace with all requests. using export/import collection we can add request from old workspaces very fast but changing domain name and x-api-key header one by one for each request in new workspace  is exhausting!
Is there any way in postman to do such work automatically?</p>


问:
kivmob banner show on video python
```<code>**kivmod  banner:**

from kivmob import KivMob, TestIds

from kivy.app import App
from kivy.uix.label import Label

class Banner(App):
 """ Displays a banner ad at top of the screen.
    """

 def build(self):
 self.ads = KivMob(TestIds.APP)
 self.ads.new_banner(TestIds.BANNER, top_pos=True)
 self.ads.request_banner()
 self.ads.show_banner()
 return Label(text='test')

if __name__ == "__main__":
    Banner().run()

**error:**
logo = cv2.resize(Banner, (size, size))
 cv2.error: OpenCV(4.6.0) :-1: error: (-5:Bad argument) in function 'resize'
 > Overload resolution failed:
 >  - src is not a numpy array, neither a scalar
 >  - Expected Ptr<cv::UMat> for argument 'src'

** code:**
import cv2
import numpy as np
from Banners import *

#class advert:
    #def __init__(self):

    # load image and start video
    #logo = cv2.imread('logo.jpg')
Banners=Banner()

size = 100
logo = cv2.resize(Banner, (size, size))  #error start this line ?

# Create a mask of logo, img will be a numpy array of type:
img2gray = cv2.cvtColor(logo, cv2.COLOR_BGR2GRAY)
ret, mask = cv2.threshold(img2gray, 1, 255, cv2.THRESH_BINARY)

cap = cv2.VideoCapture('traffic.avi')

alpha = 0.4

while True:
    ret, frame = cap.read()
    frame = cv2.flip(frame,1)
 # Region of Image (ROI), where we want to insert logo
 roi = frame[-size - 10:-10, -size - 10:-10]
 # Set an index of where the mask is
 roi[np.where(mask)] = 0
 roi += logo
    cv2.imshow('frame', frame)
    k = cv2.waitKey(10)

if k == ord('q'):
 break

cap.release()
cv2.destroyAllWindows()
</code>```

I have question about kivmod  python.

I want to insert on video the following kivmob banner at python, but I can't convert kivmod to  array image can be converted but Is there a way for kivmod ?

So ı want to make as hbbtv following image, ıhan to add python kivmob on videos in python. for this , I think need convert kivmob to array.

My expecting that: I want to show kivmob banner on video in Python, not Android.

I can do it that show image on video at python but i can not do for kivmob

Title: kivmob banner show on video python

Body:
**kivmod  banner:**

from kivmob import KivMob, TestIds

from kivy.app import App
from kivy.uix.label import Label

class Banner(App):
 """ Displays a banner ad at top of the screen.
    """

 def build(self):
 self.ads = KivMob(TestIds.APP)
 self.ads.new_banner(TestIds.BANNER, top_pos=True)
 self.ads.request_banner()
 self.ads.show_banner()
 return Label(text='test')

if __name__ == "__main__":
    Banner().run()

**error:**
logo = cv2.resize(Banner, (size, size))
 cv2.error: OpenCV(4.6.0) :-1: error: (-5:Bad argument) in function 'resize'
 > Overload resolution failed:
 >  - src is not a numpy array, neither a scalar
 >  - Expected Ptr<cv::UMat> for argument 'src'

** code:**
import cv2
import numpy as np
from Banners import *

#class advert:
    #def __init__(self):

    # load image and start video
    #logo = cv2.imread('logo.jpg')
Banners=Banner()

size = 100
logo = cv2.resize(Banner, (size, size))  #error start this line ?

# Create a mask of logo, img will be a numpy array of type:
img2gray = cv2.cvtColor(logo, cv2.COLOR_BGR2GRAY)
ret, mask = cv2.threshold(img2gray, 1, 255, cv2.THRESH_BINARY)

cap = cv2.VideoCapture('traffic.avi')

alpha = 0.4

while True:
    ret, frame = cap.read()
    frame = cv2.flip(frame,1)
 # Region of Image (ROI), where we want to insert logo
 roi = frame[-size - 10:-10, -size - 10:-10]
 # Set an index of where the mask is
 roi[np.where(mask)] = 0
 roi += logo
    cv2.imshow('frame', frame)
    k = cv2.waitKey(10)

if k == ord('q'):
 break

cap.release()
cv2.destroyAllWindows()

I have question about kivmod  python.

I want to insert on video the following kivmob banner at python, but I can't convert kivmod to  array image can be converted but Is there a way for kivmod ?

So ı want to make as hbbtv following image, ıhan to add python kivmob on videos in python. for this , I think need convert kivmob to array.

My expecting that: I want to show kivmob banner on video in Python, not Android.

I can do it that show image on video at python but i can not do for kivmob


问:
I receive application define object defined error while inserting bloomberg BDP formula to a cell
I get  application defined error while inserting a formula that is run by bloomberg addin.

```<code>Worksheets("Portfoy").Cells(portfoyCounter, 10).Formula = "=BDP(" & Chr(34) & Worksheets("Portfoy").Cells(portfoyCounter , 3).Value & " ISIN" & Chr(34) & "," & Chr(34) & "YAS_RISK" & Chr(34) & ")*100*"
</code>```

This code should insert =BDP("XS1634372954 ISIN";"YAS_RISK")*100 this to the cell (portfoyCounter, 10) and XS1634372954  is located in Cells(portfoyCounter , 3)

portfoyCounter variable holds the correct row count I have checked it. I have tried above code in the same manner in different code blocks without any issue but I do not know why I get that error this time.

Tnx vm for you Help in advance.

I checked the counter values but it seems correct.

Body:
I get  application defined error while inserting a formula that is run by bloomberg addin.

Worksheets("Portfoy").Cells(portfoyCounter, 10).Formula = "=BDP(" & Chr(34) & Worksheets("Portfoy").Cells(portfoyCounter , 3).Value & " ISIN" & Chr(34) & "," & Chr(34) & "YAS_RISK" & Chr(34) & ")*100*"

This code should insert =BDP("XS1634372954 ISIN";"YAS_RISK")*100 this to the cell (portfoyCounter, 10) and XS1634372954  is located in Cells(portfoyCounter , 3)

portfoyCounter variable holds the correct row count I have checked it. I have tried above code in the same manner in different code blocks without any issue but I do not know why I get that error this time.

Tnx vm for you Help in advance.

I checked the counter values but it seems correct.


问:
Extent reports v5 features customization similar to Allure-reports
I wanted my report to show the steps in detail for each test case, say,
test001() has
Login to application,
Provide Username and Password,
Click Signup button etc
Verify INbox
Verify Outbox
Verify Sent
Verify Draft.

test002()
Search with a keyword
Display result
Click on result

etc..
Similar to Allure-report test case descriptions. [See allure report screen shot below ]

enter image description here

How do I achieve this using extent report TestListener TestNG?

Appreciate your help.

Thanks
Renjith

tried getMethod(), but didnt find details to display the test body.


问:
When I run above code it's showing me following error message :
I  try marketing mail send using sendgrid api, marketing/test/send_email use endpoints then error shows : {"errors":[{"field":null,"message":"unauthorized"}]}

I tried to change the fields, any solution of this error,


问:
How to apply multiple if condition on a series and get the results in a new column
I want to apply multiple if conditions on a series and get the results in a new column, please help me. I have the following dictionary:

```<code>cardinal_Temp = ["Tbas_veg", "Topt1_veg", "Topt2_veg","Tmax_veg"]
wheat_CardTemp_vegetative = [4, 22, 28, 38]
Veg_CardTemp= dict(zip(cardinal_Temp, wheat_CardTemp_vegetative))
</code>```

And a daily temperature list with more than 400 values as:

```<code>Tmean= Date_Tmean["Tmean"]
</code>```

How to script the if condition below and get the results in a new column?

```<code>if ((Tmean>Veg_CardTemp["Tbas_veg"]) and (Tmean<Veg_CardTemp["Topt1_veg"]):
    Temfunction = (Tmean-Veg_CardTemp["Tbas_veg"])/(Veg_CardTemp["Topt1_veg"]-Veg_CardTemp["Tbas_veg"])
elif ((Veg_CardTemp["Topt1_veg"]<=Tmean) and (Tmean<=Veg_CardTemp["Topt2_veg"])):
    Tempfunction = 1
elif ((Veg_CardTemp["Topt2_veg"]<Tmean) and (Tmean<Veg_CardTemp["Tmax_veg"])):
    Tempfunction = (Veg_CardTemp["Tmax_veg"]-Tmean)/(Veg_CardTemp["Tmax_veg"]-Veg_CardTemp["Topt2_veg"])
elif (Tmean<=Veg_CardTemp["Tbas_veg"]) or (Tmean>=Veg_CardTemp["Tmax_veg"])):
    Tempfunction = 0
    Tempfunction = df[]
</code>```

And how to get a final list with the results of all the if conditions above?

I tried the above script many times and I get an error or an empty list.

Body:
I want to apply multiple if conditions on a series and get the results in a new column, please help me. I have the following dictionary:

cardinal_Temp = ["Tbas_veg", "Topt1_veg", "Topt2_veg","Tmax_veg"]
wheat_CardTemp_vegetative = [4, 22, 28, 38]
Veg_CardTemp= dict(zip(cardinal_Temp, wheat_CardTemp_vegetative))

And a daily temperature list with more than 400 values as:

Tmean= Date_Tmean["Tmean"]

How to script the if condition below and get the results in a new column?

if ((Tmean>Veg_CardTemp["Tbas_veg"]) and (Tmean<Veg_CardTemp["Topt1_veg"]):
    Temfunction = (Tmean-Veg_CardTemp["Tbas_veg"])/(Veg_CardTemp["Topt1_veg"]-Veg_CardTemp["Tbas_veg"])
elif ((Veg_CardTemp["Topt1_veg"]<=Tmean) and (Tmean<=Veg_CardTemp["Topt2_veg"])):
    Tempfunction = 1
elif ((Veg_CardTemp["Topt2_veg"]<Tmean) and (Tmean<Veg_CardTemp["Tmax_veg"])):
    Tempfunction = (Veg_CardTemp["Tmax_veg"]-Tmean)/(Veg_CardTemp["Tmax_veg"]-Veg_CardTemp["Topt2_veg"])
elif (Tmean<=Veg_CardTemp["Tbas_veg"]) or (Tmean>=Veg_CardTemp["Tmax_veg"])):
    Tempfunction = 0
    Tempfunction = df[]

And how to get a final list with the results of all the if conditions above?

I tried the above script many times and I get an error or an empty list.


问:
How to use packages installed by --user flag in python?
I was trying to install the AWS scheduler_cli using:

```<code>python setup.py install
</code>```

in the extracted directory of scheduler_cli.zip
as per the official instructions at:-

https://docs.aws.amazon.com/solutions/latest/instance-scheduler-on-aws/scheduler-cli.html#install

but I keep getting the permission denied error:

```<code>[Errno 13] Permission denied: 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\\Lib\\site-packages\\test-easy-install-10592.write-test'
</code>```

So, I install using the following command:-

```<code>python setup.py install --user
</code>```

Which was successful. But now I can't access the cli.

Something similar is here are but this is for linux:-
How do I access packages installed by `pip --user`?

Please help.

Body:
I was trying to install the AWS scheduler_cli using:

python setup.py install

in the extracted directory of scheduler_cli.zip
as per the official instructions at:-

https://docs.aws.amazon.com/solutions/latest/instance-scheduler-on-aws/scheduler-cli.html#install

but I keep getting the permission denied error:

[Errno 13] Permission denied: 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\\Lib\\site-packages\\test-easy-install-10592.write-test'

So, I install using the following command:-

python setup.py install --user

Which was successful. But now I can't access the cli.

Something similar is here are but this is for linux:-
How do I access packages installed by `pip --user`?

Please help.


问:
clear the inpute react ts
I wrote the following code and the problem I have is that when I click on the buttons, the value of my counter changes, but the first number I entered remains in the input and does not change.
So how can I clear the input value after I enter a number?</p>
```<code>
import React, {useState} from 'react';

const App: React.FC = () => {
    const [count, setCount] = useState<number>(0)

    const increaseHandler = (e: React.MouseEvent<HTMLButtonElement>) => {
        e.preventDefault()
        setCount(count + 1)
    }

    const decreaseHandler = (e: React.MouseEvent<HTMLButtonElement>) => {
        e.preventDefault()
        setCount(count - 1)
    }

    const resetHandler = (e: React.MouseEvent<HTMLButtonElement>) => {
        e.preventDefault()
        setCount(0)
    }

    const changeInputHandler = (event: React.ChangeEvent<HTMLInputElement>) => {
        setCount(+event.target.value)
    }

    return (
        <form>
            <div>
                {count}
            </div>
            <section style={{display: "flex", flexDirection: "row"}}>
                <button onClick={increaseHandler}>increase</button>
                <button onClick={resetHandler}>reset</button>
                <button onClick={decreaseHandler}>decrease</button>
            </section>
            <input value={count} onChange={changeInputHandler}/>
        </form>
    )
}
export default App

</code>```

Title: clear the inpute react ts

Body:
I wrote the following code and the problem I have is that when I click on the buttons, the value of my counter changes, but the first number I entered remains in the input and does not change.
So how can I clear the input value after I enter a number?

import React, {useState} from 'react';

const App: React.FC = () => {
    const [count, setCount] = useState<number>(0)

    const increaseHandler = (e: React.MouseEvent<HTMLButtonElement>) => {
        e.preventDefault()
        setCount(count + 1)
    }

    const decreaseHandler = (e: React.MouseEvent<HTMLButtonElement>) => {
        e.preventDefault()
        setCount(count - 1)
    }

    const resetHandler = (e: React.MouseEvent<HTMLButtonElement>) => {
        e.preventDefault()
        setCount(0)
    }

    const changeInputHandler = (event: React.ChangeEvent<HTMLInputElement>) => {
        setCount(+event.target.value)
    }

    return (
        <form>

                {count}

                <button onClick={increaseHandler}>increase</button>
                <button onClick={resetHandler}>reset</button>
                <button onClick={decreaseHandler}>decrease</button>

            <input value={count} onChange={changeInputHandler}/>
        </form>
    )
}
export default App


问:
How do you generate a JWT for authentication with google API using a service accout?
I have tried many methods of generating a JWT for the google API using the private key downloaded when I created my service account. All of the methods I have tried have errored saying the signature is invalid. I have gone through the documentation on google and do not know what I am missing. I am hoping someone has a simple working implementation of this that I can use for a reference.

Additional information:

I would like to implement this in Unity3D using C#.  The API that I am attempting to connect to is "https://oauth2.googleapis.com/token".


问:
shortest path in neo4j with filter
I'm struggling with finding the shortest path in neo4j.  This is a screenshot of how the

The query looks like this:

```<code>MATCH (src:Location { id: 'E5050' })
MATCH (dst:Location { id: 'F2030' })
CALL apoc.algo.dijkstra(src, dst, 'ROUTE', 'weight',10)
YIELD path
WHERE NONE(x IN NODES(path) WHERE x:Location AND x.enabled is not null AND x.enabled = false)
AND NONE(r IN RELATIONSHIPS(path) WHERE r:ROUTE AND r.enabled is not null AND r.enabled = false)
RETURN path
</code>```

As you can see, every Location and every ROUTE relation has an 'enabled' flag.  This way it should be possible to enable / disable a certain route.

In normal situation, F0110 is enabled.  Then the query returns the correct result:

```<code>E5050-F0100-F0110-F0123-F2030
</code>```

When F0110 is disabled (enabled = false) then it should choose the alternative route :

```<code>E5050-E5060-E5061-E5070-F0000-F0010-F0023-F2030
</code>```

But I never get this result.

What could be wrong with my query?  Any help is much appreciated.

Thank you

Title: shortest path in neo4j with filter

Body:
I'm struggling with finding the shortest path in neo4j.  This is a screenshot of how the

The query looks like this:

MATCH (src:Location { id: 'E5050' })
MATCH (dst:Location { id: 'F2030' })
CALL apoc.algo.dijkstra(src, dst, 'ROUTE', 'weight',10)
YIELD path
WHERE NONE(x IN NODES(path) WHERE x:Location AND x.enabled is not null AND x.enabled = false)
AND NONE(r IN RELATIONSHIPS(path) WHERE r:ROUTE AND r.enabled is not null AND r.enabled = false)
RETURN path

As you can see, every Location and every ROUTE relation has an 'enabled' flag.  This way it should be possible to enable / disable a certain route.

In normal situation, F0110 is enabled.  Then the query returns the correct result:

E5050-F0100-F0110-F0123-F2030

When F0110 is disabled (enabled = false) then it should choose the alternative route :

E5050-E5060-E5061-E5070-F0000-F0010-F0023-F2030

But I never get this result.

What could be wrong with my query?  Any help is much appreciated.

Thank you


问:
Ask certificate selection each time when the user logs out the web page in React JS
Currently I have a web app which asks for certificate selection (.pfx) when the page is visited, and after the selection it redirects the user to dashboard page. When the user clicks logout it redirects the user to home page - localhost:3000.

When the page is again reloaded it should ask for certificate selection (but currently is not asking for certificate selection and directly goes to dashboard page)

But when I close the browser each time and load the page it is working as per requirement (i.e asking for certificate selection each time).

So, how to achieve this same functionality (certificate selection on each time) when the user clicks on logout, but without closing the browser.

I see the information is stored somewhere inside the browser and it is resetting on closing the browser and I need to do that in JS/ React when the user clicks on logout.

I also tried clearing the cookie/cache in the browser after the user logout its not working (i.e not asking for certificate selection)


问:
Best way to visualizing cluster memberships in a numpy array
I have an original numpy array of size 13,500 and 3D shape of (15, 30, 30) named 'my_original_data'. I have created 3 features based on class membership of that original array as below named 'my_cluster_df'. I was wondering if there is any best way to visualize these two (my_original_data and the my_cluster_df membership values) side by side so that it can be visualized each value (grid) in each layer of the original dataset (For simplicity, I have focused on one layer of that data only) correspond to which percentage of the class provided membership. An ideal visualization would include the original heatmap data (30 by 30 heatmap numpy array) side by side another with the best visualization for the 3 membership classes for each individual grid in that original 30 by 30 numpy array. I hope that I explained well.

My data, and code attempt is provided below:

```<code>import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
from sklearn.mixture import GaussianMixture

my_original_data = np.random.rand(13500).reshape(15, 30, 30)

rng = np.random.default_rng(42)

X = np.c_[    rng.normal(loc=25, scale=15, size=4500),    rng.normal(loc=65, scale=15, size=4500),    rng.normal(loc=115, scale=15, size=4500),].reshape(-1, 1)

model = GaussianMixture(n_components=3, random_state=42)
model.fit(X)

my_cluster_df = pd.DataFrame(np.round(model.predict_proba(X), 3), columns=["Class_Membership_1", "Class_Membership_2", "Class_Membership_3"])

fig = plt.figure()
ax = fig.add_subplot(111, projection="3d")
x = np.array(my_cluster_df["Class_Membership_1"])
y = np.array(my_cluster_df["Class_Membership_2"])
z = np.array(my_cluster_df["Class_Membership_3"])
ax.scatter(x, y, z, marker="s", c=my_cluster_df.index, s=40, cmap="RdBu")
plt.show()

side_by_side = np.hstack([
    np.array(my_original_data[0, 0:30, 0:30].reshape(30, 30)),
    np.array(my_cluster_df["Class_Membership_1"].head(30 * 30).to_numpy().reshape(30, 30)),
    np.array(my_cluster_df["Class_Membership_2"].head(30 * 30).to_numpy().reshape(30, 30)),
    np.array(my_cluster_df["Class_Membership_3"].head(30 * 30).to_numpy().reshape(30, 30))
])
</code>```

Body:
I have an original numpy array of size 13,500 and 3D shape of (15, 30, 30) named 'my_original_data'. I have created 3 features based on class membership of that original array as below named 'my_cluster_df'. I was wondering if there is any best way to visualize these two (my_original_data and the my_cluster_df membership values) side by side so that it can be visualized each value (grid) in each layer of the original dataset (For simplicity, I have focused on one layer of that data only) correspond to which percentage of the class provided membership. An ideal visualization would include the original heatmap data (30 by 30 heatmap numpy array) side by side another with the best visualization for the 3 membership classes for each individual grid in that original 30 by 30 numpy array. I hope that I explained well.

My data, and code attempt is provided below:

import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
from sklearn.mixture import GaussianMixture

my_original_data = np.random.rand(13500).reshape(15, 30, 30)

rng = np.random.default_rng(42)

X = np.c_[    rng.normal(loc=25, scale=15, size=4500),    rng.normal(loc=65, scale=15, size=4500),    rng.normal(loc=115, scale=15, size=4500),].reshape(-1, 1)

model = GaussianMixture(n_components=3, random_state=42)
model.fit(X)

my_cluster_df = pd.DataFrame(np.round(model.predict_proba(X), 3), columns=["Class_Membership_1", "Class_Membership_2", "Class_Membership_3"])

fig = plt.figure()
ax = fig.add_subplot(111, projection="3d")
x = np.array(my_cluster_df["Class_Membership_1"])
y = np.array(my_cluster_df["Class_Membership_2"])
z = np.array(my_cluster_df["Class_Membership_3"])
ax.scatter(x, y, z, marker="s", c=my_cluster_df.index, s=40, cmap="RdBu")
plt.show()

side_by_side = np.hstack([
    np.array(my_original_data[0, 0:30, 0:30].reshape(30, 30)),
    np.array(my_cluster_df["Class_Membership_1"].head(30 * 30).to_numpy().reshape(30, 30)),
    np.array(my_cluster_df["Class_Membership_2"].head(30 * 30).to_numpy().reshape(30, 30)),
    np.array(my_cluster_df["Class_Membership_3"].head(30 * 30).to_numpy().reshape(30, 30))
])


问:
laravel how to get sum of last week and sum of last last week together?
laravel how to get sum of last week and sum of last last week together?

```<code>
$data['latestDate'] = Models::max('date');
//find latest week Monday to Sunday
$lastSunday = strtotime('last Sunday', strtotime($data['latestDate']));
$data['lastSunday'] = date('Y-m-d',$lastSunday);
$lastMonday= strtotime('-6 day', $lastSunday);
$data['lastMonday'] = date('Y-m-d',$lastMonday);
$lastLastSunday = strtotime('-7 day', $lastSunday);
$lastLastMonday = strtotime('-6 day', $lastLastSunday);
$data['lastLastMonday'] = date('Y-m-d',$lastLastMonday);

$data['listings'] =  Models::whereBetween('date', [$data['lastMonday'], $data['lastSunday']])
->selectRaw("name,name2,date, SUM(views) as views_sum_current_week",)
->orderBy('views_sum_current_week','desc')
->groupBy('name')
->get();
</code>```

At present, I have calculated the sum of last week, how to calculate the sum of last last week, as an added column.
Now I need add a column that sum views of last last week, please instruction me.

```<code>SUM(views) as views_sum_lastlast_week
whereBetween('date', [$data['lastLastMonday'], $data['lastLastSunday']])
</code>```

Body:
laravel how to get sum of last week and sum of last last week together?

$data['latestDate'] = Models::max('date');
//find latest week Monday to Sunday
$lastSunday = strtotime('last Sunday', strtotime($data['latestDate']));
$data['lastSunday'] = date('Y-m-d',$lastSunday);
$lastMonday= strtotime('-6 day', $lastSunday);
$data['lastMonday'] = date('Y-m-d',$lastMonday);
$lastLastSunday = strtotime('-7 day', $lastSunday);
$lastLastMonday = strtotime('-6 day', $lastLastSunday);
$data['lastLastMonday'] = date('Y-m-d',$lastLastMonday);

$data['listings'] =  Models::whereBetween('date', [$data['lastMonday'], $data['lastSunday']])
->selectRaw("name,name2,date, SUM(views) as views_sum_current_week",)
->orderBy('views_sum_current_week','desc')
->groupBy('name')
->get();

At present, I have calculated the sum of last week, how to calculate the sum of last last week, as an added column.
Now I need add a column that sum views of last last week, please instruction me.

SUM(views) as views_sum_lastlast_week
whereBetween('date', [$data['lastLastMonday'], $data['lastLastSunday']])


问:
TCP Socket Servers
Is even possible to start multiple TCP socket server using an list? Maybe a sample would be more useful

```<code>class MyHttpRequestHandler(http.server.SimpleHTTPRequestHandler):
   #This is my handler. It works great for one server so not including it to save space

handler_object = MyHttpRequestHandler
my_servers = []
PORT = 8080
for dev in devices:
   my_servers.append(socketserver.TCPServer(("", PORT), handler_object))
   PORT += 1

for server in my_servers:
   server.serve_forever()
</code>```

So basically what I want to do is iterate through the my_servers list and start each of the servers. IK there may be a chance of starting too many servers, but the function that populates devices takes care of that.

Title: TCP Socket Servers

Body:
Is even possible to start multiple TCP socket server using an list? Maybe a sample would be more useful

class MyHttpRequestHandler(http.server.SimpleHTTPRequestHandler):
   #This is my handler. It works great for one server so not including it to save space

handler_object = MyHttpRequestHandler
my_servers = []
PORT = 8080
for dev in devices:
   my_servers.append(socketserver.TCPServer(("", PORT), handler_object))
   PORT += 1

for server in my_servers:
   server.serve_forever()

So basically what I want to do is iterate through the my_servers list and start each of the servers. IK there may be a chance of starting too many servers, but the function that populates devices takes care of that.


问:
How to use angular 14 build packages for lower versions
I have a component library packaged with angular14, but it cannot be directly used by angular11 sites. What should I do?</p>


问:
Groovy script Logic to get commit author id
Logic in groovy scripts jenkins to get commit author id

Trying that was found in google failed


问:
Hide An Element After A Certain Date
I have created a countdown and want to hide it after the expiry date which is the 17th of December.

The countdown section is called AnnouncementBar__Wrapper40.

Here is the code:

```<code>    <div class="AnnouncementBarnew">
        <div class="AnnouncementBar__Wrapper60">
          <div class="AnnouncementBartext">
              {{ section.settings.content }}
          </div>
          <div class="AnnouncementBartext">
              {{ section.settings.content2 }}
          </div>
        </div>

          <div class="AnnouncementBar__Wrapper40">
      {% include 'countdown-timer',

  title: "CHRISTMAS LAST ORDER",

  end_date: "Dec 17, 2022"

%}
          </div>
    </div>

</code>```

I have tried to hide with code but I copied but my knowledge isn't that advanced.

Title: Hide An Element After A Certain Date

Body:
I have created a countdown and want to hide it after the expiry date which is the 17th of December.

The countdown section is called AnnouncementBar__Wrapper40.

Here is the code:

              {{ section.settings.content }}

              {{ section.settings.content2 }}

      {% include 'countdown-timer',

  title: "CHRISTMAS LAST ORDER",

  end_date: "Dec 17, 2022"

%}

I have tried to hide with code but I copied but my knowledge isn't that advanced.


问:
Data Object occur twice when I reference the soap service c#
I have a soap service written in .net framework. When I reference this in another project, the properties in the models occur twice. As ServicePayload ServicePayload1.
how can i solve this


问:
Elasticsearch synonyms for alphanumeric word
I have a scenario where I need to map the below synonyms with elasticsearch

```<code>12v => 12 volts, 12 volt
6v => 6 volts, 5 volt
12.6v => 12.6 volts, 12.6 volt
</code>```

There could be any number of combinations with volts.

I am not sure about the number of combinations that could be there. Is there any way to add synonyms with patterns like (numeric*v => numeric volts, numeric volt)

Body:
I have a scenario where I need to map the below synonyms with elasticsearch

12v => 12 volts, 12 volt
6v => 6 volts, 5 volt
12.6v => 12.6 volts, 12.6 volt

There could be any number of combinations with volts.

I am not sure about the number of combinations that could be there. Is there any way to add synonyms with patterns like (numeric*v => numeric volts, numeric volt)


问:
Application working when app pool refresh in ASP.NET

App pool refresh issue

Application is not working if we do not refresh the app pool (in IIS).

Issue Background

When our ASP.NET application and database (Oracle SQL developer) was migrated to a new server, it started coming for the new app server and DB server before that in old database and application server, it was not starting up.

Our Investigation

We have started our investigation and created a logging table Before and after the Application Pool refresh in this procedure:

```<code>osspbs_dba.build_request_pkg.get_requests_sp(in_req_id => :in_req_id,
                                             in_site_id => :in_site_id,
                                             out_cur_requests => :out_cur_requests);
</code>```

We found the it is throwing a database error while fetching the cursor

Ora-01861.

Later we have logged the parameter and found that when China user works the NLS_TERRITORY and NLS_LANGUAGE is logged in the database according to their session.

But after that when American user started working then NLS_TERRITORY and NLS_LANGUAGE still logging as CHINA and the error started showing up.

This issue is gone when we refresh the application pool on the application server.

Attaching the screen shot of logs:

At line number 15 REQ_ID -  65527 when I access it from my system after the issue came it is logging it as CHINA.

After the Application Pool refresh It is logging as American and working fine.

So in my investigation once this changes to CHINA then it is not changing for other users sessions who are based on America or other locations.

Note: connection pool size also increased in web.config.

Body:
App pool refresh issue

Application is not working if we do not refresh the app pool (in IIS).

Issue Background

When our ASP.NET application and database (Oracle SQL developer) was migrated to a new server, it started coming for the new app server and DB server before that in old database and application server, it was not starting up.

Our Investigation

We have started our investigation and created a logging table Before and after the Application Pool refresh in this procedure:

osspbs_dba.build_request_pkg.get_requests_sp(in_req_id => :in_req_id,
                                             in_site_id => :in_site_id,
                                             out_cur_requests => :out_cur_requests);

We found the it is throwing a database error while fetching the cursor

Ora-01861.

Later we have logged the parameter and found that when China user works the NLS_TERRITORY and NLS_LANGUAGE is logged in the database according to their session.

But after that when American user started working then NLS_TERRITORY and NLS_LANGUAGE still logging as CHINA and the error started showing up.

This issue is gone when we refresh the application pool on the application server.

Attaching the screen shot of logs:

At line number 15 REQ_ID -  65527 when I access it from my system after the issue came it is logging it as CHINA.

After the Application Pool refresh It is logging as American and working fine.

So in my investigation once this changes to CHINA then it is not changing for other users sessions who are based on America or other locations.

Note: connection pool size also increased in web.config.


问:
The condition 'is empty' is not working in select query of JPA
Lets say a person class has friends in it.

Then

```<code>select p.friends is empty from person p;
</code>```

throws up IllegalStateException: Unexpected AST org.hibernate.hql.internal.ast.tree.SqlNode

But

```<code>select p.friends is null from person p;
</code>```

is returning true/false

Is this expected?Is there a work around to get the boolean without extracting the payload and checking if it is empty or not

Body:
Lets say a person class has friends in it.

Then

select p.friends is empty from person p;

throws up IllegalStateException: Unexpected AST org.hibernate.hql.internal.ast.tree.SqlNode

But

select p.friends is null from person p;

is returning true/false

Is this expected?Is there a work around to get the boolean without extracting the payload and checking if it is empty or not


问:
Mediaplayer work on Emulator but not on the device
I want to play an MP 3 file using a media player. On the emulator it works fine (Pixel 5 with API 31) and on my device (Oneplus Nord with Android 12) it runs for a few seconds and then just stops.

```<code>
</code>```

public void mediaplayer(){

```<code>MediaPlayer mediaPlayer;
int[] mp3IDs = new int[10];
mp3IDs[0] = R.raw.von_oberkoerperentkleiden_bis_schocknopf_druecken;
mp3IDs[1]=R.raw.schock_abgeben; // R.raw."Mp3 File"
mp3IDs[2]=R.raw.herzdruckmassage_durchfuehren;            // R.raw."Mp3 File"
mp3IDs[3]=R.raw.patienten_nicht_beruehren;                // R.raw."Mp3 File"
mp3IDs[4]=R.raw.handballen_platzieren;                   // R.raw."Mp3 File"
mp3IDs[5]=R.raw.brustkorb_eindruecken;                  // R.raw."Mp3 File"
mp3IDs[6]=R.raw.es_ist_wichtig_kraeftig_druecken;      // R.raw."Mp3 File"
mp3IDs[7]=R.raw.beenden_herzdruckmassage;             // R.raw."Mp3 File"
mp3IDs[8]=R.raw.herzdruckmassage_fortfuehren;        // R.raw."Mp3 File"
mp3IDs[9]=R.raw.beugen_sie_sich_ueber_den_patiente; // R.raw."Mp3 File"

mediaPlayer = MediaPlayer.create(this,mp3IDs[0]);
mediaPlayer.start();
</code>```
```<code>
</code>```

Here you can see the log cast at the moment when the audio file is interrupted.

The audio file should run to the end which is 1 minute 21 seconds but it breaks up after 10 -15 seconds on my device.Is there a way to fix this problem?

Body:
I want to play an MP 3 file using a media player. On the emulator it works fine (Pixel 5 with API 31) and on my device (Oneplus Nord with Android 12) it runs for a few seconds and then just stops.

public void mediaplayer(){

MediaPlayer mediaPlayer;
int[] mp3IDs = new int[10];
mp3IDs[0] = R.raw.von_oberkoerperentkleiden_bis_schocknopf_druecken;
mp3IDs[1]=R.raw.schock_abgeben; // R.raw."Mp3 File"
mp3IDs[2]=R.raw.herzdruckmassage_durchfuehren;            // R.raw."Mp3 File"
mp3IDs[3]=R.raw.patienten_nicht_beruehren;                // R.raw."Mp3 File"
mp3IDs[4]=R.raw.handballen_platzieren;                   // R.raw."Mp3 File"
mp3IDs[5]=R.raw.brustkorb_eindruecken;                  // R.raw."Mp3 File"
mp3IDs[6]=R.raw.es_ist_wichtig_kraeftig_druecken;      // R.raw."Mp3 File"
mp3IDs[7]=R.raw.beenden_herzdruckmassage;             // R.raw."Mp3 File"
mp3IDs[8]=R.raw.herzdruckmassage_fortfuehren;        // R.raw."Mp3 File"
mp3IDs[9]=R.raw.beugen_sie_sich_ueber_den_patiente; // R.raw."Mp3 File"

mediaPlayer = MediaPlayer.create(this,mp3IDs[0]);
mediaPlayer.start();

Here you can see the log cast at the moment when the audio file is interrupted.

The audio file should run to the end which is 1 minute 21 seconds but it breaks up after 10 -15 seconds on my device.Is there a way to fix this problem?


问:
How can we Obfuscate a powerBI custom connector? .mez file
I have written a custom connector for PowerBI which requests my_app for data.
this connector is a mez file, and i want to obfuscate this so that users cannot reverse engineer and look at what API calls are made to my_app.

Is there a way to achieve this obfuscation? and how do we achieve this.

There is no data on the web on how to obfuscate a .mez file, so i am stuck here.


问:
Invariant Violation: Failed to call into JavaScript module method in react native
```<code>Invariant Violation: Failed to call into JavaScript module method .onShouldStartLoadWithRequest(). Module has not been registered as callable. Registered callable JavaScript modules (n = 12): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, AppRegistry, RCTEventEmitter.
        A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes
</code>```

I have already try clean gradle and clean project and again rebuild project in android studio. This error occur only in android device.

Body:
Invariant Violation: Failed to call into JavaScript module method .onShouldStartLoadWithRequest(). Module has not been registered as callable. Registered callable JavaScript modules (n = 12): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, AppRegistry, RCTEventEmitter.
        A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes

I have already try clean gradle and clean project and again rebuild project in android studio. This error occur only in android device.


问:
How to get the connected network details on android via adb command on non rooted device
I can get the Wifi scan page via command
adb shell am start -a android.net.wifi.PICK_WIFI_NETWORK

However not finding any way to go on details page of connected wifi.

I tried command "adb shell iw dev wlan0 link" but it works on rooted device only.

Android Version 11+

Command to get connected wifi details.


问:
Scroll an image to the exact 'y' location in html?
I'm new to HTML, CSS, and JS coding. I want to create an image view with multiple images. I have the locations of the words from these images using OCR. I want to create a function that can take the word as an argument, get the location from a global variable output of the OCR and scroll the image/s to the right location.

For example:
Assume we have the following images in a view/container in html. I have the details of all the files including their OCR output from tesseract.

image 1: https://d.novoresume.com/images/doc/minimalist-resume-template.png
image 2: https://www.jobseeker.com/api/media/documents/1cdf7944-6cab-4422-8b39-7ee580688d78/Resume-example-Circulair.svg?v=1650285945478
image 3: https://s3.resume.io/cdn-cgi/image/width=544,height=480,fit=crop,gravity=top,quality=75,format=auto/uploads/local_template_image/image/389/persistent-resource/new-york-resume-templates.jpg
image 4: https://cdn-images.zety.com/templates/zety/valera-11-classic-silver-dark-332@3x.png

Now, I want to create a function that on receiving a word as input can scroll the container to the right image and the right position. Like, for a word that's at the left side of the image, starting a sentence/paragraph,  should scroll up to the top 1/3rd part of the view to bring that particular line/para in focus.

Apologies, if I'm unable to provide a better explanation or any code samples for it; I don't have any yet. Though I hope my intent is clear with the example above


问:
laravel Crypt::encryptString automatically get decrypted while saving in db
I am having JSON field in my database where I store the username and password (encrypted).
but after upgrading to Laravel 9 my password is getting stored automatically in decrypted form.

When I print decrypted password it's working properly but in db its getting stored as the original password.

Below is my code.

```<code>class EmailConfiguration extends BaseModel
{
    protected $table = 'email_configurations';
    protected $guarded = [];
    protected $json = ['configuration'];

    protected static function boot()
    {
        parent::boot();

        $jsonToString = function ($model) {
            // Convert all json attributes to string before saving
            foreach ($model->json as $attribute) {
                $model->$attribute = json_encode($model->$attribute);
            }
        };

        $stringToJson = function ($model) {
            // Convert back all json attributes from strings
            foreach ($model->json as $attribute) {
                $data = json_decode($model->$attribute, true);
                $data = $data ?: [];

                // Use fluent interface
                $model->$attribute = new Fluent($data);
            }
        };

        static::saving($jsonToString);
        static::saved($stringToJson);
        static::loaded($stringToJson);
    }

}
</code>```

My repository code to save email configuration.

```<code>class EmailConfigurationRepository
{

    public function save($data)
    {
        $config= [ 'username'=> $data['user_name'],'password' => Crypt::encryptString($data['password'])];
        $configuration = new EmailConfiguration();
        $configuration->user_id = $data['user_id'];
        $configuration->configuration = $config;
        $configuration->save();

        return $configuration->refresh();
    }

}

<?php

namespace App\Support;

use Countable;
use Illuminate\Support\Fluent as FluentBase;
use Iterator;

// We could have simple implemented IteratorAggregate and return an ArrayIterator
// object here. But I want the Fluent access to continue for sub arrays.
// Thus, we are implementing Iterator interface

class Fluent extends FluentBase implements Iterator, Countable
{
    /**
     * {@inheritdoc}
     */
    public function get($key, $default = null)
    {
        $value = parent::get($key, $default);

        // If the value is an array, wrap it in a Fluent.
        // Useful for accesses like $a->b->c->d
        return is_array($value) && ! empty($value) ? new self($value) : $value;
    }

    public function rewind()
    {
        return reset($this->attributes);
    }

    public function current()
    {
        return current($this->attributes);
    }

    public function key()
    {
        return key($this->attributes);
    }

    public function next()
    {
        return next($this->attributes);
    }

    public function valid()
    {
        return key($this->attributes) !== null;
    }

    /**
     * Count the number of items in the attributes.
     *
     * @return int
     */
    public function count()
    {
        return count($this->attributes);
    }

    public function merge($data)
    {
        $data = is_fluent($data) ? $data->toArray() : $data;

        return new Fluent(array_merge($this->toArray(), $data));
    }

    public function isEmpty()
    {
        return empty($this->attributes);
    }

    public function isNotEmpty()
    {
        return ! $this->isEmpty();
    }
}
</code>```

When I print output after saving it's working properly it's returning the password encrypted form but still in db it's getting stored as unencrypted.

So assume I enter a username: testing and password: demo123

In db its getting stored as demo123  but when I print before saving model object its showing me in encrypted form.

Body:
I am having JSON field in my database where I store the username and password (encrypted).
but after upgrading to Laravel 9 my password is getting stored automatically in decrypted form.

When I print decrypted password it's working properly but in db its getting stored as the original password.

Below is my code.

class EmailConfiguration extends BaseModel
{
    protected $table = 'email_configurations';
    protected $guarded = [];
    protected $json = ['configuration'];

    protected static function boot()
    {
        parent::boot();

        $jsonToString = function ($model) {
            // Convert all json attributes to string before saving
            foreach ($model->json as $attribute) {
                $model->$attribute = json_encode($model->$attribute);
            }
        };

        $stringToJson = function ($model) {
            // Convert back all json attributes from strings
            foreach ($model->json as $attribute) {
                $data = json_decode($model->$attribute, true);
                $data = $data ?: [];

                // Use fluent interface
                $model->$attribute = new Fluent($data);
            }
        };

        static::saving($jsonToString);
        static::saved($stringToJson);
        static::loaded($stringToJson);
    }

}

My repository code to save email configuration.

class EmailConfigurationRepository
{

    public function save($data)
    {
        $config= [ 'username'=> $data['user_name'],'password' => Crypt::encryptString($data['password'])];
        $configuration = new EmailConfiguration();
        $configuration->user_id = $data['user_id'];
        $configuration->configuration = $config;
        $configuration->save();

        return $configuration->refresh();
    }

}

<?php

namespace App\Support;

use Countable;
use Illuminate\Support\Fluent as FluentBase;
use Iterator;

// We could have simple implemented IteratorAggregate and return an ArrayIterator
// object here. But I want the Fluent access to continue for sub arrays.
// Thus, we are implementing Iterator interface

class Fluent extends FluentBase implements Iterator, Countable
{
    /**
     * {@inheritdoc}
     */
    public function get($key, $default = null)
    {
        $value = parent::get($key, $default);

        // If the value is an array, wrap it in a Fluent.
        // Useful for accesses like $a->b->c->d
        return is_array($value) && ! empty($value) ? new self($value) : $value;
    }

    public function rewind()
    {
        return reset($this->attributes);
    }

    public function current()
    {
        return current($this->attributes);
    }

    public function key()
    {
        return key($this->attributes);
    }

    public function next()
    {
        return next($this->attributes);
    }

    public function valid()
    {
        return key($this->attributes) !== null;
    }

    /**
     * Count the number of items in the attributes.
     *
     * @return int
     */
    public function count()
    {
        return count($this->attributes);
    }

    public function merge($data)
    {
        $data = is_fluent($data) ? $data->toArray() : $data;

        return new Fluent(array_merge($this->toArray(), $data));
    }

    public function isEmpty()
    {
        return empty($this->attributes);
    }

    public function isNotEmpty()
    {
        return ! $this->isEmpty();
    }
}

When I print output after saving it's working properly it's returning the password encrypted form but still in db it's getting stored as unencrypted.

So assume I enter a username: testing and password: demo123

In db its getting stored as demo123  but when I print before saving model object its showing me in encrypted form.


问:
SSRS web page do not show all Report charts
SSRS 15.0.1111.106

In web browser of a one SSRS report I can not see all Report charts. There are 38 report charts lined up below each other.

enter image description here

But on the web page some of then are "missing".

enter image description here

When I right-click on the Report chart icon, then the Report chart can be reloaded and shown.
If I set on each chart page break, then all charts are visible. But I do not want the page breaks there.
I tried also restart the SSRS server.
Is there som trick how to see all charts on one page ?
Thanks.

All report charts should be visible on one page


问:
Start Fresh installation of DBeaver 22.2.1 with data-sources and credentials-config files but password not restored
When I start a new fresh installation of DBeaver 2.22.1 (Installation is a automatic procedure on various computers), I put data-sources and credentials-config file containing all my datasource configuration.

After start, all database (data-sources) are on the DBeaver app but password are not aviaible

After that, if I replace those two file with my original files and restart DBEaver, password are OK.

Do you know why ?


问:
How to generate the configuration and plugins from local .gql file?
I would like to generate graphql configuration using graphql-codegen. If our backend dev only provides a .gql file, how to I generate configuration and plugins from this local file by edit the codegen.yml file?

I've tried to edit my codegen file to the below, but it does not work when I command yarn codegen

```<code>overwrite: true
schema: **'localfile.gql'**
documents: ./*.{ts,tsx}
generates:
  types/generated/introspection.graphql:
    plugins:
      - schema-ast
    config:
      sort: true
  types/generated/graphql.tsx:
    config:
      # typescript
      declarationKind: 'interface'
      scalars:
        DateTime: string
        ID: string
      namingConvention:
        enumValues: change-case#upperCase
      avoidOptionals:
        field: true
      # TypeScript Operations
      skipTypename: true
      # typescript-react-apollo
      withHooks: true

    plugins:
      - typescript
      - typescript-operations
      - typescript-react-apollo

</code>```

I would like know how to generate the configuration and plugins from local .gql file?

Body:
I would like to generate graphql configuration using graphql-codegen. If our backend dev only provides a .gql file, how to I generate configuration and plugins from this local file by edit the codegen.yml file?

I've tried to edit my codegen file to the below, but it does not work when I command yarn codegen

overwrite: true
schema: **'localfile.gql'**
documents: ./*.{ts,tsx}
generates:
  types/generated/introspection.graphql:
    plugins:
      - schema-ast
    config:
      sort: true
  types/generated/graphql.tsx:
    config:
      # typescript
      declarationKind: 'interface'
      scalars:
        DateTime: string
        ID: string
      namingConvention:
        enumValues: change-case#upperCase
      avoidOptionals:
        field: true
      # TypeScript Operations
      skipTypename: true
      # typescript-react-apollo
      withHooks: true

    plugins:
      - typescript
      - typescript-operations
      - typescript-react-apollo

I would like know how to generate the configuration and plugins from local .gql file?


问:
Axios GET Request - Blob - Headers with Language type not readed
I am using axios to download a PDF. In the headers I'm sending the parameter x-language to download either the italian or the english version of the PDF. The pdf gets actually downloaded but the not in the language i want. The language choice is completely random. It looks like the x-language is not read at all. In fact when I pass 'en' inside my x-language variable it still downloads italian. I checked the backend and postman is returning the correct files. Is there something wrong in my axios request?

```<code>import React, { useEffect, useState, useContext } from 'react'
import { toast } from 'react-hot-toast'
import axios from 'axios'
import { useSelector } from 'react-redux'
import { saveAs } from 'file-saver';
import { Context } from '../components/context/LanguageWrapper';

const DocumentCard = ({ d }) => {

  console.log(d);

  const context = useContext(Context)

  const userLogin = useSelector(state => state.userLogin)
  const { userDetails } = userLogin

  const userProfile = useSelector(state => state.userProfile)
  const { profile } = userProfile

  const [localProfile, setLocalProfile] = useState('')

  const handleFileDownload = async (doc_id, doc_name) => {

    const headers = {
      responseType: 'arraybuffer',
      headers: {
        "X-AUTH-TOKEN": userDetails.token,
        "x-language": context.locale.slice(0, 2),
      }
    };

    await axios.get(process.env.REACT_APP_API_ENDPOINT + `/docs/${doc_id}/download`, headers)
      .then(response => {
        let fileBlob = new Blob([response.data], { type: "application/pdf" });
        if (fileBlob.size < 1000) {
          toast.error("File mancante")
        } else {
          saveAs(fileBlob, `${doc_name}.pdf`);
          toast.success('File Scaricato')
        }
      })
      .catch(error => toast.error(error));
  }
</code>```

Below is the postman config (nodejs):

```<code>var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://reservedarea.mywebsite.com/api/v1/public/docs/234/download',
  headers: {
    'X-AUTH-TOKEN': '29d384043faa83d71671a589b49056c13b942fd2',
    'x-language': 'it'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
</code>```

Body:
I am using axios to download a PDF. In the headers I'm sending the parameter x-language to download either the italian or the english version of the PDF. The pdf gets actually downloaded but the not in the language i want. The language choice is completely random. It looks like the x-language is not read at all. In fact when I pass 'en' inside my x-language variable it still downloads italian. I checked the backend and postman is returning the correct files. Is there something wrong in my axios request?

import React, { useEffect, useState, useContext } from 'react'
import { toast } from 'react-hot-toast'
import axios from 'axios'
import { useSelector } from 'react-redux'
import { saveAs } from 'file-saver';
import { Context } from '../components/context/LanguageWrapper';

const DocumentCard = ({ d }) => {

  console.log(d);

  const context = useContext(Context)

  const userLogin = useSelector(state => state.userLogin)
  const { userDetails } = userLogin

  const userProfile = useSelector(state => state.userProfile)
  const { profile } = userProfile

  const [localProfile, setLocalProfile] = useState('')

  const handleFileDownload = async (doc_id, doc_name) => {

    const headers = {
      responseType: 'arraybuffer',
      headers: {
        "X-AUTH-TOKEN": userDetails.token,
        "x-language": context.locale.slice(0, 2),
      }
    };

    await axios.get(process.env.REACT_APP_API_ENDPOINT + `/docs/${doc_id}/download`, headers)
      .then(response => {
        let fileBlob = new Blob([response.data], { type: "application/pdf" });
        if (fileBlob.size < 1000) {
          toast.error("File mancante")
        } else {
          saveAs(fileBlob, `${doc_name}.pdf`);
          toast.success('File Scaricato')
        }
      })
      .catch(error => toast.error(error));
  }

Below is the postman config (nodejs):

var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://reservedarea.mywebsite.com/api/v1/public/docs/234/download',
  headers: {
    'X-AUTH-TOKEN': '29d384043faa83d71671a589b49056c13b942fd2',
    'x-language': 'it'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});


问:
Functions that have no effect on global state
We have the notion of a pure function, whose return value depends only and entirely on its parameters, and which does not change global state.

Example:

```<code>def f(a, b):
    return a+b
</code>```

What would be the correct term for a function that only meets the latter criterion? For example, a function (in a garbage collected language) that allocates a new mutable structure on each call, such that the return value is different for identical parameters?

Example:

```<code>def f(a, b):
    return [a, b]
</code>```

The importance of this classification, from my perspective, is that it is significant to an optimizer: if a function is of this kind, then calls to it can be deleted whenever the return value is not being used. The most concise description I know of is 'calls to this function have no side effects', but it seems like there should be a more concise term.

Body:
We have the notion of a pure function, whose return value depends only and entirely on its parameters, and which does not change global state.

Example:

def f(a, b):
    return a+b

What would be the correct term for a function that only meets the latter criterion? For example, a function (in a garbage collected language) that allocates a new mutable structure on each call, such that the return value is different for identical parameters?

Example:

def f(a, b):
    return [a, b]

The importance of this classification, from my perspective, is that it is significant to an optimizer: if a function is of this kind, then calls to it can be deleted whenever the return value is not being used. The most concise description I know of is 'calls to this function have no side effects', but it seems like there should be a more concise term.


问:
What is the problem the WCF Call Method error?
The conneciton successfully in WCF Client, but I want to call method "Hello World" then i get the next exception:
Failed to connect to http/..:8084/test.svc error code 10060: The connection attempt failed because the connected partner did not respond within the valid time, or the actual error occurred because the connected partner was unable to respond 192.168.90.177:8084
This is IP address192.168.90.177:8084 I don't know what it wants to be, not found IP address

I don't know what is the problem


问:
trying to get the wave border at the bottom of the image using css
wave

css to get that wave shape at the bottom but still not getting it exact.. tried it many times can someone help me out ?

I tried this

border-radius: 0 0 90% 65%/0 0 52% 28%;


问:
How to verify the keyboard is numeric keyboard(i.e shows only numbers) in appium java?
How should the code can determine the keyboard displayed is numarical like shown in image?
enter image description here

I have tried nothing, I am new to this,
I just want to know about this.
the code should return true if the numaric keyboard is displayed. otherwise false.


问:
getting Software caused connection abort: socket write error when try to upload third party jar into codeartifact
Trying to upload the third party jar into AWS Code Artifact

mvn deploy:deploy-file -DgroupId=xxx -DartifactId=xxx -Dversion=1.0  -Dfile=C:\maven383\lib\xxx.jar  -Dpackaging=jar  -DrepositoryId=xxx-java   -Durl=https://xxx-xxx.d.codeartifact.us-west-1.amazonaws.com/maven/java/

Getting error as,
Software caused connection abort: socket write error

changed the parameter values but still not working


问:
Recent Chromium memory leak on large HTML canvases?
Is anyone else seeing a major memory leak in the Chromium GPU process on large HTML canvases?

I have code such as the following which uses the standard technique to "sharpen" a canvas on high DPI displays by scaling it:

```<code>var dpiScale = ...;  // e.g. 2, 2.25, 3
var width = 1500, height = 800;
canvas.width = width * dpiScale;
canvas.style.width = width + "px";
canvas.height = height * dpiScale;
canvas.style.height = height + "px";
canvas.getContext("2d").scale(dpiScale, dpiScale);
</code>```

What I am seeing is an epic memory leak in the Chromium GPU process if there are frequent updates to the canvas (where frequent is a few times per second, potentially much more if there is user interaction such as scrolling or pinch-and-zoom which repeatedly and quickly changes the canvas contents). The GPU process allocates memory in large quantities, never frees it, and quite quickly falls over.

The issue appears to have the following characteristics:

Applies to Chrome and Edge, but not to Safari or Firefox (hence I'm classing this as "Chromium")

Seems to be a recent change, or at least to have worsened significantly in recent versions, or else I believe I'd've spotted it before

Seems to be related to the (scaled) canvas size; a threshold beyond which problems start. Removing the scaling (dpiScale = 1) removes the problem. Using scaling but with a smaller canvas also seems to remove the problem.

Doesn't appear to relate to the use of any specific canvas primitives. I've reduced the canvas activity to basics such as moveTo(), lineTo(), stroke(), and fill() and can still observe the problem. I'm not drawing images on the canvas. I've specifically (and unsuccessfully) tried removing all uses of fillText(). Despite the mention of {willReadFrequently: true} below, I am not reading from the canvas using getImageData().

What I find very interesting is that there are two workarounds which are effective:

Throttle the frequency of canvas updates. Instead of using requestAnimationFrame(), artificially throttle updates so that they occur much less frequently, such as 20fps.

Use getContext("2d", {willReadFrequently: true})

The second of these is particularly interesting. The documentation isn't great, but I believe that it's turning off hardware acceleration. To my surprise, there seems to be no real CPU penalty associated with this in the context of the sort of drawing that I'm doing. What happens with this turned on is that the GPU process still starts allocating large amounts of memory during frequent updates (e.g. scrolling), but does then free it when things quieten down again.

I can't absolutely rule out the notion that this is in fact a graphics driver issue rather than a browser issue, or the interaction of Chromium with the graphics driver. I don't seem to be able to replicate the problem on all computers, and it doesn't happen absolutely 100% of the time on my test machine.

While I have the workaround of {willReadFrequently: true}, I'm wondering if anyone has experienced the same thing, and has:

Any further insights

A better workaround than {willReadFrequently: true}

A link to a specific canvas action - something which I shouldn't be doing, or could stop doing - which I've overlooked, and is the specific cause of the problem

?

Body:
Is anyone else seeing a major memory leak in the Chromium GPU process on large HTML canvases?

I have code such as the following which uses the standard technique to "sharpen" a canvas on high DPI displays by scaling it:

var dpiScale = ...;  // e.g. 2, 2.25, 3
var width = 1500, height = 800;
canvas.width = width * dpiScale;
canvas.style.width = width + "px";
canvas.height = height * dpiScale;
canvas.style.height = height + "px";
canvas.getContext("2d").scale(dpiScale, dpiScale);

What I am seeing is an epic memory leak in the Chromium GPU process if there are frequent updates to the canvas (where frequent is a few times per second, potentially much more if there is user interaction such as scrolling or pinch-and-zoom which repeatedly and quickly changes the canvas contents). The GPU process allocates memory in large quantities, never frees it, and quite quickly falls over.

The issue appears to have the following characteristics:

Applies to Chrome and Edge, but not to Safari or Firefox (hence I'm classing this as "Chromium")

Seems to be a recent change, or at least to have worsened significantly in recent versions, or else I believe I'd've spotted it before

Seems to be related to the (scaled) canvas size; a threshold beyond which problems start. Removing the scaling (dpiScale = 1) removes the problem. Using scaling but with a smaller canvas also seems to remove the problem.

Doesn't appear to relate to the use of any specific canvas primitives. I've reduced the canvas activity to basics such as moveTo(), lineTo(), stroke(), and fill() and can still observe the problem. I'm not drawing images on the canvas. I've specifically (and unsuccessfully) tried removing all uses of fillText(). Despite the mention of {willReadFrequently: true} below, I am not reading from the canvas using getImageData().

What I find very interesting is that there are two workarounds which are effective:

Throttle the frequency of canvas updates. Instead of using requestAnimationFrame(), artificially throttle updates so that they occur much less frequently, such as 20fps.

Use getContext("2d", {willReadFrequently: true})

The second of these is particularly interesting. The documentation isn't great, but I believe that it's turning off hardware acceleration. To my surprise, there seems to be no real CPU penalty associated with this in the context of the sort of drawing that I'm doing. What happens with this turned on is that the GPU process still starts allocating large amounts of memory during frequent updates (e.g. scrolling), but does then free it when things quieten down again.

I can't absolutely rule out the notion that this is in fact a graphics driver issue rather than a browser issue, or the interaction of Chromium with the graphics driver. I don't seem to be able to replicate the problem on all computers, and it doesn't happen absolutely 100% of the time on my test machine.

While I have the workaround of {willReadFrequently: true}, I'm wondering if anyone has experienced the same thing, and has:

Any further insights

A better workaround than {willReadFrequently: true}

A link to a specific canvas action - something which I shouldn't be doing, or could stop doing - which I've overlooked, and is the specific cause of the problem

?


问:
How can i connect resources in Azure using System Managed identity?
I have deployed an app into Azure , namely a .net app and want to use the System Managed Identity feature in Azure, so as to not use username and password in my database connection strings.

I went to my App Service , named TestApp. For this app in the Configuration there is a connection string that has a username and password, like the following format:

So all i did was create the Identity and grant the database access to that managed identity unde Add Role Assignment and change the App Service connection string to the following:

```<code> Server=<servername>.database.windows.net,1433;Database=<database>;Authentication=Active
 Directory Default
</code>```

But it doesnt connect at all Does the .net code need to change in regards to the way i connect to the db ?

Any ideas on what i may have missed

Body:
I have deployed an app into Azure , namely a .net app and want to use the System Managed Identity feature in Azure, so as to not use username and password in my database connection strings.

I went to my App Service , named TestApp. For this app in the Configuration there is a connection string that has a username and password, like the following format:

So all i did was create the Identity and grant the database access to that managed identity unde Add Role Assignment and change the App Service connection string to the following:

 Server=<servername>.database.windows.net,1433;Database=<database>;Authentication=Active
 Directory Default

But it doesnt connect at all Does the .net code need to change in regards to the way i connect to the db ?

Any ideas on what i may have missed


问:
vue js build contains some unexpected files
Dist folder of project contains some extra files.

my dis/js folder snip

I am new in vue, I tryed to find something on vue js official website but I have nothing, can someone help me?


问:
How get camera photo result after allow permission?
I have problem, because I have sth like this, to ask about permission, but now I cant receive foto result file when user want to save it.

```<code>registerForActivityResult(
        ActivityResultContracts.RequestPermission()
    ) { isGranted: Boolean ->
        if (isGranted) {
            open camera Intent
        } else {
            access denied
            ).show()
        }
    }
</code>```

I write that I should use this code to receive foto, but where and how? :

```<code>private var imagePickerResultActivityLauncher  = registerForActivityResult(ActivityResultContracts.GetContent()){result ->
 //Do whatever you want to do with the result. the result is a Uri?
</code>```

}

Body:
I have problem, because I have sth like this, to ask about permission, but now I cant receive foto result file when user want to save it.

registerForActivityResult(
        ActivityResultContracts.RequestPermission()
    ) { isGranted: Boolean ->
        if (isGranted) {
            open camera Intent
        } else {
            access denied
            ).show()
        }
    }

I write that I should use this code to receive foto, but where and how? :

private var imagePickerResultActivityLauncher  = registerForActivityResult(ActivityResultContracts.GetContent()){result ->
 //Do whatever you want to do with the result. the result is a Uri?

}


问:
Dynamic add css in Jquery
I am trying to add css rule dynamically using JQuery. It is successfully adding also. I want to know where does this css rule actually adds? Reason for this question is when I try to see my stylesheet, I can't find the css class which I added dynamically.

Can anyone help?

Thanks,
Surbhi

Here is the code I am using:

```<code>var x = document.styleSheets[8];
x.insertRule(".dx-gantt-conn-h { border-top-color: red !important; }", x.cssRules.length);
</code>```

Title: Dynamic add css in Jquery

Body:
I am trying to add css rule dynamically using JQuery. It is successfully adding also. I want to know where does this css rule actually adds? Reason for this question is when I try to see my stylesheet, I can't find the css class which I added dynamically.

Can anyone help?

Thanks,
Surbhi

Here is the code I am using:

var x = document.styleSheets[8];
x.insertRule(".dx-gantt-conn-h { border-top-color: red !important; }", x.cssRules.length);


问:
Translate this ssh command into the ssh_config file
I would like to use a ssh connexion in Visual Studio code but it's not working properly.
I know that if I use this command in the terminal it is working :
ssh.exe -tX user@host_name \machine_name
My problem is about adding the \machine_name in the ssh_config file.
when i type this command I have :
user@host_name's password:
user@\machine_name's password:

Thank you in advance

I tried to add diferent configurations but nothing worked.

```<code>Host host_name
  HostName host_name
  User user
</code>```

Body:
I would like to use a ssh connexion in Visual Studio code but it's not working properly.
I know that if I use this command in the terminal it is working :
ssh.exe -tX user@host_name \machine_name
My problem is about adding the \machine_name in the ssh_config file.
when i type this command I have :
user@host_name's password:
user@\machine_name's password:

Thank you in advance

I tried to add diferent configurations but nothing worked.

Host host_name
  HostName host_name
  User user


问:
to filter multiple rows on button click - laravel
I have a table with student details and I want to filter each row. Like when "ID" and "Name" is entered and filter button is clicked the row with that details has to be displayed. I tried using JavaScript it does filter single rows separately. Is there any approach where I can filter them together or how can I write one single function for separate filter textboxes.

    <input
      type="text"
      id="myInput1"
      class="form-control filter-input"
      placeholder="Search by ID..."
      data-column="0"
    />

    <input
      type="text"
      id="myInput"
      onkeyup="myFunction()"
      class="form-control filter-input"
      placeholder="Search by Name..."
      data-column="1"
    />

    <input
      type="text"
      id="myInput2"
      onkeyup="myFunction2()"
      class="form-control filter-input"
      placeholder="Search by YOP..."
      data-column="3"
    />

    <input
      type="text"
      id="myInput3"
      onkeyup="myFunction3()"
      class="form-control filter-input"
      placeholder="Search by Status..."
      data-column="4"
    />

    <button
      onclick="myFunctionID()"
      class="btn btn-success btn-block mobile-width"
    >
       Filter
    </button>

```

I have used same function and have changed only the array index for each column.

Body:
I have a table with student details and I want to filter each row. Like when "ID" and "Name" is entered and filter button is clicked the row with that details has to be displayed. I tried using JavaScript it does filter single rows separately. Is there any approach where I can filter them together or how can I write one single function for separate filter textboxes.

    <input
      type="text"
      id="myInput1"
      class="form-control filter-input"
      placeholder="Search by ID..."
      data-column="0"
    />

    <input
      type="text"
      id="myInput"
      onkeyup="myFunction()"
      class="form-control filter-input"
      placeholder="Search by Name..."
      data-column="1"
    />

    <input
      type="text"
      id="myInput2"
      onkeyup="myFunction2()"
      class="form-control filter-input"
      placeholder="Search by YOP..."
      data-column="3"
    />

    <input
      type="text"
      id="myInput3"
      onkeyup="myFunction3()"
      class="form-control filter-input"
      placeholder="Search by Status..."
      data-column="4"
    />

    <button
      onclick="myFunctionID()"
      class="btn btn-success btn-block mobile-width"
    >
       Filter
    </button>

I have used same function and have changed only the array index for each column.


问:
Django url call in ajax success innerhtml
I have the below code,

```<code>$.ajax({
                url: '{% url "load" %}',
                type: 'GET',
                data: {

                },
                success: function (response) {
                    const data = response.fs
                    content_container.innerHTML = ""
                    data.map(full => {
                        content_container.innerHTML += `<a href="{%url 'business_sale_cust' id=${full.id} btype=${full.interested %}}">
                                                        <div class="border border-success mt-2 pl-2">

                                                            <h3>${full.companyName}</h3>
                                                            <p>${full.inputEmail}</p>

                                                        </div></a>`
                    })
</code>```

but getting error with href="{%url 'business_sale_cust' id=${full.id} btype=${full.interested %}}.

please let me know how to pass the parameter id and interested with url.

Let me know how to pass the django url within ajax innerhtml.

Body:
I have the below code,

$.ajax({
                url: '{% url "load" %}',
                type: 'GET',
                data: {

                },
                success: function (response) {
                    const data = response.fs
                    content_container.innerHTML = ""
                    data.map(full => {
                        content_container.innerHTML += `

${full.companyName}

${full.inputEmail}

`
                    })

but getting error with <a href="{%url 'business_sale_cust' id=${full.id} btype=${full.interested %}}.

please let me know how to pass the parameter id and interested with url.

Let me know how to pass the django url within ajax innerhtml.


问:
Hide optional content group in PDF with borb for python
I am following this tutorial to add an OCR-layer to scanned PDFs: https://github.com/jorisschellekens/borb-examples#72-performing-ocr-on-a-pdf

However, unlike the pictures in the tutorial, the OCR-layer gets overlayed over the scanned image in the output PDF by default.

Is there a way to hide this layer before saving the output PDF?