问:
how upload file facebook and get format file
I have been doing some research on Facebook and Instagram for a project
Unfortunately, Facebook does not provide complete documentation, In my opinion,
because of the security

I want to save facebook media in my database
but
How can I get the format of this URL?
Facebook does not specify the type of file about story mentions

urlstory_mention

Pay attention to the image below

requestbody

I use .NET, but if anyone has any information, please let me know


来源: stackexchange

问:
Getting repetitive logs from NativeEnvironmentRepository
I am using spring cloud config server and getting repetitive logs from NativeEnvironmentRepository class without any api call.

Says

```<code>Adding property source:Config resource ‘file [//application.properties] via location []
[application.properties]’
</code>```

ContentLicense: CC BY-SA 4.0

Body:
I am using spring cloud config server and getting repetitive logs from NativeEnvironmentRepository class without any api call.

Says

Adding property source:Config resource ‘file [//application.properties] via location []
[application.properties]’


问:
How Can I Check A String Whether It Does Exists In A The Given String Or Does Not?
I am currently working on a database project that uses platform MySQL. Project includes tables such as course, instructor, researchArea etc. What I really need is a trigger that checks how many words from "researchArea keywords" are in the given text. Text is going to be pulled from another table which named course. With the result I am planing to get a integer matching percentage value and with the value, I planned to insert the calculated value into "matchingvalue" which is a attribute in instructor table, a attribute to describe the relation of the course content between the instructor.

I have a big lack of scripting experience and syntax information in sql already and I couldn't even think a solution to solve this thing. Any ideas to create a trigger for this query or function whatever it is?

Image of the EER


问:
In c# code,how do I log to Log Analytics workspace for a custom field?
In Log Analytics workspace, I am accessing the union of the AppRequests table and AppExceptions tables

AppExceptions | join(AppRequests) on OperationId,

and printing out the Properties column (this is a dynamic list) when there is an exception.  For example

However I also get entries such as this where the fields of the "Properties" column are different.

How do I get the App Service application  code to log a custom field and value in Properties? The App Service app is a web service. It takes as a parameter something called
ConversationId . In the first screenshot I can see an entry for prop__ConversationId but not in the second screenshot. I want to capture this ConversationId in the logs.

```<code>Response\<LogsQueryResult\> response = await client.QueryWorkspaceAsync(workspaceId, "AppExceptions | join(AppRequests) on OperationId ", timeRange);

LogsTable table = response.Value.Table;
int count = 0;
foreach (LogsTableColumn s in table.Columns)
{
    //Console.WriteLine(s.Name);
    // if (s.Name.ToString() == "Url")
    if (s.Name.ToString() == "Properties")
    {
        break;
    }
    else
    {
        count++;
    }

}
Console.WriteLine("Index "+count.ToString());

foreach (var row in table.Rows)
{
    if ( row.ToString().ToLower().Contains("exception"))
    {
        foreach (string s in row.ElementAt(count).ToString().Split(","))
        {
           if (s.ToLower().Contains("prop__conversationid"))
            {
                Console.WriteLine(s);

            }
        }
    }
}
</code>```

Body:
In Log Analytics workspace, I am accessing the union of the AppRequests table and AppExceptions tables

AppExceptions | join(AppRequests) on OperationId,

and printing out the Properties column (this is a dynamic list) when there is an exception.  For example

However I also get entries such as this where the fields of the "Properties" column are different.

How do I get the App Service application  code to log a custom field and value in Properties? The App Service app is a web service. It takes as a parameter something called
ConversationId . In the first screenshot I can see an entry for prop__ConversationId but not in the second screenshot. I want to capture this ConversationId in the logs.

Response\<LogsQueryResult\> response = await client.QueryWorkspaceAsync(workspaceId, "AppExceptions | join(AppRequests) on OperationId ", timeRange);

LogsTable table = response.Value.Table;
int count = 0;
foreach (LogsTableColumn s in table.Columns)
{
    //Console.WriteLine(s.Name);
    // if (s.Name.ToString() == "Url")
    if (s.Name.ToString() == "Properties")
    {
        break;
    }
    else
    {
        count++;
    }

}
Console.WriteLine("Index "+count.ToString());

foreach (var row in table.Rows)
{
    if ( row.ToString().ToLower().Contains("exception"))
    {
        foreach (string s in row.ElementAt(count).ToString().Split(","))
        {
           if (s.ToLower().Contains("prop__conversationid"))
            {
                Console.WriteLine(s);

            }
        }
    }
}


问:
How can I solve this error: [eslint] Error while loading rule 'vuetify/no-legacy-grid' when try upgrade vuetify 2.6.13
Trying upgrade vuetify 1.5 to 2.6.13, and the after "npm run serve" i got this error in the terminal:

```<code>ERROR  Failed to compile with 1 error                                                                                13:22:08

[eslint] Error while loading rule 'vuetify/no-legacy-grid': context.parserServices.defineTemplateBodyVisitor is not a function
Occurred while linting C:\Users\...\src\main.js

You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
ERROR in [eslint] Error while loading rule 'vuetify/no-legacy-grid': context.parserServices.defineTemplateBodyVisitor is not a function
Occurred while linting C:\Users\...\src\main.js

webpack compiled with 1 error
</code>```

i upgrade some dependencies for this subject and i have these versions:

"vue": "^2.7.14",
"vuetify": "^2.6.13",
"@vue/cli-plugin-babel": "^5.0.8",
"@vue/cli-plugin-eslint": "^5.0.8",
"@vue/cli-service": "^5.0.8",
"babel-eslint": "^10.1.0",
"eslint": "^8.31.0",
"eslint-plugin-vue": "^9.8.0",
"eslint-plugin-vuetify": "^1.1.0",
"vue-cli-plugin-vuetify": "^2.5.8",

I tried the /* eslint-disable */ and did not work

in my .eslintrc.js have the rule like this:

"rules": {
"vuetify/no-legacy-grid": "error",}

Body:
Trying upgrade vuetify 1.5 to 2.6.13, and the after "npm run serve" i got this error in the terminal:

ERROR  Failed to compile with 1 error                                                                                13:22:08

[eslint] Error while loading rule 'vuetify/no-legacy-grid': context.parserServices.defineTemplateBodyVisitor is not a function
Occurred while linting C:\Users\...\src\main.js

You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
ERROR in [eslint] Error while loading rule 'vuetify/no-legacy-grid': context.parserServices.defineTemplateBodyVisitor is not a function
Occurred while linting C:\Users\...\src\main.js

webpack compiled with 1 error

i upgrade some dependencies for this subject and i have these versions:

"vue": "^2.7.14",
"vuetify": "^2.6.13",
"@vue/cli-plugin-babel": "^5.0.8",
"@vue/cli-plugin-eslint": "^5.0.8",
"@vue/cli-service": "^5.0.8",
"babel-eslint": "^10.1.0",
"eslint": "^8.31.0",
"eslint-plugin-vue": "^9.8.0",
"eslint-plugin-vuetify": "^1.1.0",
"vue-cli-plugin-vuetify": "^2.5.8",

I tried the /* eslint-disable */ and did not work

in my .eslintrc.js have the rule like this:

"rules": {
"vuetify/no-legacy-grid": "error",}


问:
Graph Edges with Special Properties -- Only accessible when starting from that node; and Edges that Exit
I have built a directed graph with NetworkX in Python, with nodes representing people and edges representing reporting hierarchies.

I have created additional edges between certain people that aren't reporting into each other, based on another business driver. For example, person A reports to person B; person Y reports to person Z. However, I add an additional one-way edge from Z to A that should only be accessible when starting with Z.

two-way:

A <--> B

Y <--> Z

one-way:

Z  --> A

If I begin travel from person Y with no cost limitation, I want person Z to be accessible only, but not person A.

If I begin travel from person Z with no cost limitations, I want person A and person Y to be accessible, but not person B. Ideally, the trip would "exit" at this point.

```<code>Expected Results [Starting Node, Reachable Nodes]:
[A, [B]]
[B, [A]]
[Y, [Z]]
[Z, [Y, A]]
</code>```

Body:
I have built a directed graph with NetworkX in Python, with nodes representing people and edges representing reporting hierarchies.

I have created additional edges between certain people that aren't reporting into each other, based on another business driver. For example, person A reports to person B; person Y reports to person Z. However, I add an additional one-way edge from Z to A that should only be accessible when starting with Z.

two-way:

A <--> B

Y <--> Z

one-way:

Z  --> A

If I begin travel from person Y with no cost limitation, I want person Z to be accessible only, but not person A.

If I begin travel from person Z with no cost limitations, I want person A and person Y to be accessible, but not person B. Ideally, the trip would "exit" at this point.

Expected Results [Starting Node, Reachable Nodes]:
[A, [B]]
[B, [A]]
[Y, [Z]]
[Z, [Y, A]]


问:
Pulling data out of Promises
How do I actually get data out of a Promise when using async/await?
I've written an async function to gather some data that will be used later in the script. There are two fetch calls, with the second call being dependent upon the first. I understand that an async function will always return a promise, but I can't figure out how to get the data out of it.

I've tried both:

```<code>const my_async_function = async() => {
    try {
        const foo = await fetch(`api/foo/uuid`).then(res => res.json());
        const bar = await fetch(`api/bar/${foo.uuid}`).then(res => res.json());
        return bar.find(el => el.name === 'hello');
    }
    catch (err) {
        console.error(err);
    }
}
const data = my_async_function().then(res => res.json());
</code>```

and

```<code>let data;
const my_async_function = async() => {
    try {
        const foo = await fetch(`api/foo/uuid`).then(res => res.json());
        const bar = await fetch(`api/bar/${foo.uuid}`).then(res => res.json());
        return bar.find(el => el.name === 'hello');
    }
    catch (err) {
        console.error(err);
    }
}
my_async_function().then(res => {
    data = res.json();
});
</code>```

but neither works. The first version throws an error and in the second version data remains undefind. What am I missing?

Thanks in advance.

Title: Pulling data out of Promises

Body:
How do I actually get data out of a Promise when using async/await?
I've written an async function to gather some data that will be used later in the script. There are two fetch calls, with the second call being dependent upon the first. I understand that an async function will always return a promise, but I can't figure out how to get the data out of it.

I've tried both:

const my_async_function = async() => {
    try {
        const foo = await fetch(`api/foo/uuid`).then(res => res.json());
        const bar = await fetch(`api/bar/${foo.uuid}`).then(res => res.json());
        return bar.find(el => el.name === 'hello');
    }
    catch (err) {
        console.error(err);
    }
}
const data = my_async_function().then(res => res.json());

and

let data;
const my_async_function = async() => {
    try {
        const foo = await fetch(`api/foo/uuid`).then(res => res.json());
        const bar = await fetch(`api/bar/${foo.uuid}`).then(res => res.json());
        return bar.find(el => el.name === 'hello');
    }
    catch (err) {
        console.error(err);
    }
}
my_async_function().then(res => {
    data = res.json();
});

but neither works. The first version throws an error and in the second version data remains undefind. What am I missing?

Thanks in advance.


问:
Vite project builds locally but not in CI - Buffer issue
Locally, Vite builds just fine. However, in CI (which just runs the same script, npm run build), it fails.

I get this error in CI:

```<code>Error:  "Buffer" is not exported by "__vite-browser-external", imported by "src/index.html?html-proxy&index=0.js".
file: /home/runner/work/explorer/explorer/src/index.html?html-proxy&index=0.js:2:13
1:
2:     import { Buffer } from "buffer";
                ^
3:     window.Buffer = Buffer;
Error:  error during build:
RollupError: "Buffer" is not exported by "__vite-browser-external", imported by "src/index.html?html-proxy&index=0.js".
</code>```

I added the line that is causing the error because of an issue when running vite serve locally (it errors) - StackOverflow suggested this solution. It builds fine even in CI without that line.

Here's my Vite config:

import { defineConfig } from 'vite'

import react from '@vitejs/plugin-react'
import viteTsconfigPaths from 'vite-tsconfig-paths'
import svgrPlugin from 'vite-plugin-svgr'
import { createHtmlPlugin } from 'vite-plugin-html'
import EnvironmentPlugin from 'vite-plugin-environment'
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill'

export default defineConfig({
  root: './src',
  envDir: '..',
  build: {
    // relative to the root
    outDir: '../build',
  },
  // relative to the root
  publicDir: '../public',
  server: {
    open: true,
    port: 3000,
    proxy: {
      '/api': 'http://localhost:5001',
    },
  },
  define: { 'process.env': {} },
  resolve: {
    alias: {
      events: 'events',
      stream: 'stream-browserify',
      zlib: 'browserify-zlib',
      'util/': 'util',
    },
  },
  optimizeDeps: {
    esbuildOptions: {
      define: {
        // Node.js global to browser globalThis
        global: 'globalThis',
      },
      // Enable esbuild polyfill plugins
      plugins: [
        NodeGlobalsPolyfillPlugin({
          buffer: true,
        }),
      ],
    },
  },
  plugins: [
    svgrPlugin({
      exportAsDefault: true,
    }),
    react({
      // Use React plugin in all *.jsx and *.tsx files
      include: '**/*.{jsx,tsx}',
    }),
    createHtmlPlugin({
      inject: {
        data: {
          VITE_GA_ID: process.env.VITE_GA_ID,
          VITE_ZENDESK_KEY: process.env.VITE_ZENDESK_KEY,
        },
      },
    }),
    EnvironmentPlugin('all'),
    NodeGlobalsPolyfillPlugin({
      buffer: true,
      process: true,
    }),
    viteTsconfigPaths(),
  ],
  test: {
    globals: true,
    setupFiles: 'src/setupTests.js',
  },
})
```

My build command is DISABLE_NEW_JSX_TRANSFORM=true vite build --emptyOutDir

My serve command is DISABLE_NEW_JSX_TRANSFORM=true vite serve

Body:
Locally, Vite builds just fine. However, in CI (which just runs the same script, npm run build), it fails.

I get this error in CI:

Error:  "Buffer" is not exported by "__vite-browser-external", imported by "src/index.html?html-proxy&index=0.js".
file: /home/runner/work/explorer/explorer/src/index.html?html-proxy&index=0.js:2:13
1:
2:     import { Buffer } from "buffer";
                ^
3:     window.Buffer = Buffer;
Error:  error during build:
RollupError: "Buffer" is not exported by "__vite-browser-external", imported by "src/index.html?html-proxy&index=0.js".

I added the line that is causing the error because of an issue when running vite serve locally (it errors) - StackOverflow suggested this solution. It builds fine even in CI without that line.

Here's my Vite config:

import { defineConfig } from 'vite'

import react from '@vitejs/plugin-react'
import viteTsconfigPaths from 'vite-tsconfig-paths'
import svgrPlugin from 'vite-plugin-svgr'
import { createHtmlPlugin } from 'vite-plugin-html'
import EnvironmentPlugin from 'vite-plugin-environment'
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill'

export default defineConfig({
  root: './src',
  envDir: '..',
  build: {
    // relative to the root
    outDir: '../build',
  },
  // relative to the root
  publicDir: '../public',
  server: {
    open: true,
    port: 3000,
    proxy: {
      '/api': 'http://localhost:5001',
    },
  },
  define: { 'process.env': {} },
  resolve: {
    alias: {
      events: 'events',
      stream: 'stream-browserify',
      zlib: 'browserify-zlib',
      'util/': 'util',
    },
  },
  optimizeDeps: {
    esbuildOptions: {
      define: {
        // Node.js global to browser globalThis
        global: 'globalThis',
      },
      // Enable esbuild polyfill plugins
      plugins: [
        NodeGlobalsPolyfillPlugin({
          buffer: true,
        }),
      ],
    },
  },
  plugins: [
    svgrPlugin({
      exportAsDefault: true,
    }),
    react({
      // Use React plugin in all *.jsx and *.tsx files
      include: '**/*.{jsx,tsx}',
    }),
    createHtmlPlugin({
      inject: {
        data: {
          VITE_GA_ID: process.env.VITE_GA_ID,
          VITE_ZENDESK_KEY: process.env.VITE_ZENDESK_KEY,
        },
      },
    }),
    EnvironmentPlugin('all'),
    NodeGlobalsPolyfillPlugin({
      buffer: true,
      process: true,
    }),
    viteTsconfigPaths(),
  ],
  test: {
    globals: true,
    setupFiles: 'src/setupTests.js',
  },
})

My build command is DISABLE_NEW_JSX_TRANSFORM=true vite build --emptyOutDir

My serve command is DISABLE_NEW_JSX_TRANSFORM=true vite serve


问:
How to configure manifest files for broadcast receiver module in Android?
I have a multi-module project. One of the sub-modules is just a broadcast receiver for homescreen widget. I am struggling with how to configure the manifest files for this (in both the app: module and receiver module). Does anybody have any examples of how this is done?

This is what i have currently in module manifest. Is there anything I need to add to this file? Any special configuration needed in parent app: modules manifest?

I currently get "can't load widget" error message when i try to place widget on homescreen.

```<code><?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.metrics">

    <application>
    <receiver
        android:name="com.example.metrics.WidgetMetricsReceiver"
        android:exported="false"
        android:label="Metrics">
        <intent-filter>
            <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
        </intent-filter>

        <meta-data
            android:name="android.appwidget.provider"
            android:resource="@xml/widget_metrics_info" />
    </receiver>

</application>

</manifest>
</code>```

Body:
I have a multi-module project. One of the sub-modules is just a broadcast receiver for homescreen widget. I am struggling with how to configure the manifest files for this (in both the app: module and receiver module). Does anybody have any examples of how this is done?

This is what i have currently in module manifest. Is there anything I need to add to this file? Any special configuration needed in parent app: modules manifest?

I currently get "can't load widget" error message when i try to place widget on homescreen.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.metrics">

    <application>
    <receiver
        android:name="com.example.metrics.WidgetMetricsReceiver"
        android:exported="false"
        android:label="Metrics">
        <intent-filter>
            <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
        </intent-filter>

        <meta-data
            android:name="android.appwidget.provider"
            android:resource="@xml/widget_metrics_info" />
    </receiver>

</application>

</manifest>


问:
Unable to complete correct output for loop and exit strategy
```<code>`entryprice = close
// Initialize profit target
 profit_target = entryprice

// Calculate stop loss and take profit levels
long_stop_loss = entryprice -1
long_take_profit = entryprice * 1.6
// Calculate stop loss and take profit levels
short_stop_loss = entryprice + .02
short_take_profit = entryprice - 1

shortcondition = ta.crossunder(src,lower+slope_pl*length)
if shortcondition
    strategy.entry("Short",strategy.short, comment = "Entered Short 1")
    num_bars = 5
    bar_count = 0
    while bar_count < num_bars
        // Display ID of the latest open position
        if close < entryprice +.03
            //strategy.exit("Exit on .03% loss", "Short", loss=short_stop_loss)
            break
        else if close >= entryprice -1
            strategy.exit("Exit - Profit", "buy", profit = short_take_profit)
            break
        else
            bar_count += 1
            strategy.close("closed")`

`if shortcondition
     strategy.entry("Short",strategy.short, comment = "Entered Short 1")
     strategy.exit("Exit on .03% loss", "Short", loss=short_stop_loss)
 if shortcondition
     strategy.entry("Short",strategy.short, comment = "Entered Short 1")
     strategy.exit("Exit - Profit", "buy", profit = short_take_profit)`
</code>```

So based on this while loop I understand I set it to 5 bars count I believe. Even if this is wrong I have tried this method as well. while true. Im honestly thinking of just writing another method to where it just does both like this but it seems like I wont get the data I want you know.

Currently I am having a problem where I write a if statement or a loop statement such as while or for loop, and I still only get 1 output. For example if I put my profit exit first it will only run that condition and if I switch to my loss it only does that condition, It is entering correct where it does enter on my break condition but other then that its incorrect, I dont know if I should have my exit stragety outside my if loop or if I need to write this another way. Here is the code:

Body:
`entryprice = close
// Initialize profit target
 profit_target = entryprice

// Calculate stop loss and take profit levels
long_stop_loss = entryprice -1
long_take_profit = entryprice * 1.6
// Calculate stop loss and take profit levels
short_stop_loss = entryprice + .02
short_take_profit = entryprice - 1

shortcondition = ta.crossunder(src,lower+slope_pl*length)
if shortcondition
    strategy.entry("Short",strategy.short, comment = "Entered Short 1")
    num_bars = 5
    bar_count = 0
    while bar_count < num_bars
        // Display ID of the latest open position
        if close < entryprice +.03
            //strategy.exit("Exit on .03% loss", "Short", loss=short_stop_loss)
            break
        else if close >= entryprice -1
            strategy.exit("Exit - Profit", "buy", profit = short_take_profit)
            break
        else
            bar_count += 1
            strategy.close("closed")`

`if shortcondition
     strategy.entry("Short",strategy.short, comment = "Entered Short 1")
     strategy.exit("Exit on .03% loss", "Short", loss=short_stop_loss)
 if shortcondition
     strategy.entry("Short",strategy.short, comment = "Entered Short 1")
     strategy.exit("Exit - Profit", "buy", profit = short_take_profit)`

So based on this while loop I understand I set it to 5 bars count I believe. Even if this is wrong I have tried this method as well. while true. Im honestly thinking of just writing another method to where it just does both like this but it seems like I wont get the data I want you know.

Currently I am having a problem where I write a if statement or a loop statement such as while or for loop, and I still only get 1 output. For example if I put my profit exit first it will only run that condition and if I switch to my loss it only does that condition, It is entering correct where it does enter on my break condition but other then that its incorrect, I dont know if I should have my exit stragety outside my if loop or if I need to write this another way. Here is the code:


问:
Dapr, How to implement in docker-compose some log viewer in my local
I want to implement Dapr with "OpenTelemetry SDK for .NET" in my docker-compose to view the application logs.

any example with Elastic Search, Kibana or some other?

none at the moment only
https://docs.dapr.io/operations/monitoring/logging/


问:
getting input from .scene dirsig file python
I am getting introduced to dirsig and all of its glory. I was wondering how you would get the data extracted from a .scene file

I know typically to read a file line by line, you just loop over the open file object in a for loop:

for line in open(filename): # do something with line

but since .scene files are set up so differently than say .csv files, would it be in the similar format?


问:
I'm trying to make a char variable in c that can only hold 9 digits and if they enter more or less it it should loop
I'm not well versed in C and I'm unsure how to get it to loop if the 9 digits are not entered

```<code>#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

int main()
{

    char NIN[9];

    printf("Please enter your 9 digit NIN:\t");
    scanf(" %s", &NIN);
</code>```

What I have will overflow if you enter more than 9 which isn't what I want

Body:
I'm not well versed in C and I'm unsure how to get it to loop if the 9 digits are not entered

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

int main()
{

    char NIN[9];

    printf("Please enter your 9 digit NIN:\t");
    scanf(" %s", &NIN);

What I have will overflow if you enter more than 9 which isn't what I want


问:
FIleStack (filepicker.io) - not able to upload file with policy and signature
I'm trying filestack (https://www.filestack.com/) to upload files.

I'm using the python client to upload files using policy and signature. Here's the code that I'm using.

```<code>def main():

policy = {"call":["pick","store"],"expiry":1673461800}

p = Policy(policy,"APP_SECRET")
respSign = p.signature_params()

fpclient = FilepickerClientSecure('S3')
resp = fpclient.store_from_url("https://cdn.shopify.com/s/files/1/1390/1485/products/image_aacb3d0a-bed1-4265-99c5-5ec95dbf441b_1024x1024.jpg?v=1643292001",
                         respSign['policy'],
                         respSign['signature']
                        )

respStore = fpclient.store_local_file("/Users/user1/Desktop/user1.pdf",
                        respSign['policy'],
                        respSign['signature']
                        )
print(respStore)
</code>```

The URL generated for the above calls are:

```<code>https://www.filestackapi.com/api/store/S3?policy=eyJjYWxsIjogWyJwaWNrIiwgInN0b3JlIl0sICJleHBpcnkiOiAxNjczNDYxODAwfQ%3D%3D&signature=fb265f83579e29ef11c047790a1b7a62755fa127d0b1f29d39ae8ab55ef395ae
</code>```

When I pass the API_KEY in the URL query, I'm able to upload the files.

But if I use just the signature and policy I'm unable to upload the files.
I get the following error.

```<code>response= Invalid Application
status-code= 200
</code>```

Can you please tell me how to fix this error ?
Is it possible to upload files with policy and signature ?

Body:
I'm trying filestack (https://www.filestack.com/) to upload files.

I'm using the python client to upload files using policy and signature. Here's the code that I'm using.

def main():

policy = {"call":["pick","store"],"expiry":1673461800}

p = Policy(policy,"APP_SECRET")
respSign = p.signature_params()

fpclient = FilepickerClientSecure('S3')
resp = fpclient.store_from_url("https://cdn.shopify.com/s/files/1/1390/1485/products/image_aacb3d0a-bed1-4265-99c5-5ec95dbf441b_1024x1024.jpg?v=1643292001",
                         respSign['policy'],
                         respSign['signature']
                        )

respStore = fpclient.store_local_file("/Users/user1/Desktop/user1.pdf",
                        respSign['policy'],
                        respSign['signature']
                        )
print(respStore)

The URL generated for the above calls are:

https://www.filestackapi.com/api/store/S3?policy=eyJjYWxsIjogWyJwaWNrIiwgInN0b3JlIl0sICJleHBpcnkiOiAxNjczNDYxODAwfQ%3D%3D&signature=fb265f83579e29ef11c047790a1b7a62755fa127d0b1f29d39ae8ab55ef395ae

When I pass the API_KEY in the URL query, I'm able to upload the files.

But if I use just the signature and policy I'm unable to upload the files.
I get the following error.

response= Invalid Application
status-code= 200

Can you please tell me how to fix this error ?
Is it possible to upload files with policy and signature ?


问:
terratest to test SQS
I am using terratests to test my terraform code.
so, my terraform code setup: SQS which is connected to Lambda and Lambda is the consumer of the SQS Message

so, I would like to test the whole flow, So thought of sending a dummy message to SQS and then read the message, using terratest however I can't read the message as the lambda already consumed it !!! I see cw logs for the lambda and it has consumed the message

can anyone suggest how to test this complete set of flow with terratest?

The testcode for SQS looks like this:

```<code>ack_queue_url := terraform.Output(t, terraformOptions, "acknowledgment_queue_url")
    time_out_sec := 120
    test_message := fmt.Sprintf("terratest-test-message-%s", uniqueId)
    aws.SendMessageToQueue(t, awsRegion, ack_queue_url, test_message)
    response := aws.WaitForQueueMessage(t, awsRegion, ack_queue_url, time_out_sec)
    assert.NoError(t, response.Error)
    fmt.Println("###Message Body####:", response.MessageBody)
    aws.DeleteMessageFromQueue(t, awsRegion, ack_queue_url,  response.ReceiptHandle)
    delete_response := aws.WaitForQueueMessage(t, awsRegion, ack_queue_url, time_out_sec)
    assert.Error(t, delete_response.Error, aws.ReceiveMessageTimeout{QueueUrl: ack_queue_url, TimeoutSec: time_out_sec})
</code>```

the output looks like this:

```<code>logger.go:66: "https://sqs.us-east-1.amazonaws.com/1234567/tst-queue"
sqs.go:150: Sending message terratest-test-message-DkKAvt to queue https://sqs.us-east-1.amazonaws.com/1234567/tst-queue
sqs.go:170: Message id b9b0a000-1d71-4821-8659-21aebe33cdc0 sent to queue https://sqs.us-east-1.amazonaws.com/1234567/tst-queue
sqs.go:234: Waiting for message on https://sqs.us-east-1.amazonaws.com/1234567/tst-queue (0s)
sqs.go:234: Waiting for message on https://sqs.us-east-1.amazonaws.com/1234567/tst-queue(20s)
sqs.go:234: Waiting for message on https://sqs.us-east-1.amazonaws.com/1234567/tst-queue (40s)
sqs.go:234: Waiting for message on https://sqs.us-east-1.amazonaws.com/1234567/tst-queue (60s)
sqs.go:234: Waiting for message on https://sqs.us-east-1.amazonaws.com/1234567/tst-queue (80s)
sqs.go:234: Waiting for message on https://sqs.us-east-1.amazonaws.com/1234567/tst-queue (100s)
                Error Trace:    /Users/xxxx/Projects/dummy_test/terratest/complete_test.go:83
                Error:          Received unexpected error:
                                Failed to receive messages on https://sqs.us-east-1.amazonaws.com/1234567/tst-queue within 120 seconds
                Test:           complete_test
###Message Body####:
sqs.go:125: Deleting message from queue https://sqs.us-east-1.amazonaws.com/1234567/tst-queue()
    sqs.go:119: MissingParameter: The request must contain the parameter ReceiptHandle.
                status code: 400, request id: 4421cdfc-4326-5755-9623-91ca3414ed6f
</code>```

Title: terratest to test SQS

Body:
I am using terratests to test my terraform code.
so, my terraform code setup: SQS which is connected to Lambda and Lambda is the consumer of the SQS Message

so, I would like to test the whole flow, So thought of sending a dummy message to SQS and then read the message, using terratest however I can't read the message as the lambda already consumed it !!! I see cw logs for the lambda and it has consumed the message

can anyone suggest how to test this complete set of flow with terratest?

The testcode for SQS looks like this:

ack_queue_url := terraform.Output(t, terraformOptions, "acknowledgment_queue_url")
    time_out_sec := 120
    test_message := fmt.Sprintf("terratest-test-message-%s", uniqueId)
    aws.SendMessageToQueue(t, awsRegion, ack_queue_url, test_message)
    response := aws.WaitForQueueMessage(t, awsRegion, ack_queue_url, time_out_sec)
    assert.NoError(t, response.Error)
    fmt.Println("###Message Body####:", response.MessageBody)
    aws.DeleteMessageFromQueue(t, awsRegion, ack_queue_url,  response.ReceiptHandle)
    delete_response := aws.WaitForQueueMessage(t, awsRegion, ack_queue_url, time_out_sec)
    assert.Error(t, delete_response.Error, aws.ReceiveMessageTimeout{QueueUrl: ack_queue_url, TimeoutSec: time_out_sec})

the output looks like this:

logger.go:66: "https://sqs.us-east-1.amazonaws.com/1234567/tst-queue"
sqs.go:150: Sending message terratest-test-message-DkKAvt to queue https://sqs.us-east-1.amazonaws.com/1234567/tst-queue
sqs.go:170: Message id b9b0a000-1d71-4821-8659-21aebe33cdc0 sent to queue https://sqs.us-east-1.amazonaws.com/1234567/tst-queue
sqs.go:234: Waiting for message on https://sqs.us-east-1.amazonaws.com/1234567/tst-queue (0s)
sqs.go:234: Waiting for message on https://sqs.us-east-1.amazonaws.com/1234567/tst-queue(20s)
sqs.go:234: Waiting for message on https://sqs.us-east-1.amazonaws.com/1234567/tst-queue (40s)
sqs.go:234: Waiting for message on https://sqs.us-east-1.amazonaws.com/1234567/tst-queue (60s)
sqs.go:234: Waiting for message on https://sqs.us-east-1.amazonaws.com/1234567/tst-queue (80s)
sqs.go:234: Waiting for message on https://sqs.us-east-1.amazonaws.com/1234567/tst-queue (100s)
                Error Trace:    /Users/xxxx/Projects/dummy_test/terratest/complete_test.go:83
                Error:          Received unexpected error:
                                Failed to receive messages on https://sqs.us-east-1.amazonaws.com/1234567/tst-queue within 120 seconds
                Test:           complete_test
###Message Body####:
sqs.go:125: Deleting message from queue https://sqs.us-east-1.amazonaws.com/1234567/tst-queue()
    sqs.go:119: MissingParameter: The request must contain the parameter ReceiptHandle.
                status code: 400, request id: 4421cdfc-4326-5755-9623-91ca3414ed6f


问:
How to set up Basic Authentication with sessionId in ASP.NET Core MVC?
I have an ASP.NET Core MVC application in the front-end and I have a back-end service which is built with ServiceStack. This service has BasicAuth, which requires to send encrypted username+password and if successful it returns the sessionId.

After the authentication this service requires a cookie with the name ss-id and the value of sessionId in order to authorize any further requests. In my application I have a service which is injected into the controllers, I add this service to the service container like this:

```<code>services.AddHttpClient<IMyService,MyService>();
</code>```

Now my problem is that when I add the SessionId as a cookie to the HttpClient, after a few requests the application creates a new instance of it and my cookie is deleted.

I've been trying to solve this for weeks, I've searched everywhere and couldn't find any solution! Please help!

I can save the SessionId into the browser cookies and then manually add it to all HttpClients in my service, but I don't think it's right... I think that somehow in serviceContainer with AddAuthentication or AddAuthorization or AddHttpClient, it should be set up... And when user authenticates it should add this cookie to every request automatically.

Body:
I have an ASP.NET Core MVC application in the front-end and I have a back-end service which is built with ServiceStack. This service has BasicAuth, which requires to send encrypted username+password and if successful it returns the sessionId.

After the authentication this service requires a cookie with the name ss-id and the value of sessionId in order to authorize any further requests. In my application I have a service which is injected into the controllers, I add this service to the service container like this:

services.AddHttpClient<IMyService,MyService>();

Now my problem is that when I add the SessionId as a cookie to the HttpClient, after a few requests the application creates a new instance of it and my cookie is deleted.

I've been trying to solve this for weeks, I've searched everywhere and couldn't find any solution! Please help!

I can save the SessionId into the browser cookies and then manually add it to all HttpClients in my service, but I don't think it's right... I think that somehow in serviceContainer with AddAuthentication or AddAuthorization or AddHttpClient, it should be set up... And when user authenticates it should add this cookie to every request automatically.


问:
Recommendation System using Tensorflow.js and to show the result by Graphql
I've been thinking of an app recommends similar users to a user based on some digitized standards she can choose & change.
Every time the amount of user increases & decreases or the user changes her amount of certain standards, the result of recommendation would change too.

What part of Tensorflow.js I should use for implementing this : NLP or Simply training it with datasets? (I know the question is somewhat random, but my knowledge on tfjs is extremely ambiguous even though I tried sorry)

Can I show the everchanging results to user by subscription of Graphql?

I guess the basic idea is a part of collaborative filtering but..


问:
Rust zip file corruption
I have to zip one folder that has more folders and more files in it, this is the code I have, and its weird, because when I open the .zip file with Winrar or File Explorer, it seems to be a perfectly working .zip file, but when I open the file with 7zip, it appears to be corrupted.

This is the code:

fn walk_dir(path: &str, zip: &mut ZipWriter<File>, options: FileOptions, path_cache: &str) -> io::Result<()> {
    let entries = fs::read_dir(path)?;
    for entry in entries {
        let entry = entry?;
        let entry_path = entry.path();
        let metadata = fs::metadata(&entry_path)?;
        let entry_actual_path = Path::new(path_cache).join(entry.file_name().to_str().unwrap());
        let entry_path_str = entry_path.as_path().to_str().unwrap();
        let entry_actual_path_str = entry_actual_path.as_path().to_str().unwrap();
        if metadata.is_dir() {
            zip.add_directory(entry_actual_path_str, options)?;
            walk_dir(entry_path_str, zip, options, entry_actual_path_str)?;
        } else {
            zip.start_file(entry_actual_path_str, options)?;
            let mut file = File::open(&entry_path)?;
            let mut buffer = BUFFER.lock().unwrap();
            buffer.clear();
            file.read_to_end(&mut buffer)?;
            zip.write_all(&buffer)?;
        }
    }
    Ok(())
}
```

I found out that instead of / or \ in the paths, there are this characters: .

Here are some screenshots:

I'm just trying to create a zip file that works well, but it just wont. I also tried with different compression methods, but none of those works.

Title: Rust zip file corruption

Body:
I have to zip one folder that has more folders and more files in it, this is the code I have, and its weird, because when I open the .zip file with Winrar or File Explorer, it seems to be a perfectly working .zip file, but when I open the file with 7zip, it appears to be corrupted.

This is the code:

fn walk_dir(path: &str, zip: &mut ZipWriter<File>, options: FileOptions, path_cache: &str) -> io::Result<()> {
    let entries = fs::read_dir(path)?;
    for entry in entries {
        let entry = entry?;
        let entry_path = entry.path();
        let metadata = fs::metadata(&entry_path)?;
        let entry_actual_path = Path::new(path_cache).join(entry.file_name().to_str().unwrap());
        let entry_path_str = entry_path.as_path().to_str().unwrap();
        let entry_actual_path_str = entry_actual_path.as_path().to_str().unwrap();
        if metadata.is_dir() {
            zip.add_directory(entry_actual_path_str, options)?;
            walk_dir(entry_path_str, zip, options, entry_actual_path_str)?;
        } else {
            zip.start_file(entry_actual_path_str, options)?;
            let mut file = File::open(&entry_path)?;
            let mut buffer = BUFFER.lock().unwrap();
            buffer.clear();
            file.read_to_end(&mut buffer)?;
            zip.write_all(&buffer)?;
        }
    }
    Ok(())
}

I found out that instead of / or \ in the paths, there are this characters: .

Here are some screenshots:

I'm just trying to create a zip file that works well, but it just wont. I also tried with different compression methods, but none of those works.


问:
Python displays data as errorbar in barplot
I would like to make a barplot of my dataframe 'top30_art' that looks like this:

```<code>,artikelenlijst,count
0, artikel 14 van de Grondwaterwet,40
1, artikel 6.4 van de Waterwet,23
2, artikel 14 van de Grondwaterwet,17
3, artikel 6 van de Wbm,17
4, artikel 7 van de Wet op de waterhuishouding,16
5, artikel 1:2 van de Awb,15
6, artikel 4:84 van de Awb,14
7, artikel 7 van de Wet op de waterhuishouding,14
etc.
</code>```

In my plotting code, I use the following:

sns.barplot(x='count', y='artikelenlijst',
            data=top30_art,label="frequency", color='r')
```
<p>This results in the following plot:</p>
<p><img src="https://i.stack.imgur.com/rjTQX.png" alt="first plot" /></p>
<p>However, as you can see, it is plotting a part of the data as an error bar. For example: the first row of my count column should be <code>40</code> (see the number above), but somehow Python displays only a barplot for a count of 28 and an error bar to display the rest of the count from 28 to 40 in my plot.</p>
<p>To fix this error, I tried to add <code>ci='None'</code>:</p>
<pre class="lang-py prettyprint-override"><code>sns.barplot(x='count', y='artikelenlijst', data=top30_art,label="frequency", color='r', ci=None)
</code>```

This results in the new following plot:

Then you don't see the error bar anymore but it still does not display the right number for the first row: now the bar ends at 28, but it should end at a count of 40.

How can I fix this issue?

Body:
I would like to make a barplot of my dataframe 'top30_art' that looks like this:

,artikelenlijst,count
0, artikel 14 van de Grondwaterwet,40
1, artikel 6.4 van de Waterwet,23
2, artikel 14 van de Grondwaterwet,17
3, artikel 6 van de Wbm,17
4, artikel 7 van de Wet op de waterhuishouding,16
5, artikel 1:2 van de Awb,15
6, artikel 4:84 van de Awb,14
7, artikel 7 van de Wet op de waterhuishouding,14
etc.

In my plotting code, I use the following:

sns.barplot(x='count', y='artikelenlijst',
            data=top30_art,label="frequency", color='r')

This results in the following plot:

However, as you can see, it is plotting a part of the data as an error bar. For example: the first row of my count column should be 40 (see the number above), but somehow Python displays only a barplot for a count of 28 and an error bar to display the rest of the count from 28 to 40 in my plot.

To fix this error, I tried to add ci='None':

sns.barplot(x='count', y='artikelenlijst', data=top30_art,label="frequency", color='r', ci=None)

This results in the new following plot:

Then you don't see the error bar anymore but it still does not display the right number for the first row: now the bar ends at 28, but it should end at a count of 40.

How can I fix this issue?


问:
How to update backend servers dynamically from an ASG while setting up HAProxy as a Load balancer
I have an ASG group in AWS that would run 3-5 instances basis on some parameters. These instances are running Windows servers hosting 3 websites on IIS, and all are running on port 443, which is HTTPS. (All are replicas of one AMI which means only 3 websites are running on all of them to load balance)

Looking at this setup, we are introducing  HAProxy as a load balancer between our customers and the ASG. If the servers were static, then the HAProxy configuration is straightforward and works fine. I can do the load balance by mentioning the IPs of the static servers in the backend section. However, the problem is that since these servers are in ASG, they would scale in and out at anytime. And we want to automate this whole scenario on the HAProxy side.

I learned about DataPlaneApi, which can help in the service discovery of AWS; however, we expected it to work differently. I need help finding the proper documentation or a guide explaining this.

Any help from someone is appreciated.

I'm attaching my sample HAProxy config below:

```<code>  global
  daemon
  chroot /var/lib/haproxy
  user haproxy
  group haproxy
  ca-base /etc/ssl/certs
  crt-base /etc/ssl/private
  stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
  stats socket /var/run/haproxy.sock user haproxy group haproxy mode 660 level admin expose-fd listeners
  stats timeout 30s
  ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
  ssl-default-bind-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
  ssl-default-bind-ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256
  log /dev/log local0
  log /dev/log local1 notice

# Default SSL material locations
# See: https://ssl-config.mozilla.org/#server=haproxy&server-version=2.0.3&config=intermediate
defaults unnamed_defaults_1
  mode http
  log global
  option httplog
  option dontlognull
  timeout connect 5000
  timeout client 50000
  timeout server 50000
  errorfile 400 /etc/haproxy/errors/400.http
  errorfile 403 /etc/haproxy/errors/403.http
  errorfile 408 /etc/haproxy/errors/408.http
  errorfile 500 /etc/haproxy/errors/500.http
  errorfile 502 /etc/haproxy/errors/502.http
  errorfile 503 /etc/haproxy/errors/503.http
  errorfile 504 /etc/haproxy/errors/504.http

# ---------------------------------------------------------------------
# main frontend which proxys to the backends
# ---------------------------------------------------------------------

frontend main
  bind *:80
  bind *:443 ssl crt /etc/haproxy/cl-secret1.pem crt /etc/haproxy/cl-secret2.pem
  acl app1 hdr(host) -i cloud-app1.priv.url
  acl app2 hdr(host) -i cloud-app2.priv.url
  use_backend backend1 if app1
  use_backend backend2 if app2

# ---------------------------------------------------------------------
# round robin balancing between the various backends
# ---------------------------------------------------------------------
backend backend1
  balance source
  server-template srv 1-5 cloud-app1.priv.url:443

backend backend2
  balance source
  server-template srv 6-10 cloud-app2.priv.url:443

</code>```

Summary of what I need:

I want the data plane API to detect the private IP of instances running in ASG. Those should automatically be added to the backend section in runtime and not manually.

Body:
I have an ASG group in AWS that would run 3-5 instances basis on some parameters. These instances are running Windows servers hosting 3 websites on IIS, and all are running on port 443, which is HTTPS. (All are replicas of one AMI which means only 3 websites are running on all of them to load balance)

Looking at this setup, we are introducing  HAProxy as a load balancer between our customers and the ASG. If the servers were static, then the HAProxy configuration is straightforward and works fine. I can do the load balance by mentioning the IPs of the static servers in the backend section. However, the problem is that since these servers are in ASG, they would scale in and out at anytime. And we want to automate this whole scenario on the HAProxy side.

I learned about DataPlaneApi, which can help in the service discovery of AWS; however, we expected it to work differently. I need help finding the proper documentation or a guide explaining this.

Any help from someone is appreciated.

I'm attaching my sample HAProxy config below:

  global
  daemon
  chroot /var/lib/haproxy
  user haproxy
  group haproxy
  ca-base /etc/ssl/certs
  crt-base /etc/ssl/private
  stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
  stats socket /var/run/haproxy.sock user haproxy group haproxy mode 660 level admin expose-fd listeners
  stats timeout 30s
  ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
  ssl-default-bind-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
  ssl-default-bind-ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256
  log /dev/log local0
  log /dev/log local1 notice

# Default SSL material locations
# See: https://ssl-config.mozilla.org/#server=haproxy&server-version=2.0.3&config=intermediate
defaults unnamed_defaults_1
  mode http
  log global
  option httplog
  option dontlognull
  timeout connect 5000
  timeout client 50000
  timeout server 50000
  errorfile 400 /etc/haproxy/errors/400.http
  errorfile 403 /etc/haproxy/errors/403.http
  errorfile 408 /etc/haproxy/errors/408.http
  errorfile 500 /etc/haproxy/errors/500.http
  errorfile 502 /etc/haproxy/errors/502.http
  errorfile 503 /etc/haproxy/errors/503.http
  errorfile 504 /etc/haproxy/errors/504.http

# ---------------------------------------------------------------------
# main frontend which proxys to the backends
# ---------------------------------------------------------------------

frontend main
  bind *:80
  bind *:443 ssl crt /etc/haproxy/cl-secret1.pem crt /etc/haproxy/cl-secret2.pem
  acl app1 hdr(host) -i cloud-app1.priv.url
  acl app2 hdr(host) -i cloud-app2.priv.url
  use_backend backend1 if app1
  use_backend backend2 if app2

# ---------------------------------------------------------------------
# round robin balancing between the various backends
# ---------------------------------------------------------------------
backend backend1
  balance source
  server-template srv 1-5 cloud-app1.priv.url:443

backend backend2
  balance source
  server-template srv 6-10 cloud-app2.priv.url:443

Summary of what I need:

I want the data plane API to detect the private IP of instances running in ASG. Those should automatically be added to the backend section in runtime and not manually.


问:
Download a blob of a XML directly to local storage
I managed to generate a XML file to import in my GoogleDrive like this

```<code>function createXML() {
  var Origine = "Example"

  var xml = '<?xml version="1.0"?>\n';
  xml += '<root>\n';
  xml += '  <element>' + Origine + '</element>\n';
  xml += '</root>\n';

  var blob = Utilities.newBlob(xml, 'application/xml', 'my-xml.xml');

var folder = DriveApp.getFolderById("XXXXXXXXXXXXXXXXXXXXXXXX");
  blob.setName("my-xml.xml");
  folder.createFile(blob);
}
</code>```

But I would like to download this blob as XML file directly on my computer without passing through Google Drive. What could be the easiest solution ?

I tried different method. But I'm not a great coder...

Body:
I managed to generate a XML file to import in my GoogleDrive like this

function createXML() {
  var Origine = "Example"

  var xml = '<?xml version="1.0"?>\n';
  xml += '<root>\n';
  xml += '  <element>' + Origine + '</element>\n';
  xml += '</root>\n';

  var blob = Utilities.newBlob(xml, 'application/xml', 'my-xml.xml');

var folder = DriveApp.getFolderById("XXXXXXXXXXXXXXXXXXXXXXXX");
  blob.setName("my-xml.xml");
  folder.createFile(blob);
}

But I would like to download this blob as XML file directly on my computer without passing through Google Drive. What could be the easiest solution ?

I tried different method. But I'm not a great coder...


问:
Take ownership of Git repository
I have a computer that points to two connected Git repositories.  It's a web site, and the repos are on remote drives (on servers) that I have mapped in Windows.  The live production site is on G:\webroot\, and the development site is on H:\webroot\ with the live site as the source of the dev.  So I make changes on Dev, test, commit, then push them to Live.  I'm using SourceTree as a Git GUI. (NOTE: assume I'm getting specific terminology wrong here. I hope I'm getting the point across okay.)

Now I have a new desktop computer.  Specifically, I started with a laptop, but am moving my main Git setup to a desktop. (I will continue to use the laptop for other things. If I can figure out how to also access these repos from the laptop that would be gravy.)

I've seen lots of Q/A that talks about moving the repository, and you either clone or just plain move the entire folder.  But in my case, I'm not moving the repos at all, I'm just trying to get SourceTree to connect me properly to the existing ones.  I did copy over the Atlassian folders from %appdata%, and that may have been my mistake -- not sure.

If I enter the path as a local repo, I get the following:

'git status' failed with code 128: fatal: detected dubious ownership of repository at " (path).

It talks about adding an exception to my Git config, but I don't really understand what that would actually be doing, or if it's the right thing to do. Looks as though it's just shutting off an error alert(?).

Any help would be appreciated.  It's one of those cases where I struggle to even look it up because I don't know the right terminology to look for.

Title: Take ownership of Git repository


问:
Failed to execute goal net.masterthought:maven-cucumber-reporting:5.0.0:generate
I can't get pretty reports in Selenium Cucumber. JDK version: 11, Maven version: 3.8.7, Operating system: Windows 10 Pro. When I install the project, the console shows BUILD FAILED error.
This is console output:

```<code>"C:\Program Files\Java\jdk-11.0.16.1\bin\java.exe" -Dmaven.multiModuleProjectDirectory=C:\Users\Tarik\IdeaProjects\cucumberKendiCalismam -Djansi.passthrough=true "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.1\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.1\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.1\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.1\lib\idea_rt.jar=64884:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.1\plugins\maven\lib\maven3\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.version=2022.3.1 install
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< org.example:cucumberKendiCalismam >------------------
[INFO] Building cucumberKendiCalismam 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ cucumberKendiCalismam ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Tarik\IdeaProjects\cucumberKendiCalismam\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ cucumberKendiCalismam ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\Tarik\IdeaProjects\cucumberKendiCalismam\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ cucumberKendiCalismam ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ cucumberKendiCalismam ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 14 source files to C:\Users\Tarik\IdeaProjects\cucumberKendiCalismam\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M1:test (default-test) @ cucumberKendiCalismam ---
[WARNING] The parameter forkMode is deprecated since version 2.14. Use forkCount and reuseForks instead.
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running runners.TestRunner2
[INFO] Running runners.TestRunner
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[ERROR] There are test failures.

Please refer to C:\Users\Tarik\IdeaProjects\cucumberKendiCalismam\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
ExecutionException There was an error in the forked process
org.testng.xml.XmlSuite.setParallel(Ljava/lang/String;)V
ExecutionException There was an error in the forked process
org.testng.xml.XmlSuite.setParallel(Ljava/lang/String;)V
org.apache.maven.surefire.booter.SurefireBooterForkException: ExecutionException There was an error in the forked process
org.testng.xml.XmlSuite.setParallel(Ljava/lang/String;)V
ExecutionException There was an error in the forked process
org.testng.xml.XmlSuite.setParallel(Ljava/lang/String;)V
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.awaitResultsDone(ForkStarter.java:511)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.runSuitesForkPerTestSet(ForkStarter.java:458)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:299)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:247)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1149)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:991)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:837)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
org.testng.xml.XmlSuite.setParallel(Ljava/lang/String;)V
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:657)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.access$600(ForkStarter.java:116)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter$2.call(ForkStarter.java:445)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter$2.call(ForkStarter.java:421)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)

[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ cucumberKendiCalismam ---
[INFO] Building jar: C:\Users\Tarik\IdeaProjects\cucumberKendiCalismam\target\cucumberKendiCalismam-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-cucumber-reporting:5.0.0:generate (execution) @ cucumberKendiCalismam ---
[INFO] About to generate Cucumber report.
Oca 09, 2023 11:11:01 ÖS net.masterthought.cucumber.ReportBuilder generateErrorPage
INFO: Unexpected error
net.masterthought.cucumber.ValidationException: None report file was added!
    at net.masterthought.cucumber.ReportParser.parseJsonFiles(ReportParser.java:62)
    at net.masterthought.cucumber.ReportBuilder.generateReports(ReportBuilder.java:88)
    at net.masterthought.cucumber.CucumberReportGeneratorMojo.execute(CucumberReportGeneratorMojo.java:209)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:47)

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.325 s
[INFO] Finished at: 2023-01-09T23:11:01+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.masterthought:maven-cucumber-reporting:5.0.0:generate (execution) on project cucumberKendiCalismam: Error Found:: BUILD FAILED - Check Report For Details -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Process finished with exit code 1

</code>```

This is Runner class:

```<code>package runners;

import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith;

@RunWith(Cucumber.class)
@CucumberOptions(
        plugin = {
                "pretty",
                "html:target/cucumber-reports.html",
                "json:target/json-reports/cucumber.json",
                "junit:target/xml-report/cucumber.xml"},
        features = "src/test/resources/features",
        glue = "stepDefinitions",
        tags = "",
        dryRun = false

)
public class Runner {

}
</code>```

This is pom.xml file:

```<code>    <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.example</groupId>
    <artifactId>cucumberKendiCalismam</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>4.4.0</version>
        </dependency>

        <dependency>
            <groupId>io.github.bonigarcia</groupId>
            <artifactId>webdrivermanager</artifactId>
            <version>5.3.0</version>
        </dependency>

        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>7.9.0</version>
        </dependency>

        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>7.9.0</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>5.2.3</version>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>5.2.3</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>7.7.0</version>
        </dependency>

        <dependency>
            <groupId>com.github.javafaker</groupId>
            <artifactId>javafaker</artifactId>
            <version>1.0.2</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>3.0.0-M1</version>
                <configuration>
                    <testFailureIgnore>true</testFailureIgnore>
                    <skipTests>false</skipTests>
                    <includes>
                        <include>**/runners/*TestRunner*.java</include>
                    </includes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M1</version>
                <configuration>
                    <parallel>classes</parallel>
                    <forkMode>perthread</forkMode>
                    <threadCount>2</threadCount>
                    <reuseForks>false</reuseForks>
                    <argLine>-Duser.language=en</argLine>
                    <argLine>-Xmx1024m</argLine>
                    <argLine>-XX:MaxPermSize=256m</argLine>
                    <argLine>-Dfile.encoding=UTF-8</argLine>
                    <useFile>false</useFile>
                    <includes>
                        <include>**/runners/*TestRunner*.java</include>
                    </includes>
                    <testFailureIgnore>true</testFailureIgnore>
                </configuration>
            </plugin>

            <plugin>
                <groupId>net.masterthought</groupId>
                <artifactId>maven-cucumber-reporting</artifactId>
                <version>5.0.0</version>
                <executions>
                    <execution>
                        <id>execution</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <projectName>cucumber-jvm-example</projectName>
                            <outputDirectory>${project.build.directory}</outputDirectory>
                            <inputDirectory>${project.build.directory}</inputDirectory>
                            <jsonFiles>
                                <param>**/json-reports/*.json</param>
                            </jsonFiles><classificationFiles>->
                            <param>sample.properties</param>
                            <param>other.properties</param>
                        </classificationFiles>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
</code>```

I changed the JDK version, I used different plugins, still the problem is not solved.

Body:
I can't get pretty reports in Selenium Cucumber. JDK version: 11, Maven version: 3.8.7, Operating system: Windows 10 Pro. When I install the project, the console shows BUILD FAILED error.
This is console output:

"C:\Program Files\Java\jdk-11.0.16.1\bin\java.exe" -Dmaven.multiModuleProjectDirectory=C:\Users\Tarik\IdeaProjects\cucumberKendiCalismam -Djansi.passthrough=true "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.1\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.1\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.1\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.1\lib\idea_rt.jar=64884:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.1\plugins\maven\lib\maven3\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.version=2022.3.1 install
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< org.example:cucumberKendiCalismam >------------------
[INFO] Building cucumberKendiCalismam 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ cucumberKendiCalismam ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Tarik\IdeaProjects\cucumberKendiCalismam\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ cucumberKendiCalismam ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\Tarik\IdeaProjects\cucumberKendiCalismam\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ cucumberKendiCalismam ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ cucumberKendiCalismam ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 14 source files to C:\Users\Tarik\IdeaProjects\cucumberKendiCalismam\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M1:test (default-test) @ cucumberKendiCalismam ---
[WARNING] The parameter forkMode is deprecated since version 2.14. Use forkCount and reuseForks instead.
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running runners.TestRunner2
[INFO] Running runners.TestRunner
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[ERROR] There are test failures.

Please refer to C:\Users\Tarik\IdeaProjects\cucumberKendiCalismam\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
ExecutionException There was an error in the forked process
org.testng.xml.XmlSuite.setParallel(Ljava/lang/String;)V
ExecutionException There was an error in the forked process
org.testng.xml.XmlSuite.setParallel(Ljava/lang/String;)V
org.apache.maven.surefire.booter.SurefireBooterForkException: ExecutionException There was an error in the forked process
org.testng.xml.XmlSuite.setParallel(Ljava/lang/String;)V
ExecutionException There was an error in the forked process
org.testng.xml.XmlSuite.setParallel(Ljava/lang/String;)V
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.awaitResultsDone(ForkStarter.java:511)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.runSuitesForkPerTestSet(ForkStarter.java:458)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:299)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:247)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1149)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:991)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:837)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
org.testng.xml.XmlSuite.setParallel(Ljava/lang/String;)V
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:657)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.access$600(ForkStarter.java:116)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter$2.call(ForkStarter.java:445)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter$2.call(ForkStarter.java:421)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)

[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ cucumberKendiCalismam ---
[INFO] Building jar: C:\Users\Tarik\IdeaProjects\cucumberKendiCalismam\target\cucumberKendiCalismam-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-cucumber-reporting:5.0.0:generate (execution) @ cucumberKendiCalismam ---
[INFO] About to generate Cucumber report.
Oca 09, 2023 11:11:01 ÖS net.masterthought.cucumber.ReportBuilder generateErrorPage
INFO: Unexpected error
net.masterthought.cucumber.ValidationException: None report file was added!
    at net.masterthought.cucumber.ReportParser.parseJsonFiles(ReportParser.java:62)
    at net.masterthought.cucumber.ReportBuilder.generateReports(ReportBuilder.java:88)
    at net.masterthought.cucumber.CucumberReportGeneratorMojo.execute(CucumberReportGeneratorMojo.java:209)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:47)

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.325 s
[INFO] Finished at: 2023-01-09T23:11:01+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.masterthought:maven-cucumber-reporting:5.0.0:generate (execution) on project cucumberKendiCalismam: Error Found:: BUILD FAILED - Check Report For Details -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Process finished with exit code 1

This is Runner class:

package runners;

import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith;

@RunWith(Cucumber.class)
@CucumberOptions(
        plugin = {
                "pretty",
                "html:target/cucumber-reports.html",
                "json:target/json-reports/cucumber.json",
                "junit:target/xml-report/cucumber.xml"},
        features = "src/test/resources/features",
        glue = "stepDefinitions",
        tags = "",
        dryRun = false

)
public class Runner {

}

This is pom.xml file:

    <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.example</groupId>
    <artifactId>cucumberKendiCalismam</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>4.4.0</version>
        </dependency>

        <dependency>
            <groupId>io.github.bonigarcia</groupId>
            <artifactId>webdrivermanager</artifactId>
            <version>5.3.0</version>
        </dependency>

        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>7.9.0</version>
        </dependency>

        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>7.9.0</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>5.2.3</version>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>5.2.3</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>7.7.0</version>
        </dependency>

        <dependency>
            <groupId>com.github.javafaker</groupId>
            <artifactId>javafaker</artifactId>
            <version>1.0.2</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>3.0.0-M1</version>
                <configuration>
                    <testFailureIgnore>true</testFailureIgnore>
                    <skipTests>false</skipTests>
                    <includes>
                        <include>**/runners/*TestRunner*.java</include>
                    </includes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M1</version>
                <configuration>
                    <parallel>classes</parallel>
                    <forkMode>perthread</forkMode>
                    <threadCount>2</threadCount>
                    <reuseForks>false</reuseForks>
                    <argLine>-Duser.language=en</argLine>
                    <argLine>-Xmx1024m</argLine>
                    <argLine>-XX:MaxPermSize=256m</argLine>
                    <argLine>-Dfile.encoding=UTF-8</argLine>
                    <useFile>false</useFile>
                    <includes>
                        <include>**/runners/*TestRunner*.java</include>
                    </includes>
                    <testFailureIgnore>true</testFailureIgnore>
                </configuration>
            </plugin>

            <plugin>
                <groupId>net.masterthought</groupId>
                <artifactId>maven-cucumber-reporting</artifactId>
                <version>5.0.0</version>
                <executions>
                    <execution>
                        <id>execution</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <projectName>cucumber-jvm-example</projectName>
                            <outputDirectory>${project.build.directory}</outputDirectory>
                            <inputDirectory>${project.build.directory}</inputDirectory>
                            <jsonFiles>
                                <param>**/json-reports/*.json</param>
                            </jsonFiles><classificationFiles>->
                            <param>sample.properties</param>
                            <param>other.properties</param>
                        </classificationFiles>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

I changed the JDK version, I used different plugins, still the problem is not solved.


问:
R GLM weights implementation /interpretation
Implementing a GLM in R with weights.

I am wondering whether this quote from R Documentation of GLM

Non-NULL weights can be used to indicate that different observations have different dispersions (with the values in weights being inversely proportional to the dispersions); or equivalently, when the elements of weights are positive integers , that each response  is the mean of  unit-weight observations.

means that the log-likelihood is modified in the following way

```<code>\sum_{i} \log f(X_i) \to \sum_{i} w_i \log f(X_i)
</code>```

only when the weights are positive integers?

If this is not possible at all then how do I incorporate weights in the way as described in the formula?

Body:
Implementing a GLM in R with weights.

I am wondering whether this quote from R Documentation of GLM

Non-NULL weights can be used to indicate that different observations have different dispersions (with the values in weights being inversely proportional to the dispersions); or equivalently, when the elements of weights are positive integers , that each response  is the mean of  unit-weight observations.

means that the log-likelihood is modified in the following way

\sum_{i} \log f(X_i) \to \sum_{i} w_i \log f(X_i)

only when the weights are positive integers?

If this is not possible at all then how do I incorporate weights in the way as described in the formula?


问:
Random thumbnail positions on hover of randomly positioned text
I would like that when a user hovers different words, that a random arrangement of thumbnails fades-in.

Some caveats:

thumbs should stay fairly close to the corresponding text.

thumbs can overlap, but not fully.

both the text and the thumb positions should be random on every page refresh

text and thumbs shouldn't fall outside the screen.

should be scalable (i.e.. I will have max. 10 texts and max. 10 thumbs for every text. the thumbs could spread concentrically if need be)

See the image for an example of what I mean:

This is what I have so far:

$("#button").hover(function() {
  $("#div1").toggle();
  $("#div2").toggle();
  $("#div3").toggle();
  $("#div4").toggle();
});```
<pre class="snippet-code-css lang-css prettyprint-override"><code>#button {
  margin-left: 200px;
  margin-top: 200px;
  position: absolute;
}

.thumb {
  height: 100px;
  width: 100px;
  position: absolute;
  display: none;
}

#div1 {
  margin-top: 100px;
  margin-left: 50px;
}

#div2 {
  margin-top: 50px;
  margin-left: 200px;
}

#div3 {
  margin-top: 210px;
  margin-left: 270px;
}

#div4 {
  margin-top: 250px;
  margin-left: 80px;
}</code>```

text

```

Body:
I would like that when a user hovers different words, that a random arrangement of thumbnails fades-in.

Some caveats:

thumbs should stay fairly close to the corresponding text.

thumbs can overlap, but not fully.

both the text and the thumb positions should be random on every page refresh

text and thumbs shouldn't fall outside the screen.

should be scalable (i.e.. I will have max. 10 texts and max. 10 thumbs for every text. the thumbs could spread concentrically if need be)

See the image for an example of what I mean:

This is what I have so far:

$("#button").hover(function() {
  $("#div1").toggle();
  $("#div2").toggle();
  $("#div3").toggle();
  $("#div4").toggle();
});

#button {
  margin-left: 200px;
  margin-top: 200px;
  position: absolute;
}

.thumb {
  height: 100px;
  width: 100px;
  position: absolute;
  display: none;
}

#div1 {
  margin-top: 100px;
  margin-left: 50px;
}

#div2 {
  margin-top: 50px;
  margin-left: 200px;
}

#div3 {
  margin-top: 210px;
  margin-left: 270px;
}

#div4 {
  margin-top: 250px;
  margin-left: 80px;
}

text


问:
Web API and gRPC in the same service
I am trying to build a service that will host both Web API and gRPC endpoints.

Running the service locally and in Azure App Services, the Web API port must stay operating on the default kestrel port of 5000 with gRPC running on a different port.

As soon as gRPC is added, the default port 5000 throws an error 403 even though gRPC is responding on a different and the client is using required host.

```<code>    public static void BootstrapGrpc(this WebApplicationBuilder builder)
    {
        builder.WebHost.ConfigureKestrel(options =>
        {
            var http2 = options.Limits.Http2;
            http2.InitialConnectionWindowSize = 1024 * 1024 * 2; // 2 MB
            http2.InitialStreamWindowSize = 1024 * 1024; // 1 MB

#if DEBUG
            options.ListenAnyIP(5001, listenOptions =>
            {

                listenOptions.Protocols = HttpProtocols.Http1;
                listenOptions.UseHttps();
            });
#endif

            options.ListenAnyIP(8080);
            options.ListenAnyIP(8585, listenOptions =>
            {
                listenOptions.Protocols = HttpProtocols.Http2;
            });
        });

        builder.Services.AddCodeFirstGrpc();

        _isGrpcBootstrapped = true;
    }
</code>```

Title: Web API and gRPC in the same service

Body:
I am trying to build a service that will host both Web API and gRPC endpoints.

Running the service locally and in Azure App Services, the Web API port must stay operating on the default kestrel port of 5000 with gRPC running on a different port.

As soon as gRPC is added, the default port 5000 throws an error 403 even though gRPC is responding on a different and the client is using required host.

    public static void BootstrapGrpc(this WebApplicationBuilder builder)
    {
        builder.WebHost.ConfigureKestrel(options =>
        {
            var http2 = options.Limits.Http2;
            http2.InitialConnectionWindowSize = 1024 * 1024 * 2; // 2 MB
            http2.InitialStreamWindowSize = 1024 * 1024; // 1 MB

#if DEBUG
            options.ListenAnyIP(5001, listenOptions =>
            {

                listenOptions.Protocols = HttpProtocols.Http1;
                listenOptions.UseHttps();
            });
#endif

            options.ListenAnyIP(8080);
            options.ListenAnyIP(8585, listenOptions =>
            {
                listenOptions.Protocols = HttpProtocols.Http2;
            });
        });

        builder.Services.AddCodeFirstGrpc();

        _isGrpcBootstrapped = true;
    }


问:
How to wrap a core data element's attribute in a @Published wrapper?
When creating a Core Data App, is there any way to wrap an attribute of a Core Data element under the @Published wrapper?

When passing elements to different views, I need to make use of the objectWillChange.send() function, but I was wondering if there is a way to reflect changes on elements through the @Published wrapper.

If so, where should one add the @Published wrapper?

Thank you


问:
Can you put a MongoDB multikey index on an subdocument array?
I currently have a assignments collection with the following structure:

```<code>{
  _id:Object("basdfasdfasdfasdf"),
  name:"Entry one",
  ...//other properties
  services:[
    {
      ...//other properties
      workers: [
        {
           name:"John"
        }
      ]
    }
  ]
}
</code>```

Am I able to create a multikey index on workers.name array? This is an array of arrays situation. If this isn't possible I would need to make the services to be it's own collection so we can put a multikey index on the array of service.workers, correct? The reason I don't want services to be it's own collection is so that I wouldn't need to do an aggregation step everytime I want to pull it out of the db.

Thoughts?

Body:
I currently have a assignments collection with the following structure:

{
  _id:Object("basdfasdfasdfasdf"),
  name:"Entry one",
  ...//other properties
  services:[
    {
      ...//other properties
      workers: [
        {
           name:"John"
        }
      ]
    }
  ]
}

Am I able to create a multikey index on workers.name array? This is an array of arrays situation. If this isn't possible I would need to make the services to be it's own collection so we can put a multikey index on the array of service.workers, correct? The reason I don't want services to be it's own collection is so that I wouldn't need to do an aggregation step everytime I want to pull it out of the db.

Thoughts?


问:
Trying to connect the google coral mini OTG data port with a USB Microphone
My team is currently trying to connect a USB microphone namely a Blue Yeti into the OTG data port of the Coral Mini. However, we saw that the coral couldn't recognize the microphone as a device and we have very little idea how we would be able to seize that audio if we establish a connection.

We opted to connect a USB-C hub for connection to the USB-A mic. We were able to see some form of power being directed to it for a moment, but it didn't last long and the system crashed. Requiring us to have to Serial back into the board to reset it and try again.

We're very new to the coral system and would like some feedback on how to go about this a better way. Our goal was to obtain a live audio feed to process a censorship program with machine learning. We have a working machine-learning algorithm with audio snippets we produced ourselves, but this seems to stump us. If it helps, we were able to get the board to recognize a USB mouse through the same USB-hub.


问:
Importing Products from Etsy to Woo commerce
I have an Etsy shop and I want to move to wordpress. I have imported the products. But I am unable to import "Reviews" as Etsy exports review in Json file and after converting it to csv, it is still not in the format that Woo commerce requires. Like there is no column for "Comment ID" "SKU" Product ID. etc. How do I do this?</p>


问:
When is shadow space needed?
I know from MS_Document ,X64 Calling Convention, Caller must Allocates some space for Callee.

but i wrote several codes with calling functions without allocating any shadow space but i did not see any error.

here it is for example [works without any error in Visual studio 2022 and disabled whole program optimization]

```<code>includelib msvcrt.lib
includelib legacy_stdio_definitions.lib

extern _CRT_INIT: proc
extern printf: proc
extern ExitProcess: proc

.data
     msg db "hello world!", 13, 10, 0

.code
main proc
  call _CRT_INIT
  lea rcx,msg
  call printf
  call ExitProcess
main endp
end
</code>```

Title: When is shadow space needed?

Body:
I know from MS_Document ,X64 Calling Convention, Caller must Allocates some space for Callee.

but i wrote several codes with calling functions without allocating any shadow space but i did not see any error.

here it is for example [works without any error in Visual studio 2022 and disabled whole program optimization]

includelib msvcrt.lib
includelib legacy_stdio_definitions.lib

extern _CRT_INIT: proc
extern printf: proc
extern ExitProcess: proc

.data
     msg db "hello world!", 13, 10, 0

.code
main proc
  call _CRT_INIT
  lea rcx,msg
  call printf
  call ExitProcess
main endp
end