Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Javarome committed Nov 19, 2023
1 parent 7593df1 commit e892c84
Show file tree
Hide file tree
Showing 10 changed files with 261 additions and 1,123 deletions.
14 changes: 9 additions & 5 deletions index/indexedReplacer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ import { HtmlRR0SsgContext } from '../RR0SsgContext';

export class IndexedReplacer implements DomReplacement<HtmlRR0SsgContext> {

async replacement(_context: HtmlRR0SsgContext, element: HTMLElement): Promise<HTMLElement> {
async replacement(context: HtmlRR0SsgContext, element: HTMLElement): Promise<HTMLElement> {
const items = element.querySelectorAll('li');
for (let i = 0; i < items.length; i++) {
const item = items[i];
const alreadyDone = item.hasAttribute('id');
if (!alreadyDone) {
const n = i + 1;
item.id = String(n);
const n = i + 1;
const id = item.getAttribute('id') || i + 1;
const anchor = item.querySelector('.anchor');
if (!anchor) {
const anchorEl = context.outputFile.document.createElement('span');
anchorEl.id = String(id);
anchorEl.className = 'anchor';
item.prepend(anchorEl);
item.setAttribute('onclick', 'window.location.hash=' + n);
}
}
Expand Down
1 change: 1 addition & 0 deletions index/lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const addSpeech = (e, lang = e.lang, text = e.textContent) => {
const voices = speechSynthesis.getVoices().filter(voice => voice.localService === true)
speechEl.title = 'Écouter en ' + langs[e.lang].label
speechEl.onclick = (e) => {
e.preventDefault()
e.stopPropagation()
const anotherSpeech = speechMsg && speechMsg.text !== text
if (!speechMsg || anotherSpeech) {
Expand Down
3 changes: 2 additions & 1 deletion people/d/DougherEE/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<!--#include virtual="/header-start.html" -->
<title>Denis Breysse</title>
<!--#include virtual="/header-end.html" -->
<p> A Weisbaden (Allemagne de l'Ouest), le <time>1952-07-21 18:30</time>, le capitaine et pilote de l'<a
<p>À <span class="place">Weisbaden (Allemagne de l'Ouest)</span>, le <time>1952-07-21 18:30</time>, le capitaine et
pilote de l'<a
href="/org/us/dod/af/index.html">USAF</a> E. E. Dougher observe 4 lumières jaunâtres se séparer, 2 montant vers le
ciel et les 2 autres s'envoler horizontalement dans la direction opposée.</p>
<p>Le lieutenant de la WAF J. J. Stong, situé à des miles de là, observe quant à lui 2 lumières rougeâtres voler dans
Expand Down
155 changes: 10 additions & 145 deletions tech/info/soft/proj/impl/algo/search/index.html
Original file line number Diff line number Diff line change
@@ -1,153 +1,18 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta content="UFO data for french-reading people" name="description">
<link href="https://d33wubrfki0l68.cloudfront.net/css/67749d5bdd69e34b4b5181976250612d1973c38a/rr0.css"
rel="stylesheet" type="text/css"/>
<link href="../../../../../../../manifest.json" rel="manifest">
<link href="../../../../../../../opensearch.xml" rel="search" title="Stack Overflow"
type="application/opensearchdescription+xml">
<meta content="initial-scale=1, width=device-width" name="viewport">
<!--<base target="_top">-->
<!-- Google tag (gtag.js) -->
<script async="" src="https://www.googletagmanager.com/gtag/js?id=G-CMV7R92GK1"></script>
<script>
window.dataLayer = window.dataLayer || []

function gtag() {
dataLayer.push(arguments)
}

gtag("js", new Date())

gtag("config", "G-CMV7R92GK1")
</script>
<!-- Google Tag Manager -->
<script>(function (w, d, s, l, i) {
w[l] = w[l] || []
w[l].push({
"gtm.start":
new Date().getTime(), event: "gtm.js"
})
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s), dl = l != "dataLayer" ? "&l=" + l : ""
j.async = true
j.src =
"https://www.googletagmanager.com/gtm.js?id=" + i + dl
f.parentNode.insertBefore(j, f)
})(window, document, "script", "dataLayer", "GTM-NBPKWNM")</script>
<!-- End Google Tag Manager -->

<title>Algorithmes de recherche</title>
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript>
<iframe height="0" src="https://www.googletagmanager.com/ns.html?id=GTM-NBPKWNM"
style="display:none;visibility:hidden" width="0"></iframe>
</noscript>
<!-- End Google Tag Manager (noscript) -->
<header id="main-header">
<h1 class="full-page">Algorithmes de recherche</h1>
</header>
<nav id="main-nav">
<h1>Navigation</h1>
<ul>
<li class="full-page">
<a class="home" href="../../../../../../../index.html" title="Home">RR0</a>
</li>
<li class="search">
<input id="search-site" list="search-site-values" type="search">
<datalist id="search-site-values">
</datalist>
</li>
<li id="summary">
<a class="outline-title" href="#_top" id="out-top" title="Début de l'article"></a>
<ul class="outline">
</ul>
</li>
<li>
<span id="alternate"></span>
</li>
</ul>
<script src="https://d33wubrfki0l68.cloudfront.net/js/317adf0e4780403db3eaa9b3bbfc94699d258419/search/index.js"
type="text/javascript"></script>
</nav>
<script>
const summary = document.getElementById("out-top")
const observer = new IntersectionObserver(function (entries) {
summary.textContent = entries[0].intersectionRatio < 0.3 ? document.title : "Sommaire"
}, {threshold: [0, 0.3, 1]})
observer.observe(document.querySelector("#main-header"))

function showMap(address) {
const mapEl = document.querySelector("#map-canvas")
if (address) {
mapEl.style.display = "block"
mapEl.querySelector("iframe").src =
`https://www.google.com/maps/embed/v1/place?q=${address}&maptype=satellite&key=AIzaSyDqiEN85qBXI9QJFlJM5E0LMOcllLvuR4I`
} else {
mapEl.style.display = "none"
}
}

document.addEventListener("DOMContentLoaded", () => {
const firstPlace = document.querySelector(".plac")
if (firstPlace) {
showMap(firstPlace.textContent)
}
})

</script>
<div aria-hidden="true" class="anchor" id="_top"></div>
<div class="metadata">

</div>

<section title="Besoin">
<!--#include virtual="/header-start.html" -->
<title>Algorithmes de recherche</title>
<!--#include virtual="/header-end.html" -->
<section>
<h2>Besoin</h2>
<p><a href="../index.html">Algorithme</a> pour trouver un élément d'une <a href="../../struct/index.html">structure de
données</a> (<a href="../../struct/Array.html">tableau</a>, <a href="../../struct/LinkedList.html">liste</a>, <a
href="../../struct/graph/tree/index.html">arbre</a>...)</p>
</section>
<section title="Analyse">
<p></p>
</section>
<section title="Conception">

<section>
<h2>Conception</h2>
<p>Suivant l'état connu de l'ensemble ou rechercher, on pourra choisir différentes méthodes&nbsp;:</p>
<ul>
<li><strong>trié</strong> : recherche binaire en O(log(n))</li>
<li><strong>non trié</strong> : recherche linéaire, en O(n)</li>
<li><b>Trié</b> : recherche binaire en O(log(n))</li>
<li><b>Non trié</b> : recherche linéaire, en O(n)</li>
</ul>
</section>
<footer>
<div class="full-page" id="footerTable">
<div class="footer">
Dernière modification le dimanche 23 octobre 2022 à 17:36- © Copyright <span class="copyright"><a
href="https://rr0.org/GFDL.html">RR0</a></span> - <a href="../../../../../../../Contact.html">Contact</a>
</div>
</div>
</footer>
<aside id="aside">
<h1>Map</h1>
<div id="map-canvas">
<iframe allowfullscreen="" loading="lazy"></iframe>
</div>
</aside>

<script>
let pathname = window.location.pathname
if (pathname.indexOf(".") < 0 && !pathname.endsWith("/")) {
pathname += "/"
history.replaceState(null, "", pathname)
}
if (window !== top) document.querySelectorAll(".full-page").forEach(elem => elem.style.display = "none")
/* if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js');
}*/
</script>


</body>
</html>
<!--#include virtual="/footer.html" -->
Loading

0 comments on commit e892c84

Please sign in to comment.