问:
Join 3 table mysql with codeigniter 4 with the same one intended Premier Key (in 'id_kafe')
I have a problem when i want to join 2 table to id_kafe on tbl_kafe.

Here for the contents of the table

table_kafe

table_kafe_image

table_business_hours

i have done a join table_kafe with table_kafe_image with code like the following:

```<code>return $this->db->table('tbl_kafe')
                ->select('tbl_kafe.id_kafe as id_kafe, nama_kafe, alamat_kafe, coordinate, instagram_kafe, created_at, updated_at, stat_appv, GROUP_CONCAT(tbl_foto_kafe.nama_file_foto SEPARATOR ",") as nama_foto')
                ->join('tbl_foto_kafe', 'tbl_foto_kafe.id_kafe = tbl_kafe.id_kafe', 'left')
                ->groupBy('tbl_kafe.id_kafe')
                ->getWhere(['stat_appv' => '1']);
</code>```

Result

```<code>Array
(
    [0] => stdClass Object
        (
            [id_kafe] => 112
            [nama_kafe] => Verte Cafe
            [alamat_kafe] => JL. Jambi No. 47, Darmo, Surabaya
            [coordinate] => -7.290871578917681, 112.73218139711598
            [instagram_kafe] => vertecafe.id
            [created_at] => 2022-12-26 00:42:57
            [updated_at] => 2022-12-26 13:42:57
            [stat_appv] => 1
            [nama_foto] => 1672036977_fd38565eb6c216b4c81f.png, 1672036977_1ce1ce8733ad92fc4ff7.jpeg, 1672036977_a5d9e3417d276475d67f.png
        )

    [1] => stdClass Object
        (
            [id_kafe] => 113
            [nama_kafe] => Asmaraloka Coffee
            [alamat_kafe] => Jl. Petemon 4A No. 28
            [coordinate] => -7.263516671669007, 112.71427820904135
            [instagram_kafe] => asmaralokacoffee
            [created_at] => 2022-12-26 02:28:47
            [updated_at] => 2022-12-26 15:28:47
            [stat_appv] => 1
            [nama_foto] => 1672043327_3deaa642e08c88be7836.jpg, 1672043327_2d007d316badaac00d74.png
        )

)
</code>```

But, how to join table_business_hours to table_kafe as well

Previously I have tried with the following code:

```<code>return $this->db->table('tbl_kafe')
                ->select('tbl_kafe.id_kafe as id_kafe, nama_kafe, alamat_kafe, coordinate, fasilitas_kafe, instagram_kafe, created_at, updated_at, stat_appv, GROUP_CONCAT(tbl_foto_kafe.nama_file_foto SEPARATOR ",") as nama_foto, GROUP_CONCAT(tbl_jam_operasional.hari SEPARATOR ",") as hari, GROUP_CONCAT(tbl_jam_operasional.open_time SEPARATOR ",") as open_time, GROUP_CONCAT(tbl_jam_operasional.close_time SEPARATOR ",") as close_time')
                ->join('tbl_provinsi', 'tbl_provinsi.id_provinsi = tbl_kafe.id_provinsi')
                ->join('tbl_kabupaten', 'tbl_kabupaten.id_kabupaten = tbl_kafe.id_kabupaten')
                ->join('tbl_kecamatan', 'tbl_kecamatan.id_kecamatan = tbl_kafe.id_kecamatan')
                ->join('tbl_kelurahan', 'tbl_kelurahan.id_kelurahan = tbl_kafe.id_kelurahan')
                ->join('tbl_foto_kafe', 'tbl_foto_kafe.id_kafe = tbl_kafe.id_kafe', 'left')
                ->groupBy('tbl_kafe.id_kafe')
                ->join('tbl_jam_operasional', 'tbl_jam_operasional.kafe_id = tbl_kafe.id_kafe')
                ->getWhere(['stat_appv' => '1']);
</code>```

But the result did not match expectations and repeated

```<code>Array
(
    [0] => stdClass Object
        (
            [id_kafe] => 112
            [nama_kafe] => Verte Cafe
            [alamat_kafe] => JL. Jambi No. 47, Darmo, Surabaya
            [coordinate] => -7.290871578917681, 112.73218139711598
            [fasilitas_kafe] => Writing, Coding
            [instagram_kafe] => vertecafe.id
            [created_at] => 2022-12-26 00:42:57
            [updated_at] => 2022-12-26 13:42:57
            [stat_appv] => 1
            [nama_foto] => 1672036977_fd38565eb6c216b4c81f.png, 1672036977_1ce1ce8733ad92fc4ff7.jpeg, 1672036977_a5d9e3417d276475d67f.png, 1672036977_fd38565eb6c216b4c81f.png, 1672036977_1ce1ce8733ad92fc4ff7.jpeg, 1672036977_a5d9e3417d276475d67f.png, 1672036977_fd38565eb6c216b4c81f.png, 1672036977_1ce1ce8733ad92fc4ff7.jpeg, 1672036977_a5d9e3417d276475d67f.png, 1672036977_fd38565eb6c216b4c81f.png, 1672036977_1ce1ce8733ad92fc4ff7.jpeg, 1672036977_a5d9e3417d276475d67f.png, 1672036977_fd38565eb6c216b4c81f.png, 1672036977_1ce1ce8733ad92fc4ff7.jpeg, 1672036977_a5d9e3417d276475d67f.png, 1672036977_fd38565eb6c216b4c81f.png, 1672036977_1ce1ce8733ad92fc4ff7.jpeg, 1672036977_a5d9e3417d276475d67f.png, 1672036977_fd38565eb6c216b4c81f.png, 1672036977_1ce1ce8733ad92fc4ff7.jpeg, 1672036977_a5d9e3417d276475d67f.png
            [hari] => Senin, Senin, Senin, Selasa, Selasa, Selasa, Rabu, Rabu, Rabu, Kamis, Kamis, Kamis, Jumat, Jumat, Jumat, Sabtu, Sabtu, Sabtu, Minggu, Minggu, Minggu
            [open_time] => 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00
            [close_time] => 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 23:28:00, 23:28:00, 23:28:00
        )

    [1] => stdClass Object
        (
            [id_kafe] => 113
            [nama_kafe] => Asmaraloka Coffee
            [alamat_kafe] => Jl. Petemon 4A No. 28
            [coordinate] => -7.263516671669007, 112.71427820904135
            [fasilitas_kafe] => Reading, Writing
            [instagram_kafe] => asmaralokacoffee
            [created_at] => 2022-12-26 02:28:47
            [updated_at] => 2022-12-26 15:28:47
            [stat_appv] => 1
            [nama_foto] => 1672043327_3deaa642e08c88be7836.jpg, 1672043327_2d007d316badaac00d74.png, 1672043327_3deaa642e08c88be7836.jpg, 1672043327_2d007d316badaac00d74.png, 1672043327_3deaa642e08c88be7836.jpg, 1672043327_2d007d316badaac00d74.png, 1672043327_3deaa642e08c88be7836.jpg, 1672043327_2d007d316badaac00d74.png, 1672043327_3deaa642e08c88be7836.jpg, 1672043327_2d007d316badaac00d74.png, 1672043327_3deaa642e08c88be7836.jpg, 1672043327_2d007d316badaac00d74.png, 1672043327_3deaa642e08c88be7836.jpg, 1672043327_2d007d316badaac00d74.png
            [hari] => Senin, Senin, Selasa, Selasa, Rabu, Rabu, Kamis, Kamis, Jumat, Jumat, Sabtu, Sabtu, Minggu, Minggu
            [open_time] => 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00
            [close_time] => 08:59:00, 08:59:00, 08:59:00, 08:59:00, 08:59:00, 08:59:00, 08:59:00, 08:59:00, 08:59:00, 08:59:00
        )

)
</code>```

Body:
I have a problem when i want to join 2 table to id_kafe on tbl_kafe.

Here for the contents of the table

table_kafe

table_kafe_image

table_business_hours

i have done a join table_kafe with table_kafe_image with code like the following:

return $this->db->table('tbl_kafe')
                ->select('tbl_kafe.id_kafe as id_kafe, nama_kafe, alamat_kafe, coordinate, instagram_kafe, created_at, updated_at, stat_appv, GROUP_CONCAT(tbl_foto_kafe.nama_file_foto SEPARATOR ",") as nama_foto')
                ->join('tbl_foto_kafe', 'tbl_foto_kafe.id_kafe = tbl_kafe.id_kafe', 'left')
                ->groupBy('tbl_kafe.id_kafe')
                ->getWhere(['stat_appv' => '1']);

Result

Array
(
    [0] => stdClass Object
        (
            [id_kafe] => 112
            [nama_kafe] => Verte Cafe
            [alamat_kafe] => JL. Jambi No. 47, Darmo, Surabaya
            [coordinate] => -7.290871578917681, 112.73218139711598
            [instagram_kafe] => vertecafe.id
            [created_at] => 2022-12-26 00:42:57
            [updated_at] => 2022-12-26 13:42:57
            [stat_appv] => 1
            [nama_foto] => 1672036977_fd38565eb6c216b4c81f.png, 1672036977_1ce1ce8733ad92fc4ff7.jpeg, 1672036977_a5d9e3417d276475d67f.png
        )

    [1] => stdClass Object
        (
            [id_kafe] => 113
            [nama_kafe] => Asmaraloka Coffee
            [alamat_kafe] => Jl. Petemon 4A No. 28
            [coordinate] => -7.263516671669007, 112.71427820904135
            [instagram_kafe] => asmaralokacoffee
            [created_at] => 2022-12-26 02:28:47
            [updated_at] => 2022-12-26 15:28:47
            [stat_appv] => 1
            [nama_foto] => 1672043327_3deaa642e08c88be7836.jpg, 1672043327_2d007d316badaac00d74.png
        )

)

But, how to join table_business_hours to table_kafe as well

Previously I have tried with the following code:

return $this->db->table('tbl_kafe')
                ->select('tbl_kafe.id_kafe as id_kafe, nama_kafe, alamat_kafe, coordinate, fasilitas_kafe, instagram_kafe, created_at, updated_at, stat_appv, GROUP_CONCAT(tbl_foto_kafe.nama_file_foto SEPARATOR ",") as nama_foto, GROUP_CONCAT(tbl_jam_operasional.hari SEPARATOR ",") as hari, GROUP_CONCAT(tbl_jam_operasional.open_time SEPARATOR ",") as open_time, GROUP_CONCAT(tbl_jam_operasional.close_time SEPARATOR ",") as close_time')
                ->join('tbl_provinsi', 'tbl_provinsi.id_provinsi = tbl_kafe.id_provinsi')
                ->join('tbl_kabupaten', 'tbl_kabupaten.id_kabupaten = tbl_kafe.id_kabupaten')
                ->join('tbl_kecamatan', 'tbl_kecamatan.id_kecamatan = tbl_kafe.id_kecamatan')
                ->join('tbl_kelurahan', 'tbl_kelurahan.id_kelurahan = tbl_kafe.id_kelurahan')
                ->join('tbl_foto_kafe', 'tbl_foto_kafe.id_kafe = tbl_kafe.id_kafe', 'left')
                ->groupBy('tbl_kafe.id_kafe')
                ->join('tbl_jam_operasional', 'tbl_jam_operasional.kafe_id = tbl_kafe.id_kafe')
                ->getWhere(['stat_appv' => '1']);

But the result did not match expectations and repeated

Array
(
    [0] => stdClass Object
        (
            [id_kafe] => 112
            [nama_kafe] => Verte Cafe
            [alamat_kafe] => JL. Jambi No. 47, Darmo, Surabaya
            [coordinate] => -7.290871578917681, 112.73218139711598
            [fasilitas_kafe] => Writing, Coding
            [instagram_kafe] => vertecafe.id
            [created_at] => 2022-12-26 00:42:57
            [updated_at] => 2022-12-26 13:42:57
            [stat_appv] => 1
            [nama_foto] => 1672036977_fd38565eb6c216b4c81f.png, 1672036977_1ce1ce8733ad92fc4ff7.jpeg, 1672036977_a5d9e3417d276475d67f.png, 1672036977_fd38565eb6c216b4c81f.png, 1672036977_1ce1ce8733ad92fc4ff7.jpeg, 1672036977_a5d9e3417d276475d67f.png, 1672036977_fd38565eb6c216b4c81f.png, 1672036977_1ce1ce8733ad92fc4ff7.jpeg, 1672036977_a5d9e3417d276475d67f.png, 1672036977_fd38565eb6c216b4c81f.png, 1672036977_1ce1ce8733ad92fc4ff7.jpeg, 1672036977_a5d9e3417d276475d67f.png, 1672036977_fd38565eb6c216b4c81f.png, 1672036977_1ce1ce8733ad92fc4ff7.jpeg, 1672036977_a5d9e3417d276475d67f.png, 1672036977_fd38565eb6c216b4c81f.png, 1672036977_1ce1ce8733ad92fc4ff7.jpeg, 1672036977_a5d9e3417d276475d67f.png, 1672036977_fd38565eb6c216b4c81f.png, 1672036977_1ce1ce8733ad92fc4ff7.jpeg, 1672036977_a5d9e3417d276475d67f.png
            [hari] => Senin, Senin, Senin, Selasa, Selasa, Selasa, Rabu, Rabu, Rabu, Kamis, Kamis, Kamis, Jumat, Jumat, Jumat, Sabtu, Sabtu, Sabtu, Minggu, Minggu, Minggu
            [open_time] => 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00
            [close_time] => 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 04:53:00, 23:28:00, 23:28:00, 23:28:00
        )

    [1] => stdClass Object
        (
            [id_kafe] => 113
            [nama_kafe] => Asmaraloka Coffee
            [alamat_kafe] => Jl. Petemon 4A No. 28
            [coordinate] => -7.263516671669007, 112.71427820904135
            [fasilitas_kafe] => Reading, Writing
            [instagram_kafe] => asmaralokacoffee
            [created_at] => 2022-12-26 02:28:47
            [updated_at] => 2022-12-26 15:28:47
            [stat_appv] => 1
            [nama_foto] => 1672043327_3deaa642e08c88be7836.jpg, 1672043327_2d007d316badaac00d74.png, 1672043327_3deaa642e08c88be7836.jpg, 1672043327_2d007d316badaac00d74.png, 1672043327_3deaa642e08c88be7836.jpg, 1672043327_2d007d316badaac00d74.png, 1672043327_3deaa642e08c88be7836.jpg, 1672043327_2d007d316badaac00d74.png, 1672043327_3deaa642e08c88be7836.jpg, 1672043327_2d007d316badaac00d74.png, 1672043327_3deaa642e08c88be7836.jpg, 1672043327_2d007d316badaac00d74.png, 1672043327_3deaa642e08c88be7836.jpg, 1672043327_2d007d316badaac00d74.png
            [hari] => Senin, Senin, Selasa, Selasa, Rabu, Rabu, Kamis, Kamis, Jumat, Jumat, Sabtu, Sabtu, Minggu, Minggu
            [open_time] => 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00, 05:59:00
            [close_time] => 08:59:00, 08:59:00, 08:59:00, 08:59:00, 08:59:00, 08:59:00, 08:59:00, 08:59:00, 08:59:00, 08:59:00
        )

)


来源: stackexchange

问:
AWS Amplify redirect change from post to get?
I'm trying to connect to my backend api, usually anything that is /intApi/<*> gets sends over to different api.domain.com. but for some reason the request changes from post to get.
+
I'm using nginx to do

```<code>    listen 80;
    listen [::]:80;
    server_name api.domain.com www.api.domain.com;

    location / {
        return 301 https://$host$request_uri;
    }
server {
   listen 443 ssl;
   listen [::]:443 http2 ssl;
   server_name api.domain.com www.api.domain.com;

   ssl_certificate     /etc/nginx/ssl/live/api.domain.com/fullchain.pem;
   ssl_certificate_key /etc/nginx/ssl/live/api.domain.com/privkey.pem;
   ssl_ciphers  HIGH:!aNULL:!MD5;
   ssl_prefer_server_ciphers  on;

   location / {
           proxy_pass http://backendDocker:3500/;
   }

   location ~ /.well-known/acme-challenge/ {
       root /usr/share/nginx/web/api;
   }
}
</code>```

To push it further and nginx output is either OPTIONS or GET instead of POST.
What am I doing wrong here? I tried 301/302 redirects. Same issue :/

ContentLicense: CC BY-SA 4.0

Body:
I'm trying to connect to my backend api, usually anything that is /intApi/<*> gets sends over to different api.domain.com. but for some reason the request changes from post to get.
+
I'm using nginx to do

    listen 80;
    listen [::]:80;
    server_name api.domain.com www.api.domain.com;

    location / {
        return 301 https://$host$request_uri;
    }
server {
   listen 443 ssl;
   listen [::]:443 http2 ssl;
   server_name api.domain.com www.api.domain.com;

   ssl_certificate     /etc/nginx/ssl/live/api.domain.com/fullchain.pem;
   ssl_certificate_key /etc/nginx/ssl/live/api.domain.com/privkey.pem;
   ssl_ciphers  HIGH:!aNULL:!MD5;
   ssl_prefer_server_ciphers  on;

   location / {
           proxy_pass http://backendDocker:3500/;
   }

   location ~ /.well-known/acme-challenge/ {
       root /usr/share/nginx/web/api;
   }
}

To push it further and nginx output is either OPTIONS or GET instead of POST.
What am I doing wrong here? I tried 301/302 redirects. Same issue :/


问:
How to change system default compiler in xcode 4?
I am editing projects on different machines, where only some have the GCC 4.2 (Plausible Blocks) installed, so I need to switch the compiler each time. (I need Plblocks on those machines to work with Blocks for older devices)

In the Build Settings I can choose an entry called "System Default", which is actually pointing to LLVM GCC 4.2, so my idea was to change this value. Is it possible? If yes, how?

Any help is welcome.

ContentLicense: CC BY-SA 3.0


问:
How do I concat two Flux.interval?
I want to concat two Flux. Let's say that I'm making a subscription query to some reactive database. I put the initial result in Flux and concat the update result using concatWith. I need to use the data that got from database to make a poll request over and over again. This is what I've tried.

```<code>    val startSource = "id-1"
    val updateSource = "id"
    // start subscription
    Flux.just(startSource)
        .concatWith (
          // subscription updates
          Flux.interval(Duration.ofSeconds(10))
              .flatMap { update -> Mono.just("$updateSource-$update") }
        )
        .flatMap { id ->
          // use data from subscription to poll status from server
          Flux.interval(Duration.ofSeconds(1))
              .flatMap { isPaymentReady(id) }
        }
        .doOnNext { println("Result $it") }
        .subscribe()

    Thread.sleep(20000)
</code>```

As you can see, I'm using flatMap and everything works fine until there's a signal emitting from subscription updates. It started flatMap on a new thread so now I have two poll request on difference thread. I don't want to do that I just want to restart poll request using an updated data how can I do that ?

update:
I solve it by using switchMap instead of flatMap. for some reason it works I don't even know lol.

Title: How do I concat two Flux.interval?

Body:
I want to concat two Flux. Let's say that I'm making a subscription query to some reactive database. I put the initial result in Flux and concat the update result using concatWith. I need to use the data that got from database to make a poll request over and over again. This is what I've tried.

    val startSource = "id-1"
    val updateSource = "id"
    // start subscription
    Flux.just(startSource)
        .concatWith (
          // subscription updates
          Flux.interval(Duration.ofSeconds(10))
              .flatMap { update -> Mono.just("$updateSource-$update") }
        )
        .flatMap { id ->
          // use data from subscription to poll status from server
          Flux.interval(Duration.ofSeconds(1))
              .flatMap { isPaymentReady(id) }
        }
        .doOnNext { println("Result $it") }
        .subscribe()

    Thread.sleep(20000)

As you can see, I'm using flatMap and everything works fine until there's a signal emitting from subscription updates. It started flatMap on a new thread so now I have two poll request on difference thread. I don't want to do that I just want to restart poll request using an updated data how can I do that ?

update:
I solve it by using switchMap instead of flatMap. for some reason it works I don't even know lol.


问:
Easiest way to install set of standard Python Modules in LINUX
I am setting up a server, and trying to run python code. Painfully installing python3.X; and just realized I have to install all standard/required python modules one-by-one.
Is there a way to easily install the latest set of standard python modules? I don't mean using a requirements.txt file.
Standard modules are : numpy, pandas, scipy, scilearn, requests etc... But I know there must be alot of useful python modules.
So, I tried googling and cannot seem to find a public way to easily install a whole list</p>


问:
Modeling data in Firestore
I'm trying to model a database of an app that allows me to take the reading of water meters and then generate an invoice, but I'm a little confused about the subcollections, what I have so far is a collection that I call contract and within the document of that collection I have a collection. My question is are the other collections should go within the document of the user collection?

In the attached image I made a model where I have the contract collection and within the contract collection document I have a client collection within the client collection document I have the consumption collections, property type meter, could you guide me if this model is correct? If I am wrong I appreciate any suggestion.

Title: Modeling data in Firestore


问:
Update empty values in column from the same column
I've got a table that contains a column called name, some of the values in name table are empty and I'd like to populate them randomly from name within the same table/column

```<code>update table
set name= (SELECT name
FROM table where name!= '' order by rand() limit 1)
where name!= '';
</code>```

I tried this but didn't work! I'm not sure why

Query execution failed

```<code>
Reason:
SQL Error [1093] [HY000]: You can't specify target table 'table' for update in FROM clause
</code>```

Body:
I've got a table that contains a column called name, some of the values in name table are empty and I'd like to populate them randomly from name within the same table/column

update table
set name= (SELECT name
FROM table where name!= '' order by rand() limit 1)
where name!= '';

I tried this but didn't work! I'm not sure why

Query execution failed

Reason:
SQL Error [1093] [HY000]: You can't specify target table 'table' for update in FROM clause


问:
Strange observations with digit recognition in python with pytesseract
The following image

contains a sequence of digits that are successfully recognized by pytesseract. Specifically the output of the following line

```<code>pytesseract.image_to_string(myimage)
</code>```

yields the following sequence

```<code>'10\n\n86420\n\n'
</code>```

But the image shown below

contains the same sequence of digits written by the same program with the exact same parameters, but in a horizontal rather than a vertical alignment. Here the output of pytesseract is just an empty sequence.

Help would be appreciated.

Body:
The following image

contains a sequence of digits that are successfully recognized by pytesseract. Specifically the output of the following line

pytesseract.image_to_string(myimage)

yields the following sequence

'10\n\n86420\n\n'

But the image shown below

contains the same sequence of digits written by the same program with the exact same parameters, but in a horizontal rather than a vertical alignment. Here the output of pytesseract is just an empty sequence.

Help would be appreciated.


问:
Error after upgrading Geolocator: Execution failed for task ':geolocator_android:compileDebugJavaWithJavac'
So I've just updated Flutter and did flutter pub upgrade --major versions. Now, I'm stuck with this error:

```<code>> Task :geolocator_android:compileDebugJavaWithJavac FAILED
C:\Users\DELL\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\geolocator_android-4.1.4\android\src\main\java\com\baseflow\geolocator\location\BackgroundNotification.java:71: error: cannot find symbol
            notificationManager.createNotificationChannel(channel);
                               ^
  symbol:   method createNotificationChannel(NotificationChannel)
  location: variable notificationManager of type NotificationManagerCompat
1 error
</code>```

The code:

```<code> public void updateChannel(String channelName) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
        NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);
        NotificationChannel channel = new NotificationChannel(
                channelId,
                channelName,
                NotificationManager.IMPORTANCE_NONE
        );
        channel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
        notificationManager.createNotificationChannel(channel);
    }
}
</code>```

How can I solve this error without having to downgrade geolocator or Flutter?

Body:
So I've just updated Flutter and did flutter pub upgrade --major versions. Now, I'm stuck with this error:

> Task :geolocator_android:compileDebugJavaWithJavac FAILED
C:\Users\DELL\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\geolocator_android-4.1.4\android\src\main\java\com\baseflow\geolocator\location\BackgroundNotification.java:71: error: cannot find symbol
            notificationManager.createNotificationChannel(channel);
                               ^
  symbol:   method createNotificationChannel(NotificationChannel)
  location: variable notificationManager of type NotificationManagerCompat
1 error

The code:

 public void updateChannel(String channelName) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
        NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);
        NotificationChannel channel = new NotificationChannel(
                channelId,
                channelName,
                NotificationManager.IMPORTANCE_NONE
        );
        channel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
        notificationManager.createNotificationChannel(channel);
    }
}

How can I solve this error without having to downgrade geolocator or Flutter?


问:
Best way to convert a VBA script to google Apps script on google sheets
i'm working on a script that allows me to connect to an external API and use urlfetchapp to fetchdata, but for some objects, i have to create a dictionary of object to display the right value at the right cell, since i'm a beginner, i didn't succeed to convert this part of the script to a google apps script code, any help would be welcome :

Set TableauTaxesInclusion = New Dictionary

```<code>    'Récupération des infos de taxe incluses ou pas
    If Not IsEmpty(Produit("lecTaxInclusionInformationList")) Then
        For t = 1 To Produit("lecTaxInclusionInformationList").Count 'Parcours des taxes incluses
            Set UneTaxe = Produit("lecTaxInclusionInformationList").Item(t)

            If Not IsEmpty(UneTaxe("lecTaxCode")) And Not IsNull(UneTaxe("lecTaxCode")) Then
                TableauTaxesInclusion.Add UneTaxe("lecTaxCode")("code"), IIf(Not IsEmpty(UneTaxe("lecIsTaxIncludedInPrice")) And Not IsNull(UneTaxe("lecIsTaxIncludedInPrice")) And UneTaxe("lecIsTaxIncludedInPrice") = True, "X", "")
                'Debug.Print UneTaxe("lecTaxCode")("code")
            End If
        Next
    End If
    If Not IsEmpty(Produit("dutyFeeTaxInformationList")) Then
        Set TableauTaxes = New Dictionary
        For t = 1 To Produit("dutyFeeTaxInformationList").Count
            Set Taxe = Produit("dutyFeeTaxInformationList")(t)
            If Not (IsNull(Taxe("dutyFeeTaxTypeCode"))) Then
                If TableauTaxes.Exists(Taxe("dutyFeeTaxTypeCode")("code")) Then
                    TableauTaxes(Taxe("dutyFeeTaxTypeCode")("code")) = 1 + TableauTaxes(Taxe("dutyFeeTaxTypeCode")("code"))
                Else
                    TableauTaxes.Add Taxe("dutyFeeTaxTypeCode")("code"), 1
                End If
            End If
        Next
        For t = 1 To Produit("dutyFeeTaxInformationList").Count 'Parcours des taxes
            Set Taxe = Produit("dutyFeeTaxInformationList")(t)
            If Not (IsNull(Taxe("dutyFeeTaxTypeCode"))) Then
                If Left(Taxe("dutyFeeTaxTypeCode")("label"), 3) = "TVA" Or Left(Taxe("dutyFeeTaxTypeCode")("label"), 3) = "VAT" Then
                    If tva = True Then
                        TableauProduits(ligne, numColCheckTVA) = "X"
                        If TableauProduits(ligne, numColTVA) = Taxe("dutyFeeTaxTypeCode")("label") Then
                            If TableauProduits(ligne, numColValTVA) = "" Then
                                If (Taxe("dutyFeeTaxList").Count > 0) Then
                                    TableauProduits(ligne, numColValTVA) = Taxe("dutyFeeTaxList")(1)("dutyFeeTaxRateNumber")
                                End If
                            End If
                        Else
                            TableauProduits(ligne, numColCheckTVA) = "PB"
                        End If
                    Else
                        TableauProduits(ligne, numColTVA) = Taxe("dutyFeeTaxTypeCode")("label")
                        If (Taxe("dutyFeeTaxList").Count > 0) Then
                            TableauProduits(ligne, numColValTVA) = Taxe("dutyFeeTaxList")(1)("dutyFeeTaxRateNumber")
                            If (Taxe("dutyFeeTaxList").Count > 1) Then
                                TableauProduits(ligne, numColCheckTVA) = "PB"
                            End If
                        End If
                    End If
                    tva = True
</code>```

actually i'm just able to write the first part :

```<code> var tableautaxinclusion = [];
        if (produit.leclercTaxInclusionInformationList != 0){
        for(inc = 1 ; inc < produit.leclercTaxInclusionInformationList.length ; inc++ )
        set Taxinc = produit.leclercTaxInclusionInformationList[inc]
        }

        if (Taxinc.leclercTaxCode != null & Taxinc.leclercTaxCode != 0 ){
        tableataxinclusion = Taxinc
        }
</code>```

Body:
i'm working on a script that allows me to connect to an external API and use urlfetchapp to fetchdata, but for some objects, i have to create a dictionary of object to display the right value at the right cell, since i'm a beginner, i didn't succeed to convert this part of the script to a google apps script code, any help would be welcome :

Set TableauTaxesInclusion = New Dictionary

    'Récupération des infos de taxe incluses ou pas
    If Not IsEmpty(Produit("lecTaxInclusionInformationList")) Then
        For t = 1 To Produit("lecTaxInclusionInformationList").Count 'Parcours des taxes incluses
            Set UneTaxe = Produit("lecTaxInclusionInformationList").Item(t)

            If Not IsEmpty(UneTaxe("lecTaxCode")) And Not IsNull(UneTaxe("lecTaxCode")) Then
                TableauTaxesInclusion.Add UneTaxe("lecTaxCode")("code"), IIf(Not IsEmpty(UneTaxe("lecIsTaxIncludedInPrice")) And Not IsNull(UneTaxe("lecIsTaxIncludedInPrice")) And UneTaxe("lecIsTaxIncludedInPrice") = True, "X", "")
                'Debug.Print UneTaxe("lecTaxCode")("code")
            End If
        Next
    End If
    If Not IsEmpty(Produit("dutyFeeTaxInformationList")) Then
        Set TableauTaxes = New Dictionary
        For t = 1 To Produit("dutyFeeTaxInformationList").Count
            Set Taxe = Produit("dutyFeeTaxInformationList")(t)
            If Not (IsNull(Taxe("dutyFeeTaxTypeCode"))) Then
                If TableauTaxes.Exists(Taxe("dutyFeeTaxTypeCode")("code")) Then
                    TableauTaxes(Taxe("dutyFeeTaxTypeCode")("code")) = 1 + TableauTaxes(Taxe("dutyFeeTaxTypeCode")("code"))
                Else
                    TableauTaxes.Add Taxe("dutyFeeTaxTypeCode")("code"), 1
                End If
            End If
        Next
        For t = 1 To Produit("dutyFeeTaxInformationList").Count 'Parcours des taxes
            Set Taxe = Produit("dutyFeeTaxInformationList")(t)
            If Not (IsNull(Taxe("dutyFeeTaxTypeCode"))) Then
                If Left(Taxe("dutyFeeTaxTypeCode")("label"), 3) = "TVA" Or Left(Taxe("dutyFeeTaxTypeCode")("label"), 3) = "VAT" Then
                    If tva = True Then
                        TableauProduits(ligne, numColCheckTVA) = "X"
                        If TableauProduits(ligne, numColTVA) = Taxe("dutyFeeTaxTypeCode")("label") Then
                            If TableauProduits(ligne, numColValTVA) = "" Then
                                If (Taxe("dutyFeeTaxList").Count > 0) Then
                                    TableauProduits(ligne, numColValTVA) = Taxe("dutyFeeTaxList")(1)("dutyFeeTaxRateNumber")
                                End If
                            End If
                        Else
                            TableauProduits(ligne, numColCheckTVA) = "PB"
                        End If
                    Else
                        TableauProduits(ligne, numColTVA) = Taxe("dutyFeeTaxTypeCode")("label")
                        If (Taxe("dutyFeeTaxList").Count > 0) Then
                            TableauProduits(ligne, numColValTVA) = Taxe("dutyFeeTaxList")(1)("dutyFeeTaxRateNumber")
                            If (Taxe("dutyFeeTaxList").Count > 1) Then
                                TableauProduits(ligne, numColCheckTVA) = "PB"
                            End If
                        End If
                    End If
                    tva = True

actually i'm just able to write the first part :

 var tableautaxinclusion = [];
        if (produit.leclercTaxInclusionInformationList != 0){
        for(inc = 1 ; inc < produit.leclercTaxInclusionInformationList.length ; inc++ )
        set Taxinc = produit.leclercTaxInclusionInformationList[inc]
        }

        if (Taxinc.leclercTaxCode != null & Taxinc.leclercTaxCode != 0 ){
        tableataxinclusion = Taxinc
        }


问:
Remove Maui TableView Separator
Is it possible to remove the separator from the .net Maui TableView?
The Documentation is suspiciously silent about that topic.
If it is impossible to remove, is it possible to change its color?

For example:  <Setter Property="SeparatorColor" Value="Transparent" />

I am looking for something like the SeparatorVisibility or the SeparatorColor of the ListView.

Title: Remove Maui TableView Separator


问:
Angular does not see the component. error NG8001: 'app-pattern-grid' is not a known element
I am getting an error that my component is unknown to my application. The bottom line is that my structure is divided into modules. There is a lobby.module.ts module, which includes components from the lobby, including the PatternGridComponent component that I need. All modules are included in the main app.module.ts module. But when I try to use the component, I get the NG8001 error https://i.stack.imgur.com/IhK2d.png.
The structure of the application is as follows:
https://i.stack.imgur.com/dK7aq.png
https://i.stack.imgur.com/NRjDV.png

Modules structure:
Lobby.module.ts:

```<code>@NgModule({
  declarations: [
    LobbyComponent,
    GameCardComponent,
    GameListComponent,
    PatternGridComponent,
  ],
  imports: [
    CommonModule,
    TranslateModule,
    SharedModule,
    MatCardModule,
    MatButtonModule,
  ],
  exports: [
    LobbyComponent,
    GameCardComponent,
    GameListComponent,
    PatternGridComponent,
  ],
})
export class LobbyModule {}

</code>```

shared.module.ts:

```<code>@NgModule({
  declarations: [
    WelcomeFormComponent,
    PasswordFieldComponent,
    HeaderComponent,
    LanguageSwitcherComponent,
    BalanceModalWindowComponent,
    PatternAnimation75Component,
    PatternAnimationFactoryComponent,
  ],
  providers: [FormValidationService, PushNotificationService],
  exports: [
    WelcomeFormComponent,
    PasswordFieldComponent,
    HeaderComponent,
    LanguageSwitcherComponent,
    PatternAnimation75Component,
    PatternAnimationFactoryComponent,
  ],
  imports: [
    CommonModule,
    MatFormFieldModule,
    FormsModule,
    MatIconModule,
    MatInputModule,
    ReactiveFormsModule,
    MatButtonModule,
    MatSnackBarModule,
    TranslateModule,
    MatMenuModule,
    MatDialogModule,
  ],
})
export class SharedModule {}

</code>```

app.module.ts:

```<code>@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    AppRoutingModule,
    BrowserAnimationsModule,
    HttpClientModule,
    SharedModule,
    LoginModule,
    SignupModule,
    LobbyModule,
    TranslateModule.forRoot({
      loader: {
        provide: TranslateLoader,
        useFactory: HttpLoaderFactory,
        deps: [HttpClient],
      },
      defaultLanguage: ALLOWED_LANGUAGES['en'],
    }),
  ],
  providers: [HttpClient, HttpClientModule],
  bootstrap: [AppComponent],
})
export class AppModule {}

</code>```

I admit that I most likely did not notice a banal error somewhere, but I got stuck on this problem. Any help is appreciated.

Body:
I am getting an error that my component is unknown to my application. The bottom line is that my structure is divided into modules. There is a lobby.module.ts module, which includes components from the lobby, including the PatternGridComponent component that I need. All modules are included in the main app.module.ts module. But when I try to use the component, I get the NG8001 error https://i.stack.imgur.com/IhK2d.png.
The structure of the application is as follows:
https://i.stack.imgur.com/dK7aq.png
https://i.stack.imgur.com/NRjDV.png

Modules structure:
Lobby.module.ts:

@NgModule({
  declarations: [
    LobbyComponent,
    GameCardComponent,
    GameListComponent,
    PatternGridComponent,
  ],
  imports: [
    CommonModule,
    TranslateModule,
    SharedModule,
    MatCardModule,
    MatButtonModule,
  ],
  exports: [
    LobbyComponent,
    GameCardComponent,
    GameListComponent,
    PatternGridComponent,
  ],
})
export class LobbyModule {}

shared.module.ts:

@NgModule({
  declarations: [
    WelcomeFormComponent,
    PasswordFieldComponent,
    HeaderComponent,
    LanguageSwitcherComponent,
    BalanceModalWindowComponent,
    PatternAnimation75Component,
    PatternAnimationFactoryComponent,
  ],
  providers: [FormValidationService, PushNotificationService],
  exports: [
    WelcomeFormComponent,
    PasswordFieldComponent,
    HeaderComponent,
    LanguageSwitcherComponent,
    PatternAnimation75Component,
    PatternAnimationFactoryComponent,
  ],
  imports: [
    CommonModule,
    MatFormFieldModule,
    FormsModule,
    MatIconModule,
    MatInputModule,
    ReactiveFormsModule,
    MatButtonModule,
    MatSnackBarModule,
    TranslateModule,
    MatMenuModule,
    MatDialogModule,
  ],
})
export class SharedModule {}

app.module.ts:

@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    AppRoutingModule,
    BrowserAnimationsModule,
    HttpClientModule,
    SharedModule,
    LoginModule,
    SignupModule,
    LobbyModule,
    TranslateModule.forRoot({
      loader: {
        provide: TranslateLoader,
        useFactory: HttpLoaderFactory,
        deps: [HttpClient],
      },
      defaultLanguage: ALLOWED_LANGUAGES['en'],
    }),
  ],
  providers: [HttpClient, HttpClientModule],
  bootstrap: [AppComponent],
})
export class AppModule {}

I admit that I most likely did not notice a banal error somewhere, but I got stuck on this problem. Any help is appreciated.


问:
C Login system that checks if user is Admin/Staff from separate files
Hoping anyone can help or post their correct implementation...

I have a function that reads two files, Admin & Staff.

I am accessing these files using fread to check whether Admin/Staff during login.

If credentials entered incorrectly it prompts user to re-login.

The problem is even if I entered the correct credentials, it still prompts user to re-login.

I dunno if my logic is properly executed here:

```<code>void loginPage(){
 char username[30], password[20];
 int i, result = 0 ,size = 0;

 struct form login;

 FILE *admin;
 FILE *staff;

 //Opening files for read-------------------
 admin = fopen("adminAcc.txt", "r");
 staff = fopen("ordinaryUsers.txt", "r");

 //login---------------------------------
 printf("\nLogin Page");
 printf("\n================");
 printf("\nEnter Username: \n");
 fflush(stdin);
 gets(username);
 printf("Enter Password: \n");
 fflush(stdin);
 gets(password);

//check admin----------------------------------
 while(fread(&login, sizeof(struct form), 1, admin)){
   if(strcmp(login.roles, "Admin") == 0){
     if(strcmp(username, login.username) == 0 && strcmp(password, login.password) == 0){
       system("cls");
       adminPage();
     }else{
       relogin();
     }
   }else{
     break;
   }
 }
 fclose(admin);

//check staff-------------------------------------
 while(fread(&login, sizeof(struct form), 1, staff)){
   if(strcmp(login.roles, "OU") == 0){
     if(strcmp(login.status, "Disable") == 0){
       printf("\nPlease wait for Admin to verify the account!");
       getch();
       system("cls");
       main();
     }else if(strcmp(username, login.username) == 0 && strcmp(password, login.password) == 0){
       system("cls");
       OUsersPage();
     }else{
       relogin();
     }
   }
 }
 fclose(staff);
}
</code>```

Body:
Hoping anyone can help or post their correct implementation...

I have a function that reads two files, Admin & Staff.

I am accessing these files using fread to check whether Admin/Staff during login.

If credentials entered incorrectly it prompts user to re-login.

The problem is even if I entered the correct credentials, it still prompts user to re-login.

I dunno if my logic is properly executed here:

void loginPage(){
 char username[30], password[20];
 int i, result = 0 ,size = 0;

 struct form login;

 FILE *admin;
 FILE *staff;

 //Opening files for read-------------------
 admin = fopen("adminAcc.txt", "r");
 staff = fopen("ordinaryUsers.txt", "r");

 //login---------------------------------
 printf("\nLogin Page");
 printf("\n================");
 printf("\nEnter Username: \n");
 fflush(stdin);
 gets(username);
 printf("Enter Password: \n");
 fflush(stdin);
 gets(password);

//check admin----------------------------------
 while(fread(&login, sizeof(struct form), 1, admin)){
   if(strcmp(login.roles, "Admin") == 0){
     if(strcmp(username, login.username) == 0 && strcmp(password, login.password) == 0){
       system("cls");
       adminPage();
     }else{
       relogin();
     }
   }else{
     break;
   }
 }
 fclose(admin);

//check staff-------------------------------------
 while(fread(&login, sizeof(struct form), 1, staff)){
   if(strcmp(login.roles, "OU") == 0){
     if(strcmp(login.status, "Disable") == 0){
       printf("\nPlease wait for Admin to verify the account!");
       getch();
       system("cls");
       main();
     }else if(strcmp(username, login.username) == 0 && strcmp(password, login.password) == 0){
       system("cls");
       OUsersPage();
     }else{
       relogin();
     }
   }
 }
 fclose(staff);
}


问:
Remediating an ESXi host with PowerCLI
Code:

```<code>$baseline = "HPE 7.0U3f"
$vmhost = "HOSTNAME"

$baseline = Get-Baseline | Where-Object {$_.name -eq $baseline}
Attach-Baseline -Entity (get-vmhost $vmhost) -Baseline $baseline
$baseline | remediate-inventory -entity $vmhost -confirm:$false
</code>```

Error:

Update-Entity     The operation for the entity
"HOSTNAME" failed with the following message: "The
operation is not supported on the selected inventory objects. Check
the events for the objects select ed for the operation."

Manually attaching the image and remediating the host works just fine. What did I miss?

Title: Remediating an ESXi host with PowerCLI

Body:
Code:

$baseline = "HPE 7.0U3f"
$vmhost = "HOSTNAME"

$baseline = Get-Baseline | Where-Object {$_.name -eq $baseline}
Attach-Baseline -Entity (get-vmhost $vmhost) -Baseline $baseline
$baseline | remediate-inventory -entity $vmhost -confirm:$false

Error:

Update-Entity     The operation for the entity
"HOSTNAME" failed with the following message: "The
operation is not supported on the selected inventory objects. Check
the events for the objects select ed for the operation."

Manually attaching the image and remediating the host works just fine. What did I miss?


问:
For loops in Teradata SQL
I'm trying to understand how to use FOR loops in Teradata SQL. I used the very same example that you find in Teradata documentation

```<code>FOR CustCursor AS c_customer CURSOR FOR
  SELECT CustomerNumber
        ,CustomerName
    FROM Customer
DO
  SET hCustNbr = CustCursor.CustomerNumber;
  SET hCustName = CustCursor.CustomerName;
  DELETE FROM Customer WHERE CURRENT OF c_customer;
END FOR;
</code>```

Using one of my test tables named Customer_Offer which has two columns (Customer and Offer) I tried to do

```<code>FOR CustCursor AS c_customer CURSOR FOR
  SELECT Customer
        ,Offer
    FROM Customer_Offer
DO
  SET cust = CustCursor.Customer;
  SET o = CustCursor.Offer;
  SELECT cust, o FROM Customer_Offer WHERE CURRENT OF c_customer;
END FOR;
</code>```

But no matter which statement I use in this example, I always get Failed [3706 : 42000] Syntax error: expected something between the beginning of the request and the 'FOR' keyword.
What am I missing?

Title: For loops in Teradata SQL

Body:
I'm trying to understand how to use FOR loops in Teradata SQL. I used the very same example that you find in Teradata documentation

FOR CustCursor AS c_customer CURSOR FOR
  SELECT CustomerNumber
        ,CustomerName
    FROM Customer
DO
  SET hCustNbr = CustCursor.CustomerNumber;
  SET hCustName = CustCursor.CustomerName;
  DELETE FROM Customer WHERE CURRENT OF c_customer;
END FOR;

Using one of my test tables named Customer_Offer which has two columns (Customer and Offer) I tried to do

FOR CustCursor AS c_customer CURSOR FOR
  SELECT Customer
        ,Offer
    FROM Customer_Offer
DO
  SET cust = CustCursor.Customer;
  SET o = CustCursor.Offer;
  SELECT cust, o FROM Customer_Offer WHERE CURRENT OF c_customer;
END FOR;

But no matter which statement I use in this example, I always get Failed [3706 : 42000] Syntax error: expected something between the beginning of the request and the 'FOR' keyword.
What am I missing?


问:
What is "fdprocessedid" in the HTML attributes?
I'm working on a really small app, when I came through a attribute I never added, "fdprocessedid".
It was like this -

```<code><button type="button" fdprocessedid="some_random_text">
   Some button
</button>
</code>```

Now, I am concerned about what it is. Nothing comes up on google on searching this.

My main questions:

It it safe?

Could a browser extension or App do this?

Should I do something about it?

In Google Chrome the attribute shows up always on some or the other element.

In Brave it shows up sometimes.

It does not appear on Microsoft Edge.

My Browser extensions are as follows (chrome) -

AdBlock — best ad blocker

Google Dictionary

React Devtools

McAfee Web Advisor

Wappalyzer - Technology Profiler

WhatFont

It doesn't appear in private/incognito mode.

I am working alone, so nobody else has access over it.

My Project uses Vite & JQuery.

I have never had this attribute on my projects. That's why I'm concerned.

Body:
I'm working on a really small app, when I came through a attribute I never added, "fdprocessedid".
It was like this -

<button type="button" fdprocessedid="some_random_text">
   Some button
</button>

Now, I am concerned about what it is. Nothing comes up on google on searching this.

My main questions:

It it safe?

Could a browser extension or App do this?

Should I do something about it?

In Google Chrome the attribute shows up always on some or the other element.

In Brave it shows up sometimes.

It does not appear on Microsoft Edge.

My Browser extensions are as follows (chrome) -

AdBlock — best ad blocker

Google Dictionary

React Devtools

McAfee Web Advisor

Wappalyzer - Technology Profiler

WhatFont

It doesn't appear in private/incognito mode.

I am working alone, so nobody else has access over it.

My Project uses Vite & JQuery.

I have never had this attribute on my projects. That's why I'm concerned.


问:
How to get value of incoming traffic coming on a deployment in kubernetes using prometheus?
I have deployed my java application in kubernetes cluster and deployed prometheus on same cluster, now Iam running load test on it, I need the traffic value on that deployment using prometheus.

I am getting the cpu usage spiking up, but I need the query to monitor the traffic


问:
WebPack: Module not found: Error: Can't resolve './src' in '...'
I use webpack to create a project name KUAKUA. It always turn to this error and I have no idea. How can I fix the problem? I have search for many answers similar to mine but they don't work.Here are ralative screenshot:

menu


问:
Xamarin Forms Android crash: tombstone with anonymous symbol
I have a Xamarin Forms application (XF 4.6) running on Android, which sometimes crashes.
The following android bug report part which reports the crash tells that a SIGSEGV signal has been sent, and it is the thread pool which is failing.

--------- beginning of crash

12-26 16:07:01.799  4375  4500 F libc: Fatal signal 11 (SIGSEGV), code
1, fault addr 0x0 in tid 4500 (Thread Pool Wor)

12-26 16:07:01.871   432   528 I BootReceiver:Copying
/data/tombstones/tombstone_03 to DropBox (SYSTEM_TOMBSTONE)

To understand why, I read the tombstone file and according to the android documentation, I can use adb-stack command to desymbolize the library and find the line of crash. But in the tombstome file I see the program counter whithin the backtrace section below, but it is not helpful because I do not know which library is raising the SIGSEGV signal. Does anybody can help me or give me any hint to continue investigating and find the real reason of this crash?

backtrace:

#00 pc 000014d4  anonymous:c005b000

#01 pc 0002effc  anonymous:c8ac1000


问:
I don't understand why my get request is returning not a NaN?

I'm building a store and am having trouble connecting to my remote server. Specifically, I'm have trouble getting my Products page to specific Product Detail page. I am trying to follow along with Angular's tutorial page. Currently, I'm at an impasse. Here is the error message that I get from my console when I click on a specific link:

Failed to load resource: the server responded with a status of 404 ()

my-json-server.typicode.com/wlawlerpro/db/products/NaN:1

The get request which triggers this issue is the following.

getProduct(id: number): Observable<Product> {
  const url = `${this.productsURL}/${id}`;
  return this.http.get<Product>(url)

}```
</div>
</div>
</p>
``` The following is the service page for my store:
```
```import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Product, productss, } from './product'
import { BehaviorSubject, Observable, of, } from 'rxjs';

import{ catchError, map, shareReplay, tap} from 'rxjs/operators';
import { ObserveOnSubscriber } from 'rxjs/internal/operators/observeOn';
import { MapOperator } from 'rxjs/internal/operators/map';
//import { AngularFirestore } from '@angular/fire/firestore';

@Injectable({
  providedIn: 'root'
})
export class CartService {
  private productsURL = 'https://my-json-server.typicode.com/wlawlerpro/db/products';
  private productsURL2 = 'https://my-json-server.typicode.com/wlawlerpro/db'
  httpOptions = {
    headers: new HttpHeaders({ 'Content-Type': 'application/json' })
  };
constructor(
  private http: HttpClient
) {}

private total = 0;
private totalSubject$ = new BehaviorSubject<number>(this.total);
public totalOberservable = this.totalSubject$.asObservable();
private  items : Product[] = [];

private itemList$ = new BehaviorSubject<Product[]>(this.items);
public itemsObservable1 = this.itemList$.asObservable();

  addToCart(item: Product): void {
    this.items.push(item);
    this.itemList$.next(this.items);
    this.total = this.calculateTotal();
    this.totalSubject$.next(this.total);

  }

  removeFromCart(index: number){
    this.items.splice(index,1)
    this.total = this.calculateTotal();
    this.totalSubject$.next(this.total)

  }

  getItems() {
    return this.itemList$.asObservable();
  }
/*
getItems(): Observable<Product> {
  return this.http.get<items>(this.catalogURL)

}
*/
  clearCart() {
    this.items = [];
    return this.items;
  }

  private calculateTotal(): number {
    let total = 0;
    this.items.forEach(
      (item: { price: number}) =>
      (total += item.price * 1)
    );
    return total;
  }
 //Product List

 getProducts(): Observable<Product[]> {
  return this.http.get<Product[]>(this.productsURL)
  .pipe(
    tap(),
  );
 }

getProduct(id: number): Observable<Product> {
  const url = `${this.productsURL}/${id}`;
  return this.http.get<Product>(url)

}

}
```

I can hard code a number to the end of the get request and everything will work but only to the product id of the number I just hard coded. This is not what I'm trying to do. I want the id to link the whatever product id number belongs to the link that is clicked
Any help would be greatly appreciated?

Body:
I'm building a store and am having trouble connecting to my remote server. Specifically, I'm have trouble getting my Products page to specific Product Detail page. I am trying to follow along with Angular's tutorial page. Currently, I'm at an impasse. Here is the error message that I get from my console when I click on a specific link:

Failed to load resource: the server responded with a status of 404 ()

my-json-server.typicode.com/wlawlerpro/db/products/NaN:1

The get request which triggers this issue is the following.

getProduct(id: number): Observable<Product> {
  const url = `${this.productsURL}/${id}`;
  return this.http.get<Product>(url)

}

 The following is the service page for my store:

import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Product, productss, } from './product'
import { BehaviorSubject, Observable, of, } from 'rxjs';

import{ catchError, map, shareReplay, tap} from 'rxjs/operators';
import { ObserveOnSubscriber } from 'rxjs/internal/operators/observeOn';
import { MapOperator } from 'rxjs/internal/operators/map';
//import { AngularFirestore } from '@angular/fire/firestore';

@Injectable({
  providedIn: 'root'
})
export class CartService {
  private productsURL = 'https://my-json-server.typicode.com/wlawlerpro/db/products';
  private productsURL2 = 'https://my-json-server.typicode.com/wlawlerpro/db'
  httpOptions = {
    headers: new HttpHeaders({ 'Content-Type': 'application/json' })
  };
constructor(
  private http: HttpClient
) {}

private total = 0;
private totalSubject$ = new BehaviorSubject<number>(this.total);
public totalOberservable = this.totalSubject$.asObservable();
private  items : Product[] = [];

private itemList$ = new BehaviorSubject<Product[]>(this.items);
public itemsObservable1 = this.itemList$.asObservable();

  addToCart(item: Product): void {
    this.items.push(item);
    this.itemList$.next(this.items);
    this.total = this.calculateTotal();
    this.totalSubject$.next(this.total);

  }

  removeFromCart(index: number){
    this.items.splice(index,1)
    this.total = this.calculateTotal();
    this.totalSubject$.next(this.total)

  }

  getItems() {
    return this.itemList$.asObservable();
  }
/*
getItems(): Observable<Product> {
  return this.http.get<items>(this.catalogURL)

}
*/
  clearCart() {
    this.items = [];
    return this.items;
  }

  private calculateTotal(): number {
    let total = 0;
    this.items.forEach(
      (item: { price: number}) =>
      (total += item.price * 1)
    );
    return total;
  }
 //Product List

 getProducts(): Observable<Product[]> {
  return this.http.get<Product[]>(this.productsURL)
  .pipe(
    tap(),
  );
 }

getProduct(id: number): Observable<Product> {
  const url = `${this.productsURL}/${id}`;
  return this.http.get<Product>(url)

}

}

I can hard code a number to the end of the get request and everything will work but only to the product id of the number I just hard coded. This is not what I'm trying to do. I want the id to link the whatever product id number belongs to the link that is clicked
Any help would be greatly appreciated?


问:
How to split the screen in three parts using tkinter?
I dividing the screen into two parts, but I need to divide it into three parts. The left panel need to be splited in two parts. I need a bottom in the left part that shows an image: Here is part of the code. And I also need to put a green line in the top of screen:</p>
```<code>class PrincipalView(Frame):
    def __init__(self, root):
        self.main = Frame(root, bg=colorscheme.MAIN_BACKGROUND_COLOR)
        self.main.grid(row=0, column=0, sticky=tk.NSEW)

        self.__setup_left_frame()
        self.__setup_right_frame()

    def __setup_left_frame(self):
        self.main.columnconfigure(0, weight=1)
        self.main.rowconfigure(0, weight=1)

        left_frame = Frame(self.main, bg='white')
        left_frame.grid(row=0, column=0, sticky=tk.NSEW, padx=(0, 0), pady=(0, 0))

        left_frame.rowconfigure(0, weight=1)
        left_frame.columnconfigure(0, weight=1)

        SideMenu(left_frame)

    def __setup_right_frame(self):
        self.main.columnconfigure(1, weight=11)
        right_frame = Frame(self.main, bg='#ffffff')
        right_frame.grid(row=0, column=1, sticky=tk.NSEW, padx=(10, 10), pady=(10, 10))
        self.tabs = TabPanel(right_frame)
        right_frame.rowconfigure(0, weight=1)
        right_frame.columnconfigure(0, weight=1)
</code>```

Body:
I dividing the screen into two parts, but I need to divide it into three parts. The left panel need to be splited in two parts. I need a bottom in the left part that shows an image: Here is part of the code. And I also need to put a green line in the top of screen:

class PrincipalView(Frame):
    def __init__(self, root):
        self.main = Frame(root, bg=colorscheme.MAIN_BACKGROUND_COLOR)
        self.main.grid(row=0, column=0, sticky=tk.NSEW)

        self.__setup_left_frame()
        self.__setup_right_frame()

    def __setup_left_frame(self):
        self.main.columnconfigure(0, weight=1)
        self.main.rowconfigure(0, weight=1)

        left_frame = Frame(self.main, bg='white')
        left_frame.grid(row=0, column=0, sticky=tk.NSEW, padx=(0, 0), pady=(0, 0))

        left_frame.rowconfigure(0, weight=1)
        left_frame.columnconfigure(0, weight=1)

        SideMenu(left_frame)

    def __setup_right_frame(self):
        self.main.columnconfigure(1, weight=11)
        right_frame = Frame(self.main, bg='#ffffff')
        right_frame.grid(row=0, column=1, sticky=tk.NSEW, padx=(10, 10), pady=(10, 10))
        self.tabs = TabPanel(right_frame)
        right_frame.rowconfigure(0, weight=1)
        right_frame.columnconfigure(0, weight=1)


问:
Rendering inline mathematics in parsed-literal blocks (HTML output)
I'm trying to write some code blocks that contain math expressions and emphasized words (bold, italic) using ReST files in Sphinx. Bold and italic are rendered correctly but the math expression was not.

Example (.rst):

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

   *gga* :math:`a\_1`
   ``behavior`` *my_behavior*
   :math:`\eta`
</code>```

which is rendered in html as:

```<code>gga \[a_1\]
behavior my_behavior
\[\eta\]
</code>```

I have tried with different Sphinx extensions (mathjax, imgmath, katex, ...) but it didn't work.

For LaTeX it worked (as in the image below):

Body:
I'm trying to write some code blocks that contain math expressions and emphasized words (bold, italic) using ReST files in Sphinx. Bold and italic are rendered correctly but the math expression was not.

Example (.rst):

.. parsed-literal::

   *gga* :math:`a\_1`
   ``behavior`` *my_behavior*
   :math:`\eta`

which is rendered in html as:

gga \[a_1\]
behavior my_behavior
\[\eta\]

I have tried with different Sphinx extensions (mathjax, imgmath, katex, ...) but it didn't work.

For LaTeX it worked (as in the image below):


问:
Resetting default camera settings each time gst pipeline launched
I am launching a pipeline using gst-launch-1.0 on a Jetson Nano, within which I set the brightness of the camera to 1 using the v4l2src plugin:

gst-launch-1.0 v4l2src device=/dev/video0 extra-controls="c,brightness=1" ! video/x-raw, format=UYVY, width=640, height=480 ! videoconvert ! glimagesink sync=false

That works fine, but if I then run the same command without setting the brightness, the value of 1 persists, even after reboot. Is there a method of resetting the default settings before each pipeline launch, or a cache file that can be removed?


问:
Error when compiling vue and tailwind with npm run dev [Laravel 9]
I'm trying to install Vue 3 and TailwindCSS into my laravel project.

Here's what I did, first, "npm install vue".
Then I install Tailwind with   "npm install -D tailwindcss@latest postcss@latest autoprefixer@latest".

After that, "npx tailwindcss init" to generate tailwind.config.js

Then I made changes in webpack.mix.js to make sure it compile Vue and Tailwind files

```<code>mix.js('resources/js/app.js', 'public/js')
    .vue()
    .postCss("resources/css/app.css", "public/css", [require("tailwindcss")]);

mix.sass('resources/sass/app.scss', 'public/css');

</code>```

Then I add the following code in resources/css/app.css

```<code>@tailwind base;
@tailwind components;
@tailwind utilities;
</code>```

Then I run npm run dev then there's the error

```<code>C:\laragon\www\e-petakom(main -> origin)
λ npm run dev

> dev
> npm run development

> development
> mix

✖ Mix
  Compiled with some errors in 3.69s

ERROR in ./resources/css/app.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/css-loader/dist/cjs.js):
Error: Can't resolve 'variables' in 'C:\laragon\www\e-petakom\resources\css'
    at finishWithoutResolve (C:\laragon\www\e-petakom\node_modules\enhanced-resolve\lib\Resolver.js:309:18)
    at C:\laragon\www\e-petakom\node_modules\enhanced-resolve\lib\Resolver.js:386:15
    at C:\laragon\www\e-petakom\node_modules\enhanced-resolve\lib\Resolver.js:435:5
    at eval (eval at create (C:\laragon\www\e-petakom\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:16:1)
    at C:\laragon\www\e-petakom\node_modules\enhanced-resolve\lib\Resolver.js:435:5
    at eval (eval at create (C:\laragon\www\e-petakom\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:27:1)
    at C:\laragon\www\e-petakom\node_modules\enhanced-resolve\lib\DescriptionFilePlugin.js:87:43
    at C:\laragon\www\e-petakom\node_modules\enhanced-resolve\lib\Resolver.js:435:5
    at eval (eval at create (C:\laragon\www\e-petakom\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:15:1)
    at C:\laragon\www\e-petakom\node_modules\enhanced-resolve\lib\Resolver.js:435:5
    at processResult (C:\laragon\www\e-petakom\node_modules\webpack\lib\NormalModule.js:758:19)
    at C:\laragon\www\e-petakom\node_modules\webpack\lib\NormalModule.js:860:5
    at C:\laragon\www\e-petakom\node_modules\loader-runner\lib\LoaderRunner.js:400:11
    at C:\laragon\www\e-petakom\node_modules\loader-runner\lib\LoaderRunner.js:252:18
    at context.callback (C:\laragon\www\e-petakom\node_modules\loader-runner\lib\LoaderRunner.js:124:13)
    at Object.loader (C:\laragon\www\e-petakom\node_modules\css-loader\dist\index.js:155:5)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at runNextTicks (node:internal/process/task_queues:64:3)
    at process.processImmediate (node:internal/timers:442:9)

1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack compiled with 2 errors
</code>```

Any idea why is this happening?

I already tried deleting node modules folder from my project.
Execute following commands to make sure all the package is updated
npm install -g npm-check-updates
ncu -u
npm install

Body:
I'm trying to install Vue 3 and TailwindCSS into my laravel project.

Here's what I did, first, "npm install vue".
Then I install Tailwind with   "npm install -D tailwindcss@latest postcss@latest autoprefixer@latest".

After that, "npx tailwindcss init" to generate tailwind.config.js

Then I made changes in webpack.mix.js to make sure it compile Vue and Tailwind files

mix.js('resources/js/app.js', 'public/js')
    .vue()
    .postCss("resources/css/app.css", "public/css", [require("tailwindcss")]);

mix.sass('resources/sass/app.scss', 'public/css');

Then I add the following code in resources/css/app.css

@tailwind base;
@tailwind components;
@tailwind utilities;

Then I run npm run dev then there's the error

C:\laragon\www\e-petakom(main -> origin)
λ npm run dev

> dev
> npm run development

> development
> mix

✖ Mix
  Compiled with some errors in 3.69s

ERROR in ./resources/css/app.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/css-loader/dist/cjs.js):
Error: Can't resolve 'variables' in 'C:\laragon\www\e-petakom\resources\css'
    at finishWithoutResolve (C:\laragon\www\e-petakom\node_modules\enhanced-resolve\lib\Resolver.js:309:18)
    at C:\laragon\www\e-petakom\node_modules\enhanced-resolve\lib\Resolver.js:386:15
    at C:\laragon\www\e-petakom\node_modules\enhanced-resolve\lib\Resolver.js:435:5
    at eval (eval at create (C:\laragon\www\e-petakom\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:16:1)
    at C:\laragon\www\e-petakom\node_modules\enhanced-resolve\lib\Resolver.js:435:5
    at eval (eval at create (C:\laragon\www\e-petakom\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:27:1)
    at C:\laragon\www\e-petakom\node_modules\enhanced-resolve\lib\DescriptionFilePlugin.js:87:43
    at C:\laragon\www\e-petakom\node_modules\enhanced-resolve\lib\Resolver.js:435:5
    at eval (eval at create (C:\laragon\www\e-petakom\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:15:1)
    at C:\laragon\www\e-petakom\node_modules\enhanced-resolve\lib\Resolver.js:435:5
    at processResult (C:\laragon\www\e-petakom\node_modules\webpack\lib\NormalModule.js:758:19)
    at C:\laragon\www\e-petakom\node_modules\webpack\lib\NormalModule.js:860:5
    at C:\laragon\www\e-petakom\node_modules\loader-runner\lib\LoaderRunner.js:400:11
    at C:\laragon\www\e-petakom\node_modules\loader-runner\lib\LoaderRunner.js:252:18
    at context.callback (C:\laragon\www\e-petakom\node_modules\loader-runner\lib\LoaderRunner.js:124:13)
    at Object.loader (C:\laragon\www\e-petakom\node_modules\css-loader\dist\index.js:155:5)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at runNextTicks (node:internal/process/task_queues:64:3)
    at process.processImmediate (node:internal/timers:442:9)

1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack compiled with 2 errors

Any idea why is this happening?

I already tried deleting node modules folder from my project.
Execute following commands to make sure all the package is updated
npm install -g npm-check-updates
ncu -u
npm install


问:
Sending video through okhttp to flask server
I'm currently working on my final project where I need to record a 4-second video and send it to a flask server.

I don't really know how to select a video and send it to the server. I've been reading a lot about using the URI from the video I need, but I honestly don't know how I should do it.

Does anyone have a simple solution?

I already did the part where I limit the video length to 4 seconds, but thats it, I also check:
https://github.com/ankitsh2715/smarthome-gesture-training proyect where he manages to do what I need, but his app crashes whenever I try to use it.


问:
libusb bulk transfer to an HID GadgetFS error: data padded with zeros
I have created a gadget HID device on embedded linux.
-It's a high-speed device

and has two endpoint In and Out,

both endpoints are bulk endpoints

and have 512 Bytes report length each.

I have installed winusb driver and associated it to my device under Win10.
The device is recognized correctly. I tried libusb "xusb" example to test it, and it's correctly recognized.

enter image description here

On Windows I'm using a code like this (simplified)

```<code>unsigned char* data[1024];
    memset(data, 0, 1024);
    int al = 0;
    int n = 0;
    data[0] = 'H';
    data[1] = 'E';
    data[2] = 'L';
    data[3] = 'L';
    data[4] = 'O';
    data[5] = 0x00;
    int utm = 512-1;

    display_buffer_hex(data, utm);
    printf("\n");
    libusb_bulk_transfer(handle, 0x01, data, utm, &al, 0);
    printf("\nWritten data %d\n", al);

</code>```

This code simply put the word "HELLO" in the buffer and send the whole buffer (512 bytes) to the linux gadget (please, forgot the 512-1 for now ... it's another story)

On Linux side I'm using some code like this one (simplified):

```<code>const char *filename = "/dev/hidg0";
char buf[512];
int cmd_len;

while(1)
{
    cmd_len = read(fd, buf, 512 - 1);
    printf("recv len : %d\n", cmd_len);

    for (i = 0; i < cmd_len; i++)
    {
    printf(" %02x", buf[i]);
    }
    printf("\n");
}

</code>```

this code simply opens the gadget and read a packet of 512 bytes and print it to stdout.

In theory I should have the word "HELLO" printed to display (0x48 0x45 0x4C 0x4C Ox4F).

```<code>instead of
0x48 0x45 0x4C 0x4C Ox4F

I'm getting seven 0x00 between each two bytes
0x48 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x45 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x4C 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x4C 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Ox4F 0x00 0x00 0x00 0x00 0x00 0x00 0x00

</code>```

What I'm having is that on Linux side, when I dump the buffer to stdout, I can see that I receive effectively those chars, but they are spaced by 7 of 0x00 chars (I mean, each char from HELLO is printed followed by 7 chars 0x00 and then the next char ...).
enter image description here

I really tracked all my code, up to calling the synchronous function from Libusb, I can see the buffer is correct. What's adding those padding chars? I'm not doing anything special.
Can it be GadgetFS bug? or libUSB bug setting needed?
Thx

Body:
I have created a gadget HID device on embedded linux.
-It's a high-speed device

and has two endpoint In and Out,

both endpoints are bulk endpoints

and have 512 Bytes report length each.

I have installed winusb driver and associated it to my device under Win10.
The device is recognized correctly. I tried libusb "xusb" example to test it, and it's correctly recognized.

enter image description here

On Windows I'm using a code like this (simplified)

unsigned char* data[1024];
    memset(data, 0, 1024);
    int al = 0;
    int n = 0;
    data[0] = 'H';
    data[1] = 'E';
    data[2] = 'L';
    data[3] = 'L';
    data[4] = 'O';
    data[5] = 0x00;
    int utm = 512-1;

    display_buffer_hex(data, utm);
    printf("\n");
    libusb_bulk_transfer(handle, 0x01, data, utm, &al, 0);
    printf("\nWritten data %d\n", al);

This code simply put the word "HELLO" in the buffer and send the whole buffer (512 bytes) to the linux gadget (please, forgot the 512-1 for now ... it's another story)

On Linux side I'm using some code like this one (simplified):

const char *filename = "/dev/hidg0";
char buf[512];
int cmd_len;

while(1)
{
    cmd_len = read(fd, buf, 512 - 1);
    printf("recv len : %d\n", cmd_len);

    for (i = 0; i < cmd_len; i++)
    {
    printf(" %02x", buf[i]);
    }
    printf("\n");
}

this code simply opens the gadget and read a packet of 512 bytes and print it to stdout.

In theory I should have the word "HELLO" printed to display (0x48 0x45 0x4C 0x4C Ox4F).

instead of
0x48 0x45 0x4C 0x4C Ox4F

I'm getting seven 0x00 between each two bytes
0x48 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x45 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x4C 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x4C 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Ox4F 0x00 0x00 0x00 0x00 0x00 0x00 0x00

What I'm having is that on Linux side, when I dump the buffer to stdout, I can see that I receive effectively those chars, but they are spaced by 7 of 0x00 chars (I mean, each char from HELLO is printed followed by 7 chars 0x00 and then the next char ...).
enter image description here

I really tracked all my code, up to calling the synchronous function from Libusb, I can see the buffer is correct. What's adding those padding chars? I'm not doing anything special.
Can it be GadgetFS bug? or libUSB bug setting needed?
Thx


问:
Multiple Google maps based on user input
I suspect I'm doing it all wrong but I have no idea how to realize this.

User can add extra fields (locations) in a form, behind each field (location) is a button that opens a modal containing a Google map where you can select a location.

The problem I'm running into is, the current code is for one location.

User can add multiple locations with 'onlick' but i only have this piece for my google map.

```<code><script type="text/javascript">
var geocoder1 = new google.maps.Geocoder();
var marker1 = null;
var map1 = null;
function initialize1() {
      var $latitude = document.getElementById('latitude');
      var $longitude = document.getElementById('longitude');
      var latitude = 51.21325734558688
      var longitude = 4.452420938900765;
      var zoom = 16;

      var LatLng = new google.maps.LatLng(latitude, longitude);

      var mapOptions = {
        zoom: zoom,
        center: LatLng,
        panControl: false,
        zoomControl: false,
        scaleControl: true,
        mapTypeId: google.maps.MapTypeId.ROADMAP
      }

      map1 = new google.maps.Map(document.getElementById('map'), mapOptions);
      if (marker1 && marker1.getMap) marker1.setMap(map1);
      marker1 = new google.maps.Marker({
        position: LatLng,
        map: map1,
        title: 'Drag Me!',
        draggable: true
      });

      google.maps.event.addListener(marker1, 'dragend', function(marker1) {
        var latLng = marker1.latLng;
        $latitude.value = latLng.lat();
        $longitude.value = latLng.lng();
      });

    }
    initialize1();
    $('#findbutton').click(function (e) {
        var address = $("#Postcode").val();
        geocoder1.geocode({ 'address': address }, function (results, status) {
            if (status == google.maps.GeocoderStatus.OK) {
                map1.setCenter(results[0].geometry.location);
                marker1.setPosition(results[0].geometry.location);
                $(latitude).val(marker1.getPosition().lat());
                $(longitude).val(marker1.getPosition().lng());
            } else {
                alert("Geocode is mislukt met volgende fout: " + status);
            }
        });
        e.preventDefault();
    });
</script>
</code>```

If the user wants to add 5 locations, there should also be 5 modals containing a Google map.

I do not expect ready-made solutions but tips or advice on how to approach this.

I already thought to add extra javascript to the onlick action of the button but that doesn't work.
Apparently it is not possible to add extra javascript code via jquery, for example.
==> https://www.w3schools.com/jquery/jquery_dom_add.asp

Body:
I suspect I'm doing it all wrong but I have no idea how to realize this.

User can add extra fields (locations) in a form, behind each field (location) is a button that opens a modal containing a Google map where you can select a location.

The problem I'm running into is, the current code is for one location.

User can add multiple locations with 'onlick' but i only have this piece for my google map.

If the user wants to add 5 locations, there should also be 5 modals containing a Google map.

I do not expect ready-made solutions but tips or advice on how to approach this.

I already thought to add extra javascript to the onlick action of the button but that doesn't work.
Apparently it is not possible to add extra javascript code via jquery, for example.
==> https://www.w3schools.com/jquery/jquery_dom_add.asp


问:
trying to simply query a mongodb database from swift app
I am trying to create a simple mac app that queries my local mongoDB.

I have a collection variable that I am trying to find multiple results on. For some reason I can not get it to work. The examples in the mongodb documentation seem to be outdated.
My code looks something like this:

```<code>let year: Int = 2022
let buffer: Int = 1
...
let collection = mongodb.collection("holidays", withType: Holiday.self)
...
let queryFilter: BSONDocument = [
     "date_no_dash": [
         "$gte": BSON(integerLiteral: (year - buffer) * 10_000),
          "$lte": BSON(integerLiteral: ((year + buffer) * 10_000) - 1)
          ]
]
...
collection.find(queryFilter, session: mongoSession) { result in //<-- error on this row
switch result {
case .failure(let error):
  print(error)
  return
case .success(let documents):
  for doc in documents {
    print(doc.date_no_dash)
  }
}
</code>```

On the collection.find row I keep on getting the error: Type of expression is ambiguous without more context. What am I overlooking? In general the entire "switch-handling" of the results seems cumbersome - isn't there a more elegant solution? Thanks for any input.

Body:
I am trying to create a simple mac app that queries my local mongoDB.

I have a collection variable that I am trying to find multiple results on. For some reason I can not get it to work. The examples in the mongodb documentation seem to be outdated.
My code looks something like this:

let year: Int = 2022
let buffer: Int = 1
...
let collection = mongodb.collection("holidays", withType: Holiday.self)
...
let queryFilter: BSONDocument = [
     "date_no_dash": [
         "$gte": BSON(integerLiteral: (year - buffer) * 10_000),
          "$lte": BSON(integerLiteral: ((year + buffer) * 10_000) - 1)
          ]
]
...
collection.find(queryFilter, session: mongoSession) { result in //<-- error on this row
switch result {
case .failure(let error):
  print(error)
  return
case .success(let documents):
  for doc in documents {
    print(doc.date_no_dash)
  }
}

On the collection.find row I keep on getting the error: Type of expression is ambiguous without more context. What am I overlooking? In general the entire "switch-handling" of the results seems cumbersome - isn't there a more elegant solution? Thanks for any input.


问:
How to change the reactEventHandlers's value property in Cypress
I'm trying to change the element's property: __reactEventHandlers$p67bfoorzg.value
element's property

but the &p67bfoorzg always changes (random)

I want to change the value from cypress..

I tried:

const specificColor = this.elements.color().eq(settingNumber-1) // that is the element I want to change

specificColor.invoke('prop', '__reactEventHandlers.value', ${colorIs}).trigger('change' ,{force: true}).wait(300)


问:
Revert some file/directory deletions from other Revert, Recover file and directory from Commit
I made a revert that deleted some files and directories... According to the The screenshot:

The Red box shows the commit with my revert.
The Blue arrow shows the position inside of my project
The Green arrows shows the files that I would like to recover...

I see this question, but that is recovering all, and this How do I reset or revert a file to a specific revision? shows only file.
This Git revert just some files in commit is about single file.

How I Could do the recovery with directory?

Is it possible do this operation directly from IntelliJ?

Is it possible do this operation interactively (in order to select what recover)?


问:
How to get rid of the line between the StatusBar and the Form in FMX?
I applied a new color to the StatusBar to match the color of the Form. But this thin line has appeared and I can't get rid of it.

```<code>TAndroidHelper.Activity.getWindow.setStatusBarColor($FF0060C7);
</code>```

I tried to change the border style, apply a TRectangle with contents align, but nothing works.

Body:
I applied a new color to the StatusBar to match the color of the Form. But this thin line has appeared and I can't get rid of it.

TAndroidHelper.Activity.getWindow.setStatusBarColor($FF0060C7);

I tried to change the border style, apply a TRectangle with contents align, but nothing works.


问:
Cython multiple include of same header file causes redefinition warning and crash
Lets assume there are three files f1.hpp, f2.hpp, f3.hpp. Now say f2 has f1 included in it and f3 have f1 and f2 included in it.Making a py file that contents of f1, f2, and f3 defined now this is causing a 'struct' type redefinition or 'class' type redefinition  warning and then crashes with use of undefined type 'type'

Eg:
f1.hpp

```<code>#include <iostream>
namespace nam {
    //some types struct and class
}
</code>```

f2.hpp

```<code>#include <f1.hpp>

namespace nam {
    //some types struct and class
    //with f1 type or class as an argument
}
</code>```

f3.hpp

```<code>#include <f1.hpp>
#include <f2.hpp>
namespace nam {
    //some types struct and class
    //with f1 and f2 type or class as an argument
}
</code>```

error message:

```<code>ex1.hpp(26): error C2011: 'namspace::classcpp': 'class' type
redefinition
ex1.hpp(26): note: see declaration of 'namspace::classcpp'
pycpp.cpp(1489): error C2027: use of undefined type
'namspace::classcpp'
ex1.hpp(26): note: see declaration of 'namspace::classcpp'
</code>```

Now assume i have more the 3 file with this with their own random but necessary includes.
How do define them in cython?

Body:
Lets assume there are three files f1.hpp, f2.hpp, f3.hpp. Now say f2 has f1 included in it and f3 have f1 and f2 included in it.Making a py file that contents of f1, f2, and f3 defined now this is causing a 'struct' type redefinition or 'class' type redefinition  warning and then crashes with use of undefined type 'type'

Eg:
f1.hpp

#include <iostream>
namespace nam {
    //some types struct and class
}

f2.hpp

#include <f1.hpp>

namespace nam {
    //some types struct and class
    //with f1 type or class as an argument
}

f3.hpp

#include <f1.hpp>
#include <f2.hpp>
namespace nam {
    //some types struct and class
    //with f1 and f2 type or class as an argument
}

error message:

ex1.hpp(26): error C2011: 'namspace::classcpp': 'class' type
redefinition
ex1.hpp(26): note: see declaration of 'namspace::classcpp'
pycpp.cpp(1489): error C2027: use of undefined type
'namspace::classcpp'
ex1.hpp(26): note: see declaration of 'namspace::classcpp'

Now assume i have more the 3 file with this with their own random but necessary includes.
How do define them in cython?


问:
omnet and inet: Runing simulation on Iot Network
How to get the initial coordonate ( initialX, initialY, initialZ) of the node using StationaryMobility as a typename of the mobility ?

In this documentation, I see the parametes but I don't know how to acces them in My c++ file
https://doc.omnetpp.org/inet/api-current/neddoc/inet.mobility.static.StationaryMobility.html

thanks.

I tried to get those coordiante by ussing this

```<code> void XXX::initialize(int stage){

        host = getContainingNode(this);
        IMobility *mod;
        if (stage== INITSTAGE_LOCAL) {

           mod = check_and_cast<StationaryMobility *>(host->getSubmodule("mobility"));

           Coord pos = mod->getCurrentPosition();

           EV <<"### position X: " << pos.getX() << " \n";
           EV <<"### Position Y: " << pos.getY() << " \n";
       }else {
           ...
       }

</code>```

Body:
How to get the initial coordonate ( initialX, initialY, initialZ) of the node using StationaryMobility as a typename of the mobility ?

In this documentation, I see the parametes but I don't know how to acces them in My c++ file
https://doc.omnetpp.org/inet/api-current/neddoc/inet.mobility.static.StationaryMobility.html

thanks.

I tried to get those coordiante by ussing this

 void XXX::initialize(int stage){

        host = getContainingNode(this);
        IMobility *mod;
        if (stage== INITSTAGE_LOCAL) {

           mod = check_and_cast<StationaryMobility *>(host->getSubmodule("mobility"));

           Coord pos = mod->getCurrentPosition();

           EV <<"### position X: " << pos.getX() << " \n";
           EV <<"### Position Y: " << pos.getY() << " \n";
       }else {
           ...
       }


问:
how to display the txt file directory generated from the search results for the contents of the txt file with python
I have a lot of txt files in a folder where the txt files contain strings of coordinates, width and height. i have a wide string list variable like ['0.03463', '0.1247825', '0.2152352'], how do i display a list of directory names of txt files that have the same contents of one of my string lists</p>
```<code># variable string width
width = [str(item) for item in ril]   #

for file in os.listdir(path):
    cur_path = os.path.join(path, file)
    # check if it is a file
    if os.path.isfile(cur_path):
        with open(cur_path, 'r') as file:
          content = file.read()
          # print(content)

for word in width:
  if word in content:
    print(content)

</code>```

Body:
I have a lot of txt files in a folder where the txt files contain strings of coordinates, width and height. i have a wide string list variable like ['0.03463', '0.1247825', '0.2152352'], how do i display a list of directory names of txt files that have the same contents of one of my string lists

# variable string width
width = [str(item) for item in ril]   #

for file in os.listdir(path):
    cur_path = os.path.join(path, file)
    # check if it is a file
    if os.path.isfile(cur_path):
        with open(cur_path, 'r') as file:
          content = file.read()
          # print(content)

for word in width:
  if word in content:
    print(content)


问:
Getting indexerror: list index out of range when switching between events
This is a part of my program in which I have created a table [key = '-TABLE-'] which displays candidate's frequently asked questions when the question is selected it will display the corresponding answer in Mline[key = 'Out']. I added search option to make it easy for user to search the question. It worked well but the problem I am facing now is after event == '-Table-' if I go for event == 'search' I am getting IndexError: list index out of range. How to prevent this from happening?

```<code>if d == ['process']:
    valofevent = 'candidate'
    Val_ans, Val_data = event_values()
    window_candidate = table_window()
    while True:
        event, values = window_candidate.read()
        if event == sg.WIN_CLOSED:
            break
        if event == '-TABLE-':
            data_selected = [Val_ans[row] for row in values[event]]
            print(values[event])
            window_candidate['Out'].update('Solution:' + '\n\n' + data_selected[0])

        if event == 'search':
            items = [x for x in flatten(Val_data) if values['aa'] in x]
            y=[[y] for y in items]
            print(y)
            window_candidate['-TABLE-'].update(y)
     window_candidate.close()

</code>```

I expecting to switch between event['-Table-'] and event['search'] at any point of time.

Body:
This is a part of my program in which I have created a table [key = '-TABLE-'] which displays candidate's frequently asked questions when the question is selected it will display the corresponding answer in Mline[key = 'Out']. I added search option to make it easy for user to search the question. It worked well but the problem I am facing now is after event == '-Table-' if I go for event == 'search' I am getting IndexError: list index out of range. How to prevent this from happening?

if d == ['process']:
    valofevent = 'candidate'
    Val_ans, Val_data = event_values()
    window_candidate = table_window()
    while True:
        event, values = window_candidate.read()
        if event == sg.WIN_CLOSED:
            break
        if event == '-TABLE-':
            data_selected = [Val_ans[row] for row in values[event]]
            print(values[event])
            window_candidate['Out'].update('Solution:' + '\n\n' + data_selected[0])

        if event == 'search':
            items = [x for x in flatten(Val_data) if values['aa'] in x]
            y=[[y] for y in items]
            print(y)
            window_candidate['-TABLE-'].update(y)
     window_candidate.close()

I expecting to switch between event['-Table-'] and event['search'] at any point of time.


问:
How to fix VS2022 17.4.3 Bug "The current .NET SDK does not support targeting .NET 7.0."?
I've been trying to begin development with .Net 7.0 in Visual Studio 17.4.3 (the latest version) and the option .NET 7.0 is not in the framework selection in the IDE.

I've installed the .NET 7.0.101 SDK and verified it from the command line.

C:\WINDOWS\system32>dotnet --info .NET SDK:  Version:   7.0.101  Commit:    bb24aafa11

Runtime Environment:  OS Name:     Windows  OS Version:  10.0.19045
OS Platform: Windows  RID:         win10-x64  Base Path:   D:\Program
Files\dotnet\sdk\7.0.101\

Host (useful for support):   Version: 6.0.5   Commit:  70ae3df4a6

.NET SDKs installed:
3.1.426 [D:\Program Files\dotnet\sdk]
5.0.203 [C:\Program Files\dotnet\sdk]
5.0.214 [D:\Program Files\dotnet\sdk]
5.0.401 [C:\Program Files\dotnet\sdk]
5.0.403 [C:\Program Files\dotnet\sdk]
5.0.408 [C:\Program Files\dotnet\sdk]
5.0.415 [D:\Program Files\dotnet\sdk]
6.0.202 [C:\Program Files\dotnet\sdk]
6.0.404 [D:\Program Files\dotnet\sdk]
7.0.101 [D:\Program Files\dotnet\sdk]

.NET runtimes installed:   Microsoft.AspNetCore.All 2.1.28 [C:\Program
Files\dotnet\shared\Microsoft.AspNetCore.All]

Microsoft.AspNetCore.All 2.1.30 [D:\Program
Files\dotnet\shared\Microsoft.AspNetCore.All]

Microsoft.AspNetCore.App 2.1.28 [C:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]

Microsoft.AspNetCore.App 2.1.30 [D:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]

Microsoft.AspNetCore.App 3.1.15 [C:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]

Microsoft.AspNetCore.App 3.1.19 [C:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]

Microsoft.AspNetCore.App 3.1.21 [C:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]

Microsoft.AspNetCore.App 3.1.32 [D:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]

Microsoft.AspNetCore.App 5.0.6 [C:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]

Microsoft.AspNetCore.App 5.0.9 [C:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]

Microsoft.AspNetCore.App 5.0.10 [C:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]

Microsoft.AspNetCore.App 5.0.12 [C:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]

Microsoft.AspNetCore.App 5.0.13 [C:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]

Microsoft.AspNetCore.App 5.0.17 [D:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]

Microsoft.AspNetCore.App 6.0.5 [C:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]

Microsoft.AspNetCore.App 6.0.12 [D:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]

Microsoft.AspNetCore.App 7.0.1 [D:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]   Microsoft.NETCore.App
2.1.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]   Microsoft.NETCore.App 2.1.30 [D:\Program
Files\dotnet\shared\Microsoft.NETCore.App]   Microsoft.NETCore.App
3.1.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]   Microsoft.NETCore.App 3.1.19 [C:\Program
Files\dotnet\shared\Microsoft.NETCore.App]   Microsoft.NETCore.App
3.1.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]   Microsoft.NETCore.App 3.1.32 [D:\Program
Files\dotnet\shared\Microsoft.NETCore.App]   Microsoft.NETCore.App
5.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]   Microsoft.NETCore.App 5.0.9 [C:\Program
Files\dotnet\shared\Microsoft.NETCore.App]   Microsoft.NETCore.App
5.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]   Microsoft.NETCore.App 5.0.12 [C:\Program
Files\dotnet\shared\Microsoft.NETCore.App]   Microsoft.NETCore.App
5.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]   Microsoft.NETCore.App 5.0.17 [D:\Program
Files\dotnet\shared\Microsoft.NETCore.App]   Microsoft.NETCore.App
6.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]   Microsoft.NETCore.App 6.0.5 [C:\Program
Files\dotnet\shared\Microsoft.NETCore.App]   Microsoft.NETCore.App
6.0.12 [D:\Program Files\dotnet\shared\Microsoft.NETCore.App]   Microsoft.NETCore.App 7.0.1 [D:\Program
Files\dotnet\shared\Microsoft.NETCore.App]

Microsoft.WindowsDesktop.App 3.1.15 [C:\Program
Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Microsoft.WindowsDesktop.App 3.1.19 [C:\Program
Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Microsoft.WindowsDesktop.App 3.1.21 [C:\Program
Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Microsoft.WindowsDesktop.App 3.1.32 [D:\Program
Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Microsoft.WindowsDesktop.App 5.0.6 [C:\Program
Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Microsoft.WindowsDesktop.App 5.0.9 [C:\Program
Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Microsoft.WindowsDesktop.App 5.0.10 [C:\Program
Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Microsoft.WindowsDesktop.App 5.0.12 [C:\Program
Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Microsoft.WindowsDesktop.App 5.0.13 [C:\Program
Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Microsoft.WindowsDesktop.App 5.0.17 [D:\Program
Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Microsoft.WindowsDesktop.App 6.0.4 [C:\Program
Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Microsoft.WindowsDesktop.App 6.0.5 [C:\Program
Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Microsoft.WindowsDesktop.App 6.0.12 [D:\Program
Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Microsoft.WindowsDesktop.App 7.0.1 [D:\Program
Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:

https://aka.ms/dotnet-download

I've verified that .NET 7.0 is checked in the VS installer as well.
I've reinstalled VS2022 completely a couple of times over the last few days attempting to resolve the issue, but alas, cannot find one.
Still stuck with .NET 6.0 and cannot find a solution to this anywhere and have tried all the recommendations on Microsoft's website to the best of my ability.

I believe this may be due to VS2022 being installed on Drive D:\ and it cannot find this framework (though ALL other frameworks display correctly!) and MS introduced a path bug, but I have no idea where to look or where to start (and don't wish to destroy my configurations for all my other, older projects).

Any ideas on how to workaround this bug?


问:
How should I update a component's state several times simultaneously in React.js?
I am making a simple React.js website, without Redux.
I have a component, A, that procedurally makes x children, all of which are another component, B.
When the component B is created, it is given a reference to A, and it then updates the state of A, by adding to a list field in the state.

This causes an issue - all of the B components attempt to chance the state of A at the same time, and thus, all of them fire the setState method with the list field being an empty list - [].
And then, the list field incorrectly become a list with only one element.

How would one go about updating A's state several times, at the same time?

Here's what's happened in practice:

EXPECTED RESULT: A's titleList includes many elements.
ACTUAL RESULT: A's titleList includes only one element.

A's GeneratePathNode() (which is indeed binded):

```<code>GeneratePathNode() {
    let directionlessTextElements = [ // ... many <div/>'s
    ];

    return <>
        {
            directionlessTextElements.map((element, i) => {
                let textElement = element;
                return <MyPathNode textElement={textElement}
                                   InsertTitleToParent={this.InsertTitleToParent}
                                    key={i}/>;
            })
        }
    </>;
}
</code>```

A's InsertTitleToParent():

```<code>// Passed as a prop to the MyPathNode's.
InsertTitleToParent(title){
    this.setState({titleList: [...this.state.titleList, title]});
    console.log([...this.state.titleList, title]);  // Prints only a single element in a list.
}
</code>```

A's render():

```<code>render() {
    return (
        <div>
            {/*A lot of irrelevant elements*/}

            {this.GeneratePathNode()}

            {/*A lot of irrelevant elements*/}
    );
}
</code>```

B's constructor():

```<code>constructor(props) {
        super(props);
        // ... A lot of irrelevant code lines.
        let titleText = "some text";
        this.props.InsertTitleToParent(titleText);
    }
</code>```

Body:
I am making a simple React.js website, without Redux.
I have a component, A, that procedurally makes x children, all of which are another component, B.
When the component B is created, it is given a reference to A, and it then updates the state of A, by adding to a list field in the state.

This causes an issue - all of the B components attempt to chance the state of A at the same time, and thus, all of them fire the setState method with the list field being an empty list - [].
And then, the list field incorrectly become a list with only one element.

How would one go about updating A's state several times, at the same time?

Here's what's happened in practice:

EXPECTED RESULT: A's titleList includes many elements.
ACTUAL RESULT: A's titleList includes only one element.

A's GeneratePathNode() (which is indeed binded):

GeneratePathNode() {
    let directionlessTextElements = [ // ... many
's
    ];

    return <>
        {
            directionlessTextElements.map((element, i) => {
                let textElement = element;
                return <MyPathNode textElement={textElement}
                                   InsertTitleToParent={this.InsertTitleToParent}
                                    key={i}/>;
            })
        }
    </>;
}

A's InsertTitleToParent():

// Passed as a prop to the MyPathNode's.
InsertTitleToParent(title){
    this.setState({titleList: [...this.state.titleList, title]});
    console.log([...this.state.titleList, title]);  // Prints only a single element in a list.
}

A's render():

render() {
    return (

            {/*A lot of irrelevant elements*/}

            {this.GeneratePathNode()}

            {/*A lot of irrelevant elements*/}
    );
}

B's constructor():

constructor(props) {
        super(props);
        // ... A lot of irrelevant code lines.
        let titleText = "some text";
        this.props.InsertTitleToParent(titleText);
    }