CINXE.COM
Wolfram Language Example Repository
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="ssi-loaded" content="true" /> <link rel="stylesheet" href="https://www.wolframcdn.com/fonts/source-sans-pro/1.0/global.css"> <link rel="stylesheet" href="https://www.wolframcloud.com//obj/resourcesystem/webresources/global-wolfram-skinny-2/1.2.0/main.css"> <script src="https://www.wolframcdn.com/consent/cookie-consent.js"></script> <script> !function(){if(/.*(__cookie_consent=(1|2)).*/i.test(document.cookie)){var e=function(){switch(!1){case-1===location.hostname.indexOf("devel"):return"//wal.devel.wolfram.com";case-1===location.hostname.indexOf("test"):return"//wal.test.wolfram.com";default:return"//wal.wolfram.com"}}();a=window,t=document,l="script",o=e,n="3.0.0",c="wal",a.WolframAnalyticsObject=c,a[c]=a[c]||function(){(a[c].q=a[c].q||[]).push(arguments)},a[c].q=a[c].q||[],a[c].t=1*new Date,a[c].d=o,a[c].v=n,r=t.createElement(l),w=t.getElementsByTagName(l)[0],r.async=1,r.src=o+"/js/"+n+"/wal.js",w.parentNode.insertBefore(r,w),wal("queue",!0),wal("batch",!0),wal("log","pageload"),wal("log","usermeta"),wal("batch",!1),wal("queue",!1);wal("addListener","click",{key:"walgc",levels:5,is:{el:["a","area","button"],attr:["data-walid"]},not:{attr:["data-walgcexclude"]},prop:["href"],attr:["data-walid"]})}var a,t,l,o,n,c,r,w}(); </script> <link rel="shortcut icon" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/ExampleRepository/5.0.0/favicon/favicon.ico"> <link rel="icon" type="image/png" sizes="16x16" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/ExampleRepository/5.0.0/favicon/favicon-16x16.png"> <link rel="icon" type="image/png" sizes="32x32" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/ExampleRepository/5.0.0/favicon/favicon-32x32.png"> <link rel="icon" type="image/svg+xml" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/ExampleRepository/5.0.0/favicon/favicon.svg"> <link rel="manifest" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/ExampleRepository/5.0.0/favicon/site.webmanifest"> <meta name="application-name" content="Wolfram Example Repository"> <meta name="msapplication-TileColor" content="#3C748D"> <meta name="msapplication-config" content="https://www.wolframcloud.com/obj/resourcesystem/webresources/ExampleRepository/5.0.0/favicon/browserconfig.xml"> <meta name="theme-color" content="#ffffff"> <link rel="apple-touch-icon" sizes="180x180" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/ExampleRepository/5.0.0/favicon/apple-touch-icon.png"> <link rel="mask-icon" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/ExampleRepository/5.0.0/favicon/safari-pinned-tab.svg" color="#3C748D"> <meta name="apple-mobile-web-app-title" content="Wolfram Example Repository"> <title>Wolfram Language Example Repository</title> <link rel="stylesheet" href="https://www.wolframcdn.com/css/normalize.css" /> <link rel="stylesheet" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/shingle.css" /> <link rel="stylesheet" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/header-and-results.css" /> <link rel="stylesheet" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/ExampleRepository/5.0.0/main.css" /> <style> body#home-page { background: hsl(185, 0%, 95%); } body#home-page #results-page .wrap { padding: 0 10vw; max-width: 100%; } body#home-page .grid { margin: 0 auto; columns: 210px auto; column-gap: 0; } body#home-page .grid-item { width: 100%; display: inline-block; } body#home-page .grid-item > a { display: block; padding: 10px; } body#home-page .grid .tile { background: #fff; border: 1px solid hsl(185, 0%, 80%); break-inside: avoid; padding: 10px; } body#home-page .grid a:hover .tile { outline: 2px solid hsl(30, 100%, 50%); } body#home-page .grid .tile img.hero-image { max-width: 100%; margin: 0 auto; display: block; margin-bottom: 0.9375em; } body#home-page main .grid a .tile h3.name { font-size: 1.25em; line-height: 1.2; color: hsl(185, 57%, 35%); margin: 0; } body#home-page main .grid a:hover .tile h3.name { color: hsl(185, 57%, 20%); } body#home-page main .grid a .tile p.description { font-size: 0.75em; /* 12px */ line-height: 1.33333333; /* 16px */ color: hsl(185, 0%, 50%); margin: 0.5em 0; } body#home-page #results-page h2 { border: none; font-size: 1.375em; /* 22px */ line-height: 1; font-weight: 300; text-transform: none; padding: 0 0.4545454545em; color: #555; margin: 0; margin-top: -0.18181818em; margin-bottom: 0.68181818em; } #hp-categories { font-size: 1em; line-height: 1.72222222em; padding: 0 10px; margin: 0.83333333em 0 2.83333333em; } @media only screen and (min-width: 720px) { #hp-categories { font-size: 1.125em; } } #hp-categories li { display: inline-block; vertical-align: middle; } #hp-categories li::after { content: ""; display: inline-block; vertical-align: middle; background: #bbb; width: 0.5em; height: 0.5em; margin: 0 1em; } #hp-categories li:last-child::after { display: none; } #hp-categories a { color: hsl(185, 57%, 35%); } #hp-categories a:hover { color: hsl(185, 57%, 20%); } #hp-category-show-hide-button { font-size: 0.77777778em; line-height: 1; text-transform: uppercase; padding: 2px 0.78571429em; background: none; color: hsl(185, 57%, 35%); border: 1px solid hsl(185, 57%, 35%); border-radius: 0.21428571em; } #hp-category-show-hide-button:hover { color: hsl(185, 57%, 20%); border-color: hsl(185, 57%, 20%); } #hp-category-show-hide-button svg { display: inline-block; vertical-align: 1px; fill: hsl(185, 57%, 35%); } #hp-category-show-hide-button:hover svg { fill: hsl(185, 57%, 20%); } #hp-categories li.other, #hp-categories #hp-category-show-hide-button .hide, #hp-categories.show-other #hp-category-show-hide-button .show { display: none; } #hp-categories.show-other li.other { display: inline-block; } #hp-categories.show-other #hp-category-show-hide-button .hide { display: inline; } #top-frame { position: fixed; bottom: 2em; right: 2em; text-align: center; } #top-frame.hide { display: none; opacity: 0; } #top-frame a { color: hsl(30deg 0% 0% / 20%); } #top-frame a svg .bg { fill: hsl(30deg 0% 0% / 20%); } #top-frame a:hover svg .bg { fill: hsl(30, 100%, 50%); } #top-frame span { display: block; } </style> </head> <body id="home-page"> <header id="gws-header"> <nav class="wrap"> <ul> <li><a href="https://www.wolfram.com/" target="gws-header">Wolfram.com</a></li> <li><a href="https://www.wolframalpha.com/" target="gws-header">WolframAlpha.com</a></li> <li><a href="https://www.wolframcloud.com/" target="gws-header">WolframCloud.com</a></li> </ul> </nav> </header> <header id="pac-common-header" class="container" data-publisher-ids-url="https://resources.wolframcloud.com/user/publishers" > <div class="wrap"> <div class="header-top"> <a href="https://resources.wolframcloud.com/ExampleRepository/" ><div class="logo-frame"><svg xmlns="http://www.w3.org/2000/svg" class="logo" width="60" height="60" viewBox="0 0 144 144" > <path fill="none" stroke="#999" stroke-width="1.5" d="M91.5 17 118 39M91.5 17l21 49.5M91.5 17 73 73m18.5-56-24 23.5m24-23.5-52 18.5m21-24-21 24M73 73 39.5 35.5M73 73l55.5 27m5-47-5 47m-28 19 28-19m-28 19L91 101M73 73l-57.5 5.5M9 45l6.5 33.5m9 22.5-9-22.5M9 45l27.5 17.5M73 73l-35.5 50m3-32.5-3 32.5m37.5 8-37.5-8m37.5 8-6.5-23" /> <g fill="#3C748D"> <circle cx="100.5" cy="119" r="7.5" /> <circle cx="37.5" cy="123" r="16" /> <circle cx="73" cy="73" r="23" /> <circle cx="133.5" cy="53" r="8.5" /> <circle cx="39.5" cy="35.5" r="13.5" /> <circle cx="9" cy="45" r="8.5" /> <circle cx="112.5" cy="66.5" r="11" /> </g> <g fill="#68ABB7"> <circle cx="67.5" cy="40.5" r="6" /> <circle cx="91.5" cy="17" r="16" /> <circle cx="15.5" cy="78.5" r="13.5" /> <circle cx="40.5" cy="90.5" r="6" /> <circle cx="68.5" cy="108" r="6" /> <circle cx="128.5" cy="100" r="15" /> </g> <g fill="#95D1A3"> <circle cx="60.5" cy="11.5" r="9.5" /> <circle cx="118" cy="39" r="6" /> <circle cx="36.5" cy="62.5" r="6.5" /> <circle cx="24.5" cy="101" r="4" /> <circle cx="91" cy="101" r="4" /> <circle cx="75" cy="131" r="12" /> </g> <g class="small-icons" fill="#fff"> <path fill-rule="nonzero" d="M101.9 11.87c-.09 0-.17 0-.24.02l-1.26-1.3a.9.9 0 0 0 .13-.61l-.1-.3v-.01a.87.87 0 0 0-1.53.05l-1.36.03a1.48 1.48 0 0 0-1.74-.86l-.2-.37a.9.9 0 0 0 .28-.79l-.1-.29-.01-.01a.87.87 0 0 0-1.62.44c0 .17.04.34.14.48l.2.23.02.01a.88.88 0 0 0 .6.15l.2.4c-.12.08-.23.19-.31.3l-2.43-1.16v-.13c0-.48-.39-.87-.87-.87s-.87.39-.87.87v.04l-2.32.84a.87.87 0 0 0-1.46.1l-.9-.08-.1-.27-.01-.02a.87.87 0 1 0-1.48.92l.21.22.02.02c.23.17.53.2.8.1l.26-.14.02-.02c.09-.08.16-.17.21-.28l.87.1c.01.1.04.2.09.28l-1.78 1.73a1.46 1.46 0 0 0-2.2 1.79l-1.54 1.16a.76.76 0 0 0-.08-.07l.92-3.19a.83.83 0 0 0 .41-.04l.27-.15.02-.02a.9.9 0 0 0 .28-.8l-.1-.28-.01-.02a.87.87 0 0 0-1.62.44c0 .18.05.35.14.49l.15.15-.96 3.24h-.03c-.48 0-.87.4-.87.87 0 .17.05.33.14.47l.21.23.02.02a.86.86 0 0 0 .8.1l.26-.15.01-.02a.85.85 0 0 0 .3-.78l1.58-1.23c.11.13.25.23.41.3l-.76 2.8a.88.88 0 0 0-.8.87c0 .46.37.85.83.87.18 0 .35-.05.5-.15l2.32 1.85a1.47 1.47 0 1 0 2.74.7c0-.1 0-.21-.03-.32l1.47-.6a.87.87 0 0 0 .83.3l1.17 1.53a.88.88 0 0 0-.05 1.02l.22.23.01.01c.24.17.54.2.8.1l.08-.04 2.25 2.3a.88.88 0 0 0 .01.93l.2.23.03.01a.88.88 0 0 0 .8.11l.26-.16.02-.01a.89.89 0 0 0 .28-.8l-.1-.28-.01-.02a.89.89 0 0 0-1.1-.36l-2.24-2.31a.88.88 0 0 0 .08-.22l4.81-.65c.16.26.44.43.75.43.49 0 .88-.4.88-.87 0-.3-.16-.59-.41-.75l.64-2.44h.14a1.47 1.47 0 0 0 .71-2.75l.75-2.15h.04a.88.88 0 0 0 .83-.87.88.88 0 0 0-.83-.87zM85.28 9.6a.4.4 0 0 1-.4-.4c0-.21.18-.4.4-.4.22 0 .4.19.4.4a.4.4 0 0 1-.4.4zm-2.81.52a.4.4 0 0 1 0 .8.4.4 0 0 1-.4-.4c0-.22.18-.4.4-.4zm-1.57 5.54a.4.4 0 0 1-.4-.4c0-.21.18-.4.4-.4.22 0 .4.19.4.4a.4.4 0 0 1-.4.4zM96.1 25.73c.21 0 .4.18.4.4a.4.4 0 0 1-.4.39.4.4 0 0 1-.4-.4.4.4 0 0 1 .4-.39zm3.58-16c.22 0 .4.17.4.38a.4.4 0 0 1-.4.4.4.4 0 0 1 0-.78zm-2.02.58v-.02l1.16-.02c.02.12.07.23.13.33l.22.22.01.01c.24.16.53.2.8.1h.03l1.13 1.2-3.52-1.5c.03-.1.04-.21.04-.32zm-.24.8 3.61 1.54v.06l-4 1.1a.86.86 0 0 0-.51-.39l-.04-1.67c.39-.08.73-.31.94-.65zm-4.8 3c-.49 0-.88.39-.88.87a.88.88 0 0 0 1.02.86l.47.94c-.25.18-.43.44-.52.73l-4.79-.7a.87.87 0 0 0-.16-.38l1.5-1.98a1.46 1.46 0 0 0 2.05-.81l4.11.73c.02.18.1.35.22.49l-1.02 1.73c-.3-.12-.63-.13-.94-.04l-.47-.94c.17-.17.27-.4.27-.63 0-.48-.39-.88-.87-.88zm.38.87a.4.4 0 0 1-.39.39.4.4 0 0 1-.4-.4c0-.21.18-.39.4-.39a.4.4 0 0 1 .4.4zm3.08.14c.26.07.55 0 .76-.17l2.21 1.5c-.07.17-.11.36-.12.55l-3.44.5a1.49 1.49 0 0 0-.44-.65zm.21-1.25c.22 0 .4.18.4.4a.4.4 0 0 1-.4.39.4.4 0 0 1-.4-.4c0-.21.19-.39.4-.39zm-1.26-5.6a.4.4 0 0 1-.4-.4c0-.21.18-.39.4-.39.21 0 .39.18.39.4a.4.4 0 0 1-.4.39zm-.24 1.64a1.47 1.47 0 0 0 1.19 1.85l.04 1.68h-.03l-3.45-4.62zm.8 3.84-.07.12-4.12-.73c0-.53-.28-1.02-.74-1.28l1-2.84h.05c.1 0 .2-.02.3-.05zm-3.88-6h.01a.4.4 0 0 1 0 .8.4.4 0 0 1-.4-.4c0-.22.18-.4.4-.4zm-3.01 1.8v-.04L91 8.67c.05.07.1.13.17.18l-1 2.84a1.49 1.49 0 0 0-.77.08l-.96-1.62a.87.87 0 0 0 .24-.6Zm-.88-.39a.4.4 0 0 1 0 .8.4.4 0 0 1-.4-.4c0-.22.18-.4.4-.4zm-.42 1.16c.19.11.41.15.63.09l.96 1.61c-.24.21-.41.49-.48.8l-2.65-.13a1.41 1.41 0 0 0-.24-.64Zm-1.57 2.87 2.66.13c.03.3.17.6.37.82l-1.5 1.99a.87.87 0 0 0-.55-.02l-1.4-2.17c.21-.2.36-.46.43-.75zm1.62 3.76a.4.4 0 0 1-.4.38.4.4 0 0 1-.38-.39c0-.21.17-.4.39-.4a.4.4 0 0 1 .39.4v.01zm-4.4 1.32a.4.4 0 0 1-.4-.4.4.4 0 0 1 .8 0 .4.4 0 0 1-.4.4zm5.34 2.08a1.46 1.46 0 0 0-2.2-.3l-2.1-1.68 5.76 1.35v.03zm1.58-1.12L83.9 17.8a.87.87 0 0 0-.4-.68l.75-2.8c.24.03.49 0 .71-.1l1.41 2.16a.88.88 0 1 0 1.46.94l4.78.68c0 .13.03.26.07.38l-1.35.68a.87.87 0 0 0-1.38.17zm.75.83a.4.4 0 0 1-.4-.4c0-.21.18-.4.4-.4.22 0 .4.19.4.4a.4.4 0 0 1-.4.4zm2.02 2.93a.4.4 0 0 1-.4-.4.4.4 0 1 1 .79 0 .4.4 0 0 1-.39.4zm5.54-1.34-4.75.61-.04-.1v-.02a.87.87 0 0 0-1.03-.37l-1.11-1.5.05-.05 3.43.82c0 .15.06.29.14.41l.2.23.02.01a.88.88 0 0 0 .8.11l.27-.16.02-.01a.88.88 0 0 0 .28-.78l-.1-.3-.02-.02a.87.87 0 0 0-1.5.01l-3.35-.82v-.05l-.01-.16 1.34-.67a1.46 1.46 0 0 0 2.19.19l3.22 2.37a.85.85 0 0 0-.05.25zm-2.98-.67c0-.22.18-.4.4-.4.21 0 .39.18.39.4a.4.4 0 0 1-.79 0zm3.85 1.11a.4.4 0 0 1-.4-.4v-.02c0-.22.19-.4.4-.4a.4.4 0 0 1 .4.43.4.4 0 0 1-.4.39zm-.03-1.27a.87.87 0 0 0-.49.17l-3.22-2.38c.1-.19.15-.4.15-.6L99 17.5c.13.39.4.7.78.87zm1.51-5.23a1.47 1.47 0 0 0-1.3.43l-2.2-1.5a.9.9 0 0 0 .03-.23l4-1.09c.06.1.14.18.23.24zm1.27-2.46a.4.4 0 0 1-.4-.4c0-.2.18-.38.4-.38.21 0 .39.17.4.39a.4.4 0 0 1-.4.4zm1.07 2c0 .15-.06.3-.17.4h-.01l-.17.1a.58.58 0 0 1-.16.02.5.5 0 0 1-.3-.09l-.13-.13-.01-.02a.58.58 0 0 1-.07-.27c0-.29.23-.52.5-.52.19 0 .36.1.45.25v.02l.07.16v.03a.4.4 0 0 1 0 .05zm-1.37 4.44c0 .15-.06.3-.18.4h-.01l-.14.08a.47.47 0 0 1-.18.04.48.48 0 0 1-.3-.1l-.02-.01-.11-.13a.49.49 0 0 1-.09-.28c0-.29.23-.52.51-.52.19 0 .35.1.45.25v.02l.06.16v.1zm-4.71 3.63v.08c0 .15-.07.29-.18.38l-.01.02-.14.08h-.02a.54.54 0 0 1-.46-.06l-.02-.01-.12-.13a.52.52 0 0 1 .44-.8c.18 0 .34.1.44.25v.02zm-5.97-2.05c0 .15-.06.3-.18.39l-.01.01-.14.08a.5.5 0 0 1-.48-.06l-.14-.13a.52.52 0 0 1 .43-.8c.19 0 .36.09.45.25v.01l.06.16.01.1zm-5.56-4.4c0 .14-.06.28-.17.38l-.02.01-.14.1a.44.44 0 0 1-.18.02.47.47 0 0 1-.3-.1h-.01l-.13-.14a.51.51 0 0 1 .43-.79c.19 0 .35.1.45.26v.01l.07.16v.09zm5.63-.97c0 .14-.07.29-.18.39h-.02l-.14.09a.5.5 0 0 1-.48-.06v-.02l-.13-.12a.51.51 0 0 1 .43-.8c.18 0 .35.1.44.25l.01.02.05.15.02.1zm2.1-3.9c0 .14-.06.28-.17.38l-.02.02-.14.08a.5.5 0 0 1-.48-.06l-.02-.01-.12-.14a.51.51 0 0 1 .43-.79c.19 0 .35.1.45.25v.02l.07.16v.04a.3.3 0 0 1 0 .05zM89.44 7.8v.08a.5.5 0 0 1-.17.39h-.01l-.15.1h-.01a.6.6 0 0 1-.17.03c-.1 0-.2-.03-.29-.1l-.02-.01-.11-.12a.5.5 0 0 1-.1-.29c0-.28.24-.51.52-.51.19 0 .36.1.45.25v.01zm-8.26 4.35c0 .14-.06.28-.17.38l-.02.01-.14.08a.46.46 0 0 1-.19.04.47.47 0 0 1-.3-.1l-.12-.12-.01-.02a.52.52 0 0 1 .44-.8c.17 0 .34.1.44.26v.02l.06.15.01.1z" /> <path d="M9.24 77.12a.89.89 0 1 1-.24-.38l2.1-1.3a.89.89 0 0 1 .84-1.16.89.89 0 0 1 .88 1.03l1.98.86a.89.89 0 0 1 1.18-.2l2.3-2.16a.89.89 0 0 1 1.5-.94l1.95-.72v-.1a.89.89 0 1 1 .15.52l-1.94.73v.09a.89.89 0 0 1-1.36.75l-2.3 2.16c.07.12.1.27.1.42a.89.89 0 1 1-1.76-.14l-1.98-.86a.89.89 0 0 1-1.3.1zM7.72 80.5h1.34v5.33H7.72Zm3.56-1.78h1.33v7.11h-1.33zm3.55 1.78h1.34v5.33h-1.34zm3.56-3.11h1.33v8.44H18.4zm3.55-1.78h1.34v10.22h-1.34zM40.67 27.83c2.2 0 4.1 1.54 4.59 3.68l.17-.01c1.35 0 2.45 1.1 2.45 2.44 0 .25-.07.48-.14.72a3.5 3.5 0 0 1-1.74 6.5H33a3.5 3.5 0 0 1-1.43-6.67 4.23 4.23 0 0 1 4.15-4.9c.4 0 .78.07 1.15.18a4.71 4.71 0 0 1 3.8-1.94zm0 .45c-1.41 0-2.73.7-3.53 1.86l-.1.13-.15-.05a3.78 3.78 0 0 0-4.87 4.35l.04.18-.17.07a3.06 3.06 0 0 0 1.09 5.9H46a3.06 3.06 0 0 0 1.4-5.77l-.18-.09.07-.19a2 2 0 0 0-2.16-2.7l-.22.03-.04-.21a4.28 4.28 0 0 0-4.2-3.51Zm-1.17 8.66v-1.33h1.33v1.33zm-.44-3.55v1.33h-1.34V33.4Zm-4.9 2.87 2.67-1.98v1.33h2.23v1.33h-2.23v1.34zm10.23-2.18-2.67 1.98v-1.34H39.5V33.4h2.22v-1.33z" /> <path fill-rule="nonzero" d="M116.06 62.78c-.05.16-.1.32-.17.48.45.34.85.75 1.19 1.2-.34.27-.72.46-1.13.56-.34.1-.68.18-1.03.23v-.03l-.36.71a14.27 14.27 0 0 1 .11 3.33 18.95 18.95 0 0 1-4.34 0 14.94 14.94 0 0 1 .1-3.33l-.34-.7-.01.02a8.76 8.76 0 0 1-1.02-.23c-.42-.1-.8-.29-1.13-.55a5.9 5.9 0 0 1 1.18-1.22 3.92 3.92 0 0 1-.17-.48 6.59 6.59 0 0 0-1.44 9.1 6.07 6.07 0 0 0 10.1-.15 6.6 6.6 0 0 0-1.54-8.94zm-3.56 7.09c.7 0 1.42-.04 2.12-.12-.1.92-.31 1.81-.65 2.67l-.05.12c-.94.08-1.9.08-2.84 0l-.05-.12c-.34-.86-.56-1.76-.65-2.67.7.08 1.41.12 2.12.12zm-5.73-1.81c0-1.13.3-2.23.89-3.19.45.4 1.3.7 2.33.86a14.66 14.66 0 0 0-.14 3.47c-1.6-.24-2.68-.67-3.08-1.08v-.06zm1.17 3.6a6.06 6.06 0 0 1-1.13-2.9c.68.44 1.8.75 3.1.93.08.96.3 1.9.64 2.79-.5-.06-1-.16-1.5-.3a3.4 3.4 0 0 1-1.1-.52zm.87.95c.64.2 1.3.32 1.96.39.16.32.36.62.6.9a5.63 5.63 0 0 1-2.56-1.29zm3.69 1.4c-.39 0-.8-.35-1.16-.96.77.05 1.55.05 2.32 0-.36.61-.77.97-1.16.97zm1.14-.11c.23-.28.43-.58.58-.9.67-.07 1.33-.2 1.97-.39a5.63 5.63 0 0 1-2.55 1.29zm3.42-2.23c-.34.23-.72.4-1.12.5a9.6 9.6 0 0 1-1.49.31c.34-.9.56-1.84.65-2.8a8.2 8.2 0 0 0 3.09-.92 6.06 6.06 0 0 1-1.13 2.9zm-1.92-2.47a15.1 15.1 0 0 0-.13-3.46 5.05 5.05 0 0 0 2.33-.87c.58.96.9 2.06.89 3.19v.06c-.4.4-1.48.84-3.09 1.08zm-5.25-5.79 2.34 4.76a.29.29 0 0 0 .53 0l2.35-4.76c.3-.51.47-1.1.47-1.7 0-1.77-1.38-3.21-3.08-3.21a3.15 3.15 0 0 0-3.09 3.2c0 .6.17 1.2.48 1.71zm.77-2.08a1.84 1.84 0 0 1 1.84-1.94 1.84 1.84 0 0 1 1.83 1.94 1.84 1.84 0 0 1-1.83 1.94 1.84 1.84 0 0 1-1.84-1.94zM131.64 91.65l-12.93 1.36-.21.25.67 9.04.03.1 4.33 6.85.25.1 14.68-3.38.18-.2.86-10.24-.13-.22-7.6-3.64-.13-.02zm-.21.5-.1 4.26-1.24.18c-.15-.33-.3-.66-.47-.97-.18-.35-.4-.66-.67-.94a.94.94 0 0 0-.51-.29 20.17 20.17 0 0 1 .36 2.04l.03.34-.2.03-.04-.35c-.07-.57-.14-1.09-.22-1.48-.04-.24-.1-.43-.15-.57-.2.05-.4.2-.6.44-.26.36-.48.74-.66 1.14l-.38.88.06.1.05.11-3.34.48-4.1-4.13zm.46.1 6.58 3.14-6.68.96.1-4.1zm-12.88 1.6 4.03 4.05.15 3.72-.47.08.47.57h.03l.01.35-.06-.07-.06-.06-1.42.26c.13.16.25.28.35.37.4-.13.8-.28 1.2-.44v.37c-.15.16-.33.33-.53.48.1.06.21.13.32.23l.23-.3.02.31-.12.14.1.19.03.06.02.52-.02-.06-.27-.55c-.43.47-.95.83-1.53 1.07l-.11-.17a4.06 4.06 0 0 0 1.51-1.06 1.07 1.07 0 0 0-.27-.2l-.1-.04c-.46.31-.96.56-1.5.74l-.11-.17c.5-.16.98-.39 1.41-.67a2.32 2.32 0 0 1-.32-.22c-.59.19-1.07.3-1.4.39l-.12-.18c.45-.1.9-.23 1.34-.37-.1-.1-.22-.23-.35-.4l-1.31.25-.12-.18 1.3-.25a7.9 7.9 0 0 1-.4-.6l-1.3.21v-.01zm20 1.94-.82 9.75-.7-.56-1.59.33c.21.2.46.4.73.61l-.25.06c-.25-.2-.49-.4-.72-.62l-1.4.3c.22.23.46.44.7.64l-.24.06c-.24-.2-.47-.42-.68-.65l-1.49.31c.2.22.42.45.68.68l-.24.06a7.22 7.22 0 0 1-.66-.69l-1.54.34c.18.26.39.5.62.71l-.24.06a4.52 4.52 0 0 1-.6-.73l-1.6.36c.18.27.38.51.6.73l-.23.06c-.21-.23-.4-.48-.58-.74l-1.68.38c.18.26.38.5.59.74l-.22.05c-.2-.24-.4-.49-.58-.74l-1.73.4c.18.26.36.5.57.74l-.22.05a9.4 9.4 0 0 1-.56-.74l-1.01.24-.01-.2.9-.22c-.18-.29-.35-.58-.51-.88l-.43.14-.01-.21.34-.1-.3-.6-.07-.14-.02-.51c.18.4.38.79.58 1.17.57-.2 1.13-.42 1.67-.64-.13-.3-.24-.62-.34-.93-.11-.4-.21-.8-.3-1.21-.47.6-1 1.13-1.61 1.59l-.02-.25c.6-.46 1.12-1 1.56-1.6l-.17-.75a5.36 5.36 0 0 0-.43-1.26c-.29.6-.61 1.2-.98 1.75l-.05.06-.01-.35c.34-.52.64-1.07.9-1.64l-.04-.03h-.01a.6.6 0 0 0-.15.2c-.13.2-.3.56-.56.95l-.15.2-.02-.34h.02c.18-.27.31-.52.42-.71l-.46.08-.15-3.55 2.52-.36c-.54 1.24-1.02 2.5-1.44 3.33h.02l.09.04c.24-.53.47-1.07.69-1.62.25-.63.44-1.19.66-1.75l.24-.04-.72 1.87c-.22.57-.46 1.14-.72 1.7.23.3.37.82.52 1.43l.14.59.5-.71 1.1-1.69c-.12-1.02-.21-1.96-.35-2.69a7.2 7.2 0 0 0-.12-.55l.2-.03.12.54c.13.7.22 1.56.33 2.49l.14-.2c.45-.57.9-1.02 1.46-1.17l-.2-1.92.2-.03.2 1.9h.08c.44-.03.85.23 1.24.6l.18.19c-.17-1.2-.3-2.24-.37-2.88l1.1-.16-.07 2.4-.3-.7-.48-1.1c.1.7.21 1.67.36 2.7l.94 1.14c.13.14.25.3.39.43-.1-.37-.17-.75-.23-1.13-.08-.13-.16-.27-.23-.42l.08-3.38 7.23-1.04zm-9.8 3.53h-.1l.11.93c.16 1.26.29 2.67.62 3.95l.02.06c.38-.06.9-.06 1.48-.04-.14-.44-.21-.87-.28-1.3a83.5 83.5 0 0 1-.42-2.65 5.66 5.66 0 0 0-.38-.4c-.35-.34-.7-.55-1.04-.55zm-.3.06c-.47.14-.9.54-1.32 1.1-.09.1-.18.23-.27.36l.07.54c.15 1.2.36 2.4.7 3.5.51-.24 1.03-.43 1.57-.58l-.02-.05c-.33-1.3-.46-2.72-.62-3.97l-.1-.9zm1.97 1.18c.12.8.24 1.6.37 2.33.08.45.16.9.3 1.33l1.34.06h.16c-.35-.68-.61-1.4-.8-2.14-.22-.22-.43-.45-.63-.7l-.74-.88zm1.47.37.28.4.18-.04zm-5.2.17c-.31.45-.63.97-.98 1.49l-.6.85c.1.46.21.93.35 1.36.1.32.2.62.32.9l.2-.09 1.47-.65a20.55 20.55 0 0 1-.72-3.55zm5.07 0 .21.93a5 5 0 0 0 1.23.9l-.68-.93a4.15 4.15 0 0 1-.76-.9zm.8.36-.25.05.3.3h.4zm-10.53.28-1.34.23c.15.24.28.44.4.6l1.41-.26-.1-.12-.37-.45zm10.83.28.25.16c.19.1.37.15.57.17l-.41-.33zm.17.34.52.72c.37.12.77.17 1.21.12l-.82-.65c-.33.02-.63-.05-.91-.19zm-.96.05c.18.65.43 1.28.75 1.88.45 0 .91 0 1.36-.03a26.4 26.4 0 0 1-.76-1.02c-.2-.07-.4-.16-.57-.26a4.77 4.77 0 0 1-.78-.58zm-9.48.57-.82.3a2 2 0 0 0 .28.16c.2-.15.38-.3.54-.46zm11.15.36c.22.3.45.61.7.9.48-.03.95-.1 1.38-.2l-.84-.67c-.41.08-.83.06-1.24-.03zm2.27.85c-.44.13-.92.2-1.42.25.2.24.42.47.67.7l1.56-.32zm-5.78.22c-.3 0-.57.02-.78.05.17.62.43 1.22.76 1.77.5-.12 1.02-.23 1.52-.33a5.06 5.06 0 0 1-.79-1.47l-.71-.02zm.93.02c.16.46.4.93.79 1.42l1.48-.32a6.76 6.76 0 0 1-.73-1.04l-.28-.01-1.26-.05zm3.19.03c-.47.03-.95.04-1.42.03.2.35.45.69.72 1l1.37-.3a9.77 9.77 0 0 1-.67-.73zm-5.1.03c-.4.1-.92.31-1.55.59a8 8 0 0 0 .7 1.55l1.6-.36a7.16 7.16 0 0 1-.75-1.78zm-1.74.67-1.44.64-.2.1c.18.4.4.79.64 1.16l1.68-.38c-.27-.48-.5-1-.68-1.52zm-4.63.14v.24c-.37.22-.8.42-1.25.56l-.11-.18a5.5 5.5 0 0 0 1.36-.62zm2.8.67c-.53.22-1.08.45-1.65.64.17.3.34.6.54.9l1.72-.4a8.67 8.67 0 0 1-.61-1.14zm-2.74.77v.21l-.67.16-.11-.18c.26-.05.52-.11.78-.19zm.04 1.15.01.2-.09.02-.11-.18.2-.04zM45.05 114.05a.8.8 0 0 0-.23 1.55l.21 1.4a.9.9 0 0 0-.27 1l-1.78 1.66a.9.9 0 0 0-1.25.2l-1.97-.7c0-.54-.42-1-.95-1.02l-.17-1.65a1.02 1.02 0 0 0 .58-1.35 1.02 1.02 0 1 0-1.33 1.33l.07.02.18 1.83c-.37.27-.52.77-.35 1.2l-1.93 1.68a1.02 1.02 0 0 0-1.4.42l-1.72-.2c-.1-.47-.52-.8-1-.8h-.1l-1.2-1.88c.3-.3.38-.73.22-1.1.26.07.55 0 .74-.2a.8.8 0 0 0 .18-.86.8.8 0 0 0-1.53.3c0 .1.05.17.08.24a3.02 3.02 0 0 0-.19-.07v-.53a.8.8 0 0 0-.22-1.56.8.8 0 0 0-.3 1.53l.07.02v.51c-.34.09-.62.34-.73.68l-1.34.29a.8.8 0 1 0-.63 1.28.8.8 0 0 0 .78-.62l1.2-.26c.17.42.6.68 1.05.64l1.2 1.89c-.39.39-.4 1.04 0 1.43l-.85 1.7a1.02 1.02 0 0 0-1.24.9l-1.29.28a.8.8 0 1 0-.93 1.22.79.79 0 0 0 1.08-.55l1.31-.29c.26.37.73.54 1.16.4l1.66 1.54a.9.9 0 0 0 .85 1.23c.5 0 .9-.4.9-.9v-.03l1.7-1.13a1.01 1.01 0 0 0 1.47-.16l2.23.7v.04c0 .53.4.98.93 1.02l.38 1.79a1.02 1.02 0 0 0 .22 1.76c.36.14.8.1 1.11-.23a1.01 1.01 0 0 0 1.06-1 1.01 1.01 0 0 0-1.72-.72l-.02-.02-.37-1.75a1 1 0 0 0 .43-1.07l1.81-1.54a1 1 0 0 0 1.06-.24h.02l1.64.3-.01.11a1.02 1.02 0 1 0 1.96-.39 1.01 1.01 0 0 0-1.64-.35l-1.67-.32c.04-.53-.34-1-.87-1.08l-.39-2.45a.9.9 0 0 0 .35-.88l1.87-1.74.04.02a.9.9 0 0 0 1.08-.3l1.07.5c0 .31.2.6.5.72.29.12.63.05.86-.18.23-.22.3-.57.17-.87a.8.8 0 0 0-1.24-.3l-1.2-.54a.9.9 0 0 0-.82-.77l-.2-1.27a.8.8 0 0 0-.44-1.45zm-5.52 5.74 2.03.72a.9.9 0 0 0 .79.79l.38 2.41a1.02 1.02 0 0 0-.36 1.4l-1.65 1.4c-.15-.12-.35-.2-.57-.21a.12.12 0 0 0-.06-.02c-.3 0-.58.14-.77.35l-2.27-.72a1 1 0 0 0-.88-.96l-.32-1.96c.46-.24.66-.8.46-1.28l1.92-1.68c.4.23.91.17 1.23-.16l.07-.08zm-6.86 2.3 1.69.2c.08.41.4.73.82.8l.32 1.98c-.36.22-.55.64-.47 1.06l-1.63 1.09a.9.9 0 0 0-.64-.26.1.1 0 0 0-.05 0 .92.92 0 0 0-.34.1l-1.57-1.46c.25-.37.22-.85-.05-1.2l.87-1.74c.43.06.86-.17 1.05-.57z" /> <path d="M69.6 131.16h.63v3.5h-.64zm1.26-2.55h.64v4.14h-.64zm1.28-2.54h.63v3.82h-.63zm1.27 2.54h.64v3.5h-.64zm1.27 2.55h.64v1.9h-.64zm1.27-.32h.64v2.55h-.64zm1.91 0h-.63v-2.23h.63zm1.28-.64h-.64v-3.5h.64zm.63-1.27h.64v4.14h-.64zm1.28-.63h.63v2.22h-.63zm.95 8.27H68v-11.14h.64v10.5H82z" /> </g> <path fill="#fff" d="M86.41 59.59A19.09 19.09 0 0 1 92 73c0 5.03-2.01 9.84-5.59 13.41a18.86 18.86 0 0 1-26.82 0 18.86 18.86 0 0 1 0-26.82 18.86 18.86 0 0 1 26.82 0zm-13.47 5.03c.23.61.5 2.29.5 2.29s1.46.95 2.19 1.68c.16-2.97.22-4.25.1-6.65-1.28 1.22-1.5 1.4-2.79 2.68zm12.13 20.45a16.96 16.96 0 0 0 4.97-12.01c0-4.53-1.84-8.89-5.03-12.07a16.9 16.9 0 0 0-12.07-5.03c-4.52 0-8.88 1.84-12.07 5.03a16.9 16.9 0 0 0-3.3 19.5c1.8-4.86 4.03-10.62 7.16-14.08 1.4-4.03 3.3-7.44 5.76-9.5.83 2.68 1.22 3.57 2.06 6.25 1.9-1.73 2.13-2 4.03-3.9 0-.06.61 5.8.33 10.22 2.57 2.57 10.12 7.38 10.12 7.38s-2.63 3.74-3.13 3.9c-.5.23-2.85 0-2.85 0l-4.86-.55 5.86 7.26c1.06-.67 2.13-1.5 3.02-2.4zm-24.2 0a16.9 16.9 0 0 0 18.1 3.91l-5.52-9.22-1.74-.05h-.16c-3.36-.45-7.83.22-7.83.22.28-2.63 1.8-4.14 1.8-4.14s-1.01-.44-2.41-.78c.33-1.06 3.13-2.29 3.52-2.46a7.4 7.4 0 0 0-1.29 1.8c1.07.1 2.4.94 2.4.94s-1.45 1.4-2.12 3.07c1.46-.22 2.63-.33 3.86-.22l13.97 1.4 1.29-1.68s-.45-1.4-.79-1.56c-3.3-1.62-8.16-5.65-11.34-8.83-.73-2.07-1.79-6.26-2.46-8.33-2.68 2.01-3.13 5.92-4.64 8.55-2.9 2.18-4.7 9.56-6.15 15.7.5.56.95 1.12 1.51 1.68zM74.8 74.23c-.9-.56-1.73-.84-2.52-.73.12-.5.23-.84.4-1.28 1.62-.23 2.84.61 3.96 1.45-.9.28-.95.34-1.84.56z" /> </svg> </div > <div class="text"> <h1 class="site-title"> <span class="wordmark" ><span class="wl">Wolfram Language</span> <span class="repo">Example Repository</span></span > </h1> <p class="tagline">Ready-to-use examples of the Wolfram Language</p ></div ></a> </div> </div> <nav id="pac-common-navigation"> <h2 class="visuallyhidden">Primary Navigation</h2> <div class="wrap"> <div class="section search-wrapper"> <div id="react-autocomplete" data-action="https://resources.wolframcloud.com/ExampleRepository/search/" data-resources-base-url="https://resources.wolframcloud.com/ExampleRepository/resources/" data-autocomplete-json="https://resources.wolframcloud.com/ExampleRepository/autocomplete/allnames.json" > <form id="repo-header-search-form" role="search" action="https://resources.wolframcloud.com/ExampleRepository/search/" method="get" > <input type="search" name="i" required="required" placeholder="Search" /> </form> </div> </div> <div class="section sorting-properties"> <ul> <li> <button class="nav-button"> <span class="label">Categories</span ><svg class="arrow" width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" > <path class="arrow-down" d="M4,4l4,4l4-4" /> <path class="arrow-right" d="M6,2l4,4l-4,4" /> </svg> </button> <div class="dropdown closed"> <ul class="grid"> <li><a href="https://resources.wolframcloud.com/ExampleRepository/category/astronomy">Astronomy</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/audio-processing">Audio Processing</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/calculus">Calculus</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/cellular-automata">Cellular Automata</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/chemistry">Chemistry</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/complex-systems">Complex Systems</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/computer-science">Computer Science</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/computer-vision">Computer Vision</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/control-systems">Control Systems</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/creative-arts">Creative Arts</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/data-science">Data Science</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/engineering">Engineering</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/finance-economics">Finance & Economics</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/finite-element-method">Finite Element Method</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/food-nutrition">Food & Nutrition</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/geography">Geography</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/geometry">Geometry</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/graphs-networks">Graphs & Networks</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/image-processing">Image Processing</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/life-sciences">Life Sciences</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/machine-learning">Machine Learning</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/mathematics">Mathematics</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/optimization">Optimization</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/physics">Physics</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/puzzles-and-recreation">Puzzles and Recreation</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/quantum-computation">Quantum Computation</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/signal-processing">Signal Processing</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/social-sciences">Social Sciences</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/system-modeling">System Modeling</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/text-language-processing">Text & Language Processing</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/time-related-computation">Time-Related Computation</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/video-processing">Video Processing</a></li ><li><a href="https://resources.wolframcloud.com/ExampleRepository/category/visualization-graphics">Visualization & Graphics</a></li > </ul> <div class="other-nav-pages"> <ul class="grid"> <li><a href="https://resources.wolframcloud.com/ExampleRepository/all"><span class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28"><g><path d="M5 9h3V6H5zm6 0h12V6H11zm-6 6h3v-3H5zm6 0h12v-3H11zm-6 6h3v-3H5zm6 0h12v-3H11z"></path></g></svg></span> Alphabetical List</a></li > </ul></div > </div></li > </ul></div><div class="section more-links"> <ul> <li><a href="https://resources.wolframcloud.com/ExampleRepository/Unnamed-Resource.nb">Submit a New Resource</a></li > </ul></div><div class="section learn-more-about-wl"> <ul> <li class="learn-more-about-wl-frame"> <a class="learn-more-about-wl-button" href="https://www.wolfram.com/language/" ><svg viewBox="0 0 124 31"> <path d="M15.5 1a14.5 14.5 0 1 1 0 29 14.5 14.5 0 0 1 0-29Zm0 2a12.5 12.5 0 1 0 0 25 12.5 12.5 0 0 0 0-25Zm1.8 5.4v4.3l-1.5-1.1-.3-1.5 1.8-1.7ZM5.6 20.3a11 11 0 1 1 15.7 4.5l-3.7-4.7 3 .4h2l2-2.5s-5-3-6.6-4.8a46 46 0 0 0-.2-6.6l-2.6 2.6-1.3-4a13.5 13.5 0 0 0-3.7 6c-2 2.3-3.4 6-4.6 9.1Zm13.8 5.5a11 11 0 0 1-12.6-3.6c.9-4 2-8.7 4-10.1.9-1.7 1.2-4.2 3-5.5.4 1.3 1 4 1.5 5.3 2 2.1 5.2 4.7 7.3 5.7.2.1.5 1 .5 1l-.9 1-9-.8-2.4.1c.4-1 1.4-2 1.4-2s-1-.5-1.6-.6l.8-1.1c-.2 0-2 .9-2.2 1.6l1.5.5s-1 1-1.2 2.6c0 0 3-.4 5-.1h1.3l3.6 6Zm-4-10.8c-.2.3-.3.5-.3.8.5 0 1 .1 1.6.5l1.2-.4c-.7-.5-1.5-1-2.6-.9Z" ></path> <text font-family="Source Sans Pro, system-ui, sans-serif" font-size="11" > <tspan x="36" y="11">Learn More about</tspan> <tspan x="36" y="26">Wolfram Language</tspan> </text> </svg></a > </li> </ul> </div> </div> </nav> </header> <main id="results-page"> <div id="top"></div> <h1 class="visuallyhidden">Wolfram Language Example Repository</h1> <div class="wrap"> <div id="infinite-scroll" data-url="https://www.wolframcloud.com/obj/resourcesystem/published/ExampleRepository/json/Homepage/1.json"></div> <div id="top-frame" class="hide"> <a href="#top" aria-label="Back to top"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" width="1.5625em" height="1.5625em" > <rect width="25" height="25" rx="3" class="bg" /> <path d="m8 19 4.5-4.5L17 19M8 11l4.5-4.5L17 11" fill="none" stroke="hsl(30, 0%, 95%)" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Top</span> </a> </div> </div> </main> <footer id="gws-footer"> <div class="wrap"> <p> © 2024 <a href="https://www.wolfram.com/" target="gws-footer">Wolfram</a>. All rights reserved. </p> <ul> <li> <a href="https://www.wolfram.com/legal/terms/wolfram-cloud.html" target="gws-footer" > Legal </a> & <a href="https://www.wolfram.com/legal/privacy/wolfram-cloud.html" target="gws-footer" > Privacy Policy </a> </li> <li> <a href="https://resources.wolframcloud.com/forms/contact" target="gws-footer" > Contact Us </a> </li> <li> <a href="https://www.wolframalpha.com/" target="gws-footer"> WolframAlpha.com </a> </li> <li> <a href="https://www.wolframcloud.com/" target="gws-footer"> WolframCloud.com </a> </li> </ul> </div> </footer> <script src="https://www.wolframcdn.com/javascript/jquery-2.1.4.min.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/shingle.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/header-and-results.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/react-autocomplete.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/ExampleRepository/5.0.0/main.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/results-libraries.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/ExampleRepository/5.0.0/results-list.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/results-controller.js"></script> <script> (() => { let loading = false; function buildCategoryLink(name, url, className) { return ( '<li class="' + className + '"><a href="' + url + '">' + name + "</a></li>" ); } function buildCategories(featuredCategories, otherCategories) { $("#infinite-scroll").prepend( "<h2>Popular Categories:</h2><ul id='hp-categories'></ul>" ); $hpCategories = $("#hp-categories"); $.each(featuredCategories, function (i, category) { $hpCategories.append( buildCategoryLink(category.Name, category.URL, "") ); }); $.each(otherCategories, function (i, category) { $hpCategories.append( buildCategoryLink(category.Name, category.URL, "other") ); }); $hpCategories.append( '<li><button id="hp-category-show-hide-button">' + '<span class="show">Show All ' + '<svg viewBox="0 0 10 6" xmlns="http://www.w3.org/2000/svg" width="0.71428571em" height="0.42857143em"><path d="m0 1 1-1 4 4 4-4 1 1-5 5z"/></svg>' + "</span>" + '<span class="visuallyhidden">/</span>' + '<span class="hide">Hide ' + '<svg viewBox="0 0 10 6" xmlns="http://www.w3.org/2000/svg" width="0.71428571em" height="0.42857143em"><path d="m0 5 1 1 4-4 4 4 1-1-5-5z"/></svg>' + "</span>" + "</button></li>" ); $("#hp-category-show-hide-button").click(function () { $hpCategories.toggleClass("show-other"); }); } function buildTile(label, url, description, heroImage) { const labelHTML = '<h3 class="name">' + label + "</h3>"; let descriptionHTML = ""; let heroImageHTML = ""; if (description.length > 0) { descriptionHTML = '<p class="description">' + description + "</p>"; } if (heroImage) { heroImageHTML = '<img src="' + heroImage + '" alt="" class="hero-image"/>'; } return ( '<div class="grid-item"><a href="' + url + '"><div class="tile">' + heroImageHTML + labelHTML + descriptionHTML + "</div></a></div>" ); } function buildGrid(resources) { let $grid = $('<div class="grid"/>'); $.each(resources, function (i, resource) { $grid.append( buildTile( resource.Name.Label, resource.Name.URL, resource.Description, resource.HeroImage ) ); }); $("#infinite-scroll").append($grid); loading = false; } $(function () { let nextJsonURL = ""; $.getJSON($("#infinite-scroll").data("url"), (data) => { nextJsonURL = data.Next; console.log(data); buildCategories(data.FeaturedCategories, data.OtherCategories); buildGrid(data.Resources); }); const $topOfPageLink = $("#top-frame"); const $window = $(window); const $document = $(document); $window.scroll(function () { if ( $window.scrollTop() >= $document.height() - $window.height() - 500 && nextJsonURL && !loading ) { loading = true; $.getJSON( nextJsonURL, (data) => { nextJsonURL = data.Next; buildGrid(data.Resources); }, 100 ); } if ( $window.scrollTop() > 400 && $window.scrollTop() < $document.height() - $window.height() - 150 ) { $topOfPageLink.removeClass("hide"); } else { $topOfPageLink.addClass("hide"); } }); }); })(); </script> </body> </html>