问:
PHPUnit : Set value to a protected attribute from abstract class
I have this abstract class:

```<code>abstract class AbstractFilter implements FilterInterface
{
    /**
     * @var string
     */
    protected string $filterExpression;

    /**
     * @return string
     */
    public function getFilterExpression(): string
    {
        return $this->filterExpression;
    }
}
</code>```

I wanted to test getFilterExpression function on PHPUnit, my test file:

```<code>class AbstractFilterTest extends TestCase
{
    /**
     * @return void
     */
    public function testGetFilterExpression(): void
    {
        $exceptedResult = 'foo';
        $mock = $this->getMockForAbstractClass(
            AbstractFilter::class,
            [],
            '',
            false,
            true,
            true,
            ['filterExpression']
        );

        $mock->expects(self::once())->method('filterExpression')->willReturn($exceptedResult);

        $result = $mock->getFilterExpression();
        $this->assertIsString($result);
    }
}
</code>```

I have this error:

Error : Typed property
Lib\Common\DbAccess\Filter\AbstractFilter::$filterExpression must not
be accessed before initialization

Because I can't set a value for filterExpression property.

Is it possible to assign a value to the filterExpression property or do I have to use a concrete test class that extends the abstract class to do my tests (which I don't want to do)?

Thank's in advance,

Body:
I have this abstract class:

abstract class AbstractFilter implements FilterInterface
{
    /**
     * @var string
     */
    protected string $filterExpression;

    /**
     * @return string
     */
    public function getFilterExpression(): string
    {
        return $this->filterExpression;
    }
}

I wanted to test getFilterExpression function on PHPUnit, my test file:

class AbstractFilterTest extends TestCase
{
    /**
     * @return void
     */
    public function testGetFilterExpression(): void
    {
        $exceptedResult = 'foo';
        $mock = $this->getMockForAbstractClass(
            AbstractFilter::class,
            [],
            '',
            false,
            true,
            true,
            ['filterExpression']
        );

        $mock->expects(self::once())->method('filterExpression')->willReturn($exceptedResult);

        $result = $mock->getFilterExpression();
        $this->assertIsString($result);
    }
}

I have this error:

Error : Typed property
Lib\Common\DbAccess\Filter\AbstractFilter::$filterExpression must not
be accessed before initialization

Because I can't set a value for filterExpression property.

Is it possible to assign a value to the filterExpression property or do I have to use a concrete test class that extends the abstract class to do my tests (which I don't want to do)?

Thank's in advance,


来源: stackexchange

问:
jest-mock-extended set property to undefined
Hi is to possible to set a mocked property to undefined somehow?

Interface I want to mock:

export interface IEmail {
  from: string | undefined;
  body: string;
  to: string;
}
```
<p>Code I want to test:</p>
<pre class="lang-js prettyprint-override"><code>async function sendEmail(emailData: IEmail): Promise<void> {
  await this.send({
    emailBody: emailData.body,
    emailBodyFrom: emailData.from || "default_email@mail.com",
    emailTo: emailData.to,
  });
}
</code>```

The test:

```<code>import { mock } from 'jest-mock-extended';

it('should send email', async () => {
    const options = mock<IEmail>({});
  options.from = undefined
  options.to = 'jane.doe@gmail.com'
  mockemailService.send.mockResolvedValueOnce("");
  await emailService.sendEmail(options);
  expect(mockemailService.send).toHaveBeenCalledWith({
    from: 'default_email@mail.com',
    to: 'jane.doe@gmail.com',
  });
});
</code>```

I expect this the send function to have been called with default_email@mail.com but instead it has been called with a mock function causing the test to fail. How can I forcefully set the property from to undefined?

ContentLicense: CC BY-SA 4.0

Body:
Hi is to possible to set a mocked property to undefined somehow?

Interface I want to mock:

export interface IEmail {
  from: string | undefined;
  body: string;
  to: string;
}

Code I want to test:

async function sendEmail(emailData: IEmail): Promise<void> {
  await this.send({
    emailBody: emailData.body,
    emailBodyFrom: emailData.from || "default_email@mail.com",
    emailTo: emailData.to,
  });
}

The test:

import { mock } from 'jest-mock-extended';

it('should send email', async () => {
    const options = mock<IEmail>({});
  options.from = undefined
  options.to = 'jane.doe@gmail.com'
  mockemailService.send.mockResolvedValueOnce("");
  await emailService.sendEmail(options);
  expect(mockemailService.send).toHaveBeenCalledWith({
    from: 'default_email@mail.com',
    to: 'jane.doe@gmail.com',
  });
});

I expect this the send function to have been called with default_email@mail.com but instead it has been called with a mock function causing the test to fail. How can I forcefully set the property from to undefined?


问:
How to create or handle emojis in Android
I'm new here I don't know so much about stack overflow,

Now I'm creating a chatting application where I want to send emojis, I don't know how to create emojis and how to store them in device or in MySQL db. please help me out.

I have searched a lot here but found nothing related to send emoji.


问:
Can the DELETE DML Command be used in conjunction with @@IDENTITY?
Can the DELETE DML Command be used in conjunction with @@IDENTITY?

Looked everywhere to answer this question.


问:
asp .net core app on IIS --> Could not load file or assembly System.Windows.Forms
I have an Asp .Net core project with

```<code><UseWindowsForms>true</UseWindowsForms>
</code>```

Trying to deploy this project to IIS with following settings

```<code> <TargetFramework>net6.0-windows</TargetFramework>
 <SelfContained>false</SelfContained>
</code>```

On the server, asp .net core hosting bundle is installed.

However, when the function which requires windows forms assemblies is called, following error is thrown:

System.IO.FileNotFoundException:Could not load file or assembly 'System.Windows.Forms, >Version=6.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find >the file specified.

EDIT:

So the question is if any component is built on a different version like 6.0.2.0, how is it resolved on IIS ? Do we have to have a redirection file like in old times?

Body:
I have an Asp .Net core project with

<UseWindowsForms>true</UseWindowsForms>

Trying to deploy this project to IIS with following settings

 <TargetFramework>net6.0-windows</TargetFramework>
 <SelfContained>false</SelfContained>

On the server, asp .net core hosting bundle is installed.

However, when the function which requires windows forms assemblies is called, following error is thrown:

System.IO.FileNotFoundException:Could not load file or assembly 'System.Windows.Forms, >Version=6.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find >the file specified.

EDIT:

So the question is if any component is built on a different version like 6.0.2.0, how is it resolved on IIS ? Do we have to have a redirection file like in old times?


问:
When reading from csv to dataframe, with 4 columns no error, with 5 columns Settingwithcopy error when updating df?
It's really weird but I have tried all the solutions shared here so sharing my main code.

```<code>first_df = pd.read_csv(f'C:\\Users\\y\\AlgoTrading\\Algo Live\\Final\\stockpicks\\yy.txt', sep=",",names=['ticker','entry2','entry3','entry4'])
first_df.set_index('ticker',inplace=True)
first_df
</code>```

Now when I update using the below code and it works fine.

```<code>first_df.loc["stock"].entry2 = False
</code>```

No errors, but when I read 5 columns

```<code>first_df = pd.read_csv(f'C:\\Users\\y\\AlgoTrading\\Algo Live\\Final\\stockpicks\\yy.txt', sep=",",names=['ticker','entry2','entry3','entry4','entry5'])
first_df.set_index('ticker',inplace=True)
first_df
</code>```

Now when I update using the below code and it throws error and doesn't update anything in the dataframe.

```<code>first_df.loc["stock"].entry2 = False
</code>```

this is how the file looks

When 4 - OIL,False,True,True
When 5 - SHYAMMETL,True,True,True,2022-12-21 09:55:13.137608

Any help please?

I have tried all the methods I could find, including creating copy and such.

Body:
It's really weird but I have tried all the solutions shared here so sharing my main code.

first_df = pd.read_csv(f'C:\\Users\\y\\AlgoTrading\\Algo Live\\Final\\stockpicks\\yy.txt', sep=",",names=['ticker','entry2','entry3','entry4'])
first_df.set_index('ticker',inplace=True)
first_df

Now when I update using the below code and it works fine.

first_df.loc["stock"].entry2 = False

No errors, but when I read 5 columns

first_df = pd.read_csv(f'C:\\Users\\y\\AlgoTrading\\Algo Live\\Final\\stockpicks\\yy.txt', sep=",",names=['ticker','entry2','entry3','entry4','entry5'])
first_df.set_index('ticker',inplace=True)
first_df

Now when I update using the below code and it throws error and doesn't update anything in the dataframe.

first_df.loc["stock"].entry2 = False

this is how the file looks

When 4 - OIL,False,True,True
When 5 - SHYAMMETL,True,True,True,2022-12-21 09:55:13.137608

Any help please?

I have tried all the methods I could find, including creating copy and such.


问:
How to secure a cloud based POS application?
I am trying to come up with a list of security recommendations /verification standards for a cloud-based POS application.

When moving from a Store server-based Point of Sale (vendor-owned and managed) to a cloud-based POS platform ( own application developed internally ), what are some important application security aspects to review?

I have reviewed OWASP documentation related to this topic but it wasn't helpful.


问:
How can I prevent users access pages directly via url?
I have a get edit button; ,linking to an edit page. My problem is that have noticed user can edit other leave-types by just changing the id on the link; href="https://www.website.com/edit_leave.php?edit=11" rel="nofollow noreferrer">https://www.website.com/edit_leave.php?edit=11.

I have tried adding this script on top of the page:

```<code><?phpif ( $_SERVER['REQUEST_METHOD']=='GET' && realpath(__FILE__) == realpath( $_SERVER['SCRIPT_FILENAME'] ) ) {header( 'HTTP/1.0 403 Forbidden', TRUE, 403 );die( header( 'location: /404.php' ) );}?>.
</code>```

How can i prevent this edit via URL?

Body:
I have a get edit button; ,linking to an edit page. My problem is that have noticed user can edit other leave-types by just changing the id on the link; https://www.website.com/edit_leave.php?edit=11.

I have tried adding this script on top of the page:

<?phpif ( $_SERVER['REQUEST_METHOD']=='GET' && realpath(__FILE__) == realpath( $_SERVER['SCRIPT_FILENAME'] ) ) {header( 'HTTP/1.0 403 Forbidden', TRUE, 403 );die( header( 'location: /404.php' ) );}?>.

How can i prevent this edit via URL?


问:
When I add viewBinding in gradle in Android Studio, it comes an error
when I tried to add viewBinding feature in the gradle file.

I got the following error :

```<code>Could not find androidx.databinding:viewbinding:7.3.1.
Required by:
    project :app
Search in build.gradle files
</code>```

Body:
when I tried to add viewBinding feature in the gradle file.

I got the following error :

Could not find androidx.databinding:viewbinding:7.3.1.
Required by:
    project :app
Search in build.gradle files


问:
inserting image using parameters in R markdown
My image names are the same as the unique ids. I need to insert the image names using the params to batch create 100 files at one go. I am unable to get the image part work. please let me know how do I pass file names for image through params.

```<code>title: Title
subtitle: Subtitle
output: pdf_document
params:
  Unique_ID : '011'
---

![](params$Unique_ID.png)
</code>```

Body:
My image names are the same as the unique ids. I need to insert the image names using the params to batch create 100 files at one go. I am unable to get the image part work. please let me know how do I pass file names for image through params.

title: Title
subtitle: Subtitle
output: pdf_document
params:
  Unique_ID : '011'
---

![](params$Unique_ID.png)


问:
Spring Boot: Configure Spring HTTP Security at Runtime
When the application first runs, I list the path and roles from the database and add them to HttpSecurity.

    @Bean
    public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
        http.csrf().disable().exceptionHandling().authenticationEntryPoint(authEntryPoint).and().sessionManagement()
                .sessionCreationPolicy(SessionCreationPolicy.STATELESS).and().exceptionHandling()
                .accessDeniedHandler(customAccessDeniedHandler).and();

        for (PathAndRoles item : pathAndRolesService.list()) {
            http.authorizeRequests().antMatchers(getMethod(item.getMethod()), item.getPath())
                    .hasAnyRole(item.getPermission().getId().toString()).and();
        }

        http.authorizeRequests().antMatchers(HttpMethod.POST, "/users/login").permitAll().and();
        http.addFilterBefore(jwtAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class);
        return http.build();
    }

```
<p>But I want to add the path and roles I keep in the database to HttpSecurity while the application is running in Spring Boot.
In other words, when there is a change in the path and the role of the path in the database, I want to transfer these changes to HttpSecurity without restarting the application.  How do I do this?</p>
<p>I tried the following but I didn't see any change.</p>
<pre class="lang-java prettyprint-override"><code>    @Autowired
    HttpSecurity http;

    @GetMapping("/change")

    public DataResult<Boolean> change(){
        for (PathAndRoles item : pathAndRolesService.list()) {
            http.authorizeRequests().antMatchers(getMethod(item.getMethod()), item.getPath())
                    .hasAnyRole(item.getPermission().getId().toString()).and();
        }
        return new SuccessDataResult<Boolean>(true,"Success",200)
    }
</code>```

Body:
When the application first runs, I list the path and roles from the database and add them to HttpSecurity.

    @Bean
    public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
        http.csrf().disable().exceptionHandling().authenticationEntryPoint(authEntryPoint).and().sessionManagement()
                .sessionCreationPolicy(SessionCreationPolicy.STATELESS).and().exceptionHandling()
                .accessDeniedHandler(customAccessDeniedHandler).and();

        for (PathAndRoles item : pathAndRolesService.list()) {
            http.authorizeRequests().antMatchers(getMethod(item.getMethod()), item.getPath())
                    .hasAnyRole(item.getPermission().getId().toString()).and();
        }

        http.authorizeRequests().antMatchers(HttpMethod.POST, "/users/login").permitAll().and();
        http.addFilterBefore(jwtAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class);
        return http.build();
    }

But I want to add the path and roles I keep in the database to HttpSecurity while the application is running in Spring Boot.
In other words, when there is a change in the path and the role of the path in the database, I want to transfer these changes to HttpSecurity without restarting the application.  How do I do this?

I tried the following but I didn't see any change.

    @Autowired
    HttpSecurity http;

    @GetMapping("/change")

    public DataResult<Boolean> change(){
        for (PathAndRoles item : pathAndRolesService.list()) {
            http.authorizeRequests().antMatchers(getMethod(item.getMethod()), item.getPath())
                    .hasAnyRole(item.getPermission().getId().toString()).and();
        }
        return new SuccessDataResult<Boolean>(true,"Success",200)
    }


问:
Private npm package is picking up old value for config variable even after mutating it
I am using node-config in my express.js project. In the test file, I mutated the value for a test config variable. It is getting changed successfully as it is returning new value on logging it in the test file. But my private npm package which is using the config variable still picks up the old value. The package picks up the values of config variables at the time of build of the project only. Changing of config variables after that does not affect the already picked-up config values by package. So, how to reflect the changed values in the package?</p>


问:
How to add value to pointer to array
I have 2 arrays of char in int, to count symbols in text. I definitely have to use char and int, no map.

```<code>int* counterCPU = new int[256]{ 0 };
char *cstrCPU = new char[book.length() + 1];
strcpy(cstrCPU, book.c_str());

CountCPURealisation(cstrCPU, counterCPU);
</code>```
```<code>void CountCPURealisation(char* book, int* counter)
{
    int lenght = strlen(book);
    for (int i = 0; i < lenght; i++) {
        counter[book[i]]++;
    }
}
</code>```

but when I try to run the code, i got an error:

0xC0000005: Access violation reading location

For this line: counter[book[i]]++;

I tried to use & instead of * but it didnt work. Hate c++, could you point me out to an error?

Title: How to add value to pointer to array

Body:
I have 2 arrays of char in int, to count symbols in text. I definitely have to use char and int, no map.

int* counterCPU = new int[256]{ 0 };
char *cstrCPU = new char[book.length() + 1];
strcpy(cstrCPU, book.c_str());

CountCPURealisation(cstrCPU, counterCPU);

void CountCPURealisation(char* book, int* counter)
{
    int lenght = strlen(book);
    for (int i = 0; i < lenght; i++) {
        counter[book[i]]++;
    }
}

but when I try to run the code, i got an error:

0xC0000005: Access violation reading location

For this line: counter[book[i]]++;

I tried to use & instead of * but it didnt work. Hate c++, could you point me out to an error?


问:
How to record video and audio(both mic and speaker) audio using ffmpeg?
I am facing error when i try to record both audio MIC and SPEAKER new i need need command for record video and audio(both mic and speaker).

Tried bwlow command

ffmpeg -f dshow -i audio="Headset Microphone (Plantronics Blackwire 3225 Series)" -f dshow -i audio="virtual-audio-capturer" -f gdigrab -framerate 10 -video_size 1920x1080 -draw_mouse 1 -i desktop -map 2 -map 0 -map 1 screen.avi

but its not working its throughing some error.


问:
I'm getting an error saying: 'no matching function for call to 'swapping(ll [n][n], ll&, ll&)' while running the code to solve a cp question
Here is the code, it gives me an error on calling the function

I have tried to pass a 2d array with unspecified size to a function and now I'm having a problem in calling the function.
The problem aims at swapping some columns and rows with others.

```<code>
ll x,y;
template <size_t n>
void swapping( ll (&arr)[n][n], ll x, ll y)
{
    for (size_t i = 0; i < n; i++)
    {
        swap(arr[x][i], arr[y][i]);
    }
    for (size_t i = 0; i < n; i++)
    {
        swap(arr[i][x], arr[i][y]);
    }
}

int main ()
{
   Fast_Code();
   ll t = 1; //cin>>t;
   while (t--)
   {

 ll n,x,y;
    cin>>n>>x>>y;
    ll ar[n][n];
    for (ll i = 0; i < n; i++)
    {
        for (ll j = 0; j < n; j++)
        {
            cin>>ar[i][j];
        }
    }
    swapping(ar,x,y);

</code>```

}

}

```<code>
</code>```

Body:
Here is the code, it gives me an error on calling the function

I have tried to pass a 2d array with unspecified size to a function and now I'm having a problem in calling the function.
The problem aims at swapping some columns and rows with others.

ll x,y;
template <size_t n>
void swapping( ll (&arr)[n][n], ll x, ll y)
{
    for (size_t i = 0; i < n; i++)
    {
        swap(arr[x][i], arr[y][i]);
    }
    for (size_t i = 0; i < n; i++)
    {
        swap(arr[i][x], arr[i][y]);
    }
}

int main ()
{
   Fast_Code();
   ll t = 1; //cin>>t;
   while (t--)
   {

 ll n,x,y;
    cin>>n>>x>>y;
    ll ar[n][n];
    for (ll i = 0; i < n; i++)
    {
        for (ll j = 0; j < n; j++)
        {
            cin>>ar[i][j];
        }
    }
    swapping(ar,x,y);

}

}


问:
Restore composable view in navcontroller like fragment/activity
How to restore or save the previous composable view data when pressed back or closed the next composable view in NAV CONTROLLER ?
EditText data is getting blank when returened to same view again.

A > B > C
Suppose if B is having EditText and written something in that, then when pressing back from C its returned to B but its recreated and when added a lifecycle its showing onCreate again.

```<code>
@Composable
fun B(){

ComposableLifecycle() { source, event ->
            Log.i("TAG", "lifecycle: $event") //showing ON_CREATE, ON_START and ON_RESUME when coming back.
            when (event) {
                Lifecycle.Event.ON_CREATE -> {
                    viewModel.getState()
                }
            }
        }

}

@Composable
fun ComposableLifecycle(
    lifeCycleOwner: LifecycleOwner = LocalLifecycleOwner.current,
    onEvent: (LifecycleOwner, Lifecycle.Event) -> Unit
) {
    DisposableEffect(lifeCycleOwner) {
        val observer = LifecycleEventObserver { source, event ->
            onEvent(source, event)
        }
        lifeCycleOwner.lifecycle.addObserver(observer)
        onDispose {
            lifeCycleOwner.lifecycle.removeObserver(observer)
        }
    }
}

</code>```

Body:
How to restore or save the previous composable view data when pressed back or closed the next composable view in NAV CONTROLLER ?
EditText data is getting blank when returened to same view again.

A > B > C
Suppose if B is having EditText and written something in that, then when pressing back from C its returned to B but its recreated and when added a lifecycle its showing onCreate again.

@Composable
fun B(){

ComposableLifecycle() { source, event ->
            Log.i("TAG", "lifecycle: $event") //showing ON_CREATE, ON_START and ON_RESUME when coming back.
            when (event) {
                Lifecycle.Event.ON_CREATE -> {
                    viewModel.getState()
                }
            }
        }

}

@Composable
fun ComposableLifecycle(
    lifeCycleOwner: LifecycleOwner = LocalLifecycleOwner.current,
    onEvent: (LifecycleOwner, Lifecycle.Event) -> Unit
) {
    DisposableEffect(lifeCycleOwner) {
        val observer = LifecycleEventObserver { source, event ->
            onEvent(source, event)
        }
        lifeCycleOwner.lifecycle.addObserver(observer)
        onDispose {
            lifeCycleOwner.lifecycle.removeObserver(observer)
        }
    }
}


问:
can tauri open the terminal with a default command
Im trying to make a tauri desktop app open a terminal with a default command. Then its up to the user to press enter/return after opening the terminal.

is that possible?

example command

```<code>$ curl -XGET test.domain -ou test.sh
</code>```

Body:
Im trying to make a tauri desktop app open a terminal with a default command. Then its up to the user to press enter/return after opening the terminal.

is that possible?

example command

$ curl -XGET test.domain -ou test.sh


问:
Python LEGB lookup
I think I have misunderstood Python LEGB lookup principle. So, at first just hear my understanding.

If python interpreter encounters a variable name it at first looks for it in Local scope, if not found then in Enclosing scope, if still not found then in Global and if not found then at last in Builtin scope.

It behaves as such for the following code:

```<code>x = 10
def myfunc():
    print(x)
</code>```

Running myfunc function will print out 10. Python finds the variable x in Global scope.

But problem arises for the following code:

```<code>x = 10
def myfunc():
    x = x * 2
    print(x)
</code>```

Now running myfunc function will cause UnboundLocalError.
Why can't python interpreter utilise the LEGB lookup here and print 20?
I know that in assignment statements python evaluates the right side expression at first. So, here python should search for x, find it in global scope, evaluate the expression x * 2 and attach the name x for this value 20.
I am surely missing some simple points here.

Title: Python LEGB lookup

Body:
I think I have misunderstood Python LEGB lookup principle. So, at first just hear my understanding.

If python interpreter encounters a variable name it at first looks for it in Local scope, if not found then in Enclosing scope, if still not found then in Global and if not found then at last in Builtin scope.

It behaves as such for the following code:

x = 10
def myfunc():
    print(x)

Running myfunc function will print out 10. Python finds the variable x in Global scope.

But problem arises for the following code:

x = 10
def myfunc():
    x = x * 2
    print(x)

Now running myfunc function will cause UnboundLocalError.
Why can't python interpreter utilise the LEGB lookup here and print 20?
I know that in assignment statements python evaluates the right side expression at first. So, here python should search for x, find it in global scope, evaluate the expression x * 2 and attach the name x for this value 20.
I am surely missing some simple points here.


问:
write a python program to fliter a dictionary based on values
we should write a python program that will filter the dictionary on basis of the values which are multiples of 5. the keys and values of dictionary should be taken as input from the user.

first we should print keys of dictionary then we should print values of the dictionary and then the total dictionary and then the the filtered dictionary where the values are the multiples of 5 should be printed on the next line.
expected output
keys: (input keys)
values: (input values)
total dictionary
filtered dictionary


问:
All tests that are run are exiting with code 0 (0x0) After Upgrading my .Net Framework and Maqs version
I recently updated my code with following -

.Net framework from 4.6.2 -> 4.7.1
CognizantSoftvision.Maqs 5.8.2 -> 9.0.3
Nunit Adapter 4.3.1
Current Visual Studio version - 2019 - Version 16.11.22.

Test cases coding is same as previous but after this framework and nuget package update, when I Run or Debug test case its getting existed with below error-
The program ‘[19608] testhost.net472.x86.exe: Program Trace’ has exited with code 0 (0x0).
The program ‘[19608] testhost.net472.x86.exe’ has exited with code 0 (0x0).

Please see below complete output shown after test case execution exited -

‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\testhost.net472.x86.exe’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Microsoft.TestPlatform.CoreUtilities.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Microsoft.TestPlatform.PlatformAbstractions.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Microsoft.TestPlatform.CrossPlatEngine.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Microsoft.TestPlatform.CommunicationUtilities.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Microsoft.VisualStudio.TestPlatform.Common.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Newtonsoft.Json.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.Cci.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.InteropServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.InteropServices.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Collections\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Collections.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.TestPlatform.Extensions.BlameDataCollector.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.TestPlatform.Extensions.EventLogCollector.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.TestPlatform.TestHostRuntimeProvider.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Microsoft.VisualStudio.ArchitectureTools.PEReader.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.Coverage.Core.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\netstandard\v4.0_2.0.0.0__cc7b13ffcd2ddd51\netstandard.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ValueTuple\v4.0_4.0.0.0__cc7b13ffcd2ddd51\System.ValueTuple.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.Coverage.Instrumentation.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\System.Reflection.Metadata.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\System.Collections.Immutable.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.Coverage.Interprocess.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.InteropServices.RuntimeInformation\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.InteropServices.RuntimeInformation.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.Fakes.DataCollector.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.CodedWebTestAdapter.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.TmiAdapter.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Microsoft.VisualStudio.QualityTools.Common.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.GenericTestAdapter.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.OrderedTestAdapter.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.VSTestIntegration.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.WebTestAdapter.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.TestTools.CppUnitTestFramework.ComInterfaces.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.TestTools.CppUnitTestFramework.CppUnitTestExtension.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.Composition\v4.0_4.0.0.0__b77a5c561934e089\System.ComponentModel.Composition.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.TestTools.DataCollection.MediaRecorder.Model.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.TestTools.DataCollection.VideoRecorderCollector.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.TraceDataCollector.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Microsoft.IntelliTrace.Core.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Mono.Cecil.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Extensions\Mono.Cecil.Pdb.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Users\bagulsb\Source\Repos\MyTurf_Sitecore\MyTurfAutomation\packages\NUnit3TestAdapter.4.3.1\build\net35\NUnit3.TestAdapter.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Users\bagulsb\Source\Repos\MyTurf_Sitecore\MyTurfAutomation\packages\NUnit3TestAdapter.4.3.1\build\net35\nunit.engine.api.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\NuGet.Frameworks.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IO\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.IO.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Reflection\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Reflection.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IO.FileSystem\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.IO.FileSystem.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IO.MemoryMappedFiles\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.IO.MemoryMappedFiles.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Handles\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Handles.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Reflection.Extensions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Reflection.Extensions.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Threading\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Threading.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Text.Encoding\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Text.Encoding.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Extensions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Extensions.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Microsoft.VisualStudio.QualityTools.ExecutionCommon.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Microsoft.VisualStudio.QualityTools.Resource.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Microsoft.VisualStudio.QualityTools.WebTestFramework.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: Domain 2): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: Dependency finder domain): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: Domain 2): Unloaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll’
‘testhost.net472.x86.exe’ (CLR v4.0.30319: Dependency finder domain): Unloaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll’
The thread 0xcdc has exited with code 0 (0x0).
‘testhost.net472.x86.exe’ (CLR v4.0.30319: Domain 3): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: Dependency finder domain): Loaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: Domain 3): Unloaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll’
‘testhost.net472.x86.exe’ (CLR v4.0.30319: Dependency finder domain): Unloaded ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll’
The thread 0x5ac0 has exited with code 0 (0x0).
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Users\bagulsb\Source\Repos\MyTurf_Sitecore\MyTurfAutomation\packages\NUnit3TestAdapter.4.3.1\build\net35\nunit.engine.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Users\bagulsb\Source\Repos\MyTurf_Sitecore\MyTurfAutomation\packages\NUnit3TestAdapter.4.3.1\build\net35\nunit.engine.core.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Remoting\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: testhost.net472.x86.exe): Loaded ‘C:\Users\bagulsb\Source\Repos\MyTurf_Sitecore\MyTurfAutomation\packages\NUnit3TestAdapter.4.3.1\build\net35\testcentric.engine.metadata.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: Domain 4): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testhost.net472.x86.exe’ (CLR v4.0.30319: Domain 4): Unloaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll’
The thread 0x190c has exited with code 0 (0x0).
The thread 0x67b0 has exited with code 0 (0x0).
The thread 0x6558 has exited with code 0 (0x0).
The thread 0x2bac has exited with code 0 (0x0).
The program ‘[19608] testhost.net472.x86.exe: Program Trace’ has exited with code 0 (0x0).
The program ‘[19608] testhost.net472.x86.exe’ has exited with code 0 (0x0).

I tried multiple solutions available over internet and none of them worked so far


问:
Creating the same distribution
Dears, I have some target and control groups, target is 100,000 and control is 10,000. The both are representive to each others based on predious month ARPU of users. Target groups received discount on the products, 4000 users from target bought it. Now, I need to analysing it, how can I create the same distribution in control group to 4000 users that bought it?

I expected tp create the same distribution in control group like users that bought products based on the previous month ARPU of users. So, people who bought and people in control group have same mean and std of previous month

Title: Creating the same distribution


问:
Ionic Vue components get stack on top of each other when using router
I have a problem, where when I use Vue Router for navigation, components don't disappear, the new one just places on top of old one.

My router file

```<code>import {createRouter, createWebHistory} from '@ionic/vue-router';
import {RouteRecordRaw} from 'vue-router';
import {AuthManager} from "@/functions/AuthManager";
import HomePage from '@/views/MainPage.vue';
import LoginScreen from '@/views/auth/LoginScreen.vue';
import component from "*.vue";
import RegistrationScreen from "@/views/auth/RegistrationScreen.vue";
import MainPage from "@/views/MainPage.vue";

const routes: Array<RouteRecordRaw> = [
    {
        path: '',
        redirect: '/homepage',
    },
    {
        path: '/login',
        name: 'Login',
        component: LoginScreen,
        meta: {
            requiresAuth: false
        }
    },
    {
        path: '/register',
        name: 'Register',
        component: RegistrationScreen,
        meta: {
            requiresAuth: false
        }
    },
    {
        path: '/home',
        name: 'MainPage',
        component: MainPage,
        meta: {
            requiresAuth: true
        }
    }
]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes,
})
//code from https://stackoverflow.com/a/52663166 and modified to fit my needs
router.beforeEach(async (to, from, next) => {
    if (to.matched.some(record => record.meta.requiresAuth)) {
        // this route requires auth, check if logged in
        // if not, redirect to login page.
        if (!await AuthManager.isLoggedIn() && to.name != "Login") {
            next({name: 'Login', hash: '#forced'});
        } else if ((to.name == "Login" || to.name == "Register") && await AuthManager.isLoggedIn()) {
            next({name: 'Homepage'});
        } else {
            next() // go to wherever I'm going
        }
    } else {
        next() // does not require auth, make sure to always call next()!
    }
})

export default router

</code>```

How I navigate

```<code><ion-text @click="() => router().push('/register')" style="cursor: pointer" class="ion-padding-top">Nemáte účet? Zaregistrujte se</ion-text>
</code>```

Image of components stacked on top of each other

I can't find a way to make old component disappear. Where Am I doing something wrong?

Body:
I have a problem, where when I use Vue Router for navigation, components don't disappear, the new one just places on top of old one.

My router file

import {createRouter, createWebHistory} from '@ionic/vue-router';
import {RouteRecordRaw} from 'vue-router';
import {AuthManager} from "@/functions/AuthManager";
import HomePage from '@/views/MainPage.vue';
import LoginScreen from '@/views/auth/LoginScreen.vue';
import component from "*.vue";
import RegistrationScreen from "@/views/auth/RegistrationScreen.vue";
import MainPage from "@/views/MainPage.vue";

const routes: Array<RouteRecordRaw> = [
    {
        path: '',
        redirect: '/homepage',
    },
    {
        path: '/login',
        name: 'Login',
        component: LoginScreen,
        meta: {
            requiresAuth: false
        }
    },
    {
        path: '/register',
        name: 'Register',
        component: RegistrationScreen,
        meta: {
            requiresAuth: false
        }
    },
    {
        path: '/home',
        name: 'MainPage',
        component: MainPage,
        meta: {
            requiresAuth: true
        }
    }
]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes,
})
//code from https://stackoverflow.com/a/52663166 and modified to fit my needs
router.beforeEach(async (to, from, next) => {
    if (to.matched.some(record => record.meta.requiresAuth)) {
        // this route requires auth, check if logged in
        // if not, redirect to login page.
        if (!await AuthManager.isLoggedIn() && to.name != "Login") {
            next({name: 'Login', hash: '#forced'});
        } else if ((to.name == "Login" || to.name == "Register") && await AuthManager.isLoggedIn()) {
            next({name: 'Homepage'});
        } else {
            next() // go to wherever I'm going
        }
    } else {
        next() // does not require auth, make sure to always call next()!
    }
})

export default router

How I navigate

<ion-text @click="() => router().push('/register')" style="cursor: pointer" class="ion-padding-top">Nemáte účet? Zaregistrujte se</ion-text>

Image of components stacked on top of each other

I can't find a way to make old component disappear. Where Am I doing something wrong?


问:
Dynamic Text view Adroid Game
I wanted to have a textview that will show the money of the player. But
myMoneyTextView.setText(String.valueOf(acc.getMoney))

doesn't update it I need to reopen the intent to see those changes. I want to change it when the player spend or gain money.

EDIT.

```<code>  private SubsamplingScaleImageView imageView;
private CustomButton up, down, menu, employ, sales, social, schedule, chart, states, mail;
private TextView comMon, comName;
private DataBase db;

Handler handler = new Handler(Looper.getMainLooper());

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.game_screen);
    officeRender();
    updateGame();
    butThread thread = new butThread();
    new Thread(thread).start();
</code>```

comName = findViewById(R.id.companyname);
comMon = findViewById(R.id.money);

```<code>}
public void updateGame() {
    handler.post(new Runnable() {
        @Override
        public void run() {

            db = new DataBase(GameScreen.this);
            Account acc = db.getAcc();
            comName.setText(acc.getName() + " Ent.");

            String mon = String.valueOf(acc.getMoney());

            if (acc.getMoney() < 100000) {
                comMon.setText(mon);
            }
            else if (acc.getMoney() >= 100000) {
                comMon.setText(mon.substring(0, 3) + "k");
            }
            else if (acc.getMoney() >= 1000000) {
                comMon.setText(mon.substring(0, 3) + "m");
            }

        }
    });
</code>```

Title: Dynamic Text view Adroid Game

Body:
I wanted to have a textview that will show the money of the player. But
myMoneyTextView.setText(String.valueOf(acc.getMoney))

doesn't update it I need to reopen the intent to see those changes. I want to change it when the player spend or gain money.

EDIT.

  private SubsamplingScaleImageView imageView;
private CustomButton up, down, menu, employ, sales, social, schedule, chart, states, mail;
private TextView comMon, comName;
private DataBase db;

Handler handler = new Handler(Looper.getMainLooper());

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.game_screen);
    officeRender();
    updateGame();
    butThread thread = new butThread();
    new Thread(thread).start();

comName = findViewById(R.id.companyname);
comMon = findViewById(R.id.money);

}
public void updateGame() {
    handler.post(new Runnable() {
        @Override
        public void run() {

            db = new DataBase(GameScreen.this);
            Account acc = db.getAcc();
            comName.setText(acc.getName() + " Ent.");

            String mon = String.valueOf(acc.getMoney());

            if (acc.getMoney() < 100000) {
                comMon.setText(mon);
            }
            else if (acc.getMoney() >= 100000) {
                comMon.setText(mon.substring(0, 3) + "k");
            }
            else if (acc.getMoney() >= 1000000) {
                comMon.setText(mon.substring(0, 3) + "m");
            }

        }
    });


问:
Bidirectional communication between respberry pi's via socket (python3)
I got 50% of this to work - pi #1 acts as the server and sends messages to the client (pi #2).

But how can it RECEIVE information back from the client?

Basically, the issue I'm having is that pi #1 needs to receive commands from pi #2 as well.

SERVER.py

```<code>import socket
import time

print("This is pizero2 as server.")

# REMOTE SETUP as SERVER
addresses = {
    'littlechefee': {'ip': '192.168.39.242','port': 5003}, # pi4-one pi4 L wall .. liqs
    }
sockets = []
i = 0
for addr in addresses:
    ip = addresses[addr]['ip']
    port = addresses[addr]['port']
    sockets.append(socket.socket(socket.AF_INET, socket.SOCK_STREAM))
    sockets[i].setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    try:
        sockets[i].connect((ip,port))
        print(f'Success, connected with {addr}. ')
    except:
        print("Unable to Connect Rpi with IP: {} and Port: {}".format(ip,port ))
    i += 1

def send():
    command = 'test from pizero2'
    indx = 0                                # bc only 1 remote pi
    print(f"Sending littlechefee a cmd.")
    try:
        sockets[indx].sendall(str(command).encode('utf-8'))
    except:
        print('Unable to send command! Invalid options')

while True:
    send()
</code>```

CLIENT.py

```<code>import socket
import time

# REMOTE SETUP as CLIENT
rcv_ip = '192.168.39.46' # Please insert the receiver own ip (ip of rpi on which this script is running.) Example : '192.268.xx.xx'
rcv_port = 5002 # please use 5001 upto 5006 for different rpi's

sock_rcv = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock_rcv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
sock_rcv.bind((rcv_ip,rcv_port))
sock_rcv.listen(10)

def get_data():
    dt_r, adr_r  = sock_rcv.accept()
    while True:
        cmd = dt_r.recv(1024)
        if cmd:
            cmd = cmd.decode('utf-8')   # str = ['dispense', [13, 6, 13], 50]
            cmd = cmd.split(' ')  # lst = ["['dispense',", '[13,', '6,', '13],', '50]']
            print("cmd is: ", cmd)          # cmd = ["['nema',", "'W',", "'5',", '3000]']

        else:
            print("Connection closed.")
            break

        time.sleep(1)

while True:
    get_data()
</code>```

Body:
I got 50% of this to work - pi #1 acts as the server and sends messages to the client (pi #2).

But how can it RECEIVE information back from the client?

Basically, the issue I'm having is that pi #1 needs to receive commands from pi #2 as well.

SERVER.py

import socket
import time

print("This is pizero2 as server.")

# REMOTE SETUP as SERVER
addresses = {
    'littlechefee': {'ip': '192.168.39.242','port': 5003}, # pi4-one pi4 L wall .. liqs
    }
sockets = []
i = 0
for addr in addresses:
    ip = addresses[addr]['ip']
    port = addresses[addr]['port']
    sockets.append(socket.socket(socket.AF_INET, socket.SOCK_STREAM))
    sockets[i].setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    try:
        sockets[i].connect((ip,port))
        print(f'Success, connected with {addr}. ')
    except:
        print("Unable to Connect Rpi with IP: {} and Port: {}".format(ip,port ))
    i += 1

def send():
    command = 'test from pizero2'
    indx = 0                                # bc only 1 remote pi
    print(f"Sending littlechefee a cmd.")
    try:
        sockets[indx].sendall(str(command).encode('utf-8'))
    except:
        print('Unable to send command! Invalid options')

while True:
    send()

CLIENT.py

import socket
import time

# REMOTE SETUP as CLIENT
rcv_ip = '192.168.39.46' # Please insert the receiver own ip (ip of rpi on which this script is running.) Example : '192.268.xx.xx'
rcv_port = 5002 # please use 5001 upto 5006 for different rpi's

sock_rcv = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock_rcv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
sock_rcv.bind((rcv_ip,rcv_port))
sock_rcv.listen(10)

def get_data():
    dt_r, adr_r  = sock_rcv.accept()
    while True:
        cmd = dt_r.recv(1024)
        if cmd:
            cmd = cmd.decode('utf-8')   # str = ['dispense', [13, 6, 13], 50]
            cmd = cmd.split(' ')  # lst = ["['dispense',", '[13,', '6,', '13],', '50]']
            print("cmd is: ", cmd)          # cmd = ["['nema',", "'W',", "'5',", '3000]']

        else:
            print("Connection closed.")
            break

        time.sleep(1)

while True:
    get_data()


问:
PageLatch_EX and PageLatch_SH on non-clustered index
We have two tables which receive 1 million+ insertions per minute. This table is heavily indexed, which also can’t be removed to support business requirements. Due to such high volume of insertions, we are seeing PAGELATCH_EX and PAGELATCH_SH. These locks further slowdown insertions.

I could solve that using approach described in Removing PAGELATCH with randomized ID instead of GUID

My real question is:

One of nonclustered indexes on table is based on record insertion date henceforth that is also inserting sequential data. We see PAGELATCH_EX and PAGELATCH_SH because page gets locked due to insertion of sequential data. But why am I not seeing PAGELATCH_EX and PAGELATCH_SH on non clustered index with sequential keys?


问:
Custom Function to detect return type(SOAP,XML,FLAT FILE in custom format) and apply custom logic C#
I need to write a function which applies custom logic to retrieve data from the return type there are 3 type of return types I get
SOAP,
XML,
FLAT FILE (eg. Staring with ABC),
FLAT FILE (eg. Staring with XYZ).

For now I am trying to get the start string and then detect the return type. I need a better way to do it as I will need to check other flat file formats in the future.

As of now i am putting it in a IF else condition.

`

```<code> string body = GetMessage();
                        string startStr = body.Substring(0, Math.Min(body.Length, 5)).ToUpper();
                        XDocument xml = null;

                        if (!string.IsNullOrEmpty(body))
                        {
                            try
                            {

                                if (startStr == "<SOAP")
                                {
                                    xml = XDocument.Parse(body);
                                    string senderInfo = string.Empty;
                                    string receiverInfo = string.Empty;
                                    XElement senderQ = xml.Root.Descendants().Where(x => x.Name.LocalName == "_SENDERQ_").FirstOrDefault();
                                    XElement receiverQ= xml.Root.Descendants().Where(x => x.Name.LocalName == "_RECEIVERQ").FirstOrDefault();
                                    XElement senderId = xml.Root.Descendants().Where(x => x.Name.LocalName == "_SENDERID_").FirstOrDefault();
                                    XElement receiverId = xml.Root.Descendants().Where(x => x.Name.LocalName == "_RECEIVERID_").FirstOrDefault();

                                    if (senderId != null)
                                    {
                                        senderInfo = senderId.Value.Trim();
                                    }
                                    if (senderQ != null)
                                    {
                                        senderInfo += " : " + senderQ.Value.Trim();
                                    }
                                    if (receiverId != null)
                                    {
                                        receiverInfo = receiverId.Value.Trim();
                                    }
                                    if (receiverQ != null)
                                    {
                                        receiverInfo += " : " + receiver.Value.Trim();
                                    }
                                    if (!String.IsNullOrEmpty(senderInfo) && !String.IsNullOrEmpty(receiverInfo))
                                    {
                                        idList.Add(senderInfo);
                                        idList.Add(receiverInfo);
                                    }
                                    return idList;
                                }
                                else if (startStr == "<?XML")
                                {
                                    xml = XDocument.Parse(body);
                                    XElement xbody = xml.Descendants("message").Elements("body").FirstOrDefault();
                                    if (xbody != null )
                                    {

                                        string mbody = xbody.Value;
                                        if (!string.IsNullOrEmpty(xbody.Value))
                                        {
                                            idList = GetSenderReceiverID(xbody.Value);
                                        }
                                    }
                                }
                                else if (startStr == "ABC")
                                {
                                    string receiverId = msgbody.Substring(msgbody.IndexOf("RID") + 5, 65);
                                    if (!string.IsNullOrEmpty(receiverId))
                                    {
                                        idList.Add(receiverId.Trim() + " : N/A");
                                    }
                                    string senderId = msgbody.Substring(msgbody.IndexOf("SID") + 5, 65);
                                    if (!string.IsNullOrEmpty(senderId))
                                    {
                                        idList.Add(senderId.Trim() + " : N/A");
                                    }
                                }
                                else
                                {
                                    string IsPO = body.Substring(0, Math.Min(body.Length, 23)).ToUpper();
                                    if (!string.IsNullOrEmpty(IsPO))
                                    {
                                        string trimmedBody =

                                        if(IsPO == "|XYZ|")
                                        {
                                            idList = GetSenderReceiverID(xbody.Value);
                                        }

                                    }
                                }
                            }
                            catch (Exception ex) { }
                        }
</code>```

`

Body:
I need to write a function which applies custom logic to retrieve data from the return type there are 3 type of return types I get
SOAP,
XML,
FLAT FILE (eg. Staring with ABC),
FLAT FILE (eg. Staring with XYZ).

For now I am trying to get the start string and then detect the return type. I need a better way to do it as I will need to check other flat file formats in the future.

As of now i am putting it in a IF else condition.

`

 string body = GetMessage();
                        string startStr = body.Substring(0, Math.Min(body.Length, 5)).ToUpper();
                        XDocument xml = null;

                        if (!string.IsNullOrEmpty(body))
                        {
                            try
                            {

                                if (startStr == "<SOAP")
                                {
                                    xml = XDocument.Parse(body);
                                    string senderInfo = string.Empty;
                                    string receiverInfo = string.Empty;
                                    XElement senderQ = xml.Root.Descendants().Where(x => x.Name.LocalName == "_SENDERQ_").FirstOrDefault();
                                    XElement receiverQ= xml.Root.Descendants().Where(x => x.Name.LocalName == "_RECEIVERQ").FirstOrDefault();
                                    XElement senderId = xml.Root.Descendants().Where(x => x.Name.LocalName == "_SENDERID_").FirstOrDefault();
                                    XElement receiverId = xml.Root.Descendants().Where(x => x.Name.LocalName == "_RECEIVERID_").FirstOrDefault();

                                    if (senderId != null)
                                    {
                                        senderInfo = senderId.Value.Trim();
                                    }
                                    if (senderQ != null)
                                    {
                                        senderInfo += " : " + senderQ.Value.Trim();
                                    }
                                    if (receiverId != null)
                                    {
                                        receiverInfo = receiverId.Value.Trim();
                                    }
                                    if (receiverQ != null)
                                    {
                                        receiverInfo += " : " + receiver.Value.Trim();
                                    }
                                    if (!String.IsNullOrEmpty(senderInfo) && !String.IsNullOrEmpty(receiverInfo))
                                    {
                                        idList.Add(senderInfo);
                                        idList.Add(receiverInfo);
                                    }
                                    return idList;
                                }
                                else if (startStr == "<?XML")
                                {
                                    xml = XDocument.Parse(body);
                                    XElement xbody = xml.Descendants("message").Elements("body").FirstOrDefault();
                                    if (xbody != null )
                                    {

                                        string mbody = xbody.Value;
                                        if (!string.IsNullOrEmpty(xbody.Value))
                                        {
                                            idList = GetSenderReceiverID(xbody.Value);
                                        }
                                    }
                                }
                                else if (startStr == "ABC")
                                {
                                    string receiverId = msgbody.Substring(msgbody.IndexOf("RID") + 5, 65);
                                    if (!string.IsNullOrEmpty(receiverId))
                                    {
                                        idList.Add(receiverId.Trim() + " : N/A");
                                    }
                                    string senderId = msgbody.Substring(msgbody.IndexOf("SID") + 5, 65);
                                    if (!string.IsNullOrEmpty(senderId))
                                    {
                                        idList.Add(senderId.Trim() + " : N/A");
                                    }
                                }
                                else
                                {
                                    string IsPO = body.Substring(0, Math.Min(body.Length, 23)).ToUpper();
                                    if (!string.IsNullOrEmpty(IsPO))
                                    {
                                        string trimmedBody =

                                        if(IsPO == "|XYZ|")
                                        {
                                            idList = GetSenderReceiverID(xbody.Value);
                                        }

                                    }
                                }
                            }
                            catch (Exception ex) { }
                        }

`


问:
generate JWT token right after email verification step with out needing signing in again Duende Identity Server 6
I have a requirement from client where he wants to login the customer straight away when he successfully verify his email (email confirmation), What i am doing i am sending a url containing UserID and verification code to his email and after clicking that link i'm hitting API endpoint where after the verification of code the user email will be confirmed. i.e(https://localhost:5443/api/user/VerifyCode?userid=xyz&code=1234). After the confirmation of the email, the api should generated a JWT token and return it in the api so the user can sign in with out the need of relogin.

```<code>
</code>```

I have disabled automatic key management in duende identity server 6 and tried to generate token using RSASHA256 algorithm with some private key in program.cs which is working fine and jwt is authenticated successfully as well by identity server! but now to generate token with out password I have to created a new class ValidatePasswordServices where i am using same private key as i was using in program.cs . But the problem is identity server is not authenticating that jwt token which is generated from ValidatePasswordService even tough i'm using same private key and algorithm. So what i'm missing here? Or is there any other way to meet my requirement please help

Code used in program.cs where i disabled automatic keymanagement so we can generate  jwt using RSA private key :

```<code>var privatekeyValue = builder.Configuration["JWT:RsaPrivateKey"];

builder.Services.AddIdentityServer(options =>
{

    options.LicenseKey =
    "Xyz";
    options.Events.RaiseErrorEvents = true;
    options.Events.RaiseInformationEvents = true;
    options.Events.RaiseFailureEvents = true;
    options.Events.RaiseSuccessEvents = true;
    options.EmitStaticAudienceClaim = true;
    options.KeyManagement.Enabled = false;
})
.AddConfigurationStore(options => options.ConfigureDbContext = b => b.UseSqlServer(connectionString,
  opt => opt.MigrationsAssembly(migrationsAssembly)))
  .AddOperationalStore(options => options.ConfigureDbContext = b => b.UseSqlServer(connectionString,
    opt => opt.MigrationsAssembly(migrationsAssembly)))
  .AddSigningCredential( GetSigningCredentials())
  .AddValidationKey()
  .AddAspNetIdentity<ApplicationUser>();

SigningCredentials GetSigningCredentials()
{
    var privateKey = privatekeyValue.ToByteArray();
    RSA rsa =  RSA.Create();
    RSAParameters rsaKeyInfo = rsa.ExportParameters(false);
    rsa.ImportPkcs8PrivateKey(privateKey, out _);
    var signingCredentials = new SigningCredentials(new RsaSecurityKey(rsa), SecurityAlgorithms.RsaSha256)
    {
        CryptoProviderFactory = new CryptoProviderFactory { CacheSignatureProviders = false }
    };
    return signingCredentials;
}
</code>```

Code used in custom jwt token service

```<code>//////////////////////////////////////////////////////////////////////////////////////////
public async Task<string> Tokenwithoutpassword(string userId)
        {
            if (userId != null)
            {
                var user = await _signInMgr.UserManager.FindByIdAsync(userId);

                if (user != null)
                {
                    //create claims details based on the user information
                    List<Claim> claims = new List<Claim>();
                    claims.Add(new Claim(JwtRegisteredClaimNames.Sub, user.Id));
                   // claims.Add(new Claim(JwtRegisteredClaimNames.Iat, DateTime.UtcNow.ToString()));
                   // claims.Add(new Claim(JwtRegisteredClaimNames.Jti, DateTime.UtcNow.ToString()));
                    claims.Add(new Claim("UserId", user.Id));
                    claims.Add(new Claim("Username", user.UserName));
                    claims.Add(new Claim("Email", user.Email));
                    if (_userManager.SupportsUserRole)
                    {
                        IList<string> roles = await _userManager.GetRolesAsync(user);
                        foreach (var rolename in roles)
                        {
                            claims.Add(new Claim(JwtClaimTypes.Role, rolename));
                        }
                    }
                    var token = new JwtSecurityToken(
                         "https://localhost:5000",
                         "https://localhost:5000/resources",
                         claims,
                         expires: DateTime.UtcNow.AddMinutes(60),
                         signingCredentials: GetSigningCredentials());

                    var tokenHandler = new JwtSecurityTokenHandler();
                    return tokenHandler.WriteToken(token);
                }
                return null;
            }
            return null;
        }

        SigningCredentials GetSigningCredentials()
        {
            var privatekeyValue = _configuration["JWT:RsaPrivateKey"];

            var privateKey = privatekeyValue.ToByteArray();
            RSA rsa = RSA.Create();
            rsa.ImportPkcs8PrivateKey(privateKey, out _);
            var signingCredentials = new SigningCredentials(new RsaSecurityKey(rsa), SecurityAlgorithms.RsaSha256)
            {
                CryptoProviderFactory = new CryptoProviderFactory { CacheSignatureProviders = false }
            };
            return signingCredentials;
        }
    }
public static class ExtensionMethods
    {
        public static byte[] ToByteArray(this string value) =>
                    Convert.FromBase64String(value);

    }
}
/////////////////////////////////////////////////////////////////////////////////////////
</code>```

Body:
I have a requirement from client where he wants to login the customer straight away when he successfully verify his email (email confirmation), What i am doing i am sending a url containing UserID and verification code to his email and after clicking that link i'm hitting API endpoint where after the verification of code the user email will be confirmed. i.e(https://localhost:5443/api/user/VerifyCode?userid=xyz&code=1234). After the confirmation of the email, the api should generated a JWT token and return it in the api so the user can sign in with out the need of relogin.

I have disabled automatic key management in duende identity server 6 and tried to generate token using RSASHA256 algorithm with some private key in program.cs which is working fine and jwt is authenticated successfully as well by identity server! but now to generate token with out password I have to created a new class ValidatePasswordServices where i am using same private key as i was using in program.cs . But the problem is identity server is not authenticating that jwt token which is generated from ValidatePasswordService even tough i'm using same private key and algorithm. So what i'm missing here? Or is there any other way to meet my requirement please help

Code used in program.cs where i disabled automatic keymanagement so we can generate  jwt using RSA private key :

var privatekeyValue = builder.Configuration["JWT:RsaPrivateKey"];

builder.Services.AddIdentityServer(options =>
{

    options.LicenseKey =
    "Xyz";
    options.Events.RaiseErrorEvents = true;
    options.Events.RaiseInformationEvents = true;
    options.Events.RaiseFailureEvents = true;
    options.Events.RaiseSuccessEvents = true;
    options.EmitStaticAudienceClaim = true;
    options.KeyManagement.Enabled = false;
})
.AddConfigurationStore(options => options.ConfigureDbContext = b => b.UseSqlServer(connectionString,
  opt => opt.MigrationsAssembly(migrationsAssembly)))
  .AddOperationalStore(options => options.ConfigureDbContext = b => b.UseSqlServer(connectionString,
    opt => opt.MigrationsAssembly(migrationsAssembly)))
  .AddSigningCredential( GetSigningCredentials())
  .AddValidationKey()
  .AddAspNetIdentity<ApplicationUser>();

SigningCredentials GetSigningCredentials()
{
    var privateKey = privatekeyValue.ToByteArray();
    RSA rsa =  RSA.Create();
    RSAParameters rsaKeyInfo = rsa.ExportParameters(false);
    rsa.ImportPkcs8PrivateKey(privateKey, out _);
    var signingCredentials = new SigningCredentials(new RsaSecurityKey(rsa), SecurityAlgorithms.RsaSha256)
    {
        CryptoProviderFactory = new CryptoProviderFactory { CacheSignatureProviders = false }
    };
    return signingCredentials;
}

Code used in custom jwt token service

//////////////////////////////////////////////////////////////////////////////////////////
public async Task<string> Tokenwithoutpassword(string userId)
        {
            if (userId != null)
            {
                var user = await _signInMgr.UserManager.FindByIdAsync(userId);

                if (user != null)
                {
                    //create claims details based on the user information
                    List<Claim> claims = new List<Claim>();
                    claims.Add(new Claim(JwtRegisteredClaimNames.Sub, user.Id));
                   // claims.Add(new Claim(JwtRegisteredClaimNames.Iat, DateTime.UtcNow.ToString()));
                   // claims.Add(new Claim(JwtRegisteredClaimNames.Jti, DateTime.UtcNow.ToString()));
                    claims.Add(new Claim("UserId", user.Id));
                    claims.Add(new Claim("Username", user.UserName));
                    claims.Add(new Claim("Email", user.Email));
                    if (_userManager.SupportsUserRole)
                    {
                        IList<string> roles = await _userManager.GetRolesAsync(user);
                        foreach (var rolename in roles)
                        {
                            claims.Add(new Claim(JwtClaimTypes.Role, rolename));
                        }
                    }
                    var token = new JwtSecurityToken(
                         "https://localhost:5000",
                         "https://localhost:5000/resources",
                         claims,
                         expires: DateTime.UtcNow.AddMinutes(60),
                         signingCredentials: GetSigningCredentials());

                    var tokenHandler = new JwtSecurityTokenHandler();
                    return tokenHandler.WriteToken(token);
                }
                return null;
            }
            return null;
        }

        SigningCredentials GetSigningCredentials()
        {
            var privatekeyValue = _configuration["JWT:RsaPrivateKey"];

            var privateKey = privatekeyValue.ToByteArray();
            RSA rsa = RSA.Create();
            rsa.ImportPkcs8PrivateKey(privateKey, out _);
            var signingCredentials = new SigningCredentials(new RsaSecurityKey(rsa), SecurityAlgorithms.RsaSha256)
            {
                CryptoProviderFactory = new CryptoProviderFactory { CacheSignatureProviders = false }
            };
            return signingCredentials;
        }
    }
public static class ExtensionMethods
    {
        public static byte[] ToByteArray(this string value) =>
                    Convert.FromBase64String(value);

    }
}
/////////////////////////////////////////////////////////////////////////////////////////


问:
Array Index Out Of Bounds Exception in Java
I am trying to initialize a 3D multidimensional array in Java, and assign 10001 to every value in it using three 'for-loops', but I am getting a error.

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 6 out of bounds for length 6

I need help in understanding what I am doing wrong in this.

```<code>    public static int maxProfit(int[] prices) {
        int[][][] dp = new int[prices.length][2][2]; // Intitialize 3D array
        for(int i = 0; i<= prices.length; i++){
            for(int j = 0; j <= 2; j++){
                for(int k = 0; k<= 2; k++){
                    dp[i][j][k] = 10001;
                }
            }
        }

</code>```

I use two 'for-loops' for initializing and assigning values in 2D array. I am not able to understand why is the same not working for 3D arrays

Body:
I am trying to initialize a 3D multidimensional array in Java, and assign 10001 to every value in it using three 'for-loops', but I am getting a error.

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 6 out of bounds for length 6

I need help in understanding what I am doing wrong in this.

    public static int maxProfit(int[] prices) {
        int[][][] dp = new int[prices.length][2][2]; // Intitialize 3D array
        for(int i = 0; i<= prices.length; i++){
            for(int j = 0; j <= 2; j++){
                for(int k = 0; k<= 2; k++){
                    dp[i][j][k] = 10001;
                }
            }
        }

I use two 'for-loops' for initializing and assigning values in 2D array. I am not able to understand why is the same not working for 3D arrays


问:
why my text field one type and stop mui material
so I have Texfield from Material UI, but i notice one things, every time i type, i stop and not continue to next letter, so i have to click again on it..., but when i remove the onChange method, the data continue to type without stopping..., is there because of the useEffect Component that prevent it from continously typing?

Here is my code:

```<code>import React from "react";
import { Search } from "@mui/icons-material";
import { IconButton, TextField, InputAdornment } from "@mui/material";
import {
  GridToolbarDensitySelector,
  GridToolbarContainer,
  GridToolbarExport,
  GridToolbarColumnsButton,
} from "@mui/x-data-grid";
import FlexBetween from "./FlexBetween";

const DataGridCustomToolbar = ({ searchInput, setSearchInput, setSearch }) => {
  return (
    <GridToolbarContainer>
      <FlexBetween width="100%">
        <FlexBetween>
          <GridToolbarColumnsButton />
          {/* <GridToolbarDensitySelector /> */}
          <GridToolbarExport />
        </FlexBetween>
        <TextField
          label="Search..."
          sx={{ mb: "0.5rem", width: "15rem" }}
          onChange={(e) => setSearchInput(e.target.value)}
          value={searchInput}
          variant="standard"
          InputProps={{
            endAdornment: (
              <InputAdornment position="end">
                <IconButton
                  onClick={() => {
                    setSearch({ value: searchInput });
                    setSearchInput("");
                  }}
                >
                  <Search />
                </IconButton>
              </InputAdornment>
            ),
          }}
        />
      </FlexBetween>
    </GridToolbarContainer>
  );
};

export default DataGridCustomToolbar;

Here is what its being use on the datagrid
const BOM = () => {
  const theme = useTheme();

  // values to be sent to the backend
  const [page, setPage] = useState(0);
  const [limit, setlimit] = useState(20);
  const [order, setOrder] = useState([
    {
      column: "1",
      dir: "asc",
    },
  ]);
  const [search, setSearch] = useState({
    value: "",
  });
  const [data, setData] = useState([]);
  const [total, setTotal] = useState(0);
  const setDataInput = (value) => {
    setDataInput(value);
  };
  useEffect(() => {
    dataService.getBomList(page, limit, order, search).then((response) => {
      console.log("BOM");
      setData(response.data.data.data);
      setTotal(response.data.data.recordsFiltered);
      return response.data.data.data;
    });
  }, [page, limit, order]);
  console.log(data);
  const [searchInput, setSearchInput] = useState("");

  const columns = [
    {
      field: "sku",
      headerName: "SKU",
      width: 100,
    },
    { field: "sku_name", headerName: "SKU NAME", width: 300 },
    {
      field: "plant",
      headerName: "Plant",
      width: 80,
      align: "center",
      headerAlign: "center",
    },
    { field: "base_qty", headerName: "Base QTY", width: 100 },
    {
      field: "item",
      headerName: "Item",
      width: 60,
      align: "center",
      headerAlign: "center",
    },
    { field: "uom_sku", headerName: "UOM SKU", width: 100, align: "center" },
    { field: "material", headerName: "Material", width: 150 },
    { field: "material_name", headerName: "Material Name", width: 300 },
    { field: "qty_material", headerName: "Material QTY", width: 100 },
    { field: "uom_material", headerName: "Material UOM", width: 100 },
    { field: "alt_bom", headerName: "BOM ALT", width: 80 },
    { field: "valid_from", headerName: "Valid From", width: 210 },
    { field: "valid_to", headerName: "Valid to", width: 210 },
    { field: "status", headerName: "Status", width: 80 },
  ];

  return (
    <Box m="5px">
      <Box height="80vh">
        {console.log("data", order, page, limit, search, searchInput)}
        <StripedDataGrid
          // loading={isLoading || !data}
          getRowId={(row) => row.id}
          columns={columns}
          rowCount={(limit && total) || 0}
          rowsPerPageOptions={[20, 50, 100]}
          rows={data || []}
          pagination
          paginationMode="server"
          sortingMode="server"
          page={page}
          pageSize={limit}
          onPageSizeChange={(newPageSize) => setlimit(newPageSize)}
          onPageChange={(newPage) => setPage(newPage)}
          onSortModelChange={(newSortModel) => setOrder(...newSortModel)}
          components={{ Toolbar: DataGridCustomToolbar }}
          componentsProps={{
            toolbar: { searchInput, setSearchInput, setSearch },
          }}
        />
      </Box>
    </Box>
  );
};
export default BOM;
</code>```

Can someone tellme where did i do wrong here....

Body:
so I have Texfield from Material UI, but i notice one things, every time i type, i stop and not continue to next letter, so i have to click again on it..., but when i remove the onChange method, the data continue to type without stopping..., is there because of the useEffect Component that prevent it from continously typing?

Here is my code:

import React from "react";
import { Search } from "@mui/icons-material";
import { IconButton, TextField, InputAdornment } from "@mui/material";
import {
  GridToolbarDensitySelector,
  GridToolbarContainer,
  GridToolbarExport,
  GridToolbarColumnsButton,
} from "@mui/x-data-grid";
import FlexBetween from "./FlexBetween";

const DataGridCustomToolbar = ({ searchInput, setSearchInput, setSearch }) => {
  return (
    <GridToolbarContainer>
      <FlexBetween width="100%">
        <FlexBetween>
          <GridToolbarColumnsButton />
          {/* <GridToolbarDensitySelector /> */}
          <GridToolbarExport />
        </FlexBetween>
        <TextField
          label="Search..."
          sx={{ mb: "0.5rem", width: "15rem" }}
          onChange={(e) => setSearchInput(e.target.value)}
          value={searchInput}
          variant="standard"
          InputProps={{
            endAdornment: (
              <InputAdornment position="end">
                <IconButton
                  onClick={() => {
                    setSearch({ value: searchInput });
                    setSearchInput("");
                  }}
                >
                  <Search />
                </IconButton>
              </InputAdornment>
            ),
          }}
        />
      </FlexBetween>
    </GridToolbarContainer>
  );
};

export default DataGridCustomToolbar;

Here is what its being use on the datagrid
const BOM = () => {
  const theme = useTheme();

  // values to be sent to the backend
  const [page, setPage] = useState(0);
  const [limit, setlimit] = useState(20);
  const [order, setOrder] = useState([
    {
      column: "1",
      dir: "asc",
    },
  ]);
  const [search, setSearch] = useState({
    value: "",
  });
  const [data, setData] = useState([]);
  const [total, setTotal] = useState(0);
  const setDataInput = (value) => {
    setDataInput(value);
  };
  useEffect(() => {
    dataService.getBomList(page, limit, order, search).then((response) => {
      console.log("BOM");
      setData(response.data.data.data);
      setTotal(response.data.data.recordsFiltered);
      return response.data.data.data;
    });
  }, [page, limit, order]);
  console.log(data);
  const [searchInput, setSearchInput] = useState("");

  const columns = [
    {
      field: "sku",
      headerName: "SKU",
      width: 100,
    },
    { field: "sku_name", headerName: "SKU NAME", width: 300 },
    {
      field: "plant",
      headerName: "Plant",
      width: 80,
      align: "center",
      headerAlign: "center",
    },
    { field: "base_qty", headerName: "Base QTY", width: 100 },
    {
      field: "item",
      headerName: "Item",
      width: 60,
      align: "center",
      headerAlign: "center",
    },
    { field: "uom_sku", headerName: "UOM SKU", width: 100, align: "center" },
    { field: "material", headerName: "Material", width: 150 },
    { field: "material_name", headerName: "Material Name", width: 300 },
    { field: "qty_material", headerName: "Material QTY", width: 100 },
    { field: "uom_material", headerName: "Material UOM", width: 100 },
    { field: "alt_bom", headerName: "BOM ALT", width: 80 },
    { field: "valid_from", headerName: "Valid From", width: 210 },
    { field: "valid_to", headerName: "Valid to", width: 210 },
    { field: "status", headerName: "Status", width: 80 },
  ];

  return (
    <Box m="5px">
      <Box height="80vh">
        {console.log("data", order, page, limit, search, searchInput)}
        <StripedDataGrid
          // loading={isLoading || !data}
          getRowId={(row) => row.id}
          columns={columns}
          rowCount={(limit && total) || 0}
          rowsPerPageOptions={[20, 50, 100]}
          rows={data || []}
          pagination
          paginationMode="server"
          sortingMode="server"
          page={page}
          pageSize={limit}
          onPageSizeChange={(newPageSize) => setlimit(newPageSize)}
          onPageChange={(newPage) => setPage(newPage)}
          onSortModelChange={(newSortModel) => setOrder(...newSortModel)}
          components={{ Toolbar: DataGridCustomToolbar }}
          componentsProps={{
            toolbar: { searchInput, setSearchInput, setSearch },
          }}
        />
      </Box>
    </Box>
  );
};
export default BOM;

Can someone tellme where did i do wrong here....