问:
Nginx Ingress showing 404 Not Found
I have installed Nginx Ingress Controller by using this Link

From the above link. i have executed the below commands.

```<code>$ git clone https://github.com/nginxinc/kubernetes-ingress.git --branch v2.4.2
$ cd kubernetes-ingress/deployments

$ kubectl apply -f common/ns-and-sa.yaml
$ kubectl apply -f rbac/rbac.yaml

$ kubectl apply -f common/default-server-secret.yaml

$ kubectl apply -f common/nginx-config.yaml
$ kubectl apply -f common/ingress-class.yaml

$ kubectl apply -f common/crds/k8s.nginx.org_virtualservers.yaml
$ kubectl apply -f common/crds/k8s.nginx.org_virtualserverroutes.yaml
$ kubectl apply -f common/crds/k8s.nginx.org_transportservers.yaml
$ kubectl apply -f common/crds/k8s.nginx.org_policies.yaml

$ kubectl apply -f common/crds/k8s.nginx.org_globalconfigurations.yaml

$ kubectl apply -f daemon-set/nginx-ingress.yaml
</code>```

It is runs as a daemon set,

```<code>$ kubectl get all -n nginx-ingress -o wide
NAME                      READY   STATUS    RESTARTS   AGE   IP           NODE        NOMINATED NODE   READINESS GATES
pod/nginx-ingress-mfnk8   1/1     Running   0          18h   10.244.2.8   worker-3    <none>           <none>
pod/nginx-ingress-n4b79   1/1     Running   0          18h   10.244.1.6   worker-2    <none>           <none>
pod/nginx-ingress-ndtkw   1/1     Running   0          18h   10.244.3.5   worker-4    <none>           <none>

NAME                           DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE   CONTAINERS      IMAGES                      SELECTOR
daemonset.apps/nginx-ingress   3         3         3       3            3           <none>          18h   nginx-ingress   nginx/nginx-ingress:2.4.2   app=nginx-ingress
</code>```
```<code>$ kubectl logs nginx-ingress-n4b79 -n nginx-ingress
I0111 09:17:11.242514       1 flags.go:199] Starting NGINX Ingress Controller Version=2.4.2 PlusFlag=false
I0111 09:17:11.242568       1 flags.go:200] Commit=4252538e0d02dfd42cd3b35884cd5b50147814b7 Date=2022-11-30T14:54:40Z DirtyState=false Arch=linux/amd64 Go=go1.19.3
I0111 09:17:11.249520       1 main.go:214] Kubernetes version: 1.24.9
I0111 09:17:11.257785       1 main.go:341] Using nginx version: nginx/1.23.2
2023/01/11 09:17:11 [notice] 24#24: using the "epoll" event method
2023/01/11 09:17:11 [notice] 24#24: nginx/1.23.2
2023/01/11 09:17:11 [notice] 24#24: built by gcc 10.2.1 20210110 (Debian 10.2.1-6)
2023/01/11 09:17:11 [notice] 24#24: OS: Linux 5.4.0-132-generic
2023/01/11 09:17:11 [notice] 24#24: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2023/01/11 09:17:11 [notice] 24#24: start worker processes
2023/01/11 09:17:11 [notice] 24#24: start worker process 30
2023/01/11 09:17:11 [notice] 24#24: start worker process 31
2023/01/11 09:17:11 [notice] 24#24: start worker process 32
2023/01/11 09:17:11 [notice] 24#24: start worker process 33
2023/01/11 09:17:11 [notice] 24#24: start worker process 34
2023/01/11 09:17:11 [notice] 24#24: start worker process 35
2023/01/11 09:17:11 [notice] 24#24: start worker process 36
2023/01/11 09:17:11 [notice] 24#24: start worker process 37
2023/01/11 09:17:11 [notice] 24#24: start worker process 38
2023/01/11 09:17:11 [notice] 24#24: start worker process 39
2023/01/12 04:30:33 [notice] 24#24: signal 17 (SIGCHLD) received from 288
2023/01/12 04:30:33 [notice] 24#24: worker process 288 exited with code 0
2023/01/12 04:30:33 [notice] 24#24: worker process 282 exited with code 0
2023/01/12 04:30:33 [notice] 24#24: worker process 290 exited with code 0
2023/01/12 04:30:33 [notice] 24#24: worker process 304 exited with code 0
2023/01/12 04:30:33 [notice] 24#24: worker process 328 exited with code 0
2023/01/12 04:30:33 [notice] 24#24: worker process 315 exited with code 0
2023/01/12 04:30:33 [notice] 24#24: signal 29 (SIGIO) received
2023/01/12 04:30:33 [notice] 24#24: signal 17 (SIGCHLD) received from 290
</code>```

When i tried to connect Nginx container using http://{Worker-IP}, Have tried with all three Worker-IPs. For all three it shows 404 Not Found on browser.

Nginx container Status shows Running & Ready shows (1/1). What could the problem? Also let me know Am i missing any additional installation commands?

```<code>$ kubectl get ingress --all-namespaces
NAMESPACE   NAME              CLASS    HOSTS                ADDRESS   PORTS   AGE
jenkins     jenkins-ingress   <none>   jenkins.company.com             80      19h
</code>```
```<code>$ kubectl get svc  --all-namespaces
NAMESPACE     NAME          TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                  AGE
default       kubernetes    ClusterIP   10.96.0.1       <none>        443/TCP                  46h
jenkins       jenkins-svc   ClusterIP   10.103.54.142   <none>        80/TCP                   46h
kube-system   kube-dns      ClusterIP   10.96.0.10      <none>        53/UDP,53/TCP,9153/TCP   46h
</code>```

Title: Nginx Ingress showing 404 Not Found

Body:
I have installed Nginx Ingress Controller by using this Link

From the above link. i have executed the below commands.

$ git clone https://github.com/nginxinc/kubernetes-ingress.git --branch v2.4.2
$ cd kubernetes-ingress/deployments

$ kubectl apply -f common/ns-and-sa.yaml
$ kubectl apply -f rbac/rbac.yaml

$ kubectl apply -f common/default-server-secret.yaml

$ kubectl apply -f common/nginx-config.yaml
$ kubectl apply -f common/ingress-class.yaml

$ kubectl apply -f common/crds/k8s.nginx.org_virtualservers.yaml
$ kubectl apply -f common/crds/k8s.nginx.org_virtualserverroutes.yaml
$ kubectl apply -f common/crds/k8s.nginx.org_transportservers.yaml
$ kubectl apply -f common/crds/k8s.nginx.org_policies.yaml

$ kubectl apply -f common/crds/k8s.nginx.org_globalconfigurations.yaml

$ kubectl apply -f daemon-set/nginx-ingress.yaml

It is runs as a daemon set,

$ kubectl get all -n nginx-ingress -o wide
NAME                      READY   STATUS    RESTARTS   AGE   IP           NODE        NOMINATED NODE   READINESS GATES
pod/nginx-ingress-mfnk8   1/1     Running   0          18h   10.244.2.8   worker-3    <none>           <none>
pod/nginx-ingress-n4b79   1/1     Running   0          18h   10.244.1.6   worker-2    <none>           <none>
pod/nginx-ingress-ndtkw   1/1     Running   0          18h   10.244.3.5   worker-4    <none>           <none>

NAME                           DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE   CONTAINERS      IMAGES                      SELECTOR
daemonset.apps/nginx-ingress   3         3         3       3            3           <none>          18h   nginx-ingress   nginx/nginx-ingress:2.4.2   app=nginx-ingress

$ kubectl logs nginx-ingress-n4b79 -n nginx-ingress
I0111 09:17:11.242514       1 flags.go:199] Starting NGINX Ingress Controller Version=2.4.2 PlusFlag=false
I0111 09:17:11.242568       1 flags.go:200] Commit=4252538e0d02dfd42cd3b35884cd5b50147814b7 Date=2022-11-30T14:54:40Z DirtyState=false Arch=linux/amd64 Go=go1.19.3
I0111 09:17:11.249520       1 main.go:214] Kubernetes version: 1.24.9
I0111 09:17:11.257785       1 main.go:341] Using nginx version: nginx/1.23.2
2023/01/11 09:17:11 [notice] 24#24: using the "epoll" event method
2023/01/11 09:17:11 [notice] 24#24: nginx/1.23.2
2023/01/11 09:17:11 [notice] 24#24: built by gcc 10.2.1 20210110 (Debian 10.2.1-6)
2023/01/11 09:17:11 [notice] 24#24: OS: Linux 5.4.0-132-generic
2023/01/11 09:17:11 [notice] 24#24: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2023/01/11 09:17:11 [notice] 24#24: start worker processes
2023/01/11 09:17:11 [notice] 24#24: start worker process 30
2023/01/11 09:17:11 [notice] 24#24: start worker process 31
2023/01/11 09:17:11 [notice] 24#24: start worker process 32
2023/01/11 09:17:11 [notice] 24#24: start worker process 33
2023/01/11 09:17:11 [notice] 24#24: start worker process 34
2023/01/11 09:17:11 [notice] 24#24: start worker process 35
2023/01/11 09:17:11 [notice] 24#24: start worker process 36
2023/01/11 09:17:11 [notice] 24#24: start worker process 37
2023/01/11 09:17:11 [notice] 24#24: start worker process 38
2023/01/11 09:17:11 [notice] 24#24: start worker process 39
2023/01/12 04:30:33 [notice] 24#24: signal 17 (SIGCHLD) received from 288
2023/01/12 04:30:33 [notice] 24#24: worker process 288 exited with code 0
2023/01/12 04:30:33 [notice] 24#24: worker process 282 exited with code 0
2023/01/12 04:30:33 [notice] 24#24: worker process 290 exited with code 0
2023/01/12 04:30:33 [notice] 24#24: worker process 304 exited with code 0
2023/01/12 04:30:33 [notice] 24#24: worker process 328 exited with code 0
2023/01/12 04:30:33 [notice] 24#24: worker process 315 exited with code 0
2023/01/12 04:30:33 [notice] 24#24: signal 29 (SIGIO) received
2023/01/12 04:30:33 [notice] 24#24: signal 17 (SIGCHLD) received from 290

When i tried to connect Nginx container using http://{Worker-IP}, Have tried with all three Worker-IPs. For all three it shows 404 Not Found on browser.

Nginx container Status shows Running & Ready shows (1/1). What could the problem? Also let me know Am i missing any additional installation commands?

$ kubectl get ingress --all-namespaces
NAMESPACE   NAME              CLASS    HOSTS                ADDRESS   PORTS   AGE
jenkins     jenkins-ingress   <none>   jenkins.company.com             80      19h

$ kubectl get svc  --all-namespaces
NAMESPACE     NAME          TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                  AGE
default       kubernetes    ClusterIP   10.96.0.1       <none>        443/TCP                  46h
jenkins       jenkins-svc   ClusterIP   10.103.54.142   <none>        80/TCP                   46h
kube-system   kube-dns      ClusterIP   10.96.0.10      <none>        53/UDP,53/TCP,9153/TCP   46h


来源: stackexchange

问:
Android reverse QT project
I'm new to Android reverse engineering and for this QT Android project I've tried using apktool to modify the resource files, JADX to decompile the Android Dex & Apk into Java source code and apksigner to sign it, and I haven't had any problems with these processes.

However, there seems to be a problem with the resource directory res as I don't find the relevant text in res/values/strings.xml.The path smali/org/qtproject/qt/android/ is my guess that it is a QT project, but I have no experience with QT development.

Yes, my goal is to modify the text and image resources in the app.

I initially thought that the aapt version of apktool was causing the missing resource files, but when I used the Android SDK build-tools aapt dump, I found no problem with apktool.

After this, I tried looking at the source code using JADX and found questionable code in the qtLoader.

private void loadApplication(Bundle bundle) {
    Resources resources = this.m_context.getResources();
    String packageName = this.m_context.getPackageName();
    try {
        if (bundle.getInt(ERROR_CODE_KEY) != 0) {
            AlertDialog create = new AlertDialog.Builder(this.m_context).create();
            create.setMessage(bundle.getString(ERROR_MESSAGE_KEY));
            create.setButton(resources.getString(17039370), new DialogInterface.OnClickListener() { // from class: org.qtproject.qt.android.bindings.QtLoader.1
                @Override // android.content.DialogInterface.OnClickListener
                public void onClick(DialogInterface dialogInterface, int i) {
                    QtLoader.this.finish();
                }
            });
            create.show();
            return;
        }
        ArrayList<String> arrayList = new ArrayList<>(preferredAbiLibs(resources.getStringArray(resources.getIdentifier("bundled_libs", "array", packageName))));
        if (this.m_contextInfo.metaData.containsKey("android.app.lib_name")) {
            bundle.putString(MAIN_LIBRARY_KEY, this.m_contextInfo.metaData.getString("android.app.lib_name") + "_" + this.preferredAbi);
        }
        bundle.putStringArrayList(BUNDLED_LIBRARIES_KEY, arrayList);
        DexClassLoader dexClassLoader = new DexClassLoader(bundle.getString(DEX_PATH_KEY), this.m_context.getDir("outdex", 0).getAbsolutePath(), bundle.containsKey(LIB_PATH_KEY) ? bundle.getString(LIB_PATH_KEY) : null, this.m_context.getClassLoader());
        Object newInstance = dexClassLoader.loadClass(bundle.getString(LOADER_CLASS_NAME_KEY)).newInstance();
        if (!((Boolean) newInstance.getClass().getMethod("loadApplication", contextClassName(), ClassLoader.class, Bundle.class).invoke(newInstance, this.m_context, dexClassLoader, bundle)).booleanValue()) {
            throw new Exception("");
        }
        QtApplication.setQtContextDelegate(this.m_delegateClass, newInstance);
        if (!((Boolean) newInstance.getClass().getMethod("startApplication", new Class[0]).invoke(newInstance, new Object[0])).booleanValue()) {
            throw new Exception("");
        }
    } catch (Exception e) {
        e.printStackTrace();
        AlertDialog create2 = new AlertDialog.Builder(this.m_context).create();
        create2.setMessage(resources.getString(resources.getIdentifier("fatal_error_msg", "string", packageName)));
        create2.setButton(resources.getString(17039370), new DialogInterface.OnClickListener() { // from class: org.qtproject.qt.android.bindings.QtLoader.2
            @Override // android.content.DialogInterface.OnClickListener
            public void onClick(DialogInterface dialogInterface, int i) {
                QtLoader.this.finish();
            }
        });
        create2.show();
    }
}
```

For example bundle.getString(ERROR_MESSAGE_KEY) and resources.getString(17039370) and so on. And in the assets directory there is a dewing called android_rcc_bundle.rcc, which I suspect is a resource file for the QT project.

I found two tools for decompiling rcc files: zedxxx/rccextended and pgaskin/qrc, and I tried them both, but all I got was a bunch of nested directory names, and a file called qmldir, with no text content. android_rcc_bundle directory construction

Now I'm stuck and don't know what to do next.

ContentLicense: CC BY-SA 4.0

Title: Android reverse QT project

Body:
I'm new to Android reverse engineering and for this QT Android project I've tried using apktool to modify the resource files, JADX to decompile the Android Dex & Apk into Java source code and apksigner to sign it, and I haven't had any problems with these processes.

However, there seems to be a problem with the resource directory res as I don't find the relevant text in res/values/strings.xml.The path smali/org/qtproject/qt/android/ is my guess that it is a QT project, but I have no experience with QT development.

Yes, my goal is to modify the text and image resources in the app.

I initially thought that the aapt version of apktool was causing the missing resource files, but when I used the Android SDK build-tools aapt dump, I found no problem with apktool.

After this, I tried looking at the source code using JADX and found questionable code in the qtLoader.

private void loadApplication(Bundle bundle) {
    Resources resources = this.m_context.getResources();
    String packageName = this.m_context.getPackageName();
    try {
        if (bundle.getInt(ERROR_CODE_KEY) != 0) {
            AlertDialog create = new AlertDialog.Builder(this.m_context).create();
            create.setMessage(bundle.getString(ERROR_MESSAGE_KEY));
            create.setButton(resources.getString(17039370), new DialogInterface.OnClickListener() { // from class: org.qtproject.qt.android.bindings.QtLoader.1
                @Override // android.content.DialogInterface.OnClickListener
                public void onClick(DialogInterface dialogInterface, int i) {
                    QtLoader.this.finish();
                }
            });
            create.show();
            return;
        }
        ArrayList<String> arrayList = new ArrayList<>(preferredAbiLibs(resources.getStringArray(resources.getIdentifier("bundled_libs", "array", packageName))));
        if (this.m_contextInfo.metaData.containsKey("android.app.lib_name")) {
            bundle.putString(MAIN_LIBRARY_KEY, this.m_contextInfo.metaData.getString("android.app.lib_name") + "_" + this.preferredAbi);
        }
        bundle.putStringArrayList(BUNDLED_LIBRARIES_KEY, arrayList);
        DexClassLoader dexClassLoader = new DexClassLoader(bundle.getString(DEX_PATH_KEY), this.m_context.getDir("outdex", 0).getAbsolutePath(), bundle.containsKey(LIB_PATH_KEY) ? bundle.getString(LIB_PATH_KEY) : null, this.m_context.getClassLoader());
        Object newInstance = dexClassLoader.loadClass(bundle.getString(LOADER_CLASS_NAME_KEY)).newInstance();
        if (!((Boolean) newInstance.getClass().getMethod("loadApplication", contextClassName(), ClassLoader.class, Bundle.class).invoke(newInstance, this.m_context, dexClassLoader, bundle)).booleanValue()) {
            throw new Exception("");
        }
        QtApplication.setQtContextDelegate(this.m_delegateClass, newInstance);
        if (!((Boolean) newInstance.getClass().getMethod("startApplication", new Class[0]).invoke(newInstance, new Object[0])).booleanValue()) {
            throw new Exception("");
        }
    } catch (Exception e) {
        e.printStackTrace();
        AlertDialog create2 = new AlertDialog.Builder(this.m_context).create();
        create2.setMessage(resources.getString(resources.getIdentifier("fatal_error_msg", "string", packageName)));
        create2.setButton(resources.getString(17039370), new DialogInterface.OnClickListener() { // from class: org.qtproject.qt.android.bindings.QtLoader.2
            @Override // android.content.DialogInterface.OnClickListener
            public void onClick(DialogInterface dialogInterface, int i) {
                QtLoader.this.finish();
            }
        });
        create2.show();
    }
}

For example bundle.getString(ERROR_MESSAGE_KEY) and resources.getString(17039370) and so on. And in the assets directory there is a dewing called android_rcc_bundle.rcc, which I suspect is a resource file for the QT project.

I found two tools for decompiling rcc files: zedxxx/rccextended and pgaskin/qrc, and I tried them both, but all I got was a bunch of nested directory names, and a file called qmldir, with no text content. android_rcc_bundle directory construction

Now I'm stuck and don't know what to do next.


问:
How do I convert my pretrained model in .h5 to .pt format so as to run my imageai custom detection model?
I was re running my model after a month, and all the dependencies have changed. It demands .pt file for weights.

I have tried converting the .xml annotations to .txt annotations but no chnage occured.


问:
Optimize Google Places API Query for Prominent Parks, Mountains, Conservation Areas
First post on Stackoverflow.

I am using the Google API to sort images taken while traveling into organized folders, append tags and rename files with relevant information. I have my code working well but am not always happy with the results. I want to be able to focus my query results on major tourist attractions such as National Parks, Ski Resorts, Beaches, etc. The problem I am finding is that the prominence "rankby" variable and the "radius" are not giving satisfactory results. Here is a typical query for Zion National Park.

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=37.269486111111,-112.948141666667&rankby=prominence&radius=50000&type=natural_feature,tourist_attraction,point_of_interest&keyword=&key=MYAPIKEY

The most prominent result is Springdale which is the town where you enter the part. Zion National Park is listed much further down in the results. What my code does is use the LAT and LON extracted using EXIF and does a Google API nearby search request to find the Place ID for where the photo was taken. It then does another API request for Place Details using the place_id provided by the previous step to cut down on the information I need to parse.

https://maps.googleapis.com/maps/api/place/details/json?place_id=ChIJ8R5RCzaNyoARegi3rqVkstk&fields=name,address_component&key=MYAPIKEY

I can force the nearby search to return a National Park by searching against "National Park" in the keywords variable but that limits my project to only being able to provide National Park results since the keywords field can only accept one string.

I would like a park of my query to be able to return the most prominent tourist attraction at the general level, i.e. Zion National Park, Yosemite National Park, etc. so I can sort images into the general name folders and another part of the query provides the exact location. i.e. I am on this trail or at this lookout. The problem is the Google API sees these specific locations "Trail, Lookout" as tourist attractions, parks, establishments, etc. as well so it chooses those first.

What I need help with is trying to figure out if there is a better way to structure my query to return the high-level / name of the major park.  From my understanding, the types field only searches on the first type even if there is more in the list and the keywords field can only accept one string as well making it impossible for one phase to capture all major destinations at a high level.

Perhaps it needs to be done with more queries but I am trying to limit the number of queries to stay inside the free quota. Maybe it will just take a long time to fully sort my files.

Read through and implemented Google API structure. I hoping someone can provide a more detailed query structure or method to parse out truly prominent locations rather than googles interpretation of prominence as it can be affected by user ratings, etc. It is not always accurate.


问:
Facing column disorientation(jumbling of data from one cell to another cell horizontally, irregular column width issue) in HTML format table
I'm trying to convert input csv file(dynamic: no. of columns & rows can vary) into html table using shell script.

input CSV(no. of columns & rows can vary):

```<code>Id,Employee,Task,Status,Date
5303,Mancha,Testing,Failure,20-20-20
2532,Mari,Requirement,Success,20-20-20
</code>```

Code written:

```<code>csv_to_html()
{
report_html=$(awk 'BEGIN {FS=",";
            print "<html><head><style>"
            print "table, tr, td {font-family : Tahoma, sans-serif; border: 1px solid; border-collapse: collapse; font-size: 12px; width: 100%;}"
            print ".green {background-color: #98FB98; color:black}"
            print ".red {background-color: #F08088; color:black}"
            print ".grey {background-color: #C0C0C0; color:black}"
            print ".white {background-color: #FFFFF; color:black}"
            print "<body><table>"

NR == 1 {   print "<tr bgcolor=\"#87CEFA\"; width: 100%>";
            for (i = 1; i <= NF; i++) print "<td><b>" $i "</b></td>";
               print "</tr>"}
NR > 1  {   print "<tr width: 100%;>";
            for (i = 1; i <= NF; i++)
               print "<td" (" class=" ($i=="Failure"?"red":$i=="Sucess"?"green":$i=="NONE"?"#FFFFE0":"white")) ">" $i "</td>";
               print "</tr>")
END     {print "</table></body></html>"}'
}
</code>```

Required Html Table:
Output table

It works fine for certain input files, but when it encounters other csv files it produces html table  with column disorientation (jumbling of data from one cell to another cell horizontally, irregular column width etc). I'm thinking its due to increased length of strings in certain csv file.

PS: I'm new to html please help me resolve this issue

Body:
I'm trying to convert input csv file(dynamic: no. of columns & rows can vary) into html table using shell script.

input CSV(no. of columns & rows can vary):

Id,Employee,Task,Status,Date
5303,Mancha,Testing,Failure,20-20-20
2532,Mari,Requirement,Success,20-20-20

Code written:

csv_to_html()
{
report_html=$(awk 'BEGIN {FS=",";
            print "


问:
How to pass data from SystemAlertDialog into StatefulWidget Class in Flutter?
In this class I created a System alert dialog using the  system_alert_window: ^1.2.1
library.  It's working fine, the thing is after showing the dialog I want to get return response from the system alert dialog. Any help will be highly assist me as I trapped on this issue long time. Thanks in advance.

How to get return response from system alert dialog ?

There is a button named Click the button When the button gets pressed I want to know that information in the MyApp() class

pubspec.yaml

```<code>   system_alert_window: ^1.2.1
</code>```

AndroidManifest.xml

```<code> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
 <uses-permission android:name="android.permission.FOREGROUND_SERVICE " />
 <uses-permission android:name="android.permission.WAKE_LOCK" />
</code>```

Main.dart

```<code>import 'package:flutter/material.dart';
import 'my_app.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(MyApp());
}

@pragma('vm:entry-point')
void callBack(String tag) {
  WidgetsFlutterBinding.ensureInitialized();
  print(tag);
  switch (tag) {
    case "btn_click":
      print("OnClick event of $tag");
      // need to notify to tha class that simple_button has been pressed
      break;
  }
}
</code>```

my_app.dart

```<code>import 'dart:async';
import 'package:flutter/material.dart';
import 'package:system_alert_window/system_alert_window.dart';
import 'main.dart';

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  SystemWindowPrefMode prefMode = SystemWindowPrefMode.OVERLAY;

  @override
  void initState() {
    super.initState();
    _requestPermissions();
    SystemAlertWindow.registerOnClickListener(callBack);
  }

  Future<void> _requestPermissions() async {
    await SystemAlertWindow.requestPermissions(prefMode: prefMode);
  }

  void _showOverlayWindow() {
    SystemWindowHeader header = SystemWindowHeader(
        title: SystemWindowText(
            text: "Incoming Call", fontSize: 10, textColor: Colors.black45),
        padding: SystemWindowPadding.setSymmetricPadding(12, 12),
        subTitle: SystemWindowText(
            text: "9898989899",
            fontSize: 14,
            fontWeight: FontWeight.BOLD,
            textColor: Colors.black87),
        decoration: SystemWindowDecoration(startColor: Colors.grey[100]),
        button: SystemWindowButton(
            text: SystemWindowText(
                text: "Click the button",
                fontSize: 10,
                textColor: Colors.black45),
            tag: "btn_click"),
        buttonPosition: ButtonPosition.TRAILING);
    SystemAlertWindow.showSystemWindow(
        height: 80,
        header: header,
        margin: SystemWindowMargin(left: 8, right: 8, top: 200, bottom: 0),
        gravity: SystemWindowGravity.TOP,
        prefMode: prefMode,
        backgroundColor: Colors.black12,
        isDisableClicks: false);
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('System Alert Window Example App'),
        ),
        body: Center(
          child: Column(
            children: <Widget>[
              Padding(
                padding: const EdgeInsets.symmetric(vertical: 8.0),
                child: MaterialButton(
                  onPressed: _showOverlayWindow,
                  textColor: Colors.white,
                  child: Text("Show system alert window"),
                  color: Colors.deepOrange,
                  padding: const EdgeInsets.symmetric(vertical: 8.0),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
</code>```

Body:
In this class I created a System alert dialog using the  system_alert_window: ^1.2.1
library.  It's working fine, the thing is after showing the dialog I want to get return response from the system alert dialog. Any help will be highly assist me as I trapped on this issue long time. Thanks in advance.

How to get return response from system alert dialog ?

There is a button named Click the button When the button gets pressed I want to know that information in the MyApp() class

pubspec.yaml

   system_alert_window: ^1.2.1

AndroidManifest.xml

 <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
 <uses-permission android:name="android.permission.FOREGROUND_SERVICE " />
 <uses-permission android:name="android.permission.WAKE_LOCK" />

Main.dart

import 'package:flutter/material.dart';
import 'my_app.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(MyApp());
}

@pragma('vm:entry-point')
void callBack(String tag) {
  WidgetsFlutterBinding.ensureInitialized();
  print(tag);
  switch (tag) {
    case "btn_click":
      print("OnClick event of $tag");
      // need to notify to tha class that simple_button has been pressed
      break;
  }
}

my_app.dart

import 'dart:async';
import 'package:flutter/material.dart';
import 'package:system_alert_window/system_alert_window.dart';
import 'main.dart';

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  SystemWindowPrefMode prefMode = SystemWindowPrefMode.OVERLAY;

  @override
  void initState() {
    super.initState();
    _requestPermissions();
    SystemAlertWindow.registerOnClickListener(callBack);
  }

  Future<void> _requestPermissions() async {
    await SystemAlertWindow.requestPermissions(prefMode: prefMode);
  }

  void _showOverlayWindow() {
    SystemWindowHeader header = SystemWindowHeader(
        title: SystemWindowText(
            text: "Incoming Call", fontSize: 10, textColor: Colors.black45),
        padding: SystemWindowPadding.setSymmetricPadding(12, 12),
        subTitle: SystemWindowText(
            text: "9898989899",
            fontSize: 14,
            fontWeight: FontWeight.BOLD,
            textColor: Colors.black87),
        decoration: SystemWindowDecoration(startColor: Colors.grey[100]),
        button: SystemWindowButton(
            text: SystemWindowText(
                text: "Click the button",
                fontSize: 10,
                textColor: Colors.black45),
            tag: "btn_click"),
        buttonPosition: ButtonPosition.TRAILING);
    SystemAlertWindow.showSystemWindow(
        height: 80,
        header: header,
        margin: SystemWindowMargin(left: 8, right: 8, top: 200, bottom: 0),
        gravity: SystemWindowGravity.TOP,
        prefMode: prefMode,
        backgroundColor: Colors.black12,
        isDisableClicks: false);
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('System Alert Window Example App'),
        ),
        body: Center(
          child: Column(
            children: <Widget>[
              Padding(
                padding: const EdgeInsets.symmetric(vertical: 8.0),
                child: MaterialButton(
                  onPressed: _showOverlayWindow,
                  textColor: Colors.white,
                  child: Text("Show system alert window"),
                  color: Colors.deepOrange,
                  padding: const EdgeInsets.symmetric(vertical: 8.0),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}


问:
How to create Dijkstra's algorithm GUI using python?
I need to do Dijkstra's GUI for my assignment. I stumbled upon a website explaining about the Dijkstra's algorithm link. I tried to build GUI based on the website, but I got stuck.

There are two things I want to do:

The user can freely choose the source and destination from the dropdown menus. (Note: As of now, I didn't know how to do it, so I just set the source and destination myself)

The program will find the shortest path based on the input and display the output (on GUI) when they pressed button 'Enter'. (Note: As of now, the output only shows on terminal not GUI)

I'm still new to python and any help or ideas are much appreciated. Sorry for my broken English and messy python code.

------My code------

```<code>from tkinter import *

win=Tk() #creating the main window and storing the window object in 'win'
win.title('KOE Navigation') #setting title of the window
win.geometry('500x400')

def initial_graph() :

    return {

        'A': {'B':1, 'C':4, 'D':2},
        'B': {'A':9, 'E':5},
        'C': {'A':4, 'F':15},
        'D': {'A':10, 'F':7},
        'E': {'B':3, 'J':7},
        'F': {'C':11, 'D':14, 'K':3, 'G':9},
        'G': {'F':12, 'I':4},
        'H': {'J':13},
        'I': {'G':6, 'J':7},
        'J': {'H':2, 'I':4},
        'K': {'F':6}

            }

def shortest_path():

    x = 'H'
    print('The shortest path between A to H is: ')
    print(x, end='<-')
    while True:
        x = adj_node[x]
        if x is None:
            print("")
            break
        print(x, end='<-')

#print(initial_graph())
initial =  'A'

path = {}

adj_node = {}

queue = []

graph = initial_graph()

for node in graph:
    path[node] = float("inf")
    adj_node[node] = None
    queue.append(node)

path[initial] = 0

while queue:
    # find min distance which wasn't marked as current
    key_min = queue[0]
    min_val = path[key_min]
    for n in range(1, len(queue)):
        if path[queue[n]] < min_val:
            key_min = queue[n]
            min_val = path[key_min]
    cur = key_min
    queue.remove(cur)
    print(cur)

    for i in graph[cur]:
        alternate = graph[cur][i] + path[cur]
        if path[i] > alternate:
            path[i] = alternate
            adj_node[i] = cur

#GUI
lab=Label(win,text='Please select the source and destination required below').pack()

#creating dropdown list
options_source = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K"]
options_destination = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K"]

#data type of the list
clicked_source = StringVar()
clicked_destination = StringVar()

#Set initial label
clicked_source.set("Source")
clicked_destination.set("Destination")

#create dropdown menu
drop_source = OptionMenu(win, clicked_source, *options_source).pack()
drop_destination = OptionMenu(win, clicked_destination, *options_destination).pack()

#create enter button to continue the program
myButton = Button(win, text = 'Enter', command = shortest_path).pack()

win.mainloop() #running the loop that works as a trigger
</code>```

Body:
I need to do Dijkstra's GUI for my assignment. I stumbled upon a website explaining about the Dijkstra's algorithm link. I tried to build GUI based on the website, but I got stuck.

There are two things I want to do:

The user can freely choose the source and destination from the dropdown menus. (Note: As of now, I didn't know how to do it, so I just set the source and destination myself)

The program will find the shortest path based on the input and display the output (on GUI) when they pressed button 'Enter'. (Note: As of now, the output only shows on terminal not GUI)

I'm still new to python and any help or ideas are much appreciated. Sorry for my broken English and messy python code.

------My code------

from tkinter import *

win=Tk() #creating the main window and storing the window object in 'win'
win.title('KOE Navigation') #setting title of the window
win.geometry('500x400')

def initial_graph() :

    return {

        'A': {'B':1, 'C':4, 'D':2},
        'B': {'A':9, 'E':5},
        'C': {'A':4, 'F':15},
        'D': {'A':10, 'F':7},
        'E': {'B':3, 'J':7},
        'F': {'C':11, 'D':14, 'K':3, 'G':9},
        'G': {'F':12, 'I':4},
        'H': {'J':13},
        'I': {'G':6, 'J':7},
        'J': {'H':2, 'I':4},
        'K': {'F':6}

            }

def shortest_path():

    x = 'H'
    print('The shortest path between A to H is: ')
    print(x, end='<-')
    while True:
        x = adj_node[x]
        if x is None:
            print("")
            break
        print(x, end='<-')

#print(initial_graph())
initial =  'A'

path = {}

adj_node = {}

queue = []

graph = initial_graph()

for node in graph:
    path[node] = float("inf")
    adj_node[node] = None
    queue.append(node)

path[initial] = 0

while queue:
    # find min distance which wasn't marked as current
    key_min = queue[0]
    min_val = path[key_min]
    for n in range(1, len(queue)):
        if path[queue[n]] < min_val:
            key_min = queue[n]
            min_val = path[key_min]
    cur = key_min
    queue.remove(cur)
    print(cur)

    for i in graph[cur]:
        alternate = graph[cur][i] + path[cur]
        if path[i] > alternate:
            path[i] = alternate
            adj_node[i] = cur

#GUI
lab=Label(win,text='Please select the source and destination required below').pack()

#creating dropdown list
options_source = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K"]
options_destination = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K"]

#data type of the list
clicked_source = StringVar()
clicked_destination = StringVar()

#Set initial label
clicked_source.set("Source")
clicked_destination.set("Destination")

#create dropdown menu
drop_source = OptionMenu(win, clicked_source, *options_source).pack()
drop_destination = OptionMenu(win, clicked_destination, *options_destination).pack()

#create enter button to continue the program
myButton = Button(win, text = 'Enter', command = shortest_path).pack()

win.mainloop() #running the loop that works as a trigger


问:
Sequential REST API call for based on group
I have an application which calls external REST API.
It reads pending data from DB, after API call updates the status and response msg in the DB.

Application Reads from DB -> AWS-ActiveMQ -> JMS Listener -> Service Class -> Call the external API -> Update the status and response in DB.

The APIs are getting called (order by msgId) in milliseconds gap which causing problem for dependent calls.

Table Structure:

msg_id

group_id

data

status

response

NB: Here calls belong to same group_id are dependent and should be sequential
(2nd api call should start after receiving 1st api call response).
Multiple group calls can be made as they are not dependent on each other.

Any suggestion/better-approach this scenario.

Approach-1:

Application Reads group_id from DB -> AWS-ActiveMQ (receives group_id) -> JMS Listener -> Service Class (@Async) -> Fetch Data based on group_id -> Call the external API -> Wait to get the response of previous call before making another call -> Update the status and response in DB.

Service Class (@Async): Multiple group requests can be processed parallel.

Any better approach for "Wait to get the response of previous call before making another call"


问:
Azure pipeline wasn't triggered when the PR move from draft to open
am experiencing an issue with the Azure pipeline wasn't triggered when the PR moved from draft to open
Here is the yaml configuration I used:

trigger: none

```<code>pr:
    drafts: false
    branches:
        include:
            - main
            - hotfix/*
</code>```

does anyone has idea what is going wrong with it?

Body:
am experiencing an issue with the Azure pipeline wasn't triggered when the PR moved from draft to open
Here is the yaml configuration I used:

trigger: none

pr:
    drafts: false
    branches:
        include:
            - main
            - hotfix/*

does anyone has idea what is going wrong with it?


问:
How to remove lag from live camera while implementing face recognition app in flutter?
how to remove lags while using real time face recognition in flutter?

here i tried with google ml kit and tensorflow lite ,mobile facenet .
This is the camera function...
`void initialCamera() async {
loadModel();

```<code>final InputImageRotation? imageRotation =
    InputImageRotationValue.fromRawValue(description.sensorOrientation);

_camera = CameraController(description, ResolutionPreset.medium,
    enableAudio: false);
await _camera!.initialize();
tempDir = await getApplicationDocumentsDirectory();
String _embPath = tempDir!.path + '/emb.json';
jsonFile = new File(_embPath);
if (jsonFile!.existsSync())
  data = json.decode(jsonFile!.readAsStringSync());

_camera!.startImageStream((CameraImage image) async {
  if (_camera != null) {
    if (_isDetecting) return;
    _isDetecting = true;
    String res_name;
    dynamic finalResult = Multimap<String, Face>();

    List<Face> faces = await detect(image, imageRotation!);
    if (faces.length == 0)
      _faceFound = false;
    else
      _faceFound = true;
    Face _face;
    imglib.Image convertedImage = _convertCameraImage(image, _direction);
    for (_face in faces) {
      double x, y, w, h;
      x = (_face.boundingBox.left - 10);
      y = (_face.boundingBox.top - 10);
      w = (_face.boundingBox.width + 10);
      h = (_face.boundingBox.height + 10);
      imglib.Image croppedImage = imglib.copyCrop(
        convertedImage,
        x.round(),
        y.round(),
        w.round(),
        h.round(),
      );
      croppedImage = imglib.copyResizeCropSquare(croppedImage, 112);
      res_name = _recog(croppedImage);

      finalResult.add(res_name, _face);
    }
    setState(() {
      _scanResults = finalResult;
    });

    _isDetecting = false;
  }
});
</code>```

}`

Body:
how to remove lags while using real time face recognition in flutter?

here i tried with google ml kit and tensorflow lite ,mobile facenet .
This is the camera function...
`void initialCamera() async {
loadModel();

final InputImageRotation? imageRotation =
    InputImageRotationValue.fromRawValue(description.sensorOrientation);

_camera = CameraController(description, ResolutionPreset.medium,
    enableAudio: false);
await _camera!.initialize();
tempDir = await getApplicationDocumentsDirectory();
String _embPath = tempDir!.path + '/emb.json';
jsonFile = new File(_embPath);
if (jsonFile!.existsSync())
  data = json.decode(jsonFile!.readAsStringSync());

_camera!.startImageStream((CameraImage image) async {
  if (_camera != null) {
    if (_isDetecting) return;
    _isDetecting = true;
    String res_name;
    dynamic finalResult = Multimap<String, Face>();

    List<Face> faces = await detect(image, imageRotation!);
    if (faces.length == 0)
      _faceFound = false;
    else
      _faceFound = true;
    Face _face;
    imglib.Image convertedImage = _convertCameraImage(image, _direction);
    for (_face in faces) {
      double x, y, w, h;
      x = (_face.boundingBox.left - 10);
      y = (_face.boundingBox.top - 10);
      w = (_face.boundingBox.width + 10);
      h = (_face.boundingBox.height + 10);
      imglib.Image croppedImage = imglib.copyCrop(
        convertedImage,
        x.round(),
        y.round(),
        w.round(),
        h.round(),
      );
      croppedImage = imglib.copyResizeCropSquare(croppedImage, 112);
      res_name = _recog(croppedImage);

      finalResult.add(res_name, _face);
    }
    setState(() {
      _scanResults = finalResult;
    });

    _isDetecting = false;
  }
});

}`


问:
How to parallelise nested loop in my case
I have simplified my python code as:

```<code>import numpy.ma as ma

a=ma.zeros((10, 5, 5))
b=ma.zeros((10, 5, 5))
c=ma.zeros((10, 5, 5))
for i in np.arange(5):
    for j in np.arange(5):
        r =a[:,i,j]
        p =b[:,i,j]
        c[:,i,j] = r*p
</code>```

How to parallelize the code so it can be done by, for example, 4 processors simultaneously and automatically giving correct output?

Any suggestions?

Body:
I have simplified my python code as:

import numpy.ma as ma

a=ma.zeros((10, 5, 5))
b=ma.zeros((10, 5, 5))
c=ma.zeros((10, 5, 5))
for i in np.arange(5):
    for j in np.arange(5):
        r =a[:,i,j]
        p =b[:,i,j]
        c[:,i,j] = r*p

How to parallelize the code so it can be done by, for example, 4 processors simultaneously and automatically giving correct output?

Any suggestions?


问:
What do I need to know to apply (internship) to Gameloft in SEA
I currently live in Vietnam, studying game programming at VTC academy. The language I'm learning is C/C++, and most of the time I'm self-taught from online knowledge. From the beginning until now, there is so much to learn about Game Programming. Currently, I am really interested in finding internship opportunities and my goal is to get an internship at Gameloft SEA, I have researched the company's requirements before I want to ask for your advice because I don't know where to start. I really appreciate it if you guys help me answer the question (What do I need to know to apply (internship) to Gameloft in SEA). Thanks for giving me advice.

I spend a lot of time learning C/C++ because it is a requirement of the company. The problem here is that I don't know if I should choose and start with a game development tool because there are so many.


问:
Can connect to mongo db via batch/powershell but not programmatically (nodejs)
Using the external mongo.exe I can connect to the databases of our environments via

```<code>mongo.exe “mongodb://aaa.unix.abc:27018,bbb.unix.abc:27018,ccc.unix.abc:27018/mydb?replicaSet=myreplicaset” —authenticationMechanism=GSSAPI —authenticationDatabase=$external —username “user@NONPROD@ABC.COM” —password “password” -ssl —-sslCAFile C:\mymongostuff\ca.pem
</code>```

So I have no problem whatsoever connecting via batch scripts and powershell scripts but my problem comes with trying to connect via application (whether Java or JavaScript) running on my local machine

Below test script I’m trying to run (node v14.16.0, npm v6.14.11, mongodb npm library v4.13.0 on a windows PC)

```<code>const { MongoClient } = require(‘mongodb’);
const path = require(‘path’);
const capem = path.join(__dirname,’.\\ca.pen’);

async function main() {
    const uri = “mongodb://aaa.unix.abc:27018,bbb.unix.abc:27018,ccc.unix.abc:27018/mydb?replicaSet=myreplicaset”;
    var mongoOpt = { sslValidate=true, sslCert= capem };

    const client = new MongoClient(uri,mongoOpt);
    try {
        await client.connect();
        await doSomething(client);
    }
</code>```

Running above will run for many seconds without doing anything before giving MongoServerSelectionError

Reason: TopologyDescription {
type: ‘ReplicaSetNoPrimary’,
servers….

My suspicion is the uri is correct but that I somehow need to specify the “authenticationMechanism=GSSAPI —authenticationDatabase=$external —username “user@NONPROD@ABC.COM” —password “password” -ssl —-sslCAFile C:\mymongostuff\ca.pem” outside the uri for it to be equivalent to my working batch/powershell scripts

Body:
Using the external mongo.exe I can connect to the databases of our environments via

mongo.exe “mongodb://aaa.unix.abc:27018,bbb.unix.abc:27018,ccc.unix.abc:27018/mydb?replicaSet=myreplicaset” —authenticationMechanism=GSSAPI —authenticationDatabase=$external —username “user@NONPROD@ABC.COM” —password “password” -ssl —-sslCAFile C:\mymongostuff\ca.pem

So I have no problem whatsoever connecting via batch scripts and powershell scripts but my problem comes with trying to connect via application (whether Java or JavaScript) running on my local machine

Below test script I’m trying to run (node v14.16.0, npm v6.14.11, mongodb npm library v4.13.0 on a windows PC)

const { MongoClient } = require(‘mongodb’);
const path = require(‘path’);
const capem = path.join(__dirname,’.\\ca.pen’);

async function main() {
    const uri = “mongodb://aaa.unix.abc:27018,bbb.unix.abc:27018,ccc.unix.abc:27018/mydb?replicaSet=myreplicaset”;
    var mongoOpt = { sslValidate=true, sslCert= capem };

    const client = new MongoClient(uri,mongoOpt);
    try {
        await client.connect();
        await doSomething(client);
    }

Running above will run for many seconds without doing anything before giving MongoServerSelectionError

Reason: TopologyDescription {
type: ‘ReplicaSetNoPrimary’,
servers….

My suspicion is the uri is correct but that I somehow need to specify the “authenticationMechanism=GSSAPI —authenticationDatabase=$external —username “user@NONPROD@ABC.COM” —password “password” -ssl —-sslCAFile C:\mymongostuff\ca.pem” outside the uri for it to be equivalent to my working batch/powershell scripts


问:
I want people upload videos in my youtube channel without giving them access
I am developing a application where i required to collect videos of users, i want them to upload videos to my youtube channel without giving them access, i have checked data api documentation for javascript and php, i used both but i found that all examples are required oauth 2.0 auth and videos only uploaded to person that is logging with their credentials.

is there anyway i can provide them functionality to upload video in my youtube channel using google javascript api ?

i have tried many sample from youtube data api documentation but i have not found any sample that user can upload video in my youtube channel, i have authorised my application to manage my channel but i didnt found documentation that without passing access of token how can user upload video to my channel


问:
How can I capture the html preview of an item in the network log tab of chrome dev tools using Selenium and Python?
I have a script where I need to inspect the html preview of a particular network event when it appears on the page (picture included).

Is there anyway to achieve what I'm looking for?

Help would be hugely appreciated.

I am currently trying to do this with Seleniums desiredcapabilites and the get_log('performance") function. However, when I read the output, the html previews are not there.

Devtools network preview example


问:
list access outside provider class
My problem is that when I access list under consumer and show into text widget it shows data. but when I use same list in initstate it shows null even when I use same list before return in consumer it shows null.
This is view:

```<code>class FilterView extends StatefulWidget {
  const FilterView({super.key});

  @override
  State<FilterView> createState() => _FilterViewState();
}

class _FilterViewState extends State<FilterView> {
  CategoryViewModel categoryViewModel = CategoryViewModel();

  List<Categories>? categories = [];
  @override
  void initState() {
    // categoryViewModel.fetchCategoryyListApi();
    context.read<CategoryViewModel>().fetchCategoryyListApi();
    // getList();
    print("In filter initstate");
    print(
        "categoty List :${context.read<CategoryViewModel>().categoriess.length}");
    getList();

    super.initState();
  }

  getList() {
    Provider.of<CategoryViewModel>(context, listen: false)
        .categoriess
        .map((category) {
      return checkBoxes.add(CheckBoxSettings(title: category.title!));
    });
    print("checkBoxxxxxxxxxx: ${checkBoxes.length}");

  }
**This is categoryviewModel:**
class CategoryViewModel extends ChangeNotifier {
    List<Categories> categoriess = [];
  final _myRepo = CategoryRepository();

  Future<void> fetchCategoryyListApi() async {
    _myRepo.fetchCategoryList().then((value) {
      categoriess = value.categories!;
      notifyListeners();
      print(categoriess);

    }).onError((error, stackTrace) {
      print(error.toString());

    });
  }
}
</code>```

Title: list access outside provider class

Body:
My problem is that when I access list under consumer and show into text widget it shows data. but when I use same list in initstate it shows null even when I use same list before return in consumer it shows null.
This is view:

class FilterView extends StatefulWidget {
  const FilterView({super.key});

  @override
  State<FilterView> createState() => _FilterViewState();
}

class _FilterViewState extends State<FilterView> {
  CategoryViewModel categoryViewModel = CategoryViewModel();

  List<Categories>? categories = [];
  @override
  void initState() {
    // categoryViewModel.fetchCategoryyListApi();
    context.read<CategoryViewModel>().fetchCategoryyListApi();
    // getList();
    print("In filter initstate");
    print(
        "categoty List :${context.read<CategoryViewModel>().categoriess.length}");
    getList();

    super.initState();
  }

  getList() {
    Provider.of<CategoryViewModel>(context, listen: false)
        .categoriess
        .map((category) {
      return checkBoxes.add(CheckBoxSettings(title: category.title!));
    });
    print("checkBoxxxxxxxxxx: ${checkBoxes.length}");

  }
**This is categoryviewModel:**
class CategoryViewModel extends ChangeNotifier {
    List<Categories> categoriess = [];
  final _myRepo = CategoryRepository();

  Future<void> fetchCategoryyListApi() async {
    _myRepo.fetchCategoryList().then((value) {
      categoriess = value.categories!;
      notifyListeners();
      print(categoriess);

    }).onError((error, stackTrace) {
      print(error.toString());

    });
  }
}


问:
Using pygame and font.render, how do I make sure the text doesn't go across a certain boundary but instead move down?
```<code>tutorialText = tutorialFont.render("""A sliding puzzle is a type of game where a player must
            rearrange a set of pieces to complete an image by sliding the pieces into the empty space.
            This game is a variation of a sliding puzzle, where you can click near the blank spot or use the
            arrow keys to move blocks around. To solve the game, you must rearrange the letters to form words.
            There are numbers at the bottom to guide you. To have solved a game, starting from the topmost
            left block, the number will be 1, and reading from left to right the numbers will go in order go
            all the way to the last column before going to the next row.
            The blank block will be the bottom most right block.""", True, (255,255,255), (196, 164, 132)).
</code>```

I have a lot of text, I don't want it to go over 200 pixels away from the starting position, which is (0,100), so no over (200,100), but instead go down.

I have tried searching online, but I haven't found anything yet.

Body:
tutorialText = tutorialFont.render("""A sliding puzzle is a type of game where a player must
            rearrange a set of pieces to complete an image by sliding the pieces into the empty space.
            This game is a variation of a sliding puzzle, where you can click near the blank spot or use the
            arrow keys to move blocks around. To solve the game, you must rearrange the letters to form words.
            There are numbers at the bottom to guide you. To have solved a game, starting from the topmost
            left block, the number will be 1, and reading from left to right the numbers will go in order go
            all the way to the last column before going to the next row.
            The blank block will be the bottom most right block.""", True, (255,255,255), (196, 164, 132)).

I have a lot of text, I don't want it to go over 200 pixels away from the starting position, which is (0,100), so no over (200,100), but instead go down.

I have tried searching online, but I haven't found anything yet.


问:
How to Encrypt Spring Liquibase Password
I am new to Liquibase. I have gotten the hang of what I need to do for now. But I would like to know is there a way to encrypt the password we store in the property spring.liquibase.password in the application.properties file of a Spring Boot application?


问:
How to close component via changing the state
I'm iterating over array of advertisements and show them on the screen.
When user click on one of the advertisements he activate the value of 'extension' to true, and the FavPageExtension component become visible, presenting the extended information about this specific advertisement.

```<code>return (

       <div className={styles.width}  >

           {favAdd.map((r, index) =>

               <div id={r.M_id}
                   className={styles.mainwrapper_} onClick={() => setextesion(true)}  >

//some code that present the addvertisments

                   {extesion && <FavPageExtension f={r} setcurrentImg={setcurrentImg} setimgcounter={setimgcounter} settotalimgcounter={settotalimgcounter}
                       setmodaladdInfo={setmodaladdInfo} currentImg={currentImg} totalimgcounter={totalimgcounter} imgcounter={imgcounter}
                       setmailmodal={setmailmodal} index={index} setextesion={setextesion} extesion={extesion} ></FavPageExtension>}

               </div>)}

       </div>

   )
</code>```

to close the FavPageExtension component I  set 'extension' value  to false onclick:

```<code>function FavPageExtension({ f, setcurrentImg, setimgcounter, settotalimgcounter, setmodaladdInfo, currentImg, totalimgcounter, imgcounter,
    setmailmodal, index, setextesion }) {

    return (

        <div   className={styles.modal}>

            <div className={styles.toresults}>
                <div onClick={() => setextesion(false)} className={styles.text3}>חזרה לתוצאות חיפוש</div>
                <FontAwesomeIcon icon={faChevronLeft}></FontAwesomeIcon>
            </div>
//code that present the extended information
 </div>
</code>```

the problem is that although I pass the 'setextension' to the FavPageExtension component where he is activated onClick  nothing happens.
no error, but the FavPageExtension component continue become opened, and I cant close him in no way.

Any help would be really appreciated!

Body:
I'm iterating over array of advertisements and show them on the screen.
When user click on one of the advertisements he activate the value of 'extension' to true, and the FavPageExtension component become visible, presenting the extended information about this specific advertisement.

return (

           {favAdd.map((r, index) =>

 setextesion(true)}  >

//some code that present the addvertisments

                   {extesion && <FavPageExtension f={r} setcurrentImg={setcurrentImg} setimgcounter={setimgcounter} settotalimgcounter={settotalimgcounter}
                       setmodaladdInfo={setmodaladdInfo} currentImg={currentImg} totalimgcounter={totalimgcounter} imgcounter={imgcounter}
                       setmailmodal={setmailmodal} index={index} setextesion={setextesion} extesion={extesion} ></FavPageExtension>}

)}

   )

to close the FavPageExtension component I  set 'extension' value  to false onclick:

function FavPageExtension({ f, setcurrentImg, setimgcounter, settotalimgcounter, setmodaladdInfo, currentImg, totalimgcounter, imgcounter,
    setmailmodal, index, setextesion }) {

    return (

 setextesion(false)} className={styles.text3}>חזרה לתוצאות חיפוש

                <FontAwesomeIcon icon={faChevronLeft}></FontAwesomeIcon>

//code that present the extended information

the problem is that although I pass the 'setextension' to the FavPageExtension component where he is activated onClick  nothing happens.
no error, but the FavPageExtension component continue become opened, and I cant close him in no way.

Any help would be really appreciated!


问:
Why am I facing OOM in dali/pytorch inference pipeline?
I've a trained resnet 50 model and I'm using it for inference of medical images in jpeg2000 format. I'm using dali pipeline to speed up the process. But, I run into OOM after inferring 10 batches. I'm deleting tensors after each batch inference, still facing OOM.
Batch: 32,
image_size: 512 * 512,
GPU: P100 16GB.</p>
```<code>    @pipeline_def
    def j2k_decode_pipeline():
        jpegs, labels = fn.readers.file(files = j2kfiles)
        images = fn.experimental.decoders.image(jpegs, device='mixed', output_type=types.RGB, dtype=DALIDataType.INT16)
        images = fn.resize(
            images,
            resize_x=IMAGE_SIZE,
            resize_y=IMAGE_SIZE,
            resize_z=3,
            interp_type=types.INTERP_LANCZOS3)
        return images, labels

    def get_preds_jk2(max_batch_size):
        cnt = math.ceil(len(j2kfiles)/max_batch_size)-1
        pipe = j2k_decode_pipeline(batch_size=max_batch_size, num_threads=2, device_id=0, debug=True)
        pipe.build()

        dali_iter = DALIGenericIterator(pipe, ['data', 'label'])

        model_weights_path = '/model-2/model_weights.pth'
        model = models.resnet50()
        num_ftrs = model.fc.in_features
        model.fc = nn.Linear(num_ftrs, 2)
        model.load_state_dict(torch.load(model_weights_path))
        device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
        model = model.to(device)
        model.eval()

        preds, labels = [], []
        for i, data in enumerate(dali_iter):
            print('batch ', i)
            labels.append(data[0]['label'])
            # Testing correctness of labels
            imgs = data[0]['data']
            im_temp = imgs - imgs.min()
            im_temp = im_temp / im_temp.max()
            im_temp = im_temp * 255

            imgs_8bit = im_temp.type(torch.uint8).float()
            imgs_tensor = imgs_8bit.permute(0,3,1,2)
            imgs_tensor = imgs_tensor.to(device)

            del imgs, im_temp, imgs_8bit
            gc.collect()
            torch.cuda.empty_cache()

            with torch.no_grad():
                    outputs = model(imgs_tensor)
                    output_probs = torch.nn.functional.softmax(outputs, dim=1).data.cpu().numpy()[:,1]
                    preds.append(output_probs)

            del imgs_tensor, outputs, output_probs
            gc.collect()
            torch.cuda.empty_cache()
            if i == cnt:
                print(i)
                break
        return preds, labels

</code>```

Body:
I've a trained resnet 50 model and I'm using it for inference of medical images in jpeg2000 format. I'm using dali pipeline to speed up the process. But, I run into OOM after inferring 10 batches. I'm deleting tensors after each batch inference, still facing OOM.
Batch: 32,
image_size: 512 * 512,
GPU: P100 16GB.

    @pipeline_def
    def j2k_decode_pipeline():
        jpegs, labels = fn.readers.file(files = j2kfiles)
        images = fn.experimental.decoders.image(jpegs, device='mixed', output_type=types.RGB, dtype=DALIDataType.INT16)
        images = fn.resize(
            images,
            resize_x=IMAGE_SIZE,
            resize_y=IMAGE_SIZE,
            resize_z=3,
            interp_type=types.INTERP_LANCZOS3)
        return images, labels

    def get_preds_jk2(max_batch_size):
        cnt = math.ceil(len(j2kfiles)/max_batch_size)-1
        pipe = j2k_decode_pipeline(batch_size=max_batch_size, num_threads=2, device_id=0, debug=True)
        pipe.build()

        dali_iter = DALIGenericIterator(pipe, ['data', 'label'])

        model_weights_path = '/model-2/model_weights.pth'
        model = models.resnet50()
        num_ftrs = model.fc.in_features
        model.fc = nn.Linear(num_ftrs, 2)
        model.load_state_dict(torch.load(model_weights_path))
        device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
        model = model.to(device)
        model.eval()

        preds, labels = [], []
        for i, data in enumerate(dali_iter):
            print('batch ', i)
            labels.append(data[0]['label'])
            # Testing correctness of labels
            imgs = data[0]['data']
            im_temp = imgs - imgs.min()
            im_temp = im_temp / im_temp.max()
            im_temp = im_temp * 255

            imgs_8bit = im_temp.type(torch.uint8).float()
            imgs_tensor = imgs_8bit.permute(0,3,1,2)
            imgs_tensor = imgs_tensor.to(device)

            del imgs, im_temp, imgs_8bit
            gc.collect()
            torch.cuda.empty_cache()

            with torch.no_grad():
                    outputs = model(imgs_tensor)
                    output_probs = torch.nn.functional.softmax(outputs, dim=1).data.cpu().numpy()[:,1]
                    preds.append(output_probs)

            del imgs_tensor, outputs, output_probs
            gc.collect()
            torch.cuda.empty_cache()
            if i == cnt:
                print(i)
                break
        return preds, labels


问:
Piecewise in R, Error in mse[i, j] <- summary(piecewise)[8] : incorrect number of subscripts on matrix
I try to find two breakpoints in a piecewise linear regression. Not use segmented package. When I store R2 value to a matrix, it goes wrong? Could some one help me?

Here is my code:

```<code>x <- c(40:90)
mse <- matrix(nrow = length(x),ncol = length(x))
for(i in 1:length(x)){
  for(j in 1:length(x)){
    piecewise <- lm(Meter ~ Temperature*(Temperature <= x[i])
                    +Temperature*(Temperature > x[i] & Temperature < x[j])
                    +Temperature*(Temperature >= x[j]))
  }
  mse[i,j] <- summary(piecewise)[8]
}
</code>```

Error in mse[i, j] <- summary(piecewise)[8] :
incorrect number of subscripts on matrix

Body:
I try to find two breakpoints in a piecewise linear regression. Not use segmented package. When I store R2 value to a matrix, it goes wrong? Could some one help me?

Here is my code:

x <- c(40:90)
mse <- matrix(nrow = length(x),ncol = length(x))
for(i in 1:length(x)){
  for(j in 1:length(x)){
    piecewise <- lm(Meter ~ Temperature*(Temperature <= x[i])
                    +Temperature*(Temperature > x[i] & Temperature < x[j])
                    +Temperature*(Temperature >= x[j]))
  }
  mse[i,j] <- summary(piecewise)[8]
}

Error in mse[i, j] <- summary(piecewise)[8] :
incorrect number of subscripts on matrix


问:
How to make my laravel smtp credential can't be checked using checker tools
I'm using gmail smtp server to send email in my laravel project, but few days ago I found that the email that I used in the credential sending the smtp credential (from checker result) to another email. After that my email is used to send spam emails. I try to change password for the email used, but still not working, the spam emails still sent. Is there any way I can do to prevent my smtp credential to be checked?

The credential is saved in .env, and the application already in production.


问:
Is there a way to use mptcp using CAPL environment?
There is a software requirement that needs to send parallel tcp streams, is there a way to enable mptcp in CAPL ?</p>


问:
Documentum 6.7: class not found exception
I cannot load my page in browser.
Log in application server show this:

```<code>12.01.23 09:56:03.149 ERROR [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [com.documentum.web.common.Trace] - Errorhandler threw the following error
java.lang.NoClassDefFoundError: com/documentum/web/security/exceptions/SecurityWrapperRuntimeException
        at jsp_servlet._wdk.__errorhandler._jspService(__errorhandler.java:190)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:238)
        at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:573)
        at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:272)
        at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:158)
        at weblogic.servlet.jsp.PageContextImpl.handlePageException(PageContextImpl.java:402)
        at jsp_servlet._wdk.__redirect._jspService(__redirect.java:168)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
        at com.documentum.web.servlet.ResponseHeaderControlFilter.doFilter(Unknown Source)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
        at com.documentum.web.servlet.CompressionFilter.doFilter(CompressionFilter.java:84)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
        at com.documentum.web.env.WDKController.processRequest(Unknown Source)
        at com.documentum.web.env.WDKController.doFilter(Unknown Source)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3367)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3333)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
        at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2220)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2146)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2124)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1564)
        at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)
</code>```

I didn't find this class SecurityWrapperRuntimeException in the folder /WEB-INF/lib. What kind jar is it and where I can find it?

Start application in browser.

Body:
I cannot load my page in browser.
Log in application server show this:

12.01.23 09:56:03.149 ERROR [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [com.documentum.web.common.Trace] - Errorhandler threw the following error
java.lang.NoClassDefFoundError: com/documentum/web/security/exceptions/SecurityWrapperRuntimeException
        at jsp_servlet._wdk.__errorhandler._jspService(__errorhandler.java:190)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:238)
        at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:573)
        at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:272)
        at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:158)
        at weblogic.servlet.jsp.PageContextImpl.handlePageException(PageContextImpl.java:402)
        at jsp_servlet._wdk.__redirect._jspService(__redirect.java:168)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
        at com.documentum.web.servlet.ResponseHeaderControlFilter.doFilter(Unknown Source)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
        at com.documentum.web.servlet.CompressionFilter.doFilter(CompressionFilter.java:84)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
        at com.documentum.web.env.WDKController.processRequest(Unknown Source)
        at com.documentum.web.env.WDKController.doFilter(Unknown Source)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3367)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3333)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
        at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2220)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2146)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2124)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1564)
        at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)

I didn't find this class SecurityWrapperRuntimeException in the folder /WEB-INF/lib. What kind jar is it and where I can find it?

Start application in browser.


问:
Json path with space for JSON_EXTRACT_SCALAR function
I'm working with a json data in BigQuery and tries to extract a value from a nested object. The json looks like something below.

```<code>  {
   "integrations": {
    "Actions Target": {
      "session_id": 1673497743430
    },
  },
</code>```

My goal is to extract the session Id. I tried a number of approaches but all failed with json path error.

json_extract_scalar(data, '$.integrations.''Action Target''.session_id')

json_extract_scalar(data, '$.integrations.'Action Target'.session_id')

json_extract_scalar(data, '$.integrations["Action Target"].session_id')

json_extract_scalar(data, '$["integrations"]["Action Target"]["session_id"]')

Would anyone please advise?

Body:
I'm working with a json data in BigQuery and tries to extract a value from a nested object. The json looks like something below.

  {
   "integrations": {
    "Actions Target": {
      "session_id": 1673497743430
    },
  },

My goal is to extract the session Id. I tried a number of approaches but all failed with json path error.

json_extract_scalar(data, '$.integrations.''Action Target''.session_id')

json_extract_scalar(data, '$.integrations.'Action Target'.session_id')

json_extract_scalar(data, '$.integrations["Action Target"].session_id')

json_extract_scalar(data, '$["integrations"]["Action Target"]["session_id"]')

Would anyone please advise?


问:
why test ads not showing in flutter
Test ads was working fine but now test ads are not showing i am getting this.</p>
```<code>I/Ads     (10681): This request is sent from a test device.
W/ConnectionStatusConfig(10681): Dynamic lookup for intent failed for action:
com.google.android.gms.ads.service.CACHE
W/ConnectionStatusConfig(10681): Dynamic lookup for intent failed for action:
com.google.android.gms.ads.service.START
I/Ads     (10681): This request is sent from a test device.
I/AdCheck (10681): APS: blockAdView!
I/Ads     (10681): This request is sent from a test device.
W/Ads     (10681): Not retrying to fetch app settings
W/Ads     (10681): Not retrying to fetch app settings
I/DynamiteModule(10681): Considering local module com.google.android.gms.ads.dynamite:0 and
remote module com.google.android.gms.ads.dynamite:224400003
I/DynamiteModule(10681): Selected remote version of com.google.android.gms.ads.dynamite,
version >= 224400003
I/flutter (10681): Android 7.0 (SDK 24), HUAWEI EVA-L19
I/art     (10681): Do full code cache collection, code=101KB, data=123KB
I/art     (10681): After code cache collection, code=97KB, data=83KB
</code>```

Title: why test ads not showing in flutter

Body:
Test ads was working fine but now test ads are not showing i am getting this.

I/Ads     (10681): This request is sent from a test device.
W/ConnectionStatusConfig(10681): Dynamic lookup for intent failed for action:
com.google.android.gms.ads.service.CACHE
W/ConnectionStatusConfig(10681): Dynamic lookup for intent failed for action:
com.google.android.gms.ads.service.START
I/Ads     (10681): This request is sent from a test device.
I/AdCheck (10681): APS: blockAdView!
I/Ads     (10681): This request is sent from a test device.
W/Ads     (10681): Not retrying to fetch app settings
W/Ads     (10681): Not retrying to fetch app settings
I/DynamiteModule(10681): Considering local module com.google.android.gms.ads.dynamite:0 and
remote module com.google.android.gms.ads.dynamite:224400003
I/DynamiteModule(10681): Selected remote version of com.google.android.gms.ads.dynamite,
version >= 224400003
I/flutter (10681): Android 7.0 (SDK 24), HUAWEI EVA-L19
I/art     (10681): Do full code cache collection, code=101KB, data=123KB
I/art     (10681): After code cache collection, code=97KB, data=83KB


问:
Unable to run cucumber features in parallel using Maven Surefire and Failsafe plugins
I am facing issue in running my cucumber feature files in parallel.

I went through several tutorials / posts / blogs and they all recommend to use Maven surefire / failsafe plugin to run them in parallel. I tried that as well but still no luck.

Below is my code:

```<code>        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>11</java.version>
        <junit.version>4.13.2</junit.version>
        <cucumber.version>6.9.1</cucumber.version>
        <maven.compiler.version>3.8.1</maven.compiler.version>
        <maven.surefire.version>2.22.2</maven.surefire.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>${cucumber.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.10</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>${cucumber.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-core</artifactId>
            <version>${cucumber.version}</version>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-jvm-deps</artifactId>
            <version>1.0.6</version>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>gherkin</artifactId>
            <version>5.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>3.141.59</version>
        </dependency>
<!--        <dependency>-->
<!--            <groupId>io.cucumber</groupId>-->
<!--            <artifactId>cucumber-testng</artifactId>-->
<!--            <version>${cucumber.version}</version>-->
<!--            <scope>test</scope>-->
<!--        </dependency>-->
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <version>3.3.0</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.12.5</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.20</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>json-schema-validator</artifactId>
            <version>4.1.1</version>
        </dependency>
        <dependency>
            <groupId>com.auth0</groupId>
            <artifactId>java-jwt</artifactId>
            <version>3.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>2.0.0-alpha5</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.27</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-picocontainer</artifactId>
            <version>7.0.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>1.1.1</version>
        </dependency>
        <dependency>
            <groupId>com.github.dzieciou.testing</groupId>
            <artifactId>curl-logger</artifactId>
            <version>1.0.4</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.6.6</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.0.9</version>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <version>2.6.0</version>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.22.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.aventstack</groupId>
            <artifactId>extentreports-cucumber4-adapter</artifactId>
            <version>1.2.1</version>
        </dependency>
        <dependency>
            <groupId>com.relevantcodes</groupId>
            <artifactId>extentreports</artifactId>
            <version>2.41.2</version>
        </dependency>
        <dependency>
            <groupId>com.github.vincentrussell</groupId>
            <artifactId>json-data-generator</artifactId>
            <version>1.16</version>
        </dependency>
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>1.9.4</version>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>5.2.2</version>
        </dependency>
        <dependency>
            <groupId>io.github.bonigarcia</groupId>
            <artifactId>webdrivermanager</artifactId>
            <version>5.2.3</version>
        </dependency>
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <version>4.2.0</version>
            <scope>test</scope>
        </dependency>

    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.version}</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>3.0.0-M3</version>
                <executions>
                    <execution>
                        <configuration>
                            <includes>
                                <include>**/TestRunner.java</include>
                            </includes>
                            <parallel>methods</parallel>
                            <threadCount>4</threadCount>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
</code>```

Below is my Runner file:

```<code>@CucumberOptions(
        features= {"src/test/resources/features/"}
        ,glue = {"com.project.api.stepdefinition"},
        plugin = {"pretty:target/cucumber/cucumber.txt",
                "json:target/cucumber/cucumber.json",
                "com.project.reporting.ReportListener"
        }
        //,dryRun = true
        ,monochrome = true
        ,snippets = SnippetType.CAMELCASE
        ,tags = "@Organization"
        ,publish = true
        )
</code>```

In my @Before annotation (Which runs before every Scenario), I am printing the current thread ID and every time I am getting Thread ID as 1 and all Scenarios of all features are running sequentially.

Can someone please help me out here as what I am doing wrong.

Thanks

Body:
I am facing issue in running my cucumber feature files in parallel.

I went through several tutorials / posts / blogs and they all recommend to use Maven surefire / failsafe plugin to run them in parallel. I tried that as well but still no luck.

Below is my code:

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>11</java.version>
        <junit.version>4.13.2</junit.version>
        <cucumber.version>6.9.1</cucumber.version>
        <maven.compiler.version>3.8.1</maven.compiler.version>
        <maven.surefire.version>2.22.2</maven.surefire.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>${cucumber.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.10</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>${cucumber.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-core</artifactId>
            <version>${cucumber.version}</version>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-jvm-deps</artifactId>
            <version>1.0.6</version>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>gherkin</artifactId>
            <version>5.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>3.141.59</version>
        </dependency>

        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <version>3.3.0</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.12.5</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.20</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>json-schema-validator</artifactId>
            <version>4.1.1</version>
        </dependency>
        <dependency>
            <groupId>com.auth0</groupId>
            <artifactId>java-jwt</artifactId>
            <version>3.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>2.0.0-alpha5</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.27</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-picocontainer</artifactId>
            <version>7.0.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>1.1.1</version>
        </dependency>
        <dependency>
            <groupId>com.github.dzieciou.testing</groupId>
            <artifactId>curl-logger</artifactId>
            <version>1.0.4</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.6.6</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.0.9</version>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <version>2.6.0</version>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.22.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.aventstack</groupId>
            <artifactId>extentreports-cucumber4-adapter</artifactId>
            <version>1.2.1</version>
        </dependency>
        <dependency>
            <groupId>com.relevantcodes</groupId>
            <artifactId>extentreports</artifactId>
            <version>2.41.2</version>
        </dependency>
        <dependency>
            <groupId>com.github.vincentrussell</groupId>
            <artifactId>json-data-generator</artifactId>
            <version>1.16</version>
        </dependency>
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>1.9.4</version>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>5.2.2</version>
        </dependency>
        <dependency>
            <groupId>io.github.bonigarcia</groupId>
            <artifactId>webdrivermanager</artifactId>
            <version>5.2.3</version>
        </dependency>
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <version>4.2.0</version>
            <scope>test</scope>
        </dependency>

    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.version}</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>3.0.0-M3</version>
                <executions>
                    <execution>
                        <configuration>
                            <includes>
                                <include>**/TestRunner.java</include>
                            </includes>
                            <parallel>methods</parallel>
                            <threadCount>4</threadCount>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Below is my Runner file:

@CucumberOptions(
        features= {"src/test/resources/features/"}
        ,glue = {"com.project.api.stepdefinition"},
        plugin = {"pretty:target/cucumber/cucumber.txt",
                "json:target/cucumber/cucumber.json",
                "com.project.reporting.ReportListener"
        }
        //,dryRun = true
        ,monochrome = true
        ,snippets = SnippetType.CAMELCASE
        ,tags = "@Organization"
        ,publish = true
        )

In my @Before annotation (Which runs before every Scenario), I am printing the current thread ID and every time I am getting Thread ID as 1 and all Scenarios of all features are running sequentially.

Can someone please help me out here as what I am doing wrong.

Thanks