问:
How to select which value from a GeoJson is displayed in choropleth in mapbox using a html dropdown menu
I am building a map to show both the unemployment rate in regions and districts in Ghana. I would like to add the functionality to show either the male, the female, total or difference between the two. To do this I added a dropdown menu to filter and select either of the values, but how do I now get that value to represent in the map? As in, how do I update ['get', 'value'], to value mean total (the default), male, female, or difference?

This is my quarto code thusfar:

```<code>```
---
title: "About"
format:
  html:
      page-layout: custom
---

::: grid
::: g-col-4

This is a first test

```{=html}
<br>
<label for="data">Choose your dataset:</label>

<br>
<select name="data" id="dataselect">
    <option value="https://raw.githubusercontent.com/Laurent-Smeets-GSS-Account/geojsons/main/geojsons_files/simplified_regions_and_districts272.geojson">ghana 272</option>
    <option value="https://raw.githubusercontent.com/Laurent-Smeets-GSS-Account/geojsons/main/geojsons_files/unemployment_per_district.geojson">Unemployment rate</option>
</select>
```

```{=html}

<br>
<label for="sex">Choose your sex:</label>

<br><select name="sex" id="sexselect">
    <option value="Value">Total</option>
    <option value="Male">Male</option>
    <option value="Female">Female</option>
    <option value="Difference">Difference between male and female</option>

</select>
```

:::
::: g-col-8

some text in the second column

```{=html}

<div id='map'>
<div id="legend" class="legend">

<div><span style="background-color: #FFF8E8"></span>0%</div>
<div><span style="background-color: #FCD581"></span>5%</div>
<div><span style="background-color: #F3AA71"></span>10%</div>
<div><span style="background-color: #E97F61"></span>15%</div>
<div><span style="background-color: #D52941"></span>20%</div>
<div><span style="background-color: #B71B3B"></span>30%</div>
<div><span style="background-color: #990D35"></span>100%</div>
</div>

<div class='map-overlay' id='features'><div id='pd'><p>Hover over a region</p></div>

</div>

```

```{=html}

<link href="https://api.mapbox.com/mapbox-gl-js/v2.11.0/mapbox-gl.css" rel="stylesheet">
<script src="https://api.mapbox.com/mapbox-gl-js/v2.11.0/mapbox-gl.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>

<style>
body{margin: 0; padding: 1}

#map { margin:auto; width: 100%; height: 800px; }
#legend {position: absolute;
  bottom: 0;
  right: 0;
  z-index: 1000;
  margin-bottom: 30px;
  margin-right:30px;
  border-radius: 3px;
  padding: 5px 10px;
  background: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);

  }

</style>

<script>
$(document).ready(function(){
mapboxgl.accessToken = 'pk.eyJ1IjoibWFydGluLWFybm9sZCIsImEiOiJjbGI0NjVwOTMwNTltM3JvZmtkY3VqN2p5In0.GTqfQeF5FFKqyDEdl0zfXA';

    const bounds = [
[-8,-1], // Southwest coordinates
[5, 16] // Northeast coordinates
];

const map = new mapboxgl.Map({
container: 'map', // container ID
// Choose from Mapbox's core styles, or make your own style with Mapbox Studio
style: 'mapbox://styles/mapbox/light-v11', // style URL
projection: 'globe', // Display the map as a globe, since satellite-v9 defaults to Mercator
zoom: 6, // starting zoom
center: [0, 7.5], // // starting center in [lng, lat]
  maxBounds: bounds // Set the map's geographical boundaries.

});

    const zoomThreshold = 7;

map.on('style.load', () => {
map.setFog({});

  map.addSource('the_source', {
    type: 'geojson',
    data: 'https://raw.githubusercontent.com/Laurent-Smeets-GSS-Account/geojsons/main/geojsons_files/simplified_regions_and_districts272.geojson'
  });

  map.addLayer({
  'id': 'ghana1',
  'type': 'fill',
  'source': 'the_source',
  'maxzoom': zoomThreshold,

'paint': {
'fill-color': [
'interpolate',
['linear'],
['get', 'value'],
0,
'#FFF8E8',
0.05,
'#FCD581',
0.1,
'#F3AA71',
0.15,
'#E97F61',
0.2,
'#D52941',
0.3,
'#B71B3B',
1.0,
'#990D35'
],
'fill-opacity': 0.75
},
  filter: ['==', 'level', 'Region']
});

map.addLayer({
  'id': 'ghana2',
  'type': 'fill',
  'source': 'the_source',
  'minzoom': zoomThreshold,
  maxBounds: bounds, // Set the map's geographical boundaries.
'paint': {
'fill-color': [
'interpolate',
['linear'],
['get', 'value'],
0,
'#FFF8E8',
0.05,
'#FCD581',
0.1,
'#F3AA71',
0.15,
'#E97F61',
0.2,
'#D52941',
0.3,
'#B71B3B',
1.0,
'#990D35'
],
'fill-opacity': 0.75
},
  filter: ['==', 'level', 'District']
});

});

$( "#dataselect" ).change(function() {
  $( "#dataselect option:selected" ).each(function() {
        map.getSource('the_source').setData( $(this).val() );
  });
});

$( "#sexselect" ).change(function() {
  $( "#sexselect option:selected" ).each(function() {
        map.getSource('sexselect').setData( $(this).val() );
  });
});

map.on('mousemove', (event) => {
const states = map.queryRenderedFeatures(event.point, {
layers: ['ghana2', 'ghana1']
});
document.getElementById('pd').innerHTML = states.length
? `<h3>${states[0].properties.stat}</h3><h4>${states[0].properties.name}</h4><p><strong><em>${Math.trunc(states[0].properties.value *10000)/100}%</strong> ${states[0].properties.stat}</em></p>`
: `<h3>${states[0].properties.stat}</h3><p>Hover over a state!</p>`;
});

});
</script>
```

:::
:::

```
</code>```

Body:
I am building a map to show both the unemployment rate in regions and districts in Ghana. I would like to add the functionality to show either the male, the female, total or difference between the two. To do this I added a dropdown menu to filter and select either of the values, but how do I now get that value to represent in the map? As in, how do I update ['get', 'value'], to value mean total (the default), male, female, or difference?

This is my quarto code thusfar:

```
---
title: "About"
format:
  html:
      page-layout: custom
---

::: grid
::: g-col-4

This is a first test

```{=html}

Choose your dataset:

<select name="data" id="dataselect">
    <option value="https://raw.githubusercontent.com/Laurent-Smeets-GSS-Account/geojsons/main/geojsons_files/simplified_regions_and_districts272.geojson">ghana 272</option>
    <option value="https://raw.githubusercontent.com/Laurent-Smeets-GSS-Account/geojsons/main/geojsons_files/unemployment_per_district.geojson">Unemployment rate</option>
</select>
```

```{=html}

Choose your sex:

<select name="sex" id="sexselect">
    <option value="Value">Total</option>
    <option value="Male">Male</option>
    <option value="Female">Female</option>
    <option value="Difference">Difference between male and female</option>

</select>
```

:::
::: g-col-8

some text in the second column

```{=html}

0%

5%

10%

15%

20%

30%

100%

Hover over a region

```

```{=html}

<link href="https://api.mapbox.com/mapbox-gl-js/v2.11.0/mapbox-gl.css" rel="stylesheet">

```

:::
:::

```


来源: stackexchange

问:
Authorization header malformed. WordpressPCL
I'm using Api for WordPress so WordPressPCL shows me that error and in my wordpress also i alraedy install JWT Auth and JWT Authentication for WP-API but it shows me this error
**
Authorization header malformed.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: WordPressPCL.Models.Exceptions.WPException: Authorization header malformed.**

IT WAS WORRKING LAST NIGHT

`

```<code>IEnumerable<string> Role = new List<string>();
                Role = Role.Concat(new[] { "role" });
                var wpBaseAddress = new Uri("https://www.tinkweb.site/wp-json/");
                var client = new WordPressClient(wpBaseAddress);
                client.Auth.UseBearerAuth(JWTPlugin.JWTAuthByUsefulTeam);
                await client.Auth.RequestJWTokenAsync("User", "KEY");
                var isValidToken = await client.Auth.IsValidJWTokenAsync();
                if (isValidToken)
                {
                    var user = await client.Users.CreateAsync(new User(Username, Email, Password)
                    {
                        NickName = Username,
                        Name = $"{Firstname} {Lastname}",
                        FirstName = Firstname,
                        LastName = Lastname,
                        Roles = Role.Any() ? Role : new List<string>() { },
                    });
</code>```

`

SSL AND EDIT CONFIGE.PHP UPDATE MANY THINGS

ContentLicense: CC BY-SA 4.0

Body:
I'm using Api for WordPress so WordPressPCL shows me that error and in my wordpress also i alraedy install JWT Auth and JWT Authentication for WP-API but it shows me this error
**
Authorization header malformed.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: WordPressPCL.Models.Exceptions.WPException: Authorization header malformed.**

IT WAS WORRKING LAST NIGHT

`

IEnumerable<string> Role = new List<string>();
                Role = Role.Concat(new[] { "role" });
                var wpBaseAddress = new Uri("https://www.tinkweb.site/wp-json/");
                var client = new WordPressClient(wpBaseAddress);
                client.Auth.UseBearerAuth(JWTPlugin.JWTAuthByUsefulTeam);
                await client.Auth.RequestJWTokenAsync("User", "KEY");
                var isValidToken = await client.Auth.IsValidJWTokenAsync();
                if (isValidToken)
                {
                    var user = await client.Users.CreateAsync(new User(Username, Email, Password)
                    {
                        NickName = Username,
                        Name = $"{Firstname} {Lastname}",
                        FirstName = Firstname,
                        LastName = Lastname,
                        Roles = Role.Any() ? Role : new List<string>() { },
                    });

`

SSL AND EDIT CONFIGE.PHP UPDATE MANY THINGS


问:
why none of the clients are getting a tray
I am working on a buffet simulation of a buffet. So basically the client will first go through the payment. Then he should go to get his tray which is the part that does not work. After, he should go get his food.
I dont understand why the Clients are not going to the tray queue.
In fact, right-now the client is paying and then he his going directly to tale his food without taking a tray so something must be wrong in the class function but I can't figure what.</p>
```<code>import threading
import random
import time
import concurrent.futures
import traceback

class Queue:
    def __init__(self) -> None:
        self.list_of_products = []
        self.queue = []
        self.lock = threading.Lock()
        self.bill = 0
        self.type_of_products = random.randrange(1, 4)

    def add_client(self, client):
        self.lock.acquire()
        self.queue.append(client)
        self.lock.release()

    def remove_client(self, client):
        self.lock.acquire()
        self.queue.remove(client)
        self.lock.release()

    def check_if_client_in_queue(self, client) -> bool:
        self.lock.acquire()
        student_in_queue = True if client in self.queue else False
        self.lock.release()
        return student_in_queue

    def check_if_empty(self) -> bool:
        self.lock.acquire()
        empty = len(self.queue) == 0
        self.lock.release()
        return empty

    def get_first_client(self):
        if not self.check_if_empty():
            return self.queue.pop(0)
        return None

    def result_of_random_range(self):
        x = self.type_of_products
        return x

    def paying(self):
        self.lock.acquire()
        if self.type_of_products == 1:
            self.list_of_products.append(self.type_of_products)#i think it is not appending
            self.bill = 1 * 25.90

        elif self.type_of_products == 2:
            self.list_of_products.append(self.type_of_products)
            self.bill = 1 * 17.90

        else:
            self.list_of_products.append(self.type_of_products)
            self.bill = 1 * 13.50

        type_of_payment = random.randrange(1, 3)
        if type_of_payment == 1:
            print("Client has to pay", self.bill, "and he is paying in cash")
            change = random.randrange(int(self.bill), round(int(self.bill) + 5)) - int(self.bill)
            print("Amount to be returned", change, "€")
        else:
            print("Client has to pay", self.bill, "and he is paying with his credit card")
        self.lock.release()
        return self.bill

    def tray(self):
        self.lock.acquire()
        random_fall = random.randrange(1,25)
        if random_fall != 1:
            print("Client got his Tray")
        else:
            print("Client dropped his tray")
            time.sleep(10)
        self.lock.release()

class Clients:
    def __init__(self, id, queues):
        self.id = id
        self.queues = queues
        if random.randrange(1, 3) == 1:
            self.queues["clients_waiting_to_pay_manually"].add_client(self)
        else:
            self.queues["clients_waiting_to_pay_automatically"].add_client(self)

    def __str__(self) -> str:
        return f"{self.id}"

    def change_queues(self) -> None:
        try:
            while True:
                if not self.queues["clients_waiting_to_pay_manually"].check_if_client_in_queue(self) and not \
                        self.queues["clients_waiting_to_pay_automatically"].check_if_client_in_queue(self):
                    break

                change_criteria = random.randrange(1, 10)
                if change_criteria != 1:
                    time.sleep(1)
                    continue
                print(f"Client with id {self.id} is gonna switch queue")
                if self.queues["clients_waiting_to_pay_manually"].check_if_client_in_queue(self):
                    self.queues["clients_waiting_to_pay_manually"].remove_client(self)
                    self.queues["clients_waiting_to_pay_automatically"].add_client(self)
                    time.sleep(1)
                    continue

                if self.queues["clients_waiting_to_pay_automatically"].check_if_client_in_queue(self):
                    self.queues["clients_waiting_to_pay_automatically"].remove_client(self)
                    self.queues["clients_waiting_to_pay_manually"].add_client(self)
                    time.sleep(1)
                    continue

        except Exception:
            traceback.print_exc()

class Station:
    def __init__(self, id, queues):
        self.id = id
        self.queues = queues

    def moving_station(self):
        try:

            while True:

                if not self.queues["clients_waiting_to_pay_automatically"].check_if_empty():
                    client = self.queues["clients_waiting_to_pay_automatically"].get_first_client()
                    print(f"Cashier {self.id}: Serving the client {client} in the automatic queue")
                    self.queues["clients_waiting_to_pay_automatically"].paying()
                    print(f"Client {client} has paid and is going to another station ")
                    self.queues["clients_getting_main_food"].add_client(client)
                    print(f"Client {client} is getting his food ")
                    time.sleep(2)

                elif not self.queues["clients_waiting_to_pay_manually"].check_if_empty():
                    client = self.queues["clients_waiting_to_pay_manually"].get_first_client()
                    print(f"Cashier {self.id}: Serving the client {client} in the manual queue")
                    self.queues["clients_waiting_to_pay_manually"].paying()
                    print(f"Client {client} has paid and is going to another station ")

                    self.queues["clients_getting_main_food"].add_client(client)
                    print(f"Client {client} is getting his food ")
                    time.sleep(2)

                else:
                    break

        except Exception:
            traceback.print_exc()
class Trays:
    def __init__(self,queues) -> None:
        self.queues = queues

    def giving_trays(self):
        try:
            while True:

                if self.queues["clients_waiting_for_tray"].check_if_empty():
                    print(f"There is no more clients waiting for a tray")
                    break

                elif not self.queues["clients_waiting_for_tray"].check_if_empty():
                    client = self.queues["clients_waiting_for_tray"].get_first_client()
                    print(f"{client} got his tray")

                    print(f"Client {client} just got his tray")
                    time.sleep(2)
                else:
                    break
        except Exception as e:
            traceback.print_exc()

class Main_food:
    def __init__(self,id,queues):
        self.id = id
        self.queues = queues

    def getting_food(self):
        pasta_menu = ["Carbonara ", "Pesto", "Basilico", "Bolognese", "Truffle", "Chicken Alfredo"]
        protein_menu = ["Beef","Pork","Fish","chicken","Beyond Meat","turkey"]
        pasta_stock = [2,1,4,5,6,3]
        protein_stock = [2,1,4,5,6,3]

        try:
            if not self.queues["clients_getting_main_food"].check_if_empty():
                client_getting_served = self.queues["clients_getting_main_food"].get_first_client()
                if self.queues["clients_waiting_to_pay_automatically"].result_of_random_range() == 1:
                    self.queues["clients_getting_menu_1"].add_client(client_getting_served)
                elif self.queues["clients_waiting_to_pay_manually"].result_of_random_range() == 1:
                            self.queues["clients_getting_menu_1"].add_client(client_getting_served)

                if self.queues["clients_waiting_to_pay_automatically"].result_of_random_range() == 2:
                    self.queues["clients_getting_menu_2"].add_client(client_getting_served)
                elif self.queues["clients_waiting_to_pay_manually"].result_of_random_range() == 2:
                            self.queues["clients_getting_menu_2"].add_client(client_getting_served)

                elif self.queues["clients_waiting_to_pay_manually"].result_of_random_range() == 3:
                    self.queues["clients_getting_menu_3"].add_client(client_getting_served)

                else:
                    self.queues["clients_getting_menu_3"].add_client(client_getting_served)

            x = random.randrange(0,6)
            y = random.randrange(0,6)
            stock = pasta_stock[x]
            stock1 = protein_stock[y]

            if not self.queues["clients_getting_menu_1"].check_if_empty():
                client_being_served_1 = self.queues["clients_getting_menu_1"].get_first_client()

                if stock != 0:
                    pasta_stock[x] = pasta_stock[x]-1
                if stock1 != 0:
                    protein_stock[y] = protein_stock[y]-1
                print(f"Client {client_being_served_1} is getting Pasta : {pasta_menu[x]} and Protein : {protein_menu[y]}")
                print(f"pasta {pasta_stock[x]} protein  {protein_stock[y]} ")
                self.queues["clients_getting_desert"].add_client(client_being_served_1)

            if not self.queues["clients_getting_menu_2"].check_if_empty():
                client_being_served_2 = self.queues["clients_getting_menu_2"].get_first_client()
                if stock != 0:
                    pasta_stock[x] = pasta_stock[x]-1
                print(f"Client {client_being_served_2} is getting Pasta :{pasta_menu[x]}")
                print(f"pasta2 {pasta_stock[x]} ")
                self.queues["clients_getting_desert"].add_client(client_being_served_2)

            elif not self.queues["clients_getting_menu_3"].check_if_empty():
                client_being_served_3 = self.queues["clients_getting_menu_3"].get_first_client()
                if stock1 != 0:
                    protein_stock[y] = protein_stock[y]-1
                print(f"Client {client_being_served_3} is getting Protein :{protein_menu[y]}")
                print(f"protein3  {protein_stock[y]} ")
                self.queues["clients_getting_desert"].add_client(client_being_served_3)

        except Exception as e:
            traceback.print_exc()

queues ={
    "clients_waiting_to_pay_manually": Queue(),
    "clients_waiting_to_pay_automatically": Queue(),
    "clients_waiting_for_tray": Queue(),
    "clients_getting_main_food": Queue(),
    "clients_not_getting_main_food": Queue(),
    "clients_getting_menu_1": Queue(),
    "clients_getting_menu_2": Queue(),
    "clients_getting_menu_3": Queue(),
    "clients_getting_desert": Queue()
}

number_of_cashiers = 3
number_of_clients = 10
clients = [Clients(id, queues) for id in range(number_of_clients)]
stations = [Station(id, queues) for id in range(number_of_clients)]
trays = [Trays(queues) for id in range(number_of_clients)]
foods = [Main_food(id, queues) for id in range(number_of_clients)]

with concurrent.futures.ThreadPoolExecutor(max_workers=number_of_clients) as executor:
    for client in clients:
        executor.submit(client.change_queues)
    with concurrent.futures.ThreadPoolExecutor(max_workers=number_of_clients) as executor:
        for station in stations:
            executor.submit(station.moving_station)
        with concurrent.futures.ThreadPoolExecutor(max_workers=number_of_clients) as executor:
            for tray in trays:
                executor.submit(tray.giving_trays)
            with concurrent.futures.ThreadPoolExecutor(max_workers=number_of_clients) as executor:
                for food in foods:
                    executor.submit(food.getting_food)
</code>```

Body:
I am working on a buffet simulation of a buffet. So basically the client will first go through the payment. Then he should go to get his tray which is the part that does not work. After, he should go get his food.
I dont understand why the Clients are not going to the tray queue.
In fact, right-now the client is paying and then he his going directly to tale his food without taking a tray so something must be wrong in the class function but I can't figure what.

import threading
import random
import time
import concurrent.futures
import traceback

class Queue:
    def __init__(self) -> None:
        self.list_of_products = []
        self.queue = []
        self.lock = threading.Lock()
        self.bill = 0
        self.type_of_products = random.randrange(1, 4)

    def add_client(self, client):
        self.lock.acquire()
        self.queue.append(client)
        self.lock.release()

    def remove_client(self, client):
        self.lock.acquire()
        self.queue.remove(client)
        self.lock.release()

    def check_if_client_in_queue(self, client) -> bool:
        self.lock.acquire()
        student_in_queue = True if client in self.queue else False
        self.lock.release()
        return student_in_queue

    def check_if_empty(self) -> bool:
        self.lock.acquire()
        empty = len(self.queue) == 0
        self.lock.release()
        return empty

    def get_first_client(self):
        if not self.check_if_empty():
            return self.queue.pop(0)
        return None

    def result_of_random_range(self):
        x = self.type_of_products
        return x

    def paying(self):
        self.lock.acquire()
        if self.type_of_products == 1:
            self.list_of_products.append(self.type_of_products)#i think it is not appending
            self.bill = 1 * 25.90

        elif self.type_of_products == 2:
            self.list_of_products.append(self.type_of_products)
            self.bill = 1 * 17.90

        else:
            self.list_of_products.append(self.type_of_products)
            self.bill = 1 * 13.50

        type_of_payment = random.randrange(1, 3)
        if type_of_payment == 1:
            print("Client has to pay", self.bill, "and he is paying in cash")
            change = random.randrange(int(self.bill), round(int(self.bill) + 5)) - int(self.bill)
            print("Amount to be returned", change, "€")
        else:
            print("Client has to pay", self.bill, "and he is paying with his credit card")
        self.lock.release()
        return self.bill

    def tray(self):
        self.lock.acquire()
        random_fall = random.randrange(1,25)
        if random_fall != 1:
            print("Client got his Tray")
        else:
            print("Client dropped his tray")
            time.sleep(10)
        self.lock.release()

class Clients:
    def __init__(self, id, queues):
        self.id = id
        self.queues = queues
        if random.randrange(1, 3) == 1:
            self.queues["clients_waiting_to_pay_manually"].add_client(self)
        else:
            self.queues["clients_waiting_to_pay_automatically"].add_client(self)

    def __str__(self) -> str:
        return f"{self.id}"

    def change_queues(self) -> None:
        try:
            while True:
                if not self.queues["clients_waiting_to_pay_manually"].check_if_client_in_queue(self) and not \
                        self.queues["clients_waiting_to_pay_automatically"].check_if_client_in_queue(self):
                    break

                change_criteria = random.randrange(1, 10)
                if change_criteria != 1:
                    time.sleep(1)
                    continue
                print(f"Client with id {self.id} is gonna switch queue")
                if self.queues["clients_waiting_to_pay_manually"].check_if_client_in_queue(self):
                    self.queues["clients_waiting_to_pay_manually"].remove_client(self)
                    self.queues["clients_waiting_to_pay_automatically"].add_client(self)
                    time.sleep(1)
                    continue

                if self.queues["clients_waiting_to_pay_automatically"].check_if_client_in_queue(self):
                    self.queues["clients_waiting_to_pay_automatically"].remove_client(self)
                    self.queues["clients_waiting_to_pay_manually"].add_client(self)
                    time.sleep(1)
                    continue

        except Exception:
            traceback.print_exc()

class Station:
    def __init__(self, id, queues):
        self.id = id
        self.queues = queues

    def moving_station(self):
        try:

            while True:

                if not self.queues["clients_waiting_to_pay_automatically"].check_if_empty():
                    client = self.queues["clients_waiting_to_pay_automatically"].get_first_client()
                    print(f"Cashier {self.id}: Serving the client {client} in the automatic queue")
                    self.queues["clients_waiting_to_pay_automatically"].paying()
                    print(f"Client {client} has paid and is going to another station ")
                    self.queues["clients_getting_main_food"].add_client(client)
                    print(f"Client {client} is getting his food ")
                    time.sleep(2)

                elif not self.queues["clients_waiting_to_pay_manually"].check_if_empty():
                    client = self.queues["clients_waiting_to_pay_manually"].get_first_client()
                    print(f"Cashier {self.id}: Serving the client {client} in the manual queue")
                    self.queues["clients_waiting_to_pay_manually"].paying()
                    print(f"Client {client} has paid and is going to another station ")

                    self.queues["clients_getting_main_food"].add_client(client)
                    print(f"Client {client} is getting his food ")
                    time.sleep(2)

                else:
                    break

        except Exception:
            traceback.print_exc()
class Trays:
    def __init__(self,queues) -> None:
        self.queues = queues

    def giving_trays(self):
        try:
            while True:

                if self.queues["clients_waiting_for_tray"].check_if_empty():
                    print(f"There is no more clients waiting for a tray")
                    break

                elif not self.queues["clients_waiting_for_tray"].check_if_empty():
                    client = self.queues["clients_waiting_for_tray"].get_first_client()
                    print(f"{client} got his tray")

                    print(f"Client {client} just got his tray")
                    time.sleep(2)
                else:
                    break
        except Exception as e:
            traceback.print_exc()

class Main_food:
    def __init__(self,id,queues):
        self.id = id
        self.queues = queues

    def getting_food(self):
        pasta_menu = ["Carbonara ", "Pesto", "Basilico", "Bolognese", "Truffle", "Chicken Alfredo"]
        protein_menu = ["Beef","Pork","Fish","chicken","Beyond Meat","turkey"]
        pasta_stock = [2,1,4,5,6,3]
        protein_stock = [2,1,4,5,6,3]

        try:
            if not self.queues["clients_getting_main_food"].check_if_empty():
                client_getting_served = self.queues["clients_getting_main_food"].get_first_client()
                if self.queues["clients_waiting_to_pay_automatically"].result_of_random_range() == 1:
                    self.queues["clients_getting_menu_1"].add_client(client_getting_served)
                elif self.queues["clients_waiting_to_pay_manually"].result_of_random_range() == 1:
                            self.queues["clients_getting_menu_1"].add_client(client_getting_served)

                if self.queues["clients_waiting_to_pay_automatically"].result_of_random_range() == 2:
                    self.queues["clients_getting_menu_2"].add_client(client_getting_served)
                elif self.queues["clients_waiting_to_pay_manually"].result_of_random_range() == 2:
                            self.queues["clients_getting_menu_2"].add_client(client_getting_served)

                elif self.queues["clients_waiting_to_pay_manually"].result_of_random_range() == 3:
                    self.queues["clients_getting_menu_3"].add_client(client_getting_served)

                else:
                    self.queues["clients_getting_menu_3"].add_client(client_getting_served)

            x = random.randrange(0,6)
            y = random.randrange(0,6)
            stock = pasta_stock[x]
            stock1 = protein_stock[y]

            if not self.queues["clients_getting_menu_1"].check_if_empty():
                client_being_served_1 = self.queues["clients_getting_menu_1"].get_first_client()

                if stock != 0:
                    pasta_stock[x] = pasta_stock[x]-1
                if stock1 != 0:
                    protein_stock[y] = protein_stock[y]-1
                print(f"Client {client_being_served_1} is getting Pasta : {pasta_menu[x]} and Protein : {protein_menu[y]}")
                print(f"pasta {pasta_stock[x]} protein  {protein_stock[y]} ")
                self.queues["clients_getting_desert"].add_client(client_being_served_1)

            if not self.queues["clients_getting_menu_2"].check_if_empty():
                client_being_served_2 = self.queues["clients_getting_menu_2"].get_first_client()
                if stock != 0:
                    pasta_stock[x] = pasta_stock[x]-1
                print(f"Client {client_being_served_2} is getting Pasta :{pasta_menu[x]}")
                print(f"pasta2 {pasta_stock[x]} ")
                self.queues["clients_getting_desert"].add_client(client_being_served_2)

            elif not self.queues["clients_getting_menu_3"].check_if_empty():
                client_being_served_3 = self.queues["clients_getting_menu_3"].get_first_client()
                if stock1 != 0:
                    protein_stock[y] = protein_stock[y]-1
                print(f"Client {client_being_served_3} is getting Protein :{protein_menu[y]}")
                print(f"protein3  {protein_stock[y]} ")
                self.queues["clients_getting_desert"].add_client(client_being_served_3)

        except Exception as e:
            traceback.print_exc()

queues ={
    "clients_waiting_to_pay_manually": Queue(),
    "clients_waiting_to_pay_automatically": Queue(),
    "clients_waiting_for_tray": Queue(),
    "clients_getting_main_food": Queue(),
    "clients_not_getting_main_food": Queue(),
    "clients_getting_menu_1": Queue(),
    "clients_getting_menu_2": Queue(),
    "clients_getting_menu_3": Queue(),
    "clients_getting_desert": Queue()
}

number_of_cashiers = 3
number_of_clients = 10
clients = [Clients(id, queues) for id in range(number_of_clients)]
stations = [Station(id, queues) for id in range(number_of_clients)]
trays = [Trays(queues) for id in range(number_of_clients)]
foods = [Main_food(id, queues) for id in range(number_of_clients)]

with concurrent.futures.ThreadPoolExecutor(max_workers=number_of_clients) as executor:
    for client in clients:
        executor.submit(client.change_queues)
    with concurrent.futures.ThreadPoolExecutor(max_workers=number_of_clients) as executor:
        for station in stations:
            executor.submit(station.moving_station)
        with concurrent.futures.ThreadPoolExecutor(max_workers=number_of_clients) as executor:
            for tray in trays:
                executor.submit(tray.giving_trays)
            with concurrent.futures.ThreadPoolExecutor(max_workers=number_of_clients) as executor:
                for food in foods:
                    executor.submit(food.getting_food)


问:
FullCalendar Display wrong StartDateTime/EndDatetime adding double GMT value
We are using FullCalendar.io library to our Salesforce LWC component. I am using timeZone = 'local'.

When returning the events from Server, browser inspector shows proper data, but when we open 'Fullcalendar'
it displays wrong time on client side. It doubles the GMT value.

E.g Event StartTime from server = 12:00 but when I convert it to GMT+1 it converts it to 14:00 instead of 13:00. Ideally it should only add 1 hour as per GMT+1, but it adds 2 hours.

For India Case where timezone = GMT+5:30, it adds 11 hours instead of 5:30. Please share your thoughts?

Here is the code:

```<code>@wire(fetchEvents)
    eventObj(value){
        this.eventOriginalData = value; //To use in refresh cache
 ///////
        const {data, error} = value;
        if(data){

            //format as fullcalendar event object

            let events = data.map(event => {

                var sttime = new Date(event.StartDateTime);
                var etime = new Date(event.EndDateTime);

                var formattedStartTime = sttime.toString();
                var formattedEndTime = etime.toString();

                return { id : event.Id,
                        title : event.Subject,
                        start : formattedStartTime,
                        end : formattedEndTime};
            });
            this.events = JSON.parse(JSON.stringify(events));

            console.log(this.events);
            this.error = undefined;

            //load only on first wire call -
            // if events are not rendered, try to remove this 'if' condition and add directly
            if(! this.eventsRendered){
                //Add events to calendar
                const ele = this.template.querySelector("div.fullcalendarjs");
                $(ele).fullCalendar('renderEvents', this.events, true);
                this.eventsRendered = true;
            }
        }else if(error){
            this.events = [];
            this.error = 'No events are found';
        }
   }

</code>```

event.StartDateTime = 2022-12-07T12:00:00.000+0000 (Comming from Salesforce)
event.EndDateTime = 2022-12-07T13:00:00.000+0000 (Comming from Salesforce)

My TimeZone from where I open fullCalendar is GMT +1.

Tried with many different config. e.g toUTCString(). but still either it displays Server Original Date, or it converts and adds GMT double value.

Body:
We are using FullCalendar.io library to our Salesforce LWC component. I am using timeZone = 'local'.

When returning the events from Server, browser inspector shows proper data, but when we open 'Fullcalendar'
it displays wrong time on client side. It doubles the GMT value.

E.g Event StartTime from server = 12:00 but when I convert it to GMT+1 it converts it to 14:00 instead of 13:00. Ideally it should only add 1 hour as per GMT+1, but it adds 2 hours.

For India Case where timezone = GMT+5:30, it adds 11 hours instead of 5:30. Please share your thoughts?

Here is the code:

@wire(fetchEvents)
    eventObj(value){
        this.eventOriginalData = value; //To use in refresh cache
 ///////
        const {data, error} = value;
        if(data){

            //format as fullcalendar event object

            let events = data.map(event => {

                var sttime = new Date(event.StartDateTime);
                var etime = new Date(event.EndDateTime);

                var formattedStartTime = sttime.toString();
                var formattedEndTime = etime.toString();

                return { id : event.Id,
                        title : event.Subject,
                        start : formattedStartTime,
                        end : formattedEndTime};
            });
            this.events = JSON.parse(JSON.stringify(events));

            console.log(this.events);
            this.error = undefined;

            //load only on first wire call -
            // if events are not rendered, try to remove this 'if' condition and add directly
            if(! this.eventsRendered){
                //Add events to calendar
                const ele = this.template.querySelector("div.fullcalendarjs");
                $(ele).fullCalendar('renderEvents', this.events, true);
                this.eventsRendered = true;
            }
        }else if(error){
            this.events = [];
            this.error = 'No events are found';
        }
   }

event.StartDateTime = 2022-12-07T12:00:00.000+0000 (Comming from Salesforce)
event.EndDateTime = 2022-12-07T13:00:00.000+0000 (Comming from Salesforce)

My TimeZone from where I open fullCalendar is GMT +1.

Tried with many different config. e.g toUTCString(). but still either it displays Server Original Date, or it converts and adds GMT double value.


问:
How to set a cap and a floor to predictions with Neural Prophet (new version of Prophet)
Using NeuralProphet package for financial forecasting, I'm trying to set a minimum value (floor) and a maximum value (cap) for my predictions, for example not to forecast negative values nor too large values.

I found this document about saturating forecasts in Prophet :
https://facebook.github.io/prophet/docs/saturating_forecasts.html#forecasting-growth
But this method does not work with NeuralProphet. The logistic function for growth is not available and I get the following error when I create the ['cap'] and ['floor'] columns in my dataset :
ValueError: Unexpected column {name} in data
I can't find any information in the documentation of NeuralProphet.
Any idea of a proper way to do it ?
Thank you!


问:
Spring bootTest Set up wiremock stub before application start
I have a bean which connects to external server during initializtion.

```<code>public class DataRefreshService {

  private List<String> relations = null;

  MyFeignClient myClient;

  @Autowired
  public DataRefreshService(MyFeignClient myClient) {
    this.myClient = myClient;
    this.relations  = myClient.getRelations();
  }

  }
</code>```

I am trying to write spring integration test for the application

My client connects to another application, and gethe data from other server by http
path: api/v1/getRelations

I am trying to write the integration test.

But the application start is failing

I have also introduced stub using wiremock

```<code>@SpringBootTest(classes = Application.class, webEnvironment = WebEnvironment.DEFINED_PORT)
@AutoConfigureMockMvc
@FlywayTest
@AutoConfigureWireMock
@TestPropertySource("classpath:test-application.properties")
public class SpringGlue {

  @BeforeTestExecution
  void setup() throws JsonProcessingException {
    ObjectMapper mapper = new ObjectMapper();
    stubFor(get(urlEqualTo("api/v1/getRelations"))
        .willReturn(aResponse()
            .withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
            .withStatus(HttpStatus.OK.value())
            .withBody(mapper.writeValueAsString(Arrays.asList("1", "2")))));
  }

}
</code>```

wiremovk stub not working. I am getting connection refused exception

Body:
I have a bean which connects to external server during initializtion.

public class DataRefreshService {

  private List<String> relations = null;

  MyFeignClient myClient;

  @Autowired
  public DataRefreshService(MyFeignClient myClient) {
    this.myClient = myClient;
    this.relations  = myClient.getRelations();
  }

  }

I am trying to write spring integration test for the application

My client connects to another application, and gethe data from other server by http
path: api/v1/getRelations

I am trying to write the integration test.

But the application start is failing

I have also introduced stub using wiremock

@SpringBootTest(classes = Application.class, webEnvironment = WebEnvironment.DEFINED_PORT)
@AutoConfigureMockMvc
@FlywayTest
@AutoConfigureWireMock
@TestPropertySource("classpath:test-application.properties")
public class SpringGlue {

  @BeforeTestExecution
  void setup() throws JsonProcessingException {
    ObjectMapper mapper = new ObjectMapper();
    stubFor(get(urlEqualTo("api/v1/getRelations"))
        .willReturn(aResponse()
            .withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
            .withStatus(HttpStatus.OK.value())
            .withBody(mapper.writeValueAsString(Arrays.asList("1", "2")))));
  }

}

wiremovk stub not working. I am getting connection refused exception


问:
Azure Maps, how to improve the performance when i have 50 000 features in the map
So, i'm developing an android app, using JAVA with the azure maps. Currently im happy with the result, but when im zoomed out, meaning that i have 50 000 points rendered on my map, i have a little lag when moving the camera arround, or when i zoom in, it seems like the map is rendering all the points again. Is there a way to improve performance ?
Im using a geojson, passing him into a FeatureCollection.
As im rendering asset farms, i can reduce the points that are rendered  when zoomed out, by making tables of modules, like, when im zoomed out, i dont really need the features to be rendered. Give me your best ideas pls.</p>


问:
Why Gluon Mobile app for android platform fail to compile on wsl Ubuntu 20.04 LTS?
I am trying to develop android apk file by using wsl Ubuntu 20.04 LTS with maven plugins. I followed all requirements from https://docs.gluonhq.com/ and I have managed to perform some tasks correctly. The problem arise when running command
mvn -Pandroid gluonfx:build , compiling task failed and throws outputs as:

```<code>[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< com.gluonmaven.linux:gluonmavenlinux >----------------
[INFO] Building GluonMavenLinux 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- gluonfx-maven-plugin:1.0.16:build (default-cli) @ gluonmavenlinux ---
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< com.gluonmaven.linux:gluonmavenlinux >----------------
[INFO] Building GluonMavenLinux 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> gluonfx-maven-plugin:1.0.16:compile (default-cli) > process-classes @ gluonmavenlinux >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ gluonmavenlinux ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ gluonmavenlinux ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files to /mnt/d/Epicstats/GluonMavenLinux/target/classes
[INFO]
[INFO] <<< gluonfx-maven-plugin:1.0.16:compile (default-cli) < process-classes @ gluonmavenlinux <<<
[INFO]
[INFO]
[INFO] --- gluonfx-maven-plugin:1.0.16:compile (default-cli) @ gluonmavenlinux ---
[Tue Dec 06 15:05:28 EAT 2022][INFO] ==================== COMPILE TASK ====================
             _______  ___      __   __  _______  __    _
            |       ||   |    |  | |  ||       ||  |  | |
            |    ___||   |    |  | |  ||   _   ||   |_| |
            |   | __ |   |    |  |_|  ||  | |  ||       |
            |   ||  ||   |___ |       ||  |_|  ||  _    |
            |   |_| ||       ||       ||       || | |   |
            |_______||_______||_______||_______||_|  |__|

    Access to the latest docs, tips and tricks and more info on
[Tue Dec 06 15:05:30 EAT 2022][INFO] We will now compile your code for aarch64-linux-android. This may take some time.
    how to get support? Register your usage of Gluon Substrate now at

    https://gluonhq.com/activate

[Tue Dec 06 15:05:30 EAT 2022][SEVERE] Process compile-additional-sources failed with result: 2
Check the log files under /mnt/d/Epicstats/GluonMavenLinux/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
[Tue Dec 06 15:05:30 EAT 2022][INFO] Logging process [compile-additional-sources] to file: /mnt/d/Epicstats/GluonMavenLinux/target/gluonfx/log/process-compile-additional-sources-1670328330610.log
[Tue Dec 06 15:05:30 EAT 2022][SEVERE] Compiling failed.
Check the log files under /mnt/d/Epicstats/GluonMavenLinux/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  8.542 s
[INFO] Finished at: 2022-12-06T15:05:30+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.16:compile (default-cli) on project gluonmavenlinux: Compiling failed -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  13.094 s
[INFO] Finished at: 2022-12-06T15:05:30+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.16:build (default-cli) on project gluonmavenlinux: Error, gluonfx:build failed -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.16:build (default-cli) on project gluonmavenlinux: Error, gluonfx:build failed
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error, gluonfx:build failed
    at com.gluonhq.NativeBuildMojo.execute (NativeBuildMojo.java:82)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
</code>```

I have tried to resolve the problem by not running mvn -Pandroid gluonfx:build
and running mvn -Pandroid gluonfx:compile but the problem still exit. Later on I discovered that gluonfx:build is a combination of gluonfx:compile and gluonfx:link

Where might I be making mistakes, anyone who has an Idea.

I am using:
JDK 11
apache-maven-3.8.1
android-ndk-r25b
graalvm-svm-java11-linux-gluon-22.1.0.1-Final

Body:
I am trying to develop android apk file by using wsl Ubuntu 20.04 LTS with maven plugins. I followed all requirements from https://docs.gluonhq.com/ and I have managed to perform some tasks correctly. The problem arise when running command
mvn -Pandroid gluonfx:build , compiling task failed and throws outputs as:

[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< com.gluonmaven.linux:gluonmavenlinux >----------------
[INFO] Building GluonMavenLinux 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- gluonfx-maven-plugin:1.0.16:build (default-cli) @ gluonmavenlinux ---
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< com.gluonmaven.linux:gluonmavenlinux >----------------
[INFO] Building GluonMavenLinux 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> gluonfx-maven-plugin:1.0.16:compile (default-cli) > process-classes @ gluonmavenlinux >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ gluonmavenlinux ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ gluonmavenlinux ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files to /mnt/d/Epicstats/GluonMavenLinux/target/classes
[INFO]
[INFO] <<< gluonfx-maven-plugin:1.0.16:compile (default-cli) < process-classes @ gluonmavenlinux <<<
[INFO]
[INFO]
[INFO] --- gluonfx-maven-plugin:1.0.16:compile (default-cli) @ gluonmavenlinux ---
[Tue Dec 06 15:05:28 EAT 2022][INFO] ==================== COMPILE TASK ====================
             _______  ___      __   __  _______  __    _
            |       ||   |    |  | |  ||       ||  |  | |
            |    ___||   |    |  | |  ||   _   ||   |_| |
            |   | __ |   |    |  |_|  ||  | |  ||       |
            |   ||  ||   |___ |       ||  |_|  ||  _    |
            |   |_| ||       ||       ||       || | |   |
            |_______||_______||_______||_______||_|  |__|

    Access to the latest docs, tips and tricks and more info on
[Tue Dec 06 15:05:30 EAT 2022][INFO] We will now compile your code for aarch64-linux-android. This may take some time.
    how to get support? Register your usage of Gluon Substrate now at

    https://gluonhq.com/activate

[Tue Dec 06 15:05:30 EAT 2022][SEVERE] Process compile-additional-sources failed with result: 2
Check the log files under /mnt/d/Epicstats/GluonMavenLinux/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
[Tue Dec 06 15:05:30 EAT 2022][INFO] Logging process [compile-additional-sources] to file: /mnt/d/Epicstats/GluonMavenLinux/target/gluonfx/log/process-compile-additional-sources-1670328330610.log
[Tue Dec 06 15:05:30 EAT 2022][SEVERE] Compiling failed.
Check the log files under /mnt/d/Epicstats/GluonMavenLinux/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  8.542 s
[INFO] Finished at: 2022-12-06T15:05:30+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.16:compile (default-cli) on project gluonmavenlinux: Compiling failed -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  13.094 s
[INFO] Finished at: 2022-12-06T15:05:30+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.16:build (default-cli) on project gluonmavenlinux: Error, gluonfx:build failed -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.16:build (default-cli) on project gluonmavenlinux: Error, gluonfx:build failed
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error, gluonfx:build failed
    at com.gluonhq.NativeBuildMojo.execute (NativeBuildMojo.java:82)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

I have tried to resolve the problem by not running mvn -Pandroid gluonfx:build
and running mvn -Pandroid gluonfx:compile but the problem still exit. Later on I discovered that gluonfx:build is a combination of gluonfx:compile and gluonfx:link

Where might I be making mistakes, anyone who has an Idea.

I am using:
JDK 11
apache-maven-3.8.1
android-ndk-r25b
graalvm-svm-java11-linux-gluon-22.1.0.1-Final


问:
React - TailwindCSS | Vertically and horizotally centered elements using display: flex disappears above the screen
Context:

I have a ReactJS App using Tailwind CSS.

My body have two classes : bg-black text-white

This is the code of my "Sign up" page :

```<code><div className="flex items-center justify-center h-screen max-w-screen-lg mx-auto min-h-min">
    <div className="md:flex items-center justify-center w-full px-4">
        <div className="md:w-1/2 md:mb-0 mb-24">
            <h1 className="text-5xl font-bold text-white text-center">pongBSD</h1>
        </div>
        <div className="md:w-1/2 max-w-sm mx-auto">
            <div className="w-full">
                <a href="#" className="w-full block bg-gradient-to-br from-gray-600 to-slate-600 hover:from-slate-500 hover:to-slate-500 text-white text-center font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline">
                    connect with 42
                </a>
            </div>
            <div className="w-full my-12 bg-gray-300 h-1"></div>
            <h1 className="text-xl font-bold text-white text-center mb-8">or sign up with email</h1>
            <form className="w-full">
                <div className="md:flex">
                    <div className="mb-6 md:mr-3">
                        <label className="block text-gray-500 font-bold mb-1 pr-4" for="inline-first-name">
                            first name
                        </label>
                        <input className="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-indigo-500 placeholder:appearance-none" id="inline-first-name" type="text" placeholder="John" />
                    </div>
                    <div className="mb-6 md:ml-3">
                        <label className="block text-gray-500 font-bold mb-1 pr-4" for="inline-last-name">
                            last name
                        </label>
                        <input className="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-indigo-500 placeholder:appearance-none" id="inline-last-name" type="text" placeholder="Doe" />
                    </div>
                </div>
                <div className="mb-6">
                    <label className="block text-gray-500 font-bold mb-1 pr-4" for="inline-username">
                        username
                    </label>
                    <input className="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-indigo-500 placeholder:appearance-none" id="inline-username" type="text" placeholder="owt-ytrof" />
                </div>
                <div className="mb-6">
                    <label className="block text-gray-500 font-bold mb-1 pr-4" for="inline-email">
                        email
                    </label>
                    <input className="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-indigo-500 placeholder:appearance-none" id="inline-email" type="email" placeholder="email@example.com" />
                </div>
                <div className="mb-12">
                    <label className="block text-gray-500 font-bold mb-1 pr-4" for="inline-password">
                        password
                    </label>
                    <input className="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-indigo-500" id="inline-password" type="password" placeholder="********" />
                </div>
                <button className="w-full bg-gradient-to-br from-indigo-600 to-purple-600 hover:from-indigo-500 hover:to-purple-500 focus:shadow-outline focus:outline-none text-white font-bold py-2 px-4 rounded" type="button">
                    sign up
                </button>
                <div className="text-white text-xs mt-3 text-center">
                    already registered?
                    <br />
                    <a href="#" className="underline hover:text-green-600">
                        go to the login page
                    </a>
                </div>
            </form>
        </div>
    </div>
</div>
</code>```

It looks like this on small screens : https://ibb.co/F0cx4T9

From the medium size screens it looks like this: https://ibb.co/3f7MycL

But i created these images using a 2K computer screen.
If i am on a smartphone the pongBSD text disappear behind the web browser interface : https://ibb.co/k254WHz

Unfortunately I couldn't find a solution to prevent the text to go up higher than the beginning of the page. Do you have an idea to solve this problem?

I tried to set margin top, position fixed...

Body:
Context:

I have a ReactJS App using Tailwind CSS.

My body have two classes : bg-black text-white

This is the code of my "Sign up" page :

pongBSD

                    connect with 42

or sign up with email

            <form className="w-full">

                            first name

                        <input className="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-indigo-500 placeholder:appearance-none" id="inline-first-name" type="text" placeholder="John" />

                            last name

                        <input className="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-indigo-500 placeholder:appearance-none" id="inline-last-name" type="text" placeholder="Doe" />

                        username

                    <input className="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-indigo-500 placeholder:appearance-none" id="inline-username" type="text" placeholder="owt-ytrof" />

                        email

                    <input className="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-indigo-500 placeholder:appearance-none" id="inline-email" type="email" placeholder="email@example.com" />

                        password

                    <input className="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-indigo-500" id="inline-password" type="password" placeholder="********" />

                <button className="w-full bg-gradient-to-br from-indigo-600 to-purple-600 hover:from-indigo-500 hover:to-purple-500 focus:shadow-outline focus:outline-none text-white font-bold py-2 px-4 rounded" type="button">
                    sign up
                </button>

                    already registered?

                        go to the login page

            </form>

It looks like this on small screens : https://ibb.co/F0cx4T9

From the medium size screens it looks like this: https://ibb.co/3f7MycL

But i created these images using a 2K computer screen.
If i am on a smartphone the pongBSD text disappear behind the web browser interface : https://ibb.co/k254WHz

Unfortunately I couldn't find a solution to prevent the text to go up higher than the beginning of the page. Do you have an idea to solve this problem?

I tried to set margin top, position fixed...


问:
Alertmanager Webhook configuration for multiple alertId under same receiver
I am currently working on Alert manager and trying to handle multiple Alerts from Prometheus with different Id under same receiver:

```<code>global:
  resolve_timeout: 5m

route:
  group_by: ['alertname']
  group_wait: 10s
  group_interval: 10s
  receiver: 'web.hook'
  routes:
   - receiver: "web.hook"
     continue: true

   - receiver: "abc.hook"
     match:
       id: 1234567
       severity: CRITICAL
     continue: true

receivers:
- name: 'abc.hook'
  webhook_configs:
  - url: 'http://localhost:8080/services/alert'

- name: 'web.hook'
  webhook_configs:
  - url: 'http://localhost:8005/'
inhibit_rules:
  - source_match:
      severity: 'critical'
    target_match:
      severity: 'warning'
    equal: ['alertname', 'dev', 'instance']

</code>```

So in above configuration under **route ** section, we have routes which contains receiver with name: "abc.hook"

I have two alerts with different Id (1234567 and 8765432)

```<code>   - receiver: "abc.hook"
     match:
       id: 1234567
       severity: CRITICAL
     continue: true
</code>```

Is it possible to allow both alerts with different Ids(1234567 and 8765432) under receiver mentioned above.

I tried finding something like this over google but found nothing helpful.

I also tried something like this:

```<code>   - receiver: "abc.hook"
     match:
       id: 1234567|8765432
       severity: CRITICAL
     continue: true
</code>```

Any helpful information how to achieve above scenario will be appreciated.

Body:
I am currently working on Alert manager and trying to handle multiple Alerts from Prometheus with different Id under same receiver:

global:
  resolve_timeout: 5m

route:
  group_by: ['alertname']
  group_wait: 10s
  group_interval: 10s
  receiver: 'web.hook'
  routes:
   - receiver: "web.hook"
     continue: true

   - receiver: "abc.hook"
     match:
       id: 1234567
       severity: CRITICAL
     continue: true

receivers:
- name: 'abc.hook'
  webhook_configs:
  - url: 'http://localhost:8080/services/alert'

- name: 'web.hook'
  webhook_configs:
  - url: 'http://localhost:8005/'
inhibit_rules:
  - source_match:
      severity: 'critical'
    target_match:
      severity: 'warning'
    equal: ['alertname', 'dev', 'instance']

So in above configuration under **route ** section, we have routes which contains receiver with name: "abc.hook"

I have two alerts with different Id (1234567 and 8765432)

   - receiver: "abc.hook"
     match:
       id: 1234567
       severity: CRITICAL
     continue: true

Is it possible to allow both alerts with different Ids(1234567 and 8765432) under receiver mentioned above.

I tried finding something like this over google but found nothing helpful.

I also tried something like this:

   - receiver: "abc.hook"
     match:
       id: 1234567|8765432
       severity: CRITICAL
     continue: true

Any helpful information how to achieve above scenario will be appreciated.


问:
litecoin debian 'base-precise-amd64':no such file or directory (ERROR)
Me and my friends are trying to develop an application connected to the blockchain system.We were using aqua coin videos(he develops on litecoin) on youtube for this. But we got an error somewhere and we can't solve it. The error is here:

```<code>
debian@debian:~$ cd gitian-builder/
debian@debian:~/gitian-builder$ ./bin/gbuild ../recyclecoin/contrib/gitian-descriptors/boost-win32.yml mv build/out/boost-*.zip inputs/
--- Building for precise amd64 ---
Stopping target if it is up

Making a new image copy
cp: 'base-precise-amd64' failed to state: No such file or directory
Traceback (most recent call last):
        6: from ./bin/gbuild:347:in `<main>'
        5: from ./bin/gbuild:347:in `each'
        4: from ./bin/gbuild:349:in `block in <main>'
        3: from ./bin/gbuild:349:in `each'
        2: from ./bin/gbuild:354:in `block (2 levels) in <main>'
        1: from ./bin/gbuild:60:in `build_one_configuration'
./bin/gbuild:23:in `system!': failed to run make-clean-vm --suite precise --arch amd64 (RuntimeError)

</code>```

We did not observe any incompatibility between packages. All our systems are also installed.

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

Body:
Me and my friends are trying to develop an application connected to the blockchain system.We were using aqua coin videos(he develops on litecoin) on youtube for this. But we got an error somewhere and we can't solve it. The error is here:

debian@debian:~$ cd gitian-builder/
debian@debian:~/gitian-builder$ ./bin/gbuild ../recyclecoin/contrib/gitian-descriptors/boost-win32.yml mv build/out/boost-*.zip inputs/
--- Building for precise amd64 ---
Stopping target if it is up

Making a new image copy
cp: 'base-precise-amd64' failed to state: No such file or directory
Traceback (most recent call last):
        6: from ./bin/gbuild:347:in `'
        5: from ./bin/gbuild:347:in `each'
        4: from ./bin/gbuild:349:in `block in '
        3: from ./bin/gbuild:349:in `each'
        2: from ./bin/gbuild:354:in `block (2 levels) in '
        1: from ./bin/gbuild:60:in `build_one_configuration'
./bin/gbuild:23:in `system!': failed to run make-clean-vm --suite precise --arch amd64 (RuntimeError)

We did not observe any incompatibility between packages. All our systems are also installed.


问:
How to separate plots from subplots and plot correctly?
```<code>I am trying to plot the following sample table:
</code>```

Time Period
HR
Legal
Fin
Leadership
Market
UX
CX

01/04/2021
6.39
5.81
7.53
7.16
6.78
7.25
7.40
7.47
6.20

01/07/2021
6.95
6.25
7.46
7.16
7.05
7.51
7.70
7.83
6.69

01/10/2021
7.41
6.43
7.65
7.50
7.25
7.74
8.00
8.04
6.90

01/01/2022
7.51
6.51
7.74
7.52
8.00
7.84
8.10
8.04
7.05

01/04/2022
7.70
6.91
7.86
7.59
7.69
7.81
8.13
8.47
7.30

01/07/2022
7.80
6.60
7.50
7.50
7.80
7.50
7.70
7.90
7.15

```<code>(Please note there are 11 columns but all of them cannot be included)
</code>```

This is the code I am using:

```<code>import pandas as pd
from datetime import date, timedelta
import datetime
import matplotlib.pyplot as plt
plt.style.use('fivethirtyeight')
from statsmodels.tsa.seasonal import seasonal_decompose
from statsmodels.graphics.tsaplots import plot_pacf
from statsmodels.tsa.arima_model import ARIMA
import statsmodels.api as sm
import warnings

from plotly.offline import download_plotlyjs, init_notebook_mode,  plot
from plotly.graph_objs import *
init_notebook_mode()

'set filepath'

data = pd.read_csv(inputfilepath, parse_dates=["Time Period"], index_col = "Time Period")

print(data.shape)

'Convert column from object to datetime'

#data["Time Period"] = pd.to_datetime(data['Time Period'], format="%d/%m/%Y")

data

fig, axes = plt.subplots(nrows=3, ncols=4, dpi=110, figsize=(10,6))
#axes.axis("off")
for i, ax in enumerate(axes.flatten()):
    macro_data = data[data.columns[i]]
    ax.plot(data, color='red', linewidth=1)
    # Decorations
    ax.set_title(data.columns[i], fontsize = 10)
    ax.xaxis.set_ticks_position('none')
    ax.yaxis.set_ticks_position('none')
    ax.spines["top"].set_alpha(0)
    ax.tick_params(labelsize=6)

plt.tight_layout();
</code>```

I end up with 11 duplicated sub plots and each subplot has 11 lines across it. I want one line for each subplot to see each plot individually to compare. And, The plot is definitely wrong since the lines are not changing their gradients between each time period. Here is what I see:

And here is what I would (ideally want)

For reference, I am using the guide found here:
https://github.com/nachi-hebbar/Multivariate-Time-Series-Forecasting/blob/main/VAR_Model%20(1).ipynb

Body:
I am trying to plot the following sample table:

Time Period
HR
Legal
Fin
Leadership
Market
UX
CX

01/04/2021
6.39
5.81
7.53
7.16
6.78
7.25
7.40
7.47
6.20

01/07/2021
6.95
6.25
7.46
7.16
7.05
7.51
7.70
7.83
6.69

01/10/2021
7.41
6.43
7.65
7.50
7.25
7.74
8.00
8.04
6.90

01/01/2022
7.51
6.51
7.74
7.52
8.00
7.84
8.10
8.04
7.05

01/04/2022
7.70
6.91
7.86
7.59
7.69
7.81
8.13
8.47
7.30

01/07/2022
7.80
6.60
7.50
7.50
7.80
7.50
7.70
7.90
7.15

(Please note there are 11 columns but all of them cannot be included)

This is the code I am using:

import pandas as pd
from datetime import date, timedelta
import datetime
import matplotlib.pyplot as plt
plt.style.use('fivethirtyeight')
from statsmodels.tsa.seasonal import seasonal_decompose
from statsmodels.graphics.tsaplots import plot_pacf
from statsmodels.tsa.arima_model import ARIMA
import statsmodels.api as sm
import warnings

from plotly.offline import download_plotlyjs, init_notebook_mode,  plot
from plotly.graph_objs import *
init_notebook_mode()

'set filepath'

data = pd.read_csv(inputfilepath, parse_dates=["Time Period"], index_col = "Time Period")

print(data.shape)

'Convert column from object to datetime'

#data["Time Period"] = pd.to_datetime(data['Time Period'], format="%d/%m/%Y")

data

fig, axes = plt.subplots(nrows=3, ncols=4, dpi=110, figsize=(10,6))
#axes.axis("off")
for i, ax in enumerate(axes.flatten()):
    macro_data = data[data.columns[i]]
    ax.plot(data, color='red', linewidth=1)
    # Decorations
    ax.set_title(data.columns[i], fontsize = 10)
    ax.xaxis.set_ticks_position('none')
    ax.yaxis.set_ticks_position('none')
    ax.spines["top"].set_alpha(0)
    ax.tick_params(labelsize=6)

plt.tight_layout();

I end up with 11 duplicated sub plots and each subplot has 11 lines across it. I want one line for each subplot to see each plot individually to compare. And, The plot is definitely wrong since the lines are not changing their gradients between each time period. Here is what I see:

And here is what I would (ideally want)

For reference, I am using the guide found here:
https://github.com/nachi-hebbar/Multivariate-Time-Series-Forecasting/blob/main/VAR_Model%20(1).ipynb


问:
How to normalize labels which looks like distribution?
I'm trying to predict volume (crypto pair) in sections (from price_x to price_x*1.01). I'm using data centered by price weighted by previous time period. Column names are distance from center, all sections are the same length in percentage. It's timeseries data, features are past periods and meta data (std, scatter in period). It's -5000:5000 spacing by 50 sections, total labels number = 200. I predict all 200 numbers at once. Dense, LSTM, Linear models are used.

```<code>   -100             -50             0               50              100

0   1.105261e-16    2.434281e-16    1.381630e-15    3.014220e-15    2.550750e-15
1   0.000000e+00    2.107176e-16    1.714766e-15    3.744517e-15    3.445880e-15
2   1.320276e-15    2.183299e-15    2.900393e-15    8.692374e-16    9.370256e-16
3   2.658839e-15    3.123365e-15    4.178974e-15    3.852313e-15    4.513380e-15
4   3.206895e-16    4.425796e-16    2.227691e-16    2.076615e-16    1.569196e-15
</code>```

What options can I try to normalize this type of labels when some of labels much bigger (close to center) than other (tails)?
I tried to norm all labels by max, min / mean, std. But I get big mistakes in tails  and in center of distribution. Normalize independent each section gave weird results with big mistakes everywhere. Now I'm thinking about normalize independent sections [-5000:-1000 1000:5000; -1000:-200 200:1000; -200:200].

Body:
I'm trying to predict volume (crypto pair) in sections (from price_x to price_x*1.01). I'm using data centered by price weighted by previous time period. Column names are distance from center, all sections are the same length in percentage. It's timeseries data, features are past periods and meta data (std, scatter in period). It's -5000:5000 spacing by 50 sections, total labels number = 200. I predict all 200 numbers at once. Dense, LSTM, Linear models are used.

   -100             -50             0               50              100

0   1.105261e-16    2.434281e-16    1.381630e-15    3.014220e-15    2.550750e-15
1   0.000000e+00    2.107176e-16    1.714766e-15    3.744517e-15    3.445880e-15
2   1.320276e-15    2.183299e-15    2.900393e-15    8.692374e-16    9.370256e-16
3   2.658839e-15    3.123365e-15    4.178974e-15    3.852313e-15    4.513380e-15
4   3.206895e-16    4.425796e-16    2.227691e-16    2.076615e-16    1.569196e-15

What options can I try to normalize this type of labels when some of labels much bigger (close to center) than other (tails)?
I tried to norm all labels by max, min / mean, std. But I get big mistakes in tails  and in center of distribution. Normalize independent each section gave weird results with big mistakes everywhere. Now I'm thinking about normalize independent sections [-5000:-1000 1000:5000; -1000:-200 200:1000; -200:200].


问:
Xamarin Android SDK is not found
I am under Ubuntu 22.04 and I want to do C# development (Web, Mobile and Unity) for this I installed the software RIDER from JetBrains but there is an error when creating a Xamarin Forms project which is the following ""Xamarin Android SDK is not found"".
Can you help me to solve this problem please?

I would like you to propose a solution

Title: Xamarin Android SDK is not found


问:
CSV example import issue in NebulaGraph Database
I tried to import the example with nebula graph importer and the sample script file provided at https://docs.nebula-graph.io/3.1.0/nebula-importer/config-without-header/ . Script throw the following error:
2022/06/03 13:37:29 yaml: line 94: did not find expected key

I tried to customize the script with my own data and encounter the same issue.
What's wrong?


问:
AJAX Filter Posts. Changing select options to button group
I'm trying to search and filter posts by category and have it working by using the below code.

But instead of using a select dropdown I'd like to change this to a button group.

Current working code

```<code><form action="/" method="get" autocomplete="off" id="product_search">
<input type="text" name="s" placeholder="Search Knowedge Hub" id="keyword" class="input_search" onkeyup="fetch()">
<select name="cat" id="cat" onchange="fetch()">
    <option value="">All Categories</option>
    <?php
    $terms = get_terms(array(
        'post_type' => 'cpt_knowledge',
        'taxonomy'   => 'category',
        'hide_empty' => true,
    ));

    foreach ($terms as $term) {
        echo '<option value="' . $term->term_id . '"> ' . $term->name . ' </option>';
    }
    ?>
</select>
</code>```

Ajax Call

```<code>    add_action('wp_footer', 'ajax_fetch');
function ajax_fetch() { ?>
    <script type="text/javascript">
        function fetch() {

            jQuery.ajax({
                url: '<?php echo admin_url('admin-ajax.php'); ?>',
                type: 'post',
                data: {
                    action: 'data_fetch',
                    keyword: jQuery('#keyword').val(),
                    pcat: jQuery('#cat').val()
                },
                success: function(data) {
                    jQuery('#datafetch').html(data);
                }
            });

        }
    </script>

<?php }
add_action('wp_ajax_data_fetch', 'data_fetch');
add_action('wp_ajax_nopriv_data_fetch', 'data_fetch');
function data_fetch() {
    if ($_POST['pcat']) {
        $product_cat_id = array(esc_attr($_POST['pcat']));
    } else {
        $terms = get_terms('category');
        $product_cat_id = wp_list_pluck($terms, 'term_id');
    }
    $the_query = new WP_Query(array('posts_per_page' => - 1, 's' => esc_attr($_POST['keyword']), 'post_type' => array('cpt_knowledge'), 'tax_query' => array(array('taxonomy' => 'category', 'field' => 'term_id', 'terms' => $product_cat_id, 'operator' => 'IN',))));
    if ($the_query->have_posts()):
        while ($the_query->have_posts()):
            $the_query->the_post(); ?>
            <?php knowledge::render(); ?>
    <?php
        endwhile;
        wp_reset_postdata();
    endif;
    die();
}
</code>```

I think I need to use something similar to the below, but need to change the ajax call pcat: jQuery('#cat').val() to onclick or something like that.

```<code><div class="c-button-group" name="cat" id="cat" onchange="fetch()">
<button value="">All Categories</button>
    <?php

    // Product category Loop

    $terms = get_terms(array(
        'post_type' => 'cpt_knowledge',
        'taxonomy'   => 'category',
        'hide_empty' => true,
    ));

    // Loop through all category with a foreach loop
    foreach ($terms as $term) {
        echo '<button class="c-button" value="' . $term->term_id . '"> ' . $term->name . ' </button>';
    }
    ?>
</code>```

Could anyone help please?

EDIT.

I've got closer with this code link The search bar is still working and an Ajax call is being made when clicking on the category buttons, but the posts aren't refreshing.

Body:
I'm trying to search and filter posts by category and have it working by using the below code.

But instead of using a select dropdown I'd like to change this to a button group.

Current working code

<form action="/" method="get" autocomplete="off" id="product_search">
<input type="text" name="s" placeholder="Search Knowedge Hub" id="keyword" class="input_search" onkeyup="fetch()">
<select name="cat" id="cat" onchange="fetch()">
    <option value="">All Categories</option>
    <?php
    $terms = get_terms(array(
        'post_type' => 'cpt_knowledge',
        'taxonomy'   => 'category',
        'hide_empty' => true,
    ));

    foreach ($terms as $term) {
        echo '<option value="' . $term->term_id . '"> ' . $term->name . ' </option>';
    }
    ?>
</select>

Ajax Call

    add_action('wp_footer', 'ajax_fetch');
function ajax_fetch() { ?>

<?php }
add_action('wp_ajax_data_fetch', 'data_fetch');
add_action('wp_ajax_nopriv_data_fetch', 'data_fetch');
function data_fetch() {
    if ($_POST['pcat']) {
        $product_cat_id = array(esc_attr($_POST['pcat']));
    } else {
        $terms = get_terms('category');
        $product_cat_id = wp_list_pluck($terms, 'term_id');
    }
    $the_query = new WP_Query(array('posts_per_page' => - 1, 's' => esc_attr($_POST['keyword']), 'post_type' => array('cpt_knowledge'), 'tax_query' => array(array('taxonomy' => 'category', 'field' => 'term_id', 'terms' => $product_cat_id, 'operator' => 'IN',))));
    if ($the_query->have_posts()):
        while ($the_query->have_posts()):
            $the_query->the_post(); ?>
            <?php knowledge::render(); ?>
    <?php
        endwhile;
        wp_reset_postdata();
    endif;
    die();
}

I think I need to use something similar to the below, but need to change the ajax call pcat: jQuery('#cat').val() to onclick or something like that.

<button value="">All Categories</button>
    <?php

    // Product category Loop

    $terms = get_terms(array(
        'post_type' => 'cpt_knowledge',
        'taxonomy'   => 'category',
        'hide_empty' => true,
    ));

    // Loop through all category with a foreach loop
    foreach ($terms as $term) {
        echo '<button class="c-button" value="' . $term->term_id . '"> ' . $term->name . ' </button>';
    }
    ?>

Could anyone help please?

EDIT.

I've got closer with this code link The search bar is still working and an Ajax call is being made when clicking on the category buttons, but the posts aren't refreshing.


问:
How to get list of "System Administration/Information Functions" of postgresql
I need to get "System Administration/Information Functions" of PostgreSQL either via QUERY or JAVA to restrict those functions in my server.

I tried the below query which returns all functions of PostgreSQL where I need "System Administration/Information Functions" alone.

```<code>SELECT * FROM information_schema.routines
</code>```

can anyone help with this?

Expected to return "System Administration/Information Functions"

Body:
I need to get "System Administration/Information Functions" of PostgreSQL either via QUERY or JAVA to restrict those functions in my server.

I tried the below query which returns all functions of PostgreSQL where I need "System Administration/Information Functions" alone.

SELECT * FROM information_schema.routines

can anyone help with this?

Expected to return "System Administration/Information Functions"


问:
Simple WP shortcode to show a user list for checking if the they commented on a specific post
I need help creating a wp shortcode that shows a list of users (by role) with a check if they have commented on a certain post. Post ID and user role are shortocode parameters.

In order to do this I thought of merging this handmade shortcode ( it shows for a specified user if whether or not commented on a post, [fancyshortcode user_id="" post_id=""] ):

```<code>function fancycheck( $attributes ) {

    // Things that you want to do.
    $args = array(
        'user_id' => get_the_ID(),
        'post_id' => get_the_ID()
    );
    if( isset( $attributes['post_id'] ) ){
         $args['post_id'] = absint($attributes['post_id']);
    }
     if( isset( $attributes['user_id'] ) ){
         $args['user_id'] = absint($attributes['user_id']);
    }

    $comment = get_comments($args);

    if(!empty($comment)){
      return '<div class="ccount">YES</div>';
    }
    else {
      return '<div class="ccountniet">NO</div>';
    }
    return "";
}
// register shortcode
add_shortcode('fancyshortcode', 'fancycheck');
</code>```

with a shortcode to show users list... something like this:

```<code>function wcr_list_users($atts) {
    // I don't use shortcode_atts because I want to have a dynamic number of attributes
    $query = new WP_User_Query($atts);
    $results = $query->get_results();

    // no results
    if (empty($results)) {
        return;
    }

    // when we have results
    ob_start();
    echo '<ul>';
    foreach ($results as $item) {
    ?>
        <li>
        <a href="<?php echo get_author_posts_url($item->ID); ?>"><?php echo esc_html($item->display_name); ?></a></li>
    <?php
    }
    echo '</ul>';
    return ob_get_clean();
}

add_shortcode('list_users', 'wcr_list_users');
</code>```

but it is a too complicated task for my skills. So I tried to simplify the shortcode just indicating for each user the number of comments left for a particular post.. something like this:

```<code>function listone($atts) {
$query = new WP_User_Query($atts); $results = $query->get_results();
$args = array( 'post_id' => get_the_ID() );
$comments = get_comments('post_id');

// no results
if (empty($results)) {
    return;
}

// when we have results
ob_start();
echo '<ul>';
foreach ($results as $item) {
?>
    <li>
        <a href="<?php echo get_author_posts_url($item->ID); ?>"><?php echo esc_html($item->display_name); ?></a><br />
        Comments: <?php echo ($comment->comment_author .'--comment--'.$comment->comment_content);?>
    </li>
<?php
}
echo '</ul>';
return ob_get_clean();
}

add_shortcode('listonesc', 'listone');
</code>```

but obviously this  <?php echo ($comment->comment_author .'--comment--'.$comment->comment_content);?> doesn't work.

Can anyone help me or give me directions on which way to go? Thank you

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

Body:
I need help creating a wp shortcode that shows a list of users (by role) with a check if they have commented on a certain post. Post ID and user role are shortocode parameters.

In order to do this I thought of merging this handmade shortcode ( it shows for a specified user if whether or not commented on a post, [fancyshortcode user_id="" post_id=""] ):

function fancycheck( $attributes ) {

    // Things that you want to do.
    $args = array(
        'user_id' => get_the_ID(),
        'post_id' => get_the_ID()
    );
    if( isset( $attributes['post_id'] ) ){
         $args['post_id'] = absint($attributes['post_id']);
    }
     if( isset( $attributes['user_id'] ) ){
         $args['user_id'] = absint($attributes['user_id']);
    }

    $comment = get_comments($args);

    if(!empty($comment)){
      return '
YES
';
    }
    else {
      return '
NO
';
    }
    return "";
}
// register shortcode
add_shortcode('fancyshortcode', 'fancycheck');

with a shortcode to show users list... something like this:

function wcr_list_users($atts) {
    // I don't use shortcode_atts because I want to have a dynamic number of attributes
    $query = new WP_User_Query($atts);
    $results = $query->get_results();

    // no results
    if (empty($results)) {
        return;
    }

    // when we have results
    ob_start();
    echo '
';
    foreach ($results as $item) {
    ?>

        <a href="<?php echo get_author_posts_url($item->ID); ?>"><?php echo esc_html($item->display_name); ?>

    <?php
    }
    echo '
';
    return ob_get_clean();
}

add_shortcode('list_users', 'wcr_list_users');

but it is a too complicated task for my skills. So I tried to simplify the shortcode just indicating for each user the number of comments left for a particular post.. something like this:

function listone($atts) {
$query = new WP_User_Query($atts); $results = $query->get_results();
$args = array( 'post_id' => get_the_ID() );
$comments = get_comments('post_id');

// no results
if (empty($results)) {
    return;
}

// when we have results
ob_start();
echo '
';
foreach ($results as $item) {
?>

        <a href="<?php echo get_author_posts_url($item->ID); ?>"><?php echo esc_html($item->display_name); ?>

        Comments: <?php echo ($comment->comment_author .'--comment--'.$comment->comment_content);?>

<?php
}
echo '
';
return ob_get_clean();
}

add_shortcode('listonesc', 'listone');

but obviously this  <?php echo ($comment->comment_author .'--comment--'.$comment->comment_content);?> doesn't work.

Can anyone help me or give me directions on which way to go? Thank you