Random snippets of all sorts of code, mixed with a selection of help and advice.
Can the Duan et al. 2025 "breaking the sorting barrier" faster-than-Dijkstra SSSP algorithm speed up Yamada–Kinoshita negative-cycle enumeration?
10 January 2026 @ 1:53 am
ive consulted AI in this topic but could not come up with a conclusive answer. Prior to the existence of AI i've been spending quite some time to even find the Yamada-Kinoshita Algorithm for this particular problem. They studied maritime streams data for the japanese navy to find cycles where the streams allow for "free" transportation.
T. Yamada, H. Kinoshita, “Finding all the negative cycles in a directed graph”, Discrete Applied Mathematics 118 (2002) (doi: 10.1016/S0166-218X(01)00201-3)
https://github.com/benediamond/yamada-kinoshita An implementation on Github
Now Duan et al. ("Breaking the Sorting Barrier" https://arxiv.org/abs/2504.17033 ) famously came up with a faster than Dijkstra Solution for large graphs, which got me thinking:
Is there a principled wa
How to get an older project to Create universal binary and target Apple Silicon
10 January 2026 @ 1:21 am
Related to my other recent question, Something about my older project (created in 2011 in Objective C) prevents it from letting me target my Mac as an Apple Silicon device. It only lets me run the app in Rosetta.
I figured out that I had a version of OpenSSL that was targeting i386. I deleted that library. The only other non-Apple library/framework I have is Crashlytics, and I'm not sure how to tell what architectures it includes.
What should I be looking for? (I have my architecture set to ARCHS_STANDARD.)
Use a Macro to add a value from one cell to another cell
10 January 2026 @ 1:06 am
I am trying to take a value from a cell (B21, which is the sum of B11:B20) and add that value to the existing value in cell B4. Below is what I am currently at to no avail. Has anyone used macros in Google Sheets to do something similar? I only have experience in VBA, but what I've used to carry out similar functions doesn't seem to work within Google Sheets.
https://docs.google.com/spreadsheets/d/1_2C7Ie1UTZkI98iCIeJlb0WVTuQBCjgsUbtjt8v_80g/edit?gid=0#gid=0
function SimPossesion() {
//Simulate Possesion(s)
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.setActiveSheet(spreadsheet.getSheetByName('Possession Simulation'),true);
var PossessionSim = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var HomeScore = PossessionS
https://docs.google.com/spreadsheets/d/1_2C7Ie1UTZkI98iCIeJlb0WVTuQBCjgsUbtjt8v_80g/edit?gid=0#gid=0
function SimPossesion() {
//Simulate Possesion(s)
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.setActiveSheet(spreadsheet.getSheetByName('Possession Simulation'),true);
var PossessionSim = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var HomeScore = PossessionSGoogle Sheets multiple scripts [duplicate]
10 January 2026 @ 12:45 am
I have 3 functions on 1 script file in Google sheets they seem to work by themselves but when they are all together they don't work. I read that it could be because the functions have the same name, but I tried naming each function different and still didn't work.
Any quick fixes that could make them work together in 1 script?
function onEdit(e) {
const sheetName = 'CUSTOM CUTS'; // Replace with your actual sheet name
const dropdownColumn = 5; // Column number for the dropdown (e.g., Column C is 3)
const dateColumn = 6; // Column number for the date (e.g., Column D is 4)
const range = e.range;
const sheet = range.getSheet();
// Check if the edited sheet is the correct one
if (sheet.getName() !== sheetName) {
return;
}
// Check if the edited column is the dropdown column
if (range.getColumn() === dropdownColumn) {
const row = range.getRow();
const cellValue = range.getValue();
const dateCell = sheet.getRange(row, da
git fetch origin master:master does not advance origin/master, but it does advance FETCH_HEAD
10 January 2026 @ 12:40 am
So I have a situation where:
git fetch origin master:master does not update origin/master, but updates FETCH_HEAD
git fetch origin master does update origin/master
Please, observe:
C:\xyz\tip2 [delete_unused ≡]> git fetch origin master:master
From https://github.com/xyz/xyz
! [rejected] master -> master (non-fast-forward)
* [new tag] xyz-master-CI_72.0.0.00815 -> xyz-master-CI_72.0.0.00815
* [new tag] xyz-master-CI_72.0.0.00817 -> xyz-master-CI_72.0.0.00817
* [new tag] xyz-master-CI_72.0.0.00818 -> xyz-master-CI_72.0.0.00818
* [new tag] xyz-master-CI_72.0.0.00820 -> xyz-master-CI_72.0.0.00820
* [new tag] xyz-master-CI_72.0.0.00822 -> xyz-master-CI_72.0.0.00822
* [n
UIAutomation: AddAutomationEventHandler() returns E_POINTER
10 January 2026 @ 12:38 am
I am using UIAutomation to grab the URL in the active browsers address bar. I'm starting with Firefox browser.
When I try to add any event handler to my automation object I always get the error E_POINTER
For example the following code fails.
HRESULT STDMETHODCALLTYPE CUIAutomation::QueryInterface(REFIID riid, void** ppInterface)
{
if (riid == __uuidof(IUnknown))
*ppInterface = static_cast<IUnknown*>(this);
else if (riid == __uuidof(IUIAutomationFocusChangedEventHandler))
*ppInterface = static_cast<IUIAutomationFocusChangedEventHandler*>(this);
else if (riid == __uuidof(IUIAutomationEventHandler))
*ppInterface = static_cast<IUIAutomationEventHandler*>(this);
else
{
*ppInterface = NULL;
return E_NOINTERFACE;
}
this->AddRef();
return S_OK;
}
HRESULT STDMETHODCALLTYPE CUIAutomation::HandleFocusChangedEvent(IUIAutomationElement *sender)
{
HRESULT hr
Metro UI 5.1 Can't make <data-prepend> work in a <select data-role="select" multiple data-clear-button="true">
10 January 2026 @ 12:36 am
Metro UI 5.1
If a include data-pretend into select tag, it NOT WORK, NOT SHOW the prepend string:
<select data-role="select" multiple data-clear-button="true" data-prepend="Something>">
If I delete multiple data-clear-button from select tag it WORK and SHOW the prepend string
<select data-role="select" data-prepend="Something>">
Please, how to fix it?
Error in country and city autocomplete google maps for USA cities
10 January 2026 @ 12:35 am
In my Android app, I'm using a field where users first choose a country and then a city, using a pair of Place Autocomplete (Legacy) elements. When the user selects a country, parameters are used to display only city names within that country.
https://developers.google.com/maps/documentation/places/android-sdk/legacy/autocomplete?hl=es-419
When I select most countries, the app correctly returns the list of cities.
In the example I'm using, I first select the United Kingdom, France, Spain, and Russia, but the problem is that when I try to select the USA, Mexican cities appear incorrectly.
I've attached a video as evidence.
https://drive.google.com/file/d/14QkfwMkfMowwmbAQ13RFJNqylHTCMSHU/view?usp=
How to solve Xcode error "The i386 architecture is deprecated."
9 January 2026 @ 10:48 pm
I am working to resurrect a very old MacOS project (It was written in Objective-C) and get it ready for release to the App Store.
I've been working on a debug scheme, which builds some form of X86 code (probably X86-64) and then runs via Rosetta on my Apple Silicon Mac.
When I try to build a release build, I get an error: "The i386 architecture is deprecated. You should update your ARCHS build setting to remove the i386 architecture.
I don't know a lot about the guts of the build system Xcode uses. I don't know where the ARCHS build setting is stored, where to find it, or how to change it. Telling me to update the setting doesn't give me enough info to fix it.
I have the Architectures in build settings set to Standard Architectures (Apple Silicon, Intel) - $(ARCHS_STANDARD)
Presumably there is an ARCHS_STANDARD environment variable hidden somewhere in the Xcode files for my project, but I can't find it.
I have
How to force chained method calls to remain multiline using `ruff format`?
9 January 2026 @ 10:23 pm
Given this code in my main.py file:
def main():
greeter = type(
"Anon", (), {"greet": lambda self, name: print(f"Hello {name}") or self}
)()
(greeter
.greet("Anton")
.greet("Anabelle")
.greet("Aaron"))
if __name__ == "__main__":
main()
I want to keep the chained calls, yet ruff formats it as a single line.
uv run ruff format
will format my greeter line as:
(greeter.greet("Anton").greet("Anabelle").greet("Aaron"))
I stumbled over this GitHub issue and the