问:
How to get OpenEBS Mayastor clustered storage to work on microk8s?
I have tried all sorts of things to get OpenEBS Mayastor clustered storage to work on microk8s without much success. So rather than give up completely I thought I would detail one of my failed attempts and see if anyone could figure out what I am doing wrong. Thanks in advance for any help you can give me :-)

Failed Attempt

Here is the results of following the steps posted on at https://microk8s.io/docs/addon-mayastor.

VM Setup:

3 VM running Ubuntu 22.04 with 16GB ram on a vSphere hypervisor. I have used these same VM to create a 3 node microk8s cluster with good success in the past.

Microk8s removal:

removed microk8s on all 3 nodes.

```<code>microk8s stop
sudo snap remove microk8s --purge
sudo reboot
</code>```

Microk8s fresh install:

https://microk8s.io/docs/setting-snap-channel

snap info microk8s

latest/stable:         v1.26.0  2022-12-17 (4390) 176MB classic

On all 3 nodes:

```<code>sudo snap install microk8s --classic --channel=1.26/stable
sudo usermod -a -G microk8s $USER
sudo chown -f -R $USER ~/.kube
newgrp microk8s
sudo reboot
</code>```

verify everything is ok

```<code>microk8s status
microk8s inspect
**Do what inspect tells you to do:**
WARNING:  IPtables FORWARD policy is DROP. Consider enabling traffic forwarding with: sudo iptables -P FORWARD ACCEPT
The change can be made persistent with: sudo apt-get install iptables-persistent
sudo iptables -S
sudo iptables-legacy -S
sudo iptables -P FORWARD ACCEPT
sudo apt-get install iptables-persistent
sudo systemctl is-enabled netfilter-persistent.service
sudo reboot
microk8s inspect
</code>```

still get the IPtable FORWARD warning on 2 of the 3 nodes.

hopefully it is not that important.

ping all the ip addresses in cluster from every node.

Followed the directions at https://microk8s.io/docs/addon-mayastor

step 1:

```<code>sudo sysctl vm.nr_hugepages=1024
echo 'vm.nr_hugepages=1024' | sudo tee -a /etc/sysctl.conf
sudo nvim /etc/sysctl.conf
</code>```

step 2:

```<code>sudo apt install linux-modules-extra-$(uname -r)
sudo modprobe nvme_tcp
echo 'nvme-tcp' | sudo tee -a /etc/modules-load.d/microk8s-mayastor.conf
sudo nvim /etc/modules-load.d/microk8s-mayastor.conf
</code>```

step 3:

```<code>microk8s enable dns
microk8s enable helm3
thought we might need rbac so I enabled that also.
microk8s enable rbac
</code>```

Created 3 node cluster.

```<code>from main node.
sudo microk8s add-node
go to 2nd node.
microk8s join 10.1.0.116:25000/0c902af525c13fbfb5e7c37cff29b29a/acf13be17a96
from main node.
sudo microk8s add-node
go to 3rd node.
microk8s join 10.1.0.116:25000/36134181872079c649bed48d969a006d/acf13be17a96
microk8s status
</code>```

enable the mayastor add-on:

```<code>from main node.
sudo microk8s enable core/mayastor --default-pool-size 20G
go to  2nd node.
sudo microk8s enable core/mayastor --default-pool-size 20G
Addon core/mayastor is already enabled
go to 3rd node.
sudo microk8s enable core/mayastor --default-pool-size 20G
Addon core/mayastor is already enabled
</code>```

Wait for the mayastor control plane and data plane pods to come up:

```<code>sudo microk8s.kubectl get pod -n mayastor
NAME                                     READY   STATUS              RESTARTS   AGE
mayastor-csi-962jf                       0/2     ContainerCreating   0          2m6s
mayastor-csi-l4zxx                       0/2     ContainerCreating   0          2m5s
mayastor-8pcc4                           0/1     Init:0/3            0          2m6s
msp-operator-74ff9cf5d5-jvxqb            0/1     Init:0/2            0          2m5s
mayastor-lt8qq                           0/1     Init:0/3            0          2m5s
etcd-operator-mayastor-65f9967f5-mpkrw   0/1     ContainerCreating   0          2m5s
mayastor-csi-6wb7x                       0/2     ContainerCreating   0          2m5s
core-agents-55d76bb877-8nffd             0/1     Init:0/1            0          2m5s
csi-controller-54ccfcfbcc-m94b7          0/3     Init:0/1            0          2m5s
mayastor-9q4gl                           0/1     Init:0/3            0          2m5s
rest-77d69fb479-qsvng                    0/1     Init:0/2            0          2m5s

# Still waiting
sudo microk8s.kubectl get pod -n mayastor
NAME                                     READY   STATUS     RESTARTS   AGE
mayastor-8pcc4                           0/1     Init:0/3   0          32m
msp-operator-74ff9cf5d5-jvxqb            0/1     Init:0/2   0          32m
mayastor-lt8qq                           0/1     Init:0/3   0          32m
core-agents-55d76bb877-8nffd             0/1     Init:0/1   0          32m
csi-controller-54ccfcfbcc-m94b7          0/3     Init:0/1   0          32m
mayastor-9q4gl                           0/1     Init:0/3   0          32m
rest-77d69fb479-qsvng                    0/1     Init:0/2   0          32m
mayastor-csi-962jf                       2/2     Running    0          32m
mayastor-csi-l4zxx                       2/2     Running    0          32m
etcd-operator-mayastor-65f9967f5-mpkrw   1/1     Running    1          32m
mayastor-csi-6wb7x                       2/2     Running    0          32m
etcd-6tjf7zb9dh                          0/1     Init:0/1   0          30m
</code>```

Went to the trouble-shooting section at https://microk8s.io/docs/addon-mayastor

```<code>microk8s.kubectl logs -n mayastor daemonset/mayastor
output was:
Found 3 pods, using pod/mayastor-8pcc4
Defaulted container "mayastor" out of: mayastor, registration-probe (init), etcd-probe (init), initialize-pool (init)
Error from server (BadRequest): container "mayastor" in pod "mayastor-8pcc4" is waiting to start: PodInitializing
</code>```

Body:
I have tried all sorts of things to get OpenEBS Mayastor clustered storage to work on microk8s without much success. So rather than give up completely I thought I would detail one of my failed attempts and see if anyone could figure out what I am doing wrong. Thanks in advance for any help you can give me :-)

Failed Attempt

Here is the results of following the steps posted on at https://microk8s.io/docs/addon-mayastor.

VM Setup:

3 VM running Ubuntu 22.04 with 16GB ram on a vSphere hypervisor. I have used these same VM to create a 3 node microk8s cluster with good success in the past.

Microk8s removal:

removed microk8s on all 3 nodes.

microk8s stop
sudo snap remove microk8s --purge
sudo reboot

Microk8s fresh install:

https://microk8s.io/docs/setting-snap-channel

snap info microk8s

latest/stable:         v1.26.0  2022-12-17 (4390) 176MB classic

On all 3 nodes:

sudo snap install microk8s --classic --channel=1.26/stable
sudo usermod -a -G microk8s $USER
sudo chown -f -R $USER ~/.kube
newgrp microk8s
sudo reboot

verify everything is ok

microk8s status
microk8s inspect
**Do what inspect tells you to do:**
WARNING:  IPtables FORWARD policy is DROP. Consider enabling traffic forwarding with: sudo iptables -P FORWARD ACCEPT
The change can be made persistent with: sudo apt-get install iptables-persistent
sudo iptables -S
sudo iptables-legacy -S
sudo iptables -P FORWARD ACCEPT
sudo apt-get install iptables-persistent
sudo systemctl is-enabled netfilter-persistent.service
sudo reboot
microk8s inspect

still get the IPtable FORWARD warning on 2 of the 3 nodes.

hopefully it is not that important.

ping all the ip addresses in cluster from every node.

Followed the directions at https://microk8s.io/docs/addon-mayastor

step 1:

sudo sysctl vm.nr_hugepages=1024
echo 'vm.nr_hugepages=1024' | sudo tee -a /etc/sysctl.conf
sudo nvim /etc/sysctl.conf

step 2:

sudo apt install linux-modules-extra-$(uname -r)
sudo modprobe nvme_tcp
echo 'nvme-tcp' | sudo tee -a /etc/modules-load.d/microk8s-mayastor.conf
sudo nvim /etc/modules-load.d/microk8s-mayastor.conf

step 3:

microk8s enable dns
microk8s enable helm3
thought we might need rbac so I enabled that also.
microk8s enable rbac

Created 3 node cluster.

from main node.
sudo microk8s add-node
go to 2nd node.
microk8s join 10.1.0.116:25000/0c902af525c13fbfb5e7c37cff29b29a/acf13be17a96
from main node.
sudo microk8s add-node
go to 3rd node.
microk8s join 10.1.0.116:25000/36134181872079c649bed48d969a006d/acf13be17a96
microk8s status

enable the mayastor add-on:

from main node.
sudo microk8s enable core/mayastor --default-pool-size 20G
go to  2nd node.
sudo microk8s enable core/mayastor --default-pool-size 20G
Addon core/mayastor is already enabled
go to 3rd node.
sudo microk8s enable core/mayastor --default-pool-size 20G
Addon core/mayastor is already enabled

Wait for the mayastor control plane and data plane pods to come up:

sudo microk8s.kubectl get pod -n mayastor
NAME                                     READY   STATUS              RESTARTS   AGE
mayastor-csi-962jf                       0/2     ContainerCreating   0          2m6s
mayastor-csi-l4zxx                       0/2     ContainerCreating   0          2m5s
mayastor-8pcc4                           0/1     Init:0/3            0          2m6s
msp-operator-74ff9cf5d5-jvxqb            0/1     Init:0/2            0          2m5s
mayastor-lt8qq                           0/1     Init:0/3            0          2m5s
etcd-operator-mayastor-65f9967f5-mpkrw   0/1     ContainerCreating   0          2m5s
mayastor-csi-6wb7x                       0/2     ContainerCreating   0          2m5s
core-agents-55d76bb877-8nffd             0/1     Init:0/1            0          2m5s
csi-controller-54ccfcfbcc-m94b7          0/3     Init:0/1            0          2m5s
mayastor-9q4gl                           0/1     Init:0/3            0          2m5s
rest-77d69fb479-qsvng                    0/1     Init:0/2            0          2m5s

# Still waiting
sudo microk8s.kubectl get pod -n mayastor
NAME                                     READY   STATUS     RESTARTS   AGE
mayastor-8pcc4                           0/1     Init:0/3   0          32m
msp-operator-74ff9cf5d5-jvxqb            0/1     Init:0/2   0          32m
mayastor-lt8qq                           0/1     Init:0/3   0          32m
core-agents-55d76bb877-8nffd             0/1     Init:0/1   0          32m
csi-controller-54ccfcfbcc-m94b7          0/3     Init:0/1   0          32m
mayastor-9q4gl                           0/1     Init:0/3   0          32m
rest-77d69fb479-qsvng                    0/1     Init:0/2   0          32m
mayastor-csi-962jf                       2/2     Running    0          32m
mayastor-csi-l4zxx                       2/2     Running    0          32m
etcd-operator-mayastor-65f9967f5-mpkrw   1/1     Running    1          32m
mayastor-csi-6wb7x                       2/2     Running    0          32m
etcd-6tjf7zb9dh                          0/1     Init:0/1   0          30m

Went to the trouble-shooting section at https://microk8s.io/docs/addon-mayastor

microk8s.kubectl logs -n mayastor daemonset/mayastor
output was:
Found 3 pods, using pod/mayastor-8pcc4
Defaulted container "mayastor" out of: mayastor, registration-probe (init), etcd-probe (init), initialize-pool (init)
Error from server (BadRequest): container "mayastor" in pod "mayastor-8pcc4" is waiting to start: PodInitializing


来源: stackexchange

问:
Importing table data from site with location filter
I am trying to analyze data from actionnetwork.com for my specfic state.
However, when I run the fllowing code, the data from another "default" state gets imported. Is there a way to apply the filter which can be applied on the webpage via VBA?</p>
```<code>ActiveWorkbook.Queries.Add name:="Table 0 (2)", Formula:= _
    "let" & Chr(13) & "" & Chr(10) & "    Source = Web.Page(Web.Contents(""https://www.actionnetwork.com/ncaab/odds""))," & Chr(13) & "" & Chr(10) & "    Data0 = Source{0}[Data]," & Chr(13) & "" & Chr(10) & "    #""Changed Type"" = Table.TransformColumnTypes(Data0,{{""Column1"", type text}, {""Column2"", type text}, {""Column3"", type text}, {""Column4"", type text}, {""Column5"", type text}, {""Column6"", type text}, {""Column7"", type text}, {""Column" & _
    "8"", type text}, {""Column9"", type text}, {""Column10"", type text}, {""Column11"", type text}, {""Column12"", type text}})" & Chr(13) & "" & Chr(10) & "in" & Chr(13) & "" & Chr(10) & "    #""Changed Type"""
Workbooks("Bets_v.02.xlsm").Connections.Add2 "Query - Table 0 (2)", _
    "Connection to the 'Table 0 (2)' query in the workbook.", _
    "OLEDB;Provider=Microsoft.Mashup.OleDb.1;Data Source=$Workbook$;Location=Table 0 (2);Extended Properties=" _
    , """Table 0 (2)""", 6, True, False
ActiveWorkbook.Connections("Query - Table 0 (2)").refresh
Application.CutCopyMode = False
With ActiveWorkbook.Connections("Query - Table 0 (2)").OLEDBConnection
    .BackgroundQuery = False
    .CommandType = xlCmdTableCollection
    .Connection = _
    "OLEDB;Provider=Microsoft.Mashup.OleDb.1;Data Source=$Workbook$;Location=""Table 0 (2)"";Extended Properties="""""
    .RefreshOnFileOpen = False
    .SavePassword = False
    .SourceConnectionFile = ""
    .SourceDataFile = ""
    .ServerCredentialsMethod = xlCredentialsMethodIntegrated
    .AlwaysUseConnectionFile = False
End With
With ActiveWorkbook.Connections("Query - Table 0 (2)")
    .name = "Query - Table 0 (2)"
    .Description = "Connection to the 'Table 0 (2)' query in the workbook."
End With
ActiveWorkbook.Connections("Query - Table 0 (2)").refresh
ActiveWorkbook.Connections("Query - Table 0 (2)").refresh
With ActiveSheet.ListObjects.Add(SourceType:=4, Source:=ActiveWorkbook. _
    Connections("Query - Table 0 (2)"), Destination:=Range("$A$1")).TableObject
    .RowNumbers = False
    .PreserveFormatting = True
    .RefreshStyle = 1
    .AdjustColumnWidth = True
    .ListObject.DisplayName = "Table_0__2"
    .refresh
End With
</code>```

ContentLicense: CC BY-SA 4.0

Body:
I am trying to analyze data from actionnetwork.com for my specfic state.
However, when I run the fllowing code, the data from another "default" state gets imported. Is there a way to apply the filter which can be applied on the webpage via VBA?

ActiveWorkbook.Queries.Add name:="Table 0 (2)", Formula:= _
    "let" & Chr(13) & "" & Chr(10) & "    Source = Web.Page(Web.Contents(""https://www.actionnetwork.com/ncaab/odds""))," & Chr(13) & "" & Chr(10) & "    Data0 = Source{0}[Data]," & Chr(13) & "" & Chr(10) & "    #""Changed Type"" = Table.TransformColumnTypes(Data0,{{""Column1"", type text}, {""Column2"", type text}, {""Column3"", type text}, {""Column4"", type text}, {""Column5"", type text}, {""Column6"", type text}, {""Column7"", type text}, {""Column" & _
    "8"", type text}, {""Column9"", type text}, {""Column10"", type text}, {""Column11"", type text}, {""Column12"", type text}})" & Chr(13) & "" & Chr(10) & "in" & Chr(13) & "" & Chr(10) & "    #""Changed Type"""
Workbooks("Bets_v.02.xlsm").Connections.Add2 "Query - Table 0 (2)", _
    "Connection to the 'Table 0 (2)' query in the workbook.", _
    "OLEDB;Provider=Microsoft.Mashup.OleDb.1;Data Source=$Workbook$;Location=Table 0 (2);Extended Properties=" _
    , """Table 0 (2)""", 6, True, False
ActiveWorkbook.Connections("Query - Table 0 (2)").refresh
Application.CutCopyMode = False
With ActiveWorkbook.Connections("Query - Table 0 (2)").OLEDBConnection
    .BackgroundQuery = False
    .CommandType = xlCmdTableCollection
    .Connection = _
    "OLEDB;Provider=Microsoft.Mashup.OleDb.1;Data Source=$Workbook$;Location=""Table 0 (2)"";Extended Properties="""""
    .RefreshOnFileOpen = False
    .SavePassword = False
    .SourceConnectionFile = ""
    .SourceDataFile = ""
    .ServerCredentialsMethod = xlCredentialsMethodIntegrated
    .AlwaysUseConnectionFile = False
End With
With ActiveWorkbook.Connections("Query - Table 0 (2)")
    .name = "Query - Table 0 (2)"
    .Description = "Connection to the 'Table 0 (2)' query in the workbook."
End With
ActiveWorkbook.Connections("Query - Table 0 (2)").refresh
ActiveWorkbook.Connections("Query - Table 0 (2)").refresh
With ActiveSheet.ListObjects.Add(SourceType:=4, Source:=ActiveWorkbook. _
    Connections("Query - Table 0 (2)"), Destination:=Range("$A$1")).TableObject
    .RowNumbers = False
    .PreserveFormatting = True
    .RefreshStyle = 1
    .AdjustColumnWidth = True
    .ListObject.DisplayName = "Table_0__2"
    .refresh
End With


问:
Using watchlist value without Search Key
I'm new to KQL and Sentinel.

I'm trying to add validation to a query of alerts using only a column of a Watchlist.

My Watchlist are:

Name
LastName
Date

Jhon
Doe
01/01/2000

I would like to validate that the date in column 3 is greater than the current date. But my Search Key is defined using the name (column 1). Is there a possibility of obtaining a column without using the SearchKey and using it in a validation?

Just for remember

Name is my Search Key

For example:

let watchlist = Getwhatchlist(test)

let today = now();

Table_A

| where watchlist.Date > today

| join kind=leftanti watchlist on Name


问:
Accessing Minio with a self signed certificate and the Python client library
We have an instance of minio running with a certificate that is signed by our corporate CA. Accessing it with S3 Browser works perfect. Now I try to write a python script to upload files. I try to use the windows cert store to get my CA certs

```<code>myssl = ssl.create_default_context()

myhttpclient = urllib3.PoolManager(
      cert_reqs='CERT_REQUIRED',
      ca_certs=myssl.get_ca_certs()
)

s3dev = Minio("s3dev.mycorp.com:9000,
     access_key="myAccessKey",
     secret_key="mySecretKey"
     secure=True,
     http_client=myhttpclient
)
</code>```

I get an error "TypeError: unhashable type: list"

Getting the CA Certs from Windows cert store with ssl.get_ca_certs() returns a list with all the certs in it which seems logic to me, what am I missing here to get something this simple to work ?

Body:
We have an instance of minio running with a certificate that is signed by our corporate CA. Accessing it with S3 Browser works perfect. Now I try to write a python script to upload files. I try to use the windows cert store to get my CA certs

myssl = ssl.create_default_context()

myhttpclient = urllib3.PoolManager(
      cert_reqs='CERT_REQUIRED',
      ca_certs=myssl.get_ca_certs()
)

s3dev = Minio("s3dev.mycorp.com:9000,
     access_key="myAccessKey",
     secret_key="mySecretKey"
     secure=True,
     http_client=myhttpclient
)

I get an error "TypeError: unhashable type: list"

Getting the CA Certs from Windows cert store with ssl.get_ca_certs() returns a list with all the certs in it which seems logic to me, what am I missing here to get something this simple to work ?


问:
linux live kit not working on ubuntu 20.04 access denied when making new directory
Does anyone know how to get Linux live kit to work on Ubuntu 20.04? I found a website that showed me how, but when I tried to build it, the file would not show up. I tried rebooting but it did nothing. I know that Tmp empties on reboot, but when I try to make a directory like /build it says access denied.

Does anyone know how to get a bootable ISO using Linux live kit on Ubuntu 20.04?

I know how to use systemback and other tools. Also when I asked on askubuntu they did not answer my question. I am trying to make a working linux distro.

I tried to put it in /srv but it did not work. also when i tried to put it in /tmp. It would not show up in /tmp. One issue I had was also making a new directory like /bluespace. Can anyone please help. Maby even go through the steps. Thanks! This distro is for education. It comes with website blocking its own search engine and so much more. P.s I am only in highschool. I am done customizing it but I need the file with linux live kit. I tried every option and it wont work. I tried pinguy, but it only makes a backup. I want linux live kit to work but it wont.


问:
Py4JJavaError: An error occurred while calling o30.load
I try to make an image classification with pyspark.If i try to read a csv file it works perfectly but if i load the file with images i get an error.
This is my code

```<code>spark = SparkSession.builder.appName('a').getOrCreate()
food = spark.read.format("image").load(".../food")
</code>```

and this is the error

```<code>Py4JJavaError: An error occurred while calling o30.load.
: java.lang.UnsatisfiedLinkError: 'boolean org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(java.lang.String, int)'
    at org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Native Method)
    at org.apache.hadoop.io.nativeio.NativeIO$Windows.access(NativeIO.java:793)
    at org.apache.hadoop.fs.FileUtil.canRead(FileUtil.java:1218)
    at org.apache.hadoop.fs.FileUtil.list(FileUtil.java:1423)
    at org.apache.hadoop.fs.RawLocalFileSystem.listStatus(RawLocalFileSystem.java:601)
    at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1972)
    at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:2014)
    at org.apache.hadoop.fs.ChecksumFileSystem.listStatus(ChecksumFileSystem.java:761)
    at org.apache.spark.util.HadoopFSUtils$.listLeafFiles(HadoopFSUtils.scala:225)
    at org.apache.spark.util.HadoopFSUtils$.$anonfun$parallelListLeafFilesInternal$1(HadoopFSUtils.scala:95)
    at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:286)
    at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
    at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55)
    at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
    at scala.collection.TraversableLike.map(TraversableLike.scala:286)
    at scala.collection.TraversableLike.map$(TraversableLike.scala:279)
    at scala.collection.AbstractTraversable.map(Traversable.scala:108)
    at org.apache.spark.util.HadoopFSUtils$.parallelListLeafFilesInternal(HadoopFSUtils.scala:85)
    at org.apache.spark.util.HadoopFSUtils$.parallelListLeafFiles(HadoopFSUtils.scala:69)
    at org.apache.spark.sql.execution.datasources.InMemoryFileIndex$.bulkListLeafFiles(InMemoryFileIndex.scala:158)
    at org.apache.spark.sql.execution.datasources.InMemoryFileIndex.listLeafFiles(InMemoryFileIndex.scala:131)
    at org.apache.spark.sql.execution.datasources.InMemoryFileIndex.refresh0(InMemoryFileIndex.scala:94)
    at org.apache.spark.sql.execution.datasources.InMemoryFileIndex.<init>(InMemoryFileIndex.scala:66)
    at org.apache.spark.sql.execution.datasources.DataSource.createInMemoryFileIndex(DataSource.scala:567)
    at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:409)
    at org.apache.spark.sql.DataFrameReader.loadV1Source(DataFrameReader.scala:228)
    at org.apache.spark.sql.DataFrameReader.$anonfun$load$2(DataFrameReader.scala:210)
    at scala.Option.getOrElse(Option.scala:189)
    at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:210)
    at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:185)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
    at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
    at py4j.Gateway.invoke(Gateway.java:282)
    at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
    at py4j.commands.CallCommand.execute(CallCommand.java:79)
    at py4j.ClientServerConnection.waitForCommands(ClientServerConnection.java:182)
    at py4j.ClientServerConnection.run(ClientServerConnection.java:106)
    at java.base/java.lang.Thread.run(Thread.java:833)
</code>```

i can not understand what i should do, all help welcome.

Body:
I try to make an image classification with pyspark.If i try to read a csv file it works perfectly but if i load the file with images i get an error.
This is my code

spark = SparkSession.builder.appName('a').getOrCreate()
food = spark.read.format("image").load(".../food")

and this is the error

Py4JJavaError: An error occurred while calling o30.load.
: java.lang.UnsatisfiedLinkError: 'boolean org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(java.lang.String, int)'
    at org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Native Method)
    at org.apache.hadoop.io.nativeio.NativeIO$Windows.access(NativeIO.java:793)
    at org.apache.hadoop.fs.FileUtil.canRead(FileUtil.java:1218)
    at org.apache.hadoop.fs.FileUtil.list(FileUtil.java:1423)
    at org.apache.hadoop.fs.RawLocalFileSystem.listStatus(RawLocalFileSystem.java:601)
    at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1972)
    at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:2014)
    at org.apache.hadoop.fs.ChecksumFileSystem.listStatus(ChecksumFileSystem.java:761)
    at org.apache.spark.util.HadoopFSUtils$.listLeafFiles(HadoopFSUtils.scala:225)
    at org.apache.spark.util.HadoopFSUtils$.$anonfun$parallelListLeafFilesInternal$1(HadoopFSUtils.scala:95)
    at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:286)
    at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
    at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55)
    at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
    at scala.collection.TraversableLike.map(TraversableLike.scala:286)
    at scala.collection.TraversableLike.map$(TraversableLike.scala:279)
    at scala.collection.AbstractTraversable.map(Traversable.scala:108)
    at org.apache.spark.util.HadoopFSUtils$.parallelListLeafFilesInternal(HadoopFSUtils.scala:85)
    at org.apache.spark.util.HadoopFSUtils$.parallelListLeafFiles(HadoopFSUtils.scala:69)
    at org.apache.spark.sql.execution.datasources.InMemoryFileIndex$.bulkListLeafFiles(InMemoryFileIndex.scala:158)
    at org.apache.spark.sql.execution.datasources.InMemoryFileIndex.listLeafFiles(InMemoryFileIndex.scala:131)
    at org.apache.spark.sql.execution.datasources.InMemoryFileIndex.refresh0(InMemoryFileIndex.scala:94)
    at org.apache.spark.sql.execution.datasources.InMemoryFileIndex.<init>(InMemoryFileIndex.scala:66)
    at org.apache.spark.sql.execution.datasources.DataSource.createInMemoryFileIndex(DataSource.scala:567)
    at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:409)
    at org.apache.spark.sql.DataFrameReader.loadV1Source(DataFrameReader.scala:228)
    at org.apache.spark.sql.DataFrameReader.$anonfun$load$2(DataFrameReader.scala:210)
    at scala.Option.getOrElse(Option.scala:189)
    at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:210)
    at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:185)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
    at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
    at py4j.Gateway.invoke(Gateway.java:282)
    at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
    at py4j.commands.CallCommand.execute(CallCommand.java:79)
    at py4j.ClientServerConnection.waitForCommands(ClientServerConnection.java:182)
    at py4j.ClientServerConnection.run(ClientServerConnection.java:106)
    at java.base/java.lang.Thread.run(Thread.java:833)

i can not understand what i should do, all help welcome.


问:
Bounce animation on tabbar selection
I am trying to have the images on my tab bar do a bounce animation when they are selected by the user, but so far I have only been able to get them to bounce if the user is on the current tab and then they re-select the tab. Is there a way to make them bounce whenever the user taps them and from any tab?

Here is my code:

```<code>    private var bounceAnimation: CAKeyframeAnimation = {
        let bounceAnimation = CAKeyframeAnimation(keyPath: "transform.scale")
        bounceAnimation.values = [1.0, 1.4, 0.9, 1.02, 1.0]
        bounceAnimation.duration = TimeInterval(0.4)
        bounceAnimation.calculationMode = CAAnimationCalculationMode.linear
        return bounceAnimation
    }()

    override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) {
        let idx = tabBar.items?.firstIndex(of: item)
        let imageView: UIImageView? = self.tabBar.tabBarButtons[idx!].tabBarSwappableImageViews.first as? UIImageView
        imageView.layer.add(bounceAnimation, forKey: nil)
    }
</code>```

Any help would be greatly appreciated. Thanks

Title: Bounce animation on tabbar selection

Body:
I am trying to have the images on my tab bar do a bounce animation when they are selected by the user, but so far I have only been able to get them to bounce if the user is on the current tab and then they re-select the tab. Is there a way to make them bounce whenever the user taps them and from any tab?

Here is my code:

    private var bounceAnimation: CAKeyframeAnimation = {
        let bounceAnimation = CAKeyframeAnimation(keyPath: "transform.scale")
        bounceAnimation.values = [1.0, 1.4, 0.9, 1.02, 1.0]
        bounceAnimation.duration = TimeInterval(0.4)
        bounceAnimation.calculationMode = CAAnimationCalculationMode.linear
        return bounceAnimation
    }()

    override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) {
        let idx = tabBar.items?.firstIndex(of: item)
        let imageView: UIImageView? = self.tabBar.tabBarButtons[idx!].tabBarSwappableImageViews.first as? UIImageView
        imageView.layer.add(bounceAnimation, forKey: nil)
    }

Any help would be greatly appreciated. Thanks


问:
Updated cluster config does not contain myself. Rejecting component=arangodb
My arangodb cluster is struggling to stay up.  A node will periodically go read and show messages like this in the logs:

2023-01-11T21:23:04Z |WARN| Updated cluster config does not contain myself. Rejecting component=arangodb
2023-01-11T21:23:14Z |WARN| Updated cluster config does not contain myself. Rejecting component=arangodb
2023-01-11T21:23:24Z |WARN| Updated cluster config does not contain myself. Rejecting component=arangodb
2023-01-11T21:23:34Z |WARN| Updated cluster config does not contain myself. Rejecting component=arangodb
2023-01-11T21:23:44Z |WARN| Updated cluster config does not contain myself. Rejecting component=arangodb

I haven't been able to find any info on what causes this.  Network connectivity seems good (all the nodes can reach each other).

This is a 9 node arango cluster: 3 agents, 9 dbservers and 9 coordinators.  Started via the arangodb launcher.  (version 3.10.1)

I have tried trace and debug logging in the hopes of finding a better idea of what is going on but no luck.


问:
Xdebug connected to debugging client, but not working
Xdebug logs are saying that he is able to connect to PhpStorm, but PhpStorm cant run the debug process.

```<code>[23] Log opened at 2023-01-11 21:16:29.141347
[23] [Step Debug] INFO: Connecting to configured address/port: host.docker.internal:9003.
[23] [Step Debug] INFO: Connected to debugging client: host.docker.internal:9003 (through xdebug.client_host/xdebug.client_port). :-)
[23] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///legacy/public/index.php" language="PHP" xdebug:language_version="8.1.7" protocol_version="1.0" appid="23"><engine version="3.1.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2021 by Derick Rethans]]></copyright></init>

[20] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>

[20] Log closed at 2023-01-11 21:16:29.451767
</code>```

Application is in monorepo in folder legacy/, run by docker via 8000 port.

```<code>PHP 8.1.7 (cli) (built: Jun  9 2022 23:29:02) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.7, Copyright (c) Zend Technologies
    with Xdebug v3.1.0, Copyright (c) 2002-2021, by Derick Rethans
</code>```

Body:
Xdebug logs are saying that he is able to connect to PhpStorm, but PhpStorm cant run the debug process.

[23] Log opened at 2023-01-11 21:16:29.141347
[23] [Step Debug] INFO: Connecting to configured address/port: host.docker.internal:9003.
[23] [Step Debug] INFO: Connected to debugging client: host.docker.internal:9003 (through xdebug.client_host/xdebug.client_port). :-)
[23] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///legacy/public/index.php" language="PHP" xdebug:language_version="8.1.7" protocol_version="1.0" appid="23"><engine version="3.1.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2021 by Derick Rethans]]></copyright></init>

[20] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>

[20] Log closed at 2023-01-11 21:16:29.451767

Application is in monorepo in folder legacy/, run by docker via 8000 port.

PHP 8.1.7 (cli) (built: Jun  9 2022 23:29:02) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.7, Copyright (c) Zend Technologies
    with Xdebug v3.1.0, Copyright (c) 2002-2021, by Derick Rethans


问:
Create new column based on conditions in other dataframes
I have two input dataframes I'm attempting to use to create a column in another dataframe (target column = 'Country' in df1). The issue is that one of the input dataframes (i.e., df2) has fewer rows than my target dataframe (i.e., df1). I want to iterate through all possible countries in df2 but when that is exhausted (i.e., after 'KOR'), I want the column to revert to df3 and return the countries starting from the beginning, hence the target result in df1['Country'].

I had believed I found a way of doing this using numpy.where, but I ended up with 'ESP' instead of 'US' when reverting to df3 and that's not my objective.

Also, these are just examples, the actual dataframes in question are much larger.

Hopefully someone can help me figure this out. Appreciate any help. Thanks.

```<code>    import pandas as pd

    data1 = {'Name': ['tom', 'nick', 'krish', 'jack'],
             'Age': [20, 21, 19, 18],
             'Country': ['IND', 'KOR', 'US', 'UK']}

    data2 = {'Country2': ['IND', 'KOR']}

    data3 = {'Country': ['US', 'UK', 'ESP', 'MEX']}

    df1 = pd.DataFrame(data1)
    df2 = pd.DataFrame(data2)
    df3 = pd.DataFrame(data3)
</code>```

EDIT: The easiest way I can think of to more clearly explain my goal is to utilize excel, where df1 begins in A1, df2 begins in E1, and df3 begins in H1. In that case, the formula in C1 (the beginning of the country column in df1) would be something like =IF(LEN(E1)>0,E1,H1). If i pull that formula down the cells, i'd basically have something similar to "if df2 has a country available, provide the name of that country, else, revert to the beginning of df3 and provide the country (beginning at the start of the list)"

Body:
I have two input dataframes I'm attempting to use to create a column in another dataframe (target column = 'Country' in df1). The issue is that one of the input dataframes (i.e., df2) has fewer rows than my target dataframe (i.e., df1). I want to iterate through all possible countries in df2 but when that is exhausted (i.e., after 'KOR'), I want the column to revert to df3 and return the countries starting from the beginning, hence the target result in df1['Country'].

I had believed I found a way of doing this using numpy.where, but I ended up with 'ESP' instead of 'US' when reverting to df3 and that's not my objective.

Also, these are just examples, the actual dataframes in question are much larger.

Hopefully someone can help me figure this out. Appreciate any help. Thanks.

    import pandas as pd

    data1 = {'Name': ['tom', 'nick', 'krish', 'jack'],
             'Age': [20, 21, 19, 18],
             'Country': ['IND', 'KOR', 'US', 'UK']}

    data2 = {'Country2': ['IND', 'KOR']}

    data3 = {'Country': ['US', 'UK', 'ESP', 'MEX']}

    df1 = pd.DataFrame(data1)
    df2 = pd.DataFrame(data2)
    df3 = pd.DataFrame(data3)

EDIT: The easiest way I can think of to more clearly explain my goal is to utilize excel, where df1 begins in A1, df2 begins in E1, and df3 begins in H1. In that case, the formula in C1 (the beginning of the country column in df1) would be something like =IF(LEN(E1)>0,E1,H1). If i pull that formula down the cells, i'd basically have something similar to "if df2 has a country available, provide the name of that country, else, revert to the beginning of df3 and provide the country (beginning at the start of the list)"


问:
Expo EAS build crashing on production but working on ExpoGo
I've been trying for days to make this work with no luck
I recently migrated to EAS build, and, although I'm able to build successfully, the app crashes on the splash screen.
I pre-built to run on Xcode, and this is the debug output:

2023-01-11 18:06:55.054066-0300 Foodhi[7212:12185149]
[SceneConfiguration] Info.plist contained no UIScene configuration
dictionary (looking for configuration named "(no name)") 2023-01-11
18:06:55.055026-0300 Foodhi[7212:12185149] [SceneConfiguration]
Info.plist contained no UIScene configuration dictionary (looking for
configuration named "(no name)") 2023-01-11 18:06:55.595496-0300
Foodhi[7212:12185149] [native] Running application main ({
initialProps =     {
};
rootTag = 1; }) 2023-01-11 18:06:55.899161-0300 Foodhi[7212:12185149] [native]
 Error   ```Error:
Cannot find module 'metro-hermes-compiler'<br>Require
stack:<br>-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/metro/src/Server.js<br>-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/metro/src/shared/output/bundle.flow.js<br>-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/metro/src/shared/output/bundle.js<br>-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/@react-native-community/cli-plugin-metro/build/commands/bundle/buildBundle.js<br>-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/@react-native-community/cli-plugin-metro/build/commands/bundle/bundle.js<br>-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/@react-native-community/cli-plugin-metro/build/commands/bundle/index.js<br>- /private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/@react-native-community/cli-plugin-metro/build/commands/index.js<br>-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/@react-native-community/cli-plugin-metro/build/index.js<br>-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/@react-native-community/cli/build/commands/index.js<br>-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/@react-native-community/cli/build/index.js<br>-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/react-native/cli.js<br>
   at Function.Module._resolveFilename
(node:internal/modules/cjs/loader:985:15)<br>    at
Function.Module._load (node:internal/modules/cjs/loader:833:27)<br>
   at Module.require
(node:internal/modules/cjs/loader:1057:19)<br>    at require
(node:internal/modules/cjs/helpers:103:18)<br>    at
getBytecodeVersion
(/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/metro/src/Server.js:79:10)<br>
   at Server._parseOptions
(/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/metro/src/Server.js:413:7)<br>
   at Server._processRequest
(/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/metro/src/Server.js:430:28)<br>
   at processRequest
(/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/metro/src/Server.js:406:10)<br>
   at call
(/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/connect/index.js:239:7)<br>    at next
(/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/connect/index.js:183:5)```

This is my package.json

```<code>  "dependencies": {
    "@babel/eslint-parser": "^7.15.0",
    "@emotion/react": "^11.10.4",
    "@emotion/styled": "^11.10.4",
    "@expo-google-fonts/lato": "^0.2.0",
    "@expo-google-fonts/quicksand": "^0.2.0",
    "@expo-google-fonts/raleway": "^0.2.0",
    "@expo-google-fonts/roboto": "^0.2.0",
    "@expo-google-fonts/rubik": "^0.2.0",
    "@magic-sdk/react-native": "^4.4.2",
    "@material-ui/core": "^4.12.3",
    "@material-ui/icons": "^4.11.2",
    "@mui/icons-material": "^5.10.9",
    "@mui/material": "^5.10.11",
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-community/blur": "^3.6.0",
    "@react-native-community/cameraroll": "^4.0.4",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-native-community/netinfo": "9.3.5",
    "@react-native-community/push-notification-ios": "^1.10.1",
    "@react-native-google-signin/google-signin": "^6.0.1",
    "@react-native-picker/picker": "2.4.8",
    "@react-navigation/bottom-tabs": "^6.0.5",
    "@react-navigation/compat": "^5.3.20",
    "@react-navigation/drawer": "^6.1.4",
    "@react-navigation/native": "^6.0.2",
    "@react-navigation/stack": "^6.0.7",
    "@sentry/react-native": "4.9.0",
    "@woocommerce/woocommerce-rest-api": "^1.0.1",
    "axios": "^0.21.4",
    "babel-eslint": "^10.1.0",
    "babel-plugin-inline-dotenv": "^1.6.0",
    "babel-preset-es2015": "^6.24.1",
    "base-64": "^1.0.0",
    "cipher-base": "^1.0.4",
    "crypto-js": "^4.1.1",
    "date-fns": "^2.28.0",
    "deprecated-react-native-prop-types": "^2.3.0",
    "events": "^3.3.0",
    "expo": "~47.0.12",
    "expo-app-auth": "~11.1.0",
    "expo-app-loading": "~2.1.1",
    "expo-application": "~5.0.1",
    "expo-asset": "~8.7.0",
    "expo-blur": "~12.0.1",
    "expo-build-properties": "~0.4.1",
    "expo-constants": "~14.0.2",
    "expo-device": "~5.0.0",
    "expo-document-picker": "~11.0.1",
    "expo-file-system": "~15.1.1",
    "expo-font": "~11.0.1",
    "expo-google-app-auth": "~8.3.0",
    "expo-google-sign-in": "~10.1.0",
    "expo-haptics": "~12.0.1",
    "expo-image-manipulator": "~11.0.0",
    "expo-image-picker": "~14.0.2",
    "expo-linear-gradient": "~12.0.1",
    "expo-location": "~15.0.1",
    "expo-media-library": "~15.0.0",
    "expo-modules-core": "~1.0.4 || ~1.1.1",
    "expo-notifications": "~0.17.0",
    "expo-permissions": "~14.0.0",
    "expo-sharing": "~11.0.1",
    "expo-splash-screen": "~0.17.5",
    "expo-status-bar": "~1.4.2",
    "expo-updates": "~0.15.6",
    "fast-html-parser": "^1.0.1",
    "formik": "^2.2.9",
    "html-entities": "^2.3.3",
    "lodash": "^4.17.21",
    "metro-core": "^0.74.0",
    "patch-package": "^6.4.7",
    "react": "18.1.0",
    "react-collapsible": "^2.8.4",
    "react-devtools": "^4.17.0",
    "react-dom": "18.1.0",
    "react-final-form": "^6.5.3",
    "react-hook-form": "^7.14.0",
    "react-native": "0.70.5",
    "react-native-animatable": "^1.3.3",
    "react-native-bouncy-checkbox": "^3.0.4",
    "react-native-breadcrumb": "^1.2.0",
    "react-native-calendar-picker": "^7.1.2",
    "react-native-code-push": "^7.0.2",
    "react-native-collapsible": "^1.6.0",
    "react-native-config": "^1.4.4",
    "react-native-document-picker": "^6.0.4",
    "react-native-dotenv": "^3.2.0",
    "react-native-dropdown-picker": "^5.4.2",
    "react-native-elements": "^3.4.2",
    "react-native-emoji-selector": "^0.2.0",
    "react-native-form-validator": "^0.4.0",
    "react-native-fs": "^2.18.0",
    "react-native-geocoding": "^0.5.0",
    "react-native-geolocation-service": "^5.2.0",
    "react-native-gesture-handler": "~2.8.0",
    "react-native-get-random-values": "~1.8.0",
    "react-native-gifted-chat": "^0.16.3",
    "react-native-google-places-autocomplete": "^2.4.1",
    "react-native-haptic-feedback": "^1.11.0",
    "react-native-htmlview": "^0.16.0",
    "react-native-image-crop-picker": "^0.36.2",
    "react-native-image-resizer": "^1.4.5",
    "react-native-input-validator": "^1.0.12",
    "react-native-loading-spinner-overlay": "^2.0.0",
    "react-native-maps": "1.3.2",
    "react-native-modal": "^13.0.0",
    "react-native-modal-dropdown": "^1.0.1",
    "react-native-paper": "^4.12.5",
    "react-native-permissions": "^3.0.5",
    "react-native-picker-select": "^8.0.4",
    "react-native-popover-view": "^5.1.5",
    "react-native-push-notification": "^8.1.0",
    "react-native-reanimated": "~2.12.0",
    "react-native-render-html": "^6.1.0",
    "react-native-safe-area-context": "4.4.1",
    "react-native-safe-area-view": "^1.1.1",
    "react-native-screens": "~3.18.0",
    "react-native-scroll-into-view": "^2.0.1",
    "react-native-share": "^7.0.2",
    "react-native-simple-stepper": "^3.0.3",
    "react-native-snap-carousel": "^4.0.0-beta.6",
    "react-native-super-grid": "^4.1.3",
    "react-native-svg": "13.4.0",
    "react-native-uuid": "^2.0.1",
    "react-native-vector-icons": "^8.1.0",
    "react-native-web": "~0.18.7",
    "react-native-webview": "11.23.1",
    "react-native-week-month-date-picker": "^0.3.0",
    "react-native-woocommerce-api": "^1.8.8",
    "react-navigation": "^4.4.4",
    "react-navigation-drawer": "^2.7.1",
    "react-navigation-stack": "^2.10.4",
    "react-redux": "^7.2.4",
    "redux": "^4.1.1",
    "redux-devtools-extension": "^2.13.9",
    "redux-persist": "^6.0.0",
    "redux-thunk": "^2.3.0",
    "sentry-expo": "~6.0.0",
    "source-map-support": "^0.5.19",
    "string-random": "^0.1.3",
    "util": "^0.12.4",
    "uuid": "^8.3.2",
    "uuidv4": "^6.2.13",
    "woocommerce-api": "^1.5.0",
    "wpapi": "^1.2.2"
  },
  "devDependencies": {
    "@babel/core": "^7.19.3",
    "@babel/runtime": "7.15.3",
    "@react-native-community/eslint-config": "3.0.0",
    "babel-jest": "27.1.0",
    "babel-plugin-module-resolver": "^4.1.0",
    "eslint": "^7.32.0",
    "metro": "^0.74.0",
    "metro-react-native-babel-preset": "0.66.2",
    "react-test-renderer": "17.0.2",
    "remote-redux-devtools": "^0.5.16"
  }
</code>```

Body:
I've been trying for days to make this work with no luck
I recently migrated to EAS build, and, although I'm able to build successfully, the app crashes on the splash screen.
I pre-built to run on Xcode, and this is the debug output:

2023-01-11 18:06:55.054066-0300 Foodhi[7212:12185149]
[SceneConfiguration] Info.plist contained no UIScene configuration
dictionary (looking for configuration named "(no name)") 2023-01-11
18:06:55.055026-0300 Foodhi[7212:12185149] [SceneConfiguration]
Info.plist contained no UIScene configuration dictionary (looking for
configuration named "(no name)") 2023-01-11 18:06:55.595496-0300
Foodhi[7212:12185149] [native] Running application main ({
initialProps =     {
};
rootTag = 1; }) 2023-01-11 18:06:55.899161-0300 Foodhi[7212:12185149] [native]
 Error
Error:
Cannot find module 'metro-hermes-compiler'
Require
stack:
-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/metro/src/Server.js
-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/metro/src/shared/output/bundle.flow.js
-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/metro/src/shared/output/bundle.js
-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/@react-native-community/cli-plugin-metro/build/commands/bundle/buildBundle.js
-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/@react-native-community/cli-plugin-metro/build/commands/bundle/bundle.js
-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/@react-native-community/cli-plugin-metro/build/commands/bundle/index.js
- /private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/@react-native-community/cli-plugin-metro/build/commands/index.js
-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/@react-native-community/cli-plugin-metro/build/index.js
-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/@react-native-community/cli/build/commands/index.js
-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/@react-native-community/cli/build/index.js
-
/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/react-native/cli.js

   at Function.Module._resolveFilename
(node:internal/modules/cjs/loader:985:15)
    at
Function.Module._load (node:internal/modules/cjs/loader:833:27)

   at Module.require
(node:internal/modules/cjs/loader:1057:19)
    at require
(node:internal/modules/cjs/helpers:103:18)
    at
getBytecodeVersion
(/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/metro/src/Server.js:79:10)

   at Server._parseOptions
(/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/metro/src/Server.js:413:7)

   at Server._processRequest
(/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/metro/src/Server.js:430:28)

   at processRequest
(/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/metro/src/Server.js:406:10)

   at call
(/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/connect/index.js:239:7)
    at next
(/private/var/folders/wp/tyk971fn42j897jg2pwz6zfr0000gn/T/eas-build-local-nodejs/4a382403-f572-494b-a681-af200dfe3929/build/node_modules/connect/index.js:183:5)

This is my package.json

  "dependencies": {
    "@babel/eslint-parser": "^7.15.0",
    "@emotion/react": "^11.10.4",
    "@emotion/styled": "^11.10.4",
    "@expo-google-fonts/lato": "^0.2.0",
    "@expo-google-fonts/quicksand": "^0.2.0",
    "@expo-google-fonts/raleway": "^0.2.0",
    "@expo-google-fonts/roboto": "^0.2.0",
    "@expo-google-fonts/rubik": "^0.2.0",
    "@magic-sdk/react-native": "^4.4.2",
    "@material-ui/core": "^4.12.3",
    "@material-ui/icons": "^4.11.2",
    "@mui/icons-material": "^5.10.9",
    "@mui/material": "^5.10.11",
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-community/blur": "^3.6.0",
    "@react-native-community/cameraroll": "^4.0.4",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-native-community/netinfo": "9.3.5",
    "@react-native-community/push-notification-ios": "^1.10.1",
    "@react-native-google-signin/google-signin": "^6.0.1",
    "@react-native-picker/picker": "2.4.8",
    "@react-navigation/bottom-tabs": "^6.0.5",
    "@react-navigation/compat": "^5.3.20",
    "@react-navigation/drawer": "^6.1.4",
    "@react-navigation/native": "^6.0.2",
    "@react-navigation/stack": "^6.0.7",
    "@sentry/react-native": "4.9.0",
    "@woocommerce/woocommerce-rest-api": "^1.0.1",
    "axios": "^0.21.4",
    "babel-eslint": "^10.1.0",
    "babel-plugin-inline-dotenv": "^1.6.0",
    "babel-preset-es2015": "^6.24.1",
    "base-64": "^1.0.0",
    "cipher-base": "^1.0.4",
    "crypto-js": "^4.1.1",
    "date-fns": "^2.28.0",
    "deprecated-react-native-prop-types": "^2.3.0",
    "events": "^3.3.0",
    "expo": "~47.0.12",
    "expo-app-auth": "~11.1.0",
    "expo-app-loading": "~2.1.1",
    "expo-application": "~5.0.1",
    "expo-asset": "~8.7.0",
    "expo-blur": "~12.0.1",
    "expo-build-properties": "~0.4.1",
    "expo-constants": "~14.0.2",
    "expo-device": "~5.0.0",
    "expo-document-picker": "~11.0.1",
    "expo-file-system": "~15.1.1",
    "expo-font": "~11.0.1",
    "expo-google-app-auth": "~8.3.0",
    "expo-google-sign-in": "~10.1.0",
    "expo-haptics": "~12.0.1",
    "expo-image-manipulator": "~11.0.0",
    "expo-image-picker": "~14.0.2",
    "expo-linear-gradient": "~12.0.1",
    "expo-location": "~15.0.1",
    "expo-media-library": "~15.0.0",
    "expo-modules-core": "~1.0.4 || ~1.1.1",
    "expo-notifications": "~0.17.0",
    "expo-permissions": "~14.0.0",
    "expo-sharing": "~11.0.1",
    "expo-splash-screen": "~0.17.5",
    "expo-status-bar": "~1.4.2",
    "expo-updates": "~0.15.6",
    "fast-html-parser": "^1.0.1",
    "formik": "^2.2.9",
    "html-entities": "^2.3.3",
    "lodash": "^4.17.21",
    "metro-core": "^0.74.0",
    "patch-package": "^6.4.7",
    "react": "18.1.0",
    "react-collapsible": "^2.8.4",
    "react-devtools": "^4.17.0",
    "react-dom": "18.1.0",
    "react-final-form": "^6.5.3",
    "react-hook-form": "^7.14.0",
    "react-native": "0.70.5",
    "react-native-animatable": "^1.3.3",
    "react-native-bouncy-checkbox": "^3.0.4",
    "react-native-breadcrumb": "^1.2.0",
    "react-native-calendar-picker": "^7.1.2",
    "react-native-code-push": "^7.0.2",
    "react-native-collapsible": "^1.6.0",
    "react-native-config": "^1.4.4",
    "react-native-document-picker": "^6.0.4",
    "react-native-dotenv": "^3.2.0",
    "react-native-dropdown-picker": "^5.4.2",
    "react-native-elements": "^3.4.2",
    "react-native-emoji-selector": "^0.2.0",
    "react-native-form-validator": "^0.4.0",
    "react-native-fs": "^2.18.0",
    "react-native-geocoding": "^0.5.0",
    "react-native-geolocation-service": "^5.2.0",
    "react-native-gesture-handler": "~2.8.0",
    "react-native-get-random-values": "~1.8.0",
    "react-native-gifted-chat": "^0.16.3",
    "react-native-google-places-autocomplete": "^2.4.1",
    "react-native-haptic-feedback": "^1.11.0",
    "react-native-htmlview": "^0.16.0",
    "react-native-image-crop-picker": "^0.36.2",
    "react-native-image-resizer": "^1.4.5",
    "react-native-input-validator": "^1.0.12",
    "react-native-loading-spinner-overlay": "^2.0.0",
    "react-native-maps": "1.3.2",
    "react-native-modal": "^13.0.0",
    "react-native-modal-dropdown": "^1.0.1",
    "react-native-paper": "^4.12.5",
    "react-native-permissions": "^3.0.5",
    "react-native-picker-select": "^8.0.4",
    "react-native-popover-view": "^5.1.5",
    "react-native-push-notification": "^8.1.0",
    "react-native-reanimated": "~2.12.0",
    "react-native-render-html": "^6.1.0",
    "react-native-safe-area-context": "4.4.1",
    "react-native-safe-area-view": "^1.1.1",
    "react-native-screens": "~3.18.0",
    "react-native-scroll-into-view": "^2.0.1",
    "react-native-share": "^7.0.2",
    "react-native-simple-stepper": "^3.0.3",
    "react-native-snap-carousel": "^4.0.0-beta.6",
    "react-native-super-grid": "^4.1.3",
    "react-native-svg": "13.4.0",
    "react-native-uuid": "^2.0.1",
    "react-native-vector-icons": "^8.1.0",
    "react-native-web": "~0.18.7",
    "react-native-webview": "11.23.1",
    "react-native-week-month-date-picker": "^0.3.0",
    "react-native-woocommerce-api": "^1.8.8",
    "react-navigation": "^4.4.4",
    "react-navigation-drawer": "^2.7.1",
    "react-navigation-stack": "^2.10.4",
    "react-redux": "^7.2.4",
    "redux": "^4.1.1",
    "redux-devtools-extension": "^2.13.9",
    "redux-persist": "^6.0.0",
    "redux-thunk": "^2.3.0",
    "sentry-expo": "~6.0.0",
    "source-map-support": "^0.5.19",
    "string-random": "^0.1.3",
    "util": "^0.12.4",
    "uuid": "^8.3.2",
    "uuidv4": "^6.2.13",
    "woocommerce-api": "^1.5.0",
    "wpapi": "^1.2.2"
  },
  "devDependencies": {
    "@babel/core": "^7.19.3",
    "@babel/runtime": "7.15.3",
    "@react-native-community/eslint-config": "3.0.0",
    "babel-jest": "27.1.0",
    "babel-plugin-module-resolver": "^4.1.0",
    "eslint": "^7.32.0",
    "metro": "^0.74.0",
    "metro-react-native-babel-preset": "0.66.2",
    "react-test-renderer": "17.0.2",
    "remote-redux-devtools": "^0.5.16"
  }


问:
Android app displays a high "User-perceived crash rate" in Play Console, but not many actual crashes
I've got a gamified app for iOS and Android that we've developed in Unity, engine version 2020.3.27f1. After an update a few weeks ago, we saw our our numbers for the Android version's "User-perceived crash rate" start skyrocketing in the Google Play Console. Strangely, our numbers for actual reported crashes don't seem to have been affected at all.

The most likely culprit would be the upgraded Unity IAP package. In the first update (red circle on the graphs below), we upgraded from package version 4.5.0 to 4.5.1. In a later update (blue circle) we upgraded to 4.5.2 hoping it would alleviate the issue. In fact it seems to have made it worse.

User-perceived crash rate graph

Actual crashes graph

We have received no reports at all through any of our review or support channels that users are having issues with frequent crashing. We have a system for reporting users' error logs to us automatically when something goes wrong on their app, and the logs show nothing that suggests a new or very frequent issue. (Though it's always possible for the app to crash before being able to send off the log data.) Based on all available evidence, this seems to be an error on the Play Console's part.

Anyway, the obvious next step is to roll back the Unity IAP package version to 4.5.0. Thankfully we should be able to do that easily enough.

But I'm asking this question because I am at a loss for why this might happen like this, and what I could even do to start diagnosing this issue. Any thoughts or advice are appreciated.


问:
How to make my Ubuntu/Apache2 (Using Nodejs and Expressjs) server use the server's localhost instead of the user's localhost?
I'm new to Ubuntu and Apache.

When I CRUD through Express, instead of using the server´s localhost, server/browser will use my computer's localhost.

If I turn off Express server in localhost, the server's get, post and delete don't work, and I can't seem to find a way to use the server's localhost instead of my computer's.

I've also tried sending my requests to:

```<code>http://localhost:8383/decrypted
http://127.0.0.1:8383/decrypted
</code>```

The routes above throw an error as they are http and server is https.

```<code>https://example.com/8383/decrypted
</code>```

The route about throws error connection refused

```<code>https://example.com/8080/decrypted
</code>```

I tried adding a virtualhost in 8080 and routing it through apache to 8383, but shows the same error as above, connection refused.

How can I make the server use its localhost instead of the user's localhost?

Body:
I'm new to Ubuntu and Apache.

When I CRUD through Express, instead of using the server´s localhost, server/browser will use my computer's localhost.

If I turn off Express server in localhost, the server's get, post and delete don't work, and I can't seem to find a way to use the server's localhost instead of my computer's.

I've also tried sending my requests to:

http://localhost:8383/decrypted
http://127.0.0.1:8383/decrypted

The routes above throw an error as they are http and server is https.

https://example.com/8383/decrypted

The route about throws error connection refused

https://example.com/8080/decrypted

I tried adding a virtualhost in 8080 and routing it through apache to 8383, but shows the same error as above, connection refused.

How can I make the server use its localhost instead of the user's localhost?


问:
CSS class effects the color of the text but not the font family
I am trying the understand the CSS and building the simple app. In this website there is a text under a div like that

```<code><div className='app__navbar-name'>
     <h1>ASDAS</h1>
</div>
</code>```

My aim here is to change that font and color of the ASDAS. So I wrote this CSS code

```<code>.app__navbar-name{
    color: white;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}
</code>```

which change the color of the text but not the font. So I needed the write an additional in HTML and CSS like that.

HTML Code

```<code><div className='app__navbar-name'>
    <h1 className='app__navbar-namefont'>ASDAS</h1>
</div>
</code>```

And CSS code

```<code>.app__navbar-name{
    color: white;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

.app__navbar-namefont{
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}
</code>```

Which did the job. Is there any reason the font family change did not affect the div section and needed to write additional code? I am doing this HTML and CSS changes in React so I am also tagging React.

Body:
I am trying the understand the CSS and building the simple app. In this website there is a text under a div like that

ASDAS

My aim here is to change that font and color of the ASDAS. So I wrote this CSS code

.app__navbar-name{
    color: white;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

which change the color of the text but not the font. So I needed the write an additional in HTML and CSS like that.

HTML Code

ASDAS

And CSS code

.app__navbar-name{
    color: white;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

.app__navbar-namefont{
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

Which did the job. Is there any reason the font family change did not affect the div section and needed to write additional code? I am doing this HTML and CSS changes in React so I am also tagging React.


问:
convert a whole number to its spoken format (ie 32 -> thirty two)
In Javascript, how can I convert any whole positive number to its spoken format. So 11 to eleven, 102 to one hundred two, 2104 to two thousand one hundred four

So far, I have the numbers 0-19 mapped to their string formats, and can get numbers up to 99:

```<code>if (number === 0) return 'Zero';
while (number > 0) {
        if (numMap[number]) digits.push(numMap[number]);
        else {
            digit = number % 10;
            if (numMap[digit]) digits.push(numMap[digit]);
            number = number - digit;
            if (numMap[number]) digits.push(numMap[number]);
            break;
        }
        number = number/10;
    }
numberInWords = digits.reverse().join(' ');
console.log(numberInWords);
return numberInWords;
</code>```

Not super clean or optimal, but I'm just trying to get something down before I clean it up. Any ideas?

Body:
In Javascript, how can I convert any whole positive number to its spoken format. So 11 to eleven, 102 to one hundred two, 2104 to two thousand one hundred four

So far, I have the numbers 0-19 mapped to their string formats, and can get numbers up to 99:

if (number === 0) return 'Zero';
while (number > 0) {
        if (numMap[number]) digits.push(numMap[number]);
        else {
            digit = number % 10;
            if (numMap[digit]) digits.push(numMap[digit]);
            number = number - digit;
            if (numMap[number]) digits.push(numMap[number]);
            break;
        }
        number = number/10;
    }
numberInWords = digits.reverse().join(' ');
console.log(numberInWords);
return numberInWords;

Not super clean or optimal, but I'm just trying to get something down before I clean it up. Any ideas?


问:
Why are my gameObjects not staying within the box I need them to stay in?
I'm trying to make a Tetris game and currently I have my blocks and they move down automatically, right and left with player input, and the player can make them move down quicker. However the player can move the blocks out of the intended space and off the screen. It also never stops moving down and goes off the screen.

The box I want the blocks to stay in is 160x280 (width x height), and the bottom left-hand side is at (0,0). Each block is 20x20. Here's the code:

```<code>private float previousTime;
    public float fallTime = 0.8f;
    public static int height = 280;
    public static int width = 160;

    // Start is called before the first frame update
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.LeftArrow))
        {
            transform.position += new Vector3(-20, 0, 0);
            if (!ValidMove())
            {
                transform.position += new Vector3(20, 0, 0);
            }
        }
        else if (Input.GetKeyDown(KeyCode.RightArrow))
        {
            transform.position += new Vector3(20, 0, 0);
            if (!ValidMove())
            {
                transform.position += new Vector3(-20, 0, 0);
            }
        }

        if(Time.time - previousTime > (Input.GetKey(KeyCode.DownArrow) ? fallTime / 10 : fallTime))
        {
            transform.position += new Vector3(0, -20, 0);

            previousTime = Time.time;
        }

        bool ValidMove()
        {
            foreach (Transform children in transform)
            {

                if (children.transform.position.x > width || children.transform.position.x < 0 || children.transform.position.y < 0)
                {
                    return false;
                }
            }

            return true;
        }
    }
}
</code>```

Body:
I'm trying to make a Tetris game and currently I have my blocks and they move down automatically, right and left with player input, and the player can make them move down quicker. However the player can move the blocks out of the intended space and off the screen. It also never stops moving down and goes off the screen.

The box I want the blocks to stay in is 160x280 (width x height), and the bottom left-hand side is at (0,0). Each block is 20x20. Here's the code:

private float previousTime;
    public float fallTime = 0.8f;
    public static int height = 280;
    public static int width = 160;

    // Start is called before the first frame update
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.LeftArrow))
        {
            transform.position += new Vector3(-20, 0, 0);
            if (!ValidMove())
            {
                transform.position += new Vector3(20, 0, 0);
            }
        }
        else if (Input.GetKeyDown(KeyCode.RightArrow))
        {
            transform.position += new Vector3(20, 0, 0);
            if (!ValidMove())
            {
                transform.position += new Vector3(-20, 0, 0);
            }
        }

        if(Time.time - previousTime > (Input.GetKey(KeyCode.DownArrow) ? fallTime / 10 : fallTime))
        {
            transform.position += new Vector3(0, -20, 0);

            previousTime = Time.time;
        }

        bool ValidMove()
        {
            foreach (Transform children in transform)
            {

                if (children.transform.position.x > width || children.transform.position.x < 0 || children.transform.position.y < 0)
                {
                    return false;
                }
            }

            return true;
        }
    }
}


问:
Cypress error RPC executor service threw an error
I’m new using Cypress and I’m trying to go to gmail to get a password recovery email.
The scenario is, I am on a page requesting password recovery and I must go to gmail to get the recovery link, but after entering the email and give next, this error comes out:
RPC executor service threw an error!
If I try to run the browser incognito shows me a different error regarding cookies.
Some One can help me.
Thanks.

If I try to run the browser incognito shows me a different error regarding cookies.
I modified the settings of the normal chrome session but the error continues.
I need log in in gmail and get the recover link.


问:
Check User Credentials Without Logging In
Is there any way to check if a user's username and password are valid without logging them in? Using:

import { Auth } from 'aws-amplify';
Auth.signIn(email, password);

Has the issue whereby upon calling that user is signed in causing the currently signed in user to be displaced. Is there a way to perhaps leverage Auth.signIn() to check if the credentials are correct without progressing to the full signin or even signing them in and signing them out immediately?


问:
zookeeper server cannot be started with member server ip as ipv6
I have two members that I want to form the cluster with the following configuration in zookeeper.properties:

```<code>host1:
server.0=localhost:2888:3888
server.1=[64:aaaa:bbbb:1000::8]:2888:3888

host2:
server.0=[64:aaaa:bbbb:1000::1]:2888:3888
server.1=localhost:2888:3888
</code>```

zookeeper server cannot be started with this console output:

```<code>sh-5.0$ echo $ZOO_LOG4J_PROP
DEBUG,ROLLINGFILE
sh-5.0$  ./zkServer.sh start
/usr/bin/java
ZooKeeper JMX enabled by default
Using config: /var/lib/zookeeper/bin/../conf/zoo.cfg
Starting zookeeper ... FAILED TO START
</code>```

But I did not get any DEBUG log from zookeeper.log.

Due to this issue, both hosts cannot join the quorum due to the Exception below:

```<code>2023-01-09 02:13:27,061 [myid:1] - WARN  [NIOWorkerThread-2:NIOServerCnxn@373] - Close of session 0x0
java.io.IOException: ZooKeeperServer not running
    at org.apache.zookeeper.server.NIOServerCnxn.readLength(NIOServerCnxn.java:544)
    at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:332)
</code>```

The zookeeper version is 3.7.1.

How to troubleshoot this further now?

Thanks.

Body:
I have two members that I want to form the cluster with the following configuration in zookeeper.properties:

host1:
server.0=localhost:2888:3888
server.1=[64:aaaa:bbbb:1000::8]:2888:3888

host2:
server.0=[64:aaaa:bbbb:1000::1]:2888:3888
server.1=localhost:2888:3888

zookeeper server cannot be started with this console output:

sh-5.0$ echo $ZOO_LOG4J_PROP
DEBUG,ROLLINGFILE
sh-5.0$  ./zkServer.sh start
/usr/bin/java
ZooKeeper JMX enabled by default
Using config: /var/lib/zookeeper/bin/../conf/zoo.cfg
Starting zookeeper ... FAILED TO START

But I did not get any DEBUG log from zookeeper.log.

Due to this issue, both hosts cannot join the quorum due to the Exception below:

2023-01-09 02:13:27,061 [myid:1] - WARN  [NIOWorkerThread-2:NIOServerCnxn@373] - Close of session 0x0
java.io.IOException: ZooKeeperServer not running
    at org.apache.zookeeper.server.NIOServerCnxn.readLength(NIOServerCnxn.java:544)
    at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:332)

The zookeeper version is 3.7.1.

How to troubleshoot this further now?

Thanks.


问:
How to insert a small logo on the corner of a plot with seaborn?
I plot a barchart but I need to add a logo.

```<code>g = sbs.barplot(data=df1)
g.set_xticklabels(names)
g.set(xlabel='Participants', ylabel='Study hours', title='1401.10.21')
</code>```

How to insert a small logo on the corner of a plot with seaborn?

I do not know how to do it
there are some solutions for matplotlib but I am asking about seaborn.

Body:
I plot a barchart but I need to add a logo.

g = sbs.barplot(data=df1)
g.set_xticklabels(names)
g.set(xlabel='Participants', ylabel='Study hours', title='1401.10.21')

How to insert a small logo on the corner of a plot with seaborn?

I do not know how to do it
there are some solutions for matplotlib but I am asking about seaborn.


问:
Primeng ConfirmDialog 'Yes' button is pre-selected
My p-confirmDialog has the pre-selected 'Yes' button by default.. I have no idea why. Additionally, I wonder how to customize the default buttons in any PrimeNg dialogs.

Can you please help me out?

Here is my code:

<list.components.html>

        <ng-template pTemplate="header">

            Name
            Description
            Action

        </ng-template>
        <ng-template pTemplate="body" let-dataSet>

              {{
                dataSet.Name
              }}

            {{ dataSet.Description }}

              <button
                pButton
                pRipple
                type="button"
                (click)="openDialog(dataSet)"
                style="color: white"
              >
                <fa-icon [icon]="editIcon" class="icon"></fa-icon>
              </button>
              <button
                pButton
                pRipple
                type="button"
                (click)="deleteConfirm(dataSet)"
                style="color: darkred"
              >
                <fa-icon [icon]="deleteIcon"></fa-icon>
              </button>

        </ng-template>

```
<p><strong><list.component.ts></strong></p>
<pre class="lang-js prettyprint-override"><code>import { ConfirmationService } from 'primeng/api';
import { ListService } from './../../Service/list.service';

@Component({
  selector: 'app-list',
  templateUrl: './list.component.html',
  styleUrls: ['./list.component.scss'],
  providers: [ConfirmationService],
})
export class ListComponent implements OnInit {
  data: any;

  constructor(
    public listService: ListService,
    private confirmationService: ConfirmationService
  ) {}

  ngOnInit() {}

  getItemList() {
    this.subscription = this.listService.getItems().subscribe({
      next: (res) => {
        this.data = res;
      },
      error: (err) => {
        console.error(err);
      },
    });
  }

  deleteConfirm(dataSet: any) {
    this.confirmationService.confirm({
      message: 'Do you want to delete this data?',
      header: 'Delete Confirmation',
      icon: 'pi pi-info-circle',
      accept: () => {
        this.listService.deleteItem(dataSet).subscribe({
          next: (res) => {
            this.getItemList();
          },
          error: (err) => {
            console.error(err);
          },
        });
      },
      reject: () => {
        console.log('Rejected!');
      },
    });
  }

}
</code>```

Here is the result of the confirmation dialog with the pre-selected 'yes' button :

Body:
My p-confirmDialog has the pre-selected 'Yes' button by default.. I have no idea why. Additionally, I wonder how to customize the default buttons in any PrimeNg dialogs.

Can you please help me out?

Here is my code:

<list.components.html>

        <ng-template pTemplate="header">

            Name
            Description
            Action

        </ng-template>
        <ng-template pTemplate="body" let-dataSet>

              {{
                dataSet.Name
              }}

            {{ dataSet.Description }}

              <button
                pButton
                pRipple
                type="button"
                (click)="openDialog(dataSet)"
                style="color: white"
              >
                <fa-icon [icon]="editIcon" class="icon"></fa-icon>
              </button>
              <button
                pButton
                pRipple
                type="button"
                (click)="deleteConfirm(dataSet)"
                style="color: darkred"
              >
                <fa-icon [icon]="deleteIcon"></fa-icon>
              </button>

        </ng-template>

<list.component.ts>

import { ConfirmationService } from 'primeng/api';
import { ListService } from './../../Service/list.service';

@Component({
  selector: 'app-list',
  templateUrl: './list.component.html',
  styleUrls: ['./list.component.scss'],
  providers: [ConfirmationService],
})
export class ListComponent implements OnInit {
  data: any;

  constructor(
    public listService: ListService,
    private confirmationService: ConfirmationService
  ) {}

  ngOnInit() {}

  getItemList() {
    this.subscription = this.listService.getItems().subscribe({
      next: (res) => {
        this.data = res;
      },
      error: (err) => {
        console.error(err);
      },
    });
  }

  deleteConfirm(dataSet: any) {
    this.confirmationService.confirm({
      message: 'Do you want to delete this data?',
      header: 'Delete Confirmation',
      icon: 'pi pi-info-circle',
      accept: () => {
        this.listService.deleteItem(dataSet).subscribe({
          next: (res) => {
            this.getItemList();
          },
          error: (err) => {
            console.error(err);
          },
        });
      },
      reject: () => {
        console.log('Rejected!');
      },
    });
  }

}

Here is the result of the confirmation dialog with the pre-selected 'yes' button :


问:
GitVersion incrementing Major and Minor versions but not Patch
We are trying to overhaul our GitVersion setup and for some reason the Patch version is not incrementing in our release branches, either automatically or explicitly with +semver: patch.  It does seem to work on the main branch.

This is a .NET application that automatically builds in a Azure DevOps pipeline - we are using the GitVersion plugin (spec 5.2.4).

The GitVersion.yml file has gone through multiple iterations but this is where it sits currently:

```<code>mode: Mainline
assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatch
assembly-informational-format: '{Major}.{Minor}.{Patch}.{PreReleaseNumber}'
commit-message-incrementing: Enabled
major-version-bump-message: '\+semver:\s?(breaking|major)'
minor-version-bump-message: '\+semver:\s?(feature|minor)'
patch-version-bump-message: '\+semver:\s?(fix|patch)'
no-bump-message: '\+semver:\s?(none|skip)'

branches:
  main:
    tag: ''
    increment: Patch
    prevent-increment-of-merged-branch-version: true
    track-merge-target: false
    regex: (^main$|^origin\/main$)
    source-branches:
    - main
    tracks-release-branches: false
    is-release-branch: false
    is-mainline: true
    pre-release-weight: 55000
  release:
    tag: 'R'
    increment: Patch
    prevent-increment-of-merged-branch-version: false
    track-merge-target: false
    regex: ^release?[/-]
    source-branches: []
    tracks-release-branches: true
    is-release-branch: true
    is-mainline: true
    pre-release-weight: 30000
ignore:
  sha: [8d1c309fd0baeaef867d152c29c288dd33e39963, 579819d0984b415313f388a2c2e36e284ee7254a, 80d0ac18b26d0fd21220f0d915d8d242eda311a7]
merge-message-formats: {}

</code>```

This is the output of dotnet-gitversion:

```<code>{
  "Major": 4,
  "Minor": 12,
  "Patch": 5,
  "PreReleaseTag": "R.158",
  "PreReleaseTagWithDash": "-R.158",
  "PreReleaseLabel": "R",
  "PreReleaseLabelWithDash": "-R",
  "PreReleaseNumber": 158,
  "WeightedPreReleaseNumber": 30158,
  "BuildMetaData": null,
  "BuildMetaDataPadded": "",
  "FullBuildMetaData": "Branch.release-TestBranch2.Sha.ec21cfb055ad846aad5efa07626b497462c59daa",
  "MajorMinorPatch": "4.12.5",
  "SemVer": "4.12.5-R.158",
  "LegacySemVer": "4.12.5-R158",
  "LegacySemVerPadded": "4.12.5-R0158",
  "AssemblySemVer": "4.12.5.0",
  "AssemblySemFileVer": "4.12.5.0",
  "FullSemVer": "4.12.5-R.158",
  "InformationalVersion": "4.12.5.158",
  "BranchName": "release/TestBranch2",
  "EscapedBranchName": "release-TestBranch2",
  "Sha": "ec21cfb055ad846aad5efa07626b497462c59daa",
  "ShortSha": "ec21cfb",
  "NuGetVersionV2": "4.12.5-r0158",
  "NuGetVersion": "4.12.5-r0158",
  "NuGetPreReleaseTagV2": "r0158",
  "NuGetPreReleaseTag": "r0158",
  "VersionSourceSha": "0872f890ce6508fcc7501e85876d0cb650bebf4f",
  "CommitsSinceVersionSource": 158,
  "CommitsSinceVersionSourcePadded": "0158",
  "UncommittedChanges": 0,
  "CommitDate": "2023-01-11"
}
</code>```

Tried toggling the following values:

```<code>tracks-release-branches
is-release-branch
is-mainline
</code>```

Also played with the regex, adding .* at the end

Unsure what should go under source-branches, should this be the regex again?

Any help would be appreciated, thanks!

Body:
We are trying to overhaul our GitVersion setup and for some reason the Patch version is not incrementing in our release branches, either automatically or explicitly with +semver: patch.  It does seem to work on the main branch.

This is a .NET application that automatically builds in a Azure DevOps pipeline - we are using the GitVersion plugin (spec 5.2.4).

The GitVersion.yml file has gone through multiple iterations but this is where it sits currently:

mode: Mainline
assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatch
assembly-informational-format: '{Major}.{Minor}.{Patch}.{PreReleaseNumber}'
commit-message-incrementing: Enabled
major-version-bump-message: '\+semver:\s?(breaking|major)'
minor-version-bump-message: '\+semver:\s?(feature|minor)'
patch-version-bump-message: '\+semver:\s?(fix|patch)'
no-bump-message: '\+semver:\s?(none|skip)'

branches:
  main:
    tag: ''
    increment: Patch
    prevent-increment-of-merged-branch-version: true
    track-merge-target: false
    regex: (^main$|^origin\/main$)
    source-branches:
    - main
    tracks-release-branches: false
    is-release-branch: false
    is-mainline: true
    pre-release-weight: 55000
  release:
    tag: 'R'
    increment: Patch
    prevent-increment-of-merged-branch-version: false
    track-merge-target: false
    regex: ^release?[/-]
    source-branches: []
    tracks-release-branches: true
    is-release-branch: true
    is-mainline: true
    pre-release-weight: 30000
ignore:
  sha: [8d1c309fd0baeaef867d152c29c288dd33e39963, 579819d0984b415313f388a2c2e36e284ee7254a, 80d0ac18b26d0fd21220f0d915d8d242eda311a7]
merge-message-formats: {}

This is the output of dotnet-gitversion:

{
  "Major": 4,
  "Minor": 12,
  "Patch": 5,
  "PreReleaseTag": "R.158",
  "PreReleaseTagWithDash": "-R.158",
  "PreReleaseLabel": "R",
  "PreReleaseLabelWithDash": "-R",
  "PreReleaseNumber": 158,
  "WeightedPreReleaseNumber": 30158,
  "BuildMetaData": null,
  "BuildMetaDataPadded": "",
  "FullBuildMetaData": "Branch.release-TestBranch2.Sha.ec21cfb055ad846aad5efa07626b497462c59daa",
  "MajorMinorPatch": "4.12.5",
  "SemVer": "4.12.5-R.158",
  "LegacySemVer": "4.12.5-R158",
  "LegacySemVerPadded": "4.12.5-R0158",
  "AssemblySemVer": "4.12.5.0",
  "AssemblySemFileVer": "4.12.5.0",
  "FullSemVer": "4.12.5-R.158",
  "InformationalVersion": "4.12.5.158",
  "BranchName": "release/TestBranch2",
  "EscapedBranchName": "release-TestBranch2",
  "Sha": "ec21cfb055ad846aad5efa07626b497462c59daa",
  "ShortSha": "ec21cfb",
  "NuGetVersionV2": "4.12.5-r0158",
  "NuGetVersion": "4.12.5-r0158",
  "NuGetPreReleaseTagV2": "r0158",
  "NuGetPreReleaseTag": "r0158",
  "VersionSourceSha": "0872f890ce6508fcc7501e85876d0cb650bebf4f",
  "CommitsSinceVersionSource": 158,
  "CommitsSinceVersionSourcePadded": "0158",
  "UncommittedChanges": 0,
  "CommitDate": "2023-01-11"
}

Tried toggling the following values:

tracks-release-branches
is-release-branch
is-mainline

Also played with the regex, adding .* at the end

Unsure what should go under source-branches, should this be the regex again?

Any help would be appreciated, thanks!


问:
Host react app on github pages, shows default MD of built app
I was trying to deploy my react app to github pages in order to show to a a recruiter this 'test' I saw you can do this using gh-pages package but when I deploy it to the gh-pages branch and go to the url of the github page I just can see the default md that is shown when you use the yarn build command i.e this :

```<code>Getting Started with Create React App

This project was bootstrapped with Create React App.
Available Scripts

In the project directory, you can run:
npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

The page will reload when you make changes.
You may also see any lint errors in the console.
npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.
npm run eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.
Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
npm run build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
</code>```

the steps I followed was:

run the yarn build command,

copied the build folder to the gh-pages branch

erased the src folder and deployed to github.

automatically the page was configured on github pages to be served from gh-pages branch but was shown the above md instead my app.

my package.json file is this, here I also created the predeploy and deploy script.

package.json

```<code>{
  "name": "persona-frontend",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@emotion/react": "^11.10.5",
    "@emotion/styled": "^11.10.5",
    "@fontsource/roboto": "^4.5.8",
    "@mui/icons-material": "^5.11.0",
    "@mui/material": "^5.11.3",
    "@mui/styles": "^5.11.2",
    "@reduxjs/toolkit": "^1.9.1",
    "@testing-library/jest-dom": "^5.16.5",
    "@testing-library/react": "^13.4.0",
    "@testing-library/user-event": "^13.5.0",
    "axios": "^1.2.2",
    "gh-pages": "^4.0.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-redux": "^8.0.5",
    "react-router-dom": "^6.6.1",
    "react-scripts": "5.0.1",
    "serve": "^14.1.2",
    "web-vitals": "^2.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "predeploy": "yarn run build",
    "deploy": "gh-pages -d build"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}
</code>```

how can I fix this issue? am i doing something wrong?

Body:
I was trying to deploy my react app to github pages in order to show to a a recruiter this 'test' I saw you can do this using gh-pages package but when I deploy it to the gh-pages branch and go to the url of the github page I just can see the default md that is shown when you use the yarn build command i.e this :

Getting Started with Create React App

This project was bootstrapped with Create React App.
Available Scripts

In the project directory, you can run:
npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

The page will reload when you make changes.
You may also see any lint errors in the console.
npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.
npm run eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.
Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
npm run build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

the steps I followed was:

run the yarn build command,

copied the build folder to the gh-pages branch

erased the src folder and deployed to github.

automatically the page was configured on github pages to be served from gh-pages branch but was shown the above md instead my app.

my package.json file is this, here I also created the predeploy and deploy script.

package.json

{
  "name": "persona-frontend",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@emotion/react": "^11.10.5",
    "@emotion/styled": "^11.10.5",
    "@fontsource/roboto": "^4.5.8",
    "@mui/icons-material": "^5.11.0",
    "@mui/material": "^5.11.3",
    "@mui/styles": "^5.11.2",
    "@reduxjs/toolkit": "^1.9.1",
    "@testing-library/jest-dom": "^5.16.5",
    "@testing-library/react": "^13.4.0",
    "@testing-library/user-event": "^13.5.0",
    "axios": "^1.2.2",
    "gh-pages": "^4.0.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-redux": "^8.0.5",
    "react-router-dom": "^6.6.1",
    "react-scripts": "5.0.1",
    "serve": "^14.1.2",
    "web-vitals": "^2.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "predeploy": "yarn run build",
    "deploy": "gh-pages -d build"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

how can I fix this issue? am i doing something wrong?


问:
WSS: SOAP Message Security - Should the KeyIdentifier change in the response XML if I change my key and certificate?
I am integrating with Ontario Health Insurance Plan. They make use of SOAP Encryption as defined (http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0.pdf). Currently, I am getting an XML response, but can't decrypt the KeyInfo with my private key required to decrypt the body. What I have noticed is no matter which key I use the KeyIdentifier always remains oYBZp6Zb3kYniT3Ow/LnALmpeDU=, but based on what I have read (https://www.ibm.com/docs/en/cics-ts/6.1?topic=security-how-it-works-soap-message-encryption) the identifiers should be the same as my public keys SKI. Do I understand this correctly?

<xenc:EncryptedKey xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
    <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
        xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" />
    <dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
        <wsse:SecurityTokenReference>
            <wsse:KeyIdentifier
                ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier"
                EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">
                oYBZp6Zb3kYniT3Ow/LnALmpeDU=</wsse:KeyIdentifier>
        </wsse:SecurityTokenReference>
    </dsig:KeyInfo>
    <xenc:CipherData xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
        <xenc:CipherValue>
            acfi5nxv4qSdndzJy9oOwVGyFQ2cFADwXXFNhR2mH6THPrMY7MSuPFQWWsDUM/33eVNWKKmipNOZTlm6nsXaVrxryRgm92UU+38btWM7v55D06/Xl1kQdwyP9NLbFTUmySKaxedDHI6BIknIZ0fds0vfusYZNWKsXtIgR6fv7cIKqJwWAtQYDXnF8unrZOMENfMwq49o52iQukDUwwtrjEUCkacY0G+xlzihhRKl96S+4iGi2nQqyRxbTxFscvV3rHuFLtVrgo3ykkmhfnhUrAhVCd+qB3k4CNVButZNqPVW8mCLfl2S47pJubmKiD/oSyA8JI5VbuGe5rdPhziOBQ==</xenc:CipherValue>
    </xenc:CipherData>
    <xenc:ReferenceList>
        <xenc:DataReference URI="#G0x7f5f58fabca0-46D" />
    </xenc:ReferenceList>
</xenc:EncryptedKey>
```

Thanks for all the assistance as always.

Body:
I am integrating with Ontario Health Insurance Plan. They make use of SOAP Encryption as defined (http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0.pdf). Currently, I am getting an XML response, but can't decrypt the KeyInfo with my private key required to decrypt the body. What I have noticed is no matter which key I use the KeyIdentifier always remains oYBZp6Zb3kYniT3Ow/LnALmpeDU=, but based on what I have read (https://www.ibm.com/docs/en/cics-ts/6.1?topic=security-how-it-works-soap-message-encryption) the identifiers should be the same as my public keys SKI. Do I understand this correctly?

<xenc:EncryptedKey xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
    <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
        xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" />
    <dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
        <wsse:SecurityTokenReference>
            <wsse:KeyIdentifier
                ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier"
                EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">
                oYBZp6Zb3kYniT3Ow/LnALmpeDU=</wsse:KeyIdentifier>
        </wsse:SecurityTokenReference>
    </dsig:KeyInfo>
    <xenc:CipherData xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
        <xenc:CipherValue>
            acfi5nxv4qSdndzJy9oOwVGyFQ2cFADwXXFNhR2mH6THPrMY7MSuPFQWWsDUM/33eVNWKKmipNOZTlm6nsXaVrxryRgm92UU+38btWM7v55D06/Xl1kQdwyP9NLbFTUmySKaxedDHI6BIknIZ0fds0vfusYZNWKsXtIgR6fv7cIKqJwWAtQYDXnF8unrZOMENfMwq49o52iQukDUwwtrjEUCkacY0G+xlzihhRKl96S+4iGi2nQqyRxbTxFscvV3rHuFLtVrgo3ykkmhfnhUrAhVCd+qB3k4CNVButZNqPVW8mCLfl2S47pJubmKiD/oSyA8JI5VbuGe5rdPhziOBQ==</xenc:CipherValue>
    </xenc:CipherData>
    <xenc:ReferenceList>
        <xenc:DataReference URI="#G0x7f5f58fabca0-46D" />
    </xenc:ReferenceList>
</xenc:EncryptedKey>

Thanks for all the assistance as always.


问:
How to get primary contact account for organization uzing boto3
I have a AWS Organization setup for my AWS accounts. I am looking for a method to programmatically get information about the primary contact for each of the accounts in my organization.

I have been using boto3 to get the data about accounts in organization. I am able to pull ARN, OUs, email etc. and I can store this data in an array.

I did some research and I can not find a method in Organizations class that will allow me to get this data.

Ref: https://boto3.amazonaws.com/v1/documentation/api/1.9.42/reference/services/organizations.html

I did find a that I can pull this info using the account class but not for all accounts in the organization.

client = boto3.client('account')
get_contact_information(**kwargs)

Can you please help me to indentify method to pull this data about all accounts in the organizaitons? Also what permissions this method requires?

PS. I am able to access this using AWS portal