问:
Transforming circle from vertex data into screen space LWJGL
I have some code that can draw a circle to the screen using LWJGL (OpenGL). However this code outputs a circle in clip space. The application of the code will be used for particle physics type simulations where multiples circles will need to be drawn at specific spots on the screen.

I attempted to use model, view, and projection matrices to transform the vertex data from object space to screen space in the vertex shaders however when implemented the circle stops showing on the screen. The vertex data is normalized and spans from -1 to 1.

I would like to be able to have a code that can draw any size of circle anywhere on the screen however right now the circle just spans the width and height of the screen.

Here is how the circle looks when the model, view, and projection matrices are not implemented in the vertex shaders.
Object space circle

Here is what is displayed when i implement the model, view, and projection matrix into the vertex shader.
Screen space "Circle"

The matrix that is passed to the vertex shader is the product of the model, view, and projection matrix and has these values which are multiplied by the position vector which gets stored under gl_Position:

[0.75, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.002002, -0.0, 0.0, 0.0, -0.0, 0.0]

Here is my shader program:

```<code>private int createShaderProgram() {
    // Vertex shader source code
    //"//uniform mat4 modelViewProjectionMatrix;\n" +
    //modelViewProjectionMatrix *
    //"    texCoord = (position - center) / size;\n"
    //"uniform vec2 center;\n" +
    //"uniform float size;\n" +
    String vertexShaderSource =
            "#version 330 core\n" +
                    "\n" +
                    "// Input vertex data, different for all executions of this shader.\n" +
                    "layout (location = 0) in vec2 position;\n" +
                    "\n" +
                    "// Output data\n" +
                    "out vec2 texCoord;\n" +
                    "\n" +
                    "uniform mat4 modelViewProjectionMatrix;\n"+
                    "\n" +
                    "void main()\n" +
                    "{\n" +
                    "    // Calculate the texture coordinates of the vertex\n" +
                    "    texCoord = position;\n" +
                    "\n" +
                    "    // Map the vertex position to the clip space\n" +
                    "    gl_Position = modelViewProjectionMatrix*vec4(position, 0.0, 1.0);\n" +
                    "}\n";

    // Fragment shader source code
    String fragmentShaderSource =
            "#version 330 core\n" +
                    "\n" +
                    "// Interpolated values from the vertex shaders\n" +
                    "in vec2 texCoord;\n" +
                    "\n" +
                    "// Output color\n" +
                    "out vec4 color;\n" +
                    "\n" +
                    "uniform vec2 viewport;\n" +
                    "\n" +
                    "void main()\n" +
                    "{\n" +
                    "    // Map the texture coordinates to the screen space\n" +
                    "    vec2 screenCoord = texCoord * viewport;\n" +
                    "\n" +
                    "    // Calculate the color using the texture coordinates\n" +
                    "    color = vec4(abs(texCoord.x), abs(texCoord.y), abs(texCoord.x)*0.5+abs(texCoord.y), 1.0);\n" +
                    "\n" +
                    "    // Discard fragments outside the circle\n" +
                    "    if (length(screenCoord) > viewport.x)\n" +
                    "        discard;\n" +
                    "}\n";

    // Create the vertex shader
    int vertexShader = GL20.glCreateShader(GL20.GL_VERTEX_SHADER);
    GL20.glShaderSource(vertexShader, vertexShaderSource);
    GL20.glCompileShader(vertexShader);

    // Check for errors
    int status = GL20.glGetShaderi(vertexShader, GL20.GL_COMPILE_STATUS);
    if (status != GL11.GL_TRUE) {
        throw new RuntimeException(GL20.glGetShaderInfoLog(vertexShader));
    }

    // Create the fragment shader
    int fragmentShader = GL20.glCreateShader(GL20.GL_FRAGMENT_SHADER);
    GL20.glShaderSource(fragmentShader, fragmentShaderSource);
    GL20.glCompileShader(fragmentShader);

    // Check for errors
    status = GL20.glGetShaderi(fragmentShader, GL20.GL_COMPILE_STATUS);
    if (status != GL11.GL_TRUE) {
        throw new RuntimeException(GL20.glGetShaderInfoLog(fragmentShader));
    }

    // Create the shader program
    int program = GL20.glCreateProgram();
    GL20.glAttachShader(program, vertexShader);
    GL20.glAttachShader(program, fragmentShader);
    GL20.glLinkProgram(program);

    // Check for errors
    status = GL20.glGetProgrami(program, GL20.GL_LINK_STATUS);
    if (status != GL11.GL_TRUE) {
        throw new RuntimeException(GL20.glGetProgramInfoLog(program));
    }

    // Delete the shaders
    GL20.glDeleteShader(vertexShader);
    GL20.glDeleteShader(fragmentShader);

    return program;
}
</code>```

Here is my model, view, and projection matrix calculation method:

```<code>public float[] generateModelViewProjectionMatrix() {

    // Set up projection matrix
    float aspectRatio = (float) this.window.getWindowWidth() / (float) this.window.getWindowHeight();
    float[] projection = new float[16];
    float fovy = (float) Math.toRadians(90.0f);
    float zNear = 0.1f;
    float zFar = 100.0f;
    float range = (float) Math.tan(fovy / 2.0f) * zNear;
    float left = -range * aspectRatio;
    float right = range * aspectRatio;
    float bottom = -range;
    float top = range;
    projection[0] = 2.0f * zNear / (right - left);
    projection[5] = 2.0f * zNear / (top - bottom);
    projection[8] = (right + left) / (right - left);
    projection[9] = (top + bottom) / (top - bottom);
    projection[10] = -(zFar + zNear) / (zFar - zNear);
    projection[11] = -1.0f;
    projection[14] = -2.0f * zFar * zNear / (zFar - zNear);

    // Set up view matrix
    float[] view = new float[16];
    view[0] = 1.0f;
    view[5] = 1.0f;
    view[10] = 1.0f;
    view[12] = -0.0f;
    view[13] = -0.0f;
    view[14] = -1.0f;

    // Set up model matrix
    float[] model = new float[16];
    model[0] = 1.0f;
    model[5] = 1.0f;
    model[10] = 1.0f;
    model[12] = 1.0f;

    // Calculate the combined matrix
    float[] mvp = new float[16];
    mvp[0] = projection[0] * view[0] * model[0];
    mvp[1] = projection[1] * view[5] * model[1];
    mvp[2] = projection[2] * view[10] * model[2];
    mvp[3] = projection[3] * view[15] * model[3];
    mvp[4] = projection[4] * view[0] * model[4];
    mvp[5] = projection[5] * view[5] * model[5];
    mvp[6] = projection[6] * view[10] * model[6];
    mvp[7] = projection[7] * view[15] * model[7];
    mvp[8] = projection[8] * view[0] * model[8];
    mvp[9] = projection[9] * view[5] * model[9];
    mvp[10] = projection[10] * view[10] * model[10];
    mvp[11] = projection[11] * view[15] * model[11];
    mvp[12] = projection[12] * view[0] * model[12];
    mvp[13] = projection[13] * view[5] * model[13];
    mvp[14] = projection[14] * view[10] * model[14];
    mvp[15] = projection[15] * view[15] * model[15];

    return mvp;

}
</code>```

When the gl_Position variable is just the vec4, the circle is displayed with its edges at the edges of the screen however once multiplied by the mvp matrix the circle is no longer displayed.

For more information, the screen dimensions are 800x600 and i would like to draw the circle at 400,300 with a width of 100 pixels.

Body:
I have some code that can draw a circle to the screen using LWJGL (OpenGL). However this code outputs a circle in clip space. The application of the code will be used for particle physics type simulations where multiples circles will need to be drawn at specific spots on the screen.

I attempted to use model, view, and projection matrices to transform the vertex data from object space to screen space in the vertex shaders however when implemented the circle stops showing on the screen. The vertex data is normalized and spans from -1 to 1.

I would like to be able to have a code that can draw any size of circle anywhere on the screen however right now the circle just spans the width and height of the screen.

Here is how the circle looks when the model, view, and projection matrices are not implemented in the vertex shaders.
Object space circle

Here is what is displayed when i implement the model, view, and projection matrix into the vertex shader.
Screen space "Circle"

The matrix that is passed to the vertex shader is the product of the model, view, and projection matrix and has these values which are multiplied by the position vector which gets stored under gl_Position:

[0.75, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.002002, -0.0, 0.0, 0.0, -0.0, 0.0]

Here is my shader program:

private int createShaderProgram() {
    // Vertex shader source code
    //"//uniform mat4 modelViewProjectionMatrix;\n" +
    //modelViewProjectionMatrix *
    //"    texCoord = (position - center) / size;\n"
    //"uniform vec2 center;\n" +
    //"uniform float size;\n" +
    String vertexShaderSource =
            "#version 330 core\n" +
                    "\n" +
                    "// Input vertex data, different for all executions of this shader.\n" +
                    "layout (location = 0) in vec2 position;\n" +
                    "\n" +
                    "// Output data\n" +
                    "out vec2 texCoord;\n" +
                    "\n" +
                    "uniform mat4 modelViewProjectionMatrix;\n"+
                    "\n" +
                    "void main()\n" +
                    "{\n" +
                    "    // Calculate the texture coordinates of the vertex\n" +
                    "    texCoord = position;\n" +
                    "\n" +
                    "    // Map the vertex position to the clip space\n" +
                    "    gl_Position = modelViewProjectionMatrix*vec4(position, 0.0, 1.0);\n" +
                    "}\n";

    // Fragment shader source code
    String fragmentShaderSource =
            "#version 330 core\n" +
                    "\n" +
                    "// Interpolated values from the vertex shaders\n" +
                    "in vec2 texCoord;\n" +
                    "\n" +
                    "// Output color\n" +
                    "out vec4 color;\n" +
                    "\n" +
                    "uniform vec2 viewport;\n" +
                    "\n" +
                    "void main()\n" +
                    "{\n" +
                    "    // Map the texture coordinates to the screen space\n" +
                    "    vec2 screenCoord = texCoord * viewport;\n" +
                    "\n" +
                    "    // Calculate the color using the texture coordinates\n" +
                    "    color = vec4(abs(texCoord.x), abs(texCoord.y), abs(texCoord.x)*0.5+abs(texCoord.y), 1.0);\n" +
                    "\n" +
                    "    // Discard fragments outside the circle\n" +
                    "    if (length(screenCoord) > viewport.x)\n" +
                    "        discard;\n" +
                    "}\n";

    // Create the vertex shader
    int vertexShader = GL20.glCreateShader(GL20.GL_VERTEX_SHADER);
    GL20.glShaderSource(vertexShader, vertexShaderSource);
    GL20.glCompileShader(vertexShader);

    // Check for errors
    int status = GL20.glGetShaderi(vertexShader, GL20.GL_COMPILE_STATUS);
    if (status != GL11.GL_TRUE) {
        throw new RuntimeException(GL20.glGetShaderInfoLog(vertexShader));
    }

    // Create the fragment shader
    int fragmentShader = GL20.glCreateShader(GL20.GL_FRAGMENT_SHADER);
    GL20.glShaderSource(fragmentShader, fragmentShaderSource);
    GL20.glCompileShader(fragmentShader);

    // Check for errors
    status = GL20.glGetShaderi(fragmentShader, GL20.GL_COMPILE_STATUS);
    if (status != GL11.GL_TRUE) {
        throw new RuntimeException(GL20.glGetShaderInfoLog(fragmentShader));
    }

    // Create the shader program
    int program = GL20.glCreateProgram();
    GL20.glAttachShader(program, vertexShader);
    GL20.glAttachShader(program, fragmentShader);
    GL20.glLinkProgram(program);

    // Check for errors
    status = GL20.glGetProgrami(program, GL20.GL_LINK_STATUS);
    if (status != GL11.GL_TRUE) {
        throw new RuntimeException(GL20.glGetProgramInfoLog(program));
    }

    // Delete the shaders
    GL20.glDeleteShader(vertexShader);
    GL20.glDeleteShader(fragmentShader);

    return program;
}

Here is my model, view, and projection matrix calculation method:

public float[] generateModelViewProjectionMatrix() {

    // Set up projection matrix
    float aspectRatio = (float) this.window.getWindowWidth() / (float) this.window.getWindowHeight();
    float[] projection = new float[16];
    float fovy = (float) Math.toRadians(90.0f);
    float zNear = 0.1f;
    float zFar = 100.0f;
    float range = (float) Math.tan(fovy / 2.0f) * zNear;
    float left = -range * aspectRatio;
    float right = range * aspectRatio;
    float bottom = -range;
    float top = range;
    projection[0] = 2.0f * zNear / (right - left);
    projection[5] = 2.0f * zNear / (top - bottom);
    projection[8] = (right + left) / (right - left);
    projection[9] = (top + bottom) / (top - bottom);
    projection[10] = -(zFar + zNear) / (zFar - zNear);
    projection[11] = -1.0f;
    projection[14] = -2.0f * zFar * zNear / (zFar - zNear);

    // Set up view matrix
    float[] view = new float[16];
    view[0] = 1.0f;
    view[5] = 1.0f;
    view[10] = 1.0f;
    view[12] = -0.0f;
    view[13] = -0.0f;
    view[14] = -1.0f;

    // Set up model matrix
    float[] model = new float[16];
    model[0] = 1.0f;
    model[5] = 1.0f;
    model[10] = 1.0f;
    model[12] = 1.0f;

    // Calculate the combined matrix
    float[] mvp = new float[16];
    mvp[0] = projection[0] * view[0] * model[0];
    mvp[1] = projection[1] * view[5] * model[1];
    mvp[2] = projection[2] * view[10] * model[2];
    mvp[3] = projection[3] * view[15] * model[3];
    mvp[4] = projection[4] * view[0] * model[4];
    mvp[5] = projection[5] * view[5] * model[5];
    mvp[6] = projection[6] * view[10] * model[6];
    mvp[7] = projection[7] * view[15] * model[7];
    mvp[8] = projection[8] * view[0] * model[8];
    mvp[9] = projection[9] * view[5] * model[9];
    mvp[10] = projection[10] * view[10] * model[10];
    mvp[11] = projection[11] * view[15] * model[11];
    mvp[12] = projection[12] * view[0] * model[12];
    mvp[13] = projection[13] * view[5] * model[13];
    mvp[14] = projection[14] * view[10] * model[14];
    mvp[15] = projection[15] * view[15] * model[15];

    return mvp;

}

When the gl_Position variable is just the vec4, the circle is displayed with its edges at the edges of the screen however once multiplied by the mvp matrix the circle is no longer displayed.

For more information, the screen dimensions are 800x600 and i would like to draw the circle at 400,300 with a width of 100 pixels.


来源: stackexchange

问:
input() raises EOFError while ssh-process is running
The standard input stream somehow becomes unavailable after running ssh with Popen(). It becomes available again after the process has terminated. Here is an example:

```<code>import subprocess
import sys, time

kwargs = {
    'stdout':subprocess.PIPE,
    'stderr':subprocess.PIPE,
#    'stdin':subprocess.PIPE
}

# this doesn't work:
cmd = ['ssh', 'somehost', '--']

# this works:
#cmd = ['sh', '-c']

cmd+= ['echo test; sleep 1']

proc = subprocess.Popen(cmd, **kwargs)
print('read: {}'.format(proc.stdout.readline()))

#time.sleep(2)
input('press return')

try:
    proc.wait(5)
    print('finished.')
except subprocess.TimeoutExpired:
    print('timed out.')
</code>```

gives EOFError: EOF when reading a line

So far, it only seems to happen with ssh. It doesn't happen if I uncomment sleep 2. It doesn't happen if I set stdin to PIPE when constructing the Popen object.
Why is that?

ContentLicense: CC BY-SA 4.0

Body:
The standard input stream somehow becomes unavailable after running ssh with Popen(). It becomes available again after the process has terminated. Here is an example:

import subprocess
import sys, time

kwargs = {
    'stdout':subprocess.PIPE,
    'stderr':subprocess.PIPE,
#    'stdin':subprocess.PIPE
}

# this doesn't work:
cmd = ['ssh', 'somehost', '--']

# this works:
#cmd = ['sh', '-c']

cmd+= ['echo test; sleep 1']

proc = subprocess.Popen(cmd, **kwargs)
print('read: {}'.format(proc.stdout.readline()))

#time.sleep(2)
input('press return')

try:
    proc.wait(5)
    print('finished.')
except subprocess.TimeoutExpired:
    print('timed out.')

gives EOFError: EOF when reading a line

So far, it only seems to happen with ssh. It doesn't happen if I uncomment sleep 2. It doesn't happen if I set stdin to PIPE when constructing the Popen object.
Why is that?


问:
The "path" argument must be of type string. Received undefined
I have ionic project and try to run it on simulator to debug an error

when I run the following command

```<code>ionic cordova run android --simulator --verbose --optimization=false
</code>```

I get the following error

```<code>The "path" argument must be of type string. Received undefined
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at validateString (internal/validators.js:124:11)
    at Object.join (path.js:375:7)
    at ConfigKeeper.get (C:\asu-mobile\moodleapp2\node_modules\cordova-common\src\ConfigChanges\ConfigKeeper.js:44:32)
    at C:\asu-mobile\moodleapp2\node_modules\cordova-common\src\ConfigChanges\ConfigChanges.js:264:51
    at Array.forEach (<anonymous>)
    at PlatformMunger._is_conflicting (C:\asu-mobile\moodleapp2\node_modules\cordova-common\src\ConfigChanges\ConfigChanges.js:257:21)
    at PlatformMunger.add_config_changes (C:\asu-mobile\moodleapp2\node_modules\cordova-common\src\ConfigChanges\ConfigChanges.js:140:59)
    at C:\asu-mobile\moodleapp2\node_modules\cordova-lib\src\cordova\prepare\platforms.js:66:24
    at async Promise.all (index 0)
  ionic:lib:cordova:project Error parsing file 'C:\\asu-mobile\\moodleapp2\\platforms\\android\\app\\build\\outputs\\apk\\debug\\output.json': [Error: ENOENT: no such file or directory, open 'C:\asu-mobile\moodleapp2\platforms\android\app\build\outputs\apk\debug\output.json'] {
  ionic:lib:cordova:project   errno: -4058,
  ionic:lib:cordova:project   code: 'ENOENT',
  ionic:lib:cordova:project   syscall: 'open',
  ionic:lib:cordova:project   path: 'C:\\asu-mobile\\moodleapp2\\platforms\\android\\app\\build\\outputs\\apk\\debug\\output.json'
  ionic:lib:cordova:project } +0ms
  ionic:lib:cordova:project Error parsing file 'C:\\asu-mobile\\moodleapp2\\platforms\\android\\app\\build\\outputs\\apk\\debug\\output-metadata.json': [Error: ENOENT: no such file or directory, open 'C:\asu-mobile\moodleapp2\platforms\android\app\build\outputs\apk\debug\output-metadata.json'] {
  ionic:lib:cordova:project   errno: -4058,
  ionic:lib:cordova:project   code: 'ENOENT',
  ionic:lib:cordova:project   syscall: 'open',
  ionic:lib:cordova:project   path: 'C:\\asu-mobile\\moodleapp2\\platforms\\android\\app\\build\\outputs\\apk\\debug\\output-metadata.json'
  ionic:lib:cordova:project } +3ms
[ERROR] Could not find or parse valid build output file.

        Tried the following paths:
        - C:\asu-mobile\moodleapp2\platforms\android\app\build\outputs\apk\debug\output.json
        - C:\asu-mobile\moodleapp2\platforms\android\app\build\outputs\apk\debug\output-metadata.json
  ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms
  ionic:utils-process onBeforeExit handler: running 3 functions +15ms
  ionic:utils-process error while killing process tree for 1666612: Error: Command failed: taskkill /pid 1666612 /T /F
  ionic:utils-process ERROR: The process "1666612" not found.
  ionic:utils-process
  ionic:utils-process     at ChildProcess.exithandler (child_process.js:308:12)
  ionic:utils-process     at ChildProcess.emit (events.js:315:20)
  ionic:utils-process     at maybeClose (internal/child_process.js:1048:16)
  ionic:utils-process     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
  ionic:utils-process   killed: false,
  ionic:utils-process   code: 128,
  ionic:utils-process   signal: null,
  ionic:utils-process   cmd: 'taskkill /pid 1666612 /T /F'
  ionic:utils-process } +5s
  ionic:utils-process onBeforeExit handler: error from function: Error: Command failed: taskkill /pid 1666612 /T /F
  ionic:utils-process ERROR: The process "1666612" not found.
  ionic:utils-process
  ionic:utils-process     at ChildProcess.exithandler (child_process.js:308:12)
  ionic:utils-process     at ChildProcess.emit (events.js:315:20)
  ionic:utils-process     at maybeClose (internal/child_process.js:1048:16)
  ionic:utils-process     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
  ionic:utils-process   killed: false,
  ionic:utils-process   code: 128,
  ionic:utils-process   signal: null,
  ionic:utils-process   cmd: 'taskkill /pid 1666612 /T /F'
  ionic:utils-process } +2ms
  ionic:utils-process error while killing process tree for 1672184: Error: Command failed: taskkill /pid 1672184 /T /F
  ionic:utils-process ERROR: The process "1672184" not found.
  ionic:utils-process
  ionic:utils-process     at ChildProcess.exithandler (child_process.js:308:12)
  ionic:utils-process     at ChildProcess.emit (events.js:315:20)
  ionic:utils-process     at maybeClose (internal/child_process.js:1048:16)
  ionic:utils-process     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
  ionic:utils-process   killed: false,
  ionic:utils-process   code: 128,
  ionic:utils-process   signal: null,
  ionic:utils-process   cmd: 'taskkill /pid 1672184 /T /F'
  ionic:utils-process } +28ms
  ionic:utils-process onBeforeExit handler: error from function: Error: Command failed: taskkill /pid 1672184 /T /F
  ionic:utils-process ERROR: The process "1672184" not found.
  ionic:utils-process
  ionic:utils-process     at ChildProcess.exithandler (child_process.js:308:12)
  ionic:utils-process     at ChildProcess.emit (events.js:315:20)
  ionic:utils-process     at maybeClose (internal/child_process.js:1048:16)
  ionic:utils-process     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
  ionic:utils-process   killed: false,
  ionic:utils-process   code: 128,
  ionic:utils-process   signal: null,
  ionic:utils-process   cmd: 'taskkill /pid 1672184 /T /F'
  ionic:utils-process } +1ms
  ionic:utils-process error while killing process tree for 1671456: Error: Command failed: taskkill /pid 1671456 /T /F
  ionic:utils-process ERROR: The process "1671456" not found.
  ionic:utils-process
  ionic:utils-process     at ChildProcess.exithandler (child_process.js:308:12)
  ionic:utils-process     at ChildProcess.emit (events.js:315:20)
  ionic:utils-process     at maybeClose (internal/child_process.js:1048:16)
  ionic:utils-process     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
  ionic:utils-process   killed: false,
  ionic:utils-process   code: 128,
  ionic:utils-process   signal: null,
  ionic:utils-process   cmd: 'taskkill /pid 1671456 /T /F'
  ionic:utils-process } +4ms
  ionic:utils-process onBeforeExit handler: error from function: Error: Command failed: taskkill /pid 1671456 /T /F
  ionic:utils-process ERROR: The process "1671456" not found.
  ionic:utils-process
  ionic:utils-process     at ChildProcess.exithandler (child_process.js:308:12)
  ionic:utils-process     at ChildProcess.emit (events.js:315:20)
  ionic:utils-process     at maybeClose (internal/child_process.js:1048:16)
  ionic:utils-process     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
  ionic:utils-process   killed: false,
  ionic:utils-process   code: 128,
  ionic:utils-process   signal: null,
  ionic:utils-process   cmd: 'taskkill /pid 1671456 /T /F'
  ionic:utils-process } +67ms
  ionic:utils-process processExit: exiting (exit code: 1) +254ms
</code>```

Body:
I have ionic project and try to run it on simulator to debug an error

when I run the following command

ionic cordova run android --simulator --verbose --optimization=false

I get the following error

The "path" argument must be of type string. Received undefined
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at validateString (internal/validators.js:124:11)
    at Object.join (path.js:375:7)
    at ConfigKeeper.get (C:\asu-mobile\moodleapp2\node_modules\cordova-common\src\ConfigChanges\ConfigKeeper.js:44:32)
    at C:\asu-mobile\moodleapp2\node_modules\cordova-common\src\ConfigChanges\ConfigChanges.js:264:51
    at Array.forEach (<anonymous>)
    at PlatformMunger._is_conflicting (C:\asu-mobile\moodleapp2\node_modules\cordova-common\src\ConfigChanges\ConfigChanges.js:257:21)
    at PlatformMunger.add_config_changes (C:\asu-mobile\moodleapp2\node_modules\cordova-common\src\ConfigChanges\ConfigChanges.js:140:59)
    at C:\asu-mobile\moodleapp2\node_modules\cordova-lib\src\cordova\prepare\platforms.js:66:24
    at async Promise.all (index 0)
  ionic:lib:cordova:project Error parsing file 'C:\\asu-mobile\\moodleapp2\\platforms\\android\\app\\build\\outputs\\apk\\debug\\output.json': [Error: ENOENT: no such file or directory, open 'C:\asu-mobile\moodleapp2\platforms\android\app\build\outputs\apk\debug\output.json'] {
  ionic:lib:cordova:project   errno: -4058,
  ionic:lib:cordova:project   code: 'ENOENT',
  ionic:lib:cordova:project   syscall: 'open',
  ionic:lib:cordova:project   path: 'C:\\asu-mobile\\moodleapp2\\platforms\\android\\app\\build\\outputs\\apk\\debug\\output.json'
  ionic:lib:cordova:project } +0ms
  ionic:lib:cordova:project Error parsing file 'C:\\asu-mobile\\moodleapp2\\platforms\\android\\app\\build\\outputs\\apk\\debug\\output-metadata.json': [Error: ENOENT: no such file or directory, open 'C:\asu-mobile\moodleapp2\platforms\android\app\build\outputs\apk\debug\output-metadata.json'] {
  ionic:lib:cordova:project   errno: -4058,
  ionic:lib:cordova:project   code: 'ENOENT',
  ionic:lib:cordova:project   syscall: 'open',
  ionic:lib:cordova:project   path: 'C:\\asu-mobile\\moodleapp2\\platforms\\android\\app\\build\\outputs\\apk\\debug\\output-metadata.json'
  ionic:lib:cordova:project } +3ms
[ERROR] Could not find or parse valid build output file.

        Tried the following paths:
        - C:\asu-mobile\moodleapp2\platforms\android\app\build\outputs\apk\debug\output.json
        - C:\asu-mobile\moodleapp2\platforms\android\app\build\outputs\apk\debug\output-metadata.json
  ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms
  ionic:utils-process onBeforeExit handler: running 3 functions +15ms
  ionic:utils-process error while killing process tree for 1666612: Error: Command failed: taskkill /pid 1666612 /T /F
  ionic:utils-process ERROR: The process "1666612" not found.
  ionic:utils-process
  ionic:utils-process     at ChildProcess.exithandler (child_process.js:308:12)
  ionic:utils-process     at ChildProcess.emit (events.js:315:20)
  ionic:utils-process     at maybeClose (internal/child_process.js:1048:16)
  ionic:utils-process     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
  ionic:utils-process   killed: false,
  ionic:utils-process   code: 128,
  ionic:utils-process   signal: null,
  ionic:utils-process   cmd: 'taskkill /pid 1666612 /T /F'
  ionic:utils-process } +5s
  ionic:utils-process onBeforeExit handler: error from function: Error: Command failed: taskkill /pid 1666612 /T /F
  ionic:utils-process ERROR: The process "1666612" not found.
  ionic:utils-process
  ionic:utils-process     at ChildProcess.exithandler (child_process.js:308:12)
  ionic:utils-process     at ChildProcess.emit (events.js:315:20)
  ionic:utils-process     at maybeClose (internal/child_process.js:1048:16)
  ionic:utils-process     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
  ionic:utils-process   killed: false,
  ionic:utils-process   code: 128,
  ionic:utils-process   signal: null,
  ionic:utils-process   cmd: 'taskkill /pid 1666612 /T /F'
  ionic:utils-process } +2ms
  ionic:utils-process error while killing process tree for 1672184: Error: Command failed: taskkill /pid 1672184 /T /F
  ionic:utils-process ERROR: The process "1672184" not found.
  ionic:utils-process
  ionic:utils-process     at ChildProcess.exithandler (child_process.js:308:12)
  ionic:utils-process     at ChildProcess.emit (events.js:315:20)
  ionic:utils-process     at maybeClose (internal/child_process.js:1048:16)
  ionic:utils-process     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
  ionic:utils-process   killed: false,
  ionic:utils-process   code: 128,
  ionic:utils-process   signal: null,
  ionic:utils-process   cmd: 'taskkill /pid 1672184 /T /F'
  ionic:utils-process } +28ms
  ionic:utils-process onBeforeExit handler: error from function: Error: Command failed: taskkill /pid 1672184 /T /F
  ionic:utils-process ERROR: The process "1672184" not found.
  ionic:utils-process
  ionic:utils-process     at ChildProcess.exithandler (child_process.js:308:12)
  ionic:utils-process     at ChildProcess.emit (events.js:315:20)
  ionic:utils-process     at maybeClose (internal/child_process.js:1048:16)
  ionic:utils-process     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
  ionic:utils-process   killed: false,
  ionic:utils-process   code: 128,
  ionic:utils-process   signal: null,
  ionic:utils-process   cmd: 'taskkill /pid 1672184 /T /F'
  ionic:utils-process } +1ms
  ionic:utils-process error while killing process tree for 1671456: Error: Command failed: taskkill /pid 1671456 /T /F
  ionic:utils-process ERROR: The process "1671456" not found.
  ionic:utils-process
  ionic:utils-process     at ChildProcess.exithandler (child_process.js:308:12)
  ionic:utils-process     at ChildProcess.emit (events.js:315:20)
  ionic:utils-process     at maybeClose (internal/child_process.js:1048:16)
  ionic:utils-process     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
  ionic:utils-process   killed: false,
  ionic:utils-process   code: 128,
  ionic:utils-process   signal: null,
  ionic:utils-process   cmd: 'taskkill /pid 1671456 /T /F'
  ionic:utils-process } +4ms
  ionic:utils-process onBeforeExit handler: error from function: Error: Command failed: taskkill /pid 1671456 /T /F
  ionic:utils-process ERROR: The process "1671456" not found.
  ionic:utils-process
  ionic:utils-process     at ChildProcess.exithandler (child_process.js:308:12)
  ionic:utils-process     at ChildProcess.emit (events.js:315:20)
  ionic:utils-process     at maybeClose (internal/child_process.js:1048:16)
  ionic:utils-process     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
  ionic:utils-process   killed: false,
  ionic:utils-process   code: 128,
  ionic:utils-process   signal: null,
  ionic:utils-process   cmd: 'taskkill /pid 1671456 /T /F'
  ionic:utils-process } +67ms
  ionic:utils-process processExit: exiting (exit code: 1) +254ms


问:
Does SSIS Send mail task or database emails get impacted as Microsoft deprecating basic authentication?
Microsoft is disabling basic authentication. Does this impact SSIS packages Send mail task or database emails? There are lot of SSIS packages in our organization. Email notifications are sending through Send Mail task or from SQL Server.

Incase Send Mail task or Database emails get impacted with this change, what will be the solution?
Consider I am a newbie while answering.

My understanding is since SSIS does not support basic authentication, there won't be any issue with SSIS send mail task or database emails.


问:
ping: proxy: Temporary failure in name resolution in docker container network -- "proxy" is container name here running in docker
Here I am having two proxy and my_ngnix  containers running inside docker
I have two containers inside one network "bridge" as below

```<code>C:\> docker network inspect bridge
[
    {
        "Name": "bridge",
        "Id": "82ffe522177d113af71d150c96b5e43df8946b9f17f901152cc2b4b96caf313a",
        "Created": "2022-12-25T14:38:40.7492988Z",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.17.0.0/16",
                    "Gateway": "172.17.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "008e6142e13e91624e89b26ba697bff60765965a09daedafa6db766f30b6beb9": {
                "Name": "proxy",
                "EndpointID": "ed0536b6b97d9ad00b8deeb8dc5ad6f91e9809af3fc4032dfca4abd02760cc71",
                "MacAddress": "02:42:ac:11:00:03",
                "IPv4Address": "172.17.0.3/16",
                "IPv6Address": ""
            },
            "e215ead97a7e6580d3f6fec0f25790771af9f878b4194d61fa041b218a2117bf": {
                "Name": "my_ngnix",
                "EndpointID": "f0e7a6e824c18587a1cb32de89dbc8a1ec2fa62dcc7fe38516d294d7fdb19606",
                "MacAddress": "02:42:ac:11:00:02",
                "IPv4Address": "172.17.0.2/16",
                "IPv6Address": ""
            }
        },
        "Options": {
            "com.docker.network.bridge.default_bridge": "true",
            "com.docker.network.bridge.enable_icc": "true",
            "com.docker.network.bridge.enable_ip_masquerade": "true",
            "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
            "com.docker.network.bridge.name": "docker0",
            "com.docker.network.driver.mtu": "1500"
        },
        "Labels": {}
    }
]
</code>```

the moment I hit the command

```<code>C:\> docker container exec -it my_ngnix ping proxy
</code>```

it shows me error : ping: proxy: Temporary failure in name resolution

can anyone help me here ---
I have installed all required update on container so I can use ping command
why container is not able to ping each other using container name ---same command work with ip address

I tried to use the same command using IP address as below

```<code> docker container exec -it my_ngnix ping 172.17.0.3
</code>```

it works , however it wont work with the container name.

Body:
Here I am having two proxy and my_ngnix  containers running inside docker
I have two containers inside one network "bridge" as below

C:\> docker network inspect bridge
[
    {
        "Name": "bridge",
        "Id": "82ffe522177d113af71d150c96b5e43df8946b9f17f901152cc2b4b96caf313a",
        "Created": "2022-12-25T14:38:40.7492988Z",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.17.0.0/16",
                    "Gateway": "172.17.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "008e6142e13e91624e89b26ba697bff60765965a09daedafa6db766f30b6beb9": {
                "Name": "proxy",
                "EndpointID": "ed0536b6b97d9ad00b8deeb8dc5ad6f91e9809af3fc4032dfca4abd02760cc71",
                "MacAddress": "02:42:ac:11:00:03",
                "IPv4Address": "172.17.0.3/16",
                "IPv6Address": ""
            },
            "e215ead97a7e6580d3f6fec0f25790771af9f878b4194d61fa041b218a2117bf": {
                "Name": "my_ngnix",
                "EndpointID": "f0e7a6e824c18587a1cb32de89dbc8a1ec2fa62dcc7fe38516d294d7fdb19606",
                "MacAddress": "02:42:ac:11:00:02",
                "IPv4Address": "172.17.0.2/16",
                "IPv6Address": ""
            }
        },
        "Options": {
            "com.docker.network.bridge.default_bridge": "true",
            "com.docker.network.bridge.enable_icc": "true",
            "com.docker.network.bridge.enable_ip_masquerade": "true",
            "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
            "com.docker.network.bridge.name": "docker0",
            "com.docker.network.driver.mtu": "1500"
        },
        "Labels": {}
    }
]

the moment I hit the command

C:\> docker container exec -it my_ngnix ping proxy

it shows me error : ping: proxy: Temporary failure in name resolution

can anyone help me here ---
I have installed all required update on container so I can use ping command
why container is not able to ping each other using container name ---same command work with ip address

I tried to use the same command using IP address as below

 docker container exec -it my_ngnix ping 172.17.0.3

it works , however it wont work with the container name.


问:
Error with OpenSSL when devtools::check() the R package
I'm currently working on a package in R, on of the functionalities is the creation of a new user. The function itself works fine, but the devtools::test() and the devtools::check() gives the following error :

```<code>Message: OpenSSL error in win32_load: could not load the shared library
Class:   simpleError/error/condition
Backtrace:
  1. testthat::expect_error(...)
       at test-new_user.R:2:4
  7. newUser::new_user(...)
 12. bcrypt::hashpw(password)
       at newUser/R/classUser.R:29:4
 13. bcrypt::gensalt()
 14. openssl::rand_bytes(16)
</code>```

Here the example code

R/classUser.R

```<code>setClass("User",
         slots = c(
           user_id  = "character",
           name     = "character",
           email    = "character",
           password = "character"
         ))

setMethod(
  f = "initialize",
  signature = "User",
  definition = function(.Object,
                        user_id,
                        name,
                        email,
                        password){
    .Object@user_id  <- user_id
    .Object@name     <- name
    .Object@email    <- email
    .Object@password <- password
    return(.Object)
  }
)
</code>```

R/new_user.R

```<code>#' new User
#' @importFrom uuid UUIDgenerate
#' @import bcrypt
#' @import methods
#' @param name character. name chosen by the user
#' @param email character. email of the user, must not already exist in database
#' @param password character. password chosen by the user
#'
#' @return User object
#' @export
new_user <- function(name, email, password){
  user <- new(Class = "User",
              user_id  = uuid::UUIDgenerate(),
              name     = name,
              email    = email,
              password = bcrypt::hashpw(password))
  return(user)
}
</code>```

tests/testthat/test-new_user.R

```<code>test_that("new user", {
    expect_error(
      Aurelie <- new_user(
        name = "Aurélie",
        email = "Aurelie@tryharder",
        password = "Str0ngP4ssword++"
      ),
      NA
    )
})
</code>```

I've tried to add openssl to Suggest section in DESCRIPTION, install OpenSLL on my device, add Sys.setenv("R_TESTS" = "") but nothing works.

Please help me understand what's going and maybe find a solution. Thanks.

Body:
I'm currently working on a package in R, on of the functionalities is the creation of a new user. The function itself works fine, but the devtools::test() and the devtools::check() gives the following error :

Message: OpenSSL error in win32_load: could not load the shared library
Class:   simpleError/error/condition
Backtrace:
  1. testthat::expect_error(...)
       at test-new_user.R:2:4
  7. newUser::new_user(...)
 12. bcrypt::hashpw(password)
       at newUser/R/classUser.R:29:4
 13. bcrypt::gensalt()
 14. openssl::rand_bytes(16)

Here the example code

R/classUser.R

setClass("User",
         slots = c(
           user_id  = "character",
           name     = "character",
           email    = "character",
           password = "character"
         ))

setMethod(
  f = "initialize",
  signature = "User",
  definition = function(.Object,
                        user_id,
                        name,
                        email,
                        password){
    .Object@user_id  <- user_id
    .Object@name     <- name
    .Object@email    <- email
    .Object@password <- password
    return(.Object)
  }
)

R/new_user.R

#' new User
#' @importFrom uuid UUIDgenerate
#' @import bcrypt
#' @import methods
#' @param name character. name chosen by the user
#' @param email character. email of the user, must not already exist in database
#' @param password character. password chosen by the user
#'
#' @return User object
#' @export
new_user <- function(name, email, password){
  user <- new(Class = "User",
              user_id  = uuid::UUIDgenerate(),
              name     = name,
              email    = email,
              password = bcrypt::hashpw(password))
  return(user)
}

tests/testthat/test-new_user.R

test_that("new user", {
    expect_error(
      Aurelie <- new_user(
        name = "Aurélie",
        email = "Aurelie@tryharder",
        password = "Str0ngP4ssword++"
      ),
      NA
    )
})

I've tried to add openssl to Suggest section in DESCRIPTION, install OpenSLL on my device, add Sys.setenv("R_TESTS" = "") but nothing works.

Please help me understand what's going and maybe find a solution. Thanks.


问:
Framer Motion ReOrder behaviour not reordering as expected
I am currently trying to implemented a draggable re-orderable list with Framer Motion. I am trying to reproduce the following behaviour:

https://codesandbox.io/s/framer-motion-5-drag-to-reorder-lists-uonye?from-embed=&file=/src/Icon.tsx:49-54

I have an ingredientList that contains the create_index of the each of the ingredients created in my Formik form, which are accessible as values.ingredients.

The main issue I am having is that the list items are not behaving smoothly as they do in the code example and I'm not sure what I am doing wrong

This is my parent component in which I set the ingredientList

```<code>const IngredientTab = ({values}: any) => {
  const [ingredientList, setIngredientList] = useState(values.ingredients.map((ingredient) => ingredient.create_index))

  return (
    <div css={IngredientTabStyles}>
      <FieldArray name="ingredients">
        {({ insert, remove, push }) => (
          <div>
            <Reorder.Group axis="y" values={ingredientList} onReorder={setIngredientList}>
              <AnimatePresence>
                {ingredientList.map((ingredientUniqueValue, index) => {
                  return (
                    <Ingredient
                      key={index}
                      index={index}
                      uniqueValue={ingredientUniqueValue}
                      ingredients={values.ingredients}
                      order={`${ingredientList.indexOf(ingredientUniqueValue) + 1}`}
                    />
                  )
                })}
              </AnimatePresence>
            </Reorder.Group>
            <button
              type="button"
              className="add-ingredients"
              onClick={() => {
                  setIngredientList([...ingredientList, values.ingredients.length])
                  push({ name: '', additional_info: '', quantity: '', unit_id: '', create_index: values.ingredients.length})
                }}
            >
              Add Ingredient
            </button>
          </div>
      )}
      </FieldArray>
    </div>
  )
}

export default IngredientTab

const IngredientTabStyles = css`
  .ingredient-fields {
    margin-bottom: 2rem;
    background-color: white;
  }
`
</code>```

And this is the Item component:

```<code>const Ingredient = ({ uniqueValue, ingredients, order, ingredient}: any) => {
  const y = useMotionValue(0);
  const boxShadow = useRaisedShadow(y);

  const ingredientIndex = ingredients.findIndex(ingredient => ingredient.create_index==uniqueValue)

  return (
    <Reorder.Item
      initial={{ opacity: 0 }}
      animate={{ opacity: 1 }}
      exit={{ opacity: 0 }}
      key={uniqueValue}
      value={uniqueValue}
      style={{boxShadow,y}}
    >
      {ingredient}

      <div className="ingredient-fields" css={IngredientStyles}>
        <div className="order">
          <h6>{order}</h6>
        </div>
        <div className="ingredient-name">
          <Field
            name={`ingredients.${ingredientIndex}.name`}
            type='text'
            placeholder="Ingredient"
          />
          <Field
            name={`ingredients.${ingredientIndex}.additional_info`}
            type='text'
            placeholder="Description"
          />
        </div>
        <Field
          name={`ingredients.${ingredientIndex}.quantity`}
          type='number'
          placeholder="Quantity"
        />
      </div>
    </Reorder.Item>
  )
}

export default Ingredient

const IngredientStyles = css`
  display: flex;
  margin-bottom: 2rem;

  .order {
    display: flex;
    align-items: center;
    background-color: ${theme.components.grey};
    padding: 1rem 2rem;
    margin-right: 2rem;
    border-radius: 0.4rem;
  }

  .ingredient-name {
    display: flex;
  }

  input {
    padding-bottom: 1rem;
    border: none;
    border-bottom: 1px solid ${theme.colors.lightGrey};
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 300;
  }
`
</code>```

I tried to take screenshots of the behaviour that I currently have. If I try to drag the 'bonjour' to the first position, the 1st item 'hello' does not move downwards. Instead what happens onReorder, what you see in the second picture, the bonjour and hello abruptly switch and it looks as though I am dragging the 'hello' item

Body:
I am currently trying to implemented a draggable re-orderable list with Framer Motion. I am trying to reproduce the following behaviour:

https://codesandbox.io/s/framer-motion-5-drag-to-reorder-lists-uonye?from-embed=&file=/src/Icon.tsx:49-54

I have an ingredientList that contains the create_index of the each of the ingredients created in my Formik form, which are accessible as values.ingredients.

The main issue I am having is that the list items are not behaving smoothly as they do in the code example and I'm not sure what I am doing wrong

This is my parent component in which I set the ingredientList

const IngredientTab = ({values}: any) => {
  const [ingredientList, setIngredientList] = useState(values.ingredients.map((ingredient) => ingredient.create_index))

  return (

      <FieldArray name="ingredients">
        {({ insert, remove, push }) => (

            <Reorder.Group axis="y" values={ingredientList} onReorder={setIngredientList}>
              <AnimatePresence>
                {ingredientList.map((ingredientUniqueValue, index) => {
                  return (
                    <Ingredient
                      key={index}
                      index={index}
                      uniqueValue={ingredientUniqueValue}
                      ingredients={values.ingredients}
                      order={`${ingredientList.indexOf(ingredientUniqueValue) + 1}`}
                    />
                  )
                })}
              </AnimatePresence>
            </Reorder.Group>
            <button
              type="button"
              className="add-ingredients"
              onClick={() => {
                  setIngredientList([...ingredientList, values.ingredients.length])
                  push({ name: '', additional_info: '', quantity: '', unit_id: '', create_index: values.ingredients.length})
                }}
            >
              Add Ingredient
            </button>

      )}
      </FieldArray>

  )
}

export default IngredientTab

const IngredientTabStyles = css`
  .ingredient-fields {
    margin-bottom: 2rem;
    background-color: white;
  }
`

And this is the Item component:

const Ingredient = ({ uniqueValue, ingredients, order, ingredient}: any) => {
  const y = useMotionValue(0);
  const boxShadow = useRaisedShadow(y);

  const ingredientIndex = ingredients.findIndex(ingredient => ingredient.create_index==uniqueValue)

  return (
    <Reorder.Item
      initial={{ opacity: 0 }}
      animate={{ opacity: 1 }}
      exit={{ opacity: 0 }}
      key={uniqueValue}
      value={uniqueValue}
      style={{boxShadow,y}}
    >
      {ingredient}

{order}

          <Field
            name={`ingredients.${ingredientIndex}.name`}
            type='text'
            placeholder="Ingredient"
          />
          <Field
            name={`ingredients.${ingredientIndex}.additional_info`}
            type='text'
            placeholder="Description"
          />

        <Field
          name={`ingredients.${ingredientIndex}.quantity`}
          type='number'
          placeholder="Quantity"
        />

    </Reorder.Item>
  )
}

export default Ingredient

const IngredientStyles = css`
  display: flex;
  margin-bottom: 2rem;

  .order {
    display: flex;
    align-items: center;
    background-color: ${theme.components.grey};
    padding: 1rem 2rem;
    margin-right: 2rem;
    border-radius: 0.4rem;
  }

  .ingredient-name {
    display: flex;
  }

  input {
    padding-bottom: 1rem;
    border: none;
    border-bottom: 1px solid ${theme.colors.lightGrey};
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 300;
  }
`

I tried to take screenshots of the behaviour that I currently have. If I try to drag the 'bonjour' to the first position, the 1st item 'hello' does not move downwards. Instead what happens onReorder, what you see in the second picture, the bonjour and hello abruptly switch and it looks as though I am dragging the 'hello' item


问:
How to: `xcodebuild -xcworkspace..` with project and swift packages
I have created a xcworkspace to add my iOS.xcproj and local swift package. The workspace builds and runs great from Xcode. What would be the xcodebuild command to do in my CI?

I have been trying using the following:

xcodebuild -workspace [name].xcworkspace -scheme [scheme_name] -configuration [config] -xcconfig [path_xcconfig]

I get this in the output console:

```<code>...note: Building targets in dependency order
error: Multiple commands produce <RegisterExecutionPolicyException...

sample:
 note: Target 'Firebase_FirebaseInAppMessaging_iOS' (project 'Firebase'): Touch /Users...

</code>```

Body:
I have created a xcworkspace to add my iOS.xcproj and local swift package. The workspace builds and runs great from Xcode. What would be the xcodebuild command to do in my CI?

I have been trying using the following:

xcodebuild -workspace [name].xcworkspace -scheme [scheme_name] -configuration [config] -xcconfig [path_xcconfig]

I get this in the output console:

...note: Building targets in dependency order
error: Multiple commands produce <RegisterExecutionPolicyException...

sample:
 note: Target 'Firebase_FirebaseInAppMessaging_iOS' (project 'Firebase'): Touch /Users...


问:
Jetpack Compose: How can I make an expandable/foldable view, containing FlowRow with unknown number of items?
I have a FlowRow with an unknown number of items.

I want to wrap this FlowRow with an expandable composable: The expanded height should show all items. The folded view will cover up everything except say, 100.dp.

```<code>Column {
 FlowLayout() {
   MyItems()
 }
 FlowLayout() {
   MyItems()
 }
}
</code>```

Like so:

I have managed it to get it to work but just by using re-composition:

I use FlowLayout's Modifier.onSizeChanged() and if size > (wanted folded size), then I decrease number of printed "chips" by one.

This means, that if I have 1000 chips to print, this will re-compose 996 times until we have our four chips remaining. It works but I feel it's a hack.

It won't work by just setting the height of the FlowLayout: FlowLayout(Modifier.heightIn(xxx)) {...} because FlowLayout will still print all chips, regardless of which size I set as constraint. Furthermore, the layout will then push both up and down! Not just down, from starting point.

Should I be looking into custom Layouts/SubcomposeLayouts?

Body:
I have a FlowRow with an unknown number of items.

I want to wrap this FlowRow with an expandable composable: The expanded height should show all items. The folded view will cover up everything except say, 100.dp.

Column {
 FlowLayout() {
   MyItems()
 }
 FlowLayout() {
   MyItems()
 }
}

Like so:

I have managed it to get it to work but just by using re-composition:

I use FlowLayout's Modifier.onSizeChanged() and if size > (wanted folded size), then I decrease number of printed "chips" by one.

This means, that if I have 1000 chips to print, this will re-compose 996 times until we have our four chips remaining. It works but I feel it's a hack.

It won't work by just setting the height of the FlowLayout: FlowLayout(Modifier.heightIn(xxx)) {...} because FlowLayout will still print all chips, regardless of which size I set as constraint. Furthermore, the layout will then push both up and down! Not just down, from starting point.

Should I be looking into custom Layouts/SubcomposeLayouts?


问:
how to navigate for web scrapping xbox store?
```<code>from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get("https://www.xbox.com/fr-FR/games/all-games?xr=shellnav")
next_buttons = driver.find_elements.find_elements_by_css_selector('.paging-next')

# Click on the first next button in the list
next_buttons[0].click()
</code>```

I try to navigate trough all xbox sotre pages but it doesn't work
i want to get all of the names of the xbox catalog

Body:
from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get("https://www.xbox.com/fr-FR/games/all-games?xr=shellnav")
next_buttons = driver.find_elements.find_elements_by_css_selector('.paging-next')

# Click on the first next button in the list
next_buttons[0].click()

I try to navigate trough all xbox sotre pages but it doesn't work
i want to get all of the names of the xbox catalog


问:
trying to a send a "string" refresh token in request body using axios post
I am trying to create a post request for refreshing the token using axios.post

my code is the following

I can't seem to pass the parameters in the correct order/way

in the api request its like this

```<code>export async function refreshTheCurrentToken() {

 const url = RefreshCurrentToken;

  const refreshTokenHardCoded = "xxxxxx"

  const refreshedToken = await axios
    .post(url, {
      params: {
        string: refreshTokenHardCoded,
      },
    })
    .catch((error) =>
      console.log(error + " error refreshing the current token")
    );

  // console.log(url + " URL FOR REFRESHING TOKEN");
  console.log(refreshedToken + " NEW TOKEN GENERATED ✅");
  // return refreshToken;
}

my response is the following
 LOG  AxiosError: Request failed with status code 400 error refreshing the current token
 LOG  undefined NEW TOKEN GENERATED ✅
</code>```

tried setting the refresh token in a static way. on postman it works but on my react native project it doesn't.

tried converting the refresh token a string, tried creating an object to hold the refresh token

Body:
I am trying to create a post request for refreshing the token using axios.post

my code is the following

I can't seem to pass the parameters in the correct order/way

in the api request its like this

export async function refreshTheCurrentToken() {

 const url = RefreshCurrentToken;

  const refreshTokenHardCoded = "xxxxxx"

  const refreshedToken = await axios
    .post(url, {
      params: {
        string: refreshTokenHardCoded,
      },
    })
    .catch((error) =>
      console.log(error + " error refreshing the current token")
    );

  // console.log(url + " URL FOR REFRESHING TOKEN");
  console.log(refreshedToken + " NEW TOKEN GENERATED ✅");
  // return refreshToken;
}

my response is the following
 LOG  AxiosError: Request failed with status code 400 error refreshing the current token
 LOG  undefined NEW TOKEN GENERATED ✅

tried setting the refresh token in a static way. on postman it works but on my react native project it doesn't.

tried converting the refresh token a string, tried creating an object to hold the refresh token


问:
How can I measure the probability of error of a trained model, in particular the random forest?
To do the binary classification of a set of images, I trained the random forest on a set of data.
I now want to evaluate the error probability of my model.
For that, I did two things and I don't know what corresponds to this error probability:

I calculated the accuracy using the k-fold cross validation

I tested my model after I calculated the ratio between the misclassified images and the total number of images.

What is the correct way to calculate the probability of error for my trained model?


问:
This interaction failed even with await interaction.respond - discord.py
I have a command that uses discord dropdown menus or select lists. It used to work completely fine, but for some reason it now starts to say 'This interaction failed'. I know I need to use reaction.response, but for some reason it doesnt work. Yesterday, it worked perfectly fine, and there wasnt anything that I changed really. But now for some reason whenever I choose something, it immediately says 'this interaction failed'. The only thing I changed was that I was solving out how to get the active dev badge, and im currently waiting for it. Other than that, I didnt change ANYTHING at all. This is my code:

```<code>if message.content.startswith('c!help'):
        select = Select(placeholder="Choose a category",
                        options=[
                            discord.SelectOption(label="Fun commands",
                                                 default=False),
                            discord.SelectOption(label="General commands",
                                                 default=False),
                            discord.SelectOption(label="Seasonal commands",default=False)
                        ])
        view = View()
        view.add_item(select)
        await message.channel.send(embed=fhelp, view=view)

        async def call_back(interaction):
            mainthing = select.values[0]
            if mainthing == "Fun commands":
                await interaction.response.edit_message(embed=fhelp, view=view)
            elif mainthing == "General commands":
                await interaction.response.edit_message(embed=ghelp, view=view)
            elif mainthing == "Seasonal commands":
                await interaction.response.edit_message(embed=shelp,view=view)

        select.callback = call_back
</code>```

I made everything clear, and please dont avoid the main question. It worked completely fine.  I doubt there is a problem with my code since I didnt even change anything in it, but it just suddenly started saying that error in an instant. I believe its probably a bug or something related with the active dev badge thing.

Body:
I have a command that uses discord dropdown menus or select lists. It used to work completely fine, but for some reason it now starts to say 'This interaction failed'. I know I need to use reaction.response, but for some reason it doesnt work. Yesterday, it worked perfectly fine, and there wasnt anything that I changed really. But now for some reason whenever I choose something, it immediately says 'this interaction failed'. The only thing I changed was that I was solving out how to get the active dev badge, and im currently waiting for it. Other than that, I didnt change ANYTHING at all. This is my code:

if message.content.startswith('c!help'):
        select = Select(placeholder="Choose a category",
                        options=[
                            discord.SelectOption(label="Fun commands",
                                                 default=False),
                            discord.SelectOption(label="General commands",
                                                 default=False),
                            discord.SelectOption(label="Seasonal commands",default=False)
                        ])
        view = View()
        view.add_item(select)
        await message.channel.send(embed=fhelp, view=view)

        async def call_back(interaction):
            mainthing = select.values[0]
            if mainthing == "Fun commands":
                await interaction.response.edit_message(embed=fhelp, view=view)
            elif mainthing == "General commands":
                await interaction.response.edit_message(embed=ghelp, view=view)
            elif mainthing == "Seasonal commands":
                await interaction.response.edit_message(embed=shelp,view=view)

        select.callback = call_back

I made everything clear, and please dont avoid the main question. It worked completely fine.  I doubt there is a problem with my code since I didnt even change anything in it, but it just suddenly started saying that error in an instant. I believe its probably a bug or something related with the active dev badge thing.


问:
member access within misaligned address 0x000000000002 for type 'struct ListNode', which requires 8 byte alignment
How can I solve this misaligned address problem.I came across this problem when I try to solve addition of two numbers using linked list in reverse order in LeetCode
ProblemLink:https://leetcode.com/problems/add-two-numbers/

algorithm : Ive created a variable flag to check for carry over.When i tried to add the first element of linked list 1 with the first element of linked list 2 ,its throwing an error.

```<code>/**
 * Definition for singly-linked list.
 * struct ListNode {
 *     int val;
 *     struct ListNode *next;
 * };
 */
struct ListNode* addTwoNumbers(struct ListNode* l1, struct ListNode* l2){
     struct node{
         int num;
         struct node *ptr;
     };
    struct node* create(){
        struct node *ptr1=malloc(sizeof(struct node));
        ptr1->ptr=NULL;
        return ptr1;
    }
    struct node *head=NULL;
    struct node *temp=NULL;
    int flag=0;
    while(l1!=NULL && l2!=NULL){
        if(head==NULL){
            head=create();
            temp=head;
        }
        else{
            temp->ptr=create();
            temp=temp->ptr;
        }
        int a=(l1->val);            //showing error
        a=a+(l2->val);
        a=a+flag;
        int b=a%10;
        flag=(a-b)/10;
        temp->num=b;

        l1=l1->val;
        l2=l2->val;

    }
    while(l1==NULL && l2!=NULL){
        if(head==NULL){
            head=create();
            temp=head;
        }
        else{
            temp->ptr=create();
            temp=temp->ptr;
        }
        int a=(l2->val)+flag ;
        int b=a%10;
        flag=(a-b)/10;
        temp->num=b;

        l2=l2->val;

    }
    while(l1!=NULL && l2==NULL){
        if(head==NULL){
            head=create();
            temp=head;
        }
        else{
            temp->ptr=create();
            temp=temp->ptr;
        }
        int a=(l1->val)+flag ;
        int b=a%10;
        flag=(a-b)/10;
        temp->num=b;

        l1=l1->val;

    }
    while(l1==NULL && l2==NULL && flag==1){
        if(head==NULL){
            head=create();
            temp=head;
        }
        else{
            temp->ptr=create();
            temp=temp->ptr;
        }

        temp->num=1;
        flag=0;
    }

    return head;

}
</code>```

Body:
How can I solve this misaligned address problem.I came across this problem when I try to solve addition of two numbers using linked list in reverse order in LeetCode
ProblemLink:https://leetcode.com/problems/add-two-numbers/

algorithm : Ive created a variable flag to check for carry over.When i tried to add the first element of linked list 1 with the first element of linked list 2 ,its throwing an error.

/**
 * Definition for singly-linked list.
 * struct ListNode {
 *     int val;
 *     struct ListNode *next;
 * };
 */
struct ListNode* addTwoNumbers(struct ListNode* l1, struct ListNode* l2){
     struct node{
         int num;
         struct node *ptr;
     };
    struct node* create(){
        struct node *ptr1=malloc(sizeof(struct node));
        ptr1->ptr=NULL;
        return ptr1;
    }
    struct node *head=NULL;
    struct node *temp=NULL;
    int flag=0;
    while(l1!=NULL && l2!=NULL){
        if(head==NULL){
            head=create();
            temp=head;
        }
        else{
            temp->ptr=create();
            temp=temp->ptr;
        }
        int a=(l1->val);            //showing error
        a=a+(l2->val);
        a=a+flag;
        int b=a%10;
        flag=(a-b)/10;
        temp->num=b;

        l1=l1->val;
        l2=l2->val;

    }
    while(l1==NULL && l2!=NULL){
        if(head==NULL){
            head=create();
            temp=head;
        }
        else{
            temp->ptr=create();
            temp=temp->ptr;
        }
        int a=(l2->val)+flag ;
        int b=a%10;
        flag=(a-b)/10;
        temp->num=b;

        l2=l2->val;

    }
    while(l1!=NULL && l2==NULL){
        if(head==NULL){
            head=create();
            temp=head;
        }
        else{
            temp->ptr=create();
            temp=temp->ptr;
        }
        int a=(l1->val)+flag ;
        int b=a%10;
        flag=(a-b)/10;
        temp->num=b;

        l1=l1->val;

    }
    while(l1==NULL && l2==NULL && flag==1){
        if(head==NULL){
            head=create();
            temp=head;
        }
        else{
            temp->ptr=create();
            temp=temp->ptr;
        }

        temp->num=1;
        flag=0;
    }

    return head;

}


问:
Tkinterweb (Browser Module) Appending/Adding Additional HTML to a HTML Table Row
I'm trying to figure out a way to append additional rows to a html table using the 'TkinterWeb' module, without having to keep reloading the page or without using 'load_html' to keep reloading the document and slowing down the browser while adding new table row data.

I see that there is the option to add additional html to the document without reloading it by using 'add_html', but how would I keep appending new rows to a html table?

For example, here's what my table rows look like:

```<code><html>
    <table>
        <tr>
              <th>#</h1><th>Heading 1</h1><th>Heading 2</h1><th>Heading 3</h1>
        </tr>
        <tr>
              <td>1</td><td>DATA 1</td><td>DATA 1</td><td>DATA 1</td>
        </tr>
        **<!--APPEND/ADD-NEW-ROW-HERE!-->**
    </table>
</html>
</code>```

Is there a way to quickly append another table row without constantly reloading the whole document? Is there a way just to manipulate the '' element so that I don't have to keep reloading the whole document?

I would like to click a Tkinter button, then it would append another row to the html table. Just trying to figure out which way it would be best to do so. I've tried replacing a 'html' variable where it says '', but it seems as though I'd have to keep reloading the document in order to replace the html variable that I'm using to load my html.

I'd appreciate the ideas. Thanks.

Body:
I'm trying to figure out a way to append additional rows to a html table using the 'TkinterWeb' module, without having to keep reloading the page or without using 'load_html' to keep reloading the document and slowing down the browser while adding new table row data.

I see that there is the option to add additional html to the document without reloading it by using 'add_html', but how would I keep appending new rows to a html table?

For example, here's what my table rows look like:

              #
Heading 1
Heading 2
Heading 3

              1	DATA 1	DATA 1	DATA 1

        ****

Is there a way to quickly append another table row without constantly reloading the whole document? Is there a way just to manipulate the '' element so that I don't have to keep reloading the whole document?

I would like to click a Tkinter button, then it would append another row to the html table. Just trying to figure out which way it would be best to do so. I've tried replacing a 'html' variable where it says '', but it seems as though I'd have to keep reloading the document in order to replace the html variable that I'm using to load my html.

I'd appreciate the ideas. Thanks.


问:
Android ImageDecoder extremely slow performance with HEIC/HEIF images
I'm using subsampling-scale-image-view to display images, and I implemented function like the Gallery app usually do (allow user to view image, zoom then and swipe left or right to switch
between images).

I found out that when I swipe to change image, if I scroll fast between two images, the gesture might not work at all. Despite the fact that the FPS displayed is always 60 FPS.

I have setup systrace to find out what causing the performance issue, and it gave me this graph:

Am I understand correctly that decodeBitmap function causing my app not responding to gesture?

According to the graph deliverInputEvent and ViewPostImeInputStage takes a lot of time and that's not usual at all.


问:
E2E testing Docker compose + React + Spring Boot
I have a project with a Docker compose file that have a React frontend and a Spring Boot backend with a PostgreSQL database.

I need something that starts the app and then runs the e2e tests, but I haven't found the way yet. I haven't written the e2e tests, so they can be in any language or framework.

Also, I want to be able to do it in a CI environment so it have to be done automatically.


问:
Async Queue Stops Populating after a while
I have a TikTok API that has async functions that adds items to my queue and then I have another async function that prints them. I plan to do something more with this function but since I'm relatively new to python I just want to consistently print them. The error is that the queue isn't working how it should. After putting and getting a few comments the queue is just empty for my "Producer" function. Here's my code:

```<code>import asyncio
import time
from asyncio import Queue
from TikTokLive import TikTokLiveClient
from TikTokLive.types.events import CommentEvent, ConnectEvent

#/Users/sunilpc/Documents/Python/tiktokTest.py

# Instantiate the client with the user's username
client: TikTokLiveClient = TikTokLiveClient(unique_id="@territorialwarfr")

# Comment Holders
commentQueue = asyncio.Queue()

# Define how you want to handle specific events via decorator
@client.on("connect")
async def on_connect(_: ConnectEvent):
    print("Connected to Room ID:", client.room_id)

# Notice no decorator?
@client.on("comment")
async def on_comment(event: CommentEvent):
    #print(f"{event.user.nickname} -> {event.comment}")
    await commentQueue.put(f"{event.user.nickname} -> {event.comment}\n")

# Define handling an event via "callback"
#client.add_listener("comment", on_comment)

async def main():
    await asyncio.gather(client.start(), printQueue())
    #await client.start()
    #await printQueue()

async def printQueue():
    while True:
        if not commentQueue.empty():
            item = await commentQueue.get()
            print("Comment: {}".format(item))
        else:
            print("Waiting for new Comments...\n")

if __name__ == '__main__':
    asyncio.run(main())

</code>```

and my output:

```<code>
Waiting for new Comments...

Waiting for new Comments...

Waiting for new Comments...

Waiting for new Comments...

Connected to Room ID: 7181046628336356139
Comment: swift_sunsets -> 1

Comment: drosdye -> 1

Comment: what talent does charli have -> 1 2 3 4

Comment: what talent does charli have -> 1 2 3 4

Comment: I’m_paradox -> 1

Comment: I’m_paradox -> 1

Comment: Amir Morris -> 2

Waiting for new Comments...

Waiting for new Comments...

Waiting for new Comments...

</code>```

I'm getting some comments from the queue but then it stops seeing comments and just prints "Waiting for new Comments..." forever.

I've tried to run the client.start() and printQueue() as different tasks using asyncio.create_task() but that also has the same result. Simply printing in the on_comment function works fine but I cant really use the comment data from that.

Body:
I have a TikTok API that has async functions that adds items to my queue and then I have another async function that prints them. I plan to do something more with this function but since I'm relatively new to python I just want to consistently print them. The error is that the queue isn't working how it should. After putting and getting a few comments the queue is just empty for my "Producer" function. Here's my code:

import asyncio
import time
from asyncio import Queue
from TikTokLive import TikTokLiveClient
from TikTokLive.types.events import CommentEvent, ConnectEvent

#/Users/sunilpc/Documents/Python/tiktokTest.py

# Instantiate the client with the user's username
client: TikTokLiveClient = TikTokLiveClient(unique_id="@territorialwarfr")

# Comment Holders
commentQueue = asyncio.Queue()

# Define how you want to handle specific events via decorator
@client.on("connect")
async def on_connect(_: ConnectEvent):
    print("Connected to Room ID:", client.room_id)

# Notice no decorator?
@client.on("comment")
async def on_comment(event: CommentEvent):
    #print(f"{event.user.nickname} -> {event.comment}")
    await commentQueue.put(f"{event.user.nickname} -> {event.comment}\n")

# Define handling an event via "callback"
#client.add_listener("comment", on_comment)

async def main():
    await asyncio.gather(client.start(), printQueue())
    #await client.start()
    #await printQueue()

async def printQueue():
    while True:
        if not commentQueue.empty():
            item = await commentQueue.get()
            print("Comment: {}".format(item))
        else:
            print("Waiting for new Comments...\n")

if __name__ == '__main__':
    asyncio.run(main())

and my output:

Waiting for new Comments...

Waiting for new Comments...

Waiting for new Comments...

Waiting for new Comments...

Connected to Room ID: 7181046628336356139
Comment: swift_sunsets -> 1

Comment: drosdye -> 1

Comment: what talent does charli have -> 1 2 3 4

Comment: what talent does charli have -> 1 2 3 4

Comment: I’m_paradox -> 1

Comment: I’m_paradox -> 1

Comment: Amir Morris -> 2

Waiting for new Comments...

Waiting for new Comments...

Waiting for new Comments...

I'm getting some comments from the queue but then it stops seeing comments and just prints "Waiting for new Comments..." forever.

I've tried to run the client.start() and printQueue() as different tasks using asyncio.create_task() but that also has the same result. Simply printing in the on_comment function works fine but I cant really use the comment data from that.


问:
How to build GCC ARM project with hard restrictions to link libgcc?
Im has found, what even with --specs.nano.specs --specs.nosys.lib will link libgcc, if some dependencies request it (like some float operations).

With -nostdlib flag, compiler will throw out newlib-nano too and obiviusly fail on build.

So the question is - how to save ability to link newlib-nano, but get error if some entity request any code what newlib-nano havent, butlibgcc have?


问:
Roblox Studio - Area Damage Effect On Player Jump
I'm trying to implement a system in Roblox Studio that allows a player to cause damage to all players nearby when they jump. I'm trying to develop code that is triggered when the player jumps, and as they land, 10 damage is caused to all players (and dummies for testing purposes) nearby. I've tried three or four different approaches, but none of them seem to work. Here's the latest version of my code:

```<code>function onJump(player)
  -- Get the player's position
  local playerPosition = player.Character.HumanoidRootPart.Position

  -- Find all players and dummys within a 5 block radius of the player
  local objectsInRange = game:GetService("Workspace"):GetDescendants()
  local objectsToDamage = {}
  for _, object in pairs(objectsInRange) do
    if object:IsA("Player") or (object:IsA("Model") and object.Name == "RespawnDummy") then
      local objectPosition = object.PrimaryPart.Position
      local distance = (playerPosition - objectPosition).Magnitude
      if distance <= 5 then
        table.insert(objectsToDamage, object)
      end
    end
  end

  -- Damage all players and dummys within range
  for _, objectToDamage in pairs(objectsToDamage) do
    if objectToDamage:IsA("Player") then
      objectToDamage.Character.Humanoid:TakeDamage(10)
    elseif objectToDamage:IsA("Model") then
      objectToDamage:BreakJoints()
    end
  end
end

-- Connect the function to the player's Jump event
game.Players.Player.Character.Humanoid.Jump:Connect(onJump)

</code>```

The biggest challenge seems to be simply having the script identify when a player jumps. I'm not getting any error messages - but I'm also not getting any output if I add a 'print' command inside this function, so it doesn't look as though the jump is being picked up at all.

Body:
I'm trying to implement a system in Roblox Studio that allows a player to cause damage to all players nearby when they jump. I'm trying to develop code that is triggered when the player jumps, and as they land, 10 damage is caused to all players (and dummies for testing purposes) nearby. I've tried three or four different approaches, but none of them seem to work. Here's the latest version of my code:

function onJump(player)
  -- Get the player's position
  local playerPosition = player.Character.HumanoidRootPart.Position

  -- Find all players and dummys within a 5 block radius of the player
  local objectsInRange = game:GetService("Workspace"):GetDescendants()
  local objectsToDamage = {}
  for _, object in pairs(objectsInRange) do
    if object:IsA("Player") or (object:IsA("Model") and object.Name == "RespawnDummy") then
      local objectPosition = object.PrimaryPart.Position
      local distance = (playerPosition - objectPosition).Magnitude
      if distance <= 5 then
        table.insert(objectsToDamage, object)
      end
    end
  end

  -- Damage all players and dummys within range
  for _, objectToDamage in pairs(objectsToDamage) do
    if objectToDamage:IsA("Player") then
      objectToDamage.Character.Humanoid:TakeDamage(10)
    elseif objectToDamage:IsA("Model") then
      objectToDamage:BreakJoints()
    end
  end
end

-- Connect the function to the player's Jump event
game.Players.Player.Character.Humanoid.Jump:Connect(onJump)

The biggest challenge seems to be simply having the script identify when a player jumps. I'm not getting any error messages - but I'm also not getting any output if I add a 'print' command inside this function, so it doesn't look as though the jump is being picked up at all.