问:
How to save value of variable to local stoarage?
I have an input = slider that sets a certain variable x. That distance is then calculated by a number to determine a price.(price = x *0.05)  I want to add whatever price currently set to local stoarage by the click of a button, and then be able to change the input and repeat the process but still keeping the old values in local storage.

I tried this:

```<code>function fetch() { //js for making the slider work
  pricePerKm = {
    "plane": 0.16,
    "car": 0.12,
    "train":0.05,
    "bus":0.1,
    "ship":0.08
  };
  let km = document.getElementById("slider1").value;

  document.getElementById("km").innerHTML = km+" km";
  let price = Math.round(km * pricePerKm[moT]/10)*10;

  document.getElementById("preis").innerHTML = price+" €";

  const addButton = document.getElementById('add') //trying to add value to local storage
  addButton.addEventListener('click', e => {
    localStorage.setItem('priceoutput', price)
  }
  )
}
</code>```
```<code><h1 style="font-size: 70px;" class="preis" id="preis"> 0 € </h1>

<button class="add" id="add"><i class="fa-solid fa-plus"></i></button>
</code>```

It's my first time using local storage so im not surpirsed I failed.
Thanks! :)

Body:
I have an input = slider that sets a certain variable x. That distance is then calculated by a number to determine a price.(price = x *0.05)  I want to add whatever price currently set to local stoarage by the click of a button, and then be able to change the input and repeat the process but still keeping the old values in local storage.

I tried this:

function fetch() { //js for making the slider work
  pricePerKm = {
    "plane": 0.16,
    "car": 0.12,
    "train":0.05,
    "bus":0.1,
    "ship":0.08
  };
  let km = document.getElementById("slider1").value;

  document.getElementById("km").innerHTML = km+" km";
  let price = Math.round(km * pricePerKm[moT]/10)*10;

  document.getElementById("preis").innerHTML = price+" €";

  const addButton = document.getElementById('add') //trying to add value to local storage
  addButton.addEventListener('click', e => {
    localStorage.setItem('priceoutput', price)
  }
  )
}

 0 €

<button class="add" id="add"></button>

It's my first time using local storage so im not surpirsed I failed.
Thanks! :)


来源: stackexchange

问:
How to get the active tab window function?
I'm developing a google chrome extension. I need to get the active tab window function. and update the window function. But can't get the active tab window function.

```<code> chrome.tabs.query({ active: true, currentWindow: true }, tabs => {
      chrome.scripting.executeScript({
        target: { tabId: tabs[0].id! },
        function: () => {
          console.log(window);
        }
      })
      });
</code>```

Manifest.json

```<code>{
  "name": "Dummy Extension",
  "version": "1.0",
  "description": "Build an Extension with Angular",
  "manifest_version": 3,
  "permissions": [
      "tabs",
      "activeTab",
      "scripting"
  ],
  "background": {
      "service_worker": "background.js"
  },
  "action": {
    "default_title": "Chrome extension",
    "default_popup": "index.html"
  },
  "host_permissions": [
    "http://localhost:8004/*",
    "https://localhost:8004/*"
  ]
}

</code>```

ContentLicense: CC BY-SA 4.0

Body:
I'm developing a google chrome extension. I need to get the active tab window function. and update the window function. But can't get the active tab window function.

 chrome.tabs.query({ active: true, currentWindow: true }, tabs => {
      chrome.scripting.executeScript({
        target: { tabId: tabs[0].id! },
        function: () => {
          console.log(window);
        }
      })
      });

Manifest.json

{
  "name": "Dummy Extension",
  "version": "1.0",
  "description": "Build an Extension with Angular",
  "manifest_version": 3,
  "permissions": [
      "tabs",
      "activeTab",
      "scripting"
  ],
  "background": {
      "service_worker": "background.js"
  },
  "action": {
    "default_title": "Chrome extension",
    "default_popup": "index.html"
  },
  "host_permissions": [
    "http://localhost:8004/*",
    "https://localhost:8004/*"
  ]
}


问:
Imported two modules, but one canceles the other
I imported two modules in colab, using cp.

```<code>!cp /content/drive/MyDrive/ML/mymodule.py /content/mymodule.py
import mymodule
!cp /content/drive/MyDrive/ML/innerplot.py /content/innerplot.py
import innerplot
</code>```

Where mymodule must contain ['mini', 'test'], and innerplot must contain ['plot'].

But print(dir(mymodule))
returns...

```<code>['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'np', 'plot', 'plt', 'torch']
</code>```

Which is same from a print(dir(innerplot)). How can I fix this problem?

I tried to restart the colab and even changed the import order, but innerplot always overwrited mymodule.

Body:
I imported two modules in colab, using cp.

!cp /content/drive/MyDrive/ML/mymodule.py /content/mymodule.py
import mymodule
!cp /content/drive/MyDrive/ML/innerplot.py /content/innerplot.py
import innerplot

Where mymodule must contain ['mini', 'test'], and innerplot must contain ['plot'].

But print(dir(mymodule))
returns...

['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'np', 'plot', 'plt', 'torch']

Which is same from a print(dir(innerplot)). How can I fix this problem?

I tried to restart the colab and even changed the import order, but innerplot always overwrited mymodule.


问:
Message: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
Message: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

Filename: src/Dompdf.php


问:
Backpropagation for cross entropy and softmax?
I'm trying to implement the backward pass for an NN with a final layer of Softmax and loss function of Cross Entropy.  I'm following the notes in this article (particularly the "Matrix Multiplication" section).

I'd first like to make sure I'm calculating the derivative of the error with respect to the final outputs correctly.  I'm working on the MNIST classification problem, and so y represents a one-hot encoding of the target and y_hat is my predicted probabilities.

```<code>
def cross_entropy(y, y_hat):
    value = np.log2(np.sum(y*y_hat))
    return value

def d_cross_entropy(y, y_hat):
    return -y/y_hat*np.log(2)

</code>```

I'm a lot more confused on getting the gradient of Softmax. If we say that A = Softmax(Wx+b), then taking the gradient of A with respect to X is more difficult because Ai does not just depend on Xi but on all elements of the X vector.  This means that rather than getting a simple 10-dimensional dA/dX term, I get a 10x10 matrix which throws off the matrix multiplication.  I tried taking the sum to reduce this to a 10-dimensional vector, but this seems incorrect

```<code>
def softmax(x):
    exp = np.exp(x)
    return exp/np.sum(exp)

def d_softmax(x):
    softmax_x = softmax(x)
    jacobian = np.outer(softmax_x, -softmax_x)
    adj = np.eye(x.shape[0])*softmax_x
    jacobian += adj
    return jacobian.reshape((x.shape[0], x.shape[0])).sum()

</code>```

Body:
I'm trying to implement the backward pass for an NN with a final layer of Softmax and loss function of Cross Entropy.  I'm following the notes in this article (particularly the "Matrix Multiplication" section).

I'd first like to make sure I'm calculating the derivative of the error with respect to the final outputs correctly.  I'm working on the MNIST classification problem, and so y represents a one-hot encoding of the target and y_hat is my predicted probabilities.

def cross_entropy(y, y_hat):
    value = np.log2(np.sum(y*y_hat))
    return value

def d_cross_entropy(y, y_hat):
    return -y/y_hat*np.log(2)

I'm a lot more confused on getting the gradient of Softmax. If we say that A = Softmax(Wx+b), then taking the gradient of A with respect to X is more difficult because Ai does not just depend on Xi but on all elements of the X vector.  This means that rather than getting a simple 10-dimensional dA/dX term, I get a 10x10 matrix which throws off the matrix multiplication.  I tried taking the sum to reduce this to a 10-dimensional vector, but this seems incorrect

def softmax(x):
    exp = np.exp(x)
    return exp/np.sum(exp)

def d_softmax(x):
    softmax_x = softmax(x)
    jacobian = np.outer(softmax_x, -softmax_x)
    adj = np.eye(x.shape[0])*softmax_x
    jacobian += adj
    return jacobian.reshape((x.shape[0], x.shape[0])).sum()


问:
Cannot use nbconvert to create my desired layout
Everything works great, except for this less important issues:

Suppose I have this part in my markdown cell:

```<code>B) How far do you agree or disagree with the following statements? (Strongly Disagree to Strongly Agree, 1 to 5)<br>
  B1. The software used in this course are easy to learn and we got familiar with them fast<br>
  B2. We have enough technical support to adapt to the usage of the software<be>
</code>```

and I execute this line:

```<code>!jupyter nbconvert --to pdf --execute --no-input xxxxxxxx.ipynb
</code>```

In the new pdf, it becomes:
B) How far do you agree or disagree with the following statements? (Strongly Disagree to
Strongly Agree, 1 to 5) B1. The software used in this course are easy to learn and we got
familiar with them fast B2. We have enough technical support to adapt to the usage of the
software

It won't start in a new line for each point, unless I force it with \n (sometimes it works?) or create a new line between each point, but then it becomes:
B) How far do you agree or disagree with the following statements? (Strongly Disagree to
Strongly Agree, 1 to 5)

B1. The software used in this course are easy to learn and we got
familiar with them fast

B2. We have enough technical support to adapt to the usage of the
software

Given the complete form quite lengthy, it is pretty odd to format in this way. Do you know whether it is an issue of nbconvert, or I simply made some silly mistakes?

Body:
Everything works great, except for this less important issues:

Suppose I have this part in my markdown cell:

B) How far do you agree or disagree with the following statements? (Strongly Disagree to Strongly Agree, 1 to 5)

  B1. The software used in this course are easy to learn and we got familiar with them fast

  B2. We have enough technical support to adapt to the usage of the software<be>

and I execute this line:

!jupyter nbconvert --to pdf --execute --no-input xxxxxxxx.ipynb

In the new pdf, it becomes:
B) How far do you agree or disagree with the following statements? (Strongly Disagree to
Strongly Agree, 1 to 5) B1. The software used in this course are easy to learn and we got
familiar with them fast B2. We have enough technical support to adapt to the usage of the
software

It won't start in a new line for each point, unless I force it with \n (sometimes it works?) or create a new line between each point, but then it becomes:
B) How far do you agree or disagree with the following statements? (Strongly Disagree to
Strongly Agree, 1 to 5)

B1. The software used in this course are easy to learn and we got
familiar with them fast

B2. We have enough technical support to adapt to the usage of the
software

Given the complete form quite lengthy, it is pretty odd to format in this way. Do you know whether it is an issue of nbconvert, or I simply made some silly mistakes?


问:
SSO - Microsoft Graph API - Azure Personal Access Token
I am working on a project where I need to access the outlook users of my organization using the Graph API, but I don't want to register my app to Azure.

But I have PAT ( Personal Access Token ), So my question is that is it possible to get the details from graph API using the PAT.

like using the PAT instead of Access Token....

I have tried to replace the access token with the Personal access token but getting error like InvalidAccessToken.


问:
Why does the msi installer give "System can not find the path specified"?
When I run my code, it runs all the commands but the msiexec.exe installers.  When it runs those commands I get the following.

CompletedProcess(args=['msiexec.exe', '/a
googlechromestandaloneenterprise64.msi /qn /norestart /lv
chrome.log'], returncode=1639, stdout='', stderr='')

I have searched through this website and tried all the different ideas that I found but all produced the same result.  I have tried running it in a separate cmd window, same results.

I am running Windows 10 21H2.  Python 3.9.7.

I know the code is messy.  It has been hours of trying different things.  Can someone tell me why MSIEXEC.exe acts differently?

```<code>import os
import subprocess

def run(name, para):
    try:
        print(f"Running the following:\n\tProgram: {name}\n\tCommand: {para}\n")
        status =  subprocess.run([name, para], capture_output=True, shell=True, text=True)

    finally:
        return status

class Settings:
    def __init__(self):
        self.timezone = 'Canada Central Standard Time'
        #self.installationsList = [("notepad.exe", "text.txt"), ('calc.exe', '')]

        self.installationsList = [('notepad.exe', 'text.txt'),
        ('msiexec.exe', '/i googlechromestandaloneenterprise64.msi /qn /norestart /lv chrome.log'),
        ('Dell-Command-Update-Windows-Universal-Application_601KT_WIN_4.5.0_A00_01.exe /s /e=c:\Temp', ''),
        ('PlantronicsHubInstaller.EXE /quiet /norestart', ''),
        ('msiexec.exe /I 7z2201-x64.msi /qn', ''),
        ('powershell.exe', ' -executionpolicy bypass -file Remove_Mail_Calendar.ps1')]

    def __str__(self):
        return self.timezone

    def LaunchInstallations(self):
        for name,para in self.installationsList:
            print(run(name, para))

    def SetTimeZone(self):
        run(f"powershell.exe Set-TimeZone -Id '{self.timezone}'", '')
        run('W32tm /resync /force', '')

if __name__ == "__main__":
    print(os.curdir)
    settings = Settings()
    print(settings)
    settings.SetTimeZone() # Setting the local timezone
    settings.LaunchInstallations() # Lauching the list of common installed applications.
    print("Closing Program!")
</code>```

Body:
When I run my code, it runs all the commands but the msiexec.exe installers.  When it runs those commands I get the following.

CompletedProcess(args=['msiexec.exe', '/a
googlechromestandaloneenterprise64.msi /qn /norestart /lv
chrome.log'], returncode=1639, stdout='', stderr='')

I have searched through this website and tried all the different ideas that I found but all produced the same result.  I have tried running it in a separate cmd window, same results.

I am running Windows 10 21H2.  Python 3.9.7.

I know the code is messy.  It has been hours of trying different things.  Can someone tell me why MSIEXEC.exe acts differently?

import os
import subprocess

def run(name, para):
    try:
        print(f"Running the following:\n\tProgram: {name}\n\tCommand: {para}\n")
        status =  subprocess.run([name, para], capture_output=True, shell=True, text=True)

    finally:
        return status

class Settings:
    def __init__(self):
        self.timezone = 'Canada Central Standard Time'
        #self.installationsList = [("notepad.exe", "text.txt"), ('calc.exe', '')]

        self.installationsList = [('notepad.exe', 'text.txt'),
        ('msiexec.exe', '/i googlechromestandaloneenterprise64.msi /qn /norestart /lv chrome.log'),
        ('Dell-Command-Update-Windows-Universal-Application_601KT_WIN_4.5.0_A00_01.exe /s /e=c:\Temp', ''),
        ('PlantronicsHubInstaller.EXE /quiet /norestart', ''),
        ('msiexec.exe /I 7z2201-x64.msi /qn', ''),
        ('powershell.exe', ' -executionpolicy bypass -file Remove_Mail_Calendar.ps1')]

    def __str__(self):
        return self.timezone

    def LaunchInstallations(self):
        for name,para in self.installationsList:
            print(run(name, para))

    def SetTimeZone(self):
        run(f"powershell.exe Set-TimeZone -Id '{self.timezone}'", '')
        run('W32tm /resync /force', '')

if __name__ == "__main__":
    print(os.curdir)
    settings = Settings()
    print(settings)
    settings.SetTimeZone() # Setting the local timezone
    settings.LaunchInstallations() # Lauching the list of common installed applications.
    print("Closing Program!")


问:
Jenkins Docker container is throwing Status 403 error message when testing connection
I'm configuring clouds on Jenkins however docker plugin throws the following error message when testing connection, docker URI is in this format tcp://000.00.0.0:8080 and when i hit test connection it throws the error message

```<code>Status 403: <html><head><meta http-equiv='refresh' content='1;url=/login?from=%2Fversion'/><script>window.location.replace('/login?from=%2Fversion');</script></head><body style='background-color:white; color:white;'>

Authentication required
<!--
-->

</body></html>
com.github.dockerjava.api.exception.DockerException: Status 403: <html><head><meta http-equiv='refresh' content='1;url=/login?from=%2Fversion'/><script>window.location.replace('/login?from=%2Fversion');</script></head><body style='background-color:white; color:white;'>

Authentication required
<!--
-->

</body></html>
    at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:105)
    at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:32)
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
    at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:271)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
    at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:321)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:295)
    at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
    at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Thread.java:829)
</code>```

Why might I be experiencing this Authentication error?

Body:
I'm configuring clouds on Jenkins however docker plugin throws the following error message when testing connection, docker URI is in this format tcp://000.00.0.0:8080 and when i hit test connection it throws the error message

Status 403: <meta http-equiv='refresh' content='1;url=/login?from=%2Fversion'/>

Authentication required

com.github.dockerjava.api.exception.DockerException: Status 403: <meta http-equiv='refresh' content='1;url=/login?from=%2Fversion'/>

Authentication required

    at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:105)
    at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:32)
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
    at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:271)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
    at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:321)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:295)
    at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
    at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Thread.java:829)

Why might I be experiencing this Authentication error?


问:
how to get wsdl of post request?
I have an API .it is used to fetch records .it is a post request and ,I want to make WSDL of it .if it was a get request it was easy to just right click and click on "view source code" but how to do it for post request?

I clicked on view source but didn't get any source code ,it is an API not a web service

Title: how to get wsdl of post request?


问:
How to add @Priority annotation with different values in aspectJ
I have an interface and a bunch of classes implementing that interface.
I want to add @Priority(xxx) annotation to all these classes with changing value as depicted below.

```<code>
public interface IMyInterface{}

Before :

public classA implements IMyInterface{}
public classB implements IMyInterface{}

What I need:

@Priority(1)
public classA implements IMyInterface{}

@Priority(2)
public classB implements IMyInterface{}
</code>```

What i tried so far:

```<code>declare @type: com.package.* : @Priority(999);
</code>```

I am able to add annotations with same value with above approach but i need to add different values.

Any leads on how to achieve this would be very helpful.

Body:
I have an interface and a bunch of classes implementing that interface.
I want to add @Priority(xxx) annotation to all these classes with changing value as depicted below.

public interface IMyInterface{}

Before :

public classA implements IMyInterface{}
public classB implements IMyInterface{}

What I need:

@Priority(1)
public classA implements IMyInterface{}

@Priority(2)
public classB implements IMyInterface{}

What i tried so far:

declare @type: com.package.* : @Priority(999);

I am able to add annotations with same value with above approach but i need to add different values.

Any leads on how to achieve this would be very helpful.


问:
Getting Javascript Heap out of memory error on comparing large array of Json Objects
I have a JSON file which is holding large array of JSON objects having aroung 3,50,000 objects having data structure like below:

```<code>[
 {
  report:abc,
  slug:a
 },
 {
  report:xyz,
  slug:a
 },
 {
  report:example,
  slug:b
 }
 ...
]
</code>```

From this array I want an output like below:

```<code>[
 {
  report:[abc,xyz]
  slug:a
 },
 {
  report:example,
  slug:b
 }
 ...
]
</code>```

SO here reports having same slug property comes into an array.

Below is my code:

```<code>const data = require('./reports_data.json');
const fs = require('fs');

const getData = (data) => {

const reportArr = [];

for (var a=0;a<data.length;a++){
    for(var b=0;b<data.length;b++){

        if(data[a].slug == data[b].slug){

            const report = [];
            const val = data[b].report;
            report.push(val);
            const myObj = {
                slug:data[a].slug,
                reports:report
            }

            reportArr.push(myObj);
        }
    }
}

console.log('--------------------------------------');
console.log(reportArr);

}

getData(data);
</code>```

Someone let me now is there any efficient way of doing this operation.I tried running my code like this also node --max-old-space-size=4096 index.js but still facing same error below:

```<code>[41955:0x523ce90]   162238 ms: Mark-sweep (reduce) 4096.9 (4102.7) -> 4096.9 (4104.7) MB, 3481.7 / 0.4 ms  (average mu = 0.092, current mu = 0.000) allocation failure scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0xa3ac10 node::Abort() [node]
2: 0x970199 node::FatalError(char const*, char const*) [node]
3: 0xbba58e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool)
[node]
4: 0xbba907 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char
const*, bool) [node]
5: 0xd76b25  [node]
6: 0xd776af  [node]
7: 0xd854eb v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace,
v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
8: 0xd890ac v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int,
v8::internal::AllocationType, v8::internal::AllocationOrigin,
v8::internal::AllocationAlignment) [node]
9: 0xd5778b v8::internal::Factory::NewFillerObject(int, bool,
v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
10: 0x109fd4f v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*,
v8::internal::Isolate*) [node]
11: 0x1448f59  [node]
Aborted (core dumped)
</code>```

Anyone let me know how can I get the desired result.

Body:
I have a JSON file which is holding large array of JSON objects having aroung 3,50,000 objects having data structure like below:

[
 {
  report:abc,
  slug:a
 },
 {
  report:xyz,
  slug:a
 },
 {
  report:example,
  slug:b
 }
 ...
]

From this array I want an output like below:

[
 {
  report:[abc,xyz]
  slug:a
 },
 {
  report:example,
  slug:b
 }
 ...
]

SO here reports having same slug property comes into an array.

Below is my code:

const data = require('./reports_data.json');
const fs = require('fs');

const getData = (data) => {

const reportArr = [];

for (var a=0;a<data.length;a++){
    for(var b=0;b<data.length;b++){

        if(data[a].slug == data[b].slug){

            const report = [];
            const val = data[b].report;
            report.push(val);
            const myObj = {
                slug:data[a].slug,
                reports:report
            }

            reportArr.push(myObj);
        }
    }
}

console.log('--------------------------------------');
console.log(reportArr);

}

getData(data);

Someone let me now is there any efficient way of doing this operation.I tried running my code like this also node --max-old-space-size=4096 index.js but still facing same error below:

[41955:0x523ce90]   162238 ms: Mark-sweep (reduce) 4096.9 (4102.7) -> 4096.9 (4104.7) MB, 3481.7 / 0.4 ms  (average mu = 0.092, current mu = 0.000) allocation failure scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0xa3ac10 node::Abort() [node]
2: 0x970199 node::FatalError(char const*, char const*) [node]
3: 0xbba58e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool)
[node]
4: 0xbba907 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char
const*, bool) [node]
5: 0xd76b25  [node]
6: 0xd776af  [node]
7: 0xd854eb v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace,
v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
8: 0xd890ac v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int,
v8::internal::AllocationType, v8::internal::AllocationOrigin,
v8::internal::AllocationAlignment) [node]
9: 0xd5778b v8::internal::Factory::NewFillerObject(int, bool,
v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
10: 0x109fd4f v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*,
v8::internal::Isolate*) [node]
11: 0x1448f59  [node]
Aborted (core dumped)

Anyone let me know how can I get the desired result.


问:
ALM integration fails in SonarQube
we had our sonarqube infrastructure hosted on AWS previously. Now we have migrated to GCP, sonarqube scanning is working fine.

But for PR decorations, in ALM integrations section, when we add Azure DevOps URL and token, configuration status shows failed.

We have checked with network team on server and they have confirmed, dev.azure.com is allowed in proxy, also curl dev.azure.com also works when we directly ping the command on server.

Not sure what is causing the connection fail from SonarQube UI.

Title: ALM integration fails in SonarQube


问:
If we can do remoting through ssh command why powershell remoting come into existence?
When we using powershell remoting we have many prerequisite as compared to remoting through ssh command. So, I just want to know that if we can do remoting through ssh command why powershell remoting come into existence?

Prerequisite:

Configure WinRM

Use WSMan protocol

Allows the client to have full network connectivity to that address


问:
Java: cannot access org.springframework.boot.SpringApplication
I am getting this error when I try to start the Spring Boot Application:

java: cannot access org.springframework.boot.SpringApplication   bad class file: /repository/org/springframework/boot/spring-boot/3.0.1/spring-boot-3.0.1.jar!/org/springframework/boot/SpringApplication.class
class file has wrong version 61.0, should be 55.0
Please remove or make sure it appears in the correct subdirectory of the classpath.

I had a look at the below SO question and it looks like this error happens when the Spring Boot version is 3.0.1. But I dont have that version mentioned in the build.gradle file.

java: cannot access org.springframework.boot.SpringApplication bad class file

here is the build.gradle file portion:

```<code>    springCloudVersion = '2021.0.3'
    springBootPluginVersion = '2.7.6'
    sonarQubePluginVersion = '3.3'
    gatlingPluginVersion = '3.8.4'
    nebulaPublishingPluginVersion = '18.4.0'
    nebulaReleasePluginVersion = '16.0.0'
    jasyptSpringBootStarterVersion = '3.0.4'
</code>```

Using Java 11.

I can also see that every time I build the project in IntelliJ, a spring boot 3.0.1 jar and its folder are created under the repository mentioned above ( even if I delete it). I can't see where is that version coming from. Any pointers will be greatly appreciated.

Body:
I am getting this error when I try to start the Spring Boot Application:

java: cannot access org.springframework.boot.SpringApplication   bad class file: /repository/org/springframework/boot/spring-boot/3.0.1/spring-boot-3.0.1.jar!/org/springframework/boot/SpringApplication.class
class file has wrong version 61.0, should be 55.0
Please remove or make sure it appears in the correct subdirectory of the classpath.

I had a look at the below SO question and it looks like this error happens when the Spring Boot version is 3.0.1. But I dont have that version mentioned in the build.gradle file.

java: cannot access org.springframework.boot.SpringApplication bad class file

here is the build.gradle file portion:

    springCloudVersion = '2021.0.3'
    springBootPluginVersion = '2.7.6'
    sonarQubePluginVersion = '3.3'
    gatlingPluginVersion = '3.8.4'
    nebulaPublishingPluginVersion = '18.4.0'
    nebulaReleasePluginVersion = '16.0.0'
    jasyptSpringBootStarterVersion = '3.0.4'

Using Java 11.

I can also see that every time I build the project in IntelliJ, a spring boot 3.0.1 jar and its folder are created under the repository mentioned above ( even if I delete it). I can't see where is that version coming from. Any pointers will be greatly appreciated.


问:
System.ObjectDisposedException: Cannot access a disposed object. Object name: 'MemoryPool'. Asp.Net Core
On an ASP.NET Core project I have the following on Startup:

```<code>app.UseMiddleware(typeof(ErrorHandlingMiddleware));

app.UseMiddleware<TokenHandler>();
</code>```

I get the below error for few requests only:

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'MemoryPool'.    at
System.Buffers.MemoryPoolThrowHelper.ThrowObjectDisposedException(ExceptionArgument
argument)    at System.Buffers.SlabMemoryPool.Lease()    at
System.IO.Pipelines.Pipe.AllocateSegment(Int32 sizeHint)    at
System.IO.Pipelines.Pipe.AllocateWriteHeadSynchronized(Int32 sizeHint)
at
Microsoft.AspNetCore.Server.IIS.Core.OutputProducer.WriteAsync(ReadOnlyMemory`1
buffer, CancellationToken cancellationToken)    at
Microsoft.AspNetCore.Server.IIS.Core.IISHttpContext.<>c__DisplayClass335_0.<g__WriteFirstAsync|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---    at System.Text.Json.JsonSerializer.WriteAsyncCore(Stream
utf8Json, Object value, Type inputType, JsonSerializerOptions options,
CancellationToken cancellationToken)    at
Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter.WriteResponseBodyAsync(OutputFormatterWriteContext
context, Encoding selectedEncoding)    at
Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter.WriteResponseBodyAsync(OutputFormatterWriteContext
context, Encoding selectedEncoding)    at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|29_0[TFilter,TFilterAsync](ResourceInvoker
invoker, Task lastTask, State next, Scope scope, Object state, Boolean
isCompleted)    at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed
context)    at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State&
next, Scope& scope, Object& state, Boolean& isCompleted)    at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
--- End of stack trace from previous location where exception was thrown ---    at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|19_0(ResourceInvoker
invoker, Task lastTask, State next, Scope scope, Object state, Boolean
isCompleted)    at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker
invoker, Task task, IDisposable scope)    at
Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint
endpoint, Task requestTask, ILogger logger)    at
DesktopEngine.Helper.TokenHandler.Invoke(HttpContext context) in
C:\DesktopEngine\Helper\TokenHandler.cs:line 62    at
DesktopEngine.MiddleWare.ErrorHandlingMiddleware.Invoke(HttpContext
context) in
C:\DesktopEngine\MiddleWare\ErrorHandlingMiddleware.cs:line 26|

How to fix this?

Body:
On an ASP.NET Core project I have the following on Startup:

app.UseMiddleware(typeof(ErrorHandlingMiddleware));

app.UseMiddleware<TokenHandler>();

I get the below error for few requests only:

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'MemoryPool'.    at
System.Buffers.MemoryPoolThrowHelper.ThrowObjectDisposedException(ExceptionArgument
argument)    at System.Buffers.SlabMemoryPool.Lease()    at
System.IO.Pipelines.Pipe.AllocateSegment(Int32 sizeHint)    at
System.IO.Pipelines.Pipe.AllocateWriteHeadSynchronized(Int32 sizeHint)
at
Microsoft.AspNetCore.Server.IIS.Core.OutputProducer.WriteAsync(ReadOnlyMemory`1
buffer, CancellationToken cancellationToken)    at
Microsoft.AspNetCore.Server.IIS.Core.IISHttpContext.<>c__DisplayClass335_0.<g__WriteFirstAsync|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---    at System.Text.Json.JsonSerializer.WriteAsyncCore(Stream
utf8Json, Object value, Type inputType, JsonSerializerOptions options,
CancellationToken cancellationToken)    at
Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter.WriteResponseBodyAsync(OutputFormatterWriteContext
context, Encoding selectedEncoding)    at
Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter.WriteResponseBodyAsync(OutputFormatterWriteContext
context, Encoding selectedEncoding)    at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|29_0[TFilter,TFilterAsync](ResourceInvoker
invoker, Task lastTask, State next, Scope scope, Object state, Boolean
isCompleted)    at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed
context)    at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State&
next, Scope& scope, Object& state, Boolean& isCompleted)    at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
--- End of stack trace from previous location where exception was thrown ---    at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|19_0(ResourceInvoker
invoker, Task lastTask, State next, Scope scope, Object state, Boolean
isCompleted)    at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker
invoker, Task task, IDisposable scope)    at
Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint
endpoint, Task requestTask, ILogger logger)    at
DesktopEngine.Helper.TokenHandler.Invoke(HttpContext context) in
C:\DesktopEngine\Helper\TokenHandler.cs:line 62    at
DesktopEngine.MiddleWare.ErrorHandlingMiddleware.Invoke(HttpContext
context) in
C:\DesktopEngine\MiddleWare\ErrorHandlingMiddleware.cs:line 26|

How to fix this?


问:
Why Firebase prod project does not show any analytics data in the flutter app
I have the three android project environments in firebase. The dev and qa working fine. but the prod environment does not display.

it is a flutter android project.
What can I do?


问:
How to open a URL in incognito mode from .html file
I am trying to open an html link using target attribute in anchor tag. I can't seem to find a solution for it. Help needed!!

I tried all available option in target attribute but it does not solve my problem. Is window function my last resort or it can be done through html itself?!


问:
expo credentials:manager is not supported in the local CLI
Upon typing the command "expo credentials:manager -p android" in terminal, I get:

'expo credentials:manager is not supported in the local CLI, please use eas credentials instead'

However, I know i recently uninstalled EAS so I cannot use eas credentials.

Is there any way to still use expo credentials:manager -p android? Also, why is it not supported?


问:
how automatically redis key generated on my server?
Laravel Framework 5.4.36

in my server i use the redis server for cache and also use some libraries redis, predis, jwt and zizaco entrus, also see with specific version like bellow in my project composer.json file

```<code>"require": {
   "illuminate/redis": "5.4.*",
   "predis/predis": "^1.1",
   "tymon/jwt-auth": "0.5.*",
   "zizaco/entrust": "5.2.x-dev"
},
</code>```

i attached the screenshot about the fake empty redis key automatically generated and my redis server is going high and i face the issue

so how can i solve it?

i try to resolve this issue in my code review and i can't not get solution, so i expected what exactly going on this issue, how and when it's created fake redis key with empty data

Body:
Laravel Framework 5.4.36

in my server i use the redis server for cache and also use some libraries redis, predis, jwt and zizaco entrus, also see with specific version like bellow in my project composer.json file

"require": {
   "illuminate/redis": "5.4.*",
   "predis/predis": "^1.1",
   "tymon/jwt-auth": "0.5.*",
   "zizaco/entrust": "5.2.x-dev"
},

i attached the screenshot about the fake empty redis key automatically generated and my redis server is going high and i face the issue

so how can i solve it?

i try to resolve this issue in my code review and i can't not get solution, so i expected what exactly going on this issue, how and when it's created fake redis key with empty data


问:
buildroot raspberrypi3_defconfig how to enable SPI?
I'm trying to make a RPI3 buildroot image with CAN interface.
So far I don't see any device in /sys/bus/spi/devices
Please help

What I did are below

At the buildroot terminal "make raspberrypi3_defconfig" then enabled those below via "make xconfig" and "make linux-xconfig"

BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV

BR2_PACKAGE_IPROUTE2

NET

CAN

CAN_DEV

SPI

CAN_MCP251X

After that I flashed sdcard.img to an SD card then I add those two lines below to config.txt
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=12000000,interrupt=25

I expected to see spi0.0 but I don't see any device in /sys/bus/spi/devices

Can you please help?
Thank you


问:
How to upload to JasperServer report with subreports with rest
anybody know, using rest api how to upload all report with subreports and input control to Jasper Server, or may be know converter than convert project from jasper studio to jasper server with js-import structure?

I know how to upload with put/get request but only separately files and don't know how with rest tie report and subreports


问:
Google workflow http.get url_encode to Cloud Run function returns 403
I have a CloudRun function that accepts multiple URL inputs and this works fine via cURL from Google Shell, e.g

curl https://myapp.a.run.app/function1/input1/input2

and where input1 is an email address, input2 a string with no spaces, input3 and int and input4 a filename with spaces, e.g

curl https://myapp.a.run.app/function2/input1/input2/input3/input4

I have a Cloud worklow that calls this function in a few steps, building up a URL from previous responses. The calls to the function in steps before are working fine, however when I attempt to call the function via a URL where the email address/filename inputs are text.url_encoded prior, the workflow fails with a 403 error.

```<code>    - step3_assign_input1:
        assign:
          - step3_URL: '${"https://myapp.a.run.app/function1/" + step2result.body.field1.field2["b:input1"]}'
    - step4_get_input1:
        try:
          call: http.get
          args:
            url: ${step3_URL}
          result: step4result
        retry:
          predicate: ${custom_predicate}
          max_retries: 10
          backoff:
            initial_delay: 2
            max_delay: 60
            multiplier: 2
    - step4a_sleep:
          call: sys.sleep
          args:
              seconds: 5
    - step5_assign_input2:
        assign:
          - step5_URL: '${"https://myapp.a.run.app/function2/" + step4result.body.field1.field2["a:input2"]}'
    - step6_get_input2:
        try:
          call: http.get
          args:
            url: ${step5_URL}
          result: step6result
        retry:
          predicate: ${custom_predicate}
          max_retries: 10
          backoff:
            initial_delay: 2
            max_delay: 60
            multiplier: 2
    - step7a_encode_email:
        call: text.url_encode
        args:
          source: ${args.email}
        result: encode_email
    - step7b_encode_filename:
        call: text.url_encode
        args:
          source: '${step6result.body.field1.field2["a:FileName"]}'
        result: encode_filename
    - step8_assign_emailURL:
        assign:
          - emailURL: '${"https://myapp.a.run.app/email/" + encode_email + "/" + args.type + "/" + args.serial + "/" + encode_filename}'
    - step9_get_emailURL:
        try:
          call: http.get
          args:
            url: ${emailURL}
          result: step9result
        retry:
          predicate: ${custom_predicate}
          max_retries: 10
          backoff:
            initial_delay: 2
            max_delay: 60
            multiplier: 2
    - returnOutput:
        return: ${step9result}

custom_predicate:
  params: [e]
  steps:
    - what_to_repeat:
        switch:
          - condition: ${e.code in [429, 500, 502, 503, 504]}
            return: true
    - otherwise:
        return: false

</code>```

From the workflow logs I can see the URL is being constructed as

https://myapp.a.run.app/email/someone%40email.com/String/12345678/THIS%20File%20Name%01.pdf

which if I call via cURL GET in CloudShell it returns with a 200 response code.

In the Workflow logs I get a HTTP server responded with error code 403, and Error: Forbidden\u003c/h1\u003e\n\u003ch2\u003eAccess is forbidden.

```<code>{
  "insertId": "sl7uy9bd1",
  "jsonPayload": {
    "activityTime": "2023-01-06T05:44:39Z",
    "state": "FAILED",
    "@type": "type.googleapis.com/google.cloud.workflows.type.ExecutionsSystemLog",
    "failure": {
      "source": "main.step9_get_emailURL, line: 76",
      "exception": "HTTP server responded with error code 403\nin step \"step9_get_emailURL\", routine \"main\", line: 76: {\"body\":\"\\n\\u003chtml\\u003e\\u003chead\\u003e\\n\\u003cmeta http-equiv=\\\"content-type\\\" content=\\\"text/html;charset=utf-8\\\"\\u003e\\n\\u003ctitle\\u003e403 Forbidden\\u003c/title\\u003e\\n\\u003c/head\\u003e\\n\\u003cbody text=#000000 bgcolor=#ffffff\\u003e\\n\\u003ch1\\u003eError: Forbidden\\u003c/h1\\u003e\\n\\u003ch2\\u003eAccess is forbidden.\\u003c/h2\\u003e\\n\\u003ch2\\u003e\\u003c/h2\\u003e\\n\\u003c/body\\u003e\\u003c/html\\u003e\\n\",\"code\":403,\"headers\":{\"Alt-Svc\":\"h3=\\\":443\\\"; ma=2592000,h3-29=\\\":443\\\"; ma=2592000,h3-Q050=\\\":443\\\"; ma=2592000,h3-Q046=\\\":443\\\"; ma=2592000,h3-Q043=\\\":443\\\"; ma=2592000,quic=\\\":443\\\"; ma=2592000; v=\\\"46,43\\\"\",\"Content-Length\":\"235\",\"Content-Type\":\"text/html; charset=UTF-8\",\"Date\":\"Fri, 06 Jan 2023 05:44:38 GMT\",\"X-Appengine-Country\":\"ZZ\"},\"message\":\"HTTP server responded with error code 403\",\"tags\":[\"HttpError\"]}"
    }
  },
  "resource": {
    "type": "workflows.googleapis.com/Workflow",
    "labels": {
      "workflow_id": "myworkflow",
      "location": "australia-southeast1",
      "resource_container": "323152299552"
    }
  },
  "timestamp": "2023-01-06T05:44:39.101297442Z",
  "severity": "ERROR",
  "labels": {
    "workflows.googleapis.com/revision_id": "000036-15c",
    "workflows.googleapis.com/execution_id": "f2175706-7e8a-4321-916b-487231a10d6b"
  },
  "logName": "projects/myproject/logs/workflows.googleapis.com%2Fexecutions_system",
  "receiveTimestamp": "2023-01-06T05:44:40.026366626Z"
}
</code>```

If I look at the logs of the CloudRun function, I see successful logs from the earlier steps in the workflow. but, no logs from the step that is failing.

Hopefully someone can provide some insight why this fails via a workflow steps.

Body:
I have a CloudRun function that accepts multiple URL inputs and this works fine via cURL from Google Shell, e.g

curl https://myapp.a.run.app/function1/input1/input2

and where input1 is an email address, input2 a string with no spaces, input3 and int and input4 a filename with spaces, e.g

curl https://myapp.a.run.app/function2/input1/input2/input3/input4

I have a Cloud worklow that calls this function in a few steps, building up a URL from previous responses. The calls to the function in steps before are working fine, however when I attempt to call the function via a URL where the email address/filename inputs are text.url_encoded prior, the workflow fails with a 403 error.

    - step3_assign_input1:
        assign:
          - step3_URL: '${"https://myapp.a.run.app/function1/" + step2result.body.field1.field2["b:input1"]}'
    - step4_get_input1:
        try:
          call: http.get
          args:
            url: ${step3_URL}
          result: step4result
        retry:
          predicate: ${custom_predicate}
          max_retries: 10
          backoff:
            initial_delay: 2
            max_delay: 60
            multiplier: 2
    - step4a_sleep:
          call: sys.sleep
          args:
              seconds: 5
    - step5_assign_input2:
        assign:
          - step5_URL: '${"https://myapp.a.run.app/function2/" + step4result.body.field1.field2["a:input2"]}'
    - step6_get_input2:
        try:
          call: http.get
          args:
            url: ${step5_URL}
          result: step6result
        retry:
          predicate: ${custom_predicate}
          max_retries: 10
          backoff:
            initial_delay: 2
            max_delay: 60
            multiplier: 2
    - step7a_encode_email:
        call: text.url_encode
        args:
          source: ${args.email}
        result: encode_email
    - step7b_encode_filename:
        call: text.url_encode
        args:
          source: '${step6result.body.field1.field2["a:FileName"]}'
        result: encode_filename
    - step8_assign_emailURL:
        assign:
          - emailURL: '${"https://myapp.a.run.app/email/" + encode_email + "/" + args.type + "/" + args.serial + "/" + encode_filename}'
    - step9_get_emailURL:
        try:
          call: http.get
          args:
            url: ${emailURL}
          result: step9result
        retry:
          predicate: ${custom_predicate}
          max_retries: 10
          backoff:
            initial_delay: 2
            max_delay: 60
            multiplier: 2
    - returnOutput:
        return: ${step9result}

custom_predicate:
  params: [e]
  steps:
    - what_to_repeat:
        switch:
          - condition: ${e.code in [429, 500, 502, 503, 504]}
            return: true
    - otherwise:
        return: false

From the workflow logs I can see the URL is being constructed as

https://myapp.a.run.app/email/someone%40email.com/String/12345678/THIS%20File%20Name%01.pdf

which if I call via cURL GET in CloudShell it returns with a 200 response code.

In the Workflow logs I get a HTTP server responded with error code 403, and Error: Forbidden\u003c/h1\u003e\n\u003ch2\u003eAccess is forbidden.

{
  "insertId": "sl7uy9bd1",
  "jsonPayload": {
    "activityTime": "2023-01-06T05:44:39Z",
    "state": "FAILED",
    "@type": "type.googleapis.com/google.cloud.workflows.type.ExecutionsSystemLog",
    "failure": {
      "source": "main.step9_get_emailURL, line: 76",
      "exception": "HTTP server responded with error code 403\nin step \"step9_get_emailURL\", routine \"main\", line: 76: {\"body\":\"\\n\\u003chtml\\u003e\\u003chead\\u003e\\n\\u003cmeta http-equiv=\\\"content-type\\\" content=\\\"text/html;charset=utf-8\\\"\\u003e\\n\\u003ctitle\\u003e403 Forbidden\\u003c/title\\u003e\\n\\u003c/head\\u003e\\n\\u003cbody text=#000000 bgcolor=#ffffff\\u003e\\n\\u003ch1\\u003eError: Forbidden\\u003c/h1\\u003e\\n\\u003ch2\\u003eAccess is forbidden.\\u003c/h2\\u003e\\n\\u003ch2\\u003e\\u003c/h2\\u003e\\n\\u003c/body\\u003e\\u003c/html\\u003e\\n\",\"code\":403,\"headers\":{\"Alt-Svc\":\"h3=\\\":443\\\"; ma=2592000,h3-29=\\\":443\\\"; ma=2592000,h3-Q050=\\\":443\\\"; ma=2592000,h3-Q046=\\\":443\\\"; ma=2592000,h3-Q043=\\\":443\\\"; ma=2592000,quic=\\\":443\\\"; ma=2592000; v=\\\"46,43\\\"\",\"Content-Length\":\"235\",\"Content-Type\":\"text/html; charset=UTF-8\",\"Date\":\"Fri, 06 Jan 2023 05:44:38 GMT\",\"X-Appengine-Country\":\"ZZ\"},\"message\":\"HTTP server responded with error code 403\",\"tags\":[\"HttpError\"]}"
    }
  },
  "resource": {
    "type": "workflows.googleapis.com/Workflow",
    "labels": {
      "workflow_id": "myworkflow",
      "location": "australia-southeast1",
      "resource_container": "323152299552"
    }
  },
  "timestamp": "2023-01-06T05:44:39.101297442Z",
  "severity": "ERROR",
  "labels": {
    "workflows.googleapis.com/revision_id": "000036-15c",
    "workflows.googleapis.com/execution_id": "f2175706-7e8a-4321-916b-487231a10d6b"
  },
  "logName": "projects/myproject/logs/workflows.googleapis.com%2Fexecutions_system",
  "receiveTimestamp": "2023-01-06T05:44:40.026366626Z"
}

If I look at the logs of the CloudRun function, I see successful logs from the earlier steps in the workflow. but, no logs from the step that is failing.

Hopefully someone can provide some insight why this fails via a workflow steps.


问:
syslogd prints log messages while Linux kernel booting
I am working on an Embedded board. Using the USB-Uart converter, board serial logs are accessed on my Desktop.
On my Desktop I am using the minicom application, to view the board's logs.

1] Power on the embedded board.

2] Kernel booting logs get printed on minicom.

3] It is observed that some booting messages are get printed twice on minicom, e.g.

```<code>[ 7.553435] LCD210 platform: Hook NA51068 driver.
Dec 22 12:43:37 (none) user.warn kernel: [ 7.553435] LCD210 platform: Hook NA51068 driver.
[ 7.587133] LCD200:0: suspend_state:1
Dec 22 12:43:37 (none) user.warn kernel: [ 7.587133] LCD200:0: suspend_state:1
</code>```

In the above logs, line no 1 is printed by the Linux kernel,

```<code>[ 7.553435] LCD210 platform: Hook NA51068 driver.
</code>```

And line no 2. is printed by syslogd on the minicom, while the kernel is booting.

```<code>Dec 22 12:43:37 (none) user.warn kernel: [ 7.553435] LCD210 platform: Hook NA51068 driver.
</code>```

The above message is also present in /var/log/messages file.

I just want to avoid printing the same message twice.
How do I stop the syslogd, to don't print the messages on serial terminal, while the Linux kernel is booting?

Body:
I am working on an Embedded board. Using the USB-Uart converter, board serial logs are accessed on my Desktop.
On my Desktop I am using the minicom application, to view the board's logs.

1] Power on the embedded board.

2] Kernel booting logs get printed on minicom.

3] It is observed that some booting messages are get printed twice on minicom, e.g.

[ 7.553435] LCD210 platform: Hook NA51068 driver.
Dec 22 12:43:37 (none) user.warn kernel: [ 7.553435] LCD210 platform: Hook NA51068 driver.
[ 7.587133] LCD200:0: suspend_state:1
Dec 22 12:43:37 (none) user.warn kernel: [ 7.587133] LCD200:0: suspend_state:1

In the above logs, line no 1 is printed by the Linux kernel,

[ 7.553435] LCD210 platform: Hook NA51068 driver.

And line no 2. is printed by syslogd on the minicom, while the kernel is booting.

Dec 22 12:43:37 (none) user.warn kernel: [ 7.553435] LCD210 platform: Hook NA51068 driver.

The above message is also present in /var/log/messages file.

I just want to avoid printing the same message twice.
How do I stop the syslogd, to don't print the messages on serial terminal, while the Linux kernel is booting?


问:
InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' (111 Connection refused) when try to connect from Google Collab
I have tried to connect to MYSQL which is on my local computer from GOOGLE COLLAB(accessing from my same local computer) to fetch a SQL file using these commands.

```<code>!pip install mysql.connector
import mysql.connector
mysql.connector.connect(host='127.0.0.1',user='root',password='xxxxxx',database='world')
</code>```

I get this error:

ConnectionRefusedError                    Traceback (most recent call last)
/usr/local/lib/python3.8/dist-packages/mysql/connector/network.py in open_connection(self)
508             self.sock.settimeout(self._connection_timeout)
--> 509             self.sock.connect(sockaddr)
510         except IOError as err:

ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

InterfaceError                            Traceback (most recent call last)
5 frames
/usr/local/lib/python3.8/dist-packages/mysql/connector/network.py in open_connection(self)
509             self.sock.connect(sockaddr)
510         except IOError as err:
--> 511             raise errors.InterfaceError(
512                 errno=2003, values=(self.get_address(), _strioerror(err)))
513         except Exception as err:

InterfaceError: 2003: Can't connect to MySQL server on '127.0.0.1:3306' (111 Connection refused)

My mysql port no is 3306, by default and I haven't made any change to that. In my mysql workbench host is 127.0.0.1
Mysql version is, mysql  Ver 8.0.31 for Win64 on x86_64 (MySQL Community Server - GPL)

Please do provide a solution.

Body:
I have tried to connect to MYSQL which is on my local computer from GOOGLE COLLAB(accessing from my same local computer) to fetch a SQL file using these commands.

!pip install mysql.connector
import mysql.connector
mysql.connector.connect(host='127.0.0.1',user='root',password='xxxxxx',database='world')

I get this error:

ConnectionRefusedError                    Traceback (most recent call last)
/usr/local/lib/python3.8/dist-packages/mysql/connector/network.py in open_connection(self)
508             self.sock.settimeout(self._connection_timeout)
--> 509             self.sock.connect(sockaddr)
510         except IOError as err:

ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

InterfaceError                            Traceback (most recent call last)
5 frames
/usr/local/lib/python3.8/dist-packages/mysql/connector/network.py in open_connection(self)
509             self.sock.connect(sockaddr)
510         except IOError as err:
--> 511             raise errors.InterfaceError(
512                 errno=2003, values=(self.get_address(), _strioerror(err)))
513         except Exception as err:

InterfaceError: 2003: Can't connect to MySQL server on '127.0.0.1:3306' (111 Connection refused)

My mysql port no is 3306, by default and I haven't made any change to that. In my mysql workbench host is 127.0.0.1
Mysql version is, mysql  Ver 8.0.31 for Win64 on x86_64 (MySQL Community Server - GPL)

Please do provide a solution.


问:
rvalue parameter does not behaving like an rvalue
Consider the following code:

#include <memory>

class Object
{
public:
    Object(int* _i) : i(std::unique_ptr<int>(_i)) {}
    Object(Object&& other) : i(std::move(other.i)) {}
private:
    std::unique_ptr<int> i;
};

class Holder
{
public:
    Holder(Object&& _obj) : obj(std::make_unique<Object>(_obj)) {}
private:
    std::unique_ptr<Object> obj;
};

int main()
{
    Holder h(Object(new int(42)));

    return 0;
}
```
<p>The compiler complains about copies of an <code>Object</code> instance being made, which would obviously be illegal since <code>Object</code> has a <code>unique_ptr</code> member. Does that error occur because I pass my parameter <code>by-value</code>? Shouldn't the signature of my constructor of <code>Holder</code> force a call <code>by-reference</code>?</p>
<p>What I understand even less is that after changing the constructor of my <code>Holder</code> class to</p>
<pre class="lang-cpp prettyprint-override"><code>Holder(Object&& _obj) : obj(std::make_unique<Object>(std::move(_obj))) {}
</code>```

the code compiles just fine. This does not make any sense to me, since if there was a copy made while passing the Object into the constructor of Holder changing anything within the constructor shouldn't resolve this.

Body:
Consider the following code:

#include <memory>

class Object
{
public:
    Object(int* _i) : i(std::unique_ptr<int>(_i)) {}
    Object(Object&& other) : i(std::move(other.i)) {}
private:
    std::unique_ptr<int> i;
};

class Holder
{
public:
    Holder(Object&& _obj) : obj(std::make_unique<Object>(_obj)) {}
private:
    std::unique_ptr<Object> obj;
};

int main()
{
    Holder h(Object(new int(42)));

    return 0;
}

The compiler complains about copies of an Object instance being made, which would obviously be illegal since Object has a unique_ptr member. Does that error occur because I pass my parameter by-value? Shouldn't the signature of my constructor of Holder force a call by-reference?

What I understand even less is that after changing the constructor of my Holder class to

Holder(Object&& _obj) : obj(std::make_unique<Object>(std::move(_obj))) {}

the code compiles just fine. This does not make any sense to me, since if there was a copy made while passing the Object into the constructor of Holder changing anything within the constructor shouldn't resolve this.


问:
In Unity my Network Animator is getting the warning: [Netcode] Detected the Host is sending itself animation updates!, how to resolve?
I have a 2d Player character with animation parameters being set from my class in an Owner Authoritative style:

```<code> public class PlayerNetwork : NetworkBehaviour
 ..
 Animator anim;
 OwnerNetworkAnimator networkAnimator;
 ..
 public override void OnNetworkSpawn()
 {
     ...
     anim = GetComponent<Animator>();
     networkAnimator = GetComponent<OwnerNetworkAnimator>();
     networkAnimator.enabled = !IsHost; // attempted solution, no luck
     ...
 }
 void FixedUpdate()
 {
     ...
     anim.SetFloat("Speed", direction.sqrMagnitude);
     // networkAnimator.Animator.SetFloat("Speed", direction.sqrMagnitude); <-- also tried this no luck
     ...
  }
</code>```

But I am getting the warning:

```<code>[Netcode] Detected the Host is sending itself animation updates! Please report this issue.
UnityEngine.Debug:LogWarning (object)
Unity.Netcode.NetworkLog:LogWarning (string) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Logging/NetworkLog.cs:28)
Unity.Netcode.Components.NetworkAnimator:SendAnimStateClientRpc (Unity.Netcode.Components.NetworkAnimator/AnimationMessage,Unity.Netcode.ClientRpcParams) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Components/NetworkAnimator.cs:1210)
Unity.Netcode.Components.NetworkAnimator:__rpc_handler_1069363937 (Unity.Netcode.NetworkBehaviour,Unity.Netcode.FastBufferReader,Unity.Netcode.__RpcParams)
Unity.Netcode.RpcMessageHelpers:Handle (Unity.Netcode.NetworkContext&,Unity.Netcode.RpcMetadata&,Unity.Netcode.FastBufferReader&,Unity.Netcode.__RpcParams&) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Messaging/Messages/RpcMessages.cs:77)
Unity.Netcode.ClientRpcMessage:Handle (Unity.Netcode.NetworkContext&) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Messaging/Messages/RpcMessages.cs:154)
Unity.Netcode.NetworkBehaviour:__endSendClientRpc (Unity.Netcode.FastBufferWriter&,uint,Unity.Netcode.ClientRpcParams,Unity.Netcode.RpcDelivery) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Core/NetworkBehaviour.cs:230)
Unity.Netcode.Components.NetworkAnimator:SendAnimStateClientRpc (Unity.Netcode.Components.NetworkAnimator/AnimationMessage,Unity.Netcode.ClientRpcParams) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Components/NetworkAnimator.cs:1204)
Unity.Netcode.Components.NetworkAnimator:CheckForAnimatorChanges () (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Components/NetworkAnimator.cs:820)
Unity.Netcode.Components.NetworkAnimatorStateChangeHandler:NetworkUpdate (Unity.Netcode.NetworkUpdateStage) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Components/NetworkAnimator.cs:76)
Unity.Netcode.NetworkUpdateLoop:RunNetworkUpdateStage (Unity.Netcode.NetworkUpdateStage) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Core/NetworkUpdateLoop.cs:185)
Unity.Netcode.NetworkUpdateLoop/NetworkPreUpdate/<>c:<CreateLoopSystem>b__0_0 () (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Core/NetworkUpdateLoop.cs:232)
</code>```

I am new at this networking component and am sure to have missed something in the docs, can anyone assist?

Body:
I have a 2d Player character with animation parameters being set from my class in an Owner Authoritative style:

 public class PlayerNetwork : NetworkBehaviour
 ..
 Animator anim;
 OwnerNetworkAnimator networkAnimator;
 ..
 public override void OnNetworkSpawn()
 {
     ...
     anim = GetComponent<Animator>();
     networkAnimator = GetComponent<OwnerNetworkAnimator>();
     networkAnimator.enabled = !IsHost; // attempted solution, no luck
     ...
 }
 void FixedUpdate()
 {
     ...
     anim.SetFloat("Speed", direction.sqrMagnitude);
     // networkAnimator.Animator.SetFloat("Speed", direction.sqrMagnitude); <-- also tried this no luck
     ...
  }

But I am getting the warning:

[Netcode] Detected the Host is sending itself animation updates! Please report this issue.
UnityEngine.Debug:LogWarning (object)
Unity.Netcode.NetworkLog:LogWarning (string) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Logging/NetworkLog.cs:28)
Unity.Netcode.Components.NetworkAnimator:SendAnimStateClientRpc (Unity.Netcode.Components.NetworkAnimator/AnimationMessage,Unity.Netcode.ClientRpcParams) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Components/NetworkAnimator.cs:1210)
Unity.Netcode.Components.NetworkAnimator:__rpc_handler_1069363937 (Unity.Netcode.NetworkBehaviour,Unity.Netcode.FastBufferReader,Unity.Netcode.__RpcParams)
Unity.Netcode.RpcMessageHelpers:Handle (Unity.Netcode.NetworkContext&,Unity.Netcode.RpcMetadata&,Unity.Netcode.FastBufferReader&,Unity.Netcode.__RpcParams&) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Messaging/Messages/RpcMessages.cs:77)
Unity.Netcode.ClientRpcMessage:Handle (Unity.Netcode.NetworkContext&) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Messaging/Messages/RpcMessages.cs:154)
Unity.Netcode.NetworkBehaviour:__endSendClientRpc (Unity.Netcode.FastBufferWriter&,uint,Unity.Netcode.ClientRpcParams,Unity.Netcode.RpcDelivery) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Core/NetworkBehaviour.cs:230)
Unity.Netcode.Components.NetworkAnimator:SendAnimStateClientRpc (Unity.Netcode.Components.NetworkAnimator/AnimationMessage,Unity.Netcode.ClientRpcParams) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Components/NetworkAnimator.cs:1204)
Unity.Netcode.Components.NetworkAnimator:CheckForAnimatorChanges () (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Components/NetworkAnimator.cs:820)
Unity.Netcode.Components.NetworkAnimatorStateChangeHandler:NetworkUpdate (Unity.Netcode.NetworkUpdateStage) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Components/NetworkAnimator.cs:76)
Unity.Netcode.NetworkUpdateLoop:RunNetworkUpdateStage (Unity.Netcode.NetworkUpdateStage) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Core/NetworkUpdateLoop.cs:185)
Unity.Netcode.NetworkUpdateLoop/NetworkPreUpdate/<>c:<CreateLoopSystem>b__0_0 () (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Core/NetworkUpdateLoop.cs:232)

I am new at this networking component and am sure to have missed something in the docs, can anyone assist?


问:
How to load a GV file in d3-graphviz?
I am trying to visualise a GV file with D3-Graphviz library. I have called the GV file directly in my code:

```<code><script src="https://unpkg.com/@hpcc-js/wasm@0.3.11/dist/index.min.js"></script>
<script src="https://unpkg.com/d3-graphviz@3.0.5/build/d3-graphviz.js"></script>
<div id="graph" style="text-align: center;"></div>

<script>

let dots = new FileReader();
dots.readAsText('G.gv')
let dotIndex = 0;
let graphviz = d3.select("#graph").graphviz()
    .transition(function () {
        return d3.transition("main")
            .ease(d3.easeLinear)
            .delay(500)
            .duration(1500);
    })
    .logEvents(true)
    .on("initEnd", render);

function render() {
    var dotLines = dots[dotIndex];
    var dot = dotLines.join('');
    graphviz
    .addImage("images/Officer.png", "50px", "50px")
    .addImage("images/Manager.png", "50px", "50px")
    .addImage("images/Employee.png", "50px", "50px")
    .addImage("images/Service.png", "50px", "50px")
    .renderDot(dot);
}
</code>```

My GV file currently looks like this:

```<code>digraph G {
    graph [center=true rankdir=LR ratio=compress size="15,10"]
    "MainOfficer" [label="MainOfficer" fontsize=10 image="images/MainOfficer.png" shape=plaintext]
"Employee" [label="MainOfficer" fontsize=10 image="images/Employee.png" shape=plaintext]
"Supporter" [label="MainOfficer" fontsize=10 image="images/Manager.png" shape=plaintext]
}
</code>```

However, when I opened the HTML file, no graph is shown, and when I checked into the console the error is Failed to execute ReadAsText as parameter 1 is not of type "Blob".

I have tried multiple ways to load the G.gv file into the website (from converting it into text and parse to the Javascript code, to rendering GV file to SVG), however none of my approach worked.

So I would like to ask that is there anyway I could load a GV file to d3-Graphviz, so that my graph could be shown without my need to paste the GV file content directly to the Javascript file?

Thank you!

Title: How to load a GV file in d3-graphviz?


问:
'yerr' shape matches 'y' shape but throws value error
I am using the Spyder IDE(5.3.3) with python(3.9.13 64bit) on Ubuntu 20.04LTS. I am trying to plot errorbar by calculating the standard deviation between '5' sets of data. My x-coordinate is named 'RC_AVG', y-coordinate is named 'PMF_AVG' and, the standard deviation is named 'PMF_STD'. After storing data in these lists, I've reshaped all of them to shape (175,1) and then I am using the ax.errorbar command to plot the errorbars but python throws 'Value error': 'yerr' (shape: (175, 1)) must be a scalar or a 1D or (2, n) array-like whose shape matches 'y' (shape: (175, 1)). I am unable to understand the cause of this error and need help in understanding it. However, when I remove the reshape(175,1) from the x,y and, the error coordinates the code works fine and I get the graph. I am attaching the code below:

```<code>typeimport numpy as np
import matplotlib.pyplot as plt
fig, (ax1) = plt.subplots(1,1,figsize=(5,5))

file_name = "bsResult-THETA83-IRUN"
result = []
for i in range(1,6):
    a = np.array(np.loadtxt(file_name+str(i)+".xvg", dtype = float,skiprows=18,max_rows=175))
    result.append(a)
result = np.array(result)
result1 = result.copy()

RC_AVG = np.mean(result1[:,:,0],axis=0).reshape(175,1) ###### x-coordinate
PMF_AVG = np.mean(result1[:,:,1],axis=0).reshape(175,1) ##### y-coordinate
PMF_STD = np.std(result1[:,:,2],axis=0).reshape(175,1) ###### error-coordinate

ax1.set_xlim(0.1,1.70)
ax1.set_xlabel("\u03B6 $(nm)$",fontweight = 'bold',fontsize=12)
ax1.set_ylabel("G $(k_{B}T)$",fontweight = 'bold',fontsize=12)

ax1.errorbar(RC_AVG,PMF_AVG,yerr=PMF_STD,label = 'Nitrogen',color='#D32D41',linewidth=1.0,elinewidth=1.0,
              capsize=1.1,ecolor='black',errorevery=(8))
#####################################################################
Traceback (most recent call last):

  File "/home/sps/software/yes/lib/python3.9/site-packages/spyder_kernels/py3compat.py", line 356, in compat_exec
    exec(code, globals, locals)

  File "/media/sps/hdd/PMF/REFERENCE/pmf-2G6X6-epswdr-wspce-k400/pmfReference.py", line 31, in <module>
    ax1.errorbar(RC_AVG,PMF_AVG,yerr=PMF_STD,label = 'Nitrogen',color='#D32D41',linewidth=1.0,elinewidth=1.0,

  File "/home/sps/software/yes/lib/python3.9/site-packages/matplotlib/__init__.py", line 1423, in inner
    return func(ax, *map(sanitize_sequence, args), **kwargs)

  File "/home/sps/software/yes/lib/python3.9/site-packages/matplotlib/axes/_axes.py", line 3588, in errorbar
    raise ValueError(

ValueError: 'yerr' (shape: (175, 1)) must be a scalar or a 1D or (2, n) array-like whose shape matches 'y' (shape: (175, 1)) here
</code>```

I am able to get the errorbars in the plot if I remove the reshape(175,1) from the x,y and, the error coordinates as shown below:

```<code>import matplotlib.pyplot as plt
fig, (ax1) = plt.subplots(1,1,figsize=(5,5))

file_name = "bsResult-THETA83-IRUN"
result = []

for i in range(1,6):
    a = np.array(np.loadtxt(file_name+str(i)+".xvg", dtype = float,skiprows=18,max_rows=175))
    result.append(a)
result = np.array(result)
result1 = result.copy()

RC_AVG = np.mean(result1[:,:,0],axis=0)#.reshape(175,1) ----commented reshape
PMF_AVG = np.mean(result1[:,:,1],axis=0)#.reshape(175,1) ---commented reshape
PMF_STD = np.std(result1[:,:,2],axis=0)#.reshape(175,1) ----commented reshape

ax1.set_xlim(0.1,1.70)
ax1.set_xlabel("\u03B6 $(nm)$",fontweight = 'bold',fontsize=12)
ax1.set_ylabel("G $(k_{B}T)$",fontweight = 'bold',fontsize=12)

ax1.errorbar(RC_AVG,PMF_AVG,yerr=PMF_STD,label = 'Nitrogen',color='#D32D41',linewidth=1.0,elinewidth=1.0,
              capsize=1.1,ecolor='black',errorevery=(8))
type here
</code>```

[enter image description here](https://www.stackoverflow.com/)

Body:
I am using the Spyder IDE(5.3.3) with python(3.9.13 64bit) on Ubuntu 20.04LTS. I am trying to plot errorbar by calculating the standard deviation between '5' sets of data. My x-coordinate is named 'RC_AVG', y-coordinate is named 'PMF_AVG' and, the standard deviation is named 'PMF_STD'. After storing data in these lists, I've reshaped all of them to shape (175,1) and then I am using the ax.errorbar command to plot the errorbars but python throws 'Value error': 'yerr' (shape: (175, 1)) must be a scalar or a 1D or (2, n) array-like whose shape matches 'y' (shape: (175, 1)). I am unable to understand the cause of this error and need help in understanding it. However, when I remove the reshape(175,1) from the x,y and, the error coordinates the code works fine and I get the graph. I am attaching the code below:

typeimport numpy as np
import matplotlib.pyplot as plt
fig, (ax1) = plt.subplots(1,1,figsize=(5,5))

file_name = "bsResult-THETA83-IRUN"
result = []
for i in range(1,6):
    a = np.array(np.loadtxt(file_name+str(i)+".xvg", dtype = float,skiprows=18,max_rows=175))
    result.append(a)
result = np.array(result)
result1 = result.copy()

RC_AVG = np.mean(result1[:,:,0],axis=0).reshape(175,1) ###### x-coordinate
PMF_AVG = np.mean(result1[:,:,1],axis=0).reshape(175,1) ##### y-coordinate
PMF_STD = np.std(result1[:,:,2],axis=0).reshape(175,1) ###### error-coordinate

ax1.set_xlim(0.1,1.70)
ax1.set_xlabel("\u03B6 $(nm)$",fontweight = 'bold',fontsize=12)
ax1.set_ylabel("G $(k_{B}T)$",fontweight = 'bold',fontsize=12)

ax1.errorbar(RC_AVG,PMF_AVG,yerr=PMF_STD,label = 'Nitrogen',color='#D32D41',linewidth=1.0,elinewidth=1.0,
              capsize=1.1,ecolor='black',errorevery=(8))
#####################################################################
Traceback (most recent call last):

  File "/home/sps/software/yes/lib/python3.9/site-packages/spyder_kernels/py3compat.py", line 356, in compat_exec
    exec(code, globals, locals)

  File "/media/sps/hdd/PMF/REFERENCE/pmf-2G6X6-epswdr-wspce-k400/pmfReference.py", line 31, in <module>
    ax1.errorbar(RC_AVG,PMF_AVG,yerr=PMF_STD,label = 'Nitrogen',color='#D32D41',linewidth=1.0,elinewidth=1.0,

  File "/home/sps/software/yes/lib/python3.9/site-packages/matplotlib/__init__.py", line 1423, in inner
    return func(ax, *map(sanitize_sequence, args), **kwargs)

  File "/home/sps/software/yes/lib/python3.9/site-packages/matplotlib/axes/_axes.py", line 3588, in errorbar
    raise ValueError(

ValueError: 'yerr' (shape: (175, 1)) must be a scalar or a 1D or (2, n) array-like whose shape matches 'y' (shape: (175, 1)) here

I am able to get the errorbars in the plot if I remove the reshape(175,1) from the x,y and, the error coordinates as shown below:

import matplotlib.pyplot as plt
fig, (ax1) = plt.subplots(1,1,figsize=(5,5))

file_name = "bsResult-THETA83-IRUN"
result = []

for i in range(1,6):
    a = np.array(np.loadtxt(file_name+str(i)+".xvg", dtype = float,skiprows=18,max_rows=175))
    result.append(a)
result = np.array(result)
result1 = result.copy()

RC_AVG = np.mean(result1[:,:,0],axis=0)#.reshape(175,1) ----commented reshape
PMF_AVG = np.mean(result1[:,:,1],axis=0)#.reshape(175,1) ---commented reshape
PMF_STD = np.std(result1[:,:,2],axis=0)#.reshape(175,1) ----commented reshape

ax1.set_xlim(0.1,1.70)
ax1.set_xlabel("\u03B6 $(nm)$",fontweight = 'bold',fontsize=12)
ax1.set_ylabel("G $(k_{B}T)$",fontweight = 'bold',fontsize=12)

ax1.errorbar(RC_AVG,PMF_AVG,yerr=PMF_STD,label = 'Nitrogen',color='#D32D41',linewidth=1.0,elinewidth=1.0,
              capsize=1.1,ecolor='black',errorevery=(8))
type here

[enter image description here](https://www.stackoverflow.com/)


问:
How can I detect overlap/collision in python tkinter
I want to know if there is any way you can detect overlap of two objects.  One is a moving oval and the other is a stationary line. I created line like c.create_line(100,100,350,100) so there is nothing like lines x,y (because I have 70 of them so it would be impractical to name all 70 x,y).

This is what I’ve tried. Basically I wanted to check if ovals right side is on the lines x,y. It kind of works but only like one or two times max. And then it won’t detect the overlap anymore after those two times. I have no idea what the problem could be.

```<code>> b1right= b1boundary[2]
> b1ya= ballons1 y
def line_collision():
    if 97 < b1right < 103 and 100 < b1ya < 400:
        c.coords(b1,15,510,35, 532)
</code>```

Body:
I want to know if there is any way you can detect overlap of two objects.  One is a moving oval and the other is a stationary line. I created line like c.create_line(100,100,350,100) so there is nothing like lines x,y (because I have 70 of them so it would be impractical to name all 70 x,y).

This is what I’ve tried. Basically I wanted to check if ovals right side is on the lines x,y. It kind of works but only like one or two times max. And then it won’t detect the overlap anymore after those two times. I have no idea what the problem could be.

> b1right= b1boundary[2]
> b1ya= ballons1 y
def line_collision():
    if 97 < b1right < 103 and 100 < b1ya < 400:
        c.coords(b1,15,510,35, 532)


问:
How to solve Wildfly server console issue?
wildfly server start successfully. then I go to console and click on runtime and getting error.

Unable to load required resources for column 'standalone-server-column': "WFLYCTL0030: No resource definition is registered for address [

```<code>(\"subsystem\" => \"core-management\"),

(\"service\" => \"configuration-changes\")
</code>```

]"

how to solve this????

Please help me out....advance thanks.

Body:
wildfly server start successfully. then I go to console and click on runtime and getting error.

Unable to load required resources for column 'standalone-server-column': "WFLYCTL0030: No resource definition is registered for address [

(\"subsystem\" => \"core-management\"),

(\"service\" => \"configuration-changes\")

]"

how to solve this????

Please help me out....advance thanks.


问:
SwiftUI iOS - Searchable with TabView
Is anyone having problems using .searchable inside a TabView?
Before I implemented the TabView it was working just fine, and it is still showing on the preview.

This is the code now (does not show the search bar):

```<code>var body: some View {
        TabView {
            NavigationStack {
                List(searchResults, children: \.items) { item in
                    NavigationLink(destination: CarView(carData: carData).onAppear() {
                        carData.selectedCar = item.pageId
                        Task {
                            await carData.fetchCarData()
                        }
                    }) {
                        Text("\(item.name)")
                    }
                    .padding(.vertical, 8)
                    .fontDesign(.monospaced)
                }
                .listStyle(.plain)
                .searchable(text: $searchText, placement: .navigationBarDrawer(displayMode: .always))
            }
            .tabItem {
                Label("Models", systemImage: "list.dash")
            }
            AIView(classifier: classifier)
                .tabItem {
                    Label("AI", systemImage: "camera.metering.multispot")
                }
            InfoView()
                .tabItem {
                    Label("Info", systemImage: "info.square")
                }
        }
        .tint(.darkBackground)
        .navigationBarBackButtonHidden(true)
    }
</code>```

So I tried multiple forms of implementing the search bar and none worked well, some of options really broke the tabview or the bar was always visible in any view with broken animations.

This is the code before where the search bar was working as intended (showing when the list is pulled).

```<code>var body: some View {
        NavigationStack {
            List(searchResults, children: \.items) { item in
                NavigationLink(destination: CarView(carData: carData).onAppear() {
                    carData.selectedCar = item.pageId
                    Task {
                        await carData.fetchCarData()
                    }
                }) {
                    Text("\(item.name)")
                }
            }
            .navigationBarTitle("Models", displayMode: .inline)
            .listStyle(.plain)
            .searchable(text: $searchText, placement: .navigationBarDrawer(displayMode: .automatic))
        }
    }
</code>```

This is the preview which shows the search bar.

Title: SwiftUI iOS - Searchable with TabView

Body:
Is anyone having problems using .searchable inside a TabView?
Before I implemented the TabView it was working just fine, and it is still showing on the preview.

This is the code now (does not show the search bar):

var body: some View {
        TabView {
            NavigationStack {
                List(searchResults, children: \.items) { item in
                    NavigationLink(destination: CarView(carData: carData).onAppear() {
                        carData.selectedCar = item.pageId
                        Task {
                            await carData.fetchCarData()
                        }
                    }) {
                        Text("\(item.name)")
                    }
                    .padding(.vertical, 8)
                    .fontDesign(.monospaced)
                }
                .listStyle(.plain)
                .searchable(text: $searchText, placement: .navigationBarDrawer(displayMode: .always))
            }
            .tabItem {
                Label("Models", systemImage: "list.dash")
            }
            AIView(classifier: classifier)
                .tabItem {
                    Label("AI", systemImage: "camera.metering.multispot")
                }
            InfoView()
                .tabItem {
                    Label("Info", systemImage: "info.square")
                }
        }
        .tint(.darkBackground)
        .navigationBarBackButtonHidden(true)
    }

So I tried multiple forms of implementing the search bar and none worked well, some of options really broke the tabview or the bar was always visible in any view with broken animations.

This is the code before where the search bar was working as intended (showing when the list is pulled).

var body: some View {
        NavigationStack {
            List(searchResults, children: \.items) { item in
                NavigationLink(destination: CarView(carData: carData).onAppear() {
                    carData.selectedCar = item.pageId
                    Task {
                        await carData.fetchCarData()
                    }
                }) {
                    Text("\(item.name)")
                }
            }
            .navigationBarTitle("Models", displayMode: .inline)
            .listStyle(.plain)
            .searchable(text: $searchText, placement: .navigationBarDrawer(displayMode: .automatic))
        }
    }

This is the preview which shows the search bar.


问:
Unresolved reference: CustomTarget while using glide
I am using glide in my kotlin project i am getting the error "Unresolved reference: CustomTarget " . I would like to know how to fix this error.

My code is :

```<code>Glide.with(context)
            .asBitmap()
            .load(url)
            .into(object : CustomTarget<Bitmap>() {
                override fun onLoadCleared(placeholder: Drawable?) {
                }

                override fun onResourceReady(resource: Bitmap, transition: Transition<in Bitmap>?) {

                }

            })
</code>```

What i tried is

Added the following code :

```<code> import com.bumptech.glide.annotation.GlideModule
 import com.bumptech.glide.module.AppGlideModule

 @GlideModule
 class RequiredAppGlideModule : AppGlideModule()
</code>```

Added the following in gradle

implementation 'com.github.bumptech.glide:annotations:4.7.1'

```<code> implementation "com.github.bumptech.glide:okhttp3-integration:4.6.1"

 implementation 'com.github.bumptech.glide:annotations:4.7.1'

 kapt 'com.github.bumptech.glide:compiler:4.14.2'

 kapt "android.arch.lifecycle:compiler:1.0.0"
</code>```

File -> Invalidate caches ,Restart

Reference :

get image from Firebase storage. GlideApp unresolved reference

Unresolved reference: GlideApp in activity written in Kotlin

Glide cannot resolve asBitmap()

How does one use glide to download an image into a bitmap?

Body:
I am using glide in my kotlin project i am getting the error "Unresolved reference: CustomTarget " . I would like to know how to fix this error.

My code is :

Glide.with(context)
            .asBitmap()
            .load(url)
            .into(object : CustomTarget<Bitmap>() {
                override fun onLoadCleared(placeholder: Drawable?) {
                }

                override fun onResourceReady(resource: Bitmap, transition: Transition<in Bitmap>?) {

                }

            })

What i tried is

Added the following code :

 import com.bumptech.glide.annotation.GlideModule
 import com.bumptech.glide.module.AppGlideModule

 @GlideModule
 class RequiredAppGlideModule : AppGlideModule()

Added the following in gradle

implementation 'com.github.bumptech.glide:annotations:4.7.1'

 implementation "com.github.bumptech.glide:okhttp3-integration:4.6.1"

 implementation 'com.github.bumptech.glide:annotations:4.7.1'

 kapt 'com.github.bumptech.glide:compiler:4.14.2'

 kapt "android.arch.lifecycle:compiler:1.0.0"

File -> Invalidate caches ,Restart

Reference :

get image from Firebase storage. GlideApp unresolved reference

Unresolved reference: GlideApp in activity written in Kotlin

Glide cannot resolve asBitmap()

How does one use glide to download an image into a bitmap?


问:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443):
I got this error while running below code, please helps!

stanza.Pipeline(lang='id', processors='tokenize', use_gpu=True)

full error:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /stanfordnlp/stanza-resources/main/resources_1.4.0.json (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001F6332F9580>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))

Thanks

Please help me solve this!!


问:
GCP Cloud build, included files filter is not working for the new branch
I’m using GCP cloud repository (for mirroring), and GCP cloud build for CI and CD.
And I'd have trouble when pushing a new branch, all triggers will be fired.

For example,

```<code>Directory:
/a/
/b/
/c/

Triggers set,
Trigger A, included files filter set /a/**
Trigger B, included files filter set /b/**
Trigger C, included files filter set /c/**

$(master) git checkout -b new-branch
$(new-branch) git push
</code>```

like the above case, If I create a new branch from the master and then push it, it will fire all the triggers.

I understand the new branch contains all the directories /a/, /b/, /c/
But as the number of triggers is larger, it is getting difficult to find out if the changes do not affect other services. And wasting resources.

Is there any solution for this case?

Body:
I’m using GCP cloud repository (for mirroring), and GCP cloud build for CI and CD.
And I'd have trouble when pushing a new branch, all triggers will be fired.

For example,

Directory:
/a/
/b/
/c/

Triggers set,
Trigger A, included files filter set /a/**
Trigger B, included files filter set /b/**
Trigger C, included files filter set /c/**

$(master) git checkout -b new-branch
$(new-branch) git push

like the above case, If I create a new branch from the master and then push it, it will fire all the triggers.

I understand the new branch contains all the directories /a/, /b/, /c/
But as the number of triggers is larger, it is getting difficult to find out if the changes do not affect other services. And wasting resources.

Is there any solution for this case?


问:
Terraform 1.x Module - Provider - Cloudflare
When I ran init:

Initializing modules...

Initializing the backend...

Initializing provider plugins...
Finding cloudflare/cloudflare versions matching "~> 3.0"...
Finding latest version of hashicorp/cloudflare...
Installing cloudflare/cloudflare v3.31.0...
Installed cloudflare/cloudflare v3.31.0 (signed by a HashiCorp partner, key ID DE413CEC881C3283)

Partner and community providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://www.terraform.io/docs/cli/plugins/signing.html

Error: Failed to query available provider packages

Could not retrieve the list of available versions for provider hashicorp/cloudflare: provider registry registry.terraform.io does not have a provider named
registry.terraform.io/hashicorp/cloudflare

Did you intend to use cloudflare/cloudflare? If so, you must specify that source address in each module which requires that provider. To see which modules are currently
depending on hashicorp/cloudflare, run the following command:
terraform providers

Module:

cat dns.tf

```<code>module "dns" {
  source = "./dns"
}
</code>```

Definition:

cat cloudflare.tf

```<code>terraform {
  required_providers {
    cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "~> 3.0"
    }
  }
}

provider "cloudflare" {
  email = "CLOUDFLARE_EMAIL"
  api_key = "CLOUDFLARE_API_KEY"
}
</code>```

Body:
When I ran init:

Initializing modules...

Initializing the backend...

Initializing provider plugins...
Finding cloudflare/cloudflare versions matching "~> 3.0"...
Finding latest version of hashicorp/cloudflare...
Installing cloudflare/cloudflare v3.31.0...
Installed cloudflare/cloudflare v3.31.0 (signed by a HashiCorp partner, key ID DE413CEC881C3283)

Partner and community providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://www.terraform.io/docs/cli/plugins/signing.html

Error: Failed to query available provider packages

Could not retrieve the list of available versions for provider hashicorp/cloudflare: provider registry registry.terraform.io does not have a provider named
registry.terraform.io/hashicorp/cloudflare

Did you intend to use cloudflare/cloudflare? If so, you must specify that source address in each module which requires that provider. To see which modules are currently
depending on hashicorp/cloudflare, run the following command:
terraform providers

Module:

cat dns.tf

module "dns" {
  source = "./dns"
}

Definition:

cat cloudflare.tf

terraform {
  required_providers {
    cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "~> 3.0"
    }
  }
}

provider "cloudflare" {
  email = "CLOUDFLARE_EMAIL"
  api_key = "CLOUDFLARE_API_KEY"
}


问:
Set problems in Python
The input of the array of sets:

```<code>[{"Bob","87"}, {"Mike", "35"},{"Bob", "52"}, {"Jason","35"}, {"Mike", "55"}, {"Jessica", "99"}]
</code>```

However, if I immediately print it, the terminal shows me

```<code>[{'Bob', '87'}, {'35', 'Mike'}, {'Bob', '52'}, {'35', 'Jason'}, {'55', 'Mike'}, {'99', 'Jessica'}]
</code>```

We can see some names are swapped with their corresponding numbers. Here are two problems:

Q1. How can we keep the list the same as the input?

Q2. If I run a for-loop for each element of the list, how can I quickly extract the numeric elements of each set?

Title: Set problems in Python

Body:
The input of the array of sets:

[{"Bob","87"}, {"Mike", "35"},{"Bob", "52"}, {"Jason","35"}, {"Mike", "55"}, {"Jessica", "99"}]

However, if I immediately print it, the terminal shows me

[{'Bob', '87'}, {'35', 'Mike'}, {'Bob', '52'}, {'35', 'Jason'}, {'55', 'Mike'}, {'99', 'Jessica'}]

We can see some names are swapped with their corresponding numbers. Here are two problems:

Q1. How can we keep the list the same as the input?

Q2. If I run a for-loop for each element of the list, how can I quickly extract the numeric elements of each set?


问:
GCP PUB/SUB - pull subscription with multiple instances
Background:
I have created notification on my GCP bucket so whenever I am receiving any file in the bucket, it will create notification and sends it to pub/sub topic. I have created spring boot app that received message and processes that file.

Problem:

if i am running single instance of spring boot app that pull message from gcp subscription, then its working fine but when i am running multiple instances then each app is receiving notification and starts processing file, but i want only one instance to process the file.

Please help to suggest.


问:
How can I record dynamically changing HTML using Selenium or something?
I want to scrape a webpage, but it periodically changes the content, by getting additional information periodically using WebSocket.

So I have to scrape a webpage every time when it changes its content. Or, if it's possible, I can record the webpage content.

Is there any opensource or program that I can achieve this? Can Selenium do this?


问:
Getting an error while loading pickled spacy NER Model?
```<code>with open ("path/nlp_ner_model.p",'rb') as f:
    ner = pickle.load(f)
</code>```

I am using the above code and getting an error:

```<code>Can't get attribute 'default_serialize_torch_model' on <module 'thinc.shims.pytorch' from 'C:\\Users\\name\\anaconda3\\lib\\site-packages\\thinc\\shims\\pytorch.py'>
</code>```

I have used this code to import all the other models and worked fine but not working for the recently trained model.
Thank you for your time!!

Body:
with open ("path/nlp_ner_model.p",'rb') as f:
    ner = pickle.load(f)

I am using the above code and getting an error:

Can't get attribute 'default_serialize_torch_model' on <module 'thinc.shims.pytorch' from 'C:\\Users\\name\\anaconda3\\lib\\site-packages\\thinc\\shims\\pytorch.py'>

I have used this code to import all the other models and worked fine but not working for the recently trained model.
Thank you for your time!!