Skip to content

Instantly share code, notes, and snippets.

@Mejari
Mejari / KotlinKuestions.md
Last active January 17, 2022 05:01
Kotlin Kuestions for adoption

Kotlin Kuestions

What are the expected technical benefits?

  • "It’s pragmatic and concise, and makes coding a satisfying and efficient experience."

  • Java is an old and mature language. It brings a lot of functionality and ability, but it also brings a lot of technical debt and anti-patterns that have only become apparent after decades of usage. Kotlin has taken note of these shortcomings and included fixes and mitigations of them in the design of the language. These design decisions have a profound, net-positive effect on application code that is produced. These effects make the code more terse, and much more expressive about the developers intention and its actual functionality. Some examples of these improvements are:

    • Immutability
    • Reassignments
  • Null-safety

@Mejari
Mejari / alt-us.md
Last active May 5, 2020 18:58
Alternate US States
State Population Electors 2012 R 2012 D 2016 R 2016 D 2012 Winner 2012 Margin 2016 Winner 2016 Margin % of voters Flipped
Adirondack 6,284,770 11 1,035,403 1,494,718 1,285,998 1,376,969 Democrat 459,315 Democrat 90,971 3.4%
Allegheny 6,059,365 10 1,409,894 1,206,224 1,628,490 1,057,840 Republican 203,670 Republican 570,650 21.2%
Atchafalaya 5,813,913 10 1,479,193 1,024,211 1,503,953 966,167 Republican 454,982 Republican 537,786 21.8%
Atlanta 6,475,817 11 1,372,513 1,287,362 1,342,923 1,427,621 Republican 85,151 Democrat 84,698 3.1% YES
Big Thicket 6,136,174 11 1,372,170 768,979 1,426,143 859,780 Republican 603,191 Republican 566,363 24.8%
Blue Ridge 6,144,711 11 1,572,519 1,060,692 1,700,235 1,028,663 Republican 511,827 Republican 671,572 24.6%
Canaveral 6,475,926 11 1,590,371 1,346,726 1,741,716 1,429,639 Republican 243,645 Republican 312,077 9.8%
Casco 5,645,324 10 1,106,029 1,690,791 1,042,292 1,755,150 De
if(!game.users.current.isGM) {
ui.notifications.error('Must execute as GM');
}
const actorUnits = game.actors.filter(a=>a.sheet.constructor.name === 'KW_WarfareUnitSheet');
const tokenUnits = game.collections.get("Scene").map(s=>s.tokens).flatMap(tm=>tm.contents).map(t=>t.actor).filter(a=>a.sheet.constructor.name === 'KW_WarfareUnitSheet');
const units = [... new Set(actorUnits.concat(tokenUnits))];
let content = `
<div>