问:
Xamarin ListView not show json results from api
same as title,my listview doesn't show me anything,i think my model in that app is not good
help! deseeerialized json in jsonObject then create a list of objectModel but not show me
thanks

```<code>public class Marvel
{
}
public class TextObject
{
    public string type { get; set; }
    public string language { get; set; }
    public string text { get; set; }
}

public class Url
{
    public string type { get; set; }
    public string url { get; set; }
}

public class Series
{
    public string resourceURI { get; set; }
    public string name { get; set; }
}

public class Variant
{
    public string resourceURI { get; set; }
    public string name { get; set; }
}

public class Date
{
    public string type { get; set; }
    public DateTime date { get; set; }
}

public class Price
{
    public string type { get; set; }
    public double price { get; set; }
}

public class Thumbnail
{
    public string path { get; set; }
    public string extension { get; set; }
}

public class Image
{
    public string path { get; set; }
    public string extension { get; set; }
}

public class Item
{
    public string resourceURI { get; set; }
    public string name { get; set; }
    public string role { get; set; }
    public string type { get; set; }
}

public class Creators
{
    public int available { get; set; }
    public string collectionURI { get; set; }
    public List<Item> items { get; set; }
    public int returned { get; set; }
}

public class Characters
{
    public int available { get; set; }
    public string collectionURI { get; set; }
    public List<Item> items { get; set; }
    public int returned { get; set; }
}

public class Stories
{
    public int available { get; set; }
    public string collectionURI { get; set; }
    public List<Item> items { get; set; }
    public int returned { get; set; }
}

public class Events
{
    public int available { get; set; }
    public string collectionURI { get; set; }
    public List<object> items { get; set; }
    public int returned { get; set; }
}

public class Result
{
    public int id { get; set; }
    public int digitalId { get; set; }
    public string title { get; set; }
    public int issueNumber { get; set; }
    public string variantDescription { get; set; }
    public string description { get; set; }
    public DateTime modified { get; set; }
    public string isbn { get; set; }
    public string upc { get; set; }
    public string diamondCode { get; set; }
    public string ean { get; set; }
    public string issn { get; set; }
    public string format { get; set; }
    public int pageCount { get; set; }
    public List<TextObject> textObjects { get; set; }
    public string resourceURI { get; set; }
    public List<Url> urls { get; set; }
    public Series series { get; set; }
    public List<Variant> variants { get; set; }
    public List<object> collections { get; set; }
    public List<object> collectedIssues { get; set; }
    public List<Date> dates { get; set; }
    public List<Price> prices { get; set; }
    public Thumbnail thumbnail { get; set; }
    public List<Image> images { get; set; }
    public Creators creators { get; set; }
    public Characters characters { get; set; }
    public Stories stories { get; set; }
    public Events events { get; set; }
}

public class Data
{
    public int offset { get; set; }
    public int limit { get; set; }
    public int total { get; set; }
    public int count { get; set; }
    public List<Result> results { get; set; }
}

public class Rooto
{
    public int code { get; set; }
    public string status { get; set; }
    public string copyright { get; set; }
    public string attributionText { get; set; }
    public string attributionHTML { get; set; }
    public string etag { get; set; }
    public Data data { get; set; }
}
</code>```

}

mainpage

```<code> private async void Button_Clicked(object sender, EventArgs e)
    {
        var texto = caja.Text;
        var request = new HttpRequestMessage();
        request.RequestUri = new Uri("https://gateway.marvel.com/v1/public/comics?title=hulk&ts=1&apikey=###&hash=###");
        request.Method = HttpMethod.Get;
        request.Headers.Add("Accept", "application/json");

        var client = new HttpClient();

        HttpResponseMessage response = await client.SendAsync(request);

        string content = await response.Content.ReadAsStringAsync();
        Result dataObjects = JsonConvert.DeserializeObject<Result>(content);

        JObject myJObject = JObject.Parse(content);
        Console.WriteLine(myJObject);

        List<Result> parsedFields = new List<Result>();
        parsedFields.Add(dataObjects);

        ListDemo.ItemsSource = parsedFields;
</code>```

my xaml and json

https://gateway.marvel.com/v1/public/comics?title=hulk&ts=1&apikey=ab07bf416406297274b27ca941ba3bee&hash=cf9eb501d7c3775c32b72c61a6a76805

```<code><ContentPage.Content>
    <StackLayout>

        <Label Text="Control ListView"  FontSize="40"

       HorizontalOptions="Center"

       VerticalOptions="CenterAndExpand" />
        <Button Text="Lamado API" Clicked="Button_Clicked"/>
        <Entry x:Name="caja" Text=""/>

        <ListView x:Name="ListDemo">

            <ListView.ItemTemplate>

                <DataTemplate>

                    <ViewCell>

                        <StackLayout Orientation="Horizontal">

                            <Image Source="{Binding resourceURI}"

                               WidthRequest="50"

                               HeightRequest="50"/>

                            <StackLayout Orientation="Vertical">

                                <Label Text="{Binding title}"

                                   FontSize="15" TextColor="Blue"/>

                                <Label Text="{Binding isbn}"

                                   FontSize="12" TextColor="Fuchsia"/>

                            </StackLayout>

                        </StackLayout>

                    </ViewCell>

                </DataTemplate>

            </ListView.ItemTemplate>

        </ListView>

    </StackLayout>
</ContentPage.Content>
</code>```

tnaka

答:
You try binding it to an observablecollection.

```<code>private ObservableCollection<Result> _parsedFields = new ObservableCollection<Result>();

public ObservableCollection<Result> ParsedFields {

     get{ return _parsedFields;}
     set{
          _parsedFields = value ;
          OnPropertyChanged("ParsedFields");
        }
}

</code>```

make sure to implement INotifyPropertyChanged

```<code>public event PropertyChangedEventHandler PropertyChanged;

    protected void OnPropertyChanged(string propertyName)
    {
        var handler = PropertyChanged;
        if (handler != null)
            handler(this, new PropertyChangedEventArgs(propertyName));
    }

</code>```

then in your button function:

```<code>var dataObjects = JsonConvert.DeserializeObject<ObservableCollection<Result>>(content);

ParsedFields = dataObjects;
ListDemo.ItemsSource = ParsedFields;
</code>```

Body:
same as title,my listview doesn't show me anything,i think my model in that app is not good
help! deseeerialized json in jsonObject then create a list of objectModel but not show me
thanks

public class Marvel
{
}
public class TextObject
{
    public string type { get; set; }
    public string language { get; set; }
    public string text { get; set; }
}

public class Url
{
    public string type { get; set; }
    public string url { get; set; }
}

public class Series
{
    public string resourceURI { get; set; }
    public string name { get; set; }
}

public class Variant
{
    public string resourceURI { get; set; }
    public string name { get; set; }
}

public class Date
{
    public string type { get; set; }
    public DateTime date { get; set; }
}

public class Price
{
    public string type { get; set; }
    public double price { get; set; }
}

public class Thumbnail
{
    public string path { get; set; }
    public string extension { get; set; }
}

public class Image
{
    public string path { get; set; }
    public string extension { get; set; }
}

public class Item
{
    public string resourceURI { get; set; }
    public string name { get; set; }
    public string role { get; set; }
    public string type { get; set; }
}

public class Creators
{
    public int available { get; set; }
    public string collectionURI { get; set; }
    public List<Item> items { get; set; }
    public int returned { get; set; }
}

public class Characters
{
    public int available { get; set; }
    public string collectionURI { get; set; }
    public List<Item> items { get; set; }
    public int returned { get; set; }
}

public class Stories
{
    public int available { get; set; }
    public string collectionURI { get; set; }
    public List<Item> items { get; set; }
    public int returned { get; set; }
}

public class Events
{
    public int available { get; set; }
    public string collectionURI { get; set; }
    public List<object> items { get; set; }
    public int returned { get; set; }
}

public class Result
{
    public int id { get; set; }
    public int digitalId { get; set; }
    public string title { get; set; }
    public int issueNumber { get; set; }
    public string variantDescription { get; set; }
    public string description { get; set; }
    public DateTime modified { get; set; }
    public string isbn { get; set; }
    public string upc { get; set; }
    public string diamondCode { get; set; }
    public string ean { get; set; }
    public string issn { get; set; }
    public string format { get; set; }
    public int pageCount { get; set; }
    public List<TextObject> textObjects { get; set; }
    public string resourceURI { get; set; }
    public List<Url> urls { get; set; }
    public Series series { get; set; }
    public List<Variant> variants { get; set; }
    public List<object> collections { get; set; }
    public List<object> collectedIssues { get; set; }
    public List<Date> dates { get; set; }
    public List<Price> prices { get; set; }
    public Thumbnail thumbnail { get; set; }
    public List<Image> images { get; set; }
    public Creators creators { get; set; }
    public Characters characters { get; set; }
    public Stories stories { get; set; }
    public Events events { get; set; }
}

public class Data
{
    public int offset { get; set; }
    public int limit { get; set; }
    public int total { get; set; }
    public int count { get; set; }
    public List<Result> results { get; set; }
}

public class Rooto
{
    public int code { get; set; }
    public string status { get; set; }
    public string copyright { get; set; }
    public string attributionText { get; set; }
    public string attributionHTML { get; set; }
    public string etag { get; set; }
    public Data data { get; set; }
}

}

mainpage

 private async void Button_Clicked(object sender, EventArgs e)
    {
        var texto = caja.Text;
        var request = new HttpRequestMessage();
        request.RequestUri = new Uri("https://gateway.marvel.com/v1/public/comics?title=hulk&ts=1&apikey=###&hash=###");
        request.Method = HttpMethod.Get;
        request.Headers.Add("Accept", "application/json");

        var client = new HttpClient();

        HttpResponseMessage response = await client.SendAsync(request);

        string content = await response.Content.ReadAsStringAsync();
        Result dataObjects = JsonConvert.DeserializeObject<Result>(content);

        JObject myJObject = JObject.Parse(content);
        Console.WriteLine(myJObject);

        List<Result> parsedFields = new List<Result>();
        parsedFields.Add(dataObjects);

        ListDemo.ItemsSource = parsedFields;

my xaml and json

https://gateway.marvel.com/v1/public/comics?title=hulk&ts=1&apikey=ab07bf416406297274b27ca941ba3bee&hash=cf9eb501d7c3775c32b72c61a6a76805

<ContentPage.Content>
    <StackLayout>

        <Button Text="Lamado API" Clicked="Button_Clicked"/>
        <Entry x:Name="caja" Text=""/>

        <ListView x:Name="ListDemo">

            <ListView.ItemTemplate>

                <DataTemplate>

                    <ViewCell>

                        <StackLayout Orientation="Horizontal">

                            <Image Source="{Binding resourceURI}"

                               WidthRequest="50"

                               HeightRequest="50"/>

                            <StackLayout Orientation="Vertical">

                            </StackLayout>

                        </StackLayout>

                    </ViewCell>

                </DataTemplate>

            </ListView.ItemTemplate>

        </ListView>

    </StackLayout>
</ContentPage.Content>

tnaka

Body:
You try binding it to an observablecollection.

private ObservableCollection<Result> _parsedFields = new ObservableCollection<Result>();

public ObservableCollection<Result> ParsedFields {

     get{ return _parsedFields;}
     set{
          _parsedFields = value ;
          OnPropertyChanged("ParsedFields");
        }
}

make sure to implement INotifyPropertyChanged

public event PropertyChangedEventHandler PropertyChanged;

    protected void OnPropertyChanged(string propertyName)
    {
        var handler = PropertyChanged;
        if (handler != null)
            handler(this, new PropertyChangedEventArgs(propertyName));
    }

then in your button function:

var dataObjects = JsonConvert.DeserializeObject<ObservableCollection<Result>>(content);

ParsedFields = dataObjects;
ListDemo.ItemsSource = ParsedFields;


来源: stackexchange

问:
Android: How to scroll a ScrollView inside a Fragment which is part of an ViewPagerAdapter for a ViewPager2
I'm using a ViewPager2 with a ViewPagerAdapter. This adapter includes Fragments. The layout of this Fragment has a ScrollView.

What I want to do is to scroll to a certain position once the fragment is shown. I have tried several things but sv.scrollTo(x,y) does not have any effect. Only when I trigger it via a button from the MainActivity then the ScrollView scrolls.

Things I have tried:

Inside Fragment class in method onViewCreated:

```<code>ViewTreeObserver vto = sv.getViewTreeObserver();
vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
   @Override
   public void onGlobalLayout() {
       sv.scrollTo(0, iScrollPosition * tv.getLineHeight());
   }
});
</code>```

Inside Fragment class at the end of onViewCreated:

```<code>Runnable r = new Runnable() {
    public void run() {
        sv.scrollTo(0, iScrollPosition * tv.getLineHeight());
    }
};
</code>```

Override inside Fragment class onStart

```<code>public void onStart() {
   super.onStart();
   sv.scrollTo(0, iScrollPosition * tv.getLineHeight());
}
</code>```

In MainActivity in the function mViewPager.registerOnPageChangeCallback

In the ViewPagerAdapter:

```<code>@NonNull @Override public Fragment createFragment(int position) {
</code>```

Nothing has worked so far. It seems that I need a function which is trigged once the layout is completely drawn. Like the onload event in HTML.

Does anyone can give me a hint? I run out of ideas...
Thanks.

答:
You're using the OnGlobalLayoutListener.You can simply remove that.

If you still want to use it, then remove it after applying it to the view like this:

```<code>vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
   @Override
   public void onGlobalLayout() {
       vto.removeOnGlobalLayoutListener(this);

       //Your code here
       sv.scrollTo(0, iScrollPosition * tv.getLineHeight());
   }
});
</code>```

It's the common thing used everywhere & everytime whenever you are observing the view layout changees. The code you put inside will run everytime whenever the layout is changing its size or any properties related to that.

You've not removed the listener so it's calling multiple times and causing the problem.

Just try it and let me know if it helped or not. :)

ContentLicense: CC BY-SA 4.0

Body:
I'm using a ViewPager2 with a ViewPagerAdapter. This adapter includes Fragments. The layout of this Fragment has a ScrollView.

What I want to do is to scroll to a certain position once the fragment is shown. I have tried several things but sv.scrollTo(x,y) does not have any effect. Only when I trigger it via a button from the MainActivity then the ScrollView scrolls.

Things I have tried:

Inside Fragment class in method onViewCreated:

ViewTreeObserver vto = sv.getViewTreeObserver();
vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
   @Override
   public void onGlobalLayout() {
       sv.scrollTo(0, iScrollPosition * tv.getLineHeight());
   }
});

Inside Fragment class at the end of onViewCreated:

Runnable r = new Runnable() {
    public void run() {
        sv.scrollTo(0, iScrollPosition * tv.getLineHeight());
    }
};

Override inside Fragment class onStart

public void onStart() {
   super.onStart();
   sv.scrollTo(0, iScrollPosition * tv.getLineHeight());
}

In MainActivity in the function mViewPager.registerOnPageChangeCallback

In the ViewPagerAdapter:

@NonNull @Override public Fragment createFragment(int position) {

Nothing has worked so far. It seems that I need a function which is trigged once the layout is completely drawn. Like the onload event in HTML.

Does anyone can give me a hint? I run out of ideas...
Thanks.

Body:
You're using the OnGlobalLayoutListener.You can simply remove that.

If you still want to use it, then remove it after applying it to the view like this:

vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
   @Override
   public void onGlobalLayout() {
       vto.removeOnGlobalLayoutListener(this);

       //Your code here
       sv.scrollTo(0, iScrollPosition * tv.getLineHeight());
   }
});

It's the common thing used everywhere & everytime whenever you are observing the view layout changees. The code you put inside will run everytime whenever the layout is changing its size or any properties related to that.

You've not removed the listener so it's calling multiple times and causing the problem.

Just try it and let me know if it helped or not. :)


问:
How to calculate value dynamically based on the screen width?
I need to run different behavior based on screen size. So I got different types of the screens. If screen is small the variable in calculation must be 40. As it grows the variable number need to be decreased.

Example

Very Small screen width - 480 | variable = 40

Small screen width - 720 | variable = 30

Medium screen width - 1600 | variable = 20

Big screen width - 2560+ | variable = 10

Here is some of my code

```<code> val displayMetrics = DisplayMetrics()
    windowManager.defaultDisplay.getMetrics(displayMetrics)

    val width = displayMetrics.widthPixels

    val percentage = width / 100 * 10 //<----this 10 must be calculated dynamically
    val rightBorder = width - percentage

    when {
        rawX.toInt() in 0..percentage -> {
            params.x = 0
        }
        rawX.toInt() in rightBorder..width -> {
            params.x = width
        }
</code>```

答:
You need to define multiple xml layouts for each screen minimum width with the same file name but with different IDs for the root layout

And use the if/else statement in the onCreate method to give different values for your variable as the the android system will choose the appropriate layout automatically based on the screen size

```<code>if(findViewById(R.id.android_me_linear_layout) != null) {}
</code>```

Body:
I need to run different behavior based on screen size. So I got different types of the screens. If screen is small the variable in calculation must be 40. As it grows the variable number need to be decreased.

Example

Very Small screen width - 480 | variable = 40

Small screen width - 720 | variable = 30

Medium screen width - 1600 | variable = 20

Big screen width - 2560+ | variable = 10

Here is some of my code

 val displayMetrics = DisplayMetrics()
    windowManager.defaultDisplay.getMetrics(displayMetrics)

    val width = displayMetrics.widthPixels

    val percentage = width / 100 * 10 //<----this 10 must be calculated dynamically
    val rightBorder = width - percentage

    when {
        rawX.toInt() in 0..percentage -> {
            params.x = 0
        }
        rawX.toInt() in rightBorder..width -> {
            params.x = width
        }

Body:
You need to define multiple xml layouts for each screen minimum width with the same file name but with different IDs for the root layout

And use the if/else statement in the onCreate method to give different values for your variable as the the android system will choose the appropriate layout automatically based on the screen size

if(findViewById(R.id.android_me_linear_layout) != null) {}


问:
What exactly are the benefits of Spark over Mapreduce if I'm doing a batch processing?
I know Spark has in memory capability that is very useful for iterative jobs. But what if my requirement is traditional batch processing ETL. Does Spark provide me any benefit there? Please give all the pointers related to this, it will help me a lot.

How does Spark help me in case there are no iterative work and it's a batch process?

Is there any scenario where MapReduce would perform better than Spark? Any scenario where MR will be better than Spark?

答:
Assuming you know Map Reduce, then consider:

writing Word Counting in MR when you need to list the top N words. Far more work over multiple Steps in MR vs. 7 or 8 lines in Spark.

for those with dimension processing a la dimensional model, a lot easier to do in Spark.

Spark Structured Streaming use cases...

Certain tasks with extreme high amounts of data may well be better using MR if you cannot acquire enough hardware or Cloud compute resources, i.e. writing to disk and processing per functional step.


问:
Warning: Undefined array key in PHP 8.0
My webhotel have uppgrade to PHP version 8.0 The code is working but it's showing warningmessage on the homepage now.

I'ts something with my array.

```<code>Warning: Undefined array key "JS" in /customers/c/c/4/plf1x2.dk/httpd.www/test/svspeuro.php on line 1465
Warning: Undefined array key "Vinst" in /customers/c/c/4/plf1x2.dk/httpd.www/test/svspeuro.php on line 1465
Warning: Undefined array key "PWB" in /customers/c/c/4/plf1x2.dk/httpd.www/test/svspeuro.php on line 1468 Warning:
Undefined array key "Vinst" in /customers/c/c/4/plf1x2.dk/httpd.www/test/svspeuro.php on line 1468 Warning:
Undefined array key "oavgjord" in /customers/c/c/4/plf1x2.dk/httpd.www/test/svspeuro.php on line 1471  here
</code>```

I Have tried with

```<code>enterif (isset($matchesLines[$Borta_Lag]['omgångar'])){
    $matchesLines[$Borta_Lag]['omgångar']+=1;
    } code here
</code>```

but it doesnt work it's get a empty value.

Here is the code.
I hope someone can help me?

```<code>// Sorterar ut lagnamn och resultat
$file = file($filename);
$result = array_merge($file,$resultatarray)
$matchesLines = array();

foreach($result as $line) {

  if(preg_match('/^([a-öA-Ö]+\D)-([a-öA-Ö]+\D) (\d+)-(\d+)/',  $line,  $data)){
    $Hemma_Lag = $data[1];
    $Borta_Lag = $data[2];
    $Hemma_Resultat = $data[3];
    $Borta_Resultat=$data[4];

    $matchesLines[$Hemma_Lag]['Vinst'] += 0;
    $matchesLines[$Borta_Lag]['Vinst'] += 0;
    $matchesLines[$Hemma_Lag]['oavgjord'] += 0;
    $matchesLines[$Borta_Lag]['oavgjord'] += 0;
    $matchesLines[$Hemma_Lag]['Förlust'] += 0;
    $matchesLines[$Borta_Lag]['Förlust'] += 0;

    if ($Hemma_Resultat == $Borta_Resultat){
      $matchesLines[$Hemma_Lag]['lag'] = $Hemma_Lag;
      $matchesLines[$Hemma_Lag]['poang']+=1;
      $matchesLines[$Hemma_Lag]['mål'] += $Hemma_Resultat;
      $matchesLines[$Hemma_Lag]['måli'] += $Borta_Resultat;
      $matchesLines[$Hemma_Lag]['oavgjord'] += 1;
      $matchesLines[$Borta_Lag]['lag'] = $Borta_Lag;
      $matchesLines[$Borta_Lag]['poang'] +=1;
      $matchesLines[$Borta_Lag]['mål'] += $Borta_Resultat;
      $matchesLines[$Borta_Lag]['måli'] += $Hemma_Resultat;
      $matchesLines[$Borta_Lag]['oavgjord'] += 1;
    }

    if ($Hemma_Resultat > $Borta_Resultat){
      $matchesLines[$Hemma_Lag]['lag'] = $Hemma_Lag;
      $matchesLines[$Hemma_Lag]['poang']+=3;
      $matchesLines[$Hemma_Lag]['mål'] += $Hemma_Resultat;
      $matchesLines[$Hemma_Lag]['måli'] += $Borta_Resultat;
      $matchesLines[$Hemma_Lag]['Vinst'] += 1;
      $matchesLines[$Borta_Lag]['lag'] = $Borta_Lag;
      $matchesLines[$Borta_Lag]['poang'] +=0;
      $matchesLines[$Borta_Lag]['mål'] += $Borta_Resultat;
      $matchesLines[$Borta_Lag]['måli'] += $Hemma_Resultat;
      $matchesLines[$Borta_Lag]['Förlust'] += 1;
    }

    if ($Hemma_Resultat < $Borta_Resultat) {
      $matchesLines[$Hemma_Lag]['lag'] = $Hemma_Lag;
      $matchesLines[$Hemma_Lag]['poang']+=0;
      $matchesLines[$Hemma_Lag]['Förlust'] += 1;
      $matchesLines[$Hemma_Lag]['mål'] += $Hemma_Resultat;
      $matchesLines[$Hemma_Lag]['måli'] += $Borta_Resultat;
      $matchesLines[$Borta_Lag]['lag'] = $Borta_Lag;
      $matchesLines[$Borta_Lag]['poang'] +=3;
      $matchesLines[$Borta_Lag]['Vinst'] += 1;
      $matchesLines[$Borta_Lag]['mål'] += $Borta_Resultat;
      $matchesLines[$Borta_Lag]['måli'] += $Hemma_Resultat;
    }

    if (isset($matchesLines[$Borta_Lag])){
    $matchesLines[$Borta_Lag]['omgångar']+=1;
    $matchesLines[$Hemma_Lag]['omgångar']+=1;
    }

  }

}
</code>```

答:
Yes, PHP 8.0 has elevated this notice and a bunch of other notices to now be warnings :

A number of notices have been converted into warnings:

```<code>Attempting to read an undefined variable.
Attempting to read an undefined property.
Attempting to read an undefined array key.
...
</code>```

Title: Warning: Undefined array key in PHP 8.0

Body:
My webhotel have uppgrade to PHP version 8.0 The code is working but it's showing warningmessage on the homepage now.

I'ts something with my array.

Warning: Undefined array key "JS" in /customers/c/c/4/plf1x2.dk/httpd.www/test/svspeuro.php on line 1465
Warning: Undefined array key "Vinst" in /customers/c/c/4/plf1x2.dk/httpd.www/test/svspeuro.php on line 1465
Warning: Undefined array key "PWB" in /customers/c/c/4/plf1x2.dk/httpd.www/test/svspeuro.php on line 1468 Warning:
Undefined array key "Vinst" in /customers/c/c/4/plf1x2.dk/httpd.www/test/svspeuro.php on line 1468 Warning:
Undefined array key "oavgjord" in /customers/c/c/4/plf1x2.dk/httpd.www/test/svspeuro.php on line 1471  here

I Have tried with

enterif (isset($matchesLines[$Borta_Lag]['omgångar'])){
    $matchesLines[$Borta_Lag]['omgångar']+=1;
    } code here

but it doesnt work it's get a empty value.

Here is the code.
I hope someone can help me?

// Sorterar ut lagnamn och resultat
$file = file($filename);
$result = array_merge($file,$resultatarray)
$matchesLines = array();

foreach($result as $line) {

  if(preg_match('/^([a-öA-Ö]+\D)-([a-öA-Ö]+\D) (\d+)-(\d+)/',  $line,  $data)){
    $Hemma_Lag = $data[1];
    $Borta_Lag = $data[2];
    $Hemma_Resultat = $data[3];
    $Borta_Resultat=$data[4];

    $matchesLines[$Hemma_Lag]['Vinst'] += 0;
    $matchesLines[$Borta_Lag]['Vinst'] += 0;
    $matchesLines[$Hemma_Lag]['oavgjord'] += 0;
    $matchesLines[$Borta_Lag]['oavgjord'] += 0;
    $matchesLines[$Hemma_Lag]['Förlust'] += 0;
    $matchesLines[$Borta_Lag]['Förlust'] += 0;

    if ($Hemma_Resultat == $Borta_Resultat){
      $matchesLines[$Hemma_Lag]['lag'] = $Hemma_Lag;
      $matchesLines[$Hemma_Lag]['poang']+=1;
      $matchesLines[$Hemma_Lag]['mål'] += $Hemma_Resultat;
      $matchesLines[$Hemma_Lag]['måli'] += $Borta_Resultat;
      $matchesLines[$Hemma_Lag]['oavgjord'] += 1;
      $matchesLines[$Borta_Lag]['lag'] = $Borta_Lag;
      $matchesLines[$Borta_Lag]['poang'] +=1;
      $matchesLines[$Borta_Lag]['mål'] += $Borta_Resultat;
      $matchesLines[$Borta_Lag]['måli'] += $Hemma_Resultat;
      $matchesLines[$Borta_Lag]['oavgjord'] += 1;
    }

    if ($Hemma_Resultat > $Borta_Resultat){
      $matchesLines[$Hemma_Lag]['lag'] = $Hemma_Lag;
      $matchesLines[$Hemma_Lag]['poang']+=3;
      $matchesLines[$Hemma_Lag]['mål'] += $Hemma_Resultat;
      $matchesLines[$Hemma_Lag]['måli'] += $Borta_Resultat;
      $matchesLines[$Hemma_Lag]['Vinst'] += 1;
      $matchesLines[$Borta_Lag]['lag'] = $Borta_Lag;
      $matchesLines[$Borta_Lag]['poang'] +=0;
      $matchesLines[$Borta_Lag]['mål'] += $Borta_Resultat;
      $matchesLines[$Borta_Lag]['måli'] += $Hemma_Resultat;
      $matchesLines[$Borta_Lag]['Förlust'] += 1;
    }

    if ($Hemma_Resultat < $Borta_Resultat) {
      $matchesLines[$Hemma_Lag]['lag'] = $Hemma_Lag;
      $matchesLines[$Hemma_Lag]['poang']+=0;
      $matchesLines[$Hemma_Lag]['Förlust'] += 1;
      $matchesLines[$Hemma_Lag]['mål'] += $Hemma_Resultat;
      $matchesLines[$Hemma_Lag]['måli'] += $Borta_Resultat;
      $matchesLines[$Borta_Lag]['lag'] = $Borta_Lag;
      $matchesLines[$Borta_Lag]['poang'] +=3;
      $matchesLines[$Borta_Lag]['Vinst'] += 1;
      $matchesLines[$Borta_Lag]['mål'] += $Borta_Resultat;
      $matchesLines[$Borta_Lag]['måli'] += $Hemma_Resultat;
    }

    if (isset($matchesLines[$Borta_Lag])){
    $matchesLines[$Borta_Lag]['omgångar']+=1;
    $matchesLines[$Hemma_Lag]['omgångar']+=1;
    }

  }

}

Body:
Yes, PHP 8.0 has elevated this notice and a bunch of other notices to now be warnings :

A number of notices have been converted into warnings:

Attempting to read an undefined variable.
Attempting to read an undefined property.
Attempting to read an undefined array key.
...


问:
Install Docker in Alpine Docker
I have a Dockerfile with a classic Ubuntu base image and I'm trying to reduce the size.
That's why I'm using Alpine base.

In my Dockerfile, I have to install Docker, so Docker in Docker.

```<code>FROM alpine:3.9

RUN apk add --update --no-cache docker
</code>```

This works well, I can run docker version inside my container, at least for the client. Because for the server I have the classic Docker error saying :

```<code>Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
</code>```

I know in Ubuntu after installing Docker I have to run

```<code>usermod -a -G docker $USER
</code>```

But what about in Alpine ? How can I avoid this error ?

PS:

My first idea was to re-use the Docker socket by bind-mounting /var/run/docker.sock:/var/run/docker.sock for example and thus reduce the size of my image even more, since I don't have to reinstall Docker.

But as bind-mount is not allowed in Dockerfile, do you know if my idea is possible and how to do it ? I know it's possible in Docker-compose but I have to use Dockerfile only.

Thanks

答:
I managed to do that the easy way

docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker --privileged docker:dind sh
```

I am using this command on my test env!

Title: Install Docker in Alpine Docker

Body:
I have a Dockerfile with a classic Ubuntu base image and I'm trying to reduce the size.
That's why I'm using Alpine base.

In my Dockerfile, I have to install Docker, so Docker in Docker.

FROM alpine:3.9

RUN apk add --update --no-cache docker

This works well, I can run docker version inside my container, at least for the client. Because for the server I have the classic Docker error saying :

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

I know in Ubuntu after installing Docker I have to run

usermod -a -G docker $USER

But what about in Alpine ? How can I avoid this error ?

PS:

My first idea was to re-use the Docker socket by bind-mounting /var/run/docker.sock:/var/run/docker.sock for example and thus reduce the size of my image even more, since I don't have to reinstall Docker.

But as bind-mount is not allowed in Dockerfile, do you know if my idea is possible and how to do it ? I know it's possible in Docker-compose but I have to use Dockerfile only.

Thanks

Body:
I managed to do that the easy way

docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker --privileged docker:dind sh

I am using this command on my test env!


问:
How can you add IP restrictions to your rails app?
Is there a way to add IP restrictions to the rails app. Some type of rack middleware so only the set list of IPs can access the rails app for security reasons?

Thanks

答: Use a routing constraint as described here: http://guides.rubyonrails.org/routing.html#advanced-constraints.</p>

ContentLicense: CC BY-SA 3.0


问:
Python Turtle Enumerate
Is anyone able to explain this code? My friend wrote it and I don’t understand anything about the line defining “diff”</p>
```<code>import math
import turtle
import random

t = turtle.Turtle()
screen = turtle.Screen()
t.shape("turtle")
t.speed(0)
t.tracer(100)

COLOR = [18.0, 0.0, 41.0]
COLOR_2 = [0.0, 172.0, 219.0]
WIDTH = screen.window_width()
HEIGHT = screen.window_height()

diff = [(hue - COLOR[index]) / HEIGHT for index, hue in enumerate(COLOR_2)]
</code>```

答:
enumerate(COLOR_2) returns an enumerate object where the first variable is the index of the item in the list and the second variable is the actual item. Then the for loop loops through these results, so for the list COLOR_2 the first iteration will give: index = 0 and hue = 0.0, and so on: index = 1, hue = 172.0 etc. So for each iteration it evaluates (hue - COLOR[index]) / HEIGHT which, for the first iteration, is: (0.0 - COLOR[0]) / screen.window_height() Since this generator of sorts is in list brakets [] it is a list comprehension and thus creates a list where each item is the formula: (hue - COLOR[index]) / HEIGHT evaluated at each value pair (explained earlier) from index, hue in enumerate(COLOR_2).

For further understanding the code is equivalent to:

```<code>diff = []
for index, hue in enumerate(COLOR_2):
    diff.append((hue - COLOR[index]) / HEIGHT)
</code>```

Another simplification:

```<code>for i, item in enumerate(lst): #this is the same as:

for item in lst: #this

#the only difference is that the second option does not have a
#variable that loops through the indices (0, 1, 2, 3, 4, etc.)
</code>```

Therefore, since your code needs COLOR[index] (so that the items in COLOR are linked with the items in COLOR_2) you need to use enumerate so that you also get the index since it is needed.

The output (value of diff) given a HEIGHT of 800 (for example) should be:

```<code>[-0.0225, 0.215, 0.2225]
</code>```

Based on my understanding of the purpose of this code, you could then increment from COLOR to COLOR_2 by diff to create a "gradient" or "Ombre effect".

Title: Python Turtle Enumerate

Body:
Is anyone able to explain this code? My friend wrote it and I don’t understand anything about the line defining “diff”

import math
import turtle
import random

t = turtle.Turtle()
screen = turtle.Screen()
t.shape("turtle")
t.speed(0)
t.tracer(100)

COLOR = [18.0, 0.0, 41.0]
COLOR_2 = [0.0, 172.0, 219.0]
WIDTH = screen.window_width()
HEIGHT = screen.window_height()

diff = [(hue - COLOR[index]) / HEIGHT for index, hue in enumerate(COLOR_2)]

Body:
enumerate(COLOR_2) returns an enumerate object where the first variable is the index of the item in the list and the second variable is the actual item. Then the for loop loops through these results, so for the list COLOR_2 the first iteration will give: index = 0 and hue = 0.0, and so on: index = 1, hue = 172.0 etc. So for each iteration it evaluates (hue - COLOR[index]) / HEIGHT which, for the first iteration, is: (0.0 - COLOR[0]) / screen.window_height() Since this generator of sorts is in list brakets [] it is a list comprehension and thus creates a list where each item is the formula: (hue - COLOR[index]) / HEIGHT evaluated at each value pair (explained earlier) from index, hue in enumerate(COLOR_2).

For further understanding the code is equivalent to:

diff = []
for index, hue in enumerate(COLOR_2):
    diff.append((hue - COLOR[index]) / HEIGHT)

Another simplification:

for i, item in enumerate(lst): #this is the same as:

for item in lst: #this

#the only difference is that the second option does not have a
#variable that loops through the indices (0, 1, 2, 3, 4, etc.)

Therefore, since your code needs COLOR[index] (so that the items in COLOR are linked with the items in COLOR_2) you need to use enumerate so that you also get the index since it is needed.

The output (value of diff) given a HEIGHT of 800 (for example) should be:

[-0.0225, 0.215, 0.2225]

Based on my understanding of the purpose of this code, you could then increment from COLOR to COLOR_2 by diff to create a "gradient" or "Ombre effect".


问:
Convert .py to .exe with cmd
I was trying to convert my main.py to a exe file

I followed a tutorial on youtube i did it like it said

first open cmd in the folder

then type in pip install pyinstaller

then type in like this pyinstaller --onefile main.py
but it does'nt convert it shows this

答:
While Eyal's solution is correct, there is an easier option. Just run this:

```<code>py -m PyInstaller --onefile main.py
</code>```

It could also be python -m PyInstaller --onefile main.py depending on your system configuration.

Title: Convert .py to .exe with cmd

Body:
While Eyal's solution is correct, there is an easier option. Just run this:

py -m PyInstaller --onefile main.py

It could also be python -m PyInstaller --onefile main.py depending on your system configuration.


问:
Symfony error on login page on implement UserLoaderInterface
I am using symfony version 5.4.4., and the first page of my application is a login page, but when I load it, I get this error:

You must either make the "App\Entity\mUser" entity Doctrine Repository
("App\Repository\mUserRepository") implement
"Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface" or set the
"property" option in the corresponding entity provider configuration.]

Whats causing this error?

答:
Symfony does not know how to get the users from the Doctrine repository.

The error is pretty explicit about what you need to do.

You have two options:

Either you change your existing user repository (App\Repository\mUserRepository) so it implements the Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface

The interface has only one method:

```<code>public function loadUserByUsername(string $username);
</code>```

So you'd need to do something like:

```<code>class App\Repository\mUserRepository implements UserLoaderInterface
{
    public function loadUserByUsername(string $username): ?UserInterface
    {
       // implement logic to get user from the repository by its username.
    }
}
</code>```

Note that if you check that interface, the method loadUserByUsername() is actually deprecated, and has been replaced by loadUserByIdentifier() in Symfony 6+. To future-proof your implementation you should have something like:

```<code>class App\Repository\mUserRepository implements UserLoaderInterface
{
    public function loadUserByUsername(string $username): ?UserInterface
    {
       return $this->loadUserByIdentifier($username);
    }

    public function loadUserByIdentifier(string $identifier): ?UserInterface
    {
       // implement logic to get user from the repository by its username.
    }
}
</code>```

Alternatively, the error message is telling you to just configure which property you use as identifier for your users.

Let's say that you get them by email, and there is an mUser::email property.

providers:
        mUserProvider:
            entity:
                class: App\Entity\mUser
                property: email
```

Body:
Symfony does not know how to get the users from the Doctrine repository.

The error is pretty explicit about what you need to do.

You have two options:

Either you change your existing user repository (App\Repository\mUserRepository) so it implements the Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface

The interface has only one method:

public function loadUserByUsername(string $username);

So you'd need to do something like:

class App\Repository\mUserRepository implements UserLoaderInterface
{
    public function loadUserByUsername(string $username): ?UserInterface
    {
       // implement logic to get user from the repository by its username.
    }
}

Note that if you check that interface, the method loadUserByUsername() is actually deprecated, and has been replaced by loadUserByIdentifier() in Symfony 6+. To future-proof your implementation you should have something like:

class App\Repository\mUserRepository implements UserLoaderInterface
{
    public function loadUserByUsername(string $username): ?UserInterface
    {
       return $this->loadUserByIdentifier($username);
    }

    public function loadUserByIdentifier(string $identifier): ?UserInterface
    {
       // implement logic to get user from the repository by its username.
    }
}

Alternatively, the error message is telling you to just configure which property you use as identifier for your users.

Let's say that you get them by email, and there is an mUser::email property.

providers:
        mUserProvider:
            entity:
                class: App\Entity\mUser
                property: email


问:
How can I change 'long' to 'int' without changing 'long long' using perl/awk/etc
I want to change all the longs to ints (in preparation for 64 bit code).  I have a perl line that does:

```<code>s/(\s*long\s+)(?!long)/ int /g
</code>```

which comes close.  It changes long to int and long long to long int.

Any editing method is good as long as it can be scripted or operate on multiple files.

```<code>*Sample:  input              desired output*
   long abd;                   int abd;
int longname;               int longname;
int reallylongname;         int reallylongname;
float reallylong longname;  float reallylong longname;
double namelong             double namelong
long abc long               int abc int
long long abc               long long abc
long    long hhhh           long    long hhhh
long long hhhh              long long hhhh
long abd( long kjhh         int abd( int kjhh
</code>```

答: If you are willing to do four passes, convert long int to long$int, convert long to int, then int int to long long, and long$int back to long int.

Body:
I want to change all the longs to ints (in preparation for 64 bit code).  I have a perl line that does:

s/(\s*long\s+)(?!long)/ int /g

which comes close.  It changes long to int and long long to long int.

Any editing method is good as long as it can be scripted or operate on multiple files.

*Sample:  input              desired output*
   long abd;                   int abd;
int longname;               int longname;
int reallylongname;         int reallylongname;
float reallylong longname;  float reallylong longname;
double namelong             double namelong
long abc long               int abc int
long long abc               long long abc
long    long hhhh           long    long hhhh
long long hhhh              long long hhhh
long abd( long kjhh         int abd( int kjhh


问:
Flutter ios pod install failed after upgrading Xcode and Flutter version
Tried different solution, but nothing works for me.

Sharing links refereed.

Flutter Error running pod install After Upgrading Flutter version

Pod Result

```<code>Running "flutter pub get" in firstapp...                         2,706ms
</code>```

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running pod install...                                              5.3s
CocoaPods' output:
↳
Preparing

```<code>Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `fluttertoast` from `.symlinks/plugins/fluttertoast/ios`
-> Fetching podspec for `razorpay_flutter` from `.symlinks/plugins/razorpay_flutter/ios`

Resolving dependencies of `Podfile`
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
</code>```

Error output from CocoaPods:
↳

```<code>[!] Automatically assigning platform `iOS` with version `12.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:15:in `initialize': undefined method `with_indifferent_access' for #<String:0x00007fcbdf105240> (NoMethodError)
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:28:in `new'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:28:in `from_file'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source.rb:441:in `refresh_metadata'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:56:in `refresh_metadata'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source.rb:31:in `initialize'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:30:in `initialize'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:315:in `new'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:315:in `block in source_from_path'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:322:in `source_from_path'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in `block in aggregate_with_repos'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in `map'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in `aggregate_with_repos'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:26:in `aggregate'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:60:in `all'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:173:in `repo_information'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:77:in `stack'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:24:in `report'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:66:in `report_error'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in `load'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in `<main>'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:15:in `initialize': undefined method `with_indifferent_access' for #<String:0x00007fcbda2b6c60> (NoMethodError)
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:28:in `new'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:28:in `from_file'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source.rb:441:in `refresh_metadata'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:56:in `refresh_metadata'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source.rb:31:in `initialize'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:30:in `initialize'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:315:in `new'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:315:in `block in source_from_path'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:322:in `source_from_path'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in `block in aggregate_with_repos'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in `map'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in `aggregate_with_repos'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:26:in `aggregate'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:60:in `all'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:393:in `source_with_url'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/sources_manager.rb:22:in `find_or_create_source_with_url'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:178:in `block in sources'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:177:in `map'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:177:in `sources'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1077:in `block in resolve_dependencies'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1076:in `resolve_dependencies'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:416:in `analyze'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:161:in `install!'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/command/install.rb:52:in `run'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in `load'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in `<main>'
</code>```

Error running pod install
Error launching application on iPhone 12 Pro Max.

After updating the MAC OS response this

```<code>Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
</code>```

Running pod install...                                           1,300ms
CocoaPods' output:
↳
Preparing

```<code>Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `fluttertoast` from `.symlinks/plugins/fluttertoast/ios`
-> Fetching podspec for `razorpay_flutter` from `.symlinks/plugins/razorpay_flutter/ios`

Resolving dependencies of `Podfile`
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
</code>```

Error output from CocoaPods:
↳
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:15:in initialize': undefined method with_indifferent_access' for #String:0x00007fd8f39e86e8 (NoMethodError)
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:28:in new' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:28:in from_file'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source.rb:441:in refresh_metadata' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:56:in refresh_metadata'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source.rb:31:in initialize' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:30:in initialize'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:315:in new' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:315:in block in source_from_path'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:322:in source_from_path' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in block in aggregate_with_repos'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in map' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in aggregate_with_repos'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:26:in aggregate' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:60:in all'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:173:in repo_information' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:77:in stack'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:24:in report' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:66:in report_error'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in handle_exception' from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in rescue in run'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in run' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in run'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/bin/pod:55:in <top (required)>' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in load'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in ' /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:15:in initialize': undefined method with_indifferent_access' for #<String:0x00007fd8f6a9e8a0> (NoMethodError) from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:28:in new'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:28:in from_file' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source.rb:441:in refresh_metadata'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:56:in refresh_metadata' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source.rb:31:in initialize'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:30:in initialize' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:315:in new'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:315:in block in source_from_path' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:322:in source_from_path'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in block in aggregate_with_repos' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in map'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in aggregate_with_repos' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:26:in aggregate'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:60:in all' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:393:in source_with_url'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/sources_manager.rb:22:in find_or_create_source_with_url' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:178:in block in sources'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:177:in map' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:177:in sources'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1077:in block in resolve_dependencies' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in section'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1076:in resolve_dependencies' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:124:in analyze'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:416:in analyze' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:241:in block in resolve_dependencies'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in section' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:240:in resolve_dependencies'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:161:in install!' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/command/install.rb:52:in run'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in run' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in run'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/bin/pod:55:in <top (required)>' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in load'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in `'

Error running pod install
Error launching application on iPhone 12 Pro Max.

答:
Resolved this issue updating ruby version and install cocoapods

RVM

https://rvm.io/rubies/installing

Cocoapods

cocoapods not installing

Remove cache

```<code>rm -vrf ~/.cocoapods*
</code>```

Body:
Tried different solution, but nothing works for me.

Sharing links refereed.

Flutter Error running pod install After Upgrading Flutter version

Pod Result

Running "flutter pub get" in firstapp...                         2,706ms

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running pod install...                                              5.3s
CocoaPods' output:
↳
Preparing

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `fluttertoast` from `.symlinks/plugins/fluttertoast/ios`
-> Fetching podspec for `razorpay_flutter` from `.symlinks/plugins/razorpay_flutter/ios`

Resolving dependencies of `Podfile`
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update

Error output from CocoaPods:
↳

[!] Automatically assigning platform `iOS` with version `12.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:15:in `initialize': undefined method `with_indifferent_access' for #<String:0x00007fcbdf105240> (NoMethodError)
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:28:in `new'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:28:in `from_file'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source.rb:441:in `refresh_metadata'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:56:in `refresh_metadata'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source.rb:31:in `initialize'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:30:in `initialize'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:315:in `new'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:315:in `block in source_from_path'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:322:in `source_from_path'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in `block in aggregate_with_repos'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in `map'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in `aggregate_with_repos'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:26:in `aggregate'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:60:in `all'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:173:in `repo_information'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:77:in `stack'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:24:in `report'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:66:in `report_error'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in `load'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in `'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:15:in `initialize': undefined method `with_indifferent_access' for #<String:0x00007fcbda2b6c60> (NoMethodError)
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:28:in `new'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:28:in `from_file'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source.rb:441:in `refresh_metadata'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:56:in `refresh_metadata'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source.rb:31:in `initialize'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:30:in `initialize'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:315:in `new'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:315:in `block in source_from_path'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:322:in `source_from_path'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in `block in aggregate_with_repos'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in `map'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in `aggregate_with_repos'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:26:in `aggregate'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:60:in `all'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:393:in `source_with_url'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/sources_manager.rb:22:in `find_or_create_source_with_url'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:178:in `block in sources'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:177:in `map'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:177:in `sources'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1077:in `block in resolve_dependencies'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1076:in `resolve_dependencies'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:416:in `analyze'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:161:in `install!'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/command/install.rb:52:in `run'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in `load'
    from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in `'

Error running pod install
Error launching application on iPhone 12 Pro Max.

After updating the MAC OS response this

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...

Running pod install...                                           1,300ms
CocoaPods' output:
↳
Preparing

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `fluttertoast` from `.symlinks/plugins/fluttertoast/ios`
-> Fetching podspec for `razorpay_flutter` from `.symlinks/plugins/razorpay_flutter/ios`

Resolving dependencies of `Podfile`
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update

Error output from CocoaPods:
↳
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:15:in initialize': undefined method with_indifferent_access' for #String:0x00007fd8f39e86e8 (NoMethodError)
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:28:in new' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:28:in from_file'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source.rb:441:in refresh_metadata' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:56:in refresh_metadata'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source.rb:31:in initialize' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:30:in initialize'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:315:in new' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:315:in block in source_from_path'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:322:in source_from_path' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in block in aggregate_with_repos'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in map' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in aggregate_with_repos'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:26:in aggregate' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:60:in all'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:173:in repo_information' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:77:in stack'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:24:in report' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:66:in report_error'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in handle_exception' from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in rescue in run'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in run' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in run'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/bin/pod:55:in <top (required)>' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in load'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in ' /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:15:in initialize': undefined method with_indifferent_access' for #<String:0x00007fd8f6a9e8a0> (NoMethodError) from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:28:in new'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/metadata.rb:28:in from_file' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source.rb:441:in refresh_metadata'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:56:in refresh_metadata' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source.rb:31:in initialize'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/cdn_source.rb:30:in initialize' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:315:in new'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:315:in block in source_from_path' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:322:in source_from_path'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in block in aggregate_with_repos' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in map'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:331:in aggregate_with_repos' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:26:in aggregate'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:60:in all' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-core-1.11.2/lib/cocoapods-core/source/manager.rb:393:in source_with_url'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/sources_manager.rb:22:in find_or_create_source_with_url' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:178:in block in sources'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:177:in map' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:177:in sources'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1077:in block in resolve_dependencies' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in section'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1076:in resolve_dependencies' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:124:in analyze'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:416:in analyze' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:241:in block in resolve_dependencies'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in section' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:240:in resolve_dependencies'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:161:in install!' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/command/install.rb:52:in run'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in run' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in run'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/bin/pod:55:in <top (required)>' from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in load'
from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in `'

Error running pod install
Error launching application on iPhone 12 Pro Max.

Body:
Resolved this issue updating ruby version and install cocoapods

RVM

https://rvm.io/rubies/installing

Cocoapods

cocoapods not installing

Remove cache

rm -vrf ~/.cocoapods*


问:
Blazor [Parameter] not update using @ref
I'm using .net6.0 Blazor razor library to create a component.

```<code>@using Microsoft.JSInterop;
@inject IJSRuntime _jsRuntime;

<audio id="@Id" src="@Source" />

@code {
    [Parameter]
    public string Id { get; set; }

    [Parameter]
    public string Source { get; set; }
}
</code>```

I use this component in a razor page using this :

```<code><AudioPlayer
    Id="reactorAudioElement1"
    Source="/audio/lion-roaring.ogg">
</AudioPlayer>
</code>```

And everything is doing fine at this point.

But, if I try to use @ref like that,

```<code><AudioPlayer
    @ref=@_Jukebox2>
</AudioPlayer>
@code {
    private AudioPlayer _Jukebox2;
    protected override void OnInitialized()
    {
        _Jukebox2 = new AudioPlayer()
        {
            Id="reactorAudioElement2",
            Source="/audio/Bleep_02.ogg"
        };
    }
}
</code>```

nothing is set in the DOM.

But I can read data like this, and I cannot set it...

```<code><AudioPlayer
    @ref=@_Jukebox2
    Id="reactorAudioElement2"
</AudioPlayer>
@code {
    private AudioPlayer _Jukebox2;
    protected override void OnAfterRender(bool firstRender)
    {
        Console.WriteLine(_Jukebox2.Id); //ok
        _Jukebox2.Source = "toto.mp3"; //doesn't do anything
    }
}
</code>```

Adding a StateHasChanged(); is not working

What am I doing wrong ?

答:
Your component in DOM is created with this section of code, and your component will have valid @ref value

```<code><AudioPlayer
    @ref=@_Jukebox2
    Id="reactorAudioElement2"
</AudioPlayer>
</code>```

but you are creating another object in code with this section of code

```<code>_Jukebox2 = new AudioPlayer()
        {
            Id="reactorAudioElement2",
            Source="/audio/Bleep_02.ogg"
        };
</code>```

In above code you can create object, but can not have DOM reference

This part of code will create an element in DOM and set it's reference to _Jukebox2, will also set value of Source

```<code> <AudioPlayer
        @ref=@_Jukebox2
        Id="reactorAudioElement2"
        Source="@source"
    </AudioPlayer>

private string source="Source="/audio/Bleep_02.ogg"`;
</code>```

And in code behind you should be able to access public methods or variable in  _Jukebox2  like this

```<code>_Jukebox.Source="toto.mp3";
</code>```

If its not updating DOM then issue might be somewhere else

Body:
I'm using .net6.0 Blazor razor library to create a component.

@using Microsoft.JSInterop;
@inject IJSRuntime _jsRuntime;

<audio id="@Id" src="@Source" />

@code {
    [Parameter]
    public string Id { get; set; }

    [Parameter]
    public string Source { get; set; }
}

I use this component in a razor page using this :

<AudioPlayer
    Id="reactorAudioElement1"
    Source="/audio/lion-roaring.ogg">
</AudioPlayer>

And everything is doing fine at this point.

But, if I try to use @ref like that,

<AudioPlayer
    @ref=@_Jukebox2>
</AudioPlayer>
@code {
    private AudioPlayer _Jukebox2;
    protected override void OnInitialized()
    {
        _Jukebox2 = new AudioPlayer()
        {
            Id="reactorAudioElement2",
            Source="/audio/Bleep_02.ogg"
        };
    }
}

nothing is set in the DOM.

But I can read data like this, and I cannot set it...

<AudioPlayer
    @ref=@_Jukebox2
    Id="reactorAudioElement2"
</AudioPlayer>
@code {
    private AudioPlayer _Jukebox2;
    protected override void OnAfterRender(bool firstRender)
    {
        Console.WriteLine(_Jukebox2.Id); //ok
        _Jukebox2.Source = "toto.mp3"; //doesn't do anything
    }
}

Adding a StateHasChanged(); is not working

What am I doing wrong ?

Body:
Your component in DOM is created with this section of code, and your component will have valid @ref value

<AudioPlayer
    @ref=@_Jukebox2
    Id="reactorAudioElement2"
</AudioPlayer>

but you are creating another object in code with this section of code

_Jukebox2 = new AudioPlayer()
        {
            Id="reactorAudioElement2",
            Source="/audio/Bleep_02.ogg"
        };

In above code you can create object, but can not have DOM reference

This part of code will create an element in DOM and set it's reference to _Jukebox2, will also set value of Source

 <AudioPlayer
        @ref=@_Jukebox2
        Id="reactorAudioElement2"
        Source="@source"
    </AudioPlayer>

private string source="Source="/audio/Bleep_02.ogg"`;

And in code behind you should be able to access public methods or variable in  _Jukebox2  like this

_Jukebox.Source="toto.mp3";

If its not updating DOM then issue might be somewhere else


问:
Can't get Table Data from Site After the Page Loads
I'm trying to obtain the 2nd table on the following website. I've tried BS4, Pandas, and now selenium, but I can't obtain the table for the life of me.

The table data doesn't load until after the page comes up.

There is a dictionary on the 'view source' page with the info, but its seems like every element on that page is 'line-content', so its makes it difficult to obtain only the desired table info.

What is the best way to collect the table data?

```<code>from ast import Return
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as ec
import time

path = 'C:\Program Files (x86)\chromedriver.exe'

driver = webdriver.Chrome(path)

driver.get('https://www.linestarapp.com/Ownership/Sport/NFL/Site/DraftKings/PID/295')

time.sleep(5)
driver.maximize_window()

time.sleep(5)

players = driver.find_elements_by_class_name('playerRow').text
print(players)
</code>```

答:
There are several issues here:

find_elements_by_class_name method returns a list of web elements. You can not apply .text method on a list of web elements, you need to iterate over elements in a list and extract text from each element one by one.

You should not use hardcoded pauses like time.sleep(5) Expected Conditions explicitly waits should be used instead.

Something like this:

from ast import Return
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
import time

path = 'C:\Program Files (x86)\chromedriver.exe'

driver = webdriver.Chrome(path)
wait = WebDriverWait(driver, 20)

driver.get('https://www.linestarapp.com/Ownership/Sport/NFL/Site/DraftKings/PID/295')

driver.maximize_window()

wait.until(EC.visibility_of_element_located((By.CSS_SELECTOR, ".playerRow")))
#short pause added in order to make sure all the elements are loaded after we know the first element was loaded
time.sleep(0.5)

players = driver.find_elements_by_class_name('playerRow')
for player in players:
    print(player.text)
```

UPD

Using this css_selector locator #tableTournament .playerRow instead of just .playerRowwill give you the right table rows

Body:
I'm trying to obtain the 2nd table on the following website. I've tried BS4, Pandas, and now selenium, but I can't obtain the table for the life of me.

The table data doesn't load until after the page comes up.

There is a dictionary on the 'view source' page with the info, but its seems like every element on that page is 'line-content', so its makes it difficult to obtain only the desired table info.

What is the best way to collect the table data?

from ast import Return
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as ec
import time

path = 'C:\Program Files (x86)\chromedriver.exe'

driver = webdriver.Chrome(path)

driver.get('https://www.linestarapp.com/Ownership/Sport/NFL/Site/DraftKings/PID/295')

time.sleep(5)
driver.maximize_window()

time.sleep(5)

players = driver.find_elements_by_class_name('playerRow').text
print(players)

Body:
There are several issues here:

find_elements_by_class_name method returns a list of web elements. You can not apply .text method on a list of web elements, you need to iterate over elements in a list and extract text from each element one by one.

You should not use hardcoded pauses like time.sleep(5) Expected Conditions explicitly waits should be used instead.

Something like this:

from ast import Return
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
import time

path = 'C:\Program Files (x86)\chromedriver.exe'

driver = webdriver.Chrome(path)
wait = WebDriverWait(driver, 20)

driver.get('https://www.linestarapp.com/Ownership/Sport/NFL/Site/DraftKings/PID/295')

driver.maximize_window()

wait.until(EC.visibility_of_element_located((By.CSS_SELECTOR, ".playerRow")))
#short pause added in order to make sure all the elements are loaded after we know the first element was loaded
time.sleep(0.5)

players = driver.find_elements_by_class_name('playerRow')
for player in players:
    print(player.text)

UPD

Using this css_selector locator #tableTournament .playerRow instead of just .playerRowwill give you the right table rows


问:
Why show me error to create new symfony project?
When I execute this command: symfony new my_project

Creating a new Symfony project with Composer
WARNING: Unable to find Composer, downloading one. It is recommended to install Composer yourself at https://getcomposer.org/download/
(running C:\Users\pimubi.symfony5\composer\composer.phar create-project symfony/skeleton D:\wamp64\www\symfony\my_project  --no-interaction)

Creating a "symfony/skeleton" project at "./my_project"

[InvalidArgumentException]
Could not find package symfony/skeleton with stability stable in a version installable using your PHP version, PHP extensions and Composer version.

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [] [] []

Show me that error:
unable to run C:\Users\pimubi\.symfony5\composer\composer.phar create-project symfony/skeleton D:\wamp64\www\symfony\my_project  --no-interaction

答:
You need to check the requirements for Symfony and install the missing ones (https://symfony.com/doc/current/setup.html#technical-requirements)

In case you have installed Symfony CLI, you can check your requirements with this command:

```<code>symfony check:requirements
</code>```

It seems like you are missing PHP and/or Composer.

Body:
You need to check the requirements for Symfony and install the missing ones (https://symfony.com/doc/current/setup.html#technical-requirements)

In case you have installed Symfony CLI, you can check your requirements with this command:

symfony check:requirements

It seems like you are missing PHP and/or Composer.


问:
extracting a list within a list in a tuple which happens to be in a pd.series
```<code>x=
[[(some text,[a]), (some text,[b]), (some text,[c]).........]]
   [[(some text,[d]), (some text,[e]), (some text,[f]).........]]
    [[(some text,[g]), (some text,[h]), (some text,[k]).........]]
    [[(some text,[i]), (some text,[x]), (some text,[y]).........]]
    [[(some text,[z]), (some text,[t]), (some text,[w]).........]]
    [[(some text,[t]), (some text,[g]), (some text,[u]).........]]

type(x)

pandas.core.series.Series
</code>```

I want to create a series that only contains the values of the list within the tuple such as those[a] or [u] or [w].

How can I extract? Thank you.

UPDATE: I realized the way I phrase the question was confusing. I changed it now. It represents my problem better. Basically, I need to extract all [a] or [u] or [w]row by row. This is tokenized text data, they are words in sentences. Sorry for the confusion.

答:
```<code>s = pd.Series(x)

a=s.explode().explode().str[1].explode()

b=pd.DataFrame(a)

b.groupby(b.index)['column1'].apply(lambda x: ','.join(x.astype(str)))
</code>```

that code worked.

Body:
x=
[[(some text,[a]), (some text,[b]), (some text,[c]).........]]
   [[(some text,[d]), (some text,[e]), (some text,[f]).........]]
    [[(some text,[g]), (some text,[h]), (some text,[k]).........]]
    [[(some text,[i]), (some text,[x]), (some text,[y]).........]]
    [[(some text,[z]), (some text,[t]), (some text,[w]).........]]
    [[(some text,[t]), (some text,[g]), (some text,[u]).........]]

type(x)

pandas.core.series.Series

I want to create a series that only contains the values of the list within the tuple such as those[a] or [u] or [w].

How can I extract? Thank you.

UPDATE: I realized the way I phrase the question was confusing. I changed it now. It represents my problem better. Basically, I need to extract all [a] or [u] or [w]row by row. This is tokenized text data, they are words in sentences. Sorry for the confusion.

Body:
s = pd.Series(x)

a=s.explode().explode().str[1].explode()

b=pd.DataFrame(a)

b.groupby(b.index)['column1'].apply(lambda x: ','.join(x.astype(str)))

that code worked.