问:
using @extend rule inside an :has pseudo-class in Firefox
I have a strange problem, and I need an explanation of why it exists.

the problem is that I was using the @extend rule inside the:has pseudo-class.

taking into consideration that :has is not yet supported in firefox, so I expected the following lines to work in chrome .. and simply, it should be skipped in firefox.

```<code>        // :has is not compatible with firefox
        header:has(h5) {
            h5 {
                display: flex;
                align-items: center;
                @extend .d-flex, .align-items-center;
            }
        }
</code>```

what actually happens is that the whole style of the page is missed up.. and the classes .d-flex, and .align-items-center cant be selected anymore all over the project.

of course, those are util classes that are coming from the bootstrap .. but no reason should prevent me from overwriting it using something like .d-flex{display: flex !important;}.

however, this is not being seen at all from firefox..

```<code><div class="d-flex align-items-center justify-content-center"></div>

</code>```

the only one that works in this previous element is justify-content-center

it seems like the rulesets for util classes extended within the :has pseudo-class have been removed in the runtime by the browser for some reason

Body:
I have a strange problem, and I need an explanation of why it exists.

the problem is that I was using the @extend rule inside the:has pseudo-class.

taking into consideration that :has is not yet supported in firefox, so I expected the following lines to work in chrome .. and simply, it should be skipped in firefox.

        // :has is not compatible with firefox
        header:has(h5) {
            h5 {
                display: flex;
                align-items: center;
                @extend .d-flex, .align-items-center;
            }
        }

what actually happens is that the whole style of the page is missed up.. and the classes .d-flex, and .align-items-center cant be selected anymore all over the project.

of course, those are util classes that are coming from the bootstrap .. but no reason should prevent me from overwriting it using something like .d-flex{display: flex !important;}.

however, this is not being seen at all from firefox..

the only one that works in this previous element is justify-content-center

it seems like the rulesets for util classes extended within the :has pseudo-class have been removed in the runtime by the browser for some reason


来源: stackexchange

问:
Unable to login through Facebook and getting error 1349003
We are getting error code 1349003 while doing FB login in our web app. However, we are getting Facebook access_token successfully while using the same keys in the our other environment web app.  Could you please confirm, has Facebook been blocked our URL due to that we are getting this error code or any thing else happened?

Tried same keys in other environment then getting FB access token to login.

ContentLicense: CC BY-SA 4.0


问:
Cross Compiling Tensorflow-Lite v2.8 for QNX 7.1 (Arm Architecture 64)
Has anyone successfully cross-compiled tensorflow-lite version for QNX 7.1(aarch64) using the QNX 7.1 SDP along with all the dependancies?

I have tried compiling normally using the CMake approach with the -DCMAKE_TOOLCHAIN_FILE set to the aarch64 q++ toolchain. But I normally face errors regarding with GLIBC which does not have an official QNX Version as of now.


问:
Calling a method in a separate function does not update the object attribute
I am studying javascript and I have a question about updating an object attribute through a separate function. My call "Email" has an attribute hasBeenRead = false and a method markAsRead() which changes false to True. I have created an array in which all new emails entered by a user are pushed and I need to create a separate function that will print out a specific message and update hasBeenRead to true. I am stuck on the second part. I call the method markAsRead but this doesn't update the attribute.

```<code>class Email{
    count = 1;

    constructor(fromAddress, emailContents){
        this.fromAddress = fromAddress;
        this.emailContents = emailContents;
        this.hasBeenRead = false;
        this.isSpam = false;
    }

    markAsRead(){
        this.hasBeenRead = true;
    }

    markAsSpam(){
        this.isSpam = true;
    }
}
</code>```

and here is my function:

```<code>let userIndex;

function getEmail(array, userIndex){

    userIndex = Number(prompt("Please enter the number of the email you would like to see: "));
    let index = userIndex - 1;
    emailRead = array[index]

    if (index < array.length){
        let msg = emailRead.emailContents
        console.log(`Your email says ${msg}.`)
        emailRead.markAsRead()
    }

    else {
        console.log(`There is no message ${userIndex} in your inbox.`)
    }
}

getEmail(inbox, userIndex)
console.log(inbox)
</code>```

Any help would be greatly appreciated.
Thank you

Body:
I am studying javascript and I have a question about updating an object attribute through a separate function. My call "Email" has an attribute hasBeenRead = false and a method markAsRead() which changes false to True. I have created an array in which all new emails entered by a user are pushed and I need to create a separate function that will print out a specific message and update hasBeenRead to true. I am stuck on the second part. I call the method markAsRead but this doesn't update the attribute.

class Email{
    count = 1;

    constructor(fromAddress, emailContents){
        this.fromAddress = fromAddress;
        this.emailContents = emailContents;
        this.hasBeenRead = false;
        this.isSpam = false;
    }

    markAsRead(){
        this.hasBeenRead = true;
    }

    markAsSpam(){
        this.isSpam = true;
    }
}

and here is my function:

let userIndex;

function getEmail(array, userIndex){

    userIndex = Number(prompt("Please enter the number of the email you would like to see: "));
    let index = userIndex - 1;
    emailRead = array[index]

    if (index < array.length){
        let msg = emailRead.emailContents
        console.log(`Your email says ${msg}.`)
        emailRead.markAsRead()
    }

    else {
        console.log(`There is no message ${userIndex} in your inbox.`)
    }
}

getEmail(inbox, userIndex)
console.log(inbox)

Any help would be greatly appreciated.
Thank you


问:
How can we enable managedAlertmanager in GCP?
I hv added below lines to my operator config as refering , https://github.com/GoogleCloudPlatform/prometheus-engine

```<code>managedAlertmanager:
  configSecret:
    key: alertmanager.yaml
    name: alertmanager
</code>```

and got the below error,
error validating data: ValidationError(OperatorConfig): unknown field "managedAlertmanager" in com.googleapis.monitoring.v1.OperatorConfig

the fix is to update crd as given here(https://github.com/GoogleCloudPlatform/prometheus-engine/blob/dbc5cf0905975bbc74c9fa9da75b13983051c8ff/manifests/setup.yaml).
But this crd is auto-updating itself after some time and again it's throwing the above error.

Body:
I hv added below lines to my operator config as refering , https://github.com/GoogleCloudPlatform/prometheus-engine

managedAlertmanager:
  configSecret:
    key: alertmanager.yaml
    name: alertmanager

and got the below error,
error validating data: ValidationError(OperatorConfig): unknown field "managedAlertmanager" in com.googleapis.monitoring.v1.OperatorConfig

the fix is to update crd as given here(https://github.com/GoogleCloudPlatform/prometheus-engine/blob/dbc5cf0905975bbc74c9fa9da75b13983051c8ff/manifests/setup.yaml).
But this crd is auto-updating itself after some time and again it's throwing the above error.


问:
react-relay apply @include directive automatically
Is there a way to automatically apply the @iclude directive to a fragment if it was imported using a custom import helper?

Example:

```<code>const Feature = importCond('AB_TEST', () => import('./Feature'));

const Wrapper = ({ viewer }) => {
    const viewer = useFragment(
        graphql`
            fragment Wrapper_viewer on Viewer {
                # @include is applied here automatically
                ...Feature_viewer @include(if: $AB_TEST)
            }
        `,
        viewer
    );

    return <Feature viewer={viewer} />;
};
</code>```

Body:
Is there a way to automatically apply the @iclude directive to a fragment if it was imported using a custom import helper?

Example:

const Feature = importCond('AB_TEST', () => import('./Feature'));

const Wrapper = ({ viewer }) => {
    const viewer = useFragment(
        graphql`
            fragment Wrapper_viewer on Viewer {
                # @include is applied here automatically
                ...Feature_viewer @include(if: $AB_TEST)
            }
        `,
        viewer
    );

    return <Feature viewer={viewer} />;
};


问:
Elsa Workflows - batch processing in a distributed environment
I am thinking about using ELSA workflows in this scenario:

Executing computational heavy activities on special nodes/servers

Creating big number of workflows or better workflow instances similar what one could also do via batch processing.

You might think of, that is what normally distributed task lists like Celery would do. But e.g. Celery does not offer the workflow part, especially when you want to have a nice UI for specifying the workflow.

Therefore, back to my question, is this something ELSA could handle?

Based on what I read about ELSA, it does not have a remote execution agent (although that sounds nice). But I was thinking of using RabbitMQ for the communication. Or this something, which would complicates things too much?

Until now I was only googling for answers. I hope to get some valuable feedback before I start testing and coding.


问:
PHP Warning: Cannot load module "openswoole" because conflicting module "swoole" is already loaded in Unknown on line 0
I have a warning when I use any php command in terminal:

PHP Warning:  Cannot load module "openswoole" because conflicting module "swoole" is already loaded in Unknown on line 0

What can I uninstall and how on Ubuntu? I don't use swoole and openswoole, but I don't know how to unistall that.


问:
How do make items stick to right in inline-flex

```<code> <div class="inine-flex flex-col justify-end gap-2 space-y-2 outline md:flex-row">
</code>```

How do I make that download all button stick to right?


问:
How to prevent Talkback select and focus some Jetpack Composable?
In xml, we can simply set android:importantforaccessibility to achieve such a goal.
However, in Jetpack Compose, I don't find any similar approach to do so.
Say, if I don't want a Text() composable to be selected and focused when Talkback is on, how should I do?

I tried this way but it won't work, as contentDescription should be NoNull:

```<code>modifier = modifier.semantics { contentDescription = null }
</code>```

So then I tried to remove the initial default semantics of a Text composable:

```<code>modifier = modifier.clearAndSetSemantics { }
</code>```

But this won't work too...

The talkback will still try to focus this Text components and read its content.

I also try to manipulate focusProperties() to skip this Text(), but I failed again.

Body:
In xml, we can simply set android:importantforaccessibility to achieve such a goal.
However, in Jetpack Compose, I don't find any similar approach to do so.
Say, if I don't want a Text() composable to be selected and focused when Talkback is on, how should I do?

I tried this way but it won't work, as contentDescription should be NoNull:

modifier = modifier.semantics { contentDescription = null }

So then I tried to remove the initial default semantics of a Text composable:

modifier = modifier.clearAndSetSemantics { }

But this won't work too...

The talkback will still try to focus this Text components and read its content.

I also try to manipulate focusProperties() to skip this Text(), but I failed again.


问:
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format
while implementing search by date from postgres db using sequelize postgres and nodejs I got this warning.

Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged.

```<code>router.get("/:key", async (req, res) => {
  try {
    const searchActivity = await initActivityModel();
    let data = await searchActivity.findAll({
      where: {
       ...
        createdAt: { [Op.like]: "%" + req.params.key + "%" },
       // createdAt: { [Op.between]: ["2023-01-06", "2023-01-07"] }, // this is working

      },
    });
</code>```

I'm trying to create a moment object with a date string that is not in a recognized format. how to fix this?

Body:
while implementing search by date from postgres db using sequelize postgres and nodejs I got this warning.

Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged.

router.get("/:key", async (req, res) => {
  try {
    const searchActivity = await initActivityModel();
    let data = await searchActivity.findAll({
      where: {
       ...
        createdAt: { [Op.like]: "%" + req.params.key + "%" },
       // createdAt: { [Op.between]: ["2023-01-06", "2023-01-07"] }, // this is working

      },
    });

I'm trying to create a moment object with a date string that is not in a recognized format. how to fix this?


问:
This code won't replace the diacritics I entered

public string FaraDiacritice(string x)
    {
        return x.Replace("ă", "a").Replace("î", "i").Replace("â", "a").Replace("ș", "s").Replace("ț", "t");
    }
```
<p>I'm using Unity and Visual Studio Comunity 2022, maybe it does not support unicode characters somehow. Even if</p>
<pre class="lang-cs prettyprint-override"><code>        Debug.Log(FaraDiacritice("ăîâșț"));
</code>```

works

I am using it in this context:

A1.text = FaraDiacritice(TextScript.instance.GetAnswer(Raspunsuri.instance.Q6[1]));
```

I don't want all the diacritics changed, even though I know thats posible, I just want to fix my code.

Body:
public string FaraDiacritice(string x)
    {
        return x.Replace("ă", "a").Replace("î", "i").Replace("â", "a").Replace("ș", "s").Replace("ț", "t");
    }

I'm using Unity and Visual Studio Comunity 2022, maybe it does not support unicode characters somehow. Even if

        Debug.Log(FaraDiacritice("ăîâșț"));

works

I am using it in this context:

A1.text = FaraDiacritice(TextScript.instance.GetAnswer(Raspunsuri.instance.Q6[1]));

I don't want all the diacritics changed, even though I know thats posible, I just want to fix my code.


问:
Angular open layer toggle issue
I am using open layer map toggle for open and close but when I was opening the toggle with in macro seconds it is coming to normal position. I want it to stay there un till we click on close

I have debugged and find that it happening with HostListerner  when I was commented it is working fine but it is impacting on responsive screen so please help to fix this issue added the code below for reference when I was commented this it is working fine Also adding controls for Open layer map library code.

```<code>@HostListener('window: resize', ['$event.target'])
public onResize(target) {
    this.changeSize.next(target.innerWidth);
}

if (this.canFullScreen && !this.hideControls) {
    controls.push(new FullScreen({ source: this.mapWrap.nativeElement as HTMLElement , tipLabel: this.translate.instant("SiteView.button_fullScreen_tooltip")}));
}

for (const control of controls) {
    console.log(control);
    this.olMap.addControl(control);
}
</code>```

Title: Angular open layer toggle issue

Body:
I am using open layer map toggle for open and close but when I was opening the toggle with in macro seconds it is coming to normal position. I want it to stay there un till we click on close

I have debugged and find that it happening with HostListerner  when I was commented it is working fine but it is impacting on responsive screen so please help to fix this issue added the code below for reference when I was commented this it is working fine Also adding controls for Open layer map library code.

@HostListener('window: resize', ['$event.target'])
public onResize(target) {
    this.changeSize.next(target.innerWidth);
}

if (this.canFullScreen && !this.hideControls) {
    controls.push(new FullScreen({ source: this.mapWrap.nativeElement as HTMLElement , tipLabel: this.translate.instant("SiteView.button_fullScreen_tooltip")}));
}

for (const control of controls) {
    console.log(control);
    this.olMap.addControl(control);
}


问:
Problem with symbolic links when directory has %20
In company we are using Visual Studio Code for developing TS projects. We often use file dependences for development. From time to time occurs problem with file dependences when they are like:

"@companyName/subModuleServiceWorker": "../../companyName%20subModule/ServiceWorker"

Usulay it's works fine, but sometimes symbolc link in node_modules is broken. After change directory and dependency referenece from "companyName**%20**subModule" to "companyNamesubModule". After npm install everything is works fine.

All team working on Win10, using same dependecy and for most of time it works fine. In addition when some team member has problem, others working without any problems.

Is there another solution than change directory names on all team members work stations?


问:
NestJS hybrid application port management problem
I'am using NestJs to expose my business through an Http Rest API and a GRPC endpoint. To do this I'am using an "hybrid" application (as explained here) like this  :

async function bootstrap() {

  const app = await NestFactory.create(AppModule);
  app.enableCors();
  const microserviceTcp = app.connectMicroservice<MicroserviceOptions>({
    transport: Transport.TCP,
    options: {
      port: 3000,
    },
  });

  const microserviceGrpc = app.connectMicroservice<MicroserviceOptions>({
    transport: Transport.GRPC,
    options: {
      url: 'localhost:50051',
      package: 'hero',
      protoPath: join(__dirname, './hero.proto'),
    },
  });
  await app.startAllMicroservices();
  await app.listen(3000);

}
bootstrap();
```
<p>If I run this application I have an error message like this :</p>
```Error: listen EADDRINUSE: address already in use :::3000
```

I think there's a conflict between the options.port parameter in the microserviceTcp app and the port passed in the app.listen() function.

To make it work I have to remove the options.port because app.listen() needs a port number, but I think there something incoherent here.
What if I wanted for example to expose 2 microservices with GRPC and REDIS ? In this case the app.listen() port is mandatory but is totally useless (Or there is something I miss somewhere).

Thank you for you help.

Body:
I'am using NestJs to expose my business through an Http Rest API and a GRPC endpoint. To do this I'am using an "hybrid" application (as explained here) like this  :

async function bootstrap() {

  const app = await NestFactory.create(AppModule);
  app.enableCors();
  const microserviceTcp = app.connectMicroservice<MicroserviceOptions>({
    transport: Transport.TCP,
    options: {
      port: 3000,
    },
  });

  const microserviceGrpc = app.connectMicroservice<MicroserviceOptions>({
    transport: Transport.GRPC,
    options: {
      url: 'localhost:50051',
      package: 'hero',
      protoPath: join(__dirname, './hero.proto'),
    },
  });
  await app.startAllMicroservices();
  await app.listen(3000);

}
bootstrap();

If I run this application I have an error message like this :

Error: listen EADDRINUSE: address already in use :::3000

I think there's a conflict between the options.port parameter in the microserviceTcp app and the port passed in the app.listen() function.

To make it work I have to remove the options.port because app.listen() needs a port number, but I think there something incoherent here.
What if I wanted for example to expose 2 microservices with GRPC and REDIS ? In this case the app.listen() port is mandatory but is totally useless (Or there is something I miss somewhere).

Thank you for you help.


问:
How can I get the keyof a custom type declaration for NodeJS ProcessEnv?
I have added a custom type declaration to index.d.ts file for processEnv as outlined below:

```<code>declare global {
  namespace NodeJS {
    interface ProcessEnv extends IProcessEnv {
      SOME_VAR: string;
      SOME_OTHER_VAR: string
    }
}
</code>```

I then have a function where I want to check that the string value for the property is on the ProcessEnv which I then attempted to use the keyof but it doesn't seem to validate the string as a valid key on ProcessEnv.

```<code>  type EnvTypes = keyof NodeJS.ProcessEnv;

  const someFunction = (envKey : EnvTypes) => {
     ...
  };

  someFunction('MY_VAR'); // This should show as red as its not on the interface
</code>```

The intellisense works as expected showing the valid options but I am unable to validate the string passed as a valid key. How can this be achieved?

Body:
I have added a custom type declaration to index.d.ts file for processEnv as outlined below:

declare global {
  namespace NodeJS {
    interface ProcessEnv extends IProcessEnv {
      SOME_VAR: string;
      SOME_OTHER_VAR: string
    }
}

I then have a function where I want to check that the string value for the property is on the ProcessEnv which I then attempted to use the keyof but it doesn't seem to validate the string as a valid key on ProcessEnv.

  type EnvTypes = keyof NodeJS.ProcessEnv;

  const someFunction = (envKey : EnvTypes) => {
     ...
  };

  someFunction('MY_VAR'); // This should show as red as its not on the interface

The intellisense works as expected showing the valid options but I am unable to validate the string passed as a valid key. How can this be achieved?


问:
Kendo React Editor how to set up text colors in HEX format instead of rgba
I am using Kendo React Editor and when I am sending my colorized text to backend it comes with rgba color format:

test

Is there any way to set it to HEX?

I haven't found anything helpful at Telerik's forums

Thank you


问:
Code runner runs javascript in terminal but does't work in otput
Hi when I try to run javascript with code runner i get only:
"[Running] node "/home/lukasz/JavaScript/app.js"

[Done] exited with code=0 in 0.11 seconds"
without any actual output.

When I switch to run in terminal everything works fine. Any ideas how to fix it?

[Run in terminal][Run in output]

I compared settings of execution map with other on osx which is working perfectly and can't see any difference.


问:
400: {"error":"partial write: write /data/influxdb/data/_series/00/0000: no space left on device dropped=1"
No Space Left in InfluxDB.

I have a server which has used 100% disk so when I push the script to Influxdb it shows like
400: {"error":"partial write: write /data/influxdb/data/_series/00/0000: no space left on device dropped=1"

after i cleared some space and around 2gb (100% used )is left i still run the script but facing the same error.

Should i restart my influxdb? will restarting remove the old data from influx? because it has previously saw some ppl saying it deleted data in github


问:
CTest can't find executables under Visual Studio on Windows
When building tests on the Windows platform with Visual Studio from a CMake project, CTest is unable to locate the executables for it. The tests are located under a subfolder tests/, but the generated project files for Visual Studio appear to put all executables under bin/ in the build tree. Here is a snippet of the CMakeLists.txt for the tests folder:

```<code>project(tests)
enable_testing()

...

add_executable(basicTest basictest.cpp)
target_link_libraries(basicTest gtest_main)
add_test(basicTest basicTest)
</code>```

When building this on Linux and Mac OS platforms, there is no issue, CTest can find and execute all the tests. For the command cmake -B build -S ., the tests can be found as expected under build/tests/basicTest. However, when using the Visual Studio Generator that comes with CMake on Windows, it outputs all binaries under paths with build/bin/$(ConfigurationName)/basicTest.exe. When running ctest -V, it reports that it tries the following paths:

```<code>build/tests/basicTest
build/tests/basicTest.exe
build/tests/Release/basicTest
build/tests/Release/basicTest.exe
build/tests/Debug/basicTest
build/tests/Debug/basicTest.exe
</code>```

But never paths under build/bin/. If I copy the folder build/bin/Release/ into build/tests/ then CTest reports all tests were successful. What's the correct fix for this to make CTest operate correctly across all platforms?

Do I need to add something to the path used by the add_test() CMake command? Do I need to add a property to the targets to place them correctly, or a property to the tests to tell them where their executable is?

Bonus: This should probably be it's own question, but is there a straight-forward way to get vtest.console.exe to also run these tests? I can already run all the tests from the Visual Studio "Run All Tests" menu option.

Body:
When building tests on the Windows platform with Visual Studio from a CMake project, CTest is unable to locate the executables for it. The tests are located under a subfolder tests/, but the generated project files for Visual Studio appear to put all executables under bin/ in the build tree. Here is a snippet of the CMakeLists.txt for the tests folder:

project(tests)
enable_testing()

...

add_executable(basicTest basictest.cpp)
target_link_libraries(basicTest gtest_main)
add_test(basicTest basicTest)

When building this on Linux and Mac OS platforms, there is no issue, CTest can find and execute all the tests. For the command cmake -B build -S ., the tests can be found as expected under build/tests/basicTest. However, when using the Visual Studio Generator that comes with CMake on Windows, it outputs all binaries under paths with build/bin/$(ConfigurationName)/basicTest.exe. When running ctest -V, it reports that it tries the following paths:

build/tests/basicTest
build/tests/basicTest.exe
build/tests/Release/basicTest
build/tests/Release/basicTest.exe
build/tests/Debug/basicTest
build/tests/Debug/basicTest.exe

But never paths under build/bin/. If I copy the folder build/bin/Release/ into build/tests/ then CTest reports all tests were successful. What's the correct fix for this to make CTest operate correctly across all platforms?

Do I need to add something to the path used by the add_test() CMake command? Do I need to add a property to the targets to place them correctly, or a property to the tests to tell them where their executable is?

Bonus: This should probably be it's own question, but is there a straight-forward way to get vtest.console.exe to also run these tests? I can already run all the tests from the Visual Studio "Run All Tests" menu option.


问:
How to use proxy servers with aws lambda + Puppeteer?
I am trying to run puppeteer with proxy chain package on aws lambda but I am getting this error message:

```<code>"errorType": "Error",
"errorMessage": "Protocol error (Target.createTarget): Target closed.",
</code>```

Code:

```<code>const chromium = require('chrome-aws-lambda');
const { addExtra } = require("puppeteer-extra");
const puppeteerExtra = addExtra(chromium.puppeteer);
const proxyChain = require('proxy-chain');

const StealthPlugin = require("puppeteer-extra-plugin-stealth");
puppeteerExtra.use(StealthPlugin());

exports.handler = async (event, context, callback) => {
    let finalResult = [];
    const url = ``;
    let browser;
    const oldProxyUrl = ''; // --> bright data proxy
    const newProxyUrl = await proxyChain.anonymizeProxy(oldProxyUrl);

    console.log("newProxyUrl", newProxyUrl)

    try {
        browser = await puppeteerExtra.launch({
            args: ['--no-sandbox', '--disable-setuid-sandbox', `--proxy-server=${newProxyUrl}`],
            defaultViewport: chromium.defaultViewport,
            executablePath: await chromium.executablePath,
            headless: chromium.headless
        });

        const page = await browser.newPage();

        await page.goto(url);

        finalResult = await extractElements(page);

    } catch (error) {
        return callback(error);
    } finally {
        await browser.close();
    }

    return callback(null, finalResult);
};
</code>```

Above code works fine on aws lambda without proxy-server url. I also tested same code without proxy server url on serverless functions like vercel and netlify and it worked. Only issue is when I add proxy server url it throws protocol error.

Body:
I am trying to run puppeteer with proxy chain package on aws lambda but I am getting this error message:

"errorType": "Error",
"errorMessage": "Protocol error (Target.createTarget): Target closed.",

Code:

const chromium = require('chrome-aws-lambda');
const { addExtra } = require("puppeteer-extra");
const puppeteerExtra = addExtra(chromium.puppeteer);
const proxyChain = require('proxy-chain');

const StealthPlugin = require("puppeteer-extra-plugin-stealth");
puppeteerExtra.use(StealthPlugin());

exports.handler = async (event, context, callback) => {
    let finalResult = [];
    const url = ``;
    let browser;
    const oldProxyUrl = ''; // --> bright data proxy
    const newProxyUrl = await proxyChain.anonymizeProxy(oldProxyUrl);

    console.log("newProxyUrl", newProxyUrl)

    try {
        browser = await puppeteerExtra.launch({
            args: ['--no-sandbox', '--disable-setuid-sandbox', `--proxy-server=${newProxyUrl}`],
            defaultViewport: chromium.defaultViewport,
            executablePath: await chromium.executablePath,
            headless: chromium.headless
        });

        const page = await browser.newPage();

        await page.goto(url);

        finalResult = await extractElements(page);

    } catch (error) {
        return callback(error);
    } finally {
        await browser.close();
    }

    return callback(null, finalResult);
};

Above code works fine on aws lambda without proxy-server url. I also tested same code without proxy server url on serverless functions like vercel and netlify and it worked. Only issue is when I add proxy server url it throws protocol error.


问:
'init()' is deprecated: Use init(configuration:) instead and handle errors appropriately
I am writing a code for a Sentiment Analysis using Swift, but I get this error

('init()' is deprecated: Use init(configuration:) instead and handle errors appropriately.),

when writing this line of code:

```<code>let model = SentimentsClassifier_1()
</code>```

Why is this happening and how can it be fixed?
Thanks!

Don't know how to solve this yet...

Body:
I am writing a code for a Sentiment Analysis using Swift, but I get this error

('init()' is deprecated: Use init(configuration:) instead and handle errors appropriately.),

when writing this line of code:

let model = SentimentsClassifier_1()

Why is this happening and how can it be fixed?
Thanks!

Don't know how to solve this yet...


问:
some problems with python code, what i do wrong?
```<code>from bs4 import BeautifulSoup
import requests
import openpyxl

# Create a list of city URLs that you want to scrape
city_urls = ['http://www.regionservis.cz/databaze-mest-a-obci/obec/3190-benesov',
             'http://www.regionservis.cz/databaze-mest-a-obci/obec/3191-braslovice',
             # Add more URLs here
            ]

# Iterate over the list of city URLs and scrape the data for each city
for url in city_urls:
    # Make a request to the website and get the HTML content
    response = requests.get(url)
    html = response.content
    # Parse the HTML content with Beautiful Soup
    soup = BeautifulSoup(html, 'html.parser')

    # Find the table elements in the HTML and extract the data you need
    tables = soup.find_all('table')
    data = {}
    for table in tables:
        rows = table.find_all('tr')
        for row in rows:
            cols = row.find_all('td')
            # Extract the data from the columns and store it in the data dictionary

    # Find the first table and extract the data
    table = tables[0]
    rows = table.find_all('tr')
    for row in rows:
        cols = row.find_all('td')
        if len(cols) == 2:
            key = cols[0].text.strip()
            value = cols[1].text.strip()
            data[key] = value

    # Find the second table and extract the data
    table = tables[1]
    rows = table.find_all('tr')
    for row in rows:
        cols = row.find_all('td')
        if len(cols) == 2:
            key = cols[0].text.strip()
            value = cols[1].text.strip()
            data[key] = value

    # Find the third table and extract the data
    table = tables[2]
    rows = table.find_all('tr')
    for row in rows:
        cols = row.find_all('td')
        if len(cols) == 2:
            key = cols[0].text.strip()
            value = cols[1].text.strip()
            data[key] = value

    # Write the data to the Excel file
    wb = openpyxl.load_workbook('cities.xlsx')
    sheet = wb['Sheet1']
    row = sheet.max_row + 1
    sheet.cell(row=row, column=1).value = data['name']
    sheet.cell(row=row, column=2).value = data['Město']
    sheet.cell(row=row, column=3).value = data['Okres']
    # Add the data for the other columns
    wb.save('cities.xlsx')
</code>```

```<code>Traceback (most recent call last):
  File "D:\PY\UW\czech\main.py", line 62, in <module>
    sheet.cell(row=row, column=1).value = data['name']
KeyError: 'name'
</code>```

i need worked code in python

Body:
from bs4 import BeautifulSoup
import requests
import openpyxl

# Create a list of city URLs that you want to scrape
city_urls = ['http://www.regionservis.cz/databaze-mest-a-obci/obec/3190-benesov',
             'http://www.regionservis.cz/databaze-mest-a-obci/obec/3191-braslovice',
             # Add more URLs here
            ]

# Iterate over the list of city URLs and scrape the data for each city
for url in city_urls:
    # Make a request to the website and get the HTML content
    response = requests.get(url)
    html = response.content
    # Parse the HTML content with Beautiful Soup
    soup = BeautifulSoup(html, 'html.parser')

    # Find the table elements in the HTML and extract the data you need
    tables = soup.find_all('table')
    data = {}
    for table in tables:
        rows = table.find_all('tr')
        for row in rows:
            cols = row.find_all('td')
            # Extract the data from the columns and store it in the data dictionary

    # Find the first table and extract the data
    table = tables[0]
    rows = table.find_all('tr')
    for row in rows:
        cols = row.find_all('td')
        if len(cols) == 2:
            key = cols[0].text.strip()
            value = cols[1].text.strip()
            data[key] = value

    # Find the second table and extract the data
    table = tables[1]
    rows = table.find_all('tr')
    for row in rows:
        cols = row.find_all('td')
        if len(cols) == 2:
            key = cols[0].text.strip()
            value = cols[1].text.strip()
            data[key] = value

    # Find the third table and extract the data
    table = tables[2]
    rows = table.find_all('tr')
    for row in rows:
        cols = row.find_all('td')
        if len(cols) == 2:
            key = cols[0].text.strip()
            value = cols[1].text.strip()
            data[key] = value

    # Write the data to the Excel file
    wb = openpyxl.load_workbook('cities.xlsx')
    sheet = wb['Sheet1']
    row = sheet.max_row + 1
    sheet.cell(row=row, column=1).value = data['name']
    sheet.cell(row=row, column=2).value = data['Město']
    sheet.cell(row=row, column=3).value = data['Okres']
    # Add the data for the other columns
    wb.save('cities.xlsx')

Traceback (most recent call last):
  File "D:\PY\UW\czech\main.py", line 62, in <module>
    sheet.cell(row=row, column=1).value = data['name']
KeyError: 'name'

i need worked code in python


问:
Unsupported Binding namespace in xsd
I have a problem after JAXB 3 and Java 17 updates I get a

```<code>[ERROR] Error while parsing schema(s).Location [ file:/C:/work/project/backend/src/main/resources/xsd/Import_v1.xsd{12,2}].
org.xml.sax.SAXParseException: Unsupported binding namespace "http://www.w3.org/2001/XMLSchema". Perhaps you meant "http://java.sun.com/xml/ns/jaxb/xjc"?
    at com.sun.tools.xjc.reader.AbstractExtensionBindingChecker.error (AbstractExtensionBindingChecker.java:183)
    at com.sun.tools.xjc.reader.AbstractExtensionBindingChecker.checkAndEnable (AbstractExtensionBindingChecker.java:85)
</code>```

But this error doesn't really make sense because the Sun link goes into nothing

my *.xsd:

```<code><xs:schema
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xml="http://www.w3.org/XML/1998/namespace"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    version="3.0">
</code>```

Sadly I only find help for JAXB2

Title: Unsupported Binding namespace in xsd

Body:
I have a problem after JAXB 3 and Java 17 updates I get a

[ERROR] Error while parsing schema(s).Location [ file:/C:/work/project/backend/src/main/resources/xsd/Import_v1.xsd{12,2}].
org.xml.sax.SAXParseException: Unsupported binding namespace "http://www.w3.org/2001/XMLSchema". Perhaps you meant "http://java.sun.com/xml/ns/jaxb/xjc"?
    at com.sun.tools.xjc.reader.AbstractExtensionBindingChecker.error (AbstractExtensionBindingChecker.java:183)
    at com.sun.tools.xjc.reader.AbstractExtensionBindingChecker.checkAndEnable (AbstractExtensionBindingChecker.java:85)

But this error doesn't really make sense because the Sun link goes into nothing

my *.xsd:

<xs:schema
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xml="http://www.w3.org/XML/1998/namespace"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    version="3.0">

Sadly I only find help for JAXB2


问:
H2 header shows as H3 - Elementor
I have a problem with Elementor. In the visual editor, I set the header to h2, but when I go to the page and check the header using the inspector, it shows h3. What can cause this problem?

A change in the Elementor code editor doesn't help either.

Title: H2 header shows as H3 - Elementor


问:
How to implement generic function for adding both numeric and string value in swift but without add the extension for each data type?
I am trying to add two values with different-2 data types using a generic function in swift, I tried using extensions, to declare conformance to the particular protocols for the types that I want. It's working fine code snippet is below but I want some optimized way where I don't want to add the extension for each data type like below :

```<code>protocol Addable {
       static func +(lhs: Self, rhs: Self) -> Self
  }
</code>```

Now, using extensions, declare conformance to Addable for the all types:

```<code> extension String: Addable {}
 extension Int: Addable {}
 extension Double: Addable {}
 .
 .
 .
 extension Float: Addable {}
</code>```

And define your add function as:

```<code> func addition<T: Addable>(first: T, second: T) -> T {
      return first + second
 }
</code>```

Can anyone suggest an optimized solution, that doesn't require the extension for each data type?

Body:
I am trying to add two values with different-2 data types using a generic function in swift, I tried using extensions, to declare conformance to the particular protocols for the types that I want. It's working fine code snippet is below but I want some optimized way where I don't want to add the extension for each data type like below :

protocol Addable {
       static func +(lhs: Self, rhs: Self) -> Self
  }

Now, using extensions, declare conformance to Addable for the all types:

 extension String: Addable {}
 extension Int: Addable {}
 extension Double: Addable {}
 .
 .
 .
 extension Float: Addable {}

And define your add function as:

 func addition<T: Addable>(first: T, second: T) -> T {
      return first + second
 }

Can anyone suggest an optimized solution, that doesn't require the extension for each data type?


问:
Update arrary of object json in mysql
I have a table with column named "Description". Value of each record has json array format.
Suppose value of two records are:

```<code>[
    {"languageCode":"fr","description":"France","isDefault":true},
    {"languageCode":"cs","description":"Czech","isDefault":false},
    {"languageCode":"it-IT","description":"Italian","isDefault":false}
]
and

[
    {"languageCode":"cs","description":"Czech","isDefault":false},
    {"languageCode":"it-IT","description":"Italian","isDefault":false},
    {"languageCode":"fr-FR","description":"France","isDefault":true}
]
</code>```

I want update all records of table and update value of languageCode if it is "fr" and "cs" to "fr-FR" and "cs-CZ"

Expected:

```<code>[
    {"languageCode":"fr-FR","description":"France","isDefault":true},
    {"languageCode":"cs-CZ","description":"Czech","isDefault":false},
    {"languageCode":"it-IT","description":"Italian","isDefault":false}
]

and

[
    {"languageCode":"cs-CZ","description":"Czech","isDefault":false},
    {"languageCode":"it-IT","description":"Italian","isDefault":false},
    {"languageCode":"fr-FR","description":"France","isDefault":true}
]
</code>```

I tried Update table and set Description column but I don't know how to find languages code (fr, cs)  and update it.

Updated:
I change my approach by use REPLACE instead through json
But I think Json still is a good approach.

Here is my script

```<code>UPDATE applications
SET Description = REPLACE ( REPLACE ( Description, '\"languageCode\":\"fr\"', '\"languageCode\":\"fr-FR\"'), '\"languageCode\":\"cs\"', '\"languageCode\":\"cs-CZ\"')
</code>```

Title: Update arrary of object json in mysql

Body:
I have a table with column named "Description". Value of each record has json array format.
Suppose value of two records are:

[
    {"languageCode":"fr","description":"France","isDefault":true},
    {"languageCode":"cs","description":"Czech","isDefault":false},
    {"languageCode":"it-IT","description":"Italian","isDefault":false}
]
and

[
    {"languageCode":"cs","description":"Czech","isDefault":false},
    {"languageCode":"it-IT","description":"Italian","isDefault":false},
    {"languageCode":"fr-FR","description":"France","isDefault":true}
]

I want update all records of table and update value of languageCode if it is "fr" and "cs" to "fr-FR" and "cs-CZ"

Expected:

[
    {"languageCode":"fr-FR","description":"France","isDefault":true},
    {"languageCode":"cs-CZ","description":"Czech","isDefault":false},
    {"languageCode":"it-IT","description":"Italian","isDefault":false}
]

and

[
    {"languageCode":"cs-CZ","description":"Czech","isDefault":false},
    {"languageCode":"it-IT","description":"Italian","isDefault":false},
    {"languageCode":"fr-FR","description":"France","isDefault":true}
]

I tried Update table and set Description column but I don't know how to find languages code (fr, cs)  and update it.

Updated:
I change my approach by use REPLACE instead through json
But I think Json still is a good approach.

Here is my script

UPDATE applications
SET Description = REPLACE ( REPLACE ( Description, '\"languageCode\":\"fr\"', '\"languageCode\":\"fr-FR\"'), '\"languageCode\":\"cs\"', '\"languageCode\":\"cs-CZ\"')


问:
Use multiple cdk-virtual-scroll-viewport in the same page
cdk-virtual-scroll-viewport is not working properly when I use more than two cdk-virtual-scroll-viewport in the same page.

Stackblitz example

In the above example, first dropdown is working properly. but in the second dropdown, getting blank space after scrolling the dropdown and open the dropdown again.
enter image description here

```<code>    <mat-select [formControl]="multiSelectControl"  (openedChange)="openChange($event)"
        placeholder="Select">
        <cdk-virtual-scroll-viewport itemSize="50" [style.height.px]=5*48 >
            <mat-option *cdkVirtualFor="let topping of toppingList" [value]="topping"
                >{{topping.viewValue}}</mat-option>
        </cdk-virtual-scroll-viewport>
    </mat-select>
</mat-form-field>

<br>
<br>

<mat-form-field>
<mat-select [formControl]="multiSelectControl1"  (openedChange)="openChange1($event)"
    placeholder="Select">
    <cdk-virtual-scroll-viewport itemSize="50" [style.height.px]=5*48 minBufferPx="200" maxBufferPx="400">
        <mat-option *cdkVirtualFor="let topping of toppingList1" [value]="topping"
            >{{topping.viewValue}}</mat-option>
    </cdk-virtual-scroll-viewport>
</mat-select>
</mat-form-field>

export class AppComponent {

  toppingList: any[] = [];
  toppingList1: any[] = [];

  @ViewChild(CdkVirtualScrollViewport, { static: true })
  cdkVirtualScrollViewPort: CdkVirtualScrollViewport;

  @ViewChild(CdkVirtualScrollViewport, { static: true })
  cdkVirtualScrollViewPort1: CdkVirtualScrollViewport;

  multiSelectControl = new FormControl();
  multiSelectControl1 = new FormControl();

  constructor(private cd: ChangeDetectorRef, readonly sd: ScrollDispatcher) {
    for (let i = 0; i < 100000; i++) {
      this.toppingList.push({ id: i, viewValue: "option-" + i });
      this.toppingList1.push({ id: i, viewValue: "option-" + i });
    }
  }

  openChange($event: boolean) {
    if ($event) {
      this.cdkVirtualScrollViewPort.scrollToIndex(0);
      this.cdkVirtualScrollViewPort.checkViewportSize();
    }
  }

  openChange1($event: boolean) {
    if ($event) {
      this.cdkVirtualScrollViewPort1.scrollToIndex(0);
      this.cdkVirtualScrollViewPort1.checkViewportSize();

    }
  }

}

</code>```

this.cdkVirtualScrollViewPort1.scrollToIndex(0); scrolling to a particular index of second dropdown is also not working.

Any suggestions would be much appreciated!

Body:
cdk-virtual-scroll-viewport is not working properly when I use more than two cdk-virtual-scroll-viewport in the same page.

Stackblitz example

In the above example, first dropdown is working properly. but in the second dropdown, getting blank space after scrolling the dropdown and open the dropdown again.
enter image description here

    <mat-select [formControl]="multiSelectControl"  (openedChange)="openChange($event)"
        placeholder="Select">
        <cdk-virtual-scroll-viewport itemSize="50" [style.height.px]=5*48 >
            <mat-option *cdkVirtualFor="let topping of toppingList" [value]="topping"
                >{{topping.viewValue}}</mat-option>
        </cdk-virtual-scroll-viewport>
    </mat-select>
</mat-form-field>

<mat-form-field>
<mat-select [formControl]="multiSelectControl1"  (openedChange)="openChange1($event)"
    placeholder="Select">
    <cdk-virtual-scroll-viewport itemSize="50" [style.height.px]=5*48 minBufferPx="200" maxBufferPx="400">
        <mat-option *cdkVirtualFor="let topping of toppingList1" [value]="topping"
            >{{topping.viewValue}}</mat-option>
    </cdk-virtual-scroll-viewport>
</mat-select>
</mat-form-field>

export class AppComponent {

  toppingList: any[] = [];
  toppingList1: any[] = [];

  @ViewChild(CdkVirtualScrollViewport, { static: true })
  cdkVirtualScrollViewPort: CdkVirtualScrollViewport;

  @ViewChild(CdkVirtualScrollViewport, { static: true })
  cdkVirtualScrollViewPort1: CdkVirtualScrollViewport;

  multiSelectControl = new FormControl();
  multiSelectControl1 = new FormControl();

  constructor(private cd: ChangeDetectorRef, readonly sd: ScrollDispatcher) {
    for (let i = 0; i < 100000; i++) {
      this.toppingList.push({ id: i, viewValue: "option-" + i });
      this.toppingList1.push({ id: i, viewValue: "option-" + i });
    }
  }

  openChange($event: boolean) {
    if ($event) {
      this.cdkVirtualScrollViewPort.scrollToIndex(0);
      this.cdkVirtualScrollViewPort.checkViewportSize();
    }
  }

  openChange1($event: boolean) {
    if ($event) {
      this.cdkVirtualScrollViewPort1.scrollToIndex(0);
      this.cdkVirtualScrollViewPort1.checkViewportSize();

    }
  }

}

this.cdkVirtualScrollViewPort1.scrollToIndex(0); scrolling to a particular index of second dropdown is also not working.

Any suggestions would be much appreciated!


问:
There is a function in Zoho that used to work but it has broken and I don't know how to fix it
In Zoho CRM there are a problem with this function and I don't know how to fix it.  It is a function to delete an old task when I create new one.

I didn't try anything.

Function:

```<code>Leadinfo = zoho.crm.getRelatedRecords("Tasks","Leads",leadid);
for each task in Leadinfo
{
  taskid = task.get("id");
  //tinfo = zoho.crm.getRecordById("Tasks",taskid);
  tdate = task.get('Due_Date').todatetime();
  tt = zoho.currentdate;
  if(tdate <= tt)
  {
    mp = Map();
    mp.put("Status","Completed");
    updateResp = zoho.crm.updateRecord("Tasks",taskid,mp);
  }
}
info updateResp;
</code>```

Body:
In Zoho CRM there are a problem with this function and I don't know how to fix it.  It is a function to delete an old task when I create new one.

I didn't try anything.

Function:

Leadinfo = zoho.crm.getRelatedRecords("Tasks","Leads",leadid);
for each task in Leadinfo
{
  taskid = task.get("id");
  //tinfo = zoho.crm.getRecordById("Tasks",taskid);
  tdate = task.get('Due_Date').todatetime();
  tt = zoho.currentdate;
  if(tdate <= tt)
  {
    mp = Map();
    mp.put("Status","Completed");
    updateResp = zoho.crm.updateRecord("Tasks",taskid,mp);
  }
}
info updateResp;


问:
Which IPA build is correct for App Store?
I have noticed that there are 2 ways to create IPA for App store.

1- Create Runner.xcarchive file and then with Xcode export IPA file.

2- When you're creating Runner.xcarchive file, flutter creates an IPA for you as well(Flutter command: flutter build ipa). example:

```<code>project-app % flutter build ipa

 Building with sound null safety

Archiving com.example.app.dev...
Automatically signing iOS for device deployment using specified development team in Xcode project: *********
Running Xcode build...
 └─Compiling, linking and signing...                        13.6s
Xcode archive done.                                         62.4s
Built /Users/user/StudioProjects/project/app/build/ios/archive/Runner.xcarchive.
Building App Store IPA...                                          20.8s
Built IPA to /Users/user/StudioProjects/project/app/build/ios/ipa.
To upload to the App Store either:
    1. Drag and drop the "build/ios/ipa/*.ipa" bundle into the Apple Transport macOS app https://apps.apple.com/us/app/transporter/id1450874784
    2. Run "xcrun altool --upload-app --type ios -f build/ios/ipa/*.ipa --apiKey your_api_key --apiIssuer your_issuer_id".
       See "man altool" for details about how to authenticate with the App Store Connect API key.
</code>```

If I use the IPA that Flutter provides in the second option, is it the same as the first way?

Body:
I have noticed that there are 2 ways to create IPA for App store.

1- Create Runner.xcarchive file and then with Xcode export IPA file.

2- When you're creating Runner.xcarchive file, flutter creates an IPA for you as well(Flutter command: flutter build ipa). example:

project-app % flutter build ipa

 Building with sound null safety

Archiving com.example.app.dev...
Automatically signing iOS for device deployment using specified development team in Xcode project: *********
Running Xcode build...
 └─Compiling, linking and signing...                        13.6s
Xcode archive done.                                         62.4s
Built /Users/user/StudioProjects/project/app/build/ios/archive/Runner.xcarchive.
Building App Store IPA...                                          20.8s
Built IPA to /Users/user/StudioProjects/project/app/build/ios/ipa.
To upload to the App Store either:
    1. Drag and drop the "build/ios/ipa/*.ipa" bundle into the Apple Transport macOS app https://apps.apple.com/us/app/transporter/id1450874784
    2. Run "xcrun altool --upload-app --type ios -f build/ios/ipa/*.ipa --apiKey your_api_key --apiIssuer your_issuer_id".
       See "man altool" for details about how to authenticate with the App Store Connect API key.

If I use the IPA that Flutter provides in the second option, is it the same as the first way?


问:
Need to fetch code param value from keycloak redirect URl in angular 9
After successfully logging in on keycloak, it redirected to our application on http:localhost:4200/?state=2342424f23424&code=sdfsaf234224. When try to fetch the code params value in application but unable to get.
I have checked in network tab. angular application load in the browser after redirect url code request send.

Currently: unable to fetch code param value from redirect url.
Required: Need to fetch code param value from redirect Url of keycloak.


问:
Can't seem to calculate a matrice with for loop
I have an assignment where i need to rewrite a matlab program with python, the purpose of this program is to find the amptitude of an object. I been trying to find the array y but i always get
ValueError: could not broadcast input array from shape (50,9) into shape (50,), i don't know if i get this error because the way i defind y, or there is something else missing.I get the error in the last line</p>
```<code>
x = np.array([[1,1,1],[2,2,2],[3,3,3]])
z = np.array([[1,2,3],[1,2,3],[1,2,3]])
o = np.array([[0,0,2],[1,0,0],[0,0,0]])
flattenmatrixO = np.array(o).flatten('F')
N = len(flattenmatrixO)

xt = np.array([1,2,3])
zt = 0
L = len(xt)
K = 50
fs, Dt, c = 10, 1/10, 15e-1
y = np.zeros([K,N])

for i in range(0,L):
    tof = ((z-zt) + np.sqrt((x-xt[i])**2 + (z-zt)**2))/c
    kd = np.round(tof/Dt)
    kd = kd.astype(int)
    kd = np.array(kd).flatten(order='F')

    Hl = np.zeros([K,N])
    for n in range(0,N):
        Hl[kd[n],n] = 1
    H = [H,Hl]
    O = np.array(o).flatten(order='F')
    y[:,i] = Hl * O````

#for refrence the last line in matlab is written like this:
#y(:,i) = Hl * o(:)
</code>```

Body:
I have an assignment where i need to rewrite a matlab program with python, the purpose of this program is to find the amptitude of an object. I been trying to find the array y but i always get
ValueError: could not broadcast input array from shape (50,9) into shape (50,), i don't know if i get this error because the way i defind y, or there is something else missing.I get the error in the last line

x = np.array([[1,1,1],[2,2,2],[3,3,3]])
z = np.array([[1,2,3],[1,2,3],[1,2,3]])
o = np.array([[0,0,2],[1,0,0],[0,0,0]])
flattenmatrixO = np.array(o).flatten('F')
N = len(flattenmatrixO)

xt = np.array([1,2,3])
zt = 0
L = len(xt)
K = 50
fs, Dt, c = 10, 1/10, 15e-1
y = np.zeros([K,N])

for i in range(0,L):
    tof = ((z-zt) + np.sqrt((x-xt[i])**2 + (z-zt)**2))/c
    kd = np.round(tof/Dt)
    kd = kd.astype(int)
    kd = np.array(kd).flatten(order='F')

    Hl = np.zeros([K,N])
    for n in range(0,N):
        Hl[kd[n],n] = 1
    H = [H,Hl]
    O = np.array(o).flatten(order='F')
    y[:,i] = Hl * O````

#for refrence the last line in matlab is written like this:
#y(:,i) = Hl * o(:)


问:
Etherscan APIs to get list of transactions, internal transactions, and states
I have a pipeline in mind that I want to implement with Etherscan.
Etherscan provides all the information I need on the browser but I cannot find the related module/action pair to retrieve the same information through the API.

These are the three pieces of information I'd like to access through the API.

transaction list by contract address, such as https://etherscan.io/address/0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5

internal transaction list by contract address, such as https://etherscan.io/address/0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5#internaltx

state change by transaction hash, such as https://etherscan.io/tx/0x36a692fe15c8b266e98acbecfe86d9aad024650dab72b15ae9623e2097ecc4f6#statechange

Any suggestions? If I can get the same information also with other API providers, I'm fine.

Thank you for your help.


问:
Vercel skip the previous deployment
I am working in next js and vecel auto deployment

I committed my code few days ago but I didn't push it and today I again committed my code and pushed it. the problem is vercel skipped the previous commit and only updated with new commit. because of it I got a error which will be resolve only with the previous commit. what should I do now?

its my company code so that's why I can't show it and I also don't have vercel login details. My company shows me the error via image.

Title: Vercel skip the previous deployment


问:
Can we create and send oAuth request to an api from asp .net framework 2.0 and 3.5?
System.Net.Http is available in .net version 4.5 and above. I have the below code in .Net core. Need an equivalent code to connect to a api with oauth authentication.

Below is the code i used to connect from .NET core project.

public async Task GetOAuthTokenAsync(string tokenUri, string scope)

        {

            JWTToken jwtToken = null;

            try

            {

                string clientid = "";

                string clientsceretCode = "";

                HttpResponseMessage tokenResponse = new HttpResponseMessage();

                string plainCredential = $"{clientid}:{clientsceretCode}";

                var plaintextbytes = Encoding.UTF8.GetBytes(plainCredential);

                var encodedCredential = Convert.ToBase64String(plaintextbytes);

                var httpClientHandler = new HttpClientHandler();

                httpClientHandler.ServerCertificateCustomValidationCallback = (message, cert, chain, errors) =>

                { return true; };

                using (var client = new HttpClient(httpClientHandler))

                {

                    client.BaseAddress = new Uri(tokenUri);

                    client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", encodedCredential);

                    var inputParams = new Dictionary<string, string>

                {

                    {"grant_type", "client_credentials"},

                    {"scope", scope}

                };

                    string msg = string.Empty;

                    HttpContent content = new FormUrlEncodedContent(inputParams);

                    content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/x-www-form-urlencoded");

                    //HttpContent requestParams = new FormUrlEncodedContent(inputParams);

                     tokenResponse = await client.PostAsync(tokenUri, content).ConfigureAwait(false);

                    msg = await tokenResponse.Content.ReadAsStringAsync();

                    // Verification

                    if (tokenResponse.IsSuccessStatusCode)

                    {

                        var jsonContent = await tokenResponse.Content.ReadAsStringAsync();

                        jwtToken = JsonConvert.DeserializeObject(jsonContent);

                    }

                }

            }

            catch(Exception ex)

            {

                Console.WriteLine(ex.Message);

            }

            return jwtToken;

        }


问:
How do you convert an entire webm audio directory to an opus audio with ffmpeg
What I'm trying to do is, by using ffmpeg, convert all webm audio files in an directory to opus audio files, store to an another directory.

Have no idea, just messed up by search results.


问:
pytest does not finde third party lib but python does
I have an script that I want to test:

my script:

```<code>from jsonschema.exceptions import ValidationError
import traceback

from data_product.event_processor import DwhUnknownActionError
from data_product.gateway import DwhDataRankingError

...
</code>```

my test file:

```<code>from iterator_processor import IteratorProcessor
</code>```

calling: pytest will give this error message:

```<code>==================================================================================== ERRORS =====================================================================================
__________________________________________________________________ ERROR collecting iterator_processor_test.py __________________________________________________________________
ImportError while importing test module '/home/a05922/dwh-jobs/src/main/lib/python_lib/data_product/iterator_processor_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
iterator_processor_test.py:5: in <module>
    from iterator_processor import IteratorProcessor
iterator_processor.py:4: in <module>
    from jsonschema.exceptions import ValidationError
E   ImportError: No module named 'jsonschema'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================ 1 error in 3.19 seconds ==========================================================================
</code>```

calling python3 iterator_processor.py on the other hand gives me:

```<code>Traceback (most recent call last):
  File "iterator_processor.py", line 7, in <module>
    from data_product.event_processor import DwhUnknownActionError
ModuleNotFoundError: No module named 'data_product'
</code>```

an error that I 100% expect because the file is in the data_product folder. (the script is meant to be called from outside)

what irritates me is that pytest can not find jsonschema while python3 findes the library without problems.

did anybody have a similar problem?

how do I fix this?

Is this a bug in the pytest library?

should I report this?

how do I report this?

how to I check if anybody has reported this already?

Body:
I have an script that I want to test:

my script:

from jsonschema.exceptions import ValidationError
import traceback

from data_product.event_processor import DwhUnknownActionError
from data_product.gateway import DwhDataRankingError

...

my test file:

from iterator_processor import IteratorProcessor

calling: pytest will give this error message:

==================================================================================== ERRORS =====================================================================================
__________________________________________________________________ ERROR collecting iterator_processor_test.py __________________________________________________________________
ImportError while importing test module '/home/a05922/dwh-jobs/src/main/lib/python_lib/data_product/iterator_processor_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
iterator_processor_test.py:5: in <module>
    from iterator_processor import IteratorProcessor
iterator_processor.py:4: in <module>
    from jsonschema.exceptions import ValidationError
E   ImportError: No module named 'jsonschema'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================ 1 error in 3.19 seconds ==========================================================================

calling python3 iterator_processor.py on the other hand gives me:

Traceback (most recent call last):
  File "iterator_processor.py", line 7, in <module>
    from data_product.event_processor import DwhUnknownActionError
ModuleNotFoundError: No module named 'data_product'

an error that I 100% expect because the file is in the data_product folder. (the script is meant to be called from outside)

what irritates me is that pytest can not find jsonschema while python3 findes the library without problems.

did anybody have a similar problem?

how do I fix this?

Is this a bug in the pytest library?

should I report this?

how do I report this?

how to I check if anybody has reported this already?


问:
Posting Integer array in postgress through Postman on spring boot JPA service
I am trying to post the below request through postman in the item table to a spring boot service . I am using JPA ,  Postgress , Spring boot .

{
"allGroups" : [1,2,3],
"assetName" : "testname"
}

The Entity class is like below for the Asset table

public class Asset implements Serializable {

```<code>private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@Column(name = "id")
@GeneratedValue(strategy=GenerationType.IDENTITY)
private Long id;
private String assetName;
@Type(type = "int-array")
@Column(name = "all_groups")
private Integer[] allGroups;
}
</code>```

And the corresponding DTO is

```<code>@JsonInclude(JsonInclude.Include.NON_NULL)
public class AssetDto {
private long serialVersionUID;
@Max(Integer.MAX_VALUE)
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;
@Size(max = 255)
@NotBlank(message = "assetName may not be empty")
private String assetName;
private Integer[] allGroups;
}
</code>```

When i am posting it is saving the "assetName" property but not the "allGroups" array . How to make it work submit array also .

Body:
I am trying to post the below request through postman in the item table to a spring boot service . I am using JPA ,  Postgress , Spring boot .

{
"allGroups" : [1,2,3],
"assetName" : "testname"
}

The Entity class is like below for the Asset table

public class Asset implements Serializable {

private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@Column(name = "id")
@GeneratedValue(strategy=GenerationType.IDENTITY)
private Long id;
private String assetName;
@Type(type = "int-array")
@Column(name = "all_groups")
private Integer[] allGroups;
}

And the corresponding DTO is

@JsonInclude(JsonInclude.Include.NON_NULL)
public class AssetDto {
private long serialVersionUID;
@Max(Integer.MAX_VALUE)
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;
@Size(max = 255)
@NotBlank(message = "assetName may not be empty")
private String assetName;
private Integer[] allGroups;
}

When i am posting it is saving the "assetName" property but not the "allGroups" array . How to make it work submit array also .


问:
Setup Triton Inference Server on a Windows 2019 server with Tesla GPU + inference using python
We need to setup Nvidia Triton Inference Server on a Windows 2019 server and utilize the Tesla GPU for inferencing the client applications using python.

For the ways that we came across we found that we need to it with docker and to use docker in Windows server as per my knowledge we need to do it with WSL, but, We don’t want to setup a WSL on the Windows system.

Can someone please share the steps for the same.

Is there a way to setup docker without WSL? if yes kindly do share the reference for triton inference server.


问:
React native decompiling
I am trying to decompile index.android.bundle from the APK folder to get .js files using react-native-decompiler.

e.g.:
npx react-native-decompiler -i index.android.bundle -o output

But every time when I try to do that I get this error:
"'react-native-decompiler' is not recognized as an internal or external command,
operable program or batch file."

I installed all of the packages for react native, but it seems for me that this command might be taken down.

I will be really grateful if someone can confirm if I am right or maybe I am doing something wrong.
However, if this solution doesn't work is there any other way to decompile index.android.bundle file?

Title: React native decompiling


问:
AWS: Userdata block on EC2 launch template is not running the provided powershell script
I'm working on migrating a VM from azure to AWS. I have successfully migrated using a migration service and it boots up a VM on completion. I had created an AMI out of that VM which also turned out to be successful. But when I try creating a ec2 or a autoscale group out of this ami, im unable to curl http://169.254.169.254/ or any of the ec2 metadata. This is due to the fact that the ec2i is using the gateway from the previous config from azure to make any internal network calls. When I run the InitializeInstance.ps1 script that comes inside the ec2, the instance is able to facilitate the right gateway and external ip etc.

But since I'm going to run them as autoscale groups, I cannot run this script everytime ASG spins up a new ec2 based on load. Hence I tried executing the script on 'User Data' part of the launch template that this ASG uses. But that doesnt seem to deliver expected results. Help me out in finding a way to solve this.

Ec2 launch template -- UserData:
<powershell> C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts\InitializeInstance.ps1 </powershell>

Im assuming that the ec2 pulls the userdata scripts from 'http://169.254.169.254/latest/user-data' and since this gives out a timeout, its not able to execute the user data script. Correct me if Im wrong

Executing the script through the shell of the VM, but this is exhaustive and not a great practice

Using the User data in the ec2 launch template, but that apparently is not executing the listed scripts since I even tried a simple powershell script to create a new file. The file was never created.

<powershell> $file = $env:SystemRoot + "\Temp\" + (Get-Date).ToString("MM-dd-yy-hh-mm") New-Item $file -ItemType file </powershell>


问:
REST API pull query with group by clouse
Need advice or some ideas for my case.

Here is my query pull

```<code>{
“ksql”: “SELECT rtdate as trans_date , trb102 as account_number, count() as freq_trans_today FROM trx_log WHERE rtdate = ‘2022-12-29’ GROUP BY rtdate , trb102 having count() >= 3;”,
“streamsProperties”: {}
}
</code>```

But I got an error

```<code>{
“@type”: “statement_error”,
“error_code”: 40001,
“message”: “Pull queries don’t support GROUP BY clauses. See Queries - ksqlDB Documentation for more info.\nAdd EMIT CHANGES if you intended to issue a push query.\nStatement: SELECT rtdate as trans_date , trb102 as account_number, count() as freq_trans_today FROM trx_log WHERE rtdate = ‘2022-12-29’ GROUP BY rtdate , trb102 having count() >= 3;”,
“entities”:
}
</code>```

When I add EMIT CHANGES, the request being LISTEN not return the value.

Body:
Need advice or some ideas for my case.

Here is my query pull

{
“ksql”: “SELECT rtdate as trans_date , trb102 as account_number, count() as freq_trans_today FROM trx_log WHERE rtdate = ‘2022-12-29’ GROUP BY rtdate , trb102 having count() >= 3;”,
“streamsProperties”: {}
}

But I got an error

{
“@type”: “statement_error”,
“error_code”: 40001,
“message”: “Pull queries don’t support GROUP BY clauses. See Queries - ksqlDB Documentation for more info.\nAdd EMIT CHANGES if you intended to issue a push query.\nStatement: SELECT rtdate as trans_date , trb102 as account_number, count() as freq_trans_today FROM trx_log WHERE rtdate = ‘2022-12-29’ GROUP BY rtdate , trb102 having count() >= 3;”,
“entities”:
}

When I add EMIT CHANGES, the request being LISTEN not return the value.


问:
app freezes when clicking on yellow box warning (iOS 14 simulator)
When i click on any yellow box warning in my iOS simulator the app freezes. Clicking on red-box warnings is fine. I have updated react-native to newest version from 0.70.0 with no effects :(

react-native v0.70.6

upgrading to latest react-native

fresh install (watchman delete, pod de-integrate & re-install, fresh clean of node modules etc)


问:
Three js change color on press button removes the details of the model
Hope you all are doing best in you life!

I've newly intraction with 3d work. I'm making the 3d virtual showroom you can say 3d commerce page,where i need to put 3d Models. I want to add functionality of changing models color (limited colors) by users. like this: [https://codesandbox.io/s/v1fgk].(I'm using three js not react three fiber.)

THREE JS Version: "three": "^0.135.0",

The problem is that:

1) When i change the color of the mesh the details of the model are deleted.what can i do for this?

2) I face alot of lighting issues during this work.finally I'm using HDRI envornment instead of lighting in my models.
am i doing best?

Actual Model:

On Change Color:

Why my models's details are going to delete?

On Changing Color i'm doing this:

```<code> // const loader = new THREE.TextureLoader();
      // const aoTexture = loader.load('textures/BottleModel/Model2/Material.002_Mixed_AO.png')
      // const displacementTexture = loader.load('textures/BottleModel/Model2/base_Height.png')
      // const metalicTexture = loader.load('textures/BottleModel/Model2/Material.002_Metallic.png')
      // const roughnessTexture = loader.load('textures/BottleModel/Model2/Material.002_Roughness.png')

      const BottleMesh=model.current.children.find((item)=>item.name==="cup_base")

      BottleMesh.children.map((item)=>{
        if(item.name==="Cylinder"){
          item.material = new THREE.MeshStandardMaterial({
            color: code,
            // aoMap:aoTexture,
            // metalnessMap : metalicTexture,
            // displacementMap:displacementTexture,
            // roughnessMap:roughnessTexture
          })
        }
      })
</code>```

CREATING MODEL AND ADDING ENVORNMENT:

```<code>export const createModel = (model, scene, path, setLoading,renderer) => { //model is a react ref, remember that
    setLoading(true)
    const dracoLoader = new DRACOLoader();
    // // Specify path to a folder containing WASM/JS decoding libraries.
    dracoLoader.setDecoderPath('https://www.gstatic.com/draco/v1/decoders/');

    let loader = new GLTFLoader();
    loader.setDRACOLoader(dracoLoader);

    let generator = new THREE.PMREMGenerator(renderer);
    new RGBELoader().setPath('/textures/hdri/') .load('dancing_hall_4k.hdr', function (texture) {
    //   let envmap =generator.fromEquirectangular(texture)
    texture.mapping = THREE.EquirectangularReflectionMapping;

    // scene.background = texture;
    scene.environment = texture;
    });

    loader.load(path, function (gltf) {
        model.current = gltf.scene;
        model.current.position.x=0
        model.current.position.y=-3
        scene.add(model.current);

        setLoading(false);

    }, undefined, function (error) {
        console.error(error)
    });

}

</code>```

Body:
Hope you all are doing best in you life!

I've newly intraction with 3d work. I'm making the 3d virtual showroom you can say 3d commerce page,where i need to put 3d Models. I want to add functionality of changing models color (limited colors) by users. like this: [https://codesandbox.io/s/v1fgk].(I'm using three js not react three fiber.)

THREE JS Version: "three": "^0.135.0",

The problem is that:

1) When i change the color of the mesh the details of the model are deleted.what can i do for this?

2) I face alot of lighting issues during this work.finally I'm using HDRI envornment instead of lighting in my models.
am i doing best?

Actual Model:

On Change Color:

Why my models's details are going to delete?

On Changing Color i'm doing this:

 // const loader = new THREE.TextureLoader();
      // const aoTexture = loader.load('textures/BottleModel/Model2/Material.002_Mixed_AO.png')
      // const displacementTexture = loader.load('textures/BottleModel/Model2/base_Height.png')
      // const metalicTexture = loader.load('textures/BottleModel/Model2/Material.002_Metallic.png')
      // const roughnessTexture = loader.load('textures/BottleModel/Model2/Material.002_Roughness.png')

      const BottleMesh=model.current.children.find((item)=>item.name==="cup_base")

      BottleMesh.children.map((item)=>{
        if(item.name==="Cylinder"){
          item.material = new THREE.MeshStandardMaterial({
            color: code,
            // aoMap:aoTexture,
            // metalnessMap : metalicTexture,
            // displacementMap:displacementTexture,
            // roughnessMap:roughnessTexture
          })
        }
      })

CREATING MODEL AND ADDING ENVORNMENT:

export const createModel = (model, scene, path, setLoading,renderer) => { //model is a react ref, remember that
    setLoading(true)
    const dracoLoader = new DRACOLoader();
    // // Specify path to a folder containing WASM/JS decoding libraries.
    dracoLoader.setDecoderPath('https://www.gstatic.com/draco/v1/decoders/');

    let loader = new GLTFLoader();
    loader.setDRACOLoader(dracoLoader);

    let generator = new THREE.PMREMGenerator(renderer);
    new RGBELoader().setPath('/textures/hdri/') .load('dancing_hall_4k.hdr', function (texture) {
    //   let envmap =generator.fromEquirectangular(texture)
    texture.mapping = THREE.EquirectangularReflectionMapping;

    // scene.background = texture;
    scene.environment = texture;
    });

    loader.load(path, function (gltf) {
        model.current = gltf.scene;
        model.current.position.x=0
        model.current.position.y=-3
        scene.add(model.current);

        setLoading(false);

    }, undefined, function (error) {
        console.error(error)
    });

}


问:
For the below code it should show 01/01/currentyear in startdate and in enddate
For the above requirement, we need to show 01/01/current-Year in the start date input field and in the end-date input field it should display the current day date. This condition is satisfied for the below code.

Currently, it is allowing me to take the dates irrespective of the year but while submitting the button it is again taking on the current year dates with the below code.

//current month and year
var yearNow = new Date().getFullYear();
var monthNow = new Date().getMonth() + 1;

//set the start date's field value to current year
document.getElementById('date-start').value = "01/01/" + yearNow;

//set the value of the end date field to current date
document.getElementById('date-end').value = monthNow + "/" + new Date().getDate() + "/" + yearNow;```
<pre class="snippet-code-html lang-html prettyprint-override"><code><label for="date-start">Start Date</label>
<input class="date-picker" id="date-start">
<label for="end-date">End Date</label>
<input class="date-picker" id="date-end"></code>```

Key Note: For the above code it should show 01/01/currentyear in startdate and in enddate it should display the current day date but when we select different dates also it should work after submitting the button also.

By default, it should display 01/01/currentyear in startdate and in enddate it should display the current day date

for the datetime-local it is taking 6 digits for the year it should only 4 digits for year

Body:
For the above requirement, we need to show 01/01/current-Year in the start date input field and in the end-date input field it should display the current day date. This condition is satisfied for the below code.

Currently, it is allowing me to take the dates irrespective of the year but while submitting the button it is again taking on the current year dates with the below code.

//current month and year
var yearNow = new Date().getFullYear();
var monthNow = new Date().getMonth() + 1;

//set the start date's field value to current year
document.getElementById('date-start').value = "01/01/" + yearNow;

//set the value of the end date field to current date
document.getElementById('date-end').value = monthNow + "/" + new Date().getDate() + "/" + yearNow;

Start Date
<input class="date-picker" id="date-start">
End Date
<input class="date-picker" id="date-end">

Key Note: For the above code it should show 01/01/currentyear in startdate and in enddate it should display the current day date but when we select different dates also it should work after submitting the button also.

By default, it should display 01/01/currentyear in startdate and in enddate it should display the current day date

for the datetime-local it is taking 6 digits for the year it should only 4 digits for year


问:
TargetFrameworkVersion in Assembly-CSCharp.csproj not saving changes
I'm using VS Code as code editor, with c# and unity extensions (to auto-complete functions and variables). When i created unity project, i opened folder of project in vs code - where compiler were throw error (When i cant use fast-fill commands)

```<code>[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: w:\projects\2D game\Assembly-CSharp.csproj
</code>```

I am tried to change file directly, but unity automaticly changing version to 4.7.1, in Unity editor and in project settings i dont found current setting.

In google writes to change TargetFrameworkVerison in csproj file - but i cant to do that. After saving, and opening C# project in unity - changes dont applied, unity automaticly changes version to 4.7.1 (current version .NET Framework is 4.8.1)

Body:
I'm using VS Code as code editor, with c# and unity extensions (to auto-complete functions and variables). When i created unity project, i opened folder of project in vs code - where compiler were throw error (When i cant use fast-fill commands)

[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: w:\projects\2D game\Assembly-CSharp.csproj

I am tried to change file directly, but unity automaticly changing version to 4.7.1, in Unity editor and in project settings i dont found current setting.

In google writes to change TargetFrameworkVerison in csproj file - but i cant to do that. After saving, and opening C# project in unity - changes dont applied, unity automaticly changes version to 4.7.1 (current version .NET Framework is 4.8.1)


问:
bitbucket code search API getting 401 error
I am trying to use the bitbucket code search API and I am getting 401 error "Token is invalid or not supported for this endpoint."

I created a repository access token and can access this particular URL 'https://api.bitbucket.org/2.0/repositories/{username}' with an authorization bearer token in the header without any issue.

But I couldn't access the code search API with the same token. I am having an invalid token issue. My code search api -

https://api.bitbucket.org/2.0/teams/{username}/search/code?search_query=repo%3Asample%20source

username- sam

```<code>https://bitbucket.org/blog/bitbucket-code-search-api-now-available

https://developer.atlassian.com/cloud/bitbucket/rest/api-group-other-operations/#api-teams-username-search-code-get
</code>```

I am following the above two articles. In these articles it is mentioned like 'GET /2.0/teams/{username}/search/code'

what username I should give? I already tried with 'sam'

In the first article I am seeing the api you provided and what is "%7B6f461d1e-a3dd-433b-a0e3-7a69daf6ea47%7D" ?

https://api.bitbucket.org/2.0/teams/**%7B6f461d1e-a3dd-433b-a0e3-7a69daf6ea47%7D**/search/code?search_query=repo%3Aelasticsearch%20QueryBuilders

kindly provide more suggestions on this.

Note: This is a private repository and I am the only user in it.

Body:
I am trying to use the bitbucket code search API and I am getting 401 error "Token is invalid or not supported for this endpoint."

I created a repository access token and can access this particular URL 'https://api.bitbucket.org/2.0/repositories/{username}' with an authorization bearer token in the header without any issue.

But I couldn't access the code search API with the same token. I am having an invalid token issue. My code search api -

https://api.bitbucket.org/2.0/teams/{username}/search/code?search_query=repo%3Asample%20source

username- sam

https://bitbucket.org/blog/bitbucket-code-search-api-now-available

https://developer.atlassian.com/cloud/bitbucket/rest/api-group-other-operations/#api-teams-username-search-code-get

I am following the above two articles. In these articles it is mentioned like 'GET /2.0/teams/{username}/search/code'

what username I should give? I already tried with 'sam'

In the first article I am seeing the api you provided and what is "%7B6f461d1e-a3dd-433b-a0e3-7a69daf6ea47%7D" ?

https://api.bitbucket.org/2.0/teams/**%7B6f461d1e-a3dd-433b-a0e3-7a69daf6ea47%7D**/search/code?search_query=repo%3Aelasticsearch%20QueryBuilders

kindly provide more suggestions on this.

Note: This is a private repository and I am the only user in it.


问:
Pretty-printing not working in VS Code for C++ debugging using GDB
I am trying to use pretty-printing for debugging C++ in VS code under a Debian configuration.

Right now vectors are displayed like that : Vector display

My launch.json file is :

```<code>{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Lancer",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/build/examples/005_friction/mode_III_slip_weakening",
            "args": ["dumps", "100", "100"],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}/build/examples/005_friction/",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ]
        }
    ],
}
</code>```

I have also tried to add in configurations

```<code>"gdb": {
          "prettyPrinting": true}
</code>```

In that case, I have an error "Property gdb is not allowed". But I have gdb installed on my computer. I also have the "C/C++" extension installed in VS code.

At last, I tried to type -exec -enable-pretty-printing in the Debug console without further success.

What should I do ?

Body:
I am trying to use pretty-printing for debugging C++ in VS code under a Debian configuration.

Right now vectors are displayed like that : Vector display

My launch.json file is :

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Lancer",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/build/examples/005_friction/mode_III_slip_weakening",
            "args": ["dumps", "100", "100"],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}/build/examples/005_friction/",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ]
        }
    ],
}

I have also tried to add in configurations

"gdb": {
          "prettyPrinting": true}

In that case, I have an error "Property gdb is not allowed". But I have gdb installed on my computer. I also have the "C/C++" extension installed in VS code.

At last, I tried to type -exec -enable-pretty-printing in the Debug console without further success.

What should I do ?


问:
Discrepancy in Oracle table ETL processing duration into Data Warehouse – possible reasons with data or table structure?
We’ve 3 tables in our Oracle database that get ETL’d (via SSIS) into our DW environment during out-of-hours.

Table 1 contains 16million rows, 52 columns (~550k used blocks), and reportedly takes just ~6mins to load into the Data Warehouse.

In contrast, tables 2 and 3 are smaller with both containing <3million rows, ~45 columns (~200k used blocks each), but they take almost and hour each to load.

There’s no CLOB or BLOB data in any of these tables.

Data Warehouse team advises me that they’re using identical ETL packages to pull the data, and therefore suspect there must be something database-side that’s influencing this.

On the premise that tables 2 & 3 are processing non-typically slowly, is there anything from a data or table-structure I should be investigating as a possible factor in this big discrepancy between processing times?


问:
how to customize the Oauth refresh token in spring boot
I need to add more custom fields in the refresh token

the left side was the access token data right side was the token refresh data I need the same as the access token


问:
Is there anyway to make a program universally accepted by all compilers?
I have typed out a simple program counting the number of positive divisors of a number in C, which works in CodeBlocks GCC compiler but not in the online compiler provided by the school, where it prints out some numbers close to 22k (22019 21873) etc after some inputs.

For example, for input 10 the program prints out 4 which the number of divisors, but in the online compiler it prints out 22019. I noticed when i changed the order of some conditions in the if statements from if (n<0) to if (0>n) the numbers also changed (the 22019 became 22xxx) to numbers different from the first time. Here's the code:

```<code>#include <stdio.h>
#include <stdlib.h>

int main()
{
  int c, n, res = 0;
  int i = 1;

  scanf("%d", &n);
  if (0>n)
    printf("Wrong Input");
  else {
    while (n>=i)
      {
        res = n%i;
        if (res == 0) {
          c++;
          i++;
        }
        else {
          i++;
        }
      }
    printf("%d", c);
  }
  return 0;
}
</code>```

Body:
I have typed out a simple program counting the number of positive divisors of a number in C, which works in CodeBlocks GCC compiler but not in the online compiler provided by the school, where it prints out some numbers close to 22k (22019 21873) etc after some inputs.

For example, for input 10 the program prints out 4 which the number of divisors, but in the online compiler it prints out 22019. I noticed when i changed the order of some conditions in the if statements from if (n<0) to if (0>n) the numbers also changed (the 22019 became 22xxx) to numbers different from the first time. Here's the code:

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

int main()
{
  int c, n, res = 0;
  int i = 1;

  scanf("%d", &n);
  if (0>n)
    printf("Wrong Input");
  else {
    while (n>=i)
      {
        res = n%i;
        if (res == 0) {
          c++;
          i++;
        }
        else {
          i++;
        }
      }
    printf("%d", c);
  }
  return 0;
}


问:
Confluent Golang Kafka Consumer
When consuming messages, if the event is of the kafka.error type, is it recommended to validate if the error is fatal and terminate the application?

My question is if, in the consumer, the errors are all recoverable or if there is the slightest possibility of there being a non-recoverable error?

    for run {
        ...
        switch e := ev.(type) {
        case *kafka.Message:
            fmt.Printf("%% Message on %s:\n%s\n",
                e.TopicPartition, string(e.Value))
            if e.Headers != nil {
                fmt.Printf("%% Headers: %v\n", e.Headers)
            }
            _, err := c.StoreMessage(e)
            if err != nil {
                fmt.Fprintf(os.Stderr, "%% Error storing offset after message %s:\n",
                    e.TopicPartition)
            }
        case kafka.Error:

            // Is this validation recommended/necessary in the consumer?
            if e.IsFatal() {
                run = false
            }

        default:
            fmt.Printf("Ignored %v\n", e)
        }

    }

```

Title: Confluent Golang Kafka Consumer