问:
Selenium to check if a website displays cookie consent popup
I am building a dynamic scraper with selenium and flask that can take in any URL and scrape for cookies and other details. Now I want to check if the URL has any cookie consent popup. I am unable to make this feature dynamic.

I have tried PARTIAL_LINK_TEXT, it works only for some website

```<code>url="https://www.spitzer-silo.com/"

desired_capabilities = DesiredCapabilities.CHROME
desired_capabilities["goog:loggingPrefs"] = {"performance": "ALL"}

options = webdriver.ChromeOptions()
options.add_argument('headless')
options.add_argument("--ignore-certificate-errors")

driver = webdriver.Chrome(ChromeDriverManager().install(),options=options, desired_capabilities=desired_capabilities)

driver.get(url)

myDiv = driver.find_element(By.PARTIAL_LINK_TEXT, 'Cookie')
</code>```

https://www.spitzer-silo.com/ works
https://www.siemens.com/de/de.html doesn't work

Also, I am searching with the "Cookie" keyword, which may not be present on some websites

another approach, I tried using a window handle but it shows only one window

```<code>url="https://www.siemens.com/de/de.html"

desired_capabilities = DesiredCapabilities.CHROME
desired_capabilities["goog:loggingPrefs"] = {"performance": "ALL"}

# Create the webdriver object and pass the arguments
options = webdriver.ChromeOptions()

# Chrome will start in Headless mode
options.add_argument('headless')

# Ignores any certificate errors if there is any
options.add_argument("--ignore-certificate-errors")

# Startup the chrome webdriver with executable path and
# pass the chrome options and desired capabilities as
# parameters.
driver = webdriver.Chrome(ChromeDriverManager().install(),options=options, desired_capabilities=desired_capabilities)

# Send a request to the website and let it load
driver.get(url)
time.sleep(30)

whandle = driver.window_handles
</code>```

['CDwindow-E9E6A9B1021BBA75132EF9DCA40A2824']

Is there any way I could check if there is a popup on the website and then check if the popup has a text cookie on it

I appreciate all the help I can get.

Body:
I am building a dynamic scraper with selenium and flask that can take in any URL and scrape for cookies and other details. Now I want to check if the URL has any cookie consent popup. I am unable to make this feature dynamic.

I have tried PARTIAL_LINK_TEXT, it works only for some website

url="https://www.spitzer-silo.com/"

desired_capabilities = DesiredCapabilities.CHROME
desired_capabilities["goog:loggingPrefs"] = {"performance": "ALL"}

options = webdriver.ChromeOptions()
options.add_argument('headless')
options.add_argument("--ignore-certificate-errors")

driver = webdriver.Chrome(ChromeDriverManager().install(),options=options, desired_capabilities=desired_capabilities)

driver.get(url)

myDiv = driver.find_element(By.PARTIAL_LINK_TEXT, 'Cookie')

https://www.spitzer-silo.com/ works
https://www.siemens.com/de/de.html doesn't work

Also, I am searching with the "Cookie" keyword, which may not be present on some websites

another approach, I tried using a window handle but it shows only one window

url="https://www.siemens.com/de/de.html"

desired_capabilities = DesiredCapabilities.CHROME
desired_capabilities["goog:loggingPrefs"] = {"performance": "ALL"}

# Create the webdriver object and pass the arguments
options = webdriver.ChromeOptions()

# Chrome will start in Headless mode
options.add_argument('headless')

# Ignores any certificate errors if there is any
options.add_argument("--ignore-certificate-errors")

# Startup the chrome webdriver with executable path and
# pass the chrome options and desired capabilities as
# parameters.
driver = webdriver.Chrome(ChromeDriverManager().install(),options=options, desired_capabilities=desired_capabilities)

# Send a request to the website and let it load
driver.get(url)
time.sleep(30)

whandle = driver.window_handles

['CDwindow-E9E6A9B1021BBA75132EF9DCA40A2824']

Is there any way I could check if there is a popup on the website and then check if the popup has a text cookie on it

I appreciate all the help I can get.


来源: stackexchange

问:
FormSubmit.co _next value
It was fine when I passed file path or normal URL,
but now It seems not working anymore.

Like google drive sharing link also not working(value="https://drive.google.com/file/d/myfile/view?usp=sharing"), but like (value="https://www.google.com/") it works.

ContentLicense: CC BY-SA 4.0

Title: FormSubmit.co _next value


问:
Design break in arabic version bouble quote not visible fully
I want to display quote in hero section along with image, design works fine for English version but it breaks in Arabic version as design is RTL.

I notice that part of double quote is partially not visible ”. i tried everything but hides part of quote at beginning and end of quote

Codepen link

```<code><!-- Hero  -->
<section class="headding-news" style="">
  <div class="container">
    <div class="flex-parent-container bg-white text-center">
      <div class="flex-item-left">
        <img src="https://dummyimage.com/1200x720/000/fff" class="img-responsive center" />
      </div>
      <div class="flex-item-right speech right">
        <blockquote class="animate__animated animate__fadeIn animate__slow">
          <p>This is the quote from some unknown person.</p>
          <cite>Person Name</cite>
        </blockquote>
      </div>
    </div>

  </div>
</section>
<!-- Hero end -->
</code>```

Body:
I want to display quote in hero section along with image, design works fine for English version but it breaks in Arabic version as design is RTL.

I notice that part of double quote is partially not visible ”. i tried everything but hides part of quote at beginning and end of quote

Codepen link

This is the quote from some unknown person.

          Person Name


问:
Is there a way we can deploy all the cloudformation templates from a gitlab repository using gitlab pipeline in aws in a single stack?
I'm looking for an option to pick all the templates from the repository without hardcode the yml template files and in future if new templates are added, the pipeline should automatically pick all of them and do the deploy and create a single stack in aws environment, without making any modification to gitlab-ci.yml/pipeline file.

I tried using deploy CLI command, it deploy all the templates but then it goes for update and start deleting one by one and only the last template resource will be available after the pipeline execution is complete.

Let me know if there is an option to do this?


问:
Flutter: Using SliverChildBuilderDelegate in a GridView.custom, Get Widget Constraints for Draggable
I am attempting to create a custom grid view, and i need to put constraints on the Draggable feedback or it expands to cover the entire screen.  Normally in builders, there is a constraints variable passed, but there is not one in the SliverChildBuilderDelegate.  What would be the best way to limit the size of the feedback of the draggable to the current size of the widget?  The ?'s in feedback is where the variable should go.</p>
```<code>return GridView.custom(
      shrinkWrap: true,
      primary: false,
      scrollDirection: Axis.vertical,
      controller: _scrollController,
      physics: const ClampingScrollPhysics(),
      gridDelegate: SliverQuiltedGridDelegate(
        crossAxisCount: 4,
        mainAxisSpacing: 10,
        crossAxisSpacing: 10,
        repeatPattern: QuiltedGridRepeatPattern.inverted,
        pattern: widget.pattern,
      ),
      childrenDelegate: SliverChildBuilderDelegate(
        childCount: widget.children.length,
        (context, index) {
          var selectedWidget = widget.children[index];
          return LongPressDraggable<GlobalKey>(
                  data: selectedWidget.key,
                  onDragStarted: _onDragStarted,
                  onDragEnd: _onDragEnd,
                  feedback:
                      SizedBox(width: ?, height:?, child: selectedWidget),
                  childWhenDragging: Container(),
                  child: selectedWidget,

                )}))
</code>```

Body:
I am attempting to create a custom grid view, and i need to put constraints on the Draggable feedback or it expands to cover the entire screen.  Normally in builders, there is a constraints variable passed, but there is not one in the SliverChildBuilderDelegate.  What would be the best way to limit the size of the feedback of the draggable to the current size of the widget?  The ?'s in feedback is where the variable should go.

return GridView.custom(
      shrinkWrap: true,
      primary: false,
      scrollDirection: Axis.vertical,
      controller: _scrollController,
      physics: const ClampingScrollPhysics(),
      gridDelegate: SliverQuiltedGridDelegate(
        crossAxisCount: 4,
        mainAxisSpacing: 10,
        crossAxisSpacing: 10,
        repeatPattern: QuiltedGridRepeatPattern.inverted,
        pattern: widget.pattern,
      ),
      childrenDelegate: SliverChildBuilderDelegate(
        childCount: widget.children.length,
        (context, index) {
          var selectedWidget = widget.children[index];
          return LongPressDraggable<GlobalKey>(
                  data: selectedWidget.key,
                  onDragStarted: _onDragStarted,
                  onDragEnd: _onDragEnd,
                  feedback:
                      SizedBox(width: ?, height:?, child: selectedWidget),
                  childWhenDragging: Container(),
                  child: selectedWidget,

                )}))


问:
TypeError: (0 , src_actions_schoolSafety__WEBPACK_IMPORTED_MODULE_2__.getOptional) is not a function
I called the API(school Safety) from schoolSafetyTab(parent) it was working fine till yesterday but got this error from morning.
TypeError: (0 , src_actions_schoolSafety__WEBPACK_IMPORTED_MODULE_2__.getOptional) is not a function . If somebody would help me with this and thanks in advance

school Safety

```<code>export const getOptional = async (schoolName: string, assId: string) => {
  let res = await axiosInstance.get(
    Endpoint.GET_OPTIONAL_DATA(schoolName, assId)
  )
  return res.data
}
</code>```

School safety Tab

```<code>import {getOptional} from 'src/actions/schoolSafety'
const getOptionalData = () => {
    setLoading(true)
    getOptional(school as string, selectedAssement?.assessmentId || '')
      .then((res) => {
        setLoading(false)
        setOptionalData(res)
      })
      .catch(() => {
        setLoading(false)
      })
  }
</code>```

Body:
I called the API(school Safety) from schoolSafetyTab(parent) it was working fine till yesterday but got this error from morning.
TypeError: (0 , src_actions_schoolSafety__WEBPACK_IMPORTED_MODULE_2__.getOptional) is not a function . If somebody would help me with this and thanks in advance

school Safety

export const getOptional = async (schoolName: string, assId: string) => {
  let res = await axiosInstance.get(
    Endpoint.GET_OPTIONAL_DATA(schoolName, assId)
  )
  return res.data
}

School safety Tab

import {getOptional} from 'src/actions/schoolSafety'
const getOptionalData = () => {
    setLoading(true)
    getOptional(school as string, selectedAssement?.assessmentId || '')
      .then((res) => {
        setLoading(false)
        setOptionalData(res)
      })
      .catch(() => {
        setLoading(false)
      })
  }


问:
Android STEP_COUNTER sensor is null (Samsung Z Flip)
I am currently developing a Application to track Steps.

In order to track steps i am using the following Sensor of the phone: Sensor.TYPE_STEP_COUNTER

This worked fine for all devices I tested it with.
But, it started to fail after updating "ONE UI" and "ANDROID 13" for the phone(SM-F711N)
that worked well.

Phone has FEATURE_SENSOR_STEP_COUNTER but default sensor is null
What is Problem?
Does anyone know the solution to this problem?

Here's my logging code and result

```<code>Log.e("test","hasSystemFeature - SENSOR-STEP-COUNTER" + packageManager.hasSystemFeature(PackageManager.FEATURE_SENSOR_STEP_COUNTER));

Log.e("test","step sensor list: ${mSensorManager.getSensorList(Sensor.TYPE_STEP_COUNTER)}")
Log.e("test", "step counter default sensor: ${mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER)}" )
</code>```

Body:
I am currently developing a Application to track Steps.

In order to track steps i am using the following Sensor of the phone: Sensor.TYPE_STEP_COUNTER

This worked fine for all devices I tested it with.
But, it started to fail after updating "ONE UI" and "ANDROID 13" for the phone(SM-F711N)
that worked well.

Phone has FEATURE_SENSOR_STEP_COUNTER but default sensor is null
What is Problem?
Does anyone know the solution to this problem?

Here's my logging code and result

Log.e("test","hasSystemFeature - SENSOR-STEP-COUNTER" + packageManager.hasSystemFeature(PackageManager.FEATURE_SENSOR_STEP_COUNTER));

Log.e("test","step sensor list: ${mSensorManager.getSensorList(Sensor.TYPE_STEP_COUNTER)}")
Log.e("test", "step counter default sensor: ${mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER)}" )


问:
How to add HTML videoplayer seekbars with pointers?
Sample image

How do I add multiple seekbars with pointers in the seekbar that on click point to the same timestamp in the video player and the following seekbars?
Kindly, refer to the image.


问:
Does MathWorks Simulink prohibit multiple inheritance for system objects?
The Problem:
I am trying to use some System Objects inside a 'User-defined Function' block in Simulink.
When I try to run the block, I get an error saying the following -

```<code>Diamond-shape inheritance is not supported in code generation. Class 'X' inherits from base class 'Y' via two or more paths.
</code>```

Background: Class X inherits from classes A, B, C - all of which inherit from class Y. There is no conflict between any property/method/class definition between any of these classes. All of them implement their own unique methods, and there is no overloading of a common method/property.

Class X works in MATLAB - I have been able to successfully work with instances of class X.

What I'm not sure of is whether Simulink supports multiple inheritance / diamond shape inheritance, when it is guaranteed that there are no conflicts.

So I would be very interested in finding out if I can make use of class X in Simulink without having to refactor other classes to remove the multiple inheritance.

I have looked at the following MATLAB Central answer, and blog post trying to understand whether multiple inheritance poses any issues.

https://www.mathworks.com/matlabcentral/answers/93189-how-does-matlab-solve-the-diamond-problem-in-multiple-inheritance

https://blogs.mathworks.com/developer/2015/06/08/diamond-of-death/

But I couldn't find anything related to Simulink or Simulink Codegen

Body:
The Problem:
I am trying to use some System Objects inside a 'User-defined Function' block in Simulink.
When I try to run the block, I get an error saying the following -

Diamond-shape inheritance is not supported in code generation. Class 'X' inherits from base class 'Y' via two or more paths.

Background: Class X inherits from classes A, B, C - all of which inherit from class Y. There is no conflict between any property/method/class definition between any of these classes. All of them implement their own unique methods, and there is no overloading of a common method/property.

Class X works in MATLAB - I have been able to successfully work with instances of class X.

What I'm not sure of is whether Simulink supports multiple inheritance / diamond shape inheritance, when it is guaranteed that there are no conflicts.

So I would be very interested in finding out if I can make use of class X in Simulink without having to refactor other classes to remove the multiple inheritance.

I have looked at the following MATLAB Central answer, and blog post trying to understand whether multiple inheritance poses any issues.

https://www.mathworks.com/matlabcentral/answers/93189-how-does-matlab-solve-the-diamond-problem-in-multiple-inheritance

https://blogs.mathworks.com/developer/2015/06/08/diamond-of-death/

But I couldn't find anything related to Simulink or Simulink Codegen


问:
how to subtract form data in django
I am developing a inventory management and I have to subtract the Quantity from 2 different forms data and display the available quantity.

Below is my views.py

```<code>    def my_form2(request):
    if request.method == "POST":
        form2 = MyForm2(request.POST)
        if form2.is_valid():
            form2.save()
            return HttpResponse('Submitted Successfully')
    else:
        form2 = MyForm2()
    return render(request, "authentication/Incoming_QC.html", {'form2': form2})

def View_Incoming_QC(request):
    Incoming_QC_list = Incoming_QC.objects.all()
    return render(request, 'authentication/View_Incoming_QC.html',
                  {'Incoming_QC_list': Incoming_QC_list})

def my_form3(request):
    if request.method == "POST":
        form3 = MyForm3(request.POST)
        if form3.is_valid():
            form3.save()
            return HttpResponse('Submitted successfully')
            # return redirect('/home_page/')
    else:
        form3 = MyForm3()
    return render(request, "authentication/Manufacturing.html", {'form3': form3})

def View_Manufacturing(request):
    Manufacturing_list = Manufacturing.objects.all()
    return render(request, 'authentication/View_Manufacturing.html',
                  {'Manufacturing_list': Manufacturing_list})
def my_form5(request):
    if request.method == "POST":
        form5 = MyForm5(request.POST)
        if form5.is_valid():
            form5.save()
            return HttpResponse('Submitted successfully')
            # return redirect('/home_page/')
    else:
        form5 = MyForm5()
    return render(request, "authentication/Material.html", {'form5': form5})

def View_Material(request):
    Material_list = Material.objects.all()
    return render(request, 'authentication/View_Material.html',
                  {'Material_list': Material_list})
</code>```

Below is the models.py

```<code>class Incoming_QC(models.Model):

    alphanumeric = RegexValidator(r'^[\s0-9a-zA-Z\.-_]*$', 'Only alphanumeric characters are allowed.')

    Manufacturing_PN = models.CharField(max_length=200, validators=[alphanumeric])

    Quantity = models.IntegerField()

class Manufacturing(models.Model):

    alphanumeric = RegexValidator(r'^[\s0-9a-zA-Z\.-_]*$', 'Only alphanumeric characters are allowed.')

    Manufacturing_PN = models.CharField(max_length=200, validators=[alphanumeric])
    Completed_Quantity = models.IntegerField(blank=True, default='')

class Material(models.Model):
    alphanumeric = RegexValidator(r'^[\s0-9a-zA-Z\.-_]*$', 'Only alphanumeric characters are allowed.')

    Manufacturing_PN = models.CharField(max_length=200, validators=[alphanumeric])
   Quantity = models.IntegerField()

</code>```

.html file to view the data

```<code>    <!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
        table, th, td {
  border:1px solid black;
}
    body {
  margin-bottom: 100px;
  background-color: lightgrey;
  font-family: Arial, Helvetica, sans-serif;
}

.topnav {
  overflow: hidden;
  background-color: #333;
}

.topnav a {
  float: left;
  color: #f2f2f2;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
}

.topnav a:hover {
  background-color: #ddd;
  color: black;
}

.topnav a.active {
  background-color: #04AA6D;
  color: white;
}
</style>
</head>
<body>
{% csrf_token %}
{% load static %}
<div class="topnav">
    <a href="/home_page">Home</a>
    <a href="/form5">Material Details</a>
    <a href="/View_Material">View Material Details</a>
</div>
<div style="padding-left:16px">
</div>

<h1>
    <center>
    Material Details
    </center>

</h1>
<table style="width:100%">
<thead>
<tr>

    <th>Manufacturing_PN</th>
    <th>Quantity</th>
</tr>
</thead>
    <tbody>
    <tr>
{% for Material in Material_list %}

    <strong> {{ Material }}</strong>

        <td>  {{Material.Manufacturing_PN }} </td>

       <td>  {{Material.Quantity}} </td>

</tr>
{% endfor %}
    </tbody>
</table>
</body>
</html>
</code>```

SO here whenever the user submit the incoming QC and Manufacturing forms. The Quantity entered by the user in both the form or single form I want to subtract the Quantity of the Material data.

Note: The Quantity should be subtracted based on the manufacturing_PN.

It should look like below logic:
if Material.manufacturing_PN == Manufacturing.manufacturing_PN || Material.manufacturing_PN == Incoming_QC.manufacturing_PN

Material.manufacturing_PN = Material.manufacturing_PN - Incoming_QC.manufacturing_PN - Manufacturing.manufacturing_PN

It would be very helpful if someone help me out in this. Thanks in advance

Title: how to subtract form data in django

Body:
I am developing a inventory management and I have to subtract the Quantity from 2 different forms data and display the available quantity.

Below is my views.py

    def my_form2(request):
    if request.method == "POST":
        form2 = MyForm2(request.POST)
        if form2.is_valid():
            form2.save()
            return HttpResponse('Submitted Successfully')
    else:
        form2 = MyForm2()
    return render(request, "authentication/Incoming_QC.html", {'form2': form2})

def View_Incoming_QC(request):
    Incoming_QC_list = Incoming_QC.objects.all()
    return render(request, 'authentication/View_Incoming_QC.html',
                  {'Incoming_QC_list': Incoming_QC_list})

def my_form3(request):
    if request.method == "POST":
        form3 = MyForm3(request.POST)
        if form3.is_valid():
            form3.save()
            return HttpResponse('Submitted successfully')
            # return redirect('/home_page/')
    else:
        form3 = MyForm3()
    return render(request, "authentication/Manufacturing.html", {'form3': form3})

def View_Manufacturing(request):
    Manufacturing_list = Manufacturing.objects.all()
    return render(request, 'authentication/View_Manufacturing.html',
                  {'Manufacturing_list': Manufacturing_list})
def my_form5(request):
    if request.method == "POST":
        form5 = MyForm5(request.POST)
        if form5.is_valid():
            form5.save()
            return HttpResponse('Submitted successfully')
            # return redirect('/home_page/')
    else:
        form5 = MyForm5()
    return render(request, "authentication/Material.html", {'form5': form5})

def View_Material(request):
    Material_list = Material.objects.all()
    return render(request, 'authentication/View_Material.html',
                  {'Material_list': Material_list})

Below is the models.py

class Incoming_QC(models.Model):

    alphanumeric = RegexValidator(r'^[\s0-9a-zA-Z\.-_]*$', 'Only alphanumeric characters are allowed.')

    Manufacturing_PN = models.CharField(max_length=200, validators=[alphanumeric])

    Quantity = models.IntegerField()

class Manufacturing(models.Model):

    alphanumeric = RegexValidator(r'^[\s0-9a-zA-Z\.-_]*$', 'Only alphanumeric characters are allowed.')

    Manufacturing_PN = models.CharField(max_length=200, validators=[alphanumeric])
    Completed_Quantity = models.IntegerField(blank=True, default='')

class Material(models.Model):
    alphanumeric = RegexValidator(r'^[\s0-9a-zA-Z\.-_]*$', 'Only alphanumeric characters are allowed.')

    Manufacturing_PN = models.CharField(max_length=200, validators=[alphanumeric])
   Quantity = models.IntegerField()

.html file to view the data

    <!DOCTYPE html>

    <meta name="viewport" content="width=device-width, initial-scale=1">

{% csrf_token %}
{% load static %}

    Home
    Material Details
    View Material Details

    Material Details

    Manufacturing_PN
    Quantity

{% for Material in Material_list %}

     {{ Material }}

          {{Material.Manufacturing_PN }}

         {{Material.Quantity}}

{% endfor %}

SO here whenever the user submit the incoming QC and Manufacturing forms. The Quantity entered by the user in both the form or single form I want to subtract the Quantity of the Material data.

Note: The Quantity should be subtracted based on the manufacturing_PN.

It should look like below logic:
if Material.manufacturing_PN == Manufacturing.manufacturing_PN || Material.manufacturing_PN == Incoming_QC.manufacturing_PN

Material.manufacturing_PN = Material.manufacturing_PN - Incoming_QC.manufacturing_PN - Manufacturing.manufacturing_PN

It would be very helpful if someone help me out in this. Thanks in advance


问:
How to read JSON from S3 by AWS Lambda Node.js 18.x runtime?
@TBA gave the solution.

The root cause is not by runtime. It came from SDK v3.

Point: Do not update the code with mixed things (like both of runtime & SDK version together )

Thanks again, TBA.

I was using Node.js 14.x version runtime Lambda to read some json file from S3.

Brief code is below

```<code>const AWS = require("aws-sdk");
const s3 = new AWS.S3();

exports.handler = (event) => {
    const { bucketName, objKey } = event
    const params = {
        Bucket: bucketName,
        Key: objKey
    };
    return new Promise((resolve) => {
        s3.getObject(params, async (err, data) =>{
            if (err) console.log(err, err.stack);
            else     {
                const contents = JSON.parse(data.Body)
                resolve(contents);
            }
        });
    })
};
</code>```

and it returned the json data as I expected.

And today I tried to create a new lambda with runtime Node.js 18.x but it returned null or some errors...

Q) Could you give me some advice to solve this  ?

+) I used same json file for each lambda

+) Not sure why, but in my case, data.Body.toString() didn't work (I saw some answers in stackoverflow provide that and tried but no lucks)

Thanks in advance!

Case A (returns null)

```<code>import { S3Client, GetObjectCommand } from "@aws-sdk/client-s3";
const s3Client = new S3Client({ region: "ap-northeast-2" });

export const handler = (event) => {
    const { objKey, bucketName } = event;
    const params={
        Bucket: bucketName,
        Key: objKey
    };

    const getObjCommand = new GetObjectCommand(params);

    return new Promise((resolve) => {
        s3Client.send(getObjCommand, async (err, data) =>{
            if (err) console.log(err, err.stack);
            else     {
                const list = JSON.parse(data.Body)
                resolve(list);
            }
        });
    })
};
</code>```

Case B (returns "Unexpected token o in JSON at position 1")

```<code>export const handler = async (event) => {
    const { objKey, bucketName } = event;
    const params={
        Bucket: bucketName,
        Key: objKey
    };

    const getObjCommand = new GetObjectCommand(params);
    const response = await s3Client.send(getObjCommand)

    console.log("JSON.parse(response.Body)", JSON.parse(response.Body))
};
</code>```

Case C (returns "TypeError: Converting circular structure to JSON")

```<code>export const handler = async (event) => {
    const { objKey, bucketName } = event;
    const params={
        Bucket: bucketName,
        Key: objKey
    };
    const getObjCommand = new GetObjectCommand(params);

    try {
        const response = await s3Client.send(getObjCommand)
        return JSON.stringify(response.Body)
    } catch(err) {
        console.log("error", err)
        return err
    }
};
</code>```

Body:
@TBA gave the solution.

The root cause is not by runtime. It came from SDK v3.

Point: Do not update the code with mixed things (like both of runtime & SDK version together )

Thanks again, TBA.

I was using Node.js 14.x version runtime Lambda to read some json file from S3.

Brief code is below

const AWS = require("aws-sdk");
const s3 = new AWS.S3();

exports.handler = (event) => {
    const { bucketName, objKey } = event
    const params = {
        Bucket: bucketName,
        Key: objKey
    };
    return new Promise((resolve) => {
        s3.getObject(params, async (err, data) =>{
            if (err) console.log(err, err.stack);
            else     {
                const contents = JSON.parse(data.Body)
                resolve(contents);
            }
        });
    })
};

and it returned the json data as I expected.

And today I tried to create a new lambda with runtime Node.js 18.x but it returned null or some errors...

Q) Could you give me some advice to solve this  ?

+) I used same json file for each lambda

+) Not sure why, but in my case, data.Body.toString() didn't work (I saw some answers in stackoverflow provide that and tried but no lucks)

Thanks in advance!

Case A (returns null)

import { S3Client, GetObjectCommand } from "@aws-sdk/client-s3";
const s3Client = new S3Client({ region: "ap-northeast-2" });

export const handler = (event) => {
    const { objKey, bucketName } = event;
    const params={
        Bucket: bucketName,
        Key: objKey
    };

    const getObjCommand = new GetObjectCommand(params);

    return new Promise((resolve) => {
        s3Client.send(getObjCommand, async (err, data) =>{
            if (err) console.log(err, err.stack);
            else     {
                const list = JSON.parse(data.Body)
                resolve(list);
            }
        });
    })
};

Case B (returns "Unexpected token o in JSON at position 1")

export const handler = async (event) => {
    const { objKey, bucketName } = event;
    const params={
        Bucket: bucketName,
        Key: objKey
    };

    const getObjCommand = new GetObjectCommand(params);
    const response = await s3Client.send(getObjCommand)

    console.log("JSON.parse(response.Body)", JSON.parse(response.Body))
};

Case C (returns "TypeError: Converting circular structure to JSON")

export const handler = async (event) => {
    const { objKey, bucketName } = event;
    const params={
        Bucket: bucketName,
        Key: objKey
    };
    const getObjCommand = new GetObjectCommand(params);

    try {
        const response = await s3Client.send(getObjCommand)
        return JSON.stringify(response.Body)
    } catch(err) {
        console.log("error", err)
        return err
    }
};


问:
Problem with plotting filter characteristics using 'freqz()' function in matlab
I want to design a high-pass digital filter at cutoff frequency 0.5 Hz.
Sampling frequency of the input signal is 500 Hz.

I wrote this code:

```<code>Fs = 500;
fc = 0.5;
[b,a] = butter(12,fc/(Fs/2), "high");
[h,w] = freqz(b,a);
plot(w/pi*Fs/2, abs(h))
</code>```

After running the code, I get this plot as the magnitude of the filter:

enter image description here

Please help me to fix this problem.
Thanks.

Body:
I want to design a high-pass digital filter at cutoff frequency 0.5 Hz.
Sampling frequency of the input signal is 500 Hz.

I wrote this code:

Fs = 500;
fc = 0.5;
[b,a] = butter(12,fc/(Fs/2), "high");
[h,w] = freqz(b,a);
plot(w/pi*Fs/2, abs(h))

After running the code, I get this plot as the magnitude of the filter:

enter image description here

Please help me to fix this problem.
Thanks.


问:
The toolbar button "Clear" and "Reset" icons do not work properly in OHIF VIEWER
I am working on an electron App with OHIF VIEWER project. I work on the study details page with the following URL https://viewer.ohif.org/local. The toolbar action "clear" and "reset" button icons do not work for me.

I have debugged the code but did not get any solution.

Is there any solution to my query? I have attached a screenshot

attached image description here

How to operate "Clear" and "Reset" actions in OHIF Viewer(https://viewer.ohif.org/local)


问:
AWS SAM error when invoking lambda locally for linked folder
I am using AWS SAM to invoke lambda function locally.

I have below folder structure of my node.js lambda.

```<code>+-rootfolder
  |
  +--utils
  |  |
  |  +--deps -- (This folder is common for all lambda functions)
  |  |   +--mymodule.js
  |  |   +--common.js
  |  +--foo
  |      +--some.js
  |
  +--lambdaOne
  |   +--index.js
  |   +--prokect.json
  |   +--test-event.json
  |   +--deps -- (linked folder ../utils/deps)
  |
  +--lambdaTwo
  |   +--index.js
  |   +--prokect.json
  |   +--test-event.json
  |   +--deps -- (linked folder ../utils/deps)

</code>```

When I run the sam cli command as below:

```<code>$ sam local invoke -e ./lambdaOne/test-event.json LambdaOne
</code>```

I am getting below error:

```<code>Runtime.ImportModuleError: Error: Cannot find module './deps/mymodule.js'
</code>```

I think SAM is not loading the linked folder 'deps'.

I did try to use 'Layers' in my 'template.yaml' but still same error.

```<code>//template.yaml
AWSTemplateFormatVersion: 'xxxx-xx-xx'
Transform: AWS::Serverless-xxxx-xx-xx
Description: >
  Run Lambda locally

Resources:
  LambdaOne:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: lambdaOne/
      Handler: index.handler
      Layers:
        - !Ref LambdaDepLayer
      Runtime: nodejs14.x

  LambdaDepLayer:
      Type: AWS::Serverless::LayerVersion
      Properties:
          LayerName: lambda-deps
          Description: dependencies
          ContentUri: ./utils/deps/
          CompatibleRuntimes:
            - nodejs14.x
          LicenseInfo: 'MIT'
          RetentionPolicy: Retain

</code>```

Body:
I am using AWS SAM to invoke lambda function locally.

I have below folder structure of my node.js lambda.

+-rootfolder
  |
  +--utils
  |  |
  |  +--deps -- (This folder is common for all lambda functions)
  |  |   +--mymodule.js
  |  |   +--common.js
  |  +--foo
  |      +--some.js
  |
  +--lambdaOne
  |   +--index.js
  |   +--prokect.json
  |   +--test-event.json
  |   +--deps -- (linked folder ../utils/deps)
  |
  +--lambdaTwo
  |   +--index.js
  |   +--prokect.json
  |   +--test-event.json
  |   +--deps -- (linked folder ../utils/deps)

When I run the sam cli command as below:

$ sam local invoke -e ./lambdaOne/test-event.json LambdaOne

I am getting below error:

Runtime.ImportModuleError: Error: Cannot find module './deps/mymodule.js'

I think SAM is not loading the linked folder 'deps'.

I did try to use 'Layers' in my 'template.yaml' but still same error.

//template.yaml
AWSTemplateFormatVersion: 'xxxx-xx-xx'
Transform: AWS::Serverless-xxxx-xx-xx
Description: >
  Run Lambda locally

Resources:
  LambdaOne:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: lambdaOne/
      Handler: index.handler
      Layers:
        - !Ref LambdaDepLayer
      Runtime: nodejs14.x

  LambdaDepLayer:
      Type: AWS::Serverless::LayerVersion
      Properties:
          LayerName: lambda-deps
          Description: dependencies
          ContentUri: ./utils/deps/
          CompatibleRuntimes:
            - nodejs14.x
          LicenseInfo: 'MIT'
          RetentionPolicy: Retain


问:
Add custom icon on quill editor for displaying dropdown menu using bootstrap
Add a icon button here as shown, when clicked it would show dropdown using https://getbootstrap.com/docs/5.2/components/dropdowns/

When clicked this icon
It should popdown options as shown below

When the Action menu is clicked it should write {{Action}} on the quill editor at cursor

When the Action action menu is clicked it should write {{Action action}} on the quill editor at cursor

When the Something else here menu is clicked it should write {{Something else here}} on the quill editor at cursor

var toolbarOptions = ['bold', 'italic', 'image',
                {
                    size: ['small', false, 'large', 'huge']
                }, 'clean'
            ]

  var editor = new Quill('#editor', {
    modules: { toolbar: toolbarOptions },
    theme: 'snow',
  });```
<pre class="snippet-code-html lang-html prettyprint-override"><code><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <link href="https://cdn.quilljs.com/1.0.0/quill.snow.css" rel="stylesheet" />
  <script src="https://cdn.quilljs.com/1.0.0/quill.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
</head>
<body>

<div id="editor">
  <p>Hello World!</p>
</div>

</body>
</html></code>```

Body:
Add a icon button here as shown, when clicked it would show dropdown using https://getbootstrap.com/docs/5.2/components/dropdowns/

When clicked this icon
It should popdown options as shown below

When the Action menu is clicked it should write {{Action}} on the quill editor at cursor

When the Action action menu is clicked it should write {{Action action}} on the quill editor at cursor

When the Something else here menu is clicked it should write {{Something else here}} on the quill editor at cursor

var toolbarOptions = ['bold', 'italic', 'image',
                {
                    size: ['small', false, 'large', 'huge']
                }, 'clean'
            ]

  var editor = new Quill('#editor', {
    modules: { toolbar: toolbarOptions },
    theme: 'snow',
  });

<!DOCTYPE html>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <link href="https://cdn.quilljs.com/1.0.0/quill.snow.css" rel="stylesheet" />

<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">

Hello World!


问:
Can someone help me with my react app that runs in the localhost and doesn't display anything?
```<code>import React, { useState, useEffect } from 'react';
import { makeStyles } from '@mui/material/styles';
import { Grid, Typography, Link } from '@mui/material';

// We can use the makeStyles hook from MUI to create a custom styles object
const useStyles = makeStyles((theme) => ({
  root: {
    flexGrow: 1,
  },
}));

function App() {
  const classes = useStyles();
  const [data, setData] = useState(null); // we'll use this state variable to store the data we get from the API

  useEffect(() => {
    // This function will run when the component mounts (similar to componentDidMount in a class-based component)
    // We'll use the fetch API to get data from the API
    fetch('https://api.example.com/endpoint')
      .then((response) => response.json())
      .then((json) => {
        setData(json);
      });
  }, []); // We pass an empty array as the second argument to useEffect to make sure it only runs once

  return (
    <div className={classes.root}>
      <Grid container spacing={3}>
        <Grid item xs={12}>
          <Typography variant="h2">Hello BeyondMD!</Typography>
        </Grid>
        <Grid item xs={12}>
          {/* Here, we use the Link component from MUI to create a link to a PDF file */}
          <Link href="public\Resume+Template.pdf" target="_blank">
            View my resume
          </Link>
        </Grid>
        {data && (
          <Grid item xs={12}>
            {/* If we have data from the API, we can render it here */}
            <Typography variant="body1">{data.someProperty}</Typography>
          </Grid>
        )}
      </Grid>
    </div>
  );
}

export default App;

</code>```

Im trying to display my resume that I have put in the public and also fetch data from a free API (I dont know where though). In the end it is giving me a blank page with the localhost.

I have tried almost everything I can find online. I want it to display a line of text and my resume and also data from a free API anywhere.

Body:
import React, { useState, useEffect } from 'react';
import { makeStyles } from '@mui/material/styles';
import { Grid, Typography, Link } from '@mui/material';

// We can use the makeStyles hook from MUI to create a custom styles object
const useStyles = makeStyles((theme) => ({
  root: {
    flexGrow: 1,
  },
}));

function App() {
  const classes = useStyles();
  const [data, setData] = useState(null); // we'll use this state variable to store the data we get from the API

  useEffect(() => {
    // This function will run when the component mounts (similar to componentDidMount in a class-based component)
    // We'll use the fetch API to get data from the API
    fetch('https://api.example.com/endpoint')
      .then((response) => response.json())
      .then((json) => {
        setData(json);
      });
  }, []); // We pass an empty array as the second argument to useEffect to make sure it only runs once

  return (

      <Grid container spacing={3}>
        <Grid item xs={12}>
          <Typography variant="h2">Hello BeyondMD!</Typography>
        </Grid>
        <Grid item xs={12}>
          {/* Here, we use the Link component from MUI to create a link to a PDF file */}
          <Link href="public\Resume+Template.pdf" target="_blank">
            View my resume
          </Link>
        </Grid>
        {data && (
          <Grid item xs={12}>
            {/* If we have data from the API, we can render it here */}
            <Typography variant="body1">{data.someProperty}</Typography>
          </Grid>
        )}
      </Grid>

  );
}

export default App;

Im trying to display my resume that I have put in the public and also fetch data from a free API (I dont know where though). In the end it is giving me a blank page with the localhost.

I have tried almost everything I can find online. I want it to display a line of text and my resume and also data from a free API anywhere.


问:
React Native Keyboard Animation
I am using React Native Pager View and trying to create a registration form. Each child view in Pager View contains another TextInput. When I scroll to another page, the keyboard tries to disappear for a second and appears again because my TextInput autoFocus property is set to true but I need a way to keep the keyboard always open whenever I scroll to the next page. I couldn't be able to find any solution.

Title: React Native Keyboard Animation


问:
How to solve or diagnose connection reset by peer in lxc container [wsl2/ubuntu]?
I have a problem with my lxc/lxd container not being able to fetch package/network dependencies from the internet. Larger downloads get interrupted with peer disconnects.

I came across the error while trying to use Snapcraft on an Ubuntu 22.10 wsl installation, snapcraft uses lxd internally to perform build instructions. For brievity I reproduced the errror with the following minimum example.

echo -e "[boot]\nsystemd=true" | sudo tee /etc/wsl.conf > /dev/null
sudo apt-get update && sudo apt-get upgrade
```
<pre class="lang-bash prettyprint-override"><code>wsl.exe --shutdown
</code>```
```<code>sudo snap install lxd
sudo lxd init
sudo lxc launch images:ubuntu/focal wired-bluejay
sudo lxc exec wired-bluejay -- curl -o dart-sdk-linux-x64.zip https://storage.googleapis.com/flutter_infra_release/flutter/472e34cbbcd461c748973e7e735558ab200d4f5e/dart-sdk-linux-x64.zip

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  8  246M    8 20.8M    0     0  2780k      0  0:01:30  0:00:07  0:01:23 2951k
curl: (56) OpenSSL SSL_read: Connection reset by peer, errno 104
</code>```

^ simple illustration of the problem

The problem only seems to manifest inside of the lxc container, image downloads like pulling ubuntu/focal works without a problem. curl is just an example but happens with also with git.

I collected some more information in this gist w.r.t network configuration and tcpdumps: https://gist.github.com/phr34k/334c1c34fd519165cfede0eeaf382e7b

The problem is intermittend appears specific to wsl, occurs on two out of three wireless network that I've access to. Including regular my home network. The problem does not occur on a virtual box instance on the same machine.

Most github issues that reference changing mtu or upgrading wireless network drivers. I tried most solutions but didn't work. I'd appreciate if anybody has a solution or some pointers of what I can try.

https://janovesk.com/wsl/2022/02/15/wsl2-and-mtu.html

How to fix git error: RPC failed; curl 56 GnuTLS

Using a socks proxy with git for the http transport

Bug reports:

https://github.com/microsoft/WSL/issues/9427

https://github.com/lxc/lxd/issues/11246

https://discuss.linuxcontainers.org/t/curl-git-dont-work-properly-inside-an-lxd-container-on-wsl-ubuntu-instance-and-disconnects-frequently/16036

Edit:

As an expiriment I setup a socks5 proxy and use that to connect from inside lxd, made curl stable. Suggesting it's not the internet connection in general but some kind of environmental/network settings related.

Body:
I have a problem with my lxc/lxd container not being able to fetch package/network dependencies from the internet. Larger downloads get interrupted with peer disconnects.

I came across the error while trying to use Snapcraft on an Ubuntu 22.10 wsl installation, snapcraft uses lxd internally to perform build instructions. For brievity I reproduced the errror with the following minimum example.

echo -e "[boot]\nsystemd=true" | sudo tee /etc/wsl.conf > /dev/null
sudo apt-get update && sudo apt-get upgrade

wsl.exe --shutdown

sudo snap install lxd
sudo lxd init
sudo lxc launch images:ubuntu/focal wired-bluejay
sudo lxc exec wired-bluejay -- curl -o dart-sdk-linux-x64.zip https://storage.googleapis.com/flutter_infra_release/flutter/472e34cbbcd461c748973e7e735558ab200d4f5e/dart-sdk-linux-x64.zip

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  8  246M    8 20.8M    0     0  2780k      0  0:01:30  0:00:07  0:01:23 2951k
curl: (56) OpenSSL SSL_read: Connection reset by peer, errno 104

^ simple illustration of the problem

The problem only seems to manifest inside of the lxc container, image downloads like pulling ubuntu/focal works without a problem. curl is just an example but happens with also with git.

I collected some more information in this gist w.r.t network configuration and tcpdumps: https://gist.github.com/phr34k/334c1c34fd519165cfede0eeaf382e7b

The problem is intermittend appears specific to wsl, occurs on two out of three wireless network that I've access to. Including regular my home network. The problem does not occur on a virtual box instance on the same machine.

Most github issues that reference changing mtu or upgrading wireless network drivers. I tried most solutions but didn't work. I'd appreciate if anybody has a solution or some pointers of what I can try.

https://janovesk.com/wsl/2022/02/15/wsl2-and-mtu.html

How to fix git error: RPC failed; curl 56 GnuTLS

Using a socks proxy with git for the http transport

Bug reports:

https://github.com/microsoft/WSL/issues/9427

https://github.com/lxc/lxd/issues/11246

https://discuss.linuxcontainers.org/t/curl-git-dont-work-properly-inside-an-lxd-container-on-wsl-ubuntu-instance-and-disconnects-frequently/16036

Edit:

As an expiriment I setup a socks5 proxy and use that to connect from inside lxd, made curl stable. Suggesting it's not the internet connection in general but some kind of environmental/network settings related.


问:
How to detect errors while using the `.import` command in the sqlite3 CLI
It seems .import will only fail if the last record fails. Below I use .bail on and the script continues after the first two imports despite them both causing errors.

```<code>.bail on
PRAGMA foreign_keys = ON;

create table x (a primary key);
create table y (c references x(a));

.import --csv "|echo 2" x
.import --csv "|seq 2" y

.print 'Did not bail despite failing to insert 1'

create table z (a, b NOT NULL);
.import --csv "|printf 'a\nb,c\n'" z

.print "Did not bail despite failing to insert `a`"

.import --csv "|printf '1,2\n3\n'" z
.print 'This will not print because in this case, the bad record was at the
end'
</code>```

This outputs:

```<code><pipe>:1: INSERT failed: FOREIGN KEY constraint failed
Did not bail despite failing to insert 1
<pipe>:1: expected 2 columns but found 1 - filling the rest with NULL
<pipe>:1: INSERT failed: NOT NULL constraint failed: z.b
Did not bail despite failing to insert `a`
<pipe>:2: expected 2 columns but found 1 - filling the rest with NULL
<pipe>:2: INSERT failed: NOT NULL constraint failed: z.b
</code>```

Body:
It seems .import will only fail if the last record fails. Below I use .bail on and the script continues after the first two imports despite them both causing errors.

.bail on
PRAGMA foreign_keys = ON;

create table x (a primary key);
create table y (c references x(a));

.import --csv "|echo 2" x
.import --csv "|seq 2" y

.print 'Did not bail despite failing to insert 1'

create table z (a, b NOT NULL);
.import --csv "|printf 'a\nb,c\n'" z

.print "Did not bail despite failing to insert `a`"

.import --csv "|printf '1,2\n3\n'" z
.print 'This will not print because in this case, the bad record was at the
end'

This outputs:

<pipe>:1: INSERT failed: FOREIGN KEY constraint failed
Did not bail despite failing to insert 1
<pipe>:1: expected 2 columns but found 1 - filling the rest with NULL
<pipe>:1: INSERT failed: NOT NULL constraint failed: z.b
Did not bail despite failing to insert `a`
<pipe>:2: expected 2 columns but found 1 - filling the rest with NULL
<pipe>:2: INSERT failed: NOT NULL constraint failed: z.b


问:
How to apply scipy curve_fit to different magnitude data?
I have two arrays: x ranges from 50 to 1000 while y ranges from 0 to 13.

I'm trying to fit them by the Gaussian function:

```<code>import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit

x = np.array([954.57747687, 845.47601272, 746.69873108, 657.48101282,
       577.09839969, 504.86539163, 440.13425151, 382.29381761,
       330.7683239 , 285.01622822, 244.52904868, 208.83020828,
       177.473888  , 150.04388862, 126.15250125, 105.4393871 ,
        87.57046634])

y = np.array([ 0.2,  0.5,  0.6,  1.4,  2.7,  4. ,  5. ,  6.2,  8.6, 10.3, 11.6,
       12.4, 12.7, 12.4,  7.6,  3. ,  0.8])

# Function to calculate the Gaussian with constants a, b, and c
def gaussian(x, a, b, c):
    return a*np.exp(-np.power(x - b, 2)/(2*np.power(c, 2)))

pars, cov = curve_fit(f=gaussian, xdata=x, ydata=y)
print(pars) # [1. 1. 1.]

pars, cov = curve_fit(f=gaussian, xdata=x/100, ydata=y)
print(pars) # [12.38265077  2.49976014  1.18267892]

fig, axs = plt.subplots()
axs.scatter(y, x/100)
axs.plot(gaussian(x/100, *pars), x/100, linewidth=2, linestyle='--')
</code>```

I have to scale the x data to make it work ... How to fit the data without manual scaling?

Body:
I have two arrays: x ranges from 50 to 1000 while y ranges from 0 to 13.

I'm trying to fit them by the Gaussian function:

import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit

x = np.array([954.57747687, 845.47601272, 746.69873108, 657.48101282,
       577.09839969, 504.86539163, 440.13425151, 382.29381761,
       330.7683239 , 285.01622822, 244.52904868, 208.83020828,
       177.473888  , 150.04388862, 126.15250125, 105.4393871 ,
        87.57046634])

y = np.array([ 0.2,  0.5,  0.6,  1.4,  2.7,  4. ,  5. ,  6.2,  8.6, 10.3, 11.6,
       12.4, 12.7, 12.4,  7.6,  3. ,  0.8])

# Function to calculate the Gaussian with constants a, b, and c
def gaussian(x, a, b, c):
    return a*np.exp(-np.power(x - b, 2)/(2*np.power(c, 2)))

pars, cov = curve_fit(f=gaussian, xdata=x, ydata=y)
print(pars) # [1. 1. 1.]

pars, cov = curve_fit(f=gaussian, xdata=x/100, ydata=y)
print(pars) # [12.38265077  2.49976014  1.18267892]

fig, axs = plt.subplots()
axs.scatter(y, x/100)
axs.plot(gaussian(x/100, *pars), x/100, linewidth=2, linestyle='--')

I have to scale the x data to make it work ... How to fit the data without manual scaling?


问:
Rewrite query so the WHEN clause won't affect Right outer Join
So, I just want to change the inner join to right outer join but it keeps inner joining everything. I've tried all kinds of join but the results for inner join keeps on showing

Or if anyone has any tips on how I can rewrite this query, joining 2 tables with their own WHERE clause filter without the WHERE clause messing up the JOIN. And I read somewhere that the WHERE clause affects the JOIN

```<code>DECLARE @BranchC VARCHAR(500) = '01001'
DECLARE @Range1 VARCHAR(255) = '202101'
DECLARE @Range2 VARCHAR(255) = '202201'

SELECT
    sub1.*
FROM
    (
        SELECT
            ISNULL(r1.ItemID, r2.ItemID) AS ItemID,
            r2.TotalItemPrice as R2_ItemPrice,
            r1.TotalItemPrice AS R1_ItemPrice
        FROM
            (
                SELECT
                    ItemID,
                    SUM(TotalItemPrice) AS TotalItemPrice
                FROM
                    DM.M
                WHERE
                    0 = 0
                    AND InvoiceYearMonth IN (SELECT VALUE FROM dbo.SplitString(@Range1,','))
                    AND BranchCode IN (SELECT ITEM FROM dbo.DelimitedSplit8K(@BranchC,N','))
                GROUP BY
                    ItemID
            ) r1
            INNER JOIN -- wanted to make this as right outer join
            (
                SELECT
                    ItemID,
                    SUM(TotalItemPrice) AS TotalItemPrice
                FROM
                    DM.M
                WHERE
                    0 = 0
                    AND InvoiceYearMonth IN (SELECT VALUE FROM dbo.SplitString(@Range2,','))
                    AND BranchCode IN (SELECT ITEM FROM dbo.DelimitedSplit8K(@BranchC,N','))
                GROUP BY
                    ItemID
            ) r2
            ON r1.ItemID = r2.ItemID
        WHERE
            0 = 0
            AND r1.ItemID NOT IN (SELECT ItemID FROM DM.C)
            AND r2.ItemID NOT IN (SELECT ItemID FROM DM.C)
    ) sub1
</code>```

Left Outer join (Top 2)

ItemID
r2_ItemPrice
r1_ItemPrice

207106
8555.65
13717.01

972304
11165
11879.26

Right Outer join (Top 2)

ItemID
r2_ItemPrice
r1_ItemPrice

207106
8555.65
13717.01

972304
11165
11879.26

LEFT join (Top 2)

ItemID
r2_ItemPrice
r1_ItemPrice

207106
8555.65
13717.01

972304
11165
11879.26

RIGHT join (Top 2)

ItemID
r2_ItemPrice
r1_ItemPrice

207106
8555.65
13717.01

972304
11165
11879.26

FULL outer join (Top 2)

ItemID
r2_ItemPrice
r1_ItemPrice

207106
8555.65
13717.01

972304
11165
11879.26

I've tried to remove all where clause and use AND clause as a filter to no avail. Both right outer join and inner join is showing.

Body:
So, I just want to change the inner join to right outer join but it keeps inner joining everything. I've tried all kinds of join but the results for inner join keeps on showing

Or if anyone has any tips on how I can rewrite this query, joining 2 tables with their own WHERE clause filter without the WHERE clause messing up the JOIN. And I read somewhere that the WHERE clause affects the JOIN

DECLARE @BranchC VARCHAR(500) = '01001'
DECLARE @Range1 VARCHAR(255) = '202101'
DECLARE @Range2 VARCHAR(255) = '202201'

SELECT
    sub1.*
FROM
    (
        SELECT
            ISNULL(r1.ItemID, r2.ItemID) AS ItemID,
            r2.TotalItemPrice as R2_ItemPrice,
            r1.TotalItemPrice AS R1_ItemPrice
        FROM
            (
                SELECT
                    ItemID,
                    SUM(TotalItemPrice) AS TotalItemPrice
                FROM
                    DM.M
                WHERE
                    0 = 0
                    AND InvoiceYearMonth IN (SELECT VALUE FROM dbo.SplitString(@Range1,','))
                    AND BranchCode IN (SELECT ITEM FROM dbo.DelimitedSplit8K(@BranchC,N','))
                GROUP BY
                    ItemID
            ) r1
            INNER JOIN -- wanted to make this as right outer join
            (
                SELECT
                    ItemID,
                    SUM(TotalItemPrice) AS TotalItemPrice
                FROM
                    DM.M
                WHERE
                    0 = 0
                    AND InvoiceYearMonth IN (SELECT VALUE FROM dbo.SplitString(@Range2,','))
                    AND BranchCode IN (SELECT ITEM FROM dbo.DelimitedSplit8K(@BranchC,N','))
                GROUP BY
                    ItemID
            ) r2
            ON r1.ItemID = r2.ItemID
        WHERE
            0 = 0
            AND r1.ItemID NOT IN (SELECT ItemID FROM DM.C)
            AND r2.ItemID NOT IN (SELECT ItemID FROM DM.C)
    ) sub1

Left Outer join (Top 2)

ItemID
r2_ItemPrice
r1_ItemPrice

207106
8555.65
13717.01

972304
11165
11879.26

Right Outer join (Top 2)

ItemID
r2_ItemPrice
r1_ItemPrice

207106
8555.65
13717.01

972304
11165
11879.26

LEFT join (Top 2)

ItemID
r2_ItemPrice
r1_ItemPrice

207106
8555.65
13717.01

972304
11165
11879.26

RIGHT join (Top 2)

ItemID
r2_ItemPrice
r1_ItemPrice

207106
8555.65
13717.01

972304
11165
11879.26

FULL outer join (Top 2)

ItemID
r2_ItemPrice
r1_ItemPrice

207106
8555.65
13717.01

972304
11165
11879.26

I've tried to remove all where clause and use AND clause as a filter to no avail. Both right outer join and inner join is showing.


问:
Dbus communication for Unity 3D
I want to exchange data between a qt application and an unity 3D application. How can I use Dbus to fulfil the above requirements.</p>

Title: Dbus communication for Unity 3D


问:
What is the logical difference between these codes?
This is my solution, which receives a heap buffer overflow (out of bounds):

```<code>void FFHelper(vector<vector<int>>& image, int i, int j, int newColor, int oldColor)
{
    static int m = image.size();
    static int n = image[0].size();

    if (i < 0 || j < 0
        || i >= m || j >= n
        || image[i][j] != oldColor)
    {
       return;
    }

    image[i][j] = newColor;

    FFHelper(image, i+1, j, newColor, oldColor);
    FFHelper(image, i-1, j, newColor, oldColor);
    FFHelper(image, i, j+1, newColor, oldColor);
    FFHelper(image, i, j-1, newColor, oldColor);
}

vector<vector<int>> floodFill(vector<vector<int>>& image, int sr, int sc, int color)
{
    FFHelper(image, sr, sc, color, image[sr][sc]);

    return image;
}
</code>```

where it is guaranteed that 0 <= sr < m and 0 <= sc < n where image is m x n.

This is a code that receives no buffer overflow:

```<code>void dfs(vector<vector<int>>& image, int i, int j, int val, int newColor)
{
    if(i < 0 || i >= image.size()
       || j < 0 || j>= image[0].size()
       || image[i][j] == newColor || image[i][j] != val)
    {
        return;
    }

    image[i][j] = newColor;

    dfs(image, i - 1, j, val, newColor);
    dfs(image, i + 1, j, val, newColor);
    dfs(image, i, j - 1, val, newColor);
    dfs(image, i, j + 1, val, newColor);
}

vector<vector<int>> floodFill(vector<vector<int>>& image, int sr, int sc,
int newColor)
{
    int val = image[sr][sc];

    dfs(image, sr, sc, val, newColor);

    return image;
}
</code>```

What is the difference? I seriously don't see it. Someone from codereview.stackexchange suggested I post here.

Body:
This is my solution, which receives a heap buffer overflow (out of bounds):

void FFHelper(vector<vector<int>>& image, int i, int j, int newColor, int oldColor)
{
    static int m = image.size();
    static int n = image[0].size();

    if (i < 0 || j < 0
        || i >= m || j >= n
        || image[i][j] != oldColor)
    {
       return;
    }

    image[i][j] = newColor;

    FFHelper(image, i+1, j, newColor, oldColor);
    FFHelper(image, i-1, j, newColor, oldColor);
    FFHelper(image, i, j+1, newColor, oldColor);
    FFHelper(image, i, j-1, newColor, oldColor);
}

vector<vector<int>> floodFill(vector<vector<int>>& image, int sr, int sc, int color)
{
    FFHelper(image, sr, sc, color, image[sr][sc]);

    return image;
}

where it is guaranteed that 0 <= sr < m and 0 <= sc < n where image is m x n.

This is a code that receives no buffer overflow:

void dfs(vector<vector<int>>& image, int i, int j, int val, int newColor)
{
    if(i < 0 || i >= image.size()
       || j < 0 || j>= image[0].size()
       || image[i][j] == newColor || image[i][j] != val)
    {
        return;
    }

    image[i][j] = newColor;

    dfs(image, i - 1, j, val, newColor);
    dfs(image, i + 1, j, val, newColor);
    dfs(image, i, j - 1, val, newColor);
    dfs(image, i, j + 1, val, newColor);
}

vector<vector<int>> floodFill(vector<vector<int>>& image, int sr, int sc,
int newColor)
{
    int val = image[sr][sc];

    dfs(image, sr, sc, val, newColor);

    return image;
}

What is the difference? I seriously don't see it. Someone from codereview.stackexchange suggested I post here.


问:
Pyrebase .download() not getting files from Firebase Storage
I am attempting to download some image files from Firebase Storage via the Pyrebase .download() function, but am having trouble actually getting the files. It supposedly finds the file on the database fine, as indicated with print(file.name), but when I try and print the actual line to download the file, it returns None and no files are downloaded in the specified folder. There are no errors as far as I can spot as the code exits with exit code 0.

As suggested by other solutions found, I have already tried adding 'serviceAccount' into the config when using pyrebase.initialize_app(config), and adding 'filename' and 'path' to the .download() function.

```<code>import pyrebase

config = {
    'apiKey': "...",
    'authDomain': "...",
    'projectId': "...",
    'storageBucket': "...",
    'messagingSenderId': "...",
    'appId': "...",
    'measurementId': "...",
    'databaseURL': "",
    'serviceAccount': "C:/Users/Dell/PycharmProjects/FYP/creds.json"
}

firebase = pyrebase.initialize_app(config)
storage = firebase.storage()

path_local = "C:/Users/Dell/PycharmProjects/FYP/identDatabase/"
all_files = storage.child("C:/Users/Dell/PycharmProjects/FYP/identDatabase").list_files()

for file in all_files:
    print(file.name)
    storage.child(file.name).download(filename=file.name.split('/')[6], path=path_local)
    # example of full path inside Firebase Storage
    # C:/Users/Dell/PycharmProjects/FYP/identDatabase/William Engel.jpg
</code>```

Body:
I am attempting to download some image files from Firebase Storage via the Pyrebase .download() function, but am having trouble actually getting the files. It supposedly finds the file on the database fine, as indicated with print(file.name), but when I try and print the actual line to download the file, it returns None and no files are downloaded in the specified folder. There are no errors as far as I can spot as the code exits with exit code 0.

As suggested by other solutions found, I have already tried adding 'serviceAccount' into the config when using pyrebase.initialize_app(config), and adding 'filename' and 'path' to the .download() function.

import pyrebase

config = {
    'apiKey': "...",
    'authDomain': "...",
    'projectId': "...",
    'storageBucket': "...",
    'messagingSenderId': "...",
    'appId': "...",
    'measurementId': "...",
    'databaseURL': "",
    'serviceAccount': "C:/Users/Dell/PycharmProjects/FYP/creds.json"
}

firebase = pyrebase.initialize_app(config)
storage = firebase.storage()

path_local = "C:/Users/Dell/PycharmProjects/FYP/identDatabase/"
all_files = storage.child("C:/Users/Dell/PycharmProjects/FYP/identDatabase").list_files()

for file in all_files:
    print(file.name)
    storage.child(file.name).download(filename=file.name.split('/')[6], path=path_local)
    # example of full path inside Firebase Storage
    # C:/Users/Dell/PycharmProjects/FYP/identDatabase/William Engel.jpg


问:
ListEmployeeComponent.jsx:21 Uncaught TypeError: Cannot read properties of undefined (reading 'push')
I am trying to create an Add-employee button but onClick event is not working getting above error. This problem is after click to Add-employee button creating employee management project with basic crud functionality.

```<code>ListEmployeeComponent.jsx:21 Uncaught TypeError: Cannot read properties of undefined (reading 'push')
at ListEmployeeComponent.addEmployee (ListEmployeeComponent.jsx:21:1)
at HTMLUnknownElement.callCallback (react-dom.development.js:4164:1)
at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:1)
at invokeGuardedCallback (react-dom.development.js:4277:1)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4291:1)
at executeDispatch (react-dom.development.js:9041:1)
at processDispatchQueueItemsInOrder (react-dom.development.js:9073:1)
at processDispatchQueue (react-dom.development.js:9086:1)
at dispatchEventsForPlugins (react-dom.development.js:9097:1)
at react-dom.development.js:9288:1
</code>```

I am creating employee management project with basic crud functionality.

```<code>import React, { Component } from 'react';
import EmployeeService from '../services/EmployeeService';

class ListEmployeeComponent extends Component {
  constructor(props) {
    super(props)

    this.state = {
      employees : []
    }
    this.addEmployee = this.addEmployee.bind(this);
  }

  componentDidMount(){
    EmployeeService.getEmployees().then((res) => {
      this.setState({ employees : res.data });
    });
  }

  addEmployee(){
    this.context.history.push("/add-employee");
  }

  render() {
    return (
      <div>
        <h2 className='text-center'>Employees List</h2>
        <div>
          <button className='btn btn-primary' onClick={this.addEmployee}> Add Employee </button>
        </div>
        <div className='row'>
          <table className='table table-striped table-bordered'>
            <thead>
              <tr>
                <th>Employee First Name</th>
                <th>Employee Last Name</th>
                <th>Employee Email Id</th>
                <th>Actions</th>
              </tr>
            </thead>
            <tbody>
              {this.state.employees.map(employee =>
                <tr key={employee.id}>
                  <td>{employee.firstName}</td>
                  <td>{employee.lastName}</td>
                  <td>{employee.emailId}</td>
                </tr>
              )}
            </tbody>
          </table>
        </div>
      </div>
    );
  }
}

export default ListEmployeeComponent;
</code>```

App.js

```<code>import './App.css';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'
import ListEmployeeComponent from './components/ListEmployeeComponent';
import CreateEmployeeComponent from './components/CreateEmployeeComponent';
import HeaderComponent from './components/HeaderComponent';
import FooterComponent from './components/FooterComponent';

function App() {
  return (
    <div>
      <Router>
        <HeaderComponent />
        <div className="container">
          <Routes>
            <Route path='/' exact element={ <ListEmployeeComponent/> }></Route>
            <Route path='/employees' element={ <ListEmployeeComponent/> }></Route>
            <Route path='/add-employee' element= { <CreateEmployeeComponent/> }></Route>
          </Routes>
        </div>
        <FooterComponent />
      </Router>
    </div>
  );
}

export default App;
</code>```

Body:
I am trying to create an Add-employee button but onClick event is not working getting above error. This problem is after click to Add-employee button creating employee management project with basic crud functionality.

ListEmployeeComponent.jsx:21 Uncaught TypeError: Cannot read properties of undefined (reading 'push')
at ListEmployeeComponent.addEmployee (ListEmployeeComponent.jsx:21:1)
at HTMLUnknownElement.callCallback (react-dom.development.js:4164:1)
at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:1)
at invokeGuardedCallback (react-dom.development.js:4277:1)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4291:1)
at executeDispatch (react-dom.development.js:9041:1)
at processDispatchQueueItemsInOrder (react-dom.development.js:9073:1)
at processDispatchQueue (react-dom.development.js:9086:1)
at dispatchEventsForPlugins (react-dom.development.js:9097:1)
at react-dom.development.js:9288:1

I am creating employee management project with basic crud functionality.

import React, { Component } from 'react';
import EmployeeService from '../services/EmployeeService';

class ListEmployeeComponent extends Component {
  constructor(props) {
    super(props)

    this.state = {
      employees : []
    }
    this.addEmployee = this.addEmployee.bind(this);
  }

  componentDidMount(){
    EmployeeService.getEmployees().then((res) => {
      this.setState({ employees : res.data });
    });
  }

  addEmployee(){
    this.context.history.push("/add-employee");
  }

  render() {
    return (

Employees List

          <button className='btn btn-primary' onClick={this.addEmployee}> Add Employee </button>

                Employee First Name
                Employee Last Name
                Employee Email Id
                Actions

              {this.state.employees.map(employee =>

                  {employee.firstName}
                  {employee.lastName}
                  {employee.emailId}

              )}

    );
  }
}

export default ListEmployeeComponent;

App.js

import './App.css';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'
import ListEmployeeComponent from './components/ListEmployeeComponent';
import CreateEmployeeComponent from './components/CreateEmployeeComponent';
import HeaderComponent from './components/HeaderComponent';
import FooterComponent from './components/FooterComponent';

function App() {
  return (

      <Router>
        <HeaderComponent />

          <Routes>
            <Route path='/' exact element={ <ListEmployeeComponent/> }></Route>
            <Route path='/employees' element={ <ListEmployeeComponent/> }></Route>
            <Route path='/add-employee' element= { <CreateEmployeeComponent/> }></Route>
          </Routes>

        <FooterComponent />
      </Router>

  );
}

export default App;


问:
Instagram Basic Display API - Unsupported post request error
I am trying to use the Instagram Basic Display API to post an image to my Instagram account using Python and the requests library. However, I am getting a 400 error with the following message:

```<code>{'error': {'message': "Unsupported post request. Object with ID '{user_id}' does not exist, cannot be loaded due to missing permissions, or does not support this operation", 'type': 'IGApiException', 'code': 100, 'error_subcode': 33, 'fbtrace_id': '{fbtrace_id}'}}
</code>```

OR I get

```<code>{'error': {'message': "Unsupported post request. Object with ID 'media' does not exist, cannot be loaded due to missing permissions, or does not support this operation", 'type': 'IGApiException', 'code': 100, 'error_subcode': 33, 'fbtrace_id': '{fbtrace_id}'}}
</code>```

When trying to make a POST request to "https://graph.instagram.com/me/media"

I have checked that I have the instagram_manage_insights permission and that the user ID is correct. Although I am not too sure I set up the API correctly as I followed a video. But I made an Instagram professional account and linked it to my facebook account, I then signed up at the Facebook Developers Page, then I created a new app and added my instagram account as an instagram tester and went onto instagram and accepted the invite, then I copied my token from the developers page and my user id from the Apps and Websites area on instagram

I used the following code to post an image to my Instagram account:

import requests

# Set up the API endpoint, parameters, and image file
endpoint = 'https://graph.instagram.com/{user_id}/media'
params = {
  'access_token': '{access_token}'
}
files = {'file': ('temp.jpg', open('temp.jpg', 'rb'))}

# Make the POST request
response = requests.post(endpoint, params=params, files=files)

# Print the response
print(response.status_code)
print(response.json())

```

I expected the image to be successfully posted to my Instagram account and to receive a 200 status code in the response.

Body:
I am trying to use the Instagram Basic Display API to post an image to my Instagram account using Python and the requests library. However, I am getting a 400 error with the following message:

{'error': {'message': "Unsupported post request. Object with ID '{user_id}' does not exist, cannot be loaded due to missing permissions, or does not support this operation", 'type': 'IGApiException', 'code': 100, 'error_subcode': 33, 'fbtrace_id': '{fbtrace_id}'}}

OR I get

{'error': {'message': "Unsupported post request. Object with ID 'media' does not exist, cannot be loaded due to missing permissions, or does not support this operation", 'type': 'IGApiException', 'code': 100, 'error_subcode': 33, 'fbtrace_id': '{fbtrace_id}'}}

When trying to make a POST request to "https://graph.instagram.com/me/media"

I have checked that I have the instagram_manage_insights permission and that the user ID is correct. Although I am not too sure I set up the API correctly as I followed a video. But I made an Instagram professional account and linked it to my facebook account, I then signed up at the Facebook Developers Page, then I created a new app and added my instagram account as an instagram tester and went onto instagram and accepted the invite, then I copied my token from the developers page and my user id from the Apps and Websites area on instagram

I used the following code to post an image to my Instagram account:

import requests

# Set up the API endpoint, parameters, and image file
endpoint = 'https://graph.instagram.com/{user_id}/media'
params = {
  'access_token': '{access_token}'
}
files = {'file': ('temp.jpg', open('temp.jpg', 'rb'))}

# Make the POST request
response = requests.post(endpoint, params=params, files=files)

# Print the response
print(response.status_code)
print(response.json())

I expected the image to be successfully posted to my Instagram account and to receive a 200 status code in the response.


问:
iframe position not responsive on one side when using vw/vh, inconsistent spacing
I've included an iframe of another page onto my landing page and it's next to a menu bar on the left. I enclosed the two into a div container and made a grid. The menu bar div has a nested grid in itself.

The spacing between the menu bar and the iframe is consistent when using a vh unit on the "left" position of the iframe, but the right side of the iframe relative to the whole page is inconsistent.

When I use vw, the right side is consistent but the space between the menu bar and iframe is inconsistent.

So if the width of the screen is lesser than mine, either the iframe will overlap with the menu or the iframe will get cut off.

If the height is lesser than mine, then either the space between the menu bar and the iframe is huge or the space to the right is huge.

I want the space between the menu bar and iframe AND the space between the edge of the page and the iframe to be consistent no matter the aspect ratio.

I tried adjusting the gap and padding in the container grid, adding a transparent border to the iframe on either side, adding a "right" position value, changing the type of position, trying to remove the grid on the menu bar, enclosing the iframe into a div but it didn't cause any significant change.

html:

```<code><div class="menu-screen-container">
  <div class="menu">
    <img src="elements/menu.png">
    <div class="menu-elems">
        <img src="elements/1.png">
        <img src="elements/2.png">
        <img src="elements/3.png">
        <img src="elements/4.png">
        <img src="elements/5.png">
   </div>
  </div>
<iframe class="work" src="work.html"></iframe>
</div>
</code>```

css:

```<code>.menu {
    position: relative;
    top: 17vh;
    left: 1vw;
}
</code>```
```<code>iframe {
    width: 83vw;
    height: 83vh;
    position:relative;
    left: 32vh;
    top: 14vh;
}
</code>```
```<code>.menu-screen-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    padding: 0vh 10vh 20vw 1vw;
    gap: 0vw;
    position: relative;
    width: 10vw;
    height: 100vh;
    right: 3vh;
    bottom: 9vh;
    justify-content: space-between;
</code>```

Body:
I've included an iframe of another page onto my landing page and it's next to a menu bar on the left. I enclosed the two into a div container and made a grid. The menu bar div has a nested grid in itself.

The spacing between the menu bar and the iframe is consistent when using a vh unit on the "left" position of the iframe, but the right side of the iframe relative to the whole page is inconsistent.

When I use vw, the right side is consistent but the space between the menu bar and iframe is inconsistent.

So if the width of the screen is lesser than mine, either the iframe will overlap with the menu or the iframe will get cut off.

If the height is lesser than mine, then either the space between the menu bar and the iframe is huge or the space to the right is huge.

I want the space between the menu bar and iframe AND the space between the edge of the page and the iframe to be consistent no matter the aspect ratio.

I tried adjusting the gap and padding in the container grid, adding a transparent border to the iframe on either side, adding a "right" position value, changing the type of position, trying to remove the grid on the menu bar, enclosing the iframe into a div but it didn't cause any significant change.

html:

css:

.menu {
    position: relative;
    top: 17vh;
    left: 1vw;
}

iframe {
    width: 83vw;
    height: 83vh;
    position:relative;
    left: 32vh;
    top: 14vh;
}

.menu-screen-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    padding: 0vh 10vh 20vw 1vw;
    gap: 0vw;
    position: relative;
    width: 10vw;
    height: 100vh;
    right: 3vh;
    bottom: 9vh;
    justify-content: space-between;


问:
Webrtc Android and iOS Black screen issue
I am using the google stun server in both android and iOS. For data communication using the firebase. I am able to connect android to android video call and iOS to iOS video call. But while connect the android to iOS and iOS to android it show the remote video as black screen

iOS code

```<code>  let configuration = RTCConfiguration()
        configuration.iceServers = [
            RTCIceServer(urlStrings: [
                "stun:stun1.l.google.com:19302", "stun:stun2.l.google.com:19302"
            ])
        ]
</code>```
```<code>  private let factory: RTCPeerConnectionFactory = {
        let videoEncoderFactory = RTCSimluatorVideoEncoderFactory()
        let videoDecoderFactory = RTCSimulatorVideoDecoderFactory()
        print(videoEncoderFactory)
        videoEncoderFactory.preferredCodec =  RTCVideoCodecInfo(name: kRTCVideoCodecVp8Name)
        return RTCPeerConnectionFactory(encoderFactory: videoEncoderFactory, decoderFactory: videoDecoderFactory)
    }()
</code>```
```<code>   videoSource!.adaptOutputFormat(toWidth: 1280, height: 720, fps: 30)
        videoCapturer = RTCCameraVideoCapturer(delegate: videoSource!)
        localVideoTrack = factory.videoTrack(with: videoSource!, trackId: "local_track")
        localAudioTrack = factory.audioTrack(with: audioSource, trackId: "local_track" + "_audio")
        localAudioTrack.isEnabled = true

//        audioSource.volume = 1
        super.init()

        let constraints = RTCMediaConstraints(mandatoryConstraints: nil,
                                              optionalConstraints: ["DtlsSrtpKeyAgreement": kRTCMediaConstraintsValueTrue])
        peerConnection = factory.peerConnection(with: configuration, constraints: constraints, delegate: self)
        peerConnection?.add(localVideoTrack, streamIds: ["local_track"])
        peerConnection?.add(localAudioTrack,streamIds: ["local_track"])
        remoteVideoTrack = peerConnection?.transceivers.first { $0.mediaType == .video }?.receiver.track as? RTCVideoTrack
</code>```

Android code

```<code>private val iceServer = listOf(
        PeerConnection.IceServer.builder("stun:stun.l.google.com:19302")
                .createIceServer(),
                PeerConnection.IceServer.builder("stun:stun2.l.google.com:19302")
            .createIceServer()

)
</code>```
```<code>private fun initPeerConnectionFactory(context: Application) {
    val options = PeerConnectionFactory.InitializationOptions.builder(context)
            .setEnableInternalTracer(true)
            .setFieldTrials("WebRTC-H264HighProfile/Enabled/")
            .createInitializationOptions()
    PeerConnectionFactory.initialize(options)
}

</code>```
```<code>private fun buildPeerConnectionFactory(): PeerConnectionFactory {
    return PeerConnectionFactory
            .builder()
            .setVideoDecoderFactory(DefaultVideoDecoderFactory(rootEglBase.eglBaseContext))
            .setVideoEncoderFactory(DefaultVideoEncoderFactory(rootEglBase.eglBaseContext, true, true))
            .setOptions(PeerConnectionFactory.Options().apply {
                disableEncryption = false
                disableNetworkMonitor = true

            })
            .createPeerConnectionFactory()
}

</code>```
```<code>  fun startLocalVideoCapture(localVideoOutput: SurfaceViewRenderer) {
        val surfaceTextureHelper = SurfaceTextureHelper.create(Thread.currentThread().name, rootEglBase.eglBaseContext)
        (videoCapturer as VideoCapturer).initialize(surfaceTextureHelper, localVideoOutput.context, localVideoSource.capturerObserver)
        videoCapturer.startCapture(1280, 720, 60)
        localAudioTrack = peerConnectionFactory.createAudioTrack(LOCAL_TRACK_ID + "_audio", audioSource);
        localVideoTrack = peerConnectionFactory.createVideoTrack(LOCAL_TRACK_ID, localVideoSource)
        localVideoTrack?.addSink(localVideoOutput)
        val localStream = peerConnectionFactory.createLocalMediaStream(LOCAL_STREAM_ID)
        localStream.addTrack(localVideoTrack)
      localStream.addTrack(localAudioTrack)

        peerConnection?.addStream(localStream)

    }

</code>```

I need help for connecting android and ios without black screen in remote video

Android:

v=0o=- 6563448285196734461 2 IN IP4 127.0.0.1s=-t=0 0a=group:BUNDLE audio videoa=msid-semantic: WMSm=video 9 UDP/TLS/RTP/SAVPF 96 97 98 100 101 127 124 125c=IN IP4 0.0.0.0a=rtcp:9 IN IP4 0.0.0.0a=ice-ufrag:I69Ta=ice-pwd:RY4fL2nYEJVHJ1vDc7fsws0qa=ice-options:trickle renominationa=fingerprint:sha-256 91:33:FC:D0:9C:BD:FE:A8:F4:7D:8F:6E:1F:71:05:4F:5B:F3:A0:DA:86:14:8A:CA:29:F0:45:AB:88:02:EE:50a=setup:activea=mid:audioa=extmap:14 urn:ietf:params:rtp-hdrext:toffseta=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-timea=extmap:13 urn:3gpp:video-orientationa=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01a=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delaya=extmap:11 http://www.webrtc.org/experiments/rtp-hdrext/video-content-typea=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timinga=extmap:9 http://www.webrtc.org/experiments/rtp-hdrext/color-spacea=recvonlya=rtcp-muxa=rtcp-rsizea=rtpmap:96 VP8/90000a=rtcp-fb:96 goog-remba=rtcp-fb:96 transport-cca=rtcp-fb:96 ccm fira=rtcp-fb:96 nacka=rtcp-fb:96 nack plia=rtpmap:97 rtx/90000a=fmtp:97 apt=96a=rtpmap:98 H264/90000a=rtcp-fb:98 goog-remba=rtcp-fb:98 transport-cca=rtcp-fb:98 ccm fira=rtcp-fb:98 nacka=rtcp-fb:98 nack plia=fmtp:98 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640c1fa=rtpmap:100 H264/90000a=rtcp-fb:100 goog-remba=rtcp-fb:100 transport-cca=rtcp-fb:100 ccm fira=rtcp-fb:100 nacka=rtcp-fb:100 nack plia=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01fa=rtpmap:101 rtx/90000a=fmtp:101 apt=100a=rtpmap:127 red/90000a=rtpmap:124 rtx/90000a=fmtp:124 apt=127a=rtpmap:125 ulpfec/90000m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126c=IN IP4 0.0.0.0a=rtcp:9 IN IP4 0.0.0.0a=ice-ufrag:I69Ta=ice-pwd:RY4fL2nYEJVHJ1vDc7fsws0qa=ice-options:trickle renominationa=fingerprint:sha-256 91:33:FC:D0:9C:BD:FE:A8:F4:7D:8F:6E:1F:71:05:4F:5B:F3:A0:DA:86:14:8A:CA:29:F0:45:AB:88:02:EE:50a=setup:activea=mid:videoa=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-levela=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-timea=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01a=recvonlya=rtcp-muxa=rtpmap:111 opus/48000/2a=rtcp-fb:111 transport-cca=fmtp:111 minptime=10;useinbandfec=1a=rtpmap:103 ISAC/16000a=rtpmap:104 ISAC/32000a=rtpmap:9 G722/8000a=rtpmap:102 ILBC/8000a=rtpmap:0 PCMU/8000a=rtpmap:8 PCMA/8000a=rtpmap:106 CN/32000a=rtpmap:105 CN/16000a=rtpmap:13 CN/8000a=rtpmap:110 telephone-event/48000a=rtpmap:112 telephone-event/32000a=rtpmap:113 telephone-event/16000a=rtpmap:126 telephone-event/8000

iOS

v=0o=- 8886095848359872555 2 IN IP4 127.0.0.1s=-t=0 0a=group:BUNDLE audio videoa=msid-semantic: WMS local_trackm=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 124 125c=IN IP4 0.0.0.0a=rtcp:9 IN IP4 0.0.0.0a=ice-ufrag:1BBja=ice-pwd:uaFw/ANPPPKHdZmf+qr31phba=ice-options:trickle renominationa=fingerprint:sha-256 1B:D0:0D:16:73:CD:FF:B9:F5:C3:8E:86:3D:83:DF:5D:3D:40:86:B1:67:D5:D3:9D:A4:92:AA:0F:C6:09:AE:ECa=setup:actpassa=mid:audioa=extmap:14 urn:ietf:params:rtp-hdrext:toffseta=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-timea=extmap:13 urn:3gpp:video-orientationa=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01a=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delaya=extmap:11 http://www.webrtc.org/experiments/rtp-hdrext/video-content-typea=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timinga=extmap:8 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07a=extmap:9 http://www.webrtc.org/experiments/rtp-hdrext/color-spacea=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mida=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-ida=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-ida=sendrecva=msid:local_track local_tracka=rtcp-muxa=rtcp-rsizea=rtpmap:96 VP8/90000a=rtcp-fb:96 goog-remba=rtcp-fb:96 transport-cca=rtcp-fb:96 ccm fira=rtcp-fb:96 nacka=rtcp-fb:96 nack plia=rtpmap:97 rtx/90000a=fmtp:97 apt=96a=rtpmap:98 H264/90000a=rtcp-fb:98 goog-remba=rtcp-fb:98 transport-cca=rtcp-fb:98 ccm fira=rtcp-fb:98 nacka=rtcp-fb:98 nack plia=fmtp:98 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640c1fa=rtpmap:99 rtx/90000a=fmtp:99 apt=98a=rtpmap:100 H264/90000a=rtcp-fb:100 goog-remba=rtcp-fb:100 transport-cca=rtcp-fb:100 ccm fira=rtcp-fb:100 nacka=rtcp-fb:100 nack plia=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01fa=rtpmap:101 rtx/90000a=fmtp:101 apt=100a=rtpmap:127 red/90000a=rtpmap:124 rtx/90000a=fmtp:124 apt=127a=rtpmap:125 ulpfec/90000a=ssrc-group:FID 1956454411 1435441277a=ssrc:1956454411 cname:BnVPai9gO/G5EEuLa=ssrc:1956454411 msid:local_track local_tracka=ssrc:1956454411 mslabel:local_tracka=ssrc:1956454411 label:local_tracka=ssrc:1435441277 cname:BnVPai9gO/G5EEuLa=ssrc:1435441277 msid:local_track local_tracka=ssrc:1435441277 mslabel:local_tracka=ssrc:1435441277 label:local_trackm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126c=IN IP4 0.0.0.0a=rtcp:9 IN IP4 0.0.0.0a=ice-ufrag:1BBja=ice-pwd:uaFw/ANPPPKHdZmf+qr31phba=ice-options:trickle renominationa=fingerprint:sha-256 1B:D0:0D:16:73:CD:FF:B9:F5:C3:8E:86:3D:83:DF:5D:3D:40:86:B1:67:D5:D3:9D:A4:92:AA:0F:C6:09:AE:ECa=setup:actpassa=mid:videoa=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-levela=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-timea=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mida=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-ida=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-ida=sendrecva=msid:local_track local_track_audioa=rtcp-muxa=rtpmap:111 opus/48000/2a=rtcp-fb:111 transport-cca=fmtp:111 minptime=10;useinbandfec=1a=rtpmap:103 ISAC/16000a=rtpmap:104 ISAC/32000a=rtpmap:9 G722/8000a=rtpmap:102 ILBC/8000a=rtpmap:0 PCMU/8000a=rtpmap:8 PCMA/8000a=rtpmap:106 CN/32000a=rtpmap:105 CN/16000a=rtpmap:13 CN/8000a=rtpmap:110 telephone-event/48000a=rtpmap:112 telephone-event/32000a=rtpmap:113 telephone-event/16000a=rtpmap:126 telephone-event/8000a=ssrc:2967951894 cname:BnVPai9gO/G5EEuLa=ssrc:2967951894 msid:local_track local_track_audioa=ssrc:2967951894 mslabel:local_tracka=ssrc:2967951894 label:local_track_audio

Body:
I am using the google stun server in both android and iOS. For data communication using the firebase. I am able to connect android to android video call and iOS to iOS video call. But while connect the android to iOS and iOS to android it show the remote video as black screen

iOS code

  let configuration = RTCConfiguration()
        configuration.iceServers = [
            RTCIceServer(urlStrings: [
                "stun:stun1.l.google.com:19302", "stun:stun2.l.google.com:19302"
            ])
        ]

  private let factory: RTCPeerConnectionFactory = {
        let videoEncoderFactory = RTCSimluatorVideoEncoderFactory()
        let videoDecoderFactory = RTCSimulatorVideoDecoderFactory()
        print(videoEncoderFactory)
        videoEncoderFactory.preferredCodec =  RTCVideoCodecInfo(name: kRTCVideoCodecVp8Name)
        return RTCPeerConnectionFactory(encoderFactory: videoEncoderFactory, decoderFactory: videoDecoderFactory)
    }()

   videoSource!.adaptOutputFormat(toWidth: 1280, height: 720, fps: 30)
        videoCapturer = RTCCameraVideoCapturer(delegate: videoSource!)
        localVideoTrack = factory.videoTrack(with: videoSource!, trackId: "local_track")
        localAudioTrack = factory.audioTrack(with: audioSource, trackId: "local_track" + "_audio")
        localAudioTrack.isEnabled = true

//        audioSource.volume = 1
        super.init()

        let constraints = RTCMediaConstraints(mandatoryConstraints: nil,
                                              optionalConstraints: ["DtlsSrtpKeyAgreement": kRTCMediaConstraintsValueTrue])
        peerConnection = factory.peerConnection(with: configuration, constraints: constraints, delegate: self)
        peerConnection?.add(localVideoTrack, streamIds: ["local_track"])
        peerConnection?.add(localAudioTrack,streamIds: ["local_track"])
        remoteVideoTrack = peerConnection?.transceivers.first { $0.mediaType == .video }?.receiver.track as? RTCVideoTrack

Android code

private val iceServer = listOf(
        PeerConnection.IceServer.builder("stun:stun.l.google.com:19302")
                .createIceServer(),
                PeerConnection.IceServer.builder("stun:stun2.l.google.com:19302")
            .createIceServer()

)

private fun initPeerConnectionFactory(context: Application) {
    val options = PeerConnectionFactory.InitializationOptions.builder(context)
            .setEnableInternalTracer(true)
            .setFieldTrials("WebRTC-H264HighProfile/Enabled/")
            .createInitializationOptions()
    PeerConnectionFactory.initialize(options)
}

private fun buildPeerConnectionFactory(): PeerConnectionFactory {
    return PeerConnectionFactory
            .builder()
            .setVideoDecoderFactory(DefaultVideoDecoderFactory(rootEglBase.eglBaseContext))
            .setVideoEncoderFactory(DefaultVideoEncoderFactory(rootEglBase.eglBaseContext, true, true))
            .setOptions(PeerConnectionFactory.Options().apply {
                disableEncryption = false
                disableNetworkMonitor = true

            })
            .createPeerConnectionFactory()
}

  fun startLocalVideoCapture(localVideoOutput: SurfaceViewRenderer) {
        val surfaceTextureHelper = SurfaceTextureHelper.create(Thread.currentThread().name, rootEglBase.eglBaseContext)
        (videoCapturer as VideoCapturer).initialize(surfaceTextureHelper, localVideoOutput.context, localVideoSource.capturerObserver)
        videoCapturer.startCapture(1280, 720, 60)
        localAudioTrack = peerConnectionFactory.createAudioTrack(LOCAL_TRACK_ID + "_audio", audioSource);
        localVideoTrack = peerConnectionFactory.createVideoTrack(LOCAL_TRACK_ID, localVideoSource)
        localVideoTrack?.addSink(localVideoOutput)
        val localStream = peerConnectionFactory.createLocalMediaStream(LOCAL_STREAM_ID)
        localStream.addTrack(localVideoTrack)
      localStream.addTrack(localAudioTrack)

        peerConnection?.addStream(localStream)

    }

I need help for connecting android and ios without black screen in remote video

Android:

v=0o=- 6563448285196734461 2 IN IP4 127.0.0.1s=-t=0 0a=group:BUNDLE audio videoa=msid-semantic: WMSm=video 9 UDP/TLS/RTP/SAVPF 96 97 98 100 101 127 124 125c=IN IP4 0.0.0.0a=rtcp:9 IN IP4 0.0.0.0a=ice-ufrag:I69Ta=ice-pwd:RY4fL2nYEJVHJ1vDc7fsws0qa=ice-options:trickle renominationa=fingerprint:sha-256 91:33:FC:D0:9C:BD:FE:A8:F4:7D:8F:6E:1F:71:05:4F:5B:F3:A0:DA:86:14:8A:CA:29:F0:45:AB:88:02:EE:50a=setup:activea=mid:audioa=extmap:14 urn:ietf:params:rtp-hdrext:toffseta=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-timea=extmap:13 urn:3gpp:video-orientationa=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01a=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delaya=extmap:11 http://www.webrtc.org/experiments/rtp-hdrext/video-content-typea=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timinga=extmap:9 http://www.webrtc.org/experiments/rtp-hdrext/color-spacea=recvonlya=rtcp-muxa=rtcp-rsizea=rtpmap:96 VP8/90000a=rtcp-fb:96 goog-remba=rtcp-fb:96 transport-cca=rtcp-fb:96 ccm fira=rtcp-fb:96 nacka=rtcp-fb:96 nack plia=rtpmap:97 rtx/90000a=fmtp:97 apt=96a=rtpmap:98 H264/90000a=rtcp-fb:98 goog-remba=rtcp-fb:98 transport-cca=rtcp-fb:98 ccm fira=rtcp-fb:98 nacka=rtcp-fb:98 nack plia=fmtp:98 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640c1fa=rtpmap:100 H264/90000a=rtcp-fb:100 goog-remba=rtcp-fb:100 transport-cca=rtcp-fb:100 ccm fira=rtcp-fb:100 nacka=rtcp-fb:100 nack plia=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01fa=rtpmap:101 rtx/90000a=fmtp:101 apt=100a=rtpmap:127 red/90000a=rtpmap:124 rtx/90000a=fmtp:124 apt=127a=rtpmap:125 ulpfec/90000m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126c=IN IP4 0.0.0.0a=rtcp:9 IN IP4 0.0.0.0a=ice-ufrag:I69Ta=ice-pwd:RY4fL2nYEJVHJ1vDc7fsws0qa=ice-options:trickle renominationa=fingerprint:sha-256 91:33:FC:D0:9C:BD:FE:A8:F4:7D:8F:6E:1F:71:05:4F:5B:F3:A0:DA:86:14:8A:CA:29:F0:45:AB:88:02:EE:50a=setup:activea=mid:videoa=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-levela=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-timea=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01a=recvonlya=rtcp-muxa=rtpmap:111 opus/48000/2a=rtcp-fb:111 transport-cca=fmtp:111 minptime=10;useinbandfec=1a=rtpmap:103 ISAC/16000a=rtpmap:104 ISAC/32000a=rtpmap:9 G722/8000a=rtpmap:102 ILBC/8000a=rtpmap:0 PCMU/8000a=rtpmap:8 PCMA/8000a=rtpmap:106 CN/32000a=rtpmap:105 CN/16000a=rtpmap:13 CN/8000a=rtpmap:110 telephone-event/48000a=rtpmap:112 telephone-event/32000a=rtpmap:113 telephone-event/16000a=rtpmap:126 telephone-event/8000

iOS

v=0o=- 8886095848359872555 2 IN IP4 127.0.0.1s=-t=0 0a=group:BUNDLE audio videoa=msid-semantic: WMS local_trackm=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 124 125c=IN IP4 0.0.0.0a=rtcp:9 IN IP4 0.0.0.0a=ice-ufrag:1BBja=ice-pwd:uaFw/ANPPPKHdZmf+qr31phba=ice-options:trickle renominationa=fingerprint:sha-256 1B:D0:0D:16:73:CD:FF:B9:F5:C3:8E:86:3D:83:DF:5D:3D:40:86:B1:67:D5:D3:9D:A4:92:AA:0F:C6:09:AE:ECa=setup:actpassa=mid:audioa=extmap:14 urn:ietf:params:rtp-hdrext:toffseta=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-timea=extmap:13 urn:3gpp:video-orientationa=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01a=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delaya=extmap:11 http://www.webrtc.org/experiments/rtp-hdrext/video-content-typea=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timinga=extmap:8 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07a=extmap:9 http://www.webrtc.org/experiments/rtp-hdrext/color-spacea=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mida=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-ida=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-ida=sendrecva=msid:local_track local_tracka=rtcp-muxa=rtcp-rsizea=rtpmap:96 VP8/90000a=rtcp-fb:96 goog-remba=rtcp-fb:96 transport-cca=rtcp-fb:96 ccm fira=rtcp-fb:96 nacka=rtcp-fb:96 nack plia=rtpmap:97 rtx/90000a=fmtp:97 apt=96a=rtpmap:98 H264/90000a=rtcp-fb:98 goog-remba=rtcp-fb:98 transport-cca=rtcp-fb:98 ccm fira=rtcp-fb:98 nacka=rtcp-fb:98 nack plia=fmtp:98 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640c1fa=rtpmap:99 rtx/90000a=fmtp:99 apt=98a=rtpmap:100 H264/90000a=rtcp-fb:100 goog-remba=rtcp-fb:100 transport-cca=rtcp-fb:100 ccm fira=rtcp-fb:100 nacka=rtcp-fb:100 nack plia=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01fa=rtpmap:101 rtx/90000a=fmtp:101 apt=100a=rtpmap:127 red/90000a=rtpmap:124 rtx/90000a=fmtp:124 apt=127a=rtpmap:125 ulpfec/90000a=ssrc-group:FID 1956454411 1435441277a=ssrc:1956454411 cname:BnVPai9gO/G5EEuLa=ssrc:1956454411 msid:local_track local_tracka=ssrc:1956454411 mslabel:local_tracka=ssrc:1956454411 label:local_tracka=ssrc:1435441277 cname:BnVPai9gO/G5EEuLa=ssrc:1435441277 msid:local_track local_tracka=ssrc:1435441277 mslabel:local_tracka=ssrc:1435441277 label:local_trackm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126c=IN IP4 0.0.0.0a=rtcp:9 IN IP4 0.0.0.0a=ice-ufrag:1BBja=ice-pwd:uaFw/ANPPPKHdZmf+qr31phba=ice-options:trickle renominationa=fingerprint:sha-256 1B:D0:0D:16:73:CD:FF:B9:F5:C3:8E:86:3D:83:DF:5D:3D:40:86:B1:67:D5:D3:9D:A4:92:AA:0F:C6:09:AE:ECa=setup:actpassa=mid:videoa=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-levela=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-timea=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mida=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-ida=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-ida=sendrecva=msid:local_track local_track_audioa=rtcp-muxa=rtpmap:111 opus/48000/2a=rtcp-fb:111 transport-cca=fmtp:111 minptime=10;useinbandfec=1a=rtpmap:103 ISAC/16000a=rtpmap:104 ISAC/32000a=rtpmap:9 G722/8000a=rtpmap:102 ILBC/8000a=rtpmap:0 PCMU/8000a=rtpmap:8 PCMA/8000a=rtpmap:106 CN/32000a=rtpmap:105 CN/16000a=rtpmap:13 CN/8000a=rtpmap:110 telephone-event/48000a=rtpmap:112 telephone-event/32000a=rtpmap:113 telephone-event/16000a=rtpmap:126 telephone-event/8000a=ssrc:2967951894 cname:BnVPai9gO/G5EEuLa=ssrc:2967951894 msid:local_track local_track_audioa=ssrc:2967951894 mslabel:local_tracka=ssrc:2967951894 label:local_track_audio