问:
How to check if Java is using configured proxy server?
I have the -Dhttps.proxyHost= set in the run command, is there some kind of logging I can enable to see when it is proxying a call?  I need to verify that this is working.

I have also whitelisted a number of hosts via -Dhttp.nonProxyHosts= so I want to make sure it is not proxying these.

答:
1. Using java.util.logging

Create logging.properties file with the following contents:

```<code>handlers = java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level = ALL
sun.net.www.protocol.http.HttpURLConnection.level = FINEST
</code>```

Then add -Djava.util.logging.config.file=/path/to/logging.properties JVM option.

Now you'll see log messages whenever HTTPS connection is established through a proxy:

```<code>May 30, 2020 2:12:56 AM sun.net.www.protocol.http.HttpURLConnection plainConnect0
FINEST: ProxySelector Request for https://example.com/
May 30, 2020 2:12:56 AM sun.net.www.protocol.https.HttpsClient New
FINEST: Looking for HttpClient for URL https://example.com and proxy value of HTTP @ 127.0.0.1:443
May 30, 2020 2:12:56 AM sun.net.www.protocol.https.HttpsClient <init>
FINEST: Creating new HttpsClient with url:https://example.com and proxy:HTTP @ 127.0.0.1:443 with connect timeout:-1
May 30, 2020 2:12:56 AM sun.net.www.protocol.http.HttpURLConnection plainConnect0
FINEST: Proxy used: HTTP @ 127.0.0.1:443
</code>```

2. Another option, assuming you are on Linux, is to trace all connect system calls:

```<code>$ sudo strace -f -p <PID> -e connect
</code>```

After attaching to a Java process <PID> with strace, you'll see all addresses where the process connects to. If a proxy is used, there will be an address of the proxy.

```<code>[pid 12345] connect(263, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
</code>```

Body:
1. Using java.util.logging

Create logging.properties file with the following contents:

handlers = java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level = ALL
sun.net.www.protocol.http.HttpURLConnection.level = FINEST

Then add -Djava.util.logging.config.file=/path/to/logging.properties JVM option.

Now you'll see log messages whenever HTTPS connection is established through a proxy:

May 30, 2020 2:12:56 AM sun.net.www.protocol.http.HttpURLConnection plainConnect0
FINEST: ProxySelector Request for https://example.com/
May 30, 2020 2:12:56 AM sun.net.www.protocol.https.HttpsClient New
FINEST: Looking for HttpClient for URL https://example.com and proxy value of HTTP @ 127.0.0.1:443
May 30, 2020 2:12:56 AM sun.net.www.protocol.https.HttpsClient <init>
FINEST: Creating new HttpsClient with url:https://example.com and proxy:HTTP @ 127.0.0.1:443 with connect timeout:-1
May 30, 2020 2:12:56 AM sun.net.www.protocol.http.HttpURLConnection plainConnect0
FINEST: Proxy used: HTTP @ 127.0.0.1:443

2. Another option, assuming you are on Linux, is to trace all connect system calls:

$ sudo strace -f -p <PID> -e connect

After attaching to a Java process <PID> with strace, you'll see all addresses where the process connects to. If a proxy is used, there will be an address of the proxy.

[pid 12345] connect(263, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)


来源: stackexchange

问:
How do I convert a floating point to hexadecimal in VB.NET?
Example: The float value is -1580.719 and I need to convert it to hex in VB.NET (Value in hex should  output: C4C59704).</p>

答:
Ok, so I found how to do it:

```<code>Dim var As Single = Single.Parse("-1580.719")
Dim varArray() As Byte = BitConverter.GetBytes(var)
Array.Reverse(varArray)
Dim result As String = BitConverter.ToString(varArray).Replace("-", "")
</code>```

Value of result is:

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

ContentLicense: CC BY-SA 4.0

Body:
Ok, so I found how to do it:

Dim var As Single = Single.Parse("-1580.719")
Dim varArray() As Byte = BitConverter.GetBytes(var)
Array.Reverse(varArray)
Dim result As String = BitConverter.ToString(varArray).Replace("-", "")

Value of result is:

C4C59702


问:
T-SQL: How Can I JOIN Each Row Differently
How can I join two tables together that have dissimilar fields and require different rules to JOIN? An  example:

tb_references               tb_parts
==================          ====================
f_type  |  f_item           f_partID  |  f_partnumber
------------------          --------------------
YY      |  ABC123           1         |  YYABC123
YY      |  ABC124           2         |  YYABC124
NN      |  000111           3         |  YY000111
NN      |  000112           4         |  YY000112
```

<p>To JOIN these, I would normally perform a query like the following</p>

```SELECT *
FROM tb_references
JOIN tb_parts
ON f_type + f_item = f_partnumber
```

<p>However, you can see where the <code>f_type</code> of the <code>NN</code> won't match, so my results would look like the following:</p>

<pre class="lang-none prettyprint-override"><code>RESULTS
=============================================
f_type  | f_item  | f_partID  | f_partnumber
---------------------------------------------
YY      | ABC123  | 1         | YYABC123
YY      | ABC124  | 2         | YYABC124
</code>```

How can I specify an IF statement in the query to allow me to match the broken NN parts as well?

Something like this logic, but I can't figure out how to accomplish it though I've tried various methods without success:

```<code>SELECT *
FROM tb_references
JOIN tb_parts
ON
 IF (
    f_type = 'NN' THEN
      'YY' + f_item = f_partnumber
    )
 ELSE (
    f_type + f_item = f_partnumber
 )
</code>```

My optimal results, then, would be like this:

RESULTS
=============================================
f_type  | f_item  | f_partID  | f_partnumber
---------------------------------------------
YY      | ABC123  | 1         | YYABC123
YY      | ABC124  | 2         | YYABC124
NN      | 000111  | 3         | YY000111
NN      | 000112  | 4         | YY000112
```

I'm open, of course, to other solutions that don't utilize an IF in the JOIN - it is just my way to try to describe the problem I'm facing. Unfortunately, I can't simply update the "f_type" field because it's a third-party database that we cannot control nor edit.

答:
If the prefix for f_partnumber is always 2 in length then you can just replace those with an empty character in the join.</p>

```<code>SELECT DISTINCT *
FROM tb_references r
JOIN tb_parts p ON r.f_item = REPLACE(f_partnumber, LEFT(p.f_partnumber, 2), '')
</code>```

Body:
How can I join two tables together that have dissimilar fields and require different rules to JOIN? An  example:

tb_references               tb_parts
==================          ====================
f_type  |  f_item           f_partID  |  f_partnumber
------------------          --------------------
YY      |  ABC123           1         |  YYABC123
YY      |  ABC124           2         |  YYABC124
NN      |  000111           3         |  YY000111
NN      |  000112           4         |  YY000112

To JOIN these, I would normally perform a query like the following

SELECT *
FROM tb_references
JOIN tb_parts
ON f_type + f_item = f_partnumber

However, you can see where the f_type of the NN won't match, so my results would look like the following:

RESULTS
=============================================
f_type  | f_item  | f_partID  | f_partnumber
---------------------------------------------
YY      | ABC123  | 1         | YYABC123
YY      | ABC124  | 2         | YYABC124

How can I specify an IF statement in the query to allow me to match the broken NN parts as well?

Something like this logic, but I can't figure out how to accomplish it though I've tried various methods without success:

SELECT *
FROM tb_references
JOIN tb_parts
ON
 IF (
    f_type = 'NN' THEN
      'YY' + f_item = f_partnumber
    )
 ELSE (
    f_type + f_item = f_partnumber
 )

My optimal results, then, would be like this:

RESULTS
=============================================
f_type  | f_item  | f_partID  | f_partnumber
---------------------------------------------
YY      | ABC123  | 1         | YYABC123
YY      | ABC124  | 2         | YYABC124
NN      | 000111  | 3         | YY000111
NN      | 000112  | 4         | YY000112

I'm open, of course, to other solutions that don't utilize an IF in the JOIN - it is just my way to try to describe the problem I'm facing. Unfortunately, I can't simply update the "f_type" field because it's a third-party database that we cannot control nor edit.

Body:
If the prefix for f_partnumber is always 2 in length then you can just replace those with an empty character in the join.

SELECT DISTINCT *
FROM tb_references r
JOIN tb_parts p ON r.f_item = REPLACE(f_partnumber, LEFT(p.f_partnumber, 2), '')


问:
not rebinding when call event Propertieschanged
I have an Ellipse in my application which is filled with an ImageBrush. I'm trying to bind ImageBrush.ImageSource and change it when I click on the Ellipse. I'm using the class ConvertImage which implements IValueConverter to convert the data. But when I changed data and call function PropertiesChanged it not call class ConvertImage and not reminding data.

Here is my code Xaml:

```<code><Window x:Class="CoffeeManager.Controls.CategoryControl.CategoryAddFoodForm"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:CoffeeManager.Controls.CategoryControl"
        xmlns:coffeeManager="clr-namespace:CoffeeManager"
        xmlns:foodView="clr-namespace:CoffeeManager.Controls.FoodControl"
        mc:Ignorable="d"
        Style="{StaticResource WindowStyle}"
        Title="Add Food To Categoory" Height="600" Width="1000" Background="#1e1e1e" Loaded="CategoryAddFoodForm_OnLoaded">
    <Grid>
        <Grid.Resources>

            <coffeeManager:ConvertImage x:Key="ConvertImage"/>

        </Grid.Resources>

        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>

            <Ellipse Grid.Column="1" Margin="10" StrokeThickness="2" Stroke="White" MouseDown="UIElement_OnMouseDown">
                <Ellipse.Fill>
                    <ImageBrush Stretch="Uniform" ImageSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:CategoryViewForm}}, Path=Category.Image, Converter={StaticResource ConvertImage}, UpdateSourceTrigger=PropertyChanged}"/>
                </Ellipse.Fill>
            </Ellipse>
        </Grid>
    </Grid>
</Window>
</code>```

and here is code behind:

```<code>namespace CoffeeManager.Controls.CategoryControl
{
    /// <summary>
    ///     Interaction logic for CategoryAddFoodForm.xaml
    /// </summary>
    public partial class CategoryAddFoodForm : Window, INotifyPropertyChanged
    {
        private Category category;

        public Category Category
        {
            get => category;
            set
            {
                category = value;
                OnPropertiesChanged("Category");
            }
        }

        public CategoryAddFoodForm()
        {
            InitializeComponent();
        }

        public event PropertyChangedEventHandler PropertyChanged;

        public virtual void OnPropertiesChanged(string name)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
        }

        private void UIElement_OnMouseDown(object sender, MouseButtonEventArgs e)
        {
            var of = new OpenFileDialog
            {
                Filter = StaticValue.FilterImage
            };

            if (of.ShowDialog() == true)
            {
                if (!Directory.Exists(Environment.CurrentDirectory + StaticValue.PathDirectoryCategory)) Directory.CreateDirectory(Environment.CurrentDirectory + StaticValue.PathDirectoryCategory);

                if (string.IsNullOrEmpty(category.Image) || !category.Image.Contains(StaticValue.OtherCode))
                {
                    File.Copy(of.FileName, Environment.CurrentDirectory + StaticValue.PathDirectoryCategory + category.Name + StaticValue.CategoryExtensions, true);

                    category.Image = StaticValue.PathDirectoryCategory + category.Name + StaticValue.CategoryExtensions;
                }
                else
                {
                    File.Copy(of.FileName, Environment.CurrentDirectory + StaticValue.PathDirectoryCategory + category.Name + StaticValue.OtherCode + StaticValue.CategoryExtensions, true);

                    category.Image = StaticValue.PathDirectoryCategory + category.Name + StaticValue.OtherCode + StaticValue.CategoryExtensions;
                }

                OnPropertiesChanged("Category");  //when I call Propertieschanged here it do nothing
            }
        }
    }
}
</code>```

final here is class ConvertImage:

```<code>public class ConvertImage : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null)
            {
                return null;
            }

            if (string.IsNullOrEmpty(value.ToString()))
            {
                return null;
            }

            try
            {
                return new BitmapImage(new Uri(Environment.CurrentDirectory + value.ToString()));
            }
            catch { }

            return null;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null)
                return string.Empty;

            string[] elementUri = value.ToString().Split('/');
            bool isReSources = false;

            StringBuilder resulf = new StringBuilder();

            foreach (string s in elementUri)
            {
                if (s == "Resources")
                {
                    isReSources = true;
                }

                if (isReSources)
                {
                    resulf.Append(@"\" + s);
                }
            }

            return resulf.ToString();
        }
    }
</code>```

答:
I think you are making it very complicated.

First, set a name in the Xaml on the top window-element - For instance CategoryAddFoodFormWindow:

```<code><Window x:Class="CoffeeManager.Controls.CategoryControl.CategoryAddFoodForm" ... x:Name="CategoryAddFoodFormWindow">
</code>```

Then it is much easier to make a binding to properties in your CategoryAddFoodForm class by:

```<code><ImageBrush Stretch="Uniform" ImageSource="{Binding ElementName=CategoryAddFoodFormWindow, Path=Category.Image, Converter={StaticResource ConvertImage}, UpdateSourceTrigger=PropertyChanged}"/>
</code>```

Next, then just make a property on your CategoryAddFoodForm of type ImageSource:

```<code>public ImageSource CategoryImage { set; get; }
</code>```

And set the value from your dialog box directly to that property instead of using your converter class:

```<code><ImageBrush Stretch="Uniform" ImageSource="{Binding ElementName=CategoryAddFoodFormWindow, Path=CategoryImage/>
</code>```

INotifyPropertyChanged is not necessary, and the class ConvertImage is either

Body:
I have an Ellipse in my application which is filled with an ImageBrush. I'm trying to bind ImageBrush.ImageSource and change it when I click on the Ellipse. I'm using the class ConvertImage which implements IValueConverter to convert the data. But when I changed data and call function PropertiesChanged it not call class ConvertImage and not reminding data.

Here is my code Xaml:

<Window x:Class="CoffeeManager.Controls.CategoryControl.CategoryAddFoodForm"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:CoffeeManager.Controls.CategoryControl"
        xmlns:coffeeManager="clr-namespace:CoffeeManager"
        xmlns:foodView="clr-namespace:CoffeeManager.Controls.FoodControl"
        mc:Ignorable="d"
        Style="{StaticResource WindowStyle}"
        Title="Add Food To Categoory" Height="600" Width="1000" Background="#1e1e1e" Loaded="CategoryAddFoodForm_OnLoaded">
    <Grid>
        <Grid.Resources>

            <coffeeManager:ConvertImage x:Key="ConvertImage"/>

        </Grid.Resources>

        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>

            <Ellipse Grid.Column="1" Margin="10" StrokeThickness="2" Stroke="White" MouseDown="UIElement_OnMouseDown">
                <Ellipse.Fill>
                    <ImageBrush Stretch="Uniform" ImageSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:CategoryViewForm}}, Path=Category.Image, Converter={StaticResource ConvertImage}, UpdateSourceTrigger=PropertyChanged}"/>
                </Ellipse.Fill>
            </Ellipse>
        </Grid>
    </Grid>
</Window>

and here is code behind:

namespace CoffeeManager.Controls.CategoryControl
{
    ///
    ///     Interaction logic for CategoryAddFoodForm.xaml
    ///
    public partial class CategoryAddFoodForm : Window, INotifyPropertyChanged
    {
        private Category category;

        public Category Category
        {
            get => category;
            set
            {
                category = value;
                OnPropertiesChanged("Category");
            }
        }

        public CategoryAddFoodForm()
        {
            InitializeComponent();
        }

        public event PropertyChangedEventHandler PropertyChanged;

        public virtual void OnPropertiesChanged(string name)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
        }

        private void UIElement_OnMouseDown(object sender, MouseButtonEventArgs e)
        {
            var of = new OpenFileDialog
            {
                Filter = StaticValue.FilterImage
            };

            if (of.ShowDialog() == true)
            {
                if (!Directory.Exists(Environment.CurrentDirectory + StaticValue.PathDirectoryCategory)) Directory.CreateDirectory(Environment.CurrentDirectory + StaticValue.PathDirectoryCategory);

                if (string.IsNullOrEmpty(category.Image) || !category.Image.Contains(StaticValue.OtherCode))
                {
                    File.Copy(of.FileName, Environment.CurrentDirectory + StaticValue.PathDirectoryCategory + category.Name + StaticValue.CategoryExtensions, true);

                    category.Image = StaticValue.PathDirectoryCategory + category.Name + StaticValue.CategoryExtensions;
                }
                else
                {
                    File.Copy(of.FileName, Environment.CurrentDirectory + StaticValue.PathDirectoryCategory + category.Name + StaticValue.OtherCode + StaticValue.CategoryExtensions, true);

                    category.Image = StaticValue.PathDirectoryCategory + category.Name + StaticValue.OtherCode + StaticValue.CategoryExtensions;
                }

                OnPropertiesChanged("Category");  //when I call Propertieschanged here it do nothing
            }
        }
    }
}

final here is class ConvertImage:

public class ConvertImage : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null)
            {
                return null;
            }

            if (string.IsNullOrEmpty(value.ToString()))
            {
                return null;
            }

            try
            {
                return new BitmapImage(new Uri(Environment.CurrentDirectory + value.ToString()));
            }
            catch { }

            return null;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null)
                return string.Empty;

            string[] elementUri = value.ToString().Split('/');
            bool isReSources = false;

            StringBuilder resulf = new StringBuilder();

            foreach (string s in elementUri)
            {
                if (s == "Resources")
                {
                    isReSources = true;
                }

                if (isReSources)
                {
                    resulf.Append(@"\" + s);
                }
            }

            return resulf.ToString();
        }
    }

Body:
I think you are making it very complicated.

First, set a name in the Xaml on the top window-element - For instance CategoryAddFoodFormWindow:

<Window x:Class="CoffeeManager.Controls.CategoryControl.CategoryAddFoodForm" ... x:Name="CategoryAddFoodFormWindow">

Then it is much easier to make a binding to properties in your CategoryAddFoodForm class by:

<ImageBrush Stretch="Uniform" ImageSource="{Binding ElementName=CategoryAddFoodFormWindow, Path=Category.Image, Converter={StaticResource ConvertImage}, UpdateSourceTrigger=PropertyChanged}"/>

Next, then just make a property on your CategoryAddFoodForm of type ImageSource:

public ImageSource CategoryImage { set; get; }

And set the value from your dialog box directly to that property instead of using your converter class:

<ImageBrush Stretch="Uniform" ImageSource="{Binding ElementName=CategoryAddFoodFormWindow, Path=CategoryImage/>

INotifyPropertyChanged is not necessary, and the class ConvertImage is either


问:
ng serve no longer works. Cannot find modules
I added some npm packages last night in an effort to install a color picker. Today, I had to work on a laptop and pulled the repo down and ran npm install. I had some issues where I was first told that the node_modules/index.js file did not exist. I created an empty file there by that name. The code compiled and I got an error in the console of

```<code>Uncaught TypeError: AllHtmlEntities is not a constructor
    at Object../node_modules/webpack-dev-server/client/overlay.js (vendor.js:331033)
    at __webpack_require__ (runtime.js:85)
    at Object.<anonymous> (vendor.js:330846)
    at Object../node_modules/webpack-dev-server/client/index.js?http://0.0.0.0:0/sockjs-node&sockPath=/sockjs-node (vendor.js:331013)
    at __webpack_require__ (runtime.js:85)
    at Object.0 (main.js:42976)
    at __webpack_require__ (runtime.js:85)
    at checkDeferredModules (runtime.js:46)
    at Array.webpackJsonpCallback [as push] (runtime.js:33)
    at main.js:1
</code>```

The code will not compile and I get the following error :

```<code>An unhandled exception occurred: Cannot find module './features/avif'
See "/private/var/folders/bm/gjfl16s959nfnzpchxpcv0s00000gp/T/ng-ihA5FD/angular-errors.log" for further details.
</code>```

I have no idea what has happened here nor how to solve it.

答:
I remember something similar. Mostly it had something to do with the node or npm version that my system has set as default. Since then I use NVM (Node Version Manager) to handle this kind of issues.

see here: https://itnext.io/nvm-the-easiest-way-to-switch-node-js-environments-on-your-machine-in-a-flash-17babb7d5f1b

Body:
I added some npm packages last night in an effort to install a color picker. Today, I had to work on a laptop and pulled the repo down and ran npm install. I had some issues where I was first told that the node_modules/index.js file did not exist. I created an empty file there by that name. The code compiled and I got an error in the console of

Uncaught TypeError: AllHtmlEntities is not a constructor
    at Object../node_modules/webpack-dev-server/client/overlay.js (vendor.js:331033)
    at __webpack_require__ (runtime.js:85)
    at Object.<anonymous> (vendor.js:330846)
    at Object../node_modules/webpack-dev-server/client/index.js?http://0.0.0.0:0/sockjs-node&sockPath=/sockjs-node (vendor.js:331013)
    at __webpack_require__ (runtime.js:85)
    at Object.0 (main.js:42976)
    at __webpack_require__ (runtime.js:85)
    at checkDeferredModules (runtime.js:46)
    at Array.webpackJsonpCallback [as push] (runtime.js:33)
    at main.js:1

The code will not compile and I get the following error :

An unhandled exception occurred: Cannot find module './features/avif'
See "/private/var/folders/bm/gjfl16s959nfnzpchxpcv0s00000gp/T/ng-ihA5FD/angular-errors.log" for further details.

I have no idea what has happened here nor how to solve it.


问:
How to identify (not remove) SETS of data that are duplicated? Dplyr or other solution?
so I have data about Sites, nested in Class.  In each Site there is a Time (timepoint) variable.  The data of interest is Count1, Total1, Count2, Total2.

I know there are whole duplicate sets within Class, across Sites for the values of Count1, Total1, Count2, Total2 for Time.

Here's what I mean - Let's say we have Class 1, with the first Site:

```<code>Class  Site           Time  Count1 Total1  Count2 Total2
1      a0QjvO281o1    1      8     64      4     34
1      a0QjvO281o1    2     16     64      8     34
1      a0QjvO281o1    3     16     64      8     34
1      a0QjvO281o1    4     16     64      8     34
1      a0QjvO281o1    6      8     64      4     34
</code>```

And, I've noticed there are several other Sites with this EXACT pattern (or other repeated patterns).

```<code>Class  Site           Time  Count1 Total1  Count2 Total2
1      zlG1VmpE6QQ    1      8     64      4     34
1      zlG1VmpE6QQ    2     16     64      8     34
1      zlG1VmpE6QQ    3     16     64      8     34
1      zlG1VmpE6QQ    4     16     64      8     34
1      zlG1VmpE6QQ    6      8     64      4     34
</code>```

I want to identify within Class how many Sites have the same pattern.  Either marking them or reducing the data sets to the first unique site pattern, but I would like to be able to say how many Sites fit each found pattern.

So, here's the partial data:

```    df <-
structure(list(Class = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), Site = structure(c(3L,
3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 6L, 6L, 6L, 6L, 6L, 9L, 9L,
9L, 9L, 9L, 17L, 17L, 17L, 17L, 17L, 19L, 19L, 19L, 19L, 19L,
30L, 30L, 30L, 30L, 30L, 49L, 49L, 49L, 49L, 49L, 54L, 54L, 54L,
54L, 54L, 56L, 56L, 56L, 56L, 56L, 62L, 62L, 62L, 62L, 62L, 66L,
66L, 66L, 66L, 66L, 86L, 86L, 86L, 86L, 86L, 88L, 88L, 88L, 88L,
88L, 98L, 98L, 98L, 98L, 98L, 33L, 33L, 33L, 33L, 33L, 128L,
128L, 128L, 128L, 128L, 141L, 141L, 141L, 141L, 141L, 153L, 153L,
153L, 153L, 153L, 154L, 154L, 154L, 154L, 154L, 274L, 274L, 274L,
274L, 274L, 291L, 291L, 291L, 291L, 291L, 306L, 306L, 306L, 306L,
306L, 309L, 309L, 309L, 309L, 309L, 336L, 336L, 336L, 336L, 336L,
342L, 342L, 342L, 342L, 342L, 396L, 396L, 396L, 396L, 396L, 413L,
413L, 413L, 413L, 413L, 418L, 418L, 418L, 418L, 418L, 435L, 435L,
435L, 435L, 435L, 451L), .Label = c("~", "A0e3A15Lh1d", "a0QjvO281o1",
"A0R2gEqRbTv", "A4J3Jp6KNz2", "A757EHpLOya", "A8kkDgEvEZV", "ab5F7MfRxZW",
"AcjfpLUXjwt", "admxsO3fTtq", "aEBm7REs6XS", "AEZgWxwdbd9", "AezXCsZxd2U",
"AFjm1YmnfyO", "AFTwI0xBM6e", "aGw7PyLMEkl", "aHNXoYj7uNJ", "AibLRYCSE4P",
"aitNX6Qxkon", "ajEqsuhE9fV", "aJFDh98Iahb", "AKG4BvCUVsF", "AMtGkXGugJb",
"aNczAtKAJsv", "aoY0wrz6qBF", "aOz3ikxG7qM", "aPWuF0rDfuJ", "aQrGXlhzEJB",
"ARu0wnYDkam", "As7tGowP84e", "AsqolR3dfgv", "atj39UeK8N9", "atmjKVCRnzw",
"aUhP7zZ7LPU", "aUMEQzUKI0K", "AuP8NAgS7Th", "aUyy9i4fwhS", "AVFW2vlGxds",
"awoAlwC06Go", "awxCmxmeea2", "AWYFb5fwcYb", "Ax2Q16uPW55", "AXO6R085bth",
"Ay6W05BTgDV", "aZMeFIlkevS", "B08adcYOEl7", "b5MVFPi1inY", "B7fffQm5omx",
"ba3kFfcKXNk", "bCK7hWM4bnK", "BDlYKSCaOIG", "BE3TZDysXuQ", "bErpy9bSZAV",
"Beu6pmpSDJE", "BgfNJiJlDrF", "bGUeQEEpq7q", "bgWDDBsRLIL", "bHwo17fsILI",
"bifefa8JnfN", "bIQ3gsw51RH", "bisxDvmwluW", "biy6fHoOcZp", "bK7yQP8LNkJ",
"Bke0tWeJyBr", "bKMNhuIYaYW", "blkWvfFDVm6", "bnaDFC8EVAo", "BNDeQ6sJctI",
"Bokks2ESodd", "BoKlS77F7Il", "BqLRDDu69ic", "bqoZAzbsajz", "BRlA0HkkMGM",
"bT501IhkxV9", "BTliRZoJs4i", "bTTf1R7zgRn", "bTZAPQPXgI5", "BUtglXWCjkf",
"BvcJEyVWsGG", "bVHpRZguCL2", "BVymUZcbCuf", "BwkVolONMBn", "bWtq9NnOoCU",
"c2YR2oDyx7t", "c3dhvyZuPum", "c3LYcysugey", "c46Q9ExLocA", "C52gwcl9fmp",
"c5IYnQ3M7dj", "c6yCKEAemfr", "C8uv1qapHmC", "Ca2rjTu7g6A", "cAsHVMiIVHT",
"cB7mNM1MNm0", "Cbboq0XBHn1", "cbUfMWJl9sK", "ccixNtjWLkf", "ccL7Esacksn",
"CgmvbI2pkyK", "cGvhZR5kDxQ", "chFA8wLA953", "cIb00kbYPgm", "cjoj6MxgfxE",
"cJrxpXipqCm", "cMR1ECoHpE4", "CmRKRa25mZu", "cnCuI3VeJKt", "cNUlz8NllVu",
"CoySgwRgeRE", "CpZyeEzz39h", "CqIH5ytvqTS", "cRbK3weaIO6", "cs2MtDT1y17",
"CSVVXoe0xGC", "ctEZrxoEucg", "CxCDdfOd0Nj", "cXzO64qne5O", "CZq12nSSyn9",
"CzTmTRr0krx", "d3F3FBUFtWi", "d3f8P40FxnS", "d3thFMLEOGr", "d3UA2wZLHlM",
"D3wXzwwrBE7", "D4Bb0bZE5eK", "D5BprGY8EIU", "D5F054OKtW4", "D9nOWZAX3yT",
"DAcTRfO0CNG", "DbjU3iBZtGx", "Dd4sp3zIfSJ", "DDC8Dws74Zz", "DEFzmar1QtJ",
"dEoQWkLavTj", "deVhoPko4Bh", "DFBDO1gXQwf", "DfdvXXyNSoV", "dGCqYO3Zi6p",
"DGDkUV76OgX", "Dgt3VcFh8rl", "DHdEugYqcEI", "Dhku9zrZoJe", "dHokR5oLiIl",
"DhPZWGceA1Q", "DiKXevYOYNB", "DJIgnE1QQbB", "dkR7YOB6UT6", "dKy3aHycCap",
"dl9g8UYxk20", "DLmEBtWqO9S", "DLza3NSQYUI", "dmUHnTHgfYg", "dnRXJOdEzdw",
"doRK8OhG0kd", "DQaEryfraV6", "dQk8ubXxXLX", "dQOwWKXxFeq", "DrHlSXIHalR",
"DrLeENdZwxX", "DRUaAOrybxb", "dSJcUkmJWvZ", "dSuHNzaRaSf", "dtDftsTowRA",
"DVF2BNdSzV9", "DW7NajJs9ry", "dw94DZyrpUZ", "Dxa8RiDlXB6", "dXBB3LIqhd8",
"dY1ATXbywBu", "DY3V0E6pUYD", "dYIdx3HoWbL", "DZMyvdZEDeB", "dZrjKdqCi1w",
"e2cMNKCnHOw", "E2g3H9rUdML", "e59NHDOFTWC", "E6KoR8hXk7P", "E6vLBntf9QE",
"E8PnLO9QRcE", "e9NQxtBNruk", "e9QjFd6fZ4I", "EAdX1JPb4Dm", "eCGBeD0uz0D",
"ECHaJeidpTR", "edLdPyMjbaz", "EefeXxr8yDS", "ef6tzAcpMeF", "eFB6BfJ2BTY",
"EjFYleP5G9K", "eLGdmsoRjWn", "ElmgbenqYn7", "EM5PauW0KWg", "EmhBF1JUw3i",
"enR40fiMtoo", "EpxhEmcMVXh", "EQpPsVwWvqz", "EQtHhnAYjJp", "erfgs35WGXU",
"eRNEYF9OfA8", "ERqjIjzKnNm", "EsdcJsyJTJG", "ESNgljw6VvC", "eSZjKIwHPYi",
"etyPfIkrlrM", "Eu1JrO8bBkB", "euFWewBZ5Xr", "EVaNkH5nz1s", "eXgA6Zfn6KQ",
"EXIi96SW1Bm", "eYPdhvwFirr", "eZ2NazTVbb6", "EzN8D82lOTp", "F03oK0VRgyk",
"f0WCSs2fwvv", "F3CHKWYM2Pb", "f3FoF8cpKiH", "F42k81lXXMO", "F8ZvmoAy2bh",
"fd5zuIbL3Qd", "fDN9KAuRv2o", "FdqK3U8rDRX", "fG2ws21A6Lj", "fgDQSAYp5pj",
"FGjbxwib4q5", "FgLXwaIGGbn", "FiqXUXkRHXr", "fiuesJ8f3xw", "fJAqAOFzB2b",
"fJmQ6P38mHh", "fJy2O3xh1fV", "FjZuMxKuYvb", "FKe5fQHbu8l", "FKuw35vjqRz",
"FmAQ159jI3w", "FMGmKkEOmV4", "FmuzZuFFMzD", "FMX7RNQIwYu", "FNUYBvpbWaA",
"fnzDrz05g0T", "FO80di9Jxuk", "FOKfyVchS21", "fP0XmUTTfks", "fpCA3TMnMA3",
"FPkj0JvlmyK", "FPSoejJAWSU", "FqkwtkM7eXB", "FqlQZiGKxpr", "FThJa71HEEs",
"FVaQ3fSHtT5", "FvQrsd2gVeu", "fx7bCRgdYic", "FxrH3E1ge0f", "fYtsyMj84LY",
"G0EID1cpxEB", "g4jJZ1SNP4I", "g7AYmMzlRL5", "G7hnxrBDXd2", "GCQVHCnV25O",
"GcYMteoIkw9", "GDCM1IWa7Zh", "gdsUTJnwdzb", "Ge7oZ5R4iBk", "gEff10Pq35y",
"GFPi9bpW3sN", "ggMEnqgD9kD", "gKR0a28tTp5", "gKRGyOXbpzj", "glEuzcZNWIM",
"GlWdTuycHxs", "glyDmwEFzrr", "gmmjFqs7MFB", "GMWgNQ8JB1r", "gqFwQOY1wSE",
"gqNh2d7WJva", "grKa7EwswRX", "gsIY3JD3iHh", "GSWPAgMxhy2", "gsX0auFXP9m",
"Gtef53Qyxrj", "GTQqEhUUV1F", "guGv3PY445Z", "gUve5bZAut8", "gVZ58EQOH6K",
"GwXv8OX78AT", "GXIQmznIdQe", "GxIVLRDNmVF", "GziA2Vc0HX4", "h0RMK448nhs",
"H0vjaO76Wg8", "H1G7wWYemSm", "H3mOm6sbODE", "h4IQGhyYAQp", "H6LR8zRVQLW",
"hAoSAyLR3I6", "HB6ZBS6kyJ8", "HcKIEHFgpDb", "hCuRPOStRLU", "HdTW2XJg3IO",
"HdxFUpXFp2O", "hFwwNnFm1B8", "hHMHykeQBua", "HI3Z2eSmWYl", "hiRGzSqrLx5",
"hjeei4JLTiF", "HjwC2LDSWHK", "HlElMRh1t6W", "hlIZJlEsd7B", "hLwLFwQgUdb",
"HmIC1eI4aEQ", "HmuBn2Tdutx", "HN6AdgqShbf", "hoSu28MRYPv", "hq6x4qBOYsg",
"HQHoA9YKMAI", "hqvimuJJhKL", "hrpWiEmnynY", "hsLoXTDJDib", "htJFOM9EYmH",
"HU4RdTNlezp", "hWWRAoV26mI", "HXA0U1WlIhx", "hxckGietsww", "Hy4Uo9AjrnA",
"hy52ywnDIAM", "Hy5stTfQzCG", "HZd0k5dqZ9h", "hZV0CekLNni", "i0rzEGmhViY",
"i0UbyVCIMMY", "I21MUYJoVMy", "I2G30Bxw2BX", "I2tQnsS7wn6", "I3n104WlitM",
"i3UCGccuhCZ", "i4KTQ0RGK3T", "i5GWQwiObW1", "I5NWo4ucWB3", "I6v4GYaXpQC",
"i7xMMyJ6A6E", "IAvpgvgrG0f", "iBB477oQopG", "IBhZ0h4Ap4D", "IbltT4i4TK6",
"Icts0NC4qAd", "IesVnrPQeSZ", "IFINQSPg4YM", "IFTZCzzniHQ", "IFvY9G1PHAV",
"igDf6uUnTYe", "iHIs3hIFf0i", "IHWMvXnrYmQ", "Ii0xFlLHHXz", "iI2i5pPbl5B",
"Iiwy3Zv7iLb", "iJax0w1KHEN", "ijl4gbKzr3X", "IJwB2CRmy7D", "IKMMHGYtcDC",
"ikpa1wjF92j", "iL8UKqtpf9G", "ILiQ2JLmcLT", "ILJAF0UeEJj", "in5GYhicsOP",
"INcVgc44sm9", "ioVTytF5utn", "iPY8yPbKyA0", "IQIfv1gEqzC", "iqKq6QyUII5",
"iqopOI7y0N3", "ITafa9GjY9I", "ITzEvGOU2GR", "IuymlqNZCLI", "ivq1Bh0PvUd",
"iwrIeTg1XFz", "iWvqk82htTQ", "IxcUubx1fw5", "j2k93SJevE1", "j2X8kPMcchC",
"j6UnkDFKZc1", "j7218NqxjYe", "j8DdqpZn2qc", "j8FYrPT09Sd", "J9JOpPQB23Y",
"jaDbDaXw0Pc", "JcZ2R7KZzTq", "jdswhtT866l", "JE6sdkvuc9S", "JeSc2hThLHY",
"JEWdR4I9TIm", "jf0RxRXJQD0", "jFFOiUs7WoZ", "jhngb8KdYU1", "jiIV8o3C0qx",
"jJ1tYGFTuaR", "JJD60zjyHFp", "jKg6rpNATKH", "jlaaYySSxTv", "JlEPa3N6EgO",
"jlZ6LAYKEo9", "JMhFN7V0B1r", "JMr6AvPnW1M", "JnJtmnGCY95", "JnsP1SLvvsw",
"jOl9gZtASeV", "Jq4XG5c63t1", "JqfwjhLrHs7", "JrxejHLYDML", "JTNDUJAu3DA",
"jUtaZ7I8azt", "juWqrHQgdew", "jVb0CSg6sIR", "JVHpkK4exDw", "JVk9m9vVA1D",
"jWFefvuCwnA", "jXoQbHS18G7", "JYfu3Ld3AuN", "K2Lh8hkI6ST", "K3RIalye4fw",
"K3rIsFyLwv7", "k6fqIh47UYc", "K7re2lFVRfv", "K9HNTtT80IM", "kAQQIuh4eZr",
"KbEhvcWmvAf", "KBMxpwB6DCO", "KBybjbIp9VK", "kCdAI1b02G6", "KCPICjUZcE4",
"kCQMO6wkkV5", "KCtzRrOqmal", "kdDCRlEWqYr", "kdUL3XxL1bF", "kdXwwhZfS7V",
"kEeOSZheoND", "kEhPOqEXXk0", "kGE4jAoYn5L", "KHXn2gzpI0j", "KjMGcLd3XXd",
"kK6NYM3jZkd", "kKsL2QkNR4K", "kl6QWeL9RDW", "klThMLasoQV", "KmfuUMQ7T93",
"Kn9F1mXO0GV", "KNU8WQL2zSc", "KP6O1BkuoPX", "KPF6QKOADPR", "KpV6xl78isl",
"KqyKD3POUbS", "KQYxmgQNUSD", "KRQ61nuKa1b", "KtDVkM6bDeW", "ktTYjYLEW3v",
"kubDpNzUTG7", "KujnNfVcY2N", "kVJ0jf7P7Wf", "kWBZ1e0JH5h", "Kwts2m2rUUp",
"KxEa3dXzAYv", "kyGz0JzX3Z0", "kzHnYcum1wX", "L3iJ4hZ2ypn", "l7dBO27dhA6",
"l7RKRoGgmlq", "L7xlpOoRnWm", "LaH8j5yWJZ1", "lawU1EpVZVc", "LBEkbl9SzHf",
"lbvPWYrpTPw", "LcWVIO0Jsqj", "LDmpwdWKomn", "leQOMrPQiqf", "LFOfMnjCDvJ",
"lgEnN00o6mZ", "lGgWFnakeII", "LHie5mY8Uj8", "lIEtVHeJ086", "LiLYwGv2WWN",
"lJ41xkkb1jI", "LJFDVm4S9HF", "LJzqA45qmSZ", "llQAyMkWXID", "LmBKIXa2mSL",
"LmwBbNZehh2", "lnkTmWmupfH", "lPAr5SfstTF", "lpCdKHJgyDr", "lQfxQMSOVqP",
"lS1XvFsr6no", "lUDMkJxSxHL", "Lw70k8Wjzp4", "LXWKW1xwmoZ", "lYNYlzUvgos",
"LYZ27cymGw5", "LZ1OWhYhPiZ", "m4ue4ZOdIep", "m6E2SxuEKtc", "m7fmNp4WilZ",
"m8FGZ1tP0UE", "M8kI8XD6qF9", "Ma2YKDqULAr", "MA3CYGbUEaG", "MAk4KZRu1L9",
"MAtmMxsNpeZ", "mC01s0xdGEm", "MCE5Y33BYDN", "MCT0SGxhkuU", "MdmyzozNJ02",
"mDNJnXJ3Bap", "ME541MEplIz", "ME9FWjRMe4e", "mePQU0trYhJ", "MFT0CnzHbgk",
"MFy31o7euAb", "mfZwiJJpZcR", "MgptQftlksp", "mgUgOViogq7", "MI2vOsP8NSo",
"MjCkEceL336", "mJY0L6TiTId", "MkU5WMbgI4U", "mKYg307awDr", "MM5BhvP1qVK",
"MM5CMbf9hxl", "mnshKO7lVDt", "moicbsA41fH", "mOSub2ULY1O", "Mpi4Xzop4kw",
"mPQwmRVhsKK", "mpxTG4BSHvb", "mR9nchmQZXC", "mruhLKuBF86", "mVZB3R5M66F",
"MW1EtjyMl5d", "MXHQSQfyHl2", "My1mHzVMqV6", "Mynld4Vekod", "N1giIHXfzhb",
"N23VxXj21Wv", "N2gVM6xHjXX", "n33C6ztvpqu", "N3LQS3eat8p", "n46vbqoLchh",
"N4rlgJRGUs3", "n5H2FaL7kap", "N5PPLwwES0c", "N6CPQoLRnz6", "N8nfcWXZtit",
"NawPD8q2KC8", "nChFLgqqH0w", "NCqjtm01Y4E", "NdMiR2VVel6", "nfR5nCiNHMC",
"nfwoSSAiWjg", "nfWs6WgmRC2", "nG7qJqJR13Z", "NGHkoHvBwF0", "nH6JZBFhCXs",
"nhfdWznpsqJ", "nhnQpVPQ7zK", "nhsj9HCnhEs", "nHtTsUMZoVG", "nIhIdZmXLXS",
"NIsmtALRuS5", "nj2KML2oqvV", "NJKcpotvrAQ", "nkXtOreJnSJ", "NLBLC0uWFuB",
"nmdSUueCjti", "NP8pgYnty0q", "NQxDKw6jGTj", "NSZxDwLVCeC", "nUanptGavqT",
"Nv5WX50ktwr", "nvJQYEQIFFM", "nvXHNeXXvJ5", "nwbO0NqAg7S", "nWJFiQq1vDL",
"nx2J294i6hk", "nxgu0uT1tLT", "NxKCqlm0eTG", "NYEpdnELJ54", "nYIBsKHueFr",
"nYnOM20f4fb", "NZxaguajfAY", "O1U2KTQp7RW", "O2p0zdfIFmP", "o3nzTkLC1Pl",
"o3pKyi7ckFO", "o4gtcJidna5", "O4slz8eLLn6", "o79rSRM0UlM", "O7qGvpaAt2w",
"oByIGUGsrgx", "od9Sosf2Y0V", "oDTFc2FqImi", "OdyuvCVU9Hz", "oEFK7vjkTU0",
"oEXOZcbaHxA", "OgLIyzin181", "OHtxRBRAzYs", "oJNbeCd6bvb", "oJsgj7WMDkq",
"OLEt9ovMHrz", "OlkZe7ivV0p", "oN0anW8xCpq", "oNDzB1D5as4", "oNfV9ntBJ9u",
"oNttkuJFbwC", "ooElCfPc54o", "OpEVn6IiULE", "OQ3BQRswMx7", "oTB157EY3jY",
"otmVyzT3xRC", "oUWkMygGP2W", "owxf1XoQ3Lu", "oYgWYWUVt2h", "OYjhvD7DqIP",
"oZfnfo46pS4", "p1NV2hE2fCZ", "p25NocgpHkc", "P2eQdjxbuZo", "p3T3oB4tfNN",
"P3Uob5UKAoM", "p4hBFnI8WIp", "p5L7w9Tjay3", "p7C2DczQikw", "P8tFheT6TtS",
"P91Rf8wCj7Z", "p9J64kFu5Fd", "PDOfJJdpbob", "pdRTIO2JqPL", "PDWC7RxX4t9",
"pEAFBcOJIVF", "PEfq6d3TONP", "PeNS8yHqYH1", "pEvaEn24SR1", "pg9F69FU9fh",
"Pi6v7zcA26e", "PibIwh4xKHI", "PicYz4ZaEkF", "PIm96jtkVB5", "pIVjHCsQgJI",
"PJI3sARzQAG", "PK027w8aZ5K", "PKfz9RYfKzF", "pl8h1HdqpFW", "pl9IGnhmOJc",
"PlISiBPN3db", "pMiRPEvyleJ", "pMtEAU5iVTB", "PnB0GLiMdBm", "PPb3XMcCAf3",
"PSdLvfFlDRF", "pthlRKVLgNp", "PTZfXfOkUR1", "pWmPB9No5RJ", "PWXwPbUM2DB",
"pxPQCkuJZrl", "PxXh1I86blw", "Pz198xRjRHD", "q2UUKkPtvll", "q4hyZcb2pgA",
"q6ke2WlwbWr", "Q75pcfnDLwr", "Q86baYhZPOB", "q8fmqtJVDhh", "qBrBhSbFC0d",
"qc9eMgI8Y95", "QCY2lUMpt7f", "QDkCAOGVng6", "QdYKp8ivavV", "qeBFicifeNz",
"QeKGz2D6wNe", "qEt7nmwua6v", "QGJz6Rv3qHU", "Qgzh7S5pLc3", "qHaaYvuNGIB",
"qiBueINJbti", "qimfq5GL5mV", "qJsVouyMqE8", "qlnxDl1BOrw", "Qlt1DOyb7iP",
"qm0fcx7VGOQ", "QMT77ObrHQa", "QOyCdSRSUXL", "Qpj3LVa0kMf", "qQ84fCTxdGh",
"QRaKmOedEZx", "qs9EipoiiBD", "qsPQEZph59z", "QTFJClMfP8c", "QtJyTjN5faU",
"qU7z54bY9jA", "QvByLV2hsHo", "QVFUUfes7vc", "QvQ5bpVOJDj", "Qwzbgh4Flmx",
"qx2DdF2CKFL", "qXdueHJNqcv", "QxSfgx5QfT7", "qxuRrLWQmXL", "Qztk8cjmz1e",
"r0ehsy1jjxa", "r2w7bZu3FsL", "R3ac44RpwRG", "r4mXVpHUWC7", "r6p12UeHOyg",
"r9efDheFtk3", "rakWSnvNhWr", "rbBZoYFr4DM", "rBtlT7YCRKx", "RdbYAXOnm2S",
"RdM4hjZsFRg", "Re2M8SlCc98", "RfmkqgjDUPL", "rgAmPaAHmNU", "rGbQXTyOdmW",
"RHpQbDCZK5O", "rhxxSbYXZRR", "RiIZqF2hfqY", "rIR8cwAz0sf", "rJ3tipUjVQ4",
"rlAmYWNUTnR", "rLiYzJJRiBA", "rLOyzoOdZqC", "RMKAo2HcVkM", "rnGH1Q5IyIU",
"robJRJuEFfM", "RovRnV9RWFd", "rpmWXDmHjsq", "rPPdTvv1QoY", "RqLdtXwHdGO",
"rR1aDWav3z1", "RrjHJQJDQSr", "rrZEwHEjjy8", "rsM3sdDc3Lk", "RsmDQZSmpD7",
"RtK3aS9WP2H", "ru8BHTnYxI3", "RU8DlKBg48x", "rUysfjKrKqk", "Rv3o89GkqWH",
"rVC8KePJHu3", "RvCLp5qbvtz", "RvQqAbOcEfA", "RW617O0UjQJ", "RWvmueaioAl",
"RxADuUq1Ba1", "RxHTSbz8VN5", "RxND5KsxzvW", "RyRJf2UHJL1", "S1Rh4YnCAAZ",
"s28njgt1wYe", "s4eb8Spa5TC", "S6gaiIWGmh9", "S6X4d5WHA1H", "sAnH4cWV41G",
"SATZgjyfpdZ", "sAyk7hwXEbV", "sBu9GwU5IKe", "SdlDgZMNxqX", "SegMIAP4dhw",
"SfB5NwJXaot", "SfPGp94cYZa", "SG0QMcMgRRq", "sG2EfH7UYLQ", "SgK14sd0Fq1",
"sgNOxONNZIv", "sGXcrRdwzAk", "shkTq2LdpXw", "si6qmHhCV9F", "skR6XpFhu3u",
"skuXY545bae", "skVM9VC2v6H", "sLkylFDaonQ", "sLQ3GDMCRSz", "sMVuTESYbpd",
"soMCF3RbHqt", "sQhxc449PV4", "sRbFOoSk7qZ", "srTptJGYtcK", "SSS1hmwqHOR",
"StSjQheznIv", "SvLVieXqQT7", "SVR6pSBhbCb", "sWlH85siDIT", "SWTCBn32M8D",
"sYBdL54a73r", "t0V5NCdjdPi", "T15MpYA7f51", "t3snPDHuVBW", "T5LdflE3Peq",
"T6RUeMH9KP0", "T6VbSgxjG4o", "t9Fl7c8SJbm", "TafeAKXESCA", "TBMPJiR0PKA",
"tcjz9dmJW4y", "tDDh1EjIZkh", "TE62MxBLgne", "TE7dhvcKVwp", "tEiDKptkacd",
"tEr481bYdow", "tfEtbnUgkGv", "TgpNd1eUCH5", "tGV21Z1HgXN", "thQZhxRh887",
"TJp862VOKlS", "TK7P7QXIDOA", "TKb3FP8mXY0", "TL5cvVAN3cA", "TM31sX4CThP",
"tMpwPcDzIfU", "tNf8m963xKK", "tnR9XvFJ5d7", "tNu7AdZ5358", "tOEYJ1EgIkn",
"TqSXqCuyodR", "tRgUTgCKu4J", "troIuBzxemz", "TSQWaAvOer5", "TsSlV9eE7Mz",
"ttKnsfno2BN", "tvoTu4cpYbh", "TWJPFfCeHES", "twyDPmlDNjH", "TyjDUvHkCAx",
"TYYPCGssY7i", "tz00ETYw78Y", "TZ307ap3HvE", "TzPwGs1AcCL", "TZxEGcWjbdk",
"u0ezFwC4OLL", "U3DjjRVyEun", "u45lZujojLF", "U6Mo4GsQKwT", "U7jt55boMwC",
"U8feQBluEhj", "UBe2SLdSmxV", "uBjjsyieqtr", "UccWk7OAtZ2", "uDXFpf8Ko6P",
"uE4KejhmDyk", "uGfkThgxZsI", "Uih0KGtvZeo", "UIyI4hkq7Bx", "UjoXPWJKPXb",
"uKFFT93nPmp", "UKSoohp2vBC", "UL70316n0C2", "UlD5QNXAW40", "uLDFnAy4ro0",
"UNxoCz1KXnW", "uOmh6keHjf6", "uormVxMEerw", "Upe0kYdbeUy", "UPSbASHNQmU",
"UQ1K5VqXqcZ", "uQvg5rWo87I", "usFB6MgBB6t", "uTeZmtXQzSN", "utgv86YyClH",
"UTmdWR44H5x", "uUmAJIXkmsO", "UUsAfkqIPhV", "Uv6Baj6YaG1", "UV9ZR51T6Ts",
"UvVxiC7b1jZ", "UW4ZNlm05Jq", "UxEq7311Xzd", "UXhcOzwv9o5", "UXSSmcXoWR8",
"v15yxuZyGjR", "V1MbBFGqwbB", "V5LD5oYeZys", "v6BprVsEEt2", "V7Hl62C5Wgz",
"Vah8YYh5HI5", "vbDOTEMQjfW", "vBjsjEqsmWL", "vBym1l507tA", "vf1kkxsjkB1",
"vFSbE4W5Kg6", "VfZPt9kXxL9", "vGLQ19KWuBv", "VHK1T5sygmw", "VLuN2iZ9oZp",
"VmwVU8HFDBn", "vnaUuR9C4FH", "vniKeY4S1Ru", "vOu023c0Snx", "vOuGO9bkEUa",
"vrQvRBzXiLv", "vRRoviRJVgX", "VS1mxlo1mVx", "VsFXXXagVmp", "VSHfWQyhzUu",
"vugElbQMtcL", "vvaX4oKLyKo", "vw87QIZ7dhk", "VWLVmvtDCSI", "vxXQe9jxSPE",
"vy0hyVTrTom", "Vy1JFQbsNBB", "vzGc2nPWraO", "vzVRv2jtJxL", "w0aCC4wNNzW",
"W1wtZLbWuY0", "w2yXiR4CyWt", "w539HzekPQh", "w55gRgLikEN", "WBhss2tvLa8",
"WcPEy9epMgd", "WCSGolF5yhy", "wdcS5ORWZte", "WDyq0ryAjpn", "webeuXrveDi",
"WeSJR8GDPmC", "WFApCUf18Lp", "wfFCmvMEGOQ", "WFiPvuGJf9O", "WggRnJplCQI",
"wgqFTVU7Iky", "wIMmZwl1gpX", "WjCGPzMzLVr", "WJfiDULf7ZC", "wkl1yyAzga3",
"wlspYUyDoQM", "wm060hpEM7g", "wMPB6u0GZDL", "Wn07Tbv74qp", "wNha3idA7l6",
"WnZVpXq5XCO", "wOe4JHkqbUm", "Wog7gclb7TJ", "wq4bmXnJK45", "Wq4O1nlYk1C",
"wqUwUpMD2mJ", "wrGYa8E94Yc", "WSAfRmiEJOF", "wSP90pEfCng", "wSW662GVwZP",
"wtoXU3G9YIy", "WtPSqPwjH2f", "wtV2TtEPCCZ", "Wtw2jbyaHz2", "WUChzooYWJ1",
"WUFgPdTN02g", "wUQiuRjZxiO", "Ww9Rq2KLlqV", "WWabB2sc4B7", "wxKEHpSLvib",
"wXnoTA2MDy9", "WYk4A1fVYD7", "WYMXHupBG7P", "wzD83xmvR3b", "WzemydwRD0R",
"X4ZVDdDd2xa", "X6efCWparbb", "X6uv3PName4", "X7deWPhTiIy", "X8TsrtMQFiu",
"X8UmaBiq1yy", "xbJCVaOZWp5", "XbjRzgMPN24", "XbubJh2yjOw", "XcqBCAaLcq5",
"xd8LIlN7N8h", "XdKVljaiZ9j", "xeEUMp35d5m", "XeUDpg1CTKf", "xf9Q4yYDlq5",
"XFEHZnnEGkT", "xFO9GKAXi1n", "xfxtwRZ7Ejp", "xhOpIbHQy8I", "XjBkSXvZLOZ",
"xjfIPJ04cET", "XLt8l1uPicg", "xlYle4v5GZ8", "xmJNiAbmSfe", "XnkRi1jTMKr",
"XPhxWI0fDyq", "XqDQsrhQ7W5", "Xsd3yzbnFOf", "XTF6vymtG8J", "xuovzIjWZUG",
"Xv1I8z1cK76", "XvVmyn071HT", "XxBMueAFsnk", "xxVZKlzMYJJ", "xyr4dO4G3tW",
"y4rr2PbfufS", "yaa2uBLsdRa", "YBG39jGSV17", "yDcnCB4aZEX", "YDuoFIKpONe",
"YdWxRCaQR2D", "yfgSogitBGX", "YFi06xiFHWs", "YFi2V7qfmJf", "yfpM2zJ3Zuc",
"ygTl7hih5qi", "YGtrgJxKWiU", "yIcfnuZhejK", "YIxt0WtezdT", "yJ014QFEqru",
"yJO8QTnBF3o", "yKfdWuLsdDx", "ylMgcLnwgce", "YNy9ymD2A8p", "yONz8gph9A7",
"YowwYq8CIXJ", "YPsxC0bl7T2", "YQP6diqjJAl", "YqR6LoSk2Ed", "yqwh11CvYXU",
"YRemZ3p9bFA", "ySxRSgTOeqD", "yTvx2IJ0w0z", "ytwga9hKjVj", "YtyO06HBaVr",
"YvEkkZlNeCK", "yVFdJkYsLK5", "yvoQHXHGvbT", "YVT9zsaVBzp", "YWbmL6VK8R6",
"Ywm8eA9tZHe", "yXady1QV27H", "yY7MHufA6C9", "yYG52aLO1GK", "yYgG4h097xR",
"YyhPAO5yx22", "Yz5yhyHf7Ul", "z2cGjpx37Mw", "Z42m6cWsI9m", "z4DptoHrJnb",
"z4kLOdnL1Op", "z5tZes2s49Z", "z5WklS85YjT", "z6bId6qlNk4", "Z6ZZLw50mAM",
"z8MwD6T43n2", "z8UkGdr2xNs", "Z90jET09ZrD", "zaeb1Zos2Mu", "ZBkpY2KdibX",
"Zc0BcScQDBU", "zCjn57zZQVN", "ZcrdEBruDka", "ZCT4YbaBFUb", "ZdVIx83rdI7",
"zEQXA689E4a", "ZfjQmCjVKRF", "zfutn6ulVcO", "zFzYdXMnPoP", "zG4JqtM8wHO",
"ZGyAErBl5PS", "ZifoCg4OvIj", "ZJ6MAab9PJE", "ZKVzRmYkKzQ", "zlG1VmpE6QQ",
"zN6xXPgmzqK", "zOfDRrZmbQO", "zOGa9wLHDFE", "zQmuipEUYbz", "zR7UekDUG3X",
"zrs6iFpEtF1", "ZrUjQFzR1gM", "zTnxsAMqHRP", "Zu7gpmcwfqY", "zvOkAI9ewwE",
"zvv07VAowTS", "ZWAdop7zYgJ", "ZWAEE8DrywN", "zxIlF5RwQFi", "ZXONCt7P01p"
), class = "factor"), Time = c(1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L,
4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L,
6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L,
1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L,
2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L,
3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L,
4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L,
6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L,
1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L,
2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L),
    Count1 = c(8L, 16L, 16L, 16L, 8L, 12L, 24L, 24L, 24L, 12L,
    8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L,
    16L, 8L, 8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L, 12L,
    24L, 24L, 24L, 12L, 8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L,
    16L, 8L, 12L, 24L, 24L, 24L, 12L, 8L, 16L, 16L, 16L, 8L,
    12L, 24L, 24L, 24L, 12L, 8L, 16L, 16L, 16L, 8L, 8L, 16L,
    16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L,
    8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L,
    16L, 8L, 8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L, 8L,
    16L, 16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L, 16L,
    8L, 8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L, 8L, 16L,
    16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L,
    8L), Total1 = c(64L, 64L, 64L, 64L, 64L, 96L, 96L, 96L, 96L,
    96L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L,
    64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L,
    64L, 64L, 96L, 96L, 96L, 96L, 96L, 64L, 64L, 64L, 64L, 64L,
    64L, 64L, 64L, 64L, 64L, 96L, 96L, 96L, 96L, 96L, 64L, 64L,
    64L, 64L, 64L, 96L, 96L, 96L, 96L, 96L, 64L, 64L, 64L, 64L,
    64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L,
    64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L,
    64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L,
    64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L,
    64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L,
    64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L,
    64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L), Count2 = c(4L,
    8L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 3L, 7L, 8L, 8L, 4L, 4L,
    8L, 8L, 8L, 4L, 3L, 8L, 8L, 8L, 4L, 3L, 7L, 8L, 8L, 4L, 2L,
    4L, 4L, 4L, 2L, 3L, 5L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 4L,
    8L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 3L, 6L, 8L, 8L, 4L, 4L,
    8L, 8L, 8L, 4L, 3L, 4L, 6L, 6L, 2L, 2L, 4L, 4L, 4L, 2L, 4L,
    8L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 4L,
    8L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 4L,
    8L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 4L,
    8L, 8L, 8L, 4L, 3L, 8L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 3L,
    8L, 8L, 8L, 4L, 3L, 5L, 7L, 8L, 3L, 4L, 8L, 8L, 8L, 4L, 4L
    ), Total2 = c(34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L,
    34L, 32L, 32L, 32L, 32L, 32L, 34L, 34L, 34L, 34L, 34L, 33L,
    33L, 33L, 33L, 33L, 32L, 32L, 32L, 32L, 32L, 16L, 16L, 16L,
    16L, 16L, 30L, 30L, 30L, 30L, 30L, 34L, 34L, 34L, 34L, 34L,
    34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 31L, 31L,
    31L, 31L, 31L, 34L, 34L, 34L, 34L, 34L, 22L, 22L, 22L, 22L,
    22L, 16L, 16L, 16L, 16L, 16L, 34L, 34L, 34L, 34L, 34L, 34L,
    34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L,
    34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L,
    34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L,
    34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 33L, 33L, 33L, 33L,
    33L, 34L, 34L, 34L, 34L, 34L, 33L, 33L, 33L, 33L, 33L, 28L,
    28L, 28L, 28L, 28L, 34L, 34L, 34L, 34L, 34L, 34L)), row.names = c(1L,
2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L,
16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L,
29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L,
42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L,
55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L,
68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 1041L, 1042L, 1043L,
1044L, 1045L, 1046L, 1047L, 1048L, 1049L, 1050L, 1051L, 1052L,
1053L, 1054L, 1055L, 1056L, 1057L, 1058L, 1059L, 1060L, 1061L,
1062L, 1063L, 1064L, 1065L, 1066L, 1067L, 1068L, 1069L, 1070L,
1071L, 1072L, 1073L, 1074L, 1075L, 1076L, 1077L, 1078L, 1079L,
1080L, 1081L, 1082L, 1083L, 1084L, 1085L, 1086L, 1087L, 1088L,
1089L, 1090L, 1091L, 1092L, 1093L, 1094L, 1095L, 1096L, 1097L,
1098L, 1099L, 1100L, 1101L, 1102L, 1103L, 1104L, 1105L, 1106L,
1107L, 1108L, 1109L, 1110L, 1111L, 1112L, 1113L, 1114L, 1115L,
1116L), class = "data.frame")
```

答:
An option is to group by 'Class', 'Site', paste (str_c) the columns except 'Time' to a single string, then grouped by 'Class', 'Count1', ..., 'Total2', columns, get the group indices to create the 'ind' column and do a left_join with original dataset

```<code>library(dplyr)
library(stringr)
df %>%
    group_by(Class, Site) %>%
    summarise_at(vars(-Time), str_c, collapse="") %>%
    group_by(Class, Count1, Total1, Count2, Total2) %>%
    mutate(ind = group_indices()) %>%
    ungroup %>%
    select(Class, Site, ind) %>%
    left_join(df)
</code>```

Or a similar logic with data.table

```<code>library(data.table)
setDT(df)[df[, lapply(.SD, paste, collapse=""),
   .(Class, Site), .SDcols = patterns('Count|Total')][,
     ind := .GRP, by = c('Class', 'Count1', 'Total1', 'Count2', 'Total2')
           ][, .(Class, Site, ind)], on = .(Class, Site)]
</code>```

Body:
so I have data about Sites, nested in Class.  In each Site there is a Time (timepoint) variable.  The data of interest is Count1, Total1, Count2, Total2.

I know there are whole duplicate sets within Class, across Sites for the values of Count1, Total1, Count2, Total2 for Time.

Here's what I mean - Let's say we have Class 1, with the first Site:

Class  Site           Time  Count1 Total1  Count2 Total2
1      a0QjvO281o1    1      8     64      4     34
1      a0QjvO281o1    2     16     64      8     34
1      a0QjvO281o1    3     16     64      8     34
1      a0QjvO281o1    4     16     64      8     34
1      a0QjvO281o1    6      8     64      4     34

And, I've noticed there are several other Sites with this EXACT pattern (or other repeated patterns).

Class  Site           Time  Count1 Total1  Count2 Total2
1      zlG1VmpE6QQ    1      8     64      4     34
1      zlG1VmpE6QQ    2     16     64      8     34
1      zlG1VmpE6QQ    3     16     64      8     34
1      zlG1VmpE6QQ    4     16     64      8     34
1      zlG1VmpE6QQ    6      8     64      4     34

I want to identify within Class how many Sites have the same pattern.  Either marking them or reducing the data sets to the first unique site pattern, but I would like to be able to say how many Sites fit each found pattern.

So, here's the partial data:

    df <-
structure(list(Class = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), Site = structure(c(3L,
3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 6L, 6L, 6L, 6L, 6L, 9L, 9L,
9L, 9L, 9L, 17L, 17L, 17L, 17L, 17L, 19L, 19L, 19L, 19L, 19L,
30L, 30L, 30L, 30L, 30L, 49L, 49L, 49L, 49L, 49L, 54L, 54L, 54L,
54L, 54L, 56L, 56L, 56L, 56L, 56L, 62L, 62L, 62L, 62L, 62L, 66L,
66L, 66L, 66L, 66L, 86L, 86L, 86L, 86L, 86L, 88L, 88L, 88L, 88L,
88L, 98L, 98L, 98L, 98L, 98L, 33L, 33L, 33L, 33L, 33L, 128L,
128L, 128L, 128L, 128L, 141L, 141L, 141L, 141L, 141L, 153L, 153L,
153L, 153L, 153L, 154L, 154L, 154L, 154L, 154L, 274L, 274L, 274L,
274L, 274L, 291L, 291L, 291L, 291L, 291L, 306L, 306L, 306L, 306L,
306L, 309L, 309L, 309L, 309L, 309L, 336L, 336L, 336L, 336L, 336L,
342L, 342L, 342L, 342L, 342L, 396L, 396L, 396L, 396L, 396L, 413L,
413L, 413L, 413L, 413L, 418L, 418L, 418L, 418L, 418L, 435L, 435L,
435L, 435L, 435L, 451L), .Label = c("~", "A0e3A15Lh1d", "a0QjvO281o1",
"A0R2gEqRbTv", "A4J3Jp6KNz2", "A757EHpLOya", "A8kkDgEvEZV", "ab5F7MfRxZW",
"AcjfpLUXjwt", "admxsO3fTtq", "aEBm7REs6XS", "AEZgWxwdbd9", "AezXCsZxd2U",
"AFjm1YmnfyO", "AFTwI0xBM6e", "aGw7PyLMEkl", "aHNXoYj7uNJ", "AibLRYCSE4P",
"aitNX6Qxkon", "ajEqsuhE9fV", "aJFDh98Iahb", "AKG4BvCUVsF", "AMtGkXGugJb",
"aNczAtKAJsv", "aoY0wrz6qBF", "aOz3ikxG7qM", "aPWuF0rDfuJ", "aQrGXlhzEJB",
"ARu0wnYDkam", "As7tGowP84e", "AsqolR3dfgv", "atj39UeK8N9", "atmjKVCRnzw",
"aUhP7zZ7LPU", "aUMEQzUKI0K", "AuP8NAgS7Th", "aUyy9i4fwhS", "AVFW2vlGxds",
"awoAlwC06Go", "awxCmxmeea2", "AWYFb5fwcYb", "Ax2Q16uPW55", "AXO6R085bth",
"Ay6W05BTgDV", "aZMeFIlkevS", "B08adcYOEl7", "b5MVFPi1inY", "B7fffQm5omx",
"ba3kFfcKXNk", "bCK7hWM4bnK", "BDlYKSCaOIG", "BE3TZDysXuQ", "bErpy9bSZAV",
"Beu6pmpSDJE", "BgfNJiJlDrF", "bGUeQEEpq7q", "bgWDDBsRLIL", "bHwo17fsILI",
"bifefa8JnfN", "bIQ3gsw51RH", "bisxDvmwluW", "biy6fHoOcZp", "bK7yQP8LNkJ",
"Bke0tWeJyBr", "bKMNhuIYaYW", "blkWvfFDVm6", "bnaDFC8EVAo", "BNDeQ6sJctI",
"Bokks2ESodd", "BoKlS77F7Il", "BqLRDDu69ic", "bqoZAzbsajz", "BRlA0HkkMGM",
"bT501IhkxV9", "BTliRZoJs4i", "bTTf1R7zgRn", "bTZAPQPXgI5", "BUtglXWCjkf",
"BvcJEyVWsGG", "bVHpRZguCL2", "BVymUZcbCuf", "BwkVolONMBn", "bWtq9NnOoCU",
"c2YR2oDyx7t", "c3dhvyZuPum", "c3LYcysugey", "c46Q9ExLocA", "C52gwcl9fmp",
"c5IYnQ3M7dj", "c6yCKEAemfr", "C8uv1qapHmC", "Ca2rjTu7g6A", "cAsHVMiIVHT",
"cB7mNM1MNm0", "Cbboq0XBHn1", "cbUfMWJl9sK", "ccixNtjWLkf", "ccL7Esacksn",
"CgmvbI2pkyK", "cGvhZR5kDxQ", "chFA8wLA953", "cIb00kbYPgm", "cjoj6MxgfxE",
"cJrxpXipqCm", "cMR1ECoHpE4", "CmRKRa25mZu", "cnCuI3VeJKt", "cNUlz8NllVu",
"CoySgwRgeRE", "CpZyeEzz39h", "CqIH5ytvqTS", "cRbK3weaIO6", "cs2MtDT1y17",
"CSVVXoe0xGC", "ctEZrxoEucg", "CxCDdfOd0Nj", "cXzO64qne5O", "CZq12nSSyn9",
"CzTmTRr0krx", "d3F3FBUFtWi", "d3f8P40FxnS", "d3thFMLEOGr", "d3UA2wZLHlM",
"D3wXzwwrBE7", "D4Bb0bZE5eK", "D5BprGY8EIU", "D5F054OKtW4", "D9nOWZAX3yT",
"DAcTRfO0CNG", "DbjU3iBZtGx", "Dd4sp3zIfSJ", "DDC8Dws74Zz", "DEFzmar1QtJ",
"dEoQWkLavTj", "deVhoPko4Bh", "DFBDO1gXQwf", "DfdvXXyNSoV", "dGCqYO3Zi6p",
"DGDkUV76OgX", "Dgt3VcFh8rl", "DHdEugYqcEI", "Dhku9zrZoJe", "dHokR5oLiIl",
"DhPZWGceA1Q", "DiKXevYOYNB", "DJIgnE1QQbB", "dkR7YOB6UT6", "dKy3aHycCap",
"dl9g8UYxk20", "DLmEBtWqO9S", "DLza3NSQYUI", "dmUHnTHgfYg", "dnRXJOdEzdw",
"doRK8OhG0kd", "DQaEryfraV6", "dQk8ubXxXLX", "dQOwWKXxFeq", "DrHlSXIHalR",
"DrLeENdZwxX", "DRUaAOrybxb", "dSJcUkmJWvZ", "dSuHNzaRaSf", "dtDftsTowRA",
"DVF2BNdSzV9", "DW7NajJs9ry", "dw94DZyrpUZ", "Dxa8RiDlXB6", "dXBB3LIqhd8",
"dY1ATXbywBu", "DY3V0E6pUYD", "dYIdx3HoWbL", "DZMyvdZEDeB", "dZrjKdqCi1w",
"e2cMNKCnHOw", "E2g3H9rUdML", "e59NHDOFTWC", "E6KoR8hXk7P", "E6vLBntf9QE",
"E8PnLO9QRcE", "e9NQxtBNruk", "e9QjFd6fZ4I", "EAdX1JPb4Dm", "eCGBeD0uz0D",
"ECHaJeidpTR", "edLdPyMjbaz", "EefeXxr8yDS", "ef6tzAcpMeF", "eFB6BfJ2BTY",
"EjFYleP5G9K", "eLGdmsoRjWn", "ElmgbenqYn7", "EM5PauW0KWg", "EmhBF1JUw3i",
"enR40fiMtoo", "EpxhEmcMVXh", "EQpPsVwWvqz", "EQtHhnAYjJp", "erfgs35WGXU",
"eRNEYF9OfA8", "ERqjIjzKnNm", "EsdcJsyJTJG", "ESNgljw6VvC", "eSZjKIwHPYi",
"etyPfIkrlrM", "Eu1JrO8bBkB", "euFWewBZ5Xr", "EVaNkH5nz1s", "eXgA6Zfn6KQ",
"EXIi96SW1Bm", "eYPdhvwFirr", "eZ2NazTVbb6", "EzN8D82lOTp", "F03oK0VRgyk",
"f0WCSs2fwvv", "F3CHKWYM2Pb", "f3FoF8cpKiH", "F42k81lXXMO", "F8ZvmoAy2bh",
"fd5zuIbL3Qd", "fDN9KAuRv2o", "FdqK3U8rDRX", "fG2ws21A6Lj", "fgDQSAYp5pj",
"FGjbxwib4q5", "FgLXwaIGGbn", "FiqXUXkRHXr", "fiuesJ8f3xw", "fJAqAOFzB2b",
"fJmQ6P38mHh", "fJy2O3xh1fV", "FjZuMxKuYvb", "FKe5fQHbu8l", "FKuw35vjqRz",
"FmAQ159jI3w", "FMGmKkEOmV4", "FmuzZuFFMzD", "FMX7RNQIwYu", "FNUYBvpbWaA",
"fnzDrz05g0T", "FO80di9Jxuk", "FOKfyVchS21", "fP0XmUTTfks", "fpCA3TMnMA3",
"FPkj0JvlmyK", "FPSoejJAWSU", "FqkwtkM7eXB", "FqlQZiGKxpr", "FThJa71HEEs",
"FVaQ3fSHtT5", "FvQrsd2gVeu", "fx7bCRgdYic", "FxrH3E1ge0f", "fYtsyMj84LY",
"G0EID1cpxEB", "g4jJZ1SNP4I", "g7AYmMzlRL5", "G7hnxrBDXd2", "GCQVHCnV25O",
"GcYMteoIkw9", "GDCM1IWa7Zh", "gdsUTJnwdzb", "Ge7oZ5R4iBk", "gEff10Pq35y",
"GFPi9bpW3sN", "ggMEnqgD9kD", "gKR0a28tTp5", "gKRGyOXbpzj", "glEuzcZNWIM",
"GlWdTuycHxs", "glyDmwEFzrr", "gmmjFqs7MFB", "GMWgNQ8JB1r", "gqFwQOY1wSE",
"gqNh2d7WJva", "grKa7EwswRX", "gsIY3JD3iHh", "GSWPAgMxhy2", "gsX0auFXP9m",
"Gtef53Qyxrj", "GTQqEhUUV1F", "guGv3PY445Z", "gUve5bZAut8", "gVZ58EQOH6K",
"GwXv8OX78AT", "GXIQmznIdQe", "GxIVLRDNmVF", "GziA2Vc0HX4", "h0RMK448nhs",
"H0vjaO76Wg8", "H1G7wWYemSm", "H3mOm6sbODE", "h4IQGhyYAQp", "H6LR8zRVQLW",
"hAoSAyLR3I6", "HB6ZBS6kyJ8", "HcKIEHFgpDb", "hCuRPOStRLU", "HdTW2XJg3IO",
"HdxFUpXFp2O", "hFwwNnFm1B8", "hHMHykeQBua", "HI3Z2eSmWYl", "hiRGzSqrLx5",
"hjeei4JLTiF", "HjwC2LDSWHK", "HlElMRh1t6W", "hlIZJlEsd7B", "hLwLFwQgUdb",
"HmIC1eI4aEQ", "HmuBn2Tdutx", "HN6AdgqShbf", "hoSu28MRYPv", "hq6x4qBOYsg",
"HQHoA9YKMAI", "hqvimuJJhKL", "hrpWiEmnynY", "hsLoXTDJDib", "htJFOM9EYmH",
"HU4RdTNlezp", "hWWRAoV26mI", "HXA0U1WlIhx", "hxckGietsww", "Hy4Uo9AjrnA",
"hy52ywnDIAM", "Hy5stTfQzCG", "HZd0k5dqZ9h", "hZV0CekLNni", "i0rzEGmhViY",
"i0UbyVCIMMY", "I21MUYJoVMy", "I2G30Bxw2BX", "I2tQnsS7wn6", "I3n104WlitM",
"i3UCGccuhCZ", "i4KTQ0RGK3T", "i5GWQwiObW1", "I5NWo4ucWB3", "I6v4GYaXpQC",
"i7xMMyJ6A6E", "IAvpgvgrG0f", "iBB477oQopG", "IBhZ0h4Ap4D", "IbltT4i4TK6",
"Icts0NC4qAd", "IesVnrPQeSZ", "IFINQSPg4YM", "IFTZCzzniHQ", "IFvY9G1PHAV",
"igDf6uUnTYe", "iHIs3hIFf0i", "IHWMvXnrYmQ", "Ii0xFlLHHXz", "iI2i5pPbl5B",
"Iiwy3Zv7iLb", "iJax0w1KHEN", "ijl4gbKzr3X", "IJwB2CRmy7D", "IKMMHGYtcDC",
"ikpa1wjF92j", "iL8UKqtpf9G", "ILiQ2JLmcLT", "ILJAF0UeEJj", "in5GYhicsOP",
"INcVgc44sm9", "ioVTytF5utn", "iPY8yPbKyA0", "IQIfv1gEqzC", "iqKq6QyUII5",
"iqopOI7y0N3", "ITafa9GjY9I", "ITzEvGOU2GR", "IuymlqNZCLI", "ivq1Bh0PvUd",
"iwrIeTg1XFz", "iWvqk82htTQ", "IxcUubx1fw5", "j2k93SJevE1", "j2X8kPMcchC",
"j6UnkDFKZc1", "j7218NqxjYe", "j8DdqpZn2qc", "j8FYrPT09Sd", "J9JOpPQB23Y",
"jaDbDaXw0Pc", "JcZ2R7KZzTq", "jdswhtT866l", "JE6sdkvuc9S", "JeSc2hThLHY",
"JEWdR4I9TIm", "jf0RxRXJQD0", "jFFOiUs7WoZ", "jhngb8KdYU1", "jiIV8o3C0qx",
"jJ1tYGFTuaR", "JJD60zjyHFp", "jKg6rpNATKH", "jlaaYySSxTv", "JlEPa3N6EgO",
"jlZ6LAYKEo9", "JMhFN7V0B1r", "JMr6AvPnW1M", "JnJtmnGCY95", "JnsP1SLvvsw",
"jOl9gZtASeV", "Jq4XG5c63t1", "JqfwjhLrHs7", "JrxejHLYDML", "JTNDUJAu3DA",
"jUtaZ7I8azt", "juWqrHQgdew", "jVb0CSg6sIR", "JVHpkK4exDw", "JVk9m9vVA1D",
"jWFefvuCwnA", "jXoQbHS18G7", "JYfu3Ld3AuN", "K2Lh8hkI6ST", "K3RIalye4fw",
"K3rIsFyLwv7", "k6fqIh47UYc", "K7re2lFVRfv", "K9HNTtT80IM", "kAQQIuh4eZr",
"KbEhvcWmvAf", "KBMxpwB6DCO", "KBybjbIp9VK", "kCdAI1b02G6", "KCPICjUZcE4",
"kCQMO6wkkV5", "KCtzRrOqmal", "kdDCRlEWqYr", "kdUL3XxL1bF", "kdXwwhZfS7V",
"kEeOSZheoND", "kEhPOqEXXk0", "kGE4jAoYn5L", "KHXn2gzpI0j", "KjMGcLd3XXd",
"kK6NYM3jZkd", "kKsL2QkNR4K", "kl6QWeL9RDW", "klThMLasoQV", "KmfuUMQ7T93",
"Kn9F1mXO0GV", "KNU8WQL2zSc", "KP6O1BkuoPX", "KPF6QKOADPR", "KpV6xl78isl",
"KqyKD3POUbS", "KQYxmgQNUSD", "KRQ61nuKa1b", "KtDVkM6bDeW", "ktTYjYLEW3v",
"kubDpNzUTG7", "KujnNfVcY2N", "kVJ0jf7P7Wf", "kWBZ1e0JH5h", "Kwts2m2rUUp",
"KxEa3dXzAYv", "kyGz0JzX3Z0", "kzHnYcum1wX", "L3iJ4hZ2ypn", "l7dBO27dhA6",
"l7RKRoGgmlq", "L7xlpOoRnWm", "LaH8j5yWJZ1", "lawU1EpVZVc", "LBEkbl9SzHf",
"lbvPWYrpTPw", "LcWVIO0Jsqj", "LDmpwdWKomn", "leQOMrPQiqf", "LFOfMnjCDvJ",
"lgEnN00o6mZ", "lGgWFnakeII", "LHie5mY8Uj8", "lIEtVHeJ086", "LiLYwGv2WWN",
"lJ41xkkb1jI", "LJFDVm4S9HF", "LJzqA45qmSZ", "llQAyMkWXID", "LmBKIXa2mSL",
"LmwBbNZehh2", "lnkTmWmupfH", "lPAr5SfstTF", "lpCdKHJgyDr", "lQfxQMSOVqP",
"lS1XvFsr6no", "lUDMkJxSxHL", "Lw70k8Wjzp4", "LXWKW1xwmoZ", "lYNYlzUvgos",
"LYZ27cymGw5", "LZ1OWhYhPiZ", "m4ue4ZOdIep", "m6E2SxuEKtc", "m7fmNp4WilZ",
"m8FGZ1tP0UE", "M8kI8XD6qF9", "Ma2YKDqULAr", "MA3CYGbUEaG", "MAk4KZRu1L9",
"MAtmMxsNpeZ", "mC01s0xdGEm", "MCE5Y33BYDN", "MCT0SGxhkuU", "MdmyzozNJ02",
"mDNJnXJ3Bap", "ME541MEplIz", "ME9FWjRMe4e", "mePQU0trYhJ", "MFT0CnzHbgk",
"MFy31o7euAb", "mfZwiJJpZcR", "MgptQftlksp", "mgUgOViogq7", "MI2vOsP8NSo",
"MjCkEceL336", "mJY0L6TiTId", "MkU5WMbgI4U", "mKYg307awDr", "MM5BhvP1qVK",
"MM5CMbf9hxl", "mnshKO7lVDt", "moicbsA41fH", "mOSub2ULY1O", "Mpi4Xzop4kw",
"mPQwmRVhsKK", "mpxTG4BSHvb", "mR9nchmQZXC", "mruhLKuBF86", "mVZB3R5M66F",
"MW1EtjyMl5d", "MXHQSQfyHl2", "My1mHzVMqV6", "Mynld4Vekod", "N1giIHXfzhb",
"N23VxXj21Wv", "N2gVM6xHjXX", "n33C6ztvpqu", "N3LQS3eat8p", "n46vbqoLchh",
"N4rlgJRGUs3", "n5H2FaL7kap", "N5PPLwwES0c", "N6CPQoLRnz6", "N8nfcWXZtit",
"NawPD8q2KC8", "nChFLgqqH0w", "NCqjtm01Y4E", "NdMiR2VVel6", "nfR5nCiNHMC",
"nfwoSSAiWjg", "nfWs6WgmRC2", "nG7qJqJR13Z", "NGHkoHvBwF0", "nH6JZBFhCXs",
"nhfdWznpsqJ", "nhnQpVPQ7zK", "nhsj9HCnhEs", "nHtTsUMZoVG", "nIhIdZmXLXS",
"NIsmtALRuS5", "nj2KML2oqvV", "NJKcpotvrAQ", "nkXtOreJnSJ", "NLBLC0uWFuB",
"nmdSUueCjti", "NP8pgYnty0q", "NQxDKw6jGTj", "NSZxDwLVCeC", "nUanptGavqT",
"Nv5WX50ktwr", "nvJQYEQIFFM", "nvXHNeXXvJ5", "nwbO0NqAg7S", "nWJFiQq1vDL",
"nx2J294i6hk", "nxgu0uT1tLT", "NxKCqlm0eTG", "NYEpdnELJ54", "nYIBsKHueFr",
"nYnOM20f4fb", "NZxaguajfAY", "O1U2KTQp7RW", "O2p0zdfIFmP", "o3nzTkLC1Pl",
"o3pKyi7ckFO", "o4gtcJidna5", "O4slz8eLLn6", "o79rSRM0UlM", "O7qGvpaAt2w",
"oByIGUGsrgx", "od9Sosf2Y0V", "oDTFc2FqImi", "OdyuvCVU9Hz", "oEFK7vjkTU0",
"oEXOZcbaHxA", "OgLIyzin181", "OHtxRBRAzYs", "oJNbeCd6bvb", "oJsgj7WMDkq",
"OLEt9ovMHrz", "OlkZe7ivV0p", "oN0anW8xCpq", "oNDzB1D5as4", "oNfV9ntBJ9u",
"oNttkuJFbwC", "ooElCfPc54o", "OpEVn6IiULE", "OQ3BQRswMx7", "oTB157EY3jY",
"otmVyzT3xRC", "oUWkMygGP2W", "owxf1XoQ3Lu", "oYgWYWUVt2h", "OYjhvD7DqIP",
"oZfnfo46pS4", "p1NV2hE2fCZ", "p25NocgpHkc", "P2eQdjxbuZo", "p3T3oB4tfNN",
"P3Uob5UKAoM", "p4hBFnI8WIp", "p5L7w9Tjay3", "p7C2DczQikw", "P8tFheT6TtS",
"P91Rf8wCj7Z", "p9J64kFu5Fd", "PDOfJJdpbob", "pdRTIO2JqPL", "PDWC7RxX4t9",
"pEAFBcOJIVF", "PEfq6d3TONP", "PeNS8yHqYH1", "pEvaEn24SR1", "pg9F69FU9fh",
"Pi6v7zcA26e", "PibIwh4xKHI", "PicYz4ZaEkF", "PIm96jtkVB5", "pIVjHCsQgJI",
"PJI3sARzQAG", "PK027w8aZ5K", "PKfz9RYfKzF", "pl8h1HdqpFW", "pl9IGnhmOJc",
"PlISiBPN3db", "pMiRPEvyleJ", "pMtEAU5iVTB", "PnB0GLiMdBm", "PPb3XMcCAf3",
"PSdLvfFlDRF", "pthlRKVLgNp", "PTZfXfOkUR1", "pWmPB9No5RJ", "PWXwPbUM2DB",
"pxPQCkuJZrl", "PxXh1I86blw", "Pz198xRjRHD", "q2UUKkPtvll", "q4hyZcb2pgA",
"q6ke2WlwbWr", "Q75pcfnDLwr", "Q86baYhZPOB", "q8fmqtJVDhh", "qBrBhSbFC0d",
"qc9eMgI8Y95", "QCY2lUMpt7f", "QDkCAOGVng6", "QdYKp8ivavV", "qeBFicifeNz",
"QeKGz2D6wNe", "qEt7nmwua6v", "QGJz6Rv3qHU", "Qgzh7S5pLc3", "qHaaYvuNGIB",
"qiBueINJbti", "qimfq5GL5mV", "qJsVouyMqE8", "qlnxDl1BOrw", "Qlt1DOyb7iP",
"qm0fcx7VGOQ", "QMT77ObrHQa", "QOyCdSRSUXL", "Qpj3LVa0kMf", "qQ84fCTxdGh",
"QRaKmOedEZx", "qs9EipoiiBD", "qsPQEZph59z", "QTFJClMfP8c", "QtJyTjN5faU",
"qU7z54bY9jA", "QvByLV2hsHo", "QVFUUfes7vc", "QvQ5bpVOJDj", "Qwzbgh4Flmx",
"qx2DdF2CKFL", "qXdueHJNqcv", "QxSfgx5QfT7", "qxuRrLWQmXL", "Qztk8cjmz1e",
"r0ehsy1jjxa", "r2w7bZu3FsL", "R3ac44RpwRG", "r4mXVpHUWC7", "r6p12UeHOyg",
"r9efDheFtk3", "rakWSnvNhWr", "rbBZoYFr4DM", "rBtlT7YCRKx", "RdbYAXOnm2S",
"RdM4hjZsFRg", "Re2M8SlCc98", "RfmkqgjDUPL", "rgAmPaAHmNU", "rGbQXTyOdmW",
"RHpQbDCZK5O", "rhxxSbYXZRR", "RiIZqF2hfqY", "rIR8cwAz0sf", "rJ3tipUjVQ4",
"rlAmYWNUTnR", "rLiYzJJRiBA", "rLOyzoOdZqC", "RMKAo2HcVkM", "rnGH1Q5IyIU",
"robJRJuEFfM", "RovRnV9RWFd", "rpmWXDmHjsq", "rPPdTvv1QoY", "RqLdtXwHdGO",
"rR1aDWav3z1", "RrjHJQJDQSr", "rrZEwHEjjy8", "rsM3sdDc3Lk", "RsmDQZSmpD7",
"RtK3aS9WP2H", "ru8BHTnYxI3", "RU8DlKBg48x", "rUysfjKrKqk", "Rv3o89GkqWH",
"rVC8KePJHu3", "RvCLp5qbvtz", "RvQqAbOcEfA", "RW617O0UjQJ", "RWvmueaioAl",
"RxADuUq1Ba1", "RxHTSbz8VN5", "RxND5KsxzvW", "RyRJf2UHJL1", "S1Rh4YnCAAZ",
"s28njgt1wYe", "s4eb8Spa5TC", "S6gaiIWGmh9", "S6X4d5WHA1H", "sAnH4cWV41G",
"SATZgjyfpdZ", "sAyk7hwXEbV", "sBu9GwU5IKe", "SdlDgZMNxqX", "SegMIAP4dhw",
"SfB5NwJXaot", "SfPGp94cYZa", "SG0QMcMgRRq", "sG2EfH7UYLQ", "SgK14sd0Fq1",
"sgNOxONNZIv", "sGXcrRdwzAk", "shkTq2LdpXw", "si6qmHhCV9F", "skR6XpFhu3u",
"skuXY545bae", "skVM9VC2v6H", "sLkylFDaonQ", "sLQ3GDMCRSz", "sMVuTESYbpd",
"soMCF3RbHqt", "sQhxc449PV4", "sRbFOoSk7qZ", "srTptJGYtcK", "SSS1hmwqHOR",
"StSjQheznIv", "SvLVieXqQT7", "SVR6pSBhbCb", "sWlH85siDIT", "SWTCBn32M8D",
"sYBdL54a73r", "t0V5NCdjdPi", "T15MpYA7f51", "t3snPDHuVBW", "T5LdflE3Peq",
"T6RUeMH9KP0", "T6VbSgxjG4o", "t9Fl7c8SJbm", "TafeAKXESCA", "TBMPJiR0PKA",
"tcjz9dmJW4y", "tDDh1EjIZkh", "TE62MxBLgne", "TE7dhvcKVwp", "tEiDKptkacd",
"tEr481bYdow", "tfEtbnUgkGv", "TgpNd1eUCH5", "tGV21Z1HgXN", "thQZhxRh887",
"TJp862VOKlS", "TK7P7QXIDOA", "TKb3FP8mXY0", "TL5cvVAN3cA", "TM31sX4CThP",
"tMpwPcDzIfU", "tNf8m963xKK", "tnR9XvFJ5d7", "tNu7AdZ5358", "tOEYJ1EgIkn",
"TqSXqCuyodR", "tRgUTgCKu4J", "troIuBzxemz", "TSQWaAvOer5", "TsSlV9eE7Mz",
"ttKnsfno2BN", "tvoTu4cpYbh", "TWJPFfCeHES", "twyDPmlDNjH", "TyjDUvHkCAx",
"TYYPCGssY7i", "tz00ETYw78Y", "TZ307ap3HvE", "TzPwGs1AcCL", "TZxEGcWjbdk",
"u0ezFwC4OLL", "U3DjjRVyEun", "u45lZujojLF", "U6Mo4GsQKwT", "U7jt55boMwC",
"U8feQBluEhj", "UBe2SLdSmxV", "uBjjsyieqtr", "UccWk7OAtZ2", "uDXFpf8Ko6P",
"uE4KejhmDyk", "uGfkThgxZsI", "Uih0KGtvZeo", "UIyI4hkq7Bx", "UjoXPWJKPXb",
"uKFFT93nPmp", "UKSoohp2vBC", "UL70316n0C2", "UlD5QNXAW40", "uLDFnAy4ro0",
"UNxoCz1KXnW", "uOmh6keHjf6", "uormVxMEerw", "Upe0kYdbeUy", "UPSbASHNQmU",
"UQ1K5VqXqcZ", "uQvg5rWo87I", "usFB6MgBB6t", "uTeZmtXQzSN", "utgv86YyClH",
"UTmdWR44H5x", "uUmAJIXkmsO", "UUsAfkqIPhV", "Uv6Baj6YaG1", "UV9ZR51T6Ts",
"UvVxiC7b1jZ", "UW4ZNlm05Jq", "UxEq7311Xzd", "UXhcOzwv9o5", "UXSSmcXoWR8",
"v15yxuZyGjR", "V1MbBFGqwbB", "V5LD5oYeZys", "v6BprVsEEt2", "V7Hl62C5Wgz",
"Vah8YYh5HI5", "vbDOTEMQjfW", "vBjsjEqsmWL", "vBym1l507tA", "vf1kkxsjkB1",
"vFSbE4W5Kg6", "VfZPt9kXxL9", "vGLQ19KWuBv", "VHK1T5sygmw", "VLuN2iZ9oZp",
"VmwVU8HFDBn", "vnaUuR9C4FH", "vniKeY4S1Ru", "vOu023c0Snx", "vOuGO9bkEUa",
"vrQvRBzXiLv", "vRRoviRJVgX", "VS1mxlo1mVx", "VsFXXXagVmp", "VSHfWQyhzUu",
"vugElbQMtcL", "vvaX4oKLyKo", "vw87QIZ7dhk", "VWLVmvtDCSI", "vxXQe9jxSPE",
"vy0hyVTrTom", "Vy1JFQbsNBB", "vzGc2nPWraO", "vzVRv2jtJxL", "w0aCC4wNNzW",
"W1wtZLbWuY0", "w2yXiR4CyWt", "w539HzekPQh", "w55gRgLikEN", "WBhss2tvLa8",
"WcPEy9epMgd", "WCSGolF5yhy", "wdcS5ORWZte", "WDyq0ryAjpn", "webeuXrveDi",
"WeSJR8GDPmC", "WFApCUf18Lp", "wfFCmvMEGOQ", "WFiPvuGJf9O", "WggRnJplCQI",
"wgqFTVU7Iky", "wIMmZwl1gpX", "WjCGPzMzLVr", "WJfiDULf7ZC", "wkl1yyAzga3",
"wlspYUyDoQM", "wm060hpEM7g", "wMPB6u0GZDL", "Wn07Tbv74qp", "wNha3idA7l6",
"WnZVpXq5XCO", "wOe4JHkqbUm", "Wog7gclb7TJ", "wq4bmXnJK45", "Wq4O1nlYk1C",
"wqUwUpMD2mJ", "wrGYa8E94Yc", "WSAfRmiEJOF", "wSP90pEfCng", "wSW662GVwZP",
"wtoXU3G9YIy", "WtPSqPwjH2f", "wtV2TtEPCCZ", "Wtw2jbyaHz2", "WUChzooYWJ1",
"WUFgPdTN02g", "wUQiuRjZxiO", "Ww9Rq2KLlqV", "WWabB2sc4B7", "wxKEHpSLvib",
"wXnoTA2MDy9", "WYk4A1fVYD7", "WYMXHupBG7P", "wzD83xmvR3b", "WzemydwRD0R",
"X4ZVDdDd2xa", "X6efCWparbb", "X6uv3PName4", "X7deWPhTiIy", "X8TsrtMQFiu",
"X8UmaBiq1yy", "xbJCVaOZWp5", "XbjRzgMPN24", "XbubJh2yjOw", "XcqBCAaLcq5",
"xd8LIlN7N8h", "XdKVljaiZ9j", "xeEUMp35d5m", "XeUDpg1CTKf", "xf9Q4yYDlq5",
"XFEHZnnEGkT", "xFO9GKAXi1n", "xfxtwRZ7Ejp", "xhOpIbHQy8I", "XjBkSXvZLOZ",
"xjfIPJ04cET", "XLt8l1uPicg", "xlYle4v5GZ8", "xmJNiAbmSfe", "XnkRi1jTMKr",
"XPhxWI0fDyq", "XqDQsrhQ7W5", "Xsd3yzbnFOf", "XTF6vymtG8J", "xuovzIjWZUG",
"Xv1I8z1cK76", "XvVmyn071HT", "XxBMueAFsnk", "xxVZKlzMYJJ", "xyr4dO4G3tW",
"y4rr2PbfufS", "yaa2uBLsdRa", "YBG39jGSV17", "yDcnCB4aZEX", "YDuoFIKpONe",
"YdWxRCaQR2D", "yfgSogitBGX", "YFi06xiFHWs", "YFi2V7qfmJf", "yfpM2zJ3Zuc",
"ygTl7hih5qi", "YGtrgJxKWiU", "yIcfnuZhejK", "YIxt0WtezdT", "yJ014QFEqru",
"yJO8QTnBF3o", "yKfdWuLsdDx", "ylMgcLnwgce", "YNy9ymD2A8p", "yONz8gph9A7",
"YowwYq8CIXJ", "YPsxC0bl7T2", "YQP6diqjJAl", "YqR6LoSk2Ed", "yqwh11CvYXU",
"YRemZ3p9bFA", "ySxRSgTOeqD", "yTvx2IJ0w0z", "ytwga9hKjVj", "YtyO06HBaVr",
"YvEkkZlNeCK", "yVFdJkYsLK5", "yvoQHXHGvbT", "YVT9zsaVBzp", "YWbmL6VK8R6",
"Ywm8eA9tZHe", "yXady1QV27H", "yY7MHufA6C9", "yYG52aLO1GK", "yYgG4h097xR",
"YyhPAO5yx22", "Yz5yhyHf7Ul", "z2cGjpx37Mw", "Z42m6cWsI9m", "z4DptoHrJnb",
"z4kLOdnL1Op", "z5tZes2s49Z", "z5WklS85YjT", "z6bId6qlNk4", "Z6ZZLw50mAM",
"z8MwD6T43n2", "z8UkGdr2xNs", "Z90jET09ZrD", "zaeb1Zos2Mu", "ZBkpY2KdibX",
"Zc0BcScQDBU", "zCjn57zZQVN", "ZcrdEBruDka", "ZCT4YbaBFUb", "ZdVIx83rdI7",
"zEQXA689E4a", "ZfjQmCjVKRF", "zfutn6ulVcO", "zFzYdXMnPoP", "zG4JqtM8wHO",
"ZGyAErBl5PS", "ZifoCg4OvIj", "ZJ6MAab9PJE", "ZKVzRmYkKzQ", "zlG1VmpE6QQ",
"zN6xXPgmzqK", "zOfDRrZmbQO", "zOGa9wLHDFE", "zQmuipEUYbz", "zR7UekDUG3X",
"zrs6iFpEtF1", "ZrUjQFzR1gM", "zTnxsAMqHRP", "Zu7gpmcwfqY", "zvOkAI9ewwE",
"zvv07VAowTS", "ZWAdop7zYgJ", "ZWAEE8DrywN", "zxIlF5RwQFi", "ZXONCt7P01p"
), class = "factor"), Time = c(1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L,
4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L,
6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L,
1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L,
2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L,
3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L,
4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L,
6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L,
1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L,
2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L, 2L, 3L, 4L, 6L, 1L),
    Count1 = c(8L, 16L, 16L, 16L, 8L, 12L, 24L, 24L, 24L, 12L,
    8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L,
    16L, 8L, 8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L, 12L,
    24L, 24L, 24L, 12L, 8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L,
    16L, 8L, 12L, 24L, 24L, 24L, 12L, 8L, 16L, 16L, 16L, 8L,
    12L, 24L, 24L, 24L, 12L, 8L, 16L, 16L, 16L, 8L, 8L, 16L,
    16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L,
    8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L,
    16L, 8L, 8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L, 8L,
    16L, 16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L, 16L,
    8L, 8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L, 8L, 16L,
    16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L, 8L, 16L, 16L, 16L, 8L,
    8L), Total1 = c(64L, 64L, 64L, 64L, 64L, 96L, 96L, 96L, 96L,
    96L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L,
    64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L,
    64L, 64L, 96L, 96L, 96L, 96L, 96L, 64L, 64L, 64L, 64L, 64L,
    64L, 64L, 64L, 64L, 64L, 96L, 96L, 96L, 96L, 96L, 64L, 64L,
    64L, 64L, 64L, 96L, 96L, 96L, 96L, 96L, 64L, 64L, 64L, 64L,
    64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L,
    64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L,
    64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L,
    64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L,
    64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L,
    64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L,
    64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L, 64L), Count2 = c(4L,
    8L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 3L, 7L, 8L, 8L, 4L, 4L,
    8L, 8L, 8L, 4L, 3L, 8L, 8L, 8L, 4L, 3L, 7L, 8L, 8L, 4L, 2L,
    4L, 4L, 4L, 2L, 3L, 5L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 4L,
    8L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 3L, 6L, 8L, 8L, 4L, 4L,
    8L, 8L, 8L, 4L, 3L, 4L, 6L, 6L, 2L, 2L, 4L, 4L, 4L, 2L, 4L,
    8L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 4L,
    8L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 4L,
    8L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 4L,
    8L, 8L, 8L, 4L, 3L, 8L, 8L, 8L, 4L, 4L, 8L, 8L, 8L, 4L, 3L,
    8L, 8L, 8L, 4L, 3L, 5L, 7L, 8L, 3L, 4L, 8L, 8L, 8L, 4L, 4L
    ), Total2 = c(34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L,
    34L, 32L, 32L, 32L, 32L, 32L, 34L, 34L, 34L, 34L, 34L, 33L,
    33L, 33L, 33L, 33L, 32L, 32L, 32L, 32L, 32L, 16L, 16L, 16L,
    16L, 16L, 30L, 30L, 30L, 30L, 30L, 34L, 34L, 34L, 34L, 34L,
    34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 31L, 31L,
    31L, 31L, 31L, 34L, 34L, 34L, 34L, 34L, 22L, 22L, 22L, 22L,
    22L, 16L, 16L, 16L, 16L, 16L, 34L, 34L, 34L, 34L, 34L, 34L,
    34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L,
    34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L,
    34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L,
    34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 33L, 33L, 33L, 33L,
    33L, 34L, 34L, 34L, 34L, 34L, 33L, 33L, 33L, 33L, 33L, 28L,
    28L, 28L, 28L, 28L, 34L, 34L, 34L, 34L, 34L, 34L)), row.names = c(1L,
2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L,
16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L,
29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L,
42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L,
55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L,
68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 1041L, 1042L, 1043L,
1044L, 1045L, 1046L, 1047L, 1048L, 1049L, 1050L, 1051L, 1052L,
1053L, 1054L, 1055L, 1056L, 1057L, 1058L, 1059L, 1060L, 1061L,
1062L, 1063L, 1064L, 1065L, 1066L, 1067L, 1068L, 1069L, 1070L,
1071L, 1072L, 1073L, 1074L, 1075L, 1076L, 1077L, 1078L, 1079L,
1080L, 1081L, 1082L, 1083L, 1084L, 1085L, 1086L, 1087L, 1088L,
1089L, 1090L, 1091L, 1092L, 1093L, 1094L, 1095L, 1096L, 1097L,
1098L, 1099L, 1100L, 1101L, 1102L, 1103L, 1104L, 1105L, 1106L,
1107L, 1108L, 1109L, 1110L, 1111L, 1112L, 1113L, 1114L, 1115L,
1116L), class = "data.frame")

Body:
An option is to group by 'Class', 'Site', paste (str_c) the columns except 'Time' to a single string, then grouped by 'Class', 'Count1', ..., 'Total2', columns, get the group indices to create the 'ind' column and do a left_join with original dataset

library(dplyr)
library(stringr)
df %>%
    group_by(Class, Site) %>%
    summarise_at(vars(-Time), str_c, collapse="") %>%
    group_by(Class, Count1, Total1, Count2, Total2) %>%
    mutate(ind = group_indices()) %>%
    ungroup %>%
    select(Class, Site, ind) %>%
    left_join(df)

Or a similar logic with data.table

library(data.table)
setDT(df)[df[, lapply(.SD, paste, collapse=""),
   .(Class, Site), .SDcols = patterns('Count|Total')][,
     ind := .GRP, by = c('Class', 'Count1', 'Total1', 'Count2', 'Total2')
           ][, .(Class, Site, ind)], on = .(Class, Site)]


问:
How to use Google Maps with PubNub in Angular
I am trying to implement the tracking system in my application using PubNub. I have created the Google map using Javascript by changing the configurations in the Angular.json file. I am calling an external javascript file.

I am not able to display the map in my Angular application, but when I use the same code in normal HTML it is working. But when I added the same code in my Angular application map is not displaying.

HTML:

PubNub Google Maps - Live Device Location

```

<p>JS:</p>

<pre class="lang-js prettyprint-override"><code>             window.lat = 28.7041;
             window.lng = 77.1025;

            function getLocation() {
                if (navigator.geolocation) {
                navigator.geolocation.getCurrentPosition(updatePosition);
              }

           return null;
           };

          function updatePosition(position) {
           if (position) {
             window.lat = position.coords.latitude;
            window.lng = position.coords.longitude;
           }
          }

          setInterval(function(){updatePosition(getLocation());}, 20000);

         function currentLocation() {
            return {lat:window.lat, lng:window.lng};
         };

        var map;
        var mark;
        var lineCoords = [];
        var initialize = function() {
        var icon = {
           url: "assests/images/download.png", // url
           scaledSize: new google.maps.Size(30, 30), // scaled size
           origin: new google.maps.Point(0,0), // origin
          anchor: new google.maps.Point(0, 0) // anchor
        };

       map  = new google.maps.Map(document.getElementById('map-canvas'), {center:  {lat:lat,lng:lng},zoom:12});
       mark = new google.maps.Marker({position:{lat:lat, lng:lng}, map:map,
      icon: icon
      });

    };
    window.initialize = initialize;

    var redraw = function(payload) {
        lat = payload.message.lat;
        lng = payload.message.lng;
        map.setCenter({lat:lat, lng:lng, alt:0});
        mark.setPosition({lat:lat, lng:lng, alt:0});
        lineCoords.push(new google.maps.LatLng(lat, lng));
        var lineCoordinatesPath = new google.maps.Polyline({
          path: lineCoords,
          geodesic: true,
          strokeColor: '#FF0000'
        });
        lineCoordinatesPath.setMap(map);
      };

    var pnChannel = "map-channel";

    var pubnub = new PubNub({
      publishKey:   'pub-c-redacted',
      subscribeKey: 'sub-c-redacted'
    });

    pubnub.subscribe({channels: [pnChannel]});
    pubnub.addListener({message:redraw});

    setInterval(function() {
        pubnub.publish({channel:pnChannel, message:{lat:window.lat + 0.001, lng:window.lng + 0.01}});
      }, 10000);
</code>```

Error Facing:

```<code> Uncaught TypeError: Cannot read property 'setCenter' of undefined
</code>```

答:
Transparency: I work for PubNub and I don't know Google Maps that well.
I wanted to ask some questions in comments but found some potential bugs in your code so adding as a potential answer here with new code to try. This code has comments throughout that address the potential bugs. Please comment if you have questions or if this solves your issue.

I also added additional HTML markup like  and  and moved all scripts/code below the  tag. That may or may not be what you need to do but should work anyways.

<title>PubNub & Google Maps</title>

PubNub Google Maps - Live Device Location

```

I know the PubNub code fixes/recommendations are proper. Let me know if I was correct about the html/javascript/google maps issues. I couldn't fully test your code because I don't have your assests/js/index.js code file.

Body:
I am trying to implement the tracking system in my application using PubNub. I have created the Google map using Javascript by changing the configurations in the Angular.json file. I am calling an external javascript file.

I am not able to display the map in my Angular application, but when I use the same code in normal HTML it is working. But when I added the same code in my Angular application map is not displaying.

HTML:

PubNub Google Maps - Live Device Location

JS:

             window.lat = 28.7041;
             window.lng = 77.1025;

            function getLocation() {
                if (navigator.geolocation) {
                navigator.geolocation.getCurrentPosition(updatePosition);
              }

           return null;
           };

          function updatePosition(position) {
           if (position) {
             window.lat = position.coords.latitude;
            window.lng = position.coords.longitude;
           }
          }

          setInterval(function(){updatePosition(getLocation());}, 20000);

         function currentLocation() {
            return {lat:window.lat, lng:window.lng};
         };

        var map;
        var mark;
        var lineCoords = [];
        var initialize = function() {
        var icon = {
           url: "assests/images/download.png", // url
           scaledSize: new google.maps.Size(30, 30), // scaled size
           origin: new google.maps.Point(0,0), // origin
          anchor: new google.maps.Point(0, 0) // anchor
        };

       map  = new google.maps.Map(document.getElementById('map-canvas'), {center:  {lat:lat,lng:lng},zoom:12});
       mark = new google.maps.Marker({position:{lat:lat, lng:lng}, map:map,
      icon: icon
      });

    };
    window.initialize = initialize;

    var redraw = function(payload) {
        lat = payload.message.lat;
        lng = payload.message.lng;
        map.setCenter({lat:lat, lng:lng, alt:0});
        mark.setPosition({lat:lat, lng:lng, alt:0});
        lineCoords.push(new google.maps.LatLng(lat, lng));
        var lineCoordinatesPath = new google.maps.Polyline({
          path: lineCoords,
          geodesic: true,
          strokeColor: '#FF0000'
        });
        lineCoordinatesPath.setMap(map);
      };

    var pnChannel = "map-channel";

    var pubnub = new PubNub({
      publishKey:   'pub-c-redacted',
      subscribeKey: 'sub-c-redacted'
    });

    pubnub.subscribe({channels: [pnChannel]});
    pubnub.addListener({message:redraw});

    setInterval(function() {
        pubnub.publish({channel:pnChannel, message:{lat:window.lat + 0.001, lng:window.lng + 0.01}});
      }, 10000);

Error Facing:

 Uncaught TypeError: Cannot read property 'setCenter' of undefined

Body:
Transparency: I work for PubNub and I don't know Google Maps that well.
I wanted to ask some questions in comments but found some potential bugs in your code so adding as a potential answer here with new code to try. This code has comments throughout that address the potential bugs. Please comment if you have questions or if this solves your issue.

I also added additional HTML markup like <head> and <body> and moved all scripts/code below the <body> tag. That may or may not be what you need to do but should work anyways.

<html>
<head>
<title>PubNub & Google Maps</title>
</head>

<body>
<div class="container">
    <h1>PubNub Google Maps - Live Device Location</h1>

    <!-- You used "map" as your id here:
    <div id="map" style="width:100%;height:600px"></div>
    ... but down in your code you getElementById('map-canvas')
    Shouldn't this id be "map-canvas"? That might be why it doesn't display.
    -->
    <div id="map-canvas" style="width:100%;height:600px"></div>
</div>
</body>

<!-- I don't have the index.js file so I couldn't properly test your code -->
<script src="./assests/js/index.js"></script>

<!-- PubNub JS SDK v4.19.0 is pretty old. You should use the latest version of PubNub JS SDK - v4.27.6 -->
<!-- script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.19.0.min.js"></script> -->
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.27.6.min.js"></script>

<!-- added this script tag and the closing script tag at the end of this code -->
<script type="text/javascript">
window.lat = 28.7041;
window.lng = 77.1025;

function getLocation() {
    if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(updatePosition);
    }

    return null;
};

function updatePosition(position) {
    if (position) {
        window.lat = position.coords.latitude;
        window.lng = position.coords.longitude;
    }
}

setInterval(function(){updatePosition(getLocation());}, 20000);

function currentLocation() {
    return {lat:window.lat, lng:window.lng};
};

var map;
var mark;
var lineCoords = [];
var initialize = function() {
    var icon = {
        url: "assests/images/download.png", // url
           scaledSize: new google.maps.Size(30, 30), // scaled size
           origin: new google.maps.Point(0,0), // origin
          anchor: new google.maps.Point(0, 0) // anchor
      };

      // this is where you do getElementById('map-canvas')
      // but the id in the `<body>` was `map`
      // I suspect the variable here should be `map` but the id above should
      // be `map-canvas` and that is probably why you get that
      // error when you call `map.setCenter`
      map  = new google.maps.Map(document.getElementById('map-canvas'), {center:  {lat:lat,lng:lng},zoom:12});
      mark = new google.maps.Marker({position:{lat:lat, lng:lng}, map:map,
        icon: icon
      });

  };
  window.initialize = initialize;

  var redraw = function(payload) {
    lat = payload.message.lat;
    lng = payload.message.lng;
    map.setCenter({lat:lat, lng:lng, alt:0});
    mark.setPosition({lat:lat, lng:lng, alt:0});
    lineCoords.push(new google.maps.LatLng(lat, lng));
    var lineCoordinatesPath = new google.maps.Polyline({
        path: lineCoords,
        geodesic: true,
        strokeColor: '#FF0000'
    });
    lineCoordinatesPath.setMap(map);
  };

  var pnChannel = "map-channel";

  // redacted your keys - do not share with public
  var pubnub = new PubNub({
    publishKey:   'pub-c-redacted',
    subscribeKey: 'sub-c-redacted'
  });

  // switched the order of these two lines of code
  // you should addListener first, then subscribe
  pubnub.addListener({message:redraw});
  pubnub.subscribe({channels: [pnChannel]});

  setInterval(function() {
    pubnub.publish({channel:pnChannel, message:{lat:window.lat + 0.001, lng:window.lng + 0.01}});
  }, 10000);

// here's the ending script tag I added that I mentioned above
</script>
</html>

I know the PubNub code fixes/recommendations are proper. Let me know if I was correct about the html/javascript/google maps issues. I couldn't fully test your code because I don't have your assests/js/index.js code file.


问:
Script not executing output
Im working on switching from python to javascript, not going quite so easily... I think I have nested everything properly, I made sure the inputs were matched to the variables and that the submission was linked to the function, I don not see syntax errors according to my knowledge, but I am just beginning my quest to grapple with javascript. Please help to understand the issues, I do not expect anyone to rewrite the whole thing, I will be doing any research to what ever problems are debugged.

function loanQualify() {
  let loan_size = parseInt(document.getElementById('loanBox').value);
  let credit_history = parseInt(document.getElementById('creditBox').value);
  let income_size = parseInt(document.getElementById('incomeBox').value);
  let down_payment_size = parseInt(document.getElementById('paymentBox').value);
  let qualify;
  if (loan_size >= 5) {
    if (credit_history >= 7 && income_size >= 7)
      qualify == true;
    else if (credit_history >= 7 || income_size >= 7) {
      if (down_payment_size >= 5)
        qualify == true;
      else
        qualify == false;
    } else
      qualify == false;
  } else {
    if (credit_history < 4)
      qualify == false;
    else {
      if (income_size >= 7 || down_payment_size >= 7)
        qualify = true;
      else if (income_size >= 4 && down_payment_size >= 4)
        qualify == true;
      else
        qualify == false;
    }
  }

}

if (qualify == true)
  document.getElementById('trueFalse').innerHTML = "You qualify";
else(qualify == false)
document.getElementById('trueFalse').innerHTML = "You don't qualify";```
<pre class="snippet-code-html lang-html prettyprint-override"><code>Loan Size: <input type="text" id="loanBox" size="3"><br> Credit History: <input type="text" id="creditBox" size="3"><br> Income Size: <input type="text" id="incomeBox" size="3"><br> Down Payment Size: <input type="text" id="paymentBox" size="3"><br>
<button type="button" onclick="loanQualify()">Qualify?</button>

<div id="trueFalse"></div></code>```

答:
You cannot assign a condition in else and your if() must have == which  checks the condition.

```<code>if (qualify = true)
document.getElementById('trueFalse').innerHTML = "You qualify";
else (qualify = false)
document.getElementById('trueFalse').innerHTML = "You don't qualify";
</code>```

Change it to

```<code>if (qualify == true)
  document.getElementById('trueFalse').innerHTML = "You qualify";
else
  document.getElementById('trueFalse').innerHTML = "You don't qualify";
</code>```

Title: Script not executing output

Body:
Im working on switching from python to javascript, not going quite so easily... I think I have nested everything properly, I made sure the inputs were matched to the variables and that the submission was linked to the function, I don not see syntax errors according to my knowledge, but I am just beginning my quest to grapple with javascript. Please help to understand the issues, I do not expect anyone to rewrite the whole thing, I will be doing any research to what ever problems are debugged.

function loanQualify() {
  let loan_size = parseInt(document.getElementById('loanBox').value);
  let credit_history = parseInt(document.getElementById('creditBox').value);
  let income_size = parseInt(document.getElementById('incomeBox').value);
  let down_payment_size = parseInt(document.getElementById('paymentBox').value);
  let qualify;
  if (loan_size >= 5) {
    if (credit_history >= 7 && income_size >= 7)
      qualify == true;
    else if (credit_history >= 7 || income_size >= 7) {
      if (down_payment_size >= 5)
        qualify == true;
      else
        qualify == false;
    } else
      qualify == false;
  } else {
    if (credit_history < 4)
      qualify == false;
    else {
      if (income_size >= 7 || down_payment_size >= 7)
        qualify = true;
      else if (income_size >= 4 && down_payment_size >= 4)
        qualify == true;
      else
        qualify == false;
    }
  }

}

if (qualify == true)
  document.getElementById('trueFalse').innerHTML = "You qualify";
else(qualify == false)
document.getElementById('trueFalse').innerHTML = "You don't qualify";

Loan Size: <input type="text" id="loanBox" size="3">
 Credit History: <input type="text" id="creditBox" size="3">
 Income Size: <input type="text" id="incomeBox" size="3">
 Down Payment Size: <input type="text" id="paymentBox" size="3">

<button type="button" onclick="loanQualify()">Qualify?</button>

Body:
You cannot assign a condition in else and your if() must have == which  checks the condition.

if (qualify = true)
document.getElementById('trueFalse').innerHTML = "You qualify";
else (qualify = false)
document.getElementById('trueFalse').innerHTML = "You don't qualify";

Change it to

if (qualify == true)
  document.getElementById('trueFalse').innerHTML = "You qualify";
else
  document.getElementById('trueFalse').innerHTML = "You don't qualify";


问:
pattern() function and onkeyup() function not working together
i am trying to let the screen show that the password inserted should be in a certain regex with pattern  when typing in the fields but when i used  onkeyup() to check if both passwords are matching the part with the onkeyup works but

the pattern  info box doesnt  show up anymore
so i was hoping to know why its not working ,if both functions are not allowed together or anything

here is the html

```<code><div class ="signupbox">

<h1>Signup</h1>
<form action="">
   <p>Username</p>
    <input type="text" id="user" placeholder="Enter Username"  pattern="^[a-zA-Z0-9]{8,}$" title="please enter a username with only Letters and numbers[0-9]">
    <p>Password</p>
    <input name="password" id="password" type="password" placeholder="Enter Password"  pattern="(?=.*[a-zA-Z].*)(?=.*[A-Z])(?=.*[0-9])(?=.*[#@!%])[a-zA-Z0-9#@!%]{6,}" title="please enter a password with at least 1 capital letter and one special from[#@!%]" onkeyup='check();'/>
    <p>confirm password</p>
    <input type="password" name="confirm_password" id="confirm_password" placeholder="confirm Password"  onkeyup='check();' />
    <span id='message'></span>
    <br>
    <input type="submit" id="Signup" disabled  value="Signup" >
</form>
</code>```

here is the js

```<code>var check = function() {
    if (document.getElementById('password').value ==
      document.getElementById('confirm_password').value) {
      document.getElementById('message').style.color = 'rgb(1, 126, 11)';
      document.getElementById('message').style.fontSize="20px"
      document.getElementById('message').innerHTML = "Passwords are matching";
    } else {
      document.getElementById('message').style.color = 'rgba(255, 0, 0, 0.829)';
      document.getElementById('message').style.fontSize="20px"
      document.getElementById('message').innerHTML = "Passwords are not matching";
      sign.disabled=true;

}
}
</code>```

答: Simply adding oninput="this.reportValidity()" to all input fields with a pattern, in addition to your onkeyup='check();', will show the browser-based validation feedback.

Body:
i am trying to let the screen show that the password inserted should be in a certain regex with pattern  when typing in the fields but when i used  onkeyup() to check if both passwords are matching the part with the onkeyup works but

the pattern  info box doesnt  show up anymore
so i was hoping to know why its not working ,if both functions are not allowed together or anything

here is the html

Signup

<form action="">

Username

    <input type="text" id="user" placeholder="Enter Username"  pattern="^[a-zA-Z0-9]{8,}$" title="please enter a username with only Letters and numbers[0-9]">

Password

    <input name="password" id="password" type="password" placeholder="Enter Password"  pattern="(?=.*[a-zA-Z].*)(?=.*[A-Z])(?=.*[0-9])(?=.*[#@!%])[a-zA-Z0-9#@!%]{6,}" title="please enter a password with at least 1 capital letter and one special from[#@!%]" onkeyup='check();'/>

confirm password

    <input type="password" name="confirm_password" id="confirm_password" placeholder="confirm Password"  onkeyup='check();' />

    <input type="submit" id="Signup" disabled  value="Signup" >
</form>

here is the js

var check = function() {
    if (document.getElementById('password').value ==
      document.getElementById('confirm_password').value) {
      document.getElementById('message').style.color = 'rgb(1, 126, 11)';
      document.getElementById('message').style.fontSize="20px"
      document.getElementById('message').innerHTML = "Passwords are matching";
    } else {
      document.getElementById('message').style.color = 'rgba(255, 0, 0, 0.829)';
      document.getElementById('message').style.fontSize="20px"
      document.getElementById('message').innerHTML = "Passwords are not matching";
      sign.disabled=true;

}
}


问:
How to use a proxy while opening browsers in python
Basically what I want to do is for me to be able to connect to a proxy while I am able to browse the internet

Here is the code I tried

```<code>import webbrowser
import socks, socket, requests
from multiprocessing import Process

def proxy():
    while True:
          socks.set_default_proxy(socks.SOCKS5, "184.32.91.92", 2901)
          socket.socket = socks.socksocket

if __name__ == '__main__':
   proxy_process = Process(target=proxy).start()
   r = requests.get("http://icanhazip.com")
   print(r.content) # stil gives me my actual IP address
   webbrowser.open("http://icanhazip.com", new=2)  # opening the webbrowser
</code>```

So i tried to process the proxy to keep the connection alive but even when I open the browser it still gives me my actual IP

答:
Looks like a timing issue. Your __main__ process probably reaches the line:

```<code>r = requests.get("http://icanhazip.com")
</code>```

before proxy_process has done it's job.

Body:
Basically what I want to do is for me to be able to connect to a proxy while I am able to browse the internet

Here is the code I tried

import webbrowser
import socks, socket, requests
from multiprocessing import Process

def proxy():
    while True:
          socks.set_default_proxy(socks.SOCKS5, "184.32.91.92", 2901)
          socket.socket = socks.socksocket

if __name__ == '__main__':
   proxy_process = Process(target=proxy).start()
   r = requests.get("http://icanhazip.com")
   print(r.content) # stil gives me my actual IP address
   webbrowser.open("http://icanhazip.com", new=2)  # opening the webbrowser

So i tried to process the proxy to keep the connection alive but even when I open the browser it still gives me my actual IP

Body:
Looks like a timing issue. Your __main__ process probably reaches the line:

r = requests.get("http://icanhazip.com")

before proxy_process has done it's job.


问:
Are there protection mechanisms for communication between threads from different processes?
Given  that threads (of the same process) run in a shared memory space and synchronizing the access to the shared data within the process gains unprecedented importance, how does this apply to threads from different processes?
What are the communication methods available for them?</p>

答:
Threads from different processes are generally treated just like independent processes themselves, because they share no state with each other and operate in separate memory spaces.

As a consequence, they use the standard interprocess communication mechanisms, such as Unix sockets, pipes, and other file descriptors; SysV or POSIX IPC mechanisms such as shared memory and semaphores; locking; and signals.  It may be convenient to have a thread in a process that is dedicated to interacting with other processes, but IPC can be done with single-threaded processes as well or in multithreaded processes without dedicated IPC threads.

Since the risk of accidentally mutating other threads' data is not possible across processes, sometimes synchronization is handled automatically by the kernel, such as with pipes, but it is possible to need to coordinate across processes.  File locks, such as with fcntl(2) and flock(2), can prevent co-operating processes from corrupting files; semaphores can prevent contention or limit concurrency for shared resources; and it's even possible to share a mutex for some shared memory cases.  The tools you use depend on the resources you're sharing across processes.