Random snippets of all sorts of code, mixed with a selection of help and advice.
Value of local Geary's C for a pixel position in row 10 and column 10
3 November 2025 @ 7:02 pm
What is the local Geary's C value for the raster generated by
r <- raster(nrows=10, ncols=10)
r[] <- 1:ncell(r)
for pixel poistion in row 10 and column 10?
Give your answer correct to three decimal places.
How to use Pandas style objects to format a value with a hyperlink based on the index?
3 November 2025 @ 7:01 pm
I want to format a table with a hyperlink based on the index.
import pandas as pd
df = pd.DataFrame([dict(food='bananas', count=33),
                   dict(food='apples', count=42),
                   dict(food='oranges', count=50)]).set_index('food')
print(df)
yields
         count
food          
bananas     33
apples      42
oranges     50
I would like to style the count cells as '<a href="mywebsite.com/path/to/%s>%d</a>' % (food, count) for each cell. I can't figure out how to do this, though; df.style.format() only sees the values.
Any suggestions? Is there a way to get access to the index values?
Eclipse 2025‑06: “Updating Software has encountered a problem” when updating
3 November 2025 @ 6:53 pm
Im trying to update Eclipse IDE for Enterprise Java and Web Developers (version 2025‑06, Windows 10, 64-bit, Java 21), but as soon as I select all the files to upgrade and click Finish, I get the error:
“Updating Software has encountered a problem. An error occurred while collecting items to be installed.”
When I click on Details, it immediately freezes.
I’ve already tried:
clearing the cache by running .\eclipse.exe -clean
creating a new workspace
,but the issue persists.
I wanted to update because I couldn’t install the SonarLint plugin due to the same error.
If anyone has encountered this problem, I’d really appreciate any advice on how to resolve it. Thanks
MAUI app deployment to Android emulator no longer succeeds
3 November 2025 @ 6:52 pm
I'm trying to run my app on the Android emulator, which has worked fine for months. Now it sits there on the Settings screen (and does not respond to mouse input). VS is stuck at "Waiting for emulator to be ready..." in the output window.
How can I fix this issue and continue to the Android emulation?
How do I add a static secret to AW1?
3 November 2025 @ 6:50 pm
How do I add a static secret (which I now know is different from a generated secret) to AW1? I was provided this link to help me: https://git.taservs.net/ops/als-infra-aw1/tree/main/src/layer3/aw1-main-app/static-secrets, which says
To create/update/delete static secrets:
AWS_PROFILE=<aws_profile> sops secrets.enc.yaml
aws_profile in the secrets.env.yaml file needs to be left as an empty string for it to work the jenkins pipelines and our AWS multi account structure.
However, I don't know where to write or run that.
It may also complicate matters that I'm not doing this for the service that I own, and I don't know what service(s) use the secret that I'm updating. Is this something that I need to find out? I mention this because the above link also say:
Hibernate Envers: How to audit @ElementCollection of Value Objects without ID?
3 November 2025 @ 6:49 pm
I am trying to audit a @ElementCollection of value objects (@Embeddable) using Hibernate Envers (Hibernate 6.x, ValidityAuditStrategy).
Because it's DDD, the value object must not have its own @Id.
But Hibernate Envers seems unable to track changes correctly without a primary key.
When I update the parent, Envers throws errors like:
ERROR: duplicate key value violates unique constraint "..._pkey"
ERROR: column ... "revend" does not exist
We tried the common workaround with @OrderColumn / SETORDINAL, but it does not solve the problem — Envers still tries to insert duplicates for the same (owner_id, rev, setordinal).
@Entity
@Audited
class ParentEntity {
    @Id
    private Long id;
    @ElementCollection
    @OrderColumn(name = "position")
    @CollectionTable(name = "parent_values",
        joinColumns = @JoinColumn(name = "parent_id"))
    private List<ValueObject> values = new ArrayList
SAS tool (Task scheduler) not working when to moved to a different folder
3 November 2025 @ 6:45 pm
I moved my SAS tool and its related VBS script to a new folder. I've updated the paths in both the Task Scheduler action settings and inside the VBScript (using full paths to the SAS executable).
The script runs perfectly when I execute it manually, but when run by Task Scheduler, it just shows a "Running" status indefinitely and never finishes.
What am I likely missing regarding the working directory or the scheduled environment that would cause the script to hang on the SAS call?
(current my only solution is to create a new vbs script and schedule it in task scheduler and disable the old one.)
How to implement self-update and restart for Unpackaged WinUI 3 app
3 November 2025 @ 6:26 pm
I have Windows App SDK Unpackaged desktop app and busy with (re)implementing self-update. Doing the investigation of avaliable ways to implement.
I'm aware of Restart API but have no idea how to couple it with simple App self-update?
For example I have some .zip file with App files on HTTP CDN server. App checked for updates and downloaded the file to the disk. Then I want to extract it overwriting the app files but it's well known that it wouldn't be possible while the App is running.
The known workaround is placing App files under the subfolder named for instance as App version
rootAppFolder/
|-currentVersionFiles/
|-newVersionFiles/
|-appLauncher.exe
appLauncher is few lines of code that simply do Process.Start of App executable from currentVersion folder
Is there an eslint or tsconfig rule to disallow inline type import?
3 November 2025 @ 6:14 pm
    initializeForOrder: (params: import('./drivePhotosTypes').OrderActionParams) => Promise<void>;
    getOrderState: (orderId: string) => import('./drivePhotosTypes').OrderPhotosState | null;
Is there an eslint or tsconfig rule to disallow inline  type import as above ?
Expected:
Only allow import at the top of the file
import { OrderPhotosState, OrderActionParams } from './drivePhotosTypes';
This does not work because it gives unecessary errors to code that should be fine like the expectation above
  "@typescript-eslint/consistent-type-imports": [
    "error",
    {
      // "prefer": "type-imports",
      "disallowTypeAnnotations": true,
    }
  ]
How do I insert a NULL into a SQL table through a SQL INSERT written in VBA? [duplicate]
3 November 2025 @ 6:10 pm
I have something like:
Dim strSQL As String 
Dim Field1Value As String 
Field1Value = iif([some condition], "NULL", [some real value])
strSQL = "insert into tableA (Field1) values (" & Field1Value & ")"`
How do I make it so that I can insert an actual SQL NULL instead of a "NULL" into my table if the first outcome of my iif statement is the output?