问:
GTKMM4 app is crashing on calling window hide()
In my ubuntu 20.04 and Windows 10, I installed GTKMM4 with VCPKG since the normal installation of GTKMM4 is not available.

Then I downloaded this example from the gnome tutorial page and added this cmake.

On clicking the close button, which calls the window hide, the app is crashing in Ubuntu alone and no issue is there in windows setup.

The backtrace is given below.

```<code>Thread 1 "gtkmmtes2" received signal SIGSEGV, Segmentation fault.
0x00007ffff7146ad4 in g_str_hash () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
(gdb) bt
#0  0x00007ffff7146ad4 in g_str_hash () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#1  0x00007ffff7145c5c in g_hash_table_contains () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#2  0x00007ffff70369e8 in gtk_at_spi_cache_remove_context () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#3  0x00007ffff70395c4 in gtk_at_spi_context_unrealize () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#4  0x00007ffff6d08f87 in gtk_at_context_unrealize () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#5  0x00007ffff6f7c7f9 in gtk_window_unmap () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#6  0x0000555555741304 in Gtk::Widget_Class::unmap_callback(_GtkWidget*) ()
#7  0x00007ffff7229abe in g_closure_invoke () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#8  0x00007ffff723fe39 in signal_emit_unlocked_R () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#9  0x00007ffff724cafd in g_signal_emit_valist () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#10 0x00007ffff724cfc3 in g_signal_emit () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#11 0x00007ffff6f6069a in gtk_widget_unmap () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#12 0x00007ffff6f7c869 in gtk_window_hide () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#13 0x00005555557417dd in Gtk::Widget_Class::hide_callback(_GtkWidget*) ()
#14 0x00007ffff7229abe in g_closure_invoke () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#15 0x00007ffff723fe39 in signal_emit_unlocked_R () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#16 0x00007ffff724cafd in g_signal_emit_valist () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#17 0x00007ffff724cfc3 in g_signal_emit () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#18 0x00007ffff6f6bbbc in gtk_widget_hide () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#19 0x000055555572a064 in ExampleWindow::on_action_file_quit() ()
#20 0x000055555572d3ed in void std::__invoke_impl<void, void (ExampleWindow::* const&)(), ExampleWindow&>(std::__invoke_memfun_ref, void (ExampleWindow::* const&)(), ExampleWindow&) ()
#21 0x000055555572d0fc in std::__invoke_result<void (ExampleWindow::* const&)(), ExampleWindow&>::type std::__invoke<void (ExampleWindow::* const&)(), ExampleWindow&>(void (ExampleWindow::* const&)(), ExampleWindow&) ()

</code>```

The issue is easily reproducible with any window and hide() function in Ubuntu.
Also I'm seeing the following warnings with every gtkmm4 app in Ubuntu.

```<code>(gtkmmtes2:567918): GLib-GIO-CRITICAL **: 09:24:41.966: g_dbus_connection_emit_signal: assertion 'object_path != NULL && g_variant_is_object_path (object_path)' failed
</code>```

Components installed with VCPKG

```<code>root@renju-ubuntu:~# vcpkg list
atk:x64-linux                                     2.38.0#3            GNOME Accessibility Toolkit
atkmm:x64-linux                                   2.36.1              atkmm is the official C++ interface for the ATK ...
brotli:x64-linux                                  1.0.9#3             a generic-purpose lossless compression algorithm...
bzip2:x64-linux                                   1.0.8#3             bzip2 is a freely available, patent free, high-q...
bzip2[tool]:x64-linux                                                 Builds bzip2 executable
cairo:x64-linux                                   1.17.6#4            Cairo is a 2D graphics library with support for ...
cairo[fontconfig]:x64-linux                                           build with fontconfig
cairo[freetype]:x64-linux                                             use the freetype font backend
cairo[gobject]:x64-linux                                              build gobject module
cairo[x11]:x64-linux                                                  build with x11 support
cairomm:x64-linux                                 1.16.2#1            A C++ wrapper for the cairo graphics library
dirent:x64-linux                                  1.23.2#1            Dirent is a C/C++ programming interface that all...
egl-registry:x64-linux                            2022-09-20          the EGL API and Extension Registry
expat:x64-linux                                   2.5.0#1             XML parser library written in C
fontconfig:x64-linux                              2.14.1              Library for configuring and customizing font acc...
freetype:x64-linux                                2.12.1#2            A library to render fonts.
freetype[brotli]:x64-linux                                            Support decompression of WOFF2 streams
freetype[bzip2]:x64-linux                                             Support bzip2 compressed fonts.
freetype[png]:x64-linux                                               Support PNG compressed OpenType embedded bitmaps.
freetype[zlib]:x64-linux                                              Use zlib instead of internal library for DEFLATE
fribidi:x64-linux                                 1.0.12              GNU FriBidi is an implementation of the Unicode ...
gdk-pixbuf:x64-linux                              2.42.9#3            Image loading library.
getopt:x64-linux                                  0#2                 The getopt and getopt_long functions automate so...
gettext:x64-linux                                 0.21#9              GNU gettext provides libintl and a set of tools ...
gettext[tools]:x64-linux                                              Build gettext tools
glib:x64-linux                                    2.74.1              Portable, general-purpose utility library.
glibmm:x64-linux                                  2.74.0              This is glibmm, a C++ API for parts of glib that...
gperf:x64-linux                                   3.1#4               GNU perfect hash function generator
graphene:x64-linux                                1.10.8              A thin layer of types for graphic libraries.
gtk:x64-linux                                     4.6.8               Portable library for creating graphical user int...
gtkmm:x64-linux                                   4.6.0               gtkmm is the official C++ interface for the popu...
harfbuzz:x64-linux                                5.0.1#3             HarfBuzz OpenType text shaping engine
libepoxy:x64-linux                                1.5.10#1            Epoxy is a library for handling OpenGL function ...
libffi:x64-linux                                  3.4.4               Portable, high level programming interface to va...
libiconv:x64-linux                                1.17                GNU Unicode text conversion
libjpeg-turbo:x64-linux                           2.1.4               libjpeg-turbo is a JPEG image codec that uses SI...
liblzma:x64-linux                                 5.2.5#6             Compression library with an API similar to that ...
libpng:x64-linux                                  1.6.38              libpng is a library implementing an interface fo...
libsass:x64-linux                                 3.6.5#1             LibSass - Sass compiler written in C++
libsigcpp-3:x64-linux                             3.0.3#1             Typesafe callback framework for C++
libsigcpp:x64-linux                               3.2.0               Typesafe callback framework for C++
libuuid:x64-linux                                 1.0.3#11            Universally unique id library
lzo:x64-linux                                     2.10#7              Lossless data compression library
pango:x64-linux                                   1.50.11             Text and font handling library.
pangomm:x64-linux                                 2.50.1              pangomm is the official C++ interface for the Pa...
pcre2:x64-linux                                   10.40#1             Regular Expression pattern matching using the sa...
pcre:x64-linux                                    8.45#5              Perl Compatible Regular Expressions
pixman:x64-linux                                  0.40.0#4            Pixman is a low-level software library for pixel...
pthread:x64-linux                                 3.0.0#1             empty package, linking to other port
pthreads:x64-linux                                3.0.0#12            Meta-package that provides PThreads4W on Windows...
sassc:x64-linux                                   3.6.2               SassC is a wrapper around libsass (http://github...
tiff:x64-linux                                    4.4.0#1             A library that supports the manipulation of TIFF...
tiff[jpeg]:x64-linux                                                  Support JPEG compression in TIFF image files
tiff[lzma]:x64-linux                                                  Support LZMA compression in TIFF image files
tiff[zip]:x64-linux                                                   Support ZIP/deflate compression in TIFF image files
vcpkg-cmake-config:x64-linux                      2022-02-06#1
vcpkg-cmake:x64-linux                             2022-10-30
vcpkg-tool-meson:x64-linux                        0.63                Meson build system
zlib:x64-linux                                    1.2.13              A compression library

</code>```

Body:
In my ubuntu 20.04 and Windows 10, I installed GTKMM4 with VCPKG since the normal installation of GTKMM4 is not available.

Then I downloaded this example from the gnome tutorial page and added this cmake.

On clicking the close button, which calls the window hide, the app is crashing in Ubuntu alone and no issue is there in windows setup.

The backtrace is given below.

Thread 1 "gtkmmtes2" received signal SIGSEGV, Segmentation fault.
0x00007ffff7146ad4 in g_str_hash () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
(gdb) bt
#0  0x00007ffff7146ad4 in g_str_hash () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#1  0x00007ffff7145c5c in g_hash_table_contains () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#2  0x00007ffff70369e8 in gtk_at_spi_cache_remove_context () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#3  0x00007ffff70395c4 in gtk_at_spi_context_unrealize () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#4  0x00007ffff6d08f87 in gtk_at_context_unrealize () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#5  0x00007ffff6f7c7f9 in gtk_window_unmap () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#6  0x0000555555741304 in Gtk::Widget_Class::unmap_callback(_GtkWidget*) ()
#7  0x00007ffff7229abe in g_closure_invoke () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#8  0x00007ffff723fe39 in signal_emit_unlocked_R () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#9  0x00007ffff724cafd in g_signal_emit_valist () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#10 0x00007ffff724cfc3 in g_signal_emit () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#11 0x00007ffff6f6069a in gtk_widget_unmap () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#12 0x00007ffff6f7c869 in gtk_window_hide () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#13 0x00005555557417dd in Gtk::Widget_Class::hide_callback(_GtkWidget*) ()
#14 0x00007ffff7229abe in g_closure_invoke () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#15 0x00007ffff723fe39 in signal_emit_unlocked_R () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#16 0x00007ffff724cafd in g_signal_emit_valist () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#17 0x00007ffff724cfc3 in g_signal_emit () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#18 0x00007ffff6f6bbbc in gtk_widget_hide () from /root/programs/vcpkg//packages/gtk_x64-linux/lib/libgtk-4.so.1
#19 0x000055555572a064 in ExampleWindow::on_action_file_quit() ()
#20 0x000055555572d3ed in void std::__invoke_impl<void, void (ExampleWindow::* const&)(), ExampleWindow&>(std::__invoke_memfun_ref, void (ExampleWindow::* const&)(), ExampleWindow&) ()
#21 0x000055555572d0fc in std::__invoke_result<void (ExampleWindow::* const&)(), ExampleWindow&>::type std::__invoke<void (ExampleWindow::* const&)(), ExampleWindow&>(void (ExampleWindow::* const&)(), ExampleWindow&) ()

The issue is easily reproducible with any window and hide() function in Ubuntu.
Also I'm seeing the following warnings with every gtkmm4 app in Ubuntu.

(gtkmmtes2:567918): GLib-GIO-CRITICAL **: 09:24:41.966: g_dbus_connection_emit_signal: assertion 'object_path != NULL && g_variant_is_object_path (object_path)' failed

Components installed with VCPKG

root@renju-ubuntu:~# vcpkg list
atk:x64-linux                                     2.38.0#3            GNOME Accessibility Toolkit
atkmm:x64-linux                                   2.36.1              atkmm is the official C++ interface for the ATK ...
brotli:x64-linux                                  1.0.9#3             a generic-purpose lossless compression algorithm...
bzip2:x64-linux                                   1.0.8#3             bzip2 is a freely available, patent free, high-q...
bzip2[tool]:x64-linux                                                 Builds bzip2 executable
cairo:x64-linux                                   1.17.6#4            Cairo is a 2D graphics library with support for ...
cairo[fontconfig]:x64-linux                                           build with fontconfig
cairo[freetype]:x64-linux                                             use the freetype font backend
cairo[gobject]:x64-linux                                              build gobject module
cairo[x11]:x64-linux                                                  build with x11 support
cairomm:x64-linux                                 1.16.2#1            A C++ wrapper for the cairo graphics library
dirent:x64-linux                                  1.23.2#1            Dirent is a C/C++ programming interface that all...
egl-registry:x64-linux                            2022-09-20          the EGL API and Extension Registry
expat:x64-linux                                   2.5.0#1             XML parser library written in C
fontconfig:x64-linux                              2.14.1              Library for configuring and customizing font acc...
freetype:x64-linux                                2.12.1#2            A library to render fonts.
freetype[brotli]:x64-linux                                            Support decompression of WOFF2 streams
freetype[bzip2]:x64-linux                                             Support bzip2 compressed fonts.
freetype[png]:x64-linux                                               Support PNG compressed OpenType embedded bitmaps.
freetype[zlib]:x64-linux                                              Use zlib instead of internal library for DEFLATE
fribidi:x64-linux                                 1.0.12              GNU FriBidi is an implementation of the Unicode ...
gdk-pixbuf:x64-linux                              2.42.9#3            Image loading library.
getopt:x64-linux                                  0#2                 The getopt and getopt_long functions automate so...
gettext:x64-linux                                 0.21#9              GNU gettext provides libintl and a set of tools ...
gettext[tools]:x64-linux                                              Build gettext tools
glib:x64-linux                                    2.74.1              Portable, general-purpose utility library.
glibmm:x64-linux                                  2.74.0              This is glibmm, a C++ API for parts of glib that...
gperf:x64-linux                                   3.1#4               GNU perfect hash function generator
graphene:x64-linux                                1.10.8              A thin layer of types for graphic libraries.
gtk:x64-linux                                     4.6.8               Portable library for creating graphical user int...
gtkmm:x64-linux                                   4.6.0               gtkmm is the official C++ interface for the popu...
harfbuzz:x64-linux                                5.0.1#3             HarfBuzz OpenType text shaping engine
libepoxy:x64-linux                                1.5.10#1            Epoxy is a library for handling OpenGL function ...
libffi:x64-linux                                  3.4.4               Portable, high level programming interface to va...
libiconv:x64-linux                                1.17                GNU Unicode text conversion
libjpeg-turbo:x64-linux                           2.1.4               libjpeg-turbo is a JPEG image codec that uses SI...
liblzma:x64-linux                                 5.2.5#6             Compression library with an API similar to that ...
libpng:x64-linux                                  1.6.38              libpng is a library implementing an interface fo...
libsass:x64-linux                                 3.6.5#1             LibSass - Sass compiler written in C++
libsigcpp-3:x64-linux                             3.0.3#1             Typesafe callback framework for C++
libsigcpp:x64-linux                               3.2.0               Typesafe callback framework for C++
libuuid:x64-linux                                 1.0.3#11            Universally unique id library
lzo:x64-linux                                     2.10#7              Lossless data compression library
pango:x64-linux                                   1.50.11             Text and font handling library.
pangomm:x64-linux                                 2.50.1              pangomm is the official C++ interface for the Pa...
pcre2:x64-linux                                   10.40#1             Regular Expression pattern matching using the sa...
pcre:x64-linux                                    8.45#5              Perl Compatible Regular Expressions
pixman:x64-linux                                  0.40.0#4            Pixman is a low-level software library for pixel...
pthread:x64-linux                                 3.0.0#1             empty package, linking to other port
pthreads:x64-linux                                3.0.0#12            Meta-package that provides PThreads4W on Windows...
sassc:x64-linux                                   3.6.2               SassC is a wrapper around libsass (http://github...
tiff:x64-linux                                    4.4.0#1             A library that supports the manipulation of TIFF...
tiff[jpeg]:x64-linux                                                  Support JPEG compression in TIFF image files
tiff[lzma]:x64-linux                                                  Support LZMA compression in TIFF image files
tiff[zip]:x64-linux                                                   Support ZIP/deflate compression in TIFF image files
vcpkg-cmake-config:x64-linux                      2022-02-06#1
vcpkg-cmake:x64-linux                             2022-10-30
vcpkg-tool-meson:x64-linux                        0.63                Meson build system
zlib:x64-linux                                    1.2.13              A compression library


来源: stackexchange

问:
Mat Dialog boxes close button and overlay is not working on iphone 8plus and lower versions
iam using angular material for dialog boxes and popups,but when i tested the website in iphone 8 and 8plus iam not able to close dialog box and the background overlay also not available.

this is my package.json file configuration

```<code>    "@angular-slider/ngx-slider": "^2.0.4",
    "@angular/animations": "^14.2.7",
    "@angular/cdk": "^14.2.7",
    "@angular/common": "^14.0.0",
    "@angular/core": "^14.0.0",
    "@angular/forms": "^14.0.0",
    "@angular/material": "^14.2.7",
    "@angular/platform-browser": "^14.0.0",
    "@angular/platform-browser-dynamic": "^14.0.0",
    "@angular/router": "^14.0.0",
    "@capacitor/app": "1.1.1",
</code>```

i tried available solution from this question
MatDialog dialog from Angular Material is not closing

but it's not working for me and iam able to close dialog boxes in higher iphone and android devices

iam calling this function to close dialog-box

```<code>this.dialogRef.close({});
</code>```

ContentLicense: CC BY-SA 4.0

Body:
iam using angular material for dialog boxes and popups,but when i tested the website in iphone 8 and 8plus iam not able to close dialog box and the background overlay also not available.

this is my package.json file configuration

    "@angular-slider/ngx-slider": "^2.0.4",
    "@angular/animations": "^14.2.7",
    "@angular/cdk": "^14.2.7",
    "@angular/common": "^14.0.0",
    "@angular/core": "^14.0.0",
    "@angular/forms": "^14.0.0",
    "@angular/material": "^14.2.7",
    "@angular/platform-browser": "^14.0.0",
    "@angular/platform-browser-dynamic": "^14.0.0",
    "@angular/router": "^14.0.0",
    "@capacitor/app": "1.1.1",

i tried available solution from this question
MatDialog dialog from Angular Material is not closing

but it's not working for me and iam able to close dialog boxes in higher iphone and android devices

iam calling this function to close dialog-box

this.dialogRef.close({});


问:
Is there any way to achieve Connection Pool on Inbound gateway(Channel) in Spring Integration
```<code>@Bean
public AbstractServerConnectionFactory serverConnectionFactory() {
    TcpNetServerConnectionFactory serverConnectionFactory = new TcpNetServerConnectionFactory(port);
    serverConnectionFactory.setDeserializer(new InboundCustomStxEtxHeaderLengthSerializer());
    serverConnectionFactory.setSerializer(new InboundCustomStxEtxHeaderLengthSerializer());
    // serverConnectionFactory.setSoTcpNoDelay(true);
    // serverConnectionFactory.setSoKeepAlive(true);
    // serverConnectionFactory.setUsingDirectBuffers(true);
    // serverConnectionFactory.setSoTimeout(50000);
    serverConnectionFactory.setSingleUse(true);
    serverConnectionFactory.setBacklog(4000);
    return serverConnectionFactory;
}
</code>```

Connection Pooling on AbstractServerConnectionFactory

Body:
@Bean
public AbstractServerConnectionFactory serverConnectionFactory() {
    TcpNetServerConnectionFactory serverConnectionFactory = new TcpNetServerConnectionFactory(port);
    serverConnectionFactory.setDeserializer(new InboundCustomStxEtxHeaderLengthSerializer());
    serverConnectionFactory.setSerializer(new InboundCustomStxEtxHeaderLengthSerializer());
    // serverConnectionFactory.setSoTcpNoDelay(true);
    // serverConnectionFactory.setSoKeepAlive(true);
    // serverConnectionFactory.setUsingDirectBuffers(true);
    // serverConnectionFactory.setSoTimeout(50000);
    serverConnectionFactory.setSingleUse(true);
    serverConnectionFactory.setBacklog(4000);
    return serverConnectionFactory;
}

Connection Pooling on AbstractServerConnectionFactory


问:
Can't get namespaced PHP class to load using string type variable, yet just naming the instance the same thing works?
So I have a file lookup.php that's using spl_autoload_register() at the top. It's also namedspaced as "App\Http\Controllers\StaticObjects"

Within the file I have a method that's used to load in classes dynamically based on an array.

```<code>foreach ($this->arrayOfRulesMessages as $value) {
   //$value = 'Terms1';
   $path = 'RulesAndMessages\'.$value;
   $obj = new $path();
}
</code>```

This keeps throwing an error saying "Class XXX not found."

Yet when I just use the non-variable way of instantiating the object, like below, everything works fine.

```<code>$obj = RulesAndMessages\Terms1
</code>```

I don't understand how the variable way of doing this isn't working.

Body:
So I have a file lookup.php that's using spl_autoload_register() at the top. It's also namedspaced as "App\Http\Controllers\StaticObjects"

Within the file I have a method that's used to load in classes dynamically based on an array.

foreach ($this->arrayOfRulesMessages as $value) {
   //$value = 'Terms1';
   $path = 'RulesAndMessages\'.$value;
   $obj = new $path();
}

This keeps throwing an error saying "Class XXX not found."

Yet when I just use the non-variable way of instantiating the object, like below, everything works fine.

$obj = RulesAndMessages\Terms1

I don't understand how the variable way of doing this isn't working.


问:
iOS MetalKit: Loop through array in MSL
This seems to be a silly question, but I can't find a good way to loop through an array and currently, I have to pass a buffer that contains the element count to my kernel function.

```<code>kernel void test_func(constant const int2* array [[ buffer(0) ]],
                      constant const int& arrayCount [[ buffer(1) ]],
                      device half4* result [[ buffer(2) ]],
                      uint2 pos [[thread_position_in_grid]]) {
  // some code to end early if pos is outside of my data
  for(ulong i = 0; i < sizeof(array) / sizeof(int2) /*(ulong) arrayCount*/; i += 1 ) {
    // do something
  }
}
</code>```

Calculation using sizeof always yields incorrect results, on the other hand, using the count buffer return correct results. Seems like MSL doesn't support for each loop of c++ 11.

There should be a better way to do this, right?

Title: iOS MetalKit: Loop through array in MSL

Body:
This seems to be a silly question, but I can't find a good way to loop through an array and currently, I have to pass a buffer that contains the element count to my kernel function.

kernel void test_func(constant const int2* array [[ buffer(0) ]],
                      constant const int& arrayCount [[ buffer(1) ]],
                      device half4* result [[ buffer(2) ]],
                      uint2 pos [[thread_position_in_grid]]) {
  // some code to end early if pos is outside of my data
  for(ulong i = 0; i < sizeof(array) / sizeof(int2) /*(ulong) arrayCount*/; i += 1 ) {
    // do something
  }
}

Calculation using sizeof always yields incorrect results, on the other hand, using the count buffer return correct results. Seems like MSL doesn't support for each loop of c++ 11.

There should be a better way to do this, right?


问:
how to use update_or_create in django createview
I want to update_or_create object by django CreateView.
my class problem is update object but create duplicate of updated object</p>
```<code>class CardexCreateView(LoginRequiredMixin, CreateView):
    model = Cardex
    fields = '__all__'
    template_name = 'cardex_add.html'

    def get_success_url(self):
        return reverse('cardexes-list')

    def form_valid(self, form):
        product = Stock.objects.get(pk=1)
        self.object, _ = Cardex.objects.update_or_create(
            product=product, defaults={'standard_weight': 10}
        )
        return super(CardexCreateView, self).form_valid(form)
</code>```

Body:
I want to update_or_create object by django CreateView.
my class problem is update object but create duplicate of updated object

class CardexCreateView(LoginRequiredMixin, CreateView):
    model = Cardex
    fields = '__all__'
    template_name = 'cardex_add.html'

    def get_success_url(self):
        return reverse('cardexes-list')

    def form_valid(self, form):
        product = Stock.objects.get(pk=1)
        self.object, _ = Cardex.objects.update_or_create(
            product=product, defaults={'standard_weight': 10}
        )
        return super(CardexCreateView, self).form_valid(form)


问:
Browser Extension Error in React Build App
I have made a web based application in react js. I need to RUN this application by using browser extension.

I have make a build and uploaded files under account extensions add-on. manifest.json file looks like OK and validated

I am getting below error:

Firefox: Access to the file was denied. The file at moz-extension://27a7491c-7148-46cb-92be-8bf49da869b5/ReferralHistory is not readable. It may have been removed, moved, or file permissions may be preventing access.

Chrome: It may have been moved, edited, or deleted ERR_FILE_NOT_FOUND

Please help and Thanks


问:
Weird CSS when using FloatingLabel with InputGroup components of react-bootstrap
I am trying to use a FloatingLabel component alongside an InpuGroup component of the react-bootstrap package. I am able to get the inputs grouped but the height of the InputGroup.Text is greater than the FloatingLabel input.

Weird CSS when using FloatingLabel with InputGroup components of react-bootstrap

```<code><InputGroup>
    <FloatingLabel label="Email Address" className="mb-3">
        <Form.Control id="floatingEmail" type="email" name="email" placeholder="email" value={person.email} onChange={updatePersonDetails} />
    </FloatingLabel>
    <InputGroup.Text>@crestdatasys.com</InputGroup.Text>
</InputGroup>
</code>```

Is there any known solution or workaround to fix the CSS? Or am I making some mistake with calling the components in wrong order?

Body:
I am trying to use a FloatingLabel component alongside an InpuGroup component of the react-bootstrap package. I am able to get the inputs grouped but the height of the InputGroup.Text is greater than the FloatingLabel input.

Weird CSS when using FloatingLabel with InputGroup components of react-bootstrap

<InputGroup>
    <FloatingLabel label="Email Address" className="mb-3">
        <Form.Control id="floatingEmail" type="email" name="email" placeholder="email" value={person.email} onChange={updatePersonDetails} />
    </FloatingLabel>
    <InputGroup.Text>@crestdatasys.com</InputGroup.Text>
</InputGroup>

Is there any known solution or workaround to fix the CSS? Or am I making some mistake with calling the components in wrong order?


问:
I'm trying to get data from my realtime database temperature but i keep getting this error on my Event
I tried changing the event to snapshot but the result is still the same any idea? I've also tried to use firebase_core but the problem still presist.</p>
```<code>  void initState() {
    super.initState();
    Firebase.initializeApp().then((value) {
      final databaseReference = FirebaseDatabase.instance.reference();
      databaseReference.child("temp").onValue.listen((Event event) {
        setState(() {
          _temperature = event.snapshot.value;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              "${_temperature.toString()}°")
</code>```

Body:
I tried changing the event to snapshot but the result is still the same any idea? I've also tried to use firebase_core but the problem still presist.

  void initState() {
    super.initState();
    Firebase.initializeApp().then((value) {
      final databaseReference = FirebaseDatabase.instance.reference();
      databaseReference.child("temp").onValue.listen((Event event) {
        setState(() {
          _temperature = event.snapshot.value;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              "${_temperature.toString()}°")


问:
How to fix Py2app being unable to access image files?
Bear with me I'm a python newbie trying to make a simple py2app that can create a basic template   mc resourcepack, with all the nested folders, dependencies, etc.

I have managed to create the application, and the folder is created, everything is running smoothly except that I am unable to access the image files no matter what I try.

Here is the folder structure:
Vine.app/Contents/Resources/image files + pyfile that is being run

I am on MacOs and using the PIL library to handle the images
Running the .py file itself makes everything work fine but not when run through the .app

This is what I have tried:

```<code>packimage = Image.open('pack.png')
packimage = packimage.save('vinepack/pack.png')
</code>```
```<code>packimage = Image.open('Contents/pack.png')
packimage = packimage.save('vinepack/pack.png')
</code>```
```<code>packimage = Image.open('Resources/Contents/pack.png')
packimage = packimage.save('vinepack/pack.png')
</code>```

Setup.py file used to make the app:

```<code>"""
This is a setup.py script generated by py2applet

Usage:
    python setup.py py2app
"""

from setuptools import setup

APP = ['Vine.py']
DATA_FILES = ['pack.png', 'MobTextures/allay.png', 'MobTextures/bat.png', 'MobTextures/bee.png', 'MobTextures/big_sea_turtle.png', 'MobTextures/blaze.png', 'MobTextures/cave_spider.png', 'MobTextures/chicken.png', 'MobTextures/cod.png', 'MobTextures/cow.png', 'MobTextures/dragon.png', 'MobTextures/drowned.png', 'MobTextures/enderman.png', 'MobTextures/endermite.png', 'MobTextures/evoker.png', 'MobTextures/fox.png', 'MobTextures/glow_squid.png', 'MobTextures/goat.png', 'MobTextures/hoglin.png', 'MobTextures/husk.png', 'MobTextures/illusioner.png', 'MobTextures/iron_golem.png', 'MobTextures/magmacube.png', 'MobTextures/ocelot.png', 'MobTextures/panda.png', 'MobTextures/phantom.png', 'MobTextures/pig.png', 'MobTextures/piglin.png', 'MobTextures/pillager.png', 'MobTextures/polarbear.png', 'MobTextures/pufferfish.png', 'MobTextures/ravager.png', 'MobTextures/salmon.png', 'MobTextures/sheep.png', 'MobTextures/silverfish.png', 'MobTextures/skeleton.png', 'MobTextures/slime.png', 'MobTextures/spider.png', 'MobTextures/squid.png', 'MobTextures/stray.png', 'MobTextures/strider.png', 'MobTextures/tadpole.png', 'MobTextures/vex.png', 'MobTextures/vindicator.png', 'MobTextures/wandering_trader.png', 'MobTextures/warden.png', 'MobTextures/witch.png', 'MobTextures/wither.png', 'MobTextures/zoglin.png', 'MobTextures/zombie.png']
OPTIONS = {'iconfile': 'icon.icns',
    }

setup(
    app=APP,
    APP_NAME = "Vine",
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],

)
</code>```

Thank you very much in advance for any help you can offer!
(Please I have been struggling/crying for 4 hours now)

Body:
Bear with me I'm a python newbie trying to make a simple py2app that can create a basic template   mc resourcepack, with all the nested folders, dependencies, etc.

I have managed to create the application, and the folder is created, everything is running smoothly except that I am unable to access the image files no matter what I try.

Here is the folder structure:
Vine.app/Contents/Resources/image files + pyfile that is being run

I am on MacOs and using the PIL library to handle the images
Running the .py file itself makes everything work fine but not when run through the .app

This is what I have tried:

packimage = Image.open('pack.png')
packimage = packimage.save('vinepack/pack.png')

packimage = Image.open('Contents/pack.png')
packimage = packimage.save('vinepack/pack.png')

packimage = Image.open('Resources/Contents/pack.png')
packimage = packimage.save('vinepack/pack.png')

Setup.py file used to make the app:

"""
This is a setup.py script generated by py2applet

Usage:
    python setup.py py2app
"""

from setuptools import setup

APP = ['Vine.py']
DATA_FILES = ['pack.png', 'MobTextures/allay.png', 'MobTextures/bat.png', 'MobTextures/bee.png', 'MobTextures/big_sea_turtle.png', 'MobTextures/blaze.png', 'MobTextures/cave_spider.png', 'MobTextures/chicken.png', 'MobTextures/cod.png', 'MobTextures/cow.png', 'MobTextures/dragon.png', 'MobTextures/drowned.png', 'MobTextures/enderman.png', 'MobTextures/endermite.png', 'MobTextures/evoker.png', 'MobTextures/fox.png', 'MobTextures/glow_squid.png', 'MobTextures/goat.png', 'MobTextures/hoglin.png', 'MobTextures/husk.png', 'MobTextures/illusioner.png', 'MobTextures/iron_golem.png', 'MobTextures/magmacube.png', 'MobTextures/ocelot.png', 'MobTextures/panda.png', 'MobTextures/phantom.png', 'MobTextures/pig.png', 'MobTextures/piglin.png', 'MobTextures/pillager.png', 'MobTextures/polarbear.png', 'MobTextures/pufferfish.png', 'MobTextures/ravager.png', 'MobTextures/salmon.png', 'MobTextures/sheep.png', 'MobTextures/silverfish.png', 'MobTextures/skeleton.png', 'MobTextures/slime.png', 'MobTextures/spider.png', 'MobTextures/squid.png', 'MobTextures/stray.png', 'MobTextures/strider.png', 'MobTextures/tadpole.png', 'MobTextures/vex.png', 'MobTextures/vindicator.png', 'MobTextures/wandering_trader.png', 'MobTextures/warden.png', 'MobTextures/witch.png', 'MobTextures/wither.png', 'MobTextures/zoglin.png', 'MobTextures/zombie.png']
OPTIONS = {'iconfile': 'icon.icns',
    }

setup(
    app=APP,
    APP_NAME = "Vine",
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],

)

Thank you very much in advance for any help you can offer!
(Please I have been struggling/crying for 4 hours now)


问:
How to download sub pages linked by javascript function in selenium python
I am going to download all pages linked by javascript function.

The HTML structure is following.

index.html:

```<code><!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript">
      function a(){
        document.location = 'a.html'
      }
      function b(){
        document.location = 'b.html'
      }
      function c(){
        document.location = 'c.html'
      }
    </script>
  </head>
  <body>
    <ul>
      <li>
        <a href="javascript:a()">Item a</a>
      </li>
      <li>
        <a href="javascript:b()">Item b</a>
      </li>
      <li>
        <a href="javascript:c()">Item c</a>
      </li>
    </ul>
  </body>
</html>
</code>```

a.html:

```<code><!DOCTYPE html>
<html>
  <head>
    <h1>Item A</h1>
    <script type="text/javascript">
      function d(){
        document.location = 'd.html'
      }
      function e(){
        document.location = 'e.html'
      }
    </script>
  </head>
  <body>
    <ul>
      <li>
        <a href="javascript:d()">Item d</a>
      </li>
      <li>
        <a href="javascript:e()">Item e</a>
      </li>
    </ul>
  </body>
</html>
</code>```

b.html:

```<code><!DOCTYPE html>
<html>
  <head>
  </head>
  <body>
    <h1>Item B</h1>
  </body>
</html>
</code>```

c.html:

```<code><!DOCTYPE html>
<html>
  <head>
  </head>
  <body>
    <h1>Item C</h1>
  </body>
</html>
</code>```

d.html:

```<code><!DOCTYPE html>
<html>
  <head>
  </head>
  <body>
    <h1>Item D</h1>
  </body>
</html>
</code>```

e.html:

```<code><!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript">
      function d(){
        document.location = 'd.html'
      }
      function b(){
        document.location = 'b.html'
      }
    </script>
  </head>
  <body>
    <h1>Item E</h1>
    <ul>
      <li>
        <a href="javascript:d()">Item d</a>
      </li>
      <li>
        <a href="javascript:b()">Item b</a>
      </li>
    </ul>
  </body>
</html>
</code>```

What is the best way to download all pages?

Body:
I am going to download all pages linked by javascript function.

The HTML structure is following.

index.html:

<!DOCTYPE html>

        Item a

        Item b

        Item c

a.html:

<!DOCTYPE html>

Item A

        Item d

        Item e

b.html:

<!DOCTYPE html>

Item B

c.html:

<!DOCTYPE html>

Item C

d.html:

<!DOCTYPE html>

Item D

e.html:

<!DOCTYPE html>

Item E

        Item d

        Item b

What is the best way to download all pages?


问:
How to implement tabLayout floatingActionButton and toobar together in jetpack compose
I am trying to implement toobar, tabLayout and floatingActionButton in compose but not able to get all three of them simultaneously. I am getting either tabLayout or floatingActionButton. I think i am not able to change the position of floatingActionButton without Scaffold.

Main Activity:

```<code>`package com.example.tryingcompose

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.*
import androidx.compose.material.*
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.example.tryingcompose.ui.theme.TryingComposeTheme
import com.google.accompanist.pager.*
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch

class MainActivity : ComponentActivity() {
    @OptIn(ExperimentalPagerApi::class)
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            TryingComposeTheme {
                Main()
            }
        }
    }
}

@ExperimentalPagerApi
@Preview
@Composable
private fun Main() {
    Column {
        HandleToolBar()
        val pagerState : PagerState = rememberPagerState(pageCount = 3)
        HandleTabLayout(pagerState)
        HandleFab()
    }
}

@Preview
@Composable
private fun HandleToolBar() {
    TopAppBar(
        title = {
            Text(
                text = stringResource(id = R.string.app_name),
                color = Color.White
            )
        },
        actions = {
            IconButton(onClick = { /*TODO*/ }) {
                Icon(ImageVector.vectorResource(R.drawable.ic_outline_camera_alt_24), "CameraIcon", tint = Color.White)
            }
            IconButton(onClick = { /*TODO*/ }) {
                Icon(Icons.Filled.Search, "SearchIcon", tint = Color.White)
            }
            IconButton(onClick = { /*TODO*/ }) {
                Icon(Icons.Filled.MoreVert, "CameraIcon", tint = Color.White)
            }
        },
        backgroundColor = Color(AppConstants.whatsappColor)
    )
}

@ExperimentalPagerApi
@Composable
private fun HandleTabLayout(pagerState: PagerState) {
    val list : List<String> = listOf(
        stringResource(id = R.string.chats),
        stringResource(id = R.string.status),
        stringResource(id = R.string.calls)
    )
    val scope : CoroutineScope = rememberCoroutineScope()
    TabRow(
        selectedTabIndex = pagerState.currentPage,
        backgroundColor = Color(AppConstants.whatsappColor),
        contentColor = Color.White,
        indicator = { tabPositions ->
            TabRowDefaults.Indicator(
                Modifier.pagerTabIndicatorOffset(pagerState, tabPositions),
                height = 4.dp,
                color = Color.White
            )
        }
    ) {
        list.forEachIndexed { index, _ ->
            Tab(
                text = {
                    Text(
                        list[index],
                        color = if (pagerState.currentPage == index) Color.White else Color.LightGray
                    )
                },
                selected = pagerState.currentPage == index,
                onClick = {
                    scope.launch {
                        pagerState.animateScrollToPage(index)
                    }
                }
            )
        }
    }
    HorizontalPager(state = pagerState) { page ->
        when(page) {
            0 -> TabContentScreen(data = stringResource(id = R.string.chats))
            1 -> TabContentScreen(data = stringResource(id = R.string.status))
            2 -> TabContentScreen(data = stringResource(id = R.string.calls))
        }
    }
}

@Composable
private fun TabContentScreen(data : String) {
    Column(
        modifier = Modifier.fillMaxSize(),
        horizontalAlignment = Alignment.CenterHorizontally,
        verticalArrangement = Arrangement.Center
    ) {
        Text(
            text = data,

            style = MaterialTheme.typography.h5,

            color = Color.Red,

            fontWeight = FontWeight.Bold,
[![enter image description here](https://i.stack.imgur.com/JS7bP.png)](https://i.stack.imgur.com/JS7bP.png)
            textAlign = TextAlign.Center
        )
    }
}

@Preview
@Composable
private fun HandleFab() {
    FloatingActionButton(onClick = { /*TODO*/ }) {
        Icon(
            ImageVector.vectorResource(id = R.drawable.ic_baseline_contacts_24),
            "Contacts"
        )
    }
}
</code>```

AppConstants Class:

```<code>package com.example.tryingcompose

class AppConstants {
    companion object {
        val whatsappColor: Long = 0xFF338E3A
    }
}
</code>```

Also added these 3 dependencies:

```<code>    implementation "com.google.accompanist:accompanist-systemuicontroller:0.27.0"
    implementation "com.google.accompanist:accompanist-pager:0.13.0"
    implementation "com.google.accompanist:accompanist-pager-indicators:0.13.0"`
</code>```

`

I tried using Scaffold and tried to put toobar and tabLayout in different Column then floatingActionButton Appears but then i am not able to place my tabLayout

```<code>@ExperimentalPagerApi
@Preview
@Composable
private fun Main() {
    val pagerState : PagerState = rememberPagerState(pageCount = 3)
    Column {[![enter image description here](https://i.stack.imgur.com/WjZff.png)](https://i.stack.imgur.com/WjZff.png)
        Scaffold(
            topBar = {
                TopAppBar(
                   title = {
                       Text(
                           text = stringResource(id = R.string.app_name),
                           color = Color.White
                       )
                   },
                   actions = {
                        IconButton(onClick = { /*TODO*/ }) {
                            Icon(ImageVector.vectorResource(R.drawable.ic_outline_camera_alt_24), "CameraIcon", tint = Color.White)
                        }
                        IconButton(onClick = { /*TODO*/ }) {
                            Icon(Icons.Filled.Search, "SearchIcon", tint = Color.White)
                        }
                        IconButton(onClick = { /*TODO*/ }) {
                            Icon(Icons.Filled.MoreVert, "CameraIcon", tint = Color.White)
                        }
                   },
                   backgroundColor = Color(AppConstants.whatsappColor)
                )
            },
            floatingActionButton = {
                FloatingActionButton(onClick = { /*TODO*/ }) {
                    Icon(
                        ImageVector.vectorResource(id = R.drawable.ic_baseline_contacts_24),
                        "Contacts"
                    )
                }
            }
        ) {

        }
        HandleTabLayout(pagerState)
    }
}
</code>```

Body:
I am trying to implement toobar, tabLayout and floatingActionButton in compose but not able to get all three of them simultaneously. I am getting either tabLayout or floatingActionButton. I think i am not able to change the position of floatingActionButton without Scaffold.

Main Activity:

`package com.example.tryingcompose

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.*
import androidx.compose.material.*
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.example.tryingcompose.ui.theme.TryingComposeTheme
import com.google.accompanist.pager.*
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch

class MainActivity : ComponentActivity() {
    @OptIn(ExperimentalPagerApi::class)
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            TryingComposeTheme {
                Main()
            }
        }
    }
}

@ExperimentalPagerApi
@Preview
@Composable
private fun Main() {
    Column {
        HandleToolBar()
        val pagerState : PagerState = rememberPagerState(pageCount = 3)
        HandleTabLayout(pagerState)
        HandleFab()
    }
}

@Preview
@Composable
private fun HandleToolBar() {
    TopAppBar(
        title = {
            Text(
                text = stringResource(id = R.string.app_name),
                color = Color.White
            )
        },
        actions = {
            IconButton(onClick = { /*TODO*/ }) {
                Icon(ImageVector.vectorResource(R.drawable.ic_outline_camera_alt_24), "CameraIcon", tint = Color.White)
            }
            IconButton(onClick = { /*TODO*/ }) {
                Icon(Icons.Filled.Search, "SearchIcon", tint = Color.White)
            }
            IconButton(onClick = { /*TODO*/ }) {
                Icon(Icons.Filled.MoreVert, "CameraIcon", tint = Color.White)
            }
        },
        backgroundColor = Color(AppConstants.whatsappColor)
    )
}

@ExperimentalPagerApi
@Composable
private fun HandleTabLayout(pagerState: PagerState) {
    val list : List<String> = listOf(
        stringResource(id = R.string.chats),
        stringResource(id = R.string.status),
        stringResource(id = R.string.calls)
    )
    val scope : CoroutineScope = rememberCoroutineScope()
    TabRow(
        selectedTabIndex = pagerState.currentPage,
        backgroundColor = Color(AppConstants.whatsappColor),
        contentColor = Color.White,
        indicator = { tabPositions ->
            TabRowDefaults.Indicator(
                Modifier.pagerTabIndicatorOffset(pagerState, tabPositions),
                height = 4.dp,
                color = Color.White
            )
        }
    ) {
        list.forEachIndexed { index, _ ->
            Tab(
                text = {
                    Text(
                        list[index],
                        color = if (pagerState.currentPage == index) Color.White else Color.LightGray
                    )
                },
                selected = pagerState.currentPage == index,
                onClick = {
                    scope.launch {
                        pagerState.animateScrollToPage(index)
                    }
                }
            )
        }
    }
    HorizontalPager(state = pagerState) { page ->
        when(page) {
            0 -> TabContentScreen(data = stringResource(id = R.string.chats))
            1 -> TabContentScreen(data = stringResource(id = R.string.status))
            2 -> TabContentScreen(data = stringResource(id = R.string.calls))
        }
    }
}

@Composable
private fun TabContentScreen(data : String) {
    Column(
        modifier = Modifier.fillMaxSize(),
        horizontalAlignment = Alignment.CenterHorizontally,
        verticalArrangement = Arrangement.Center
    ) {
        Text(
            text = data,

            style = MaterialTheme.typography.h5,

            color = Color.Red,

            fontWeight = FontWeight.Bold,
[![enter image description here](https://i.stack.imgur.com/JS7bP.png)](https://i.stack.imgur.com/JS7bP.png)
            textAlign = TextAlign.Center
        )
    }
}

@Preview
@Composable
private fun HandleFab() {
    FloatingActionButton(onClick = { /*TODO*/ }) {
        Icon(
            ImageVector.vectorResource(id = R.drawable.ic_baseline_contacts_24),
            "Contacts"
        )
    }
}

AppConstants Class:

package com.example.tryingcompose

class AppConstants {
    companion object {
        val whatsappColor: Long = 0xFF338E3A
    }
}

Also added these 3 dependencies:

    implementation "com.google.accompanist:accompanist-systemuicontroller:0.27.0"
    implementation "com.google.accompanist:accompanist-pager:0.13.0"
    implementation "com.google.accompanist:accompanist-pager-indicators:0.13.0"`

`

I tried using Scaffold and tried to put toobar and tabLayout in different Column then floatingActionButton Appears but then i am not able to place my tabLayout

@ExperimentalPagerApi
@Preview
@Composable
private fun Main() {
    val pagerState : PagerState = rememberPagerState(pageCount = 3)
    Column {[![enter image description here](https://i.stack.imgur.com/WjZff.png)](https://i.stack.imgur.com/WjZff.png)
        Scaffold(
            topBar = {
                TopAppBar(
                   title = {
                       Text(
                           text = stringResource(id = R.string.app_name),
                           color = Color.White
                       )
                   },
                   actions = {
                        IconButton(onClick = { /*TODO*/ }) {
                            Icon(ImageVector.vectorResource(R.drawable.ic_outline_camera_alt_24), "CameraIcon", tint = Color.White)
                        }
                        IconButton(onClick = { /*TODO*/ }) {
                            Icon(Icons.Filled.Search, "SearchIcon", tint = Color.White)
                        }
                        IconButton(onClick = { /*TODO*/ }) {
                            Icon(Icons.Filled.MoreVert, "CameraIcon", tint = Color.White)
                        }
                   },
                   backgroundColor = Color(AppConstants.whatsappColor)
                )
            },
            floatingActionButton = {
                FloatingActionButton(onClick = { /*TODO*/ }) {
                    Icon(
                        ImageVector.vectorResource(id = R.drawable.ic_baseline_contacts_24),
                        "Contacts"
                    )
                }
            }
        ) {

        }
        HandleTabLayout(pagerState)
    }
}


问:
Error in : hadoop jar tutorial_classes_com.jar WordCount /WordCountApp/input /WordCountApp/output is showing error in mapreduce.xml in one system
While I try to run this command its showing error in one system and I tried in another its working. Why is it so? I'm using hadoop-3.3.2 using lubuntu terminal.

The job is not submitting. Its showing error in mapred.xml configuration, but everything is proper I worked in another system there its working. What I should do?

```<code>hadoop jar tutorial_classes_com.jar WordCount /WordCountApp/input /WordCountApp/output
</code>```

Body:
While I try to run this command its showing error in one system and I tried in another its working. Why is it so? I'm using hadoop-3.3.2 using lubuntu terminal.

The job is not submitting. Its showing error in mapred.xml configuration, but everything is proper I worked in another system there its working. What I should do?

hadoop jar tutorial_classes_com.jar WordCount /WordCountApp/input /WordCountApp/output


问:
Rotating a label in Visual C++ 6
I am trying to rotate a label using a function but it is not working.
I only get a label without a rotation.
The label should be rotated along the point (x, y) which is the middle position
of the label (just=TX_JUST_CENTER).
The counter-clockwise rotation angle (=theta) is given as degrees.

I would appreciate any help on this.  Thanks.

```<code>void do_labely(
    HDC meta_dc,
    SLATE_REC *slate_rec,
    const DEFAULT_STYLE *styl,
    double x,
    double y,
    unsigned char *the_str,
    short just,
    short style_idx,
    short size,
    short stylebits,
    short color,
    short v_just,
    BOOL clip,
    double theta)
{
    LOGFONT lf;
    HFONT font;
    UINT align;

    setup_logfont(meta_dc ,&styl[ style_idx ], size, &lf, slate_rec, stylebits);
    font = CreateFontIndirect( &lf );
    GetObject(font, sizeof(lf), &lf);
    SelectObject( meta_dc,font );
    switch (color) {
        case WHITE:
            SetTextColor( meta_dc,RGB( 0xFF,0xFF,0xFF ) );
            break;
        case RED:
            SetTextColor( meta_dc,RGB( 0xFF,0x00,0x00 ) );
            break;
        case GREEN:
            SetTextColor( meta_dc,RGB( 0x00,0xFF,0x00 ) );
            break;
        case BLUE:
            SetTextColor( meta_dc,RGB( 0x00,0x00,0xFF ) );
            break;
        case BLACK:
            // this is the default
            SetTextColor( meta_dc,RGB( 0x00,0x00,0x00 ) );
            break;
    }
    switch (just) {
        case TX_JUST_LEFT:
            // this is the default
            align = TA_LEFT;
            break;
        case TX_JUST_CENTER:
            align = TA_CENTER;
            break;
        case TX_JUST_RIGHT:
            align = TA_RIGHT;
            break;
    }
    switch (v_just) {
        case TX_JUST_TOP:
            // this is the default
            align += TA_TOP;
            break;
        case TX_JUST_BASE:
            align += TA_BASELINE;
            break;
        case TX_JUST_BOTTOM:
            align += TA_BOTTOM;
            break;
    }
    SetTextAlign(meta_dc, align);
    SetGraphicsMode(meta_dc, GM_ADVANCED);

    double rad = theta * PI/180;
    XFORM xform;
    xform.eM11 = cos(rad);
    xform.eM12 = -sin(rad);
    xform.eM21 = sin(rad);
    xform.eM22 = cos(rad);

    //Apply rotation
    ModifyWorldTransform(meta_dc, &xform, MWT_LEFTMULTIPLY);

    //Draw the text
    int x1 = (int)( x * slate_rec->xscale );
    int y1 = (int)( y * slate_rec->yscale);
    TextOut(meta_dc, x1, y1, (char *)the_str, strlen((char *)the_str));

    //Reset the world transform to original
    SetWorldTransform(meta_dc, &xform);

    SelectObject( meta_dc,GetStockObject(SYSTEM_FONT) );
    DeleteObject(font);
}
</code>```

Title: Rotating a label in Visual C++ 6

Body:
I am trying to rotate a label using a function but it is not working.
I only get a label without a rotation.
The label should be rotated along the point (x, y) which is the middle position
of the label (just=TX_JUST_CENTER).
The counter-clockwise rotation angle (=theta) is given as degrees.

I would appreciate any help on this.  Thanks.

void do_labely(
    HDC meta_dc,
    SLATE_REC *slate_rec,
    const DEFAULT_STYLE *styl,
    double x,
    double y,
    unsigned char *the_str,
    short just,
    short style_idx,
    short size,
    short stylebits,
    short color,
    short v_just,
    BOOL clip,
    double theta)
{
    LOGFONT lf;
    HFONT font;
    UINT align;

    setup_logfont(meta_dc ,&styl[ style_idx ], size, &lf, slate_rec, stylebits);
    font = CreateFontIndirect( &lf );
    GetObject(font, sizeof(lf), &lf);
    SelectObject( meta_dc,font );
    switch (color) {
        case WHITE:
            SetTextColor( meta_dc,RGB( 0xFF,0xFF,0xFF ) );
            break;
        case RED:
            SetTextColor( meta_dc,RGB( 0xFF,0x00,0x00 ) );
            break;
        case GREEN:
            SetTextColor( meta_dc,RGB( 0x00,0xFF,0x00 ) );
            break;
        case BLUE:
            SetTextColor( meta_dc,RGB( 0x00,0x00,0xFF ) );
            break;
        case BLACK:
            // this is the default
            SetTextColor( meta_dc,RGB( 0x00,0x00,0x00 ) );
            break;
    }
    switch (just) {
        case TX_JUST_LEFT:
            // this is the default
            align = TA_LEFT;
            break;
        case TX_JUST_CENTER:
            align = TA_CENTER;
            break;
        case TX_JUST_RIGHT:
            align = TA_RIGHT;
            break;
    }
    switch (v_just) {
        case TX_JUST_TOP:
            // this is the default
            align += TA_TOP;
            break;
        case TX_JUST_BASE:
            align += TA_BASELINE;
            break;
        case TX_JUST_BOTTOM:
            align += TA_BOTTOM;
            break;
    }
    SetTextAlign(meta_dc, align);
    SetGraphicsMode(meta_dc, GM_ADVANCED);

    double rad = theta * PI/180;
    XFORM xform;
    xform.eM11 = cos(rad);
    xform.eM12 = -sin(rad);
    xform.eM21 = sin(rad);
    xform.eM22 = cos(rad);

    //Apply rotation
    ModifyWorldTransform(meta_dc, &xform, MWT_LEFTMULTIPLY);

    //Draw the text
    int x1 = (int)( x * slate_rec->xscale );
    int y1 = (int)( y * slate_rec->yscale);
    TextOut(meta_dc, x1, y1, (char *)the_str, strlen((char *)the_str));

    //Reset the world transform to original
    SetWorldTransform(meta_dc, &xform);

    SelectObject( meta_dc,GetStockObject(SYSTEM_FONT) );
    DeleteObject(font);
}


问:
How to use 'blogs.dir' as media upload instead of 'uploads' directory in WordPress multisite setup
Setup 1 :

The general subdomain/custom-domain based multisite setup for child network sites has its upload directory like this

/home/example1.com/public_html/wp-content/uploads/sites/8/2022/01/logo.png

example1.com : the primary WordPress multisite network

example2.com : the child network site with site id 8 under example1.com

This file can be accessed from the child network site from the following URL

https://www.example2.com/wp-content/uploads/sites/8/2022/01/logo.png

the general .htaccess file for subdomain based network site is following

```<code>
# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
# END WordPress

</code>```

Setup 2 :

In a subdomain/custom-domain based multisite setup I've got this upload directory, it uses blogs.dir instead of uploads directory

/home/example1.com/public_html/wp-content/blogs.dir/8/files/2022/01/logo.png

The child network site has following file path

example2.com/files/2022/01/logo.png

.htaccess of this setup is here

```<code>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
</code>```

I've tried using this for new general installation where the intended upload path is blogs.dir but having this .htaccess does nothing.

There is no such difference in wp-config.php file that could affect this setup

```<code>
/* Multisite */
define( 'WP_ALLOW_MULTISITE', true );
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', true );

define( 'DOMAIN_CURRENT_SITE', 'www.example1.com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );

define('ADMIN_COOKIE_PATH', '/'); // removed for hide my wp ghost plugin

define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST'] );
define('COOKIEPATH', '');
define('SITECOOKIEPATH', '');

define( 'NOBLOGREDIRECT', '/404' );

</code>```

Both setup was done by me and I don't remember any settings inside the dashboard that could change this. Permalinks checked; all possible settings inside the dashboard checked.

General multisite installation exposes site id in media path like this

https://www.example2.com/wp-content/uploads/sites/8/2022/01/logo.png

The goal is not to expose site id in media path
example2.com/files/2022/01/logo.png

What am I missing here?

Body:
Setup 1 :

The general subdomain/custom-domain based multisite setup for child network sites has its upload directory like this

/home/example1.com/public_html/wp-content/uploads/sites/8/2022/01/logo.png

example1.com : the primary WordPress multisite network

example2.com : the child network site with site id 8 under example1.com

This file can be accessed from the child network site from the following URL

https://www.example2.com/wp-content/uploads/sites/8/2022/01/logo.png

the general .htaccess file for subdomain based network site is following

# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
# END WordPress

Setup 2 :

In a subdomain/custom-domain based multisite setup I've got this upload directory, it uses blogs.dir instead of uploads directory

/home/example1.com/public_html/wp-content/blogs.dir/8/files/2022/01/logo.png

The child network site has following file path

example2.com/files/2022/01/logo.png

.htaccess of this setup is here

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]

I've tried using this for new general installation where the intended upload path is blogs.dir but having this .htaccess does nothing.

There is no such difference in wp-config.php file that could affect this setup

/* Multisite */
define( 'WP_ALLOW_MULTISITE', true );
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', true );

define( 'DOMAIN_CURRENT_SITE', 'www.example1.com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );

define('ADMIN_COOKIE_PATH', '/'); // removed for hide my wp ghost plugin

define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST'] );
define('COOKIEPATH', '');
define('SITECOOKIEPATH', '');

define( 'NOBLOGREDIRECT', '/404' );

Both setup was done by me and I don't remember any settings inside the dashboard that could change this. Permalinks checked; all possible settings inside the dashboard checked.

General multisite installation exposes site id in media path like this

https://www.example2.com/wp-content/uploads/sites/8/2022/01/logo.png

The goal is not to expose site id in media path
example2.com/files/2022/01/logo.png

What am I missing here?


问:
Retrofit / okHttpClient Limiting the timeout to 10 seconds anyway
I did the custom OkHttpClient setup, but my app still can't wait more than 10 seconds in a request, then gets a timeout with 502 error code.

```<code>    OkHttpClient okHttpClient = new OkHttpClient.Builder()
            .connectTimeout(30, TimeUnit.SECONDS)
            .readTimeout(30, TimeUnit.SECONDS)
            .writeTimeout(30, TimeUnit.SECONDS)
            .callTimeout(30, TimeUnit.SECONDS)
            .build();

    Retrofit retrofit = new Retrofit.Builder()
            .baseUrl(url)
            .client(okHttpClient)
            .addConverterFactory(GsonConverterFactory.create())
            .build();
</code>```

What could be happening that is still limiting my timeout?

I tried changing my server backend settings, but it looks like the problem is directly in my app, looks like the timeout doesn't go further than 10 seconds, because the same request made in Postman can be done without problems.

Body:
I did the custom OkHttpClient setup, but my app still can't wait more than 10 seconds in a request, then gets a timeout with 502 error code.

    OkHttpClient okHttpClient = new OkHttpClient.Builder()
            .connectTimeout(30, TimeUnit.SECONDS)
            .readTimeout(30, TimeUnit.SECONDS)
            .writeTimeout(30, TimeUnit.SECONDS)
            .callTimeout(30, TimeUnit.SECONDS)
            .build();

    Retrofit retrofit = new Retrofit.Builder()
            .baseUrl(url)
            .client(okHttpClient)
            .addConverterFactory(GsonConverterFactory.create())
            .build();

What could be happening that is still limiting my timeout?

I tried changing my server backend settings, but it looks like the problem is directly in my app, looks like the timeout doesn't go further than 10 seconds, because the same request made in Postman can be done without problems.


问:
Termux command. Command is wrong or not working
Trying to change metadata for Opus files using termux on android. Tried to change title here but may be command is wrong. Please guide me

ffmpeg -i audio name.opus -metadata title= "test" -c copy audio name.opus

Result:
[NULL @ 0x787d23a500] Unable to find a suitable output format for 'test'
test: Invalid argument

Tried to look for some apps or editing tools but found nothing for opus on Android. My format is Opus. Expected that the command will be successful but it didn't work.


问:
RuntimeError Message When Trying to Run App on Android Emulator
This is the error message i keep getting when i try to run app on emulator

RuntimeError: abort(Error: could not connect to TCP port 5554: cannot connect to 127.0.0.1:5554: No connection could be made because the target machine actively refused it. (10061)). Build with -s ASSERTIONS=1 for more info.

What are the best ways to tackle this?

I have tried running my android emulator to test what am building but instead it is showing me those error message


问:
FindAsync CancellationToken fail
The code below has a for loop to test that the cancellation token is working when attempting to retrieve a record from the Activity table:

```<code>public class Handler : IRequestHandler<Query, Result<Activity>>
{
    private readonly ReactivitiesContext _context;
    private readonly ILogger<Activity> _logger;

    public Handler(ReactivitiesContext context, ILogger<Activity> logger)
    {
        _context = context;
        _logger = logger;
    }

    public async Task<Result<Activity>> Handle(Query request,
        CancellationToken cancellationToken)
    {
        try
        {
            for (int i = 1; i <= 5; i++)
            {
                cancellationToken.ThrowIfCancellationRequested();
                await Task.Delay(1000, cancellationToken);
                _logger.LogInformation($"{i} second(s) have elapsed");
            }
        }
        catch (Exception)
        {
            _logger.LogInformation("Cancellation was done");
        }
        return Result<Activity>.Success(await _context.Activities.FindAsync(
            new object[] { request.Id }, cancellationToken));
    }
}
</code>```

However when cancelling the request (through Postman), it does not cancel.  Instead, the request returns the correct "Activity" object, and the for loop runs its course, even though I cancel after 2-3 seconds have elapsed.  See logs:

```<code>info: Domain.Activity[0]
      1 second(s) have elapsed
info: Domain.Activity[0]
      2 second(s) have elapsed
info: Domain.Activity[0]
      3 second(s) have elapsed
info: Domain.Activity[0]
      4 second(s) have elapsed
info: Domain.Activity[0]
      5 second(s) have elapsed
info: Microsoft.EntityFrameworkCore.Infrastructure[10403]
      Entity Framework Core 6.0.6 initialized 'ReactivitiesContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.6' with options: None
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (35ms) [Parameters=[@__get_Item_0='?' (DbType = Guid)], CommandType='Text', CommandTimeout='30']
      SELECT TOP(1) [a].[Id], [a].[Category], [a].[City], [a].[Date], [a].[Description], [a].[Title], [a].[Venue]
      FROM [Activities] AS [a]
      WHERE [a].[Id] = @__get_Item_0
</code>```

The FindAsync cancellation approach used closely follows the guidance provided in this GitHub issue:  https://github.com/dotnet/efcore/issues/12012

Here they advise to pass the FindAsync params as an array, followed by the cancellation token.

Can anyone see what needs to be corrected in order for the cancellation token to work?

Thank you in advance.

Edit 1/11/23:
Thank you to Nikolay, who solved my issue with his last comment from 1/10.  My controller was not passing the cancellation token - here is the corrected controller, which has corrected the issue and 'cancel' is now working:

```<code>[HttpGet("{id}")]
public async Task<IActionResult> GetActivity(Guid id, CancellationToken token)
{
    return ResultHandler(await Mediator.Send(new Details.Query { Id = id }, token));
}
</code>```

Nikolay - if you post this as an answer, I will mark this as the answer.  In the meantime, I upvoted all of your comments.  Thank you again for your much appreciated insight!

Title: FindAsync CancellationToken fail

Body:
The code below has a for loop to test that the cancellation token is working when attempting to retrieve a record from the Activity table:

public class Handler : IRequestHandler<Query, Result<Activity>>
{
    private readonly ReactivitiesContext _context;
    private readonly ILogger<Activity> _logger;

    public Handler(ReactivitiesContext context, ILogger<Activity> logger)
    {
        _context = context;
        _logger = logger;
    }

    public async Task<Result<Activity>> Handle(Query request,
        CancellationToken cancellationToken)
    {
        try
        {
            for (int i = 1; i <= 5; i++)
            {
                cancellationToken.ThrowIfCancellationRequested();
                await Task.Delay(1000, cancellationToken);
                _logger.LogInformation($"{i} second(s) have elapsed");
            }
        }
        catch (Exception)
        {
            _logger.LogInformation("Cancellation was done");
        }
        return Result<Activity>.Success(await _context.Activities.FindAsync(
            new object[] { request.Id }, cancellationToken));
    }
}

However when cancelling the request (through Postman), it does not cancel.  Instead, the request returns the correct "Activity" object, and the for loop runs its course, even though I cancel after 2-3 seconds have elapsed.  See logs:

info: Domain.Activity[0]
      1 second(s) have elapsed
info: Domain.Activity[0]
      2 second(s) have elapsed
info: Domain.Activity[0]
      3 second(s) have elapsed
info: Domain.Activity[0]
      4 second(s) have elapsed
info: Domain.Activity[0]
      5 second(s) have elapsed
info: Microsoft.EntityFrameworkCore.Infrastructure[10403]
      Entity Framework Core 6.0.6 initialized 'ReactivitiesContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.6' with options: None
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (35ms) [Parameters=[@__get_Item_0='?' (DbType = Guid)], CommandType='Text', CommandTimeout='30']
      SELECT TOP(1) [a].[Id], [a].[Category], [a].[City], [a].[Date], [a].[Description], [a].[Title], [a].[Venue]
      FROM [Activities] AS [a]
      WHERE [a].[Id] = @__get_Item_0

The FindAsync cancellation approach used closely follows the guidance provided in this GitHub issue:  https://github.com/dotnet/efcore/issues/12012

Here they advise to pass the FindAsync params as an array, followed by the cancellation token.

Can anyone see what needs to be corrected in order for the cancellation token to work?

Thank you in advance.

Edit 1/11/23:
Thank you to Nikolay, who solved my issue with his last comment from 1/10.  My controller was not passing the cancellation token - here is the corrected controller, which has corrected the issue and 'cancel' is now working:

[HttpGet("{id}")]
public async Task<IActionResult> GetActivity(Guid id, CancellationToken token)
{
    return ResultHandler(await Mediator.Send(new Details.Query { Id = id }, token));
}

Nikolay - if you post this as an answer, I will mark this as the answer.  In the meantime, I upvoted all of your comments.  Thank you again for your much appreciated insight!


问:
MSVS LIB.EXE - partial update of existing library
MS Visual Studio 2019, C++, Librarian tool aka LIB.EXE
I have large "super" library combined from 20+ separate libraries  and want to rebuild only one of them.
Tried to set super.lib as additional input library

/OUT:"super2.lib" /LTCG "super.lib" /MACHINE:X64 /NOLOGO

but LIB.EXE ignores second (new) definition of objects already defined in super.lib

warning LNK4006: "public: class NNN already defined in super.lib(className.obj); second definition ignored