Random snippets of all sorts of code, mixed with a selection of help and advice.
ObjectBox - any way to reuse a retired Uid to treat properties with same name as the same property?
18 October 2025 @ 6:14 am
I had this property named reminders in my Task entity.
String? reminders;
then I deleted it to migrate it to use List<String> instead, unfortunately I realized this later that to migrate the type of the property, I should have kept the old type and created a new property and then I should have added some migration logic.
So, before realizing this, I deleted the old property, and created a new property with type List<String> .
Now I want to migrate the old reminders data to use the new type, for this, I changed the name of my new List<String> property as remindersNew and created a new property with the same old name reminders(which I should have kept in first place). Now, since objectbox tracks the properties with Uid, this reminders and old reminders are considered different and I can't query old remin
Module Federation Issue in React Application(CRA) using Craco
18 October 2025 @ 6:14 am
Check this Repo
https://github.com/rupendrafreelancer-lab/module-federation-example
Facing issue
Uncaught runtime errors:
×
ERROR
Unexpected token '<'
SyntaxError: Unexpected token '<'
ERROR
Unexpected token '<'
SyntaxError: Unexpected token '<'
ERROR
Script error.
at handleError (http://localhost:3001/remoteAppOneEntry.js:4430:58)
at http://localhost:3001/remoteAppOneEntry.js:4449:7
at defaultOnUncaughtError (http://localhost:3000/static/js/vendors-node_modules_css-loader_dist_runtime_api_js-node_modules_css-loader_dist_runtime_sour-87316d.chunk.js:5392:5)
at logUncaughtError (http://localhost:3000/static/js/vendors-node_modules_css-loader_dist_runtime_api_js-node_modules_css-loader_dist_runti

Rust crate that would derive a struct for an enum where each field corresponds to a variant and the field data corresponds to the variant data
18 October 2025 @ 5:57 am
Is there a crate like variants-struct but which for
#[derive(VariantsStruct)]
enum Hello {
World,
There(i32)
}
would produce
struct HelloVariants {
world: (),
there: i32,
}
or, at least,
struct WorldVariantType;
struct ThereVariantType(i32);
struct HelloVariants {
world: WorldVariantType,
there: ThereVariantType,
}
Considered non-answers:
enum-struct adds shared fields to each variant of the enum.
EnumMap from
Hierarchical Directory.Packages.props with GlobalPackageReference doesn't resolve for tests
18 October 2025 @ 5:50 am
I've the following project structure
root
├── Directory.Packages.props
├── src
│ └── Proj1
│ └── Proj1.csproj
└── tests
├── Directory.Packages.props
└── Proj1.Tests
├── Proj1.Tests.csproj
└── Proj1Tests.cs
root/Directory.Packages.props
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<GlobalPackageReference Include="LaYumba.Functional" Version="2.0.0" />
</ItemGroup>
</Project>
root/tests/Directory.Packages.props
<Project>
<!-- Import the root Directory.Packages.props file -->
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Packages.props, $(MSBuildThisFileDirectory)..))" />
<ItemGroup>
<!-- Gl
Vulnerability issue nimbus-jose-jwt 9.47 in AEM
18 October 2025 @ 5:29 am
I was using 'nimbus-jose-jwt 9.47' in my AEM project. Recently due to security concerns have to update the library. Even though the 9.47v bind smoothly onto AEM project newer 9.37.4 and 10.x versions does not support as before. Throwing errors while Servelet, Service initialisation based on JWT generations.
i am using tags at the .pom file to bind the dependencies for packaging purposes.
<configuration>
<bnd><![CDATA[
Import-Package: !com.nimbusds.*,!org.bouncycastle.*,!com.google.crypto.*,!sun.misc,javax.annotation;version=0.0.0,*
-conditionalpackage: com.nimbusds.*,org.bouncycastle.*,com.google.crypto.*,sun.misc
-includeresource: @nimbus-jose-jwt-9.47.jar!/,@bcprov-jdk18on-1.78.jar!/
]]
</bnd>
</configuration>
Looking forward to get some advice how to bind the new updated versions(9.37.4 or 10.x) to overcome security vulnerabilities. Some resou
Is it possible to implement Basic Authentication in YARP (ASP.NET Reverse Proxy)?
18 October 2025 @ 5:25 am
I’m trying to find out whether it’s possible to implement Basic Authentication directly in YARP (Yet Another Reverse Proxy).
If YARP doesn’t natively support Basic Auth, that’s fine — I’m mainly wondering whether there are any existing extensions, middleware, or ITransformProvider implementations that could be reused instead of building everything from scratch.
In other words:
Does YARP have any built-in support for Basic Authentication?
If not, are there any community-provided transform providers or
plugins that handle authentication headers automatically?
I’d appreciate any guidance or examples on how to approach this properly within the YARP pipeline.
Symmetric Encryption Padding Issues AES/PKCS*7/CBC
18 October 2025 @ 5:19 am
I am unable to determine what is causing the exception being thrown ("invalid padding bytes"). From trying to find examples of the same issue, this seems to mostly be using the incorrect key when decrypting. My output shows the keys to be the same, as well as the password and salt (unsurprisingly if the keys match). What is causing the exception to be raised?
import os
from cryptography.hazmat.primitives import hashes, padding
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
class PasswordManager:
key_size_bits = 256
block_size_bits = 128
encoding = 'UTF-8'
@staticmethod
def encrypt_data(password, salt, data):
print(f"{password=}")
print(f"{salt=}")
print(f"{data=}")
key = PasswordManager.generate_aes_key(password, salt)
print(f"{key=}")
cipher = Cipher(al
Docker exec with psql single result hangs
18 October 2025 @ 5:16 am
I have a bash script that runs docker exec into a Postgresql container to retrieve the maximum ID of a DB table:
sudo docker exec -it my-database psql -qtAX -U postgres -c "select MAX(rwi.id) from myschema.myimporttable rwi;" myschema
If I run that statement from the host command line like this, it immediately returns the correct response, say 66.
If I instead assign it to a variable in a bash script, it hangs indefinitely: result=$(sudo docker exec -it my-database psql -qtAX -U postgres -c "select MAX(rwi.id) from myschema.myimporttable rwi;" myschema)
Checking pg_activity, it shows ClientRead in idle state for that query. I need to kill -9 to terminate this.
If I log-in to the container and run result=$(psql -qtAX -U postgres -c "select MAX(rwi.id) from myschema.myimporttable rwi;" myschema), it does not hang. I assume it is something with my docker exec that causes the hang.
while running a program in Android studio i am getting java.lang.nullpointerexception
18 October 2025 @ 5:10 am
while running a program in Android studio i am getting java.lang.nullpointerexception. xml, java and androidmanifest files all are error free but i am still getting this error tried several things like changing 1) targetapi to 34 from 32. 2)clean project and rebuilt project 3) Invalidated cache and restarted. 

Ghostscript color separation version dot Angle Settings
18 October 2025 @ 4:56 am
Serious problems were encountered during the process of converting vector files to images by calling the Ghostscript library in C++, as follows
when I was using tiffsep1 to output halftone color plates, I encountered that the dot angles of all the color plates were the same. I don't know how to set the Angle of each color plate separately. I hope everyone can help provide a method. Thank you
The following row is the parameter I used
gswin64c -dNOPAUSE -dBATCH -dSAFER -sDEVICE=tiffsep1 -r1440 -dOverprint=/enable -dCOLORSCREEN -o out\_%d.tif -c "\<\< /Frequency 60 /DotShape 1 /Angle 45 /SuperCellSize 36 /Levels 255 \>\> .genordered /Default exch /Halftone defineresource { } settransfer 0.003 setsmoothness" -f 21.ps