1<!DOCTYPE html> 2<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head> 3 4<meta charset="utf-8"> 5<meta name="generator" content="quarto-1.9.38"> 6 7<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> 8 9 10<title>Danton Noriega-Goodwin, PhD â danton.codes</title> 11<style> 12/* Default styles provided by pandoc. 13** See https://pandoc.org/MANUAL.html#variables-for-html for config info. 14*/ 15code{white-space: pre-wrap;} 16span.smallcaps{font-variant: small-caps;} 17div.columns{display: flex; gap: min(4vw, 1.5em);} 18div.column{flex: auto; overflow-x: auto;} 19div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} 20ul.task-list{list-style: none;} 21ul.task-list li input[type="checkbox"] { 22 width: 0.8em; 23 margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */ 24 vertical-align: middle; 25} 26</style> 27 28
29<script src="site_libs/quarto-nav/quarto-nav.js"></script>
vendor: 1 bytes, line 29
29
30<script src="site_libs/quarto-nav/headroom.min.js"></script>
vendor: 1 bytes, line 30
30
31<script src="site_libs/clipboard/clipboard.min.js"></script>
vendor: 1 bytes, line 31
31
32<script src="site_libs/quarto-search/autocomplete.umd.js"></script>
vendor: 1 bytes, line 32
32
33<script src="site_libs/quarto-search/fuse.min.js"></script>
vendor: 1 bytes, line 33
33
34<script src="site_libs/quarto-search/quarto-search.js"></script>
34 35<meta name="quarto:offset" content="./"> 36<link href="./favicon.ico" rel="icon">
37<script src="site_libs/quarto-html/quarto.js" type="module"></script>
vendor: 1 bytes, line 37
37
38<script src="site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
vendor: 1 bytes, line 38
38
39<script src="site_libs/quarto-html/popper.min.js"></script>
vendor: 1 bytes, line 39
39
40<script src="site_libs/quarto-html/tippy.umd.min.js"></script>
40 41<link href="site_libs/quarto-html/tippy.css" rel="stylesheet"> 42<link href="site_libs/quarto-html/quarto-syntax-highlighting-15634bcf2e68342d4ad2dfa704d543f6.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles"> 43<link href="site_libs/quarto-html/quarto-syntax-highlighting-dark-0a6b7249c26820e032cb0bd839ff02b1.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles"> 44<link href="site_libs/quarto-html/quarto-syntax-highlighting-15634bcf2e68342d4ad2dfa704d543f6.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
45<script src="site_libs/bootstrap/bootstrap.min.js"></script>
45 46<link href="site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet"> 47<link href="site_libs/bootstrap/bootstrap-85545d89869a7d03b8d8b22d16f33e0b.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light"> 48<link href="site_libs/bootstrap/bootstrap-dark-f7fba41c1ef1477727021bb8767eabf3.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark"> 49<link href="site_libs/bootstrap/bootstrap-85545d89869a7d03b8d8b22d16f33e0b.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
50<script id="quarto-search-options" type="application/json">{ 51 "location": "navbar", 52 "copy-button": false, 53 "collapse-after": 3, 54 "panel-placement": "end", 55 "type": "overlay", 56 "limit": 50, 57 "keyboard-shortcut": [ 58 "f", 59 "/", 60 "s" 61 ], 62 "show-item-context": false, 63 "language": { 64 "search-no-results-text": "No results", 65 "search-matching-documents-text": "matching documents", 66 "search-copy-link-title": "Copy link to search", 67 "search-hide-matches-text": "Hide additional matches", 68 "search-more-match-text": "more match in this document", 69 "search-more-matches-text": "more matches in this document", 70 "search-clear-button-title": "Clear", 71 "search-text-placeholder": "", 72 "search-detached-cancel-button-title": "Cancel", 73 "search-submit-button-title": "Submit", 74 "search-label": "Search" 75 } 76}</script>
76 77 78 79<link rel="stylesheet" href="styles.css"> 80<meta property="og:title" content="Danton Noriega-Goodwin, PhD â danton.codes"> 81<meta property="og:description" content="Danton Noriega-Goodwin, PhD â Principal Data Scientist. Statistics and programming nerd."> 82<meta property="og:image" content="https://danton.codes/images/profile.jpeg"> 83<meta property="og:site_name" content="danton.codes"> 84<meta name="twitter:title" content="Danton Noriega-Goodwin, PhD â danton.codes"> 85<meta name="twitter:description" content="Danton Noriega-Goodwin, PhD â Principal Data Scientist. Statistics and programming nerd."> 86<meta name="twitter:image" content="https://danton.codes/images/profile.jpeg"> 87<meta name="twitter:card" content="summary_large_image"> 88</head> 89 90<body class="nav-fixed fullcontent quarto-light">
90<script id="quarto-html-before-body" type="application/javascript"> 91 const toggleBodyColorMode = (bsSheetEl) => { 92 const mode = bsSheetEl.getAttribute("data-mode"); 93 const bodyEl = window.document.querySelector("body"); 94 if (mode === "dark") { 95 bodyEl.classList.add("quarto-dark"); 96 bodyEl.classList.remove("quarto-light"); 97 } else { 98 bodyEl.classList.add("quarto-light"); 99 bodyEl.classList.remove("quarto-dark"); 100 } 101 } 102 const toggleBodyColorPrimary = () => { 103 const bsSheetEl = window.document.querySelector("link#quarto-bootstrap:not([rel=disabled-stylesheet])"); 104 if (bsSheetEl) { 105 toggleBodyColorMode(bsSheetEl); 106 } 107 } 108 const setColorSchemeToggle = (alternate) => { 109 const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle'); 110 for (let i=0; i < toggles.length; i++) { 111 const toggle = toggles[i]; 112 if (toggle) { 113 if (alternate) { 114 toggle.classList.add("alternate"); 115 } else { 116 toggle.classList.remove("alternate"); 117 } 118 } 119 } 120 }; 121 const toggleColorMode = (alternate) => { 122 // Switch the stylesheets 123 const primaryStylesheets = window.document.querySelectorAll('link.quarto-color-scheme:not(.quarto-color-alternate)'); 124 const alternateStylesheets = window.document.querySelectorAll('link.quarto-color-scheme.quarto-color-alternate'); 125 manageTransitions('#quarto-margin-sidebar .nav-link', false); 126 if (alternate) { 127 // note: dark is layered on light, we don't disable primary! 128 enableStylesheet(alternateStylesheets); 129 for (const sheetNode of alternateStylesheets) { 130 if (sheetNode.id === "quarto-bootstrap") { 131 toggleBodyColorMode(sheetNode); 132 } 133 } 134 } else { 135 disableStylesheet(alternateStylesheets); 136 enableStylesheet(primaryStylesheets) 137 toggleBodyColorPrimary(); 138 } 139 manageTransitions('#quarto-margin-sidebar .nav-link', true); 140 // Switch the toggles 141 setColorSchemeToggle(alternate) 142 // Hack to workaround the fact that safari doesn't 143 // properly recolor the scrollbar when toggling (#1455) 144 if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) { 145 manageTransitions("body", false); 146 window.scrollTo(0, 1); 147 setTimeout(() => { 148 window.scrollTo(0, 0); 149 manageTransitions("body", true); 150 }, 40); 151 } 152 } 153 const disableStylesheet = (stylesheets) => { 154 for (let i=0; i < stylesheets.length; i++) { 155 const stylesheet = stylesheets[i]; 156 stylesheet.rel = 'disabled-stylesheet'; 157 } 158 } 159 const enableStylesheet = (stylesheets) => { 160 for (let i=0; i < stylesheets.length; i++) { 161 const stylesheet = stylesheets[i]; 162 if(stylesheet.rel !== 'stylesheet') { // for Chrome, which will still FOUC without this check 163 stylesheet.rel = 'stylesheet'; 164 } 165 } 166 } 167 const manageTransitions = (selector, allowTransitions) => { 168 const els = window.document.querySelectorAll(selector); 169 for (let i=0; i < els.length; i++) { 170 const el = els[i]; 171 if (allowTransitions) { 172 el.classList.remove('notransition'); 173 } else { 174 el.classList.add('notransition'); 175 } 176 } 177 } 178 const isFileUrl = () => { 179 return window.location.protocol === 'file:'; 180 } 181 const hasAlternateSentinel = () => { 182 let styleSentinel = getColorSchemeSentinel(); 183 if (styleSentinel !== null) { 184 return styleSentinel === "alternate"; 185 } else { 186 return false; 187 } 188 } 189 const setStyleSentinel = (alternate) => { 190 const value = alternate ? "alternate" : "default"; 191 if (!isFileUrl()) { 192 window.localStorage.setItem("quarto-color-scheme", value); 193 } else { 194 localAlternateSentinel = value; 195 } 196 } 197 const getColorSchemeSentinel = () => { 198 if (!isFileUrl()) { 199 const storageValue = window.localStorage.getItem("quarto-color-scheme"); 200 return storageValue != null ? storageValue : localAlternateSentinel; 201 } else { 202 return localAlternateSentinel; 203 } 204 } 205 const toggleGiscusIfUsed = (isAlternate, darkModeDefault) => { 206 const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light'; 207 const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark'; 208 let newTheme = ''; 209 if(authorPrefersDark) { 210 newTheme = isAlternate ? baseTheme : alternateTheme; 211 } else { 212 newTheme = isAlternate ? alternateTheme : baseTheme; 213 } 214 const changeGiscusTheme = () => { 215 // From: https://github.com/giscus/giscus/issues/336 216 const sendMessage = (message) => { 217 const iframe = document.querySelector('iframe.giscus-frame'); 218 if (!iframe) return; 219 iframe.contentWindow.postMessage({ giscus: message }, 'https://giscus.app'); 220 } 221 sendMessage({ 222 setConfig: { 223 theme: newTheme 224 } 225 }); 226 } 227 const isGiscussLoaded = window.document.querySelector('iframe.giscus-frame') !== null; 228 if (isGiscussLoaded) { 229 changeGiscusTheme(); 230 } 231 }; 232 const authorPrefersDark = false;
233 const darkModeDefault = authorPrefersDark; 234 document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet'; 235 document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet'; 236 let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default'; 237 // Dark / light mode switch 238 window.quartoToggleColorScheme = () => { 239 // Read the current dark / light value 240 let toAlternate = !hasAlternateSentinel(); 241 toggleColorMode(toAlternate); 242 setStyleSentinel(toAlternate); 243 toggleGiscusIfUsed(toAlternate, darkModeDefault); 244 window.dispatchEvent(new Event('resize')); 245 }; 246 // Switch to dark mode if need be 247 if (hasAlternateSentinel()) { 248 toggleColorMode(true); 249 } else { 250 toggleColorMode(false); 251 } 252 </script>
252 253 254<div id="quarto-search-results"></div> 255 <header id="quarto-header" class="headroom fixed-top"> 256 <nav class="navbar navbar-expand-lg " data-bs-theme="dark"> 257 <div class="navbar-container container-fluid"> 258 <div class="navbar-brand-container mx-auto"> 259 <a class="navbar-brand" href="./index.html"> 260 <span class="navbar-title">danton.codes</span> 261 </a> 262 </div> 263 <div id="quarto-search" class="" title="Search"></div> 264 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" role="menu" aria-expanded="false" aria-label="Toggle navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }"> 265 <span class="navbar-toggler-icon"></span> 266</button> 267 <div class="collapse navbar-collapse" id="navbarCollapse"> 268 <ul class="navbar-nav navbar-nav-scroll me-auto"> 269 <li class="nav-item"> 270 <a class="nav-link active" href="./index.html" aria-current="page"> 271<span class="menu-text">About Me</span></a> 272 </li> 273 <li class="nav-item"> 274 <a class="nav-link" href="./resume.html"> 275<span class="menu-text">Resume</span></a> 276 </li> 277 <li class="nav-item"> 278 <a class="nav-link" href="./posts.html"> 279<span class="menu-text">Posts</span></a> 280 </li> 281 <li class="nav-item"> 282 <a class="nav-link" href="https://dantonnoriega.github.io/SR3TuringQuarto.jl/"> 283<span class="menu-text">SR3TuringQuarto.jl</span></a> 284 </li> 285</ul> 286 </div> <!-- /navcollapse --> 287 <div class="quarto-navbar-tools"> 288 <a href="https://gitlab.com/dantonnoriega/dantonnoriega.gitlab.io" title="Source" class="quarto-navigation-tool px-1" aria-label="Source"><i class="bi bi-gitlab"></i></a> 289 <a href="" class="quarto-color-scheme-toggle quarto-navigation-tool px-1" onclick="window.quartoToggleColorScheme(); return false;" title="Toggle dark mode"><i class="bi"></i></a> 290</div> 291 </div> <!-- /container-fluid --> 292 </nav> 293</header> 294<!-- content --> 295<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar"> 296<!-- sidebar --> 297<!-- margin-sidebar --> 298 299<!-- main --> 300<div class="quarto-about-jolla"> 301 <img src="images/profile.jpeg" class="about-image 302 round " style="height: 15em; width: 15em;"> 303 <header id="title-block-header" class="quarto-title-block default"> 304<div class="quarto-title"> 305<h1 class="title">Danton Noriega-Goodwin, PhD</h1> 306</div> 307<div class="quarto-title-meta"> 308 </div> 309</header><main class="content" id="quarto-document-content"> 310 311<p>Saludos! My name is Danton (âdawn-toneâ). Iâm a Principal Data Scientist at Microsoft. I live and work out of San Diego, CA â <a href="https://en.wikipedia.org/wiki/San_Diego">Americaâs finest city</a>! Iâm a statistics and programming nerd that enjoys playing <a href="https://www.youtube.com/watch?v=v1tqM--sCVk">goaltimate</a>, writing and singing <a href="https://open.spotify.com/artist/4cM5qMjOXzNK3bjYVbTr7e">pop punk songs</a>, and snuggling on the couch with my family.</p> 312 313 314</main> 315 <hr class="about-sep"> 316 <div class="about-links"> 317 <a href="https://github.com/dantonnoriega" class="about-link" rel="" target=""> 318 <i class="bi bi-github"></i> 319 <span class="about-link-text">Github</span> 320 </a> 321 <a href="https://www.linkedin.com/in/dantonnoriega/" class="about-link" rel="" target=""> 322 <i class="bi bi-linkedin"></i> 323 <span class="about-link-text">LinkedIn</span> 324 </a> 325 <a href="https://gitlab.com/dantonnoriega/dantonnoriega.gitlab.io/-/raw/main/resume/danton-noriega-resume-single_2026.pdf?inline=true" class="about-link" rel="" target=""> 326 <i class="bi bi-file-earmark-pdf-fill"></i> 327 <span class="about-link-text">View Resume</span> 328 </a> 329 <a href="https://gitlab.com/dantonnoriega/dantonnoriega.gitlab.io/-/raw/main/resume/danton-noriega-resume-single_2026.pdf?inline=false" class="about-link" rel="" target=""> 330 <i class="bi bi-cloud-download-fill"></i> 331 <span class="about-link-text">Download Resume</span> 332 </a> 333</div> 334</div> 335 <!-- /main -->
336<script id="quarto-html-after-body" type="application/javascript"> 337 window.document.addEventListener("DOMContentLoaded", function (event) { 338 // Ensure there is a toggle, if there isn't float one in the top right 339 if (window.document.querySelector('.quarto-color-scheme-toggle') === null) { 340 const a = window.document.createElement('a'); 341 a.classList.add('top-right'); 342 a.classList.add('quarto-color-scheme-toggle'); 343 a.href = ""; 344 a.onclick = function() { try { window.quartoToggleColorScheme(); } catch {} return false; }; 345 const i = window.document.createElement("i"); 346 i.classList.add('bi'); 347 a.appendChild(i); 348 window.document.body.appendChild(a); 349 } 350 setColorSchemeToggle(hasAlternateSentinel()) 351 const isCodeAnnotation = (el) => { 352 for (const clz of el.classList) { 353 if (clz.startsWith('code-annotation-')) { 354 return true; 355 } 356 } 357 return false; 358 } 359 const onCopySuccess = function(e) { 360 // button target 361 const button = e.trigger; 362 // don't keep focus 363 button.blur(); 364 // flash "checked" 365 button.classList.add('code-copy-button-checked'); 366 var currentTitle = button.getAttribute("title"); 367 button.setAttribute("title", "Copied!"); 368 let tooltip; 369 if (window.bootstrap) { 370 button.setAttribute("data-bs-toggle", "tooltip"); 371 button.setAttribute("data-bs-placement", "left"); 372 button.setAttribute("data-bs-title", "Copied!"); 373 tooltip = new bootstrap.Tooltip(button, 374 { trigger: "manual", 375 customClass: "code-copy-button-tooltip", 376 offset: [0, -8]}); 377 tooltip.show(); 378 } 379 setTimeout(function() { 380 if (tooltip) { 381 tooltip.hide(); 382 button.removeAttribute("data-bs-title"); 383 button.removeAttribute("data-bs-toggle"); 384 button.removeAttribute("data-bs-placement"); 385 } 386 button.setAttribute("title", currentTitle); 387 button.classList.remove('code-copy-button-checked'); 388 }, 1000); 389 // clear code selection 390 e.clearSelection(); 391 } 392 const getTextToCopy = function(trigger) { 393 const outerScaffold = trigger.parentElement.cloneNode(true); 394 const codeEl = outerScaffold.querySelector('code'); 395 for (const childEl of codeEl.children) { 396 if (isCodeAnnotation(childEl)) { 397 childEl.remove(); 398 } 399 } 400 return codeEl.innerText; 401 } 402 const clipboard = new window.ClipboardJS('.code-copy-button:not([data-in-quarto-modal])', { 403 text: getTextToCopy 404 }); 405 clipboard.on('success', onCopySuccess); 406 if (window.document.getElementById('quarto-embedded-source-code-modal')) { 407 const clipboardModal = new window.ClipboardJS('.code-copy-button[data-in-quarto-modal]', { 408 text: getTextToCopy, 409 container: window.document.getElementById('quarto-embedded-source-code-modal') 410 }); 411 clipboardModal.on('success', onCopySuccess); 412 } 413 var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//); 414 var mailtoRegex = new RegExp(/^mailto:/); 415 var filterRegex = new RegExp("https:\/\/danton\.codes"); 416 var isInternal = (href) => { 417 return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href); 418 } 419 // Inspect non-navigation links and adorn them if external 420 var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool):not(.about-link)'); 421 for (var i=0; i<links.length; i++) { 422 const link = links[i]; 423 if (!isInternal(link.href)) { 424 // undo the damage that might have been done by quarto-nav.js in the case of 425 // links that we want to consider external 426 if (link.dataset.originalHref !== undefined) { 427 link.href = link.dataset.originalHref; 428 } 429 } 430 } 431 function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) { 432 const config = { 433 allowHTML: true, 434 maxWidth: 500, 435 delay: 100,
436 arrow: false, 437 appendTo: function(el) { 438 return el.parentElement; 439 }, 440 interactive: true, 441 interactiveBorder: 10, 442 theme: 'quarto', 443 placement: 'bottom-start', 444 }; 445 if (contentFn) { 446 config.content = contentFn; 447 } 448 if (onTriggerFn) { 449 config.onTrigger = onTriggerFn; 450 } 451 if (onUntriggerFn) { 452 config.onUntrigger = onUntriggerFn; 453 } 454 window.tippy(el, config); 455 } 456 const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]'); 457 for (var i=0; i<noterefs.length; i++) { 458 const ref = noterefs[i]; 459 tippyHover(ref, function() { 460 // use id or data attribute instead here 461 let href = ref.getAttribute('data-footnote-href') || ref.getAttribute('href'); 462 try { href = new URL(href).hash; } catch {} 463 const id = href.replace(/^#\/?/, ""); 464 const note = window.document.getElementById(id); 465 if (note) { 466 return note.innerHTML; 467 } else { 468 return ""; 469 } 470 }); 471 } 472 const xrefs = window.document.querySelectorAll('a.quarto-xref'); 473 const processXRef = (id, note) => { 474 // Strip column container classes 475 const stripColumnClz = (el) => { 476 el.classList.remove("page-full", "page-columns"); 477 if (el.children) { 478 for (const child of el.children) { 479 stripColumnClz(child); 480 } 481 } 482 } 483 stripColumnClz(note) 484 if (id === null || id.startsWith('sec-')) { 485 // Special case sections, only their first couple elements 486 const container = document.createElement("div"); 487 if (note.children && note.children.length > 2) { 488 container.appendChild(note.children[0].cloneNode(true)); 489 for (let i = 1; i < note.children.length; i++) { 490 const child = note.children[i]; 491 if (child.tagName === "P" && child.innerText === "") { 492 continue; 493 } else { 494 container.appendChild(child.cloneNode(true)); 495 break; 496 } 497 } 498 if (window.Quarto?.typesetMath) { 499 window.Quarto.typesetMath(container); 500 } 501 return container.innerHTML 502 } else { 503 if (window.Quarto?.typesetMath) { 504 window.Quarto.typesetMath(note); 505 } 506 return note.innerHTML; 507 } 508 } else { 509 // Remove any anchor links if they are present 510 const anchorLink = note.querySelector('a.anchorjs-link'); 511 if (anchorLink) { 512 anchorLink.remove(); 513 } 514 if (window.Quarto?.typesetMath) { 515 window.Quarto.typesetMath(note); 516 } 517 if (note.classList.contains("callout")) { 518 return note.outerHTML; 519 } else { 520 return note.innerHTML; 521 } 522 } 523 } 524 for (var i=0; i<xrefs.length; i++) { 525 const xref = xrefs[i]; 526 tippyHover(xref, undefined, function(instance) { 527 instance.disable(); 528 let url = xref.getAttribute('href'); 529 let hash = undefined; 530 if (url.startsWith('#')) { 531 hash = url; 532 } else { 533 try { hash = new URL(url).hash; } catch {} 534 } 535 if (hash) { 536 const id = hash.replace(/^#\/?/, ""); 537 const note = window.document.getElementById(id); 538 if (note !== null) { 539 try { 540 const html = processXRef(id, note.cloneNode(true)); 541 instance.setContent(html); 542 } finally { 543 instance.enable(); 544 instance.show(); 545 } 546 } else { 547 // See if we can fetch this 548 fetch(url.split('#')[0]) 549 .then(res => res.text()) 550 .then(html => { 551 const parser = new DOMParser(); 552 const htmlDoc = parser.parseFromString(html, "text/html"); 553 const note = htmlDoc.getElementById(id); 554 if (note !== null) { 555 const html = processXRef(id, note); 556 instance.setContent(html); 557 } 558 }).finally(() => { 559 instance.enable(); 560 instance.show(); 561 }); 562 } 563 } else { 564 // See if we can fetch a full url (with no hash to target)
565 // This is a special case and we should probably do some content thinning / targeting 566 fetch(url) 567 .then(res => res.text()) 568 .then(html => { 569 const parser = new DOMParser(); 570 const htmlDoc = parser.parseFromString(html, "text/html"); 571 const note = htmlDoc.querySelector('main.content'); 572 if (note !== null) { 573 // This should only happen for chapter cross references 574 // (since there is no id in the URL) 575 // remove the first header 576 if (note.children.length > 0 && note.children[0].tagName === "HEADER") { 577 note.children[0].remove(); 578 } 579 const html = processXRef(null, note); 580 instance.setContent(html); 581 } 582 }).finally(() => { 583 instance.enable(); 584 instance.show(); 585 }); 586 } 587 }, function(instance) { 588 }); 589 } 590 let selectedAnnoteEl; 591 const selectorForAnnotation = ( cell, annotation) => { 592 let cellAttr = 'data-code-cell="' + cell + '"'; 593 let lineAttr = 'data-code-annotation="' + annotation + '"'; 594 const selector = 'span[' + cellAttr + '][' + lineAttr + ']'; 595 return selector; 596 } 597 const selectCodeLines = (annoteEl) => { 598 const doc = window.document; 599 const targetCell = annoteEl.getAttribute("data-target-cell"); 600 const targetAnnotation = annoteEl.getAttribute("data-target-annotation"); 601 const annoteSpan = window.document.querySelector(selectorForAnnotation(targetCell, targetAnnotation)); 602 const lines = annoteSpan.getAttribute("data-code-lines").split(","); 603 const lineIds = lines.map((line) => { 604 return targetCell + "-" + line; 605 }) 606 let top = null; 607 let height = null; 608 let parent = null; 609 if (lineIds.length > 0) { 610 //compute the position of the single el (top and bottom and make a div) 611 const el = window.document.getElementById(lineIds[0]); 612 top = el.offsetTop; 613 height = el.offsetHeight; 614 parent = el.parentElement.parentElement; 615 if (lineIds.length > 1) { 616 const lastEl = window.document.getElementById(lineIds[lineIds.length - 1]); 617 const bottom = lastEl.offsetTop + lastEl.offsetHeight; 618 height = bottom - top; 619 } 620 if (top !== null && height !== null && parent !== null) { 621 // cook up a div (if necessary) and position it 622 let div = window.document.getElementById("code-annotation-line-highlight"); 623 if (div === null) { 624 div = window.document.createElement("div"); 625 div.setAttribute("id", "code-annotation-line-highlight"); 626 div.style.position = 'absolute'; 627 parent.appendChild(div); 628 } 629 div.style.top = top - 2 + "px"; 630 div.style.height = height + 4 + "px"; 631 div.style.left = 0; 632 let gutterDiv = window.document.getElementById("code-annotation-line-highlight-gutter"); 633 if (gutterDiv === null) { 634 gutterDiv = window.document.createElement("div"); 635 gutterDiv.setAttribute("id", "code-annotation-line-highlight-gutter"); 636 gutterDiv.style.position = 'absolute'; 637 const codeCell = window.document.getElementById(targetCell); 638 const gutter = codeCell.querySelector('.code-annotation-gutter'); 639 gutter.appendChild(gutterDiv); 640 } 641 gutterDiv.style.top = top - 2 + "px"; 642 gutterDiv.style.height = height + 4 + "px"; 643 } 644 selectedAnnoteEl = annoteEl; 645 } 646 }; 647 const unselectCodeLines = () => { 648 const elementsIds = ["code-annotation-line-highlight", "code-annotation-line-highlight-gutter"]; 649 elementsIds.forEach((elId) => { 650 const div = window.document.getElementById(elId); 651 if (div) { 652 div.remove(); 653 } 654 }); 655 selectedAnnoteEl = undefined; 656 }; 657 // Handle positioning of the toggle 658 window.addEventListener( 659 "resize", 660 throttle(() => { 661 elRect = undefined; 662 if (selectedAnnoteEl) { 663 selectCodeLines(selectedAnnoteEl); 664 } 665 }, 10) 666 ); 667 function throttle(fn, ms) { 668 let throttle = false;
669 let timer; 670 return (...args) => { 671 if(!throttle) { // first call gets through 672 fn.apply(this, args); 673 throttle = true; 674 } else { // all the others get throttled 675 if(timer) clearTimeout(timer); // cancel #2 676 timer = setTimeout(() => { 677 fn.apply(this, args); 678 timer = throttle = false; 679 }, ms); 680 } 681 }; 682 } 683 // Attach click handler to the DT 684 const annoteDls = window.document.querySelectorAll('dt[data-target-cell]'); 685 for (const annoteDlNode of annoteDls) { 686 annoteDlNode.addEventListener('click', (event) => { 687 const clickedEl = event.target; 688 if (clickedEl !== selectedAnnoteEl) { 689 unselectCodeLines(); 690 const activeEl = window.document.querySelector('dt[data-target-cell].code-annotation-active'); 691 if (activeEl) { 692 activeEl.classList.remove('code-annotation-active'); 693 } 694 selectCodeLines(clickedEl); 695 clickedEl.classList.add('code-annotation-active'); 696 } else { 697 // Unselect the line 698 unselectCodeLines(); 699 clickedEl.classList.remove('code-annotation-active'); 700 } 701 }); 702 } 703 const findCites = (el) => { 704 const parentEl = el.parentElement; 705 if (parentEl) { 706 const cites = parentEl.dataset.cites; 707 if (cites) { 708 return { 709 el, 710 cites: cites.split(' ') 711 }; 712 } else { 713 return findCites(el.parentElement) 714 } 715 } else { 716 return undefined; 717 } 718 }; 719 var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]'); 720 for (var i=0; i<bibliorefs.length; i++) { 721 const ref = bibliorefs[i]; 722 const citeInfo = findCites(ref); 723 if (citeInfo) { 724 tippyHover(citeInfo.el, function() { 725 var popup = window.document.createElement('div'); 726 citeInfo.cites.forEach(function(cite) { 727 var citeDiv = window.document.createElement('div'); 728 citeDiv.classList.add('hanging-indent'); 729 citeDiv.classList.add('csl-entry'); 730 var biblioDiv = window.document.getElementById('ref-' + cite); 731 if (biblioDiv) { 732 citeDiv.innerHTML = biblioDiv.innerHTML; 733 } 734 popup.appendChild(citeDiv); 735 }); 736 return popup.innerHTML; 737 }); 738 } 739 } 740 }); 741 </script>
741 742</div> <!-- /content --> 743<footer class="footer"> 744 <div class="nav-footer"> 745 <div class="nav-footer-left"> 746 747 </div> 748 <div class="nav-footer-center"> 749<p>âï¸ copyright © 2026. made with â¤ï¸ by danton.</p> 750</div> 751 <div class="nav-footer-right"> 752 753 </div> 754 </div> 755</footer> 756 757 758 759 760</body></html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.