-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.html
107 lines (94 loc) · 4.23 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<head>
<title>JavaScript Lookups</title>
<link rel="icon" type="image/png" href="/images/icon.png" />
<link rel="apple-touch-icon" href="/images/touch.png" />
<link rel="stylesheet" type="text/css" href="/styles/main.css" />
<link rel="stylesheet" type="text/css" href="/lib/beta/css/client.css" />
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript" src="/lib/beta/js/json2.min.js"></script>
<script type="text/javascript" src="/lib/beta/js/utils.js"></script>
<script type="text/javascript" src="/scripts/namespace.js"></script>
<script type="text/javascript" src="/scripts/type.js"></script>
<script type="text/javascript" src="/scripts/funcs.js"></script>
<script type="text/javascript" src="/scripts/lookups.js"></script>
<script type="text/javascript" src="/scripts/trie.js"></script>
<script type="text/javascript" src="/scripts/ptrie.js"></script>
<script type="text/javascript">
$(document).ready(namespace.com.pageforest.lookups.onReady);
</script>
</head>
<body>
<div id="page">
<h1 id="page-heading">
<span id="title">JavaScript Lookups</span>
<span class="menu-bar">
<button id="load">Load Dictionary</button>
<button id="build">Build Trie</button>
</span>
</h1>
<div id="left">
<p>Enter your dictionary words here:</p>
<textarea id="dictionary">
Four score and seven years ago our fathers brought forth on
this continent, a new nation, conceived in Liberty, and
dedicated to the proposition that all men are created equal.
Now we are engaged in a great civil war, testing whether that
nation, or any nation so conceived and so dedicated, can long
endure. We are met on a great battlefield of that war. We have
come to dedicate a portion of that field, as a final resting
place for those who here gave their lives that that nation
might live. It is altogether fitting and proper that we should
do this.
But, in a larger sense, we cannot dedicate—we cannot
consecrate—we cannot hallow—this ground. The brave men, living
and dead, who struggled here, have consecrated it, far above
our poor power to add or detract. The world will little note,
nor long remember what we say here, but it can never forget
what they did here. It is for us the living, rather, to be
dedicated here to the unfinished work which they who fought
here have thus far so nobly advanced. It is rather for us to
be here dedicated to the great task remaining before us—that
from these honored dead we take increased devotion to that
cause for which they gave the last full measure of
devotion—that we here highly resolve that these dead shall not
have died in vain—that this nation, under God, shall have a
new birth of freedom— and that government of the people, by
the people, for the people, shall not perish from the earth.
</textarea>
</div>
<div id="right">
<p>A Trie for your dictionary.</p>
<textarea id="output"></textarea>
<p id="size"></p>
<a id="link" href="#" target="_blank">Link to Saved Trie</a>
</div>
<div style="clear:both;">
<p>After building a Trie, you can enter prefixes here and display (the first 100)
matches from the dictionary.</p>
<label for="word">Enter Prefix:<input id="word"/></label>
<p id="result"></p>
<p id="timing"></p>
</div>
<div id="footer">
<hr/>
<a href="/test/perf-test.html">Run Performance Tests</a> |
<a href="http://ejohn.org/blog/dictionary-lookups-in-javascript/">Dictionary Lookups in JavaScript (John Resig)</a> |
<a href="https://github.com/mckoss/lookups">Fork Me on Github</a> |
<a href="http://www.pageforest.com">Pageforest.com</a>
</div> <!-- footer -->
</div> <!-- page -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2072869-7']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') +
'.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>