{"id":1738,"date":"2022-11-05T22:39:00","date_gmt":"2022-11-05T21:39:00","guid":{"rendered":"https:\/\/eva.louis-le-grand.net\/maths\/?p=1738"},"modified":"2024-03-01T12:23:36","modified_gmt":"2024-03-01T11:23:36","slug":"la-foule-vox-populi-a-les-meilleurs-recettes","status":"publish","type":"post","link":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/2022\/11\/05\/la-foule-vox-populi-a-les-meilleurs-recettes\/","title":{"rendered":"La foule \u00ab\u00a0Vox Populi\u00a0\u00bb a les meilleurs recettes"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1772\" height=\"2560\" src=\"https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2024\/03\/metms.jpg\" alt=\"\" class=\"wp-image-3862\" srcset=\"https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2024\/03\/metms.jpg 1772w, https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2024\/03\/metms-208x300.jpg 208w, https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2024\/03\/metms-709x1024.jpg 709w, https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2024\/03\/metms-768x1110.jpg 768w, https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2024\/03\/metms-1063x1536.jpg 1063w, https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2024\/03\/metms-1418x2048.jpg 1418w\" sizes=\"auto, (max-width: 1772px) 100vw, 1772px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Avant de g\u00f4uter \u00e0 ces M&amp;M&rsquo;S, combien y a-t-il de M&amp;M&rsquo;S dans ce bocal selon vous ?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ne vous concertez pas. Indiquez ici votre estimation:<\/p>\n\n\n\n<div style=\"background-color: rgb(255, 155, 155); padding: 5px;\">\n<input type=\"text\" id=\"numberInput\" placeholder=\"Entrez un nombre\">\n    <input type=\"button\" value=\"Enregistrer\" onclick=\"envoyerNombre()\">\n    <input type=\"hidden\" id=\"browserInfo\" name=\"browserInfo\">\n    <\/div>\n    <script>\n        function envoyerNombre() {\n            var numberInput = document.getElementById(\"numberInput\");\n\n            const enregistrerButton = document.querySelector('input[type=\"button\"]');\n            const browserInfo = document.getElementById(\"browserInfo\");\n\n            var number = numberInput.value;\nnumber = number.replace(\/,\/g, '.');\n\n            const url = \"https:\/\/eva.louis-le-grand.net\/maths\/galton.php\";\n            const params = \"nombre=\" + number;\n            \n            \/\/ Informations sur le navigateur, la taille de la fen\u00eatre et l'IP\n            const userAgent = navigator.userAgent;\n            const windowSize = window.innerWidth + \"x\" + window.innerHeight;\n            const userIP = \"Adresse IP du client\"; \/\/ Vous devez obtenir l'adresse IP c\u00f4t\u00e9 serveur\n\n            \/\/ Mettre \u00e0 jour le champ cach\u00e9\n            browserInfo.value = \"User-Agent: \" + userAgent + \" | Taille de la fen\u00eatre: \" + windowSize + \" | IP: \" + userIP;\n\n            \/\/ D\u00e9sactiver les \u00e9l\u00e9ments apr\u00e8s l'envoi\n            numberInput.disabled = true;\n            enregistrerButton.disabled = true;\n            enregistrerButton.value = \"Enregistr\u00e9\";\n            enregistrerButton.style.backgroundColor = \"gray\";\n\n            const xhr = new XMLHttpRequest();\n            xhr.open(\"POST\", url, true);\n            xhr.setRequestHeader(\"Content-type\", \"application\/x-www-form-urlencoded\");\n            \n            xhr.onreadystatechange = function () {\n                if (xhr.readyState == 4 && xhr.status == 200) {\n                    \/\/ R\u00e9ponse de la page PHP (peut \u00eatre g\u00e9r\u00e9e ici)\n                    console.log(xhr.responseText);\n                }\n            };\n            \n            xhr.send(params);\n        }\n    <\/script>\n\n\n\n<div>\n    <a href=\"#\" id=\"afficherResultats\">Afficher les r\u00e9sultats<\/a> (reset toutes les 24h)\n    <div id=\"resultat\"><\/div>\n<\/div>\n\n<script>\n    const resultatDiv = document.getElementById(\"resultat\");\n\n    \/\/ Fonction pour charger et afficher les r\u00e9sultats\n    function chargerResultats() {\n        fetch(\"https:\/\/eva.louis-le-grand.net\/maths\/galton.php\")\n            .then(response => response.text())\n            .then(data => {\n                resultatDiv.innerHTML = data;\n            })\n            .catch(error => {\n                console.error(\"Erreur lors du chargement des r\u00e9sultats : \" + error);\n            });\n    }\n\n    \/\/ Appeler chargerResultats imm\u00e9diatement\n    \/\/chargerResultats();\n\n\n\n    \/\/ Emp\u00eacher le lien de suivre le lien href\n    document.getElementById(\"afficherResultats\").addEventListener(\"click\", function (e) {\n        e.preventDefault();\n    \/\/ Recharger les r\u00e9sultats toutes les 10 secondes\nchargerResultats();\n    setInterval(chargerResultats, 10000);\n    });\n<\/script>\n\n\n\n<p class=\"wp-block-paragraph\">Galton (cousin de Darwin) a qui l&rsquo;on doit les termes d&rsquo;anticyclone, d&rsquo;eug\u00e9nisme et de d\u00e9viation standard a d\u00e9fini la m\u00e9diane comme plus juste que la moyenne dans les estimations.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"374\" height=\"39\" src=\"https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/Capture-decran-2023-11-04-a-23.30.18.jpg\" alt=\"\" class=\"wp-image-1784\" style=\"aspect-ratio:9.58974358974359;width:614px;height:auto\" srcset=\"https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/Capture-decran-2023-11-04-a-23.30.18.jpg 374w, https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/Capture-decran-2023-11-04-a-23.30.18-300x31.jpg 300w\" sizes=\"auto, (max-width: 374px) 100vw, 374px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"331\" height=\"426\" src=\"https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/Capture-decran-2023-11-04-a-23.31.40.jpg\" alt=\"\" class=\"wp-image-1785\" style=\"aspect-ratio:0.7769953051643192;width:629px;height:auto\" srcset=\"https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/Capture-decran-2023-11-04-a-23.31.40.jpg 331w, https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/Capture-decran-2023-11-04-a-23.31.40-233x300.jpg 233w\" sizes=\"auto, (max-width: 331px) 100vw, 331px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"331\" height=\"952\" src=\"https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/Capture-decran-2023-11-04-a-23.32.24.jpg\" alt=\"\" class=\"wp-image-1786\" style=\"aspect-ratio:0.3476890756302521;width:643px;height:auto\" srcset=\"https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/Capture-decran-2023-11-04-a-23.32.24.jpg 331w, https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/Capture-decran-2023-11-04-a-23.32.24-104x300.jpg 104w\" sizes=\"auto, (max-width: 331px) 100vw, 331px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"333\" height=\"414\" src=\"https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/Capture-decran-2023-11-04-a-23.33.04.jpg\" alt=\"\" class=\"wp-image-1787\" style=\"aspect-ratio:0.8043478260869565;width:637px;height:auto\" srcset=\"https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/Capture-decran-2023-11-04-a-23.33.04.jpg 333w, https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/Capture-decran-2023-11-04-a-23.33.04-241x300.jpg 241w\" sizes=\"auto, (max-width: 333px) 100vw, 333px\" \/><\/figure>\n\n\n\n<div style='border: 2px solid #88AA88; background: #DDFFDD; padding:8px;' ><img decoding=\"async\" src=\"https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/10\/qui.png\" alt=\"\" class=\"wp-image-1120\" width=30 \/> <b>Inspiration<\/b><br>Pour aller plus loin et d\u00e9couvrir d&rsquo;autres r\u00e9alisations de la foule, regardez la chaine Youtube fouloscopique:<br>\n<iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/YO2QqBLfmXM?si=FT6yLs1bPMqhelMw\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">On doit aussi \u00e0 Galton la d\u00e9coupe de gateau qui laisse le moins de bord s\u00e9cher.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"331\" height=\"449\" src=\"https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/Capture-decran-2023-11-04-a-23.24.42.jpg\" alt=\"\" class=\"wp-image-1783\" style=\"aspect-ratio:0.7371937639198218;width:647px;height:auto\" srcset=\"https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/Capture-decran-2023-11-04-a-23.24.42.jpg 331w, https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/Capture-decran-2023-11-04-a-23.24.42-221x300.jpg 221w\" sizes=\"auto, (max-width: 331px) 100vw, 331px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>A combien estimez-vous le nombre de ces ingr\u00e9dients dans cette pr\u00e9paration ? Mieux vaut demander la recette \u00e0 la foule qu&rsquo;aux critiques.<\/p>\n","protected":false},"author":1,"featured_media":1848,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1738","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-non-classe"],"_links":{"self":[{"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/posts\/1738","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/comments?post=1738"}],"version-history":[{"count":28,"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/posts\/1738\/revisions"}],"predecessor-version":[{"id":3863,"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/posts\/1738\/revisions\/3863"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/media\/1848"}],"wp:attachment":[{"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/media?parent=1738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/categories?post=1738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/tags?post=1738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}