Cannot enable flash encryption after secure-boot v2 (IDFGH-10657)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.
v4.4.4-dirty
Operating System used.
Windows
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32 Rev.3 - Custom Board
Power Supply used.
External 3.3V
What is the expected behavior?
I enabled secure boot v2 and it worked well. Now I would like to enable flash encryption with an external key so that FW are already encrypted when they're distributed to the devices.
What is the actual behavior?
The "espefuse.py" tool does not let me burn the flash encryption key. It says :
espefuse.py v4.5.1
Connecting...
Device PID identification is only supported on COM and /dev/ serial ports.

Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting...
Device PID identification is only supported on COM and /dev/ serial ports.

Detecting chip type... ESP32

=== Run "burn_key" command ===
Burn keys to blocks:
 - BLOCK1 -> [Key bytes]
        Reversing the byte order
        Disabling read to key block

A fatal error occurred: This efuse cannot be read-disabled due the to RD_DIS field is already write-disabled

However when running the summary command, nothing is written to the BLOCK1 used for the flash encryption key :
espefuse.py v4.5.1
Connecting...
Device PID identification is only supported on COM and /dev/ serial ports.
.
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting...
Device PID identification is only supported on COM and /dev/ serial ports.

Detecting chip type... ESP32

=== Run "summary" command ===
EFUSE_NAME (Block) Description  = [Meaningful Value] [Readable/Writeable] (Hex Value)
----------------------------------------------------------------------------------------
Calibration fuses:
BLK3_PART_RESERVE (BLOCK0):                        BLOCK3 partially served for ADC calibration data   = False R/W (0b0)
ADC_VREF (BLOCK0):                                 Voltage reference calibration                      = 1107 R/- (0b00001)

Config fuses:
XPD_SDIO_FORCE (BLOCK0):                           Ignore MTDI pin (GPIO12) for VDD_SDIO on reset     = False R/W (0b0)
XPD_SDIO_REG (BLOCK0):                             If XPD_SDIO_FORCE, enable VDD_SDIO reg on reset    = False R/W (0b0)
XPD_SDIO_TIEH (BLOCK0):                            If XPD_SDIO_FORCE & XPD_SDIO_REG                   = 1.8V R/W (0b0)
CLK8M_FREQ (BLOCK0):                               8MHz clock freq override                           = 56 R/W (0x38)
SPI_PAD_CONFIG_CLK (BLOCK0):                       Override SD_CLK pad (GPIO6/SPICLK)                 = 0 R/W (0b00000)
SPI_PAD_CONFIG_Q (BLOCK0):                         Override SD_DATA_0 pad (GPIO7/SPIQ)                = 0 R/W (0b00000)
SPI_PAD_CONFIG_D (BLOCK0):                         Override SD_DATA_1 pad (GPIO8/SPID)                = 0 R/W (0b00000)
SPI_PAD_CONFIG_HD (BLOCK0):                        Override SD_DATA_2 pad (GPIO9/SPIHD)               = 0 R/W (0b00000)
SPI_PAD_CONFIG_CS0 (BLOCK0):                       Override SD_CMD pad (GPIO11/SPICS0)                = 0 R/W (0b00000)
DISABLE_SDIO_HOST (BLOCK0):                        Disable SDIO host                                  = False R/W (0b0)

Efuse fuses:
WR_DIS (BLOCK0):                                   Efuse write disable mask                           = 257 R/W (0x0101)
RD_DIS (BLOCK0):                                   Efuse read disable mask                            = 0 R/- (0x0)
CODING_SCHEME (BLOCK0):                            Efuse variable block length scheme
   = NONE (BLK1-3 len=256 bits) R/W (0b00)
KEY_STATUS (BLOCK0):                               Usage of efuse block 3 (reserved)                  = False R/W (0b0)

Identity fuses:
MAC (BLOCK0):                                      Factory MAC Address
   = 78:21:84:a5:c4:78 (CRC 0xad OK) R/W
MAC_CRC (BLOCK0):                                  CRC8 for factory MAC address                       = 173 R/W (0xad)
CHIP_VER_REV1 (BLOCK0):                            Silicon Revision 1                                 = True R/W (0b1)
CHIP_VER_REV2 (BLOCK0):                            Silicon Revision 2                                 = True R/W (0b1)
WAFER_VERSION_MINOR (BLOCK0):                      WAFER VERSION MINOR                                = 0 R/W (0b00)
CHIP_PACKAGE (BLOCK0):                             Chip package identifier                            = 0 R/W (0b000)
CHIP_PACKAGE_4BIT (BLOCK0):                        Chip package identifier #4bit                      = 0 R/W (0b0)
MAC_VERSION (BLOCK3):                              Version of the MAC field                           = 0 R/W (0x00)
WAFER_VERSION_MAJOR (BLOCK0):                      calc WAFER VERSION MAJOR from CHIP_VER_REV1 and CH = 3 R/W (0b011)
                                                   IP_VER_REV2 and apb_ctl_date (read only)
PKG_VERSION (BLOCK0):                              calc Chip package = CHIP_PACKAGE_4BIT << 3 + CHIP_ = 0 R/W (0x0)
                                                   PACKAGE (read only)

Security fuses:
FLASH_CRYPT_CNT (BLOCK0):                          Flash encryption mode counter                      = 0 R/W (0b0000000)
UART_DOWNLOAD_DIS (BLOCK0):                        Disable UART download mode (ESP32 rev3 only)       = False R/W (0b0)
FLASH_CRYPT_CONFIG (BLOCK0):                       Flash encryption config (key tweak bits)           = 0 R/W (0x0)
CONSOLE_DEBUG_DISABLE (BLOCK0):                    Disable ROM BASIC interpreter fallback             = True R/W (0b1)
ABS_DONE_0 (BLOCK0):                               Secure boot V1 is enabled for bootloader image     = False R/W (0b0)
ABS_DONE_1 (BLOCK0):                               Secure boot V2 is enabled for bootloader image     = True R/W (0b1)
JTAG_DISABLE (BLOCK0):                             Disable JTAG                                       = True R/W (0b1)
DISABLE_DL_ENCRYPT (BLOCK0):                       Disable flash encryption in UART bootloader        = False R/W (0b0)
DISABLE_DL_DECRYPT (BLOCK0):                       Disable flash decryption in UART bootloader        = False R/W (0b0)
DISABLE_DL_CACHE (BLOCK0):                         Disable flash cache in UART bootloader             = False R/W (0b0)
BLOCK1 (BLOCK1):                                   Flash encryption key
   = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
BLOCK2 (BLOCK2):                                   Secure boot key
   = Secure boot key bytes R/-
BLOCK3 (BLOCK3):                                   Variable Block 3
   = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W

Flash voltage (VDD_SDIO) determined by GPIO12 on reset

Steps to reproduce.

Generate a secure boot key : espsecure.py generate_signing_key --version 2 sb_private_key.pem
Export the public key : openssl rsa -in sb_private_key.pem -pubout > sb_public_key.pem
Burn the digest in efuse : espefuse.py burn_key_digest sb_public_key.pem
Generate a flash encryption key digest : espsecure.py generate_flash_encryption_key --keylen 256 flash_enc_key.bin
Flash the  digest : espefuse.py --port rfc2217://host.docker.internal:4005?ign_set_control burn_key flash_encryption flash_enc_key.bin

I get the error at step number 5 :
espefuse.py v4.5.1
Connecting...
Device PID identification is only supported on COM and /dev/ serial ports.

Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting...
Device PID identification is only supported on COM and /dev/ serial ports.

Detecting chip type... ESP32

=== Run "burn_key" command ===
Burn keys to blocks:
 - BLOCK1 -> [Key bytes]
        Reversing the byte order
        Disabling read to key block

A fatal error occurred: This efuse cannot be read-disabled due the to RD_DIS field is already write-disabled

Debug Logs.
No response
More Information.
Do I make something wrong ? Is there another way to generate keys and flash ? I found the documentation about secure boot v2 and flash encryption a bit lacking because I did not find any information about espefuse.py burn_key_digest sb_public_key.pem which seems to be the command to be used for flashing the secure_boot v2 key digest.

Hi @FnxQT this is a Secure Boot limitation.
It has been listed in Secure boot limitations
The reason is as follows:

The Secure Boot digest needs to be kept as software readable and must not be read protected. If that digest is accidentally write protected then secure boot would not longer work on that device and would render the device useless.

To avoid this scenario, when Secure Boot is enabled, the ability to read protect any key is also disabled.
But the Flash Encryption feature requires the FE key present in the eFuse to be read protected otherwise Flash Encryption is not safe.
For this reason, Once Secure Boot is enabled on a device, Flash Encryption cannot be enabled on the same device afterwards. ( Unless Secure Boot is first enabled in Insecure Mode).
Due to this you are not able to burn the flash encryption key with default command which also enables write protection for the key.
I think you would still be able to test the FE feature on your device (though it would not be secure as the key is not read protected). By following the steps in Enabling flash encryption externally
with changing the key burning command from
espefuse.py --port rfc2217://host.docker.internal:4005?ign_set_control burn_key flash_encryption flash_enc_key.bin
to
espefuse.py --port rfc2217://host.docker.internal:4005?ign_set_control burn_key flash_encryption flash_enc_key.bin --no-protect-key

Hi @AdityaHPatwardhan,
Thank you for your help. Ok I understand my fault. However the message in Secure Boot limitations is not very clear. It should be written something like : Flash Encryption cannot be enabled after Secure Boot v2 so enable it before...
However, something even stranger happened. By using espefuse.py locally, (not through rfc2217) I could actually burn the key without the --no-protect-key option.
But, it is still not working. Upon booting I get this error:
E (1412) flash_encrypt: Flash encryption eFuse bit was not enabled in bootloader but CONFIG_SECURE_FLASH_ENC_ENABLED is on
I tried to burn one bit of FLASH_CRYPT_CNT but it had no effect. I got an error message directly from the bootloader :
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0x6c376833
invalid header: 0x6c376833
invalid header: 0x6c376833
invalid header: 0x6c376833
invalid header: 0x6c376833
invalid header: 0x6c376833
invalid header: 0x6c376833
invalid header:�ets Jul 29 2019 12:21:46

Is all of this related to the fact I did not enable flash encryption before secure boot ?

You need to write the encrypted binaries on the flash of the esp32.
Please follow step 5 of the same document

Ok thank you. This document is very clear I did not find it previously.
Last question, the workflow seem to be a bit strange right now. Secure Boot v2 is based on RSA-PSS using an RSA:3072 key. However, using this key I cannot generate the bootloader secure digest as it only accepts AES keys:
espsecure.py digest_secure_bootloader --keyfile sign/sb_private_key.pem --output bootloader_reflash_
digest.bin build/bootloader/bootloader-signed.bin
espsecure.py v4.5.1

A fatal error occurred: Key file contains wrong length (2459 bytes), 16, 24, 32 or 64 expected.

How to generate this digest using an RSA key ? Is there a document like the one you showed but for Secure Boot V2 ? It seems to me that this digest is only used for reflashing the bootloader but maybe I misunderstood something.
Thank you a lot again :)

Well I bricked a second device. I think the documentation is very unclear. Here is what I did :
#Burn required efuse
espefuse.py --port rfc2217://host.docker.internal:4008?ign_set_control burn_key flash_encryption flash_enc_key.bin
espefuse.py --port rfc2217://host.docker.internal:4008?ign_set_control burn_key_digest sb_public_key.pem
espefuse.py --port rfc2217://host.docker.internal:4010?ign_set_control --chip esp32 burn_efuse FLASH_CRYPT_CNT 127
espefuse.py --port rfc2217://host.docker.internal:4008?ign_set_control --chip esp32 burn_efuse FLASH_CRYPT_CONFIG 0xF
espefuse.py --port rfc2217://host.docker.internal:4008?ign_set_control burn_efuse ABS_DONE_1 1

#Build the app
idf.py clean
idf.py build

#Encrypt every partitions
espsecure.py encrypt_flash_data --keyfile sign/flash_enc_key.bin --address 0x1000 --output build/bootloader/bootloader-enc.bin build/bootloader/bootloader.bin
espsecure.py encrypt_flash_data --keyfile sign/flash_enc_key.bin --address 0xc000 --output build/partition_table/partition-table-enc.bin build/partition_table/partition-table.bin
espsecure.py encrypt_flash_data --keyfile sign/flash_enc_key.bin --address 0xd000 --output build/ota_data_initial-enc.bin build/ota_data_initial.bin
espsecure.py encrypt_flash_data --keyfile sign/flash_enc_key.bin --address 0x10000 --output build/app-enc.bin build/app.bin

#Flash bootloader
esptool.py --chip esp32 --port rfc2217://host.docker.internal:4010?ign_set_control -b 460800 --before=default_reset --after=no_reset write_flash --flash_mode dio --flash_freq 40m --flash_size keep 0x1000 /build/bootloader/bootloader-enc.bin

#Flash other partitions
esptool.py --port rfc2217://host.docker.internal:4010?ign_set_control -b 460800 --before default_reset --after no_reset --chip esp32  write_flash --flash_mode dio --flash_size keep --flash_freq 40m 0xc000 build/partition_table/partition-table-enc.bin 0xd000 build/ota_data_initial-enc.bin 0x10000 build/app-enc.bin

I end with an error message saving that the signature block of the bootloader is not found:
No signature block magic byte found at signature sector (found 0xaa not 0xe7). Image not V2 signed?
But when I check it with espsecure.py it is ok :
espsecure.py v4.5.1
Signature block 0 is valid (RSA).
Public key digest for block 0: 84 53 80 e3 92 5d 50 22 9f ec 26 79 e0 8c a1 7e 96 ba 5b c3 5f a6 08 d5 87 4d ac e1 5c a2 1f 16
Signature block 1 absent/invalid. Skipping checking next blocks.

However, if I check the encrypted bootloader it is not ok :
espsecure.py v4.5.1
Signature block 0 absent/invalid. Skipping checking next blocks.

In the document you provided they encrypt the bootloader at step 5.
For instance here is my security config :
#
# Security features
#
CONFIG_SECURE_SIGNED_ON_BOOT=y
CONFIG_SECURE_SIGNED_ON_UPDATE=y
CONFIG_SECURE_SIGNED_APPS=y
CONFIG_SECURE_BOOT_V2_RSA_SUPPORTED=y
CONFIG_SECURE_BOOT_V1_SUPPORTED=y
CONFIG_SECURE_BOOT_V2_PREFERRED=y
CONFIG_SECURE_BOOT_V2_RSA_ENABLED=y
CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME=y
CONFIG_SECURE_BOOT=y
# CONFIG_SECURE_BOOT_V1_ENABLED is not set
CONFIG_SECURE_BOOT_V2_ENABLED=y
CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES=y
CONFIG_SECURE_BOOT_SIGNING_KEY="sign/sb_private_key.pem"
# CONFIG_SECURE_BOOTLOADER_MODE=SECURE_BOOTLOADER_REFLASHABLE
# CONFIG_SECURE_BOOTLOADER_REFLASHABLE=y
# CONFIG_SECURE_BOOT_INSECURE=y
CONFIG_SECURE_FLASH_ENC_ENABLED=y
CONFIG_SECURE_FLASH_ENCRYPTION_MODE=SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT
# CONFIG_SECURE_DISABLE_ROM_DL_MODE is not set
CONFIG_SECURE_INSECURE_ALLOW_DL_MODE=y
# end of Security features

I'm at a loss, what do I do wrong ?

Hi @FnxQT

How to generate this digest using an RSA key ? Is there a document like the one you showed but for Secure Boot V2 ? It seems to me that this digest is only used for reflashing the bootloader but maybe I misunderstood something.

Are you using the documentation for secure boot V1 by any chance when secure boot v2 is enabled for your device.
You can find the Secure Boot V2 documentation at this link
I dont think you need to generate the digest once again. digest needs to be generated only when you want to burn it into the eFuse, as you have already done that I think simply signing the data using the steps mentioned here should be sufficient.
Just to answer your question, To generate a digest for the secure boot v2 there is a different command.
you need to use digest_sbv2_public_key command to generate the secure boot digest.
I dont think the first device is bricked as of yet. It should still work

For the second device, can you share the efuse summary?

Hi @AdityaHPatwardhan,
Effectively, I read the v2 documentation but I understood something wrong. I though Secure Boot v2 still a reflashable mode like in v1 where a digest of bootloader + private key could be generated to reflash the bootloader.
For the first device I could try to reflash the encrypted partition table, otadata and app.bin.
Still, should ALL partitions be encrypted before putting them on the device ? Also the bootloader ?
Here the efuse summary of the second device :
Detecting chip type... ESP32

=== Run "summary" command ===
EFUSE_NAME (Block) Description  = [Meaningful Value] [Readable/Writeable] (Hex Value)
----------------------------------------------------------------------------------------
Calibration fuses:
BLK3_PART_RESERVE (BLOCK0):                        BLOCK3 partially served for ADC calibration data   = False R/W (0b0)
ADC_VREF (BLOCK0):                                 Voltage reference calibration                      = 1156 R/W (0b01000)

Config fuses:
XPD_SDIO_FORCE (BLOCK0):                           Ignore MTDI pin (GPIO12) for VDD_SDIO on reset     = False R/W (0b0)
XPD_SDIO_REG (BLOCK0):                             If XPD_SDIO_FORCE, enable VDD_SDIO reg on reset    = False R/W (0b0)
XPD_SDIO_TIEH (BLOCK0):                            If XPD_SDIO_FORCE & XPD_SDIO_REG                   = 1.8V R/W (0b0)
CLK8M_FREQ (BLOCK0):                               8MHz clock freq override                           = 56 R/W (0x38)
SPI_PAD_CONFIG_CLK (BLOCK0):                       Override SD_CLK pad (GPIO6/SPICLK)                 = 0 R/W (0b00000)
SPI_PAD_CONFIG_Q (BLOCK0):                         Override SD_DATA_0 pad (GPIO7/SPIQ)                = 0 R/W (0b00000)
SPI_PAD_CONFIG_D (BLOCK0):                         Override SD_DATA_1 pad (GPIO8/SPID)                = 0 R/W (0b00000)
SPI_PAD_CONFIG_HD (BLOCK0):                        Override SD_DATA_2 pad (GPIO9/SPIHD)               = 0 R/W (0b00000)
SPI_PAD_CONFIG_CS0 (BLOCK0):                       Override SD_CMD pad (GPIO11/SPICS0)                = 0 R/W (0b00000)
DISABLE_SDIO_HOST (BLOCK0):                        Disable SDIO host                                  = False R/W (0b0)

Efuse fuses:
WR_DIS (BLOCK0):                                   Efuse write disable mask                           = 384 R/W (0x0180)
RD_DIS (BLOCK0):                                   Efuse read disable mask                            = 1 R/W (0x1)
CODING_SCHEME (BLOCK0):                            Efuse variable block length scheme
   = NONE (BLK1-3 len=256 bits) R/W (0b00)
KEY_STATUS (BLOCK0):                               Usage of efuse block 3 (reserved)                  = False R/W (0b0)

Identity fuses:
MAC (BLOCK0):                                      Factory MAC Address
   = 78:21:84:a5:c4:68 (CRC 0x30 OK) R/W
MAC_CRC (BLOCK0):                                  CRC8 for factory MAC address                       = 48 R/W (0x30)
CHIP_VER_REV1 (BLOCK0):                            Silicon Revision 1                                 = True R/W (0b1)
CHIP_VER_REV2 (BLOCK0):                            Silicon Revision 2                                 = True R/W (0b1)
WAFER_VERSION_MINOR (BLOCK0):                      WAFER VERSION MINOR                                = 0 R/W (0b00)
CHIP_PACKAGE (BLOCK0):                             Chip package identifier                            = 0 R/W (0b000)
CHIP_PACKAGE_4BIT (BLOCK0):                        Chip package identifier #4bit                      = 0 R/W (0b0)
MAC_VERSION (BLOCK3):                              Version of the MAC field                           = 0 R/W (0x00)
WAFER_VERSION_MAJOR (BLOCK0):                      calc WAFER VERSION MAJOR from CHIP_VER_REV1 and CH = 3 R/W (0b011)
                                                   IP_VER_REV2 and apb_ctl_date (read only)
PKG_VERSION (BLOCK0):                              calc Chip package = CHIP_PACKAGE_4BIT << 3 + CHIP_ = 0 R/W (0x0)
                                                   PACKAGE (read only)

Security fuses:
FLASH_CRYPT_CNT (BLOCK0):                          Flash encryption mode counter                      = 1 R/W (0b0000001)
UART_DOWNLOAD_DIS (BLOCK0):                        Disable UART download mode (ESP32 rev3 only)       = False R/W (0b0)
FLASH_CRYPT_CONFIG (BLOCK0):                       Flash encryption config (key tweak bits)           = 15 R/W (0xf)
CONSOLE_DEBUG_DISABLE (BLOCK0):                    Disable ROM BASIC interpreter fallback             = True R/W (0b1)
ABS_DONE_0 (BLOCK0):                               Secure boot V1 is enabled for bootloader image     = False R/W (0b0)
ABS_DONE_1 (BLOCK0):                               Secure boot V2 is enabled for bootloader image     = True R/W (0b1)
JTAG_DISABLE (BLOCK0):                             Disable JTAG                                       = False R/W (0b0)
DISABLE_DL_ENCRYPT (BLOCK0):                       Disable flash encryption in UART bootloader        = False R/W (0b0)
DISABLE_DL_DECRYPT (BLOCK0):                       Disable flash decryption in UART bootloader        = False R/W (0b0)
DISABLE_DL_CACHE (BLOCK0):                         Disable flash cache in UART bootloader             = False R/W (0b0)
BLOCK1 (BLOCK1):                                   Flash encryption key
   = ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? -/-
BLOCK2 (BLOCK2):                                   Secure boot key
   = 84 53 80 e3 92 5d 50 22 9f ec 26 79 e0 8c a1 7e 96 ba 5b c3 5f a6 08 d5 87 4d ac e1 5c a2 1f 16 R/-
BLOCK3 (BLOCK3):                                   Variable Block 3
   = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W

Flash voltage (VDD_SDIO) determined by GPIO12 on reset

And the exact message it prints :
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:2, clock div:2
secure boot v2 enabled
No signature block magic byte found at signature sector (found 0xaa not 0xe7). Image not V2 signed?
secure boot verification failed
ets Jul 29 2019 12:21:46

For the second device,
As Flash Encryption and Secure Boot V2 both are enabled in eFuse.
You will have to make sure that

Bootloader is signed with the correct key.
Secure Boot v2 is enabled in menuconfig while building the bootloader
Application is signed with the correct key.

As a part of flash encryption.
The following binaries must be encrypted -

bootloader.bin 2) partition-table.bin 3) application.bin

Also, about the issue where the signature of the encrypted binary could not be verified. Yes as the binary is encrypted, espsecure.py cannot decrypt the binary and parse the signature so it would just exit with failure. You can only check the signature of a non-encrypted binary (which you have done in previously)

@FnxQT For testing security features on esp32, you can also use the https://github.com/espressif/qemu  project.
You can emulate the esp32 chip using qemu without worrying about bricking the chip.

@AdityaHPatwardhan
Nice, the qemu thing is really interesting. However my FW still produces an error :
Adding SPI flash device
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff00b8,len:11492
load:0x40078000,len:23948
load:0x40080400,len:3496
entry 0x400805f0
W (3513) secure_boot: UART ROM Download mode kept enabled - SECURITY COMPROMISED
W (3947) flash_encrypt: Not disabling UART bootloader encryption
**E (24116) esp_image: image at 0x380000 has invalid magic byte (nothing flashed here?)
ets Jul 29 2019 12:21:46**

rst:0x3 (SW_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:2, clock div:2
secure boot v2 enabled
secure boot verification succeeded
load:0x3fff00b8 len:0x2ce4
load:0x40078000 len:0x5d8c
load:0x40080400 len:0xda8
entry 0x400805f0
I (11123) quad_psram: This chip is ESP32-D0WD
I (11154) esp_psram: Found 4MB PSRAM device
I (11155) esp_psram: Speed: 40MHz
I (11156) esp_psram: PSRAM initialized, cache is in low/high (2-core) mode.
I (11193) cpu_start: Pro cpu up.
I (11196) cpu_start: Starting app cpu, entry point is 0x40081648
I (31133) cpu_start: App cpu up.
I (11407) esp_psram: SPI SRAM memory test OK
D (11431) clk: RTC_SLOW_CLK calibration value: 3495245
I (2230) cpu_start: Pro cpu start user code
I (2231) cpu_start: cpu freq: 240000000 Hz
I (2233) cpu_start: Application information:
I (2234) cpu_start: Project name:     DINGZ-GW
I (2235) cpu_start: App version:      v5.0.2-dirty
I (2236) cpu_start: Compile time:     Jul 18 2023 06:39:58
I (2238) cpu_start: ELF file SHA256:  5defc22551c051a5...
I (2240) cpu_start: ESP-IDF:          v5.0.2-dirty
I (2242) cpu_start: Min chip rev:     v3.0
I (2252) cpu_start: Max chip rev:     v3.99
I (2255) cpu_start: Chip rev:         v3.0
D (2265) memory_layout: Checking 8 reserved memory ranges:
D (2267) memory_layout: Reserved memory range 0x3f800000 - 0x3fc00000
D (2270) memory_layout: Reserved memory range 0x3ffae000 - 0x3ffae6e0
D (2271) memory_layout: Reserved memory range 0x3ffb0000 - 0x3ffb6688
D (2272) memory_layout: Reserved memory range 0x3ffe0000 - 0x3ffe0440
D (2274) memory_layout: Reserved memory range 0x3ffe3f20 - 0x3ffe4350
D (2275) memory_layout: Reserved memory range 0x40070000 - 0x40078000
D (2277) memory_layout: Reserved memory range 0x40078000 - 0x40080000
D (2278) memory_layout: Reserved memory range 0x40080000 - 0x40090858
D (2280) memory_layout: Building list of available memory regions:
D (2282) memory_layout: Available memory region 0x3ffae6e0 - 0x3ffb0000
D (2284) memory_layout: Available memory region 0x3ffb6688 - 0x3ffb8000
D (2285) memory_layout: Available memory region 0x3ffb8000 - 0x3ffc0000
D (2286) memory_layout: Available memory region 0x3ffc0000 - 0x3ffc2000
D (2287) memory_layout: Available memory region 0x3ffc2000 - 0x3ffc4000
D (2289) memory_layout: Available memory region 0x3ffc4000 - 0x3ffc6000
D (2290) memory_layout: Available memory region 0x3ffc6000 - 0x3ffc8000
D (2291) memory_layout: Available memory region 0x3ffc8000 - 0x3ffca000
D (2292) memory_layout: Available memory region 0x3ffca000 - 0x3ffcc000
D (2294) memory_layout: Available memory region 0x3ffcc000 - 0x3ffce000
D (2295) memory_layout: Available memory region 0x3ffce000 - 0x3ffd0000
D (2296) memory_layout: Available memory region 0x3ffd0000 - 0x3ffd2000
D (2297) memory_layout: Available memory region 0x3ffd2000 - 0x3ffd4000
D (2298) memory_layout: Available memory region 0x3ffd4000 - 0x3ffd6000
D (2299) memory_layout: Available memory region 0x3ffd6000 - 0x3ffd8000
D (2300) memory_layout: Available memory region 0x3ffd8000 - 0x3ffda000
D (2301) memory_layout: Available memory region 0x3ffda000 - 0x3ffdc000
D (2303) memory_layout: Available memory region 0x3ffdc000 - 0x3ffde000
D (2304) memory_layout: Available memory region 0x3ffde000 - 0x3ffe0000
D (2305) memory_layout: Available memory region 0x3ffe0440 - 0x3ffe3f20
D (2306) memory_layout: Available memory region 0x3ffe4350 - 0x3ffe8000
D (2307) memory_layout: Available memory region 0x3ffe8000 - 0x3fff0000
D (2309) memory_layout: Available memory region 0x3fff0000 - 0x3fff8000
D (2310) memory_layout: Available memory region 0x3fff8000 - 0x3fffc000
D (2311) memory_layout: Available memory region 0x3fffc000 - 0x40000000
D (2312) memory_layout: Available memory region 0x40090858 - 0x40092000
D (2313) memory_layout: Available memory region 0x40092000 - 0x40094000
D (2314) memory_layout: Available memory region 0x40094000 - 0x40096000
D (2316) memory_layout: Available memory region 0x40096000 - 0x40098000
D (2317) memory_layout: Available memory region 0x40098000 - 0x4009a000
D (2318) memory_layout: Available memory region 0x4009a000 - 0x4009c000
D (2319) memory_layout: Available memory region 0x4009c000 - 0x4009e000
D (2320) memory_layout: Available memory region 0x4009e000 - 0x400a0000
I (2322) heap_init: Initializing. RAM available for dynamic allocation:
D (2330) heap_init: New heap initialised at 0x3ffae6e0
I (2331) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
D (2333) heap_init: New heap initialised at 0x3ffb6688
I (2334) heap_init: At 3FFB6688 len 00029978 (166 KiB): DRAM
I (2335) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (2336) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
D (2338) heap_init: New heap initialised at 0x40090858
I (2339) heap_init: At 40090858 len 0000F7A8 (61 KiB): IRAM
I (2360) esp_psram: Adding pool of 4096K of PSRAM memory to heap allocator
D (2372) intr_alloc: Connected src 46 to int 2 (cpu 0)
D (2451) spi_flash: trying chip: issi
D (2502) spi_flash: trying chip: gd
I (2546) spi_flash: detected chip: gd
I (2591) spi_flash: flash io: dio
D (2640) efuse: In EFUSE_BLK0__DATA0_REG is used 1 bits starting with 2 bit
D (2644) efuse: In EFUSE_BLK0__DATA0_REG is used 7 bits starting with 20 bit
W (2646) flash_encrypt: Flash encryption mode is DEVELOPMENT (not secure)
D (2662) efuse: In EFUSE_BLK0__DATA0_REG is used 1 bits starting with 17 bit
D (2665) efuse: In EFUSE_BLK2__DATA0_REG is used 32 bits starting with 0 bit
D (2666) efuse: In EFUSE_BLK2__DATA1_REG is used 32 bits starting with 0 bit
D (2667) efuse: In EFUSE_BLK2__DATA2_REG is used 32 bits starting with 0 bit
D (2669) efuse: In EFUSE_BLK2__DATA3_REG is used 32 bits starting with 0 bit
D (2670) efuse: In EFUSE_BLK2__DATA4_REG is used 32 bits starting with 0 bit
D (2671) efuse: In EFUSE_BLK2__DATA5_REG is used 32 bits starting with 0 bit
D (2672) efuse: In EFUSE_BLK2__DATA6_REG is used 32 bits starting with 0 bit
D (2674) efuse: In EFUSE_BLK2__DATA7_REG is used 32 bits starting with 0 bit
D (2676) efuse: In EFUSE_BLK0__DATA0_REG is used 1 bits starting with 8 bit
D (2678) cpu_start: calling init function: 0x4015375c
D (2681) cpu_start: calling init function: 0x40153278
D (2683) cpu_start: calling init function: 0x40126d58
D (2689) cpu_start: calling init function: 0x40105c58
D (2704) cpu_start: calling init function: 0x400d47bc
D (2706) cpu_start: calling init function: 0x400d3958
D (2707) cpu_start: calling init function: 0x400d7988 on core: 0
D (2720) intr_alloc: Connected src 17 to int 3 (cpu 0)
D (2723) cpu_start: calling init function: 0x4016a118 on core: 0
D (2737) intr_alloc: Connected src 24 to int 9 (cpu 0)
I (2739) cpu_start: Starting scheduler on PRO CPU.
D (26) intr_alloc: Connected src 25 to int 2 (cpu 1)
I (29) cpu_start: Starting scheduler on APP CPU.
D (2831) heap_init: New heap initialised at 0x3ffe0440
D (2834) heap_init: New heap initialised at 0x3ffe4350
I (2835) esp_psram: Reserving pool of 32K of internal memory for DMA/internal allocations
D (2840) esp_psram: Allocating block of size 32768 bytes
D (2849) intr_alloc: Connected src 16 to int 12 (cpu 0)
D (2855) MAIN: FW Version: 1.0.17
I (5172) nvs: NVS key partition empty, generating keys

The line ```
E (24116) esp_image: image at 0x380000 has invalid magic byte (nothing flashed here?)
ets Jul 29 2019 12:21:46

Is it normal or should I worry about ? I'm using the qemu emulatation and my emulated device boots correctly. But produces this error at first.

Another strange is that my emulated device does not display :

I (1022) boot: Loaded app from partition at offset 0x10000
I (1022) boot: Checking secure boot...
I (1022) secure_boot: bootloader secure boot is already enabled, continuing..
I (1023) boot: Checking flash encryption...
I (1023) flash_encrypt: flash encryption is enabled (0 plaintext flashes left)

On another device using secure boot and flash encryption (that I did not develop) this is outputed. Is it normal that mine does not output anything about this ?

I figured out that this was because I did not include the second app partition in the merge_bin command. Now it is integrated and all partitions are encrypted correctly.
Is it necessary to put both partitions at the beginning ?

Thank you. Now it all works well. Last question, if I happened to make a mistake in the firmware and for example the device crashes in loop. Is there a way to reflash it or not at all now that flash encryption and secure boot v2 are enabled ?

Hi @FnxQT If there's nothing else then can you close the issue?
Thanks,
Aditya

Thank you for your help.


Add support for integers in compression step

@ShawnXu613 can you make a pull request of your code?


Add CnY and CnZ gates to converters

CnY and CnZ gates are now supported in pytket. The conversion done by tk_to_qiskit should be able to handle these gates.
A test should also be added that covers conversion from a Circuit containing CnY and CnZ operations.

Seems qiskit doesn't support CnZ and CnY gates directly. To do these gates you need to use the MCMT gate and pass in the appropriate parameters.
Given this I'm not sure how useful  adding this will be at the moment.
If CnY and CnZ gates are encountered in the tk_to_qiskit conversion they will be implemented in terms of other supported gates after #10.

I thought this would be tricky. Turns out to be fairly straightforward (see #50).

closed by #50


[Bug]  URLError when downoading population data with DataDownloader

Checkbox

[X] I agree to follow code of conduct and to engage in discussion actively.
[X] I agree to create a new issue with the other templates if this is not a bug.
[X] I used the latest version of covsirphy.

Summary
URLError was raised when downoading population data with DataDownloader class.
Reproducible example script
import covsirphy as cs
print(cs.__version__)
dl = cs.DataDownloader()
dl.layer(databases=["wpp"])

The current outputs
2022-12-25 at 16:03:01 | INFO | Retrieving datasets from World Population Prospects https://population.un.org/wpp/
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/covid19-sir/covsirphy/downloading/downloader.py", line 95, in layer
    new_df = db.layer(country=country, province=province).convert_dtypes()
  File "/covid19-sir/covsirphy/downloading/_db.py", line 56, in layer
    return self._country()
  File "/covid19-sir/covsirphy/downloading/_db_wpp.py", line 42, in _country
    df = self._provide(url=url, suffix="_level1", columns=list(self.COL_DICT.keys()))
  File "/covid19-sir/covsirphy/downloading/_db.py", line 133, in _provide
    df = self._provider.latest(filename=filename, url=url, columns=columns, date=date, date_format=date_format)
  File "/covid19-sir/covsirphy/downloading/_provider.py", line 42, in latest
    df = self.read_csv(url, columns, date=date, date_format=date_format)
  File "/covid19-sir/covsirphy/downloading/_provider.py", line 104, in read_csv
    df = pd.read_csv(path, **kwargs)
  File "/.cache/pypoetry/virtualenvs/covsirphy-UkF5q403-py3.10/lib/python3.10/site-packages/pandas/util/_decorators.py", line 211, in wrapper
    return func(*args, **kwargs)
  File "/.cache/pypoetry/virtualenvs/covsirphy-UkF5q403-py3.10/lib/python3.10/site-packages/pandas/util/_decorators.py", line 331, in wrapper
    return func(*args, **kwargs)
  File "/.cache/pypoetry/virtualenvs/covsirphy-UkF5q403-py3.10/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 950, in read_csv
    return _read(filepath_or_buffer, kwds)
  File "/.cache/pypoetry/virtualenvs/covsirphy-UkF5q403-py3.10/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 605, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
  File "/.cache/pypoetry/virtualenvs/covsirphy-UkF5q403-py3.10/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1442, in __init__
    self._engine = self._make_engine(f, self.engine)
  File "/.cache/pypoetry/virtualenvs/covsirphy-UkF5q403-py3.10/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1735, in _make_engine
    self.handles = get_handle(
  File "/.cache/pypoetry/virtualenvs/covsirphy-UkF5q403-py3.10/lib/python3.10/site-packages/pandas/io/common.py", line 713, in get_handle
    ioargs = _get_filepath_or_buffer(
  File "/.cache/pypoetry/virtualenvs/covsirphy-UkF5q403-py3.10/lib/python3.10/site-packages/pandas/io/common.py", line 363, in _get_filepath_or_buffer
    with urlopen(req_info) as req:
  File "/.cache/pypoetry/virtualenvs/covsirphy-UkF5q403-py3.10/lib/python3.10/site-packages/pandas/io/common.py", line 265, in urlopen
    return urllib.request.urlopen(*args, **kwargs)
  File "/.anyenv/envs/pyenv/versions/3.10.9/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/.anyenv/envs/pyenv/versions/3.10.9/lib/python3.10/urllib/request.py", line 519, in open
    response = self._open(req, data)
  File "/.anyenv/envs/pyenv/versions/3.10.9/lib/python3.10/urllib/request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/.anyenv/envs/pyenv/versions/3.10.9/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/.anyenv/envs/pyenv/versions/3.10.9/lib/python3.10/urllib/request.py", line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/.anyenv/envs/pyenv/versions/3.10.9/lib/python3.10/urllib/request.py", line 1351, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: UNSAFE_LEGACY_RENEGOTIATION_DISABLED] unsafe legacy renegotiation disabled (_ssl.c:997)>

Expected outputs
No errors

Environment
- CovsirPhy version: 3.0.0.dev7
- Python version: 3.10.9

Package manager (required if installation issue)
No response
Platform (required if installation issue)
No response
Additional Context
No response

The following codes also raise the same error.
import pandas as pd
pd.read_csv("https://population.un.org/wpp/Download/Files/1_Indicators%20(Standard)/CSV_FILES/WPP2022_TotalPopulationBySex.zip", storage_options={'verify': False})

cf.
https://github.com/urllib3/urllib3/issues/2653
https://docs.python.org/3/library/ssl.html

The following script showed 200 success code and a dataframe.
import io
from urllib3 import PoolManager
from urllib3.util.ssl_ import create_urllib3_context
from zipfile import ZipFile
import pandas as pd

URL = "https://population.un.org/wpp/Download/Files/1_Indicators%20(Standard)/CSV_FILES/WPP2022_TotalPopulationBySex.zip"

ctx = create_urllib3_context()
ctx.load_default_certs()
ctx.options |= 0x4  # ssl.OP_LEGACY_SERVER_CONNECT

with PoolManager(ssl_context=ctx) as http:
    r = http.request("GET", URL)
    print(r.status)
    with ZipFile(io.BytesIO(r.data), "r") as fh:
        text = fh.read("WPP2022_TotalPopulationBySex.csv")
    raw = pd.read_csv(io.StringIO(text.decode("utf-8")), low_memory=False)
print(raw)


Inline matplotlib plot for 2_Graph_optimization_with_QAOA

Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Fixes #202


Properly expose some Window properties

Why position and size (min and max) properties are set to be Vector2 here?
They are Vector2i and Size2i, so with integers, in the source code.

@samdze *i variations aren't recognized. Don't worry, the inspector changes the float values to integers for those.

This has been fixed by #39257 in a far better way.


How add a custom types ?

Hi!
I now need add types as Int (math/big) and
decimal (https://github.com/ericlagergren/decimal) in my protobuff code and
in future others types, too
Please, someone can explain how? :-)
Very very very Thanks in Advance! :-)
p.s.: I'm a newbee in golang and protobuff :-)

Protocol buffers are intended to be a data interchange format that works well across different programming languages. As such, it provides decent generated types for all languages, but is not great in any one language. Allowing specialized types causes the proto source files to end up being overly geared towards one language or another.


Update skateboard.py

Got rid of your utterly disgusting lack of a main method

Here at The Raspberry Pi Guy we value your code suggestions and thank you for your time in devising them.
Meh. May merge it when I can be bothered ;) It means getting the skateboard out, unscrewing the case and then plugging in a WiFi dongle to introduce the change on the Pi Zero too. Effort

I have another thing I want to change hold on


Handling FooterAdapter click event

Hello,
I am trying to set a click event listener on an item from FooterAdapter. I'm following the sample app here.
withOnClickListener appears to be available only on FastAdapter. What's the alternative for FooterAdapter?

@aRusenov the FastAdapter is the parent of all subadapters. so the FastAdapter will also get the event of the FooterAdapter just listen in the FastAdapter's click listener and react on the event

Thanks, @mikepenz
I already tried that and it appears I forgot to set withEnabled(true) when adding the footer item:
footerAdapter.add(new RetryItem().withEnabled(true))
I also noticed I could individually chain withOnItemClickListener(...) to my footer items. That helps avoid generifying my FastAdapter.


bug: impl alias leads to a cycle and compiler crash

Bug Report
Cairo version:
Latest main as of today
Current behavior:
Compiler crashes when trying to use an Impl alias.
Expected behavior:
Things compile.
Steps to reproduce:
Compile the following code:
mod hide {
    mod test {
        trait Test<T> {
            fn func(self: T);
        }

        mod generic_impl {
            use super::Test;
            impl GenericTest<T, impl TDrop: Drop<T>> of Test<T> {
                fn func(self: T) {}
            }
        }
    }
}

use hide::test::Test;

//use hide::test::generic_impl;
impl MyImpl = hide::test::generic_impl::GenericTest<felt252>;

#[test]
fn main() {
    123.func();
}

This crashes with:
thread 'main' panicked at 'Internal error, cycle detected:

DatabaseKeyIndex { group_index: 4, query_index: 54, key_index: 0 }
DatabaseKeyIndex { group_index: 4, query_index: 84, key_index: 0 }
DatabaseKeyIndex { group_index: 4, query_index: 56, key_index: 0 }
', /Users/lancelot/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.16.1/src/lib.rs:490:48

Related code:
If instead of
//use hide::test::generic_impl;
impl MyImpl = hide::test::generic_impl::GenericTest<felt252>;

One uses
If instead of
use hide::test::generic_impl;
//impl MyImpl = hide::test::generic_impl::GenericTest<felt252>;

Things work correctly (and the impl is auto-generated).
Other information:
Maybe related to #2995 ?

This now works on main.


Add options to allow custom log function

I was using the library console-log-level to develop AWS Lambda function with log to CloudWatch. I encountered an issue which I need to replace all \n characters to \r characters and I found no way to allow me to alter the message.
So I tried to seek other libraries such as winston. They provide logging to different destination such as files, but they (winston) either didn't support multiple arguments supported in console.log or they (log4js) didn't support altering the message.
So I guess a custom log function would make things flexible here, and console-log-level to be used to log to file when combing with other logging libraries.
Edit 2020-02-29: Recently I found loglevel and using the plugin approach to fulfill my requirement.
Edit 2020-10-13: Recently I found winston also support multiple arguments using format.splat().

Closing the PR has this haven't been merged for a long time. Maybe we should just keep the logger as simple as it.


rdkit-js npm package (minimallib) - unable to build and release

Describe the bug
unable to build and release the minimal lib as the build is failing (and need help debugging)
To Reproduce
You can use the following rdkit-js branch, and run the following command from the root of the repository:
docker build --no-cache -f Dockerfile --build-arg RDKIT_BRANCH=Release_2024_03_3

Note that the docker file is equivalent to the one in rdkit https://github.com/rdkit/rdkit/blob/Release_2024_03_3/Code/MinimalLib/docker/Dockerfile
Minus this line that I had to change:
RUN echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list.d/backports.list

was changed to
RUN echo "deb http://archive.debian.org/debian buster-backports main contrib non-free" >> /etc/apt/sources.list.d/backports.list

Expected behavior
The build succeeds and produce the expected minimallib outputs
Screenshots
please see rdkit-js discussion here for error logs https://github.com/rdkit/rdkit-js/discussions/456
Configuration (please complete the following information):

RDKit version: 2024.03.3
OS: Ubuntu 22.04

Additional context
please see rdkit-js discussion here https://github.com/rdkit/rdkit-js/discussions/456

@MichelML Thanks for reporting, I’ll look into this tomorrow.

I'm very curious why this particular change makes a difference

@greglandrum this is what I followed https://www.cyberciti.biz/faq/the-repository-http-deb-debian-org-debian-buster-backports-release-no-longer-has-a-release-file/

could it be because of a different base image version that I had to do this? We use debian:buster as base which can change based on new debian image releases unless I'm wrong.

small bump on this @ptosco , let me know when if you had time to look at this


measure that is also dimension should be removed

Codecov Report

Merging #263 into master will increase coverage by 3.54%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #263      +/-   ##
==========================================
+ Coverage   68.85%   72.39%   +3.54%
==========================================
  Files         163      163
  Lines       22610    22618       +8
==========================================
+ Hits        15567    16375     +808
+ Misses       5823     4966     -857
- Partials     1220     1277      +57

Impacted Files
Coverage Δ

query/sql/sql_parser.go
68.91% <100%> (+68.91%)
:arrow_up:

datanode/peer_source.go
58.11% <0%> (-2.57%)
:arrow_down:

controller/mutators/etcd/schema_mutator.go
59.17% <0%> (-1.78%)
:arrow_down:

memstore/cuckoo_index.go
90.26% <0%> (-1.01%)
:arrow_down:

subscriber/common/job/driver.go
70.56% <0%> (-0.71%)
:arrow_down:

broker/query_plan_non_agg.go
76.03% <0%> (+2.47%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f46f9db...ad12083. Read the comment docs.


MangaFox scraping support

Hi, I am wondering if support for Mangafox scraping will be added to Cum. There are a few mangas that Batoto removed the English versions of which Mangafox has.
Thanks.

Isn't everything on Mangafox downscaled and watermarked? Doesn't sound like worth any effort.

It is watermarked, I am not sure about downscaled.
Although I think more sources would be nice. I have only been able to find "Online - The comic" on MangaFox so far. I haven't checked your other sources as of yet.

As far as I can see, Mangafox takes chapters, downscales them, adds a watermark and then saves them as low-quality JPG even if the source is PNG.
For comparison: Mangafox (728x1127 with watermark) vs. Batoto (909x1300).
Again, seems like a complete waste of time of a site. I imagine it has no content that is not available somewhere else already.

I've searched all supported sources and the manga I referenced to is not found in English on any of them.
It's up to you to add it as a source, more source the better at least to me, it's not like people are forced to use it if there is a source with better quality.
I used my personal scaper I wrote to fetch the manga, but seeing another source added to cum would be nice on top of the ones already present.

I've searched all supported sources and the manga I referenced to is not found in English on any of them.

You mean this manga?

I can't tell. How do you sign up for that source. Their root domain http://madokami.al/ gives me a connection reset, and I can't find a register page.

HTTPS only. Details on the site.
Anyways, Mangafox seems like a waste of my time since I am the one who has to write and maintain it.

Details aren't on the site anymore it seems. (The domain should be https://manga.madokami.al)
Join #madokami on irc.rizon.net and read the topic, instructions should be there.


Moved: Vivaldi.Vivaldi version 4.0.2312.25

This pull request is automatically generated by 🥟 Dumplings
Microsoft Reviewers: Open in CodeFlow

/AzurePipelines run


Title: Implement Two Sum Algorithm

Initiative (Required)
GSSoC 2024 Extd 🚀
Is your feature request related to a problem? Please describe.
Implement a function to solve the "Two Sum" problem. Given an array of integers (nums) and an integer (target), the goal is to return the indices of two numbers from the array such that their sum equals the target.
You must assume that:
Each input will have exactly one solution.
The same element cannot be used twice.
The result can be returned in any order.
Example Input/Output:
Example 1:
Input: nums = [2, 7, 11, 15], target = 9
Output: [0, 1]
Explanation: Because nums[0] + nums[1] == 9, we return [0, 1].
Describe the solution you'd like.
Solution for the described problem.
Add any other context or screenshots about the feature request here.
contributing under hactoberfest'24 and gssoc'24 ext

@Kushal997-das  created pr for the issue, sorry for the delay. please check once and suggest if need any changes. Thank you !


Show all Action attributes in a Table

Currently, it shows only name.

Not needed, would add too much clutter


Tags not carrying over

I've copied over files from one USB to another and noticed the tags did not carry over. Can anyone help, please?

Closing an issue signals that no further action is required. Is that what you mean?
Dijji

Yes, sorry, I had figured out what went wrong. Thank you 😊
Best Regards,
Awhina Shortcliffe
<EMAIL_ADDRESS>Design Assistant
awhina<EMAIL_ADDRESS>Phone:  +64 (09) 303 1839
www.franklins.co.nz
[fb-01]http://www.facebook.com/FranklinsNZ   [linkedin-01] http://nz.linkedin.com/company/franklin-plumbing-and-bathroomware     [insta-01] http://www.instagram.com/Franklins_NZ/
Franklins Head Office  •  24 Stadium Drive, PO BOX 310  •  Pukekohe, New Zealand 2340
From: Dijji<EMAIL_ADDRESS>Sent: Friday, 17 May 2019 6:32 PM
To: Dijji/FileMeta<EMAIL_ADDRESS>Cc: Awhina Shortcliffe<EMAIL_ADDRESS>State change<EMAIL_ADDRESS>Subject: Re: [Dijji/FileMeta] Tags not carrying over (#59)
Closing an issue signals that no further action is required. Is that what you mean?
Dijji
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHubhttps://github.com/Dijji/FileMeta/issues/59?email_source=notifications&email_token=AMBBJAJOPJA52EUKTDGZU73PVZGOZA5CNFSM4HNQXVA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVT33CA#issuecomment-493337992, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMBBJAO6VGLSGOIFG7FD6GDPVZGOZANCNFSM4HNQXVAQ.


The build/puml-cache folder gets left in current working directory

Thanks a again for an excellent project! :)
One small thing, if I ask Structurizr Site Generatr to output to a folder somewhere else, it still ends up creating a ./build/puml-cache/ hierarchy in the current working directly, and leaving it there.
eg
$ ls
workspace.dsl
$ structurizr-site-generatr generate-site --output-dir /tmp/arch-site --workspace-file workspace.dsl
...
$ ls
build workspace.dsl
$ find build/
build/
build/puml-cache
$

This isn't a problem, just a bit messy.  Ideally the folder would get cleaned-up afterwards, or there'd be some way of specifying where to have it created, so it doesn't have to pollute my source tree :)
Thanks!

Hi @pcolby, you're welcome 😃!
The build directory in the current working is intended to be added to your .gitignore, just like for example the target directory of a Maven project. Any "temporary" files in there are actually reused the next time you perform a generate-site or serve.
I think adding a --build-dir option, allowing one to specify where the build directory should be created would be a nice-to-have feature for people who want to keep their source directory clean.

I'm closing this issue for now.


Create pages for teaching

@MichalMed You requested me to add some pages to teaching. I am ok have-ing such page, but I believe it is not very important (thus I would be ok even if it is not accessible from our homepage).
Nevertheless, in case we want to have it like you proposed, I would design it as follows:

A Picture something relevant for enterprise systems + sematic web ??
I would mention only that our main teaching scope is "Semantic web+Enterprise architectures in JAVA".   And nothing but reference EAR) and OSW.
There is also option to mention that we participate in teaching: SWA and DBS?.

In addition, in case we go this direction, we could include some nice outputs of students !? But again it should be rather links to pages which hosts the subject.
Alternative option is to have teaching activities only next to each person.

@blcham Can this be closed? There is a page for teaching and it covers pretty much everything you specify in the issue description.

@ledsoft sure, thanks


Not expecting id_token in response

I freely admit my newbie status to OIDC, but section "<IP_ADDRESS>.  Successful Authentication Response" of the spec seems to clearly say that for an openid scoped request using the implicit flow, the id_token is required in response.
However, when using  this client library with scopes including openid, and response_type "token" I get the error "Not expecting id_token in response".
Bug, or my ignorance (but please don't simply jump to the latter conclusion - other more experienced people around me think I'm not mistaken here)?
(the reason for not using id_token in the response type is a possibly-broken Auth service - that being chased up by other channels).

response_type of "id_token token" is how you request both. response_type of just "token" is only requesting an access token.

Thank you for your response. As I said I'm a bit of a newbie in this area. I've since found section http://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthRequest Which does, indeed seem to say that the only valid response_types for an OIDC-scoped request are "id_token" (which returns no access token) or "id_token token" (which returns both) - it being pointless to use just "token" and OIDC since it would negate the purpose of OIDC :) - back to the bad provider then to sort them out :)

I do have a follow-up question. Given the basic premise from section 1

OpenID Connect implements authentication as an extension to the OAuth 2.0 authorization process. Use of this extension is requested by Clients by including the openid scope value in the Authorization Request.

and that section <IP_ADDRESS> says

NOTE: While OAuth 2.0 also defines the token Response Type value for the Implicit Flow, OpenID Connect does not use this Response Type, since no ID Token would be returned.

should it therefore be an error to use the two together?

(I've posted this question to stack overflow)

should it therefore be an error to use the two together?

no -- check the OIDC spec


[ZEPPELIN-4] Sync the version of dependencies with Spark

This PR is from NFlabs/zeppelin#394
Fixed indentation with 2 spaces

LGTM. Thanks for the contribution!
While this PR(NFLabs/zeppelin#394) lasts for more than 5 days since @anthonycorbacho's comment, i'm merging it if there're no objects in next 12 hours.

@Leemoonsoo Thanks.


vike.config.js

Moved to https://github.com/vikejs/vike/pull/1771. (Same PR but a different branch name.)


no ui no invetrory in the latest version and no selecting?!

What you were trying to do
play the game
What actually happened
there was no ui
How to reproduce
idk

Step 1idk
Step 2idk
Step 3idk

Log details and game version the latest version
Computer details RX 480 I5 8 GB of RAM installed Windows 10 Pro

Closing this as no further information was provided.
I suspect this was either starting the bare-bone engine demo gameplay, or hiding the UI via h key by accident. Inventory and UI was showing up for all game modes during the latest play-test.


AttributeError: 'Parameter' object has no attribute 'SCB'

bin /home/paperspace/.local/lib/python3.9/site-packages/bitsandbytes/libbitsandbytes_cuda117_nocublaslt.so
/home/paperspace/.local/lib/python3.9/site-packages/bitsandbytes/cuda_setup/main.py:149: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {PosixPath('/home/paperspace/.local/lib/python3.9/site-packages/cv2/../../lib64')}
warn(msg)
CUDA SETUP: CUDA runtime path found: /usr/local/cuda-11.7/lib64/libcudart.so
CUDA SETUP: Highest compute capability among GPUs detected: 5.2
CUDA SETUP: Detected CUDA version 117
/home/paperspace/.local/lib/python3.9/site-packages/bitsandbytes/cuda_setup/main.py:149: UserWarning: WARNING: Compute capability < 7.5 detected! Only slow 8-bit matmul is supported for your GPU!
warn(msg)
CUDA SETUP: Loading binary /home/paperspace/.local/lib/python3.9/site-packages/bitsandbytes/libbitsandbytes_cuda117_nocublaslt.so...
Traceback (most recent call last):
File "/home/paperspace/Caption-Anything/app_langchain.py", line 28, in
shared_captioner = build_captioner(args.captioner, args.device, args)
File "/home/paperspace/Caption-Anything/caption_anything/captioner/init.py", line 11, in build_captioner
return BLIP2Captioner(device, enable_filter=args.clip_filter)
File "/home/paperspace/Caption-Anything/caption_anything/captioner/blip2.py", line 24, in init
self.model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-opt-2.7b",
File "/home/paperspace/.local/lib/python3.9/site-packages/transformers/modeling_utils.py", line 2829, in from_pretrained
) = cls._load_pretrained_model(
File "/home/paperspace/.local/lib/python3.9/site-packages/transformers/modeling_utils.py", line 2937, in _load_pretrained_model
model_state_dict = model.state_dict()
File "/home/paperspace/.local/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1310, in state_dict
module.state_dict(destination, prefix + name + '.', keep_vars=keep_vars)
File "/home/paperspace/.local/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1310, in state_dict
module.state_dict(destination, prefix + name + '.', keep_vars=keep_vars)
File "/home/paperspace/.local/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1307, in state_dict
self._save_to_state_dict(destination, prefix, keep_vars)
File "/home/paperspace/.local/lib/python3.9/site-packages/bitsandbytes/nn/modules.py", line 344, in _save_to_state_dict
param_from_weight = getattr(self.weight, weight_name)

Same error for me, as well. This was ChatGPT's (not helpful) answer:
The error message suggests that the 'Parameter' object does not have an attribute named 'SCB'. This error is occurring in the _save_to_state_dict method of the bitsandbytes.nn.modules module.
It appears that the Blip2ForConditionalGeneration model from the Salesforce/blip2-opt-6.7b checkpoint is trying to access the 'SCB' attribute from the weight parameter, but it doesn't exist.
To resolve this issue, you can try the following:
Update the bitsandbytes library to the latest version, as newer versions may have addressed this issue.
Use a different version of the Salesforce/blip2-opt checkpoint that is compatible with your current code.
Contact the developers of the bitsandbytes library or the Salesforce/blip2-opt checkpoint for assistance in resolving the attribute error.
Make sure to check the documentation and release notes of both the bitsandbytes library and the Salesforce/blip2-opt checkpoint for any specific instructions or known issues related to attribute errors.

Did you solve the problem? I have the same problem

Same error when loading BLIP2 using Blip2ForConditionalGeneration.from_pretrained(...load_in_8bit=True)
packages:
torch 2.0.0
bitsandbytes 0.39.0
transformers 4.30.0.dev0
accelerate 0.19.0

This might be related to #491. Your GPU does not support the main 8-bit implementations and falls back to the secondary implementations. It seems these implementations have some bugs. I need to look into this further. A minimal script that reproduces this error might be useful, but I do not have access to Maxwell GPUs and it will be difficult  to reproduce in any case.

Bitsandbytes was not supported windows before, but my method can support windows.（yuhuang）
1  open folder J:\StableDiffusion\sdwebui，Click the address bar of the folder and enter CMD
or WIN+R, CMD  。enter，cd /d J:\StableDiffusion\sdwebui
2  J:\StableDiffusion\sdwebui\py310\python.exe -m pip uninstall bitsandbytes
3 J:\StableDiffusion\sdwebui\py310\python.exe -m pip uninstall bitsandbytes-windows
4 J:\StableDiffusion\sdwebui\py310\python.exe -m pip install https://github.com/jllllll/bitsandbytes-windows-webui/releases/download/wheels/bitsandbytes-0.41.1-py3-none-win_amd64.whl
Replace your SD venv directory file（python.exe Folder） here（J:\StableDiffusion\sdwebui\py310）


What is the difference between VideoLLaMA and VideoLLaMA2 ?

Hi, thanks for sharing VideoLLaMA2. Is there any improvement based on VideoLLaMA?

Compared to VideoLLaMA, VideoLLaMA2 has improved architecture (STC connector for spatial-temporal modeling), better performances (on both video and audio tasks), and a more user-friendly codebase for training and evaluation.

Thanks for your explanation. How many GPUs do you recommend using for training, evaluation, and inference?

Lets take VideoLLaMA2-7B as an example:

evaluation & inference: 1*V100-32GB is enough and works fine (actually we do all of the evaluations with fp16 instead of bf16)
pre-training: 1*A100/A800-80GB should be OK
fine-tuning: better no less than 4*A100/A800-80GBs

@lixin4ever  Hi, may I ask the training time with 4*A100? From the code I think it should be extremly slow, since you have almost 80 images into vit, if there is batchSize=10 for training. (images will be expanding to video as well)


Refactor backends

This PR performs some refactoring targeted at the backends, primarily:

Split backends into distinct AST transformation and compilation modules.
Fix conceptually blurred lines between JS AST transformation and compilation, aided by the above.
Enhance type safety in a couple of places by making better use of the type system.

Follow the commits for context and an easier review.

@samhh I'll let someone else review this as I haven't looked at the code for intlc yet. cc @Magellol @nim442


Update program-list.json

Summary
< A quick summary of the associated pull request >
Quality Assurance Checklist
< Confirmation of this pull request meeting the following requirements, prior to merge >

Review Items
Y/N

Site has a publicly known bug bounty or vulnerability disclosure program
y

Disclosure policy is publicly available
y

Public URL
y

Submission follows the Diodb schema
y

Your Twitter handle (Optional):

Hey @JMCA2! Thanks for your contribution! I see there are a lot of changes, could you summarise what you did? Have you used the tool/format.sh script to format the program-list.json file?

@nikitastupin The only thing I did is adding the program for jd-services.eu
I had trouble using the tool so I added it manually


Comparison with CSS Modules

Would be interesting to see the overlaps and diffs.
https://github.com/FormidableLabs/radium/tree/master/docs/comparison

Agreed!

Closing in favor of #926


OCPBUGS-1067: Recreate storageclass in case it was deleted

/bugzilla refresh

/bugzilla refresh

/jira refresh

/retest

/retest

/lgtm


Update change-email-address.md

Made changes to the navigation
Fixes#https://github.com/MicrosoftDocs/microsoft-365-docs/issues/10592

@JohanFreelancer9 please copy review

Learn Build status updates of commit 25cd02f:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-365/admin/email/change-email-address.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

Learn Build status updates of commit 3e33535:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-365/admin/email/change-email-address.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel


detecting that app is running in ripple emulator

is there a recommended navigator.userAgent.test() or other check that one should use to determine at runtime that your cordova app is running in the ripple emulator vs in a device specific emulator or on a specific device?

I use before-cordova.js in my app for stubbing unsupported plugins in Ripple.

thanks for response and library suggestion.  i ended up going with the following implementation.
    // determines if current runtime environment is ripple emulator
    export function isRippleEmulator() {
        if (window.parent && window.parent['ripple']) { return true; } else { return false; } // or return !!(window.parent && window.parent['ripple']);
        //if (window.tinyHippos != undefined) { return true; } else { return false; }
        //if (!!document.getElementById("tinyhippos-injected") && !!window.top.require) { return true; } else { return false; }
        //if (navigator.userAgent.match(/(Android|BlackBerry|Edge|IEMobile|iPad|iPhone|iPod)/)) { return false; } else { return true; }
// using window.parent['ripple'] in lieu of window.parent.ripple to get around typescript "Property 'ripple' does not exist on type 'Window'"
// ripple android  = Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36"
// ripple ios      = Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36
// android google  = Mozilla/5.0 (Linux; Android 4.4.4; sdk Build/KK) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/<IP_ADDRESS> Mobile Safari/537.36
// android vstudio = ???
// win bigscreen   = Mozilla/5.0 (Windows NT 10.0; Win64; x64; MSAppHost/3.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586
// win mobile      = ???
    }

Yep, checking window.parent && window.parent.ripple (or window.parent && window.parent['ripple'] if your in TypeScript and the compiler complains about .ripple) is the best way to check.

FYI @KODerFunk... I just committed a change that will stop Ripple displaying the "I Haz Cheeseburger" dialog for any Cordova exec call that doesn't provide either success or fail callbacks. This prevents it for most of the calls made by the status bar and keyboard plugins, and also the screen orientation plugin your stub handles.
I'm about to commit a change that handles the specific status bar and keyboard calls that do provide callbacks.


Fix https://github.com/google/guice/issues/888.

When Binder.requireExplicitBindings() is in effect, don't allow any
JIT bindings to be created in parent injectors, even JIT bindings that
are normally exempt such as the targets of linked key bindings.

Sorry for delay in looking at this.  I'm just testing it out over our internal corpus to see if it trips anything up.  Assuming it doesn't, this LGTM.  If it does, may take a bit longer...

Looks like this triggered some failures.  Looking more closely at the change, it looks like it's because this changes behavior in an unexpected way.  The rules for the previous behavior were:

If parent sets requireExplicitBindings, then all linked bindings will always be local to the injector that created them.  That is, it already behaved the way this PR wants.
If a parent didn't set requireExplicitBindings but a child did, a linked binding could be promoted to a parent injector.  That is, it didn't behave the way this PR wants.

We should keep the first rule -- if a parent sets requireExplicitBindings, then it's okay for a child to bind(Foo.class).to(FooImpl.class) w/o another explicit bind(FooImpl.class) statement, because the parent knows explicit bindings are required, so it lets the child take it.
We should fix the second rule -- if the parent didn't set requireExplicitBindings, then we should require an explicit binding for FooImpl (because we aren't sure if the parent would want it).
The PR right now fixes the second rule, but in doing so breaks the first one.  If we can leave the first rule intact, that'd make life a lot easier.

If parent sets requireExplicitBindings, then all linked bindings will always be local to the injector that created them. That is, it already behaved the way this PR wants.

Really?  Because this test passes against master:
public void testWeirdThingSamBerlinSaid() {
  Injector parent = Guice.createInjector(new AbstractModule() {
    @Override
    protected void configure() {
      binder().requireExplicitBindings();
    }
  });
  Injector child = parent.createChildInjector(new AbstractModule() {
    @Override
    protected void configure() {
      bind(Foo.class).to(FooImpl.class);
    }
  });
  ensureWorks(child, Foo.class);
  ensureFails(child, ALLOW_BINDING, FooImpl.class);
  ensureFails(parent, FAIL_ALL, Foo.class);
  ensureWorks(parent, FooImpl.class);
}

If parent sets requireExplicitBindings, then all linked bindings will always be local to the injector that created them. That is, it already behaved the way this PR wants.

Ah, I did not know that!  I'll restore that behaviour and add a test for it.

Weird.  See the existing testChildInjectorInheritsOption test (before changes in this PR) -- it validates that if parent sets requireExplicitBindings, then the child doing bind(Foo.class).to(FooImpl.class) puts FooImpl in the child, not the parent.

@sameb Yeah sorry that test failed, I just didn't see it at first :P

Still a few failures across the corpus, I'm going to work with the test/project owners to see what their intention was and try to clean things up.  They may change my mind on the usefulness of changing the behavior, we'll see!


Port: 7 to 8

➡ Forward port
Port gz-sim7 to gz-sim8
Branch comparison: https://github.com/gazebosim/gz-sim/compare/gz-sim8...gz-sim7
Note to maintainers: Remember to Merge with commit (not squash-merge or rebase)

@iche033 can you verify that I did the merge in Sensors.cc correctly?


[BUG] Wallet Fails on Load Under Ubuntu 22.04

Wallet Fails to load on Ubuntu 22.04
2023-02-11 12:44:45:078 [info]  execStart.stderr /tmp/.mount_EpicWav1VIBT/resources/bin/linux/epic-wallet: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Ubuntu 22.04 upgraded to OpenSSL 3.0 so OpenSSL 1.1 depricated in Ubuntu 22.04 and not providing libssl.so.1.1

I am getting this same error under debian 12

Closing due to long-standing issue, and well-known at this point.

For anyone who comes upon this later:
Binaries compiled on Ubuntu 20.04 will run on Ubuntu 20.04 only.
Binaries compiled on Ubuntu 22.04 will run on Ubuntu 22.04 only.
This is due to breaking changes in OpenSSL.  Expect these issues to continue until (and if) 20.04 gets the bump up to OpenSSL v3

I cannot find libssl1 in my repos, all i can find and have in the system in libssl3.
Is there a fix to that ?


[10.x] WFLY-6651 Deprecate servlet 'check-interval' attribute

This should go to 10.1 as it is minor model change, delaying it would need bump to 4.0.0 model.
it is also related to https://issues.jboss.org/browse/JBEAP-4224

Windows Build 4680 outcome was FAILURE using a merge of e0856f03c30d826e2056d4b41c4cb1409da40ef1
Summary: Tests failed: 1 (1 new), passed: 3363, ignored: 195 Build time: 01:22:48
Failed tests
org.jboss.as.test.integration.security.loginmodules.LdapExtPasswordCachingTestCase.test3: java.lang.AssertionError: Password from cache 1 expected:<1> but was:<2>
	at org.jboss.as.test.integration.security.loginmodules.LdapExtPasswordCachingTestCase.test3(LdapExtPasswordCachingTestCase.java:182)
------- Stdout: -------
reseting file writer
counterFile = C:\BuildAgent\work\a31d203e70e89f90\testsuite\integration\basic\target\tmp.password
callsCounter = -1
reading counter file: C:\BuildAgent\work\a31d203e70e89f90\testsuite\integration\basic\target\tmp.password
12:28:44,674 INFO  [org.jboss.as.test.integration.security.common.Utils] (main) Requesting URL http://[::1]:8080/test-DEP3/printPrincipal
12:28:48,992 WARN  [org.apache.directory.server.ldap.LdapSession] (pool-29-thread-2) AbandonableRequest with messageId 2 not found in outstandingRequests.
callsCounter = -1
reading counter file: C:\BuildAgent\work\a31d203e70e89f90\testsuite\integration\basic\target\tmp.password
12:28:50,067 INFO  [org.jboss.as.test.integration.security.common.Utils] (main) Requesting URL http://[::1]:8080/test-DEP3/printPrincipal
callsCounter = -1
reading counter file: C:\BuildAgent\work\a31d203e70e89f90\testsuite\integration\basic\target\tmp.password

This attribute still has some value. It comes in handy on filesystems where notification about changes is not supported.


switch svg and button default to static

I think zoxc mentioned this a while ago and now I pretty strongly agree with it

would something like this would be better
pub fn svg(svg_str: impl Into<String> + 'static) -> Svg {
    let id = ViewId::new();
    id.update_state(svg_str);
    Svg {
        id,
        svg_tree: None,
        svg_hash: None,
    }
    .class(SvgClass)
}

impl Svg {
    pub fn update(self, svg_str: impl Fn() -> String + 'static) -> Self {
        let id = self.id;
        create_effect(move |_| {
            let new_svg_str = svg_str();
            id.update_state(new_svg_str);
        });
        self
    }
}

so that we don't have svg dyn_svg

ah yeah that seems good. I think update makes sense.

used update_svg as the method to avoid confusing with View update method

maybe consider using value so that we can use it for all views that needed it, e.g. label etc

or update_value?

👍


pythonPackages.qrcode: Fix "No module named pkg_resources" error

Backport of #73159.

use cherry-pick -x when backporting so it contains a reference to the original commit

@FRidh thx for the feedback. I didn‘t know. Fixed that.


Create heterozygous-calls-count.sql

This query is to count the heterozygous calls in each sample.

Thank you @cuiping !  Please let me know when you've had a chance to sign the CLA.

I signed the CLA.

I signed the CLA.

many thanks!


feat: in eth_call, check that it is only called, never invoked

Feature Request
Describe the Feature Request

in eth_call, check that it is only called, never invoked.
@view and @external decorators on functions cannot actually enforce that some function is only view-called with starknet_call or invoked.
Describe Preferred Solution

check with get_tx_info() that signature is null, or sender_address is null, or max_fee is 0.
Describe Alternatives

this is still a timebox as it's unclear if this is completely sound and sufficient

So we can use either get_caller_address or get_tx_info, not sure if we need both or if one is less informative than the other.
If we just want to make sure we can write a small cairo contract
@view
func get_caller_and_tx_info{}(){
    let (caller) = get_caller_address();
    let (tx_info) = get_tx_info():
    return (caller, tx_info);
}

deploy on testnet and see what we get when we call and invoke.
I think that using the caller will have a side effect that no contract can call, though in view eth_call, so probably not what we want.
Considering the fact that tx_info is a struct such as follows:
struct TxInfo {
    // The version of the transaction. It is fixed (currently, 1) in the OS, and should be
    // signed by the account contract.
    // This field allows invalidating old transactions, whenever the meaning of the other
    // transaction fields is changed (in the OS).
    version: felt,

    // The account contract from which this transaction originates.
    account_contract_address: felt,

    // The max_fee field of the transaction.
    max_fee: felt,

    // The signature of the transaction.
    signature_len: felt,
    signature: felt*,

    // The hash of the transaction.
    transaction_hash: felt,

    // The identifier of the chain.
    // This field can be used to prevent replay of testnet transactions on mainnet.
    chain_id: felt,

    // The transaction's nonce.
    nonce: felt,
}

we need to check what it returns in a call and probably use account_contract_address

Do you have bandwith to try it out?

can do


Use latest react-attr-converter

Changes map -> map.json at the very least.

Oh this is done as of last night.


Element directives inside tables end up outside the table

As per http://jsfiddle.net/47N22/2/ when an element directive is inside a table, the output from the directive ends up outside the table. However the same directive as an attribute instead of an element works fine.
Angular 1.2.16, Chrome 34 and Firefox 29, Windows 8.1.

I've experimented this error trying to use a directive that replaces the thead element. The final HTML is the same in both cases, since I'm setting the "replace" property to true. I guess this could be solved in the Angular's side by somehow applying the replacement before inserting the element...

ok so this is a bit of a work around but it works in your fiddle for the plain directive but not the directive attribute.
if you change the table tag to a div with the style "display: table"

1 Header Row

http://jsfiddle.net/Jenk_Rendar/gsk17p3o/


This is awesome!

I just wanted to show my appreciation for making this plugin open source!
It's rare to find proper maintained and modern jQuery plugins these days, especially a tabbed accordion with accessibility features!
Keep it up 👍

By the way, any reason the tab-group is moved to be a sibling to the panels?
There's quite a few scenarios where tabs need to be remote from the panels.

Thank you for kind words! I will stay open to future suggestions, please enjoy 👍


Joins break when using aliases in model descriptor

Hi,
we use aliases for our generated model classes. When I tried to integrate the new Speedment Join Feature into our existing Speedment application I noticed that using aliases seems to make asserts made by AbstractJoinBuilder fail.
Please see the readme of the following repository for a more detailed explanation and also for a showcase:
https://github.com/paxbit/speedment-issue-demo
I looked for existing issues on this and found nothing. However maybe #560 is related.
Best,
Paxbit

This is an issue solved by #652


Go to definition/Peak definition works only in the same file

Go to definition/Peak definition works only in the same file, so I think the readme should be updated with the info

I've got a branch in progress which fixes these issues, which will land later this week.

@TwitchBronBron I think this is resolved, right?

@TwitchBronBron I think this is resolved, right?

Works very well!
I have several cases that 'go to definition' or  'peek...' does not work.
How can I assists with debug?

cool. In that case, close this issue (because it does work in the same
file, so this is resolved) and to help us debug, open a new issue with the
details for the specific case. Code snippets will really help.
On December 9, 2018 at 2:14:50 PM, Evgeny Gorelik<EMAIL_ADDRESS>wrote:
@TwitchBronBron https://github.com/TwitchBronBron I think this is
resolved, right?
Works very well!
I have several cases that 'go to definition' or 'peek...' does not work.
How can I assists with debug?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/TwitchBronBron/vscode-brightscript-language/issues/40#issuecomment-445563231,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABKIUbO3ukQfFVKK0IyT4pXZKp0BI9KQks5u3WEpgaJpZM4YyXfJ
.

Yeah it looks like it's working for me!


Nanosecond fix

Hi David,
Please have a look at these changes to address the issue with nanosecond anomaly detection.  It was previously checking the $FN creation time rather than the $SI creation time.  It now works correctly on the SANS nromanoff C:\WIndows\System32\dllhost\svchost.exe example, per issue #45.
I also added a try/except  to check if an SI creation time exists at all--and if not, ignore this check.  Sometimes it will not (ref SANS  nromanoff image, MFT record 9837).
So, if SI create doesn't exist, or if it does exist but has a fractional second value, then record['usec-zero'] will remain undefined, and the "uSec Zero" column gets an "N".  If it does exist and is NOT a fractional second value, then it gets a "Y".
Example screenshot below.  I can post all the parsed data from nromanoff elsewhere if you like, but it's too big for GitHub (at least here in the pull request).

Thanks,
Mike

Very nice work. Thank you very much for doing this.
-David


#250 expression builder redesign

Addresses https://github.com/elyra-ai/canvas/issues/250

Developer's Certificate of Origin 1.1
   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

Expression Builder cursor fixed
Changes to Flexible Table search to make it flush and with $field-02 background color


when I close the laptop lid, the browser will exit.

What versions are you running?
v0.9.1
$ go list -m github.com/chromedp/chromedp
<!--replace this line with the output-->
$ google-chrome --version
<!--replace this line with the output-->
116
$ go version
<!--replace this line with the output-->

1.25
What did you do? Include clear steps.
when I close the laptop lid, the browser will exit.

no code

What did you expect to see?
the browser keep running.
What did you see instead?
the browser will exit.

Please provide a reproducer. Thanks!


[DAT-17706] add new flow examples

Do all of these files get copied by init project?

@StevenMassaro yeap, here: https://github.com/liquibase/liquibase/blob/d4ea11515a95b845c1b1b18b88f18aae5e9c5583/.github/workflows/build.yml#L219

Do all of these files get copied by init project?

@StevenMassaro yeap, here:
https://github.com/liquibase/liquibase/blob/d4ea11515a95b845c1b1b18b88f18aae5e9c5583/.github/workflows/build.yml#L219

This is going to be a bit of miserable experience, with init project copying like 20 files. I can't think of another tool that pollutes your working directory in this way.


[NEW ALGORITHM] BIT MANIPULATION / Bit Reversal Algorithm.

Issue will be closed if:

You mention more than one algorithm. You can create a separate issue for each algorithm once the current one is completed.
You propose an algorithm that is already present or has been mentioned in a previous issue.
You create a new issue without completing your previous issue.

Note: These actions will be taken seriously. Failure to follow the guidelines may result in the immediate closure of your issue.

Name:
    BIT REVERSAL ALGORITHM

About:
The Bit Reversal Algorithm is used to reverse the order of bits in a binary representation of an integer. It involves shifting bits from the least significant to the most significant position, effectively flipping their order. This operation is commonly applied in various fields such as digital signal processing, particularly in algorithms like Fast Fourier Transforms (FFT), where bit reversal plays a crucial role in optimizing computations. The algorithm is efficient, operating in constant time (O(1)) and space (O(1)), making it suitable for low-level programming tasks.
Labels:
new algorithm, gssoc-ext, hacktoberfest, level1

Assignees:

[X] Contributor in GSSoC-ext
[X] Want to work on it

@pankaj-bind please assign me this task , i really want to work on this project ...

@pankaj-bind i have sent the PR , please review


EphemeralFile::write_blob: behavior in case of errors is unspecified / broken / unretyable

Here's my list of known problems:

what happens if we retry after an error?

think about the scenario where write_blob needs to write 3 pages.
there are 3 opportunities for failure
if we fail and bail on the second opportunity, then we've written to the file on disk, and the page cache contains the changes, but, at least size isn't updated
a subsequent read_blob will return half-written data (the unwritten bytes will be zero-filled)
a subsequent write_blob will overwrite the written data

I was toying with the idea of bumping size in the if self.off == PAGE_SZ.
But that makes the retry situation even worse, because now the subsequent write_blob doesn't overwrite, but instead it appends.
I propose to create an issue referencing this comment here, and fix it in a future PR.
Originally posted by @problame in https://github.com/neondatabase/neon/pull/5004#discussion_r1295953077

When fixing this, one approach might be to increment self.size eagerly.
When going this route, reconsider whether we need blknum and pos as function-global mutable state, vs just computing them every time using self.size.
If we can just re-compute it every time, consider eliminating the Writer type introduced by https://github.com/neondatabase/neon/pull/5004

When going this route, reconsider whether we need blknum and pos as function-global mutable state, vs just computing them every time using self.size.

We might be able to compute it every time as LLVM makes just a & and a >> out of it: https://github.com/neondatabase/neon/pull/5004#discussion_r1295950700

Also (copy-pasting from https://github.com/neondatabase/neon/pull/4994#issuecomment-1682169930 )

Regarding the
std::io::Error::new(
                    ErrorKind::Other,
                    format!(

The current callers just convert into anyhow::Error anyway, but, I don't want to change write_blob and read_blob to anyhow::Result to avoid conflicts with @arpad-m 's https://github.com/neondatabase/neon/pull/5015


machine-generated translations need human review

/assign @rlenferink

Hi @lnmei, welcome to Kubernetes! 🎉 Thanks for improving the description about localization tools.
/lgtm
/approve


Adds migration notes for otel-java 1.35.0

Just in case I'm busy or on a flight, this adds notes for what to do once otel-java 1.35.0 is out. Basically, this is the only thing holding this project from migrating to zipkin-reporter 3.x

all the things that need to merge are merged in otel now, so we can start the road to clean deps as soon as otel-java 1.35 is out. I'll help with this and redo this PR once that happens. cc @shakuzen

https://github.com/open-telemetry/opentelemetry-java/releases/tag/v1.35.0 is out, so I'll give this a go

ok ready to roll I think!

ps since you all are the tracing team, maybe help andy take a look at this https://github.com/spring-projects/spring-boot/pull/39049

actually, this is useless until spring boot updates, as it is doing the auto-wiring. We need to watch and update after https://github.com/spring-projects/spring-boot/pull/39049

Since some of the changes here are needed to Upgrade to OTel 1.35.0, I think we should merge this before doing the migration in Boot. OTel released 1.35.0-alpha so I upgraded it (ideally we should do both but OTel do not release them together) and also brave-propagation-aws to 1.2.3.

ok you know better than me. thanks!

fyi playground I used today which pulls things together https://github.com/openzipkin/brave-example/pull/114


lat/lng normalization

(Based on this discussion in h3-py.)
Which of the following should h3.geo_to_h3(37.3615593 + 180.0, -122.0553238 + 360.0, 5) evaluate to:

'85283473fffffff'
'85ca2d53fffffff'

Since h3.geo_to_h3(37.3615593, -122.0553238, 5) == '85283473fffffff', it seems like the first option should be correct. However, there's potential disagreement between the C, Python, and JS bindings.
Probably, this logic should be handled by the core C library. If so, what's the right logic/formula here?

What's the right name for this concept? "normalization"? "standardization"?

I have what I think is the "right" way to do this normalization/standardization of lat/lng coordinates.
Here's some Python code to do it:
import numpy as np

def deg_mod(x):
    'Map x into the *half-open* interval [-180, 180)'

    return (x + 180.0) % 360 - 180

def deg_std(lat, lng):
    """ Coerce lat/lng into standard representation

    lat in [-90, 90] (up and down)
    lng in [-180, 180) (around the globe, looking down)
    """

    lat = deg_mod(lat)

    # if lat is on the wrong side, we reflect
    # it around the north/south pole and
    # adjust the lng accordingly
    if abs(lat) > 90:
        lat = np.sign(lat)*180 - lat
        lng += 180

    lng = deg_mod(lng)

    return lat, lng

deg_std makes the following transformations between lat/lng pairs:

( 90, 0) -> ( 90,    0)
( 91, 0) -> ( 89, -180)
(-91, 0) -> (-89, -180)

Here's an example of discontinuity around the north pole with the current Python master branch.
>>> eps = 1e-5
>>> print h3.geo_to_h3(90 + eps, 0, 5)
>>> print h3.geo_to_h3(90 - eps, 0, 5)
'85f29383fffffff'
'85032623fffffff'

We avoid the discontinuity by applying deg_std:
>>> lat, lng = deg_std(90 + eps, 0)
>>> print h3.geo_to_h3(lat, lng, 5)

>>> lat, lng = deg_std(90 - eps, 0)
>>> print h3.geo_to_h3(lat, lng, 5)
'85032623fffffff'
'85032623fffffff'

For the notorious example above,
>>> lat, lng = 37.3615593, -122.0553238
>>> print h3.geo_to_h3(lat,       lng, 5)
>>> print h3.geo_to_h3(lat + 180, lng, 5)

>>> lat, lng = deg_std(lat + 180, lng)
>>> print h3.geo_to_h3(lat,       lng, 5)
'85283473fffffff'
'85283473fffffff'
'85ca2d53fffffff'

Thus, I think we would want to have
h3.geo_to_h3(37.3615593 + 180.0, -122.0553238 + 360.0, 5) == '85ca2d53fffffff'

This follows from the fact that, due to equivalence defined by deg_std, we should consider (37.3615593 + 180.0, -122.0553238 + 360.0) to be equivalent to (-37.3615593, 57.9446762).
A little more abstractly, but in particular for lat, lng = (37.3615593, -122.0553238), we would want to have
deg_std(lat,       lng       ) == (lat, lng)
deg_std(lat,       lng + 360 ) == (lat, lng)
deg_std(lat + 360, lng       ) == (lat, lng)

and
deg_std(lat + 180, lng       ) != (lat, lng)
deg_std(lat + 180, lng + 360 ) != (lat, lng)

(Note: These don't all actually evaluate to True in Python, due to floating point error. But you get the idea...)

Oooh, in fact, for any (lat, lng) pair, we should have the following two pairs are "equivalent":
( lat + 180, lng      )
(-lat      , lng + 180)

Anyway, does all the stuff above make sense, and resolve how we should do normalization/standardization?

I think the current C library and the cython branch already handle this correctly, without the need for an extra deg_std function to do pre-processing.
For example, on the cython branch (if I define deg_std as above), I'll get the following output:
>>> def foo(n, res=1):
>>>     for _ in range(n):
>>>         lat1, lng1 = np.random.randn(2)*360*2
>>>         lat2, lng2 = deg_std(lat1, lng1)
>>>
>>>         out1 = h3.geo_to_h3(lat1, lng1, res)
>>>         out2 = h3.geo_to_h3(lat2, lng2, res)
>>>
>>>         yield out1 == out2
>>>
>>> all(foo(100000, 13))
True

That seems to suggest that there's no need to pre-process with deg_std and the raw C library should be handling it correctly.
@isaacbrodsky, the only weirdness is that you were getting '85283473fffffff' as the output for h3.geo_to_h3(37.3615593 + 180.0, -122.0553238 + 360.0, 5) in the C library, which disagrees with what I think is the correct result above. But the cython branch is calling the C library directly, and gets the "correct" result above. Were you using the command line tool from the C library? My only thought is that it might be doing some pre-processing like the old mercator function, which I think is actually incorrect.

@ajfriend I was using the geoToH3 filter I might have made an error about which index the C library was giving me. I reran this and got the following:
MINGW
$ ./bin/Debug/geoToH3 --resolution 5 --latitude<PHONE_NUMBER> --longitude<PHONE_NUMBER>
85ca2d53fffffff

Debian
$ ./bin/geoToH3 --resolution 5 --latitude<PHONE_NUMBER> --longitude<PHONE_NUMBER>
85ca2d53fffffff

OK then! It sounds like the C library, cython branch, and the JS bindings all agree that the right answer is '85ca2d53fffffff'.
The current Python master branch gets the wrong answer, and that's probably due to the mercator functions. If we just remove those, I expect that the master branch would agree with everything else.

Closing, as it seems like core lib implementation is correct.


Eager mode in multithreaded environment v1.6 generates : "All graphs are building functions, and no eager context was previously active"

The problem
Scope initialization assumes that the  'context_stack' must be in the same stacktrace thread. while in some cases the user might use the eager context from a different thread. For example, the code below fails in version 1.6  , but not in 1.5.
Also, in version 1.6 it does not fail if "foo" is called from main thread, or if enable_eager_execution is called from the child thread.
Source code
from tensorflow.contrib.eager.python import tfe
import tensorflow as tf
from threading import Thread

class MNISTModel(tfe.Network):
    def __init__(self):
        super(MNISTModel, self).__init__()
        self.layer1 = self.track_layer(tf.layers.Dense(units=10))
        self.layer2 = self.track_layer(tf.layers.Dense(units=10))
    def call(self, input):
        result = self.layer1(input)
        result = self.layer2(result)
        return result

tfe.enable_eager_execution()

def foo():
    model = MNISTModel()
    batch = tf.zeros([1, 1, 784])
    print(batch.shape)
    result = model(batch)
    print(result)

t1 = Thread(target=foo)
t1.start()
t1.join()

logs (exception) :
Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/opt/anaconda3/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/data/dopamine/dopapy/uriy_tests/dnn4/test_eager_1.py", line 23, in foo
    result = model(batch)
  File "/opt/anaconda3/lib/python3.5/site-packages/tensorflow/python/layers/base.py", line 696, in __call__
    outputs = self.call(inputs, *args, **kwargs)
  File "/data/dopamine/dopapy/uriy_tests/dnn4/test_eager_1.py", line 11, in call
    result = self.layer1(input)
  File "/opt/anaconda3/lib/python3.5/site-packages/tensorflow/python/layers/base.py", line 680, in __call__
    self.build(input_shapes)
  File "/opt/anaconda3/lib/python3.5/site-packages/tensorflow/python/layers/core.py", line 134, in build
    trainable=True)
  File "/opt/anaconda3/lib/python3.5/site-packages/tensorflow/python/layers/base.py", line 533, in add_variable
    partitioner=partitioner)
  File "/opt/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/variable_scope.py", line 1297, in get_variable
    constraint=constraint)
  File "/opt/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/variable_scope.py", line 1093, in get_variable
    constraint=constraint)
  File "/opt/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/variable_scope.py", line 439, in get_variable
    constraint=constraint)
  File "/opt/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/variable_scope.py", line 408, in _true_getter
    use_resource=use_resource, constraint=constraint)
  File "/opt/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/variable_scope.py", line 775, in _get_single_variable
    with ops.init_scope():
  File "/opt/anaconda3/lib/python3.5/contextlib.py", line 59, in __enter__
    return next(self.gen)
  File "/opt/anaconda3/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 5034, in init_scope
    raise AssertionError("All graphs are building functions, and no "
AssertionError: All graphs are building functions, and no eager context was previously active.

System information

Have I written custom code : no
OS Platform and Distribution :  Linux Ubuntu 16
TensorFlow installed from  : binary
TensorFlow version : v1.6.0-0-gd2e24b6039 1.6.0
Python version:  3.5

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce

Bazel version (if compiling from source): N/A (not compiling from source)
GCC/Compiler version (if compiling from source): N/A (not compiling from source)
CUDA/cuDNN version: N/A (not using GPU)
GPU model and memory: N/A (not using GPU)
Exact command to reproduce: python (and the file name of code above)

Thanks for the report, this shouldn't happen :), will take a look.
CC @akshayka since this seems to be related to the change to use init_scope

Yes, thanks for report --- I'll investigate further.

Thanks for the quick response.
No need for an immediate fix. For now I have a workaround until 1.7 is out.