-
Notifications
You must be signed in to change notification settings - Fork 1
Fixed Overflow, Hidden Examples, and Changed HTTP Request Format #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
zachldl
wants to merge
12
commits into
COMS30106:master
Choose a base branch
from
zachldl:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
fb932e6
Fixed vertical overflow
zachldl 9cc8a83
Resolution scaling and slight visual tweak
zachldl 0b4b15a
Revert "Resolution scaling and slight visual tweak"
zachldl d5399bc
Resolution scaling and slight visual tweak - FIX
zachldl 9e89b32
Hide examples from view
zachldl 4abd343
Updated method of code preloading to external file
zachldl fc80fef
Changes to button and formatting
zachldl 13bf6c7
Cleaned up and added comments
zachldl 27097d1
Test prolog scripts
zachldl 3c91862
Staggered updates to LPN.js and load previews from external file
zachldl 0c2defc
Removed random tab
zachldl f7c3b7b
Remove problematic line
So-Cool File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div class="extract newswish" id="{{ include.id }}"> | ||
<pre class="source newswish" id="{{ include.id }}" onlinefolder="{{ site.onlinefolder }}" swishurl="{{ site.swish }}"> | ||
<div class="innerswishbox" id="{{ include.id }}"></div> | ||
</pre> | ||
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<div class="extract swish" id="{{ include.id }}"> | ||
<pre class="source swish" id="{{ include.id }}"> | ||
<pre class="source swish" id="{{ include.id }}" onlinefolder="{{ site.onlinefolder }}" swishurl="{{ site.swish }}"> | ||
{% include_relative {{ include.id | prepend:site.prolog | append:".pl" }} %} | ||
</pre> | ||
</div> |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
172 changes: 172 additions & 0 deletions
172
index_overflowfix_examplesfix_iframefix_previewfix.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
--- | ||
layout: slides | ||
title: Interactive lab examples | ||
subtitle: Simply Logical | ||
--- | ||
|
||
<section> | ||
<section> | ||
<h2>Fibonacci sequence</h2> | ||
Demonstrates the use of accumulators, and the difference between interpreted and uninterpreted arithmetic expressions. | ||
</section> | ||
<section> | ||
This implementation of the Fibonacci sequence is very inefficient -- the 30th number takes about 90 seconds! | ||
{% include new_swish_box.html id="fib" %} | ||
</section> | ||
<section> | ||
Variant of <code>fib/2</code> that returns an uninterpreted arithmetic expression showing the computation tree. | ||
{% include new_swish_box.html id="fibt" %} | ||
</section> | ||
<section> | ||
We can get an efficient version by solving a more general problem! | ||
{% include new_swish_box.html id="fibn" %} | ||
</section> | ||
</section> | ||
|
||
<section> | ||
<section> | ||
<h2>Second-order predicates</h2> | ||
generate all solutions to a query. | ||
{% include new_swish_box.html id="biglist" %} | ||
</section> | ||
<section> | ||
Sorting, quick and dirty | ||
{% include new_swish_box.html id="setof_sort" %} | ||
</section> | ||
<section> | ||
Existential variables | ||
{% include new_swish_box.html id="secondorder" %} | ||
</section> | ||
<section data-markdown> | ||
<script type="text/template"> | ||
See also | ||
- [`library(aggregate)`](http://www.swi-prolog.org/pldoc/man?section=aggregate) | ||
- [`library(apply)`](http://www.swi-prolog.org/pldoc/man?section=apply) | ||
- e.g. `maplist/3` example on [`fibn/2`](/#/1/3) | ||
</script> | ||
</section> | ||
</section> | ||
|
||
<section> | ||
<section data-markdown> | ||
<script type="text/template"> | ||
## Generate and test | ||
This is a programming technique exploiting Prolog's non-determinism: | ||
- a *generator* generates candidate solutions; | ||
- a *tester* checks whether a candidate has the required properties. | ||
|
||
It will be beneficial to make the generator as efficient as possible | ||
</script> | ||
</section> | ||
<section> | ||
An AI classic: N non-attacking queens | ||
{% include new_swish_box.html id="nqueens" %} | ||
</section> | ||
<section> | ||
Finding prime factors: | ||
{% include new_swish_box.html id="factors" %} | ||
</section> | ||
<section> | ||
How not to use generate and test: | ||
{% include new_swish_box.html id="psort" %} | ||
</section> | ||
</section> | ||
|
||
<section> | ||
<section> | ||
<h2>Meta-interpreters</h2> | ||
{% include new_swish_box.html id="prove" %} | ||
</section> | ||
<section> | ||
Keep conjunctive resolvent together | ||
{% include new_swish_box.html id="prove_r" %} | ||
</section> | ||
<section> | ||
Show (propositional) proof tree | ||
{% include new_swish_box.html id="prove_p" %} | ||
</section> | ||
</section> | ||
|
||
<section> | ||
<section> | ||
<h2>Depth-first search and variants</h2> | ||
{% include new_swish_box.html id="search_df" %} | ||
</section> | ||
<section> | ||
Depth-first search without agenda = transitive closure | ||
{% include new_swish_box.html id="search_bt" %} | ||
</section> | ||
<section> | ||
Backtracking DF search with depth bound | ||
{% include new_swish_box.html id="search_d" %} | ||
</section> | ||
<section> | ||
Iterative deepening | ||
{% include new_swish_box.html id="search_id" %} | ||
</section> | ||
<section> | ||
Don't use search if an analytic solution exists! | ||
{% include new_swish_box.html id="hanoi" %} | ||
</section> | ||
</section> | ||
|
||
<section> | ||
<section> | ||
<h2>Breadth-first search</h2> | ||
{% include new_swish_box.html id="search_bf" %} | ||
</section> | ||
<section> | ||
Breadth-first meta-interpreter | ||
{% include new_swish_box.html id="prove_bf" %} | ||
</section> | ||
<section> | ||
Meta-interpreter for full clausal logic | ||
{% include new_swish_box.html id="refute_bf" %} | ||
</section> | ||
<section> | ||
Forward chaining | ||
{% include new_swish_box.html id="model" %} | ||
</section> | ||
<section> | ||
Depth-bounded forward chaining for infinite domains | ||
{% include new_swish_box.html id="model_d" %} | ||
</section> | ||
</section> | ||
|
||
<section> | ||
<section> | ||
<h2>Informed search</h2> | ||
</section> | ||
<section> | ||
Sliding tiles (best-first but not A* and with aggressive pruning) | ||
{% include new_swish_box.html id="tiles" %} | ||
</section> | ||
<section> | ||
Path finding (depth-first, breadth-first, A*, backtracking) | ||
{% include new_swish_box.html id="path" %} | ||
</section> | ||
</section> | ||
|
||
<section> | ||
<section> | ||
<h2>Definite Clause Grammars</h2> | ||
</section> | ||
<section> | ||
Roman numerals | ||
{% include new_swish_box.html id="roman" %} | ||
</section> | ||
</section> | ||
|
||
<section> | ||
<section> | ||
<h2>Inductive reasoning</h2> | ||
</section> | ||
<section> | ||
Bottom-up induction | ||
{% include new_swish_box.html id="section92" %} | ||
</section> | ||
<section> | ||
Top-down induction | ||
{% include new_swish_box.html id="section93" %} | ||
</section> | ||
</section> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 94 additions & 0 deletions
94
web/css/lpn_overflowfix_examplesfix_iframefix_previewfix.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
div.ui-resizable-s { | ||
} | ||
|
||
|
||
/******************************* | ||
* DISCLAIMER * | ||
*******************************/ | ||
|
||
div.swish-disclaimer { | ||
font-size: 80%; | ||
font-family:Helvetica,sans-serif; | ||
color: #444; | ||
padding: 0px 5%; | ||
} | ||
|
||
div.github { | ||
padding-top: 5px; | ||
text-align: center; | ||
margin: auto; | ||
} | ||
|
||
div.github > span { | ||
} | ||
|
||
div.github iframe { | ||
vertical-align: top; | ||
border: 0px; | ||
} | ||
|
||
div.content { | ||
background-image: url("testing-version.png"); | ||
background-size: 50%; | ||
} | ||
|
||
|
||
/************************ | ||
* NEW SYSTEM * | ||
************************/ | ||
|
||
.runswish { | ||
z-index: 1000; | ||
width: 32px; | ||
height: 32px; | ||
float: right; | ||
/*background-image: url("../../img/run.png");*/ | ||
font-size: 28px; | ||
position: relative; | ||
right: 18px; | ||
top: 5px; | ||
} | ||
|
||
div.extract.newswish { | ||
width: 100%; | ||
padding: 0px; | ||
border-radius: 10px; | ||
background-color: #eee; | ||
} | ||
|
||
pre.source.newswish { | ||
background-color: #f5f5f5; | ||
font-family: monospace; | ||
font-size: 20px; | ||
border-radius: 10px; | ||
overflow: auto; | ||
} | ||
|
||
.innerswishbox { | ||
margin-left: 20px !important; | ||
} | ||
|
||
::-webkit-scrollbar { | ||
width: 7px; | ||
height: 7px; | ||
} | ||
|
||
::-webkit-scrollbar-track { | ||
background-color: rgba(85, 85, 85, 0.2); | ||
border-radius: 7px; | ||
margin: 5px; | ||
} | ||
|
||
::-webkit-scrollbar-thumb { | ||
background-color: #555; | ||
border-radius: 5px; | ||
transition: all 2s; | ||
} | ||
|
||
::-webkit-scrollbar-thumb:hover { | ||
background-color: #222; | ||
} | ||
|
||
::-webkit-scrollbar-corner { | ||
display: none; | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix the tab sign