问:
Lootie Json to normal Json?
How's going?

Well, for the past days, I used figmotion, to export some animations to my project.

The problem is that the json exported on figmotion doesn't work on Lootie Animations plugin on Kotlin.

I have tested my Kotlin code with other Lootie animations, available at their website and they work, but those generated by figmotion doesn't.

Anyway to convert it to the right way?

The JSON code generated by Figmotion:

```<code>  "Group 364": {
    "keyframes": {
      "rotation": [
        {
          "id": "ipwq77dJRUv4",
          "ms": 0,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "dJ0pi5K4MJEy",
          "ms": 3010,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Elipses": {
    "keyframes": {
      "rotation": [
        {
          "id": "EpufIsNtOCr1",
          "ms": 0,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Elipse 3": {
    "keyframes": {
      "rotation": [
        {
          "id": "lFGNYV8QVeYC",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "FaLsXAA6rz6B",
          "ms": 3010,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Elipse 2": {
    "keyframes": {
      "rotation": [
        {
          "id": "9XMxj0fKHa4H",
          "ms": 0,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "kX2gX6WQnTfK",
          "ms": 1000,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "Ma00DaAFO0o1",
          "ms": 2000,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "8NzxNeNCT23x",
          "ms": 2511,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0,
            0,
            1,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Imobiliario": {
    "keyframes": {
      "rotation": [
        {
          "id": "FJue1kYRTVZs",
          "ms": 0,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "fv5OSvwHU15Z",
          "ms": 2000,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "0TJ6y3WwhtGh",
          "ms": 2000,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0,
            0,
            1,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Ellipse 21": {
    "keyframes": {
      "rotation": [
        {
          "id": "uecpRUv9InRP",
          "ms": 0,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "GX0dWp7Nu7Rp",
          "ms": 2000,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Icons/imobiliÃ¡rio": {
    "keyframes": {
      "rotation": [
        {
          "id": "JJXt3q5a0jY9",
          "ms": 0,
          "property": "rotation",
          "value": -1,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "Dw80DxAKQr9b",
          "ms": 2000,
          "property": "rotation",
          "value": -1,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "htO1aDX99V8Y",
          "ms": 2000,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0,
            0,
            1,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Carros": {
    "keyframes": {
      "rotation": [
        {
          "id": "dTM8u331ydI3",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "db75DOacRbx3",
          "ms": 500,
          "property": "rotation",
          "value": 9.7844,
          "easing": "easeIn",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "6vAl0uk8tw6O",
          "ms": 2000,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Icons/veÃculos": {
    "keyframes": {
      "rotation": [
        {
          "id": "l4kl4Kim4K32",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "cqAMSXArol0H",
          "ms": 2000,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Elipse 1": {
    "keyframes": {
      "rotation": [
        {
          "id": "Bu0cdKcVmlou",
          "ms": 0,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "59fv57XBBF74",
          "ms": 1007,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "SK0R9vNjM6ET",
          "ms": 2000,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Dentro": {
    "keyframes": {
      "rotation": [
        {
          "id": "IzoElTuG6d2q",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "5r7fmwoG67e3",
          "ms": 2000,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Icons/informÃ¡tica": {
    "keyframes": {
      "rotation": [
        {
          "id": "ECvvfENe1Jc1",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "BACC2c6peI3q",
          "ms": 2000,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "W6J2AP3t8YI0",
          "ms": 3010,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Group 360": {
    "keyframes": {
      "rotation": [
        {
          "id": "2dg8Kb5nlMeN",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "QpV0NRaqtTjB",
          "ms": 2000,
          "property": "rotation",
          "value": -6,
          "easing": "linear",
          "easingCurve": [
            0,
            0,
            1,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Negocios": {
    "keyframes": {
      "rotation": [
        {
          "id": "RNMY6GHvJDKq",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "lPwKUJJeTERL",
          "ms": 2000,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Directions bike": {
    "keyframes": {
      "rotation": [
        {
          "id": "FTqtK75hppGi",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "Zr291FmVByL5",
          "ms": 2000,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0,
            0,
            1,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "PeÃ§as": {
    "keyframes": {
      "rotation": [
        {
          "id": "LDBmqumb76GV",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Build": {
    "keyframes": {
      "rotation": [
        {
          "id": "KoQhFHHcPZLC",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Group 140": {
    "keyframes": {
      "rotation": [
        {
          "id": "0gTBbat2sK72",
          "ms": 0,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "zOCtufCq7pFj",
          "ms": 2000,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  }
}```
```

Title: Lootie Json to normal Json?

Body:
How's going?

Well, for the past days, I used figmotion, to export some animations to my project.

The problem is that the json exported on figmotion doesn't work on Lootie Animations plugin on Kotlin.

I have tested my Kotlin code with other Lootie animations, available at their website and they work, but those generated by figmotion doesn't.

Anyway to convert it to the right way?

The JSON code generated by Figmotion:

  "Group 364": {
    "keyframes": {
      "rotation": [
        {
          "id": "ipwq77dJRUv4",
          "ms": 0,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "dJ0pi5K4MJEy",
          "ms": 3010,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Elipses": {
    "keyframes": {
      "rotation": [
        {
          "id": "EpufIsNtOCr1",
          "ms": 0,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Elipse 3": {
    "keyframes": {
      "rotation": [
        {
          "id": "lFGNYV8QVeYC",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "FaLsXAA6rz6B",
          "ms": 3010,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Elipse 2": {
    "keyframes": {
      "rotation": [
        {
          "id": "9XMxj0fKHa4H",
          "ms": 0,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "kX2gX6WQnTfK",
          "ms": 1000,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "Ma00DaAFO0o1",
          "ms": 2000,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "8NzxNeNCT23x",
          "ms": 2511,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0,
            0,
            1,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Imobiliario": {
    "keyframes": {
      "rotation": [
        {
          "id": "FJue1kYRTVZs",
          "ms": 0,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "fv5OSvwHU15Z",
          "ms": 2000,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "0TJ6y3WwhtGh",
          "ms": 2000,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0,
            0,
            1,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Ellipse 21": {
    "keyframes": {
      "rotation": [
        {
          "id": "uecpRUv9InRP",
          "ms": 0,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "GX0dWp7Nu7Rp",
          "ms": 2000,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Icons/imobiliÃ¡rio": {
    "keyframes": {
      "rotation": [
        {
          "id": "JJXt3q5a0jY9",
          "ms": 0,
          "property": "rotation",
          "value": -1,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "Dw80DxAKQr9b",
          "ms": 2000,
          "property": "rotation",
          "value": -1,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "htO1aDX99V8Y",
          "ms": 2000,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0,
            0,
            1,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Carros": {
    "keyframes": {
      "rotation": [
        {
          "id": "dTM8u331ydI3",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "db75DOacRbx3",
          "ms": 500,
          "property": "rotation",
          "value": 9.7844,
          "easing": "easeIn",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "6vAl0uk8tw6O",
          "ms": 2000,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Icons/veÃculos": {
    "keyframes": {
      "rotation": [
        {
          "id": "l4kl4Kim4K32",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "cqAMSXArol0H",
          "ms": 2000,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Elipse 1": {
    "keyframes": {
      "rotation": [
        {
          "id": "Bu0cdKcVmlou",
          "ms": 0,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "59fv57XBBF74",
          "ms": 1007,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "SK0R9vNjM6ET",
          "ms": 2000,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Dentro": {
    "keyframes": {
      "rotation": [
        {
          "id": "IzoElTuG6d2q",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "5r7fmwoG67e3",
          "ms": 2000,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Icons/informÃ¡tica": {
    "keyframes": {
      "rotation": [
        {
          "id": "ECvvfENe1Jc1",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "BACC2c6peI3q",
          "ms": 2000,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "W6J2AP3t8YI0",
          "ms": 3010,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Group 360": {
    "keyframes": {
      "rotation": [
        {
          "id": "2dg8Kb5nlMeN",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "QpV0NRaqtTjB",
          "ms": 2000,
          "property": "rotation",
          "value": -6,
          "easing": "linear",
          "easingCurve": [
            0,
            0,
            1,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Negocios": {
    "keyframes": {
      "rotation": [
        {
          "id": "RNMY6GHvJDKq",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "lPwKUJJeTERL",
          "ms": 2000,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Directions bike": {
    "keyframes": {
      "rotation": [
        {
          "id": "FTqtK75hppGi",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "Zr291FmVByL5",
          "ms": 2000,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0,
            0,
            1,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "PeÃ§as": {
    "keyframes": {
      "rotation": [
        {
          "id": "LDBmqumb76GV",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Build": {
    "keyframes": {
      "rotation": [
        {
          "id": "KoQhFHHcPZLC",
          "ms": 0,
          "property": "rotation",
          "value": 0,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  },
  "Group 140": {
    "keyframes": {
      "rotation": [
        {
          "id": "0gTBbat2sK72",
          "ms": 0,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        },
        {
          "id": "zOCtufCq7pFj",
          "ms": 2000,
          "property": "rotation",
          "value": 360,
          "easing": "linear",
          "easingCurve": [
            0.42,
            0,
            0.58,
            1
          ]
        }
      ]
    },
    "version": "0.2.0",
    "anchorPoint": "MIDDLECENTER"
  }
}```


来源: stackexchange

问:
Fields in RDS Postgres are not showing in Appflow when doing the fields mapping
I created an Appflow and use RDS Postgres as destination. When doing the fields mapping after setting set the connection to DB, only 4 fields can be selected from RDS Postgres, but there are 20 fields created in that table.

I tried to create  and use the different tables but still got this same situation. What possible issue this could be?

What possible issue this could be?

ContentLicense: CC BY-SA 4.0


问:
How we can create a responsive Grid with Infima styling framework?
How we can make a responsive 2 columns layout for web, 1 column on tablet and mobile with it?
https://infima.dev/</p>
```<code><div class="container">
  <div class="row">
    <div class="col col--6">
      <div class="col-demo">6</div>
    </div>
    <div class="col col--6">
      <div class="col-demo">6</div>
    </div>
  </div>
</div>
</code>```

Body:
How we can make a responsive 2 columns layout for web, 1 column on tablet and mobile with it?
https://infima.dev/

6

6


问:
ExecuteReader: Connection property has not been initialized
I am new to C# and I have been trying to create a login using ADO.NET and WinForm but when I try logging in I get this error.

How do I solve this problem?

```<code>if (txtpassword.Text != string.Empty || txtusername.Text != string.Empty)
            {

                cmd = new SqlCommand("select * from LoginTable where username='" + txtusername.Text + "' and password='" + txtpassword.Text + "'", cn);
                dr = cmd.ExecuteReader();
                if (dr.Read())
                {
                    dr.Close();
                    this.Hide();
                    Home home = new Home();
                    home.ShowDialog();
                }
                else
                {
                    dr.Close();
                    MessageBox.Show("No Account avilable with this username and password ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }

</code>```

Body:
I am new to C# and I have been trying to create a login using ADO.NET and WinForm but when I try logging in I get this error.

How do I solve this problem?

if (txtpassword.Text != string.Empty || txtusername.Text != string.Empty)
            {

                cmd = new SqlCommand("select * from LoginTable where username='" + txtusername.Text + "' and password='" + txtpassword.Text + "'", cn);
                dr = cmd.ExecuteReader();
                if (dr.Read())
                {
                    dr.Close();
                    this.Hide();
                    Home home = new Home();
                    home.ShowDialog();
                }
                else
                {
                    dr.Close();
                    MessageBox.Show("No Account avilable with this username and password ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }


问:
AWS: Unhealthy target group can block a running task?
I'm new to AWS. I have the following problem:
I have deployed a docker image containing an application that must run on port 21890.
I created a task containing the container of this image and associated a service to this task.
I put this task inside a load balancer and connected a target group to it.

Unfortunately if I go to see the state of the target group I see that this goes to Unhealthy and fails to associate a stable IP address to the running task.

However, going to see the logs on CloudWatch, I see that the task is running smoothly.
The health check procedure fails, but this does not mean that the task is killed.

Is there a way to interact with the running task even if the health check results in Unhealthy?


问:
PHP: Running stored procedure using INOUT parameters returning SQLSTATE[22P02] error (PostgreSQL)
I am attempting to call a PostgreSQL PLpg/SQL stored procedure using PHP PDO, but cannot understand why I keep getting a SQLSTATE[22P02] error:

'Fatal error: Uncaught PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type integer: ""'

The code is as follows:

```<code>      $v_record_process =  $v_pdo->prepare
                              (  "CALL business_layer_thick_db.create_update_incident
                                          (  p_id                       => :p_id,
                                             p_received_date         => :p_received_date,
                                             p_incident_date_time    => :p_incident_date_time,
                                             p_service_id            => :p_service_id,
                                             p_school_id             => :p_school_id
                                          );
                                 "
                              );

      $v_id = (int)$_POST ["id"];
      $v_record_process->bindParam
         (  param:      ":p_id",
            var:        $v_id,
            type:       PDO::PARAM_INT | PDO::PARAM_INPUT_OUTPUT,
            maxLength:  9999999999
         );
      $v_record_process->bindValue
         (  param:   ":p_received_date",
            value:   $_POST ["received_date"]
         );
      $v_record_process->bindValue
         (  param:   ":p_incident_date_time",
            value:   $_POST ["incident_date_time"]
         );
      $v_record_process->bindValue
         (  param:   ":p_service_id",
            value:   $_POST ["service_id"]
         );
      $v_record_process->bindValue
         (  param:   ":p_school_id",
            value:   $_POST ["school_id"]
         );

      $v_record_process->execute ();
</code>```

The procedure executes fine in a standalone context, but for reference, this is the code for it:

```<code>CREATE OR REPLACE PROCEDURE business_layer_thick_db.create_update_incident
   ( INOUT  p_id                  data_layer_thick_db.incidents.id%type,
     IN     p_received_date       DATE,
     IN     p_incident_date_time  TIMESTAMP,
     IN     p_service_id          data_layer_thick_db.corporate_services.id%TYPE      DEFAULT NULL,
     IN     p_school_id           data_layer_thick_db.schools.id%TYPE                 DEFAULT NULL
   )
LANGUAGE plpgsql
AS
$PROC$
   BEGIN
      UPDATE data_layer_thick_db.incidents
         SET received_date      = p_received_date,
             incident_date_time = p_incident_date_time,
             service_id         = p_service_id,
             school_id          = p_school_id
       WHERE id = p_id;

      IF NOT FOUND
      THEN
         INSERT INTO data_layer_thick_db.incidents
            ( received_date,
              incident_date_time,
              service_id,
              school_id
            )
         VALUES
            ( p_received_date,
              p_incident_date_time,
              p_service_id,
              p_school_id
            )
         RETURNING id INTO p_id;

         INSERT INTO data_layer_thick_db.incident_details
            ( incident_id )
         VALUES
            ( p_id );
      END IF;
   END;
$PROC$
</code>```

The code should process the submitted form and return the ID of the DB record back to the bound variable.

As mentioned, I have ran the procedure in a standalone context (using DBeaver) without issue. I have also left the type as PDO::PARAM_STR and attemped to bind the parameter to $_POST ["id"] without success. The variable could be empty, but produces the error in both empty and non-empty contexts.

The connection options for my DB connection is as follows:

```<code>                  [  PDO::ATTR_ERRMODE             => PDO::ERRMODE_EXCEPTION,
                     PDO::ATTR_DEFAULT_FETCH_MODE  => PDO::FETCH_ASSOC,
                     PDO::ATTR_EMULATE_PREPARES    => false,
                     PDO::ATTR_ORACLE_NULLS        => PDO::NULL_EMPTY_STRING
                  ]
</code>```

Many thanks.

Body:
I am attempting to call a PostgreSQL PLpg/SQL stored procedure using PHP PDO, but cannot understand why I keep getting a SQLSTATE[22P02] error:

'Fatal error: Uncaught PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type integer: ""'

The code is as follows:

      $v_record_process =  $v_pdo->prepare
                              (  "CALL business_layer_thick_db.create_update_incident
                                          (  p_id                       => :p_id,
                                             p_received_date         => :p_received_date,
                                             p_incident_date_time    => :p_incident_date_time,
                                             p_service_id            => :p_service_id,
                                             p_school_id             => :p_school_id
                                          );
                                 "
                              );

      $v_id = (int)$_POST ["id"];
      $v_record_process->bindParam
         (  param:      ":p_id",
            var:        $v_id,
            type:       PDO::PARAM_INT | PDO::PARAM_INPUT_OUTPUT,
            maxLength:  9999999999
         );
      $v_record_process->bindValue
         (  param:   ":p_received_date",
            value:   $_POST ["received_date"]
         );
      $v_record_process->bindValue
         (  param:   ":p_incident_date_time",
            value:   $_POST ["incident_date_time"]
         );
      $v_record_process->bindValue
         (  param:   ":p_service_id",
            value:   $_POST ["service_id"]
         );
      $v_record_process->bindValue
         (  param:   ":p_school_id",
            value:   $_POST ["school_id"]
         );

      $v_record_process->execute ();

The procedure executes fine in a standalone context, but for reference, this is the code for it:

CREATE OR REPLACE PROCEDURE business_layer_thick_db.create_update_incident
   ( INOUT  p_id                  data_layer_thick_db.incidents.id%type,
     IN     p_received_date       DATE,
     IN     p_incident_date_time  TIMESTAMP,
     IN     p_service_id          data_layer_thick_db.corporate_services.id%TYPE      DEFAULT NULL,
     IN     p_school_id           data_layer_thick_db.schools.id%TYPE                 DEFAULT NULL
   )
LANGUAGE plpgsql
AS
$PROC$
   BEGIN
      UPDATE data_layer_thick_db.incidents
         SET received_date      = p_received_date,
             incident_date_time = p_incident_date_time,
             service_id         = p_service_id,
             school_id          = p_school_id
       WHERE id = p_id;

      IF NOT FOUND
      THEN
         INSERT INTO data_layer_thick_db.incidents
            ( received_date,
              incident_date_time,
              service_id,
              school_id
            )
         VALUES
            ( p_received_date,
              p_incident_date_time,
              p_service_id,
              p_school_id
            )
         RETURNING id INTO p_id;

         INSERT INTO data_layer_thick_db.incident_details
            ( incident_id )
         VALUES
            ( p_id );
      END IF;
   END;
$PROC$

The code should process the submitted form and return the ID of the DB record back to the bound variable.

As mentioned, I have ran the procedure in a standalone context (using DBeaver) without issue. I have also left the type as PDO::PARAM_STR and attemped to bind the parameter to $_POST ["id"] without success. The variable could be empty, but produces the error in both empty and non-empty contexts.

The connection options for my DB connection is as follows:

                  [  PDO::ATTR_ERRMODE             => PDO::ERRMODE_EXCEPTION,
                     PDO::ATTR_DEFAULT_FETCH_MODE  => PDO::FETCH_ASSOC,
                     PDO::ATTR_EMULATE_PREPARES    => false,
                     PDO::ATTR_ORACLE_NULLS        => PDO::NULL_EMPTY_STRING
                  ]

Many thanks.


问:
Deserialize base64 string to .NET object
I do reverse engineering for .NET app, based on Microsoft ResX Schema.
The app produces the result as below and saves it to the File.bat as a base64 string.

The base64 sting looks like this:

```<code>[encoded data, 4732 characters]
</code>```

This is one of the decompiled XML Microsoft ResX Schema files

<?xml version="1.0" encoding="utf-8"?>
<root>

  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
</root>

```
<p>I found only one place in de-compiled code with serialize method</p>
<pre class="lang-js prettyprint-override"><code>FileStream serializationStream = new FileStream(A_0, FileMode.OpenOrCreate);
            new BinaryFormatter((ISurrogateSelector) null, new StreamingContext(StreamingContextStates.File)).Serialize((Stream) serializationStream, (object) this.ᜀ.ᜀ);
            serializationStream.Flush();
            serializationStream.Close();

</code>```

And this is my playground where I set the base64 string
https://dotnetfiddle.net/wtd9OJ

Does anyone know how to convert (de-serialize) the string into an .NET object? Maybe another idea about how I can get readable information from the string?

I would really appreciate it. Thanks.

Body:
I do reverse engineering for .NET app, based on Microsoft ResX Schema.
The app produces the result as below and saves it to the File.bat as a base64 string.

The base64 sting looks like this:

[encoded data, 4732 characters]

This is one of the decompiled XML Microsoft ResX Schema files

<?xml version="1.0" encoding="utf-8"?>
<root>

  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
</root>

I found only one place in de-compiled code with serialize method

FileStream serializationStream = new FileStream(A_0, FileMode.OpenOrCreate);
            new BinaryFormatter((ISurrogateSelector) null, new StreamingContext(StreamingContextStates.File)).Serialize((Stream) serializationStream, (object) this.ᜀ.ᜀ);
            serializationStream.Flush();
            serializationStream.Close();

And this is my playground where I set the base64 string
https://dotnetfiddle.net/wtd9OJ

Does anyone know how to convert (de-serialize) the string into an .NET object? Maybe another idea about how I can get readable information from the string?

I would really appreciate it. Thanks.


问:
I want to classify all result acquisition of paginated list acquisition API in Go language

Assumptions

I'm having trouble classifying all the results of the paginated list acquisition API in Go language, so please show me an implementation example.
This post is multi post. Other post is in Japanese below.

https://ja.stackoverflow.com/questions/92728

https://teratail.com/questions/b3mu9w40b2so3l

What I want to achieve

When there was a paginated list acquisition method (=ListSomething) with a request/response object like the following,
I want to create a class to get all the results of that.

// request request object
type request struct {
nextToken *string
pageSize int
}

// response response object
type response struct {
nextToken *string
rows[]interface{}
}

// MAX the maximum value of the paginated list
var MAX = 20

// ListSomething sample method for getting a paginated list
// Output up to 20 number sequences (0~) for the specified pageSize
func ListSomething(request request) response {
var rows[]interface{}
var nextToken *string

offset, _ := strconv.Atoi(*request.nextToken)
limit := offset + request.pageSize
if limit > MAX {
limit = MAX
nextToken = nil
} else {
limitStr := strconv.Itoa(limit)
nextToken = &limitStr
}
for i := offset; i < limit; i++ {
rows = append(rows, i)
}
return response {
rows: rows,
nextToken: nextToken,
}
}
```
<h3>Problem/Error Message</h3>
<p>I have the image below as an image of the class, but I can't think of a good way to abstract methods and request/response objects.</p>
<pre class="lang-golang prettyprint-override"><code>// Looper paginated list acquisition class
type Looper struct {
     // abstracted methods and request/response objects
}

// New Looper Looper constructor
func NewLooper(/* abstracted method or request/response object */) *Looper{
     return &Looper{
         // abstracted methods and request/response objects
     }
}

// Loop until Loop response.nextToken == nil and return all results
func (l *Looper) Loop() []interface{} {
firstToken := "0"
nextToken := &firstToken
var ans [] interface {}

for {
response := abstracted method (
/* abstracted request */
)
ans = append(ans, response.rows...)
if response.nextToken == nil {
break
}
nextToken = response.nextToken
}
return ans
}
</code>```

ListSomethingA and ListSomethingB like the following methods for partial acquisition are the objects of abstraction. What they have in common is that requestA/requestB have nextToken and pageSize, and responseA/responseB have nextToken and rows member variables.

ListSomethingA(request requestA) responseA

ListSomethingB(request requestB) responseB

fmt.Println(NewLooper(/*ListSomethingA or responseA or requestA*/).Loop())
// output: [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19]
fmt.Println(NewLooper(/*ListSomethingB or responseB or requestB*/).Loop())
// output: [0 1 2 3 4 5 6 7 8 9]
```

Supplementary information (FW/tool version, etc.)

Go 1.19

Body:
Assumptions

I'm having trouble classifying all the results of the paginated list acquisition API in Go language, so please show me an implementation example.
This post is multi post. Other post is in Japanese below.

https://ja.stackoverflow.com/questions/92728

https://teratail.com/questions/b3mu9w40b2so3l

What I want to achieve

When there was a paginated list acquisition method (=ListSomething) with a request/response object like the following,
I want to create a class to get all the results of that.

// request request object
type request struct {
nextToken *string
pageSize int
}

// response response object
type response struct {
nextToken *string
rows[]interface{}
}

// MAX the maximum value of the paginated list
var MAX = 20

// ListSomething sample method for getting a paginated list
// Output up to 20 number sequences (0~) for the specified pageSize
func ListSomething(request request) response {
var rows[]interface{}
var nextToken *string

offset, _ := strconv.Atoi(*request.nextToken)
limit := offset + request.pageSize
if limit > MAX {
limit = MAX
nextToken = nil
} else {
limitStr := strconv.Itoa(limit)
nextToken = &limitStr
}
for i := offset; i < limit; i++ {
rows = append(rows, i)
}
return response {
rows: rows,
nextToken: nextToken,
}
}

Problem/Error Message

I have the image below as an image of the class, but I can't think of a good way to abstract methods and request/response objects.

// Looper paginated list acquisition class
type Looper struct {
     // abstracted methods and request/response objects
}

// New Looper Looper constructor
func NewLooper(/* abstracted method or request/response object */) *Looper{
     return &Looper{
         // abstracted methods and request/response objects
     }
}

// Loop until Loop response.nextToken == nil and return all results
func (l *Looper) Loop() []interface{} {
firstToken := "0"
nextToken := &firstToken
var ans [] interface {}

for {
response := abstracted method (
/* abstracted request */
)
ans = append(ans, response.rows...)
if response.nextToken == nil {
break
}
nextToken = response.nextToken
}
return ans
}

ListSomethingA and ListSomethingB like the following methods for partial acquisition are the objects of abstraction. What they have in common is that requestA/requestB have nextToken and pageSize, and responseA/responseB have nextToken and rows member variables.

ListSomethingA(request requestA) responseA

ListSomethingB(request requestB) responseB

fmt.Println(NewLooper(/*ListSomethingA or responseA or requestA*/).Loop())
// output: [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19]
fmt.Println(NewLooper(/*ListSomethingB or responseB or requestB*/).Loop())
// output: [0 1 2 3 4 5 6 7 8 9]

Supplementary information (FW/tool version, etc.)

Go 1.19


问:
OAuth consent screen not showing app name
I need to access Google Sheets for my users, I set up the consent screen as recommended, verified domains, set up site integration. Submitted a request to publish my app and got a recommendation from google in an email asking for the name of my app on the consent screen. I can’t achieve this in any way, but what’s most interesting, the name of the application is there when I run the project on the localhost, when the project is launched on the domain, it shows the url

This thread discusses the same problem, but no answer

https://groups.google.com/g/google-cloud-dev/c/kRpnA6Jnz0A

I tried to create a new OAuth 2.0 Client but it didn't help, I also asked for information in the Google response email, but they ignore these requests


问:
How does a React component listen to global state changes and perform side effects without rendering the component?
We use the useEffect hook to listen to global state changes and perform side effects based on the global state value.
This however re-renders the component every time the global state changes which is hard on performance.

To prevent the entire component from re-rendering. We have put the side effect inside a component that renders nothing. This however feels like a hack.

Here is a demonstration in pseudo code:

function Demo(): JSX.Element {
  return (

      <DemoSideEffects />
      ... a large amount of content that is expensive to render

  );
}

/**
 * This component will re-render when isFetchingData changes value.
 * Its positioned inside this component to avoid re-rendering the entire <Demo> component.
 */
function DemoSideEffects(): null {
  const { isFetchingData, revalidate } = useGlobalState();

  useEffect(() => {
    if (!isFetchingData) {
      revalidate();
    }
  }, [isFetchingData]);

  return null;
}
```

Is there a better solution to this?

Body:
We use the useEffect hook to listen to global state changes and perform side effects based on the global state value.
This however re-renders the component every time the global state changes which is hard on performance.

To prevent the entire component from re-rendering. We have put the side effect inside a component that renders nothing. This however feels like a hack.

Here is a demonstration in pseudo code:

function Demo(): JSX.Element {
  return (

      <DemoSideEffects />
      ... a large amount of content that is expensive to render

  );
}

/**
 * This component will re-render when isFetchingData changes value.
 * Its positioned inside this component to avoid re-rendering the entire <Demo> component.
 */
function DemoSideEffects(): null {
  const { isFetchingData, revalidate } = useGlobalState();

  useEffect(() => {
    if (!isFetchingData) {
      revalidate();
    }
  }, [isFetchingData]);

  return null;
}

Is there a better solution to this?


问:
Deploying affected apps dynamically in GitLabCI
I'm using Nx monorepo, my goal is to deploy all affected apps to openshift using GitLabCI.

I'm running
nx affected:apps --base=main~1

And getting all the apps that changed in the last commit, now,want to excecute a deploy job for each app that changed. The script of each deploy is the same, the only thing that is changing is the app name (which is an env variable in the script)

How can i dynamicly excecute the job for each app with the diffrent $APP variavle?


问:
create procedure for correct DB data from xlsx (cursors?)
As title, I was wondering if is possible to create a MySQL procedure that change some existing data by checking an xlsx file.
For example, I have a DB with thousands records, and several columns, but few columns only in certain cases contains wrong data.
I have an excel correction table like this.

old column 1
old column 2
new column 1
new column 2

9f9rgg
hf4f
Smith
27

gfhgfg
bv3u
Johnson
22

fghgfh
sduf
Williams
35

4355gt
xndo
Brown
34

g74f66
fd37
Jones
23

8rhg9e
cvxn
Garcia
30

I'd like to make a query, maybe a procedure is better, that check for old values replacing them with new values, basing on this table.
After some searches I read about those "Cursors" I think it could works but I miss something.
Am I going in the right way?

PS: In the preview I see the table correctly, I don't understand why isn't correctly showed after post creation.
By the way here is the table in HTML format so you can run it and see what do I mean.

old column 1
old column 2
new column 1
new column 2

d8ag8gsd
fff3f3
Smith
27

54t54t
reeee
Johnson
22

t54t5t
tetght
Williams
35

t545t5t
thtrgc
Brown
34

jkhgfy
5654gt
Jones
23

65y6th
5jju7s
Garcia
30

```


问:
Command "node app.js" works but not for "npm run dev" when they basically run the same command
So I have an app.js like this:

```<code>const express = require('express');
const app = express();
const axios = require('axios');
const dotenv = require("dotenv");
dotenv.config();

app.get("/accessToken", async (req, res) => {
    const clientId = "er234sfa";
    const clientSecret = "ce0f6dawdzca3222daa234cc43eaf5f42642";
    const url = "https://sso-apigw-int.dti.co.id/auth/realms/3scale-dev/protocol/openid-connect/token";

    const base64 = btoa(clientId + ":" + clientSecret);
    let accessToken = "";
    process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';

    await axios({
        method: 'post',
        url: url,
        headers: {
            "Content-Type": "application/x-www-form-urlencoded",
            "Authorization": `Basic ${base64}`
        },
        data: {
            "grant_type": "client_credentials"
        }
    })
        .then(response => {
            accessToken = response.data.access_token;
            console.log('access_token: ', accessToken);
        })
        .catch(error => {
            console.log("error: ", error);
        })

    res.setHeader('Access-Control-Allow-Origin', '*');
    res.json({
        access_token: accessToken
    });
});

app.listen(3100, () => {console.log(`Node JS is listening on port: 3100`)});
</code>```

My package.json looks like this:

```<code>{
  "name": "backend-api-project",
  "version": "1.0.0",
  "description": "A Node JS API",
  "main": "app.js",
  "scripts": {
    "dev": "node app.js"
  },
  "keywords": [
    "node",
    "api"
  ],
  "author": "Sen",
  "license": "ISC",
  "dependencies": {
    "axios": "^1.1.3",
    "dotenv": "^16.0.0",
    "express": "^4.17.3",
    "https-proxy-agent": "^5.0.1",
    "morgan": "^1.10.0",
    "mysql": "^2.18.1"
  }
}
</code>```

But in terminal when I run command "node app.js", it will work when I call localhost:3100/accessToken and it will send me a response that gives an access token
However when I run command "npm run dev" in terminal, it will not work and show error like this:

```<code>error:  AxiosError: socket hang up
    at Function.AxiosError.from (C:\Github\SPECTA\backend-api-project\node_modules\axios\dist\node\axios.cjs:725:14)
    at RedirectableRequest.handleRequestError (C:\Github\SPECTA\backend-api-project\node_modules\axios\dist\node\axios.cjs:2467:25)
    at RedirectableRequest.emit (node:events:520:28)
    at ClientRequest.eventHandlers.<computed> (C:\Github\SPECTA\backend-api-project\node_modules\follow-redirects\index.js:14:24)
    at ClientRequest.emit (node:events:520:28)
    at Socket.socketOnEnd (node:_http_client:466:9)
    at Socket.emit (node:events:532:35)
    at endReadableNT (node:internal/streams/readable:1346:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'ECONNRESET',
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [Function: httpAdapter],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    env: { FormData: [Function], Blob: null },
    validateStatus: [Function: validateStatus],
    headers: AxiosHeaders {
      'Content-Type': 'application/x-www-form-urlencoded',
      Authorization: 'Basic MgeODg2YWszYjAaWdjI0NadOWNjNDNwdaY1ZjhmMmU2NDI=',
      'Access-Control-Allow-Origin': '*',
      'User-Agent': 'axios/1.1.3',
      'Content-Length': '29',
      'Accept-Encoding': 'gzip, deflate, br',
      [Symbol(defaults)]: [Object]
    },
    method: 'post',
    url: 'https://sso-apigw-int.dti.co.id/auth/realms/3scale-dev/protocol/openid-connect/token',
    data: 'grant_type=client_credentials'
  },
  request: <ref *1> Writable {
    _writableState: WritableState {
      objectMode: false,
      highWaterMark: 16384,
      finalCalled: false,
      needDrain: false,
      ending: false,
      ended: false,
      finished: false,
      destroyed: false,
      decodeStrings: true,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: true,
      bufferProcessing: false,
      onwrite: [Function: bound onwrite],
      writecb: null,
      writelen: 0,
      afterWriteTickInfo: null,
      buffered: [],
      bufferedIndex: 0,
      allBuffers: true,
      allNoop: true,
      pendingcb: 0,
      constructed: true,
      prefinished: false,
      errorEmitted: false,
      emitClose: true,
      autoDestroy: true,
      errored: null,
      closed: false,
      closeEmitted: false,
      [Symbol(kOnFinished)]: []
    },
    _events: [Object: null prototype] {
      response: [Function: handleResponse],
      error: [Function: handleRequestError],
      socket: [Function: handleRequestSocket]
    },
    _eventsCount: 3,
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: Infinity,
      protocol: 'http:',
      path: 'https://sso-apigw-int.dti.co.id/auth/realms/3scale-dev/protocol/openid-connect/token',
      method: 'POST',
      headers: [Object: null prototype],
      agents: [Object],
      auth: undefined,
      beforeRedirect: [Function: dispatchBeforeRedirect],
      beforeRedirects: [Object],
      hostname: 'proxy.intra.bca.co.id',
      port: '8080',
      agent: undefined,
      nativeProtocols: [Object],
      pathname: 'https://sso-apigw-int.dti.co.id/auth/realms/3scale-dev/protocol/openid-connect/token'
    },
    _ended: true,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 29,
    _requestBodyBuffers: [ [Object] ],
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: null,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: false,
      socket: [Socket],
      _header: 'POST https://sso-apigw-int.dti.co.id/auth/realms/3scale-dev/protocol/openid-connect/token HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'Content-Type: application/x-www-form-urlencoded\r\n' +
        'Authorization: Basic MgeODg2YWszYjAaWdjI0NadOWNjNDNwdaY1ZjhmMmU2NDI=\r\n' +
        'Access-Control-Allow-Origin: *\r\n' +
        'User-Agent: axios/1.1.3\r\n' +
        'Content-Length: 29\r\n' +
        'Accept-Encoding: gzip, deflate, br\r\n' +
        'host: sso-apigw-int.dti.co.id\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: 'https://sso-apigw-int.dti.co.id/auth/realms/3scale-dev/protocol/openid-connect/token',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'proxy.intra.bca.co.id',
      protocol: 'http:',
      _redirectable: [Circular *1],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    _currentUrl: 'https://sso-apigw-int.dti.co.id/auth/realms/3scale-dev/protocol/openid-connect/token',
    [Symbol(kCapture)]: false
  },
  cause: Error: socket hang up
      at connResetException (node:internal/errors:691:14)
      at Socket.socketOnEnd (node:_http_client:466:23)
      at Socket.emit (node:events:532:35)
      at endReadableNT (node:internal/streams/readable:1346:12)
      at processTicksAndRejections (node:internal/process/task_queues:83:21) {
    code: 'ECONNRESET'
  }
}
</code>```

Anyone have any idea to solve it and why? Since command "npm run dev" and "node app.js" both of them run "node app.js", why would "npm run dev" doesn't work? Any solution?

Body:
So I have an app.js like this:

const express = require('express');
const app = express();
const axios = require('axios');
const dotenv = require("dotenv");
dotenv.config();

app.get("/accessToken", async (req, res) => {
    const clientId = "er234sfa";
    const clientSecret = "ce0f6dawdzca3222daa234cc43eaf5f42642";
    const url = "https://sso-apigw-int.dti.co.id/auth/realms/3scale-dev/protocol/openid-connect/token";

    const base64 = btoa(clientId + ":" + clientSecret);
    let accessToken = "";
    process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';

    await axios({
        method: 'post',
        url: url,
        headers: {
            "Content-Type": "application/x-www-form-urlencoded",
            "Authorization": `Basic ${base64}`
        },
        data: {
            "grant_type": "client_credentials"
        }
    })
        .then(response => {
            accessToken = response.data.access_token;
            console.log('access_token: ', accessToken);
        })
        .catch(error => {
            console.log("error: ", error);
        })

    res.setHeader('Access-Control-Allow-Origin', '*');
    res.json({
        access_token: accessToken
    });
});

app.listen(3100, () => {console.log(`Node JS is listening on port: 3100`)});

My package.json looks like this:

{
  "name": "backend-api-project",
  "version": "1.0.0",
  "description": "A Node JS API",
  "main": "app.js",
  "scripts": {
    "dev": "node app.js"
  },
  "keywords": [
    "node",
    "api"
  ],
  "author": "Sen",
  "license": "ISC",
  "dependencies": {
    "axios": "^1.1.3",
    "dotenv": "^16.0.0",
    "express": "^4.17.3",
    "https-proxy-agent": "^5.0.1",
    "morgan": "^1.10.0",
    "mysql": "^2.18.1"
  }
}

But in terminal when I run command "node app.js", it will work when I call localhost:3100/accessToken and it will send me a response that gives an access token
However when I run command "npm run dev" in terminal, it will not work and show error like this:

error:  AxiosError: socket hang up
    at Function.AxiosError.from (C:\Github\SPECTA\backend-api-project\node_modules\axios\dist\node\axios.cjs:725:14)
    at RedirectableRequest.handleRequestError (C:\Github\SPECTA\backend-api-project\node_modules\axios\dist\node\axios.cjs:2467:25)
    at RedirectableRequest.emit (node:events:520:28)
    at ClientRequest.eventHandlers.<computed> (C:\Github\SPECTA\backend-api-project\node_modules\follow-redirects\index.js:14:24)
    at ClientRequest.emit (node:events:520:28)
    at Socket.socketOnEnd (node:_http_client:466:9)
    at Socket.emit (node:events:532:35)
    at endReadableNT (node:internal/streams/readable:1346:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'ECONNRESET',
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [Function: httpAdapter],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    env: { FormData: [Function], Blob: null },
    validateStatus: [Function: validateStatus],
    headers: AxiosHeaders {
      'Content-Type': 'application/x-www-form-urlencoded',
      Authorization: 'Basic MgeODg2YWszYjAaWdjI0NadOWNjNDNwdaY1ZjhmMmU2NDI=',
      'Access-Control-Allow-Origin': '*',
      'User-Agent': 'axios/1.1.3',
      'Content-Length': '29',
      'Accept-Encoding': 'gzip, deflate, br',
      [Symbol(defaults)]: [Object]
    },
    method: 'post',
    url: 'https://sso-apigw-int.dti.co.id/auth/realms/3scale-dev/protocol/openid-connect/token',
    data: 'grant_type=client_credentials'
  },
  request: <ref *1> Writable {
    _writableState: WritableState {
      objectMode: false,
      highWaterMark: 16384,
      finalCalled: false,
      needDrain: false,
      ending: false,
      ended: false,
      finished: false,
      destroyed: false,
      decodeStrings: true,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: true,
      bufferProcessing: false,
      onwrite: [Function: bound onwrite],
      writecb: null,
      writelen: 0,
      afterWriteTickInfo: null,
      buffered: [],
      bufferedIndex: 0,
      allBuffers: true,
      allNoop: true,
      pendingcb: 0,
      constructed: true,
      prefinished: false,
      errorEmitted: false,
      emitClose: true,
      autoDestroy: true,
      errored: null,
      closed: false,
      closeEmitted: false,
      [Symbol(kOnFinished)]: []
    },
    _events: [Object: null prototype] {
      response: [Function: handleResponse],
      error: [Function: handleRequestError],
      socket: [Function: handleRequestSocket]
    },
    _eventsCount: 3,
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: Infinity,
      protocol: 'http:',
      path: 'https://sso-apigw-int.dti.co.id/auth/realms/3scale-dev/protocol/openid-connect/token',
      method: 'POST',
      headers: [Object: null prototype],
      agents: [Object],
      auth: undefined,
      beforeRedirect: [Function: dispatchBeforeRedirect],
      beforeRedirects: [Object],
      hostname: 'proxy.intra.bca.co.id',
      port: '8080',
      agent: undefined,
      nativeProtocols: [Object],
      pathname: 'https://sso-apigw-int.dti.co.id/auth/realms/3scale-dev/protocol/openid-connect/token'
    },
    _ended: true,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 29,
    _requestBodyBuffers: [ [Object] ],
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: null,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: false,
      socket: [Socket],
      _header: 'POST https://sso-apigw-int.dti.co.id/auth/realms/3scale-dev/protocol/openid-connect/token HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'Content-Type: application/x-www-form-urlencoded\r\n' +
        'Authorization: Basic MgeODg2YWszYjAaWdjI0NadOWNjNDNwdaY1ZjhmMmU2NDI=\r\n' +
        'Access-Control-Allow-Origin: *\r\n' +
        'User-Agent: axios/1.1.3\r\n' +
        'Content-Length: 29\r\n' +
        'Accept-Encoding: gzip, deflate, br\r\n' +
        'host: sso-apigw-int.dti.co.id\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: 'https://sso-apigw-int.dti.co.id/auth/realms/3scale-dev/protocol/openid-connect/token',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'proxy.intra.bca.co.id',
      protocol: 'http:',
      _redirectable: [Circular *1],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    _currentUrl: 'https://sso-apigw-int.dti.co.id/auth/realms/3scale-dev/protocol/openid-connect/token',
    [Symbol(kCapture)]: false
  },
  cause: Error: socket hang up
      at connResetException (node:internal/errors:691:14)
      at Socket.socketOnEnd (node:_http_client:466:23)
      at Socket.emit (node:events:532:35)
      at endReadableNT (node:internal/streams/readable:1346:12)
      at processTicksAndRejections (node:internal/process/task_queues:83:21) {
    code: 'ECONNRESET'
  }
}

Anyone have any idea to solve it and why? Since command "npm run dev" and "node app.js" both of them run "node app.js", why would "npm run dev" doesn't work? Any solution?


问:
List index out of range error for DS1820 sensor on raspberry pi
I'm getting a list index out of range error (see below) after running my code for several hours.

tempdata is the temperature data taken straight out of the w1_slave file. So before the split inhalt looks like this:

And after the split I only get t=21375. When I test everything with print statements it works fine so I dont really get the error. Wires and everything is connected right.

```<code>while 1:
    time.sleep(2)
    tempfile = open("/sys/bus/w1/devices/28-00000dc4a470/w1_slave")
    inhalt = tempfile.read()
    tempfile.close()
    tempdata = inhalt.split("\n")[1].split(" ")[9]
    temperatur = float(tempdata[2:])
    temperatur = temperatur/1000

    Timenow = datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')
    STRtime = Timenow
    client = InfluxDBClient(host = "10.255.65.214", port=8086)

    client.switch_database("raspberry")

    offset = timedelta(hours=-1)
    neue = datetime.now().strftime('%Y-%m-%dT%H:%M:%SZ')

    sendPayload = []

    Temp = {
        "measurement": "Temperature",
        "tags": {
            "total": "all"
        },
        "time": Timenow,
        "fields": {
            'Degree': temperatur,

        }
        }

    TimestamP = {
        "measurement": "Timestamp",
        "tags": {
            "total": "all"
        },
        "time": Timenow,
        "fields": {
            'Time': neue,
        }
        }
    sendPayload.append(Temp)
    sendPayload.append(TimestamP)
    client.write_points(sendPayload)
</code>```

Body:
I'm getting a list index out of range error (see below) after running my code for several hours.

tempdata is the temperature data taken straight out of the w1_slave file. So before the split inhalt looks like this:

And after the split I only get t=21375. When I test everything with print statements it works fine so I dont really get the error. Wires and everything is connected right.

while 1:
    time.sleep(2)
    tempfile = open("/sys/bus/w1/devices/28-00000dc4a470/w1_slave")
    inhalt = tempfile.read()
    tempfile.close()
    tempdata = inhalt.split("\n")[1].split(" ")[9]
    temperatur = float(tempdata[2:])
    temperatur = temperatur/1000

    Timenow = datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')
    STRtime = Timenow
    client = InfluxDBClient(host = "10.255.65.214", port=8086)

    client.switch_database("raspberry")

    offset = timedelta(hours=-1)
    neue = datetime.now().strftime('%Y-%m-%dT%H:%M:%SZ')

    sendPayload = []

    Temp = {
        "measurement": "Temperature",
        "tags": {
            "total": "all"
        },
        "time": Timenow,
        "fields": {
            'Degree': temperatur,

        }
        }

    TimestamP = {
        "measurement": "Timestamp",
        "tags": {
            "total": "all"
        },
        "time": Timenow,
        "fields": {
            'Time': neue,
        }
        }
    sendPayload.append(Temp)
    sendPayload.append(TimestamP)
    client.write_points(sendPayload)


问:
Vmmem using all RAM
I have this problem:

https://www.minitool.com/news/vmmem-high-memory.html

except that it won't help. I made that .wslconfig settings everywhere, rebooted, but it still occurs. My problem is, after a while my filesystem under SWL becames unavailable, since vmmem start using all the ram and it enforces the system down to knees. I can shutdown - and restart WSL (3 of 5 times it works) but eventually I have to reboot the whole computer.
Is there a way limit its memory usage?

Title: Vmmem using all RAM


问:
How Can I get the coordinates of the vertices of all the GameObjects with an specific Tag and save them in a Json file?
I hope you are fine :)

I could get the vertices of one the elementes with the specific tag in my scene, nevertheless when I try to do it with a list of GameObjects (all the gameObjects with the tag "wallTag") it doesn't work.

Also I tryied to store the vertices into a json file but it doesn't work neither.

Thank you very much in advance for your help!

Have a great day!

```<code> using System;
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;

 public void Start()
     {

  walls = GameObject.FindGameObjectWithTag("wallTag");

         Transform wallTransform = walls.transform;

         Mesh wallMesh = walls.GetComponent<MeshFilter>().sharedMesh;

         Vector3[] vertices = wallMesh.vertices;

         var text = new System.Text.StringBuilder();

         int numVertices = vertices.Length;

         for (int i = 0; i < numVertices; i++)
         {
             Vector3 vertexWorldPosition = wallTransform.TransformPoint(vertices[i]);
             text.AppendLine($", ({vertexWorldPosition.x:0.00},{vertexWorldPosition.y:0.00},{vertexWorldPosition.z:0.00})");
         }

         Debug.Log($"vertices: ({text})");
     }
</code>```

I only could had the vertices of one of the GameObjects in a Log on the screen but I need to store all the vertices of all the GameObjects with the specified tag into a JSON file

Body:
I hope you are fine :)

I could get the vertices of one the elementes with the specific tag in my scene, nevertheless when I try to do it with a list of GameObjects (all the gameObjects with the tag "wallTag") it doesn't work.

Also I tryied to store the vertices into a json file but it doesn't work neither.

Thank you very much in advance for your help!

Have a great day!

 using System;
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;

 public void Start()
     {

  walls = GameObject.FindGameObjectWithTag("wallTag");

         Transform wallTransform = walls.transform;

         Mesh wallMesh = walls.GetComponent<MeshFilter>().sharedMesh;

         Vector3[] vertices = wallMesh.vertices;

         var text = new System.Text.StringBuilder();

         int numVertices = vertices.Length;

         for (int i = 0; i < numVertices; i++)
         {
             Vector3 vertexWorldPosition = wallTransform.TransformPoint(vertices[i]);
             text.AppendLine($", ({vertexWorldPosition.x:0.00},{vertexWorldPosition.y:0.00},{vertexWorldPosition.z:0.00})");
         }

         Debug.Log($"vertices: ({text})");
     }

I only could had the vertices of one of the GameObjects in a Log on the screen but I need to store all the vertices of all the GameObjects with the specified tag into a JSON file


问:
Credentials Provider session always return null with create-t3-stack (NextJS, NextAuth)
So im trying to make the login page work with email and password from the DB and when i click to submit the values im always having the session as null. This is what im doing:

```<code>CredentialsProvider({
      name: "Credentials",
      credentials: {},
      async authorize(credentials: any) {
        //check user
        const user: any = await prisma.user.findUnique({
          where: {
            email: credentials.email,
          },
        });

        if (!user) {
          throw new Error("No user found");
        }
        console.log("user credentials", user);
        const checkPassword = await compare(
          credentials.password,
          user?.password
        );
        console.log("user?.password", user?.password);

        if (!checkPassword || user.email !== credentials.email) {
          throw new Error("Password or Email dont match");
        }

        return user;
      },
    }),
  ],
  // Include user.id on session
  callbacks: {
    session({ session, user }) {
      if (session.user) {
        session.user.id = user.id;
      }
      return session;
    },
  },
  session: {
    strategy: "jwt",
    },
  },
  jwt: {
    secret: "test",
  },
  secret: "test",
  // pages: {
  //   signIn: "/",
  //   newUser: "/signin",

  //   signOut: "/signout",
  //   error: '/error'
  // },
</code>```

So on my signin page i invoke the signIn method:

```<code>async function onSubmitLoginValues(values: LoginValuesProps): Promise<any> {
    const result = await signIn("credentials", {
      email: values?.email,
      password: values?.password,
      redirect: false,
      callbackUrl: "/",
    });
    console.log("result", result);
    if (result?.ok) router.push("/");
    return result;
  }
</code>```

result returns:
error: null
ok: true
status: 200
url: "http://localhost:3000/"

On getServerSideProps i tried to call it in two different ways:

```<code>export const getServerSideProps = async (ctx: GetServerSidePropsContext) => {
const session = await getServerAuthSession(ctx);
if (!session) {
  return {
    redirect: { destination: "/signin", permanent: false },
  };
}
return {
  props: {
    session,
  },
};

//OR
console.log("ctx", ctx);
const response = await fetch("http://localhost:3000/api/auth", {
  method: "GET",
  credentials: "include",
  //@ts-ignore
  headers: {
    Cookie: ctx.req.headers.cookie,
  },
});
console.log("RESPOSNDE", response.json());

if (!response) {
  return {
    redirect: { destination: "/signin", permanent: false },
  };
}
const data = await response.json();
return { props: { data } };
};
</code>```

Did some research but none of this approches worked for me. If anyone faced a similar problem, i would be very grateful since i have been debugging this since yesterday

Body:
So im trying to make the login page work with email and password from the DB and when i click to submit the values im always having the session as null. This is what im doing:

CredentialsProvider({
      name: "Credentials",
      credentials: {},
      async authorize(credentials: any) {
        //check user
        const user: any = await prisma.user.findUnique({
          where: {
            email: credentials.email,
          },
        });

        if (!user) {
          throw new Error("No user found");
        }
        console.log("user credentials", user);
        const checkPassword = await compare(
          credentials.password,
          user?.password
        );
        console.log("user?.password", user?.password);

        if (!checkPassword || user.email !== credentials.email) {
          throw new Error("Password or Email dont match");
        }

        return user;
      },
    }),
  ],
  // Include user.id on session
  callbacks: {
    session({ session, user }) {
      if (session.user) {
        session.user.id = user.id;
      }
      return session;
    },
  },
  session: {
    strategy: "jwt",
    },
  },
  jwt: {
    secret: "test",
  },
  secret: "test",
  // pages: {
  //   signIn: "/",
  //   newUser: "/signin",

  //   signOut: "/signout",
  //   error: '/error'
  // },

So on my signin page i invoke the signIn method:

async function onSubmitLoginValues(values: LoginValuesProps): Promise<any> {
    const result = await signIn("credentials", {
      email: values?.email,
      password: values?.password,
      redirect: false,
      callbackUrl: "/",
    });
    console.log("result", result);
    if (result?.ok) router.push("/");
    return result;
  }

result returns:
error: null
ok: true
status: 200
url: "http://localhost:3000/"

On getServerSideProps i tried to call it in two different ways:

export const getServerSideProps = async (ctx: GetServerSidePropsContext) => {
const session = await getServerAuthSession(ctx);
if (!session) {
  return {
    redirect: { destination: "/signin", permanent: false },
  };
}
return {
  props: {
    session,
  },
};

//OR
console.log("ctx", ctx);
const response = await fetch("http://localhost:3000/api/auth", {
  method: "GET",
  credentials: "include",
  //@ts-ignore
  headers: {
    Cookie: ctx.req.headers.cookie,
  },
});
console.log("RESPOSNDE", response.json());

if (!response) {
  return {
    redirect: { destination: "/signin", permanent: false },
  };
}
const data = await response.json();
return { props: { data } };
};

Did some research but none of this approches worked for me. If anyone faced a similar problem, i would be very grateful since i have been debugging this since yesterday


问:
Is it possible to open mutiple Flask service by using subprocess?
I want to create another flask service if some condition was met in main flask service.
code below is a example which i try to run but got error instead.

Flask version 2.2.2
Python 3.10

main.py

```<code>from flask import Flask
import subprocess

app = Flask(__name__)

@app.route('/')
def home():
    return "sss"

count = 0

@app.route('/chekc')
def sddsfdsfd():
    global count
    if count == 0:
        po = subprocess.Popen('python main2.py',shell=True)
        print(po.pid)
        count += 1
    return 'yoohoo'

if __name__ == "__main__":
    app.run(host='0.0.0.0',debug=True)
</code>```

main2.py

```<code>from flask import Flask

app = Flask(__name__)

@app.route('/view')
def edy():
    return "sss2"

if __name__ == "__main__":
    app.run(host='0.0.0.0',port=333,debug=False)
</code>```

While i expect to create new flask service after redirect to '/chekc' in port 333 i got error as shown below.

```<code>File "testdoubleflask\main2.py", line 13, in <module>
    app.run(host='0.0.0.0',port=333,debug=False)
  File "testdoubleflask\venv\lib\site-packages\flask\app.py", line 1188, in run
    run_simple(t.cast(str, host), port, self, **options)
  File "testdoubleflask\venv\lib\site-packages\werkzeug\serving.py", line 1071, in run_simple
    srv = make_server(
  File "testdoubleflask\venv\lib\site-packages\werkzeug\serving.py", line 852, in make_server
    return ThreadedWSGIServer(
  File "testdoubleflask\venv\lib\site-packages\werkzeug\serving.py", line 718, in __init__
    self.socket = socket.fromfd(fd, address_family, socket.SOCK_STREAM)
  File "AppData\Local\Programs\Python\Python310\lib\socket.py", line 545, in fromfd
    nfd = dup(fd)
OSError: [WinError 10038] An operation was attempted on something that is not a socket
</code>```

What should i do to solve this error?. Thank you.
PS.If i run both script separately it work fine.

Body:
I want to create another flask service if some condition was met in main flask service.
code below is a example which i try to run but got error instead.

Flask version 2.2.2
Python 3.10

main.py

from flask import Flask
import subprocess

app = Flask(__name__)

@app.route('/')
def home():
    return "sss"

count = 0

@app.route('/chekc')
def sddsfdsfd():
    global count
    if count == 0:
        po = subprocess.Popen('python main2.py',shell=True)
        print(po.pid)
        count += 1
    return 'yoohoo'

if __name__ == "__main__":
    app.run(host='0.0.0.0',debug=True)

main2.py

from flask import Flask

app = Flask(__name__)

@app.route('/view')
def edy():
    return "sss2"

if __name__ == "__main__":
    app.run(host='0.0.0.0',port=333,debug=False)

While i expect to create new flask service after redirect to '/chekc' in port 333 i got error as shown below.

File "testdoubleflask\main2.py", line 13, in <module>
    app.run(host='0.0.0.0',port=333,debug=False)
  File "testdoubleflask\venv\lib\site-packages\flask\app.py", line 1188, in run
    run_simple(t.cast(str, host), port, self, **options)
  File "testdoubleflask\venv\lib\site-packages\werkzeug\serving.py", line 1071, in run_simple
    srv = make_server(
  File "testdoubleflask\venv\lib\site-packages\werkzeug\serving.py", line 852, in make_server
    return ThreadedWSGIServer(
  File "testdoubleflask\venv\lib\site-packages\werkzeug\serving.py", line 718, in __init__
    self.socket = socket.fromfd(fd, address_family, socket.SOCK_STREAM)
  File "AppData\Local\Programs\Python\Python310\lib\socket.py", line 545, in fromfd
    nfd = dup(fd)
OSError: [WinError 10038] An operation was attempted on something that is not a socket

What should i do to solve this error?. Thank you.
PS.If i run both script separately it work fine.


问:
Winforms User Control that implements RUI IViewFor leads to an Error in VS Designer
I've developed an VB Library .Net 4.8 Any CPU with some User Controls and Reactive UI. I did not use the Lib for a Year. No i reopened the project and updated all Nuget Packages.

I have the following problem: When i try to drag a User Control, that implements the IViewFor Interface of ReactiveUI to another Control, Visual Studio removes that control from the toolbox and Shows an Error "Error while loading the Component...".

If i comment the IVIewFor Code in the Controls Code behind und rebuild the project, i can drag it to another control, without any problems.


问:
GCP Workload Identity (WLI) in JFrog Artifactory
Is it possible to organize GCP WLI in Jfrog Artifactory (7.47.11) in Helm chart 107.47.11? In the official docs I see: ‘useInstanceCredentials’ == true && use Kubernetes (or other) service account creds (no creds file). For enabling WLI I used the official GCP docs.

I'm wondering why I got error after:

Creation GCP SA and bucket;

Creation GKE cluster and Node pool with WLI option;

Binding WLI to SA;

Appling Helm chart with:

serviceAccount: {
 create: true,
 name: 'wli-sa',
 annotations: {
   'iam.gke.io/gcp-service-account': '$GCP_SA@$PROJECT_ID.iam.gserviceaccount.com',
 },
 automountServiceAccountToken: true,
},

type: 'google-storage-v2',
googleStorage: {
 endpoint: 'storage.googleapis.com',
 bucketName: '$BUCKET_NAME',
 path: '$PATH/filestore',
 bucketExists: true,
 useInstanceCredentials: true, # Main changes after deletion gcpServiceAccount section
},
```

If I return to using GCP SA, all will work correctly.

Body:
Is it possible to organize GCP WLI in Jfrog Artifactory (7.47.11) in Helm chart 107.47.11? In the official docs I see: ‘useInstanceCredentials’ == true && use Kubernetes (or other) service account creds (no creds file). For enabling WLI I used the official GCP docs.

I'm wondering why I got error after:

Creation GCP SA and bucket;

Creation GKE cluster and Node pool with WLI option;

Binding WLI to SA;

Appling Helm chart with:

serviceAccount: {
 create: true,
 name: 'wli-sa',
 annotations: {
   'iam.gke.io/gcp-service-account': '$GCP_SA@$PROJECT_ID.iam.gserviceaccount.com',
 },
 automountServiceAccountToken: true,
},

type: 'google-storage-v2',
googleStorage: {
 endpoint: 'storage.googleapis.com',
 bucketName: '$BUCKET_NAME',
 path: '$PATH/filestore',
 bucketExists: true,
 useInstanceCredentials: true, # Main changes after deletion gcpServiceAccount section
},

If I return to using GCP SA, all will work correctly.


问:
How check if file exists in shell script by ignoring case sensitivity?
I am passing fileName as an argument to shell script.
--fileName=abc
And my file is present as ABC in a directory.
How to check if file exists?</p>


问:
Eclipse (CDT) not running Builder
I have a C-project (in Eclipse 2020-09 4.17.0) where I want to run a Web-Builder (a simple batch file which called from a cmd-shell works fine) before running the C-Compiler.
The Web-Builder is supposed to look into three different folders (one outside the project, two inside the project) and process the HTML files found there into C-Code.
Therefore I set the Web-Builders options to Refresh the entire project after building and specified the three directories as Resource in the Build Options.
I activated all 4 checkboxes (run after clean, automatic and so on).

BUT: The builder is NOT run if I modify a file in the latter two directories. It is only run if I change one of the files in the first directory (the uppermost directory in the build options).

If I now change the Build-Options such that not the complete first directory but only its files are part of the specified resources, now I can change a file in the second directory and the first directory to get the Builder executed. But any modification of a file in the third directory will not trigger the rebuild.

If I now further modify the Build-Options such that not the second directory but only its files are part of the specified resources, now I can change a file in the third directory and the first two directories to get the Builder executed.

But actually, this is a nasty hack as any additional file added to one of the directories will now go under the radar and will not trigger rebuilds as any sane author will not guess, that he has to go to some hidden Builder -> Build Options -> Specify Resources to get the new file into the build process. Probably he/she/they would activate the whole directory instead again and thus inhibit further proper build processes.

HOW can I make Eclipse process all three directories correctly?

EDIT: Issue is also in Eclipse 2022-12.

Title: Eclipse (CDT) not running Builder