问:
Unity Mars : Null Refrence Error while creating body poses
Unity Mars Error Video for refrence

While creating body pose using Unity Body expression action facing a null refrence issue.

I am trying to create body pose data which I am not able to because of this null error from BodyTrackingModule.cs (Unity MARS inbuilt script).

I tried creating body poses using MARS default body

I tried a 3D avatar from Mixamo

I tried to implement the above two ways in windows as well as Mac. Same issue occured in both cases

Unity MARS console error
BodyTrackingModule.cs

I also followed the Unity MARS document of creating pose.

What I want to achieve:
A proper body pose data file after Create Body Pose under Body Expression Action so I can use trigger events on body Poses functionality in my project.

I am using Unity version 2020.3.40 LTS (iOS platform)


来源: stackexchange

问:
Meaning of additional gray circles that show up in VS Code TypeScript debugger
I run VS Code 1.73 and debug VS Code main branch commit 156cc97c88232275391e23f141423cd93b921ddd.

I put couple of breakpoints in src/vs/editor/common/languages/linkComputer.ts file:
.

Then I start debugging, and to trigger breakpoint on return result; I create new text file via main menu: File > New Text File. After a 1-2 sec. breakpoint on return result; is hit, but additional gray circles show up on lines 293, 335, 340.

What is the point in them? How do they work?

ContentLicense: CC BY-SA 4.0


问:
let cgi-fcgi command fail on bad status code
I am trying to write a health check for kubernetes. The application runs with fpm-php, so it needs to be fcgi.

I have this script

#!/usr/bin/env bash

fcgi_env=(
  SCRIPT_NAME=/var/www/html/public/index.php
  SCRIPT_FILENAME=/var/www/html/public/index.php
  REMOTE_ADDR=127.0.0.1
  REQUEST_METHOD=GET
  REQUEST_URI="$1"
  PATH_INFO="$1"
)

env -i "${fcgi_env[@]}" cgi-fcgi -bind -connect 127.0.0.1:9000
```

The problem is that this shows me headers and body, but I am interested in the status code or more specifically I want it to fail, if the status code is greater than 299.

I can set some custom header and grep for that and so on, but I would like a more solid approach. So the question is, how do I retrieve the status code or even better have it fail on a bad status similar to curls --fail option?

Body:
I am trying to write a health check for kubernetes. The application runs with fpm-php, so it needs to be fcgi.

I have this script

#!/usr/bin/env bash

fcgi_env=(
  SCRIPT_NAME=/var/www/html/public/index.php
  SCRIPT_FILENAME=/var/www/html/public/index.php
  REMOTE_ADDR=127.0.0.1
  REQUEST_METHOD=GET
  REQUEST_URI="$1"
  PATH_INFO="$1"
)

env -i "${fcgi_env[@]}" cgi-fcgi -bind -connect 127.0.0.1:9000

The problem is that this shows me headers and body, but I am interested in the status code or more specifically I want it to fail, if the status code is greater than 299.

I can set some custom header and grep for that and so on, but I would like a more solid approach. So the question is, how do I retrieve the status code or even better have it fail on a bad status similar to curls --fail option?


问:
How to debug an external node module as it's invoked from somewhere else?
For example, I created a simple package ToBeDebugged with the following functions and export:

```<code>function doSomethingFirst(myMessage) {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      // Want to create a breakpoint in here to inspect some stuff
      resolve(myMessage);
    }, 2000);
  })
}

function doSomethingSecond() {
  console.log('Will do something second');
}

module.exports = {
  doSomethingSecond,
  doSomethingFirst
}
</code>```

After running npm link in some other directory I install it with npm install ../path/to/ToBeDebugged, now using VSCode, I want to add a breakpoint inside setTimeout to inspect some values, but it doesn't work. What's a way to fix this?

Thanks.

Body:
For example, I created a simple package ToBeDebugged with the following functions and export:

function doSomethingFirst(myMessage) {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      // Want to create a breakpoint in here to inspect some stuff
      resolve(myMessage);
    }, 2000);
  })
}

function doSomethingSecond() {
  console.log('Will do something second');
}

module.exports = {
  doSomethingSecond,
  doSomethingFirst
}

After running npm link in some other directory I install it with npm install ../path/to/ToBeDebugged, now using VSCode, I want to add a breakpoint inside setTimeout to inspect some values, but it doesn't work. What's a way to fix this?

Thanks.


问:
Consumer doesn't get message kafka-js
I have a GET request (using express-js):

```<code>api.get("/test/req", async function(req, res){
    try{
        let result = '';
        var reqId = req.id;

        await producer.send({
            topic: `producer${clusterWorkerId}`,
            messages: [
                {
                    headers: {
                        'id': reqId
                    },
                    value: 'Hello KafkaJS user!',
                    partition: 0
                },
            ],
        });

        let promise = new Promise(async (resolve, reject) => {
            await consumer.run({autoCommitInterval: 5,
                eachMessage: async({ topic, partition, message }) => {
                    console.log('GET MESSAGE');
                    console.log({
                        topic: topic,
                        partition: partition,
                        message: message.value.toString(),
                        worker_id: clusterWorkerId})

                    resolve(message.value.toString());
                }

            })
        });

        result = await promise;
        console.log({result: result});

        res.status(200).json({"id": result});

    }
    catch(error){
        console.log('ERROR:', error);

    }

});
</code>```

I try to make for each worker different topic (worker 1 - consumer1, worker 2 - consumer2, etc). When I send GET request first 5 times, it works fine, but when I send it again it seems like consumer doesn't resolve a result, and I don't have any idea why. When specific consumer get message again (second time) - it doesn't work. Why doest it happen?

Title: Consumer doesn't get message kafka-js

Body:
I have a GET request (using express-js):

api.get("/test/req", async function(req, res){
    try{
        let result = '';
        var reqId = req.id;

        await producer.send({
            topic: `producer${clusterWorkerId}`,
            messages: [
                {
                    headers: {
                        'id': reqId
                    },
                    value: 'Hello KafkaJS user!',
                    partition: 0
                },
            ],
        });

        let promise = new Promise(async (resolve, reject) => {
            await consumer.run({autoCommitInterval: 5,
                eachMessage: async({ topic, partition, message }) => {
                    console.log('GET MESSAGE');
                    console.log({
                        topic: topic,
                        partition: partition,
                        message: message.value.toString(),
                        worker_id: clusterWorkerId})

                    resolve(message.value.toString());
                }

            })
        });

        result = await promise;
        console.log({result: result});

        res.status(200).json({"id": result});

    }
    catch(error){
        console.log('ERROR:', error);

    }

});

I try to make for each worker different topic (worker 1 - consumer1, worker 2 - consumer2, etc). When I send GET request first 5 times, it works fine, but when I send it again it seems like consumer doesn't resolve a result, and I don't have any idea why. When specific consumer get message again (second time) - it doesn't work. Why doest it happen?


问:
Process finished with exit code 139, when running dotnet apps
In one of Ubuntu instances all dotnet projects, being built successfully, end with exit code 139 (without any remarks, like "interrupted by signal 11: SIGSEGV"). Even simple console app Console.WriteLine("Hello, World!");. When I run it in JetBrains Rider with debugger, I get this message:

One or more errors occurred. (Started a process for debugging, but no CoreCLR runtime was seen to be loaded within the 00:00:16 time limit.)

The fact is, that running dotnet apps in another Ubuntu instanse and in Windows goes successfully, without 139 exit code.


问:
How to share x of one ax with that of the other two using matplotlib?
Here is what I have. Is it possible to align bars in ax1 with the others?

image

import numpy as np
import matplotlib.pyplot as plt

x= np.arange(10)+.5
y = np.sin(x)

fig=plt.figure()
ax1 = plt.subplot(211)
ax2 = plt.subplot(223)
ax3 = plt.subplot(224)

ax1.bar(x,y)
ax2.bar(x[:5],y[:5])
ax3.bar(x[5:],y[5:])

plt.show()
```


问:
Code doesn't continue with rest of code after tkinter button has been pressed
I have a code where I need to choose a certain number at the beginning. I do this with a tkinter button. The problem is after I press the button and choose the number the code doesn't continue.

Do I need to add something like continue()

```<code>parent = tk.Tk(className = 'choose number')
frame = tk.Frame(parent, width=300, height=300)
frame.pack()

button_step1= tk.Button(frame, text="0.0025", command=step1, height=2, width=10)
button_step1.pack(side=tk.LEFT)

button_step2= tk.Button(frame, text="0.005", command=step2, height=2, width=10)
button_step2.pack(side=tk.LEFT)

button_step4= tk.Button(frame, text="EXIT", fg="red", command=lambda: parent.destroy(), height=2, width=10)
button_step4.pack(side=tk.RIGHT)

button_step3= tk.Button(frame, text="0.01", command=step3, height=2, width=10)
button_step3.pack(side=tk.RIGHT)

frame.mainloop()
</code>```

step1, step2 and step3 all look the same but with different numbers for the variables.

```<code>def step1():
    global n_average
    n_average = 80
    global n_rotate
    n_rotate = 800
    global STEP_SIZE
    STEP_SIZE = 0.0025
    parent.destroy()
    return n_average, n_rotate, STEP_SIZE
</code>```

Body:
I have a code where I need to choose a certain number at the beginning. I do this with a tkinter button. The problem is after I press the button and choose the number the code doesn't continue.

Do I need to add something like continue()

parent = tk.Tk(className = 'choose number')
frame = tk.Frame(parent, width=300, height=300)
frame.pack()

button_step1= tk.Button(frame, text="0.0025", command=step1, height=2, width=10)
button_step1.pack(side=tk.LEFT)

button_step2= tk.Button(frame, text="0.005", command=step2, height=2, width=10)
button_step2.pack(side=tk.LEFT)

button_step4= tk.Button(frame, text="EXIT", fg="red", command=lambda: parent.destroy(), height=2, width=10)
button_step4.pack(side=tk.RIGHT)

button_step3= tk.Button(frame, text="0.01", command=step3, height=2, width=10)
button_step3.pack(side=tk.RIGHT)

frame.mainloop()

step1, step2 and step3 all look the same but with different numbers for the variables.

def step1():
    global n_average
    n_average = 80
    global n_rotate
    n_rotate = 800
    global STEP_SIZE
    STEP_SIZE = 0.0025
    parent.destroy()
    return n_average, n_rotate, STEP_SIZE


问:
Recognize certain element from the screen without deep learning library python
Well site warns me for too vague description of the problem, but it's really hard to search or ask without knowing appropriate keyword.

What I want my program to do, is to be able to click certain element from the screen.

Things to note is that, there is no shortcut for this action. So I guess I should handle this with the location.

But another problem is that, this location is not really specified.

Let me give you an example.

If you right click with your mouse cursor located above, you will have your element starting with the AdGuard below like this.

But if you right click with your mouse cursor located below, you will have your element(starting with the AdGuard) above.
(+ with your mouse cursor located top right, bottom right, etc...)

In this situation, how can I make my program to click certain element?(starting with the AdGuard in this case)

Well I know about Deep learning, CNN and so on, but I don't want to use it because speed is the key of my program.

Can anyone advice me how to handle this problem?

(I can't even decide which tags are appropriate)


问:
How to implement an "unlock" system in a game
I'm currently implementing an 'unlock' system which will cause certain features (menu options, stats) to become visible and functional when some conditions are met.

I have a working solution and am wondering if another way of doing things might be better when it comes to saving/loading the game state.

Currently, the way I'm doing it is to have an 'unlocked' bool and an unlock() function associated with each Stat or Option instance.

```<code>class Option:
    def __init__(self, text, keyCode, func, unlocked = True, unlock=""):
        self.text = text
        self.keyCode = keyCode
        self.func = func
        self.unlocked = unlocked
        self.unlock = unlock
</code>```

Then in the main program loop, when programmatically displaying all of the user's stats or the options contained in the current menu, a check is done against the 'unlocked' bool for each option or stat and then if it's False, a check against the unlock() function associated with that object.

```<code>for i in current.options:
    #short-circuit so no unlock() call on options that lack unlock functions
    if (i.unlocked or i.unlock(i)):
        print(Style.BRIGHT + Fore.WHITE + " " + i.text + Style.RESET_ALL)
</code>```

This function then updates the value of the 'unlocked' bool if the conditions are met.

e.g.:

```<code>def unlockShop(i):
    global energy
    if (energy >= 5):
        i.unlocked = True
        return True
</code>```

This works fine and dandy but I was thinking about a redesign for the purpose of simplifying serialization. I haven't implemented save/load mechanics yet but I've tried to engineer things toward that end and I feel like this unlock scheme isn't very amenable to that.

An alternative approach I'm considering is to have a single object responsible for managing all unlocks. This object would contain a hashmap or something that maps a given option/stat to a tuple containing the 'unlocked' bool and unlock() function associated with said option/stat.

The key in the hashmap would be some handle that would itself be an attribute of the option/stat class. But the 'unlocked' bool and unlock() function would no longer be members of the option/stat classes but contained (in the case of the bool) or pointed to (in the case of the function) in/by the tuple in the hashmap.

This seems like a better solution for serialization because when saving or loading, we only need to iterate through this single object to rebuild the state of unlocks in the game, rather than looping through all instances of the option/stat classes and saving reading/writing their 'unlocked' bools.

I may be over or under-engineering this. Or there may be an entirely better more logical way to approach this.

Body:
I'm currently implementing an 'unlock' system which will cause certain features (menu options, stats) to become visible and functional when some conditions are met.

I have a working solution and am wondering if another way of doing things might be better when it comes to saving/loading the game state.

Currently, the way I'm doing it is to have an 'unlocked' bool and an unlock() function associated with each Stat or Option instance.

class Option:
    def __init__(self, text, keyCode, func, unlocked = True, unlock=""):
        self.text = text
        self.keyCode = keyCode
        self.func = func
        self.unlocked = unlocked
        self.unlock = unlock

Then in the main program loop, when programmatically displaying all of the user's stats or the options contained in the current menu, a check is done against the 'unlocked' bool for each option or stat and then if it's False, a check against the unlock() function associated with that object.

for i in current.options:
    #short-circuit so no unlock() call on options that lack unlock functions
    if (i.unlocked or i.unlock(i)):
        print(Style.BRIGHT + Fore.WHITE + " " + i.text + Style.RESET_ALL)

This function then updates the value of the 'unlocked' bool if the conditions are met.

e.g.:

def unlockShop(i):
    global energy
    if (energy >= 5):
        i.unlocked = True
        return True

This works fine and dandy but I was thinking about a redesign for the purpose of simplifying serialization. I haven't implemented save/load mechanics yet but I've tried to engineer things toward that end and I feel like this unlock scheme isn't very amenable to that.

An alternative approach I'm considering is to have a single object responsible for managing all unlocks. This object would contain a hashmap or something that maps a given option/stat to a tuple containing the 'unlocked' bool and unlock() function associated with said option/stat.

The key in the hashmap would be some handle that would itself be an attribute of the option/stat class. But the 'unlocked' bool and unlock() function would no longer be members of the option/stat classes but contained (in the case of the bool) or pointed to (in the case of the function) in/by the tuple in the hashmap.

This seems like a better solution for serialization because when saving or loading, we only need to iterate through this single object to rebuild the state of unlocks in the game, rather than looping through all instances of the option/stat classes and saving reading/writing their 'unlocked' bools.

I may be over or under-engineering this. Or there may be an entirely better more logical way to approach this.


问:
Modify one endpoint request from other endpoint in spring boot
I am using payment gateway for the money transaction.
On successful payment we are calling process endpoint from ui to server side which is returning transaction is in process state.
Meanwhile payment gateway is calling our success endpoint using webhook at the moment when transaction is successful at payment gateway side. Unfortunately in most of the case, success endpoint is getting called before process. This is where the issue comes. Requirement is that user should get transaction successful message.
I want some mechanism that execution flow should be

process endpoint operation should get executed first completely even if it is called after success endpoint

success endpoint operation

process endpoint should check success endpoint operation is done then modify the response to transaction successful.

Note : There are case where success endpoint getting called after a day as well so need to handle this scenario.

i tried calling notify and wait but as we want single transaction to work synchronously across multiple endpoints.
Which framework should i go for flux or taskexecutor or polling.
server wise memory is less so unable to add new application like kafka or redis cache.


问:
Strange behavior of MSYS shell version 5.1.8
I have a strange behavior when the executing a program in a MSYS shell version 5.1.8. I'm on Windows 10 Version 22H2 (OS Build 19045.2251). The strange behavior occurs when a path is on a drive created with subst.

The following steps can be used to reproduce the behavior.

Inside a Windows CMD

```<code>C:\Users\f.redeker>subst s: "C:\Program Files\Common Files\System"

C:\Users\f.redeker>subst
S:\: => C:\Program Files\Common Files\System
</code>```

Inside a shell version 5.1.8

```<code>sh-5.1$ uname -a
MSYS_NT-10.0-18362 MIMIR-W10-64 3.2.0-340.x86_64 2021-07-02 08:36 UTC x86_64 Msys

sh-5.1$ sh --version
GNU bash, version 5.1.8(1)-release (x86_64-pc-msys)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

sh-5.1$ realpath /s/ado/msadox.dll
/s/ado/msadox.dll

sh-5.1$ cd /s
sh-5.1$ pwd
/s

sh-5.1$ realpath ado/msadox.dll
/s/ado/msadox.dll

sh-5.1$ cd ado
sh-5.1$ pwd
/s/ado

sh-5.1$ realpath msadox.dll
/c/Program Files/Common Files/System/ado/msadox.dll
</code>```

But

```<code>sh-5.1$ realpath /s/ado/sadox.dll
/s/ado/msadox.dll
</code>```

Inside a shell version 4.4.19

```<code>sh-4.4$ uname -a
MSYS_NT-10.0-18362 MIMIR-W10-64 3.2.0-340.x86_64 2021-07-02 08:36 UTC x86_64 Msys

sh-4.4$ sh --version
GNU bash, version 4.4.19(2)-release (i686-pc-msys)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

sh-4.4$ cd /s
sh-4.4$ pwd
/s
sh-4.4$ realpath ado/msadox.dll
/s/ado/msadox.dll
sh-4.4$ cd ado
sh-4.4$ pwd
/s/ado
sh-4.4$ realpath msadox.dll
/s/ado/msadox.dll
</code>```

With Process Monitor I have observed that the shell does not directly start the program to be executed, but first another shell. When creating this shell it seems that the current directory is given when CreateProcess is called.
Here, however, not the path with the subst drive is used but the one to which the subst drive points. Due to this behavior the Windows functions (e.g. _fullpath or GetFullPathName) do not return the result with the subst path if not an absolute path is specified as input parameter.

Is there any way to preserve the old behavior in current MSYS version?

Body:
I have a strange behavior when the executing a program in a MSYS shell version 5.1.8. I'm on Windows 10 Version 22H2 (OS Build 19045.2251). The strange behavior occurs when a path is on a drive created with subst.

The following steps can be used to reproduce the behavior.

Inside a Windows CMD

C:\Users\f.redeker>subst s: "C:\Program Files\Common Files\System"

C:\Users\f.redeker>subst
S:\: => C:\Program Files\Common Files\System

Inside a shell version 5.1.8

sh-5.1$ uname -a
MSYS_NT-10.0-18362 MIMIR-W10-64 3.2.0-340.x86_64 2021-07-02 08:36 UTC x86_64 Msys

sh-5.1$ sh --version
GNU bash, version 5.1.8(1)-release (x86_64-pc-msys)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

sh-5.1$ realpath /s/ado/msadox.dll
/s/ado/msadox.dll

sh-5.1$ cd /s
sh-5.1$ pwd
/s

sh-5.1$ realpath ado/msadox.dll
/s/ado/msadox.dll

sh-5.1$ cd ado
sh-5.1$ pwd
/s/ado

sh-5.1$ realpath msadox.dll
/c/Program Files/Common Files/System/ado/msadox.dll

But

sh-5.1$ realpath /s/ado/sadox.dll
/s/ado/msadox.dll

Inside a shell version 4.4.19

sh-4.4$ uname -a
MSYS_NT-10.0-18362 MIMIR-W10-64 3.2.0-340.x86_64 2021-07-02 08:36 UTC x86_64 Msys

sh-4.4$ sh --version
GNU bash, version 4.4.19(2)-release (i686-pc-msys)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

sh-4.4$ cd /s
sh-4.4$ pwd
/s
sh-4.4$ realpath ado/msadox.dll
/s/ado/msadox.dll
sh-4.4$ cd ado
sh-4.4$ pwd
/s/ado
sh-4.4$ realpath msadox.dll
/s/ado/msadox.dll

With Process Monitor I have observed that the shell does not directly start the program to be executed, but first another shell. When creating this shell it seems that the current directory is given when CreateProcess is called.
Here, however, not the path with the subst drive is used but the one to which the subst drive points. Due to this behavior the Windows functions (e.g. _fullpath or GetFullPathName) do not return the result with the subst path if not an absolute path is specified as input parameter.

Is there any way to preserve the old behavior in current MSYS version?


问:
Tkinter Indentation in CheckboxTreeview
I have code that generate a CheckboxTreeview
but it looks loke this

```<code>1
 12
   121
   122
 13
  131
</code>```

I need it to run on larger monitor and the space look smaller...
how can I make the previous tree look like

```<code>1
    12
         121
         122
    13
         131
</code>```

i found this unsolved quesion
Python Tkinter Checkboxtreeview: how to increase its width?

here some code

```<code>ttk.Style().configure("Treeview", background="#000000", fieldbackground="#000000", foreground="#555555", font=(None, 30), rowheight=80)
self.tests_tree = CheckboxTreeview(self.left_middle, height=int(self.height / 100), yscrollcommand=self.tree_scrollbar.set,  window_height=self.height, window_width=self.width, show="tree")
self.tests_tree.column("#0", width=int(self.width / 1.8))
self.tests_tree.insert("", "end", "Diagnostics Root", text="Diagnostics Root", open=True)
self.tests_tree.insert("Diagnostics Root", "end", "Alarm Board", text="Alarm Board", open=True)
</code>```

Title: Tkinter Indentation in CheckboxTreeview

Body:
I have code that generate a CheckboxTreeview
but it looks loke this

1
 12
   121
   122
 13
  131

I need it to run on larger monitor and the space look smaller...
how can I make the previous tree look like

1
    12
         121
         122
    13
         131

i found this unsolved quesion
Python Tkinter Checkboxtreeview: how to increase its width?

here some code

ttk.Style().configure("Treeview", background="#000000", fieldbackground="#000000", foreground="#555555", font=(None, 30), rowheight=80)
self.tests_tree = CheckboxTreeview(self.left_middle, height=int(self.height / 100), yscrollcommand=self.tree_scrollbar.set,  window_height=self.height, window_width=self.width, show="tree")
self.tests_tree.column("#0", width=int(self.width / 1.8))
self.tests_tree.insert("", "end", "Diagnostics Root", text="Diagnostics Root", open=True)
self.tests_tree.insert("Diagnostics Root", "end", "Alarm Board", text="Alarm Board", open=True)


问:
how to stop player position from changing once it is against a wall/static-object?
I am creating a top-down game, Though during testing I found that the enemies weren't going to the player.

I discovered that the coordinates of the player change when it moved, though the coordinates would still change when the player would move against the wall. for example, if I was to move up into a wall, even though the player wasn't moving, its Z coordinate would still be increasing

this is the code that is to move the player:

```<code>    void FixedUpdate()
    {
        var dir = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical")).normalized;
        transform.Translate(dir * speed * Time.deltaTime);
    }
</code>```

What I then wanted to try was adding a colliding feature to which if it notices that the player's side is touching a wall or static object which meant that it would shut off the ability to continue going in the direction that it is against until it was not touching the wall on the specific side.

though I couldn't get the collision/collider code to work, I found that it wasn't picking up that it was touching an object.

are there any methods to fix this issue?

Body:
I am creating a top-down game, Though during testing I found that the enemies weren't going to the player.

I discovered that the coordinates of the player change when it moved, though the coordinates would still change when the player would move against the wall. for example, if I was to move up into a wall, even though the player wasn't moving, its Z coordinate would still be increasing

this is the code that is to move the player:

    void FixedUpdate()
    {
        var dir = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical")).normalized;
        transform.Translate(dir * speed * Time.deltaTime);
    }

What I then wanted to try was adding a colliding feature to which if it notices that the player's side is touching a wall or static object which meant that it would shut off the ability to continue going in the direction that it is against until it was not touching the wall on the specific side.

though I couldn't get the collision/collider code to work, I found that it wasn't picking up that it was touching an object.

are there any methods to fix this issue?


问:
Script returns empty collection from Chrome's IndexedDB executed via IJavaScriptExecutor in C#, but works well in browser's console
Trying to get records from Chrome's IndexedDB launching script using selenium's IJavaScriptExecutor in C# code, but always getting empty result.
The same script executed in browser console returns records.

```<code>//_webDriver is an initialized instance of ChromeDriver

var jsDriver = (IJavaScriptExecutor)_webDriver;
var metrics = jsDriver.ExecuteScript(
                                "function getAllEvents() {" +

                                "var t_events = [];" +
                                "var connection = window.indexedDB.open('metrics', 1);" +
                                "connection.onsuccess = (e) => {" +
                                    "var database = e.target.result;" +
                                    "var transaction = database.transaction(['events'], 'readonly');" +
                                    "var objectStore = transaction.objectStore('events');" +
                                    "request = objectStore.openCursor();" +
                                    "request.onerror = function(event) {" +
                                        "throw new Error('error fetching data!');" +
                                    "};" +
                                    "request.onsuccess = function(event) {" +
                                        "let cursor = event.target.result;" +
                                        "if (cursor) {" +
                                            "let key = cursor.primaryKey;" +
                                            "let value = cursor.value;" +
                                            "t_events.push(value);" +
                                            "cursor.continue();" +
                                        "}" +
                                        "else {" +
                                        // no more results
                                        "}" +
                                    "};" +
                                "};" +
                                "connection.onerror = (e) => {" +
                                    "throw new Error('error opening connection to database!');" +
                                "};" +
                                "return tip_events;" +
                            "} return getAllEvents();");
</code>```

Working script string in browser console looks like this (removed last return command):

```<code>function getAllEvents() {var t_events = [];var connection = window.indexedDB.open('metrics', 1);connection.onsuccess = (e) => {var database = e.target.result;var transaction = database.transaction(['events'], 'readonly');var objectStore = transaction.objectStore('events');request = objectStore.openCursor();request.onerror = function(event) {throw new Error('error fetching data!');};request.onsuccess = function(event) {let cursor = event.target.result;if (cursor) {let key = cursor.primaryKey;let value = cursor.value;t_events.push(value);cursor.continue();}else {}};};connection.onerror = (e) => {throw new Error('error opening connection to database!');};return t_events;} getAllEvents();
</code>```

What am I doing wrong?

Body:
Trying to get records from Chrome's IndexedDB launching script using selenium's IJavaScriptExecutor in C# code, but always getting empty result.
The same script executed in browser console returns records.

//_webDriver is an initialized instance of ChromeDriver

var jsDriver = (IJavaScriptExecutor)_webDriver;
var metrics = jsDriver.ExecuteScript(
                                "function getAllEvents() {" +

                                "var t_events = [];" +
                                "var connection = window.indexedDB.open('metrics', 1);" +
                                "connection.onsuccess = (e) => {" +
                                    "var database = e.target.result;" +
                                    "var transaction = database.transaction(['events'], 'readonly');" +
                                    "var objectStore = transaction.objectStore('events');" +
                                    "request = objectStore.openCursor();" +
                                    "request.onerror = function(event) {" +
                                        "throw new Error('error fetching data!');" +
                                    "};" +
                                    "request.onsuccess = function(event) {" +
                                        "let cursor = event.target.result;" +
                                        "if (cursor) {" +
                                            "let key = cursor.primaryKey;" +
                                            "let value = cursor.value;" +
                                            "t_events.push(value);" +
                                            "cursor.continue();" +
                                        "}" +
                                        "else {" +
                                        // no more results
                                        "}" +
                                    "};" +
                                "};" +
                                "connection.onerror = (e) => {" +
                                    "throw new Error('error opening connection to database!');" +
                                "};" +
                                "return tip_events;" +
                            "} return getAllEvents();");

Working script string in browser console looks like this (removed last return command):

function getAllEvents() {var t_events = [];var connection = window.indexedDB.open('metrics', 1);connection.onsuccess = (e) => {var database = e.target.result;var transaction = database.transaction(['events'], 'readonly');var objectStore = transaction.objectStore('events');request = objectStore.openCursor();request.onerror = function(event) {throw new Error('error fetching data!');};request.onsuccess = function(event) {let cursor = event.target.result;if (cursor) {let key = cursor.primaryKey;let value = cursor.value;t_events.push(value);cursor.continue();}else {}};};connection.onerror = (e) => {throw new Error('error opening connection to database!');};return t_events;} getAllEvents();

What am I doing wrong?


问:
Convert JSON data to HTML table using localhost API request
I am trying to convert this JSON data to a HTML table, although i'm finding it difficult to correctly parse my JSON values due to the structure and the table does not show. The same method works fine with other JSON files, however the issue lies within the "lobbying_activities" element. Below is the JSON:

```<code>{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "expenses": "1920000.00",
            "dt_posted": "2022-10-20T21:53:30-04:00",
            "lobbying_activities": [
                {
                    "description": "Providing information related to Apple Pay",
                },
                {
                    "description": "Issues related to transparency and government access to data, including H.R. 7072/S. 4373, the Non-Disclosure Order (NDO) Fairness Act",
                },
                {
                    "description": "Issues related tothe requirements of E.O. 14028, an Executive Order on Improving the Nation's Cybersecurity Issues related to cybersecurity requirements in H.R. 7900, the National Defense Authorization Act for Fiscal Year 2023",
                },
              ]
        },
    ]
}
</code>```

My code is the attempt to convert this data into a HTML table, I have tried to grab the data and create the necessary rows using query selector and innerHTML etc:

```<code>const requestUrl6 = 'https://api.npoint.io/1cae29b5fc8900f6cc5a';
const requestJSON6 = async url => {

  const response6 = await (await fetch(url)).json();
  const limit6 = Math.max(...Object.keys(response6.expenses)) + 1;
  for(let index6 = 0; index6 < limit6; index6++)
  {
      let newRow6 = rowTemplate6.cloneNode(true);
      newRow6.id = '';
      newRow6.querySelector('.Date6').innerHTML = response6.dt_posted[index6];
      newRow6.querySelector('.Expenses6').innerHTML = response6.expenses[index6];
      newRow6.querySelector('.Purpose6').innerHTML = response6.description[index6];
      rowTemplate6.parentNode.appendChild(newRow6);
  }
  rowTemplate6.parentNode.removeChild(rowTemplate6);
}
requestJSON6(requestUrl6);
</code>```

HTML:

```<code>        <div class="institution_attention_analysis">
            <table id="content-table_page6" style="color: white; font-size: 10px;">
                <tr class="toptable">
                    <th>Date</th>
                    <th>Expenses</th>
                    <th>Lobying Activities</th>
                </tr>
                <tr id='rowTemplate6'>
                  <td class='Date6' style="text-align:center; font-size: 10px;"></td>
                  <td class='Expenses6' style="text-align:center; font-size: 10px;"></td>
                  <td class='Purpose6' style="text-align:center; font-size: 10px;"></td>
                </tr>
            </table>
        </div>
</code>```

Body:
I am trying to convert this JSON data to a HTML table, although i'm finding it difficult to correctly parse my JSON values due to the structure and the table does not show. The same method works fine with other JSON files, however the issue lies within the "lobbying_activities" element. Below is the JSON:

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "expenses": "1920000.00",
            "dt_posted": "2022-10-20T21:53:30-04:00",
            "lobbying_activities": [
                {
                    "description": "Providing information related to Apple Pay",
                },
                {
                    "description": "Issues related to transparency and government access to data, including H.R. 7072/S. 4373, the Non-Disclosure Order (NDO) Fairness Act",
                },
                {
                    "description": "Issues related tothe requirements of E.O. 14028, an Executive Order on Improving the Nation's Cybersecurity Issues related to cybersecurity requirements in H.R. 7900, the National Defense Authorization Act for Fiscal Year 2023",
                },
              ]
        },
    ]
}

My code is the attempt to convert this data into a HTML table, I have tried to grab the data and create the necessary rows using query selector and innerHTML etc:

const requestUrl6 = 'https://api.npoint.io/1cae29b5fc8900f6cc5a';
const requestJSON6 = async url => {

  const response6 = await (await fetch(url)).json();
  const limit6 = Math.max(...Object.keys(response6.expenses)) + 1;
  for(let index6 = 0; index6 < limit6; index6++)
  {
      let newRow6 = rowTemplate6.cloneNode(true);
      newRow6.id = '';
      newRow6.querySelector('.Date6').innerHTML = response6.dt_posted[index6];
      newRow6.querySelector('.Expenses6').innerHTML = response6.expenses[index6];
      newRow6.querySelector('.Purpose6').innerHTML = response6.description[index6];
      rowTemplate6.parentNode.appendChild(newRow6);
  }
  rowTemplate6.parentNode.removeChild(rowTemplate6);
}
requestJSON6(requestUrl6);

HTML:

                    Date
                    Expenses
                    Lobying Activities


问:
How do I change the CMakeLists.txt of a project in CLion?
When setting up the project, I picked the wrong CMakeLists.txt. However, I can't seem to find any option anywhere to tell CLion I want it to use another CMakeLists.txt. I've also tried to delete various settings directories, nothing helped.


问:
How to use react app in Netsuite suitelet script?
So I am trieng to create react app in a suitlet. but I cant figure it out how to upload the field to the file cabinet, how to call the index.html file and what to do with the node_modules folder?

for example, I have a suitelet with a HTML field, but how can I call the react from there?


问:
Are Developer Console - Statistics/KPIs accurate?
I've been observing KPIs on Developer Console for a very long time and some statistics looks very inaccurate.
For example my "New Users Aquired" and "User Loss" always has a difference like -100. If I have for 1 Day  300 New Users, that means my User Lost will be around 400. This has been happening for years, regardless how well I try to optimise app by reducing Crash/ANR and improving user experience.
Same is with Store Listing Visitors, if they are 1000-1500 per day, this means my Store Listing Acquisitions will be between 200-300.  Each day is exactly the same.
Store Listing conversion rate is always low between 20-25%
Installed Audience daily drops by 30-100 and I see it very rarely to increase

All KPIs are totally predictable.

I Am just wondering if the KPIs are accurate and this is normal


问:
How to re-Order a JsonArray
I'm trying to re-order a JsonArray with putting a specif Column TransactionId to the first element of my Json Array :

Here Is my Json

```<code> `{
  "ImportOperation":{
   "Lines":{
     "GoodsReceivalLine":[
        {
           "ExtWarehouseId":"Warehouse1",
             "CustomData":{
              "Item":[
                 {
                    "Key":{
                       "string":"Type"
                    },
                    "Value":{
                       "string":"Move"
                    }
                 }
              ]
           },
           "CustomAllocationData":{
              "Item":[
                 {
                    "Key":{
                       "string":"Grade"
                    },
                    "Value":{
                       "string":"002"
                    }
                 }
              ]
           }
        },
        {
           "ExtWarehouseId":"Warehouse2",
            "CustomData":{
              "Item":[
                 {
                    "Key":{
                       "string":"Type"
                    },
                    "Value":{
                       "string":"Move"
                    }
                 }
              ]
           },
           "CustomAllocationData":{
              "Item":[
                 {
                    "Key":{
                       "string":"Grade"
                    },
                    "Value":{
                       "string":"002"
                    }
                 }
              ]
           }
        }
     ]
    }
  }
  }`
</code>```

Now , i tried to add in GoodsReceivalLine array a random UUID TransactionId as a first elemet of my JSON array  So that my Json would be :

```<code> `{
 "ImportOperation":{
  "Lines":{
     "GoodsReceivalLine":[
        {
           "TransactionId":"RAndom UUID VAlue",
           "ExtWarehouseId":"Warehouse1",
             "CustomData":{
              "Item":[
                 {
                    "Key":{
                       "string":"Type"
                    },
                    "Value":{
                       "string":"Move"
                    }
                 }
              ]
           },
           "CustomAllocationData":{
              "Item":[
                 {
                    "Key":{
                       "string":"Grade"
                    },
                    "Value":{
                       "string":"002"
                    }
                 }
              ]
           }
        },
        {
           "TransactionId":"RAndom UUID VAlue",
           "ExtWarehouseId":"Warehouse2",
            "CustomData":{
              "Item":[
                 {
                    "Key":{
                       "string":"Type"
                    },
                    "Value":{
                       "string":"Move"
                    }
                 }
              ]
           },
           "CustomAllocationData":{
              "Item":[
                 {
                    "Key":{
                       "string":"Grade"
                    },
                    "Value":{
                       "string":"002"
                    }
                 }
              ]
           }
        }
     ]
    }
    }
  }
  `
</code>```

For this i tried this code that works and generates my TransactionId properly but get the order of my Json as not expectedand very random order  :

```<code>          `JSONObject inputJo = new JSONObject((String)globalMap.get("row1.body"));
         JSONObject impOpJo = inputJo.getJSONObject("ImportOperation");
         JSONObject linesJo = impOpJo.getJSONObject("Lines");
         JSONArray goodsRecJa = linesJo.getJSONArray("GoodsReceivalLine");

         for(int i = 0; i<goodsRecJa.length(); i++){
         JSONObject tmpObj = goodsRecJa.getJSONObject(i);
         tmpObj.put("TransactionId",  java.util.UUID.randomUUID().toString()) ;
         }
         System.out.println("*** Body  : "+inputJo.toString()); `

</code>```

Where i'm i mistaking and how could i correct that , is my loop not correct ? please i'm stack with that

Title: How to re-Order a JsonArray

Body:
I'm trying to re-order a JsonArray with putting a specif Column TransactionId to the first element of my Json Array :

Here Is my Json

 `{
  "ImportOperation":{
   "Lines":{
     "GoodsReceivalLine":[
        {
           "ExtWarehouseId":"Warehouse1",
             "CustomData":{
              "Item":[
                 {
                    "Key":{
                       "string":"Type"
                    },
                    "Value":{
                       "string":"Move"
                    }
                 }
              ]
           },
           "CustomAllocationData":{
              "Item":[
                 {
                    "Key":{
                       "string":"Grade"
                    },
                    "Value":{
                       "string":"002"
                    }
                 }
              ]
           }
        },
        {
           "ExtWarehouseId":"Warehouse2",
            "CustomData":{
              "Item":[
                 {
                    "Key":{
                       "string":"Type"
                    },
                    "Value":{
                       "string":"Move"
                    }
                 }
              ]
           },
           "CustomAllocationData":{
              "Item":[
                 {
                    "Key":{
                       "string":"Grade"
                    },
                    "Value":{
                       "string":"002"
                    }
                 }
              ]
           }
        }
     ]
    }
  }
  }`

Now , i tried to add in GoodsReceivalLine array a random UUID TransactionId as a first elemet of my JSON array  So that my Json would be :

 `{
 "ImportOperation":{
  "Lines":{
     "GoodsReceivalLine":[
        {
           "TransactionId":"RAndom UUID VAlue",
           "ExtWarehouseId":"Warehouse1",
             "CustomData":{
              "Item":[
                 {
                    "Key":{
                       "string":"Type"
                    },
                    "Value":{
                       "string":"Move"
                    }
                 }
              ]
           },
           "CustomAllocationData":{
              "Item":[
                 {
                    "Key":{
                       "string":"Grade"
                    },
                    "Value":{
                       "string":"002"
                    }
                 }
              ]
           }
        },
        {
           "TransactionId":"RAndom UUID VAlue",
           "ExtWarehouseId":"Warehouse2",
            "CustomData":{
              "Item":[
                 {
                    "Key":{
                       "string":"Type"
                    },
                    "Value":{
                       "string":"Move"
                    }
                 }
              ]
           },
           "CustomAllocationData":{
              "Item":[
                 {
                    "Key":{
                       "string":"Grade"
                    },
                    "Value":{
                       "string":"002"
                    }
                 }
              ]
           }
        }
     ]
    }
    }
  }
  `

For this i tried this code that works and generates my TransactionId properly but get the order of my Json as not expectedand very random order  :

          `JSONObject inputJo = new JSONObject((String)globalMap.get("row1.body"));
         JSONObject impOpJo = inputJo.getJSONObject("ImportOperation");
         JSONObject linesJo = impOpJo.getJSONObject("Lines");
         JSONArray goodsRecJa = linesJo.getJSONArray("GoodsReceivalLine");

         for(int i = 0; i<goodsRecJa.length(); i++){
         JSONObject tmpObj = goodsRecJa.getJSONObject(i);
         tmpObj.put("TransactionId",  java.util.UUID.randomUUID().toString()) ;
         }
         System.out.println("*** Body  : "+inputJo.toString()); `

Where i'm i mistaking and how could i correct that , is my loop not correct ? please i'm stack with that


问:
No logout button on togglz console
The togglz console has no logout button. Is it possible to add one?

context: I have an api secured with keycloak, i've added togglz console, which means i had to create a separate securityconfig with an order prior to keycloak's config.

TogglzSecurityConfig a simple inmemoryAuthentication ORDER(1)

KeycloakSecurityConfig ORDER(2)

Everything is working fine but once i'm connected to the console, there is no way to logout.

Title: No logout button on togglz console


问:
how to encrypt using a private key
I have a Private key file that looks like this

-----BEGIN PRIVATE KEY-----
[content]
-----END PRIVATE KEY-----

i want to encrypt String data using this key

i am trying like this :

```<code>fun encryptData(txt: String, pk: String): String {
    var encoded = ""
    var encrypted: ByteArray? = null
    try {
        val publicBytes: ByteArray = Base64.decode(pk, Base64.DEFAULT)
        val keySpec = X509EncodedKeySpec(publicBytes)
        val keyFactory: KeyFactory = KeyFactory.getInstance("RSA")
        val pubKey: PrivateKey = keyFactory.generatePrivate(keySpec)
        val cipher: Cipher = Cipher.getInstance("RSA/ECB/PKCS1PADDING")
        cipher.init(Cipher.ENCRYPT_MODE, pubKey)
        encrypted = cipher.doFinal(txt.toByteArray())
        encoded = Base64.encodeToString(encrypted, Base64.DEFAULT)
    } catch (e: Exception) {
        e.printStackTrace()
    }
    return encoded
}
</code>```

i am getting a InvalidKeySpecException everytime i try to encode

```<code>can someone help ?
</code>```

Title: how to encrypt using a private key

Body:
I have a Private key file that looks like this

-----BEGIN PRIVATE KEY-----
[content]
-----END PRIVATE KEY-----

i want to encrypt String data using this key

i am trying like this :

fun encryptData(txt: String, pk: String): String {
    var encoded = ""
    var encrypted: ByteArray? = null
    try {
        val publicBytes: ByteArray = Base64.decode(pk, Base64.DEFAULT)
        val keySpec = X509EncodedKeySpec(publicBytes)
        val keyFactory: KeyFactory = KeyFactory.getInstance("RSA")
        val pubKey: PrivateKey = keyFactory.generatePrivate(keySpec)
        val cipher: Cipher = Cipher.getInstance("RSA/ECB/PKCS1PADDING")
        cipher.init(Cipher.ENCRYPT_MODE, pubKey)
        encrypted = cipher.doFinal(txt.toByteArray())
        encoded = Base64.encodeToString(encrypted, Base64.DEFAULT)
    } catch (e: Exception) {
        e.printStackTrace()
    }
    return encoded
}

i am getting a InvalidKeySpecException everytime i try to encode

can someone help ?


问:
Deeplink to Google Map Street View but it keep spinning
I have a simple deeplink into Google Map Street View

```<code>class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        findViewById<Button>(R.id.launch_street_view_button).setOnClickListener {
            val gmmIntentUri = Uri.parse("google.streetview:cbll=46.414382,10.013988")

            val mapIntent = Intent(Intent.ACTION_VIEW, gmmIntentUri)
            mapIntent.setPackage("com.google.android.apps.maps")

            startActivity(mapIntent)
        }
    }
}
</code>```

(note: the sample code of deeplink came from Google Document at https://developers.google.com/maps/documentation/urls/android-intents#kotlin_16)

You can also get the full project code here

When I have an old Google Map (version 11.29.7 (#1066493137)), the deeplink into Street View works just fine as per GIF below

However with the latest Google Map (version 11.57.4801 (#1066791007)), the deeplink into Street View just keep spinning forever as GIF below (for the GIF below I cut off after 10 seconds, but even if I waited for a long period, it keep spinning)

Is this a Google Bug? Or do we need to do something differently in our code for our Intent to get the Street View load working?

p/s: I use the same Pixel 4 device and the same compilation of the Android Code. The only change is I

update the Google Map (to version 11.57.4801) - by updating it from Google Play and

downgrade the Google Map (to version 11.29.7) - by uninstalling it in Google Play.

Body:
I have a simple deeplink into Google Map Street View

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        findViewById<Button>(R.id.launch_street_view_button).setOnClickListener {
            val gmmIntentUri = Uri.parse("google.streetview:cbll=46.414382,10.013988")

            val mapIntent = Intent(Intent.ACTION_VIEW, gmmIntentUri)
            mapIntent.setPackage("com.google.android.apps.maps")

            startActivity(mapIntent)
        }
    }
}

(note: the sample code of deeplink came from Google Document at https://developers.google.com/maps/documentation/urls/android-intents#kotlin_16)

You can also get the full project code here

When I have an old Google Map (version 11.29.7 (#1066493137)), the deeplink into Street View works just fine as per GIF below

However with the latest Google Map (version 11.57.4801 (#1066791007)), the deeplink into Street View just keep spinning forever as GIF below (for the GIF below I cut off after 10 seconds, but even if I waited for a long period, it keep spinning)

Is this a Google Bug? Or do we need to do something differently in our code for our Intent to get the Street View load working?

p/s: I use the same Pixel 4 device and the same compilation of the Android Code. The only change is I

update the Google Map (to version 11.57.4801) - by updating it from Google Play and

downgrade the Google Map (to version 11.29.7) - by uninstalling it in Google Play.


问:
I need a function or API which convert React Js code into plain Js code
I am building a simple HTML, CSS, and JS editor but I want the user to write react in it.
It should be done with any function or API,
I have tried Esbuild transform Api

```<code>const onClick = async () => {
  const service = await esbuild.initialize({
      worker: true,
      wasmURL: "/esbuild.wasm/esbuild.wasm",
    }).then(() => {
        esbuild.transform(templateJs, {
          loader: "jsx",
          target: "es2015",
        }).then((result) => {
            console.log(result.code);
            setCode(result.code);
          });
      });
}
</code>```

and it is giving me error

Uncaught (in promise) CompileError: WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 44 4f @+0

or

CompileError: WebAssembly.compile()

In short I just want a simple function or API which convert :

```<code>class Button extends React.Component {
  constructor() {
    super();
    this.state = {
      count: 0,
    };
  }

  updateCount() {
    this.setState((prevState, props) => {
      return { count: prevState.count + 1 }
    });
  }

  render() {
    return (<button
      onClick={() => this.updateCount()}
    >
      Clicked {this.state.count} times
    </button>);
  }
}

React.render(<Button />, document.getElementById('app'));
</code>```

this react code into simple JS

Body:
I am building a simple HTML, CSS, and JS editor but I want the user to write react in it.
It should be done with any function or API,
I have tried Esbuild transform Api

const onClick = async () => {
  const service = await esbuild.initialize({
      worker: true,
      wasmURL: "/esbuild.wasm/esbuild.wasm",
    }).then(() => {
        esbuild.transform(templateJs, {
          loader: "jsx",
          target: "es2015",
        }).then((result) => {
            console.log(result.code);
            setCode(result.code);
          });
      });
}

and it is giving me error

Uncaught (in promise) CompileError: WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 44 4f @+0

or

CompileError: WebAssembly.compile()

In short I just want a simple function or API which convert :

class Button extends React.Component {
  constructor() {
    super();
    this.state = {
      count: 0,
    };
  }

  updateCount() {
    this.setState((prevState, props) => {
      return { count: prevState.count + 1 }
    });
  }

  render() {
    return (<button
      onClick={() => this.updateCount()}
    >
      Clicked {this.state.count} times
    </button>);
  }
}

React.render(<Button />, document.getElementById('app'));

this react code into simple JS


问:
GlassFish with Eclipse, Ping Connection Pool failed Keystore was tampered with, or password was incorrect
I know this question has been answered many times but none of these solutions work for me.

Environment Details

GlassFish Version: 5.0.1

JDK version: 1.8.0_202

OS: Windows 10

Database: MySQL 8.0.31.0

Problem Description

I have created this JDBC connection pool file bonecp-datasource.xml

```<code><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE resources PUBLIC "-//Sun Microsystems Inc.//DTD Application Server 9.0 Domain//EN" "*<install directory>/lib/dtds/sun-resources_1_3.dtd*">
<resources>
     <jdbc-connection-pool
          name="bonecpPool"
          datasource-classname="com.mysql.cj.jdbc.MysqlDataSource"
          transaction-isolation-level="read-committed"
          is-isolation-level-guaranteed="true"
          steady-pool-size="1"
          max-pool-size="20"
          res-type="javax.sql.DataSource"
     >
         <property name="poolName" value="BoneCPPool"/>
         <property name="driverClass" value="com.mysql.cj.jdbc.Driver"/>
         <property name="minConnectionsPerPartition" value="1"/>
         <property name="maxConnectionsPerPartition" value="20"/>
         <property name="acquireIncrement" value="2"/>
         <property name="partitionCount" value="1"/>
         <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/keendb?useSSL=false"/>
         <property name="user" value="java"/>
         <property name="password" value="keen1483"/>
         <property name="idleConnectionTestPeriodInMinutes" value="240"/>
         <property name="idleConnectionTestPeriodInSeconds" value="14400"/>
         <property name="idleMaxAgeInMinutes" value="60"/>
         <property name="idleMaxAgeInSeconds" value="3600"/>
         <property name="connectionTestStatement" value="/* ping *\/ SELECT 1"/>
         <property name="statementsCacheSize" value="0"/>
         <property name="releaseHelperThreads" value="3"/>
         <property name="closeConnectionWatch" value="false"/>
         <property name="logStatementsEnabled" value="false"/>
         <property name="acquireRetryDelayInMs" value="7000"/>
         <property name="lazyInit" value="false"/>
         <property name="transactionRecoveryEnabled" value="false"/>
         <property name="acquireRetryAttempts" value="5"/>
         <property name="disableJMX" value="false"/>
         <property name="queryExecuteTimeLimitInMs" value="0"/>
         <property name="poolAvailabilityThreshold" value="20"/>
         <property name="disableConnectionTracking" value="false"/>
         <property name="connectionTimeoutInMs" value="0"/>
         <property name="closeConnectionWatchTimeoutInMs" value="0"/>
         <property name="statementReleaseHelperThreads" value="0"/>
         <property name="maxConnectionAgeInSeconds" value="0"/>
         <property name="statisticsEnabled" value="false"/>
         <property name="externalAuth" value="false"/>
         <property name="deregisterDriverOnClose" value="false"/>
    </jdbc-connection-pool>
    <jdbc-resource enabled="true" jndi-name="jdbc/bonecp_resource" object-type="user" pool-name="bonecpPool"/>
</resources>
</code>```

I copied and pasted mysql-connector-j-8.0.31.jar in C:\glassfish\glassfish5\glassfish\lib and C:\glassfish\glassfish5\glassfish\domains\domain1\lib\ext

When I ping my bonecpPool pool, I get the following error
Ping Connection Pool failed for bonecpPool. Connection could not be allocated because: Cannot open file:C:\glassfish\glassfish5\glassfish\domains\domain1/config/keystore.jks [Keystore was tampered with, or password was incorrect] Please check the server.log for more details.

GlassFish Log

```<code>  RAR8054: Exception while creating an unpooled [test] connection for pool [ bonecpPool ], Connection could not be allocated because: Cannot open file:C:\glassfish\glassfish5\glassfish\domains\domain1/config/keystore.jks [Keystore was tampered with, or password was incorrect]]]

[2022-12-08T12:21:07.488+0100] [glassfish 5.0] [SEVERE] [] [org.glassfish.admingui] [tid: _ThreadID=132 _ThreadName=admin-listener(11)] [timeMillis: 1670498467488] [levelValue: 1000] [[
  RestResponse.getResponse() gives FAILURE.  endpoint = 'http://localhost:4848/management/domain/resources/ping-connection-pool.json'; attrs = '{id=bonecpPool}']]
</code>```

A capture of this error

Body:
I know this question has been answered many times but none of these solutions work for me.

Environment Details

GlassFish Version: 5.0.1

JDK version: 1.8.0_202

OS: Windows 10

Database: MySQL 8.0.31.0

Problem Description

I have created this JDBC connection pool file bonecp-datasource.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE resources PUBLIC "-//Sun Microsystems Inc.//DTD Application Server 9.0 Domain//EN" "*<install directory>/lib/dtds/sun-resources_1_3.dtd*">
<resources>
     <jdbc-connection-pool
          name="bonecpPool"
          datasource-classname="com.mysql.cj.jdbc.MysqlDataSource"
          transaction-isolation-level="read-committed"
          is-isolation-level-guaranteed="true"
          steady-pool-size="1"
          max-pool-size="20"
          res-type="javax.sql.DataSource"
     >
         <property name="poolName" value="BoneCPPool"/>
         <property name="driverClass" value="com.mysql.cj.jdbc.Driver"/>
         <property name="minConnectionsPerPartition" value="1"/>
         <property name="maxConnectionsPerPartition" value="20"/>
         <property name="acquireIncrement" value="2"/>
         <property name="partitionCount" value="1"/>
         <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/keendb?useSSL=false"/>
         <property name="user" value="java"/>
         <property name="password" value="keen1483"/>
         <property name="idleConnectionTestPeriodInMinutes" value="240"/>
         <property name="idleConnectionTestPeriodInSeconds" value="14400"/>
         <property name="idleMaxAgeInMinutes" value="60"/>
         <property name="idleMaxAgeInSeconds" value="3600"/>
         <property name="connectionTestStatement" value="/* ping *\/ SELECT 1"/>
         <property name="statementsCacheSize" value="0"/>
         <property name="releaseHelperThreads" value="3"/>
         <property name="closeConnectionWatch" value="false"/>
         <property name="logStatementsEnabled" value="false"/>
         <property name="acquireRetryDelayInMs" value="7000"/>
         <property name="lazyInit" value="false"/>
         <property name="transactionRecoveryEnabled" value="false"/>
         <property name="acquireRetryAttempts" value="5"/>
         <property name="disableJMX" value="false"/>
         <property name="queryExecuteTimeLimitInMs" value="0"/>
         <property name="poolAvailabilityThreshold" value="20"/>
         <property name="disableConnectionTracking" value="false"/>
         <property name="connectionTimeoutInMs" value="0"/>
         <property name="closeConnectionWatchTimeoutInMs" value="0"/>
         <property name="statementReleaseHelperThreads" value="0"/>
         <property name="maxConnectionAgeInSeconds" value="0"/>
         <property name="statisticsEnabled" value="false"/>
         <property name="externalAuth" value="false"/>
         <property name="deregisterDriverOnClose" value="false"/>
    </jdbc-connection-pool>
    <jdbc-resource enabled="true" jndi-name="jdbc/bonecp_resource" object-type="user" pool-name="bonecpPool"/>
</resources>

I copied and pasted mysql-connector-j-8.0.31.jar in C:\glassfish\glassfish5\glassfish\lib and C:\glassfish\glassfish5\glassfish\domains\domain1\lib\ext

When I ping my bonecpPool pool, I get the following error
Ping Connection Pool failed for bonecpPool. Connection could not be allocated because: Cannot open file:C:\glassfish\glassfish5\glassfish\domains\domain1/config/keystore.jks [Keystore was tampered with, or password was incorrect] Please check the server.log for more details.

GlassFish Log

  RAR8054: Exception while creating an unpooled [test] connection for pool [ bonecpPool ], Connection could not be allocated because: Cannot open file:C:\glassfish\glassfish5\glassfish\domains\domain1/config/keystore.jks [Keystore was tampered with, or password was incorrect]]]

[2022-12-08T12:21:07.488+0100] [glassfish 5.0] [SEVERE] [] [org.glassfish.admingui] [tid: _ThreadID=132 _ThreadName=admin-listener(11)] [timeMillis: 1670498467488] [levelValue: 1000] [[
  RestResponse.getResponse() gives FAILURE.  endpoint = 'http://localhost:4848/management/domain/resources/ping-connection-pool.json'; attrs = '{id=bonecpPool}']]

A capture of this error


问:
dragEnd() "losing" property when released (TypeError: cannot read property)
I seem to be hard stuck with this game. I tried to comment the relevant lines of code. It seems that the "src" of the images im dragging get "lost" when I drop the image into their new place.

```<code>    class PuzzleGame extends Game {
  constructor() {
    super();
    this.rows = 3;
    this.columns = 3;
    //current clicked image, other the one we swap with
    this.currTile;
    this.otherTile;
    this.turns = 0;
    this.imageOrder = [1, 2, 3, 4, 5, 6, 7, 8, 9];
    this.randomOrder = [];
  }
  populateBoard() {
    for (let r = 0; r < this.rows; r++) {
      for (let c = 0; c < this.columns; c++) {
        let tile = document.createElement("img");
        tile.id = r.toString() + "-" + c.toString();
        tile.src = "./images/" + this.randomOrder.shift() + ".png";
        // drag functions
        tile.addEventListener("dragstart", this.dragStart);
        tile.addEventListener("dragover", this.dragOver);
        tile.addEventListener("dragenter", this.dragEnter);
        tile.addEventListener("dragleave", this.dragLeave);
        tile.addEventListener("drop", this.dragDrop);
        tile.addEventListener("dragend", this.dragEnd);

        document.getElementById("board").append(tile);
      }
    }
  }
  _randomizeOrder() {
    if (!this.imageOrder) return undefined;
    this.randomOrder = this.imageOrder.sort(function () {
      return Math.random() - 0.5;
    });
    return this.randomOrder;
  }
  puzzleStart() {
    this._randomizeOrder();
    this.populateBoard();
  }
  dragStart() {
    this.currTile = this //image being dragged
    console.log(this) //logs img.id and img.src "/images/4.png"
    console.log(this.src)// logs file path users/xxxx/desktop/etc/4.png
  }
  dragOver(e) {
    e.preventDefault();
  }
  dragEnter(e) {
    e.preventDefault();
  }
  dragLeave() {}
  dragDrop() {
    this.otherTile = this; //image tile being dropped
    console.log(this.otherTile.src ) //logs file path users/xxxxx/desktop/etc/9.png
  }
  dragEnd() {
    let currImg = this.currTile.src;
    console.log(this.currTile) //logs currTile
    console.log(currImg); //logs file path
    let otherImg = this.otherTile.src; //Error on this line of code TypeError:cannot read properties of undefined (reading "src")
    this.currTile.src = otherImg;
    this.otherTile.src = currImg;
    console.log(this.otherTile)
  }
}```
```

Up to this point I think everything logs as expected, except when its time to switch "src"s between them two inside of dragEnd().

When executed dragEnd() keeps the .src of the first image (taken from dragstart), and when its time to dragDrop() this.otherTile still hast the .src. But when I release I get the error inside of dragEnd(), when its time to read the .src of this.otherTile.

I just hope this isnt another error because of spelling. But I dont understand why this.currTile keeps the src when picked and dropped and this.otherTile "loses" it when its time to change.

Thank you very much in advance!

Body:
I seem to be hard stuck with this game. I tried to comment the relevant lines of code. It seems that the "src" of the images im dragging get "lost" when I drop the image into their new place.

    class PuzzleGame extends Game {
  constructor() {
    super();
    this.rows = 3;
    this.columns = 3;
    //current clicked image, other the one we swap with
    this.currTile;
    this.otherTile;
    this.turns = 0;
    this.imageOrder = [1, 2, 3, 4, 5, 6, 7, 8, 9];
    this.randomOrder = [];
  }
  populateBoard() {
    for (let r = 0; r < this.rows; r++) {
      for (let c = 0; c < this.columns; c++) {
        let tile = document.createElement("img");
        tile.id = r.toString() + "-" + c.toString();
        tile.src = "./images/" + this.randomOrder.shift() + ".png";
        // drag functions
        tile.addEventListener("dragstart", this.dragStart);
        tile.addEventListener("dragover", this.dragOver);
        tile.addEventListener("dragenter", this.dragEnter);
        tile.addEventListener("dragleave", this.dragLeave);
        tile.addEventListener("drop", this.dragDrop);
        tile.addEventListener("dragend", this.dragEnd);

        document.getElementById("board").append(tile);
      }
    }
  }
  _randomizeOrder() {
    if (!this.imageOrder) return undefined;
    this.randomOrder = this.imageOrder.sort(function () {
      return Math.random() - 0.5;
    });
    return this.randomOrder;
  }
  puzzleStart() {
    this._randomizeOrder();
    this.populateBoard();
  }
  dragStart() {
    this.currTile = this //image being dragged
    console.log(this) //logs img.id and img.src "/images/4.png"
    console.log(this.src)// logs file path users/xxxx/desktop/etc/4.png
  }
  dragOver(e) {
    e.preventDefault();
  }
  dragEnter(e) {
    e.preventDefault();
  }
  dragLeave() {}
  dragDrop() {
    this.otherTile = this; //image tile being dropped
    console.log(this.otherTile.src ) //logs file path users/xxxxx/desktop/etc/9.png
  }
  dragEnd() {
    let currImg = this.currTile.src;
    console.log(this.currTile) //logs currTile
    console.log(currImg); //logs file path
    let otherImg = this.otherTile.src; //Error on this line of code TypeError:cannot read properties of undefined (reading "src")
    this.currTile.src = otherImg;
    this.otherTile.src = currImg;
    console.log(this.otherTile)
  }
}```

Up to this point I think everything logs as expected, except when its time to switch "src"s between them two inside of dragEnd().

When executed dragEnd() keeps the .src of the first image (taken from dragstart), and when its time to dragDrop() this.otherTile still hast the .src. But when I release I get the error inside of dragEnd(), when its time to read the .src of this.otherTile.

I just hope this isnt another error because of spelling. But I dont understand why this.currTile keeps the src when picked and dropped and this.otherTile "loses" it when its time to change.

Thank you very much in advance!


问:
pg_rewind succeed but postgresql showing error when trying to make standby with common ancestor
Have 3 node setup: node1(50.2), node2(50.3) and node3(50.4). node1(50.2) is primary and node2(50.3) and node3(50.4) are standby. I promoted node2 and node3 to make them independent. When i try to make the node3 slave of node2, using pg_rewind, it says below:

```<code>pg_rewind: connected to server
pg_rewind: source and target cluster are on the same timeline
pg_rewind: no rewind required
</code>```

After this, when i start postgresql on the node3 in standby mode, i get below:

```<code>Dec 09 04:19:40 fsrstandby.for.com postmaster[6054]: 2022-12-09 04:19:40 UTCLOG:  entering standby mode
Dec 09 04:19:40 fsrstandby.for.com postmaster[6054]: 2022-12-09 04:19:40 UTCLOG:  consistent recovery state reached
at 0/35EFB738
Dec 09 04:19:40 fsrstandby.for.com postmaster[6054]: 2022-12-09 04:19:40 UTCLOG:  invalid record length at 0/35EFB738: wanted 24, got 0
Dec 09 04:19:40 fsrstandby.for.com postmaster[6053]: 2022-12-09 04:19:40 UTCLOG:  database system is ready to accept read-only connections
Dec 09 04:19:40 fsrstandby.for.com systemd[1]: Started PostgreSQL 14 database server.
Dec 09 04:19:40 fsrstandby.for.com postmaster[6058]: 2022-12-09 04:19:40 UTCLOG:  started streaming WAL from primary at 0/35000000 on timeline 2
Dec 09 04:19:40 fsrstandby.for.com postmaster[6058]: 2022-12-09 04:19:40 UTCFATAL:  could not receive data from WAL
stream: ERROR:  requested starting point 0/35000000 is ahead of the WAL flush position of this server 0/2F12A7D8
Dec 09 04:19:40 fsrstandby.for.com postmaster[6061]: 2022-12-09 04:19:40 UTCLOG:  started streaming WAL from primary at 0/35000000 on timeline 2
Dec 09 04:19:40 fsrstandby.for.com postmaster[6061]: 2022-12-09 04:19:40 UTCFATAL:  could not receive data from WAL
stream: ERROR:  requested starting point 0/35000000 is ahead of the WAL flush position of this server 0/2F12A7D8
Dec 09 04:19:45 fsrstandby.for.com postmaster[6075]: 2022-12-09 04:19:45 UTCLOG:  started streaming WAL from primary at 0/35000000 on timeline 2
Dec 09 04:19:45 fsrstandby.for.com postmaster[6075]: 2022-12-09 04:19:45 UTCFATAL:  could not receive data from WAL
stream: ERROR:  requested starting point 0/35000000 is ahead of the WAL flush position of this server 0/2F13D5B8
Dec 09 04:19:50 fsrstandby.for.com postmaster[6636]: 2022-12-09 04:19:50 UTCLOG:  started streaming WAL from primary at 0/35000000 on timeline 2
Dec 09 04:19:50 fsrstandby.for.com postmaster[6636]: 2022-12-09 04:19:50 UTCFATAL:  could not receive data from WAL
stream: ERROR:  requested starting point 0/35000000 is ahead of the WAL flush position of this server 0/2F13D5F0
Dec 09 04:19:55 fsrstandby.for.com postmaster[6886]: 2022-12-09 04:19:55 UTCLOG:  started streaming WAL from primary at 0/35000000 on timeline 2
Dec 09 04:19:55 fsrstandby.for.com postmaster[6886]: 2022-12-09 04:19:55 UTCFATAL:  could not receive data from WAL
stream: ERROR:  requested starting point 0/35000000 is ahead of the WAL flush position of this server 0/2F13D5F0
Dec 09 04:19:57 fsrstandby.for.com postmaster[6053]: 2022-12-09 04:19:57 UTCLOG:  received fast shutdown request
Dec 09 04:19:57 fsrstandby.for.com systemd[1]: Stopping PostgreSQL 14 database server...
Dec 09 04:19:57 fsrstandby.for.com postmaster[6053]: 2022-12-09 04:19:57 UTCLOG:  aborting any active transactions
Dec 09 04:19:57 fsrstandby.for.com postmaster[6055]: 2022-12-09 04:19:57 UTCLOG:  shutting down
Dec 09 04:19:57 fsrstandby.for.com postmaster[6053]: 2022-12-09 04:19:57 UTCLOG:  database system is shut down
Dec 09 04:19:57 fsrstandby.for.com systemd[1]: postgresql-14.service: Succeeded.
Dec 09 04:19:57 fsrstandby.for.com systemd[1]: Stopped PostgreSQL 14 database server.
Dec 09 04:20:05 fsrstandby.for.com systemd[1]: Starting PostgreSQL 14 database server...
Dec 09 04:20:05 fsrstandby.for.com postmaster[7177]: 2022-12-09 04:20:05 UTCLOG:  starting PostgreSQL 14.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10), 64-bit
Dec 09 04:20:05 fsrstandby.for.com postmaster[7177]: 2022-12-09 04:20:05 UTCLOG:  listening on IPv4 address "0.0.0.0", port 5432
Dec 09 04:20:05 fsrstandby.for.com postmaster[7177]: 2022-12-09 04:20:05 UTCLOG:  listening on IPv6 address "::", port 5432
Dec 09 04:20:05 fsrstandby.for.com postmaster[7177]: 2022-12-09 04:20:05 UTCLOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
Dec 09 04:20:05 fsrstandby.for.com postmaster[7177]: 2022-12-09 04:20:05 UTCLOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
Dec 09 04:20:05 fsrstandby.for.com postmaster[7177]: postmaster: could not write external PID file "/var/run/14-data.pid": Permission denied
Dec 09 04:20:05 fsrstandby.for.com postmaster[7196]: 2022-12-09 04:20:05 UTCLOG:  database system was shut down in recovery at 2022-12-09 04:19:57 UTC
Dec 09 04:20:05 fsrstandby.for.com postmaster[7196]: 2022-12-09 04:20:05 UTCLOG:  entering standby mode
Dec 09 04:20:05 fsrstandby.for.com postmaster[7196]: 2022-12-09 04:20:05 UTCLOG:  consistent recovery state reached
at 0/35EFB738
Dec 09 04:20:05 fsrstandby.for.com postmaster[7196]: 2022-12-09 04:20:05 UTCLOG:  invalid record length at 0/35EFB738: wanted 24, got 0
Dec 09 04:20:05 fsrstandby.for.com postmaster[7177]: 2022-12-09 04:20:05 UTCLOG:  database system is ready to accept read-only connections
Dec 09 04:20:05 fsrstandby.for.com systemd[1]: Started PostgreSQL 14 database server.
Dec 09 04:20:05 fsrstandby.for.com postmaster[7200]: 2022-12-09 04:20:05 UTCLOG:  started streaming WAL from primary at 0/35000000 on timeline 2
Dec 09 04:20:05 fsrstandby.for.com postmaster[7200]: 2022-12-09 04:20:05 UTCFATAL:  could not receive data from WAL
stream: ERROR:  requested starting point 0/35000000 is ahead of the WAL flush position of this server 0/2F13D5F0
Dec 09 04:20:05 fsrstandby.for.com postmaster[7217]: 2022-12-09 04:20:05 UTCLOG:  started streaming WAL from primary at 0/35000000 on timeline 2
Dec 09 04:20:05 fsrstandby.for.com postmaster[7217]: 2022-12-09 04:20:05 UTCFATAL:  could not receive data from WAL
stream: ERROR:  requested starting point 0/35000000 is ahead of the WAL flush position of this server 0/2F13D5F0
Dec 09 04:20:20 fsrstandby.for.com postmaster[7477]: 2022-12-09 04:20:20 UTCLOG:  started streaming WAL from primary at 0/35000000 on timeline 2
Dec 09 04:20:20 fsrstandby.for.com postmaster[7477]: 2022-12-09 04:20:20 UTCFATAL:  could not receive data from WAL
stream: ERROR:  requested starting point 0/35000000 is ahead of the WAL flush position of this server 0/2F13F3D0

</code>```

Is pg_basebackup only solution to form the standby for node3 with node2? How to use pg_rewind in the case where both the node from common ancestor?

Body:
Have 3 node setup: node1(50.2), node2(50.3) and node3(50.4). node1(50.2) is primary and node2(50.3) and node3(50.4) are standby. I promoted node2 and node3 to make them independent. When i try to make the node3 slave of node2, using pg_rewind, it says below:

pg_rewind: connected to server
pg_rewind: source and target cluster are on the same timeline
pg_rewind: no rewind required

After this, when i start postgresql on the node3 in standby mode, i get below:

Dec 09 04:19:40 fsrstandby.for.com postmaster[6054]: 2022-12-09 04:19:40 UTCLOG:  entering standby mode
Dec 09 04:19:40 fsrstandby.for.com postmaster[6054]: 2022-12-09 04:19:40 UTCLOG:  consistent recovery state reached
at 0/35EFB738
Dec 09 04:19:40 fsrstandby.for.com postmaster[6054]: 2022-12-09 04:19:40 UTCLOG:  invalid record length at 0/35EFB738: wanted 24, got 0
Dec 09 04:19:40 fsrstandby.for.com postmaster[6053]: 2022-12-09 04:19:40 UTCLOG:  database system is ready to accept read-only connections
Dec 09 04:19:40 fsrstandby.for.com systemd[1]: Started PostgreSQL 14 database server.
Dec 09 04:19:40 fsrstandby.for.com postmaster[6058]: 2022-12-09 04:19:40 UTCLOG:  started streaming WAL from primary at 0/35000000 on timeline 2
Dec 09 04:19:40 fsrstandby.for.com postmaster[6058]: 2022-12-09 04:19:40 UTCFATAL:  could not receive data from WAL
stream: ERROR:  requested starting point 0/35000000 is ahead of the WAL flush position of this server 0/2F12A7D8
Dec 09 04:19:40 fsrstandby.for.com postmaster[6061]: 2022-12-09 04:19:40 UTCLOG:  started streaming WAL from primary at 0/35000000 on timeline 2
Dec 09 04:19:40 fsrstandby.for.com postmaster[6061]: 2022-12-09 04:19:40 UTCFATAL:  could not receive data from WAL
stream: ERROR:  requested starting point 0/35000000 is ahead of the WAL flush position of this server 0/2F12A7D8
Dec 09 04:19:45 fsrstandby.for.com postmaster[6075]: 2022-12-09 04:19:45 UTCLOG:  started streaming WAL from primary at 0/35000000 on timeline 2
Dec 09 04:19:45 fsrstandby.for.com postmaster[6075]: 2022-12-09 04:19:45 UTCFATAL:  could not receive data from WAL
stream: ERROR:  requested starting point 0/35000000 is ahead of the WAL flush position of this server 0/2F13D5B8
Dec 09 04:19:50 fsrstandby.for.com postmaster[6636]: 2022-12-09 04:19:50 UTCLOG:  started streaming WAL from primary at 0/35000000 on timeline 2
Dec 09 04:19:50 fsrstandby.for.com postmaster[6636]: 2022-12-09 04:19:50 UTCFATAL:  could not receive data from WAL
stream: ERROR:  requested starting point 0/35000000 is ahead of the WAL flush position of this server 0/2F13D5F0
Dec 09 04:19:55 fsrstandby.for.com postmaster[6886]: 2022-12-09 04:19:55 UTCLOG:  started streaming WAL from primary at 0/35000000 on timeline 2
Dec 09 04:19:55 fsrstandby.for.com postmaster[6886]: 2022-12-09 04:19:55 UTCFATAL:  could not receive data from WAL
stream: ERROR:  requested starting point 0/35000000 is ahead of the WAL flush position of this server 0/2F13D5F0
Dec 09 04:19:57 fsrstandby.for.com postmaster[6053]: 2022-12-09 04:19:57 UTCLOG:  received fast shutdown request
Dec 09 04:19:57 fsrstandby.for.com systemd[1]: Stopping PostgreSQL 14 database server...
Dec 09 04:19:57 fsrstandby.for.com postmaster[6053]: 2022-12-09 04:19:57 UTCLOG:  aborting any active transactions
Dec 09 04:19:57 fsrstandby.for.com postmaster[6055]: 2022-12-09 04:19:57 UTCLOG:  shutting down
Dec 09 04:19:57 fsrstandby.for.com postmaster[6053]: 2022-12-09 04:19:57 UTCLOG:  database system is shut down
Dec 09 04:19:57 fsrstandby.for.com systemd[1]: postgresql-14.service: Succeeded.
Dec 09 04:19:57 fsrstandby.for.com systemd[1]: Stopped PostgreSQL 14 database server.
Dec 09 04:20:05 fsrstandby.for.com systemd[1]: Starting PostgreSQL 14 database server...
Dec 09 04:20:05 fsrstandby.for.com postmaster[7177]: 2022-12-09 04:20:05 UTCLOG:  starting PostgreSQL 14.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10), 64-bit
Dec 09 04:20:05 fsrstandby.for.com postmaster[7177]: 2022-12-09 04:20:05 UTCLOG:  listening on IPv4 address "0.0.0.0", port 5432
Dec 09 04:20:05 fsrstandby.for.com postmaster[7177]: 2022-12-09 04:20:05 UTCLOG:  listening on IPv6 address "::", port 5432
Dec 09 04:20:05 fsrstandby.for.com postmaster[7177]: 2022-12-09 04:20:05 UTCLOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
Dec 09 04:20:05 fsrstandby.for.com postmaster[7177]: 2022-12-09 04:20:05 UTCLOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
Dec 09 04:20:05 fsrstandby.for.com postmaster[7177]: postmaster: could not write external PID file "/var/run/14-data.pid": Permission denied
Dec 09 04:20:05 fsrstandby.for.com postmaster[7196]: 2022-12-09 04:20:05 UTCLOG:  database system was shut down in recovery at 2022-12-09 04:19:57 UTC
Dec 09 04:20:05 fsrstandby.for.com postmaster[7196]: 2022-12-09 04:20:05 UTCLOG:  entering standby mode
Dec 09 04:20:05 fsrstandby.for.com postmaster[7196]: 2022-12-09 04:20:05 UTCLOG:  consistent recovery state reached
at 0/35EFB738
Dec 09 04:20:05 fsrstandby.for.com postmaster[7196]: 2022-12-09 04:20:05 UTCLOG:  invalid record length at 0/35EFB738: wanted 24, got 0
Dec 09 04:20:05 fsrstandby.for.com postmaster[7177]: 2022-12-09 04:20:05 UTCLOG:  database system is ready to accept read-only connections
Dec 09 04:20:05 fsrstandby.for.com systemd[1]: Started PostgreSQL 14 database server.
Dec 09 04:20:05 fsrstandby.for.com postmaster[7200]: 2022-12-09 04:20:05 UTCLOG:  started streaming WAL from primary at 0/35000000 on timeline 2
Dec 09 04:20:05 fsrstandby.for.com postmaster[7200]: 2022-12-09 04:20:05 UTCFATAL:  could not receive data from WAL
stream: ERROR:  requested starting point 0/35000000 is ahead of the WAL flush position of this server 0/2F13D5F0
Dec 09 04:20:05 fsrstandby.for.com postmaster[7217]: 2022-12-09 04:20:05 UTCLOG:  started streaming WAL from primary at 0/35000000 on timeline 2
Dec 09 04:20:05 fsrstandby.for.com postmaster[7217]: 2022-12-09 04:20:05 UTCFATAL:  could not receive data from WAL
stream: ERROR:  requested starting point 0/35000000 is ahead of the WAL flush position of this server 0/2F13D5F0
Dec 09 04:20:20 fsrstandby.for.com postmaster[7477]: 2022-12-09 04:20:20 UTCLOG:  started streaming WAL from primary at 0/35000000 on timeline 2
Dec 09 04:20:20 fsrstandby.for.com postmaster[7477]: 2022-12-09 04:20:20 UTCFATAL:  could not receive data from WAL
stream: ERROR:  requested starting point 0/35000000 is ahead of the WAL flush position of this server 0/2F13F3D0

Is pg_basebackup only solution to form the standby for node3 with node2? How to use pg_rewind in the case where both the node from common ancestor?


问:
How to compare a model with n two-way interactions with the main effects model, to check its significance
I have to check a model with n two-way interaction and compare one-by-one interaction with the main effect model.

In short, I need to do it 73times, the number of possible interactions, to check its significance, until I've checked all the possible combination and compare the models using LR test.

```<code>model1=glm(y~x1+x2+x3+x4+...x23)
model2=glm(y~x1+x2+x3+x4+x1*x2)
model3=glm(y~x1+x2+x3+x4+x1*x3)
...
model73=glm(y~x1+x2+x3+x4+x22*x23)
lrtest(model1,model2)
lrtest(model1,model3)
...
lrtest(model1,model73)
</code>```

I imagined a for but I don't know how to formulate

Body:
I have to check a model with n two-way interaction and compare one-by-one interaction with the main effect model.

In short, I need to do it 73times, the number of possible interactions, to check its significance, until I've checked all the possible combination and compare the models using LR test.

model1=glm(y~x1+x2+x3+x4+...x23)
model2=glm(y~x1+x2+x3+x4+x1*x2)
model3=glm(y~x1+x2+x3+x4+x1*x3)
...
model73=glm(y~x1+x2+x3+x4+x22*x23)
lrtest(model1,model2)
lrtest(model1,model3)
...
lrtest(model1,model73)

I imagined a for but I don't know how to formulate


问:
Correct way to use ExtendedClientConfiguration for Amazon SQS
Dependencies:
`

```<code><dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-config</artifactId>
            <version>3.0.5</version>
        </dependency>

        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>amazon-sqs-java-extended-client-lib</artifactId>
            <version>2.0.2</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>ses</artifactId>
            <version>2.18.28</version>
        </dependency>
         <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-aws</artifactId>
            <version>2.2.6.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-aws-messaging</artifactId>
            <version>2.2.6.RELEASE</version>
        </dependency>
</code>```

On listening to SQS Queue getting below error:

```<code>ExtendedClientConfiguration for SQS is throwing error at

at org.springframework.cloud.aws.messaging.core.QueueMessageUtils.getNumberValue(QueueMessageUtils.java:117)
</code>```

and I tried to override the attributes and getting error as we cant override values for reserved attributes

I did research and there are suggestion to upgrade to

```<code>io.awspring.cloud
</code>```

But there are a lot of issues with it, unable to use @SqsListener and even if it is showing messages are in flight but on the receiver end it is showing the message size is 0 and unable to read messages. and on triggering sqs listener messages are in flight mode and getting vanished and not able to read messages

and if we send a custom object to the sqs queue it is modifying empty values to default values.

Please suggest right set of dependencies and how to overcome above issues with AWS SQS

I tried updating the jars, but it has its own issues

Body:
Dependencies:
`

<dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-config</artifactId>
            <version>3.0.5</version>
        </dependency>

        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>amazon-sqs-java-extended-client-lib</artifactId>
            <version>2.0.2</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>ses</artifactId>
            <version>2.18.28</version>
        </dependency>
         <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-aws</artifactId>
            <version>2.2.6.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-aws-messaging</artifactId>
            <version>2.2.6.RELEASE</version>
        </dependency>

On listening to SQS Queue getting below error:

ExtendedClientConfiguration for SQS is throwing error at

at org.springframework.cloud.aws.messaging.core.QueueMessageUtils.getNumberValue(QueueMessageUtils.java:117)

and I tried to override the attributes and getting error as we cant override values for reserved attributes

I did research and there are suggestion to upgrade to

io.awspring.cloud

But there are a lot of issues with it, unable to use @SqsListener and even if it is showing messages are in flight but on the receiver end it is showing the message size is 0 and unable to read messages. and on triggering sqs listener messages are in flight mode and getting vanished and not able to read messages

and if we send a custom object to the sqs queue it is modifying empty values to default values.

Please suggest right set of dependencies and how to overcome above issues with AWS SQS

I tried updating the jars, but it has its own issues