问:
How do I change the background colour of a list in swiftui?
I am trying to change the gray colour in the background to red however it is not working. I've tried attaching the .background() modifier to the List and to the NavigationView however cannot get the desired result.

Here is the code:

```<code>var body: some View {

        NavigationView {
                VStack {
                    List {

                        Section(header: Text("Account Settings")) {
                            NavigationLink(
                                destination: CreditsView(),
                                label: {
                                    Text("Notifications")
                                })

                            NavigationLink(
                                destination: CreditsView(),
                                label: {
                                    Text("Help")
                                })

                            NavigationLink(
                                destination: RateAppView(),
                                label: {
                                    Text("Rate This App")
                                })

                        }
                        .headerProminence(.increased)

                        Section(header: Text("Information")) {

                            NavigationLink(
                                destination: TermsAndConditionsView(),
                                label: {
                                    Text("Terms and Conditions")
                                })

                            NavigationLink(
                                destination: PrivacyPolicyView(),
                                label: {
                                    Text("Privacy Policy")
                                })

                            NavigationLink(
                                destination: DeleteAccountView(),
                                label: {
                                    Text("Delete Account")
                                })
                        }
                        .headerProminence(.increased)
                    }
                    .background(.red)
                    .listStyle(.insetGrouped)
                }
    }
        .navigationTitle("Settings")
    }

</code>```

And here is what it looks like:

I want the off-white / grey to be red. How can I achieve this?

Body:
I am trying to change the gray colour in the background to red however it is not working. I've tried attaching the .background() modifier to the List and to the NavigationView however cannot get the desired result.

Here is the code:

var body: some View {

        NavigationView {
                VStack {
                    List {

                        Section(header: Text("Account Settings")) {
                            NavigationLink(
                                destination: CreditsView(),
                                label: {
                                    Text("Notifications")
                                })

                            NavigationLink(
                                destination: CreditsView(),
                                label: {
                                    Text("Help")
                                })

                            NavigationLink(
                                destination: RateAppView(),
                                label: {
                                    Text("Rate This App")
                                })

                        }
                        .headerProminence(.increased)

                        Section(header: Text("Information")) {

                            NavigationLink(
                                destination: TermsAndConditionsView(),
                                label: {
                                    Text("Terms and Conditions")
                                })

                            NavigationLink(
                                destination: PrivacyPolicyView(),
                                label: {
                                    Text("Privacy Policy")
                                })

                            NavigationLink(
                                destination: DeleteAccountView(),
                                label: {
                                    Text("Delete Account")
                                })
                        }
                        .headerProminence(.increased)
                    }
                    .background(.red)
                    .listStyle(.insetGrouped)
                }
    }
        .navigationTitle("Settings")
    }

And here is what it looks like:

I want the off-white / grey to be red. How can I achieve this?


来源: stackexchange

问:
Feign Client and Spring Boot ERROR with a list param with more than 1600 items
I'm trying to consume a service with OpenFeign, the method is GET and as argument I send a list of IDs to make a query in DynamoDB, everything works correctly when the list of IDs is small, but in a real case, if the list is very large, example 1600 items then the integration fails, the request never reaches the client instead the response is:

```<code>feign.FeignException$BadRequest: [400] during [GET] to [http://<host>:<port>/config?id=7479c3943b4e706759d668fe63c0dff5&id=796dfc42ff2bd9a30b3dd30d6a9ca2be&<multipleIDs...>] [MyClient#getInfoById(List)]: [<!doctype html><html lang="en"><head><title>HTTP Status 400 – Bad Request</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;... (435 bytes)]
</code>```

What is the correct integration to perform a query with many identifiers?

ContentLicense: CC BY-SA 4.0

Body:
I'm trying to consume a service with OpenFeign, the method is GET and as argument I send a list of IDs to make a query in DynamoDB, everything works correctly when the list of IDs is small, but in a real case, if the list is very large, example 1600 items then the integration fails, the request never reaches the client instead the response is:

feign.FeignException$BadRequest: [400] during [GET] to [http://<host>:<port>/config?id=7479c3943b4e706759d668fe63c0dff5&id=796dfc42ff2bd9a30b3dd30d6a9ca2be&<multipleIDs...>] [MyClient#getInfoById(List)]: [<!doctype html><title>HTTP Status 400 – Bad Request</title>


问:
onNotificationOpenedApp & getInitialNotification don't fire anymore on IOS (expo)
```<code>async function onMessageReceived({ title, body, orderId }: { title: string; body: string; orderId?: string }) {
    await notifee.createChannel({
      id: "main",
      name: "Main",
      sound: "default",
      vibration: false,
      importance: AndroidImportance.HIGH,
    });

    await notifee.displayNotification({
      title,
      body,
      android: {
        channelId: "main",
        badgeCount: 0,
      },
      ios: {
        badgeCount: 0,
        sound: "default",
      },
    });

    notifee.onBackgroundEvent(({ type, detail }) => {
      if (type === EventType.PRESS && orderId && isAuthenticated) {
        navigate("order", { id: Number(orderId) });
      }
    });
  }

  React.useEffect(() => {
    messaging().onNotificationOpenedApp(async (remoteMessage) => {
      Alert.alert("Notification caused app to open from background state:", JSON.stringify(remoteMessage));
    });

    messaging().getInitialNotification().then(async (remoteMessage) => {
      Alert.alert("Notification caused app to open from background state:", JSON.stringify(remoteMessage));
    });

    const unsubscribe = messaging().onMessage(async (remoteMessage) => {
      // console.log({ remoteMessage });
      // Alert.alert("A new FCM message arrived!", JSON.stringify(remoteMessage));

      await onMessageReceived({
        title: remoteMessage.notification?.title ?? "",
        body: remoteMessage.notification?.body ?? "",
        orderId: remoteMessage.data?.orderId,
      });
    });

    return () => {
      unsubscribe();
    };
  }, []);
</code>```

This is my logic for handling the events

This is my code for the setBackgroundMessageHandler:

```<code>messaging().setBackgroundMessageHandler(async (remoteMessage) => {
  console.log("Message handled in the background!", remoteMessage);
  // you could do things like incrementing badge count, doesnt work tho
  await notifee.incrementBadgeCount();
});
</code>```

It appears the setBackgroundMessageHandler doesn't fire.

On android the onNotificationOpenedApp & getInitialNotification works perfect but on ios it stopped working. It worked before, but now i can't get it working anymore.

Body:
async function onMessageReceived({ title, body, orderId }: { title: string; body: string; orderId?: string }) {
    await notifee.createChannel({
      id: "main",
      name: "Main",
      sound: "default",
      vibration: false,
      importance: AndroidImportance.HIGH,
    });

    await notifee.displayNotification({
      title,
      body,
      android: {
        channelId: "main",
        badgeCount: 0,
      },
      ios: {
        badgeCount: 0,
        sound: "default",
      },
    });

    notifee.onBackgroundEvent(({ type, detail }) => {
      if (type === EventType.PRESS && orderId && isAuthenticated) {
        navigate("order", { id: Number(orderId) });
      }
    });
  }

  React.useEffect(() => {
    messaging().onNotificationOpenedApp(async (remoteMessage) => {
      Alert.alert("Notification caused app to open from background state:", JSON.stringify(remoteMessage));
    });

    messaging().getInitialNotification().then(async (remoteMessage) => {
      Alert.alert("Notification caused app to open from background state:", JSON.stringify(remoteMessage));
    });

    const unsubscribe = messaging().onMessage(async (remoteMessage) => {
      // console.log({ remoteMessage });
      // Alert.alert("A new FCM message arrived!", JSON.stringify(remoteMessage));

      await onMessageReceived({
        title: remoteMessage.notification?.title ?? "",
        body: remoteMessage.notification?.body ?? "",
        orderId: remoteMessage.data?.orderId,
      });
    });

    return () => {
      unsubscribe();
    };
  }, []);

This is my logic for handling the events

This is my code for the setBackgroundMessageHandler:

messaging().setBackgroundMessageHandler(async (remoteMessage) => {
  console.log("Message handled in the background!", remoteMessage);
  // you could do things like incrementing badge count, doesnt work tho
  await notifee.incrementBadgeCount();
});

It appears the setBackgroundMessageHandler doesn't fire.

On android the onNotificationOpenedApp & getInitialNotification works perfect but on ios it stopped working. It worked before, but now i can't get it working anymore.


问:
SAM Card Integration on Android Device
I'm new to SAM Card and how it works.

Is it possible to send APDU Commands to a SAM card on android 11(Api 30). If so how?

Can a SAM Card still work in a SIM SLOT. If so how?

I have researched on SAM card integration with android but couldn't find any.

Title: SAM Card Integration on Android Device


问:
How can I fix the error: 'an existing connection was forcibly closed'. (Office 365 REST Python client)
I recently created a solution to automate some copy-pasting of Excel files between SharePoint folders.

To establish the connection to SharePoint, I use the Office 365 REST Python client.

As an authentication method, I use clientcredentials (this allowed me to bypass TFA on the SharePoint).

I have verified that the ID and secret that I am using are still valid.

Until recently, the code was working like a charm.
Yesterday, however, I got the following error (and have been getting it ever since):

Requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

Weidly, sometimes I get the following error instead:

File "...\acs_token_provider.py", line
45, in get_app_only_access_token
self.error = e.response.text
AttributeError: 'NoneType' object has no attribute 'text'

I have encountered several posts mentioning the first error.

However, none of them were related to the package that I am using.

Below is a simplified example of my code which produces the same error:

```<code>from office365.runtime.auth.client_credential import ClientCredential
from office365.sharepoint.client_context import ClientContext

CLIENT_ID = "thecorrectclientid"
CLIENT_SECRET = "thecorrectclientsecret"
site_url = "https://{xxxx}.sharepoint.com/sites/{nameofthesite}"
ctx = ClientContext(site_url)
creds = ClientCredential(CLIENT_ID, CLIENT_SECRET)
ctx.with_credentials(creds)
web = ctx.web
ctx.load(web)
ctx.execute_query()
print("Web title: {0}".format(web.properties['Title']))
</code>```

Does anyone have an idea what may be causing this and how I could possibly fix this?

Any help would be greatly appreciated!

UPDATE: It seems to be a problem related to my local machine.

I just cloned the repo on my other laptop and it runs smoothly.

I have also noticed the following error when opening files from SharePoint (which might be related):

the server you are trying to access is using an authentication protocol not supported by office sharepoint excel

I tried refreshing the Client Id and Client secret (to make sure I wasn't using expired credentials).

I have browsed the web for similar errors, but none of them gave me the answer for my specific situation.

I have double checked if anything changed in the URL of the site that I am trying to access.

I tried running it on another laptop and that worked for me. But the root cause is still a mystery.

No results...

UPDATE: I tried running it on another laptop and that worked for me. But the root cause is still a mystery.

Body:
I recently created a solution to automate some copy-pasting of Excel files between SharePoint folders.

To establish the connection to SharePoint, I use the Office 365 REST Python client.

As an authentication method, I use clientcredentials (this allowed me to bypass TFA on the SharePoint).

I have verified that the ID and secret that I am using are still valid.

Until recently, the code was working like a charm.
Yesterday, however, I got the following error (and have been getting it ever since):

Requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

Weidly, sometimes I get the following error instead:

File "...\acs_token_provider.py", line
45, in get_app_only_access_token
self.error = e.response.text
AttributeError: 'NoneType' object has no attribute 'text'

I have encountered several posts mentioning the first error.

However, none of them were related to the package that I am using.

Below is a simplified example of my code which produces the same error:

from office365.runtime.auth.client_credential import ClientCredential
from office365.sharepoint.client_context import ClientContext

CLIENT_ID = "thecorrectclientid"
CLIENT_SECRET = "thecorrectclientsecret"
site_url = "https://{xxxx}.sharepoint.com/sites/{nameofthesite}"
ctx = ClientContext(site_url)
creds = ClientCredential(CLIENT_ID, CLIENT_SECRET)
ctx.with_credentials(creds)
web = ctx.web
ctx.load(web)
ctx.execute_query()
print("Web title: {0}".format(web.properties['Title']))

Does anyone have an idea what may be causing this and how I could possibly fix this?

Any help would be greatly appreciated!

UPDATE: It seems to be a problem related to my local machine.

I just cloned the repo on my other laptop and it runs smoothly.

I have also noticed the following error when opening files from SharePoint (which might be related):

the server you are trying to access is using an authentication protocol not supported by office sharepoint excel

I tried refreshing the Client Id and Client secret (to make sure I wasn't using expired credentials).

I have browsed the web for similar errors, but none of them gave me the answer for my specific situation.

I have double checked if anything changed in the URL of the site that I am trying to access.

I tried running it on another laptop and that worked for me. But the root cause is still a mystery.

No results...

UPDATE: I tried running it on another laptop and that worked for me. But the root cause is still a mystery.


问:
Glide does not display a picture with logs: Load failed for with size [-2147483648x-2147483648]
Uploading images with Glide
But some pictures are not showing.
Looked at the logs:

Load failed for  with size [-2147483648x-2147483648]
class com.bumptech.glide.load.engine.GlideException: Failed to load resource

googled, many recommend to prescribe in the manifest
android:usesCleartextTraffic="true"
but it didn't help me

everything is fine with the url of the image, I checked it


问:
Does Vercel free servers store in its file system uploaded files from the application?
Well I'm sorry for the confused question title but let me explain it better in here.

I have a Nest.js application that I want to upload to Vercel free servers,and in this application users can upload files and it stores in the file system of the application ( I searched and it is accordingly to some programmers better than storing files directly in database ), and I have a question,when a user uploads his files,will Vercel store it ?

And also...if I want to migrate to some paid server (Digital Ocean,Azure,AWS,etc) can I get these files to make the migration?


问:
How to get clicked option value when using multiple select with bootstrap-select with an on change event?
I'm using bootstrap-select and I want to get only the clicked value of the <option> element when using multiple select

The following doesn't work (returns undefined):

```<code>$('#bootstrap-select').on('change', function (e) {
    let optionSelected = $("option:selected", this);
    var valueSelected = this.value;
    console.log(valueSelected);
});
</code>```

And the following gets all the selected options if multiple are chosen already:

```<code>$('#bootstrap-select').on('change',function() {
  console.log($(this).val());
});
</code>```

But I want only the one clicked

Body:
I'm using bootstrap-select and I want to get only the clicked value of the <option> element when using multiple select

The following doesn't work (returns undefined):

$('#bootstrap-select').on('change', function (e) {
    let optionSelected = $("option:selected", this);
    var valueSelected = this.value;
    console.log(valueSelected);
});

And the following gets all the selected options if multiple are chosen already:

$('#bootstrap-select').on('change',function() {
  console.log($(this).val());
});

But I want only the one clicked


问:
how to put two graphs together, using pandas an matplotlib
So i need to put these two graphs together, but i can only get them to show apart. What am I doing wrong?

This is my code:

```<code>def age_Dalc_walc(data):
    plt.subplots(1,2)
    def age_Dalc():
        dataq = data[['age', 'Dalc_y']]
        dataq['total'] = 1
        dataq = dataq.groupby(['Dalc_y', 'age']).sum().reset_index()
            pd.pivot_table(dataq, index=['Dalc_y'], columns=['age'],values=  ['total']).fillna(0).plot(kind='bar'),
        stacked=True, title=("Dalc impact over age")
    def age_Walc():
        dataz = data[['age', 'Walc_y']]
        dataz['total'] = 1
        dataz = dataz.groupby(['Walc_y', 'age']).sum().reset_index()
        pd.pivot_table(dataz, index=['Walc_y'], columns=['age'], values=['total']).fillna(0).plot(kind='bar'),
        stacked=True,
        title=("Walc impact over age")
    age_Dalc()
    age_Walc()
    plt.show()

age_Dalc_walc(data)
</code>```

Body:
So i need to put these two graphs together, but i can only get them to show apart. What am I doing wrong?

This is my code:

def age_Dalc_walc(data):
    plt.subplots(1,2)
    def age_Dalc():
        dataq = data[['age', 'Dalc_y']]
        dataq['total'] = 1
        dataq = dataq.groupby(['Dalc_y', 'age']).sum().reset_index()
            pd.pivot_table(dataq, index=['Dalc_y'], columns=['age'],values=  ['total']).fillna(0).plot(kind='bar'),
        stacked=True, title=("Dalc impact over age")
    def age_Walc():
        dataz = data[['age', 'Walc_y']]
        dataz['total'] = 1
        dataz = dataz.groupby(['Walc_y', 'age']).sum().reset_index()
        pd.pivot_table(dataz, index=['Walc_y'], columns=['age'], values=['total']).fillna(0).plot(kind='bar'),
        stacked=True,
        title=("Walc impact over age")
    age_Dalc()
    age_Walc()
    plt.show()

age_Dalc_walc(data)


问:
Change label from Newrelic "MySQL (subquery) select" to custom label
I have using Newrelic with Laravel application.

Whenever I use simple queries then newrelic shows table name with it.

But in case of sub-queries it shows MySQL (subquery) select

I am using Laravel Eloquent for queries.

Can you please help me how I can replace this label with custom table name like MySQL subquery_customer_table select

Thank You in advance!


问:
unable to use my component library based on Material UI with a nextjs application (both typescript)
On one side I have a component library using react, mui and emotion as peerDep.

package.json

```<code>"peerDependencies": {
  "@emotion/react": "^11.10.5",
  "@emotion/styled": "^11.10.5",
  "@mui/icons-material": "^5.10.15",
  "@mui/material": "^5.10.15",
  "react": "18.2.0",
  "react-dom": "18.2.0"
}
</code>```

rollup config (note the regexp for @emotion and @mui)

```<code>  external: [
    'react',
    'react-dom',
    /@emotion\/.*/,
    /@mui\/.*/,
  ],
  output: [
    {
      file: 'dist/index.cjs.min.js',
      format: 'cjs',
      sourcemap: true,
      plugins: [terser()],
    },
    {
      file: 'dist/index.esm.min.js',
      format: 'esm',
      sourcemap: true,
      plugins: [terser()],
    },
  ],
  plugins: [
    resolve({ browser: true }),
  ...
    typescript({ tsconfig: './tsconfig.json' }),
  ],
},
</code>```

Lib is published with npm.

On the other side, I have an application (nextjs and storybook, webpack5)
Nothing special on the config on this side.

When I run storybook, it works fine.

But when I run dev, I get this error:

```<code>Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.
    at Bidon (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/@msio/common-frontend/dist/index.cjs.min.js:629:18)
    at div
    at /home/smallet/Dev/sandbox/spike-nextjs/node_modules/@emotion/react/dist/emotion-element-b63ca7c6.cjs.dev.js:51:25
    at Stack (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/@mui/material/node/Stack/Stack.js:111:49)
    at Home (webpack-internal:///./pages/index.tsx:32:81)
    at Layout (webpack-internal:///./components/Layout/Layout.tsx:14:19)
    at InnerThemeProvider (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/@mui/system/ThemeProvider/ThemeProvider.js:19:39)
    at ThemeProvider (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/@mui/private-theming/node/ThemeProvider/ThemeProvider.js:39:5)
    at ThemeProvider (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/@mui/system/ThemeProvider/ThemeProvider.js:38:5)
    at App (webpack-internal:///./pages/_app.tsx:27:16)
    at StyleRegistry (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/styled-jsx/dist/index/index.js:449:36)
    at PathnameContextProviderAdapter (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/next/dist/shared/lib/router/adapters.js:60:11)
    at AppContainer (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/next/dist/server/render.js:289:29)
    at AppContainerWithIsomorphicFiberStructure (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/next/dist/server/render.js:325:57)
    at div
    at Body (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/next/dist/server/render.js:612:21)

</code>```

I tried to change the tsconfig file but didn't change anything
I tried to put only @mui and not @emotion as a peer dependency, but it didn't work.

First for the bundle size it is better to have those libs as peer dependency,
but moreover, I have a ThemeProvider initialized with a custom theme and I want it to be shared between lib and app.

I spent a lot of time looking for something wrong in the Theme, but in fact, the error was here because it is the first component imported from my lib.

I added a dummy component with just a div => the app works fine.
But as soon as I add an import on @mui lib, like :

```<code>import Paper from '@mui/material/Paper';
</code>```

I get the crash.

It works with storybook.

I also created a simple react app and it works, so it doesn't seem to be on the side on the library.

I suppose it comes from some config on Nextjs side.

Body:
On one side I have a component library using react, mui and emotion as peerDep.

package.json

"peerDependencies": {
  "@emotion/react": "^11.10.5",
  "@emotion/styled": "^11.10.5",
  "@mui/icons-material": "^5.10.15",
  "@mui/material": "^5.10.15",
  "react": "18.2.0",
  "react-dom": "18.2.0"
}

rollup config (note the regexp for @emotion and @mui)

  external: [
    'react',
    'react-dom',
    /@emotion\/.*/,
    /@mui\/.*/,
  ],
  output: [
    {
      file: 'dist/index.cjs.min.js',
      format: 'cjs',
      sourcemap: true,
      plugins: [terser()],
    },
    {
      file: 'dist/index.esm.min.js',
      format: 'esm',
      sourcemap: true,
      plugins: [terser()],
    },
  ],
  plugins: [
    resolve({ browser: true }),
  ...
    typescript({ tsconfig: './tsconfig.json' }),
  ],
},

Lib is published with npm.

On the other side, I have an application (nextjs and storybook, webpack5)
Nothing special on the config on this side.

When I run storybook, it works fine.

But when I run dev, I get this error:

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.
    at Bidon (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/@msio/common-frontend/dist/index.cjs.min.js:629:18)
    at div
    at /home/smallet/Dev/sandbox/spike-nextjs/node_modules/@emotion/react/dist/emotion-element-b63ca7c6.cjs.dev.js:51:25
    at Stack (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/@mui/material/node/Stack/Stack.js:111:49)
    at Home (webpack-internal:///./pages/index.tsx:32:81)
    at Layout (webpack-internal:///./components/Layout/Layout.tsx:14:19)
    at InnerThemeProvider (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/@mui/system/ThemeProvider/ThemeProvider.js:19:39)
    at ThemeProvider (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/@mui/private-theming/node/ThemeProvider/ThemeProvider.js:39:5)
    at ThemeProvider (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/@mui/system/ThemeProvider/ThemeProvider.js:38:5)
    at App (webpack-internal:///./pages/_app.tsx:27:16)
    at StyleRegistry (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/styled-jsx/dist/index/index.js:449:36)
    at PathnameContextProviderAdapter (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/next/dist/shared/lib/router/adapters.js:60:11)
    at AppContainer (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/next/dist/server/render.js:289:29)
    at AppContainerWithIsomorphicFiberStructure (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/next/dist/server/render.js:325:57)
    at div
    at Body (/home/smallet/Dev/sandbox/spike-nextjs/node_modules/next/dist/server/render.js:612:21)

I tried to change the tsconfig file but didn't change anything
I tried to put only @mui and not @emotion as a peer dependency, but it didn't work.

First for the bundle size it is better to have those libs as peer dependency,
but moreover, I have a ThemeProvider initialized with a custom theme and I want it to be shared between lib and app.

I spent a lot of time looking for something wrong in the Theme, but in fact, the error was here because it is the first component imported from my lib.

I added a dummy component with just a div => the app works fine.
But as soon as I add an import on @mui lib, like :

import Paper from '@mui/material/Paper';

I get the crash.

It works with storybook.

I also created a simple react app and it works, so it doesn't seem to be on the side on the library.

I suppose it comes from some config on Nextjs side.


Title: How to fill SVG?

Body:
could you please tell me guys how to fill this SVG?

<svg class="animationCounter2" width="80%" height="80%" viewBox="0 0 295 298" fill="none"
  xmlns="http://www.w3.org/2000/svg">
  <path class="path" fill-rule="evenodd" clip-rule="evenodd" d="M0 45.4119C27.6939 36.5087 55.7265 28.637 84.1171 22.1956C112.508 15.7834 141.208 10.7528 170.102 7.18185C198.996 3.64005 228.073 1.63562 257.161 0.740441C271.704 0.28312 286.258 0.0982462 300.801 0.0204044C308.068 -0.0282467 315.345 0.0204044 322.622 0.0593253C329.898 0.0982462 337.165 0.0982462 344.442 0.234469C373.529 0.555567 402.607 1.45075 431.675 2.80325C460.733 4.15575 489.772 5.99476 518.772 8.30082C547.773 10.6069 576.734 13.3897 605.647 16.5715C634.56 19.7436 663.425 23.3535 692.261 27.1483C721.097 30.9431 749.894 34.9616 778.71 38.8634C807.517 42.7458 836.333 46.5892 865.217 49.7321C879.654 51.3668 894.111 52.6998 908.587 53.9453C915.825 54.4805 923.063 55.1032 930.31 55.5119C933.929 55.7259 937.558 55.9984 941.177 56.1638L952.053 56.66C966.549 57.2925 981.054 57.3898 995.53 56.7768C1009.98 56.1054 1024.46 54.8307 1038.47 51.5906C1045.44 49.9267 1052.36 47.7666 1058.44 44.2637C1061.45 42.5123 1064.22 40.3522 1066.26 37.6958C1068.32 35.0492 1069.45 31.848 1069.44 28.53C1069.45 26.9245 1069.12 25.3676 1068.4 24.0249C1067.71 22.6821 1066.61 21.5631 1065.29 20.775C1062.64 19.1889 1059.14 19.0235 1056.19 20.162C1053.2 21.2809 1050.81 23.7135 1049.5 26.7201C1048.85 28.2186 1048.4 29.8435 1048.18 31.5269C1047.96 33.2005 1047.89 34.9616 1048.07 36.5671C1048.45 39.8462 1049.98 42.921 1052.17 45.5384C1054.35 48.1655 1057.12 50.3548 1060.09 52.2522C1066.06 56.0276 1072.8 58.6742 1079.64 60.7856C1083.07 61.8365 1086.54 62.722 1090.08 63.4809C1093.6 64.2788 1097.14 64.9891 1100.7 65.641C1107.81 66.9254 1114.98 67.8984 1122.17 68.5309C1150.95 71.1191 1180.28 67.9276 1207.74 58.645C1235.18 49.3526 1260.69 34.1929 1282 14.2752C1261.22 34.7476 1235.84 50.53 1208.31 60.2991C1194.54 65.174 1180.25 68.6282 1165.74 70.3894C1151.23 72.2089 1136.53 72.4425 1121.95 71.3137C1114.67 70.7494 1107.4 69.8347 1100.19 68.6087C1096.59 67.986 1092.99 67.2952 1089.42 66.5265C1085.84 65.787 1082.26 64.8821 1078.74 63.8215C1071.7 61.6808 1064.74 58.9953 1058.38 55.0059C1055.21 52.9917 1052.19 50.637 1049.68 47.6596C1047.18 44.7113 1045.28 41.0041 1044.8 36.9855C1044.57 34.9616 1044.65 33.035 1044.9 31.089C1045.15 29.143 1045.66 27.2066 1046.48 25.3676C1047.29 23.5286 1048.44 21.8064 1049.9 20.3663C1051.35 18.9262 1053.12 17.7878 1055.04 17.058C1058.86 15.5985 1063.34 15.7736 1066.99 17.9337C1068.8 19.0041 1070.36 20.5901 1071.33 22.4875C1072.33 24.3752 1072.76 26.5061 1072.75 28.5494C1072.75 30.5441 1072.41 32.568 1071.74 34.4654C1071.07 36.3725 1070.09 38.1337 1068.89 39.7002C1066.47 42.8334 1063.35 45.2076 1060.09 47.0952C1056.82 48.9926 1053.37 50.4521 1049.87 51.6782C1046.37 52.9139 1042.81 53.8772 1039.23 54.7237C1024.87 58.0028 1010.26 59.2288 995.684 59.8613C981.102 60.4354 966.51 60.2991 951.966 59.618C937.423 58.9855 922.898 58.032 908.384 56.8838C893.879 55.6481 879.393 54.315 864.937 52.6901C836.004 49.557 807.168 45.733 778.342 41.8604C749.526 37.9683 720.729 33.9692 691.903 30.2036C634.26 22.6334 576.502 15.9682 518.569 11.3172C489.608 8.98194 460.598 7.11374 431.578 5.74178C402.549 4.36008 373.51 3.43571 344.452 3.08542C337.185 2.93947 329.927 2.92974 322.66 2.89082L300.869 2.82271C286.335 2.82271 271.811 2.92974 257.296 3.30922C228.267 4.04872 199.257 5.90719 170.411 9.27385C141.556 12.5529 112.856 17.3013 84.4461 23.4216C55.9684 29.5127 27.8197 36.9077 0 45.4119Z" fill="white"/>
</svg>

.svg-path{
    fill:transparent;
    stroke:white;
    stroke-miterlimit:10;
    stroke-width:2px;
    fill-rule:evenodd;
}

  .draw2{
    stroke-dasharray: 3000;
    animation: 5s write2;
    filter: drop-shadow(0px 1px 10px gray);
  }
  @keyframes write2 {
    0% {
        stroke-dashoffset: 3000;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

When i set the fill to white; it looks good, but i almost cant see the animation, when i set the stroke-width to for example 5px, its too thick..


问:
How to Use Query Loop in WordPress to Create Posts List in a table and group the tables by date?
I've been trying to create a query loop that lists posts on the index page inside a table.

Every day should have it's own table and list all posts for that day in the table. The day and date should be displayed on top of each table.

Example:

Tuesday, December 13, 2022

Post 1
Post 2
Post 3
Post 5

Monday, December 12, 2022

Post 1
Post 2
<Pagination>```
</div>
</div>
</p>
<p>I also would like pagination to work for the table.</p>
<p>I'm quite new to wordpress/php and I'm trying to build a custom theme and I'm using CPT plugin for custom post type so forgive me if I made a mistake in my question or with the code.</p>
<p>This is What I've tried so far</p>
```

    <?php query_posts( array( 'post_type' => 'post', 'cat' => 3316, 'post_status' => 'publish', 'posts_per_page'=>'2', 'order' => 'DESC', 'orderby' => 'date', 'paged' => $paged ) ); ?>

    <?php if ($day != get_the_date()) {echo "<time>".get_the_date()."</time>";$day=get_the_date();} else {} ?>

                Title
                Release
                Group

        <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

            <?php
            $featured_posts = get_field('series');
            if( $featured_posts ): ?>
                <?php foreach( $featured_posts as $post ):

                    // Setup this post for WP functions (variable must be named $post).
                    setup_postdata($post); ?>
                        <a href="<?php the_permalink(); ?>"><?php the_title(); ?>
                <?php endforeach; ?>
                <?php
                // Reset the global post object so that the rest of the page works correctly.
                wp_reset_postdata(); ?>
            <?php endif; ?>

            <a title="<?php the_title(); ?>" href="<?php the_field('link'); ?>"><?php the_field('release'); ?>

            <?php
            $featured_posts = get_field('group');
            if( $featured_posts ): ?>
                <?php foreach( $featured_posts as $post ):

                    // Setup this post for WP functions (variable must be named $post).
                    setup_postdata($post); ?>
                    <a href="<?php the_permalink(); ?>"><?php the_title(); ?>
                <?php endforeach; ?>
                <?php
                // Reset the global post object so that the rest of the page works correctly.
                wp_reset_postdata(); ?>
            <?php endif; ?>

        <?php endwhile; endif; ?>

    <?php wp_reset_query(); ?>

```

Thanks for taking time to help me out with this issue.

Body:
I've been trying to create a query loop that lists posts on the index page inside a table.

Every day should have it's own table and list all posts for that day in the table. The day and date should be displayed on top of each table.

Example:

Tuesday, December 13, 2022

Post 1
Post 2
Post 3
Post 5

Monday, December 12, 2022

Post 1
Post 2
<Pagination>

I also would like pagination to work for the table.

I'm quite new to wordpress/php and I'm trying to build a custom theme and I'm using CPT plugin for custom post type so forgive me if I made a mistake in my question or with the code.

This is What I've tried so far

    <?php query_posts( array( 'post_type' => 'post', 'cat' => 3316, 'post_status' => 'publish', 'posts_per_page'=>'2', 'order' => 'DESC', 'orderby' => 'date', 'paged' => $paged ) ); ?>

    <?php if ($day != get_the_date()) {echo "<time>".get_the_date()."</time>";$day=get_the_date();} else {} ?>

                Title
                Release
                Group

        <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

            <?php
            $featured_posts = get_field('series');
            if( $featured_posts ): ?>
                <?php foreach( $featured_posts as $post ):

                    // Setup this post for WP functions (variable must be named $post).
                    setup_postdata($post); ?>
                        <a href="<?php the_permalink(); ?>"><?php the_title(); ?>
                <?php endforeach; ?>
                <?php
                // Reset the global post object so that the rest of the page works correctly.
                wp_reset_postdata(); ?>
            <?php endif; ?>

            <a title="<?php the_title(); ?>" href="<?php the_field('link'); ?>"><?php the_field('release'); ?>

            <?php
            $featured_posts = get_field('group');
            if( $featured_posts ): ?>
                <?php foreach( $featured_posts as $post ):

                    // Setup this post for WP functions (variable must be named $post).
                    setup_postdata($post); ?>
                    <a href="<?php the_permalink(); ?>"><?php the_title(); ?>
                <?php endforeach; ?>
                <?php
                // Reset the global post object so that the rest of the page works correctly.
                wp_reset_postdata(); ?>
            <?php endif; ?>

        <?php endwhile; endif; ?>

    <?php wp_reset_query(); ?>

Thanks for taking time to help me out with this issue.


问:
android studio emulator black screen
Could you help me to start emulator. It never started before on this PC. When I started it I just see black screen and than error. Also I have the same problem with genymotion.

I tried different options: x86_64, x86, various API, cold boot, wipe date, press power button. Reboot PC)) If need something more, please tell me!
I investigated this issue but nothing helps. My setup:

Title: android studio emulator black screen


问:
Show a product price based on product ID in WordPress
This might be a stupid question, but have searched quite a lot and have still not found a way for this.

I use Wordpress, WooCommerce and Elementor on my webshop.

I update my prices about once a month. A lot of places I have a price written as texteditor or headline, and want to change that to be price coming from system.
I have tried some different ways, but so far I could not manage to make it work.

Any ideas?

I have tried use product lists, I can get the price based on product ID, but cannot style it.
I have tried with CSS shortcode, but could not make it work.
There is Product Price fields in Wordpress, but cannot make them work.


问:
Shell API - Cannot move my file in the Recycle Bin if deleted from an alias
I use this code to delete a file from my local system:

bool Delete(const ::CComPtr<IShellItem>& pShellItem, bool permanently)
{
    ::CComPtr<IFileOperation> pFileOperation;

    // initialize the file operation
    HRESULT hr = ::CoCreateInstance(CLSID_FileOperation, NULL, CLSCTX_ALL, IID_PPV_ARGS(&pFileOperation));

    if (FAILED(hr))
        return false;

    // don't show any system error message to user, but returns an error code if delete failed. Also show elevation prompt if required
    DWORD fileOpFlags = FOF_SILENT | FOF_NO_UI | FOF_NOERRORUI | FOF_NOCONFIRMATION | FOFX_EARLYFAILURE | FOFX_SHOWELEVATIONPROMPT;

    // do move file on Recycle Bin instead of deleting it permanently?
    if (!permanently)
        if (WOSHelper_MSWindows::GetWindowsVersion() >= WOSHelper_MSWindows::IEVersion::IE_Win8)
            // Windows 8 introduces the FOFX_RECYCLEONDELETE flag and deprecates the FOF_ALLOWUNDO in favor of FOFX_ADDUNDORECORD
            fileOpFlags |= FOFX_ADDUNDORECORD | FOFX_RECYCLEONDELETE;
        else
            // for Windows 7 and Vista, RecycleOnDelete is the default behavior
            fileOpFlags |= FOF_ALLOWUNDO;

    // prepare the delete operation flags
    hr = pFileOperation->SetOperationFlags(fileOpFlags);

    if (FAILED(hr))
        return false;

    // mark item for deletion
    hr = pFileOperation->DeleteItem(pShellItem, nullptr);

    if (FAILED(hr))
        return false;

    // delete the item
    hr = pFileOperation->PerformOperations();

    if (FAILED(hr))
        return false;

    return true;
}
```
<p>On my local computer I also mounted an alias disk using this command:</p>
```subst V: "C:\MyData"
```

Now, using my above alias, I need to move a file to the Recycle Bin (this is done by setting the permanently parameter to false while I call my function) from the following path:

V:\MyProject\MyFileToDel.txt

Doing that, the file is well deleted from its containing folder, but it is never moved to the Recycle Bin. On the other hand, when I try to delete my file from its original path:

C:\MyData\MyProject\MyFileToDel.txt

The file is well deleted from its containing folder AND moved to the Recycle Bin, as expected.

However this is the exact same file in the exact same location in the both cases, the only difference is that one is deleted from an alias, and the other from its complete path.

What should I change to make the function to work in the both cases?

Body:
I use this code to delete a file from my local system:

bool Delete(const ::CComPtr<IShellItem>& pShellItem, bool permanently)
{
    ::CComPtr<IFileOperation> pFileOperation;

    // initialize the file operation
    HRESULT hr = ::CoCreateInstance(CLSID_FileOperation, NULL, CLSCTX_ALL, IID_PPV_ARGS(&pFileOperation));

    if (FAILED(hr))
        return false;

    // don't show any system error message to user, but returns an error code if delete failed. Also show elevation prompt if required
    DWORD fileOpFlags = FOF_SILENT | FOF_NO_UI | FOF_NOERRORUI | FOF_NOCONFIRMATION | FOFX_EARLYFAILURE | FOFX_SHOWELEVATIONPROMPT;

    // do move file on Recycle Bin instead of deleting it permanently?
    if (!permanently)
        if (WOSHelper_MSWindows::GetWindowsVersion() >= WOSHelper_MSWindows::IEVersion::IE_Win8)
            // Windows 8 introduces the FOFX_RECYCLEONDELETE flag and deprecates the FOF_ALLOWUNDO in favor of FOFX_ADDUNDORECORD
            fileOpFlags |= FOFX_ADDUNDORECORD | FOFX_RECYCLEONDELETE;
        else
            // for Windows 7 and Vista, RecycleOnDelete is the default behavior
            fileOpFlags |= FOF_ALLOWUNDO;

    // prepare the delete operation flags
    hr = pFileOperation->SetOperationFlags(fileOpFlags);

    if (FAILED(hr))
        return false;

    // mark item for deletion
    hr = pFileOperation->DeleteItem(pShellItem, nullptr);

    if (FAILED(hr))
        return false;

    // delete the item
    hr = pFileOperation->PerformOperations();

    if (FAILED(hr))
        return false;

    return true;
}

On my local computer I also mounted an alias disk using this command:

subst V: "C:\MyData"

Now, using my above alias, I need to move a file to the Recycle Bin (this is done by setting the permanently parameter to false while I call my function) from the following path:

V:\MyProject\MyFileToDel.txt

Doing that, the file is well deleted from its containing folder, but it is never moved to the Recycle Bin. On the other hand, when I try to delete my file from its original path:

C:\MyData\MyProject\MyFileToDel.txt

The file is well deleted from its containing folder AND moved to the Recycle Bin, as expected.

However this is the exact same file in the exact same location in the both cases, the only difference is that one is deleted from an alias, and the other from its complete path.

What should I change to make the function to work in the both cases?


问:
Gradual increase in HTML slider as opposed to an equal increase
I have a basic HTML slider which I have added JavaScript to to perform some calculations. The min number in my slider is 1 and the max is 25,001. This is a huge range, and because of this, it makes it difficult to select a specific number. (No input area or arrows because of the design I've been given)

What I need is to be able to select the lower numbers via a slider very similar to the slider on this page. https://thirst.io/pricing/

```<code><div class="slider">
  <input type="range" id="slider" min="1" max="25001">
</div>
</code>```

Body:
I have a basic HTML slider which I have added JavaScript to to perform some calculations. The min number in my slider is 1 and the max is 25,001. This is a huge range, and because of this, it makes it difficult to select a specific number. (No input area or arrows because of the design I've been given)

What I need is to be able to select the lower numbers via a slider very similar to the slider on this page. https://thirst.io/pricing/

  <input type="range" id="slider" min="1" max="25001">


问:
Application seems to be searching the wrong version of Assembly
I'm developing a .net APP using NPOI library to read excel files, but I'm having problems when its referencing ICSharpZipLib.

I added NPOI in nuget and its referencing version 1.3.3 or greater of sharpziplib.

The version copied to bin folder is 1.3.1.9

When I run in my dev machine it works, but when I publish and copy to the server, I got an error, saying it's not finding version 1.0.0.3 of SharpZipDLL. I don't know why its asking for version 1.0.0.3, I've already checked assembly redirection in the web.config but there's nothing there to this dll.


问:
Too many arguments for public open fun navigateUp()
I wrote the next code

```<code>val navController = this.findNavController(R.id.my_nav_host_fragment)
return NavigationUI.navigateUp(drawerLayout, navController) // that line makes an error
</code>```

After what I caught that error

```<code>Too many arguments for public open fun navigateUp(): Boolean defined in androidx.navigation.NavController
</code>```

My imports connected to this block of code are

```<code>import androidx.navigation.findNavController

</code>```

Gradle config

```<code>def nav_version = "2.5.3"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
</code>```

I've tried a solution from here, but it didn't help at all, because doing that I just got a new error

```<code>Unresolved reference: findNavController
</code>```

Body:
I wrote the next code

val navController = this.findNavController(R.id.my_nav_host_fragment)
return NavigationUI.navigateUp(drawerLayout, navController) // that line makes an error

After what I caught that error

Too many arguments for public open fun navigateUp(): Boolean defined in androidx.navigation.NavController

My imports connected to this block of code are

import androidx.navigation.findNavController

Gradle config

def nav_version = "2.5.3"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"

I've tried a solution from here, but it didn't help at all, because doing that I just got a new error

Unresolved reference: findNavController


问:
laravel sanctum guard trow Segmentation violation error
I would like to use sanctum as a guard, I switch the driver from session to sanctum and then this gives the error message. I don't know where to look for the error or which way to start.

'guards' => [
        'web' => [
            'driver' => 'session' -> // --> to this 'sanctum',
            'provider' => 'members',
        ],
```
```In WorkerCrashedException.php line 41:

  The command "PARATEST='1' TEST_TOKEN='11' UNIQUE_TEST_TOKEN='11_63bbc9686d4b6' '/usr/local/bin/php' '/var/www/html/vendor/phpunit/phpunit/phpunit' '--configuration' '/var/www/html/phpunit.xml' '--filter' '/
  shouldRejectLoginAsMemberGivingCorrectPasswordAndGivingInvalidEmail(?:\s|$)/' '--no-logging' '--no-coverage' '--printer' 'ParaTest\Runners\PHPUnit\Worker\NullPhpunitPrinter' '--log-junit' '/tmp/PT_BPNPOL' '
  /var/www/html/tests/Unit/Controllers/AuthControllerTest.php'" failed.

  Exit Code: 139(Segmentation violation)

  Working directory: /var/www/html

  Output:
  ================

  Error Output:
  ================
```

Body:
I would like to use sanctum as a guard, I switch the driver from session to sanctum and then this gives the error message. I don't know where to look for the error or which way to start.

'guards' => [
        'web' => [
            'driver' => 'session' -> // --> to this 'sanctum',
            'provider' => 'members',
        ],

In WorkerCrashedException.php line 41:

  The command "PARATEST='1' TEST_TOKEN='11' UNIQUE_TEST_TOKEN='11_63bbc9686d4b6' '/usr/local/bin/php' '/var/www/html/vendor/phpunit/phpunit/phpunit' '--configuration' '/var/www/html/phpunit.xml' '--filter' '/
  shouldRejectLoginAsMemberGivingCorrectPasswordAndGivingInvalidEmail(?:\s|$)/' '--no-logging' '--no-coverage' '--printer' 'ParaTest\Runners\PHPUnit\Worker\NullPhpunitPrinter' '--log-junit' '/tmp/PT_BPNPOL' '
  /var/www/html/tests/Unit/Controllers/AuthControllerTest.php'" failed.

  Exit Code: 139(Segmentation violation)

  Working directory: /var/www/html

  Output:
  ================

  Error Output:
  ================


问:
Other daemon process like mediaserverd cause OOM?
As we know mediaserverd daemon process can cause app foreground OOM and get killed, is there way to get how many memory used by these daemon process or get other daemon process will cause app foreground OOM?</p>


问:
Matrix Vector Multiplication in R
```<code>optimResult<-solnl(X=rep(x=1/length(ExpectedReturn),length(ExpectedReturn)),
                  objfun = function(w) - ((t(w)%*%ExpectedReturn-LogRiskFreeRates)/ (t(w)%*%CovAssets%*%w)),
                  confun = NULL,
                  A = NULL,
                  B = NULL,
                  **Aeq = matrix(rep(x=1,length(ExpectedReturn)),nrow=1),**
                  Beq = 1,
                  lb = rep(x=0,length(ExpectedReturn)),
                           ub = NULL)
</code>```
```<code>optimResult<-solnl(X=rep(x=1/length(ExpectedReturn),length(ExpectedReturn)),
                  objfun = function(w) - ((t(w)%*%ExpectedReturn-LogRiskFreeRates)/ (t(w)%*%CovAssets%*%w)),
                  confun = NULL,
                  A = NULL,
                  B = NULL,
                  **Aeq = rep(x=1,length(ExpectedReturn)),**
                  Beq = 1,
                  lb = rep(x=0,length(ExpectedReturn)),
                           ub = NULL)
</code>```
```<code>Error in if (eq > 0 & ineq > 0) { : argument is of length zero
</code>```

I'm new to R and dealing with this minimization problem.
Here I cannot understand why the second code returns the error and Aeq has to be a matrix.
Thank you very much for any help!

Title: Matrix Vector Multiplication in R

Body:
optimResult<-solnl(X=rep(x=1/length(ExpectedReturn),length(ExpectedReturn)),
                  objfun = function(w) - ((t(w)%*%ExpectedReturn-LogRiskFreeRates)/ (t(w)%*%CovAssets%*%w)),
                  confun = NULL,
                  A = NULL,
                  B = NULL,
                  **Aeq = matrix(rep(x=1,length(ExpectedReturn)),nrow=1),**
                  Beq = 1,
                  lb = rep(x=0,length(ExpectedReturn)),
                           ub = NULL)

optimResult<-solnl(X=rep(x=1/length(ExpectedReturn),length(ExpectedReturn)),
                  objfun = function(w) - ((t(w)%*%ExpectedReturn-LogRiskFreeRates)/ (t(w)%*%CovAssets%*%w)),
                  confun = NULL,
                  A = NULL,
                  B = NULL,
                  **Aeq = rep(x=1,length(ExpectedReturn)),**
                  Beq = 1,
                  lb = rep(x=0,length(ExpectedReturn)),
                           ub = NULL)

Error in if (eq > 0 & ineq > 0) { : argument is of length zero

I'm new to R and dealing with this minimization problem.
Here I cannot understand why the second code returns the error and Aeq has to be a matrix.
Thank you very much for any help!


问:
I want to know how to calculate percentage difference , month against same month for adjacent years in Spotfire
I want to  calculate percentage difference ,month against same month for adjacent years in Spotfire. I want to  calculate percentage difference ,month against same month for adjacent years in Spotfire. I used different Percentage year over year function which did not give me desired results.

Previous year balance (April 2022)= 4917789550.01Current year balance (April 2023) = 6936756767.18balance Difference =2,018,967,217.17% balance Difference= balance Difference divided by Previous year x100 Balance.
Which means 2,018,967,217.17 divided by 6936756767.18 x 100 = 41.05%

But Spotfire is giving me 0.41%

Kindly assist, I am new to Spotfire

enter image description here


问:
Link component with nextjs doesnt work (not clickable ?)
Working on some web site draft,

I have an issue that I dont understand
None of my < Link > are clickable. I use nextjs link component,
by inspecting my page I seems that everything is generate as expected

```<code><Link href={`/about/about-dark`}>
    <a
     className="butn bord curve mt-40 wow fadeInUp"
     data-wow-delay=".8s"
>
      <span>Discover</span>
    </a>
</Link>
</code>```

It's even more weird because the link in my menu works, but none of my buttons does.

here a demo: https://main.d3jahvwbjvsmfk.amplifyapp.com/

Body:
Working on some web site draft,

I have an issue that I dont understand
None of my < Link > are clickable. I use nextjs link component,
by inspecting my page I seems that everything is generate as expected

<Link href={`/about/about-dark`}>

      Discover

</Link>

It's even more weird because the link in my menu works, but none of my buttons does.

here a demo: https://main.d3jahvwbjvsmfk.amplifyapp.com/


问:
Run-time error 91: Object variable or With block variable not set
Good morning VBA Guru's. I am in need of some guidance with the runtime 91 error. I have read the top suggestions and have not been able to figure this one out. My user form initializes and presents the correct information in the combo box...  When I hit the clost button i get the run time 91 error.  What have I coded wrong?

```<code>Private Sub UserForm_Initialize()

Dim lastRow As Integer
Dim i As Integer
'Dim ws As Worksheet
'Set ws = Worksheets("Sheet2")

    Call LoopThroughFiles

lastRow = Sheet2.Cells(Sheet2.Rows.Count, "A").End(xlUp).Row

    With Audit_Selection_Form.ComboBox1
        For i = 1 To lastRow
            ComboBox1.AddItem Sheet2.Cells(i, 1)
        Next
    End With

Audit_Selection_Form.Show

End Sub
</code>```

I have commented out my attempt to fix as it threw another error. here is what is called with the close button click

```<code>Private Sub cbClose_Click()

    Unload Me

End Sub
</code>```

Additional Detail:  The user form is named Audit_Selection_Form
this is initiated through workbook_open()

when I open the editor the error line that is highlighted is the cbClose_Click() section.

Body:
Good morning VBA Guru's. I am in need of some guidance with the runtime 91 error. I have read the top suggestions and have not been able to figure this one out. My user form initializes and presents the correct information in the combo box...  When I hit the clost button i get the run time 91 error.  What have I coded wrong?

Private Sub UserForm_Initialize()

Dim lastRow As Integer
Dim i As Integer
'Dim ws As Worksheet
'Set ws = Worksheets("Sheet2")

    Call LoopThroughFiles

lastRow = Sheet2.Cells(Sheet2.Rows.Count, "A").End(xlUp).Row

    With Audit_Selection_Form.ComboBox1
        For i = 1 To lastRow
            ComboBox1.AddItem Sheet2.Cells(i, 1)
        Next
    End With

Audit_Selection_Form.Show

End Sub

I have commented out my attempt to fix as it threw another error. here is what is called with the close button click

Private Sub cbClose_Click()

    Unload Me

End Sub

Additional Detail:  The user form is named Audit_Selection_Form
this is initiated through workbook_open()

when I open the editor the error line that is highlighted is the cbClose_Click() section.


问:
testing-library/react-native error if component includes png
I'm trying to write unit tests to react-native component, everything works fine as long as it does not have SVG inside. If I comment it out, everything works flawless, however if I have it inside component I get error:

```<code>Warning: React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.
</code>```

```<code>Check the render method of `Accordion`.
</code>```

my code is :

```<code>describe('Accordion', () => {
  const props = {
    enableExpandOrCollapseAll: true,
    expandAll: true,
    toggleExpand: jest.fn()
  }
beforeEach(() => {
    documentBody = render(
      <Accordion {...props}>
        <Text testID={testId}>Example Body</Text>
      </Accordion>,
      {
        wrapper: CombinedProviders
      }
    )
  })
  it('Should render component with children', () => {
    const exampleBody = documentBody.queryByTestId(testId)
    expect(exampleBody).toBeTruthy()
  })
})
</code>```

And tests are crashing on VStack line:

```<code>import ArrowExpand from '@assets/icons/arrow-expand.svg'
import ArrowCollapse from '@assets/icons/arrow-collapse.svg'

 <Box h="70%">
      <ScrollView>
        {enableExpandOrCollapseAll && (
          <>
            <TouchableOpacity testID="toggleExpand" style={styles.row} onPress={() => toggleExpand(!expandAll)}>
              <Text style={styles.title}>{expandAll ? t('accordion.collapse') : t('accordion.expand')}</Text>
              <VStack pl={2}>{expandAll ? <ArrowCollapse /> : <ArrowExpand />}</VStack>
            </TouchableOpacity>
            <Divider />
          </>
        )}
        {children}
      </ScrollView>
    </Box>
</code>```

What is this error about and how to fix it?

Body:
I'm trying to write unit tests to react-native component, everything works fine as long as it does not have SVG inside. If I comment it out, everything works flawless, however if I have it inside component I get error:

Warning: React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.

Check the render method of `Accordion`.

my code is :

describe('Accordion', () => {
  const props = {
    enableExpandOrCollapseAll: true,
    expandAll: true,
    toggleExpand: jest.fn()
  }
beforeEach(() => {
    documentBody = render(
      <Accordion {...props}>
        <Text testID={testId}>Example Body</Text>
      </Accordion>,
      {
        wrapper: CombinedProviders
      }
    )
  })
  it('Should render component with children', () => {
    const exampleBody = documentBody.queryByTestId(testId)
    expect(exampleBody).toBeTruthy()
  })
})

And tests are crashing on VStack line:

import ArrowExpand from '@assets/icons/arrow-expand.svg'
import ArrowCollapse from '@assets/icons/arrow-collapse.svg'

 <Box h="70%">
      <ScrollView>
        {enableExpandOrCollapseAll && (
          <>
            <TouchableOpacity testID="toggleExpand" style={styles.row} onPress={() => toggleExpand(!expandAll)}>
              <Text style={styles.title}>{expandAll ? t('accordion.collapse') : t('accordion.expand')}</Text>
              <VStack pl={2}>{expandAll ? <ArrowCollapse /> : <ArrowExpand />}</VStack>
            </TouchableOpacity>
            <Divider />
          </>
        )}
        {children}
      </ScrollView>
    </Box>

What is this error about and how to fix it?


问:
tRPC React Express - Webpack loader problem
I'm trying to implement tRPC to the legacy app but as soon as I add the Client (trpc react query) part my app crashes and can't build. I suck at webpack and finding myself with this legacy config is a nightmare.

I've added mjs part which helped to resolve initial build problems but seems there is still something missing from config so it could build successfully...

{
        test: /\.mjs$/,
        include: /node_modules/,
        type: 'javascript/auto',
      },
```
<p>Error:</p>
<pre class="lang-js prettyprint-override"><code>Version: webpack 4.35.3
Time: 3181ms
Built at: 12/13/2022 3:15:44 PM
         Asset      Size  Chunks             Chunk Names
     bundle.js    13 MiB  bundle  [emitted]  bundle
 bundle.js.map  11.3 MiB  bundle  [emitted]  bundle
    styles.css   105 KiB  bundle  [emitted]  bundle
styles.css.map   137 KiB  bundle  [emitted]  bundle
 + 5 hidden assets
Entrypoint bundle = styles.css bundle.js styles.css.map bundle.js.map
[./node_modules/.pnpm/@trpc+client@10.5.0_@trpc+server@10.5.0/node_modules/@trpc/client/dist/index.js] 530 bytes {bundle} [built] [failed] [1 error]
[./node_modules/.pnpm/@trpc+react-query@10.5.0_d022380f8796fe4307eb66404abcd925/node_modules/@trpc/react-query/dist/createHooksInternal-808efaa7.mjs] 302 bytes {bundle} [built] [failed] [1 error]
[./node_modules/.pnpm/@trpc+react-query@10.5.0_d022380f8796fe4307eb66404abcd925/node_modules/@trpc/react-query/dist/getArrayQueryKey-c6f6badf.mjs] 1020 bytes {bundle} [built]
[./node_modules/.pnpm/@trpc+react-query@10.5.0_d022380f8796fe4307eb66404abcd925/node_modules/@trpc/react-query/dist/index.mjs] 1.37 KiB {bundle} [built]
[./node_modules/.pnpm/@trpc+server@10.5.0/node_modules/@trpc/server/dist/index-972002da.mjs] 1.39 KiB {bundle} [built]
[./node_modules/.pnpm/@trpc+server@10.5.0/node_modules/@trpc/server/dist/shared/index.mjs] 89 bytes {bundle} [built]
[./node_modules/.pnpm/@trpc+server@10.5.0/node_modules/@trpc/server/shared/index.js] 44 bytes {bundle} [built]
[./src/renderer.js] 2.43 KiB {bundle} [built]
    + 1934 hidden modules

ERROR in ./node_modules/.pnpm/@trpc+react-query@10.5.0_d022380f8796fe4307eb66404abcd925/node_modules/@trpc/react-query/dist/createHooksInternal-808efaa7.mjs 127:13
Module parse failed: Unexpected token (127:13)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         path,
|         input,
>         opts?.trpc
|     ];
| }
 @ ./node_modules/.pnpm/@trpc+react-query@10.5.0_d022380f8796fe4307eb66404abcd925/node_modules/@trpc/react-query/dist/index.mjs 4:0-144 17:27-53 26:15-41 30:18-37 39:17-36
 @ ./src/universal/TrpcWrapper.tsx
 @ ./src/renderer.js
 @ ./src/client/index.js

ERROR in ./node_modules/.pnpm/@trpc+client@10.5.0_@trpc+server@10.5.0/node_modules/@trpc/client/dist/index.js 33:24
Module parse failed: Unexpected token (33:24)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         const { promise , abort  } = observable.observableToPromise(req$);
|         const abortablePromise = new Promise((resolve, reject)=>{
>             opts.signal?.addEventListener('abort', abort);
|             promise.then((envelope)=>{
|                 resolve(envelope.result.data);
 @ ./node_modules/.pnpm/@trpc+react-query@10.5.0_d022380f8796fe4307eb66404abcd925/node_modules/@trpc/react-query/dist/index.mjs 1:0-29 1:0-29
 @ ./src/universal/TrpcWrapper.tsx
 @ ./src/renderer.js
 @ ./src/client/index.js
ℹ ｢wdm｣: Failed to compile.
</code>```

// webpack.config.js
const path = require('path')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const AssetsPlugin = require('assets-webpack-plugin')
const { DefinePlugin } = require('webpack')

const isDev = process.env.NODE_ENV === 'development'

const OUTPUT_PATH = isDev
  ? path.join(__dirname, './dist')
  : path.join(__dirname, './dist/public/static')
const BUNDLE_FILE = `[name]${isDev ? '' : '-[hash]'}.js`
const STYLES_FILE = `styles${isDev ? '' : '-[hash]'}.css`

const config = {
  mode: 'development',
  entry: {
    bundle: './src/client/index',
  },
  resolve: {
    extensions: ['.mjs', '.ts', '.tsx', '.js', '.json'],
  },
  devtool: 'source-map',
  module: {
    rules: [
      {
        test: /\.mjs$/,
        include: /node_modules/,
        type: 'javascript/auto',
      },
      {
        test: /\.(js)$/,
        exclude: [/node_modules\/(?!(react-hook-form)\/).*/],
        use: [{ loader: 'babel-loader' }],
      },
      {
        test: /.(js|jsx|ts|tsx)$/,
        include: path.resolve(__dirname, 'src'),
        use: ['babel-loader'],
      },
      {
        test: /\.(eot|svg|ttf|woff|woff2)$/,
        include: /xxx-modern/,
        use: ['file-loader?name=fonts/[name].[ext]'],
      },
      {
        test: /\.scss$/,
        include: path.resolve(__dirname, 'src'),
        use: [
          {
            loader: MiniCssExtractPlugin.loader,
          },
          'css-loader',
          {
            loader: 'sass-loader',
            options: {
              includePaths: ['node_modules/'],
            },
          },
        ],
      },
    ],
  },
  output: {
    path: OUTPUT_PATH,
    publicPath: '/xxx-xxx/static/',
    filename: BUNDLE_FILE,
  },
  plugins: [
    new AssetsPlugin({
      filename: './src/webpack-assets.json',
    }),
    new DefinePlugin({
      'process.env': {
        NODE_ENV: JSON.stringify(process.env.NODE_ENV),
      },
    }),
    new MiniCssExtractPlugin({
      filename: STYLES_FILE,
    }),
  ],
}

if (isDev) {
  config.devServer = {
    host: '0.0.0.0',
    port: 9000,
    inline: false,
    proxy: {
      '*': {
        target: 'http://localhost:9005',
      },
    },
  }
}

module.exports = config

```
<pre class="lang-js prettyprint-override"><code>//tsconfig.json
{
  "compilerOptions": {
    "sourceMap": true,
    "noImplicitAny": false,
    "downlevelIteration": true,
    "esModuleInterop": true,
    "module": "commonjs",
    "target": "es5",
    "lib": ["es2015", "es2017", "dom", "DOM.Iterable", "ESNext"],
    "removeComments": true,
    "allowSyntheticDefaultImports": true,
    "jsx": "react",
    "checkJs": false,
    "strict": true,
    "allowJs": true,
    "types": ["node", "jest"]
  },
  "exclude": ["node_modules", "dist"],
  "include": ["src/**/*"]
}
</code>```

//.babelrc
{
  "env": {
    "browser": {
      "presets": [
        [
          "@babel/preset-env",
          {
            "modules": "commonjs",
            "targets": {
              "browsers": [
                "ie 9"
              ]
            }
          }
        ],
        "@babel/preset-react",
        "@babel/preset-typescript"
      ],
      "plugins": [
        "@babel/plugin-syntax-dynamic-import",
        "@babel/plugin-syntax-import-meta",
        "@babel/plugin-proposal-class-properties",
        "@babel/plugin-proposal-json-strings",
        [
          "@babel/plugin-proposal-decorators",
          {
            "legacy": true
          }
        ],
        "@babel/transform-runtime",
        "@babel/plugin-proposal-function-sent",
        "@babel/plugin-proposal-export-namespace-from",
        "@babel/plugin-proposal-numeric-separator",
        "@babel/plugin-proposal-throw-expressions",
        "@babel/plugin-proposal-export-default-from",
        "@babel/plugin-proposal-logical-assignment-operators",
        "@babel/plugin-proposal-optional-chaining",
        [
          "@babel/plugin-proposal-pipeline-operator",
          {
            "proposal": "minimal"
          }
        ],
        "@babel/plugin-proposal-nullish-coalescing-operator",
        "@babel/plugin-proposal-do-expressions",
        "@babel/plugin-proposal-function-bind",
        "@babel/proposal-object-rest-spread"
      ]
    },
    "node": {
      "presets": [
        [
          "@babel/preset-env",
          {
            "targets": {
              "node": "current"
            }
          }
        ],
        "@babel/preset-react",
        "@babel/preset-typescript"
      ],
      "plugins": [
        [
          "babel-plugin-transform-require-ignore",
          {
            "extensions": [
              ".css",
              ".sass",
              ".scss"
            ]
          }
        ],
        "@babel/plugin-syntax-dynamic-import",
        "@babel/plugin-syntax-import-meta",
        "@babel/plugin-proposal-class-properties",
        "@babel/plugin-proposal-json-strings",
        [
          "@babel/plugin-proposal-decorators",
          {
            "legacy": true
          }
        ],
        "@babel/transform-runtime",
        "@babel/plugin-proposal-function-sent",
        "@babel/plugin-proposal-export-namespace-from",
        "@babel/plugin-proposal-numeric-separator",
        "@babel/plugin-proposal-throw-expressions",
        "@babel/plugin-proposal-export-default-from",
        "@babel/plugin-proposal-logical-assignment-operators",
        "@babel/plugin-proposal-optional-chaining",
        [
          "@babel/plugin-proposal-pipeline-operator",
          {
            "proposal": "minimal"
          }
        ],
        "@babel/plugin-proposal-nullish-coalescing-operator",
        "@babel/plugin-proposal-do-expressions",
        "@babel/plugin-proposal-function-bind"
      ]
    }
  }
}
```

Body:
I'm trying to implement tRPC to the legacy app but as soon as I add the Client (trpc react query) part my app crashes and can't build. I suck at webpack and finding myself with this legacy config is a nightmare.

I've added mjs part which helped to resolve initial build problems but seems there is still something missing from config so it could build successfully...

{
        test: /\.mjs$/,
        include: /node_modules/,
        type: 'javascript/auto',
      },

Error:

Version: webpack 4.35.3
Time: 3181ms
Built at: 12/13/2022 3:15:44 PM
         Asset      Size  Chunks             Chunk Names
     bundle.js    13 MiB  bundle  [emitted]  bundle
 bundle.js.map  11.3 MiB  bundle  [emitted]  bundle
    styles.css   105 KiB  bundle  [emitted]  bundle
styles.css.map   137 KiB  bundle  [emitted]  bundle
 + 5 hidden assets
Entrypoint bundle = styles.css bundle.js styles.css.map bundle.js.map
[./node_modules/.pnpm/@trpc+client@10.5.0_@trpc+server@10.5.0/node_modules/@trpc/client/dist/index.js] 530 bytes {bundle} [built] [failed] [1 error]
[./node_modules/.pnpm/@trpc+react-query@10.5.0_d022380f8796fe4307eb66404abcd925/node_modules/@trpc/react-query/dist/createHooksInternal-808efaa7.mjs] 302 bytes {bundle} [built] [failed] [1 error]
[./node_modules/.pnpm/@trpc+react-query@10.5.0_d022380f8796fe4307eb66404abcd925/node_modules/@trpc/react-query/dist/getArrayQueryKey-c6f6badf.mjs] 1020 bytes {bundle} [built]
[./node_modules/.pnpm/@trpc+react-query@10.5.0_d022380f8796fe4307eb66404abcd925/node_modules/@trpc/react-query/dist/index.mjs] 1.37 KiB {bundle} [built]
[./node_modules/.pnpm/@trpc+server@10.5.0/node_modules/@trpc/server/dist/index-972002da.mjs] 1.39 KiB {bundle} [built]
[./node_modules/.pnpm/@trpc+server@10.5.0/node_modules/@trpc/server/dist/shared/index.mjs] 89 bytes {bundle} [built]
[./node_modules/.pnpm/@trpc+server@10.5.0/node_modules/@trpc/server/shared/index.js] 44 bytes {bundle} [built]
[./src/renderer.js] 2.43 KiB {bundle} [built]
    + 1934 hidden modules

ERROR in ./node_modules/.pnpm/@trpc+react-query@10.5.0_d022380f8796fe4307eb66404abcd925/node_modules/@trpc/react-query/dist/createHooksInternal-808efaa7.mjs 127:13
Module parse failed: Unexpected token (127:13)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         path,
|         input,
>         opts?.trpc
|     ];
| }
 @ ./node_modules/.pnpm/@trpc+react-query@10.5.0_d022380f8796fe4307eb66404abcd925/node_modules/@trpc/react-query/dist/index.mjs 4:0-144 17:27-53 26:15-41 30:18-37 39:17-36
 @ ./src/universal/TrpcWrapper.tsx
 @ ./src/renderer.js
 @ ./src/client/index.js

ERROR in ./node_modules/.pnpm/@trpc+client@10.5.0_@trpc+server@10.5.0/node_modules/@trpc/client/dist/index.js 33:24
Module parse failed: Unexpected token (33:24)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         const { promise , abort  } = observable.observableToPromise(req$);
|         const abortablePromise = new Promise((resolve, reject)=>{
>             opts.signal?.addEventListener('abort', abort);
|             promise.then((envelope)=>{
|                 resolve(envelope.result.data);
 @ ./node_modules/.pnpm/@trpc+react-query@10.5.0_d022380f8796fe4307eb66404abcd925/node_modules/@trpc/react-query/dist/index.mjs 1:0-29 1:0-29
 @ ./src/universal/TrpcWrapper.tsx
 @ ./src/renderer.js
 @ ./src/client/index.js
ℹ ｢wdm｣: Failed to compile.

// webpack.config.js
const path = require('path')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const AssetsPlugin = require('assets-webpack-plugin')
const { DefinePlugin } = require('webpack')

const isDev = process.env.NODE_ENV === 'development'

const OUTPUT_PATH = isDev
  ? path.join(__dirname, './dist')
  : path.join(__dirname, './dist/public/static')
const BUNDLE_FILE = `[name]${isDev ? '' : '-[hash]'}.js`
const STYLES_FILE = `styles${isDev ? '' : '-[hash]'}.css`

const config = {
  mode: 'development',
  entry: {
    bundle: './src/client/index',
  },
  resolve: {
    extensions: ['.mjs', '.ts', '.tsx', '.js', '.json'],
  },
  devtool: 'source-map',
  module: {
    rules: [
      {
        test: /\.mjs$/,
        include: /node_modules/,
        type: 'javascript/auto',
      },
      {
        test: /\.(js)$/,
        exclude: [/node_modules\/(?!(react-hook-form)\/).*/],
        use: [{ loader: 'babel-loader' }],
      },
      {
        test: /.(js|jsx|ts|tsx)$/,
        include: path.resolve(__dirname, 'src'),
        use: ['babel-loader'],
      },
      {
        test: /\.(eot|svg|ttf|woff|woff2)$/,
        include: /xxx-modern/,
        use: ['file-loader?name=fonts/[name].[ext]'],
      },
      {
        test: /\.scss$/,
        include: path.resolve(__dirname, 'src'),
        use: [
          {
            loader: MiniCssExtractPlugin.loader,
          },
          'css-loader',
          {
            loader: 'sass-loader',
            options: {
              includePaths: ['node_modules/'],
            },
          },
        ],
      },
    ],
  },
  output: {
    path: OUTPUT_PATH,
    publicPath: '/xxx-xxx/static/',
    filename: BUNDLE_FILE,
  },
  plugins: [
    new AssetsPlugin({
      filename: './src/webpack-assets.json',
    }),
    new DefinePlugin({
      'process.env': {
        NODE_ENV: JSON.stringify(process.env.NODE_ENV),
      },
    }),
    new MiniCssExtractPlugin({
      filename: STYLES_FILE,
    }),
  ],
}

if (isDev) {
  config.devServer = {
    host: '0.0.0.0',
    port: 9000,
    inline: false,
    proxy: {
      '*': {
        target: 'http://localhost:9005',
      },
    },
  }
}

module.exports = config

//tsconfig.json
{
  "compilerOptions": {
    "sourceMap": true,
    "noImplicitAny": false,
    "downlevelIteration": true,
    "esModuleInterop": true,
    "module": "commonjs",
    "target": "es5",
    "lib": ["es2015", "es2017", "dom", "DOM.Iterable", "ESNext"],
    "removeComments": true,
    "allowSyntheticDefaultImports": true,
    "jsx": "react",
    "checkJs": false,
    "strict": true,
    "allowJs": true,
    "types": ["node", "jest"]
  },
  "exclude": ["node_modules", "dist"],
  "include": ["src/**/*"]
}

//.babelrc
{
  "env": {
    "browser": {
      "presets": [
        [
          "@babel/preset-env",
          {
            "modules": "commonjs",
            "targets": {
              "browsers": [
                "ie 9"
              ]
            }
          }
        ],
        "@babel/preset-react",
        "@babel/preset-typescript"
      ],
      "plugins": [
        "@babel/plugin-syntax-dynamic-import",
        "@babel/plugin-syntax-import-meta",
        "@babel/plugin-proposal-class-properties",
        "@babel/plugin-proposal-json-strings",
        [
          "@babel/plugin-proposal-decorators",
          {
            "legacy": true
          }
        ],
        "@babel/transform-runtime",
        "@babel/plugin-proposal-function-sent",
        "@babel/plugin-proposal-export-namespace-from",
        "@babel/plugin-proposal-numeric-separator",
        "@babel/plugin-proposal-throw-expressions",
        "@babel/plugin-proposal-export-default-from",
        "@babel/plugin-proposal-logical-assignment-operators",
        "@babel/plugin-proposal-optional-chaining",
        [
          "@babel/plugin-proposal-pipeline-operator",
          {
            "proposal": "minimal"
          }
        ],
        "@babel/plugin-proposal-nullish-coalescing-operator",
        "@babel/plugin-proposal-do-expressions",
        "@babel/plugin-proposal-function-bind",
        "@babel/proposal-object-rest-spread"
      ]
    },
    "node": {
      "presets": [
        [
          "@babel/preset-env",
          {
            "targets": {
              "node": "current"
            }
          }
        ],
        "@babel/preset-react",
        "@babel/preset-typescript"
      ],
      "plugins": [
        [
          "babel-plugin-transform-require-ignore",
          {
            "extensions": [
              ".css",
              ".sass",
              ".scss"
            ]
          }
        ],
        "@babel/plugin-syntax-dynamic-import",
        "@babel/plugin-syntax-import-meta",
        "@babel/plugin-proposal-class-properties",
        "@babel/plugin-proposal-json-strings",
        [
          "@babel/plugin-proposal-decorators",
          {
            "legacy": true
          }
        ],
        "@babel/transform-runtime",
        "@babel/plugin-proposal-function-sent",
        "@babel/plugin-proposal-export-namespace-from",
        "@babel/plugin-proposal-numeric-separator",
        "@babel/plugin-proposal-throw-expressions",
        "@babel/plugin-proposal-export-default-from",
        "@babel/plugin-proposal-logical-assignment-operators",
        "@babel/plugin-proposal-optional-chaining",
        [
          "@babel/plugin-proposal-pipeline-operator",
          {
            "proposal": "minimal"
          }
        ],
        "@babel/plugin-proposal-nullish-coalescing-operator",
        "@babel/plugin-proposal-do-expressions",
        "@babel/plugin-proposal-function-bind"
      ]
    }
  }
}


问:
API is saying that fields are required although I think the fields are being provided: Python/JSON
I am working with an API of which has a few simple commands. I am trying to modify the settings of a power distribution unit through this API. I believe I must be doing something wrong with Python or JSON but cannot figure out what it is exactly. I keep getting the same error, yet I feel like I am meeting the requirements.

The code I wrote is this (some info taken out for security):

```<code>import requests
import json
url = "http://*my_ip*/api/ports/7"

payload = json.dumps({
    "status": True,
    "lastOnTime": "2022-11-02T05:29:03.756865Z",
    "type": 1
})

headers = {
    "Authorization": "JWT *my_token*",
    "Content-Type": "application/json"
}

response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
print(response.reason)

</code>```

The response that I get from this is:
{"lastOnTime":["This field is required."],"type":["This field is required."]}
Bad Request

Doing a GET request provides this response:
{"id":7,"label":"Miner7","notes":"Notes for Miner7","status":true,"warning":true,"autoReset":true,"thresholdLow":0,"thresholdHigh":4200,"maxAttemptsLow":5,"maxAttemptsHigh":5,"attemptsLow":5,"attemptsHigh":0,"resetDelayLow":360,"resetDelayHigh":20,"timeOffLow":360,"timeOffHigh":120,"timeBeforeResetLow":360,"timeBeforeResetHigh":16,"postStateLow":true,"postStateHigh":true,"total":16607600,"lastOnTime":"2022-11-02T05:29:03.756865Z","active":true,"addTime":"2022-04-22T21:33:26.283301Z","updateTime":"2022-11-02T05:35:12.591053Z","type":1}

I am putting the fields of lastOnTime and type into the payload, but for some reason it does not seem they are being acknowledged. What am I doing wrong here?

Body:
I am working with an API of which has a few simple commands. I am trying to modify the settings of a power distribution unit through this API. I believe I must be doing something wrong with Python or JSON but cannot figure out what it is exactly. I keep getting the same error, yet I feel like I am meeting the requirements.

The code I wrote is this (some info taken out for security):

import requests
import json
url = "http://*my_ip*/api/ports/7"

payload = json.dumps({
    "status": True,
    "lastOnTime": "2022-11-02T05:29:03.756865Z",
    "type": 1
})

headers = {
    "Authorization": "JWT *my_token*",
    "Content-Type": "application/json"
}

response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
print(response.reason)

The response that I get from this is:
{"lastOnTime":["This field is required."],"type":["This field is required."]}
Bad Request

Doing a GET request provides this response:
{"id":7,"label":"Miner7","notes":"Notes for Miner7","status":true,"warning":true,"autoReset":true,"thresholdLow":0,"thresholdHigh":4200,"maxAttemptsLow":5,"maxAttemptsHigh":5,"attemptsLow":5,"attemptsHigh":0,"resetDelayLow":360,"resetDelayHigh":20,"timeOffLow":360,"timeOffHigh":120,"timeBeforeResetLow":360,"timeBeforeResetHigh":16,"postStateLow":true,"postStateHigh":true,"total":16607600,"lastOnTime":"2022-11-02T05:29:03.756865Z","active":true,"addTime":"2022-04-22T21:33:26.283301Z","updateTime":"2022-11-02T05:35:12.591053Z","type":1}

I am putting the fields of lastOnTime and type into the payload, but for some reason it does not seem they are being acknowledged. What am I doing wrong here?


问:
Naming conventions
As a begginer in Dialogflow CX I get familiar with so information at docs

```<code>-Tell me a number.
      ( yep ) ( what a number is) (no keep talking)
                                    3 -
-That's an amazing number
+++++++++++++++++++++++++++++++++++++++++++++++
-Tell me a number.
       ( yep ) ( what a number is) (no keep talking)
          what a number is -
-Numbers are true magic. Examples are 1, 2, 3. up to 10.
                                   13 -
-Tell me an integer from 1 up to 10 (#until input is matched)
         4-
-4 Wow!
</code>```

Any help? .
What about flow, and routes? which names would you use and which matches the above sample dialogues?

Title: Naming conventions

Body:
As a begginer in Dialogflow CX I get familiar with so information at docs

-Tell me a number.
      ( yep ) ( what a number is) (no keep talking)
                                    3 -
-That's an amazing number
+++++++++++++++++++++++++++++++++++++++++++++++
-Tell me a number.
       ( yep ) ( what a number is) (no keep talking)
          what a number is -
-Numbers are true magic. Examples are 1, 2, 3. up to 10.
                                   13 -
-Tell me an integer from 1 up to 10 (#until input is matched)
         4-
-4 Wow!

Any help? .
What about flow, and routes? which names would you use and which matches the above sample dialogues?


问:
Airflow clear_dag api response 401
I want to clear a dag run from Airflow rest Api. I am using Airflow 2.4.3 version.

Below is the python code:-

```<code>import requests

url = "http://localhost:8080/api/v1/dags/upload_files_to_hdfs/dagRuns/manual__2022-12-13T14:53:35.296382+00:00/clear"

payload = ""
headers = {
  'Authorization': 'Basic xxxxxx'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
</code>```

NOTE - manual__2022-12-13T14:53:35.296382+00:00 is the dag_run_id and upload_files_to_hdfs is the dag_id. Basic Authorization part has been omitted.

Below is the API response:-

```<code>{
    "detail": "None is not of type 'object'",
    "status": 400,
    "title": "Bad Request",
    "type": "https://airflow.apache.org/docs/apache-airflow/2.4.3/stable-rest-api-ref.html#section/Errors/BadRequest"
}
</code>```

Please let me know if I am missing something.

Airflow rest API doc link -> https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html#operation/clear_dag_run

Title: Airflow clear_dag api response 401

Body:
I want to clear a dag run from Airflow rest Api. I am using Airflow 2.4.3 version.

Below is the python code:-

import requests

url = "http://localhost:8080/api/v1/dags/upload_files_to_hdfs/dagRuns/manual__2022-12-13T14:53:35.296382+00:00/clear"

payload = ""
headers = {
  'Authorization': 'Basic xxxxxx'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

NOTE - manual__2022-12-13T14:53:35.296382+00:00 is the dag_run_id and upload_files_to_hdfs is the dag_id. Basic Authorization part has been omitted.

Below is the API response:-

{
    "detail": "None is not of type 'object'",
    "status": 400,
    "title": "Bad Request",
    "type": "https://airflow.apache.org/docs/apache-airflow/2.4.3/stable-rest-api-ref.html#section/Errors/BadRequest"
}

Please let me know if I am missing something.

Airflow rest API doc link -> https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html#operation/clear_dag_run


问:
Tweepy find users by speaker_ID
Is there any way to search for twitter spaces by speaker ID or listener ID?

I've tried:

```<code>spaces = client.get_spaces(user_ids="ID_NUMBER")
</code>```

But i can only search spaces by creator ID.

Title: Tweepy find users by speaker_ID

Body:
Is there any way to search for twitter spaces by speaker ID or listener ID?

I've tried:

spaces = client.get_spaces(user_ids="ID_NUMBER")

But i can only search spaces by creator ID.


问:
Is it possible to zoom with a Cinemachine FreeLock camera in Unity?
In a 3D game, I have a 3rd person view and the camera rotates relative to the player regardless of the player's orientation. I used a Cinemachine Freelook camera for this. But I don't know how to zoom with this camera.

enter image description here

When I raised or lowered the mouse wheel, I tried to adjust the height and radius of Freelock's rigs. But there is no data about this and I can't see what the corresponding function is.

enter image description here


问:
Facts not being updated
I have the following 3 rules in my system.

Rule 1:

```<code>    when
        $x : MyObject1(name == "xxx")
    then
        $x.setValue("Y"); update($x);
end
</code>```

Rule 2:

```<code>rule "rule_2"
    when
        p : P(data != 1)
        $t4 : MyObject1(name == "xxx", value == "Y")
    then
        p.setMessage("some message 1");
end
</code>```

Rule 3:

```<code>    when
        p : P(data != 1)
        $t4 : MyObject1(name == "xxx", value == "N")
    then
        p.setMessage("some message 2");
end
</code>```

Neither rule 2 or 3 are firing.  I would not expect rule 3 to fire because of the when clause but rule 2 should be firing.

It seems anytime I call update the rules are not re-run with the correct value.  Any ideas?
I have heard that updates are code smell but this is what I have and it has worked in past versions of drools.  I am using 7.73.0.Final

Title: Facts not being updated

Body:
I have the following 3 rules in my system.

Rule 1:

    when
        $x : MyObject1(name == "xxx")
    then
        $x.setValue("Y"); update($x);
end

Rule 2:

rule "rule_2"
    when
        p : P(data != 1)
        $t4 : MyObject1(name == "xxx", value == "Y")
    then
        p.setMessage("some message 1");
end

Rule 3:

    when
        p : P(data != 1)
        $t4 : MyObject1(name == "xxx", value == "N")
    then
        p.setMessage("some message 2");
end

Neither rule 2 or 3 are firing.  I would not expect rule 3 to fire because of the when clause but rule 2 should be firing.

It seems anytime I call update the rules are not re-run with the correct value.  Any ideas?
I have heard that updates are code smell but this is what I have and it has worked in past versions of drools.  I am using 7.73.0.Final


问:
Dinamically add selected to select in Angular
Basically i want to add selected property to the first option of my select. It works if i use ngModel but i'm already using it for another purpose.
Here's my code

```<code><div class="col-12">
  <select id="inputReparto" class="form-select" name = "id_reparto" [(ngModel)] = "reqAggDipendente.id_Reparto">
      <option *ngFor = "let reparto of tuttiReparti" [ngValue] = "reparto.id" [selected] = "reparto.id === 1">{{ reparto.nome }}</option>
  </select>
</div>
</code>```

My model 'Reparto' is defined like this:

```<code>export interface Reparto{
    id: number,
    nome: string,
    id_Responsabile: number
}
</code>```

How can i solve it?

Body:
Basically i want to add selected property to the first option of my select. It works if i use ngModel but i'm already using it for another purpose.
Here's my code

  <select id="inputReparto" class="form-select" name = "id_reparto" [(ngModel)] = "reqAggDipendente.id_Reparto">
      <option *ngFor = "let reparto of tuttiReparti" [ngValue] = "reparto.id" [selected] = "reparto.id === 1">{{ reparto.nome }}</option>
  </select>

My model 'Reparto' is defined like this:

export interface Reparto{
    id: number,
    nome: string,
    id_Responsabile: number
}

How can i solve it?


问:
How to get rid of special characters "ÿ" in text cleanup in R for STM?
I have been trying to run STM, but the results show a full column with "ÿ" as a topic. My text documents do not have this special character and I am not able to get rid of it. Please advise why the Topic 1, has these characters showing up ?

Below is my STM results

```<code>Topic 1: ÿ, 8ÿ, 9ÿ, ÿÿ, 5ÿ
 Topic 2: work, financi, new, payment, note
 Topic 3: inflat, price, monetari, target, expect
 Topic 4: financi, risk, monetari, stabil, crisi
 Topic 5: growth, trade, export, product, econom
</code>```

Body:
I have been trying to run STM, but the results show a full column with "ÿ" as a topic. My text documents do not have this special character and I am not able to get rid of it. Please advise why the Topic 1, has these characters showing up ?

Below is my STM results

Topic 1: ÿ, 8ÿ, 9ÿ, ÿÿ, 5ÿ
 Topic 2: work, financi, new, payment, note
 Topic 3: inflat, price, monetari, target, expect
 Topic 4: financi, risk, monetari, stabil, crisi
 Topic 5: growth, trade, export, product, econom


问:
How to only show only news from UK using news search api
Currently, my code is displaying news from south Africa and also America.
How does one only produce results strictly from the UK?</p>
```<code>search_term = "flood, fire, storm"
date = datetime.today().strftime('%Y-%m-%d')
search_url = "https://api.bing.microsoft.com/v7.0/news/search"

headers = {"Ocp-Apim-Subscription-Key" : subscription_key}
params  = {
"q": search_term,
"cc": "en-GB",
"mkt": "en-GB","textDecorations": True,
"setLang": "en-gb",
"textFormat": "HTML", "sortBy": date
}

response = requests.get(search_url, headers=headers, params=params)
response.raise_for_status()
search_results = json.dumps(response.json())

print(search_results)

</code>```

Body:
Currently, my code is displaying news from south Africa and also America.
How does one only produce results strictly from the UK?

search_term = "flood, fire, storm"
date = datetime.today().strftime('%Y-%m-%d')
search_url = "https://api.bing.microsoft.com/v7.0/news/search"

headers = {"Ocp-Apim-Subscription-Key" : subscription_key}
params  = {
"q": search_term,
"cc": "en-GB",
"mkt": "en-GB","textDecorations": True,
"setLang": "en-gb",
"textFormat": "HTML", "sortBy": date
}

response = requests.get(search_url, headers=headers, params=params)
response.raise_for_status()
search_results = json.dumps(response.json())

print(search_results)