问:
Login Android apps with facebook Works on debug but not on production
i'm about to loose my mind over this problem,
i have generated every key hash possible for this and still no luck,

ways i tried:

i used the command in Facebook docummentation on how to generate key hash for both release and debug

keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

keytool -exportcert -alias YOUR_RELEASE_KEY_ALIAS -keystore YOUR_RELEASE_KEY_PATH | openssl sha1 -binary | openssl base64

i went to my google play console, copped app sign in key and generated it to base64
i did the same for Upload key Certificate

i'm using unity, and in unity Facebook SDK i added my android keystore path and it generated me a key hash

when i login it gives me an error saying "invalid key hash ****** doesn't match any stored key" i copied that key and added in facebook developer

and yet having facebook app on my device doesn't work,

please any help on this is much appreciated.
thanks


来源: stackexchange

问:
Remote MySQL is not able to connect
MySQL is not able to connect and how is it possible that we are connecting from remote IP address but showing in error that we are connecting from IP address of our system

my expectation is able to connect or if getting an error "access denied for {user}@{remote_ip_add} (using password yes)"

why show our system IP in remote_ip_add

error image for refference

ContentLicense: CC BY-SA 4.0

Title: Remote MySQL is not able to connect


问:
runtime error: mat1 and mat2 shapes cannot be multiplied (2880x18 and 2880x18) for fnn in python
mat1 and mat2 shapes cannot be multiplied (2880x18 and 2880x18)
for feedforward neural network for  LUNA16 dataset.

I am getting error in the step forward:

class FeedforwardNeuralNetModel(nn.Module):
    def __init__(self, input_dim, hidden_dim, output_dim):
        super(FeedforwardNeuralNetModel, self).__init__()
        # Linear function
        self.fc1 = nn.Linear(input_dim, hidden_dim)

        # Non-linearity
        self.sigmoid = nn.Sigmoid()

        # Linear function (readout)
        self.fc2 = nn.Linear(hidden_dim, output_dim)

    def forward(self, x):
        # Linear function  # LINEAR
        out = self.fc1(x)

        # Non-linearity  # NON-LINEAR
        out = self.sigmoid(out)

        # Linear function (readout)  # LINEAR
        out = self.fc2(out)
        return out
```
<pre class="lang-py prettyprint-override"><code>input_dim = 2880
hidden_dim = 18
output_dim = 2
model=FeedforwardNeuralNetModel(input_dim,hidden_dim,output_dim )
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
model = model.to(device)
criterion = nn.CrossEntropyLoss()
# Use the AdamW optimizer
optimizer = optim.AdamW(model.parameters(), weight_decay=0.1)
</code>```

import time
from tqdm.notebook import tqdm
EPOCHS = 5

for epoch in range(EPOCHS):

    epoch_start = time.time()

    train_loss, train_acc, train_pos, train_neg = train_loop(
        model, train_dl, criterion,
        optimizer,len(train_ds)
    )

    val_loss, val_acc, val_pos, val_neg = eval_loop(
        model, val_dl, criterion
    )

    time_elapsed = time.time() - epoch_start
    print(f'Epoch: {epoch+1:02} | Epoch Time: {time_elapsed // 60:.0f}m {time_elapsed % 60:.0f}s')
    print()
    print(f'\tTrain Loss: {train_loss:.3f} | Train Acc: {train_acc*100:.2f}%')
    print(f'\tTrain - correct pos: {train_pos[0]}/{train_pos[1]} | correct neg: {train_neg[0]}/{train_neg[1]}')
    print()
    print(f'\tVal. Loss: {val_loss:.3f} |  Val. Acc: {val_acc*100:.2f}%')
    print(f'\tVal. - correct pos: {val_pos[0]}/{val_pos[1]} | correct neg: {val_neg[0]}/{val_neg[1]}')
    print()
```
<p><strong>Error:</strong></p>
```RuntimeError                              Traceback (most recent call last)
/tmp/ipykernel_27/3674954202.py in <module>
      9     train_loss, train_acc, train_pos, train_neg = train_loop(
     10         model, train_dl, criterion,
---> 11         optimizer,len(train_ds)
     12     )
     13

/tmp/ipykernel_27/3635434344.py in train_loop(model, dataloader, criterion, optimizer, ds_size)
     25         optimizer.zero_grad()
     26
---> 27         outputs = model(inputs)
     28         _, preds = torch.max(outputs, 1)
     29

/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
   1108         if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
   1109                 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1110             return forward_call(*input, **kwargs)
   1111         # Do not call functions when jit is used
   1112         full_backward_hooks, non_full_backward_hooks = [], []

/tmp/ipykernel_27/3729369710.py in forward(self, x)
     13     def forward(self, x):
     14         # Linear function  # LINEAR
---> 15         out = self.fc1(x)
     16
     17         # Non-linearity  # NON-LINEAR

/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
   1108         if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
   1109                 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1110             return forward_call(*input, **kwargs)
   1111         # Do not call functions when jit is used
   1112         full_backward_hooks, non_full_backward_hooks = [], []

/opt/conda/lib/python3.7/site-packages/torch/nn/modules/linear.py in forward(self, input)
    101
    102     def forward(self, input: Tensor) -> Tensor:
--> 103         return F.linear(input, self.weight, self.bias)
    104
    105     def extra_repr(self) -> str:

RuntimeError: mat1 and mat2 shapes cannot be multiplied (2880x18 and 2880x18
```

Body:
mat1 and mat2 shapes cannot be multiplied (2880x18 and 2880x18)
for feedforward neural network for  LUNA16 dataset.

I am getting error in the step forward:

class FeedforwardNeuralNetModel(nn.Module):
    def __init__(self, input_dim, hidden_dim, output_dim):
        super(FeedforwardNeuralNetModel, self).__init__()
        # Linear function
        self.fc1 = nn.Linear(input_dim, hidden_dim)

        # Non-linearity
        self.sigmoid = nn.Sigmoid()

        # Linear function (readout)
        self.fc2 = nn.Linear(hidden_dim, output_dim)

    def forward(self, x):
        # Linear function  # LINEAR
        out = self.fc1(x)

        # Non-linearity  # NON-LINEAR
        out = self.sigmoid(out)

        # Linear function (readout)  # LINEAR
        out = self.fc2(out)
        return out

input_dim = 2880
hidden_dim = 18
output_dim = 2
model=FeedforwardNeuralNetModel(input_dim,hidden_dim,output_dim )
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
model = model.to(device)
criterion = nn.CrossEntropyLoss()
# Use the AdamW optimizer
optimizer = optim.AdamW(model.parameters(), weight_decay=0.1)

import time
from tqdm.notebook import tqdm
EPOCHS = 5

for epoch in range(EPOCHS):

    epoch_start = time.time()

    train_loss, train_acc, train_pos, train_neg = train_loop(
        model, train_dl, criterion,
        optimizer,len(train_ds)
    )

    val_loss, val_acc, val_pos, val_neg = eval_loop(
        model, val_dl, criterion
    )

    time_elapsed = time.time() - epoch_start
    print(f'Epoch: {epoch+1:02} | Epoch Time: {time_elapsed // 60:.0f}m {time_elapsed % 60:.0f}s')
    print()
    print(f'\tTrain Loss: {train_loss:.3f} | Train Acc: {train_acc*100:.2f}%')
    print(f'\tTrain - correct pos: {train_pos[0]}/{train_pos[1]} | correct neg: {train_neg[0]}/{train_neg[1]}')
    print()
    print(f'\tVal. Loss: {val_loss:.3f} |  Val. Acc: {val_acc*100:.2f}%')
    print(f'\tVal. - correct pos: {val_pos[0]}/{val_pos[1]} | correct neg: {val_neg[0]}/{val_neg[1]}')
    print()

Error:

RuntimeError                              Traceback (most recent call last)
/tmp/ipykernel_27/3674954202.py in <module>
      9     train_loss, train_acc, train_pos, train_neg = train_loop(
     10         model, train_dl, criterion,
---> 11         optimizer,len(train_ds)
     12     )
     13

/tmp/ipykernel_27/3635434344.py in train_loop(model, dataloader, criterion, optimizer, ds_size)
     25         optimizer.zero_grad()
     26
---> 27         outputs = model(inputs)
     28         _, preds = torch.max(outputs, 1)
     29

/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
   1108         if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
   1109                 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1110             return forward_call(*input, **kwargs)
   1111         # Do not call functions when jit is used
   1112         full_backward_hooks, non_full_backward_hooks = [], []

/tmp/ipykernel_27/3729369710.py in forward(self, x)
     13     def forward(self, x):
     14         # Linear function  # LINEAR
---> 15         out = self.fc1(x)
     16
     17         # Non-linearity  # NON-LINEAR

/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
   1108         if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
   1109                 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1110             return forward_call(*input, **kwargs)
   1111         # Do not call functions when jit is used
   1112         full_backward_hooks, non_full_backward_hooks = [], []

/opt/conda/lib/python3.7/site-packages/torch/nn/modules/linear.py in forward(self, input)
    101
    102     def forward(self, input: Tensor) -> Tensor:
--> 103         return F.linear(input, self.weight, self.bias)
    104
    105     def extra_repr(self) -> str:

RuntimeError: mat1 and mat2 shapes cannot be multiplied (2880x18 and 2880x18


问:
where can I get Union bank bearer token (for philippines developer only or who knows about Union Bank)
So basically I have a problem, wherein I don't have any resources or any info I can found in the API of Union Bank about their bearer_token thingy...
the source is here...but when I already create my app-dashboard... there is nothing to be found about bearer_token and its making me mad and confused...also the main problem that I really just wanna solve is this...LINK which is about the savings account because it contains email and number and I wanna reuse it somewhere else in my code but I couldn't know where can I find the <bearer_token>...Also I'm translating this into python...but the basic part only I've done just to understand it.

```<code>import requests

# Set the API endpoint and headers
url = "https://api-uat.unionbankph.com/partners/sb/sandbox/v1/accounts"
headers = {
    "accept": "application/json",
    "content-type": "application/json",
    "x-ibm-client-id": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxx",
    "x-ibm-client-secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
}

# Set the request body data
data = {
    "username": "Xenodo123",
    "password": "Leonhard",
    "account_name": "Cutiepie123",
}

# Make the POST request
response = requests.post(url, headers=headers, json=data)

# Print the response status code
print(response.status_code)

# Print the response body
print(response.text)
</code>```

Body:
So basically I have a problem, wherein I don't have any resources or any info I can found in the API of Union Bank about their bearer_token thingy...
the source is here...but when I already create my app-dashboard... there is nothing to be found about bearer_token and its making me mad and confused...also the main problem that I really just wanna solve is this...LINK which is about the savings account because it contains email and number and I wanna reuse it somewhere else in my code but I couldn't know where can I find the <bearer_token>...Also I'm translating this into python...but the basic part only I've done just to understand it.

import requests

# Set the API endpoint and headers
url = "https://api-uat.unionbankph.com/partners/sb/sandbox/v1/accounts"
headers = {
    "accept": "application/json",
    "content-type": "application/json",
    "x-ibm-client-id": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxx",
    "x-ibm-client-secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
}

# Set the request body data
data = {
    "username": "Xenodo123",
    "password": "Leonhard",
    "account_name": "Cutiepie123",
}

# Make the POST request
response = requests.post(url, headers=headers, json=data)

# Print the response status code
print(response.status_code)

# Print the response body
print(response.text)


问:
Writing 100GB data in S3 taking 7 long hours - Speed optimization
Spark UII am running spark job on emr cluster with below configuration

I have total 14 s3 objects to read I am doing all left joins on them -persisting input data:

```<code>df1 = spark.read.parquet("\file1").select(required columns).distinct() --173063 records
df1.persist()
df2 = spark.read.parquet("\file2").select(required columns).distinct() --140424 records
df2.persist()
df3 = spark.read.parquet("\file3").select(required columns).distinct() --4255 records
df3.persist()
df4 = spark.read.parquet("\file4").select(required columns).distinct() --475750 records
df4.persist()
df5 = spark.read.parquet("\file5").select(required columns).distinct() --95778 records
df5.persist()
df6 = spark.read.parquet("\file6").select(required columns).distinct() --63464 records
df6.persist()
df7 = spark.read.parquet("\file7").select(required columns).distinct() --2250 records
df7.persist()
df8 = spark.read.parquet("\file8").select(required columns).distinct() --360 records
df8.persist()
df9 = spark.read.parquet("\file9").select(required columns).distinct() --202297 records
df9.persist()
df10 = spark.read.parquet("\file110").select(required columns).distinct() --134573 records
df10.persist()
df11 = spark.read.parquet("\file11").select(required columns).distinct() --125541 records
df11.persist()
df12 = spark.read.parquet("\file12").select(required columns).distinct() --202 records
df12.persist()
df13 = spark.read.parquet("\file13").select(required columns).distinct() --207 records
df13.persist()
df14 = spark.read.parquet("\file14").select(required columns).distinct() --21124 records
df14.persist()
</code>```

Now I am joining each df one by one all are broadcast joins and left joins

dropping not-required columns after each join

Persisting intermediate results of joins

```<code>join1_df = df1.join(broadcast(df2),left).drop(not required columns used in join)
join1_df.persist()
join2_df = join1_df.join(broadcast(df3),left).drop(not required columns used in join)
join2_df.persist()
join3_df = join2_df.join(broadcast(df4),left).drop(not required columns used in join)
join3_df.persist()
join4_df = join3_df.join(broadcast(df5),left).drop(not required columns used in join)
join4_df.persist()
join5_df = join4_df.join(broadcast(df6),left).drop(not required columns used in join)
join5_df.persist()
join6_df = join5_Df.join(broadcast(df7),left).drop(not required columns used in join)
join6_df.persist()
join7_df = join5_Df.join(broadcast(df8),left).drop(not required columns used in join)
join7_df.persist()
join8_df = join5_Df.join(broadcast(df9),left).drop(not required columns used in join)
join8_df.persist()
join9_df = join5_Df.join(broadcast(df10),left).drop(not required columns used in join)
join9_df.persist()
join10_df = join5_Df.join(broadcast(df11),left).drop(not required columns used in join)
join10_df.persist()
join11_df = join5_Df.join(broadcast(df12),left).drop(not required columns used in join)
join11_df.persist()
join12_df = join5_Df.join(broadcast(df13),left).drop(not required columns used in join)
join12_df.persist()

final_df = join5_Df.join(broadcast(df14),left).drop(not required columns used in join)
final_df.persist()
</code>```

final dataframe has 56 columns to write in parquet format:

```<code>final_df.write.mode("overwrite").parquet(s3 location)
</code>```

final_df size is 109GB

write step took 7 hours to s3 after that I checked s3 location where
201 files are created each file size is almost 570 MB and total size is 109GB. Created athena table on top of this
Total record count : 8471166455
Cluster info :

```<code>aws.emr.instance_type: "r5.12xlarge"
aws.emr.no_of_instances: "40"
</code>```

Coming to spark configuration

```<code>spark-submit --deploy-mode client --master yarn
--conf spark.shuffle.service.enabled=true
--conf spark.dynamicAllocation.enabled=true
--conf spark.dynamicAllocation.initialExecutors=5
--conf spark.dynamicAllocation.minExecutors=5
--conf spark.dynamicAllocation.maxExecutors=40
--conf spark.executor.cores=10
--conf spark.executor.memory=150G
--conf spark.driver.memory=150G
--conf \"spark.driver.extraJavaOptions=-XX:+UseG1GC\"
--conf \"spark.executor.extraJavaOptions=-XX:+UseG1GC\"
</code>```

Please help to understand correct spark configuration if incase that is the problem.

tried broadcast joins
persist intermediate results
increase spark configurations - num of executors, driver memory and executor memory
drop not-required columns after each join

Body:
Spark UII am running spark job on emr cluster with below configuration

I have total 14 s3 objects to read I am doing all left joins on them -persisting input data:

df1 = spark.read.parquet("\file1").select(required columns).distinct() --173063 records
df1.persist()
df2 = spark.read.parquet("\file2").select(required columns).distinct() --140424 records
df2.persist()
df3 = spark.read.parquet("\file3").select(required columns).distinct() --4255 records
df3.persist()
df4 = spark.read.parquet("\file4").select(required columns).distinct() --475750 records
df4.persist()
df5 = spark.read.parquet("\file5").select(required columns).distinct() --95778 records
df5.persist()
df6 = spark.read.parquet("\file6").select(required columns).distinct() --63464 records
df6.persist()
df7 = spark.read.parquet("\file7").select(required columns).distinct() --2250 records
df7.persist()
df8 = spark.read.parquet("\file8").select(required columns).distinct() --360 records
df8.persist()
df9 = spark.read.parquet("\file9").select(required columns).distinct() --202297 records
df9.persist()
df10 = spark.read.parquet("\file110").select(required columns).distinct() --134573 records
df10.persist()
df11 = spark.read.parquet("\file11").select(required columns).distinct() --125541 records
df11.persist()
df12 = spark.read.parquet("\file12").select(required columns).distinct() --202 records
df12.persist()
df13 = spark.read.parquet("\file13").select(required columns).distinct() --207 records
df13.persist()
df14 = spark.read.parquet("\file14").select(required columns).distinct() --21124 records
df14.persist()

Now I am joining each df one by one all are broadcast joins and left joins

dropping not-required columns after each join

Persisting intermediate results of joins

join1_df = df1.join(broadcast(df2),left).drop(not required columns used in join)
join1_df.persist()
join2_df = join1_df.join(broadcast(df3),left).drop(not required columns used in join)
join2_df.persist()
join3_df = join2_df.join(broadcast(df4),left).drop(not required columns used in join)
join3_df.persist()
join4_df = join3_df.join(broadcast(df5),left).drop(not required columns used in join)
join4_df.persist()
join5_df = join4_df.join(broadcast(df6),left).drop(not required columns used in join)
join5_df.persist()
join6_df = join5_Df.join(broadcast(df7),left).drop(not required columns used in join)
join6_df.persist()
join7_df = join5_Df.join(broadcast(df8),left).drop(not required columns used in join)
join7_df.persist()
join8_df = join5_Df.join(broadcast(df9),left).drop(not required columns used in join)
join8_df.persist()
join9_df = join5_Df.join(broadcast(df10),left).drop(not required columns used in join)
join9_df.persist()
join10_df = join5_Df.join(broadcast(df11),left).drop(not required columns used in join)
join10_df.persist()
join11_df = join5_Df.join(broadcast(df12),left).drop(not required columns used in join)
join11_df.persist()
join12_df = join5_Df.join(broadcast(df13),left).drop(not required columns used in join)
join12_df.persist()

final_df = join5_Df.join(broadcast(df14),left).drop(not required columns used in join)
final_df.persist()

final dataframe has 56 columns to write in parquet format:

final_df.write.mode("overwrite").parquet(s3 location)

final_df size is 109GB

write step took 7 hours to s3 after that I checked s3 location where
201 files are created each file size is almost 570 MB and total size is 109GB. Created athena table on top of this
Total record count : 8471166455
Cluster info :

aws.emr.instance_type: "r5.12xlarge"
aws.emr.no_of_instances: "40"

Coming to spark configuration

spark-submit --deploy-mode client --master yarn
--conf spark.shuffle.service.enabled=true
--conf spark.dynamicAllocation.enabled=true
--conf spark.dynamicAllocation.initialExecutors=5
--conf spark.dynamicAllocation.minExecutors=5
--conf spark.dynamicAllocation.maxExecutors=40
--conf spark.executor.cores=10
--conf spark.executor.memory=150G
--conf spark.driver.memory=150G
--conf \"spark.driver.extraJavaOptions=-XX:+UseG1GC\"
--conf \"spark.executor.extraJavaOptions=-XX:+UseG1GC\"

Please help to understand correct spark configuration if incase that is the problem.

tried broadcast joins
persist intermediate results
increase spark configurations - num of executors, driver memory and executor memory
drop not-required columns after each join


问:
How to install poppler-utils on godaddy server without ssh
I just want to install poppler-utils on my development server to convert pdf to HTML. But unfortunately, I don't have SSH access. has somebody known how to install it without SSH?</p>


问:
Mongo Database Exception : System.AggregateException: 'IEnumerable<ServiceDescriptor> serviceDescriptors, ServiceProviderOptions
I am converting .net 2.1 core project to .net 6.During this migration i got this exception that are mentioned below.

Exception 1:

InvalidOperationException: Error while validating the service descriptor 'ServiceType: Microsoft.AspNetCore.Identity.IRoleStore1[HelloHealthy.Domain.Entities.Models.Users.ApplicationRole] Lifetime: Scoped ImplementationType: AspNetCore.Identity.Mongo.Stores.RoleStore1[HelloHealthy.Domain.Entities.Models.Users.ApplicationRole]': Unable to resolve service for type 'Mongolino.Collection1[HelloHealthy.Domain.Entities.Models.Users.ApplicationRole]' while attempting to activate 'AspNetCore.Identity.Mongo.Stores.RoleStore1[HelloHealthy.Domain.Entities.Models.Users.ApplicationRole]'.

Exception 2:

InvalidOperationException: Unable to resolve service for type 'Mongolino.Collection1[HelloHealthy.Domain.Entities.Models.Users.ApplicationRole]' while attempting to activate 'AspNetCore.Identity.Mongo.Stores.RoleStore1[HelloHealthy.Domain.Entities.Models.Users.ApplicationRole]'.

Here i am attached the detailed exception that i am facing right now.
Image of Detailed Exception

StackTrace Image


问:
SwiftUI .sheet realisation
I'm trying to understand Apple .sheet view modifier realisation. I have realisation for custom bottom sheet:

```<code>public struct ICBottomSheetView<ContentView>: View where ContentView: View {

@Binding public var isShowing: Bool
public var content: ContentView

public init(isShowing: Binding<Bool>, content: ContentView) {
    _isShowing = isShowing
    self.content = content
}

public var body: some View {
    ZStack(alignment: .bottom) {
        if isShowing {
            Color.black
                .opacity(0.3)
                .ignoresSafeArea()
                .onTapGesture {
                    isShowing.toggle()
                }
            content
                .padding(.bottom, 42)
                .transition(.move(edge: .bottom))
                .background(
                    Color.tile
                )
                .customCornerRadius(16, corners: [.topLeft, .topRight])
        }
    }
    .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .bottom)
    .ignoresSafeArea()
    .animation(.default, value: isShowing)
}
</code>```

But I have a problem: when I use it, it has been displayed under tabView, can't understand how to bring it to the top. There is button under tabView

And I think that view Modifier will be better, but can't finish it, what I have:

```<code>public struct ICBottomSheet: ViewModifier {

@Binding public var isShowing: Bool

public init(isShowing: Binding<Bool>) {
    _isShowing = isShowing
}

public func body(content: Content) -> some View {
    ZStack(alignment: .bottom) {
        if isShowing {
            Color.black
                .opacity(0.3)
                .ignoresSafeArea()
                .onTapGesture {
                    isShowing.toggle()
                }
            content
                .padding(.bottom, 42)
                .transition(.move(edge: .bottom))
                .background(
                    Color.tile
                )
                .customCornerRadius(16, corners: [.topLeft, .topRight])
        }
    }
    .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .bottom)
    .ignoresSafeArea()
    .animation(.default, value: isShowing)
}
</code>```

I think that I should provide another View in ICBottomSheet: ViewModifier, but totally can't understand what to do in public func customSheet

```<code>extension View {
    public func customSheet<Content>(isShowing: Binding<Bool>, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
        return self.modifier(ICBottomSheet(isShowing: isShowing))
    }
}
</code>```

Title: SwiftUI .sheet realisation

Body:
I'm trying to understand Apple .sheet view modifier realisation. I have realisation for custom bottom sheet:

public struct ICBottomSheetView<ContentView>: View where ContentView: View {

@Binding public var isShowing: Bool
public var content: ContentView

public init(isShowing: Binding<Bool>, content: ContentView) {
    _isShowing = isShowing
    self.content = content
}

public var body: some View {
    ZStack(alignment: .bottom) {
        if isShowing {
            Color.black
                .opacity(0.3)
                .ignoresSafeArea()
                .onTapGesture {
                    isShowing.toggle()
                }
            content
                .padding(.bottom, 42)
                .transition(.move(edge: .bottom))
                .background(
                    Color.tile
                )
                .customCornerRadius(16, corners: [.topLeft, .topRight])
        }
    }
    .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .bottom)
    .ignoresSafeArea()
    .animation(.default, value: isShowing)
}

But I have a problem: when I use it, it has been displayed under tabView, can't understand how to bring it to the top. There is button under tabView

And I think that view Modifier will be better, but can't finish it, what I have:

public struct ICBottomSheet: ViewModifier {

@Binding public var isShowing: Bool

public init(isShowing: Binding<Bool>) {
    _isShowing = isShowing
}

public func body(content: Content) -> some View {
    ZStack(alignment: .bottom) {
        if isShowing {
            Color.black
                .opacity(0.3)
                .ignoresSafeArea()
                .onTapGesture {
                    isShowing.toggle()
                }
            content
                .padding(.bottom, 42)
                .transition(.move(edge: .bottom))
                .background(
                    Color.tile
                )
                .customCornerRadius(16, corners: [.topLeft, .topRight])
        }
    }
    .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .bottom)
    .ignoresSafeArea()
    .animation(.default, value: isShowing)
}

I think that I should provide another View in ICBottomSheet: ViewModifier, but totally can't understand what to do in public func customSheet

extension View {
    public func customSheet<Content>(isShowing: Binding<Bool>, @ViewBuilder content: @escaping () -> Content) -> some View where Content: View {
        return self.modifier(ICBottomSheet(isShowing: isShowing))
    }
}


问:
Postgres 11. Authentication using pg_bouncer + kerberos
We've got Postgres 11 server and Kerberos authentication.
My teammates asked to find out if we can also use pg_bouncer with Kerberos.
Does anyone use with combination (Kerberos + pg_bouncer).
Or where can I find settings?</p>


问:
Error 64 at YAML parse (R Markdown to PPT)
I am trying to create a powerpoint using R Markdown. Every time I tried to knit, this error always appears:

```<code>YAML parse exception at line 4, column 0,
while scanning for the next token:
found character that cannot start any token
Error: pandoc document conversion failed with error 64
Execution halted
</code>```

Below are the first 6 lines of my .rmd file. (I only put the numbers for clarity of which lines are what number)

```<code>1 ---
2 title: "PPT Final"
3 author: "Anonymous"
4 date: "`r Sys.Date()`"
5 output: powerpoint_presentation
6 ---
</code>```

I have tried running my code at other types of files that can be produced from R Markdown like HTML, word, etc. It shows the same error message. How do I fix this?

Body:
I am trying to create a powerpoint using R Markdown. Every time I tried to knit, this error always appears:

YAML parse exception at line 4, column 0,
while scanning for the next token:
found character that cannot start any token
Error: pandoc document conversion failed with error 64
Execution halted

Below are the first 6 lines of my .rmd file. (I only put the numbers for clarity of which lines are what number)

1 ---
2 title: "PPT Final"
3 author: "Anonymous"
4 date: "`r Sys.Date()`"
5 output: powerpoint_presentation
6 ---

I have tried running my code at other types of files that can be produced from R Markdown like HTML, word, etc. It shows the same error message. How do I fix this?


问:
why recursion not breaking at end in java
I just started learning recursion in Java but I can't understand how recursion is working. But it looks like three line code. Is there any easy way to learn recursion, nested recursion, deep learning about recursion?

package roughworkp;

public class r_class {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        System.out.println(check(5));
    }

    public static int check(int root) {
        int c = 0;
        if (root == 0) {
            return 0;
        }
        System.out.print("first");
        int l = check(root - 1);
        System.out.print("in l" + l + " ");

        int r = check(root - 1);
        System.out.println("in r" + r + " ");
//      System.out.print("i am in here"+" "+(++c)+" ");
//      ++c;
//      System.out.println();
        return Math.max(l, r)+1;
    }
}
```
<p>Output:</p>
<pre class="lang-none prettyprint-override"><code>firstfirstfirstfirstfirstin l0 in r0
in l1 firstin l0 in r0
in r1
in l2 firstfirstin l0 in r0
in l1 firstin l0 in r0
in r1
in r2
in l3 firstfirstfirstin l0 in r0
in l1 firstin l0 in r0
in r1
in l2 firstfirstin l0 in r0
in l1 firstin l0 in r0
in r1
in r2
in r3
in l4 firstfirstfirstfirstin l0 in r0
in l1 firstin l0 in r0
in r1
in l2 firstfirstin l0 in r0
in l1 firstin l0 in r0
in r1
in r2
in l3 firstfirstfirstin l0 in r0
in l1 firstin l0 in r0
in r1
in l2 firstfirstin l0 in r0
in l1 firstin l0 in r0
in r1
in r2
in r3
in r4
5
</code>```

I also commented some line why c is not increasing and return statement don't break the recursion at the end and find the max value every time.

Body:
I just started learning recursion in Java but I can't understand how recursion is working. But it looks like three line code. Is there any easy way to learn recursion, nested recursion, deep learning about recursion?

package roughworkp;

public class r_class {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        System.out.println(check(5));
    }

    public static int check(int root) {
        int c = 0;
        if (root == 0) {
            return 0;
        }
        System.out.print("first");
        int l = check(root - 1);
        System.out.print("in l" + l + " ");

        int r = check(root - 1);
        System.out.println("in r" + r + " ");
//      System.out.print("i am in here"+" "+(++c)+" ");
//      ++c;
//      System.out.println();
        return Math.max(l, r)+1;
    }
}

Output:

firstfirstfirstfirstfirstin l0 in r0
in l1 firstin l0 in r0
in r1
in l2 firstfirstin l0 in r0
in l1 firstin l0 in r0
in r1
in r2
in l3 firstfirstfirstin l0 in r0
in l1 firstin l0 in r0
in r1
in l2 firstfirstin l0 in r0
in l1 firstin l0 in r0
in r1
in r2
in r3
in l4 firstfirstfirstfirstin l0 in r0
in l1 firstin l0 in r0
in r1
in l2 firstfirstin l0 in r0
in l1 firstin l0 in r0
in r1
in r2
in l3 firstfirstfirstin l0 in r0
in l1 firstin l0 in r0
in r1
in l2 firstfirstin l0 in r0
in l1 firstin l0 in r0
in r1
in r2
in r3
in r4
5

I also commented some line why c is not increasing and return statement don't break the recursion at the end and find the max value every time.


问:
Draco NGSIToCassandra processor giving error
I am trying to persist data coming from Orion Context Broker to Cassandra by using ging/fiware-draco dockerhub image.

The moment I drag and drop the NGSIToCassandraError it throws an error as shown in the image. I tried the older versions of docker image with no help. Any suggestion  is appreciated.

NGSIToCassandraError


问:
Using '=' operator to make two arrays equal in C++
```<code>#include <iostream>
using namespace std;

int main() {
    int arr[5];
    arr[0]=33;
    arr[1]=47;
    arr[2]=59;
    arr[3]=67;
    arr[4]=98;

    for(int i=0;i<5;i++){
        cout<<arr[i]<<endl;
    }

    cout<<endl;

    int two[5]=arr;
    two[2]=590;

    for(int i=0;i<5;i++){
        cout<<two[i]<<endl;
    }

    return 0;
}

</code>```

I was expecting the new array "two" point to the same address as "arr", but instead it gives following error:

```<code>array must be initialized with a brace-enclosed initializer
   18 |     int two[5]=arr;
      |                ^~~
</code>```

I explored that I can use copy() from algorithm header for doing the task. I want to know about other approaches to the same problem.

Body:
#include <iostream>
using namespace std;

int main() {
    int arr[5];
    arr[0]=33;
    arr[1]=47;
    arr[2]=59;
    arr[3]=67;
    arr[4]=98;

    for(int i=0;i<5;i++){
        cout<<arr[i]<<endl;
    }

    cout<<endl;

    int two[5]=arr;
    two[2]=590;

    for(int i=0;i<5;i++){
        cout<<two[i]<<endl;
    }

    return 0;
}

I was expecting the new array "two" point to the same address as "arr", but instead it gives following error:

array must be initialized with a brace-enclosed initializer
   18 |     int two[5]=arr;
      |                ^~~

I explored that I can use copy() from algorithm header for doing the task. I want to know about other approaches to the same problem.


问:
Set x-xsrf-token and send it in header during request RTK Query
I have Laravel API + NextJs application with Sanctum authentication.

With Sanctum before sending request to the route, you need to send a request to /sanctum/csrf-cookie 'to initialize csrf protection'.

Here i how my RTK Query API looks:
enter image description here

Here is how the functions are called:
enter image description here

The logic works fine but i wanted to use only RTK Query and not depend on axios. Also, is there any way to handle getting the csrf-cookie and send it during the request from createAPI()?


问:
MS-Teams apps, accessing native device capabilities
I'm using the below approach to access the camera & gallery from an MSTeams app.

Link: Access device permissions

I'm facing 2 errors,
Error 1: 1000App doesn't have sufficient permission to use this API
This is when i dont use "navigator.permissions.query({ name: 'camera' });"
If i use the above navigator permission to prompt the permission alert i get the 2nd warning/exception ie
Error 2: Exception Cannot read properties of undefined (reading 'query')

Can some please help..!


问:
Antd inputNumber focus delete formatter , blur add formatter
When I use Antd InputNumber,  I want to focused it to display {value}, and blur it to display {value}%

But I have encountered a problem, when I focused it to display {value}% , but blur it display value, not {value}%, again, just display value

demo

```<code>const App = () => {
  const [focus, setFocus] = React.useState(false);

  const changeFocus = (newFocus) => {
    setFocus(newFocus);
  };

  const props = (newFocus) => {
    return {
      formatter: newFocus ? (value) => value : (value) => `${value}%`,
      parser: newFocus ? (value) => value : (value) => value!.replace('%', ''),
    };
  };

  return (
    <Space>
      <InputNumber
        onFocus={() => {
          console.log('===focus===');
          changeFocus(true);
        }}
        onBlur={() => {
          changeFocus(false);
        }}
        defaultValue={100}
        min={0}
        max={100}
        onChange={onChange}
        {...props(focus)}
      />
    </Space>
  );
};
</code>```

Body:
When I use Antd InputNumber,  I want to focused it to display {value}, and blur it to display {value}%

But I have encountered a problem, when I focused it to display {value}% , but blur it display value, not {value}%, again, just display value

demo

const App = () => {
  const [focus, setFocus] = React.useState(false);

  const changeFocus = (newFocus) => {
    setFocus(newFocus);
  };

  const props = (newFocus) => {
    return {
      formatter: newFocus ? (value) => value : (value) => `${value}%`,
      parser: newFocus ? (value) => value : (value) => value!.replace('%', ''),
    };
  };

  return (
    <Space>
      <InputNumber
        onFocus={() => {
          console.log('===focus===');
          changeFocus(true);
        }}
        onBlur={() => {
          changeFocus(false);
        }}
        defaultValue={100}
        min={0}
        max={100}
        onChange={onChange}
        {...props(focus)}
      />
    </Space>
  );
};


问:
React Native: Invariant Violation: Module RCTEventEmitter is not a registered callable module (calling receiveTouches)
```<code>Exception o4.c: Invariant Violation: Module RCTEventEmitter is not a registered callable module (calling receiveTouches). A frequent cause of the error is that the application entry file path is incorrect.
      This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes, stack:
invariant@1:217705
__callFunction@1:223729
anonymous@1:222279
__guard@1:223234
callFunctionReturnFlushedQueue@1:222237
  at com.facebook.react.modules.core.ExceptionsManagerModule.reportException (ExceptionsManagerModule.java)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java)
  at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java)
  at com.facebook.react.bridge.queue.NativeRunnable.run (NativeRunnable.java)
  at android.os.Handler.handleCallback (Handler.java:883)
  at android.os.Handler.dispatchMessage (Handler.java:100)
  at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java)
  at android.os.Looper.loop (Looper.java:237)
  at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (MessageQueueThreadImpl.java)
  at java.lang.Thread.run (Thread.java:919)
</code>```
```<code> npx react-native info
warn Package @react-native-community/google-signin contains invalid configuration: "dependency.platforms.ios.project" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.
info Fetching system and libraries information...
System:
    OS: macOS 13.1
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 44.29 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.11.0 - /usr/local/bin/node
    Yarn: 1.22.17 - ~/.yarn/bin/yarn
    npm: 9.1.2 - ~/ReactNativeProjects/pylon/node_modules/.bin/npm
    Watchman: 2022.11.07.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /Users/rajan/.rvm/gems/ruby-2.7.5/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.2 AI-212.5712.43.2112.8815526
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 14.0.2 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.0.0 => 18.0.0
    react-native: 0.69.5 => 0.69.5
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
</code>```

This report is generated after publishing in playstore.

Body:
Exception o4.c: Invariant Violation: Module RCTEventEmitter is not a registered callable module (calling receiveTouches). A frequent cause of the error is that the application entry file path is incorrect.
      This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes, stack:
invariant@1:217705
__callFunction@1:223729
anonymous@1:222279
__guard@1:223234
callFunctionReturnFlushedQueue@1:222237
  at com.facebook.react.modules.core.ExceptionsManagerModule.reportException (ExceptionsManagerModule.java)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java)
  at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java)
  at com.facebook.react.bridge.queue.NativeRunnable.run (NativeRunnable.java)
  at android.os.Handler.handleCallback (Handler.java:883)
  at android.os.Handler.dispatchMessage (Handler.java:100)
  at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java)
  at android.os.Looper.loop (Looper.java:237)
  at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (MessageQueueThreadImpl.java)
  at java.lang.Thread.run (Thread.java:919)

 npx react-native info
warn Package @react-native-community/google-signin contains invalid configuration: "dependency.platforms.ios.project" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.
info Fetching system and libraries information...
System:
    OS: macOS 13.1
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 44.29 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.11.0 - /usr/local/bin/node
    Yarn: 1.22.17 - ~/.yarn/bin/yarn
    npm: 9.1.2 - ~/ReactNativeProjects/pylon/node_modules/.bin/npm
    Watchman: 2022.11.07.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /Users/rajan/.rvm/gems/ruby-2.7.5/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.2 AI-212.5712.43.2112.8815526
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 14.0.2 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.0.0 => 18.0.0
    react-native: 0.69.5 => 0.69.5
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

This report is generated after publishing in playstore.


问:
How to implement SSO using AWS Cognito Identity JS
I have integrated AWS Cognito Identity JS into a custom UI with all sign in / forgot password / sign out functionality. But now i want to log in to the dashboard by logging in from a different domain and not from the domain where my website is hosted. I am using AWS Cognito but because of limited resources i am not able to find a feasible solution. In my domain where i have hosted my website i a able to login by setting all tokens onto local storage and if there is any object in local storage i am navigating my user to dashboard. My dashboard is a protected route.

Using SSO in React using AWS Cognito Identity JS


问:
Deno hidden console windows
I need to hide a running Deno program in the background, hiding the console. The project only runs on the Windows 10 platform，This project will be packaged as an .exe.  I want to run it without the window display. Is there a way to achieve this?

Deno compile command : deno compile --allow-all index.js --stable

    //index.js
    import modbus_tcp_clinet from "./modbus_tcp_clinet.js";
    import html_content from "./html_content.ts";

    const Path = "./configuration.json";
    const configuration = await Deno.readTextFile(Path);
    const currentWorkingDirectory = Deno.cwd();
    let fiberConf = JSON.parse(configuration);
    let modbusTcp = new modbus_tcp_clinet(fiberConf);
    console.log(Deno.env.get("SW_HIDE"));

    // const p = Deno.run({
    //     cmd: ["C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe", `--app=${currentWorkingDirectory}/occ.html`],
    // });
    // await p.status();
    // console.log(p)
    const p1 = Deno.run({
      cmd: [
        "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe",
        `--app=http://localhost:7075/`,
      ],
    });
    await p1.status();

    console.log(p1);

    const server = Deno.listen({ hostname: "localhost", port: 7075 });
    for await (const conn of server) {
      serveHttp(conn);
    }
```

Title: Deno hidden console windows


问:
c++ error: ‘struct std::atomic_flag’ has no member named ‘test’
I am trying to compile https://github.com/LuisaGroup/LuisaCompute.

During make, I got

[  0%] Built target compute
[  1%] Built target EASTL
[  2%] Built target stb
[  3%] Built target glad
[ 15%] Built target glfw
[ 16%] Built target imgui
[ 17%] Built target luisa-compute-ext
[ 17%] Built target luisa-compute-ext-copy
[ 21%] Built target spdlog
[ 26%] Built target luisa-compute-core
[ 26%] Building CXX object src/vstl/CMakeFiles/luisa-compute-vstl.dir/ThreadPool.cpp.o
/home/user/3dlab/LuisaCompute/src/vstl/ThreadPool.cpp: In lambda function:
/home/user/3dlab/LuisaCompute/src/vstl/ThreadPool.cpp:22:21: error: ‘struct std::atomic_flag’ has no member named ‘test’
   22 |             enabled.test(std::memory_order_acquire) && taskList.Length() == 0) {
      |                     ^~~~
/home/user/3dlab/LuisaCompute/src/vstl/ThreadPool.cpp: In lambda function:
/home/user/3dlab/LuisaCompute/src/vstl/ThreadPool.cpp:29:24: error: ‘struct std::atomic_flag’ has no member named ‘test’
   29 |         while (enabled.test(std::memory_order_acquire)) {
      |                        ^~~~
/home/user/3dlab/LuisaCompute/src/vstl/ThreadPool.cpp: In lambda function:
/home/user/3dlab/LuisaCompute/src/vstl/ThreadPool.cpp:40:24: error: ‘struct std::atomic_flag’ has no member named ‘test’
   40 |         while (enabled.test(std::memory_order_acquire)) {
      |                        ^~~~
make[2]: *** [src/vstl/CMakeFiles/luisa-compute-vstl.dir/build.make:160: src/vstl/CMakeFiles/luisa-compute-vstl.dir/ThreadPool.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:925: src/vstl/CMakeFiles/luisa-compute-vstl.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
```
<p>Cppreference says there should be a member called <code>test</code> if c++20 is enabled, and I checked that CMakeLists.txt does specified</p>
```set(CMAKE_CXX_STANDARD 20)
```

What is the problem? I have both g++ (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0 and g++-9 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 installed and /usr/bin/g++ links to g++-10

Body:
I am trying to compile https://github.com/LuisaGroup/LuisaCompute.

During make, I got

[  0%] Built target compute
[  1%] Built target EASTL
[  2%] Built target stb
[  3%] Built target glad
[ 15%] Built target glfw
[ 16%] Built target imgui
[ 17%] Built target luisa-compute-ext
[ 17%] Built target luisa-compute-ext-copy
[ 21%] Built target spdlog
[ 26%] Built target luisa-compute-core
[ 26%] Building CXX object src/vstl/CMakeFiles/luisa-compute-vstl.dir/ThreadPool.cpp.o
/home/user/3dlab/LuisaCompute/src/vstl/ThreadPool.cpp: In lambda function:
/home/user/3dlab/LuisaCompute/src/vstl/ThreadPool.cpp:22:21: error: ‘struct std::atomic_flag’ has no member named ‘test’
   22 |             enabled.test(std::memory_order_acquire) && taskList.Length() == 0) {
      |                     ^~~~
/home/user/3dlab/LuisaCompute/src/vstl/ThreadPool.cpp: In lambda function:
/home/user/3dlab/LuisaCompute/src/vstl/ThreadPool.cpp:29:24: error: ‘struct std::atomic_flag’ has no member named ‘test’
   29 |         while (enabled.test(std::memory_order_acquire)) {
      |                        ^~~~
/home/user/3dlab/LuisaCompute/src/vstl/ThreadPool.cpp: In lambda function:
/home/user/3dlab/LuisaCompute/src/vstl/ThreadPool.cpp:40:24: error: ‘struct std::atomic_flag’ has no member named ‘test’
   40 |         while (enabled.test(std::memory_order_acquire)) {
      |                        ^~~~
make[2]: *** [src/vstl/CMakeFiles/luisa-compute-vstl.dir/build.make:160: src/vstl/CMakeFiles/luisa-compute-vstl.dir/ThreadPool.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:925: src/vstl/CMakeFiles/luisa-compute-vstl.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Cppreference says there should be a member called test if c++20 is enabled, and I checked that CMakeLists.txt does specified

set(CMAKE_CXX_STANDARD 20)

What is the problem? I have both g++ (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0 and g++-9 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 installed and /usr/bin/g++ links to g++-10


问:
Authenticating Google RCS Business Messaging API's
I am trying to send RCS campaign messages to google android messages client, for that I looked here https://developers.google.com/business-communications/rcs-business-messaging/guides/get-started/first-agent#send_a_message and trying to use the curl command provided here to send "Hello World" text to my number. I have service account key JSON file and using this I am trying to access this send API's, but I am getting OAuth2l command not found error as shown below.

To access this google RBM API's should I need to generate any access token and use this token as bearer to do above curl request.

Anyone please let me know how to authenticate these google RBM API's. I am working on it from so many day's but no luck. Thanks in advance.

OAuth2l not found error

I tried to generate the access token using JWT by looking this video https://www.youtube.com/watch?v=91PlQyrebbk and used this token as bearer in the API call but no luck. There I got 403 error as shown below.

Am I doing the right way to send RCS campaign messages on Android messages client using service account key file.

```<code>{
    "error": {
        "code": 403,
        "message": "Request had insufficient authentication scopes.",
        "status": "PERMISSION_DENIED",
        "details": [
            {
                "@type": "type.googleapis.com/google.rpc.ErrorInfo",
                "reason": "ACCESS_TOKEN_SCOPE_INSUFFICIENT",
                "domain": "googleapis.com",
                "metadata": {
                    "method": "google.communications.rcsbusinessmessaging.v1.RcsBusinessMessagingService.GetCapabilities",
                    "service": "rcsbusinessmessaging.googleapis.com"
                }
            }
        ]
    }
}
</code>```

Body:
I am trying to send RCS campaign messages to google android messages client, for that I looked here https://developers.google.com/business-communications/rcs-business-messaging/guides/get-started/first-agent#send_a_message and trying to use the curl command provided here to send "Hello World" text to my number. I have service account key JSON file and using this I am trying to access this send API's, but I am getting OAuth2l command not found error as shown below.

To access this google RBM API's should I need to generate any access token and use this token as bearer to do above curl request.

Anyone please let me know how to authenticate these google RBM API's. I am working on it from so many day's but no luck. Thanks in advance.

OAuth2l not found error

I tried to generate the access token using JWT by looking this video https://www.youtube.com/watch?v=91PlQyrebbk and used this token as bearer in the API call but no luck. There I got 403 error as shown below.

Am I doing the right way to send RCS campaign messages on Android messages client using service account key file.

{
    "error": {
        "code": 403,
        "message": "Request had insufficient authentication scopes.",
        "status": "PERMISSION_DENIED",
        "details": [
            {
                "@type": "type.googleapis.com/google.rpc.ErrorInfo",
                "reason": "ACCESS_TOKEN_SCOPE_INSUFFICIENT",
                "domain": "googleapis.com",
                "metadata": {
                    "method": "google.communications.rcsbusinessmessaging.v1.RcsBusinessMessagingService.GetCapabilities",
                    "service": "rcsbusinessmessaging.googleapis.com"
                }
            }
        ]
    }
}


问:
Why angular material sidenav animation is slow on first time?
Iam developing a website for mobile devices only.

iam using angular material for sidenav, but on first time load like just after login on clicking the hamberger menu sidenav comes slowly,

the slowness is visible with a small jerk (ie., the animation not linear )
but after first time sidenav comes perfectly with linear animation timing.

my app.component.html

```<code>    <mat-sidenav
      #sidenav
      mode="over"
      (click)="toggleLeftSidenav()"
      class="sidenav_main"
      style="background: #fff"
    >
      <app-sidemenu></app-sidemenu>
    </mat-sidenav>
    <mat-sidenav-content>
      <router-outlet></router-outlet>
    </mat-sidenav-content>
  </mat-sidenav-container>
</code>```

app.component.ts

```<code>  ngAfterViewInit(): void {
    this._sideNavService.setSidenav(this.sidenav);
 }
  toggleLeftSidenav() {
    this._sideNavService.toggle();
  }
</code>```

sidenav.service.ts

```<code>import { Injectable } from "@angular/core";
import { MatSidenav } from "@angular/material/sidenav";

@Injectable({ providedIn: "root" })
export class SidenavService {
  private sidenav: MatSidenav;
  public setSidenav(sidenav: MatSidenav) {
    this.sidenav = sidenav;
  }
  public toggle(): void {
    this.sidenav.toggle();
  }

}
</code>```

for closing side nav also iam using same toggle function.

my sidemenu mostly contains static items only.some contents is injected based on api response.

what is causing this issue?
how to fix this perfomance issue?any help or suggestions please?

Body:
Iam developing a website for mobile devices only.

iam using angular material for sidenav, but on first time load like just after login on clicking the hamberger menu sidenav comes slowly,

the slowness is visible with a small jerk (ie., the animation not linear )
but after first time sidenav comes perfectly with linear animation timing.

my app.component.html

    <mat-sidenav
      #sidenav
      mode="over"
      (click)="toggleLeftSidenav()"
      class="sidenav_main"
      style="background: #fff"
    >
      <app-sidemenu></app-sidemenu>
    </mat-sidenav>
    <mat-sidenav-content>
      <router-outlet></router-outlet>
    </mat-sidenav-content>
  </mat-sidenav-container>

app.component.ts

  ngAfterViewInit(): void {
    this._sideNavService.setSidenav(this.sidenav);
 }
  toggleLeftSidenav() {
    this._sideNavService.toggle();
  }

sidenav.service.ts

import { Injectable } from "@angular/core";
import { MatSidenav } from "@angular/material/sidenav";

@Injectable({ providedIn: "root" })
export class SidenavService {
  private sidenav: MatSidenav;
  public setSidenav(sidenav: MatSidenav) {
    this.sidenav = sidenav;
  }
  public toggle(): void {
    this.sidenav.toggle();
  }

}

for closing side nav also iam using same toggle function.

my sidemenu mostly contains static items only.some contents is injected based on api response.

what is causing this issue?
how to fix this perfomance issue?any help or suggestions please?


问:
How to reset (clear?) selected rows in renderdatatable without using action button
The picture is part of the code I wrote

I made a code that updates the table using updateSelectInput, and when a row is clicked, the table below is created.

No error occurs if I enter a new input without clicking on a row in the table. However, an error occurs when I click on a row and put in a new input.

Is it possible to reset the selected row before creating a new renderdatatable?

(https://i.stack.imgur.com/pzRTf.png)

(https://i.stack.imgur.com/9eUmO.png)

(https://i.stack.imgur.com/TNNpd.png)

(https://i.stack.imgur.com/2jtQJ.jpg)

(https://i.stack.imgur.com/tCX6G.jpg)

I tried editing using a proxy, but it gave me a new error.


问:
Spell Check with different data sizes
I am trying to develop a spell checker for the Arabic Language, and I am using neuspell for this task.

My data contains 2 text files, correct_text.txt and misspelled_text.txt.

The Problem I am facing is that I am using AraT5 tokenizer to tokenize the words ( using other tokenizers will give UNK token for the misspelled words ).

The AraT5 tokenizer instead divides the misspelled words into many tokens, doing so, I will guarantee that I wont get UNK tokens for the misspelled words.

```<code>Example:

correct_sentece = "لا أحب أكل الطعام"
misspelledـsentence = "لا أحب أكلالطعام"

Arat5 Tokenizer for the misspelled sentence: ['▁لا', '▁أحب', '▁أكل', 'ال', 'طعام']
Other Tokenizers for the misspelled sentence: ['لا', 'أحب', 'UNK'] # assuming that "أكلالطعام" is not in the vocab/dataset ( real word examples )
</code>```

Now since the AraT5 tokenizer returns more tokens for the misspelled text compared to the correct text. The length of the data is different. This is causing an issue when training as the data should have the same length for the correct and misspelled sentence.

What's the trick to solve this issue, I cant just expand my vocab to fit all the misspelled words for a certain language.

Title: Spell Check with different data sizes

Body:
I am trying to develop a spell checker for the Arabic Language, and I am using neuspell for this task.

My data contains 2 text files, correct_text.txt and misspelled_text.txt.

The Problem I am facing is that I am using AraT5 tokenizer to tokenize the words ( using other tokenizers will give UNK token for the misspelled words ).

The AraT5 tokenizer instead divides the misspelled words into many tokens, doing so, I will guarantee that I wont get UNK tokens for the misspelled words.

Example:

correct_sentece = "لا أحب أكل الطعام"
misspelledـsentence = "لا أحب أكلالطعام"

Arat5 Tokenizer for the misspelled sentence: ['▁لا', '▁أحب', '▁أكل', 'ال', 'طعام']
Other Tokenizers for the misspelled sentence: ['لا', 'أحب', 'UNK'] # assuming that "أكلالطعام" is not in the vocab/dataset ( real word examples )

Now since the AraT5 tokenizer returns more tokens for the misspelled text compared to the correct text. The length of the data is different. This is causing an issue when training as the data should have the same length for the correct and misspelled sentence.

What's the trick to solve this issue, I cant just expand my vocab to fit all the misspelled words for a certain language.


问:
ValueError at /state/ Field 'id' expected a number but got 'None'
I am getting this error and i have tried typecasting to change it to an integer but it still gives an error.

I don't know what's wrong with the code and i am stuck here from past 30 minutes. Can someone help?

urls.py

```<code>urlpatterns = [
    path('admin/', admin.site.urls),
    path('', cview.Insertrecord),
    path('country/', lview.Insertrecord),
    path('state/', lview.Insertrecord_state),
]
</code>```

models.py

```<code>class customer_state(models.Model):
    parent_id=models.ForeignKey(customer_location, on_delete=models.CASCADE)
    name=models.CharField(max_length=100)
    status=models.CharField(max_length=100, default='nil')
    added_by=models.CharField(max_length=100, default=1)
    updated_by=models.CharField(max_length=100, default=1)
    created_on=models.CharField(max_length=100)
    updated_on=models.CharField(max_length=100)
    class Meta:
        db_table="customer_state"

    def __str__(self):
        return self.name

    def save(self, *args, **kwargs):
        self.created_on = get_current_datetime_str()
        self.updated_on = get_current_datetime_str()
        super().save(*args, **kwargs)
</code>```

views.py

```<code>def Insertrecord_state(request):
    # Define the parent_id variable
    parent_id = None

    if request.method=='POST':
        if request.POST.get('parent_id')...... and request.POST.get('updated_on'):

            parent_id = request.POST.get('parent_id')

            parent_location = customer_location.objects.get(id=parent_id)

            saverecord=customer_state()
            saverecord.parent_id=parent_location
            saverecord.name=request.POST.get('name')

            saverecord.save()
            messages.success(request,"Record Saved Successfully..!")
            return render(request, 'state.html', {'parent_id': parent_id})
    else:
        # Return the form with the parent_id variable
        return render(request,'state.html', {'parent_id': parent_id})
</code>```

state.html

```<code> <div class="container-sm">
      <form method = "POST">
        {% csrf_token %}
        <div class="row mb-3" style="display:none">
          <label for="inputEmail3" class="col-sm-2 col-form-label">Parent ID</label>
          <div class="col-sm-10">
            <input type="text" value="{{ parent_id }}" name="parent_id" class="form-control" id="inputEmail3" required/>
          </div>
        </div>
         .
         .
</form>
</code>```

Error Message:

Body:
I am getting this error and i have tried typecasting to change it to an integer but it still gives an error.

I don't know what's wrong with the code and i am stuck here from past 30 minutes. Can someone help?

urls.py

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', cview.Insertrecord),
    path('country/', lview.Insertrecord),
    path('state/', lview.Insertrecord_state),
]

models.py

class customer_state(models.Model):
    parent_id=models.ForeignKey(customer_location, on_delete=models.CASCADE)
    name=models.CharField(max_length=100)
    status=models.CharField(max_length=100, default='nil')
    added_by=models.CharField(max_length=100, default=1)
    updated_by=models.CharField(max_length=100, default=1)
    created_on=models.CharField(max_length=100)
    updated_on=models.CharField(max_length=100)
    class Meta:
        db_table="customer_state"

    def __str__(self):
        return self.name

    def save(self, *args, **kwargs):
        self.created_on = get_current_datetime_str()
        self.updated_on = get_current_datetime_str()
        super().save(*args, **kwargs)

views.py

def Insertrecord_state(request):
    # Define the parent_id variable
    parent_id = None

    if request.method=='POST':
        if request.POST.get('parent_id')...... and request.POST.get('updated_on'):

            parent_id = request.POST.get('parent_id')

            parent_location = customer_location.objects.get(id=parent_id)

            saverecord=customer_state()
            saverecord.parent_id=parent_location
            saverecord.name=request.POST.get('name')

            saverecord.save()
            messages.success(request,"Record Saved Successfully..!")
            return render(request, 'state.html', {'parent_id': parent_id})
    else:
        # Return the form with the parent_id variable
        return render(request,'state.html', {'parent_id': parent_id})

state.html

      <form method = "POST">
        {% csrf_token %}

          Parent ID

            <input type="text" value="{{ parent_id }}" name="parent_id" class="form-control" id="inputEmail3" required/>

         .
         .
</form>

Error Message:


问:
Problem with writing data to Hbase table. Coded on IntelliJ using spark-scala-Hbase(standalone mode)
Not able to write to Hbase Table from IntelliJ. Spark- Scala -Hbase

Host file configured as:

```<code># Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
#::1 localhost

</code>```

Hbase-env.cmd properties:

```<code>set JAVA_HOME=%JAVA_HOME%
set HBASE_CLASSPATH=%HBASE_HOME%\lib\client-facing-thirdparty\*
set HBASE_HEAPSIZE=8000
set HBASE_OPTS="-XX:+UseConcMarkSweepGC" "-Djava.net.preferIPv4Stack=true"
set SERVER_GC_OPTS="-verbose:gc" "-XX:+PrintGCDetails" "-XX:+PrintGCDateStamps" %HBASE_GC_OPTS%
set HBASE_USE_GC_LOGFILE=true
set HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.ssl=false" "-Dcom.sun.management.jmxremote.authenticate=false"
set HBASE_MASTER_OPTS=%HBASE_JMX_BASE% "-Dcom.sun.management.jmxremote.port=10101"
set HBASE_REGIONSERVER_OPTS=%HBASE_JMX_BASE% "-Dcom.sun.management.jmxremote.port=10102"
set HBASE_THRIFT_OPTS=%HBASE_JMX_BASE% "-Dcom.sun.management.jmxremote.port=10103"
set HBASE_ZOOKEEPER_OPTS=%HBASE_JMX_BASE% -Dcom.sun.management.jmxremote.port=10104"
set HBASE_REGIONSERVERS=%HBASE_HOME%\conf\regionservers
set HBASE_LOG_DIR=%HBASE_HOME%\logs
set HBASE_IDENT_STRING=%USERNAME%
set HBASE_MANAGES_ZK=true
</code>```

Hbase-site.xml

```<code><property>
    <name>hbase.cluster.distributed</name>
    <value>false</value>
  </property>
  <property>
    <name>hbase.tmp.dir</name>
    <value>./tmp</value>
  </property>
  <property>
    <name>hbase.unsafe.stream.capability.enforce</name>
    <value>false</value>
  </property>
  <property>
    <name>hbase.rootdir</name>
    <value>file:///C:/hbase/hbase-2.2.5/hbase</value>
 </property>
 <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/C:/hbase/hbase-2.2.5/zookeeper</value>
</property>
 <property>
  <name>hbase.zookeeper.quorum</name>
  <value>localhost</value>
</property>
<property>
    <name> hbase.zookeeper.property.clientPort</name>
    <value>2181</value>
 </property>
  </configuration>
</code>```

HMaster Terminal has following details:

```<code>[main] zookeeper.RecoverableZooKeeper: Process identifier=master:16000 connecting to ZooKeeper ensemble=localhost:2181
[main] zookeeper.ZooKeeper: Client environment:zookeeper.version=3.4.10-39d3a4f269333c922ed3db283be479f9deacaa0f, built on 03/23/2017 10:13 GMT
[main] zookeeper.ZooKeeper: Client environment:host.name=GH-4NR7533.XXXXXXXXX.org (ipaddress:192.168.0.103)
[main] zookeeper.ZooKeeper: Client environment:java.version=1.8.0_101
[main] zookeeper.ZooKeeper: Client environment:java.vendor=Oracle Corporation
[main] zookeeper.ZooKeeper: Client environment:java.home=C:\Program Files\Java\jdk1.8.0_144\jre
</code>```

On IntelliJ I'm getting the following error:

```<code>2022-12-26 11:49:17 WARN  ProcfsMetricsGetter:69 - Exception when trying to compute pagesize, as a result reporting of ProcessTree metrics is stopped
2022-12-26 11:49:19 WARN  ClientCnxn:1235 - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214)
2022-12-26 11:49:20 INFO  ClientCnxn:1113 - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2022-12-26 11:49:20 INFO  ClientCnxn:948 - Socket connection established, initiating session, client: /127.0.0.1:56517, server: localhost/127.0.0.1:2181
2022-12-26 11:49:20 WARN  ReadOnlyZKClient:192 - 0x0ba4f370 to localhost:2181 failed for get of /hbase/hbaseid, code = CONNECTIONLOSS, retries = 1
2022-12-26 11:49:20 INFO  ClientCnxn:1381 - Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x1854d1460720005, negotiated timeout = 40000
2022-12-26 11:49:33 INFO  RpcRetryingCallerImpl:134 - Call exception, tries=6, retries=16, started=11476 ms ago, cancelled=false, msg=Call to 192.168.1.36:16020 failed on connection exception: org.apache.hbase.thirdparty.io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 192.168.1.36:16020, details=row 'grp_dev:u' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=GH-4NR7533.XXXXXXXXX.org,16020,1672035462187, seqNum=-1, see https://s.apache.org/timeout
2022-12-26 11:49:39 INFO  RpcRetryingCallerImpl:134 - Call exception, tries=7, retries=16, started=17518 ms ago, cancelled=false, msg=Call to 192.168.1.36:16020 failed on connection exception: org.apache.hbase.thirdparty.io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 192.168.1.36:16020, details=row 'grp_dev:u' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=GH-4NR7533.XXXXXXXXX.org,16020,1672035462187, seqNum=-1, see https://s.apache.org/timeout
2022-12-26 11:49:51 INFO  RpcRetryingCallerImpl:134 - Call exception, tries=8, retries=16, started=29596 ms ago, cancelled=false, msg=Call to 192.168.1.36:16020 failed on connection exception: org.apache.hbase.thirdparty.io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 192.168.1.36:16020, details=row 'grp_dev:u' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=GH-4NR7533.XXXXXXXXX.org,16020,1672035462187, seqNum=-1, see https://s.apache.org/timeout
2022-12-26 11:50:03 INFO  RpcRetryingCallerImpl:134 - Call exception, tries=9, retries=16, started=41688 ms ago, cancelled=false, msg=Call to 192.168.1.36:16020 failed on connection exception: org.apache.hbase.thirdparty.io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 192.168.1.36:16020, details=row 'grp_dev:u' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=GH-4NR7533.XXXXXXXXX.org,16020,1672035462187, seqNum=-1, see https://s.apache.org/timeout
2022-12-26 11:50:15 INFO  RpcRetryingCallerImpl:134 - Call exception, tries=10, retries=16, started=53794 ms ago, cancelled=false, msg=Call to 192.168.1.36:16020 failed on connection exception: org.apache.hbase.thirdparty.io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 192.168.1.36:16020, details=row 'grp_dev:u' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=GH-4NR7533.XXXXXXXXX.org,16020,1672035462187, seqNum=-1, see https://s.apache.org/timeout
2022-12-26 11:50:27 INFO  RpcRetryingCallerImpl:134 - Call exception, tries=11, retries=16, started=65865 ms ago, cancelled=false, msg=Call to 192.168.1.36:16020 failed on connection exception: org.apache.hbase.thirdparty.io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 192.168.1.36:16020, details=row 'grp_dev:u' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=GH-4NR7533.XXXXXXXXX.org,16020,1672035462187, seqNum=-1, see https://s.apache.org/timeout`
</code>```

Body:
Not able to write to Hbase Table from IntelliJ. Spark- Scala -Hbase

Host file configured as:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
#::1 localhost

Hbase-env.cmd properties:

set JAVA_HOME=%JAVA_HOME%
set HBASE_CLASSPATH=%HBASE_HOME%\lib\client-facing-thirdparty\*
set HBASE_HEAPSIZE=8000
set HBASE_OPTS="-XX:+UseConcMarkSweepGC" "-Djava.net.preferIPv4Stack=true"
set SERVER_GC_OPTS="-verbose:gc" "-XX:+PrintGCDetails" "-XX:+PrintGCDateStamps" %HBASE_GC_OPTS%
set HBASE_USE_GC_LOGFILE=true
set HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.ssl=false" "-Dcom.sun.management.jmxremote.authenticate=false"
set HBASE_MASTER_OPTS=%HBASE_JMX_BASE% "-Dcom.sun.management.jmxremote.port=10101"
set HBASE_REGIONSERVER_OPTS=%HBASE_JMX_BASE% "-Dcom.sun.management.jmxremote.port=10102"
set HBASE_THRIFT_OPTS=%HBASE_JMX_BASE% "-Dcom.sun.management.jmxremote.port=10103"
set HBASE_ZOOKEEPER_OPTS=%HBASE_JMX_BASE% -Dcom.sun.management.jmxremote.port=10104"
set HBASE_REGIONSERVERS=%HBASE_HOME%\conf\regionservers
set HBASE_LOG_DIR=%HBASE_HOME%\logs
set HBASE_IDENT_STRING=%USERNAME%
set HBASE_MANAGES_ZK=true

Hbase-site.xml

<property>
    <name>hbase.cluster.distributed</name>
    <value>false</value>
  </property>
  <property>
    <name>hbase.tmp.dir</name>
    <value>./tmp</value>
  </property>
  <property>
    <name>hbase.unsafe.stream.capability.enforce</name>
    <value>false</value>
  </property>
  <property>
    <name>hbase.rootdir</name>
    <value>file:///C:/hbase/hbase-2.2.5/hbase</value>
 </property>
 <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/C:/hbase/hbase-2.2.5/zookeeper</value>
</property>
 <property>
  <name>hbase.zookeeper.quorum</name>
  <value>localhost</value>
</property>
<property>
    <name> hbase.zookeeper.property.clientPort</name>
    <value>2181</value>
 </property>
  </configuration>

HMaster Terminal has following details:

[main] zookeeper.RecoverableZooKeeper: Process identifier=master:16000 connecting to ZooKeeper ensemble=localhost:2181
[main] zookeeper.ZooKeeper: Client environment:zookeeper.version=3.4.10-39d3a4f269333c922ed3db283be479f9deacaa0f, built on 03/23/2017 10:13 GMT
[main] zookeeper.ZooKeeper: Client environment:host.name=GH-4NR7533.XXXXXXXXX.org (ipaddress:192.168.0.103)
[main] zookeeper.ZooKeeper: Client environment:java.version=1.8.0_101
[main] zookeeper.ZooKeeper: Client environment:java.vendor=Oracle Corporation
[main] zookeeper.ZooKeeper: Client environment:java.home=C:\Program Files\Java\jdk1.8.0_144\jre

On IntelliJ I'm getting the following error:

2022-12-26 11:49:17 WARN  ProcfsMetricsGetter:69 - Exception when trying to compute pagesize, as a result reporting of ProcessTree metrics is stopped
2022-12-26 11:49:19 WARN  ClientCnxn:1235 - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214)
2022-12-26 11:49:20 INFO  ClientCnxn:1113 - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2022-12-26 11:49:20 INFO  ClientCnxn:948 - Socket connection established, initiating session, client: /127.0.0.1:56517, server: localhost/127.0.0.1:2181
2022-12-26 11:49:20 WARN  ReadOnlyZKClient:192 - 0x0ba4f370 to localhost:2181 failed for get of /hbase/hbaseid, code = CONNECTIONLOSS, retries = 1
2022-12-26 11:49:20 INFO  ClientCnxn:1381 - Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x1854d1460720005, negotiated timeout = 40000
2022-12-26 11:49:33 INFO  RpcRetryingCallerImpl:134 - Call exception, tries=6, retries=16, started=11476 ms ago, cancelled=false, msg=Call to 192.168.1.36:16020 failed on connection exception: org.apache.hbase.thirdparty.io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 192.168.1.36:16020, details=row 'grp_dev:u' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=GH-4NR7533.XXXXXXXXX.org,16020,1672035462187, seqNum=-1, see https://s.apache.org/timeout
2022-12-26 11:49:39 INFO  RpcRetryingCallerImpl:134 - Call exception, tries=7, retries=16, started=17518 ms ago, cancelled=false, msg=Call to 192.168.1.36:16020 failed on connection exception: org.apache.hbase.thirdparty.io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 192.168.1.36:16020, details=row 'grp_dev:u' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=GH-4NR7533.XXXXXXXXX.org,16020,1672035462187, seqNum=-1, see https://s.apache.org/timeout
2022-12-26 11:49:51 INFO  RpcRetryingCallerImpl:134 - Call exception, tries=8, retries=16, started=29596 ms ago, cancelled=false, msg=Call to 192.168.1.36:16020 failed on connection exception: org.apache.hbase.thirdparty.io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 192.168.1.36:16020, details=row 'grp_dev:u' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=GH-4NR7533.XXXXXXXXX.org,16020,1672035462187, seqNum=-1, see https://s.apache.org/timeout
2022-12-26 11:50:03 INFO  RpcRetryingCallerImpl:134 - Call exception, tries=9, retries=16, started=41688 ms ago, cancelled=false, msg=Call to 192.168.1.36:16020 failed on connection exception: org.apache.hbase.thirdparty.io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 192.168.1.36:16020, details=row 'grp_dev:u' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=GH-4NR7533.XXXXXXXXX.org,16020,1672035462187, seqNum=-1, see https://s.apache.org/timeout
2022-12-26 11:50:15 INFO  RpcRetryingCallerImpl:134 - Call exception, tries=10, retries=16, started=53794 ms ago, cancelled=false, msg=Call to 192.168.1.36:16020 failed on connection exception: org.apache.hbase.thirdparty.io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 192.168.1.36:16020, details=row 'grp_dev:u' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=GH-4NR7533.XXXXXXXXX.org,16020,1672035462187, seqNum=-1, see https://s.apache.org/timeout
2022-12-26 11:50:27 INFO  RpcRetryingCallerImpl:134 - Call exception, tries=11, retries=16, started=65865 ms ago, cancelled=false, msg=Call to 192.168.1.36:16020 failed on connection exception: org.apache.hbase.thirdparty.io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 192.168.1.36:16020, details=row 'grp_dev:u' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=GH-4NR7533.XXXXXXXXX.org,16020,1672035462187, seqNum=-1, see https://s.apache.org/timeout`


问:
Handle Socket IO with Redux Toolkit
I want to handle Socket IO events with Redux Toolkit, shoud I do that?

I want to handle Socket IO events with Redux Toolkit, shoud I do that?

Title: Handle Socket IO with Redux Toolkit


问:
Surreal DB - Sign up doesn't validate if user already exists and sign in works with any random credentials?
I have created a scope as follows:

```<code>CURL POST /sql:

DEFINE SCOPE user SESSION 1d
        SIGNUP ( CREATE user SET user = $user, pass = crypto::argon2::generate($pass) )
        SIGNIN ( SELECT * FROM user WHERE user = $user AND crypto::argon2::compare(pass, $pass));
</code>```

then I Signed up as following:

```<code>{
    "ns": "test",
    "db": "test",
    "sc": "user",
    "email": "tobie@surrealdb.com",
    "pass": "some password",
    "marketing": true,
    "tags": [
        "rust",
        "golang",
        "javascript"
    ]
}
</code>```

Here I recieve:

```<code>{
    "code": 200,
    "details": "Authentication succeeded",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOEQiI6InRlc3QiLCJTQyI6InVzZXIiLCJJRCI6InVzZXI6czFiN3JzcnlxNW9jdDVmM2FrdHEifQ.oy7ox2QCqNDAyZnvRmGPoU2t3QmzB38J67ynpRVPfd8nXfRw0RQPunQ04KTrtzfQeNHB5Zv8-nN0HrOuqxG78w"
}
</code>```

After which i try to sign in:

```<code>{
    "ns": "test",
    "db": "test",
    "sc": "user",
    "email": "tobie@surrealdb.com",
    "pass": "some password"
}
</code>```

which succeeds:

```<code>{
    "code": 200,
    "details": "Authentication succeeded",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NzIwMzc4NTAsIm5iZiI6MTY3MjAzNzg1MCwiZXhwIjoxNjcyMTI0MjUwLCJpY-l8cGbHeW72CbBIswIro-Tlan-QZuJFHVTIhUCP-1k1m-z8-YM7JYbXWT9IgPskKgzRDCJSt6iXmV-jw"
}
</code>```

however when I do:

```<code>{
    "ns": "test",
    "db": "test",
    "sc": "user",
    "email": "tobiedsfds2@surrealdb.com",
    "pass": "some password"
}
</code>```

As you can see I added some random characters in email which is not signed up still I get a 200 response. And similarly when I try to sign up with a duplicate email, that succeeds too.

Any explanation that could possibly help to understand what's happening here?

Body:
I have created a scope as follows:

CURL POST /sql:

DEFINE SCOPE user SESSION 1d
        SIGNUP ( CREATE user SET user = $user, pass = crypto::argon2::generate($pass) )
        SIGNIN ( SELECT * FROM user WHERE user = $user AND crypto::argon2::compare(pass, $pass));

then I Signed up as following:

{
    "ns": "test",
    "db": "test",
    "sc": "user",
    "email": "tobie@surrealdb.com",
    "pass": "some password",
    "marketing": true,
    "tags": [
        "rust",
        "golang",
        "javascript"
    ]
}

Here I recieve:

{
    "code": 200,
    "details": "Authentication succeeded",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOEQiI6InRlc3QiLCJTQyI6InVzZXIiLCJJRCI6InVzZXI6czFiN3JzcnlxNW9jdDVmM2FrdHEifQ.oy7ox2QCqNDAyZnvRmGPoU2t3QmzB38J67ynpRVPfd8nXfRw0RQPunQ04KTrtzfQeNHB5Zv8-nN0HrOuqxG78w"
}

After which i try to sign in:

{
    "ns": "test",
    "db": "test",
    "sc": "user",
    "email": "tobie@surrealdb.com",
    "pass": "some password"
}

which succeeds:

{
    "code": 200,
    "details": "Authentication succeeded",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NzIwMzc4NTAsIm5iZiI6MTY3MjAzNzg1MCwiZXhwIjoxNjcyMTI0MjUwLCJpY-l8cGbHeW72CbBIswIro-Tlan-QZuJFHVTIhUCP-1k1m-z8-YM7JYbXWT9IgPskKgzRDCJSt6iXmV-jw"
}

however when I do:

{
    "ns": "test",
    "db": "test",
    "sc": "user",
    "email": "tobiedsfds2@surrealdb.com",
    "pass": "some password"
}

As you can see I added some random characters in email which is not signed up still I get a 200 response. And similarly when I try to sign up with a duplicate email, that succeeds too.

Any explanation that could possibly help to understand what's happening here?


问:
What should the CSV file format look like for correct parsing with pandas?
I get an error parsing my CSV file that I want to convert to XLSX. The part of the file it complains about looks like this:

```<code>Number,2000-00-00
,,System,,,,,,,,,,,,System,
,,Type,,,,Type,,,,Type,,,,Type,,,,Type,,,,Type,
Settings, Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,
System,"dist, dist, dist, dist",0,104,21,65,0,128,5,29,0,62,0,1,0,11993,26,56,0,1321,14,18,0,63,0,0,

Number,2000-00-00
,,System,,,,,,,,,,,,System,
,,Type,,,,Type,,,,Type,,,,Type,,,,Type,,,,Type,
Settings, Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,
System,"dist, dist, dist, dist",0,1141,29,71,0,121,3,15,0,62,0,0,0,14034,22,47,0,84,1,10,0,80,0,0,

Total,,0,8436,13,62,0,839,24,163,0,451,0,2,0,97906,235,434,0,846,38,10,0,462,0,2,
Total 2,,,,,841,,,,8556,,,,453,,,,985,,,,869,,,,46
Total 3 ,,,,,,,,,,,,,350,,,,,,,,,,,,1078
Full,,2898
</code>```

Example of error:

```<code>converter         | Skipping line 3: expected 16 fields, saw 24
converter         | Skipping line 4: expected 16 fields, saw 27
converter         | Skipping line 5: expected 16 fields, saw 27
</code>```

Screenshot

So I understand it's about a lot of delimiters, which are needed to form empty fields. Although pandas complains about the parsing error, the file itself looks correct when opened. Is it really about consecutive delimiters? If so, why does the file itself look correct? If not, what could be the problem?

Body:
I get an error parsing my CSV file that I want to convert to XLSX. The part of the file it complains about looks like this:

Number,2000-00-00
,,System,,,,,,,,,,,,System,
,,Type,,,,Type,,,,Type,,,,Type,,,,Type,,,,Type,
Settings, Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,
System,"dist, dist, dist, dist",0,104,21,65,0,128,5,29,0,62,0,1,0,11993,26,56,0,1321,14,18,0,63,0,0,

Number,2000-00-00
,,System,,,,,,,,,,,,System,
,,Type,,,,Type,,,,Type,,,,Type,,,,Type,,,,Type,
Settings, Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,
System,"dist, dist, dist, dist",0,1141,29,71,0,121,3,15,0,62,0,0,0,14034,22,47,0,84,1,10,0,80,0,0,

Total,,0,8436,13,62,0,839,24,163,0,451,0,2,0,97906,235,434,0,846,38,10,0,462,0,2,
Total 2,,,,,841,,,,8556,,,,453,,,,985,,,,869,,,,46
Total 3 ,,,,,,,,,,,,,350,,,,,,,,,,,,1078
Full,,2898

Example of error:

converter         | Skipping line 3: expected 16 fields, saw 24
converter         | Skipping line 4: expected 16 fields, saw 27
converter         | Skipping line 5: expected 16 fields, saw 27

Screenshot

So I understand it's about a lot of delimiters, which are needed to form empty fields. Although pandas complains about the parsing error, the file itself looks correct when opened. Is it really about consecutive delimiters? If so, why does the file itself look correct? If not, what could be the problem?


问:
How I can implement a chatbot using react chatbot kit?
I have implemented the chatbot using reactjs chatbot kit. I have used all the boiler plates from the documentation but the problem that I am facing is that when the user sends nothing by clicking the send button it shows in the UI. so how to avoid it?enter image description here

I am thinking about disabling the button when the box is empty.


问:
How use this "Tree Age Calculator" to WordPress function and Callback to WP Post
Here is the JavaScript code that I tried use to calculate the age of a tree based on the diameter and species of the tree:

```<code>function calculateAge() {
   // get the diameter and species of the tree from the form
   var diameter = document.getElementById('diameter').value;
   var species = document.getElementById('species').value;

   // calculate the age of the tree based on the diameter and species
   var age = (diameter / species) * 60;

   // display the result in the "result" paragraph
   document.getElementById('result').innerHTML = 'The age of the tree is ' + age + ' years';
}

</code>```

I have added this code to WordPress website by creating a new JavaScript file and enqueuing it in the theme's functions.php file.

```<code>function enqueue_tree_age_calculator_script() {
   wp_enqueue_script('tree-age-calculator', get_template_directory_uri() . '/js/tree-age-calculator.js', array(), '1.0.0', true);
}
add_action('wp_enqueue_scripts', 'enqueue_tree_age_calculator_script');

</code>```

But it seems WP Post can't parse the script, nor even "php echo" on body. Here's the post that I tried: https://sarpo.net/tree-age-calculator/

Body:
Here is the JavaScript code that I tried use to calculate the age of a tree based on the diameter and species of the tree:

function calculateAge() {
   // get the diameter and species of the tree from the form
   var diameter = document.getElementById('diameter').value;
   var species = document.getElementById('species').value;

   // calculate the age of the tree based on the diameter and species
   var age = (diameter / species) * 60;

   // display the result in the "result" paragraph
   document.getElementById('result').innerHTML = 'The age of the tree is ' + age + ' years';
}

I have added this code to WordPress website by creating a new JavaScript file and enqueuing it in the theme's functions.php file.

function enqueue_tree_age_calculator_script() {
   wp_enqueue_script('tree-age-calculator', get_template_directory_uri() . '/js/tree-age-calculator.js', array(), '1.0.0', true);
}
add_action('wp_enqueue_scripts', 'enqueue_tree_age_calculator_script');

But it seems WP Post can't parse the script, nor even "php echo" on body. Here's the post that I tried: https://sarpo.net/tree-age-calculator/


问:
Segment the pupil
Everyone.
Now I have some issue to detect the pupil with only opencv_python.
Second is the sample image.
Thank you
enter image description here
enter image description here

I want the solution or the correct code.

Title: Segment the pupil


问:
How to upload big data from two microservices at once?
How to upload big data from two microservices at once?

I have microservice A and B.

Service A unloads an archive containing large data (1..2 GB) upon HTTP request. Part of this data is stored in the database of service A, and part of the data is stored in the database of service B.

What is the best way to organize the logic of this unloading?

Use only REST. Service A requests data from service B via HTTP. Service B sends data via HTTP. Service A generates an archive and sends it at the request of the client.

Use docker volume. Service A creates a directory in the shared docker volume. Service A requests data from service B. Service B places its upload file on the shared volume. Service A places its part in the volume directory, archives everything and sends the archive to the client.

Something else.


问:
how to upload image to imageproxy . from local
I want to upload image directly to imageProxy. using graphql .

i follw this tutorial which is using which is using Google Cloud Storage but i want to upload  here . https://imgproxy.net/

is it possible. if some one know please guide  .
like this ...sample :
https://www.tomray.dev/google-cloud-file-uploads

I want to upload image directly to imageProxy.