问:
Get consecutive days of rows in table
So I am trying to create a table that stores information about tables failing quality tests.
My goal is to create a table with the current tables who've been failing some sort of test for more than 2 days IN A ROW. Though I am unable to tackle all possibilities of entries from the logs table I am manipulating.

Here's the query I am using:

```<code>SELECT run_time,
full_table_name,
    expectation_type,
    meta,
    expectation_columns,
    origin_type,
    MAX(consecutive_days) as consecutive_days
FROM
(WITH a AS (
    SELECT
        full_table_name,
        expectation_type,
        date_trunc('day', run_time) AS run_time,
        origin_type,
        meta,
        expectation_columns
    FROM MY_TABLE
    WHERE is_successful = false
        AND origin_type = 'DWH_TESTS'
    GROUP BY 1, 2, 3, 4, 5, 6
)
SELECT
    full_table_name,
    expectation_type,
    meta,
    expectation_columns,
    origin_type,
    run_time,
    ROW_NUMBER() OVER (PARTITION BY full_table_name, expectation_type order by run_time) AS consecutive_days
FROM a )
GROUP BY full_table_name,
    expectation_type,
    meta,
    expectation_columns,
    origin_type,
    run_time
having MAX(consecutive_days) > 2
ORDER BY run_time desc

</code>```

Thing is, it accumulates all rows with false results. I need the accumulation of the consecutive.
Meaning:
If I had one table that been failing the same expectation day after day, I'd want to save it as a row, with the start date of this failing session, according to today. Though, once it been settled, I don't want it to still appear in query results (Unless it again surpassed two days threshold.)
Been trying to solve this for few days now, unsuccessfully.
Thanks in advance!

Title: Get consecutive days of rows in table

Body:
So I am trying to create a table that stores information about tables failing quality tests.
My goal is to create a table with the current tables who've been failing some sort of test for more than 2 days IN A ROW. Though I am unable to tackle all possibilities of entries from the logs table I am manipulating.

Here's the query I am using:

SELECT run_time,
full_table_name,
    expectation_type,
    meta,
    expectation_columns,
    origin_type,
    MAX(consecutive_days) as consecutive_days
FROM
(WITH a AS (
    SELECT
        full_table_name,
        expectation_type,
        date_trunc('day', run_time) AS run_time,
        origin_type,
        meta,
        expectation_columns
    FROM MY_TABLE
    WHERE is_successful = false
        AND origin_type = 'DWH_TESTS'
    GROUP BY 1, 2, 3, 4, 5, 6
)
SELECT
    full_table_name,
    expectation_type,
    meta,
    expectation_columns,
    origin_type,
    run_time,
    ROW_NUMBER() OVER (PARTITION BY full_table_name, expectation_type order by run_time) AS consecutive_days
FROM a )
GROUP BY full_table_name,
    expectation_type,
    meta,
    expectation_columns,
    origin_type,
    run_time
having MAX(consecutive_days) > 2
ORDER BY run_time desc

Thing is, it accumulates all rows with false results. I need the accumulation of the consecutive.
Meaning:
If I had one table that been failing the same expectation day after day, I'd want to save it as a row, with the start date of this failing session, according to today. Though, once it been settled, I don't want it to still appear in query results (Unless it again surpassed two days threshold.)
Been trying to solve this for few days now, unsuccessfully.
Thanks in advance!


来源: stackexchange

问:
Error The "ResolvePackageFileConflicts" task failed unexpectedly. System.ArgumentException: Illegal characters in path
This is the error I'm getting when I am trying to build a solution. I tried commenting the Item groups individually one by one and fix the issue but it isn't solved.

```<code>Severity    Code    Description Project File    Line    Suppression State
Error       The "ResolvePackageFileConflicts" task failed unexpectedly.
System.ArgumentException: Illegal characters in path.
   at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
   at System.IO.Path.GetFileName(String path)
   at Microsoft.NET.Build.Tasks.ItemUtilities.GetTargetPath(ITaskItem item)
   at Microsoft.NET.Build.Tasks.ItemUtilities.GetReferenceTargetPath(ITaskItem item)
   at Microsoft.NET.Build.Tasks.ConflictResolution.ResolvePackageFileConflicts.<>c.<ExecuteCore>b__44_7(ConflictItem ci)
   at Microsoft.NET.Build.Tasks.ConflictResolution.ConflictResolver`1.ResolveConflicts(IEnumerable`1 conflictItems, Func`2 getItemKey, ConflictCallback`1 foundConflict, Boolean commitWinner)
   at Microsoft.NET.Build.Tasks.ConflictResolution.ResolvePackageFileConflicts.ExecuteCore()
   at Microsoft.NET.Build.Tasks.TaskBase.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() CocoonIT
</code>```

I'm trying to build a solution and was getting this error and I'm not sure how to resolve it.
I have tried commenting the ItemGroups one by one in the csproj file but it didn't solve this.

Could you please help me in resolving this

ContentLicense: CC BY-SA 4.0

Body:
This is the error I'm getting when I am trying to build a solution. I tried commenting the Item groups individually one by one and fix the issue but it isn't solved.

Severity    Code    Description Project File    Line    Suppression State
Error       The "ResolvePackageFileConflicts" task failed unexpectedly.
System.ArgumentException: Illegal characters in path.
   at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
   at System.IO.Path.GetFileName(String path)
   at Microsoft.NET.Build.Tasks.ItemUtilities.GetTargetPath(ITaskItem item)
   at Microsoft.NET.Build.Tasks.ItemUtilities.GetReferenceTargetPath(ITaskItem item)
   at Microsoft.NET.Build.Tasks.ConflictResolution.ResolvePackageFileConflicts.<>c.<ExecuteCore>b__44_7(ConflictItem ci)
   at Microsoft.NET.Build.Tasks.ConflictResolution.ConflictResolver`1.ResolveConflicts(IEnumerable`1 conflictItems, Func`2 getItemKey, ConflictCallback`1 foundConflict, Boolean commitWinner)
   at Microsoft.NET.Build.Tasks.ConflictResolution.ResolvePackageFileConflicts.ExecuteCore()
   at Microsoft.NET.Build.Tasks.TaskBase.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() CocoonIT

I'm trying to build a solution and was getting this error and I'm not sure how to resolve it.
I have tried commenting the ItemGroups one by one in the csproj file but it didn't solve this.

Could you please help me in resolving this


问:
Why am I able to use css outside html tag?
I put the style tag outside the html tag and according to my teacher it should give me no result but it actually works. Why does it work if it isn't supposed to be like this?</p>
```<code><!DOCTYPE html>
<html>
<head> some stuff </head>
<body> other stuff </body>
</html>
<style>
css comes here
</style>
</code>```

Body:
I put the style tag outside the html tag and according to my teacher it should give me no result but it actually works. Why does it work if it isn't supposed to be like this?

<!DOCTYPE html>

 some stuff
 other stuff


问:
How to test dates with jest?
I'm writing a test to check if the selected date is greater than the current date.
This is the component I'm trying to test:

```<code>const [selectedDate, setSelectedDate] = useState<Moment>();

<TimeComponent>
  <SetTimeButton
    data-testid="scheduleTime"
    onClick={() =>
      scheduleTimeHandler(
        selectedDate,
        timeSelect,
        setSelectedDate,
        setTimeDialog,
        setDisableConfirm
      )
    }
  />
  <DisplayDate data-testid="selectedDate">{selectedDate}</DisplayDate>
</TimeComponent>
</code>```

and this is the test that I wrote:

```<code>import React from 'react';
import { render, screen, fireEvent } from '@testing-library/react';
import TimeComponent from './TimeComponent';

test('set schedule time', () => {
  render(
    //@ts-ignore
    <TimeComponent />
  );

  const mockDateObject = new Date();
  const scheduleTimeBtn = screen.queryByTestId('scheduleTime');
  const selectedDate = screen.queryByTestId('selectedDate');

  fireEvent.click(scheduleTimeBtn);

  expect(selectedDate).toBeGreaterThan(+mockDateObject);
});
</code>```

and I'm getting this kind of error regarding the selectedDate in expect

expect(received).toBeGreaterThan(expected)

Matcher error: received value must be a number or bigint

Received has value: null
I understand this is because selectedDate is an HTML element instead of being date, but I'm not sure how can I make it a date. What am I doing wrong?

Title: How to test dates with jest?

Body:
I'm writing a test to check if the selected date is greater than the current date.
This is the component I'm trying to test:

const [selectedDate, setSelectedDate] = useState<Moment>();

<TimeComponent>
  <SetTimeButton
    data-testid="scheduleTime"
    onClick={() =>
      scheduleTimeHandler(
        selectedDate,
        timeSelect,
        setSelectedDate,
        setTimeDialog,
        setDisableConfirm
      )
    }
  />
  <DisplayDate data-testid="selectedDate">{selectedDate}</DisplayDate>
</TimeComponent>

and this is the test that I wrote:

import React from 'react';
import { render, screen, fireEvent } from '@testing-library/react';
import TimeComponent from './TimeComponent';

test('set schedule time', () => {
  render(
    //@ts-ignore
    <TimeComponent />
  );

  const mockDateObject = new Date();
  const scheduleTimeBtn = screen.queryByTestId('scheduleTime');
  const selectedDate = screen.queryByTestId('selectedDate');

  fireEvent.click(scheduleTimeBtn);

  expect(selectedDate).toBeGreaterThan(+mockDateObject);
});

and I'm getting this kind of error regarding the selectedDate in expect

expect(received).toBeGreaterThan(expected)

Matcher error: received value must be a number or bigint

Received has value: null
I understand this is because selectedDate is an HTML element instead of being date, but I'm not sure how can I make it a date. What am I doing wrong?


问:
How to deploy lambda stacks parallelly through cdk
Is it possible to build resources parallelly and deploy it together instead of one by one.. through cdk?
For eg if we have many lambdas..it is taking too much time to deploy through codebuild,so we need to minimize that time and deploy stacks parallelly instead of one by one and all these stacks should be deployed in same region and environment.

Can anyone please give me an explanation or resolution for this ?


问:
Issue to call external function in globalsetup - Typescript (Playwright)
In my globalsetup file I'm trying to run a function that is defined in another page (within a class), as such :

```<code>_import { SignInPage } from "./common/pages/LssLogin";

let signInPage: SignInPage;`

async function globalSetup(config: FullConfig) {
  await signInPage.loginToApplication();

}
</code>```

export default globalSetup;_`

The function is defined as such in the LssLogin page :

```<code>_export class SignInPage {

  readonly page: Page;

  constructor(page: WebActions) {
      webActions = page
      //commonFunctionsPage = new CommonFunctionsPage(page)

  }

  async loginToApplication(): Promise<void> {
    console.log('test login function')
  }_
</code>```

However, whenever I'm running a test, nothing happens. When I say nothing, I mean that the test is not even launched, so I guess something is wrong in my calls. Could you please help ?

Many thanks,

Regards,

Johan

Body:
In my globalsetup file I'm trying to run a function that is defined in another page (within a class), as such :

_import { SignInPage } from "./common/pages/LssLogin";

let signInPage: SignInPage;`

async function globalSetup(config: FullConfig) {
  await signInPage.loginToApplication();

}

export default globalSetup;_`

The function is defined as such in the LssLogin page :

_export class SignInPage {

  readonly page: Page;

  constructor(page: WebActions) {
      webActions = page
      //commonFunctionsPage = new CommonFunctionsPage(page)

  }

  async loginToApplication(): Promise<void> {
    console.log('test login function')
  }_

However, whenever I'm running a test, nothing happens. When I say nothing, I mean that the test is not even launched, so I guess something is wrong in my calls. Could you please help ?

Many thanks,

Regards,

Johan


问:
registerForActivityResult callback is not getting called
I am trying to select media from public storage using ActivityResultAPI but it never ever triggers the callback function.

It was working perfectly fine until I move the compileSdkVersion and targetSdkVersion to 33.

Here is the ActivityResultLauncher

```<code>private var fileChooserLauncher =
    registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
        Log.i(TAG, "registerForActivityResult: ${it}")
    }
</code>```

And here is how I am launching this:

```<code>    val contentSelectionIntent = Intent(Intent.ACTION_GET_CONTENT)
    contentSelectionIntent.addCategory(Intent.CATEGORY_OPENABLE)
    contentSelectionIntent.type = "image/*"

    val chooserIntent = Intent(Intent.ACTION_CHOOSER)
    chooserIntent.putExtra(Intent.EXTRA_INTENT, contentSelectionIntent)

    fileChooserLauncher.launch(chooserIntent)
</code>```

Things I already tried but didn't work

Getting READ_MEDIA_IMAGES permission

Adding/removing android:alwaysRetainTaskState="true" from Activity in AndroidManifest.xml

Adding/removing android:exported="true" from Activity in AndroidManifest.xml

Testing on Real Devices

Testing different contracts such as GetContent()

My build.gradle app level contains the following libraries and more

```<code>implementation("androidx.activity:activity-ktx:1.6.1")
implementation("androidx.fragment:fragment-ktx:1.5.5")
</code>```

Please help me out on this if you encountered something similar.

Thank you

Body:
I am trying to select media from public storage using ActivityResultAPI but it never ever triggers the callback function.

It was working perfectly fine until I move the compileSdkVersion and targetSdkVersion to 33.

Here is the ActivityResultLauncher

private var fileChooserLauncher =
    registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
        Log.i(TAG, "registerForActivityResult: ${it}")
    }

And here is how I am launching this:

    val contentSelectionIntent = Intent(Intent.ACTION_GET_CONTENT)
    contentSelectionIntent.addCategory(Intent.CATEGORY_OPENABLE)
    contentSelectionIntent.type = "image/*"

    val chooserIntent = Intent(Intent.ACTION_CHOOSER)
    chooserIntent.putExtra(Intent.EXTRA_INTENT, contentSelectionIntent)

    fileChooserLauncher.launch(chooserIntent)

Things I already tried but didn't work

Getting READ_MEDIA_IMAGES permission

Adding/removing android:alwaysRetainTaskState="true" from Activity in AndroidManifest.xml

Adding/removing android:exported="true" from Activity in AndroidManifest.xml

Testing on Real Devices

Testing different contracts such as GetContent()

My build.gradle app level contains the following libraries and more

implementation("androidx.activity:activity-ktx:1.6.1")
implementation("androidx.fragment:fragment-ktx:1.5.5")

Please help me out on this if you encountered something similar.

Thank you


问:
Need slick slider to pause at video start, and play at end of video end, but currently infinitely loops video once it reachs video slide
Let me preface by saying I am no code expert and am novice at best, but have been tasked with trying to fix the JS that is controlling this Slick Slider. Currently the slider will start and play through image slides, but as soon as a video slide comes up, it will infinitely play the video. The goal is to have the slider play infinitely through the entire slideshow, with images and videos, but I want the slider to pause when a video slide is up, have the video play through its entirety, and have the slider continue to the next slide when the video ends. It is also important that when that same video comes up again, it plays from the beginning.

My coworker is also working on this with me and told me to attach this email: We have been working Code in question to make the videos play all the way through and I have found a way to make the autoplay pause when there is a slide containing a video (marked in red). I am struggling to find a way to make the autoplay resume when the video is over. At the moment the video just replays endlessly and the slide never changes.  I feel like I’m on the right track (marked in green) but I’m struggling to make it work. I am trying to create an event handler that detects when the current video has ended.

Have tried looking through multiple stack overflows and adding different .js scripts I have found to see if that will fix the problem. The code may be extremely hard for some to look at and I apologize in advance, currently the .JS I have is:

```<code>$(document).ready(function() {
    $.fn.randomize = function (selector) {
        var $elems = selector ? $(this).find(selector) : $(this).children(),
            $parents = $elems.parent();

        $parents.each(function () {
            $(this).children(selector).sort(function (childA, childB) {
                // * Prevent last slide from being reordered
                if($(childB).index() !== $(this).children(selector).length - 1) {
                    return Math.round(Math.random()) - 0.5;
                }
            }.bind(this)).detach().appendTo(this);
        });

        return this;
    };

    var autoplaytime = 3000;
    $(".slider-scroll").randomize().slick({
    slidesToScroll: 1,
        initialSlide: 0,
      pauseOnFocus: false,
      pauseOnHover: false,
      dots:false,
     arrows:false,
     autoplay:true,
     autoplaySpeed:autoplaytime,
    });

  const slider = $(".slider-scroll");
  var scrollCount = null;
  var scroll= null;

  slider.on('wheel', (function(e) {
    e.preventDefault();

    clearTimeout(scroll);
    scroll = setTimeout(function(){scrollCount=0;}, 200);
    if(scrollCount) return 0;
    scrollCount=1;

    if (e.originalEvent.deltaY < 0) {
      $(this).slick('slickNext');
    } else {
      $(this).slick('slickPrev');
    }

  }));

});

$(window).on("load",function() {
    if( $('.slick-track').is(':empty') ) {
        $('.notEvent').addClass('show');
    }
});

$(".slider-scroll .slick-current video").on('ended',function(){
    $('.slider-scroll').slick('slickPlay');
});

// On slide change, pause all videos
$('.slider-scroll').on('beforeChange', function(event, slick, currentSlide, nextSlide){
  $('video').each(function() {
    $(this).get(0).pause();
  });
});

// On slide chnage, play a video inside the current slide
$('.slider-scroll').on('afterChange', function(event, slick, currentSlide, nextSlide){
  if( $('.slick-slide.slick-current').find('video').length !== 0)
    {
        $(".slider-scroll .slick-current video")[0].play();
        $('.slider-scroll').slick('slickPause');
    }
});
</code>```

Any help or pointers would be much appreciated! Thanks.

Body:
Let me preface by saying I am no code expert and am novice at best, but have been tasked with trying to fix the JS that is controlling this Slick Slider. Currently the slider will start and play through image slides, but as soon as a video slide comes up, it will infinitely play the video. The goal is to have the slider play infinitely through the entire slideshow, with images and videos, but I want the slider to pause when a video slide is up, have the video play through its entirety, and have the slider continue to the next slide when the video ends. It is also important that when that same video comes up again, it plays from the beginning.

My coworker is also working on this with me and told me to attach this email: We have been working Code in question to make the videos play all the way through and I have found a way to make the autoplay pause when there is a slide containing a video (marked in red). I am struggling to find a way to make the autoplay resume when the video is over. At the moment the video just replays endlessly and the slide never changes.  I feel like I’m on the right track (marked in green) but I’m struggling to make it work. I am trying to create an event handler that detects when the current video has ended.

Have tried looking through multiple stack overflows and adding different .js scripts I have found to see if that will fix the problem. The code may be extremely hard for some to look at and I apologize in advance, currently the .JS I have is:

$(document).ready(function() {
    $.fn.randomize = function (selector) {
        var $elems = selector ? $(this).find(selector) : $(this).children(),
            $parents = $elems.parent();

        $parents.each(function () {
            $(this).children(selector).sort(function (childA, childB) {
                // * Prevent last slide from being reordered
                if($(childB).index() !== $(this).children(selector).length - 1) {
                    return Math.round(Math.random()) - 0.5;
                }
            }.bind(this)).detach().appendTo(this);
        });

        return this;
    };

    var autoplaytime = 3000;
    $(".slider-scroll").randomize().slick({
    slidesToScroll: 1,
        initialSlide: 0,
      pauseOnFocus: false,
      pauseOnHover: false,
      dots:false,
     arrows:false,
     autoplay:true,
     autoplaySpeed:autoplaytime,
    });

  const slider = $(".slider-scroll");
  var scrollCount = null;
  var scroll= null;

  slider.on('wheel', (function(e) {
    e.preventDefault();

    clearTimeout(scroll);
    scroll = setTimeout(function(){scrollCount=0;}, 200);
    if(scrollCount) return 0;
    scrollCount=1;

    if (e.originalEvent.deltaY < 0) {
      $(this).slick('slickNext');
    } else {
      $(this).slick('slickPrev');
    }

  }));

});

$(window).on("load",function() {
    if( $('.slick-track').is(':empty') ) {
        $('.notEvent').addClass('show');
    }
});

$(".slider-scroll .slick-current video").on('ended',function(){
    $('.slider-scroll').slick('slickPlay');
});

// On slide change, pause all videos
$('.slider-scroll').on('beforeChange', function(event, slick, currentSlide, nextSlide){
  $('video').each(function() {
    $(this).get(0).pause();
  });
});

// On slide chnage, play a video inside the current slide
$('.slider-scroll').on('afterChange', function(event, slick, currentSlide, nextSlide){
  if( $('.slick-slide.slick-current').find('video').length !== 0)
    {
        $(".slider-scroll .slick-current video")[0].play();
        $('.slider-scroll').slick('slickPause');
    }
});

Any help or pointers would be much appreciated! Thanks.


问:
Can't regain static ip after losing connection
I'm using the networking module to control my network over ubuntu 16, with this wifi driver: https://github.com/morrownr/88x2bu-20210702
I configured static IP using the /etc/network/interfaces  file.
The computer is installed on a moving robot so the link quality of the wifi is changing and can drop until a level that the robot loses its connection.
I've printed to file both the iwconfig and ifconfig commands, and I can see that when the robot loses connection and returns, it's still connected to an access point with high link quality, but it can't gain the IP again when checking the ifconfig.
It doesn't happen every time.
What can I check in order to investage it?


问:
Scroll event is not firing during initial page load in backbone js
I have a horizontal scroll with arrows for move hovering at both ends of the scroll as below
(https://i.stack.imgur.com/T3yBx.png)
The both arrows at the top left and right needs to be disabled the scroll is left most and right most respectively.

This is working fine with below code

```<code>  $('#scrollContainer').on('scroll', function () {
      if($(this).scrollLeft() + $(this).innerWidth() >= $(this)[0].scrollWidth) {
        document.getElementById('rightScroll').disabled = true;
      } else if($(this).scrollLeft() === 0) {
        document.getElementById('leftScroll').disabled  = true;

      } else {
        document.getElementById('leftScroll').disabled  = false;
        document.getElementById('rightScroll').disabled = false;
      }
    });
</code>```

Above code is written inside a method that is called by below events

```<code>this.$filter = $('.classname');
    this.$filter .delegate(this.controlSelector, 'mouseenter', this.scroller.bind(this))
      .delegate(this.controlSelector, 'mouseleave', this.stopScroller.bind(this))
      .delegate(this.controlSelector, 'keypress', this.scroller.bind(this))
      .delegate(this.controlSelector, 'keyup', this.stopScroller.bind(this));
</code>```

But once the page loads initially, the left arrow will be disabled , as expected. But if I manually scroll using the scroller, nothing happens. I tried to debug and the scroll event is not fired. But when I tried to hover over the right arrow, the scroll happened correctly by enabling the left arrow. And after that if try to scroll using the scroller, the arrows are rightly disabled based on scroll position.
The issue is using the scroller, the arrows are not enabled or disabled based on scroll position.

Body:
I have a horizontal scroll with arrows for move hovering at both ends of the scroll as below
(https://i.stack.imgur.com/T3yBx.png)
The both arrows at the top left and right needs to be disabled the scroll is left most and right most respectively.

This is working fine with below code

  $('#scrollContainer').on('scroll', function () {
      if($(this).scrollLeft() + $(this).innerWidth() >= $(this)[0].scrollWidth) {
        document.getElementById('rightScroll').disabled = true;
      } else if($(this).scrollLeft() === 0) {
        document.getElementById('leftScroll').disabled  = true;

      } else {
        document.getElementById('leftScroll').disabled  = false;
        document.getElementById('rightScroll').disabled = false;
      }
    });

Above code is written inside a method that is called by below events

this.$filter = $('.classname');
    this.$filter .delegate(this.controlSelector, 'mouseenter', this.scroller.bind(this))
      .delegate(this.controlSelector, 'mouseleave', this.stopScroller.bind(this))
      .delegate(this.controlSelector, 'keypress', this.scroller.bind(this))
      .delegate(this.controlSelector, 'keyup', this.stopScroller.bind(this));

But once the page loads initially, the left arrow will be disabled , as expected. But if I manually scroll using the scroller, nothing happens. I tried to debug and the scroll event is not fired. But when I tried to hover over the right arrow, the scroll happened correctly by enabling the left arrow. And after that if try to scroll using the scroller, the arrows are rightly disabled based on scroll position.
The issue is using the scroller, the arrows are not enabled or disabled based on scroll position.


问:
localstack Could not connect to the endpoint URL: "http://localhost:4566/"
I am trying to connect a aws s3 service from gitlab-ci script but I am keep on getting
Could not connect to the endpoint URL: "http://localhost:4566/". It looks like something has been changed in the latest image of the localstack as it was working fine before.

Below is the docker-compose file

```<code>localstack:
    container_name: config-localstack
    image: localstack/localstack
    ports:
      - '4566-4599:4566-4599'
    environment:
      SERVICES: s3
      DEFAULT_REGION: 'eu-central-1'
      DATA_DIR: /tmp/localstack/data
      HOSTNAME_EXTERNAL: localhost
      HOSTNAME: localstack
</code>```

From gitlab-ci

```<code>do aws s3api head-bucket --bucket test-bucket --endpoint http://localhost:4566 && echo "Success" && break
</code>```

Everything was working fine before but somehow it stopped working and it say Could not connect to the endpoint URL: "http://localhost:4566/"

In the docker-compose file when I change the image to some backward version
image: localstack/localstack:1.2.0, it connect successfully.

I want to know if something is changed in the new image and do I need to change something at my end.

Body:
I am trying to connect a aws s3 service from gitlab-ci script but I am keep on getting
Could not connect to the endpoint URL: "http://localhost:4566/". It looks like something has been changed in the latest image of the localstack as it was working fine before.

Below is the docker-compose file

localstack:
    container_name: config-localstack
    image: localstack/localstack
    ports:
      - '4566-4599:4566-4599'
    environment:
      SERVICES: s3
      DEFAULT_REGION: 'eu-central-1'
      DATA_DIR: /tmp/localstack/data
      HOSTNAME_EXTERNAL: localhost
      HOSTNAME: localstack

From gitlab-ci

do aws s3api head-bucket --bucket test-bucket --endpoint http://localhost:4566 && echo "Success" && break

Everything was working fine before but somehow it stopped working and it say Could not connect to the endpoint URL: "http://localhost:4566/"

In the docker-compose file when I change the image to some backward version
image: localstack/localstack:1.2.0, it connect successfully.

I want to know if something is changed in the new image and do I need to change something at my end.


问:
Foxit-reader shows annoying message when I connect iPhone to iMac
I use foxit-reader in my iMac computer. I noticed that whenever I connect my iphone to my iMac with USB connector, and if foxit-reader is open then I get annoying message popup like below

Is there any way to stop this message? I am using latest version of foxit-reader and iOS.

Any pointer will be very helpful.


问:
How to crop an image to fit grid cell (for slider)?
screenshot of css grid

I need a little help here, I need to make a slider, which is doing a comparison between 2 png images. I know how to make this for NON-transparrent pictures, but here I have 2 png cats width transparent bg.

Problem is that one cat should overlap another 1, but it looks impossible with 2 pngs.

I tried this code, but it doesn't work :(

```<code>kitties {
    display: grid;
    overflow: hidden;
    max-width: 592px;
    margin: 0 auto;
    grid-template-columns: 50% 1fr;
  }
.slider__fat-cat--range {
  .outline(red);
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  overflow: hidden;
  z-index: 2;
  object-fit: fill;
}
.slider__skinny-cat--range {
  .outline(rgb(0, 254, 59));
  justify-content: end;
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  overflow: hidden;
  z-index: 1;
}
</code>```

I tried to use css grid and position: absolute, but pasts of the 2nd png is always visible behind 1st

Body:
screenshot of css grid

I need a little help here, I need to make a slider, which is doing a comparison between 2 png images. I know how to make this for NON-transparrent pictures, but here I have 2 png cats width transparent bg.

Problem is that one cat should overlap another 1, but it looks impossible with 2 pngs.

I tried this code, but it doesn't work :(

kitties {
    display: grid;
    overflow: hidden;
    max-width: 592px;
    margin: 0 auto;
    grid-template-columns: 50% 1fr;
  }
.slider__fat-cat--range {
  .outline(red);
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  overflow: hidden;
  z-index: 2;
  object-fit: fill;
}
.slider__skinny-cat--range {
  .outline(rgb(0, 254, 59));
  justify-content: end;
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  overflow: hidden;
  z-index: 1;
}

I tried to use css grid and position: absolute, but pasts of the 2nd png is always visible behind 1st


问:
upgrading from node 14x to 18x on server
I have a node js project running in node v14.17.2 and it time to upgrade i thought v18.13.0
and im really afraid that something will break on the server once i change the version
to run it localy i needed to change npm istanll to npm install --legacy-peer-deps
and then to do :

```<code>npm install node-sass --legacy-peer-deps
npm rebuild node-sass
npm audit fix --legacy-peer-deps
</code>```

so if ill add these steps my app  should be fine? is there any other things i need to do befor upgrading the version?
pre-upgraded pacakge.json:

```<code>{
  "name": "react-app",
  "version": "1.1.8",
  "private": true,
  "dependencies": {
    "@date-io/moment": "1.3.13",
    "@material-ui/core": "3.0.2",
    "@material-ui/icons": "3.0.1",
    "@nivo/core": "^0.73.0",
    "@nivo/pie": "^0.73.0",
    "auth0-lock": "11.30.2",
    "autosuggest-highlight": "3.1.1",
    "axios": "0.21.1",
    "axios-mock-adapter": "1.19.0",
    "chart.js": "^2.7.2",
    "classnames": "^2.3.1",
    "core-js": "^3.14.0",
    "downshift": "6.1.3",
    "formsy-react": "2.2.5",
    "jodit-react": "^1.1.1",
    "jss": "^9.8.7",
    "jss-extend": "6.2.0",
    "jss-rtl": "^0.3.0",
    "jwt-decode": "3.1.2",
    "keycode": "2.2.0",
    "lodash": "4.17.21",
    "material-ui-pickers": "^2.2.4",
    "mobile-detect": "1.4.5",
    "moment": "^2.29.1",
    "node-sass": "^4.14.1",
    "path-to-regexp": "6.2.0",
    "perfect-scrollbar": "1.4.0",
    "postcss": "^8.3.5",
    "prismjs": "1.23.0",
    "prop-types": "^15.7.2",
    "qs": "6.10.1",
    "raw-loader": "4.0.2",
    "react": "17.0.2",
    "react-autosuggest": "10.1.0",
    "react-big-calendar": "0.33.5",
    "react-chartjs-2": "2.7.4",
    "react-cookie": "^4.0.3",
    "react-credit-cards": "^0.8.3",
    "react-dnd": "14.0.2",
    "react-dnd-html5-backend": "14.0.0",
    "react-dom": "17.0.2",
    "react-facebook-pixel": "^1.0.4",
    "react-google-charts": "^3.0.15",
    "react-gtm-module": "^2.0.11",
    "react-jss": "^8.6.1",
    "react-number-format": "4.6.3",
    "react-popper": "2.2.5",
    "react-redux": "7.2.4",
    "react-rnd": "^10.3.7",
    "react-router-config": "5.1.1",
    "react-router-dom": "4.3.1",
    "react-scripts": "^2.1.1",
    "react-select": "4.3.1",
    "react-signature-canvas": "^1.0.6",
    "react-swipeable-views": "0.14.0",
    "react-table": "^6.8.6",
    "react-text-mask": "5.4.3",
    "react-to-print": "^2.14.0",
    "redux": "4.1.0",
    "redux-thunk": "2.3.0",
    "typeface-roboto": "1.1.13",
    "velocity-react": "1.4.3",
    "yarn": "^1.22.10"
  },
  "scripts": {
    "prebuild": "python ../prebuild.py src/myConstants.js",
    "start": "yarn run build-css-helpers && cross-env PORT=3001 react-scripts start",
    "build": "yarn run build-css-helpers && cross-env NODE_PATH=src react-scripts --max_old_space_size=4096 build",
    "build-css-helpers": "./node_modules/.bin/tailwind build ./src/styles/fuse-helpers.tailwind.css -c ./tailwind.js -o ./src/styles/fuse-helpers.css && postcss --use autoprefixer -o ./src/styles/fuse-helpers.css ./src/styles/fuse-helpers.css",
    "test": "cross-env NODE_PATH=src react-scripts test --env=jsdom",
    "eject": "cross-env NODE_PATH=src react-scripts eject",
    "build-docs": "babel-node src/main/content/components/material-ui/build.js",
    "postbuild": "python postbuild.py"
  },
  "devDependencies": {
    "@babel/core": "7.14.6",
    "@babel/preset-env": "7.14.5",
    "autoprefixer": "9.1.5",
    "cross-env": "7.0.3",
    "js-beautify": "1.14.0",
    "marked": "2.1.1",
    "postcss-cli": "8.3.1",
    "tailwindcss": "0.6.5"
  },
  "engines": {
    "node": ">=14.17.0",
    "npm": ">=6.0.0"
  },
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ]
}
</code>```

i know i have pacakges to upgrqade i want to start just with node

Body:
I have a node js project running in node v14.17.2 and it time to upgrade i thought v18.13.0
and im really afraid that something will break on the server once i change the version
to run it localy i needed to change npm istanll to npm install --legacy-peer-deps
and then to do :

npm install node-sass --legacy-peer-deps
npm rebuild node-sass
npm audit fix --legacy-peer-deps

so if ill add these steps my app  should be fine? is there any other things i need to do befor upgrading the version?
pre-upgraded pacakge.json:

{
  "name": "react-app",
  "version": "1.1.8",
  "private": true,
  "dependencies": {
    "@date-io/moment": "1.3.13",
    "@material-ui/core": "3.0.2",
    "@material-ui/icons": "3.0.1",
    "@nivo/core": "^0.73.0",
    "@nivo/pie": "^0.73.0",
    "auth0-lock": "11.30.2",
    "autosuggest-highlight": "3.1.1",
    "axios": "0.21.1",
    "axios-mock-adapter": "1.19.0",
    "chart.js": "^2.7.2",
    "classnames": "^2.3.1",
    "core-js": "^3.14.0",
    "downshift": "6.1.3",
    "formsy-react": "2.2.5",
    "jodit-react": "^1.1.1",
    "jss": "^9.8.7",
    "jss-extend": "6.2.0",
    "jss-rtl": "^0.3.0",
    "jwt-decode": "3.1.2",
    "keycode": "2.2.0",
    "lodash": "4.17.21",
    "material-ui-pickers": "^2.2.4",
    "mobile-detect": "1.4.5",
    "moment": "^2.29.1",
    "node-sass": "^4.14.1",
    "path-to-regexp": "6.2.0",
    "perfect-scrollbar": "1.4.0",
    "postcss": "^8.3.5",
    "prismjs": "1.23.0",
    "prop-types": "^15.7.2",
    "qs": "6.10.1",
    "raw-loader": "4.0.2",
    "react": "17.0.2",
    "react-autosuggest": "10.1.0",
    "react-big-calendar": "0.33.5",
    "react-chartjs-2": "2.7.4",
    "react-cookie": "^4.0.3",
    "react-credit-cards": "^0.8.3",
    "react-dnd": "14.0.2",
    "react-dnd-html5-backend": "14.0.0",
    "react-dom": "17.0.2",
    "react-facebook-pixel": "^1.0.4",
    "react-google-charts": "^3.0.15",
    "react-gtm-module": "^2.0.11",
    "react-jss": "^8.6.1",
    "react-number-format": "4.6.3",
    "react-popper": "2.2.5",
    "react-redux": "7.2.4",
    "react-rnd": "^10.3.7",
    "react-router-config": "5.1.1",
    "react-router-dom": "4.3.1",
    "react-scripts": "^2.1.1",
    "react-select": "4.3.1",
    "react-signature-canvas": "^1.0.6",
    "react-swipeable-views": "0.14.0",
    "react-table": "^6.8.6",
    "react-text-mask": "5.4.3",
    "react-to-print": "^2.14.0",
    "redux": "4.1.0",
    "redux-thunk": "2.3.0",
    "typeface-roboto": "1.1.13",
    "velocity-react": "1.4.3",
    "yarn": "^1.22.10"
  },
  "scripts": {
    "prebuild": "python ../prebuild.py src/myConstants.js",
    "start": "yarn run build-css-helpers && cross-env PORT=3001 react-scripts start",
    "build": "yarn run build-css-helpers && cross-env NODE_PATH=src react-scripts --max_old_space_size=4096 build",
    "build-css-helpers": "./node_modules/.bin/tailwind build ./src/styles/fuse-helpers.tailwind.css -c ./tailwind.js -o ./src/styles/fuse-helpers.css && postcss --use autoprefixer -o ./src/styles/fuse-helpers.css ./src/styles/fuse-helpers.css",
    "test": "cross-env NODE_PATH=src react-scripts test --env=jsdom",
    "eject": "cross-env NODE_PATH=src react-scripts eject",
    "build-docs": "babel-node src/main/content/components/material-ui/build.js",
    "postbuild": "python postbuild.py"
  },
  "devDependencies": {
    "@babel/core": "7.14.6",
    "@babel/preset-env": "7.14.5",
    "autoprefixer": "9.1.5",
    "cross-env": "7.0.3",
    "js-beautify": "1.14.0",
    "marked": "2.1.1",
    "postcss-cli": "8.3.1",
    "tailwindcss": "0.6.5"
  },
  "engines": {
    "node": ">=14.17.0",
    "npm": ">=6.0.0"
  },
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ]
}

i know i have pacakges to upgrqade i want to start just with node


问:
Watch Position of geoLocation not providing right coordinates as user moves in React Native
I am trying to call watch position on UserLocationChange method of react-native-maps.. the resultant coordinates from watch position make my marker move  to different position then my exact position it moves in zig zag motion on moving.....
unable to figure out whats wrong here

onUserLocationChange={e => {

```<code>          if (gsBit == '3' || gsBit == '2') {
            if (e.nativeEvent.coordinate.accuracy < 10) {
              setAccurecy('low')
              // console.log('low-->',e.nativeEvent.coordinate.accuracy);
            } else if (e.nativeEvent.coordinate.accuracy < 15) {
              setAccurecy('medium')
              // console.log('medume-->',e.nativeEvent.coordinate.accuracy);

            } else {
              setAccurecy('high')

              // console.log('heigh-->',e.nativeEvent.coordinate.accuracy);

            }
            //    console.log(e.nativeEvent.coordinate.longitude);
            if (startCollaction) {
           let watchId=   Geolocation.watchPosition(position => {
            setPositionMarker({
              latitude:position.coords.latitude,
              longitude:position.coords.longitude,
              latitudeDelta:0.009,
              longitudeDelta:0.009
             })
                 let data = [...polylinePoints]
             data.push({
                  latitude: position.coords.latitude,
                  longitude: position.coords.longitude,
                  latitudeDelta: LATITUDE_DELTA,
                  longitudeDelta: LONGITUDE_DELTA,
                })
                setMarkerLatitude(position.coords.latitude)
                setMarkerLongitude(position.coords.longitude)
                console.log("watch location ", position)
                SetPolylinePoints(data)
                SetPolygonPoint(data)
                if (Platform.OS === 'android') {
                  if (marker) {
                    marker.animateMarkerToCoordinate(positionmarker, 5000);
                  }
                } else {
                  coordinate.timing(positionmarker).start();
                }

                Geolocation.clearWatch(watchId);
               },
               { enableHighAccuracy: true, timeout: 200000, maximumAge: 1000,distanceFilter:2 }

               )

             console.log("data in arrau ", polylinePoints )
              if(polylinePoints.length>0)
              {
              let lastvalue = polylinePoints[polylinePoints?.length - 1]
              console.log(lastvalue);
               distance = getDistance(
                {
                  latitude: lastvalue?.latitude,
                  latitudeDelta: 0.009,
                  longitude: lastvalue?.longitude,
                  longitudeDelta: 0.009,
                },
                {
                  latitude: latitudec,
                  latitudeDelta: 0.009,
                  longitude: longitudec,
                  longitudeDelta: 0.009,
                },
              );
              console.log("distance ", distance);
              console.log("last Value ",lastvalue?.latitude , lastvalue?.longitude )
              console.log("old assets ",oldAssate)
          //    if (distance > 2) {
          //     var datapushed =[
          //       { latitude:latitudec,
          //         longitude:longitudec,
          //         atitudeDelta: LATITUDE_DELTA,
          //       longitudeDelta: LONGITUDE_DELTA,

          //       }
          //     ]
          //     datapushed.push({latitude:lastvalue?.latitude,
          //       longitude:lastvalue?.longitide,
          //       latitudeDelta: LATITUDE_DELTA,
          //       longitudeDelta: LONGITUDE_DELTA,})
          //  SetPolylinePoints(datapushed)
          //     }

          //     }
              }
            }
          }
        }
      }
        initialRegion={getMapRegion()}>
        {oldAssate?.length > 0
          ? oldAssate?.map(e => {
            // console.log(e.value);

            return (
              <>

                <Marker
                  description={e.value.asset_title}
                  coordinate={{
                    latitude: latitudec,
                    longitude: longitudec,
                    latitudeDelta: 0.009,
                    longitudeDelta: 0.009
                  }}
                  title={e.value.asset_title}></Marker>

                  { markerLatitude == 0 || markerLongitude == 0  ?  null :
                  (

                <Marker
                  description={e.value.asset_title}
                  coordinate={
                    {
                      latitude: markerLatitude,
                      longitude: markerLongitude,
                      latitudeDelta: 0.009,
                      longitudeDelta: 0.009
                    }
                  }
                  ref={marker => {
                    setMarker(marker);
                  }}
                  title={"travelling"}></Marker>
                  )
                }

              </>
            );
          })
          : null}
        { (polylinePoints.length > 0 && distance > 1  ) && ( gsBit == '2' && startpolygon)  ? (

          <Polyline
            coordinates={polylinePoints}
            strokeColor="blue"
            fillColor="rgb(0,0,255)"
            strokeWidth={3}
          />

        ) : null}`your text`
</code>```

Body:
I am trying to call watch position on UserLocationChange method of react-native-maps.. the resultant coordinates from watch position make my marker move  to different position then my exact position it moves in zig zag motion on moving.....
unable to figure out whats wrong here

onUserLocationChange={e => {

          if (gsBit == '3' || gsBit == '2') {
            if (e.nativeEvent.coordinate.accuracy < 10) {
              setAccurecy('low')
              // console.log('low-->',e.nativeEvent.coordinate.accuracy);
            } else if (e.nativeEvent.coordinate.accuracy < 15) {
              setAccurecy('medium')
              // console.log('medume-->',e.nativeEvent.coordinate.accuracy);

            } else {
              setAccurecy('high')

              // console.log('heigh-->',e.nativeEvent.coordinate.accuracy);

            }
            //    console.log(e.nativeEvent.coordinate.longitude);
            if (startCollaction) {
           let watchId=   Geolocation.watchPosition(position => {
            setPositionMarker({
              latitude:position.coords.latitude,
              longitude:position.coords.longitude,
              latitudeDelta:0.009,
              longitudeDelta:0.009
             })
                 let data = [...polylinePoints]
             data.push({
                  latitude: position.coords.latitude,
                  longitude: position.coords.longitude,
                  latitudeDelta: LATITUDE_DELTA,
                  longitudeDelta: LONGITUDE_DELTA,
                })
                setMarkerLatitude(position.coords.latitude)
                setMarkerLongitude(position.coords.longitude)
                console.log("watch location ", position)
                SetPolylinePoints(data)
                SetPolygonPoint(data)
                if (Platform.OS === 'android') {
                  if (marker) {
                    marker.animateMarkerToCoordinate(positionmarker, 5000);
                  }
                } else {
                  coordinate.timing(positionmarker).start();
                }

                Geolocation.clearWatch(watchId);
               },
               { enableHighAccuracy: true, timeout: 200000, maximumAge: 1000,distanceFilter:2 }

               )

             console.log("data in arrau ", polylinePoints )
              if(polylinePoints.length>0)
              {
              let lastvalue = polylinePoints[polylinePoints?.length - 1]
              console.log(lastvalue);
               distance = getDistance(
                {
                  latitude: lastvalue?.latitude,
                  latitudeDelta: 0.009,
                  longitude: lastvalue?.longitude,
                  longitudeDelta: 0.009,
                },
                {
                  latitude: latitudec,
                  latitudeDelta: 0.009,
                  longitude: longitudec,
                  longitudeDelta: 0.009,
                },
              );
              console.log("distance ", distance);
              console.log("last Value ",lastvalue?.latitude , lastvalue?.longitude )
              console.log("old assets ",oldAssate)
          //    if (distance > 2) {
          //     var datapushed =[
          //       { latitude:latitudec,
          //         longitude:longitudec,
          //         atitudeDelta: LATITUDE_DELTA,
          //       longitudeDelta: LONGITUDE_DELTA,

          //       }
          //     ]
          //     datapushed.push({latitude:lastvalue?.latitude,
          //       longitude:lastvalue?.longitide,
          //       latitudeDelta: LATITUDE_DELTA,
          //       longitudeDelta: LONGITUDE_DELTA,})
          //  SetPolylinePoints(datapushed)
          //     }

          //     }
              }
            }
          }
        }
      }
        initialRegion={getMapRegion()}>
        {oldAssate?.length > 0
          ? oldAssate?.map(e => {
            // console.log(e.value);

            return (
              <>

                <Marker
                  description={e.value.asset_title}
                  coordinate={{
                    latitude: latitudec,
                    longitude: longitudec,
                    latitudeDelta: 0.009,
                    longitudeDelta: 0.009
                  }}
                  title={e.value.asset_title}></Marker>

                  { markerLatitude == 0 || markerLongitude == 0  ?  null :
                  (

                <Marker
                  description={e.value.asset_title}
                  coordinate={
                    {
                      latitude: markerLatitude,
                      longitude: markerLongitude,
                      latitudeDelta: 0.009,
                      longitudeDelta: 0.009
                    }
                  }
                  ref={marker => {
                    setMarker(marker);
                  }}
                  title={"travelling"}></Marker>
                  )
                }

              </>
            );
          })
          : null}
        { (polylinePoints.length > 0 && distance > 1  ) && ( gsBit == '2' && startpolygon)  ? (

          <Polyline
            coordinates={polylinePoints}
            strokeColor="blue"
            fillColor="rgb(0,0,255)"
            strokeWidth={3}
          />

        ) : null}`your text`


问:
Date of creation is older than previous day until 6am
I have app where is datagridview with data from sql database - and a want to modify every row. I have button for this and if i will click there will appear new Form and there I can modify every record, but I want to that user can edit only records up to the previous day until 6 am , later records user cannot modify.

```<code>if (DateTime.Parse(labelDate.Text) < DateTime.Now.AddDays(-2))
{

      labelNotice.Text = "Cannot modify records older than 2 days"
      button1.Enabled = false;

 }
</code>```

My problem is that i dont know how to make date-time limit for this. I have labelDate where I have date of creation and I need to compare with actual date and time and I need to app will say to user that if labelDate is older than previous day until 6am you cannot modify nothing. Now I have only compare date of creation and if its 2 days older button1 will be disabled.

But I need date and time to compare.

Body:
I have app where is datagridview with data from sql database - and a want to modify every row. I have button for this and if i will click there will appear new Form and there I can modify every record, but I want to that user can edit only records up to the previous day until 6 am , later records user cannot modify.

if (DateTime.Parse(labelDate.Text) < DateTime.Now.AddDays(-2))
{

      labelNotice.Text = "Cannot modify records older than 2 days"
      button1.Enabled = false;

 }

My problem is that i dont know how to make date-time limit for this. I have labelDate where I have date of creation and I need to compare with actual date and time and I need to app will say to user that if labelDate is older than previous day until 6am you cannot modify nothing. Now I have only compare date of creation and if its 2 days older button1 will be disabled.

But I need date and time to compare.


问:
Flutter: hot to add two web platforms
I would like to have two web apps in my flutter application, one for website and second for Chrome extension.

How to add second the same platform? I've tried a flutter config  --enable-web  --build-dir=web2 but this is not working.

I expected the structure of directories:

```<code>app
  - lib
  - web
  - web2
</code>```

Title: Flutter: hot to add two web platforms

Body:
I would like to have two web apps in my flutter application, one for website and second for Chrome extension.

How to add second the same platform? I've tried a flutter config  --enable-web  --build-dir=web2 but this is not working.

I expected the structure of directories:

app
  - lib
  - web
  - web2


问:
Firebase emulators, on startup, creates multiple "firebase-export..." folders outside of my --import path at the root of my project
In my package.json I have the following dev script, that runs start:emulators. The script goes to the root of my project and then runs emulators:start, which sets the import path to ./saved-data.

```<code>"start:emulators": "cd ~/AndroidStudioProjects/order_fulfillment && firebase emulators:start --import=./saved-data --export-on-exit",
"dev": "concurrently --kill-others \"npm run start:emulators\" \"npm run ts:watch\"",
</code>```

This work just fine, and my data always successfully imports and exports to the saved-data directory at the root of my project. However, this process also creates artifacts that I have to constantly delete from the root of my project. Anyone know why? It is more annoying than anything else. I just have to keep clearing them from time to time. They seem to have no bearing on exported data in the saved-data directory.

Firebase docs state "--export-on-exit= Optional...The export directory can be specified with this flag: firebase emulators:start --export-on-exit=./saved-data. If --import is used, the export path defaults to the same; for example: firebase emulators:start --import=./data-path --export-on-exit." I don't see anything in the docs about these artifact firebase-export... folders purpose at the root.

Body:
In my package.json I have the following dev script, that runs start:emulators. The script goes to the root of my project and then runs emulators:start, which sets the import path to ./saved-data.

"start:emulators": "cd ~/AndroidStudioProjects/order_fulfillment && firebase emulators:start --import=./saved-data --export-on-exit",
"dev": "concurrently --kill-others \"npm run start:emulators\" \"npm run ts:watch\"",

This work just fine, and my data always successfully imports and exports to the saved-data directory at the root of my project. However, this process also creates artifacts that I have to constantly delete from the root of my project. Anyone know why? It is more annoying than anything else. I just have to keep clearing them from time to time. They seem to have no bearing on exported data in the saved-data directory.

Firebase docs state "--export-on-exit= Optional...The export directory can be specified with this flag: firebase emulators:start --export-on-exit=./saved-data. If --import is used, the export path defaults to the same; for example: firebase emulators:start --import=./data-path --export-on-exit." I don't see anything in the docs about these artifact firebase-export... folders purpose at the root.


问:
Handle subscription renewals via the in-app Google Play dashboard
Implemented in our subscription app, we validate it via the backend on Google, informing the token and the purchase ID. But when a user renews through the Google panel, we cannot know which token

What parameters can we use to activate the new renewed subscription through the Google Play panel? Since the purchaseToken and orderID are different from the previous one registered in the backend.

Thanks!


问:
during Nginx hosting (nodejs) pm2 status ocured error
during hosting when uploading my website by cloning git and added to the nginx but when starting the server by using the command PM2 START SERVER.JS it shows status as error

during hosting when uploading my website by cloning git and added to the nginx but when starting the server by using the command PM2 START SERVER.JS it shows status as error


问:
How can I make a gnome shell extension that makes a little web browser window popup under the menubar icon?
I created the appropriate folders for gnome extensions to load the extension. It is visible in Gnome Extensions. Here is the extension.js file which is the main file.

```<code>const St = imports.gi.St;
const Main = imports.ui.main;
const Soup = imports.gi.Soup;
const Lang = imports.lang;

let _httpSession;

const ExampleExtension = new Lang.Class({
    Name: 'ExampleExtension',
    Extends: imports.misc.extensionUtils.Extension,

    _init: function() {
        this.parent();

        // create the menubar icon
        this._icon = new St.Bin({ style_class: 'panel-button',
                                 reactive: true,
                                 can_focus: true,
                                 x_fill: true,
                                 y_fill: false,
                                 track_hover: true });
        let icon = new St.Icon({ icon_name: 'system-run-symbolic',
                                 style_class: 'system-status-icon' });
        this._icon.set_child(icon);

        // handle the 'clicked' event on the menubar icon
        this._icon.connect('button-press-event', Lang.bind(this, this._onButtonPress));

        // add the menubar icon to the panel
        Main.panel.addToStatusArea('example-extension', this._icon);
    },

    _onButtonPress: function() {
        let message = Soup.Message.new('GET', 'https://example.com');
        _httpSession.queue_message(message, Lang.bind(this, function(session, message) {
            if (!message.response_body.data)
                return;

            // create the popup window
            let popup = new imports.ui.popupMenu.PopupMenu(this._icon, 0.5, St.Side.BOTTOM);

            // create a new actor to hold the website
            let webView = new St.BoxLayout({ style_class: 'example-webview',
                                             vertical: true });

            // add the website to the popup
            webView.add_actor(new St.Label({ text: message.response_body.data, style_class: 'example-webview-label' }));
            popup.addActor(webView);

            // show the popup
            popup.open();
        }));
    },
});

function init() {
    _httpSession = new Soup.Session();
}

function enable() {
    exampleExtension = new ExampleExtension();
}

function disable() {
    exampleExtension.destroy();
}

</code>```

I cant get the little web browser window to popup, I am not sure what I am doing wrong here. Please help out.

Body:
I created the appropriate folders for gnome extensions to load the extension. It is visible in Gnome Extensions. Here is the extension.js file which is the main file.

const St = imports.gi.St;
const Main = imports.ui.main;
const Soup = imports.gi.Soup;
const Lang = imports.lang;

let _httpSession;

const ExampleExtension = new Lang.Class({
    Name: 'ExampleExtension',
    Extends: imports.misc.extensionUtils.Extension,

    _init: function() {
        this.parent();

        // create the menubar icon
        this._icon = new St.Bin({ style_class: 'panel-button',
                                 reactive: true,
                                 can_focus: true,
                                 x_fill: true,
                                 y_fill: false,
                                 track_hover: true });
        let icon = new St.Icon({ icon_name: 'system-run-symbolic',
                                 style_class: 'system-status-icon' });
        this._icon.set_child(icon);

        // handle the 'clicked' event on the menubar icon
        this._icon.connect('button-press-event', Lang.bind(this, this._onButtonPress));

        // add the menubar icon to the panel
        Main.panel.addToStatusArea('example-extension', this._icon);
    },

    _onButtonPress: function() {
        let message = Soup.Message.new('GET', 'https://example.com');
        _httpSession.queue_message(message, Lang.bind(this, function(session, message) {
            if (!message.response_body.data)
                return;

            // create the popup window
            let popup = new imports.ui.popupMenu.PopupMenu(this._icon, 0.5, St.Side.BOTTOM);

            // create a new actor to hold the website
            let webView = new St.BoxLayout({ style_class: 'example-webview',
                                             vertical: true });

            // add the website to the popup
            webView.add_actor(new St.Label({ text: message.response_body.data, style_class: 'example-webview-label' }));
            popup.addActor(webView);

            // show the popup
            popup.open();
        }));
    },
});

function init() {
    _httpSession = new Soup.Session();
}

function enable() {
    exampleExtension = new ExampleExtension();
}

function disable() {
    exampleExtension.destroy();
}

I cant get the little web browser window to popup, I am not sure what I am doing wrong here. Please help out.


问:
Apache webserver on ubuntu giving error 500 remotely, works fine on the local machine
I have a small PC that I am using as a web kiosk. Running ubuntu 20.04 with a typical lamp stack. I have installed the lamp stack as I normally do (I have a few machines with apache around here) but for some reason this new PC I just got (with preinstalled ubuntu) is giving me a headache I cannot figure out.

When the system loads it auto logs in and boots to the kiosk, using snap and wpe-webkit-mir-kiosk. That part works fine. The issue is when I try to load the site from another machine, it gives me an Error 500. The website has an admin backend that I need to be able to access. The backend is nothing crazy, just a simple user login system with the ability to post some data to mysql that I made. The site works 100% on my main computer that I developed it on, and it works remotely while on my main machine. I zipped all the files and copied them over to the new PC unzipped and now its giving me the 500 error when trying to access from any other PC.

Small testing php files like a simple echo statement or phpinfo will load just fine locally and remotely. phpmyadmin also loads just fine remotely and locally.

What could be the issue? Why would it load locally and give a 500 error remotely? I am at a loss.

I have tried uninstalling/purging/reinstalling the lamp stack. UFW is disabled, I've cleared cache and tried other browser and other machines. Still won't load remotely.


问:
How can I extract all the error message from message tag
```<code><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Server</faultcode>
         <faultstring>XXXException</faultstring>
         <detail>
            <XXXFault xmlns="http://services.webservices.xxxxxx.com/xsd">
               <exceptionName>com.xxxxxx.common.exceptions.ValidationException</exceptionName>
               <message>One or more Fields specified failed Validation:

Last Name: Validation Exception:
A value was not specified for Required Field = 'Last Name'
Salutation: Validation Exception:
A value was not specified for Required Field = 'Salutation'
First Name: Validation Exception:
A value was not specified for Required Field = 'First Name'
State: Validation Exception:
A value was not specified for Required Field = 'State'</message>
            </XXXFault>
         </detail>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>
</code>```

This is SOAP response for a SOAP request and I want to get all the error message [A value was not specified for Required Field = 'Last Name' and A value was not specified for Required Field = 'Salutation' and A value was not specified for Required Field = 'First Name' and A value was not specified for Required Field = 'State'].

Body:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Server</faultcode>
         <faultstring>XXXException</faultstring>
         <detail>
            <XXXFault xmlns="http://services.webservices.xxxxxx.com/xsd">
               <exceptionName>com.xxxxxx.common.exceptions.ValidationException</exceptionName>
               <message>One or more Fields specified failed Validation:

Last Name: Validation Exception:
A value was not specified for Required Field = 'Last Name'
Salutation: Validation Exception:
A value was not specified for Required Field = 'Salutation'
First Name: Validation Exception:
A value was not specified for Required Field = 'First Name'
State: Validation Exception:
A value was not specified for Required Field = 'State'</message>
            </XXXFault>
         </detail>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

This is SOAP response for a SOAP request and I want to get all the error message [A value was not specified for Required Field = 'Last Name' and A value was not specified for Required Field = 'Salutation' and A value was not specified for Required Field = 'First Name' and A value was not specified for Required Field = 'State'].


问:
How to find the GUI elements in Desktop page using Sikuli without taking Image Screenshot
I am able to capture GUI elements in Desktop page using Sikuli by taking image screenshot..Can any one help me how to find GUI elements in Desktop page using Sikuli without taking image Screenshot?</p>


问:
CodeCeption fails to run Cest class but not individual tests
This is my Cest class:

```<code><?php

namespace App\Tests\functional;

use App\Entity\AssetsRecord;
use App\Entity\Provider;
use App\Entity\User;
use App\Tests\FunctionalTester;
use App\Tests\Page\Functional\AssetsRecordIndexPage;

class AssetsRecordIndexCest
{
    const FIRST_PROVIDER_NAME = "Provider 1";
    const SECOND_PROVIDER_NAME = "Provider 2";
    const THIRD_PROVIDER_NAME = "Provider 3";
    const FIRST_ASSETS_RECORD_VALUE = 1000;
    const SECOND_ASSETS_RECORD_VALUE = 2000;
    const THIRD_ASSETS_RECORD_VALUE = 3000;

    private array $providers;

    /**
     * @var array <AssetsRecord>
     */
    private array $assetsRecords = [];

    private User $singleProviderOperator;
    private User $doubleProviderOperator;

    public function _before(FunctionalTester $I)
    {
        $this->buildProviders($I);
        $I->haveProvidersInDB($this->providers);

        $this->buildAssetsRecords($I);
        $I->haveAssetsRecordsInDB($this->assetsRecords);

        $this->buildOperators($I);
        $I->haveInRepository($this->singleProviderOperator);
        $I->haveInRepository($this->doubleProviderOperator);
    }

    // tests
    public function shouldNotShowAssetRecordsForNotEnabledProviders(FunctionalTester $I, AssetsRecordIndexPage $page)
    {
        $I->amLoggedInAs($this->singleProviderOperator);
        $page->doesntShow(...$this->getAssetsRecordsIn($this->providers[self::SECOND_PROVIDER_NAME]));
        $page->doesntShow(...$this->getAssetsRecordsIn($this->providers[self::THIRD_PROVIDER_NAME]));

        $I->amLoggedInAs($this->doubleProviderOperator);
        $page->doesntShow(...$this->getAssetsRecordsIn($this->providers[self::FIRST_PROVIDER_NAME]));
    }

    public function shouldShowAllAssetsRecordsForEnabledProviders(FunctionalTester $I, AssetsRecordIndexPage $page)
    {
        $I->amLoggedInAs($this->singleProviderOperator);
        $page->shows(...$this->getAssetsRecordsIn($this->providers[self::FIRST_PROVIDER_NAME]));

        $I->amLoggedInAs($this->doubleProviderOperator);
        $page->shows(...$this->getAssetsRecordsIn($this->providers[self::SECOND_PROVIDER_NAME]));
        $page->shows(...$this->getAssetsRecordsIn($this->providers[self::THIRD_PROVIDER_NAME]));
    }

    /**
     * @param Provider $provider
     * @return array
     */
    private function getAssetsRecordsIn(Provider $provider): array
    {
        return array_filter($this->assetsRecords, fn(AssetsRecord $assetsRecord) => $assetsRecord->getProvider() === $provider);
    }

    /**
     * @param FunctionalTester $I
     * @return void
     */
    private function buildAssetsRecords(FunctionalTester $I): void
    {
        $this->assetsRecords[] = $I->buildAssetsRecord($this->providers[self::FIRST_PROVIDER_NAME], self::FIRST_ASSETS_RECORD_VALUE);
        $this->assetsRecords[] = $I->buildAssetsRecord($this->providers[self::SECOND_PROVIDER_NAME], self::SECOND_ASSETS_RECORD_VALUE);
        $this->assetsRecords[] = $I->buildAssetsRecord($this->providers[self::THIRD_PROVIDER_NAME], self::THIRD_ASSETS_RECORD_VALUE);
    }

    /**
     * @param FunctionalTester $I
     * @return void
     */
    private function buildProviders(FunctionalTester $I): void
    {
        $this->providers[self::FIRST_PROVIDER_NAME] = $I->buildProvider(self::FIRST_PROVIDER_NAME);
        $this->providers[self::SECOND_PROVIDER_NAME] = $I->buildProvider(self::SECOND_PROVIDER_NAME);
        $this->providers[self::THIRD_PROVIDER_NAME] = $I->buildProvider(self::THIRD_PROVIDER_NAME);
    }

    /**
     * @param FunctionalTester $I
     * @return void
     */
    private function buildOperators(FunctionalTester $I): void
    {
        $this->singleProviderOperator = $I->buildOperatorUserWithProvidersEnabled(
            $this->providers[self::FIRST_PROVIDER_NAME]
        );

        $this->doubleProviderOperator = $I->buildOperatorUserWithProvidersEnabled(
            $this->providers[self::SECOND_PROVIDER_NAME],
            $this->providers[self::THIRD_PROVIDER_NAME]
        );
    }
}
</code>```

When I run the whole class I get this error:

```<code>A new entity was found through the relationship 'App\Entity\AssetsRecord#provider' that was not configured to cascade persist operations for entity: Provider 1. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"}).
</code>```

But if I run each test separetely it works ok and the tests are succesful...

Any idea why this is happening? Thanks!

Body:
This is my Cest class:

<?php

namespace App\Tests\functional;

use App\Entity\AssetsRecord;
use App\Entity\Provider;
use App\Entity\User;
use App\Tests\FunctionalTester;
use App\Tests\Page\Functional\AssetsRecordIndexPage;

class AssetsRecordIndexCest
{
    const FIRST_PROVIDER_NAME = "Provider 1";
    const SECOND_PROVIDER_NAME = "Provider 2";
    const THIRD_PROVIDER_NAME = "Provider 3";
    const FIRST_ASSETS_RECORD_VALUE = 1000;
    const SECOND_ASSETS_RECORD_VALUE = 2000;
    const THIRD_ASSETS_RECORD_VALUE = 3000;

    private array $providers;

    /**
     * @var array <AssetsRecord>
     */
    private array $assetsRecords = [];

    private User $singleProviderOperator;
    private User $doubleProviderOperator;

    public function _before(FunctionalTester $I)
    {
        $this->buildProviders($I);
        $I->haveProvidersInDB($this->providers);

        $this->buildAssetsRecords($I);
        $I->haveAssetsRecordsInDB($this->assetsRecords);

        $this->buildOperators($I);
        $I->haveInRepository($this->singleProviderOperator);
        $I->haveInRepository($this->doubleProviderOperator);
    }

    // tests
    public function shouldNotShowAssetRecordsForNotEnabledProviders(FunctionalTester $I, AssetsRecordIndexPage $page)
    {
        $I->amLoggedInAs($this->singleProviderOperator);
        $page->doesntShow(...$this->getAssetsRecordsIn($this->providers[self::SECOND_PROVIDER_NAME]));
        $page->doesntShow(...$this->getAssetsRecordsIn($this->providers[self::THIRD_PROVIDER_NAME]));

        $I->amLoggedInAs($this->doubleProviderOperator);
        $page->doesntShow(...$this->getAssetsRecordsIn($this->providers[self::FIRST_PROVIDER_NAME]));
    }

    public function shouldShowAllAssetsRecordsForEnabledProviders(FunctionalTester $I, AssetsRecordIndexPage $page)
    {
        $I->amLoggedInAs($this->singleProviderOperator);
        $page->shows(...$this->getAssetsRecordsIn($this->providers[self::FIRST_PROVIDER_NAME]));

        $I->amLoggedInAs($this->doubleProviderOperator);
        $page->shows(...$this->getAssetsRecordsIn($this->providers[self::SECOND_PROVIDER_NAME]));
        $page->shows(...$this->getAssetsRecordsIn($this->providers[self::THIRD_PROVIDER_NAME]));
    }

    /**
     * @param Provider $provider
     * @return array
     */
    private function getAssetsRecordsIn(Provider $provider): array
    {
        return array_filter($this->assetsRecords, fn(AssetsRecord $assetsRecord) => $assetsRecord->getProvider() === $provider);
    }

    /**
     * @param FunctionalTester $I
     * @return void
     */
    private function buildAssetsRecords(FunctionalTester $I): void
    {
        $this->assetsRecords[] = $I->buildAssetsRecord($this->providers[self::FIRST_PROVIDER_NAME], self::FIRST_ASSETS_RECORD_VALUE);
        $this->assetsRecords[] = $I->buildAssetsRecord($this->providers[self::SECOND_PROVIDER_NAME], self::SECOND_ASSETS_RECORD_VALUE);
        $this->assetsRecords[] = $I->buildAssetsRecord($this->providers[self::THIRD_PROVIDER_NAME], self::THIRD_ASSETS_RECORD_VALUE);
    }

    /**
     * @param FunctionalTester $I
     * @return void
     */
    private function buildProviders(FunctionalTester $I): void
    {
        $this->providers[self::FIRST_PROVIDER_NAME] = $I->buildProvider(self::FIRST_PROVIDER_NAME);
        $this->providers[self::SECOND_PROVIDER_NAME] = $I->buildProvider(self::SECOND_PROVIDER_NAME);
        $this->providers[self::THIRD_PROVIDER_NAME] = $I->buildProvider(self::THIRD_PROVIDER_NAME);
    }

    /**
     * @param FunctionalTester $I
     * @return void
     */
    private function buildOperators(FunctionalTester $I): void
    {
        $this->singleProviderOperator = $I->buildOperatorUserWithProvidersEnabled(
            $this->providers[self::FIRST_PROVIDER_NAME]
        );

        $this->doubleProviderOperator = $I->buildOperatorUserWithProvidersEnabled(
            $this->providers[self::SECOND_PROVIDER_NAME],
            $this->providers[self::THIRD_PROVIDER_NAME]
        );
    }
}

When I run the whole class I get this error:

A new entity was found through the relationship 'App\Entity\AssetsRecord#provider' that was not configured to cascade persist operations for entity: Provider 1. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"}).

But if I run each test separetely it works ok and the tests are succesful...

Any idea why this is happening? Thanks!


问:
How to open projects from VS 2019 in VS 2012
At home, I have Visual Studio Community 2019 installed on my pc while in school, we use 2012. When the teacher gave us an activity, I decided to do it at home but found I am unable to open it when I brought it to school. Is there a way for me to open my projects from my later version of VS in the previous version of Vs in my school?

If it's relevant, we're just exploring the most basic of functions and at the moment, it's just on Windows Forms


问:
R tgp package installation under MKL environment
I am working on a server to which I don't have admin rights.
I linked R to MKL for fast linear algebra using a Conda environment following these steps:
Conda install r-essentials with MKL

The linking of R to MKL was successful, the output for R InfoSession() under the activated environment is as follows:

```<code>R version 3.6.3 (2020-02-29) Platform: x86_64-conda-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS/LAPACK:
/userInfo/miniconda3/envs/R_mkl/lib/libmkl_rt.so

locale: [1] C

attached base packages: [1] stats     graphics  grDevices utils
datasets  methods   base

loaded via a namespace (and not attached): [1] compiler_3.6.3
</code>```

My goal is to install and use the R tgp package under this environment.
When trying to install the tgp package with R CMD INSTALL, the installation fails with the following error

libopenblas.so.0: cannot open shared object file: No such file or
directory

This installation succeeds when using the 'regular' R version that is not linked to MKL.
This error concerns OpenBlas while I want to use MKL.

I hope anyone knows how to fix these dependencies knowing I do not have admin rights.

Body:
I am working on a server to which I don't have admin rights.
I linked R to MKL for fast linear algebra using a Conda environment following these steps:
Conda install r-essentials with MKL

The linking of R to MKL was successful, the output for R InfoSession() under the activated environment is as follows:

R version 3.6.3 (2020-02-29) Platform: x86_64-conda-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS/LAPACK:
/userInfo/miniconda3/envs/R_mkl/lib/libmkl_rt.so

locale: [1] C

attached base packages: [1] stats     graphics  grDevices utils
datasets  methods   base

loaded via a namespace (and not attached): [1] compiler_3.6.3

My goal is to install and use the R tgp package under this environment.
When trying to install the tgp package with R CMD INSTALL, the installation fails with the following error

libopenblas.so.0: cannot open shared object file: No such file or
directory

This installation succeeds when using the 'regular' R version that is not linked to MKL.
This error concerns OpenBlas while I want to use MKL.

I hope anyone knows how to fix these dependencies knowing I do not have admin rights.


问:
set aws credentails folder for php apache container
My php application runs in a docker. During development I run the following command where my code is attached as a volume to a folder in the container.

```<code>docker run -d -p 80:80 --name my-apache-php-app -v "$PWD":/var/www/html php:7.2-apache
</code>```

Now my PHP application also uses AWS SDK to read from s3 bucket. Now I would like to attach my .aws credentails folder to that I can test my functionality.

What folder should I map to in the container.

Body:
My php application runs in a docker. During development I run the following command where my code is attached as a volume to a folder in the container.

docker run -d -p 80:80 --name my-apache-php-app -v "$PWD":/var/www/html php:7.2-apache

Now my PHP application also uses AWS SDK to read from s3 bucket. Now I would like to attach my .aws credentails folder to that I can test my functionality.

What folder should I map to in the container.


问:
Intellij : how can resolve sync error between wsl2 with IntelliJ
My intelliJ has a synchronization problem with my wsl2 environment.
Can you help me?
I can't disable security and add exclusion files in windows defender because I don't have the right


问:
Cant find a project in Google Cloud projects list
I try to get all the projects with granted permissions for my account with api explorer:

https://cloud.google.com/bigquery/docs/reference/rest/v2/projects/list

Unfortunatly, it shows only a few projects (at least 5 times less then it has to show). I double-checked all permissions (both in project an organisation), and in every project i have admin or owner role.

btw, if I try to call the exact project via api to get the list of datasets here:

https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets/list
it will work even for those projects which are not returned in list of projects via previous method.

For what reason api doesn`t return full list of projects? Thanks for help!


问:
What is the difference between .pub-cache directory inside flutter sdk and .pub-cache directory in home?
Question is simple. we have 2 .pub-cache directories one inside the flutter sdk folder and one in our home directory eg:

/home/path/to/flutter/.pub-cache/

/home/.pub-cache/

what is the difference between these two?


问:
Matplotlib for flight data visualization (trajectory + attitude)
I've been working with a simulator that outputs flight information to a csv file. I wrote this script to have a real-time animation of the flight trajectory of the aircraft :

from matplotlib.animation import FuncAnimation
import matplotlib.pyplot as plt
import pandas as pd

def animate(i, ax):
    data = pd.read_csv('flight_data.csv')
    lat = data['latitude']
    lon = data['longitude']
    alt = data['altitude']

    ax.cla()
    ax.plot(lon, lat, alt, label='Aircraft Trajectory')
    plt.legend(loc='upper left')

ax = plt.figure().add_subplot(projection='3d')
ani = FuncAnimation(plt.gcf(), animate, fargs=(ax, ), interval=500)
plt.show()
```

This is the current trajectory plot my code outputs :

Aircraft trajectory

I would like to add orientation (roll, pitch, yaw) information on that animation, by displaying a polygon like a triangle symbolizing the aircraft. This triangle should tilt itself according to the roll, pitch, yaw angles. The triangle should be drawn at the tip of the trajectory line (only the current position/orientation), somewhat like this :

Expected result

Here's an example of my flight_data.csv file:

latitude
longitude
altitude
roll
pitch
yaw

51.37810000000002
2.3273
914.4048973925204
-2.790024747906104e-18
7.521456706397831e-37
5.391677412211226e-19

51.378115000429645
2.32730000002288
914.4048994329572
-2.4823579495726334e-13
2.614133380873825e-07
3.128133219710138e-13

51.378129984759624
2.3273000000912765
914.4136382493407
-0.0001078513257623435
0.0023320003336775364
3.19950439669013e-07

51.37814497464779
2.3273000002370896
914.4242037835747
-0.0002800933382594903
0.0068872012379180515
6.283174387827548

51.37815995443158
2.3273000004041005
914.4397894612849
-0.0005206867906275333
0.013252297988836093
6.283144516965605

51.37817492879696
2.327300000573886
914.4607853715331
-0.0008214558561850814
0.021009396990557296
6.283090848778253

51.37818989594557
2.327300000690093
914.4879777717412
-0.0011794403068647057
0.029769922414923978
6.283010009266951

I don't know if matplotlib can do such things.

Thanks in advance!

Body:
I've been working with a simulator that outputs flight information to a csv file. I wrote this script to have a real-time animation of the flight trajectory of the aircraft :

from matplotlib.animation import FuncAnimation
import matplotlib.pyplot as plt
import pandas as pd

def animate(i, ax):
    data = pd.read_csv('flight_data.csv')
    lat = data['latitude']
    lon = data['longitude']
    alt = data['altitude']

    ax.cla()
    ax.plot(lon, lat, alt, label='Aircraft Trajectory')
    plt.legend(loc='upper left')

ax = plt.figure().add_subplot(projection='3d')
ani = FuncAnimation(plt.gcf(), animate, fargs=(ax, ), interval=500)
plt.show()

This is the current trajectory plot my code outputs :

Aircraft trajectory

I would like to add orientation (roll, pitch, yaw) information on that animation, by displaying a polygon like a triangle symbolizing the aircraft. This triangle should tilt itself according to the roll, pitch, yaw angles. The triangle should be drawn at the tip of the trajectory line (only the current position/orientation), somewhat like this :

Expected result

Here's an example of my flight_data.csv file:

latitude
longitude
altitude
roll
pitch
yaw

51.37810000000002
2.3273
914.4048973925204
-2.790024747906104e-18
7.521456706397831e-37
5.391677412211226e-19

51.378115000429645
2.32730000002288
914.4048994329572
-2.4823579495726334e-13
2.614133380873825e-07
3.128133219710138e-13

51.378129984759624
2.3273000000912765
914.4136382493407
-0.0001078513257623435
0.0023320003336775364
3.19950439669013e-07

51.37814497464779
2.3273000002370896
914.4242037835747
-0.0002800933382594903
0.0068872012379180515
6.283174387827548

51.37815995443158
2.3273000004041005
914.4397894612849
-0.0005206867906275333
0.013252297988836093
6.283144516965605

51.37817492879696
2.327300000573886
914.4607853715331
-0.0008214558561850814
0.021009396990557296
6.283090848778253

51.37818989594557
2.327300000690093
914.4879777717412
-0.0011794403068647057
0.029769922414923978
6.283010009266951

I don't know if matplotlib can do such things.

Thanks in advance!


问:
Zoom on scroll interaction in figma
I want to build a figma prototype that will allow users to zoom in and out from one photo to another using scrolling/pinch on trackpad.
I can also make a huge photo to zoom in and out of it.
The idea is to make an interface in which zooming in and out will change photos
Any thoughts of how to do it?
Wireframe demonstration below
enter image description here</p>

Title: Zoom on scroll interaction in figma


问:
JUnit 5 LegacyXmlReportGeneratingListener add entries from events report with maven failsafe
I would like to generate a legacy JUnit 5 report with failsafe which includes manually published entries to the TestReporter which are listed in the events XML file like:

```<code><e:reported id="106" time="2023-01-11T13:46:41.746443Z"><attachments><data time="2023-01-11T14:46:41.746347"><entry key="bla">test</entry></data></attachments></e:reported>
</code>```

I cannot find them in the legacy report XML TEST-MyIT.xml which only contains a list of test method names:

```<code><testcase name="xx()[30] bla" classname="MyIT" time="0.393"/>
</code>```

How can I addd all entries to legacy test reports?

Body:
I would like to generate a legacy JUnit 5 report with failsafe which includes manually published entries to the TestReporter which are listed in the events XML file like:

<e:reported id="106" time="2023-01-11T13:46:41.746443Z"><attachments><data time="2023-01-11T14:46:41.746347"><entry key="bla">test</entry></data></attachments></e:reported>

I cannot find them in the legacy report XML TEST-MyIT.xml which only contains a list of test method names:

<testcase name="xx()[30] bla" classname="MyIT" time="0.393"/>

How can I addd all entries to legacy test reports?


问:
Run Bash file on Android studio
I have a script file that I want to run from the terminal in my Android studio.
(I want to target all the devices with this script.)

This is the script file with the name run_all.sh:

```<code>#!/bin/bash
adb devices | while read -r line
do
if [ ! "$line" = "" ] && [ "$(echo "$line" | awk '{print $2}')" = "device" ]
then
    device=$(echo "$line" | awk '{print $1}')
    echo "$device" "$@" ...
    adb -s "$device" "$@"
fi
done
</code>```

I run it like this in the terminal:

```<code>./run_all.sh
</code>```

But I'm getting this result:

```<code>./run_all.sh: command not found
</code>```

I can't find the problem.

Title: Run Bash file on Android studio

Body:
I have a script file that I want to run from the terminal in my Android studio.
(I want to target all the devices with this script.)

This is the script file with the name run_all.sh:

#!/bin/bash
adb devices | while read -r line
do
if [ ! "$line" = "" ] && [ "$(echo "$line" | awk '{print $2}')" = "device" ]
then
    device=$(echo "$line" | awk '{print $1}')
    echo "$device" "$@" ...
    adb -s "$device" "$@"
fi
done

I run it like this in the terminal:

./run_all.sh

But I'm getting this result:

./run_all.sh: command not found

I can't find the problem.


问:
how to inject third party component (primeng, ...) from ts angular to template html
i want to inject component

 from angular component to html then access to bind data to ngModel. how do?

not working: show follwing in inspect with shematic and no parsing to pure html and not showing in browser:

```<code>switcher = "<p-inputSwitch [(ngModel)]="checked"></p-inputSwitch>"

innerHtmlBindData(rowData: any, col: any, rowIndex: number, trashIcon: any) {
    return col.field === 'num' ? rowIndex + 1
          : col.field === 'remove'
          ? new SafeHTMLPipe(this.sanetizer).transform(trashIcon) // working
          : col.field === 'edit'
          ? new SafeHTMLPipe(this.sanetizer).transform(this.editIcon) // working
          : col.field === 'super' && rowData[col.field] === true
          ? 'بله'
          : col.field === 'super' && rowData[col.field] === false
          ? 'خیر'
          : col.field === 'block'
          ? new SafeHTMLPipe(this.sanetizer).transform(this.switcher) // not working
          : rowData[col.field]
  }
</code>```
```<code>
<ng-template pTemplate="body" let-rowData let-columns="columns" let-rowIndex="rowIndex">
   <tr
      [ngClass]="{'cursor-pointer hover:bg-gray-50': tabIndex === 0 && currentRoute === '/dashboard/app' && rowData[columns?.[3].field] !== 'edit'}">
      <td
         *ngFor="let col of columns; let i=index"
         class="td text-base text-center block"
         (click)="onTDTableClick($event, rowData, rowIndex, col)"
         [innerHTML]="innerHtmlBindData(rowData, col, rowIndex, trashIcon)">
       </td>
   </tr>
</ng-template>

</code>```

priview image :

Body:
i want to inject component

 from angular component to html then access to bind data to ngModel. how do?

not working: show follwing in inspect with shematic and no parsing to pure html and not showing in browser:

switcher = "

"

innerHtmlBindData(rowData: any, col: any, rowIndex: number, trashIcon: any) {
    return col.field === 'num' ? rowIndex + 1
          : col.field === 'remove'
          ? new SafeHTMLPipe(this.sanetizer).transform(trashIcon) // working
          : col.field === 'edit'
          ? new SafeHTMLPipe(this.sanetizer).transform(this.editIcon) // working
          : col.field === 'super' && rowData[col.field] === true
          ? 'بله'
          : col.field === 'super' && rowData[col.field] === false
          ? 'خیر'
          : col.field === 'block'
          ? new SafeHTMLPipe(this.sanetizer).transform(this.switcher) // not working
          : rowData[col.field]
  }

<ng-template pTemplate="body" let-rowData let-columns="columns" let-rowIndex="rowIndex">

</ng-template>

priview image :


问:
SpringBoot app as Microsoft service use wrong user to access DB
I have a simple SpringBoot application that uses MS SQL Server 2016 as DB.
To connect to the DB I use this string:

```<code>url: jdbc:sqlserver://10.0.19.117:1433;databaseName=Test;integratedSecurity=true;encrypt=true;trustServerCertificate=true;
</code>```

This works as expected, I'm using Windows Authetication so I had to install MS sqljdbc_11.2.2.0_enu package on my WinServer 2019.

Launching app with java -jar app.war works fine.

Now I try to install the app as a service, I test both nssm.exe and WinSW application to install ancd configure the service. Once done and start the service I got the same issue:

2023-01-11 14:46:49,815 ERROR main
org.apache.tomcat.jdbc.pool.ConnectionPool - Unable to create initial
connections of pool. com.microsoft.sqlserver.jdbc.SQLServerException:
Login failed for user 'ACME\TEST-APP$'.
ClientConnectionId:07497eaa-d755-404a-9489-1944696948bd   at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:265)
at
com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:300)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:133)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:37)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:6299)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:4911)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:4849)
at
com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7627)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3916)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:3358)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:2950)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:2790)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1663)
at
com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1064)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:347)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:228)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:769)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:697)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:496)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.(ConnectionPool.java:154)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:121)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:110)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:134)
org.grails.orm.hibernate.connections.AbstractHibernateConnectionSourceFactory.create(Abstr

It's like the app is using another user instead of the one specify in the configuration to access the DB. Indeed if I configure the service to run as the user I use to access the DB it works fine, but of course i don't want to do that.

Body:
I have a simple SpringBoot application that uses MS SQL Server 2016 as DB.
To connect to the DB I use this string:

url: jdbc:sqlserver://10.0.19.117:1433;databaseName=Test;integratedSecurity=true;encrypt=true;trustServerCertificate=true;

This works as expected, I'm using Windows Authetication so I had to install MS sqljdbc_11.2.2.0_enu package on my WinServer 2019.

Launching app with java -jar app.war works fine.

Now I try to install the app as a service, I test both nssm.exe and WinSW application to install ancd configure the service. Once done and start the service I got the same issue:

2023-01-11 14:46:49,815 ERROR main
org.apache.tomcat.jdbc.pool.ConnectionPool - Unable to create initial
connections of pool. com.microsoft.sqlserver.jdbc.SQLServerException:
Login failed for user 'ACME\TEST-APP$'.
ClientConnectionId:07497eaa-d755-404a-9489-1944696948bd   at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:265)
at
com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:300)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:133)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:37)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:6299)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:4911)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:4849)
at
com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7627)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3916)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:3358)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:2950)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:2790)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1663)
at
com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1064)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:347)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:228)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:769)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:697)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:496)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.(ConnectionPool.java:154)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:121)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:110)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:134)
org.grails.orm.hibernate.connections.AbstractHibernateConnectionSourceFactory.create(Abstr

It's like the app is using another user instead of the one specify in the configuration to access the DB. Indeed if I configure the service to run as the user I use to access the DB it works fine, but of course i don't want to do that.