• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#windowsobjective-ccocoaqtpython誰得phprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A categorical programming language


Commit MetaInfo

Revisionf20fdf3a14c00f7bae868d219dbe97ef7bf23417 (tree)
Time2022-10-01 14:00:23
AuthorCorbin <cds@corb...>
CommiterCorbin

Log Message

Autocomplete possible dippers.

Change Summary

Incremental Difference

--- a/honey/honey.py
+++ b/honey/honey.py
@@ -21,6 +21,8 @@ tuples = {tuple(l): i for i, l in enumerate(heap) if isinstance(l, list)}
2121 @app.route("/")
2222 def home():
2323 dipperCount = len(symbols)
24+ dippers = "\n".join("<option value=\"%s\" />" % dipper
25+ for dipper in symbols)
2426 heapCount = len(heap)
2527 return f"""
2628 <!DOCTYPE html5>
@@ -32,18 +34,19 @@ def home():
3234 <p>There are {dipperCount} dippers available.</p>
3335 <p>The heap has {heapCount} rows.</p>
3436 <form id="dipper-form">
35- <input type="textbox" id="dipper" />
37+ <input list="dippers" id="dipper" />
3638 <button id="go" type="submit">Go!</button>
3739 </form>
38- <div id="log">
39- <p>Log starts here</p>
40- </div>
40+ <div id="log"></div>
4141 <script
4242 src="{ url_for("static", filename="bilby.min.js") }"
4343 type="text/javascript"></script>
4444 <script
4545 src="{ url_for("static", filename="honey.js") }"
4646 type="text/javascript"></script>
47+ <datalist id="dippers">
48+ {dippers}
49+ </datalist>
4750 </body>
4851 """
4952