问:
How to read UniDac .log files (database dumps) with python
I have an old delphi program exporting electrical measurement data from a device as .log files as a database dump. I need to convert them to .csv or any other easily accessible dataformat.

As I have no access to the source code, my options to find the actual database format which was used is relatively low. I know, the author was using UniDac and the password for database access is "admin".

When I try to open the .log files in pythons binary-read mode, they don't make much sense as I don't know the correct encoding. Here is an example line:

b'\xa0=\xb1\xfc\xaa<\xb0\xd6\x8e=\xbbr\xd7<\xde\x92\x1a=\x82\xab"=|5%>o\xa4\xbe=\xce:\xe3>\xdf\xb9\xe2=~\x14\x8b=\xbb\xac(=-\x8bE=g\r\x03=\xeb\xc9-=\xcb\x81\xbf</(\x86=\xb8\x07\xad<\xaf\xd0)=\x94\x18\xa6<j@\x05=N\xd0\xa7<\xfe\x92\xbd=\xf0I\xfa<\x9dl\xec<\x08t\xba<9(\xf5<R}\xc8<E\xecI=?\x17\xaa=\xd9\xf4\x01=\xeet\x92=}\xb8\x82<>D\xe1<\x83w\x99<\xab\xd7\xe9<\x92\n'
```
<p>As you can see, it is a mixture of hex- and ASCII-Codes, sometimes even containing comprehensible text headers.</p>
<p>I have also tried opening the database with pyodbc:</p>
```import pyodbc as db

conn = db.connect('DRIVER={SQL Server};DBQ={link_to_.log};UID=admin;PWD=admin')
```

But as I am not sure of the UniDac database format, this doesn't work.

I am not used to working with databases so even basic information is welcome. Which are the formats I need to try with pyodbc, when I want to open UniDac-databases? Do I need to find the correct encoding first? Are there other possibilities to make the.log files accessible?

I can upload an example .log if someone is interested in this problem.

Body:
I have an old delphi program exporting electrical measurement data from a device as .log files as a database dump. I need to convert them to .csv or any other easily accessible dataformat.

As I have no access to the source code, my options to find the actual database format which was used is relatively low. I know, the author was using UniDac and the password for database access is "admin".

When I try to open the .log files in pythons binary-read mode, they don't make much sense as I don't know the correct encoding. Here is an example line:

b'\xa0=\xb1\xfc\xaa<\xb0\xd6\x8e=\xbbr\xd7<\xde\x92\x1a=\x82\xab"=|5%>o\xa4\xbe=\xce:\xe3>\xdf\xb9\xe2=~\x14\x8b=\xbb\xac(=-\x8bE=g\r\x03=\xeb\xc9-=\xcb\x81\xbf</(\x86=\xb8\x07\xad<\xaf\xd0)=\x94\x18\xa6<j@\x05=N\xd0\xa7<\xfe\x92\xbd=\xf0I\xfa<\x9dl\xec<\x08t\xba<9(\xf5<R}\xc8<E\xecI=?\x17\xaa=\xd9\xf4\x01=\xeet\x92=}\xb8\x82<>D\xe1<\x83w\x99<\xab\xd7\xe9<\x92\n'

As you can see, it is a mixture of hex- and ASCII-Codes, sometimes even containing comprehensible text headers.

I have also tried opening the database with pyodbc:

import pyodbc as db

conn = db.connect('DRIVER={SQL Server};DBQ={link_to_.log};UID=admin;PWD=admin')

But as I am not sure of the UniDac database format, this doesn't work.

I am not used to working with databases so even basic information is welcome. Which are the formats I need to try with pyodbc, when I want to open UniDac-databases? Do I need to find the correct encoding first? Are there other possibilities to make the.log files accessible?

I can upload an example .log if someone is interested in this problem.


来源: stackexchange

问:
How to set attribut weight and hierarchy maximum level in arx api
I am using the pyarxaas python library to anonymization data. I have created a basic example using it and it is working fine. Now, I want to set a maximum limit of the hierarchy for the specific column as well as I want to add attribute weight using this library. But I haven't found any document or example for it.

https://pyarxaas.readthedocs.io/en/latest/user-guide/installation.html

basic example: https://github.com/navikt/pyarxaas

ContentLicense: CC BY-SA 4.0


问:
How to pass cookie (django session id) in redirect using Nginx?
I've some problems. I have service main.example.com based on Django framework and service service.example.com based on fastAPI. In service.example.com absent User authentication. To get access, I use Django session id. In sub-service when user request page, fastAPI check Django session id in Cookies. That is, if the user is not authorized in Django, then he will not get into service.example.com. The service checks endpoint main.example.com/api/verify_session and it return client info. Also I have  main.example.com/link_to_redirect to open my sub-service.
When I follow the link, in theory I pass Cookies with id session from Django to the second service and successfully enter in sub-service. On a local server all works without SSL, but with the use of configuration below the cookies are not transmitted in the redirect.
wrong cookies.
In local version without SSL service.example.com I get session_id, client_id, auth_token

Container 1 :

```<code>server {
    listen 80;
    server_name main.example.com;

    location /.well-known/acme-challenge/ {
        root /var/www/certbot;
    }

    location / {
        return 301 https://$host$request_uri;
    }

}

server {
    listen 443 ssl;
    server_name main.example.com;
    set $dev 192.168.100.200;
    proxy_cookie_flags ~ secure httponly samesite=None;

    ssl_certificate /etc/letsencrypt/live/main.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/main.example.com/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    location / {
        proxy_pass http://$dev:5005;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-NginX-Proxy true;
        proxy_set_header Host $http_host;
        }

    location /link_to_redirect {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-NginX-Proxy true;
        proxy_set_header Cookie $http_cookie;
        rewrite ^ https://service.example.com/summary/ permanent;
        }

}
</code>```

Container 2 :

```<code>server {
    listen 80;
    server_name service.example.com;

    location /.well-known/acme-challenge/ {
        root /var/www/certbot;
    }

    location / {
        return 301 https://$host$request_uri;
    }

}

server {
    listen 443 ssl;
    server_name service.example.com;

    ssl_certificate /etc/letsencrypt/live/service.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/service.example.com/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    proxy_cookie_flags ~ secure httponly samesite=None;

    location / {

      proxy_pass http://192.168.100.200:8082;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-NginX-Proxy true;
      proxy_set_header Host $http_host;
      proxy_set_header Cookie $http_cookie;
    }
}
</code>```

I think that main problem consists in SSL directive nginx and I have  no ideas how to fix it.

Thanks for all answers.

Body:
I've some problems. I have service main.example.com based on Django framework and service service.example.com based on fastAPI. In service.example.com absent User authentication. To get access, I use Django session id. In sub-service when user request page, fastAPI check Django session id in Cookies. That is, if the user is not authorized in Django, then he will not get into service.example.com. The service checks endpoint main.example.com/api/verify_session and it return client info. Also I have  main.example.com/link_to_redirect to open my sub-service.
When I follow the link, in theory I pass Cookies with id session from Django to the second service and successfully enter in sub-service. On a local server all works without SSL, but with the use of configuration below the cookies are not transmitted in the redirect.
wrong cookies.
In local version without SSL service.example.com I get session_id, client_id, auth_token

Container 1 :

server {
    listen 80;
    server_name main.example.com;

    location /.well-known/acme-challenge/ {
        root /var/www/certbot;
    }

    location / {
        return 301 https://$host$request_uri;
    }

}

server {
    listen 443 ssl;
    server_name main.example.com;
    set $dev 192.168.100.200;
    proxy_cookie_flags ~ secure httponly samesite=None;

    ssl_certificate /etc/letsencrypt/live/main.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/main.example.com/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    location / {
        proxy_pass http://$dev:5005;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-NginX-Proxy true;
        proxy_set_header Host $http_host;
        }

    location /link_to_redirect {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-NginX-Proxy true;
        proxy_set_header Cookie $http_cookie;
        rewrite ^ https://service.example.com/summary/ permanent;
        }

}

Container 2 :

server {
    listen 80;
    server_name service.example.com;

    location /.well-known/acme-challenge/ {
        root /var/www/certbot;
    }

    location / {
        return 301 https://$host$request_uri;
    }

}

server {
    listen 443 ssl;
    server_name service.example.com;

    ssl_certificate /etc/letsencrypt/live/service.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/service.example.com/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    proxy_cookie_flags ~ secure httponly samesite=None;

    location / {

      proxy_pass http://192.168.100.200:8082;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-NginX-Proxy true;
      proxy_set_header Host $http_host;
      proxy_set_header Cookie $http_cookie;
    }
}

I think that main problem consists in SSL directive nginx and I have  no ideas how to fix it.

Thanks for all answers.


问:
w2ui version 2, how can I get sellected cell name onContextMenuClick
I'm using w2ui version 2 and I have

```<code>let row = '';
let cell = '';

let grid = new w2grid({
    name: 'grid'
    ...
    ...

    ,onClick: function (event) {
        event.onComplete = function () {
            row = event.detail.recid;
            cell = event.detail.column;
            console.log("onClick cell : " + cell );
        }
    }
    ...
    ...
}
</code>```

in my code and it is working fine, but the code below is not working.

```<code>,onContextMenuClick: function (event) {
    event.onComplete = function () {
        row = event.detail.recid;
        cell = event.detail.column;
        console.log("onClick onContextMenuClick : " + cell);
    }
}
</code>```

boot is the part of same grid code.

How can I get selected cell onContextMenuClick. So I can add some specific Context Menu events to my w2ui grid.

I did try looping all sub objects of event

```<code>const keys = Object.keys(event);
    for (let i = 0; i < keys.length; i++) {
    console.log("onContextMenuClick event : " + keys[i] + ': ' + event[keys[i]]);
}
</code>```

so I can find is there any data about cell, no luck.

```<code>var sel = grid.getSelection()[0];
</code>```

only returns recid not any thing about cell.

thanks

Body:
I'm using w2ui version 2 and I have

let row = '';
let cell = '';

let grid = new w2grid({
    name: 'grid'
    ...
    ...

    ,onClick: function (event) {
        event.onComplete = function () {
            row = event.detail.recid;
            cell = event.detail.column;
            console.log("onClick cell : " + cell );
        }
    }
    ...
    ...
}

in my code and it is working fine, but the code below is not working.

,onContextMenuClick: function (event) {
    event.onComplete = function () {
        row = event.detail.recid;
        cell = event.detail.column;
        console.log("onClick onContextMenuClick : " + cell);
    }
}

boot is the part of same grid code.

How can I get selected cell onContextMenuClick. So I can add some specific Context Menu events to my w2ui grid.

I did try looping all sub objects of event

const keys = Object.keys(event);
    for (let i = 0; i < keys.length; i++) {
    console.log("onContextMenuClick event : " + keys[i] + ': ' + event[keys[i]]);
}

so I can find is there any data about cell, no luck.

var sel = grid.getSelection()[0];

only returns recid not any thing about cell.

thanks


问:
{"_A": null, "_x": 0, "_y": 0, "_z": null} React Native when DataStore.Save
when I open the Basket
console.log(basketDish.Dish) get result like {"_A": null, "_x": 0, "_y": 0, "_z": null}.

I think DataStore.Save doesn't wait until Dish get dish.

How can I solve it?

```<code>const addDishToBasket = async (dish, quantity) => {
    console.log("add dish to basket", dish, quantity);
    console.log("type of dish", typeof(dish))

    let theBasket = basket || (await createNewBasket());
    console.log("theBasket.id",theBasket.id)

    const newDish = await DataStore.save(
      new BasketDish({
        quantity: quantity,
        Dish : dish,
        basketID: theBasket.id
      })
    );
    console.log("BasketDish", BasketDish)
    console.log("newDish", newDish)
    setBasketDishes([...basketDishes, newDish]);
  };

</code>```
```<code>add dish to basket {"_deleted": null, "_lastChangedAt": 1670763723808, "_version": 2, "createdAt": "2022-12-04T04:32:38.301Z", "description": "Double meat, gouda cheese, cheddar cheese, cooked ham, bacon, egg, salad and rustic potatoes.", "id": "4d2b8d8f-0ed2-414c-b23b-9570fe77b030", "image": "https://notjustdev-dummy.s3.us-east-2.amazonaws.com/uber-eats/restaurant3.jpeg", "name": "Hamburger La Super Cabo Burger", "price": 8.9, "restaurantID": "f5cdaf6c-64f7-4cbc-bdb2-19fcace7f65f", "updatedAt": "2022-12-11T13:02:03.761Z"} 5
 LOG  type of dish object
 LOG  theBasket.id f22a7ab3-6a27-441e-9967-adb2646c1867
 LOG  BasketDish [Function BasketDish]
 LOG  newDish {"_deleted": undefined, "_lastChangedAt": undefined, "_version": undefined, "basketDishDishId": "4d2b8d8f-0ed2-414c-b23b-9570fe77b030", "basketID": "f22a7ab3-6a27-441e-9967-adb2646c1867", "id": "b923a6e7-ff8c-45f5-aeb2-39675afc5343", "quantity": 5}

</code>```

I tried hard but couldn't get result

Body:
when I open the Basket
console.log(basketDish.Dish) get result like {"_A": null, "_x": 0, "_y": 0, "_z": null}.

I think DataStore.Save doesn't wait until Dish get dish.

How can I solve it?

const addDishToBasket = async (dish, quantity) => {
    console.log("add dish to basket", dish, quantity);
    console.log("type of dish", typeof(dish))

    let theBasket = basket || (await createNewBasket());
    console.log("theBasket.id",theBasket.id)

    const newDish = await DataStore.save(
      new BasketDish({
        quantity: quantity,
        Dish : dish,
        basketID: theBasket.id
      })
    );
    console.log("BasketDish", BasketDish)
    console.log("newDish", newDish)
    setBasketDishes([...basketDishes, newDish]);
  };

add dish to basket {"_deleted": null, "_lastChangedAt": 1670763723808, "_version": 2, "createdAt": "2022-12-04T04:32:38.301Z", "description": "Double meat, gouda cheese, cheddar cheese, cooked ham, bacon, egg, salad and rustic potatoes.", "id": "4d2b8d8f-0ed2-414c-b23b-9570fe77b030", "image": "https://notjustdev-dummy.s3.us-east-2.amazonaws.com/uber-eats/restaurant3.jpeg", "name": "Hamburger La Super Cabo Burger", "price": 8.9, "restaurantID": "f5cdaf6c-64f7-4cbc-bdb2-19fcace7f65f", "updatedAt": "2022-12-11T13:02:03.761Z"} 5
 LOG  type of dish object
 LOG  theBasket.id f22a7ab3-6a27-441e-9967-adb2646c1867
 LOG  BasketDish [Function BasketDish]
 LOG  newDish {"_deleted": undefined, "_lastChangedAt": undefined, "_version": undefined, "basketDishDishId": "4d2b8d8f-0ed2-414c-b23b-9570fe77b030", "basketID": "f22a7ab3-6a27-441e-9967-adb2646c1867", "id": "b923a6e7-ff8c-45f5-aeb2-39675afc5343", "quantity": 5}

I tried hard but couldn't get result


问:
User management in android studio flutter
```<code>class UserManagement {
  storeNewUser(user, context) async {
    await FirebaseFirestore.instance.collection('/users').add({
      'email': user.email,
      'uid': user.id,
    }).then(() {
      Navigator.of(context).pop();
      Navigator.of(context).pushReplacementNamed(HomePage.id);
    }).catchError((e) {
      print(e);
    });
  }
}
</code>```

trying to store user data and this error [The argument type 'Null Function()' can't be assigned to the parameter type 'FutureOr Function(DocumentReference<Map<String, dynamic>>)'.] came up please help me solve it

Body:
class UserManagement {
  storeNewUser(user, context) async {
    await FirebaseFirestore.instance.collection('/users').add({
      'email': user.email,
      'uid': user.id,
    }).then(() {
      Navigator.of(context).pop();
      Navigator.of(context).pushReplacementNamed(HomePage.id);
    }).catchError((e) {
      print(e);
    });
  }
}

trying to store user data and this error [The argument type 'Null Function()' can't be assigned to the parameter type 'FutureOr Function(DocumentReference<Map<String, dynamic>>)'.] came up please help me solve it


问:
Some Widget do not appear when the app started
I encounter a bug whenever I build the app for the first time, some widgets are not loaded (it fixes when I do hot reload/restart or change state through setState), and there is no error message whatsoever (after the first build and after hot reload). Here is my code:

main.dart

```<code>    void main() async {
     bootstrap(() async {
      final _repository = ApiRepository();
      return App(
       repository: _repository,
      );
     });
    }
</code>```

bootstrap.dart

```<code>    WidgetsFlutterBinding.ensureInitialized();
    await runZonedGuarded(() async {
      await BlocOverrides.runZoned(
        () async => runApp(
          await builder(),
        ),
        blocObserver: AppBlocObserver(),
      );
    },(error, stackTrace) => log(error.toString(), stackTrace: stackTrace),
    );
</code>```

onboarding.dart -> The error page (I only include the widgets that are not shown)

```<code>          Column(
            children: [
              PageView.builder(
                    itemCount: slides.length,
                    itemBuilder: (context, index) {
                      return Slider(
                          picture: slides[index].getPicture(),
                          title: slides[index].getTitle(),
                          description: slides[index].getDescription());
                }),
                Row(
                  children: [
                    CustomOutlineButton()
                    const HorizontalSeparator(width: 5),
                    CustomElevatedButton()
                  ],
                ),
            ],
          ),
        ],
      ),
</code>```

Got this message in the first build (the messages do not appear again after hot restart/reload):

```<code>E/SurfaceSyncer( 6935): Failed to find sync for id=0
W/Parcel  ( 6935): Expecting binder but got null!
</code>```

The result:

After hot reload or change State:

Body:
I encounter a bug whenever I build the app for the first time, some widgets are not loaded (it fixes when I do hot reload/restart or change state through setState), and there is no error message whatsoever (after the first build and after hot reload). Here is my code:

main.dart

    void main() async {
     bootstrap(() async {
      final _repository = ApiRepository();
      return App(
       repository: _repository,
      );
     });
    }

bootstrap.dart

    WidgetsFlutterBinding.ensureInitialized();
    await runZonedGuarded(() async {
      await BlocOverrides.runZoned(
        () async => runApp(
          await builder(),
        ),
        blocObserver: AppBlocObserver(),
      );
    },(error, stackTrace) => log(error.toString(), stackTrace: stackTrace),
    );

onboarding.dart -> The error page (I only include the widgets that are not shown)

          Column(
            children: [
              PageView.builder(
                    itemCount: slides.length,
                    itemBuilder: (context, index) {
                      return Slider(
                          picture: slides[index].getPicture(),
                          title: slides[index].getTitle(),
                          description: slides[index].getDescription());
                }),
                Row(
                  children: [
                    CustomOutlineButton()
                    const HorizontalSeparator(width: 5),
                    CustomElevatedButton()
                  ],
                ),
            ],
          ),
        ],
      ),

Got this message in the first build (the messages do not appear again after hot restart/reload):

E/SurfaceSyncer( 6935): Failed to find sync for id=0
W/Parcel  ( 6935): Expecting binder but got null!

The result:

After hot reload or change State:


问:
Why is my histogram graph not showing any bars?
I am trying to make a histogram from the sum of 10 random variables extracted from 'rbinom(10, 10, 0.1)' simulated 5 times but the histogram would not show any bars or it would show only one..
How could I fix this?

```<code>Plot <- function(n1, size, p) {
  mean = c()
  set.seed(1234)
  v = rbinom(n1, size, p)
  repeats = 5
  for (i in 1:repeats) {
    k = mean(v)
    mean1 = c(mean, k)
    hist(mean1, main="n=5")
  }
}
</code>```

Here is my code.

Body:
I am trying to make a histogram from the sum of 10 random variables extracted from 'rbinom(10, 10, 0.1)' simulated 5 times but the histogram would not show any bars or it would show only one..
How could I fix this?

Plot <- function(n1, size, p) {
  mean = c()
  set.seed(1234)
  v = rbinom(n1, size, p)
  repeats = 5
  for (i in 1:repeats) {
    k = mean(v)
    mean1 = c(mean, k)
    hist(mean1, main="n=5")
  }
}

Here is my code.


问:
Solr Replicas Usually Recovering and Recovered Faild
I have deployed a SolrCloud in AKS with 5 Nodes, each Node with 32Gb RAM. In Solr, I create a collection with 7 shards and 3 replicas. Usually, my pod is restarted. So I can see replicas to recovering and recovered failed. I checked the log and nothing.

What can I do to fix that?

I try to set autocommit with 5 min and 10 min. However, it does not work well.

I have a Statefulset solr with 5 replicas. Each replica requests 20Gi - 2 CPU and limits 32Gi - 4 CPU. I set JAVA_MEM with xms12g; xmx16g and each replica are on a node of Kubernetes. Sometimes, I see one or two solr pods restarts. So replicas on a shard will usually go from active to recovering and finally recovered failed.


问:
adding braces under a matrix in word
hey everyone i have a small question i am converting some pdfs into word manually and therefore have to write equations by hand. so below attached is the image of a matrix having a curly bracket under it. now the issue is i have typed the matrix but i am unable to figure out how can i place a curly bracket under it. any leads would be appreciated..
formula.

hey everyone i have a small question i am converting some pdfs into word manually and therefore have to write equations by hand. so below attached is the image of a matrix having a curly bracket under it. now the issue is i have typed the matrix but i am unable to figure out how can i place a curly bracket under it. any leads would be appreciated...

formula

Title: adding braces under a matrix in word


问:
Videojs stopped streaming In MAC os safari while doing overridenative true
I want to get VHS handler so that i can use before request to play AES-128 content. this is why i passed overridenative true property to VIDEOJS player now am getting VHS handler but it stopped working stream videos on player. And getting error VIDEOJS ERROR CODE:3 MEDIA_ERR_DECODE on console.

Below code am using for DRM configuration for safari

```<code>if (this.platform.getBrowserPlatform() === Constants.PLATFORMS.SAFARI_WEB) {
            //this.playerTest.eme();
            this.playerTest.src({
                src: programURL,
                type: this.getStreamType(channel.streams) &&
                    this.getStreamType(channel.streams).streamType === Constants.DASH_STREAM_TYPE ?
                    Constants.DASH_STREAM_SRC_TYPE : Constants.HSL_STREAM_SRC_TYPE,
                keySystems: {
                    'com.apple.fps.1_0': {
                        initDataTypes: ['sinf'],
                        videoCapabilities: [{
                            contentType: 'video/mp4',
                        }],
                        getCertificate: function (emeOptions, callback) {
                            videojs.xhr({
                                url: `${cert}`,
                                method: 'GET',
                                responseType: 'arraybuffer',
                                headers: {
                                    'Access-Control-Allow-Origin': '*'
                                }
                            }, (err, response, responseBody) => {
                                if (err) {
                                    callback(err)
                                }
                                var responseData = new Uint8Array(responseBody);
                                callback(null, responseData)
                            })
                        },

                        getContentId: function (emeOptions, initData) {
                            var uint16array = new Uint16Array(initData.buffer);
                            var contentId = String.fromCharCode.apply(null, uint16array);
                            contentId = contentId.substring(contentId.indexOf('skd://') + 6);
                            const url = new URL(contentId);
                            const urlParams = new URLSearchParams(url.search);
                            return urlParams.get('contentId');
                        },

                        getLicense: (emeOptions, contentId, keyMessage, callback) => {
                            let token = localStorage.getItem('auth');
                            let testToken = JSON.parse(token);
                            //let spcMessage = encodeURI(btoa(keyMessage))
                            //JLO should replaced by base64EncodeUint8Array
                            var input = keyMessage;
                            var keyStr = Constants.FAIRPLAY_KEY_STR;
                            var output = "";
                            var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
                            var i = 0;

                            while (i < input.length) {
                                chr1 = input[i++];
                                chr2 = i < input.length ? input[i++] : Number.NaN; // Not sure if the index
                                chr3 = i < input.length ? input[i++] : Number.NaN; // checks are needed here

                                enc1 = chr1 >> 2;
                                enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
                                enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
                                enc4 = chr3 & 63;

                                if (isNaN(chr2)) {
                                    enc3 = enc4 = 64;
                                } else if (isNaN(chr3)) {
                                    enc4 = 64;
                                }
                                output += keyStr.charAt(enc1) + keyStr.charAt(enc2) +
                                    keyStr.charAt(enc3) + keyStr.charAt(enc4);
                            }
                            //JLO should replaced by base64EncodeUint8Array
                            let spcMessage = output;
                            videojs.xhr({
                                url: `${this.config.baseUrl}${Constants.DRM_FAIRPLAY_LICENSE}`,
                                method: 'POST',
                                responseType: 'text',
                                //body: `spc=${spcMessage}&${contentId}`,
                                body: `{ "spc": "${spcMessage}", "assetId":"${contentId}"}`,
                                headers: {
                                    "Content-Type": "application/json;charset=UTF-8",
                                    "Authorization": `JWT ${testToken.access_token}`
                                }
                            }, (err, response, responseBody) => {
                                if (err) {
                                    callback(err)
                                    return
                                }
                                var obj = JSON.parse(responseBody);
                                //key = base64DecodeUint8Array(obj.ckc);

                                //JLO should replaced by base64DecodeUint8Array
                                var raw = window.atob(obj.ckc);
                                var rawLength = raw.length;
                                var array = new Uint8Array(new ArrayBuffer(rawLength));

                                for (let i = 0; i < rawLength; i++)
                                    array[i] = raw.charCodeAt(i);

                                //JLO should replaced by base64DecodeUint8Array

                                callback(null, array)
                            })
                        }
                    }
                }
            })
</code>```

enter image description hereBelow code i implemented to get VHS handler

```<code>videojs('my_player', {html5: {vhs: { overrideNative: true }}});
</code>```

Getting VHS handler and smoothplaying of contenton safari browers or mac platformsenter image description here

Body:
I want to get VHS handler so that i can use before request to play AES-128 content. this is why i passed overridenative true property to VIDEOJS player now am getting VHS handler but it stopped working stream videos on player. And getting error VIDEOJS ERROR CODE:3 MEDIA_ERR_DECODE on console.

Below code am using for DRM configuration for safari

if (this.platform.getBrowserPlatform() === Constants.PLATFORMS.SAFARI_WEB) {
            //this.playerTest.eme();
            this.playerTest.src({
                src: programURL,
                type: this.getStreamType(channel.streams) &&
                    this.getStreamType(channel.streams).streamType === Constants.DASH_STREAM_TYPE ?
                    Constants.DASH_STREAM_SRC_TYPE : Constants.HSL_STREAM_SRC_TYPE,
                keySystems: {
                    'com.apple.fps.1_0': {
                        initDataTypes: ['sinf'],
                        videoCapabilities: [{
                            contentType: 'video/mp4',
                        }],
                        getCertificate: function (emeOptions, callback) {
                            videojs.xhr({
                                url: `${cert}`,
                                method: 'GET',
                                responseType: 'arraybuffer',
                                headers: {
                                    'Access-Control-Allow-Origin': '*'
                                }
                            }, (err, response, responseBody) => {
                                if (err) {
                                    callback(err)
                                }
                                var responseData = new Uint8Array(responseBody);
                                callback(null, responseData)
                            })
                        },

                        getContentId: function (emeOptions, initData) {
                            var uint16array = new Uint16Array(initData.buffer);
                            var contentId = String.fromCharCode.apply(null, uint16array);
                            contentId = contentId.substring(contentId.indexOf('skd://') + 6);
                            const url = new URL(contentId);
                            const urlParams = new URLSearchParams(url.search);
                            return urlParams.get('contentId');
                        },

                        getLicense: (emeOptions, contentId, keyMessage, callback) => {
                            let token = localStorage.getItem('auth');
                            let testToken = JSON.parse(token);
                            //let spcMessage = encodeURI(btoa(keyMessage))
                            //JLO should replaced by base64EncodeUint8Array
                            var input = keyMessage;
                            var keyStr = Constants.FAIRPLAY_KEY_STR;
                            var output = "";
                            var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
                            var i = 0;

                            while (i < input.length) {
                                chr1 = input[i++];
                                chr2 = i < input.length ? input[i++] : Number.NaN; // Not sure if the index
                                chr3 = i < input.length ? input[i++] : Number.NaN; // checks are needed here

                                enc1 = chr1 >> 2;
                                enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
                                enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
                                enc4 = chr3 & 63;

                                if (isNaN(chr2)) {
                                    enc3 = enc4 = 64;
                                } else if (isNaN(chr3)) {
                                    enc4 = 64;
                                }
                                output += keyStr.charAt(enc1) + keyStr.charAt(enc2) +
                                    keyStr.charAt(enc3) + keyStr.charAt(enc4);
                            }
                            //JLO should replaced by base64EncodeUint8Array
                            let spcMessage = output;
                            videojs.xhr({
                                url: `${this.config.baseUrl}${Constants.DRM_FAIRPLAY_LICENSE}`,
                                method: 'POST',
                                responseType: 'text',
                                //body: `spc=${spcMessage}&${contentId}`,
                                body: `{ "spc": "${spcMessage}", "assetId":"${contentId}"}`,
                                headers: {
                                    "Content-Type": "application/json;charset=UTF-8",
                                    "Authorization": `JWT ${testToken.access_token}`
                                }
                            }, (err, response, responseBody) => {
                                if (err) {
                                    callback(err)
                                    return
                                }
                                var obj = JSON.parse(responseBody);
                                //key = base64DecodeUint8Array(obj.ckc);

                                //JLO should replaced by base64DecodeUint8Array
                                var raw = window.atob(obj.ckc);
                                var rawLength = raw.length;
                                var array = new Uint8Array(new ArrayBuffer(rawLength));

                                for (let i = 0; i < rawLength; i++)
                                    array[i] = raw.charCodeAt(i);

                                //JLO should replaced by base64DecodeUint8Array

                                callback(null, array)
                            })
                        }
                    }
                }
            })

enter image description hereBelow code i implemented to get VHS handler

videojs('my_player', {html5: {vhs: { overrideNative: true }}});

Getting VHS handler and smoothplaying of contenton safari browers or mac platformsenter image description here


问:
How to calculate average waiting time of nodes in OMNet++?
I'm using instant veins 5.2, sumo 1.11.0 and OMNet++ 5.7 to simulate V2I communication between vehicles and RSUs. Is there any way to get results as to the average waiting time of vehicles - nodes during a planned accident? The problem is that for each simulation the results of the waiting time are the same.

What I am trying to achieve is to verify if the traffic movement on the roadmap improves after applying different ranges in each simulation.

Thank you in advance.


问:
How can a JavaFX application correctly handle opening of associated files on Windows in Java 1.8
This is a more specific version of the question I already asked on stackoverflow (How can I access a correct version of a Java Desktop class).
I will reiterate here the problem, and clarify the question:
I have a JavaFX application that can be used to edit files of a particular type on Windows OS. By using launch4j-maven-plugin I can make an exe file, and by using Inno Setup I can make an installer of this application that has a particular file type associated to it (kb files). If I install the application and double click on the file that this application is associated to while the application is not open already, the application opens and I can read the said file (I read main function args and use the filename to read the file). The problem I have is if the user tries to double click the file that this application is associated to, while the application is running. That does not work.

The question is: is there a way in Java 1.8 to respond to the event of double clicking the associated files for a JavaFX application ?

As already mentioned in the previous question, I tried using the Desktop class, but as I found out in the answer to that question, Desktop class has the methods to deal with this problem only starting from Java version 9.
However, we cannot update Java to version 9 or higher, since that would require huge re-engineering effort on our side.


问:
when i tried to store mongodb document _id in cookie then i show an error
this is error
POST http://localhost:3000/login 422 (Unprocessable Entity)

this is backend code

```<code>if (user) {
            const isMatch = await bcrypt.compare(password, user.password)
            const token = await user.generateTokens();
            const _id = user._id.ObjectId.toString();
            console.log(_id);
            res.cookie('jwtoken', token, { expires: new Date(Date.now() + 25892000000), httpOnly: true });
            res.cookie('id', _id, { expires: new Date(Date.now() + 25892000000), httpOnly: true });

            if (isMatch) {
                res.status(200).json({ message: "user loged in" })
            } else {
                res.status(400).json({ error: "invalid details" })
            }
        } else {
            res.json({ error: "user not found" })
        }
</code>```

this is frontend code

```<code>const handleClick = async (e) => {
    e.preventDefault();
    const { email, password } = user;
    const res = await fetch("/login", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      body: JSON.stringify({ email, password })
    })
    const data = await res.json()
    const message = data.message || data.error;
    toast(message, { position: 'top-center' })
    if(data.message){
      history('/home')
    }
  }
</code>```

i want to store mongodb document id in cookie

Body:
this is error
POST http://localhost:3000/login 422 (Unprocessable Entity)

this is backend code

if (user) {
            const isMatch = await bcrypt.compare(password, user.password)
            const token = await user.generateTokens();
            const _id = user._id.ObjectId.toString();
            console.log(_id);
            res.cookie('jwtoken', token, { expires: new Date(Date.now() + 25892000000), httpOnly: true });
            res.cookie('id', _id, { expires: new Date(Date.now() + 25892000000), httpOnly: true });

            if (isMatch) {
                res.status(200).json({ message: "user loged in" })
            } else {
                res.status(400).json({ error: "invalid details" })
            }
        } else {
            res.json({ error: "user not found" })
        }

this is frontend code

const handleClick = async (e) => {
    e.preventDefault();
    const { email, password } = user;
    const res = await fetch("/login", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      body: JSON.stringify({ email, password })
    })
    const data = await res.json()
    const message = data.message || data.error;
    toast(message, { position: 'top-center' })
    if(data.message){
      history('/home')
    }
  }

i want to store mongodb document id in cookie


问:
How to acces to the next image on the batch when we do some preprocess on the image?
I used
data =  tf.keras.utils.image_dataset_from_directory()
and I did some changes to the image like this

```<code>def preprocess(x,y)
        for x in batch[0]:
            x_a=np.array(x)
            x_a= x_a/255
            x_a=np.array(x).reshape(-1, 256, 256, 3)
            x_b = cv2.cvtColor(x, cv2.COLOR_RGB2GRAY)
            x_b=np.array(x_b)
            x_b_t=np.array(x_b).reshape(-1, 256, 256, 1)
        return(x_a, x_b), y
data = data.map(preprocess_ab)
</code>```

the problem is that the function I created preprocess or does the process for one image in batch so how can I do to access to the next image in my function and do the changes for all the images in batch(32)

Body:
I used
data =  tf.keras.utils.image_dataset_from_directory()
and I did some changes to the image like this

def preprocess(x,y)
        for x in batch[0]:
            x_a=np.array(x)
            x_a= x_a/255
            x_a=np.array(x).reshape(-1, 256, 256, 3)
            x_b = cv2.cvtColor(x, cv2.COLOR_RGB2GRAY)
            x_b=np.array(x_b)
            x_b_t=np.array(x_b).reshape(-1, 256, 256, 1)
        return(x_a, x_b), y
data = data.map(preprocess_ab)

the problem is that the function I created preprocess or does the process for one image in batch so how can I do to access to the next image in my function and do the changes for all the images in batch(32)


问:
Can't open NullpoMino7_5_0, Could not initialize class org.lwjgl.opengl.Display
So quick context, for a linux project at school we have to be able to play tetris on multiple fedora VM's together on a server. But when we try to launch the game after installing we get the following error:

```<code>10:28:14,795 [main] INFO  NullpoMinoSlick: NullpoMinoSlick Start

OpenJDK 64-Bit Server VM warning: You have loaded library /home/nvn/games/tetris/NullpoMino7_5_0/lib/liblwjgl.so which might have disabled stack guard. The VM will try to fix the stack guard now.

It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.

10:28:14,985 [main] WARN  NullpoMinoSlick: Cannot get driver informations

java.lang.UnsatisfiedLinkError: /home/nvn/games/tetris/NullpoMino7_5_0/lib/liblwjgl.so: /home/nvn/games/tetris/NullpoMino7_5_0/lib/liblwjgl.so: verkeerde ELF-klasse: ELFCLASS32 (Possible cause: architecture word width mismatch)

    at java.lang.ClassLoader$NativeLibrary.load(Native Method)

    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)

    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1850)

    at java.lang.Runtime.loadLibrary0(Runtime.java:843)

    at java.lang.System.loadLibrary(System.java:1136)

    at org.lwjgl.Sys$1.run(Sys.java:73)

    at java.security.AccessController.doPrivileged(Native Method)

    at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)

    at org.lwjgl.Sys.loadLibrary(Sys.java:82)

    at org.lwjgl.Sys.<clinit>(Sys.java:99)

    at org.lwjgl.opengl.Display.<clinit>(Display.java:130)

    at mu.nu.nullpo.gui.slick.NullpoMinoSlick.main(NullpoMinoSlick.java:233)

10:28:15,121 [main] FATAL NullpoMinoSlick: Game initialize failed (NON-SlickException)

java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.opengl.Display

    at org.newdawn.slick.AppGameContainer$1.run(AppGameContainer.java:39)

    at java.security.AccessController.doPrivileged(Native Method)

    at org.newdawn.slick.AppGameContainer.<clinit>(AppGameContainer.java:36)

    at mu.nu.nullpo.gui.slick.NullpoMinoSlick.main(NullpoMinoSlick.java:348)
</code>```

The following order of commands was used to download the game and launch:

We downloaded the tar.gz file from: https://github.com/nullpomino/nullpomino

cd ~

mkdir -p games/tetris

cd games/tetris

sudo tar -zxf ../../Downloads/NullpoMino7.5.0.tar.gz

sudo yum install java-1.8.0-openjdk

sudo alternatives --config java #here we selected: java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.352.b08-2.fc37.x86_64/jre/bin/java)

cd ~

cd games/tetris/Nullpomino7_5_0

./play_slick

Could anyone help us with this problem?

We haven't tried anything major yet, our knowledge of linux is too basic to understand the error message.

tried: "LD_LIBRARY_PATH=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-2.fc35.x86_64/jre/lib/amd64/ ./play_slick" in the directory of the game, same error.

Body:
So quick context, for a linux project at school we have to be able to play tetris on multiple fedora VM's together on a server. But when we try to launch the game after installing we get the following error:

10:28:14,795 [main] INFO  NullpoMinoSlick: NullpoMinoSlick Start

OpenJDK 64-Bit Server VM warning: You have loaded library /home/nvn/games/tetris/NullpoMino7_5_0/lib/liblwjgl.so which might have disabled stack guard. The VM will try to fix the stack guard now.

It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.

10:28:14,985 [main] WARN  NullpoMinoSlick: Cannot get driver informations

java.lang.UnsatisfiedLinkError: /home/nvn/games/tetris/NullpoMino7_5_0/lib/liblwjgl.so: /home/nvn/games/tetris/NullpoMino7_5_0/lib/liblwjgl.so: verkeerde ELF-klasse: ELFCLASS32 (Possible cause: architecture word width mismatch)

    at java.lang.ClassLoader$NativeLibrary.load(Native Method)

    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)

    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1850)

    at java.lang.Runtime.loadLibrary0(Runtime.java:843)

    at java.lang.System.loadLibrary(System.java:1136)

    at org.lwjgl.Sys$1.run(Sys.java:73)

    at java.security.AccessController.doPrivileged(Native Method)

    at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)

    at org.lwjgl.Sys.loadLibrary(Sys.java:82)

    at org.lwjgl.Sys.<clinit>(Sys.java:99)

    at org.lwjgl.opengl.Display.<clinit>(Display.java:130)

    at mu.nu.nullpo.gui.slick.NullpoMinoSlick.main(NullpoMinoSlick.java:233)

10:28:15,121 [main] FATAL NullpoMinoSlick: Game initialize failed (NON-SlickException)

java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.opengl.Display

    at org.newdawn.slick.AppGameContainer$1.run(AppGameContainer.java:39)

    at java.security.AccessController.doPrivileged(Native Method)

    at org.newdawn.slick.AppGameContainer.<clinit>(AppGameContainer.java:36)

    at mu.nu.nullpo.gui.slick.NullpoMinoSlick.main(NullpoMinoSlick.java:348)

The following order of commands was used to download the game and launch:

We downloaded the tar.gz file from: https://github.com/nullpomino/nullpomino

cd ~

mkdir -p games/tetris

cd games/tetris

sudo tar -zxf ../../Downloads/NullpoMino7.5.0.tar.gz

sudo yum install java-1.8.0-openjdk

sudo alternatives --config java #here we selected: java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.352.b08-2.fc37.x86_64/jre/bin/java)

cd ~

cd games/tetris/Nullpomino7_5_0

./play_slick

Could anyone help us with this problem?

We haven't tried anything major yet, our knowledge of linux is too basic to understand the error message.

tried: "LD_LIBRARY_PATH=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-2.fc35.x86_64/jre/lib/amd64/ ./play_slick" in the directory of the game, same error.


问:
Flutter: How to draw a Bezier curve use gesture?
I want to make a page that can draw a Bezier curve dynamically using gestures (select the endpoint then drag and drop) like this Video. My app run on Android and Ubuntu.


问:
How to install Radius MFA on FIPS enabled Amazon Linux server
I am trying to install Radius MFA on my FIPS compliant Linux server but I am getting errors related to MD5

"md5_dgst.c(82): OpenSSL internal error, assertion failed: Digest MD5 forbidden in FIPS mode!"

I understand that MD5 is not FIPS compliant. Can someone assist me with the steps to install Radius MFA with certain cipher like SHA1, SHA2, etc?

Thank you.


问:
Enum variable that returns a different enum
this might be a silly question.

I have a protocol like so

```<code>protocol Zot {
    var prop1: String
    var prop2: Bool
}
</code>```

Then I have two enums

```<code>enum Bar: Zot {
    case first
    case second

    var prop1: String {
        switch self {
        case first:
            return "first string"
        case second:
            return "second string"
        default:
            return ""
        }
    }

    var prop2: Bool {
        switch self {
        case first:
            return true
        case second:
            return false
        default:
            return false
        }
    }
}

enum Baz: Zot {
    case third
    case fourth

    var prop1: String {
        switch self {
        case third:
            return "third string"
        case fourth:
            return "fourth string"
        default:
            return ""
        }
    }

    var prop2: Bool {
        switch self {
        case third:
            return false
        case fourth:
            return true
        default:
            return false
        }
    }
}
</code>```

And now to the question. I want to now create a third enum

```<code>enum Foo {
    case bar
    case baz

    var zot: Zot {
        switch self {
        case bar:
            return Bar.self
        case baz:
            return Baz.self
        }
    }
}
</code>```

This of course doesn't work because Bar and Baz are different types. I'd like to be able to access them like so

```<code>let bar = Foo.bar
bar.zot.first
bar.zot.second

let baz = Foo.baz
baz.zot.third
baz.zot.fourth
</code>```

I don't know if that makes much sense, but that's what I'm hoping to do. Is there a way to accomplish this or something similar? I recognize this would make zot of type Bar in the first example and of type Baz in the second example. That's not a happy thing to do in swift.

I had the thought to use an associated type and set the type alias inside the switch statement but the compilers not happy about that.

As pointed out by Sweeper, this is an XY problem. I think thats a correct observations. Here is better context.

Effectively, I have something like

```<code>class Foo<RequiredEnumType> {
    typealias OtherEnumType = RequiredEnumType

    init(requiredEnumValue) {
        //do thing with requiredEnumValue
    }
}
</code>```

But the RequiredEnumValue is always a perfect match for the <RequiredEnumType>. I could just nest the enums, but I was hoping to keep things separated nicely.

Body:
this might be a silly question.

I have a protocol like so

protocol Zot {
    var prop1: String
    var prop2: Bool
}

Then I have two enums

enum Bar: Zot {
    case first
    case second

    var prop1: String {
        switch self {
        case first:
            return "first string"
        case second:
            return "second string"
        default:
            return ""
        }
    }

    var prop2: Bool {
        switch self {
        case first:
            return true
        case second:
            return false
        default:
            return false
        }
    }
}

enum Baz: Zot {
    case third
    case fourth

    var prop1: String {
        switch self {
        case third:
            return "third string"
        case fourth:
            return "fourth string"
        default:
            return ""
        }
    }

    var prop2: Bool {
        switch self {
        case third:
            return false
        case fourth:
            return true
        default:
            return false
        }
    }
}

And now to the question. I want to now create a third enum

enum Foo {
    case bar
    case baz

    var zot: Zot {
        switch self {
        case bar:
            return Bar.self
        case baz:
            return Baz.self
        }
    }
}

This of course doesn't work because Bar and Baz are different types. I'd like to be able to access them like so

let bar = Foo.bar
bar.zot.first
bar.zot.second

let baz = Foo.baz
baz.zot.third
baz.zot.fourth

I don't know if that makes much sense, but that's what I'm hoping to do. Is there a way to accomplish this or something similar? I recognize this would make zot of type Bar in the first example and of type Baz in the second example. That's not a happy thing to do in swift.

I had the thought to use an associated type and set the type alias inside the switch statement but the compilers not happy about that.

As pointed out by Sweeper, this is an XY problem. I think thats a correct observations. Here is better context.

Effectively, I have something like

class Foo<RequiredEnumType> {
    typealias OtherEnumType = RequiredEnumType

    init(requiredEnumValue) {
        //do thing with requiredEnumValue
    }
}

But the RequiredEnumValue is always a perfect match for the <RequiredEnumType>. I could just nest the enums, but I was hoping to keep things separated nicely.


问:
Search record is not working in SuitesSript 1.0
I'm getting an error when executing:

```<code> var prospectSearch = nlapiSearchRecord("prospect", null, [["email", "is", 'developer@test.com']]);
</code>```

Here are the execution logs showing the error:

Body:
I'm getting an error when executing:

 var prospectSearch = nlapiSearchRecord("prospect", null, [["email", "is", 'developer@test.com']]);

Here are the execution logs showing the error:


问:
vps server Modern browser wont start linux
I have a linux vps running at Strato with a desktop (xfce4)

But when I try to run a modern browser chrome / firefox It wont start.

```<code>firefox:[GFX1-]: glxtest: cannot access /sys/bus/pci
[GFX1-]: Compositor thread not started (true)
</code>```

As root:

```<code>invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Verbinding is geweigerd
Error: cannot open display: :10.0
</code>```

or get segmentation errors.

I have 4 GB ram, with 2GB used, so no ram issues.
Any idea?

Body:
I have a linux vps running at Strato with a desktop (xfce4)

But when I try to run a modern browser chrome / firefox It wont start.

firefox:[GFX1-]: glxtest: cannot access /sys/bus/pci
[GFX1-]: Compositor thread not started (true)

As root:

invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Verbinding is geweigerd
Error: cannot open display: :10.0

or get segmentation errors.

I have 4 GB ram, with 2GB used, so no ram issues.
Any idea?


问:
Tinybutstrong opentbs ote=changepic adjust parameter cannot be used in block section, it causes template crash
The parameter adjust for [x.x;ope=changepic;tagpos=inside;adjust] paramater is not working in a block section.

I want to loop through a set of results and add an image for each result given. This is working without the adjust parameter, but this looks very ugly since the images are, as expected, not adjusted with height and width.

How can I make this work in a template so I have an adjusted image for each result in a block section?

Adding and removing the adjust parameter. Adjust outside the block parameter is working, but then I only have 1 result and cannot loop through my set of results.

Version: OpenTBS 1.10.7


问:
Bulding process of a Docker container for Gauge Framework wont stop running
I write my bachelor thesis about E2E-Testing of a specific software for my university. I work with the Gauge-framework which includes Taiko. My tests are fine and working on my local machine.

But now I have to build a docker Container because my tests have to work autonomously regardless of which OS is in use (my mentor uses IoS and there are some problems if he just runs my code from GitLab).

And know the problem:
I read a bit about docker and watched some tutorials how to use it. Therefore, I understand  what is happening in the following code to some extent. The docker file is generated when I initialize a gauge project. There is antoher dockerfile example on the gauge hompage but that doesn´t work too (it is from 2018 and maybe outdated but not changed on the doc site).

`

```<code># Building the image
#   docker build -t gauge-taiko .
# Running the image
#   docker run  --rm -it -v ${PWD}/reports:/gauge/reports gauge-taiko

# This image uses the official node base image.
FROM node

# The Taiko installation downloads and installs the chromium required to run the tests.
# However, we need the chromium dependencies installed in the environment. These days, most
# Dockerfiles just install chrome to get the dependencies.
RUN apt-get update \
     && apt-get install -y wget gnupg ca-certificates \
     && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
     && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
     && apt-get update \
     && apt-get install -y google-chrome-stable

# Set a custom npm install location so that Gauge, Taiko and dependencies can be
# installed without root privileges
ENV NPM_CONFIG_PREFIX=/home/gauge/.npm-packages
ENV PATH=$PATH:/home/gauge/.npm-packages/bin

# ENV PATH=$PATH:/home/node/.npm-global/bin

# Add the Taiko browser arguments
ENV TAIKO_BROWSER_ARGS=--no-sandbox,--start-maximized,--disable-dev-shm-usage
ENV headless_chrome=true
ENV TAIKO_SKIP_DOCUMENTATION=true

# Uncomment the lines below to use chrome bundled with this image
#ENV TAIKO_SKIP_CHROMIUM_DOWNLOAD=true
#ENV TAIKO_BROWSER_PATH=/usr/bin/google-chrome

# Set working directory
WORKDIR /gauge

# Copy the local working folder
COPY . .

# Create an unprivileged user to run Taiko tests
RUN groupadd -r gauge && useradd -r -g gauge -G audio,video gauge && \
   mkdir -p /home/gauge/.npm-packages/lib && \
   chown -R gauge:gauge /home/gauge /gauge

USER gauge

# Install dependencies and plugins
RUN npm install -g @getgauge/cli && \
    gauge install js && \
    gauge install html-report &&  \
    gauge install screenshot && \
    gauge config check_updates false

# Default command on running the image
ENTRYPOINT ["npm", "test"]
</code>```

`
and then the bulding process wont stop (see below):

=> [internal] load build definition from Dockerfile                                                                                0.2s
 => => transferring dockerfile: 2.03kB                                                                                0.0s
 => [internal] load .dockerignore                                                                                0.2s
 => => transferring context: 34B                                                                                0.0s
 => [internal] load metadata for docker.io/library/node:latest                                                                                0.6s
 => [internal] load build context                                                                                0.1s
 => => transferring context: 1.44kB                                                                                0.0s
 => [1/6] FROM docker.io/library/node@sha256:d5222e1ebd7dd7e9683f47a8861a4711cb4407a4830cbe04a582ca4986245700                                                                                0.0s
 => CACHED [2/6] RUN apt-get update      && apt-get install -y wget gnupg ca-certificates      && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -      && sh -c 'echo "deb [arch=amd6  0.0s
 => CACHED [3/6] WORKDIR /gauge                                                                                0.0s
 => CACHED [4/6] COPY . .                                                                                0.0s
 => CACHED [5/6] RUN groupadd -r gauge && useradd -r -g gauge -G audio,video gauge &&    mkdir -p /home/gauge/.npm-packages/lib &&    chown -R gauge:gauge /home/gauge /gauge                                             0.0s
 => CANCELED [6/6] RUN npm install -g @getgauge/cli &&     gauge install js &&     gauge install html-report &&      gauge install screenshot &&     gauge config check_updates false                                    31.3s```

It let it run for about 10 minutes but nothing happened and I cnaceled it by myself.

After some tests and research, I think the problem is this line

npm install -g @getgauge/cli &&

I changed the order of how the commands are executed (e.g. if I execute gauge install js first with a particlar RUN command it executes. Then it stops at the command line above again).

Then I ran antoher test and tried to install a specific version of Gauge with the npm install -g @getgauge/cli@Version command (in my test it was 1.1.1 because I have seen that in a GitHub example) and with that it worked. However, the current version is 1.4.4 and I use that version on my local machine and, therefore, want to use it within the Docker Container (plus there were some pretty usefull bugfixes in between these versions ...). Do you have any ideas how I can fix that problem or give me a hint about how to fix it or where to look up some information?

Tahnk you guys and have happy holidays!

Body:
I write my bachelor thesis about E2E-Testing of a specific software for my university. I work with the Gauge-framework which includes Taiko. My tests are fine and working on my local machine.

But now I have to build a docker Container because my tests have to work autonomously regardless of which OS is in use (my mentor uses IoS and there are some problems if he just runs my code from GitLab).

And know the problem:
I read a bit about docker and watched some tutorials how to use it. Therefore, I understand  what is happening in the following code to some extent. The docker file is generated when I initialize a gauge project. There is antoher dockerfile example on the gauge hompage but that doesn´t work too (it is from 2018 and maybe outdated but not changed on the doc site).

`

# Building the image
#   docker build -t gauge-taiko .
# Running the image
#   docker run  --rm -it -v ${PWD}/reports:/gauge/reports gauge-taiko

# This image uses the official node base image.
FROM node

# The Taiko installation downloads and installs the chromium required to run the tests.
# However, we need the chromium dependencies installed in the environment. These days, most
# Dockerfiles just install chrome to get the dependencies.
RUN apt-get update \
     && apt-get install -y wget gnupg ca-certificates \
     && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
     && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
     && apt-get update \
     && apt-get install -y google-chrome-stable

# Set a custom npm install location so that Gauge, Taiko and dependencies can be
# installed without root privileges
ENV NPM_CONFIG_PREFIX=/home/gauge/.npm-packages
ENV PATH=$PATH:/home/gauge/.npm-packages/bin

# ENV PATH=$PATH:/home/node/.npm-global/bin

# Add the Taiko browser arguments
ENV TAIKO_BROWSER_ARGS=--no-sandbox,--start-maximized,--disable-dev-shm-usage
ENV headless_chrome=true
ENV TAIKO_SKIP_DOCUMENTATION=true

# Uncomment the lines below to use chrome bundled with this image
#ENV TAIKO_SKIP_CHROMIUM_DOWNLOAD=true
#ENV TAIKO_BROWSER_PATH=/usr/bin/google-chrome

# Set working directory
WORKDIR /gauge

# Copy the local working folder
COPY . .

# Create an unprivileged user to run Taiko tests
RUN groupadd -r gauge && useradd -r -g gauge -G audio,video gauge && \
   mkdir -p /home/gauge/.npm-packages/lib && \
   chown -R gauge:gauge /home/gauge /gauge

USER gauge

# Install dependencies and plugins
RUN npm install -g @getgauge/cli && \
    gauge install js && \
    gauge install html-report &&  \
    gauge install screenshot && \
    gauge config check_updates false

# Default command on running the image
ENTRYPOINT ["npm", "test"]

`
and then the bulding process wont stop (see below):

=> [internal] load build definition from Dockerfile                                                                                0.2s
 => => transferring dockerfile: 2.03kB                                                                                0.0s
 => [internal] load .dockerignore                                                                                0.2s
 => => transferring context: 34B                                                                                0.0s
 => [internal] load metadata for docker.io/library/node:latest                                                                                0.6s
 => [internal] load build context                                                                                0.1s
 => => transferring context: 1.44kB                                                                                0.0s
 => [1/6] FROM docker.io/library/node@sha256:d5222e1ebd7dd7e9683f47a8861a4711cb4407a4830cbe04a582ca4986245700                                                                                0.0s
 => CACHED [2/6] RUN apt-get update      && apt-get install -y wget gnupg ca-certificates      && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -      && sh -c 'echo "deb [arch=amd6  0.0s
 => CACHED [3/6] WORKDIR /gauge                                                                                0.0s
 => CACHED [4/6] COPY . .                                                                                0.0s
 => CACHED [5/6] RUN groupadd -r gauge && useradd -r -g gauge -G audio,video gauge &&    mkdir -p /home/gauge/.npm-packages/lib &&    chown -R gauge:gauge /home/gauge /gauge                                             0.0s
 => CANCELED [6/6] RUN npm install -g @getgauge/cli &&     gauge install js &&     gauge install html-report &&      gauge install screenshot &&     gauge config check_updates false                                    31.3s

It let it run for about 10 minutes but nothing happened and I cnaceled it by myself.

After some tests and research, I think the problem is this line

npm install -g @getgauge/cli &&

I changed the order of how the commands are executed (e.g. if I execute gauge install js first with a particlar RUN command it executes. Then it stops at the command line above again).

Then I ran antoher test and tried to install a specific version of Gauge with the npm install -g @getgauge/cli@Version command (in my test it was 1.1.1 because I have seen that in a GitHub example) and with that it worked. However, the current version is 1.4.4 and I use that version on my local machine and, therefore, want to use it within the Docker Container (plus there were some pretty usefull bugfixes in between these versions ...). Do you have any ideas how I can fix that problem or give me a hint about how to fix it or where to look up some information?

Tahnk you guys and have happy holidays!


问:
How can I get JupyterLite to work again as it has stopped working entirely?
I have been using the browser version on JupyterLite for a few weeks. As of a few days ago, anything I type into a row does nothing when I select Run. Even entering a basic print() doesn't do anything. Can anyone help me? thanks.

I have tried opening up a new tab, entering many different things, and nothing seems to work?


问:
SSRS Matrix table and freezing rows
just wandering if this is possible.   I am working on SSRS and have a Matrix table as show in the image.  I would like to freeze everything above EBAlpha when scrolling, you can see from the image that there is one header row and then three rows within a group, and then the main data within another group.

I cant see how to do this, or if it's even possible?

Thank you in advance

The header row is showing on all pages and when scrolling, but the 3 rows below it are not (they are in a group)

Cheers

Title: SSRS Matrix table and freezing rows


问:
Tkinter label grid_propagate doesn't work
I'm trying to ad a label to a tkinter app, showing the procedure status, while doing something.

I don't want my window to stretch to follow the label size, so I used grid_propagate to apply this flag to the label and it's master, but this seems like is not working and the grid is moving, following the label size.

Here an example, following the same structure of my original program:

```<code>from tkinter import *
from tkinter import ttk
import threading
import time

def buttonManage():

    label1.grid(columnspan=2, sticky=W)

    threading.Thread(target=labelManage, name='LabelThread').start()

def labelManage():

    while not label1.winfo_ismapped():
        # Wait for graphic interface manager to draw, before removing resizing propagation from container frame
        time.sleep(0.1)

    label1.master.grid_propagate(False)
    label1.grid_propagate(False)

    for n in range(1, 100):
        label1.configure(text=label1.cget('text') + 'a')
        time.sleep(0.1)

    label1.master.grid_propagate(True)
    label1.grid_propagate(True)

window = Tk()
window.resizable(False, False)

tabControl = ttk.Notebook(window)

mainFrame = ttk.Frame(tabControl, padding='10 10 10 10')
optionFrame = ttk.Frame(tabControl, padding='10 10 10 10')

tabControl.add(mainFrame, text ='Backup')
tabControl.add(optionFrame, text ='Options')
tabControl.grid()

button = ttk.Button(mainFrame, text='Backup', command=buttonManage)
button.grid(columnspan=2, ipadx=70, ipady=20)

label1 = ttk.Label(mainFrame, text='')

window.mainloop()
</code>```

Body:
I'm trying to ad a label to a tkinter app, showing the procedure status, while doing something.

I don't want my window to stretch to follow the label size, so I used grid_propagate to apply this flag to the label and it's master, but this seems like is not working and the grid is moving, following the label size.

Here an example, following the same structure of my original program:

from tkinter import *
from tkinter import ttk
import threading
import time

def buttonManage():

    label1.grid(columnspan=2, sticky=W)

    threading.Thread(target=labelManage, name='LabelThread').start()

def labelManage():

    while not label1.winfo_ismapped():
        # Wait for graphic interface manager to draw, before removing resizing propagation from container frame
        time.sleep(0.1)

    label1.master.grid_propagate(False)
    label1.grid_propagate(False)

    for n in range(1, 100):
        label1.configure(text=label1.cget('text') + 'a')
        time.sleep(0.1)

    label1.master.grid_propagate(True)
    label1.grid_propagate(True)

window = Tk()
window.resizable(False, False)

tabControl = ttk.Notebook(window)

mainFrame = ttk.Frame(tabControl, padding='10 10 10 10')
optionFrame = ttk.Frame(tabControl, padding='10 10 10 10')

tabControl.add(mainFrame, text ='Backup')
tabControl.add(optionFrame, text ='Options')
tabControl.grid()

button = ttk.Button(mainFrame, text='Backup', command=buttonManage)
button.grid(columnspan=2, ipadx=70, ipady=20)

label1 = ttk.Label(mainFrame, text='')

window.mainloop()


问:
printf's missing binary format specifiers: `%b` and `%B`
I'm using an Ubuntu 22.04 for some software development, and working with binary data. I recently found this announcement for glibc ver 2.35; it states that ver 2.35 incorporates the binary conversion format specifiers %b and %B:

printf-family functions now support the %b format for output of
integers in binary, as specified in draft ISO C2X, and the %B variant
of that format recommended by draft ISO C2X.

I have checked my glibc version as follows, but I'm not sure this is the authoritative way to get this information:

$ ldd --version
ldd (Ubuntu GLIBC 2.35-0ubuntu3.1) 2.35
```
<h4>It <em>appears</em> I can use the binary format specifiers <code>%b</code> and <code>%B</code>, but...</h4>
<p>I've installed the Raspberry Pi C SDK about a month ago on this Ubuntu for a micro-controller project. I've used the binary format specifiers <code>%b</code> and <code>%B</code> in <code>printf</code> as follows:</p>
```    printf("\n  binary values stored in rcvdata[0]: %#b \n", rcvdata[0]);
    printf("  binary values stored in rcvdata[1]: %#b \n", rcvdata[1]);
```
<p>The code compiles on the Pico without error or warning, and the output to my serial terminal (<code>minicom</code> 2.8) is as follows:</p>
```  binary values stored in rcvdata[0]: 0b11111111
  binary values stored in rcvdata[1]: 0b11011000
```
<p>So yeah - I can use the binary format specifiers in my RPi Pico C SDK development environment.</p>
<p>But then I tried to use similar <code>printf</code> statements for a small program I compiled with <code>gcc</code> to run on Ubuntu. It runs, but gives me 2 warnings for each usage:</p>
<h4>The code:</h4>
```#include <stdio.h>

int main() {

    char data_char = 0x41;
    unsigned char u_data_char = 8;
    int int_val = -39;

    printf("\nSome experiments:");
    printf("\nvalue of data_char: %#b", data_char);
    printf("\nvalue of u_data_char: %#b", u_data_char);
    printf("\nvalue of int_val: %#10b", int_val);
    printf("\n\n");

    return 0;
}
```
<h4>Compilation output (partial):</h4>
```$ gcc -o printf_binary_3, printf_binary_3.c
printf_binary_3.c: In function ‘main’:
printf_binary_3.c:10:37: warning: unknown conversion type character ‘b’ in format [-Wformat=]
   10 |     printf("\nvalue of data_char: %#b", data_char);
      |                                     ^
printf_binary_3.c:10:12: warning: too many arguments for format [-Wformat-extra-args]
   10 |     printf("\nvalue of data_char: %#b", data_char);
```
<h4>The execution result:</h4>
<pre class="lang-bash prettyprint-override"><code>$ ./printf_binary_3

Some experiments:
value of data_char: 0b1000001
value of u_data_char: 0b1000
value of int_val: 0b11111111111111111111111111011001
</code>```

I don't know what to make of this:

Why does gcc yield warnings & state unknown conversion type character ‘b’ ??

I'd guess the warning [-Wformat-extra-args] is the result of failure to recognize %b as a legitimate format specifier??

Finally - can anyone explain why I get what appears to be valid results when the compiler says the format specifier I used doesn't exist, and how to fix this?

And this may be useful information: I learned during this Q&A that the documentation for the binary specifiers is not complete as of this writing.

Body:
I'm using an Ubuntu 22.04 for some software development, and working with binary data. I recently found this announcement for glibc ver 2.35; it states that ver 2.35 incorporates the binary conversion format specifiers %b and %B:

printf-family functions now support the %b format for output of
integers in binary, as specified in draft ISO C2X, and the %B variant
of that format recommended by draft ISO C2X.

I have checked my glibc version as follows, but I'm not sure this is the authoritative way to get this information:

$ ldd --version
ldd (Ubuntu GLIBC 2.35-0ubuntu3.1) 2.35

It appears I can use the binary format specifiers %b and %B, but...

I've installed the Raspberry Pi C SDK about a month ago on this Ubuntu for a micro-controller project. I've used the binary format specifiers %b and %B in printf as follows:

    printf("\n  binary values stored in rcvdata[0]: %#b \n", rcvdata[0]);
    printf("  binary values stored in rcvdata[1]: %#b \n", rcvdata[1]);

The code compiles on the Pico without error or warning, and the output to my serial terminal (minicom 2.8) is as follows:

  binary values stored in rcvdata[0]: 0b11111111
  binary values stored in rcvdata[1]: 0b11011000

So yeah - I can use the binary format specifiers in my RPi Pico C SDK development environment.

But then I tried to use similar printf statements for a small program I compiled with gcc to run on Ubuntu. It runs, but gives me 2 warnings for each usage:

The code:

#include <stdio.h>

int main() {

    char data_char = 0x41;
    unsigned char u_data_char = 8;
    int int_val = -39;

    printf("\nSome experiments:");
    printf("\nvalue of data_char: %#b", data_char);
    printf("\nvalue of u_data_char: %#b", u_data_char);
    printf("\nvalue of int_val: %#10b", int_val);
    printf("\n\n");

    return 0;
}

Compilation output (partial):

$ gcc -o printf_binary_3, printf_binary_3.c
printf_binary_3.c: In function ‘main’:
printf_binary_3.c:10:37: warning: unknown conversion type character ‘b’ in format [-Wformat=]
   10 |     printf("\nvalue of data_char: %#b", data_char);
      |                                     ^
printf_binary_3.c:10:12: warning: too many arguments for format [-Wformat-extra-args]
   10 |     printf("\nvalue of data_char: %#b", data_char);

The execution result:

$ ./printf_binary_3

Some experiments:
value of data_char: 0b1000001
value of u_data_char: 0b1000
value of int_val: 0b11111111111111111111111111011001

I don't know what to make of this:

Why does gcc yield warnings & state unknown conversion type character ‘b’ ??

I'd guess the warning [-Wformat-extra-args] is the result of failure to recognize %b as a legitimate format specifier??

Finally - can anyone explain why I get what appears to be valid results when the compiler says the format specifier I used doesn't exist, and how to fix this?

And this may be useful information: I learned during this Q&A that the documentation for the binary specifiers is not complete as of this writing.


问:
Is there any language model that is able to generate text given both beginning and ending sequences?
Generative language models like GPT-2 can generate text given beginning sequences, and cloze Transformer can fill in the one-word blank between two sequence. Is there any generative language model that can generate multi-word text that connects given beginning and ending sequences as an extension to both models like GPT-2 and cloze transformer?

Input:

```<code>Beginning sequence: What is Love?
Ending sequence: Love is an emotional state, not a physical one.
</code>```

Output:

```<code>[What is Love?] Love is a state of mind, a feeling,
an emotion, or a mental state. It is the feeling
of being in love with someone or something. The
word "love" is derived from the Latin word for
"to love," "lēgēre," which means to feel, to be
attracted to, and to love. [Love is an emotional
state, not a physical one.]
</code>```

Body:
Generative language models like GPT-2 can generate text given beginning sequences, and cloze Transformer can fill in the one-word blank between two sequence. Is there any generative language model that can generate multi-word text that connects given beginning and ending sequences as an extension to both models like GPT-2 and cloze transformer?

Input:

Beginning sequence: What is Love?
Ending sequence: Love is an emotional state, not a physical one.

Output:

[What is Love?] Love is a state of mind, a feeling,
an emotion, or a mental state. It is the feeling
of being in love with someone or something. The
word "love" is derived from the Latin word for
"to love," "lēgēre," which means to feel, to be
attracted to, and to love. [Love is an emotional
state, not a physical one.]


问:
Why does adding a style or reference inside a parsed-literal break the theme of the block?
When using parsed-literal, why does adding a style or reference break the theme?
For example with the sphinx_rtd_theme a parsed literal block has a green background. But If I add any style inside the parsed-literal block the background becomes white. How do I keep the theme, even when I have styles or references inside it?

This works fine and give green background

```<code>.. parsed-literal::

   test
</code>```

This background becomes white

```<code>.. parsed-literal::

   test
   **test**
</code>```

I have tried to google for alternatives to parse-literal, but can find any options.

Body:
When using parsed-literal, why does adding a style or reference break the theme?
For example with the sphinx_rtd_theme a parsed literal block has a green background. But If I add any style inside the parsed-literal block the background becomes white. How do I keep the theme, even when I have styles or references inside it?

This works fine and give green background

.. parsed-literal::

   test

This background becomes white

.. parsed-literal::

   test
   **test**

I have tried to google for alternatives to parse-literal, but can find any options.


问:
Do not know why using "this" for checking
I create an array called Zombies which includes all the Game Object in the scene. And I also create the foreach loop to check if the Zombies have attached ZombieState.cs. I'm following the book but it's not explaining clearly why we need zState==this.

```<code>using UnityEngine;

public class ZombieState : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        GameObject[] Zombies = (GameObject[])GameObject.FindObjectsOfType(typeof(GameObject));
        foreach (GameObject go in Zombies)
        {
            ZombieState zState = go.GetComponent<ZombieState>();
            if (zState == null || zState == this)
            {
                continue;
            }
        }

    }
}

</code>```

Body:
I create an array called Zombies which includes all the Game Object in the scene. And I also create the foreach loop to check if the Zombies have attached ZombieState.cs. I'm following the book but it's not explaining clearly why we need zState==this.

using UnityEngine;

public class ZombieState : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        GameObject[] Zombies = (GameObject[])GameObject.FindObjectsOfType(typeof(GameObject));
        foreach (GameObject go in Zombies)
        {
            ZombieState zState = go.GetComponent<ZombieState>();
            if (zState == null || zState == this)
            {
                continue;
            }
        }

    }
}


问:
Puppeteer: log in to access the site
I am verifying my GTM installations are correct with my URLs and GTM ids. However, some sites need authentication on Chrome to ask the server to send HTML and other JS files. Is there any way to find the popup and type the account and the password? Thanks.

Here is the error message if I tried to login on my browser and then run the script:

```<code>Error: net::ERR_INVALID_AUTH_CREDENTIALS at <URL>
</code>```

Title: Puppeteer: log in to access the site

Body:
I am verifying my GTM installations are correct with my URLs and GTM ids. However, some sites need authentication on Chrome to ask the server to send HTML and other JS files. Is there any way to find the popup and type the account and the password? Thanks.

Here is the error message if I tried to login on my browser and then run the script:

Error: net::ERR_INVALID_AUTH_CREDENTIALS at <URL>


问:
A problem with fetching data from the database in dynamically generated drop-down lists
I have a table that contains a row with the ability to generate other dynamic rows. The drop-down list works now in every new row that is created. I have the first row. The drop-down list that carries data from the database works well and the data is shown in it well, but when adding a new dynamic row and when Clicking on the drop down list the values written on it all show with the word Undefined all the values of the drop down list written on it show up with the word : Undefined I am really stuck any suggestions would be appreciated and thanks

php code:
`

```<code><td class="td"><select class="form-control select_acount" name="account[]"required>
                            <option value="">--الحساب--</option>
                            <?php
                            $query = "select * from sah7atmain_acouts WHERE company like '".$multi."'";
                            $result = mysqli_query($con,$query);
                            $data = array();
                            if($result)
                            {
                              while($row = mysqli_fetch_assoc($result)){
                              $data[] = $row;
                            ?>
                            <?php echo '<option value="'.$row['acount_mounte'].'">'.$row['acount_name'].'</option>'?>;
                            <?php
                            }
                            } else{
                            }
                            ?>
                            </select>
                          </td>
</code>```

jquery code:

```<code>var data = '<?php echo $data; ?>';
      var product_dd = "";
          product_dd += '<select class="form-control select_acount" name="account[]"required>';
          product_dd += '<option value="">--الحساب--</option>';
      if(data.length > 0){
        for(let i = 0; i < data.length; i ++) {
          product_dd += `<option value="${data[i]['acount_mounte']}">${data[i]['acount_name']}</option>`;
        }
      }
         product_dd += "</select>";

      var i = 0;
      $("#add-btn").click(function() {
        ++i;

        $("#dynamicAddRemove").append('<tr><td class="td">'+product_dd+'</td> <td class="td"><input type="number" name="debtor[' + i + ']" id="fname"class="form-control debtor arabicNumbers" onkeydown="return event.keyCode !== 69" required></td> <td class="td"><input type="number" name="creditor[' + i + ']" id="james" class="form-control creditor arabicNumbers" onkeydown="return event.keyCode !== 69" required></td> <td class="td"><input type="text"  name="description[' + i + ']" class="form-control"  required></td> <td> <input type="text" name="mount[' + i + ']" class="form-control mount"   required> </td><button type="button" name="add" class="btn btn-danger remove-tr"><i class="fas fa-trash-alt"></i></button></td></tr>');
      });
      $(document).on('click', '.remove-tr', function() {
        $(this).parents('tr').remove();
      });
</code>```

`

Body:
I have a table that contains a row with the ability to generate other dynamic rows. The drop-down list works now in every new row that is created. I have the first row. The drop-down list that carries data from the database works well and the data is shown in it well, but when adding a new dynamic row and when Clicking on the drop down list the values written on it all show with the word Undefined all the values of the drop down list written on it show up with the word : Undefined I am really stuck any suggestions would be appreciated and thanks

php code:
`

<select class="form-control select_acount" name="account[]"required>
                            <option value="">--الحساب--</option>
                            <?php
                            $query = "select * from sah7atmain_acouts WHERE company like '".$multi."'";
                            $result = mysqli_query($con,$query);
                            $data = array();
                            if($result)
                            {
                              while($row = mysqli_fetch_assoc($result)){
                              $data[] = $row;
                            ?>
                            <?php echo '<option value="'.$row['acount_mounte'].'">'.$row['acount_name'].'</option>'?>;
                            <?php
                            }
                            } else{
                            }
                            ?>
                            </select>

jquery code:

var data = '<?php echo $data; ?>';
      var product_dd = "";
          product_dd += '<select class="form-control select_acount" name="account[]"required>';
          product_dd += '<option value="">--الحساب--</option>';
      if(data.length > 0){
        for(let i = 0; i < data.length; i ++) {
          product_dd += `<option value="${data[i]['acount_mounte']}">${data[i]['acount_name']}</option>`;
        }
      }
         product_dd += "</select>";

      var i = 0;
      $("#add-btn").click(function() {
        ++i;

        $("#dynamicAddRemove").append('
'+product_dd+'	 <input type="number" name="debtor[' + i + ']" id="fname"class="form-control debtor arabicNumbers" onkeydown="return event.keyCode !== 69" required>	 <input type="number" name="creditor[' + i + ']" id="james" class="form-control creditor arabicNumbers" onkeydown="return event.keyCode !== 69" required>	 <input type="text"  name="description[' + i + ']" class="form-control"  required>	  <input type="text" name="mount[' + i + ']" class="form-control mount"   required> 	<button type="button" name="add" class="btn btn-danger remove-tr"></button>
');
      });
      $(document).on('click', '.remove-tr', function() {
        $(this).parents('tr').remove();
      });

`


问:
How to conduct a 3D CAD comparison to obtain the magnitude deviations with a pre-alignment?
I am currently working on predicting distortion of metal additive manufactured wedge structures. we have made a feasible numerical framework to fabricate components using Abaqus CAE software. In order to validate the framework we are looking into the distortion of as-built fabricated parts. An experimental specimen is as shown in the figure below.

Using the Atos core optical camera a 3D stl file of the wedge specimen was obtained and compared using the inbuilt inspection tool. I am getting the deviation results using this software not as a magnitude but the maximum deviation is comparable with the distortion due to residual stresses during the part build.

I would like to know if we can find the magnitude distortion of a given surface mesh obtained from an optical camera to make a better comparison with my FEM framework results. Is there any software package, python libraries, to get this task done. Thanks in advance!


问:
Could not build wheels for Prophet, which is required to install pyproject.toml-based projects
I am new to python programming and trying my hand on time-series analysis.
I am using Windows-10 with Python 3.11.0 installed (No option to use anaconda due to policy restriction).
Wanted to install Prophet for my analysis however I am getting he attached error.

Please help me understand the error and how to resolve this? [Error Screenshot [System Versions] (https://i.stack.imgur.com/H6j4D.jpg)] (https://i.stack.imgur.com/0KXqX.jpg)

I am using
Windows-10,
Python-3.11.0 (MSC v1933 64 bit (AMD64) on win32
MingW64 as complier
GCC 11.2.0
G++ 11.2.0

For Info, I cannot use Anaconda(Python).

Do let me know what's the issue here and how to resolve this.


问:
TestFlight "The requested app is not available or doesn't exist." Error shows on downloading new build
I have been working on an app from last 8 months and we are testing it through TestFlight recently all of our previous builds turned into expired automatically (which is strange) even though the 90 days testing period for most of the builds was not passed.

And earlier this week we pushed another build to TestFlight which processed successfully but after a few hours of deployment it automatically turned into expired and after that, no tester was able to download it.

To fix it we pushed a couple of new builds to TestFlight by just bumping up the build versions, although now these two build didn't turn into expired but now all the testers are not able to download these from TestFlight and it prompts a message that "this requested app is not available or doesn't exist"

We are not sure if it's an error from our side or from apple.


问:
Clear the selected value in dropdown_button2 flutter
I am using dropdown_button2 for dropdown feature.How to clear the value in this dropdown when close the screen.?

```<code>DropdownButtonHideUnderline(
                                child: DropdownButton2<CategoryList>(
                                  hint: Text(
                                    'Select Item',
                                    style: GoogleFonts.inter(
                                      fontSize: 13,

                                    ),
                                  ),
                                  items:  collectionController. libContentGetResponse2.value.data!.rows!
                                      .map((item) =>
                                      DropdownMenuItem<CategoryList>(
                                        value: item,
                                        child: Text(
                                          item.categoryName.toString(),
                                          style: const TextStyle(
                                            fontSize: 14,
                                          ),
                                        ),
                                      ))
                                      .toList(),
                                  value: getSelected(),
                                  onChanged: (CategoryList? value) {

                                    collectionController.selectItem.value  = value!;

                                  },

                                  dropdownMaxHeight: 200,
                                  buttonWidth: MediaQuery.of(conText).size.width / 2.7,
                                  buttonPadding: const EdgeInsets.only(left: 14, right: 14),
                                  buttonDecoration: BoxDecoration(
                                    borderRadius:  BorderRadius.all(Radius.circular(5.0)),
                                    border: Border.all(color: Color(0xffD9D9D9),width: 1),

                                  ),
                                ),
                              )

      CategoryList? getSelected() {
        if (collectionController.selectItem.value == null) return null;
        try {
          var selectedIndex = collectionController. libContentGetResponse2.value.data!.rows!
              .indexWhere((element) => element.categoryName == collectionController.selectItem.value .categoryName);
          if (selectedIndex != -1)
            return collectionController. libContentGetResponse2.value.data!.rows![selectedIndex];
          else
            return null;
        } catch (e) {
          return null;
        }
      }
</code>```

Now my CategoryList has two values ["A", "B"]. I selected A and navigated to another screen then again opened the screen which has this dropdown button. Instead of showing the hint, the previously selected item is displayed there.

Body:
I am using dropdown_button2 for dropdown feature.How to clear the value in this dropdown when close the screen.?

DropdownButtonHideUnderline(
                                child: DropdownButton2<CategoryList>(
                                  hint: Text(
                                    'Select Item',
                                    style: GoogleFonts.inter(
                                      fontSize: 13,

                                    ),
                                  ),
                                  items:  collectionController. libContentGetResponse2.value.data!.rows!
                                      .map((item) =>
                                      DropdownMenuItem<CategoryList>(
                                        value: item,
                                        child: Text(
                                          item.categoryName.toString(),
                                          style: const TextStyle(
                                            fontSize: 14,
                                          ),
                                        ),
                                      ))
                                      .toList(),
                                  value: getSelected(),
                                  onChanged: (CategoryList? value) {

                                    collectionController.selectItem.value  = value!;

                                  },

                                  dropdownMaxHeight: 200,
                                  buttonWidth: MediaQuery.of(conText).size.width / 2.7,
                                  buttonPadding: const EdgeInsets.only(left: 14, right: 14),
                                  buttonDecoration: BoxDecoration(
                                    borderRadius:  BorderRadius.all(Radius.circular(5.0)),
                                    border: Border.all(color: Color(0xffD9D9D9),width: 1),

                                  ),
                                ),
                              )

      CategoryList? getSelected() {
        if (collectionController.selectItem.value == null) return null;
        try {
          var selectedIndex = collectionController. libContentGetResponse2.value.data!.rows!
              .indexWhere((element) => element.categoryName == collectionController.selectItem.value .categoryName);
          if (selectedIndex != -1)
            return collectionController. libContentGetResponse2.value.data!.rows![selectedIndex];
          else
            return null;
        } catch (e) {
          return null;
        }
      }

Now my CategoryList has two values ["A", "B"]. I selected A and navigated to another screen then again opened the screen which has this dropdown button. Instead of showing the hint, the previously selected item is displayed there.