Title: Calculator with Stacks in C

Body:
good morning, I am making a calculator with a "Stack" of 10 positions in the "C" lenguage. What I have to do is, for example, I write the number "50", I press ENTER and that "50" must go to the first position "01". Then I write another number, for example "20" + ENTER and 20 should go to position "01", "50" goes up to "02" and so on, always after pressing ENTER. I am using the Gotoxy for this.

I can manage to print the first number in position "01" but after that I don't know how to proceed.
I'm new to programming so excuse me if I don't realize obvious things, I'm trying to learn so if you can give me a hand I would appreciate it. Here I leave the code in case you want to try it and get an idea of what I'm trying to do, thanks

#include <stdio.h>
#include <stdlib.h>
#include <windows.h>

void gotoxy(int x, int y);
void PilaPush();
void ImprimirPila();

int main() {
    printf(" ____________________________________________________\n");
    printf("|10:_________________________________________________|\r\n");
    printf("|09:_________________________________________________|\r\n");
    printf("|08:_________________________________________________|\r\n");
    printf("|07:_________________________________________________|\r\n");
    printf("|06:_________________________________________________|\r\n");
    printf("|05:_________________________________________________|\r\n");
    printf("|04:_________________________________________________|\r\n");
    printf("|03:_________________________________________________|\r\n");
    printf("|02:_________________________________________________|\r\n");
    printf("|01:_________________________________________________|\r\n");
    printf("|                                                    |\r\n");
    printf("|                                                    |\r\n");
    printf("|____________________________________________________|\r\n");
    printf("|_____1_____|_____2_____|_____3_____|__+__|__DROP[P]_|\r\n");
    printf("|_____4_____|_____5_____|_____6_____|__-__|__SWAP[S]_|\r\n");
    printf("|_____7_____|_____8_____|_____9_____|__*__|__DEL[D]__|\r\n");
    printf("|_____,_____|_____0_____|____EXE____|__/__|__NUM[N]__|\r\n");
    printf("|_____'_____|_ARRIBA[W]_|__ABAJO[Z]_|_____|_SWAP1[Q]_|\r\n");

    gotoxy(3, 12);
    PilaPush();
    ImprimirPila();
    getch();
    return 0;
}

void gotoxy(int x, int y) {
    HANDLE Ventana;
    Ventana = GetStdHandle(STD_OUTPUT_HANDLE);
    COORD Coordenadas;
    Coordenadas.X = x;
    Coordenadas.Y = y;
    SetConsoleCursorPosition(Ventana, Coordenadas);
}

typedef struct Nodo {
    int elemento;
    struct Nodo *siguiente;
} Nodo;

// funciones para utilizar un manejador global
Nodo *primero = NULL;

// Insertar un nuevo nodo a la pila
void PilaPush() {
    Nodo *nuevo;
    // crear el nuevo Nodo.
    nuevo = (Nodo *)malloc(sizeof(Nodo));  // Asignar de forma dinamica un espacio de memoria al Nodo
    printf(" ");
    scanf("%d", &nuevo->elemento);
    // Agregar el nodo al principio de la Pila
    nuevo->siguiente = primero;  // El nuevo dato ahora es primero, que apunta a (NULL)

    primero = nuevo;  // Primero (NULL) ahora es el nuevo dato
}

// sacar un elemento de una pila
void ImprimirPila() {
    Nodo *actual = (Nodo *)malloc(sizeof(Nodo));
    actual = primero;
    if (primero != NULL) {
        while (actual != NULL) {
            gotoxy(9, 10);
            printf("%d", actual->elemento);
            actual = actual->siguiente;
            gotoxy(3, 12);
            printf("                                                  ");
            gotoxy(3, 12);
        }
    } else {
        printf("No hay ningun dato ");
    }
}


来源: stackexchange

问:
How to fix the problem when running"npx task createFieldSources"?
I follow the instructions in https://github.com/iden3/rapidsnark to complile the code.
When I try to run "npx task createFieldSources" in my ubuntu in wsl, I get the following errors:

```<code>superduper@DESKTOP-PC181T0:/mnt/d/github/4.prove_verify/circuits$ npm install

added 1 package, and audited 2 packages in 3s

found 0 vulnerabilities
superduper@DESKTOP-PC181T0:/mnt/d/github/4.prove_verify/circuits$ git submodule init
superduper@DESKTOP-PC181T0:/mnt/d/github/4.prove_verify/circuits$ git submodule update
superduper@DESKTOP-PC181T0:/mnt/d/github/4.prove_verify/circuits$ npx task createFieldSources
Error: Cannot find module './uws_linux_108'
Require stack:
- /home/superduper/.npm/_npx/366785b987801bcc/node_modules/hub.js/dist/index.js
- /home/superduper/.npm/_npx/366785b987801bcc/node_modules/task/src/index.js
- /home/superduper/.npm/_npx/366785b987801bcc/node_modules/task/bin/cmd.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at /home/superduper/.npm/_npx/366785b987801bcc/node_modules/hub.js/dist/index.js:239:14
    at Object.<anonymous> (/home/superduper/.npm/_npx/366785b987801bcc/node_modules/hub.js/dist/index.js:244:3)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/superduper/.npm/_npx/366785b987801bcc/node_modules/hub.js/dist/index.js',
    '/home/superduper/.npm/_npx/366785b987801bcc/node_modules/task/src/index.js',
    '/home/superduper/.npm/_npx/366785b987801bcc/node_modules/task/bin/cmd.js'
  ]
}
/home/superduper/.npm/_npx/366785b987801bcc/node_modules/hub.js/dist/index.js:246
$197449592_native.setNoop($197449592_noop)
                  ^

TypeError: Cannot read properties of undefined (reading 'setNoop')
    at Object.<anonymous> (/home/superduper/.npm/_npx/366785b987801bcc/node_modules/hub.js/dist/index.js:246:19)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/home/superduper/.npm/_npx/366785b987801bcc/node_modules/task/src/index.js:1:11)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)

Node.js v18.12.1
</code>```

How could I fix them?

ContentLicense: CC BY-SA 4.0

Body:
I follow the instructions in https://github.com/iden3/rapidsnark to complile the code.
When I try to run "npx task createFieldSources" in my ubuntu in wsl, I get the following errors:

superduper@DESKTOP-PC181T0:/mnt/d/github/4.prove_verify/circuits$ npm install

added 1 package, and audited 2 packages in 3s

found 0 vulnerabilities
superduper@DESKTOP-PC181T0:/mnt/d/github/4.prove_verify/circuits$ git submodule init
superduper@DESKTOP-PC181T0:/mnt/d/github/4.prove_verify/circuits$ git submodule update
superduper@DESKTOP-PC181T0:/mnt/d/github/4.prove_verify/circuits$ npx task createFieldSources
Error: Cannot find module './uws_linux_108'
Require stack:
- /home/superduper/.npm/_npx/366785b987801bcc/node_modules/hub.js/dist/index.js
- /home/superduper/.npm/_npx/366785b987801bcc/node_modules/task/src/index.js
- /home/superduper/.npm/_npx/366785b987801bcc/node_modules/task/bin/cmd.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at /home/superduper/.npm/_npx/366785b987801bcc/node_modules/hub.js/dist/index.js:239:14
    at Object.<anonymous> (/home/superduper/.npm/_npx/366785b987801bcc/node_modules/hub.js/dist/index.js:244:3)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/superduper/.npm/_npx/366785b987801bcc/node_modules/hub.js/dist/index.js',
    '/home/superduper/.npm/_npx/366785b987801bcc/node_modules/task/src/index.js',
    '/home/superduper/.npm/_npx/366785b987801bcc/node_modules/task/bin/cmd.js'
  ]
}
/home/superduper/.npm/_npx/366785b987801bcc/node_modules/hub.js/dist/index.js:246
$197449592_native.setNoop($197449592_noop)
                  ^

TypeError: Cannot read properties of undefined (reading 'setNoop')
    at Object.<anonymous> (/home/superduper/.npm/_npx/366785b987801bcc/node_modules/hub.js/dist/index.js:246:19)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/home/superduper/.npm/_npx/366785b987801bcc/node_modules/task/src/index.js:1:11)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)

Node.js v18.12.1

How could I fix them?


问:
How to store multiple values to array format in firebase?
How to  store multiple values in array format i have only multi select dialog field ,it show the value in null.

```<code>static final List<Member> _members = [
  Member(id: 1, name: "Golden Member"),
  Member(id: 2, name: "Silver Member "),]
</code>```
```<code>MultiSelectDialogField(
  buttonIcon: const Icon(Icons.arrow_drop_down),
  items: _items,
  // title:  Text(""),
  decoration: const BoxDecoration(
    borderRadius: BorderRadius
        .all(
        Radius
            .circular(
            5.0)),
  ),
  onConfirm: (
      results) {},
),
</code>```

So I want how to pass values in array in firebase.

Body:
How to  store multiple values in array format i have only multi select dialog field ,it show the value in null.

static final List<Member> _members = [
  Member(id: 1, name: "Golden Member"),
  Member(id: 2, name: "Silver Member "),]

MultiSelectDialogField(
  buttonIcon: const Icon(Icons.arrow_drop_down),
  items: _items,
  // title:  Text(""),
  decoration: const BoxDecoration(
    borderRadius: BorderRadius
        .all(
        Radius
            .circular(
            5.0)),
  ),
  onConfirm: (
      results) {},
),

So I want how to pass values in array in firebase.


问:
Why does my integer need to be final or effectively final?
So I'm making a simple version of bloons tower defense and I was making a method for the path that the balloons will follow, but it kept telling me that integer than I declared in the method needed to be final or effectively final. I can fix it by using the quick fix which turns it into a final integer array, but why does it need to do this?

Here's my method:

```<code>public static void balloonPath(ImageView balloon){
    balloon.toFront();

    int deltaX = 2;
    int deltaY = 0;

    AnimationTimer timer = new AnimationTimer() {
        @Override
        public void handle(long now) {

            if(balloon.getY() == 150 && balloon.getX() == 300){
                deltaX = 0;
                deltaY = 2;
            }
            if(balloon.getY() == 350 && balloon.getX() == 300){
                deltaX = 2;
                deltaY = 0;
            }
            if(balloon.getY() == 350 && balloon.getX() == 450){
                deltaX = 0;
                deltaY = -2;
            }
            if(balloon.getY() == 200 && balloon.getX() == 450){
                deltaX = 2;
                deltaY = 0;
            }
            if(balloon.getY() == 200 && balloon.getX() == 600){
                deltaX = 0;
                deltaY = -2;
            }
            if(balloon.getY() == 50 && balloon.getX() == 600){
                deltaX = 2;
                deltaY = 0;
            }
            if(balloon.getY() == 50 && balloon.getX() == 750){
                deltaX = 0;
                deltaY = 2;
            }
            if(balloon.getY() == 500 && balloon.getX() == 750){
                deltaX = -2;
                deltaY = 0;
            }
            if(balloon.getY() == 500 && balloon.getX() == 450){
                deltaX = 0;
                deltaY = 2;
            }
            if(balloon.getY() == 600 && balloon.getX() == 450){
                deltaX = -2;
                deltaY = 0;
            }
            if(balloon.getY() == 600 && balloon.getX() == 250){
                deltaX = 0;
                deltaY = -2;
            }
            if(balloon.getY() == 450 && balloon.getX() == 250){
                deltaX = -2;
                deltaY = 0;
            }

            balloon.setX(balloon.getX()+deltaX);
            balloon.setY(balloon.getY()+deltaY);

        }
    };
    timer.start();
}
</code>```

And the error it gives me (there's many for both deltaX and deltaY):
Variable 'deltaY' is accessed from within inner class, needs to be final or effectively final
Variable 'deltaY' is accessed from within inner class, needs to be final or effectively final

This is the method once I use the quick fix:

```<code>public static void balloonPath(ImageView balloon){
    balloon.toFront();

    final int[] deltaX = {2};
    final int[] deltaY = {0};

    AnimationTimer timer = new AnimationTimer() {
        @Override
        public void handle(long now) {

            if(balloon.getY() == 150 && balloon.getX() == 300){
                deltaX[0] = 0;
                deltaY[0] = 2;
            }
            if(balloon.getY() == 350 && balloon.getX() == 300){
                deltaX[0] = 2;
                deltaY[0] = 0;
            }
            if(balloon.getY() == 350 && balloon.getX() == 450){
                deltaX[0] = 0;
                deltaY[0] = -2;
            }
            if(balloon.getY() == 200 && balloon.getX() == 450){
                deltaX[0] = 2;
                deltaY[0] = 0;
            }
            if(balloon.getY() == 200 && balloon.getX() == 600){
                deltaX[0] = 0;
                deltaY[0] = -2;
            }
            if(balloon.getY() == 50 && balloon.getX() == 600){
                deltaX[0] = 2;
                deltaY[0] = 0;
            }
            if(balloon.getY() == 50 && balloon.getX() == 750){
                deltaX[0] = 0;
                deltaY[0] = 2;
            }
            if(balloon.getY() == 500 && balloon.getX() == 750){
                deltaX[0] = -2;
                deltaY[0] = 0;
            }
            if(balloon.getY() == 500 && balloon.getX() == 450){
                deltaX[0] = 0;
                deltaY[0] = 2;
            }
            if(balloon.getY() == 600 && balloon.getX() == 450){
                deltaX[0] = -2;
                deltaY[0] = 0;
            }
            if(balloon.getY() == 600 && balloon.getX() == 250){
                deltaX[0] = 0;
                deltaY[0] = -2;
            }
            if(balloon.getY() == 450 && balloon.getX() == 250){
                deltaX[0] = -2;
                deltaY[0] = 0;
            }

            balloon.setX(balloon.getX()+ deltaX[0]);
            balloon.setY(balloon.getY()+ deltaY[0]);

        }
    };
    timer.start();
}
</code>```

Body:
So I'm making a simple version of bloons tower defense and I was making a method for the path that the balloons will follow, but it kept telling me that integer than I declared in the method needed to be final or effectively final. I can fix it by using the quick fix which turns it into a final integer array, but why does it need to do this?

Here's my method:

public static void balloonPath(ImageView balloon){
    balloon.toFront();

    int deltaX = 2;
    int deltaY = 0;

    AnimationTimer timer = new AnimationTimer() {
        @Override
        public void handle(long now) {

            if(balloon.getY() == 150 && balloon.getX() == 300){
                deltaX = 0;
                deltaY = 2;
            }
            if(balloon.getY() == 350 && balloon.getX() == 300){
                deltaX = 2;
                deltaY = 0;
            }
            if(balloon.getY() == 350 && balloon.getX() == 450){
                deltaX = 0;
                deltaY = -2;
            }
            if(balloon.getY() == 200 && balloon.getX() == 450){
                deltaX = 2;
                deltaY = 0;
            }
            if(balloon.getY() == 200 && balloon.getX() == 600){
                deltaX = 0;
                deltaY = -2;
            }
            if(balloon.getY() == 50 && balloon.getX() == 600){
                deltaX = 2;
                deltaY = 0;
            }
            if(balloon.getY() == 50 && balloon.getX() == 750){
                deltaX = 0;
                deltaY = 2;
            }
            if(balloon.getY() == 500 && balloon.getX() == 750){
                deltaX = -2;
                deltaY = 0;
            }
            if(balloon.getY() == 500 && balloon.getX() == 450){
                deltaX = 0;
                deltaY = 2;
            }
            if(balloon.getY() == 600 && balloon.getX() == 450){
                deltaX = -2;
                deltaY = 0;
            }
            if(balloon.getY() == 600 && balloon.getX() == 250){
                deltaX = 0;
                deltaY = -2;
            }
            if(balloon.getY() == 450 && balloon.getX() == 250){
                deltaX = -2;
                deltaY = 0;
            }

            balloon.setX(balloon.getX()+deltaX);
            balloon.setY(balloon.getY()+deltaY);

        }
    };
    timer.start();
}

And the error it gives me (there's many for both deltaX and deltaY):
Variable 'deltaY' is accessed from within inner class, needs to be final or effectively final
Variable 'deltaY' is accessed from within inner class, needs to be final or effectively final

This is the method once I use the quick fix:

public static void balloonPath(ImageView balloon){
    balloon.toFront();

    final int[] deltaX = {2};
    final int[] deltaY = {0};

    AnimationTimer timer = new AnimationTimer() {
        @Override
        public void handle(long now) {

            if(balloon.getY() == 150 && balloon.getX() == 300){
                deltaX[0] = 0;
                deltaY[0] = 2;
            }
            if(balloon.getY() == 350 && balloon.getX() == 300){
                deltaX[0] = 2;
                deltaY[0] = 0;
            }
            if(balloon.getY() == 350 && balloon.getX() == 450){
                deltaX[0] = 0;
                deltaY[0] = -2;
            }
            if(balloon.getY() == 200 && balloon.getX() == 450){
                deltaX[0] = 2;
                deltaY[0] = 0;
            }
            if(balloon.getY() == 200 && balloon.getX() == 600){
                deltaX[0] = 0;
                deltaY[0] = -2;
            }
            if(balloon.getY() == 50 && balloon.getX() == 600){
                deltaX[0] = 2;
                deltaY[0] = 0;
            }
            if(balloon.getY() == 50 && balloon.getX() == 750){
                deltaX[0] = 0;
                deltaY[0] = 2;
            }
            if(balloon.getY() == 500 && balloon.getX() == 750){
                deltaX[0] = -2;
                deltaY[0] = 0;
            }
            if(balloon.getY() == 500 && balloon.getX() == 450){
                deltaX[0] = 0;
                deltaY[0] = 2;
            }
            if(balloon.getY() == 600 && balloon.getX() == 450){
                deltaX[0] = -2;
                deltaY[0] = 0;
            }
            if(balloon.getY() == 600 && balloon.getX() == 250){
                deltaX[0] = 0;
                deltaY[0] = -2;
            }
            if(balloon.getY() == 450 && balloon.getX() == 250){
                deltaX[0] = -2;
                deltaY[0] = 0;
            }

            balloon.setX(balloon.getX()+ deltaX[0]);
            balloon.setY(balloon.getY()+ deltaY[0]);

        }
    };
    timer.start();
}


问:
How can I automate data loading into Google Cloud Storage?
Context: I am currently getting a signed URL as a response from a ACC Data Connector API call. Upon clicking on the signed URL, I will be downloading a csv file.

Question: How can I store that csv file onto Google Cloud Storage without manually download and upload?


问:
How to install django-recaptcha in cpanel?
I tried to install django-recaptcha in cpanel but so error
Unable to find from captcha.fields import ReCaptchaField

Here is my code in django

form.py

```<code>from django import forms
from captcha.fields import ReCaptchaField
from captcha.widgets import ReCaptchaV2Checkbox

class RequestForm(forms.Form):

    captcha = ReCaptchaField(widget=ReCaptchaV2Checkbox())

</code>```

views.py

```<code>from django.views.generic import FormView

# Create your views here.
class HomePage(FormView, ):
    template_name = 'AppForm/homepage.html'
    form_class = RequestForm

    def post(self, request, **kwargs):
        if request.method != 'POST':
            return redirect('/error')
        else:
            form = RequestForm(request.POST)
            if form.is_valid():
                recaptcha_response = request.POST.get('g-recaptcha-response')
                url = 'https://www.google.com/recaptcha/api/siteverify'
                values = {
                'secret' : settings.RECAPTCHA_PRIVATE_KEY,
                'response' :  recaptcha_response
                }
                data = urllib.parse.urlencode(values).encode("utf-8")
                req = urllib.request.Request(url, data)
                response = urllib.request.urlopen(req)
                result = json.load(response)
                print(result)

                if result['success']:
                    return redirect('/thankyou')
                else:
                    return redirect('/error')
            else:
                return redirect('/error')

</code>```

setting.py

```<code>INSTALLED_APPS = [
    'captcha',
...
]

RECAPTCHA_PUBLIC_KEY = '6LdfgjhkgdsfhghjdfAAAPf1mAJmKucssbD5QMha09NT'
RECAPTCHA_PRIVATE_KEY = '6Ldfgjhkg3kgAA83DFJwdkjhfkjdkshjkfFR1hXqmN8q'
SILENCED_SYSTEM_CHECKS = ['captcha.recaptcha_test_key_error']

</code>```

In Local system it run, but in cpanel
Unable to find from captcha.fields import ReCaptchaField

Body:
I tried to install django-recaptcha in cpanel but so error
Unable to find from captcha.fields import ReCaptchaField

Here is my code in django

form.py

from django import forms
from captcha.fields import ReCaptchaField
from captcha.widgets import ReCaptchaV2Checkbox

class RequestForm(forms.Form):

    captcha = ReCaptchaField(widget=ReCaptchaV2Checkbox())

views.py

from django.views.generic import FormView

# Create your views here.
class HomePage(FormView, ):
    template_name = 'AppForm/homepage.html'
    form_class = RequestForm

    def post(self, request, **kwargs):
        if request.method != 'POST':
            return redirect('/error')
        else:
            form = RequestForm(request.POST)
            if form.is_valid():
                recaptcha_response = request.POST.get('g-recaptcha-response')
                url = 'https://www.google.com/recaptcha/api/siteverify'
                values = {
                'secret' : settings.RECAPTCHA_PRIVATE_KEY,
                'response' :  recaptcha_response
                }
                data = urllib.parse.urlencode(values).encode("utf-8")
                req = urllib.request.Request(url, data)
                response = urllib.request.urlopen(req)
                result = json.load(response)
                print(result)

                if result['success']:
                    return redirect('/thankyou')
                else:
                    return redirect('/error')
            else:
                return redirect('/error')

setting.py

INSTALLED_APPS = [
    'captcha',
...
]

RECAPTCHA_PUBLIC_KEY = '6LdfgjhkgdsfhghjdfAAAPf1mAJmKucssbD5QMha09NT'
RECAPTCHA_PRIVATE_KEY = '6Ldfgjhkg3kgAA83DFJwdkjhfkjdkshjkfFR1hXqmN8q'
SILENCED_SYSTEM_CHECKS = ['captcha.recaptcha_test_key_error']

In Local system it run, but in cpanel
Unable to find from captcha.fields import ReCaptchaField


问:
"Initialization failed for 'https://start.aliyun.com' Please check URL, network and proxy settings"
enter image description here
Today when using IntelliJ (window) & Spring Boot to create a new project, I started seeing this error:

" Initialization failed for 'https://start.aliyun.com' Please check URL, network and proxy settings

Error Message: Error parsing JSON response "

I tried to modify Setting in IDE, Open --> File -> Settings -> Appearance and Behavior ->System Settings -> HTTP Proxy --> Select Auto-detect proxy settings and set the Automatic proxy configuration URL.
but the problem is still there.


问:
How to hide header when scrolling the content Ionic Vue
The ionic-header and ionic-toolbar is the red line and the ion-card is the purple line content. What I want is when scrolling down the content and the header will be hidden and scroll up the header will display back.

```<code><ion-header>
        <ion-toolbar>
          <ion-grid>
            <ion-row>
              <ion-col>
                <ion-title size="small" id="titleFont">Welcome, {{memberName}}</ion-title>
              </ion-col>
              <ion-col id="SegmentBg">
                <ion-segment @ionChange="clicked($event)" :scrollable="true" v-model="component">
                <ion-segment-button value="Repurchase" >
                  <ion-img src="./assets/icon/Repurchase.png" alt="Repurchase" title="Repurchase"/>
                  <ion-label id="textSmall">Repurchase</ion-label>
                </ion-segment-button>
                <ion-segment-button value="Registration">
                  <ion-img src="./assets/icon/Registration.png" alt="Registration" title="Registration"/>
                  <ion-label id="textSmall">Registration</ion-label>
                </ion-segment-button>
                <ion-segment-button value="TripPoint">
                  <ion-img src="./assets/icon/Trip-Point.png" alt="Trip Point" title="Trip Point"/>
                  <ion-label id="textSmall">Trip Point</ion-label>
                </ion-segment-button>
                <ion-segment-button value="Voucher">
                  <ion-img src="./assets/icon/Voucher.png" alt="Voucher" title="Voucher"/>
                  <ion-label id="textSmall">Voucher</ion-label>
                </ion-segment-button>
               </ion-segment>
              </ion-col>
            </ion-row>
          </ion-grid>

        </ion-toolbar>
      </ion-header>

      <ion-card id="Border" >
       <component v-bind:is="component"/>
      </ion-card>
</code>```

Body:
The ionic-header and ionic-toolbar is the red line and the ion-card is the purple line content. What I want is when scrolling down the content and the header will be hidden and scroll up the header will display back.

<ion-header>
        <ion-toolbar>
          <ion-grid>
            <ion-row>
              <ion-col>
                <ion-title size="small" id="titleFont">Welcome, {{memberName}}</ion-title>
              </ion-col>
              <ion-col id="SegmentBg">
                <ion-segment @ionChange="clicked($event)" :scrollable="true" v-model="component">
                <ion-segment-button value="Repurchase" >
                  <ion-img src="./assets/icon/Repurchase.png" alt="Repurchase" title="Repurchase"/>
                  <ion-label id="textSmall">Repurchase</ion-label>
                </ion-segment-button>
                <ion-segment-button value="Registration">
                  <ion-img src="./assets/icon/Registration.png" alt="Registration" title="Registration"/>
                  <ion-label id="textSmall">Registration</ion-label>
                </ion-segment-button>
                <ion-segment-button value="TripPoint">
                  <ion-img src="./assets/icon/Trip-Point.png" alt="Trip Point" title="Trip Point"/>
                  <ion-label id="textSmall">Trip Point</ion-label>
                </ion-segment-button>
                <ion-segment-button value="Voucher">
                  <ion-img src="./assets/icon/Voucher.png" alt="Voucher" title="Voucher"/>
                  <ion-label id="textSmall">Voucher</ion-label>
                </ion-segment-button>
               </ion-segment>
              </ion-col>
            </ion-row>
          </ion-grid>

        </ion-toolbar>
      </ion-header>

      <ion-card id="Border" >
       <component v-bind:is="component"/>
      </ion-card>


问:
Visual Studio 2022 - Helper View in App_code not being found when referenced inside Partial View
I have an ASP.NET MVC (5.2.7) Partial View inside a project within a Visual Studio solution:

/Views/[MyEntity]/Partial/MyPartial.cshtml

```<code>@model My.Models.ViewModels.Booking.BookingDefaultsViewModel

@BookingDefaultsHelper.View(this,Model)
</code>```

/App_Code/BookingDefaultsHelper.cshtml

```<code>@using System.Web.Mvc
@using System.Web.Mvc.Html
@using My.Models.ViewModels.Booking
@helper View(WebViewPage page, BookingDefaultsViewModel model)
{
    var myList = new List<System.Web.Mvc.SelectListItem>
    {
        new System.Web.Mvc.SelectListItem {Text = @"Days", Value = "1"},
        new System.Web.Mvc.SelectListItem {Text = @"Hours", Value = "2"},
        new System.Web.Mvc.SelectListItem {Text = @"Minutes", Value = "3"}
    };

.. etc
</code>```

my.csproj

```<code>...
<Content Include="App_Code\BookingDefaultsHelper.cshtml" />
... etc
</code>```

In the partial view, BookingDefaultsHelper I get The name BookingDefaultsHelper does not exist in the current context. Why isn't it found?

It's a similar issue to the following one in Rider, but I'm seeing this in Visual Studio (and the question below doesn't provide any clues or answer):

Global helpers inside razor views in App_Code are not recognized

Body:
I have an ASP.NET MVC (5.2.7) Partial View inside a project within a Visual Studio solution:

/Views/[MyEntity]/Partial/MyPartial.cshtml

@model My.Models.ViewModels.Booking.BookingDefaultsViewModel

@BookingDefaultsHelper.View(this,Model)

/App_Code/BookingDefaultsHelper.cshtml

@using System.Web.Mvc
@using System.Web.Mvc.Html
@using My.Models.ViewModels.Booking
@helper View(WebViewPage page, BookingDefaultsViewModel model)
{
    var myList = new List<System.Web.Mvc.SelectListItem>
    {
        new System.Web.Mvc.SelectListItem {Text = @"Days", Value = "1"},
        new System.Web.Mvc.SelectListItem {Text = @"Hours", Value = "2"},
        new System.Web.Mvc.SelectListItem {Text = @"Minutes", Value = "3"}
    };

.. etc

my.csproj

...
<Content Include="App_Code\BookingDefaultsHelper.cshtml" />
... etc

In the partial view, BookingDefaultsHelper I get The name BookingDefaultsHelper does not exist in the current context. Why isn't it found?

It's a similar issue to the following one in Rider, but I'm seeing this in Visual Studio (and the question below doesn't provide any clues or answer):

Global helpers inside razor views in App_Code are not recognized


问:
Angular PWA App not working Javascript requestFullscreen() for IOS Device only
In Angular PWA App, I have to make div toggle for Full screen and Exit Full Screen.

For this, I have used :

```<code>if (element.requestFullscreen) {
      element.requestFullscreen();
    } else if (element.msRequestFullscreen) {
      element.msRequestFullscreen();
    } else if (element.mozRequestFullScreen) {
      element.mozRequestFullScreen();
    } else if (element.webkitRequestFullscreen) {
      element.webkitRequestFullscreen();
    }
</code>```

But this is not working as App mode in IOS Device. Any Idea?

Body:
In Angular PWA App, I have to make div toggle for Full screen and Exit Full Screen.

For this, I have used :

if (element.requestFullscreen) {
      element.requestFullscreen();
    } else if (element.msRequestFullscreen) {
      element.msRequestFullscreen();
    } else if (element.mozRequestFullScreen) {
      element.mozRequestFullScreen();
    } else if (element.webkitRequestFullscreen) {
      element.webkitRequestFullscreen();
    }

But this is not working as App mode in IOS Device. Any Idea?


问:
Pandas-generated .tar.gz can't be extracted
I have saved a pandas DataFrame to disk as a compressed .tar.gz file, using data.to_csv(path+'file.csv.tar.gz', compression='infer'), which seems to work fine. However, when I later try to extract the file using (on Ubuntu) tar -xzvf file.csv.tar.gz, I get the messages tar: This does not look like a tar archive, tar: Skipping to next header, and tar: Exiting with failure status due to previous errors. Why am I unable to extract this archive? Thanks.


问:
github workflow thinks i'm another user or something
I'm having problems with workflows and github actions

I have this set up on github

when i run these end commands manually in the vps terminal server they work

but when the workflow runs them they say this as if the commands were not being executed in a linux user who does not have updated npm (there are on my server, but the one I am passing in secrets.USERNAME does have it, and I have tried all the commands manually on that one and they work )

Any sugestion?


问:
Unable to start mongob-community after Monterey 12.6.2 update
I have been running mongodb-community 6.0.1 via homebrew just fine on Mac Monterey for a while, and then ran the recent Monterey update to 12.6.2, which included an XCode Tools update. This made me nervous, and sure enough, I now can't get mongodb to start. When I try to start it

```<code>brew services start mongodb/brew/mongodb-community

</code>```

I get the following error

```<code>Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/steve/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist` exited with 5.
</code>```

Here is the log output:

```<code>{"t":{"$date":"2022-12-14T20:06:18.001-08:00"},"s":"I",  "c":"CONTROL",  "id":20698,   "ctx":"-","msg":"***** SERVER RESTARTED *****"}
{"t":{"$date":"2022-12-14T20:06:18.004-08:00"},"s":"I",  "c":"CONTROL",  "id":23285,   "ctx":"-","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
{"t":{"$date":"2022-12-14T20:06:18.009-08:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"main","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":17},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":17},"outgoing":{"minWireVersion":6,"maxWireVersion":17},"isInternalClient":true}}}
{"t":{"$date":"2022-12-14T20:06:18.010-08:00"},"s":"I",  "c":"NETWORK",  "id":4648602, "ctx":"main","msg":"Implicit TCP FastOpen in use."}
{"t":{"$date":"2022-12-14T20:06:18.011-08:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","namespace":"config.tenantMigrationDonors"}}
{"t":{"$date":"2022-12-14T20:06:18.011-08:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","namespace":"config.tenantMigrationRecipients"}}
{"t":{"$date":"2022-12-14T20:06:18.011-08:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"ShardSplitDonorService","namespace":"config.tenantSplitDonors"}}
{"t":{"$date":"2022-12-14T20:06:18.011-08:00"},"s":"I",  "c":"CONTROL",  "id":5945603, "ctx":"main","msg":"Multi threading initialized"}
{"t":{"$date":"2022-12-14T20:06:18.012-08:00"},"s":"I",  "c":"CONTROL",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":24057,"port":27017,"dbPath":"/usr/local/var/mongodb","architecture":"64-bit","host":"Steves-MBP-29.home"}}
{"t":{"$date":"2022-12-14T20:06:18.012-08:00"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"6.0.1","gitVersion":"32f0f9c88dc44a2c8073a5bd47cf779d4bfdee6b","modules":[],"allocator":"system","environment":{"distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2022-12-14T20:06:18.012-08:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Mac OS X","version":"21.6.0"}}}
{"t":{"$date":"2022-12-14T20:06:18.012-08:00"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"config":"/usr/local/etc/mongod.conf","net":{"bindIp":"127.0.0.1"},"storage":{"dbPath":"/usr/local/var/mongodb"},"systemLog":{"destination":"file","logAppend":true,"path":"/usr/local/var/log/mongodb/mongo.log"}}}}
{"t":{"$date":"2022-12-14T20:06:18.013-08:00"},"s":"I",  "c":"NETWORK",  "id":5693100, "ctx":"initandlisten","msg":"Asio socket.set_option failed with std::system_error","attr":{"note":"acceptor TCP fast open","option":{"level":6,"name":261,"data":"00 04 00 00"},"error":{"what":"set_option: Invalid argument","message":"Invalid argument","category":"asio.system","value":22}}}
{"t":{"$date":"2022-12-14T20:06:18.014-08:00"},"s":"I",  "c":"STORAGE",  "id":22270,   "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"/usr/local/var/mongodb","storageEngine":"wiredTiger"}}
{"t":{"$date":"2022-12-14T20:06:18.015-08:00"},"s":"I",  "c":"STORAGE",  "id":22315,   "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=15872M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,remove=true,path=journal,compressor=snappy),builtin_extension_config=(zstd=(compression_level=6)),file_manager=(close_idle_time=600,close_scan_interval=10,close_handle_minimum=2000),statistics_log=(wait=0),json_output=(error,message),verbose=[recovery_progress:1,checkpoint_progress:1,compact_progress:1,backup:0,checkpoint:0,compact:0,evict:0,history_store:0,recovery:0,rts:0,salvage:0,tiered:0,timestamp:0,transaction:0,verify:0,log:0],"}}
{"t":{"$date":"2022-12-14T20:06:19.409-08:00"},"s":"I",  "c":"STORAGE",  "id":4795906, "ctx":"initandlisten","msg":"WiredTiger opened","attr":{"durationMillis":1394}}
{"t":{"$date":"2022-12-14T20:06:19.409-08:00"},"s":"I",  "c":"RECOVERY", "id":23987,   "ctx":"initandlisten","msg":"WiredTiger recoveryTimestamp","attr":{"recoveryTimestamp":{"$timestamp":{"t":0,"i":0}}}}
{"t":{"$date":"2022-12-14T20:06:19.410-08:00"},"s":"I",  "c":"WT",       "id":4366405, "ctx":"initandlisten","msg":"Modifying the table logging settings for all existing WiredTiger tables","attr":{"loggingEnabled":true,"repair":false,"hasPreviouslyIncompleteTableChecks":true}}
{"t":{"$date":"2022-12-14T20:06:19.496-08:00"},"s":"W",  "c":"CONTROL",  "id":22120,   "ctx":"initandlisten","msg":"Access control is not enabled for the database. Read and write access to data and configuration is unrestricted","tags":["startupWarnings"]}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"F",  "c":"CONTROL",  "id":20573,   "ctx":"initandlisten","msg":"Wrong mongod version","attr":{"error":"UPGRADE PROBLEM: Found an invalid featureCompatibilityVersion document (ERROR: Location4926900: Invalid featureCompatibilityVersion document in admin.system.version: { _id: \"featureCompatibilityVersion\", version: \"4.4\" }. See https://docs.mongodb.com/master/release-notes/5.0-compatibility/#feature-compatibility. :: caused by :: Invalid feature compatibility version value, expected '5.0' or '5.3' or '6.0. See https://docs.mongodb.com/master/release-notes/5.0-compatibility/#feature-compatibility.). If the current featureCompatibilityVersion is below 5.0, see the documentation on upgrading at https://docs.mongodb.com/master/release-notes/5.0/#upgrade-procedures."}}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"REPL",     "id":4784900, "ctx":"initandlisten","msg":"Stepping down the ReplicationCoordinator for shutdown","attr":{"waitTimeMillis":15000}}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"REPL",     "id":4794602, "ctx":"initandlisten","msg":"Attempting to enter quiesce mode"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"-",        "id":6371601, "ctx":"initandlisten","msg":"Shutting down the FLE Crud thread pool"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"COMMAND",  "id":4784901, "ctx":"initandlisten","msg":"Shutting down the MirrorMaestro"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"SHARDING", "id":4784902, "ctx":"initandlisten","msg":"Shutting down the WaitForMajorityService"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"NETWORK",  "id":20562,   "ctx":"initandlisten","msg":"Shutdown: going to close listening sockets"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"NETWORK",  "id":4784905, "ctx":"initandlisten","msg":"Shutting down the global connection pool"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"CONTROL",  "id":4784906, "ctx":"initandlisten","msg":"Shutting down the FlowControlTicketholder"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"-",        "id":20520,   "ctx":"initandlisten","msg":"Stopping further Flow Control ticket acquisitions."}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"CONTROL",  "id":4784908, "ctx":"initandlisten","msg":"Shutting down the PeriodicThreadToAbortExpiredTransactions"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"REPL",     "id":4784909, "ctx":"initandlisten","msg":"Shutting down the ReplicationCoordinator"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"SHARDING", "id":4784910, "ctx":"initandlisten","msg":"Shutting down the ShardingInitializationMongoD"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"REPL",     "id":4784911, "ctx":"initandlisten","msg":"Enqueuing the ReplicationStateTransitionLock for shutdown"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"-",        "id":4784912, "ctx":"initandlisten","msg":"Killing all operations for shutdown"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"-",        "id":4695300, "ctx":"initandlisten","msg":"Interrupted all currently running operations","attr":{"opsKilled":3}}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"TENANT_M", "id":5093807, "ctx":"initandlisten","msg":"Shutting down all TenantMigrationAccessBlockers on global shutdown"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"COMMAND",  "id":4784913, "ctx":"initandlisten","msg":"Shutting down all open transactions"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"REPL",     "id":4784914, "ctx":"initandlisten","msg":"Acquiring the ReplicationStateTransitionLock for shutdown"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"INDEX",    "id":4784915, "ctx":"initandlisten","msg":"Shutting down the IndexBuildsCoordinator"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"NETWORK",  "id":4784918, "ctx":"initandlisten","msg":"Shutting down the ReplicaSetMonitor"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"SHARDING", "id":4784921, "ctx":"initandlisten","msg":"Shutting down the MigrationUtilExecutor"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"ASIO",     "id":22582,   "ctx":"MigrationUtil-TaskExecutor","msg":"Killing all outstanding egress activity."}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"COMMAND",  "id":4784923, "ctx":"initandlisten","msg":"Shutting down the ServiceEntryPoint"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"CONTROL",  "id":4784925, "ctx":"initandlisten","msg":"Shutting down free monitoring"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"CONTROL",  "id":4784927, "ctx":"initandlisten","msg":"Shutting down the HealthLog"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"CONTROL",  "id":4784928, "ctx":"initandlisten","msg":"Shutting down the TTL monitor"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"CONTROL",  "id":6278511, "ctx":"initandlisten","msg":"Shutting down the Change Stream Expired Pre-images Remover"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"CONTROL",  "id":4784929, "ctx":"initandlisten","msg":"Acquiring the global lock for shutdown"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"CONTROL",  "id":4784930, "ctx":"initandlisten","msg":"Shutting down the storage engine"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"STORAGE",  "id":22320,   "ctx":"initandlisten","msg":"Shutting down journal flusher thread"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"STORAGE",  "id":22321,   "ctx":"initandlisten","msg":"Finished shutting down journal flusher thread"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"STORAGE",  "id":22322,   "ctx":"initandlisten","msg":"Shutting down checkpoint thread"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"STORAGE",  "id":22323,   "ctx":"initandlisten","msg":"Finished shutting down checkpoint thread"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"STORAGE",  "id":20282,   "ctx":"initandlisten","msg":"Deregistering all the collections"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"STORAGE",  "id":22317,   "ctx":"initandlisten","msg":"WiredTigerKVEngine shutting down"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"STORAGE",  "id":22318,   "ctx":"initandlisten","msg":"Shutting down session sweeper thread"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"STORAGE",  "id":22319,   "ctx":"initandlisten","msg":"Finished shutting down session sweeper thread"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"STORAGE",  "id":4795902, "ctx":"initandlisten","msg":"Closing WiredTiger","attr":{"closeConfig":"leak_memory=true,"}}
{"t":{"$date":"2022-12-14T20:06:19.754-08:00"},"s":"I",  "c":"STORAGE",  "id":4795901, "ctx":"initandlisten","msg":"WiredTiger closed","attr":{"durationMillis":247}}
{"t":{"$date":"2022-12-14T20:06:19.754-08:00"},"s":"I",  "c":"STORAGE",  "id":22279,   "ctx":"initandlisten","msg":"shutdown: removing fs lock..."}
{"t":{"$date":"2022-12-14T20:06:19.754-08:00"},"s":"I",  "c":"-",        "id":4784931, "ctx":"initandlisten","msg":"Dropping the scope cache for shutdown"}
{"t":{"$date":"2022-12-14T20:06:19.754-08:00"},"s":"I",  "c":"CONTROL",  "id":20565,   "ctx":"initandlisten","msg":"Now exiting"}
{"t":{"$date":"2022-12-14T20:06:19.755-08:00"},"s":"I",  "c":"CONTROL",  "id":23138,   "ctx":"initandlisten","msg":"Shutting down","attr":{"exitCode":62}}

</code>```

This guy ran across the same issue, but running

```<code>mongod --repair --dbpath /usr/local/var/mongodb --storageEngine wiredTiger
</code>```

did not make a difference. I don't need to worry about losing data, so I uninstalled it and re-installed via homebrew, and still get the same error.

As noted in other similar posts, I checked permissions on the various files, and my user has ownership, not root.

Do I need to install an older version of the formula? I was running fine on 6.0.1 prior to the Monterey update, so I doubt that would help/

Body:
I have been running mongodb-community 6.0.1 via homebrew just fine on Mac Monterey for a while, and then ran the recent Monterey update to 12.6.2, which included an XCode Tools update. This made me nervous, and sure enough, I now can't get mongodb to start. When I try to start it

brew services start mongodb/brew/mongodb-community

I get the following error

Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/steve/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist` exited with 5.

Here is the log output:

{"t":{"$date":"2022-12-14T20:06:18.001-08:00"},"s":"I",  "c":"CONTROL",  "id":20698,   "ctx":"-","msg":"***** SERVER RESTARTED *****"}
{"t":{"$date":"2022-12-14T20:06:18.004-08:00"},"s":"I",  "c":"CONTROL",  "id":23285,   "ctx":"-","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
{"t":{"$date":"2022-12-14T20:06:18.009-08:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"main","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":17},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":17},"outgoing":{"minWireVersion":6,"maxWireVersion":17},"isInternalClient":true}}}
{"t":{"$date":"2022-12-14T20:06:18.010-08:00"},"s":"I",  "c":"NETWORK",  "id":4648602, "ctx":"main","msg":"Implicit TCP FastOpen in use."}
{"t":{"$date":"2022-12-14T20:06:18.011-08:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","namespace":"config.tenantMigrationDonors"}}
{"t":{"$date":"2022-12-14T20:06:18.011-08:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","namespace":"config.tenantMigrationRecipients"}}
{"t":{"$date":"2022-12-14T20:06:18.011-08:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"ShardSplitDonorService","namespace":"config.tenantSplitDonors"}}
{"t":{"$date":"2022-12-14T20:06:18.011-08:00"},"s":"I",  "c":"CONTROL",  "id":5945603, "ctx":"main","msg":"Multi threading initialized"}
{"t":{"$date":"2022-12-14T20:06:18.012-08:00"},"s":"I",  "c":"CONTROL",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":24057,"port":27017,"dbPath":"/usr/local/var/mongodb","architecture":"64-bit","host":"Steves-MBP-29.home"}}
{"t":{"$date":"2022-12-14T20:06:18.012-08:00"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"6.0.1","gitVersion":"32f0f9c88dc44a2c8073a5bd47cf779d4bfdee6b","modules":[],"allocator":"system","environment":{"distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2022-12-14T20:06:18.012-08:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Mac OS X","version":"21.6.0"}}}
{"t":{"$date":"2022-12-14T20:06:18.012-08:00"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"config":"/usr/local/etc/mongod.conf","net":{"bindIp":"127.0.0.1"},"storage":{"dbPath":"/usr/local/var/mongodb"},"systemLog":{"destination":"file","logAppend":true,"path":"/usr/local/var/log/mongodb/mongo.log"}}}}
{"t":{"$date":"2022-12-14T20:06:18.013-08:00"},"s":"I",  "c":"NETWORK",  "id":5693100, "ctx":"initandlisten","msg":"Asio socket.set_option failed with std::system_error","attr":{"note":"acceptor TCP fast open","option":{"level":6,"name":261,"data":"00 04 00 00"},"error":{"what":"set_option: Invalid argument","message":"Invalid argument","category":"asio.system","value":22}}}
{"t":{"$date":"2022-12-14T20:06:18.014-08:00"},"s":"I",  "c":"STORAGE",  "id":22270,   "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"/usr/local/var/mongodb","storageEngine":"wiredTiger"}}
{"t":{"$date":"2022-12-14T20:06:18.015-08:00"},"s":"I",  "c":"STORAGE",  "id":22315,   "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=15872M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,remove=true,path=journal,compressor=snappy),builtin_extension_config=(zstd=(compression_level=6)),file_manager=(close_idle_time=600,close_scan_interval=10,close_handle_minimum=2000),statistics_log=(wait=0),json_output=(error,message),verbose=[recovery_progress:1,checkpoint_progress:1,compact_progress:1,backup:0,checkpoint:0,compact:0,evict:0,history_store:0,recovery:0,rts:0,salvage:0,tiered:0,timestamp:0,transaction:0,verify:0,log:0],"}}
{"t":{"$date":"2022-12-14T20:06:19.409-08:00"},"s":"I",  "c":"STORAGE",  "id":4795906, "ctx":"initandlisten","msg":"WiredTiger opened","attr":{"durationMillis":1394}}
{"t":{"$date":"2022-12-14T20:06:19.409-08:00"},"s":"I",  "c":"RECOVERY", "id":23987,   "ctx":"initandlisten","msg":"WiredTiger recoveryTimestamp","attr":{"recoveryTimestamp":{"$timestamp":{"t":0,"i":0}}}}
{"t":{"$date":"2022-12-14T20:06:19.410-08:00"},"s":"I",  "c":"WT",       "id":4366405, "ctx":"initandlisten","msg":"Modifying the table logging settings for all existing WiredTiger tables","attr":{"loggingEnabled":true,"repair":false,"hasPreviouslyIncompleteTableChecks":true}}
{"t":{"$date":"2022-12-14T20:06:19.496-08:00"},"s":"W",  "c":"CONTROL",  "id":22120,   "ctx":"initandlisten","msg":"Access control is not enabled for the database. Read and write access to data and configuration is unrestricted","tags":["startupWarnings"]}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"F",  "c":"CONTROL",  "id":20573,   "ctx":"initandlisten","msg":"Wrong mongod version","attr":{"error":"UPGRADE PROBLEM: Found an invalid featureCompatibilityVersion document (ERROR: Location4926900: Invalid featureCompatibilityVersion document in admin.system.version: { _id: \"featureCompatibilityVersion\", version: \"4.4\" }. See https://docs.mongodb.com/master/release-notes/5.0-compatibility/#feature-compatibility. :: caused by :: Invalid feature compatibility version value, expected '5.0' or '5.3' or '6.0. See https://docs.mongodb.com/master/release-notes/5.0-compatibility/#feature-compatibility.). If the current featureCompatibilityVersion is below 5.0, see the documentation on upgrading at https://docs.mongodb.com/master/release-notes/5.0/#upgrade-procedures."}}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"REPL",     "id":4784900, "ctx":"initandlisten","msg":"Stepping down the ReplicationCoordinator for shutdown","attr":{"waitTimeMillis":15000}}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"REPL",     "id":4794602, "ctx":"initandlisten","msg":"Attempting to enter quiesce mode"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"-",        "id":6371601, "ctx":"initandlisten","msg":"Shutting down the FLE Crud thread pool"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"COMMAND",  "id":4784901, "ctx":"initandlisten","msg":"Shutting down the MirrorMaestro"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"SHARDING", "id":4784902, "ctx":"initandlisten","msg":"Shutting down the WaitForMajorityService"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"NETWORK",  "id":20562,   "ctx":"initandlisten","msg":"Shutdown: going to close listening sockets"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"NETWORK",  "id":4784905, "ctx":"initandlisten","msg":"Shutting down the global connection pool"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"CONTROL",  "id":4784906, "ctx":"initandlisten","msg":"Shutting down the FlowControlTicketholder"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"-",        "id":20520,   "ctx":"initandlisten","msg":"Stopping further Flow Control ticket acquisitions."}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"CONTROL",  "id":4784908, "ctx":"initandlisten","msg":"Shutting down the PeriodicThreadToAbortExpiredTransactions"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"REPL",     "id":4784909, "ctx":"initandlisten","msg":"Shutting down the ReplicationCoordinator"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"SHARDING", "id":4784910, "ctx":"initandlisten","msg":"Shutting down the ShardingInitializationMongoD"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"REPL",     "id":4784911, "ctx":"initandlisten","msg":"Enqueuing the ReplicationStateTransitionLock for shutdown"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"-",        "id":4784912, "ctx":"initandlisten","msg":"Killing all operations for shutdown"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"-",        "id":4695300, "ctx":"initandlisten","msg":"Interrupted all currently running operations","attr":{"opsKilled":3}}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"TENANT_M", "id":5093807, "ctx":"initandlisten","msg":"Shutting down all TenantMigrationAccessBlockers on global shutdown"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"COMMAND",  "id":4784913, "ctx":"initandlisten","msg":"Shutting down all open transactions"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"REPL",     "id":4784914, "ctx":"initandlisten","msg":"Acquiring the ReplicationStateTransitionLock for shutdown"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"INDEX",    "id":4784915, "ctx":"initandlisten","msg":"Shutting down the IndexBuildsCoordinator"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"NETWORK",  "id":4784918, "ctx":"initandlisten","msg":"Shutting down the ReplicaSetMonitor"}
{"t":{"$date":"2022-12-14T20:06:19.506-08:00"},"s":"I",  "c":"SHARDING", "id":4784921, "ctx":"initandlisten","msg":"Shutting down the MigrationUtilExecutor"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"ASIO",     "id":22582,   "ctx":"MigrationUtil-TaskExecutor","msg":"Killing all outstanding egress activity."}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"COMMAND",  "id":4784923, "ctx":"initandlisten","msg":"Shutting down the ServiceEntryPoint"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"CONTROL",  "id":4784925, "ctx":"initandlisten","msg":"Shutting down free monitoring"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"CONTROL",  "id":4784927, "ctx":"initandlisten","msg":"Shutting down the HealthLog"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"CONTROL",  "id":4784928, "ctx":"initandlisten","msg":"Shutting down the TTL monitor"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"CONTROL",  "id":6278511, "ctx":"initandlisten","msg":"Shutting down the Change Stream Expired Pre-images Remover"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"CONTROL",  "id":4784929, "ctx":"initandlisten","msg":"Acquiring the global lock for shutdown"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"CONTROL",  "id":4784930, "ctx":"initandlisten","msg":"Shutting down the storage engine"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"STORAGE",  "id":22320,   "ctx":"initandlisten","msg":"Shutting down journal flusher thread"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"STORAGE",  "id":22321,   "ctx":"initandlisten","msg":"Finished shutting down journal flusher thread"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"STORAGE",  "id":22322,   "ctx":"initandlisten","msg":"Shutting down checkpoint thread"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"STORAGE",  "id":22323,   "ctx":"initandlisten","msg":"Finished shutting down checkpoint thread"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"STORAGE",  "id":20282,   "ctx":"initandlisten","msg":"Deregistering all the collections"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"STORAGE",  "id":22317,   "ctx":"initandlisten","msg":"WiredTigerKVEngine shutting down"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"STORAGE",  "id":22318,   "ctx":"initandlisten","msg":"Shutting down session sweeper thread"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"STORAGE",  "id":22319,   "ctx":"initandlisten","msg":"Finished shutting down session sweeper thread"}
{"t":{"$date":"2022-12-14T20:06:19.507-08:00"},"s":"I",  "c":"STORAGE",  "id":4795902, "ctx":"initandlisten","msg":"Closing WiredTiger","attr":{"closeConfig":"leak_memory=true,"}}
{"t":{"$date":"2022-12-14T20:06:19.754-08:00"},"s":"I",  "c":"STORAGE",  "id":4795901, "ctx":"initandlisten","msg":"WiredTiger closed","attr":{"durationMillis":247}}
{"t":{"$date":"2022-12-14T20:06:19.754-08:00"},"s":"I",  "c":"STORAGE",  "id":22279,   "ctx":"initandlisten","msg":"shutdown: removing fs lock..."}
{"t":{"$date":"2022-12-14T20:06:19.754-08:00"},"s":"I",  "c":"-",        "id":4784931, "ctx":"initandlisten","msg":"Dropping the scope cache for shutdown"}
{"t":{"$date":"2022-12-14T20:06:19.754-08:00"},"s":"I",  "c":"CONTROL",  "id":20565,   "ctx":"initandlisten","msg":"Now exiting"}
{"t":{"$date":"2022-12-14T20:06:19.755-08:00"},"s":"I",  "c":"CONTROL",  "id":23138,   "ctx":"initandlisten","msg":"Shutting down","attr":{"exitCode":62}}

This guy ran across the same issue, but running

mongod --repair --dbpath /usr/local/var/mongodb --storageEngine wiredTiger

did not make a difference. I don't need to worry about losing data, so I uninstalled it and re-installed via homebrew, and still get the same error.

As noted in other similar posts, I checked permissions on the various files, and my user has ownership, not root.

Do I need to install an older version of the formula? I was running fine on 6.0.1 prior to the Monterey update, so I doubt that would help/


问:
CSS imported from a file is not working with framer motion elements in react
I am trying to import a css file in my react jsx component and it works fine with normal HTML elements but as soon as I change the element to a motion element for eg: a div to motion.div the css stops working.

here's some example code

```<code>import React from "react";
import "./LandingPageBody.scoped.css";
import { motion, useAnimation } from "framer-motion";
import { useInView } from "react-intersection-observer";
import { useEffect } from "react";

const topCardVariants = {
  visible: {
    opacity: 1,
    x: 0,
    transition: {
      duration: 0.5,
    },
  },
  hidden: {
    opacity: 0,
    x: "-3rem",
  },
};

export const LandingPageBody = () => {
  const control = useAnimation();
  const [ref, inView] = useInView();

  useEffect(() => {
    if (inView) {
      control.start("visible");
    } else {
      control.start("hidden");
    }
  }, [control, inView]);

  return (
    <div className="body">
      <div className="top-cards-heading">
        <h3>Staying healthy, made easy with technology</h3>
      </div>
      <motion.div
        className="top-cards-container"
        ref={ref}
        variants={topCardVariants}
        initial="hidden"
        animate={control}
      >
        <div className="top-card" id="top-card1">
          as
        </div>
        <div className="top-card" id="top-card2">
          a
        </div>
        <div className="top-card" id="top-card3">
          a
        </div>
      </motion.div>
    </div>
  );
};
</code>```

And the css from the css file is not working with .top-cards-container

The CSS file contains  :

```<code>.top-cards-container {
  height: min(25vw);
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  margin-top: 4vh;
}
</code>```

again, this works as soon as I remove the motion.

Body:
I am trying to import a css file in my react jsx component and it works fine with normal HTML elements but as soon as I change the element to a motion element for eg: a div to motion.div the css stops working.

here's some example code

import React from "react";
import "./LandingPageBody.scoped.css";
import { motion, useAnimation } from "framer-motion";
import { useInView } from "react-intersection-observer";
import { useEffect } from "react";

const topCardVariants = {
  visible: {
    opacity: 1,
    x: 0,
    transition: {
      duration: 0.5,
    },
  },
  hidden: {
    opacity: 0,
    x: "-3rem",
  },
};

export const LandingPageBody = () => {
  const control = useAnimation();
  const [ref, inView] = useInView();

  useEffect(() => {
    if (inView) {
      control.start("visible");
    } else {
      control.start("hidden");
    }
  }, [control, inView]);

  return (

Staying healthy, made easy with technology

      <motion.div
        className="top-cards-container"
        ref={ref}
        variants={topCardVariants}
        initial="hidden"
        animate={control}
      >

          as

          a

          a

      </motion.div>

  );
};

And the css from the css file is not working with .top-cards-container

The CSS file contains  :

.top-cards-container {
  height: min(25vw);
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  margin-top: 4vh;
}

again, this works as soon as I remove the motion.


问:
How to make list cell transparent while dragging SwiftUI?
I have a swiftUI List in one of my app. I had made the list and list cell transparent and everything was working fine. After iOS 16 I started facing issues with transparency of my list. One thing I can't figure out how to make list cell transparent when you drag them for reordering. List cell is transparent initially but when you long press and drag, it becomes white. This behaviour was not there in previous iOS versions. Here is a sample code.

```<code>struct SampleListView: View {
    var body: some View {
        List {
            ForEach(0..<10) {
                Text("This is item no. \($0)")
                    .listRowBackground(Color.clear)
            }
            .onMove(perform: move)
        }
        .listStyle(.plain)
        .background(LinearGradient(colors: [.cyan, .mint, .pink], startPoint: .top, endPoint: .bottom))
    }

    func move(from source: IndexSet, to destination: Int) {
        //
    }
}
</code>```

Can you help me find a proper way of achieving this ?

Body:
I have a swiftUI List in one of my app. I had made the list and list cell transparent and everything was working fine. After iOS 16 I started facing issues with transparency of my list. One thing I can't figure out how to make list cell transparent when you drag them for reordering. List cell is transparent initially but when you long press and drag, it becomes white. This behaviour was not there in previous iOS versions. Here is a sample code.

struct SampleListView: View {
    var body: some View {
        List {
            ForEach(0..<10) {
                Text("This is item no. \($0)")
                    .listRowBackground(Color.clear)
            }
            .onMove(perform: move)
        }
        .listStyle(.plain)
        .background(LinearGradient(colors: [.cyan, .mint, .pink], startPoint: .top, endPoint: .bottom))
    }

    func move(from source: IndexSet, to destination: Int) {
        //
    }
}

Can you help me find a proper way of achieving this ?


问:
is there a way to inspect the shape of merged interface in typescript
Interface can be modified in multiple places, and when I have mouse hover over the variable of that interface type in VSCode, it only displays the name of the interface.

```<code>//part 1
interface A {
  a:string;
}

//part 2
interface A {
  b:string;
}

//if part 1 and part 2 are defined very far away
//how do I inspect the final shape of interface A
let k:A = {a:'a', b:'b'};

</code>```

In VSCode, right click the type A and select "go to Type Definition" can list the 2 parts, but I'm wondering if there is a way to inspect the merged shape.

Body:
Interface can be modified in multiple places, and when I have mouse hover over the variable of that interface type in VSCode, it only displays the name of the interface.

//part 1
interface A {
  a:string;
}

//part 2
interface A {
  b:string;
}

//if part 1 and part 2 are defined very far away
//how do I inspect the final shape of interface A
let k:A = {a:'a', b:'b'};

In VSCode, right click the type A and select "go to Type Definition" can list the 2 parts, but I'm wondering if there is a way to inspect the merged shape.


问:
Is there any way in ThreeJS that I can position my Sprite Object in between two points?
enter image description here
Hi, I am new to ThreeJS. I am looking for a solution for a long time, didn’t find out any, so posting here. Basically I have two points in my scene, marking yellow and red and I have a sprite object. I can place the Sprite Object at any given point (either red or yellow). But I need to place/position my sprite object in such a way the its one end is at yellow point and another end is at red point. Now both of the points are dynamically updating continuously in animation loop. So when I set my camera to look at the red point is is always at the center of the screen, and yellow point moves around. Similarly if I look at yellow point, the red point moves around. Now I need to place one end of my sprite either at red or yellow point and rotate the sprite in such a way that its other end meets at yellow point. How can I do that? The distance between red and yellow point is not also same always, so I need to adjust the size of my sprite as well to meet the other point.

N.B. by one end i meant the edge of the handle of the shovel, by another end i meant the edge of the shovel.

I can put my sprite at any given point (which is the center of rotation of the sprite). So i have modified the image (texture of sprite is an image) in such a way that its edge of the handle is at the center of the sprite. SO when I put the sprite on the scene, the handle of the shovel is at the red point. I then tries to rotate the sprite so that i can move the other end (the shovel edge) at the yellow point. The rotation doesn't work when the yellow point is over the red point, however when the yellow point is below right of the red point it seems work (coincident may be). Plus the distance between red and yellow point is not always same, as they both update in the animation loop. So i need to also increase/decrease the sprite size so the bottom end of the shovel meets at yellow point.


问:
How to automate Prisma container scan results into Elasticsearch
What is the best way to automate ingestion of Prisma container scan results into Elasticsearch?

The simplest way I can think of is getting the scan result output as a Json and ingest data into Elasticsearch with Python.

As both these are popular and mature tools, just wondering if there is any better way to handle/automate this in a large environment?

My use case is to scan 200+ container images and containers running on K8s and get results into Elasticsearch for reporting regularly.


问:
Can someone help me figure out how I can add the files from a existing repo I worked on with a partner to a new repo one I just made
How do I add files from a repository I helped do a project on but don’t own to my own brand new repository, so I can retrieve all the same data myself and my partners worked on?

Just need to know what I exactly need to do to avoid conflict


问:
New to SQL: I waant to migrate a powershell SQL program to a SAS program using PROC SQL
I need some help please, I am new but for a project I have to convert this program to a sas program using PROC SQL.
i am not familiar with the xml functions so I don't know where to start. I only learnt and used proc sql by sas

```<code>define outputfile=&1
define datedebuttrt=&2
define datefintrt=&3

set linesize 728
set echo off
set feedback off
set define on
set long 30000000
set linesize 32000
set verify off
set pagesize 0
set head off
set trimspool on

truncate table XN ;

insert into xn
With
DirtyData As (Select substr(ef.code_k,5,5) as "SITE",siret,to_char(ef.date_facture,'YYYYMM') as "PERIOD",sum(prix) as "CA"
                                      from facture_entete ef, facture_ligne lf,
                    (select reference_p,code_pras from facture_pra union select 'ATC','ZZZZ' from dual) pra
                                      where idt=idtent and code_piece=reference_p
                                      and ef.date_facture between to_date('&datedebuttrt','YYYYMMDD') and to_date('&datefintrt','YYYYMMDD')
                                      and ef.type_facture='SA'
                      and code_pras <> 'Z531'
                                      and substr(siret,1,1) not in ('1','2')
                                      group by substr(ef.code_k,5,5),siret,to_char(ef.date_facture,'YYYYMM') ),
GoodData      As (Select * From Dirtydata Where siret Is not null
                                                     And siret != '00000000000000'
                                                     And Length(siret) = 14
                                                     And Translate(siret, '#0123456789','#') Is Null ),
Generator As (Select rownum rn From Dual
                Connect By Level <= 14
                  Order By rn  ),
Digits    As (Select SITE,siret,PERIOD,CA, rn,SubStr(siret, -rn, 1) Digit
                From GoodData
                Cross Join
                Generator),
LuhnFormula As (   Select SITE,siret,PERIOD,CA, rn, Digit,
                          Case BitAnd(rn, 1)
                              When 0 Then Translate(Digit,'0123456789','0246813579')
                              Else Digit
                          End LuhnDigits
                   From Digits ),
DataOK As ( Select  SITE as "K_SITE",siret,PERIOD,
          case Mod(Sum(LuhnDigits),10)
            When 0 Then
              'OK'
            Else
              'KO'
          End Status, CA
     From LuhnFormula
     group by SITE,siret,PERIOD,CA
     having Mod(Sum(LuhnDigits),10) = 0   )
select k_site,siret,period,ca from DataOK ;
;

spool &outputfile

SELECT XMLRoot(
                XMLElement("Remontee_CA",
                    XMLAgg(XMLElement("MRA", XMLAttributes( c1.K as "K", c1.NSIRET as "NSIRET" ),
                            XMLElement("CAS",
                                    (SELECT XMLAgg( XMLElement("CA",XMLForest(PERIOD as "PERIOD", MONTANT as "MONTANT" ) ) )
                                    FROM xn c2
                                    WHERE c1.k = c2.k and c1.NSIRET = c2.NSIRET)
                            )
                    )
                    )
            )
    , VERSION '1.0', STANDALONE YES).getClobVal() as XMLDATA
FROM (select distinct K,NSIRET from xn) c1
order by k,nsiret;

spool off

exit
</code>```

I put all the code that I have if someone can just help me with the structure into SAS

Body:
I need some help please, I am new but for a project I have to convert this program to a sas program using PROC SQL.
i am not familiar with the xml functions so I don't know where to start. I only learnt and used proc sql by sas

define outputfile=&1
define datedebuttrt=&2
define datefintrt=&3

set linesize 728
set echo off
set feedback off
set define on
set long 30000000
set linesize 32000
set verify off
set pagesize 0
set head off
set trimspool on

truncate table XN ;

insert into xn
With
DirtyData As (Select substr(ef.code_k,5,5) as "SITE",siret,to_char(ef.date_facture,'YYYYMM') as "PERIOD",sum(prix) as "CA"
                                      from facture_entete ef, facture_ligne lf,
                    (select reference_p,code_pras from facture_pra union select 'ATC','ZZZZ' from dual) pra
                                      where idt=idtent and code_piece=reference_p
                                      and ef.date_facture between to_date('&datedebuttrt','YYYYMMDD') and to_date('&datefintrt','YYYYMMDD')
                                      and ef.type_facture='SA'
                      and code_pras <> 'Z531'
                                      and substr(siret,1,1) not in ('1','2')
                                      group by substr(ef.code_k,5,5),siret,to_char(ef.date_facture,'YYYYMM') ),
GoodData      As (Select * From Dirtydata Where siret Is not null
                                                     And siret != '00000000000000'
                                                     And Length(siret) = 14
                                                     And Translate(siret, '#0123456789','#') Is Null ),
Generator As (Select rownum rn From Dual
                Connect By Level <= 14
                  Order By rn  ),
Digits    As (Select SITE,siret,PERIOD,CA, rn,SubStr(siret, -rn, 1) Digit
                From GoodData
                Cross Join
                Generator),
LuhnFormula As (   Select SITE,siret,PERIOD,CA, rn, Digit,
                          Case BitAnd(rn, 1)
                              When 0 Then Translate(Digit,'0123456789','0246813579')
                              Else Digit
                          End LuhnDigits
                   From Digits ),
DataOK As ( Select  SITE as "K_SITE",siret,PERIOD,
          case Mod(Sum(LuhnDigits),10)
            When 0 Then
              'OK'
            Else
              'KO'
          End Status, CA
     From LuhnFormula
     group by SITE,siret,PERIOD,CA
     having Mod(Sum(LuhnDigits),10) = 0   )
select k_site,siret,period,ca from DataOK ;
;

spool &outputfile

SELECT XMLRoot(
                XMLElement("Remontee_CA",
                    XMLAgg(XMLElement("MRA", XMLAttributes( c1.K as "K", c1.NSIRET as "NSIRET" ),
                            XMLElement("CAS",
                                    (SELECT XMLAgg( XMLElement("CA",XMLForest(PERIOD as "PERIOD", MONTANT as "MONTANT" ) ) )
                                    FROM xn c2
                                    WHERE c1.k = c2.k and c1.NSIRET = c2.NSIRET)
                            )
                    )
                    )
            )
    , VERSION '1.0', STANDALONE YES).getClobVal() as XMLDATA
FROM (select distinct K,NSIRET from xn) c1
order by k,nsiret;

spool off

exit

I put all the code that I have if someone can just help me with the structure into SAS


问:
Order by sub-aggregation in composite aggregation (Elasticsearch)
I need to ordenate the results of an composite aggregation, but the value to be orderned is the sum of a specific field (my index is so much larger, so i need the composite for paginate values).

When send this GET:

```<code>GET /_search
{
    "aggs" : {
        "my_buckets": {
            "composite" : {
                 "sources" : [
                    { "date": { "date_histogram": { "field": "timestamp", "interval": "1d"} } },
                    { "product": { "terms": {"field": "product" } } }
                ]
            },
            "aggregations": {
                "the_sum": {
                    "sum": { "field": "price" }  <--- i want order by this field aggregation
                }
            }
        }
    }
}
</code>```

How can i get this response? (order by sum of each price)

```<code>
{
    ...
    "aggregations": {
        "my_buckets": {
            "after_key": {
                "date": 1494374400000,
                "product": "mad max"
            },
            "buckets": [
                {
                    "key": {
                        "date": 1494460800000,
                        "product": "apocalypse now"
                    },
                    "doc_count": 1,
                    "the_sum": {
                        "value": 10.0
                    }
                },
                {
                    "key": {
                        "date": 1494288000000,
                        "product" : "mad max"
                    },
                    "doc_count": 2,
                    "the_sum": {
                        "value": 22.5
                    }
                },
                {
                    "key": {
                        "date": 1494374400000,
                        "product": "mad max"
                    },
                    "doc_count": 1,
                    "the_sum": {
                        "value": 290.0
                    }
                }
            ]
        }
    }
}
</code>```

Body:
I need to ordenate the results of an composite aggregation, but the value to be orderned is the sum of a specific field (my index is so much larger, so i need the composite for paginate values).

When send this GET:

GET /_search
{
    "aggs" : {
        "my_buckets": {
            "composite" : {
                 "sources" : [
                    { "date": { "date_histogram": { "field": "timestamp", "interval": "1d"} } },
                    { "product": { "terms": {"field": "product" } } }
                ]
            },
            "aggregations": {
                "the_sum": {
                    "sum": { "field": "price" }  <--- i want order by this field aggregation
                }
            }
        }
    }
}

How can i get this response? (order by sum of each price)

{
    ...
    "aggregations": {
        "my_buckets": {
            "after_key": {
                "date": 1494374400000,
                "product": "mad max"
            },
            "buckets": [
                {
                    "key": {
                        "date": 1494460800000,
                        "product": "apocalypse now"
                    },
                    "doc_count": 1,
                    "the_sum": {
                        "value": 10.0
                    }
                },
                {
                    "key": {
                        "date": 1494288000000,
                        "product" : "mad max"
                    },
                    "doc_count": 2,
                    "the_sum": {
                        "value": 22.5
                    }
                },
                {
                    "key": {
                        "date": 1494374400000,
                        "product": "mad max"
                    },
                    "doc_count": 1,
                    "the_sum": {
                        "value": 290.0
                    }
                }
            ]
        }
    }
}


问:
How to install new ts library for old js library
I need to use qs typescript library however when i install it it's js i tried npm install --save @types/qs

However it still wont recognize when i import qs from 'qs' but it still wont work , is there any solution for me?

I thought it would overwrite the qs package in node_modules but in there is still the index.js file
Is there any solution for me?

import FormData from 'form-data';
// var axios = require('axios');
import axios from 'axios';
// var qs = require('qs');
import  qs from 'qs'// error here
var fs = require('fs');//?
var mime = require('mime-types');//?
var path = require('path');//?
const readChunk = require('read-chunk');//?
```
<p><strong>tsconfig.json:</strong></p>
<pre class="lang-js prettyprint-override"><code>{
  "files": [],

  "references": [
    {
      "path": "./tsconfig.config.json"
    },
    {
      "path": "./tsconfig.app.json"
    },
    {
      "path": "./tsconfig.vitest.json"
    }
  ],
  "include": [
    "index.d.ts"   // declaration file path
  ],

  "compilerOptions": {
    "paths": {
      "@/*": [
       "./*"
      ]
     },
     "noImplicitAny": false

   }

}

</code>```

Body:
I need to use qs typescript library however when i install it it's js i tried npm install --save @types/qs

However it still wont recognize when i import qs from 'qs' but it still wont work , is there any solution for me?

I thought it would overwrite the qs package in node_modules but in there is still the index.js file
Is there any solution for me?

import FormData from 'form-data';
// var axios = require('axios');
import axios from 'axios';
// var qs = require('qs');
import  qs from 'qs'// error here
var fs = require('fs');//?
var mime = require('mime-types');//?
var path = require('path');//?
const readChunk = require('read-chunk');//?

tsconfig.json:

{
  "files": [],

  "references": [
    {
      "path": "./tsconfig.config.json"
    },
    {
      "path": "./tsconfig.app.json"
    },
    {
      "path": "./tsconfig.vitest.json"
    }
  ],
  "include": [
    "index.d.ts"   // declaration file path
  ],

  "compilerOptions": {
    "paths": {
      "@/*": [
       "./*"
      ]
     },
     "noImplicitAny": false

   }

}


问:
Use standard library or 3rd party to conviently uncurry Python functions
I am experimenting with Functional Programming in Python and I usually end up needing a way to uncurry functions.

I solve this issue by using:

from typing import Callable, TypeVar

T = TypeVar("T")
R = TypeVar("R")

def uncurry(function: Callable[[T], Callable[[T], R] | R]) -> Callable[[T], R]:
    def uncurry_step(*args: T) -> R:
        result = function
        for arg in args:
            result = result(arg)
        return result

    return uncurry_step
```
<p>Example:</p>
<pre class="lang-py prettyprint-override"><code>def addition(a: float) -> Callable[[float], float]:
    def inner(b: float) -> float:
        return a + b
    return inner

assert addition(5)(5) == 10
assert uncurry(addition)(5, 5) == 10
</code>```

Is there a way to replace the user-defined uncurry with something provided within the standard library or a 3rd party like toolz?

Note: This is for educational purposes so performance is not relevant.

Body:
I am experimenting with Functional Programming in Python and I usually end up needing a way to uncurry functions.

I solve this issue by using:

from typing import Callable, TypeVar

T = TypeVar("T")
R = TypeVar("R")

def uncurry(function: Callable[[T], Callable[[T], R] | R]) -> Callable[[T], R]:
    def uncurry_step(*args: T) -> R:
        result = function
        for arg in args:
            result = result(arg)
        return result

    return uncurry_step

Example:

def addition(a: float) -> Callable[[float], float]:
    def inner(b: float) -> float:
        return a + b
    return inner

assert addition(5)(5) == 10
assert uncurry(addition)(5, 5) == 10

Is there a way to replace the user-defined uncurry with something provided within the standard library or a 3rd party like toolz?

Note: This is for educational purposes so performance is not relevant.