design – How to distibute X values evenly accross N nodes?

Say there are N nodes/pods (which can change dynamically), and there are a list of X data sources.

We need to distribute the responsibility of these X data sources evenly across these N nodes, so that each node knows which data source they have to scrape data from?

What would be a good way to do this?

What i have tried :-

  1. Use another service that does a heartbeat to these N nodes and distributes the X data sources. But this new service would be a Single point of failure.

  2. Consensus – too complex

domain driven design – Reusing aggregate root key accross bounded contexts?

As the question states, is this bad practice?
I have a User aggregate root in the bounded context of Identity for authenticating the user. In this bounded contexts I have fields for the User related to identification of the User e.g. email, salted pw and so on.

I also have a generic subdomain for handling notifications. In this context a User is a Notificant. In this context, the Notificant has fields for e.g. the number of unread notifications, lastRead etc.

Is it good to reuse the User id in this case, as I know there is a 1-to-1 correspondence between a User and Notificant? Or should I have a field in the Notificant root referencing the User? It feels redundant, because then I have to make a lookup to map between them when I know their relationship is symmetric.

Autohotkey: Find and focus windows by name accross virtual desktops

I’d like an ahk script to find and focus running windows across virtual desktops on Windows 10.

I found one earlier but alas forgot where it’s from, maybe someone here knows. I think it was to help with special keys shortcuts not working in VNC sessions (Win key, alt-tab for example). Sadly, because it’s quite good but lacks a keyboard search feature, rather it works with keyboard or mouse selection and sorts by most recently used. So if I could find an updated version, or its source (to contact its dev) which has this search feature, perfect! Here’s the code I have:

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


$F1:: AltTab()
$F2:: AltTabMenu()
$F4:: LWin
!`::WinClose, A  ; Alt-` = close window

; AltTab-replacement for Windows 8:
AltTab(){
    list := ""
    WinGet, id, list
    Loop, %id%
    {
        this_ID := id%A_Index%
        IfWinActive, ahk_id %this_ID%
            continue    
        WinGetTitle, title, ahk_id %this_ID%
        If (title = "")
            continue
        If (!IsWindow(WinExist("ahk_id" . this_ID))) 
            continue
        WinActivate, ahk_id %this_ID%, ,2
            break
    }
}

; AltTabMenu-replacement for Windows 8:
AltTabMenu(){
    list := ""
    Menu, windows, Add
    Menu, windows, deleteAll
    WinGet, id, list
    Loop, %id%
    {
        this_ID := id%A_Index%
        WinGetTitle, title, ahk_id %this_ID%
        If (title = "")
            continue            
        If (!IsWindow(WinExist("ahk_id" . this_ID))) 
            continue
        Menu, windows, Add, %title%, ActivateTitle      
        WinGet, Path, ProcessPath, ahk_id %this_ID%
        Try 
            Menu, windows, Icon, %title%, %Path%,, 0
        Catch 
            Menu, windows, Icon, %title%, %A_WinDir%System32SHELL32.dll, 3, 0 
    }
    CoordMode, Mouse, Screen
    MouseMove, (0.4*A_ScreenWidth), (0.35*A_ScreenHeight)
    CoordMode, Menu, Screen
    Xm := (0.25*A_ScreenWidth)
    Ym := (0.25*A_ScreenHeight)
    Menu, windows, Show, %Xm%, %Ym%
}

ActivateTitle:
    SetTitleMatchMode 3
    WinActivate, %A_ThisMenuItem%
return

;-----------------------------------------------------------------
; Check whether the target window is activation target
;-----------------------------------------------------------------
IsWindow(hWnd){
    WinGet, dwStyle, Style, ahk_id %hWnd%
    if ((dwStyle&0x08000000) || !(dwStyle&0x10000000)) {
        return false
    }
    WinGet, dwExStyle, ExStyle, ahk_id %hWnd%
    if (dwExStyle & 0x00000080) {
        return false
    }
    WinGetClass, szClass, ahk_id %hWnd%
    if (szClass = "TApplication") {
        return false
    }
    return true
}

for a script named vnc special keys.ahk, but this might be a name I gave it. Sorry not much more details on this, I’ve looked around (Google, Github) but haven’t found it. And kids, remember to put a comment in your code with at least the author and source website 😛

Also found this old 2010 script

Is there a way to avoid cell border being replicated accross two pages in Google Docs?

The table is at the bottom of the page and when the content increases the table spans to the next page:

enter image description here

But the border of the first row (the red border) is replicated in the second page also, is there a way to prevent this?

I want to keep the table splitted between the two pages (not moving it to the second page) but the border in the second page makes it looks ugly (at least in the original document I’m working on)

Get sum of values of a single cell accross many sheets

I have 10 sheets from the same template with True/False values.
I want to count the number of True values in a certain cell across all sheets. I tried the following but it doesn’t work.

=COUNTIf(('1'!B3,'2'!B3,'3'!B3,'4'!B3, ..., '10'!B3),"=True")

Update
I figured this works but is there any more convenient way?

=sum(N('1'!B3),N('2'!B3),N('3'!B3),N('4'!B3))