Hypertext Markup "index"
Admin User, erstellt 03. Apr. 2025
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title editable="nocomment">Example 14</title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<!-- Warranty & Liability -->
<!-- To the extent permitted by applicable law and unless explicitly -->
<!-- otherwise agreed upon, XLOG Technologies AG makes no warranties -->
<!-- regarding the provided information. XLOG Technologies AG assumes -->
<!-- no liability that any problems might be solved with the information -->
<!-- provided by XLOG Technologies AG. -->
<!-- -->
<!-- Rights & License -->
<!-- All industrial property rights regarding the information - copyright -->
<!-- and patent rights in particular - are the sole property of XLOG -->
<!-- Technologies AG. If the company was not the originator of some -->
<!-- excerpts, XLOG Technologies AG has at least obtained the right to -->
<!-- reproduce, change and translate the information. -->
<!-- -->
<!-- Reproduction is restricted to the whole unaltered document. -->
<!-- Reproduction of the information is only allowed for non-commercial -->
<!-- uses. Selling, giving away or letting of the execution of the -->
<!-- library is prohibited. The library can be distributed as part of -->
<!-- your applications and libraries for execution provided this comment -->
<!-- remains unchanged. -->
<!-- -->
<!-- Restrictions -->
<!-- Only to be distributed with programs that add significant and primary -->
<!-- functionality to the library. Not to be distributed with additional -->
<!-- software intended to replace any components of the library. -->
<!-- -->
<!-- Trademarks -->
<!-- Jekejeke is a registered trademark of XLOG Technologies AG. -->
<body>
<h1>Example 14: Progressive Plotting</h1>
<h2>Introduction</h2>
<h2>Non Blocking</h2>
<pre class="code">
:- ensure_loaded(library(misc/markup)).
:- ensure_loaded(library(misc/react)).
run :-
tag('<button>'),
bind('click', E, test(E)),
write('click'),
tag('</button>').
test(E) :-
ir_object_current(E, 'target', T),
dom_output_new(T, D),
write(D, ' and again'),
close(D).
:- run.
</pre>
<h2>Non Progressive</h2>
<p></p>
<pre class="code">
:- ensure_loaded(library(tester/plot)).
test :-
findall([X,Y], (between(0,180,K), W is pi*K/90,
X is sin(2*W), Y is cos(3*W)), L),
plot(L,[mark('')]).
:- test.
</pre>
<h2>Blocking</h2>
<pre class="code">
run2 :-
tag('<button id="emitter">'),
write('click'),
tag('</button>'),
loop.
loop :-
goto('emitter'),
repeat,
listen('click', _, true, [block(true)]),
write(' and again'),
flush_output,
fail.
:- run2.
</pre>
<h2>Progressive</h2>
<p></p>
<pre class="code">
test2 :-
plot_begin([mark('')]),
(between(0,180,J),
I is J-10,
findall([X,Y], (between(I,J,K), W is pi*K/90,
X is sin(2*W), Y is cos(3*W)), L),
clear,
plot_add(L, [mark('')]),
flush_output, sleep(10), fail; true),
plot_end.
:- test2.
</pre>
<h2>Conclusions</h2>
<script type="module">
import {
notebook_async
} from "../../../../dogelog/player/canned/dogelog.mjs";
await notebook_async();
</script>
</body>
</html>