course_outline
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
course_outline [2017/03/21 01:37] – jonathan | course_outline [2018/01/03 02:01] – jonathan | ||
---|---|---|---|
Line 4: | Line 4: | ||
===== Introduction ===== | ===== Introduction ===== | ||
+ | |||
+ | Use this small project to get started with Event-B and the Rodin tool | ||
+ | |||
* {{: | * {{: | ||
+ | * [[https:// | ||
+ | |||
+ | < | ||
+ | <iframe width=" | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | |||
+ | <div id=" | ||
+ | |||
+ | < | ||
+ | // 2. This code loads the IFrame Player API code asynchronously. | ||
+ | var tag = document.createElement(' | ||
+ | |||
+ | tag.src = " | ||
+ | var firstScriptTag = document.getElementsByTagName(' | ||
+ | firstScriptTag.parentNode.insertBefore(tag, | ||
+ | |||
+ | // 3. This function creates an < | ||
+ | // after the API code downloads. | ||
+ | var player; | ||
+ | function onYouTubeIframeAPIReady() { | ||
+ | player = new YT.Player(' | ||
+ | height: ' | ||
+ | width: ' | ||
+ | videoId: ' | ||
+ | events: { | ||
+ | ' | ||
+ | ' | ||
+ | } | ||
+ | }); | ||
+ | } | ||
+ | // 4. The API will call this function when the video player is ready. | ||
+ | function onPlayerReady(event) { | ||
+ | event.target.playVideo(); | ||
+ | } | ||
+ | // 5. The API calls this function when the player' | ||
+ | // The function indicates that when playing a video (state=1), | ||
+ | // the player should play for six seconds and then stop. | ||
+ | var done = false; | ||
+ | function onPlayerStateChange(event) { | ||
+ | if (event.data == YT.PlayerState.PLAYING && !done) { | ||
+ | setTimeout(stopVideo, | ||
+ | done = true; | ||
+ | } | ||
+ | } | ||
+ | | ||
+ | function stopVideo() { | ||
+ | player.stopVideo(); | ||
+ | } | ||
+ | </ | ||
+ | </ | ||
===== Reactive systems: Bridge ===== | ===== Reactive systems: Bridge ===== | ||
Line 75: | Line 130: | ||
===== Exam Preparation ===== | ===== Exam Preparation ===== | ||
- | Develop a phone book example by developing a mathematical model from informal E/ | + | The following examples are unlikely to be on the exam. |
+ | |||
+ | Develop a phone book example by developing a mathematical model from informal E/ | ||
Line 87: | Line 144: | ||
*R2: A doctor shall not prescribe two drugs that interact | *R2: A doctor shall not prescribe two drugs that interact | ||
*Goal: | *Goal: | ||
- | |||
course_outline.txt · Last modified: 2018/01/03 02:03 by jonathan