├── .gitignore ├── .gitmodules ├── Makefile ├── README.md ├── Vagrantfile ├── algospot-logo.eps ├── ansible ├── chicago.playbook ├── dev.playbook ├── roles.txt └── single_box.yml ├── configs ├── chicago │ ├── celeryd_config │ ├── celeryd_initd │ ├── nginx │ ├── pg_hba.conf │ ├── pg_ident.conf │ ├── uwsgi.conf │ └── uwsgi.ini └── dev │ ├── celeryd_config │ ├── celeryd_initd │ ├── grub │ ├── nginx │ ├── pg_hba.conf │ ├── pg_ident.conf │ ├── uwsgi.conf │ └── uwsgi.ini ├── dev_data ├── helloworld.in ├── helloworld.out ├── plus.in └── plus.out ├── utils └── ical_generator │ └── generate.py └── www ├── algospot ├── TODO.txt ├── __init__.py ├── celery.py ├── libs │ ├── common │ │ ├── djangoutils.py │ │ └── rendertext.py │ └── external │ │ └── diff_match_patch │ │ ├── __init__.py │ │ ├── diff_match_patch.py │ │ └── diff_match_patch_test.py ├── local_settings.py.chicago ├── local_settings.py.dev ├── local_settings.py.example ├── local_settings.py.jongman ├── local_settings.py.prod ├── profile_logs │ └── analyze.sh ├── search_sites.py ├── server_config │ ├── nginx │ └── uwsgi.ini ├── settings.py ├── update_search_index.sh └── urls.py ├── base ├── __init__.py ├── admin.py ├── backends.py ├── decorators.py ├── feeds.py ├── fixtures │ ├── group_fixtures.json │ ├── guardian_fixtures.json │ └── superuser_fixtures.json ├── forms.py ├── management │ ├── __init__.py │ └── commands │ │ ├── __init__.py │ │ ├── code_convert.py │ │ ├── fromvanilla.py │ │ └── include_everyone.py ├── middlewares.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_auto__add_field_userprofile_intro.py │ ├── 0003_auto__add_field_userprofile_accepted.py │ └── __init__.py ├── models.py ├── processors.py ├── queries │ └── patch_psql_table.sql ├── search_indexes.py ├── templates │ ├── calendar.html │ ├── index.html │ ├── matchup.html │ ├── not_authorized.html │ ├── settings.html │ └── user_profile.html ├── templatetags │ ├── __init__.py │ ├── avatar_custom_tags.py │ └── common_tags.py ├── tests.py ├── urls.py ├── utils.py └── views.py ├── forum ├── __init__.py ├── admin.py ├── fixtures │ └── fixtures.json ├── forms.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_auto__add_field_post_category.py │ ├── 0003_auto__chg_field_post_title.py │ ├── 0004_auto__add_field_post_modified_on.py │ └── __init__.py ├── models.py ├── processors.py ├── search_indexes.py ├── templates │ ├── by_user.html │ ├── delete.html │ ├── forum-base.html │ ├── list.html │ ├── read.html │ └── write.html ├── tests.py ├── urls.py ├── utils.py └── views.py ├── judge ├── __init__.py ├── admin.py ├── differs.py ├── fixtures │ └── fixtures.json ├── forms.py ├── languages │ ├── __init__.py │ ├── c#.py │ ├── c11.py │ ├── cpp.py │ ├── go.py │ ├── hs.py │ ├── java.py │ ├── lua.py │ ├── node.py │ ├── py.py │ ├── py3.py │ ├── pypy.py │ ├── rb.py │ ├── rust.py │ └── scala.py ├── management │ ├── __init__.py │ └── commands │ │ ├── __init__.py │ │ └── problems_set_permission.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_auto__add_attachment.py │ ├── 0003_auto__del_field_attachment_name__del_field_attachment_path__del_field_.py │ ├── 0004_auto__chg_field_problem_name__chg_field_problem_judge_module__chg_fiel.py │ ├── 0005_auto__add_field_problem_tags.py │ ├── 0006_auto__add_solver__del_field_problem_tags.py │ ├── 0007_auto__add_field_solver_solved.py │ ├── 0008_auto.py │ ├── 0009_auto__add_field_solver_when.py │ ├── 0010_auto__add_problemrevision__add_field_problem_last_revision__add_unique.py │ ├── 0011_save_problem_as_revision.py │ ├── 0012_auto__del_field_problem_memory_limit__del_field_problem_sample_output_.py │ └── __init__.py ├── models.py ├── monitor.py ├── sandbox.py ├── search_indexes.py ├── tasks.py ├── templates │ ├── judge-base.html │ ├── problem │ │ ├── diff.html │ │ ├── done.html │ │ ├── edit.html │ │ ├── goto_fail.html │ │ ├── history.html │ │ ├── info_block.html │ │ ├── latexify.tex │ │ ├── list.html │ │ ├── mine.html │ │ ├── old.html │ │ ├── problem-base.html │ │ ├── read.html │ │ ├── stat.html │ │ └── submit.html │ ├── ranking.html │ └── submission │ │ ├── details.html │ │ ├── list-base.html │ │ └── recent.html ├── templatetags │ ├── __init__.py │ └── judge_tags.py ├── tests.py ├── urls.py ├── utils.py └── views │ ├── __init__.py │ ├── problem.py │ └── submission.py ├── manage.py ├── newsfeed ├── __init__.py ├── config.py ├── interface.py ├── management │ ├── __init__.py │ └── commands │ │ ├── __init__.py │ │ └── activities_set_permissions.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_auto__add_activity.py │ ├── 0003_auto__add_field_activity_target_content_type__add_field_activity_targe.py │ ├── 0004_auto__add_field_activity_action_object_content_type__add_field_activit.py │ ├── 0005_auto__add_field_activity_type.py │ ├── 0006_auto__chg_field_activity_timestamp.py │ ├── 0007_auto__add_field_activity_admin_only.py │ └── __init__.py ├── models.py ├── templates │ ├── list.html │ ├── newsfeed.html │ └── newsfeed_block.html ├── templatetags │ ├── __init__.py │ └── newsfeed_tags.py ├── tests.py ├── urls.py ├── utils.py └── views.py ├── static ├── codemirror │ ├── .gitattributes │ ├── .gitignore │ ├── .npmignore │ ├── .travis.yml │ ├── AUTHORS │ ├── CHANGELOG.md │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── addon │ │ ├── comment │ │ │ ├── comment.js │ │ │ └── continuecomment.js │ │ ├── dialog │ │ │ ├── dialog.css │ │ │ └── dialog.js │ │ ├── display │ │ │ ├── autorefresh.js │ │ │ ├── fullscreen.css │ │ │ ├── fullscreen.js │ │ │ ├── panel.js │ │ │ ├── placeholder.js │ │ │ └── rulers.js │ │ ├── edit │ │ │ ├── closebrackets.js │ │ │ ├── closetag.js │ │ │ ├── continuelist.js │ │ │ ├── matchbrackets.js │ │ │ ├── matchtags.js │ │ │ └── trailingspace.js │ │ ├── fold │ │ │ ├── brace-fold.js │ │ │ ├── comment-fold.js │ │ │ ├── foldcode.js │ │ │ ├── foldgutter.css │ │ │ ├── foldgutter.js │ │ │ ├── indent-fold.js │ │ │ ├── markdown-fold.js │ │ │ └── xml-fold.js │ │ ├── hint │ │ │ ├── anyword-hint.js │ │ │ ├── css-hint.js │ │ │ ├── html-hint.js │ │ │ ├── javascript-hint.js │ │ │ ├── show-hint.css │ │ │ ├── show-hint.js │ │ │ ├── sql-hint.js │ │ │ └── xml-hint.js │ │ ├── lint │ │ │ ├── coffeescript-lint.js │ │ │ ├── css-lint.js │ │ │ ├── html-lint.js │ │ │ ├── javascript-lint.js │ │ │ ├── json-lint.js │ │ │ ├── lint.css │ │ │ ├── lint.js │ │ │ └── yaml-lint.js │ │ ├── merge │ │ │ ├── merge.css │ │ │ └── merge.js │ │ ├── mode │ │ │ ├── loadmode.js │ │ │ ├── multiplex.js │ │ │ ├── multiplex_test.js │ │ │ ├── overlay.js │ │ │ └── simple.js │ │ ├── runmode │ │ │ ├── colorize.js │ │ │ ├── runmode-standalone.js │ │ │ ├── runmode.js │ │ │ └── runmode.node.js │ │ ├── scroll │ │ │ ├── annotatescrollbar.js │ │ │ ├── scrollpastend.js │ │ │ ├── simplescrollbars.css │ │ │ └── simplescrollbars.js │ │ ├── search │ │ │ ├── jump-to-line.js │ │ │ ├── match-highlighter.js │ │ │ ├── matchesonscrollbar.css │ │ │ ├── matchesonscrollbar.js │ │ │ ├── search.js │ │ │ └── searchcursor.js │ │ ├── selection │ │ │ ├── active-line.js │ │ │ ├── mark-selection.js │ │ │ └── selection-pointer.js │ │ ├── tern │ │ │ ├── tern.css │ │ │ ├── tern.js │ │ │ └── worker.js │ │ └── wrap │ │ │ └── hardwrap.js │ ├── bin │ │ ├── authors.sh │ │ ├── compress │ │ ├── lint │ │ ├── release │ │ ├── source-highlight │ │ └── upload-release.js │ ├── bower.json │ ├── demo │ │ ├── activeline.html │ │ ├── anywordhint.html │ │ ├── bidi.html │ │ ├── btree.html │ │ ├── buffers.html │ │ ├── changemode.html │ │ ├── closebrackets.html │ │ ├── closetag.html │ │ ├── complete.html │ │ ├── emacs.html │ │ ├── folding.html │ │ ├── fullscreen.html │ │ ├── hardwrap.html │ │ ├── html5complete.html │ │ ├── indentwrap.html │ │ ├── lint.html │ │ ├── loadmode.html │ │ ├── marker.html │ │ ├── markselection.html │ │ ├── matchhighlighter.html │ │ ├── matchtags.html │ │ ├── merge.html │ │ ├── multiplex.html │ │ ├── mustache.html │ │ ├── panel.html │ │ ├── placeholder.html │ │ ├── preview.html │ │ ├── requirejs.html │ │ ├── resize.html │ │ ├── rulers.html │ │ ├── runmode.html │ │ ├── search.html │ │ ├── simplemode.html │ │ ├── simplescrollbars.html │ │ ├── spanaffectswrapping_shim.html │ │ ├── sublime.html │ │ ├── tern.html │ │ ├── theme.html │ │ ├── trailingspace.html │ │ ├── variableheight.html │ │ ├── vim.html │ │ ├── visibletabs.html │ │ ├── widget.html │ │ └── xmlcomplete.html │ ├── doc │ │ ├── activebookmark.js │ │ ├── compress.html │ │ ├── docs.css │ │ ├── internals.html │ │ ├── logo.png │ │ ├── logo.svg │ │ ├── manual.html │ │ ├── realworld.html │ │ ├── releases.html │ │ ├── reporting.html │ │ ├── upgrade_v2.2.html │ │ ├── upgrade_v3.html │ │ ├── upgrade_v4.html │ │ └── yinyang.png │ ├── index.html │ ├── keymap │ │ ├── emacs.js │ │ ├── sublime.js │ │ └── vim.js │ ├── lib │ │ ├── codemirror.css │ │ └── codemirror.js │ ├── mode │ │ ├── apl │ │ │ ├── apl.js │ │ │ └── index.html │ │ ├── asciiarmor │ │ │ ├── asciiarmor.js │ │ │ └── index.html │ │ ├── asn.1 │ │ │ ├── asn.1.js │ │ │ └── index.html │ │ ├── asterisk │ │ │ ├── asterisk.js │ │ │ └── index.html │ │ ├── brainfuck │ │ │ ├── brainfuck.js │ │ │ └── index.html │ │ ├── clike │ │ │ ├── clike.js │ │ │ ├── index.html │ │ │ ├── scala.html │ │ │ └── test.js │ │ ├── clojure │ │ │ ├── clojure.js │ │ │ └── index.html │ │ ├── cmake │ │ │ ├── cmake.js │ │ │ └── index.html │ │ ├── cobol │ │ │ ├── cobol.js │ │ │ └── index.html │ │ ├── coffeescript │ │ │ ├── coffeescript.js │ │ │ └── index.html │ │ ├── commonlisp │ │ │ ├── commonlisp.js │ │ │ └── index.html │ │ ├── crystal │ │ │ ├── crystal.js │ │ │ └── index.html │ │ ├── css │ │ │ ├── css.js │ │ │ ├── gss.html │ │ │ ├── gss_test.js │ │ │ ├── index.html │ │ │ ├── less.html │ │ │ ├── less_test.js │ │ │ ├── scss.html │ │ │ ├── scss_test.js │ │ │ └── test.js │ │ ├── cypher │ │ │ ├── cypher.js │ │ │ └── index.html │ │ ├── d │ │ │ ├── d.js │ │ │ └── index.html │ │ ├── dart │ │ │ ├── dart.js │ │ │ └── index.html │ │ ├── diff │ │ │ ├── diff.js │ │ │ └── index.html │ │ ├── django │ │ │ ├── django.js │ │ │ └── index.html │ │ ├── dockerfile │ │ │ ├── dockerfile.js │ │ │ └── index.html │ │ ├── dtd │ │ │ ├── dtd.js │ │ │ └── index.html │ │ ├── dylan │ │ │ ├── dylan.js │ │ │ ├── index.html │ │ │ └── test.js │ │ ├── ebnf │ │ │ ├── ebnf.js │ │ │ └── index.html │ │ ├── ecl │ │ │ ├── ecl.js │ │ │ └── index.html │ │ ├── eiffel │ │ │ ├── eiffel.js │ │ │ └── index.html │ │ ├── elm │ │ │ ├── elm.js │ │ │ └── index.html │ │ ├── erlang │ │ │ ├── erlang.js │ │ │ └── index.html │ │ ├── factor │ │ │ ├── factor.js │ │ │ └── index.html │ │ ├── fcl │ │ │ ├── fcl.js │ │ │ └── index.html │ │ ├── forth │ │ │ ├── forth.js │ │ │ └── index.html │ │ ├── fortran │ │ │ ├── fortran.js │ │ │ └── index.html │ │ ├── gas │ │ │ ├── gas.js │ │ │ └── index.html │ │ ├── gfm │ │ │ ├── gfm.js │ │ │ ├── index.html │ │ │ └── test.js │ │ ├── gherkin │ │ │ ├── gherkin.js │ │ │ └── index.html │ │ ├── go │ │ │ ├── go.js │ │ │ └── index.html │ │ ├── groovy │ │ │ ├── groovy.js │ │ │ └── index.html │ │ ├── haml │ │ │ ├── haml.js │ │ │ ├── index.html │ │ │ └── test.js │ │ ├── handlebars │ │ │ ├── handlebars.js │ │ │ └── index.html │ │ ├── haskell-literate │ │ │ ├── haskell-literate.js │ │ │ └── index.html │ │ ├── haskell │ │ │ ├── haskell.js │ │ │ └── index.html │ │ ├── haxe │ │ │ ├── haxe.js │ │ │ └── index.html │ │ ├── htmlembedded │ │ │ ├── htmlembedded.js │ │ │ └── index.html │ │ ├── htmlmixed │ │ │ ├── htmlmixed.js │ │ │ └── index.html │ │ ├── http │ │ │ ├── http.js │ │ │ └── index.html │ │ ├── idl │ │ │ ├── idl.js │ │ │ └── index.html │ │ ├── index.html │ │ ├── jade │ │ │ ├── index.html │ │ │ └── jade.js │ │ ├── javascript │ │ │ ├── index.html │ │ │ ├── javascript.js │ │ │ ├── json-ld.html │ │ │ ├── test.js │ │ │ └── typescript.html │ │ ├── jinja2 │ │ │ ├── index.html │ │ │ └── jinja2.js │ │ ├── jsx │ │ │ ├── index.html │ │ │ ├── jsx.js │ │ │ └── test.js │ │ ├── julia │ │ │ ├── index.html │ │ │ └── julia.js │ │ ├── livescript │ │ │ ├── index.html │ │ │ └── livescript.js │ │ ├── lua │ │ │ ├── index.html │ │ │ └── lua.js │ │ ├── markdown │ │ │ ├── index.html │ │ │ ├── markdown.js │ │ │ └── test.js │ │ ├── mathematica │ │ │ ├── index.html │ │ │ └── mathematica.js │ │ ├── mbox │ │ │ ├── index.html │ │ │ └── mbox.js │ │ ├── meta.js │ │ ├── mirc │ │ │ ├── index.html │ │ │ └── mirc.js │ │ ├── mllike │ │ │ ├── index.html │ │ │ └── mllike.js │ │ ├── modelica │ │ │ ├── index.html │ │ │ └── modelica.js │ │ ├── mscgen │ │ │ ├── index.html │ │ │ ├── mscgen.js │ │ │ ├── mscgen_test.js │ │ │ ├── msgenny_test.js │ │ │ └── xu_test.js │ │ ├── mumps │ │ │ ├── index.html │ │ │ └── mumps.js │ │ ├── nginx │ │ │ ├── index.html │ │ │ └── nginx.js │ │ ├── nsis │ │ │ ├── index.html │ │ │ └── nsis.js │ │ ├── ntriples │ │ │ ├── index.html │ │ │ └── ntriples.js │ │ ├── octave │ │ │ ├── index.html │ │ │ └── octave.js │ │ ├── oz │ │ │ ├── index.html │ │ │ └── oz.js │ │ ├── pascal │ │ │ ├── index.html │ │ │ └── pascal.js │ │ ├── pegjs │ │ │ ├── index.html │ │ │ └── pegjs.js │ │ ├── perl │ │ │ ├── index.html │ │ │ └── perl.js │ │ ├── php │ │ │ ├── index.html │ │ │ ├── php.js │ │ │ └── test.js │ │ ├── pig │ │ │ ├── index.html │ │ │ └── pig.js │ │ ├── powershell │ │ │ ├── index.html │ │ │ ├── powershell.js │ │ │ └── test.js │ │ ├── properties │ │ │ ├── index.html │ │ │ └── properties.js │ │ ├── protobuf │ │ │ ├── index.html │ │ │ └── protobuf.js │ │ ├── puppet │ │ │ ├── index.html │ │ │ └── puppet.js │ │ ├── python │ │ │ ├── index.html │ │ │ ├── python.js │ │ │ └── test.js │ │ ├── q │ │ │ ├── index.html │ │ │ └── q.js │ │ ├── r │ │ │ ├── index.html │ │ │ └── r.js │ │ ├── rpm │ │ │ ├── changes │ │ │ │ └── index.html │ │ │ ├── index.html │ │ │ └── rpm.js │ │ ├── rst │ │ │ ├── index.html │ │ │ └── rst.js │ │ ├── ruby │ │ │ ├── index.html │ │ │ ├── ruby.js │ │ │ └── test.js │ │ ├── rust │ │ │ ├── index.html │ │ │ ├── rust.js │ │ │ └── test.js │ │ ├── sas │ │ │ ├── index.html │ │ │ └── sas.js │ │ ├── sass │ │ │ ├── index.html │ │ │ └── sass.js │ │ ├── scheme │ │ │ ├── index.html │ │ │ └── scheme.js │ │ ├── shell │ │ │ ├── index.html │ │ │ ├── shell.js │ │ │ └── test.js │ │ ├── sieve │ │ │ ├── index.html │ │ │ └── sieve.js │ │ ├── slim │ │ │ ├── index.html │ │ │ ├── slim.js │ │ │ └── test.js │ │ ├── smalltalk │ │ │ ├── index.html │ │ │ └── smalltalk.js │ │ ├── smarty │ │ │ ├── index.html │ │ │ └── smarty.js │ │ ├── solr │ │ │ ├── index.html │ │ │ └── solr.js │ │ ├── soy │ │ │ ├── index.html │ │ │ └── soy.js │ │ ├── sparql │ │ │ ├── index.html │ │ │ └── sparql.js │ │ ├── spreadsheet │ │ │ ├── index.html │ │ │ └── spreadsheet.js │ │ ├── sql │ │ │ ├── index.html │ │ │ └── sql.js │ │ ├── stex │ │ │ ├── index.html │ │ │ ├── stex.js │ │ │ └── test.js │ │ ├── stylus │ │ │ ├── index.html │ │ │ └── stylus.js │ │ ├── swift │ │ │ ├── index.html │ │ │ └── swift.js │ │ ├── tcl │ │ │ ├── index.html │ │ │ └── tcl.js │ │ ├── textile │ │ │ ├── index.html │ │ │ ├── test.js │ │ │ └── textile.js │ │ ├── tiddlywiki │ │ │ ├── index.html │ │ │ ├── tiddlywiki.css │ │ │ └── tiddlywiki.js │ │ ├── tiki │ │ │ ├── index.html │ │ │ ├── tiki.css │ │ │ └── tiki.js │ │ ├── toml │ │ │ ├── index.html │ │ │ └── toml.js │ │ ├── tornado │ │ │ ├── index.html │ │ │ └── tornado.js │ │ ├── troff │ │ │ ├── index.html │ │ │ └── troff.js │ │ ├── ttcn-cfg │ │ │ ├── index.html │ │ │ └── ttcn-cfg.js │ │ ├── ttcn │ │ │ ├── index.html │ │ │ └── ttcn.js │ │ ├── turtle │ │ │ ├── index.html │ │ │ └── turtle.js │ │ ├── twig │ │ │ ├── index.html │ │ │ └── twig.js │ │ ├── vb │ │ │ ├── index.html │ │ │ └── vb.js │ │ ├── vbscript │ │ │ ├── index.html │ │ │ └── vbscript.js │ │ ├── velocity │ │ │ ├── index.html │ │ │ └── velocity.js │ │ ├── verilog │ │ │ ├── index.html │ │ │ ├── test.js │ │ │ └── verilog.js │ │ ├── vhdl │ │ │ ├── index.html │ │ │ └── vhdl.js │ │ ├── vue │ │ │ ├── index.html │ │ │ └── vue.js │ │ ├── webidl │ │ │ ├── index.html │ │ │ └── webidl.js │ │ ├── xml │ │ │ ├── index.html │ │ │ ├── test.js │ │ │ └── xml.js │ │ ├── xquery │ │ │ ├── index.html │ │ │ ├── test.js │ │ │ └── xquery.js │ │ ├── yacas │ │ │ ├── index.html │ │ │ └── yacas.js │ │ ├── yaml-frontmatter │ │ │ ├── index.html │ │ │ └── yaml-frontmatter.js │ │ ├── yaml │ │ │ ├── index.html │ │ │ └── yaml.js │ │ └── z80 │ │ │ ├── index.html │ │ │ └── z80.js │ ├── package.json │ ├── test │ │ ├── comment_test.js │ │ ├── doc_test.js │ │ ├── driver.js │ │ ├── emacs_test.js │ │ ├── index.html │ │ ├── lint.js │ │ ├── mode_test.css │ │ ├── mode_test.js │ │ ├── multi_test.js │ │ ├── phantom_driver.js │ │ ├── run.js │ │ ├── scroll_test.js │ │ ├── search_test.js │ │ ├── sql-hint-test.js │ │ ├── sublime_test.js │ │ ├── test.js │ │ └── vim_test.js │ └── theme │ │ ├── 3024-day.css │ │ ├── 3024-night.css │ │ ├── abcdef.css │ │ ├── ambiance-mobile.css │ │ ├── ambiance.css │ │ ├── base16-dark.css │ │ ├── base16-light.css │ │ ├── bespin.css │ │ ├── blackboard.css │ │ ├── cobalt.css │ │ ├── colorforth.css │ │ ├── dracula.css │ │ ├── eclipse.css │ │ ├── elegant.css │ │ ├── erlang-dark.css │ │ ├── hopscotch.css │ │ ├── icecoder.css │ │ ├── isotope.css │ │ ├── lesser-dark.css │ │ ├── liquibyte.css │ │ ├── material.css │ │ ├── mbo.css │ │ ├── mdn-like.css │ │ ├── midnight.css │ │ ├── monokai.css │ │ ├── neat.css │ │ ├── neo.css │ │ ├── night.css │ │ ├── panda-syntax.css │ │ ├── paraiso-dark.css │ │ ├── paraiso-light.css │ │ ├── pastel-on-dark.css │ │ ├── railscasts.css │ │ ├── rubyblue.css │ │ ├── seti.css │ │ ├── solarized.css │ │ ├── the-matrix.css │ │ ├── tomorrow-night-bright.css │ │ ├── tomorrow-night-eighties.css │ │ ├── ttcn.css │ │ ├── twilight.css │ │ ├── vibrant-ink.css │ │ ├── xq-dark.css │ │ ├── xq-light.css │ │ ├── yeti.css │ │ └── zenburn.css ├── css │ ├── algospot.css │ ├── chosen.css │ ├── code.css │ ├── colors.css │ ├── jquery-ui.css │ ├── jquery.datatables.css │ ├── jquery.datepicker.css │ ├── jquery.fileinput.css │ ├── jquery.fullcalendar.css │ ├── jquery.nyromodal.css │ ├── jquery.tipsy.css │ ├── jquery.visualize.css │ ├── jquery.wysiwyg.css │ ├── jquery.wysiwyg.in.css │ └── style.css ├── forum-templates │ └── qna.txt ├── images │ ├── banners │ │ ├── codesprint.gif │ │ ├── codesprint2013.png │ │ ├── nexon2014.jpg │ │ ├── nexonintern2014winter.jpg │ │ └── techplanet.jpg │ ├── bg_aside_main.png │ ├── bg_aside_nav.png │ ├── bg_aside_nav_current.png │ ├── bg_aside_userinfo.png │ ├── bg_fixed.png │ ├── bgs │ │ ├── bg_aside_main.png │ │ ├── bg_aside_nav.png │ │ ├── bg_aside_nav_current.png │ │ ├── bg_aside_userinfo.png │ │ ├── bg_fixed.png │ │ ├── bg_sidetab.png │ │ ├── bg_sidetab_nested.png │ │ ├── bg_wizard.png │ │ └── bg_wizard_nested.png │ ├── btns │ │ ├── btn_blue.png │ │ ├── btn_blue_hover.png │ │ ├── btn_gray.png │ │ ├── btn_gray_hover.png │ │ ├── btn_green.png │ │ ├── btn_green_hover.png │ │ ├── btn_red.png │ │ └── btn_red_hover.png │ ├── chosen-sprite.png │ ├── favicon.ico │ ├── gozarani.jpg │ ├── ical.gif │ ├── icons │ │ ├── ajax_loading.gif │ │ ├── ajax_loading_blue.gif │ │ ├── ajax_loading_blue_nested.gif │ │ ├── ajax_loading_green.gif │ │ ├── ajax_loading_green_nested.gif │ │ ├── ajax_loading_nested.gif │ │ ├── ajax_loading_red.gif │ │ ├── ajax_loading_red_nested.gif │ │ ├── emoticon │ │ │ ├── emoticon_8ball.png │ │ │ ├── emoticon_basketball.png │ │ │ ├── emoticon_bomb.png │ │ │ ├── emoticon_bug.png │ │ │ ├── emoticon_confuse.png │ │ │ ├── emoticon_cool.png │ │ │ ├── emoticon_cry.png │ │ │ ├── emoticon_evilgrin.png │ │ │ ├── emoticon_fat.png │ │ │ ├── emoticon_football.png │ │ │ ├── emoticon_golf.png │ │ │ ├── emoticon_grin.png │ │ │ ├── emoticon_happy.png │ │ │ ├── emoticon_heart.png │ │ │ ├── emoticon_mad.png │ │ │ ├── emoticon_neutral.png │ │ │ ├── emoticon_raquet.png │ │ │ ├── emoticon_red.png │ │ │ ├── emoticon_rocket.png │ │ │ ├── emoticon_roll.png │ │ │ ├── emoticon_shuttlecock.png │ │ │ ├── emoticon_slim.png │ │ │ ├── emoticon_smile.png │ │ │ ├── emoticon_soccer.png │ │ │ ├── emoticon_surprised.png │ │ │ ├── emoticon_tennis.png │ │ │ ├── emoticon_tongue.png │ │ │ ├── emoticon_unhappy.png │ │ │ ├── emoticon_waii.png │ │ │ ├── emoticon_wink.png │ │ │ └── emoticon_yell.png │ │ ├── extensions │ │ │ ├── page_access.png │ │ │ ├── page_cplusplus.png │ │ │ ├── page_csharp.png │ │ │ ├── page_cup.png │ │ │ ├── page_database.png │ │ │ ├── page_dvd.png │ │ │ ├── page_excel.png │ │ │ ├── page_film.png │ │ │ ├── page_find.png │ │ │ ├── page_flash.png │ │ │ ├── page_freehand.png │ │ │ ├── page_illustrator.png │ │ │ ├── page_music.png │ │ │ ├── page_office.png │ │ │ ├── page_pdf.png │ │ │ ├── page_photoshop.png │ │ │ ├── page_php.png │ │ │ ├── page_picture.png │ │ │ ├── page_powerpoint.png │ │ │ ├── page_report.png │ │ │ ├── page_ruby.png │ │ │ ├── page_swoosh.png │ │ │ ├── page_text.png │ │ │ ├── page_tux.png │ │ │ ├── page_visualstudio.png │ │ │ ├── page_white.png │ │ │ ├── page_word.png │ │ │ ├── page_wrench.png │ │ │ └── page_zip.png │ │ ├── icon_accordion-hover.png │ │ ├── icon_accordion-hover_nested.png │ │ ├── icon_accordion.png │ │ ├── icon_accordion_nested.png │ │ ├── icon_breadcrumbs.png │ │ ├── icon_breadcrumbs_home.png │ │ ├── icon_calendar.png │ │ ├── icon_error.png │ │ ├── icon_event.png │ │ ├── icon_event_bomb.png │ │ ├── icon_event_log.png │ │ ├── icon_nav_articles.png │ │ ├── icon_nav_dashboard.png │ │ ├── icon_nav_events.png │ │ ├── icon_nav_gallery.png │ │ ├── icon_nav_products.png │ │ ├── icon_nav_projects.png │ │ ├── icon_nav_settings.png │ │ ├── icon_notification_attention.png │ │ ├── icon_notification_error.png │ │ ├── icon_notification_information.png │ │ ├── icon_notification_note.png │ │ ├── icon_notification_success.png │ │ ├── icon_outside_link.png │ │ ├── icon_success.png │ │ ├── icon_tab.png │ │ ├── icon_tab_nested.png │ │ ├── icon_table_delete.png │ │ ├── icon_table_edit.png │ │ ├── icon_table_options.png │ │ ├── icon_table_view.png │ │ ├── list-style │ │ │ ├── icon_list_style.png │ │ │ ├── icon_list_style_arrow.png │ │ │ ├── icon_list_style_checkmark.png │ │ │ └── icon_list_style_cross.png │ │ └── magnifier.png │ ├── jquery │ │ ├── back_disabled.png │ │ ├── back_enabled.png │ │ ├── forward_disabled.png │ │ ├── forward_enabled.png │ │ ├── jquery.wysiwyg.gif │ │ ├── sort_asc.png │ │ ├── sort_asc_disabled.png │ │ ├── sort_both.png │ │ ├── sort_desc.png │ │ ├── sort_desc_disabled.png │ │ ├── tooltip.gif │ │ └── visualize_tooltip.png │ ├── logo.png │ ├── rss.png │ ├── sample_image.jpg │ ├── sample_image_large.jpg │ ├── sample_logo.png │ ├── sample_user.png │ ├── unknown-user.png │ └── widgets │ │ ├── widget_add.png │ │ ├── widget_decrease.png │ │ └── widget_increase.png └── js │ ├── ajaxupload.js │ ├── jquery │ ├── chosen.jquery.min.js │ ├── excanvas.js │ ├── jquery-1.7.2.min.js │ ├── jquery-ui.min.js │ ├── jquery.cookie.js │ ├── jquery.datatables.js │ ├── jquery.datepicker.js │ ├── jquery.fileinput.js │ ├── jquery.fullcalendar.min.js │ ├── jquery.nyromodal.js │ ├── jquery.tipsy.js │ ├── jquery.tools.overlay.min.js │ ├── jquery.visualize.js │ ├── jquery.visualize.tooltip.js │ ├── jquery.wysiwyg.js │ └── superbly-tagfield.min.js │ ├── libs │ ├── modernizr-1.7.min.js │ └── selectivizr.js │ ├── login.js │ ├── script.js │ └── sundown.js ├── templates ├── avatar │ ├── add.html │ └── change.html ├── base.html ├── comment_block.html ├── comment_form.html ├── comments │ └── delete.html ├── markdown_cheatsheet.html ├── pagination.html ├── print_form.html ├── print_non_field_error.html ├── registration │ ├── activate.html │ ├── activation_complete.html │ ├── activation_email.txt │ ├── activation_email_subject.txt │ ├── login.html │ ├── password_reset_complete.html │ ├── password_reset_confirm.html │ ├── password_reset_done.html │ ├── password_reset_email.html │ ├── password_reset_form.html │ ├── registration_base.html │ ├── registration_complete.html │ └── registration_form.html └── search │ ├── indexes │ ├── forum │ │ └── post_text.txt │ ├── judge │ │ ├── page_text.txt │ │ └── problem_text.txt │ └── wiki │ │ └── page_text.txt │ ├── post_snippet.html │ └── search.html └── wiki ├── __init__.py ├── admin.py ├── fixtures └── fixtures.json ├── forms.py ├── migrations ├── 0001_initial.py └── __init__.py ├── models.py ├── search_indexes.py ├── templates ├── detail.html ├── diff.html ├── edit.html ├── history.html ├── old.html ├── wiki-base.html └── wiki-list.html ├── templatetags └── __init__.py ├── tests.py ├── urls.py ├── utils.py └── views.py /.gitignore: -------------------------------------------------------------------------------- 1 | venv 2 | *swp 3 | *.pyc 4 | *.sqlite3 5 | designs 6 | 7 | local_settings.py 8 | 9 | .vagrant 10 | 11 | www/profile_logs 12 | www/media 13 | www/judge/work 14 | www/whoosh_index 15 | 16 | www/judge/tmp 17 | www/judge/lxc.log 18 | 19 | www_static/ 20 | 21 | *.iml 22 | .idea/ 23 | atlassian-ide-plugin.xml 24 | ansible/roles/ 25 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "libs/misaka"] 2 | path = libs/misaka 3 | url = git://github.com/beingryu/misaka.git 4 | [submodule "libs/django-registration"] 5 | path = libs/django-registration 6 | url = https://github.com/macropin/django-registration.git 7 | ignore = dirty 8 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | default: up 2 | 3 | init: 4 | git submodule update --init --recursive 5 | ln -sf www/algospot/local_settings.py.dev www/algospot/local_settings.py 6 | vagrant up 7 | vagrant reload 8 | 9 | ssh: 10 | vagrant ssh 11 | 12 | up: 13 | vagrant up 14 | 15 | halt: 16 | vagrant halt 17 | 18 | # some django commands 19 | 20 | runserver: 21 | vagrant ssh -c 'cd /vagrant/www; ./manage.py runserver 0.0.0.0:8000' 22 | 23 | shell: 24 | vagrant ssh -c 'cd /vagrant/www; ./manage.py shell_plus' 25 | 26 | celeryd-console: 27 | vagrant ssh -c 'cd /vagrant/www; sudo ./manage.py celeryd' 28 | 29 | dbshell: 30 | vagrant ssh -c 'cd /vagrant/www; ./manage.py dbshell' 31 | 32 | collectstatic: 33 | vagrant ssh -c 'cd /vagrant/www; ./manage.py collectstatic --noinput' 34 | 35 | # restart daemons 36 | 37 | restart-celeryd: 38 | vagrant ssh -c 'sudo /etc/init.d/celeryd restart' 39 | 40 | stop-celeryd: 41 | vagrant ssh -c 'sudo /etc/init.d/celeryd stop' 42 | 43 | start-celeryd: 44 | vagrant ssh -c 'sudo /etc/init.d/celeryd start' 45 | 46 | restart-uwsgi: 47 | vagrant ssh -c 'sudo service uwsgi restart' 48 | 49 | restart-nginx: 50 | vagrant ssh -c 'sudo /etc/init.d/nginx restart' 51 | 52 | .PHONY: default up stop halt devserver 53 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! 5 | VAGRANTFILE_API_VERSION = "2" 6 | 7 | Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 8 | config.vm.box = "ubuntu/trusty64" 9 | 10 | config.vm.provision "ansible" do |ansible| 11 | ansible.galaxy_role_file = "ansible/roles.txt" 12 | ansible.playbook = "ansible/dev.playbook" 13 | ansible.verbose = 'v' 14 | end 15 | 16 | config.vm.network "forwarded_port", guest: 80, host: 8080 17 | config.vm.network "forwarded_port", guest: 8000, host: 8000 18 | 19 | config.vm.provider "virtualbox" do |vb| 20 | vb.memory = 1024 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /ansible/chicago.playbook: -------------------------------------------------------------------------------- 1 | # vim: set expandtab ts=2 sw=2 filetype=yaml: 2 | --- 3 | - hosts: all 4 | vars: 5 | home_dir: /algospot 6 | django_dir: /algospot/www 7 | user: algospot 8 | git_branch: chicago 9 | config_name: chicago 10 | remote_user: algospot 11 | roles: 12 | - nodesource.node 13 | tasks: 14 | - name: make home 15 | sudo: yes 16 | file: path={{home_dir}} owner={{user}} group={{user}} state=directory 17 | - name: prepare postfix install 18 | sudo: yes 19 | shell: echo postfix postfix/mailname string algospot.com | debconf-set-selections 20 | - name: prepare postfix install 21 | sudo: yes 22 | shell: echo postfix postfix/main_mailer_type string 'Internet Site' | debconf-set-selections 23 | - name: install apt dependencies 24 | sudo: yes 25 | apt: name={{item}} state=present update_cache=yes 26 | with_items: 27 | - git-core 28 | - postfix 29 | - name: git checkout 30 | git: repo=https://github.com/jongman/algospot.git dest={{home_dir}} version={{git_branch}} 31 | - name: copy local settings 32 | copy: src={{home_dir}}/www/algospot/local_settings.py.{{git_branch}} dest={{home_dir}}/www/algospot/local_settings.py backup=yes 33 | - include: single_box.yml 34 | - name: install are you a human? 35 | sudo: yes 36 | pip: name=are-you-a-human 37 | -------------------------------------------------------------------------------- /ansible/dev.playbook: -------------------------------------------------------------------------------- 1 | # vim: set expandtab ts=2 sw=2 filetype=yaml: 2 | --- 3 | - hosts: all 4 | vars: 5 | home_dir: /vagrant 6 | django_dir: /vagrant/www 7 | user: vagrant 8 | config_name: dev 9 | remote_user: vagrant 10 | roles: 11 | - { role: nodesource.node, sudo: yes } 12 | tasks: 13 | - name: copy grub config (required for LXC) 14 | copy: src=../configs/{{config_name}}/grub dest=/etc/default backup=yes 15 | sudo: yes 16 | - name: update grub config 17 | shell: update-grub 18 | sudo: yes 19 | - name: copy local settings 20 | file: src={{home_dir}}/www/algospot/local_settings.py.dev dest={{home_dir}}/www/algospot/local_settings.py state=link 21 | - include: single_box.yml 22 | -------------------------------------------------------------------------------- /ansible/roles.txt: -------------------------------------------------------------------------------- 1 | nodesource.node 2 | -------------------------------------------------------------------------------- /configs/chicago/celeryd_config: -------------------------------------------------------------------------------- 1 | # Names of nodes to start 2 | # most will only start one node: 3 | CELERYD_NODES="w1" 4 | # but you can also start multiple and configure settings 5 | # for each in CELERYD_OPTS (see `celery multi --help` for examples). 6 | #CELERYD_NODES="worker1 worker2 worker3" 7 | 8 | # Absolute or relative path to the 'celery' command: 9 | CELERY_BIN="/usr/local/bin/celery" 10 | #CELERY_BIN="/virtualenvs/def/bin/celery" 11 | 12 | # App instance to use 13 | # comment out this line if you don't use an app 14 | CELERY_APP="algospot" 15 | # or fully qualified: 16 | #CELERY_APP="proj.tasks:app" 17 | 18 | # Where to chdir at start. 19 | CELERYD_CHDIR="/algospot/www" 20 | 21 | # Extra command-line arguments to the worker 22 | CELERYD_OPTS="--time-limit=300 --concurrency=1" 23 | 24 | # %N will be replaced with the first part of the nodename. 25 | CELERYD_LOG_FILE="/var/log/celery/w1.log" 26 | CELERYD_PID_FILE="/var/run/celery/w1.pid" 27 | 28 | # run celeryd with root so we can use sandboxing. 29 | CELERYD_USER="root" 30 | CELERYD_GROUP="root" 31 | 32 | # this need to be set in order to run things as root 33 | export C_FORCE_ROOT=1 34 | 35 | # If enabled pid and log directories will be created if missing, 36 | # and owned by the userid/group configured. 37 | CELERY_CREATE_DIRS=1 38 | 39 | -------------------------------------------------------------------------------- /configs/chicago/uwsgi.conf: -------------------------------------------------------------------------------- 1 | # simple uWSGI script 2 | 3 | description "uwsgi tiny instance" 4 | start on runlevel [2345] 5 | stop on runlevel [06] 6 | setuid www-data 7 | setgid www-data 8 | respawn 9 | 10 | exec uwsgi --master --processes 2 --die-on-term --socket unix:///tmp/django.sock --ini /etc/uwsgi/apps-enabled/uwsgi.ini 11 | -------------------------------------------------------------------------------- /configs/chicago/uwsgi.ini: -------------------------------------------------------------------------------- 1 | [uwsgi] 2 | chdir = /algospot/www 3 | env = DJANGO_SETTINGS_MODULE=algospot.settings 4 | master = true 5 | processes = 2 6 | module = django.core.handlers.wsgi:WSGIHandler() 7 | socket = /tmp/django.sock 8 | -------------------------------------------------------------------------------- /configs/dev/celeryd_config: -------------------------------------------------------------------------------- 1 | # Names of nodes to start 2 | # most will only start one node: 3 | CELERYD_NODES="w1" 4 | # but you can also start multiple and configure settings 5 | # for each in CELERYD_OPTS (see `celery multi --help` for examples). 6 | #CELERYD_NODES="worker1 worker2 worker3" 7 | 8 | # Absolute or relative path to the 'celery' command: 9 | CELERY_BIN="/usr/local/bin/celery" 10 | #CELERY_BIN="/virtualenvs/def/bin/celery" 11 | 12 | # App instance to use 13 | # comment out this line if you don't use an app 14 | CELERY_APP="algospot" 15 | # or fully qualified: 16 | #CELERY_APP="proj.tasks:app" 17 | 18 | # Where to chdir at start. 19 | CELERYD_CHDIR="/vagrant/www" 20 | 21 | # Extra command-line arguments to the worker 22 | CELERYD_OPTS="--time-limit=300 --concurrency=1" 23 | 24 | # %N will be replaced with the first part of the nodename. 25 | CELERYD_LOG_FILE="/var/log/celery/w1.log" 26 | CELERYD_PID_FILE="/var/run/celery/w1.pid" 27 | 28 | # run celeryd with root so we can use sandboxing. 29 | CELERYD_USER="root" 30 | CELERYD_GROUP="root" 31 | 32 | # this need to be set in order to run things as root 33 | export C_FORCE_ROOT=1 34 | 35 | # If enabled pid and log directories will be created if missing, 36 | # and owned by the userid/group configured. 37 | CELERY_CREATE_DIRS=1 38 | 39 | -------------------------------------------------------------------------------- /configs/dev/grub: -------------------------------------------------------------------------------- 1 | # If you change this file, run 'update-grub' afterwards to update 2 | # /boot/grub/grub.cfg. 3 | # For full documentation of the options in this file, see: 4 | # info -f grub -n 'Simple configuration' 5 | 6 | GRUB_DEFAULT=0 7 | GRUB_HIDDEN_TIMEOUT=0 8 | GRUB_HIDDEN_TIMEOUT_QUIET=true 9 | GRUB_TIMEOUT=0 10 | GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` 11 | GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=tty0" 12 | GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1" 13 | 14 | # Uncomment to enable BadRAM filtering, modify to suit your needs 15 | # This works with Linux (no patch required) and with any kernel that obtains 16 | # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) 17 | #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef" 18 | 19 | # Uncomment to disable graphical terminal (grub-pc only) 20 | #GRUB_TERMINAL=console 21 | 22 | # The resolution used on graphical terminal 23 | # note that you can use only modes which your graphic card supports via VBE 24 | # you can see them in real GRUB with the command `vbeinfo' 25 | #GRUB_GFXMODE=640x480 26 | 27 | # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux 28 | #GRUB_DISABLE_LINUX_UUID=true 29 | 30 | # Uncomment to disable generation of recovery mode menu entries 31 | #GRUB_DISABLE_RECOVERY="true" 32 | 33 | # Uncomment to get a beep at grub start 34 | #GRUB_INIT_TUNE="480 440 1" 35 | -------------------------------------------------------------------------------- /configs/dev/uwsgi.conf: -------------------------------------------------------------------------------- 1 | # simple uWSGI script 2 | 3 | description "uwsgi tiny instance" 4 | start on vagrant-mounted 5 | stop on runlevel [06] 6 | setuid www-data 7 | setgid www-data 8 | respawn 9 | 10 | exec uwsgi --master --processes 2 --die-on-term --ini /etc/uwsgi/apps-enabled/uwsgi.ini 11 | -------------------------------------------------------------------------------- /configs/dev/uwsgi.ini: -------------------------------------------------------------------------------- 1 | [uwsgi] 2 | chdir = /vagrant/www 3 | env = DJANGO_SETTINGS_MODULE=algospot.settings 4 | master = true 5 | processes = 2 6 | module = django.core.handlers.wsgi:WSGIHandler() 7 | socket = /tmp/django.sock 8 | -------------------------------------------------------------------------------- /dev_data/plus.in: -------------------------------------------------------------------------------- 1 | 50 2 | -48 -71 3 | -34 54 4 | 92 -22 5 | 55 53 6 | 28 -72 7 | -32 -69 8 | 96 26 9 | 57 6 10 | -41 51 11 | 96 56 12 | 27 27 13 | -97 -42 14 | 9 -86 15 | -49 -75 16 | 89 46 17 | 52 44 18 | 95 -45 19 | -24 -42 20 | -69 24 21 | -13 -15 22 | 30 -7 23 | 16 -36 24 | 79 24 25 | 47 91 26 | -1 21 27 | -49 4 28 | -31 -95 29 | 66 -12 30 | -3 83 31 | -9 -18 32 | 0 -61 33 | -31 -60 34 | -5 34 35 | -15 -6 36 | -28 32 37 | -90 71 38 | 1 88 39 | -34 -76 40 | 70 40 41 | -53 -65 42 | 95 58 43 | 14 24 44 | 93 -84 45 | -57 78 46 | 93 3 47 | -82 37 48 | -97 -14 49 | 0 100 50 | -89 -58 51 | 18 86 52 | -------------------------------------------------------------------------------- /dev_data/plus.out: -------------------------------------------------------------------------------- 1 | -119 2 | 20 3 | 70 4 | 108 5 | -44 6 | -101 7 | 122 8 | 63 9 | 10 10 | 152 11 | 54 12 | -139 13 | -77 14 | -124 15 | 135 16 | 96 17 | 50 18 | -66 19 | -45 20 | -28 21 | 23 22 | -20 23 | 103 24 | 138 25 | 20 26 | -45 27 | -126 28 | 54 29 | 80 30 | -27 31 | -61 32 | -91 33 | 29 34 | -21 35 | 4 36 | -19 37 | 89 38 | -110 39 | 110 40 | -118 41 | 153 42 | 38 43 | 9 44 | 21 45 | 96 46 | -45 47 | -111 48 | 100 49 | -147 50 | 104 51 | -------------------------------------------------------------------------------- /utils/ical_generator/generate.py: -------------------------------------------------------------------------------- 1 | #!env python 2 | import icalendar 3 | import datetime 4 | import pytz 5 | import urllib2 6 | 7 | CALENDARS = { 8 | '[CF] ': 'https://www.google.com/calendar/ical/br1o1n70iqgrrbc875vcehacjg%40group.calendar.google.com/public/basic.ics', 9 | '[TC] ': 'https://www.google.com/calendar/ical/appirio.com_bhga3musitat85mhdrng9035jg%40group.calendar.google.com/public/basic.ics', 10 | '[GCJ] ': 'https://www.google.com/calendar/ical/google.com_jqv7qt9iifsaj94cuknckrabd8%40group.calendar.google.com/public/basic.ics', 11 | '': 'https://www.google.com/calendar/ical/iqe3kkmf7vltagnjs7fd2sv4a8%40group.calendar.google.com/public/basic.ics' 12 | } 13 | 14 | merged = icalendar.Calendar() 15 | merged.add('PRODID', '-//Algospot Calendar//algospot.com//EN') 16 | merged.add('METHOD', 'PUBLISH') 17 | 18 | thresh = datetime.date.today() + datetime.timedelta(days=-30) 19 | def recent_enough(c): 20 | if 'DTSTART' not in c: return True 21 | dt_start = c['DTSTART'].dt 22 | if isinstance(dt_start, datetime.datetime): 23 | dt_start = dt_start.date() 24 | return dt_start >= thresh 25 | 26 | for prefix, url in CALENDARS.items(): 27 | ics = urllib2.urlopen(url).read() 28 | cal = icalendar.Calendar.from_ical(ics) 29 | for c in cal.subcomponents: 30 | if recent_enough(c) and 'SUMMARY' in c: 31 | c['SUMMARY'] = prefix + c['SUMMARY'] 32 | merged.add_component(c) 33 | 34 | print merged.to_ical() 35 | -------------------------------------------------------------------------------- /www/algospot/TODO.txt: -------------------------------------------------------------------------------- 1 | * news feed 타입 추가: actstream 보다 단순한 그 무언가를 작성해야 할 듯. 타입별로 필터링할 수 있게 하고 싶다. 게시판 알림, 위키 알림, 온라인 저지 알림별로 나눠서도 볼 수 있도록. 2 | * breadcrumb generation 간소화 3 | * breadcrumb 에서 현재 페이지는 링크 안 걸리게 하기 4 | * reindent all source code 5 | * 좋아요 추가하기 6 | * 난이도 평가하기: 상/중/하 셋 중 하나에 투표할 수 있도록 하기 7 | * submission filter 기능.. 아마도 구현? 8 | * 푼사람 수/시도한 사람 수 instead of # submissions 9 | * 위키에 사이트 통합 도움말 시스템 집어넣기. 흠 10 | -------------------------------------------------------------------------------- /www/algospot/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | # This will make sure the app is always imported when 4 | # Django starts so that shared_task will use this app. 5 | from .celery import app as celery_app 6 | -------------------------------------------------------------------------------- /www/algospot/celery.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | import os 4 | 5 | from celery import Celery 6 | 7 | from django.conf import settings 8 | 9 | # set the default Django settings module for the 'celery' program. 10 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'algospot.settings') 11 | 12 | app = Celery('algospot') 13 | 14 | # Using a string here means the worker will not have to 15 | # pickle the object when using Windows. 16 | app.config_from_object('django.conf:settings') 17 | app.autodiscover_tasks(lambda: settings.INSTALLED_APPS) 18 | 19 | -------------------------------------------------------------------------------- /www/algospot/libs/external/diff_match_patch/__init__.py: -------------------------------------------------------------------------------- 1 | from .diff_match_patch import diff_match_patch, patch_obj 2 | 3 | -------------------------------------------------------------------------------- /www/algospot/local_settings.py.chicago: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import settings 4 | 5 | settings.STATIC_ROOT = '/algospot/www_static' 6 | 7 | settings.DATABASES = { 8 | 'default': { 9 | 'ENGINE': 'django.db.backends.postgresql_psycopg2', 10 | 'NAME': 'algospot', 11 | 'USER': 'algospot', 12 | 'PASSWORD': '', 13 | 'HOST': '', 14 | 'PORT': '', 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /www/algospot/local_settings.py.dev: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import settings 4 | 5 | settings.DEBUG = True 6 | settings.STATIC_ROOT = '/vagrant/www_static' 7 | settings.USER_AUTHORIZATION_LIMIT = 0 8 | 9 | # Use a local mysql database 10 | settings.DATABASES = { 11 | 'default': { 12 | 'ENGINE': 'django.db.backends.postgresql_psycopg2', 13 | 'NAME': 'algospot', 14 | 'USER': 'vagrant', 15 | 'PASSWORD': '', 16 | 'HOST': '', 17 | 'PORT': '', 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /www/algospot/local_settings.py.example: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import settings 4 | 5 | settings.DEBUG = True 6 | 7 | settings.DATABASES = { 8 | 'default': { 9 | # TODO: change this into an absolute path if you're running celeryd from 10 | # a separate checkout in the same machine 11 | 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 12 | 'NAME': 'db.sqlite3', # Or path to database file if using sqlite3. 13 | 'USER': '', # Not used with sqlite3. 14 | 'PASSWORD': '', # Not used with sqlite3. 15 | 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 16 | 'PORT': '', # Set to empty string for default. Not used with sqlite3. 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /www/algospot/local_settings.py.jongman: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import settings 4 | 5 | USE_TOOLBAR = False 6 | USE_PROFILING = False 7 | # USE_TOOLBAR = True 8 | 9 | # Use a local mysql database 10 | settings.DATABASES = { 11 | 'default': { 12 | 'ENGINE': 'django.db.backends.postgresql_psycopg2', 13 | 'NAME': 'algospot', 14 | 'USER': 'algospot', 15 | 'PASSWORD': 'prague2004', 16 | 'HOST': '', 17 | 'PORT': '', 18 | } 19 | } 20 | 21 | # Use django debug toolbar 22 | if USE_TOOLBAR: 23 | settings.MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',) 24 | settings.INSTALLED_APPS += ('debug_toolbar',) 25 | 26 | if USE_PROFILING: 27 | settings.PROFILE_LOG_BASE = settings.j("profiled_logs") 28 | 29 | settings.STATIC_ROOT = '/home/jongman/vcs/git/algospot/static/' 30 | # setup ghetto celery queue settings 31 | settings.BROKER_BACKEND = "djkombu.transport.DatabaseTransport" 32 | settings.INSTALLED_APPS += ("djkombu",) 33 | 34 | settings.MEDIA_URL = 'http://127.0.0.1:8000/media/' 35 | -------------------------------------------------------------------------------- /www/algospot/local_settings.py.prod: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import settings 4 | import sys 5 | sys.path.append('/home/algospot/algospot') 6 | sys.path.append('/home/algospot/algospot/www') 7 | 8 | USE_TOOLBAR = False 9 | USE_PROFILING = False 10 | # USE_TOOLBAR = True 11 | 12 | # Use a local mysql database 13 | settings.DATABASES = { 14 | 'default': { 15 | 'ENGINE': 'django.db.backends.postgresql_psycopg2', 16 | 'NAME': 'algospot', 17 | 'USER': 'algospot', 18 | 'PASSWORD': '', 19 | 'HOST': '', 20 | 'PORT': '', 21 | } 22 | } 23 | 24 | # Use django debug toolbar 25 | if USE_TOOLBAR: 26 | settings.MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',) 27 | settings.INSTALLED_APPS += ('debug_toolbar',) 28 | 29 | if USE_PROFILING: 30 | settings.PROFILE_LOG_BASE = settings.j("profiled_logs") 31 | 32 | settings.STATIC_ROOT = '/home/algospot/www_static/' 33 | settings.DEBUG = False 34 | settings.BROKER_URL = "redis://localhost:6379/0" 35 | settings.BROKER_TRANSPORT = 'redis' 36 | settings.MEDIA_URL = "http://algospot.com/media/" 37 | settings.HAYSTACK_WHOOSH_PATH = '/home/algospot/algospot/www/whoosh_index' 38 | settings.EMAIL_PORT = 25 39 | settings.DEFAULT_FROM_EMAIL = 'algospot@algospot.com' 40 | -------------------------------------------------------------------------------- /www/algospot/profile_logs/analyze.sh: -------------------------------------------------------------------------------- 1 | FILE=$1 2 | OUT=$FILE.cachegrind 3 | if [ ! -f $OUT ]; then 4 | hotshot2calltree -o $OUT $FILE 5 | fi 6 | kcachegrind $OUT 7 | 8 | -------------------------------------------------------------------------------- /www/algospot/search_sites.py: -------------------------------------------------------------------------------- 1 | import haystack 2 | haystack.autodiscover() 3 | -------------------------------------------------------------------------------- /www/algospot/server_config/uwsgi.ini: -------------------------------------------------------------------------------- 1 | [uwsgi] 2 | chdir = /vagrant/www 3 | home = /vagrant/www 4 | env = DJANGO_SETTINGS_MODULE=algospot.settings 5 | master = true 6 | processes = 2 7 | module = django.core.handlers.wsgi:WSGIHandler() 8 | socket = /tmp/django.sock 9 | limit-post = 16777216 10 | -------------------------------------------------------------------------------- /www/algospot/update_search_index.sh: -------------------------------------------------------------------------------- 1 | . /home/algospot/.virtualenvs/algospot/bin/activate 2 | cd /home/algospot/algospot/www 3 | ./manage.py update_index --age=2 4 | 5 | -------------------------------------------------------------------------------- /www/base/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/base/__init__.py -------------------------------------------------------------------------------- /www/base/admin.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from django.contrib import admin 3 | from django.contrib.auth.admin import UserAdmin 4 | from django.contrib.auth.models import User 5 | from django.contrib.auth.forms import UserCreationForm, UserChangeForm 6 | from django.utils.translation import ugettext_lazy as _ 7 | 8 | class MyUserCreationForm(UserCreationForm): 9 | username = forms.RegexField( 10 | label = _('username'), 11 | max_length = 30, 12 | regex = ur'^[\w\uac00-\ud7a3.@+-]+$', 13 | help_text = _("Required. 30 characters or fewer. Letters, digits, korean characters and @/./+/-/_ characters."), 14 | error_messages = { 15 | 'invalid': _("This value must contain only letters, digits, korean characters and @/./+/-/_ characters.")}) 16 | 17 | class MyUserChangeForm(UserChangeForm): 18 | username = forms.RegexField( 19 | label = _('username'), 20 | max_length = 30, 21 | regex = ur'^[\w\uac00-\ud7a3.@+-]+$', 22 | help_text = _("Required. 30 characters or fewer. Letters, digits, korean characters and @/./+/-/_ characters."), 23 | error_messages = { 24 | 'invalid': _("This value must contain only letters, digits, korean characters and @/./+/-/_ characters.")}) 25 | 26 | 27 | class MyUserAdmin(UserAdmin): 28 | list_filter = UserAdmin.list_filter + ('groups__name',) 29 | form = MyUserChangeForm 30 | add_form = MyUserCreationForm 31 | 32 | admin.site.unregister(User) 33 | admin.site.register(User, MyUserAdmin) 34 | -------------------------------------------------------------------------------- /www/base/decorators.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django.shortcuts import render 3 | from django.http import HttpResponse 4 | from django.conf import settings 5 | 6 | def authorization_required(func): 7 | def decorated(request, *args, **kwargs): 8 | user = request.user 9 | if not user.is_superuser and not user.get_profile().is_authorized(): 10 | return render(request, "not_authorized.html", 11 | {"limit": settings.USER_AUTHORIZATION_LIMIT, 12 | "limit_days": settings.USER_AUTHORIZATION_LIMIT_DAYS, 13 | "solved": user.get_profile().solved_problems}) 14 | return func(request, *args, **kwargs) 15 | return decorated 16 | 17 | def admin_required(func): 18 | def decorated(request, *args, **kwargs): 19 | user = request.user 20 | if not user.is_superuser: 21 | return HttpResponse('Unauthorized', status=401) 22 | return func(request, *args, **kwargs) 23 | return decorated 24 | -------------------------------------------------------------------------------- /www/base/feeds.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django.contrib.syndication.views import Feed 3 | from django.contrib.auth.models import User 4 | from guardian.conf import settings 5 | from forum.models import Post 6 | from forum.utils import get_posts_for_user 7 | from rendertext import render_text 8 | 9 | class PostFeed(Feed): 10 | title = 'algospot.com posts' 11 | link = '/' 12 | description = u'알고스팟 새 글 목록' 13 | anonymous = User.objects.get(pk=settings.ANONYMOUS_USER_ID) 14 | 15 | def items(self): 16 | return get_posts_for_user(self.anonymous, 'forum.read_post').order_by('-created_on')[:10] 17 | def item_title(self, obj): 18 | return u'[%s] %s' % (obj.category.name, obj.title) 19 | def item_description(self, obj): 20 | return render_text(obj.text) 21 | def item_link(self, obj): 22 | return obj.get_absolute_url() 23 | -------------------------------------------------------------------------------- /www/base/fixtures/group_fixtures.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "fields": { 4 | "name": "everyone", 5 | "permissions": [] 6 | }, 7 | "model": "auth.group", 8 | "pk": 1 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /www/base/fixtures/superuser_fixtures.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "fields": { 4 | "date_joined": "2014-06-05T18:17:37.399", 5 | "email": "admin@algospot.com", 6 | "first_name": "", 7 | "groups": [ 8 | 1 9 | ], 10 | "is_active": true, 11 | "is_staff": true, 12 | "is_superuser": true, 13 | "last_login": "2014-06-05T18:17:37.399", 14 | "last_name": "", 15 | "password": "pbkdf2_sha256$12000$LTK7Co2KJbVG$DhwfW8zmKD4laksGQNvx3HU7ruTbjhBsbgkOLkXbS0o=", 16 | "user_permissions": [], 17 | "username": "admin" 18 | }, 19 | "model": "auth.user", 20 | "pk": 1 21 | } 22 | ] 23 | -------------------------------------------------------------------------------- /www/base/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/base/management/__init__.py -------------------------------------------------------------------------------- /www/base/management/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/base/management/commands/__init__.py -------------------------------------------------------------------------------- /www/base/management/commands/include_everyone.py: -------------------------------------------------------------------------------- 1 | from django.core.management.base import NoArgsCommand 2 | from django.contrib.auth.models import User, Group 3 | 4 | class Command(NoArgsCommand): 5 | def handle(self, **options): 6 | everyone = Group.objects.get(name='everyone') 7 | for x in User.objects.all(): 8 | everyone.user_set.add(x) 9 | -------------------------------------------------------------------------------- /www/base/middlewares.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth import logout 2 | 3 | class ActiveUserMiddleware(object): 4 | def process_request(self, request): 5 | if not request.user.is_authenticated(): 6 | return 7 | 8 | if not request.user.is_active: 9 | logout(request) 10 | -------------------------------------------------------------------------------- /www/base/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/base/migrations/__init__.py -------------------------------------------------------------------------------- /www/base/queries/patch_psql_table.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE guardian_groupobjectpermission ALTER COLUMN object_pk TYPE integer USING (object_pk::integer); 2 | ALTER TABLE guardian_userobjectpermission ALTER COLUMN object_pk TYPE integer USING (object_pk::integer); 3 | -------------------------------------------------------------------------------- /www/base/search_indexes.py: -------------------------------------------------------------------------------- 1 | import datetime 2 | from haystack import indexes 3 | from django.contrib.comments.models import Comment 4 | 5 | class CommentIndex(indexes.SearchIndex, indexes.Indexable): 6 | text = indexes.EdgeNgramField(document=True, model_attr='comment') 7 | date = indexes.DateTimeField(model_attr='submit_date') 8 | 9 | def get_model(self): 10 | return Comment 11 | 12 | def index_queryset(self, using=None): 13 | return self.get_model().objects.filter(submit_date__lte=datetime.datetime.now()) 14 | 15 | def get_updated_field(self): 16 | return 'submit_date' 17 | -------------------------------------------------------------------------------- /www/base/templates/calendar.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block calendar_class %}current{% endblock %} 3 | {% block page_title %}알고스팟 캘린더 {% endblock %} 4 | {% block title %}알고스팟 캘린더 {% endblock %} 5 | {% block page_contents %} 6 |
7 | 8 |
9 | 10 |
11 | 12 |
13 | 14 | 15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /www/base/templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %}알고스팟에 오신 것을 환영합니다!{% endblock %} 3 | {% block page_title %} 4 | 뉴스 5 | - 6 | {{ news.title }} 7 | {% endblock %} 8 | {% block page_contents %} 9 | {% load common_tags %} 10 | {% load avatar_tags %} 11 |
12 | 35 |
36 |
37 |

최근 일어난 일들

38 |
39 |
40 | {% include "newsfeed_block.html" %} 41 |
42 | {% endblock %} 43 | -------------------------------------------------------------------------------- /www/base/templates/not_authorized.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %} Forbidden operation {% endblock %} 3 | 4 | {% block page_title %} 5 | 권한이 없습니다 6 | {% endblock %} 7 | 8 | {% block page_contents %} 9 |
10 |

11 | 정회원 권한이 있어야 편집하실 수 있습니다. 정회원이 되시려면 12 | 온라인 저지에서 {{ limit }}문제 이상을 푸시고, 가입 후 {{ limit_days }}일 이상이 지나셔야 13 | 합니다. 현재 {{ solved }}문제를 푸셨습니다. 14 | 15 | {% comment %} 16 | Go to Online Judge 17 | {% endcomment %} 18 |

19 |
20 | {% endblock %} 21 | 22 | -------------------------------------------------------------------------------- /www/base/templates/settings.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %} 회원 정보 갱신 {% endblock %} 3 | {% block page_title %} {{ settings_user.username }}: 회원 정보 갱신{% endblock %} 4 | {% block page_contents %} 5 | {% load avatar_tags %} 6 |
7 |
8 | {% include "print_non_field_error.html" %} 9 |
10 | {% csrf_token %} 11 |
12 | 회원 정보 갱신 13 |
14 |
15 |
{{ settings_user.username }}
16 |
17 |
18 |
19 |
20 | {% avatar settings_user 120 %} 21 | {% if settings_user == user %} 22 |
23 | Change 24 | {% endif %} 25 |
26 |
27 | {% include "print_form.html" %} 28 |
29 | 30 |
31 |
32 |
33 | 34 | {% endblock %} 35 | -------------------------------------------------------------------------------- /www/base/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/base/templatetags/__init__.py -------------------------------------------------------------------------------- /www/base/templatetags/avatar_custom_tags.py: -------------------------------------------------------------------------------- 1 | from django import template 2 | 3 | register = template.Library() 4 | 5 | @register.filter 6 | def avatar_url(value): 7 | return value.avatar_url(80) 8 | -------------------------------------------------------------------------------- /www/base/tests.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file demonstrates writing tests using the unittest module. These will pass 3 | when you run "manage.py test". 4 | 5 | Replace this with more appropriate tests for your application. 6 | """ 7 | 8 | from django.test import TestCase 9 | 10 | 11 | class SimpleTest(TestCase): 12 | def test_basic_addition(self): 13 | """ 14 | Tests that 1 + 1 always equals 2. 15 | """ 16 | self.assertEqual(1 + 1, 2) 17 | -------------------------------------------------------------------------------- /www/base/urls.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django.conf.urls import patterns, url 3 | import views 4 | urlpatterns = patterns( 5 | 'base.views', 6 | url(r'^profile/(?P.+)$', views.profile, name='user_profile'), 7 | url(r'^username/(?P.+)$', views.profile_by_username, 8 | name='user_username'), 9 | url(r'^settings/(?P.+)$', views.settings, name='user_settings'), 10 | url(r'^list$', views.list_users, name='list_users'), 11 | url(r'^matchup/(?P.+)/(?P.+)/$', views.matchup, name='matchup') 12 | 13 | ) 14 | -------------------------------------------------------------------------------- /www/base/utils.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django.core.urlresolvers import reverse 3 | from django.utils.html import escape 4 | from django.contrib.auth.models import User 5 | 6 | def link_to_user(username, display): 7 | link = reverse("user_username", kwargs={"username": username}) 8 | return u'%s' % (link, 9 | username, 10 | escape(display or username)) 11 | -------------------------------------------------------------------------------- /www/forum/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/forum/__init__.py -------------------------------------------------------------------------------- /www/forum/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from forum.models import Category, Post 3 | from guardian.admin import GuardedModelAdmin 4 | 5 | admin.site.register(Category, GuardedModelAdmin) 6 | admin.site.register(Post, GuardedModelAdmin) 7 | -------------------------------------------------------------------------------- /www/forum/fixtures/fixtures.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "model": "forum.Category", 4 | "pk": 1, 5 | "fields": { "name": "뉴스", "slug": "news" } 6 | }, 7 | { 8 | "model": "forum.Category", 9 | "pk": 2, 10 | "fields": { "name": "자유게시판", "slug": "free" } 11 | }, 12 | { 13 | "model": "forum.Category", 14 | "pk": 3, 15 | "fields": { "name": "질문과 답변", "slug": "qna" } 16 | }, 17 | { 18 | "model": "forum.Category", 19 | "pk": 4, 20 | "fields": { "name": "과거 게시판", "slug": "old" } 21 | }, 22 | { 23 | "model": "forum.Post", 24 | "pk": 1, 25 | "fields": { "title": "환영합니다", "user": 1, "text": "알고스팟 개발을 시작하신 것을 환영합니다!", "category": 1, 26 | "created_on" : "2011-07-16 23:39:20", "modified_on" : "2013-09-04 22:08:00" } 27 | } 28 | ] 29 | 30 | 31 | -------------------------------------------------------------------------------- /www/forum/forms.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django import forms 3 | from models import Post, Category 4 | 5 | class WriteForm(forms.ModelForm): 6 | class Meta: 7 | model = Post 8 | exclude = ('user',) 9 | fields = ('category', 'title', 'text') 10 | def __init__(self, categories, **kwargs): 11 | super(WriteForm, self).__init__(**kwargs) 12 | self.fields['category'].queryset = categories 13 | -------------------------------------------------------------------------------- /www/forum/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/forum/migrations/__init__.py -------------------------------------------------------------------------------- /www/forum/processors.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from models import Category 4 | from utils import get_categories_for_user 5 | 6 | def add_categories(request): 7 | return {"forum_categories": get_categories_for_user(request.user, 'read_post')} 8 | 9 | -------------------------------------------------------------------------------- /www/forum/search_indexes.py: -------------------------------------------------------------------------------- 1 | import datetime 2 | from haystack import indexes 3 | from models import Post 4 | from utils import get_posts_for_user 5 | from guardian.conf import settings 6 | from django.contrib.auth.models import User 7 | 8 | class PostIndex(indexes.SearchIndex, indexes.Indexable): 9 | text = indexes.EdgeNgramField(document=True, use_template=True) 10 | user = indexes.CharField(model_attr='user') 11 | date = indexes.DateTimeField(model_attr='created_on') 12 | anonymous = User.objects.get(pk=settings.ANONYMOUS_USER_ID) 13 | 14 | def get_model(self): 15 | return Post 16 | 17 | def index_queryset(self, using=None): 18 | return get_posts_for_user(self.anonymous, 'forum.read_post').filter(created_on__lte=datetime.datetime.now()) 19 | 20 | def get_updated_field(self): 21 | return 'modified_on' 22 | -------------------------------------------------------------------------------- /www/forum/templates/delete.html: -------------------------------------------------------------------------------- 1 | {% extends "forum-base.html" %} 2 | {% block title %}Really delete?{% endblock %} 3 | {% block page_title %}삭제: {{ post.title }}{% endblock %} 4 | {% block page_contents %} 5 |
6 | {% if category.slug == "qna" %} 7 |
8 |

답을 얻은 질문 글을 지우지 마세요!

9 | 10 |
    11 |
  • 질문 글을 지우시면 답변한 사람이 허무해져요!
  • 12 |
  • 글을 남겨 두면 이후에 같은 답을 찾는 사람들에게 유용한 정보가 됩니다.
  • 13 |
14 | 15 |
16 | {% endif %} 17 |
18 |
19 | 이 글을 정말 삭제하시겠습니까? 20 | {% csrf_token %} 21 |

22 | 혹은 Cancel 23 |

24 |
25 |
26 |
27 | {% endblock %} 28 | -------------------------------------------------------------------------------- /www/forum/templates/forum-base.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block forum_class %}current{% endblock %} 3 | -------------------------------------------------------------------------------- /www/forum/tests.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file demonstrates writing tests using the unittest module. These will pass 3 | when you run "manage.py test". 4 | 5 | Replace this with more appropriate tests for your application. 6 | """ 7 | 8 | from django.test import TestCase 9 | 10 | 11 | class SimpleTest(TestCase): 12 | def test_basic_addition(self): 13 | """ 14 | Tests that 1 + 1 always equals 2. 15 | """ 16 | self.assertEqual(1 + 1, 2) 17 | -------------------------------------------------------------------------------- /www/forum/urls.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django.conf.urls import patterns, url 3 | import views 4 | 5 | urlpatterns = patterns( 6 | 'forum.views', 7 | url(r'^list/(?P[^/]+)/(?P[^/]+)/$', views.list, 8 | name='forum-list'), 9 | url(r'^all/(?P[^/]+)/$', views.all, name='forum-all'), 10 | url(r'^read/(?P[0-9]+)/$', views.read, name="forum-read"), 11 | url(r'^edit/(?P[0-9]+)/$', views.write, name="forum-edit", 12 | kwargs={"slug": None}), 13 | url(r'^write/$', views.write, name="forum-write", kwargs={"id": None}), 14 | url(r'^write/(?P.*)/$', views.write, name="forum-write", kwargs={"id": None}), 15 | url(r'^delete/(?P[0-9]+)/$', views.delete, name="forum-delete"), 16 | url(r'^by_user/(?P[0-9]+)/$', views.by_user, name="forum-byuser"), 17 | url(r'^by_user/(?P[0-9]+)/(?P[0-9]+)/$', views.by_user, name="forum-byuser"), 18 | ) 19 | 20 | -------------------------------------------------------------------------------- /www/forum/utils.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from models import Category, Post 3 | from django.contrib.auth.models import User 4 | from guardian.conf import settings 5 | from guardian.shortcuts import get_objects_for_user 6 | 7 | def get_categories_for_user(request_user, perm): 8 | user = (request_user.is_anonymous() and User.objects.get(pk=settings.ANONYMOUS_USER_ID) or request_user) 9 | categories = get_objects_for_user(user, perm, Category) 10 | return categories 11 | 12 | 13 | def get_posts_for_user(request_user, perm): 14 | posts = Post.objects.filter(category__in=get_categories_for_user(request_user, perm)) 15 | return posts 16 | -------------------------------------------------------------------------------- /www/judge/__init__.py: -------------------------------------------------------------------------------- 1 | import languages 2 | import differs 3 | -------------------------------------------------------------------------------- /www/judge/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from models import Problem 3 | from guardian.admin import GuardedModelAdmin 4 | 5 | admin.site.register(Problem, GuardedModelAdmin) 6 | -------------------------------------------------------------------------------- /www/judge/languages/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import glob 3 | import os 4 | import importlib 5 | import sys 6 | 7 | modules = {} 8 | 9 | # 언어별 채점 모듈을 발견해 봅시다 10 | languages_dir = os.path.dirname(__file__) 11 | sys.path.append(languages_dir) 12 | 13 | files = glob.glob(os.path.join(languages_dir, "*.py")) 14 | for file in files: 15 | try: 16 | language = os.path.basename(file).split(".")[0] 17 | if language == "__init__": continue 18 | mod = importlib.import_module(language) 19 | modules[mod.EXT] = mod 20 | except: 21 | print 'failed to load judge module', file 22 | continue 23 | sys.path.remove(languages_dir) 24 | -------------------------------------------------------------------------------- /www/judge/languages/c11.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | from django.conf import settings 3 | 4 | def system(cmd): 5 | return subprocess.Popen(cmd, stdout=subprocess.PIPE, 6 | stderr=subprocess.PIPE).communicate() 7 | 8 | COMPILE_MEMORY_LIMIT = settings.JUDGE_SETTINGS['MINMEMORYSIZE'] 9 | LANGUAGE = "C11" 10 | EXT = "c" 11 | VERSION = system(["gcc", "--version"])[0].split("\n")[0] 12 | ADDITIONAL_FILES = [] 13 | 14 | def setup(sandbox, source_code): 15 | sandbox.write_file(source_code, "submission.c") 16 | compiled = sandbox.run("gcc -O3 submission.c -pedantic-errors -lm -std=c11", stdout=".stdout", 17 | stderr=".stderr", time_limit=10, 18 | memory_limit=COMPILE_MEMORY_LIMIT) 19 | if compiled.split()[0] != "OK": 20 | return {"status": "error", 21 | "message": sandbox.read_file(".stderr")} 22 | return {"status": "ok"} 23 | 24 | def run(sandbox, input_file, time_limit, memory_limit): 25 | result = sandbox.run("./a.out", stdin=input_file, time_limit=time_limit, 26 | memory_limit=memory_limit, stdout=".stdout", stderr=".stderr") 27 | toks = result.split() 28 | if toks[0] != "OK": 29 | return {"status": "fail", "message": result, "verdict": toks[0] } 30 | return {"status": "ok", "time": toks[1], "memory": toks[2], "output": ".stdout"} 31 | -------------------------------------------------------------------------------- /www/judge/languages/cpp.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | from django.conf import settings 3 | 4 | def system(cmd): 5 | return subprocess.Popen(cmd, stdout=subprocess.PIPE, 6 | stderr=subprocess.PIPE).communicate() 7 | 8 | COMPILE_MEMORY_LIMIT = settings.JUDGE_SETTINGS['MINMEMORYSIZE'] 9 | LANGUAGE = "C++" 10 | EXT = "cpp" 11 | VERSION = system(["g++", "--version"])[0].split("\n")[0] 12 | ADDITIONAL_FILES = [] 13 | 14 | def setup(sandbox, source_code): 15 | sandbox.write_file(source_code, "submission.cpp") 16 | compiled = sandbox.run("g++ -O3 submission.cpp -pedantic-errors --std=c++0x", stdout=".stdout", 17 | stderr=".stderr", time_limit=10, 18 | memory_limit=COMPILE_MEMORY_LIMIT) 19 | if compiled.split()[0] != "OK": 20 | return {"status": "error", 21 | "message": sandbox.read_file(".stderr")} 22 | #sandbox.run("rm submission.cpp .stdin .stderr") 23 | return {"status": "ok"} 24 | 25 | def run(sandbox, input_file, time_limit, memory_limit): 26 | result = sandbox.run("./a.out", stdin=input_file, time_limit=time_limit, 27 | memory_limit=memory_limit, stdout=".stdout", stderr=".stderr") 28 | toks = result.split() 29 | if toks[0] != "OK": 30 | return {"status": "fail", "message": result, "verdict": toks[0] } 31 | return {"status": "ok", "time": toks[1], "memory": toks[2], "output": ".stdout"} 32 | -------------------------------------------------------------------------------- /www/judge/languages/go.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | from django.conf import settings 3 | 4 | def system(cmd): 5 | return subprocess.Popen(cmd, stdout=subprocess.PIPE, 6 | stderr=subprocess.PIPE).communicate() 7 | 8 | COMPILE_MEMORY_LIMIT = settings.JUDGE_SETTINGS['MINMEMORYSIZE'] 9 | LANGUAGE = "Go" 10 | EXT = "go" 11 | VERSION = " ".join(system(["go", "version"])[0].strip().split(" ")[2:]) 12 | ADDITIONAL_FILES = [] 13 | 14 | def setup(sandbox, source_code): 15 | sandbox.write_file(source_code, "submission.go") 16 | compiled = sandbox.run("go build -o a.out submission.go", stdout=".stdout", 17 | stderr=".stderr", time_limit=10, 18 | memory_limit=COMPILE_MEMORY_LIMIT) 19 | if compiled.split()[0] != "OK": 20 | return {"status": "error", 21 | "message": sandbox.read_file(".stderr")} 22 | return {"status": "ok"} 23 | 24 | def run(sandbox, input_file, time_limit, memory_limit): 25 | result = sandbox.run("./a.out", stdin=input_file, time_limit=time_limit, 26 | memory_limit=memory_limit, 27 | stdout=".stdout", stderr=".stderr") 28 | toks = result.split() 29 | if toks[0] != "OK": 30 | return {"status": "fail", "message": result, "verdict": toks[0] } 31 | return {"status": "ok", "time": toks[1], "memory": toks[2], "output": ".stdout"} 32 | -------------------------------------------------------------------------------- /www/judge/languages/hs.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | from django.conf import settings 3 | 4 | def system(cmd): 5 | return subprocess.Popen(cmd, stdout=subprocess.PIPE, 6 | stderr=subprocess.PIPE).communicate() 7 | 8 | COMPILE_MEMORY_LIMIT = settings.JUDGE_SETTINGS['MINMEMORYSIZE'] 9 | LANGUAGE = "Haskell" 10 | EXT = "hs" 11 | VERSION = system(["ghc", "--version"])[0].split("\n")[0] 12 | ADDITIONAL_FILES = [] 13 | 14 | def setup(sandbox, source_code): 15 | sandbox.write_file(source_code, "Main.hs") 16 | compiled = sandbox.run("ghc --make -O2 Main", stdout=".stdout", 17 | stderr=".stderr", time_limit=10, 18 | memory_limit=COMPILE_MEMORY_LIMIT) 19 | if compiled.split()[0] != "OK": 20 | return {"status": "error", 21 | "message": sandbox.read_file(".stderr")} 22 | #sandbox.run("rm submission.cpp .stdin .stderr") 23 | print('haskell setup') 24 | return {"status": "ok"} 25 | 26 | def run(sandbox, input_file, time_limit, memory_limit): 27 | result = sandbox.run("./Main", stdin=input_file, time_limit=time_limit, 28 | memory_limit=memory_limit, 29 | stdout=".stdout", stderr=".stderr") 30 | toks = result.split() 31 | if toks[0] != "OK": 32 | return {"status": "fail", "message": result, "verdict": toks[0] } 33 | print('haskell run') 34 | return {"status": "ok", "time": toks[1], "memory": toks[2], "output": ".stdout"} 35 | -------------------------------------------------------------------------------- /www/judge/languages/lua.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | from django.conf import settings 3 | 4 | def system(cmd): 5 | return subprocess.Popen(cmd, stdout=subprocess.PIPE, 6 | stderr=subprocess.PIPE).communicate() 7 | 8 | COMPILE_MEMORY_LIMIT = settings.JUDGE_SETTINGS['MINMEMORYSIZE'] 9 | LANGUAGE = "LuaJIT" 10 | EXT = "lua" 11 | VERSION = system(["luajit", "-v"])[0].split("\n")[0] 12 | ADDITIONAL_FILES = [] 13 | 14 | def setup(sandbox, source_code): 15 | sandbox.write_file(source_code, "submission.lua") 16 | compiled = sandbox.run("luajit -b submission.lua submission.raw", stdout=".stdout", 17 | stderr=".stderr", time_limit=10, 18 | memory_limit=COMPILE_MEMORY_LIMIT) 19 | if compiled.split()[0] != "OK": 20 | return {"status": "error", 21 | "message": sandbox.read_file(".stderr")} 22 | return {"status": "ok"} 23 | 24 | def run(sandbox, input_file, time_limit, memory_limit): 25 | result = sandbox.run("luajit submission.raw", stdin=input_file, time_limit=time_limit, 26 | memory_limit=memory_limit, 27 | stdout=".stdout", stderr=".stderr") 28 | toks = result.split() 29 | if toks[0] != "OK": 30 | return {"status": "fail", "message": result, "verdict": toks[0] } 31 | return {"status": "ok", "time": toks[1], "memory": toks[2], "output": ".stdout"} 32 | -------------------------------------------------------------------------------- /www/judge/languages/node.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | 3 | def system(cmd): 4 | return subprocess.Popen(cmd, stdout=subprocess.PIPE, 5 | stderr=subprocess.PIPE).communicate() 6 | 7 | LANGUAGE = "Javascript (Node)" 8 | EXT = "js" 9 | VERSION = system(["nodejs", "--version"])[0] 10 | ADDITIONAL_FILES = [] 11 | 12 | def setup(sandbox, source_code): 13 | sandbox.write_file(source_code, "submission.js") 14 | return {"status": "ok"} 15 | 16 | def run(sandbox, input_file, time_limit, memory_limit): 17 | result = sandbox.run("nodejs submission.js", stdin=input_file, time_limit=time_limit, 18 | memory_limit=memory_limit, 19 | stdout=".stdout", stderr=".stderr") 20 | toks = result.split() 21 | if toks[0] != "OK": 22 | return {"status": "fail", "message": result, "verdict": toks[0] } 23 | return {"status": "ok", "time": toks[1], "memory": toks[2], "output": ".stdout"} 24 | -------------------------------------------------------------------------------- /www/judge/languages/py.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | 3 | def system(cmd): 4 | return subprocess.Popen(cmd, stdout=subprocess.PIPE, 5 | stderr=subprocess.PIPE).communicate() 6 | 7 | LANGUAGE = "Python 2" 8 | EXT = "py" 9 | VERSION = system(["python", "--version"])[1].split("\n")[0] 10 | ADDITIONAL_FILES = [] 11 | 12 | def setup(sandbox, source_code): 13 | sandbox.write_file(source_code, "submission.py") 14 | return {"status": "ok"} 15 | 16 | def run(sandbox, input_file, time_limit, memory_limit): 17 | result = sandbox.run("python submission.py", stdin=input_file, time_limit=time_limit, 18 | memory_limit=memory_limit, 19 | stdout=".stdout", stderr=".stderr") 20 | toks = result.split() 21 | if toks[0] != "OK": 22 | return {"status": "fail", "message": result, "verdict": toks[0] } 23 | return {"status": "ok", "time": toks[1], "memory": toks[2], "output": ".stdout"} 24 | -------------------------------------------------------------------------------- /www/judge/languages/py3.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | 3 | def system(cmd): 4 | return subprocess.Popen(cmd, stdout=subprocess.PIPE, 5 | stderr=subprocess.PIPE).communicate() 6 | 7 | LANGUAGE = "Python 3" 8 | EXT = "py3" 9 | VERSION = system(["python3", "--version"])[0].split("\n")[0] 10 | ADDITIONAL_FILES = [] 11 | 12 | 13 | def setup(sandbox, source_code): 14 | sandbox.write_file(source_code, "submission.py") 15 | return {"status": "ok"} 16 | 17 | def run(sandbox, input_file, time_limit, memory_limit): 18 | result = sandbox.run("python3 submission.py", stdin=input_file, time_limit=time_limit, 19 | memory_limit=memory_limit, 20 | stdout=".stdout", stderr=".stderr") 21 | toks = result.split() 22 | if toks[0] != "OK": 23 | return {"status": "fail", "message": result, "verdict": toks[0] } 24 | return {"status": "ok", "time": toks[1], "memory": toks[2], "output": ".stdout"} 25 | -------------------------------------------------------------------------------- /www/judge/languages/pypy.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | 3 | def system(cmd): 4 | return subprocess.Popen(cmd, stdout=subprocess.PIPE, 5 | stderr=subprocess.PIPE).communicate() 6 | 7 | LANGUAGE = "Python 2 (PyPy)" 8 | EXT = "pypy" 9 | VERSION = system(["pypy", "-V"])[1].split("\n")[1] 10 | ADDITIONAL_FILES = [] 11 | 12 | def setup(sandbox, source_code): 13 | sandbox.write_file(source_code, "submission.py") 14 | return {"status": "ok"} 15 | 16 | def run(sandbox, input_file, time_limit, memory_limit): 17 | result = sandbox.run("pypy submission.py", stdin=input_file, time_limit=time_limit, 18 | memory_limit=memory_limit, 19 | stdout=".stdout", stderr=".stderr") 20 | toks = result.split() 21 | if toks[0] != "OK": 22 | return {"status": "fail", "message": result, "verdict": toks[0] } 23 | return {"status": "ok", "time": toks[1], "memory": toks[2], "output": ".stdout"} 24 | -------------------------------------------------------------------------------- /www/judge/languages/rb.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | 3 | def system(cmd): 4 | return subprocess.Popen(cmd, stdout=subprocess.PIPE, 5 | stderr=subprocess.PIPE).communicate() 6 | 7 | LANGUAGE = "Ruby" 8 | EXT = "rb" 9 | INTERP = "ruby" 10 | VERSION = system([INTERP, "--version"])[0] 11 | ADDITIONAL_FILES = [] 12 | 13 | def setup(sandbox, source_code): 14 | sandbox.write_file(source_code, "submission.rb") 15 | return {"status": "ok"} 16 | 17 | def run(sandbox, input_file, time_limit, memory_limit): 18 | result = sandbox.run(INTERP + " submission.rb", stdin=input_file, time_limit=time_limit, 19 | memory_limit=memory_limit, 20 | stdout=".stdout", stderr=".stderr") 21 | toks = result.split() 22 | if toks[0] != "OK": 23 | return {"status": "fail", "message": result, "verdict": toks[0] } 24 | return {"status": "ok", "time": toks[1], "memory": toks[2], "output": ".stdout"} 25 | -------------------------------------------------------------------------------- /www/judge/languages/rust.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | from django.conf import settings 3 | 4 | def system(cmd): 5 | return subprocess.Popen(cmd, stdout=subprocess.PIPE, 6 | stderr=subprocess.PIPE).communicate() 7 | 8 | COMPILE_MEMORY_LIMIT = settings.JUDGE_SETTINGS['MINMEMORYSIZE'] 9 | LANGUAGE = "Rust" 10 | EXT = "rs" 11 | VERSION = system(["rustc", "--version"])[0].split("\n")[0] 12 | ADDITIONAL_FILES = [] 13 | 14 | def setup(sandbox, source_code): 15 | sandbox.write_file(source_code, "submission.rs") 16 | compiled = sandbox.run("rustc -O submission.rs -o a.out", 17 | stdout=".stdout", 18 | stderr=".stderr", 19 | time_limit=10, 20 | memory_limit=COMPILE_MEMORY_LIMIT) 21 | if compiled.split()[0] != "OK": 22 | return {"status": "error", 23 | "message": sandbox.read_file(".stderr")} 24 | #sandbox.run("rm submission.cpp .stdin .stderr") 25 | return {"status": "ok"} 26 | 27 | def run(sandbox, input_file, time_limit, memory_limit): 28 | result = sandbox.run("./a.out", stdin=input_file, 29 | time_limit=time_limit, 30 | memory_limit=memory_limit, 31 | stdout=".stdout", 32 | stderr=".stderr") 33 | toks = result.split() 34 | if toks[0] != "OK": 35 | return {"status": "fail", "message": result, "verdict": toks[0] } 36 | return {"status": "ok", "time": toks[1], "memory": toks[2], "output": ".stdout"} 37 | -------------------------------------------------------------------------------- /www/judge/languages/scala.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | from django.conf import settings 3 | 4 | def system(cmd): 5 | return subprocess.Popen(cmd, stdout=subprocess.PIPE, 6 | stderr=subprocess.PIPE).communicate() 7 | 8 | COMPILE_MEMORY_LIMIT = settings.JUDGE_SETTINGS['MINMEMORYSIZE'] 9 | LANGUAGE = "Scala" 10 | EXT = "scala" 11 | VERSION = system(["scala", "-version"])[1].split("\n")[0] 12 | ADDITIONAL_FILES = [] 13 | 14 | def setup(sandbox, source_code): 15 | sandbox.write_file(source_code, "Main.scala") 16 | compiled = sandbox.run("scalac -optimise Main.scala", stdout=".stdout", 17 | stderr=".stderr", time_limit=30, 18 | memory_limit=COMPILE_MEMORY_LIMIT) 19 | if compiled.split()[0] != "OK": 20 | return {"status": "error", 21 | "message": ("MONITOR:\n" + compiled + "\n" + 22 | "STDERR:\n" + sandbox.read_file(".stderr") + "\n" + 23 | "STDOUT:\n" + sandbox.read_file(".stdout"))} 24 | return {"status": "ok"} 25 | 26 | def run(sandbox, input_file, time_limit, memory_limit): 27 | result = sandbox.run("scala Main", stdin=input_file, time_limit=time_limit, 28 | memory_limit=memory_limit, 29 | stdout=".stdout", stderr=".stderr") 30 | toks = result.split() 31 | if toks[0] != "OK": 32 | return {"status": "fail", "message": result, "verdict": toks[0] } 33 | return {"status": "ok", "time": toks[1], "memory": toks[2], "output": ".stdout"} 34 | -------------------------------------------------------------------------------- /www/judge/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/judge/management/__init__.py -------------------------------------------------------------------------------- /www/judge/management/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/judge/management/commands/__init__.py -------------------------------------------------------------------------------- /www/judge/management/commands/problems_set_permission.py: -------------------------------------------------------------------------------- 1 | from django.core.management.base import NoArgsCommand 2 | from django.contrib.auth.models import User, Group 3 | from judge.models import Problem 4 | from guardian.conf import settings 5 | from guardian.shortcuts import assign_perm 6 | 7 | class Command(NoArgsCommand): 8 | def handle(self, **options): 9 | for x in Problem.objects.all(): 10 | assign_perm('judge.edit_problem', x.user, x) 11 | -------------------------------------------------------------------------------- /www/judge/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/judge/migrations/__init__.py -------------------------------------------------------------------------------- /www/judge/search_indexes.py: -------------------------------------------------------------------------------- 1 | from haystack import indexes 2 | from models import Problem 3 | 4 | class ProblemIndex(indexes.SearchIndex, indexes.Indexable): 5 | text = indexes.EdgeNgramField(document=True, use_template=True) 6 | # date = indexes.DateTimeField(model_attr='updated_on') 7 | 8 | def get_model(self): 9 | return Problem 10 | 11 | def index_queryset(self, using=None): 12 | return self.get_model().objects.filter(state=Problem.PUBLISHED) 13 | 14 | def get_updated_field(self): 15 | return None 16 | -------------------------------------------------------------------------------- /www/judge/templates/judge-base.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block judge_class %}current{% endblock %} 3 | -------------------------------------------------------------------------------- /www/judge/templates/problem/done.html: -------------------------------------------------------------------------------- 1 | {% extends "judge-base.html" %} 2 | {% load common_tags %} 3 | {% block title %} 4 | {{ title }} 5 | {% endblock %} 6 | 7 | 8 | {% block page_title %} 9 | {{ title }} 10 | {% endblock %} 11 | {% block page_tabs %} 12 | {% endblock %} 13 | {% block judge_random_class %}current{% endblock %} 14 | {% block page_contents %} 15 | {% load judge_tags %} 16 | {% load common_tags %} 17 |
18 |

축하합니다!

19 |

20 | 귀하는 알고스팟의 모든 문제를 풀었습니다. 21 |

22 | 23 |
24 | {% endblock %} 25 | 26 | -------------------------------------------------------------------------------- /www/judge/templates/problem/goto_fail.html: -------------------------------------------------------------------------------- 1 | {% extends "judge-base.html" %} 2 | {% load common_tags %} 3 | 4 | {% block judge_problem_read_class %}current{% endblock %} 5 | {% block title %} {{ slug }} {% endblock %} 6 | {% block page_title %} {{ slug }} {% endblock %} 7 | 8 | {% block page_contents %} 9 | 해당 문제가 없습니다. 10 | {% endblock %} 11 | {% block other_blocks %} 12 | {% endblock %} 13 | -------------------------------------------------------------------------------- /www/judge/templates/problem/latexify.tex: -------------------------------------------------------------------------------- 1 | {% load common_tags %}\begin{problem}{% templatetag openbrace %}{{ problem.name }}{% templatetag closebrace %}{Standard Input}{Standard Output} 2 | 3 | {{ revision.description|render_latex }} 4 | 5 | \InputFile 6 | 7 | {{ revision.input|render_latex }} 8 | 9 | \OutputFile 10 | 11 | {{ revision.output|render_latex }} 12 | 13 | \Example 14 | 15 | \begin{example} 16 | \exmp{ 17 | {{ revision.sample_input|safe_latex }} 18 | }{ 19 | {{ revision.sample_output|safe_latex }} 20 | }\end{example} 21 | 22 | \Notes 23 | 24 | {{ revision.note|render_latex }} 25 | 26 | \end{problem} 27 | -------------------------------------------------------------------------------- /www/judge/templates/problem/old.html: -------------------------------------------------------------------------------- 1 | {% extends "problem/problem-base.html" %} 2 | {% load common_tags %} 3 | 4 | {% block judge_problem_history_class %}current{% endblock %} 5 | {% block judge_author_class %}current{% endblock %} 6 | {% block judge_problem_class %}{% endblock %} 7 | 8 | {% block page_title %} 9 | History: {{ problem.slug }}@{{ revision.id }} 10 | {% endblock %} 11 | 12 | {% block page_contents %} 13 | {% load judge_tags %} 14 |
15 |

제한

16 |

17 |

    18 |
  • 시간 제한: {{ revision.time_limit }}ms
  • 19 |
  • 메모리 제한: {{ revision.memory_limit }}kb
  • 20 |
21 |

22 |
23 |
24 |

문제

25 |

26 | {{ revision.description|render_text }} 27 |

28 |
29 |
30 |

입력

31 |

32 | {{ revision.input|render_text }} 33 |

34 |
35 |
36 |

출력

37 |

38 | {{ revision.output|render_text }} 39 |

40 |
41 |
42 |

예제 입력

43 |
{{ revision.sample_input }}
44 |
45 |
46 |

예제 출력

47 |
{{ revision.sample_output }}
48 |
49 |
50 |

노트

51 |

52 | {{ revision.note|render_text }} 53 |

54 |
55 | {% endblock %} 56 | -------------------------------------------------------------------------------- /www/judge/templates/problem/problem-base.html: -------------------------------------------------------------------------------- 1 | {% extends "judge-base.html" %} 2 | {% load common_tags %} 3 | {% block title %} 4 | {{ problem.slug }} 5 | {% endblock %} 6 | 7 | {% block judge_problem_class %}current{% endblock %} 8 | 9 | {% block page_title %} 10 | {{ problem.name }} 11 | {% endblock %} 12 | 13 | {% block page_tabs %} 14 | 45 | {% endblock %} 46 | -------------------------------------------------------------------------------- /www/judge/templates/problem/read.html: -------------------------------------------------------------------------------- 1 | {% extends "problem/problem-base.html" %} 2 | {% load common_tags %} 3 | 4 | 5 | {% block judge_problem_read_class %}current{% endblock %} 6 | {% block judge_problem_class %}current{% endblock %} 7 | 8 | {% block page_contents %} 9 | {% load judge_tags %} 10 | {% include "problem/info_block.html" %} 11 |
12 |

문제

13 |

14 | {{ revision.description|render_text }} 15 |

16 |
17 |
18 |

입력

19 |

20 | {{ revision.input|render_text }} 21 |

22 |
23 |
24 |

출력

25 |

26 | {{ revision.output|render_text }} 27 |

28 |
29 |
30 |

예제 입력

31 |
{{ revision.sample_input }}
32 |
33 |
34 |

예제 출력

35 |
{{ revision.sample_output }}
36 |
37 |
38 |

노트

39 |

40 | {{ revision.note|render_text }} 41 |

42 |
43 | {% endblock %} 44 | {% block other_blocks %} 45 | {% with commentobject=problem hide_comments=1 %} 46 | {% include "comment_block.html" %} 47 | {% endwith %} 48 | {% endblock %} 49 | -------------------------------------------------------------------------------- /www/judge/templates/submission/list-base.html: -------------------------------------------------------------------------------- 1 | {% extends "judge-base.html" %} 2 | {% load common_tags %} 3 | {% block title %} 4 | {{ title }} 5 | {% endblock %} 6 | 7 | 8 | {% block page_title %} 9 | {{ title }} 10 | {% endblock %} 11 | 12 | {% block page_tabs %} 13 | {% endblock %} 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /www/judge/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/judge/templatetags/__init__.py -------------------------------------------------------------------------------- /www/judge/templatetags/judge_tags.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django import template 3 | from ..models import Submission 4 | from base.models import UserProfile 5 | 6 | register = template.Library() 7 | 8 | class HasSolvedNode(template.Node): 9 | def __init__(self, problem, user, result): 10 | self.problem = template.Variable(problem) 11 | self.user = template.Variable(user) 12 | self.result = result 13 | def render(self, context): 14 | problem = self.problem.resolve(context) 15 | user = self.user.resolve(context) 16 | ret = (user.is_authenticated() and 17 | Submission.objects.filter(problem=problem, user=user, 18 | state=Submission.ACCEPTED).count() > 0) 19 | context[self.result] = ret 20 | return "" 21 | 22 | @register.tag 23 | def get_has_solved(parser, token): 24 | toks = token.split_contents() 25 | problem, by, user, as_, solved = toks[1:] 26 | return HasSolvedNode(problem, user, solved) 27 | 28 | @register.filter 29 | def print_length(length): 30 | if length < 1024: return "%dB" % length 31 | return "%.1lfKB" % (length / 1024.) 32 | 33 | @register.filter 34 | def user_rank(profile): 35 | qs = UserProfile.objects.filter(solved_problems__gt=profile.solved_problems) 36 | return str(qs.count() + 1) 37 | 38 | -------------------------------------------------------------------------------- /www/judge/tests.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file demonstrates writing tests using the unittest module. These will pass 3 | when you run "manage.py test". 4 | 5 | Replace this with more appropriate tests for your application. 6 | """ 7 | 8 | from django.test import TestCase 9 | 10 | 11 | class SimpleTest(TestCase): 12 | def test_basic_addition(self): 13 | """ 14 | Tests that 1 + 1 always equals 2. 15 | """ 16 | self.assertEqual(1 + 1, 2) 17 | -------------------------------------------------------------------------------- /www/judge/utils.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django.core.urlresolvers import reverse 3 | from django.utils.html import escape 4 | from models import Problem 5 | 6 | def link_to_problem(slug, display): 7 | problem = Problem.objects.get(slug=slug) 8 | link = reverse("judge-problem-read", kwargs={"slug": slug}) 9 | return u'%s' % (link, problem.name, escape(display or slug)) 10 | -------------------------------------------------------------------------------- /www/judge/views/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django.shortcuts import render 3 | from django.db.models import Count 4 | from djangoutils import setup_paginator 5 | from base.models import UserProfile 6 | from django.shortcuts import redirect 7 | from django.core.urlresolvers import reverse 8 | import problem, submission 9 | 10 | def index(request): 11 | return redirect(reverse('judge-problem-list')) 12 | 13 | def ranking(request, page=1): 14 | profiles = UserProfile.objects.filter(submissions__gt=0) 15 | profiles = profiles.annotate(Count('user__problem')) 16 | profiles = profiles.extra(select={'ratio': '1.0 * accepted / submissions'}) 17 | order_by = request.GET.get('order_by', 'solved') 18 | order_by_translate = {'solved': '-solved_problems', 19 | 'authored': '-user__problem__count', 20 | 'ratio': '-ratio'} 21 | profiles = profiles.order_by(order_by_translate[order_by]) 22 | 23 | return render(request, "ranking.html", 24 | {"title": u'사용자 랭킹', 25 | "pagination": setup_paginator(profiles, page, 26 | "judge-ranking", 27 | {}, request.GET)}) 28 | 29 | 30 | -------------------------------------------------------------------------------- /www/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os, sys 3 | 4 | if __name__ == "__main__": 5 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "algospot.settings") 6 | 7 | from django.core.management import execute_from_command_line 8 | 9 | execute_from_command_line(sys.argv) 10 | -------------------------------------------------------------------------------- /www/newsfeed/__init__.py: -------------------------------------------------------------------------------- 1 | from interface import publish, depublish, depublish_where 2 | from interface import has_activity, get_activity 3 | -------------------------------------------------------------------------------- /www/newsfeed/config.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | -------------------------------------------------------------------------------- /www/newsfeed/interface.py: -------------------------------------------------------------------------------- 1 | from models import Activity 2 | from django.contrib.auth.models import User, Group 3 | from guardian.conf import settings 4 | from guardian.shortcuts import assign_perm, get_users_with_perms 5 | 6 | def publish(key, category, type, visible_users=None, visible_groups=None, **kwargs): 7 | new_activity = Activity.new(key=key, category=category, type=type, **kwargs) 8 | new_activity.save() 9 | 10 | if visible_users is None and visible_groups is None: 11 | anonymous = User.objects.get(pk=settings.ANONYMOUS_USER_ID) 12 | everyone = Group.objects.get(name='everyone') 13 | assign_perm('newsfeed.read_activity', anonymous, new_activity) 14 | assign_perm('newsfeed.read_activity', everyone, new_activity) 15 | else: 16 | for user in visible_users: 17 | assign_perm('newsfeed.read_activity', user, new_activity) 18 | for group in visible_groups: 19 | assign_perm('newsfeed.read_activity', group, new_activity) 20 | return new_activity 21 | 22 | def depublish(key): 23 | Activity.objects.filter(key=key).delete() 24 | 25 | def depublish_where(**kwargs): 26 | Activity.delete_all(**kwargs) 27 | 28 | def has_activity(**kwargs): 29 | return Activity.objects.filter(**Activity.translate(kwargs)).count() > 0 30 | 31 | def get_activity(**kwargs): 32 | return Activity.objects.get(**Activity.translate(kwargs)) 33 | -------------------------------------------------------------------------------- /www/newsfeed/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/newsfeed/management/__init__.py -------------------------------------------------------------------------------- /www/newsfeed/management/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/newsfeed/management/commands/__init__.py -------------------------------------------------------------------------------- /www/newsfeed/management/commands/activities_set_permissions.py: -------------------------------------------------------------------------------- 1 | from django.core.management.base import NoArgsCommand 2 | from django.contrib.auth.models import User, Group 3 | from newsfeed.models import Activity 4 | from guardian.conf import settings 5 | from guardian.shortcuts import assign_perm 6 | 7 | class Command(NoArgsCommand): 8 | def handle(self, **options): 9 | everyone = Group.objects.get(name='everyone') 10 | anonymous = User.objects.get(pk=settings.ANONYMOUS_USER_ID) 11 | 12 | for x in Activity.objects.all(): 13 | if not x.admin_only: 14 | assign_perm('newsfeed.read_activity', anonymous, x) 15 | assign_perm('newsfeed.read_activity', everyone, x) 16 | 17 | -------------------------------------------------------------------------------- /www/newsfeed/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import datetime 3 | from south.db import db 4 | from south.v2 import SchemaMigration 5 | from django.db import models 6 | 7 | class Migration(SchemaMigration): 8 | 9 | def forwards(self, orm): 10 | pass 11 | 12 | 13 | def backwards(self, orm): 14 | pass 15 | 16 | 17 | models = { 18 | 19 | } 20 | 21 | complete_apps = ['newsfeed'] 22 | -------------------------------------------------------------------------------- /www/newsfeed/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/newsfeed/migrations/__init__.py -------------------------------------------------------------------------------- /www/newsfeed/templates/newsfeed.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %} 3 | 뉴스 피드 4 | {% endblock %} 5 | {% block page_title %} 6 | 뉴스 피드 7 | {% endblock %} 8 | {% block newsfeed_class %}current{% endblock %} 9 | {% block page_contents %} 10 | 11 |
12 | {% with actions=pagination.page.object_list %} 13 | {% include "newsfeed_block.html" %} 14 | {% endwith %} 15 |
16 |
17 | {{ pagination.render }} 18 |
19 | {% endblock %} 20 | 21 | -------------------------------------------------------------------------------- /www/newsfeed/templates/newsfeed_block.html: -------------------------------------------------------------------------------- 1 | {% load avatar_tags %} 2 | {% load common_tags %} 3 | {% load newsfeed_tags %} 4 |
    5 | {% for author, actions in actions|aggregate_by_user %} 6 |
  • 7 |
    8 |
    9 | {% avatar author 45 %}
    10 | {{ author|print_username }} 11 |
    12 |
    13 |
      14 | {% for action in actions %} 15 |
    • 16 | {{ action.timestamp|print_datetime }} 17 |

      18 | {% render_activity activity=action user=user %} 19 |

      20 |
    • 21 | {% endfor %} 22 |
    23 |
    24 |
    25 |
  • 26 | {% endfor %} 27 |
28 | 29 | -------------------------------------------------------------------------------- /www/newsfeed/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/newsfeed/templatetags/__init__.py -------------------------------------------------------------------------------- /www/newsfeed/templatetags/newsfeed_tags.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django import template 3 | from django.contrib.comments.models import Comment 4 | from guardian.shortcuts import get_perms 5 | from judge.models import Problem, Solver 6 | 7 | register = template.Library() 8 | 9 | @register.filter 10 | def aggregate_by_user(page): 11 | # aggregate by actor 12 | aggregated = [] 13 | for action in page: 14 | if not aggregated or aggregated[-1][0] != action.actor: 15 | aggregated.append((action.actor, [])) 16 | aggregated[-1][1].append(action) 17 | return aggregated 18 | 19 | @register.simple_tag 20 | def render_activity(*args, **kwargs): 21 | activity = kwargs['activity'] 22 | user = kwargs['user'] 23 | 24 | hide_spoiler = False 25 | if isinstance(activity.action_object, Comment): 26 | if "" in activity.action_object.comment: 27 | hide_spoiler = True 28 | if isinstance(activity.target, Problem): 29 | hide_spoiler = True 30 | if not user.is_anonymous() and Solver.objects.filter(problem=activity.target, solved=True, user=user).exists(): 31 | hide_spoiler = False 32 | elif get_perms(user, activity.target): # read and/or edit 33 | hide_spoiler = False 34 | return activity.render(spoiler_replacement=u"[스포일러 방지를 위해 보이지 않습니다]" if hide_spoiler else None) 35 | -------------------------------------------------------------------------------- /www/newsfeed/tests.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file demonstrates writing tests using the unittest module. These will pass 3 | when you run "manage.py test". 4 | 5 | Replace this with more appropriate tests for your application. 6 | """ 7 | 8 | from django.test import TestCase 9 | 10 | 11 | class SimpleTest(TestCase): 12 | def test_basic_addition(self): 13 | """ 14 | Tests that 1 + 1 always equals 2. 15 | """ 16 | self.assertEqual(1 + 1, 2) 17 | -------------------------------------------------------------------------------- /www/newsfeed/urls.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django.conf.urls import patterns, url 3 | import views 4 | urlpatterns = patterns( 5 | 'newsfeed.views', 6 | url(r'^$', views.stream, name='newsfeed'), 7 | url(r'^(?P[0-9]+)/$', views.stream, name='newsfeed'), 8 | url(r'^user/(?P[0-9]+)$', views.by_user, name='newsfeed-byuser'), 9 | url(r'^user/(?P[0-9]+)/(?P[0-9]+)/$', views.by_user, name='newsfeed-byuser'), 10 | url(r'^filter/(?P[0-9]+)/(?P[a-z]+)/$', views.filter, 11 | name='newsfeed-filter'), 12 | url(r'^filter/(?P[0-9]+)/(?P[a-z]+)/(?P[0-9]+)/$', 13 | views.filter, name='newsfeed-filter'), 14 | ) 15 | 16 | -------------------------------------------------------------------------------- /www/newsfeed/views.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django.shortcuts import render, get_object_or_404 3 | from djangoutils import setup_paginator, profile 4 | from models import Activity 5 | from utils import get_activities_for_user 6 | from django.contrib.auth.models import User 7 | 8 | @profile("newsfeed_stream") 9 | def stream(request, page="1"): 10 | actions = get_activities_for_user(request.user).exclude(category='solved').order_by("-timestamp") 11 | print actions.query 12 | 13 | return render(request, "newsfeed.html", 14 | {"pagination": setup_paginator(actions, page, "newsfeed", {})}) 15 | 16 | def by_user(request, id, page="1"): 17 | user = get_object_or_404(User, id=id) 18 | actions = get_activities_for_user(request.user).filter(actor=user).order_by("-timestamp") 19 | 20 | return render(request, "newsfeed.html", 21 | {"pagination": setup_paginator(actions, page, 22 | "newsfeed-byuser", {'id': id})}) 23 | 24 | def filter(request, id, type, page="1"): 25 | user = get_object_or_404(User, id=id) 26 | actions = get_activities_for_user(request.user).filter(actor=user, type=type).order_by("-timestamp") 27 | pagination = setup_paginator(actions, page, "newsfeed-filter", {'id': id, 'type': type}) 28 | return render(request, "newsfeed.html", {"pagination": pagination}) 29 | -------------------------------------------------------------------------------- /www/static/codemirror/.gitattributes: -------------------------------------------------------------------------------- 1 | *.txt text 2 | *.js text 3 | *.html text 4 | *.md text 5 | *.json text 6 | *.yml text 7 | *.css text 8 | *.svg text 9 | -------------------------------------------------------------------------------- /www/static/codemirror/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /npm-debug.log 3 | /test*.html 4 | .tern-* 5 | *~ 6 | *.swp 7 | .idea 8 | *.iml 9 | -------------------------------------------------------------------------------- /www/static/codemirror/.npmignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /demo 3 | /doc 4 | /test 5 | /test*.html 6 | /index.html 7 | /mode/*/*test.js 8 | /mode/*/*.html 9 | /mode/index.html 10 | .* 11 | -------------------------------------------------------------------------------- /www/static/codemirror/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - stable 4 | sudo: false 5 | -------------------------------------------------------------------------------- /www/static/codemirror/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2016 by Marijn Haverbeke and others 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /www/static/codemirror/README.md: -------------------------------------------------------------------------------- 1 | # CodeMirror 2 | [![Build Status](https://travis-ci.org/codemirror/CodeMirror.svg)](https://travis-ci.org/codemirror/CodeMirror) 3 | [![NPM version](https://img.shields.io/npm/v/codemirror.svg)](https://www.npmjs.org/package/codemirror) 4 | [![Join the chat at https://gitter.im/codemirror/CodeMirror](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/codemirror/CodeMirror) 5 | [Funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png?again)](https://marijnhaverbeke.nl/fund/) 6 | 7 | CodeMirror is a versatile text editor implemented in JavaScript for 8 | the browser. It is specialized for editing code, and comes with over 9 | 100 language modes and various addons that implement more advanced 10 | editing functionality. 11 | 12 | A rich programming API and a CSS theming system are available for 13 | customizing CodeMirror to fit your application, and extending it with 14 | new functionality. 15 | 16 | You can find more information (and the 17 | [manual](http://codemirror.net/doc/manual.html)) on the [project 18 | page](http://codemirror.net). For questions and discussion, use the 19 | [discussion forum](https://discuss.codemirror.net/). 20 | 21 | See 22 | [CONTRIBUTING.md](https://github.com/codemirror/CodeMirror/blob/master/CONTRIBUTING.md) 23 | for contributing guidelines. 24 | 25 | The CodeMirror community aims to be welcoming to everybody. We use the 26 | [Contributor Covenant 27 | (1.1)](http://contributor-covenant.org/version/1/1/0/) as our code of 28 | conduct. 29 | -------------------------------------------------------------------------------- /www/static/codemirror/addon/dialog/dialog.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-dialog { 2 | position: absolute; 3 | left: 0; right: 0; 4 | background: inherit; 5 | z-index: 15; 6 | padding: .1em .8em; 7 | overflow: hidden; 8 | color: inherit; 9 | } 10 | 11 | .CodeMirror-dialog-top { 12 | border-bottom: 1px solid #eee; 13 | top: 0; 14 | } 15 | 16 | .CodeMirror-dialog-bottom { 17 | border-top: 1px solid #eee; 18 | bottom: 0; 19 | } 20 | 21 | .CodeMirror-dialog input { 22 | border: none; 23 | outline: none; 24 | background: transparent; 25 | width: 20em; 26 | color: inherit; 27 | font-family: monospace; 28 | } 29 | 30 | .CodeMirror-dialog button { 31 | font-size: 70%; 32 | } 33 | -------------------------------------------------------------------------------- /www/static/codemirror/addon/display/fullscreen.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-fullscreen { 2 | position: fixed; 3 | top: 0; left: 0; right: 0; bottom: 0; 4 | height: auto; 5 | z-index: 9; 6 | } 7 | -------------------------------------------------------------------------------- /www/static/codemirror/addon/edit/trailingspace.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | CodeMirror.defineOption("showTrailingSpace", false, function(cm, val, prev) { 13 | if (prev == CodeMirror.Init) prev = false; 14 | if (prev && !val) 15 | cm.removeOverlay("trailingspace"); 16 | else if (!prev && val) 17 | cm.addOverlay({ 18 | token: function(stream) { 19 | for (var l = stream.string.length, i = l; i && /\s/.test(stream.string.charAt(i - 1)); --i) {} 20 | if (i > stream.pos) { stream.pos = i; return null; } 21 | stream.pos = l; 22 | return "trailingspace"; 23 | }, 24 | name: "trailingspace" 25 | }); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /www/static/codemirror/addon/fold/foldgutter.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-foldmarker { 2 | color: blue; 3 | text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px; 4 | font-family: arial; 5 | line-height: .3; 6 | cursor: pointer; 7 | } 8 | .CodeMirror-foldgutter { 9 | width: .7em; 10 | } 11 | .CodeMirror-foldgutter-open, 12 | .CodeMirror-foldgutter-folded { 13 | cursor: pointer; 14 | } 15 | .CodeMirror-foldgutter-open:after { 16 | content: "\25BE"; 17 | } 18 | .CodeMirror-foldgutter-folded:after { 19 | content: "\25B8"; 20 | } 21 | -------------------------------------------------------------------------------- /www/static/codemirror/addon/hint/show-hint.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-hints { 2 | position: absolute; 3 | z-index: 10; 4 | overflow: hidden; 5 | list-style: none; 6 | 7 | margin: 0; 8 | padding: 2px; 9 | 10 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 11 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 12 | box-shadow: 2px 3px 5px rgba(0,0,0,.2); 13 | border-radius: 3px; 14 | border: 1px solid silver; 15 | 16 | background: white; 17 | font-size: 90%; 18 | font-family: monospace; 19 | 20 | max-height: 20em; 21 | overflow-y: auto; 22 | } 23 | 24 | .CodeMirror-hint { 25 | margin: 0; 26 | padding: 0 4px; 27 | border-radius: 2px; 28 | white-space: pre; 29 | color: black; 30 | cursor: pointer; 31 | } 32 | 33 | li.CodeMirror-hint-active { 34 | background: #08f; 35 | color: white; 36 | } 37 | -------------------------------------------------------------------------------- /www/static/codemirror/addon/lint/coffeescript-lint.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | // Depends on coffeelint.js from http://www.coffeelint.org/js/coffeelint.js 5 | 6 | // declare global: coffeelint 7 | 8 | (function(mod) { 9 | if (typeof exports == "object" && typeof module == "object") // CommonJS 10 | mod(require("../../lib/codemirror")); 11 | else if (typeof define == "function" && define.amd) // AMD 12 | define(["../../lib/codemirror"], mod); 13 | else // Plain browser env 14 | mod(CodeMirror); 15 | })(function(CodeMirror) { 16 | "use strict"; 17 | 18 | CodeMirror.registerHelper("lint", "coffeescript", function(text) { 19 | var found = []; 20 | var parseError = function(err) { 21 | var loc = err.lineNumber; 22 | found.push({from: CodeMirror.Pos(loc-1, 0), 23 | to: CodeMirror.Pos(loc, 0), 24 | severity: err.level, 25 | message: err.message}); 26 | }; 27 | try { 28 | var res = coffeelint.lint(text); 29 | for(var i = 0; i < res.length; i++) { 30 | parseError(res[i]); 31 | } 32 | } catch(e) { 33 | found.push({from: CodeMirror.Pos(e.location.first_line, 0), 34 | to: CodeMirror.Pos(e.location.last_line, e.location.last_column), 35 | severity: 'error', 36 | message: e.message}); 37 | } 38 | return found; 39 | }); 40 | 41 | }); 42 | -------------------------------------------------------------------------------- /www/static/codemirror/addon/lint/css-lint.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | // Depends on csslint.js from https://github.com/stubbornella/csslint 5 | 6 | // declare global: CSSLint 7 | 8 | (function(mod) { 9 | if (typeof exports == "object" && typeof module == "object") // CommonJS 10 | mod(require("../../lib/codemirror")); 11 | else if (typeof define == "function" && define.amd) // AMD 12 | define(["../../lib/codemirror"], mod); 13 | else // Plain browser env 14 | mod(CodeMirror); 15 | })(function(CodeMirror) { 16 | "use strict"; 17 | 18 | CodeMirror.registerHelper("lint", "css", function(text) { 19 | var found = []; 20 | if (!window.CSSLint) return found; 21 | var results = CSSLint.verify(text), messages = results.messages, message = null; 22 | for ( var i = 0; i < messages.length; i++) { 23 | message = messages[i]; 24 | var startLine = message.line -1, endLine = message.line -1, startCol = message.col -1, endCol = message.col; 25 | found.push({ 26 | from: CodeMirror.Pos(startLine, startCol), 27 | to: CodeMirror.Pos(endLine, endCol), 28 | message: message.message, 29 | severity : message.type 30 | }); 31 | } 32 | return found; 33 | }); 34 | 35 | }); 36 | -------------------------------------------------------------------------------- /www/static/codemirror/addon/lint/json-lint.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | // Depends on jsonlint.js from https://github.com/zaach/jsonlint 5 | 6 | // declare global: jsonlint 7 | 8 | (function(mod) { 9 | if (typeof exports == "object" && typeof module == "object") // CommonJS 10 | mod(require("../../lib/codemirror")); 11 | else if (typeof define == "function" && define.amd) // AMD 12 | define(["../../lib/codemirror"], mod); 13 | else // Plain browser env 14 | mod(CodeMirror); 15 | })(function(CodeMirror) { 16 | "use strict"; 17 | 18 | CodeMirror.registerHelper("lint", "json", function(text) { 19 | var found = []; 20 | jsonlint.parseError = function(str, hash) { 21 | var loc = hash.loc; 22 | found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column), 23 | to: CodeMirror.Pos(loc.last_line - 1, loc.last_column), 24 | message: str}); 25 | }; 26 | try { jsonlint.parse(text); } 27 | catch(e) {} 28 | return found; 29 | }); 30 | 31 | }); 32 | -------------------------------------------------------------------------------- /www/static/codemirror/addon/lint/yaml-lint.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | // Depends on js-yaml.js from https://github.com/nodeca/js-yaml 15 | 16 | // declare global: jsyaml 17 | 18 | CodeMirror.registerHelper("lint", "yaml", function(text) { 19 | var found = []; 20 | try { jsyaml.load(text); } 21 | catch(e) { 22 | var loc = e.mark; 23 | found.push({ from: CodeMirror.Pos(loc.line, loc.column), to: CodeMirror.Pos(loc.line, loc.column), message: e.message }); 24 | } 25 | return found; 26 | }); 27 | 28 | }); 29 | -------------------------------------------------------------------------------- /www/static/codemirror/addon/mode/multiplex_test.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function() { 5 | CodeMirror.defineMode("markdown_with_stex", function(){ 6 | var inner = CodeMirror.getMode({}, "stex"); 7 | var outer = CodeMirror.getMode({}, "markdown"); 8 | 9 | var innerOptions = { 10 | open: '$', 11 | close: '$', 12 | mode: inner, 13 | delimStyle: 'delim', 14 | innerStyle: 'inner' 15 | }; 16 | 17 | return CodeMirror.multiplexingMode(outer, innerOptions); 18 | }); 19 | 20 | var mode = CodeMirror.getMode({}, "markdown_with_stex"); 21 | 22 | function MT(name) { 23 | test.mode( 24 | name, 25 | mode, 26 | Array.prototype.slice.call(arguments, 1), 27 | 'multiplexing'); 28 | } 29 | 30 | MT( 31 | "stexInsideMarkdown", 32 | "[strong **Equation:**] [delim&delim-open $][inner&tag \\pi][delim&delim-close $]"); 33 | })(); 34 | -------------------------------------------------------------------------------- /www/static/codemirror/addon/runmode/colorize.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror"), require("./runmode")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror", "./runmode"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | var isBlock = /^(p|li|div|h\\d|pre|blockquote|td)$/; 15 | 16 | function textContent(node, out) { 17 | if (node.nodeType == 3) return out.push(node.nodeValue); 18 | for (var ch = node.firstChild; ch; ch = ch.nextSibling) { 19 | textContent(ch, out); 20 | if (isBlock.test(node.nodeType)) out.push("\n"); 21 | } 22 | } 23 | 24 | CodeMirror.colorize = function(collection, defaultMode) { 25 | if (!collection) collection = document.body.getElementsByTagName("pre"); 26 | 27 | for (var i = 0; i < collection.length; ++i) { 28 | var node = collection[i]; 29 | var mode = node.getAttribute("data-lang") || defaultMode; 30 | if (!mode) continue; 31 | 32 | var text = []; 33 | textContent(node, text); 34 | node.innerHTML = ""; 35 | CodeMirror.runMode(text.join(""), mode, node); 36 | 37 | node.className += " cm-s-default"; 38 | } 39 | }; 40 | }); 41 | -------------------------------------------------------------------------------- /www/static/codemirror/addon/search/matchesonscrollbar.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-search-match { 2 | background: gold; 3 | border-top: 1px solid orange; 4 | border-bottom: 1px solid orange; 5 | -moz-box-sizing: border-box; 6 | box-sizing: border-box; 7 | opacity: .5; 8 | } 9 | -------------------------------------------------------------------------------- /www/static/codemirror/addon/tern/worker.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | // declare global: tern, server 5 | 6 | var server; 7 | 8 | this.onmessage = function(e) { 9 | var data = e.data; 10 | switch (data.type) { 11 | case "init": return startServer(data.defs, data.plugins, data.scripts); 12 | case "add": return server.addFile(data.name, data.text); 13 | case "del": return server.delFile(data.name); 14 | case "req": return server.request(data.body, function(err, reqData) { 15 | postMessage({id: data.id, body: reqData, err: err && String(err)}); 16 | }); 17 | case "getFile": 18 | var c = pending[data.id]; 19 | delete pending[data.id]; 20 | return c(data.err, data.text); 21 | default: throw new Error("Unknown message type: " + data.type); 22 | } 23 | }; 24 | 25 | var nextId = 0, pending = {}; 26 | function getFile(file, c) { 27 | postMessage({type: "getFile", name: file, id: ++nextId}); 28 | pending[nextId] = c; 29 | } 30 | 31 | function startServer(defs, plugins, scripts) { 32 | if (scripts) importScripts.apply(null, scripts); 33 | 34 | server = new tern.Server({ 35 | getFile: getFile, 36 | async: true, 37 | defs: defs, 38 | plugins: plugins 39 | }); 40 | } 41 | 42 | this.console = { 43 | log: function(v) { postMessage({type: "debug", message: v}); } 44 | }; 45 | -------------------------------------------------------------------------------- /www/static/codemirror/bin/authors.sh: -------------------------------------------------------------------------------- 1 | # Combine existing list of authors with everyone known in git, sort, add header. 2 | tail --lines=+3 AUTHORS > AUTHORS.tmp 3 | git log --format='%aN' >> AUTHORS.tmp 4 | echo -e "List of CodeMirror contributors. Updated before every release.\n" > AUTHORS 5 | sort -u AUTHORS.tmp >> AUTHORS 6 | rm -f AUTHORS.tmp 7 | -------------------------------------------------------------------------------- /www/static/codemirror/bin/lint: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | process.exit(require("../test/lint").ok ? 0 : 1); 4 | -------------------------------------------------------------------------------- /www/static/codemirror/bin/upload-release.js: -------------------------------------------------------------------------------- 1 | "use strict" 2 | 3 | let version = process.argv[2] 4 | let auth = process.argv[3] 5 | 6 | if (!auth) { 7 | console.log("Usage: upload-release.js [TAG] [github-user:password]") 8 | process.exit(1) 9 | } 10 | 11 | require('child_process').exec("git --no-pager show -s --format='%s' " + version, (error, stdout) => { 12 | if (error) throw error 13 | let message = stdout.split("\n").slice(2) 14 | message = message.slice(0, message.indexOf("-----BEGIN PGP SIGNATURE-----")).join("\n") 15 | 16 | let req = require("https").request({ 17 | host: "api.github.com", 18 | auth: auth, 19 | headers: {"user-agent": "Release uploader"}, 20 | path: "/repos/codemirror/codemirror/releases", 21 | method: "POST" 22 | }, res => { 23 | if (res.statusCode >= 300) { 24 | console.error(res.statusMessage) 25 | res.on("data", d => console.log(d.toString())) 26 | res.on("end", process.exit(1)) 27 | } 28 | }) 29 | req.write(JSON.stringify({ 30 | tag_name: version, 31 | name: version, 32 | body: message 33 | })) 34 | req.end() 35 | }) 36 | -------------------------------------------------------------------------------- /www/static/codemirror/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codemirror", 3 | "main": ["lib/codemirror.js", "lib/codemirror.css"], 4 | "ignore": [ 5 | "**/.*", 6 | "node_modules", 7 | "components", 8 | "bin", 9 | "demo", 10 | "doc", 11 | "test", 12 | "index.html", 13 | "package.json", 14 | "mode/*/*test.js", 15 | "mode/*/*.html" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /www/static/codemirror/demo/closetag.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Close-Tag Demo 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 30 | 31 |
32 |

Close-Tag Demo

33 |
34 | 35 | 41 |
42 | -------------------------------------------------------------------------------- /www/static/codemirror/demo/matchtags.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Tag Matcher Demo 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 27 | 28 |
29 |

Tag Matcher Demo

30 | 31 | 32 |
33 | 34 | 44 | 45 |

Put the cursor on or inside a pair of tags to highlight them. 46 | Press Ctrl-J to jump to the tag that matches the one under the 47 | cursor.

48 |
49 | -------------------------------------------------------------------------------- /www/static/codemirror/demo/resize.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Autoresize Demo 4 | 5 | 6 | 7 | 8 | 9 | 10 | 16 | 28 | 29 |
30 |

Autoresize Demo

31 |
37 | 38 |

By setting an editor's height style 39 | to auto and giving 40 | the viewportMargin 41 | a value of Infinity, CodeMirror can be made to 42 | automatically resize to fit its content.

43 | 44 | 50 | 51 |
52 | -------------------------------------------------------------------------------- /www/static/codemirror/doc/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/codemirror/doc/logo.png -------------------------------------------------------------------------------- /www/static/codemirror/doc/yinyang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/codemirror/doc/yinyang.png -------------------------------------------------------------------------------- /www/static/codemirror/mode/asciiarmor/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: ASCII Armor (PGP) mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

ASCII Armor (PGP) mode

27 |
36 | 37 | 42 | 43 |

MIME types 44 | defined: application/pgp, application/pgp-keys, application/pgp-signature

45 | 46 |
47 | -------------------------------------------------------------------------------- /www/static/codemirror/mode/css/gss_test.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function() { 5 | "use strict"; 6 | 7 | var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-gss"); 8 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "gss"); } 9 | 10 | MT("atComponent", 11 | "[def @component] {", 12 | "[tag foo] {", 13 | " [property color]: [keyword black];", 14 | "}", 15 | "}"); 16 | 17 | })(); 18 | -------------------------------------------------------------------------------- /www/static/codemirror/mode/diff/diff.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.defineMode("diff", function() { 15 | 16 | var TOKEN_NAMES = { 17 | '+': 'positive', 18 | '-': 'negative', 19 | '@': 'meta' 20 | }; 21 | 22 | return { 23 | token: function(stream) { 24 | var tw_pos = stream.string.search(/[\t ]+?$/); 25 | 26 | if (!stream.sol() || tw_pos === 0) { 27 | stream.skipToEnd(); 28 | return ("error " + ( 29 | TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, ''); 30 | } 31 | 32 | var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd(); 33 | 34 | if (tw_pos === -1) { 35 | stream.skipToEnd(); 36 | } else { 37 | stream.pos = tw_pos; 38 | } 39 | 40 | return token_name; 41 | } 42 | }; 43 | }); 44 | 45 | CodeMirror.defineMIME("text/x-diff", "diff"); 46 | 47 | }); 48 | -------------------------------------------------------------------------------- /www/static/codemirror/mode/haskell-literate/haskell-literate.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function (mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror"), require("../haskell/haskell")) 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror", "../haskell/haskell"], mod) 9 | else // Plain browser env 10 | mod(CodeMirror) 11 | })(function (CodeMirror) { 12 | "use strict" 13 | 14 | CodeMirror.defineMode("haskell-literate", function (config, parserConfig) { 15 | var baseMode = CodeMirror.getMode(config, (parserConfig && parserConfig.base) || "haskell") 16 | 17 | return { 18 | startState: function () { 19 | return { 20 | inCode: false, 21 | baseState: CodeMirror.startState(baseMode) 22 | } 23 | }, 24 | token: function (stream, state) { 25 | if (stream.sol()) { 26 | if (state.inCode = stream.eat(">")) 27 | return "meta" 28 | } 29 | if (state.inCode) { 30 | return baseMode.token(stream, state.baseState) 31 | } else { 32 | stream.skipToEnd() 33 | return "comment" 34 | } 35 | }, 36 | innerMode: function (state) { 37 | return state.inCode ? {state: state.baseState, mode: baseMode} : null 38 | } 39 | } 40 | }, "haskell") 41 | 42 | CodeMirror.defineMIME("text/x-literate-haskell", "haskell-literate") 43 | }); 44 | -------------------------------------------------------------------------------- /www/static/codemirror/mode/htmlembedded/htmlembedded.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"), 7 | require("../../addon/mode/multiplex")); 8 | else if (typeof define == "function" && define.amd) // AMD 9 | define(["../../lib/codemirror", "../htmlmixed/htmlmixed", 10 | "../../addon/mode/multiplex"], mod); 11 | else // Plain browser env 12 | mod(CodeMirror); 13 | })(function(CodeMirror) { 14 | "use strict"; 15 | 16 | CodeMirror.defineMode("htmlembedded", function(config, parserConfig) { 17 | return CodeMirror.multiplexingMode(CodeMirror.getMode(config, "htmlmixed"), { 18 | open: parserConfig.open || parserConfig.scriptStartRegex || "<%", 19 | close: parserConfig.close || parserConfig.scriptEndRegex || "%>", 20 | mode: CodeMirror.getMode(config, parserConfig.scriptingModeSpec) 21 | }); 22 | }, "htmlmixed"); 23 | 24 | CodeMirror.defineMIME("application/x-ejs", {name: "htmlembedded", scriptingModeSpec:"javascript"}); 25 | CodeMirror.defineMIME("application/x-aspx", {name: "htmlembedded", scriptingModeSpec:"text/x-csharp"}); 26 | CodeMirror.defineMIME("application/x-jsp", {name: "htmlembedded", scriptingModeSpec:"text/x-java"}); 27 | CodeMirror.defineMIME("application/x-erb", {name: "htmlembedded", scriptingModeSpec:"ruby"}); 28 | }); 29 | -------------------------------------------------------------------------------- /www/static/codemirror/mode/http/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: HTTP mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

HTTP mode

27 | 28 | 29 |
39 | 40 | 43 | 44 |

MIME types defined: message/http.

45 |
46 | -------------------------------------------------------------------------------- /www/static/codemirror/mode/mbox/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: mbox mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

mbox mode

27 |
38 | 41 | 42 |

MIME types defined: application/mbox.

43 | 44 |
45 | -------------------------------------------------------------------------------- /www/static/codemirror/mode/ntriples/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: NTriples mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 28 | 29 |
30 |

NTriples mode

31 |
32 | 39 |
40 | 41 | 44 |

MIME types defined: text/n-triples.

45 |
46 | -------------------------------------------------------------------------------- /www/static/codemirror/mode/python/test.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function() { 5 | var mode = CodeMirror.getMode({indentUnit: 4}, 6 | {name: "python", 7 | version: 3, 8 | singleLineStringErrors: false}); 9 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } 10 | 11 | // Error, because "foobarhello" is neither a known type or property, but 12 | // property was expected (after "and"), and it should be in parentheses. 13 | MT("decoratorStartOfLine", 14 | "[meta @dec]", 15 | "[keyword def] [def function]():", 16 | " [keyword pass]"); 17 | 18 | MT("decoratorIndented", 19 | "[keyword class] [def Foo]:", 20 | " [meta @dec]", 21 | " [keyword def] [def function]():", 22 | " [keyword pass]"); 23 | 24 | MT("matmulWithSpace:", "[variable a] [operator @] [variable b]"); 25 | MT("matmulWithoutSpace:", "[variable a][operator @][variable b]"); 26 | MT("matmulSpaceBefore:", "[variable a] [operator @][variable b]"); 27 | 28 | MT("fValidStringPrefix", "[string f'this is a {formatted} string']"); 29 | MT("uValidStringPrefix", "[string u'this is an unicode string']"); 30 | })(); 31 | -------------------------------------------------------------------------------- /www/static/codemirror/mode/ruby/test.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function() { 5 | var mode = CodeMirror.getMode({indentUnit: 2}, "ruby"); 6 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } 7 | 8 | MT("divide_equal_operator", 9 | "[variable bar] [operator /=] [variable foo]"); 10 | 11 | MT("divide_equal_operator_no_spacing", 12 | "[variable foo][operator /=][number 42]"); 13 | 14 | })(); 15 | -------------------------------------------------------------------------------- /www/static/codemirror/mode/rust/test.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function() { 5 | var mode = CodeMirror.getMode({indentUnit: 4}, "rust"); 6 | function MT(name) {test.mode(name, mode, Array.prototype.slice.call(arguments, 1));} 7 | 8 | MT('integer_test', 9 | '[number 123i32]', 10 | '[number 123u32]', 11 | '[number 123_u32]', 12 | '[number 0xff_u8]', 13 | '[number 0o70_i16]', 14 | '[number 0b1111_1111_1001_0000_i32]', 15 | '[number 0usize]'); 16 | 17 | MT('float_test', 18 | '[number 123.0f64]', 19 | '[number 0.1f64]', 20 | '[number 0.1f32]', 21 | '[number 12E+99_f64]'); 22 | 23 | MT('string-literals-test', 24 | '[string "foo"]', 25 | '[string r"foo"]', 26 | '[string "\\"foo\\""]', 27 | '[string r#""foo""#]', 28 | '[string "foo #\\"# bar"]', 29 | 30 | '[string b"foo"]', 31 | '[string br"foo"]', 32 | '[string b"\\"foo\\""]', 33 | '[string br#""foo""#]', 34 | '[string br##"foo #" bar"##]', 35 | 36 | "[string-2 'h']", 37 | "[string-2 b'h']"); 38 | 39 | })(); 40 | -------------------------------------------------------------------------------- /www/static/codemirror/mode/spreadsheet/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Spreadsheet mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 25 | 26 |
27 |

Spreadsheet mode

28 |
29 | 30 | 37 | 38 |

MIME types defined: text/x-spreadsheet.

39 | 40 |

The Spreadsheet Mode

41 |

Created by Robert Plummer

42 |
43 | -------------------------------------------------------------------------------- /www/static/codemirror/mode/tiddlywiki/tiddlywiki.css: -------------------------------------------------------------------------------- 1 | span.cm-underlined { 2 | text-decoration: underline; 3 | } 4 | span.cm-strikethrough { 5 | text-decoration: line-through; 6 | } 7 | span.cm-brace { 8 | color: #170; 9 | font-weight: bold; 10 | } 11 | span.cm-table { 12 | color: blue; 13 | font-weight: bold; 14 | } 15 | -------------------------------------------------------------------------------- /www/static/codemirror/mode/tiki/tiki.css: -------------------------------------------------------------------------------- 1 | .cm-tw-syntaxerror { 2 | color: #FFF; 3 | background-color: #900; 4 | } 5 | 6 | .cm-tw-deleted { 7 | text-decoration: line-through; 8 | } 9 | 10 | .cm-tw-header5 { 11 | font-weight: bold; 12 | } 13 | .cm-tw-listitem:first-child { /*Added first child to fix duplicate padding when highlighting*/ 14 | padding-left: 10px; 15 | } 16 | 17 | .cm-tw-box { 18 | border-top-width: 0px !important; 19 | border-style: solid; 20 | border-width: 1px; 21 | border-color: inherit; 22 | } 23 | 24 | .cm-tw-underline { 25 | text-decoration: underline; 26 | } -------------------------------------------------------------------------------- /www/static/codemirror/mode/twig/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Twig mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Twig mode

27 |
40 | 45 |
46 | -------------------------------------------------------------------------------- /www/static/codemirror/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codemirror", 3 | "version":"5.17.0", 4 | "main": "lib/codemirror.js", 5 | "description": "Full-featured in-browser code editor", 6 | "license": "MIT", 7 | "directories": {"lib": "./lib"}, 8 | "scripts": { 9 | "test": "node ./test/run.js", 10 | "lint": "bin/lint" 11 | }, 12 | "devDependencies": {"node-static": "0.6.0", 13 | "phantomjs": "1.9.2-5", 14 | "blint": ">=0.1.1"}, 15 | "bugs": "http://github.com/codemirror/CodeMirror/issues", 16 | "keywords": ["JavaScript", "CodeMirror", "Editor"], 17 | "homepage": "http://codemirror.net", 18 | "maintainers":[{"name": "Marijn Haverbeke", 19 | "email": "marijnh@gmail.com", 20 | "web": "http://marijnhaverbeke.nl"}], 21 | "repository": {"type": "git", 22 | "url": "https://github.com/codemirror/CodeMirror.git"}, 23 | "jspm": { 24 | "directories": {}, 25 | "dependencies": {}, 26 | "devDependencies": {} 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /www/static/codemirror/test/lint.js: -------------------------------------------------------------------------------- 1 | var blint = require("blint"); 2 | 3 | ["mode", "lib", "addon", "keymap"].forEach(function(dir) { 4 | blint.checkDir(dir, { 5 | browser: true, 6 | allowedGlobals: ["CodeMirror", "define", "test", "requirejs"], 7 | blob: "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http:\/\/codemirror.net\/LICENSE\n\n" 8 | }); 9 | }); 10 | 11 | module.exports = {ok: blint.success()}; 12 | -------------------------------------------------------------------------------- /www/static/codemirror/test/mode_test.css: -------------------------------------------------------------------------------- 1 | .mt-output .mt-token { 2 | border: 1px solid #ddd; 3 | white-space: pre; 4 | font-family: "Consolas", monospace; 5 | text-align: center; 6 | } 7 | 8 | .mt-output .mt-style { 9 | font-size: x-small; 10 | } 11 | 12 | .mt-output .mt-state { 13 | font-size: x-small; 14 | vertical-align: top; 15 | } 16 | 17 | .mt-output .mt-state-row { 18 | display: none; 19 | } 20 | 21 | .mt-state-unhide .mt-output .mt-state-row { 22 | display: table-row; 23 | } 24 | -------------------------------------------------------------------------------- /www/static/codemirror/test/phantom_driver.js: -------------------------------------------------------------------------------- 1 | var page = require('webpage').create(); 2 | 3 | page.open("http://localhost:3000/test/index.html", function (status) { 4 | if (status != "success") { 5 | console.log("page couldn't be loaded successfully"); 6 | phantom.exit(1); 7 | } 8 | waitFor(function () { 9 | return page.evaluate(function () { 10 | var output = document.getElementById('status'); 11 | if (!output) { return false; } 12 | return (/^(\d+ failures?|all passed)/i).test(output.innerText); 13 | }); 14 | }, function () { 15 | var failed = page.evaluate(function () { return window.failed; }); 16 | var output = page.evaluate(function () { 17 | return document.getElementById('output').innerText + "\n" + 18 | document.getElementById('status').innerText; 19 | }); 20 | console.log(output); 21 | phantom.exit(failed > 0 ? 1 : 0); 22 | }); 23 | }); 24 | 25 | function waitFor (test, cb) { 26 | if (test()) { 27 | cb(); 28 | } else { 29 | setTimeout(function () { waitFor(test, cb); }, 250); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /www/static/codemirror/test/run.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var ok = require("./lint").ok; 4 | 5 | var files = new (require('node-static').Server)(); 6 | 7 | var server = require('http').createServer(function (req, res) { 8 | req.addListener('end', function () { 9 | files.serve(req, res, function (err/*, result */) { 10 | if (err) { 11 | console.error(err); 12 | process.exit(1); 13 | } 14 | }); 15 | }).resume(); 16 | }).addListener('error', function (err) { 17 | throw err; 18 | }).listen(3000, function () { 19 | var childProcess = require('child_process'); 20 | var phantomjs = require("phantomjs"); 21 | var childArgs = [ 22 | require("path").join(__dirname, 'phantom_driver.js') 23 | ]; 24 | childProcess.execFile(phantomjs.path, childArgs, function (err, stdout, stderr) { 25 | server.close(); 26 | console.log(stdout); 27 | if (err) console.error(err); 28 | if (stderr) console.error(stderr); 29 | process.exit(err || stderr || !ok ? 1 : 0); 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /www/static/codemirror/theme/ambiance-mobile.css: -------------------------------------------------------------------------------- 1 | .cm-s-ambiance.CodeMirror { 2 | -webkit-box-shadow: none; 3 | -moz-box-shadow: none; 4 | box-shadow: none; 5 | } 6 | -------------------------------------------------------------------------------- /www/static/codemirror/theme/bespin.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: Bespin 4 | Author: Mozilla / Jan T. Sott 5 | 6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) 7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) 8 | 9 | */ 10 | 11 | .cm-s-bespin.CodeMirror {background: #28211c; color: #9d9b97;} 12 | .cm-s-bespin div.CodeMirror-selected {background: #36312e !important;} 13 | .cm-s-bespin .CodeMirror-gutters {background: #28211c; border-right: 0px;} 14 | .cm-s-bespin .CodeMirror-linenumber {color: #666666;} 15 | .cm-s-bespin .CodeMirror-cursor {border-left: 1px solid #797977 !important;} 16 | 17 | .cm-s-bespin span.cm-comment {color: #937121;} 18 | .cm-s-bespin span.cm-atom {color: #9b859d;} 19 | .cm-s-bespin span.cm-number {color: #9b859d;} 20 | 21 | .cm-s-bespin span.cm-property, .cm-s-bespin span.cm-attribute {color: #54be0d;} 22 | .cm-s-bespin span.cm-keyword {color: #cf6a4c;} 23 | .cm-s-bespin span.cm-string {color: #f9ee98;} 24 | 25 | .cm-s-bespin span.cm-variable {color: #54be0d;} 26 | .cm-s-bespin span.cm-variable-2 {color: #5ea6ea;} 27 | .cm-s-bespin span.cm-def {color: #cf7d34;} 28 | .cm-s-bespin span.cm-error {background: #cf6a4c; color: #797977;} 29 | .cm-s-bespin span.cm-bracket {color: #9d9b97;} 30 | .cm-s-bespin span.cm-tag {color: #cf6a4c;} 31 | .cm-s-bespin span.cm-link {color: #9b859d;} 32 | 33 | .cm-s-bespin .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} 34 | .cm-s-bespin .CodeMirror-activeline-background { background: #404040; } 35 | -------------------------------------------------------------------------------- /www/static/codemirror/theme/eclipse.css: -------------------------------------------------------------------------------- 1 | .cm-s-eclipse span.cm-meta { color: #FF1717; } 2 | .cm-s-eclipse span.cm-keyword { line-height: 1em; font-weight: bold; color: #7F0055; } 3 | .cm-s-eclipse span.cm-atom { color: #219; } 4 | .cm-s-eclipse span.cm-number { color: #164; } 5 | .cm-s-eclipse span.cm-def { color: #00f; } 6 | .cm-s-eclipse span.cm-variable { color: black; } 7 | .cm-s-eclipse span.cm-variable-2 { color: #0000C0; } 8 | .cm-s-eclipse span.cm-variable-3 { color: #0000C0; } 9 | .cm-s-eclipse span.cm-property { color: black; } 10 | .cm-s-eclipse span.cm-operator { color: black; } 11 | .cm-s-eclipse span.cm-comment { color: #3F7F5F; } 12 | .cm-s-eclipse span.cm-string { color: #2A00FF; } 13 | .cm-s-eclipse span.cm-string-2 { color: #f50; } 14 | .cm-s-eclipse span.cm-qualifier { color: #555; } 15 | .cm-s-eclipse span.cm-builtin { color: #30a; } 16 | .cm-s-eclipse span.cm-bracket { color: #cc7; } 17 | .cm-s-eclipse span.cm-tag { color: #170; } 18 | .cm-s-eclipse span.cm-attribute { color: #00c; } 19 | .cm-s-eclipse span.cm-link { color: #219; } 20 | .cm-s-eclipse span.cm-error { color: #f00; } 21 | 22 | .cm-s-eclipse .CodeMirror-activeline-background { background: #e8f2ff; } 23 | .cm-s-eclipse .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; } 24 | -------------------------------------------------------------------------------- /www/static/codemirror/theme/elegant.css: -------------------------------------------------------------------------------- 1 | .cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom { color: #762; } 2 | .cm-s-elegant span.cm-comment { color: #262; font-style: italic; line-height: 1em; } 3 | .cm-s-elegant span.cm-meta { color: #555; font-style: italic; line-height: 1em; } 4 | .cm-s-elegant span.cm-variable { color: black; } 5 | .cm-s-elegant span.cm-variable-2 { color: #b11; } 6 | .cm-s-elegant span.cm-qualifier { color: #555; } 7 | .cm-s-elegant span.cm-keyword { color: #730; } 8 | .cm-s-elegant span.cm-builtin { color: #30a; } 9 | .cm-s-elegant span.cm-link { color: #762; } 10 | .cm-s-elegant span.cm-error { background-color: #fdd; } 11 | 12 | .cm-s-elegant .CodeMirror-activeline-background { background: #e8f2ff; } 13 | .cm-s-elegant .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; } 14 | -------------------------------------------------------------------------------- /www/static/codemirror/theme/isotope.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: Isotope 4 | Author: David Desandro / Jan T. Sott 5 | 6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) 7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) 8 | 9 | */ 10 | 11 | .cm-s-isotope.CodeMirror {background: #000000; color: #e0e0e0;} 12 | .cm-s-isotope div.CodeMirror-selected {background: #404040 !important;} 13 | .cm-s-isotope .CodeMirror-gutters {background: #000000; border-right: 0px;} 14 | .cm-s-isotope .CodeMirror-linenumber {color: #808080;} 15 | .cm-s-isotope .CodeMirror-cursor {border-left: 1px solid #c0c0c0 !important;} 16 | 17 | .cm-s-isotope span.cm-comment {color: #3300ff;} 18 | .cm-s-isotope span.cm-atom {color: #cc00ff;} 19 | .cm-s-isotope span.cm-number {color: #cc00ff;} 20 | 21 | .cm-s-isotope span.cm-property, .cm-s-isotope span.cm-attribute {color: #33ff00;} 22 | .cm-s-isotope span.cm-keyword {color: #ff0000;} 23 | .cm-s-isotope span.cm-string {color: #ff0099;} 24 | 25 | .cm-s-isotope span.cm-variable {color: #33ff00;} 26 | .cm-s-isotope span.cm-variable-2 {color: #0066ff;} 27 | .cm-s-isotope span.cm-def {color: #ff9900;} 28 | .cm-s-isotope span.cm-error {background: #ff0000; color: #c0c0c0;} 29 | .cm-s-isotope span.cm-bracket {color: #e0e0e0;} 30 | .cm-s-isotope span.cm-tag {color: #ff0000;} 31 | .cm-s-isotope span.cm-link {color: #cc00ff;} 32 | 33 | .cm-s-isotope .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} 34 | .cm-s-isotope .CodeMirror-activeline-background { background: #202020; } 35 | -------------------------------------------------------------------------------- /www/static/codemirror/theme/neat.css: -------------------------------------------------------------------------------- 1 | .cm-s-neat span.cm-comment { color: #a86; } 2 | .cm-s-neat span.cm-keyword { line-height: 1em; font-weight: bold; color: blue; } 3 | .cm-s-neat span.cm-string { color: #a22; } 4 | .cm-s-neat span.cm-builtin { line-height: 1em; font-weight: bold; color: #077; } 5 | .cm-s-neat span.cm-special { line-height: 1em; font-weight: bold; color: #0aa; } 6 | .cm-s-neat span.cm-variable { color: black; } 7 | .cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; } 8 | .cm-s-neat span.cm-meta { color: #555; } 9 | .cm-s-neat span.cm-link { color: #3a3; } 10 | 11 | .cm-s-neat .CodeMirror-activeline-background { background: #e8f2ff; } 12 | .cm-s-neat .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; } 13 | -------------------------------------------------------------------------------- /www/static/codemirror/theme/neo.css: -------------------------------------------------------------------------------- 1 | /* neo theme for codemirror */ 2 | 3 | /* Color scheme */ 4 | 5 | .cm-s-neo.CodeMirror { 6 | background-color:#ffffff; 7 | color:#2e383c; 8 | line-height:1.4375; 9 | } 10 | .cm-s-neo .cm-comment { color:#75787b; } 11 | .cm-s-neo .cm-keyword, .cm-s-neo .cm-property { color:#1d75b3; } 12 | .cm-s-neo .cm-atom,.cm-s-neo .cm-number { color:#75438a; } 13 | .cm-s-neo .cm-node,.cm-s-neo .cm-tag { color:#9c3328; } 14 | .cm-s-neo .cm-string { color:#b35e14; } 15 | .cm-s-neo .cm-variable,.cm-s-neo .cm-qualifier { color:#047d65; } 16 | 17 | 18 | /* Editor styling */ 19 | 20 | .cm-s-neo pre { 21 | padding:0; 22 | } 23 | 24 | .cm-s-neo .CodeMirror-gutters { 25 | border:none; 26 | border-right:10px solid transparent; 27 | background-color:transparent; 28 | } 29 | 30 | .cm-s-neo .CodeMirror-linenumber { 31 | padding:0; 32 | color:#e0e2e5; 33 | } 34 | 35 | .cm-s-neo .CodeMirror-guttermarker { color: #1d75b3; } 36 | .cm-s-neo .CodeMirror-guttermarker-subtle { color: #e0e2e5; } 37 | 38 | .cm-s-neo .CodeMirror-cursor { 39 | width: auto; 40 | border: 0; 41 | background: rgba(155,157,162,0.37); 42 | z-index: 1; 43 | } 44 | -------------------------------------------------------------------------------- /www/static/css/jquery.fileinput.css: -------------------------------------------------------------------------------- 1 | /*custom upload elements*/ 2 | input.customfile-input { 3 | position:absolute; 4 | top:-12px; 5 | height:50px; 6 | width:250px; 7 | cursor:pointer; 8 | background:transparent; 9 | border:0; 10 | opacity:0; 11 | -moz-opacity:0; 12 | filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0); 13 | z-index:999; 14 | } 15 | .customfile { 16 | width:250px; 17 | height:23px; 18 | position:relative; 19 | cursor:pointer; 20 | overflow:visible; 21 | background:#fcfcfc; 22 | padding:2px; 23 | border:1px solid #ddd; 24 | -webkit-border-radius:1x; 25 | -moz-border-radius:1px; 26 | border-radius:1px; 27 | -webkit-box-shadow:0 0 4px #d9d9d9 inset; 28 | -moz-box-shadow:0 0 4px #d9d9d9 inset; 29 | box-shadow:0 0 4px #d9d9d9 inset; 30 | } 31 | .customfile-disabled { 32 | opacity:.5; 33 | filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0); 34 | cursor:default; 35 | } 36 | .customfile-feedback { 37 | display:block; 38 | margin:2px 1px 1px 5px; 39 | color:#666; 40 | } 41 | .customfile-feedback-populated { 42 | color:#666; 43 | padding-left:20px; 44 | background: url(../img/icon-generic.gif) left 4px no-repeat; 45 | } 46 | .customfile-button { 47 | float:right; 48 | position:relative; 49 | top:-3px; 50 | right:-5px; 51 | } -------------------------------------------------------------------------------- /www/static/css/jquery.tipsy.css: -------------------------------------------------------------------------------- 1 | .tipsy { 2 | padding:5px; 3 | font-size:10px; 4 | opacity:.8; 5 | filter:alpha(opacity=80); 6 | background:url(../img/jquery/tooltip.gif) no-repeat; 7 | } 8 | .tipsy-inner { 9 | padding:5px 8px 4px; 10 | background-color:black; 11 | color:white; 12 | max-width:200px; 13 | text-align:center; 14 | } 15 | .tipsy-inner { 16 | -moz-border-radius:3px; 17 | -webkit-border-radius:3px; 18 | border-radius:3px; 19 | } 20 | .tipsy-north { background-position:top center; } 21 | .tipsy-south { background-position:bottom center; } 22 | .tipsy-east { background-position:right center; } 23 | .tipsy-west { background-position:left center; } -------------------------------------------------------------------------------- /www/static/css/jquery.wysiwyg.in.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* CSS Document */ 3 | 4 | body { 5 | font-family:'Lucida Sans Unicode','Lucida Grande',sans-serif; 6 | font-size:83%; 7 | color:#666; 8 | margin:0; 9 | padding:0 5px 5px 10px; 10 | } -------------------------------------------------------------------------------- /www/static/forum-templates/qna.txt: -------------------------------------------------------------------------------- 1 | ## 질문하시기 전에 2 | 3 | 글을 작성하시기 전에 반드시 아래의 내용을 잘 읽어 주세요. 4 | 다른 사람의 코드를 읽어 오류를 찾아내는 일은 쉽지 않습니다. 좋은 답변을 받기 위해서는 좋은 질문이 필요합니다. 5 | 좋은 질문을 하려 노력하면, 종종 자신 스스로 해답을 발견하기도 합니다. 6 | 7 | ### 질문에 포함되지 않아도 될 내용 8 | 9 | * "제 컴퓨터에서는 답이 잘 나오는데..." 10 | * "예제는 잘 나오는데..." 11 | * "넣어 본 것들은 잘 나오는데..." 12 | 13 | ### 질문에 포함되어야 할 내용 14 | 15 | * 제목은 질문의 내용을 잘 요약해야 합니다. 16 | * 해결하고자 하는 문제가 무엇인지 잘 적어야 합니다. 17 | * 알고스팟의 문제라면, 아래의 문법 도움말을 참고하여 문제 링크를 걸어 주세요. 18 | * 외부의 문제라면, 문제 요약이나 URL을 제공해 주세요. 19 | * 문제를 어떻게 해결하려 하셨는지/해결하고 계신지 설명해 주십시오. 20 | * **코드만 복사해 붙여넣는 것은 설명이 아닙니다.** 21 | * 구체적으로 알고리즘을 기술할 수 있다면 도움이 됩니다. 22 | * 예시를 들어 설명하는 것도 좋습니다. 23 | * 자신의 답안을 검증하기 위해 어떤 노력을 했는지 적어 주세요. 24 | * 직접 데이터를 만들어서 넣어 봤다면, 어떤 데이터를 넣었는지 적어 주세요. 25 | 26 | ### 참고사항: 문법 관련 27 | 28 | 알고스팟은 Markdown이라는 마크업 언어의 사투리를 사용하고 있습니다. 29 | 글을 작성하시기 전에 반드시 아래 도움말을 참조하여 주세요. 30 | 특히, 코드에 대해서는 알맞은 코드 블럭 문법을 사용하여 구문 강조가 되도록 해 주세요. 31 | 32 | #### 코드 블럭 문법 예제 33 | 34 | 코드 블럭 문법을 다음과 같이 사용하실 수 있습니다. 35 | 36 | ~~~ c++ 37 | #include 38 | 39 | int main(){ 40 | printf("Hello world!\n"); 41 | } 42 | ~~~ 43 | 44 | 문단을 구분하기 위해 앞과 뒤에 빈 줄 하나씩을 **반드시** 추가하셔야 합니다. 45 | 46 | -------------- 47 | 48 | 마지막으로 [[자주_하는_실수_모음]] 페이지를 읽으시면서 혹시 해당되는 사항이 있진 않은지 생각해 보세요. 49 | 50 | 위 내용이 지켜지지 않은 질문은 답변이 오래 걸릴 수 있습니다. 51 | 52 | 아래 '편집하기' 버튼을 눌러 글을 쓰실 수 있습니다. 53 | -------------------------------------------------------------------------------- /www/static/images/banners/codesprint.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/banners/codesprint.gif -------------------------------------------------------------------------------- /www/static/images/banners/codesprint2013.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/banners/codesprint2013.png -------------------------------------------------------------------------------- /www/static/images/banners/nexon2014.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/banners/nexon2014.jpg -------------------------------------------------------------------------------- /www/static/images/banners/nexonintern2014winter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/banners/nexonintern2014winter.jpg -------------------------------------------------------------------------------- /www/static/images/banners/techplanet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/banners/techplanet.jpg -------------------------------------------------------------------------------- /www/static/images/bg_aside_main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/bg_aside_main.png -------------------------------------------------------------------------------- /www/static/images/bg_aside_nav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/bg_aside_nav.png -------------------------------------------------------------------------------- /www/static/images/bg_aside_nav_current.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/bg_aside_nav_current.png -------------------------------------------------------------------------------- /www/static/images/bg_aside_userinfo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/bg_aside_userinfo.png -------------------------------------------------------------------------------- /www/static/images/bg_fixed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/bg_fixed.png -------------------------------------------------------------------------------- /www/static/images/bgs/bg_aside_main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/bgs/bg_aside_main.png -------------------------------------------------------------------------------- /www/static/images/bgs/bg_aside_nav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/bgs/bg_aside_nav.png -------------------------------------------------------------------------------- /www/static/images/bgs/bg_aside_nav_current.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/bgs/bg_aside_nav_current.png -------------------------------------------------------------------------------- /www/static/images/bgs/bg_aside_userinfo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/bgs/bg_aside_userinfo.png -------------------------------------------------------------------------------- /www/static/images/bgs/bg_fixed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/bgs/bg_fixed.png -------------------------------------------------------------------------------- /www/static/images/bgs/bg_sidetab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/bgs/bg_sidetab.png -------------------------------------------------------------------------------- /www/static/images/bgs/bg_sidetab_nested.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/bgs/bg_sidetab_nested.png -------------------------------------------------------------------------------- /www/static/images/bgs/bg_wizard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/bgs/bg_wizard.png -------------------------------------------------------------------------------- /www/static/images/bgs/bg_wizard_nested.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/bgs/bg_wizard_nested.png -------------------------------------------------------------------------------- /www/static/images/btns/btn_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/btns/btn_blue.png -------------------------------------------------------------------------------- /www/static/images/btns/btn_blue_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/btns/btn_blue_hover.png -------------------------------------------------------------------------------- /www/static/images/btns/btn_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/btns/btn_gray.png -------------------------------------------------------------------------------- /www/static/images/btns/btn_gray_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/btns/btn_gray_hover.png -------------------------------------------------------------------------------- /www/static/images/btns/btn_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/btns/btn_green.png -------------------------------------------------------------------------------- /www/static/images/btns/btn_green_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/btns/btn_green_hover.png -------------------------------------------------------------------------------- /www/static/images/btns/btn_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/btns/btn_red.png -------------------------------------------------------------------------------- /www/static/images/btns/btn_red_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/btns/btn_red_hover.png -------------------------------------------------------------------------------- /www/static/images/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/chosen-sprite.png -------------------------------------------------------------------------------- /www/static/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/favicon.ico -------------------------------------------------------------------------------- /www/static/images/gozarani.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/gozarani.jpg -------------------------------------------------------------------------------- /www/static/images/ical.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/ical.gif -------------------------------------------------------------------------------- /www/static/images/icons/ajax_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/ajax_loading.gif -------------------------------------------------------------------------------- /www/static/images/icons/ajax_loading_blue.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/ajax_loading_blue.gif -------------------------------------------------------------------------------- /www/static/images/icons/ajax_loading_blue_nested.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/ajax_loading_blue_nested.gif -------------------------------------------------------------------------------- /www/static/images/icons/ajax_loading_green.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/ajax_loading_green.gif -------------------------------------------------------------------------------- /www/static/images/icons/ajax_loading_green_nested.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/ajax_loading_green_nested.gif -------------------------------------------------------------------------------- /www/static/images/icons/ajax_loading_nested.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/ajax_loading_nested.gif -------------------------------------------------------------------------------- /www/static/images/icons/ajax_loading_red.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/ajax_loading_red.gif -------------------------------------------------------------------------------- /www/static/images/icons/ajax_loading_red_nested.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/ajax_loading_red_nested.gif -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_8ball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_8ball.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_basketball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_basketball.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_bomb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_bomb.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_bug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_bug.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_confuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_confuse.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_cool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_cool.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_cry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_cry.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_evilgrin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_evilgrin.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_fat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_fat.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_football.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_football.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_golf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_golf.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_grin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_grin.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_happy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_happy.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_heart.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_mad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_mad.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_neutral.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_neutral.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_raquet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_raquet.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_red.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_rocket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_rocket.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_roll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_roll.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_shuttlecock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_shuttlecock.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_slim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_slim.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_smile.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_soccer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_soccer.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_surprised.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_surprised.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_tennis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_tennis.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_tongue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_tongue.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_unhappy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_unhappy.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_waii.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_waii.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_wink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_wink.png -------------------------------------------------------------------------------- /www/static/images/icons/emoticon/emoticon_yell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/emoticon/emoticon_yell.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_access.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_access.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_cplusplus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_cplusplus.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_csharp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_csharp.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_cup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_cup.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_database.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_database.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_dvd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_dvd.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_excel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_excel.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_film.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_film.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_find.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_flash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_flash.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_freehand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_freehand.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_illustrator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_illustrator.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_music.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_office.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_office.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_pdf.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_photoshop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_photoshop.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_php.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_php.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_picture.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_powerpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_powerpoint.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_report.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_ruby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_ruby.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_swoosh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_swoosh.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_text.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_tux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_tux.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_visualstudio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_visualstudio.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_white.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_word.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_word.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_wrench.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_wrench.png -------------------------------------------------------------------------------- /www/static/images/icons/extensions/page_zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/extensions/page_zip.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_accordion-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_accordion-hover.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_accordion-hover_nested.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_accordion-hover_nested.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_accordion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_accordion.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_accordion_nested.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_accordion_nested.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_breadcrumbs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_breadcrumbs.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_breadcrumbs_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_breadcrumbs_home.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_calendar.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_error.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_event.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_event.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_event_bomb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_event_bomb.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_event_log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_event_log.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_nav_articles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_nav_articles.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_nav_dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_nav_dashboard.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_nav_events.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_nav_events.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_nav_gallery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_nav_gallery.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_nav_products.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_nav_products.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_nav_projects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_nav_projects.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_nav_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_nav_settings.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_notification_attention.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_notification_attention.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_notification_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_notification_error.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_notification_information.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_notification_information.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_notification_note.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_notification_note.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_notification_success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_notification_success.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_outside_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_outside_link.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_success.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_tab.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_tab_nested.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_tab_nested.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_table_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_table_delete.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_table_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_table_edit.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_table_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_table_options.png -------------------------------------------------------------------------------- /www/static/images/icons/icon_table_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/icon_table_view.png -------------------------------------------------------------------------------- /www/static/images/icons/list-style/icon_list_style.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/list-style/icon_list_style.png -------------------------------------------------------------------------------- /www/static/images/icons/list-style/icon_list_style_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/list-style/icon_list_style_arrow.png -------------------------------------------------------------------------------- /www/static/images/icons/list-style/icon_list_style_checkmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/list-style/icon_list_style_checkmark.png -------------------------------------------------------------------------------- /www/static/images/icons/list-style/icon_list_style_cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/list-style/icon_list_style_cross.png -------------------------------------------------------------------------------- /www/static/images/icons/magnifier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/icons/magnifier.png -------------------------------------------------------------------------------- /www/static/images/jquery/back_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/jquery/back_disabled.png -------------------------------------------------------------------------------- /www/static/images/jquery/back_enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/jquery/back_enabled.png -------------------------------------------------------------------------------- /www/static/images/jquery/forward_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/jquery/forward_disabled.png -------------------------------------------------------------------------------- /www/static/images/jquery/forward_enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/jquery/forward_enabled.png -------------------------------------------------------------------------------- /www/static/images/jquery/jquery.wysiwyg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/jquery/jquery.wysiwyg.gif -------------------------------------------------------------------------------- /www/static/images/jquery/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/jquery/sort_asc.png -------------------------------------------------------------------------------- /www/static/images/jquery/sort_asc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/jquery/sort_asc_disabled.png -------------------------------------------------------------------------------- /www/static/images/jquery/sort_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/jquery/sort_both.png -------------------------------------------------------------------------------- /www/static/images/jquery/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/jquery/sort_desc.png -------------------------------------------------------------------------------- /www/static/images/jquery/sort_desc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/jquery/sort_desc_disabled.png -------------------------------------------------------------------------------- /www/static/images/jquery/tooltip.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/jquery/tooltip.gif -------------------------------------------------------------------------------- /www/static/images/jquery/visualize_tooltip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/jquery/visualize_tooltip.png -------------------------------------------------------------------------------- /www/static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/logo.png -------------------------------------------------------------------------------- /www/static/images/rss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/rss.png -------------------------------------------------------------------------------- /www/static/images/sample_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/sample_image.jpg -------------------------------------------------------------------------------- /www/static/images/sample_image_large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/sample_image_large.jpg -------------------------------------------------------------------------------- /www/static/images/sample_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/sample_logo.png -------------------------------------------------------------------------------- /www/static/images/sample_user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/sample_user.png -------------------------------------------------------------------------------- /www/static/images/unknown-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/unknown-user.png -------------------------------------------------------------------------------- /www/static/images/widgets/widget_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/widgets/widget_add.png -------------------------------------------------------------------------------- /www/static/images/widgets/widget_decrease.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/widgets/widget_decrease.png -------------------------------------------------------------------------------- /www/static/images/widgets/widget_increase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/static/images/widgets/widget_increase.png -------------------------------------------------------------------------------- /www/static/js/login.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | // Notification Close Button 4 | $('.close-notification').click( 5 | function () { 6 | $(this).parent().fadeTo(350, 0, function () {$(this).slideUp(600);}); 7 | return false; 8 | } 9 | ); 10 | 11 | // jQuery Tipsy 12 | $('[rel=tooltip], #main-nav span, .loader').tipsy({gravity:'s', fade:true}); // Tooltip Gravity Orientation: n | w | e | s 13 | 14 | // IE7 doesn't support :disabled 15 | $('.ie7').find(':disabled').addClass('disabled'); 16 | 17 | }); -------------------------------------------------------------------------------- /www/templates/comment_form.html: -------------------------------------------------------------------------------- 1 | {% load avatar_tags %} 2 | {% load common_tags %} 3 | {% load comments %} 4 | 5 | 6 |
7 | {% csrf_token %} 8 |
9 |
10 | {{user.username}} 11 | {{ user|print_username }} 12 |
13 |
14 | {{ form.comment }} 15 | 16 |
17 |
18 | {{ form.content_type }} 19 | {{ form.object_pk }} 20 | {{ form.timestamp }} 21 | {{ form.security_hash }} 22 | 23 |
24 | 25 | 33 | {% comment %} 34 | {% endcomment %} 35 | -------------------------------------------------------------------------------- /www/templates/comments/delete.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %}Delete a comment{% endblock %} 3 | {% block page_title %}댓글 삭제하기{% endblock %} 4 | 5 | {% block page_contents %} 6 | {% load common_tags %} 7 | {% load avatar_tags %} 8 | {% load avatar_custom_tags %} 9 |
10 |
    11 |
  • 12 |
    13 |
    14 | {% avatar comment.user 45 %}
    15 | {{ comment.user|print_username }} 16 |
    17 |
    18 | {{ comment.comment }} 19 |
    20 | {{ comment.submit_date|print_datetime }} 21 |
    22 |
    23 |
  • 24 |
25 |
26 | 27 |
28 |
29 |
30 | 이 댓글을 정말 삭제하시겠습니까? 31 | {% csrf_token %} 32 | {% if next %} 33 | 34 | {% endif %} 35 |

36 | 혹은 Cancel 37 |

38 |
39 |
40 |
41 | {% endblock %} 42 | -------------------------------------------------------------------------------- /www/templates/pagination.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | -------------------------------------------------------------------------------- /www/templates/print_form.html: -------------------------------------------------------------------------------- 1 | {% for field in form %} 2 |
3 |
4 | 7 |
8 |
9 | {{ field }} 10 | {% for error in field.errors %} 11 | 12 | {{ error }} 13 | 14 | {% endfor %} 15 |
16 |
17 | {% endfor %} 18 | -------------------------------------------------------------------------------- /www/templates/print_non_field_error.html: -------------------------------------------------------------------------------- 1 | {% if form.non_field_errors %} 2 |
3 | {% for error in form.non_field_errors %} 4 |

{{ error }}

5 | {% endfor %} 6 |
7 | {% endif %} 8 | 9 | -------------------------------------------------------------------------------- /www/templates/registration/activate.html: -------------------------------------------------------------------------------- 1 | {% extends "registration/registration_base.html" %} 2 | 3 | {% block page_contents %} 4 | 5 |
6 | {% if account %} 7 |

계정이 성공적으로 활성화되었습니다.

8 |

Sign In

9 | {% else %} 10 |

계정 활성화가 실패했습니다. 문제가 있는 경우 운영진에게 문의해 주세요.

11 | {% endif %} 12 |
13 | 14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /www/templates/registration/activation_complete.html: -------------------------------------------------------------------------------- 1 | {% extends "registration/registration_base.html" %} 2 | 3 | {% block page_contents %} 4 | 5 |
6 |

계정이 성공적으로 활성화되었습니다.

7 |

Sign In

8 |
9 | 10 | {% endblock %} 11 | -------------------------------------------------------------------------------- /www/templates/registration/activation_email.txt: -------------------------------------------------------------------------------- 1 | 안녕하세요? 2 | 3 | 한국 프로그래밍 대회 커뮤니티 알고스팟 (algospot.com) 입니다. 4 | 다음 url 을 클릭해 회원 가입시 입력하신 이메일 주소를 확인해 주세요. 5 | 6 | http://algospot.com/{% url "registration_activate" activation_key %} 7 | 8 | 이 링크는 {{ expiration_days }}일간만 유효합니다. 9 | 10 | 감사합니다. 11 | 12 | - algospot.com 13 | -------------------------------------------------------------------------------- /www/templates/registration/activation_email_subject.txt: -------------------------------------------------------------------------------- 1 | 알고스팟 회원 가입 확인 2 | -------------------------------------------------------------------------------- /www/templates/registration/login.html: -------------------------------------------------------------------------------- 1 | {% extends "registration/registration_base.html" %} 2 | {% block title %}Sign in{% endblock %} 3 | {% block page_title %}알고스팟 회원 로그인{% endblock %} 4 | {% block page_contents %} 5 |
6 | 28 |
29 | {% endblock %} 30 | -------------------------------------------------------------------------------- /www/templates/registration/password_reset_complete.html: -------------------------------------------------------------------------------- 1 | {% extends "registration/registration_base.html" %} 2 | {% block page_title %}비밀 번호 리셋{% endblock %} 3 | {% block title %}Reset password{% endblock %} 4 | {% block page_contents %} 5 |
6 |

7 | 비밀번호가 무사히 변경되었습니다. 8 |

9 |

10 | Sign In 11 |

12 |
13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /www/templates/registration/password_reset_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends "registration/registration_base.html" %} 2 | {% block page_title %}비밀 번호 리셋{% endblock %} 3 | {% block title %}Reset password{% endblock %} 4 | {% block page_contents %} 5 |
6 |

7 | 이메일 주소가 확인되었습니다. 새 비밀 번호를 입력해 주세요. 8 |

9 | 10 | {% include "print_non_field_error.html" %} 11 |
12 | {% csrf_token %} 13 |
14 | {% include "print_form.html" %} 15 |
16 | 17 |
18 |
19 | {% endblock %} 20 | -------------------------------------------------------------------------------- /www/templates/registration/password_reset_done.html: -------------------------------------------------------------------------------- 1 | {% extends "registration/registration_base.html" %} 2 | {% block page_title %}비밀 번호 리셋{% endblock %} 3 | {% block title %}Reset password{% endblock %} 4 | {% block page_contents %} 5 |
6 |

7 | 이메일 리셋 메일이 발송되었습니다. 메일함을 확인해 주세요. 8 |

9 |

이메일이 도착하지 않을 경우 스팸 폴더를 확인해 주세요.

10 |
11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /www/templates/registration/password_reset_email.html: -------------------------------------------------------------------------------- 1 | 안녕하세요? 2 | 3 | 한국 프로그래밍 대회 커뮤니티 알고스팟 (algospot.com) 입니다. 4 | 다음 url "을" 클릭해 비밀번호를 변경하세요. 5 | 6 | http://algospot.com{% url "auth_password_reset_confirm" uidb64=uid token=token %} 7 | 8 | 비밀번호 리셋 요청을 직접 하지 않았다면 무시하시면 됩니다. 9 | 10 | 감사합니다. 11 | 12 | - algospot.com 13 | -------------------------------------------------------------------------------- /www/templates/registration/password_reset_form.html: -------------------------------------------------------------------------------- 1 | {% extends "registration/registration_base.html" %} 2 | {% block page_title %}비밀 번호 리셋{% endblock %} 3 | {% block title %}Reset password{% endblock %} 4 | {% block page_contents %} 5 |
6 |

7 | 이메일 주소를 입력하시면 비밀 번호 리셋 메일을 발송해 드립니다. 8 |

9 | 10 | {% include "print_non_field_error.html" %} 11 | 12 |
13 | {% csrf_token %} 14 |
15 | {% include "print_form.html" %} 16 |
17 | 18 |
19 |
20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /www/templates/registration/registration_base.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %} 3 | Sign up! 4 | {% endblock %} 5 | 6 | {% block page_title %} 7 | 알고스팟 회원 가입하기 8 | {% endblock %} 9 | 10 | -------------------------------------------------------------------------------- /www/templates/registration/registration_complete.html: -------------------------------------------------------------------------------- 1 | {% extends "registration/registration_base.html" %} 2 | {% block page_contents %} 3 |
4 |

이메일 주소 확인용 메일이 발송되었습니다. 이메일을 확인해 주세요.

5 |

이메일이 도착하지 않을 경우 스팸 폴더를 확인해 주세요.

6 |
7 | {% endblock %} 8 | 9 | 10 | -------------------------------------------------------------------------------- /www/templates/registration/registration_form.html: -------------------------------------------------------------------------------- 1 | {% extends "registration/registration_base.html" %} 2 | {% block page_contents %} 3 |
4 | 15 |
16 | {% endblock %} 17 | 18 | 19 | -------------------------------------------------------------------------------- /www/templates/search/indexes/forum/post_text.txt: -------------------------------------------------------------------------------- 1 | {{ object.title }} 2 | {{ object.user.username }} 3 | {{ object.text }} 4 | -------------------------------------------------------------------------------- /www/templates/search/indexes/judge/page_text.txt: -------------------------------------------------------------------------------- 1 | {{ object.title }} 2 | {{ object.user.username }} 3 | {{ object.text }} 4 | -------------------------------------------------------------------------------- /www/templates/search/indexes/judge/problem_text.txt: -------------------------------------------------------------------------------- 1 | {{ object.slug }} 2 | {{ object.slug }} 3 | {{ object.slug }} 4 | {{ object.name }} 5 | {{ object.description }} 6 | {{ object.source }} 7 | -------------------------------------------------------------------------------- /www/templates/search/indexes/wiki/page_text.txt: -------------------------------------------------------------------------------- 1 | {{ object.title }} 2 | {{ object.title }} 3 | {{ object.slug }} 4 | {{ object.current_revision.text }} 5 | -------------------------------------------------------------------------------- /www/templates/search/post_snippet.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/templates/search/post_snippet.html -------------------------------------------------------------------------------- /www/wiki/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/wiki/__init__.py -------------------------------------------------------------------------------- /www/wiki/admin.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from models import Page, PageRevision 4 | from django.contrib import admin 5 | 6 | admin.site.register(Page) 7 | admin.site.register(PageRevision) 8 | -------------------------------------------------------------------------------- /www/wiki/fixtures/fixtures.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "model": "wiki.Page", 4 | "pk": 1, 5 | "fields": { 6 | "title": "Main Page", 7 | "slug": "Main_Page", 8 | "current_revision": 1, 9 | "created_on": "2012-02-22 12:55:00", 10 | "modified_on" : "2013-09-04 22:30:12" 11 | } 12 | }, 13 | { 14 | "model": "wiki.Page", 15 | "pk": 2, 16 | "fields": { 17 | "title": "알고스팟 온라인 저지", 18 | "slug": "알고스팟_온라인_저지", 19 | "current_revision": 2, 20 | "created_on": "2012-02-22 12:55:00", 21 | "modified_on" : "2013-09-04 22:30:12" 22 | } 23 | }, 24 | { 25 | "model": "wiki.PageRevision", 26 | "pk": 1, 27 | "fields": { 28 | "edit_summary": "initial version.", 29 | "user": 1, 30 | "revision_for": 1, 31 | "text": "안녕하세요, 위키의 첫 페이지입니다. 오른쪽 위의 편집하기를 눌러 편집하세요.", 32 | "created_on": "2012-02-22 12:55:00" 33 | 34 | } 35 | }, 36 | { 37 | "model": "wiki.PageRevision", 38 | "pk": 2, 39 | "fields": { 40 | "edit_summary": "initial version.", 41 | "user": 1, 42 | "revision_for": 2, 43 | "text": "알고스팟 온라인 저지 도움말 페이지", 44 | "created_on": "2012-02-22 12:55:00" 45 | 46 | } 47 | } 48 | ] 49 | 50 | 51 | -------------------------------------------------------------------------------- /www/wiki/forms.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django import forms 3 | from models import PageRevision 4 | 5 | class EditForm(forms.Form): 6 | text = forms.CharField(widget=forms.Textarea(attrs={"class": "large", 7 | "rows": "20"})) 8 | summary = forms.CharField(max_length=100, 9 | widget=forms.TextInput(attrs={"class": "large"}), 10 | required=False) 11 | 12 | def save(self, page, user): 13 | revision = PageRevision(text=self.cleaned_data["text"], 14 | edit_summary=self.cleaned_data["summary"], 15 | user=user, 16 | revision_for=page) 17 | revision.save() 18 | page.current_revision = revision 19 | page.save() 20 | 21 | -------------------------------------------------------------------------------- /www/wiki/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/wiki/migrations/__init__.py -------------------------------------------------------------------------------- /www/wiki/search_indexes.py: -------------------------------------------------------------------------------- 1 | import datetime 2 | from haystack import indexes 3 | from models import Page 4 | 5 | class PageIndex(indexes.SearchIndex, indexes.Indexable): 6 | text = indexes.EdgeNgramField(document=True, use_template=True) 7 | date = indexes.DateTimeField(model_attr='modified_on') 8 | 9 | def get_model(self): 10 | return Page 11 | 12 | def index_queryset(self, using=None): 13 | return self.get_model().objects.filter(modified_on__lte=datetime.datetime.now()) 14 | -------------------------------------------------------------------------------- /www/wiki/templates/detail.html: -------------------------------------------------------------------------------- 1 | {% extends "wiki-base.html" %} 2 | {% load common_tags %} 3 | hello hahaha 4 | {% block title %} 5 | {{ title }} 6 | {% endblock %} 7 | 8 | 9 | {% block page_title %} 10 | {{ title }} 11 | {% endblock %} 12 | 13 | {% block page_contents %} 14 |
15 |
16 | {{ text|render_text }} 17 |
18 |
19 | {% endblock %} 20 | 21 | {% block page_footer %} 22 |

23 | 페이지가 마지막으로 {{ modified|print_datetime }}에 수정되었습니다. 24 |

25 | {% endblock %} 26 | 27 | {% block other_blocks %} 28 | {% with commentobject=page %} 29 | {% include "comment_block.html" %} 30 | {% endwith %} 31 | {% endblock %} 32 | 33 | {% block wiki_read_class %}default-tab{% endblock %} 34 | -------------------------------------------------------------------------------- /www/wiki/templates/diff.html: -------------------------------------------------------------------------------- 1 | {% extends "wiki-base.html" %} 2 | {% load common_tags %} 3 | 4 | {% block page_title %} 5 | Diff: {{ title }} 6 | ({{rev1}} and 7 | {{rev2}}) 8 | {% endblock %} 9 | 10 | {% block page_contents %} 11 |
12 |
{{ diff|html_diff }} 13 |
14 | {% endblock %} 15 | 16 | {% block page_footer %} 17 | this is a diff 18 | {% endblock %} 19 | 20 | {% block wiki_history_class %}default-tab{% endblock %} 21 | -------------------------------------------------------------------------------- /www/wiki/templates/edit.html: -------------------------------------------------------------------------------- 1 | {% extends "wiki-base.html" %} 2 | 3 | {% block title %} 4 | {{ slug }} 5 | {% endblock %} 6 | 7 | 8 | {% block page_title %} 9 | {{ action }}: {{ title }} 10 | {% endblock %} 11 | 12 | {% block page_contents %} 13 |
14 |
15 |
16 | {% csrf_token %} 17 |
18 | 편집하기 19 | {% include "print_form.html" %} 20 |
21 | or Cancel 22 |
23 |
24 |
25 | 26 | 31 | {% endblock %} 32 | 33 | {% block other_blocks %} 34 | 35 | {% include "markdown_cheatsheet.html" %} 36 | 37 | {% endblock %} 38 | 39 | {% block page_footer %} 40 | Page is last modified on {{ modified }} 41 | {% endblock %} 42 | 43 | {% block wiki_edit_class %}default-tab{% endblock %} 44 | -------------------------------------------------------------------------------- /www/wiki/templates/old.html: -------------------------------------------------------------------------------- 1 | {% extends "wiki-base.html" %} 2 | {% load common_tags %} 3 | {% block title %} 4 | {{ slug }} 5 | {% endblock %} 6 | 7 | {% block page_title %} 8 | History: {{ title }} 9 | {% endblock %} 10 | 11 | {% block page_contents %} 12 |
13 |
14 | {{ text|render_text }} 15 |
16 |
17 | {% endblock %} 18 | 19 | {% block page_footer %} 20 |

21 | {{ modified|print_datetime }}의 페이지입니다. 22 |

23 | {% endblock %} 24 | 25 | {% block wiki_history_class %}default-tab{% endblock %} 26 | -------------------------------------------------------------------------------- /www/wiki/templates/wiki-base.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block wiki_class %}current{% endblock %} 3 | {% block page_tabs %} 4 | 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /www/wiki/templates/wiki-list.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block wiki_class %}current{% endblock %} 3 | {% load common_tags %} 4 | {% block title %} 5 | All Pages 6 | {% endblock %} 7 | 8 | {% block page_title %} 9 | 모든 페이지 10 | {% endblock %} 11 | 12 | {% block wiki_list_class %} 13 | current 14 | {% endblock %} 15 | 16 | 17 | {% block page_contents %} 18 |
19 | 20 | 21 | 22 | 25 | 28 | 31 | 34 | 35 | 36 | 37 | {% for page in pages %} 38 | 39 | 40 | 41 | 42 | 43 | 44 | {% endfor %} 45 | 46 |
23 | {% sortable_table_header "페이지" "title" default %} 24 | 26 | {% sortable_table_header "생성 날짜" "created_on" %} 27 | 29 | {% sortable_table_header "마지막 편집 날짜" "modified_on" %} 30 | 32 | 마지막 편집자 33 |
{{ page.title }}{{ page.created_on|print_datetime }}{{ page.modified_on|print_datetime }}{{ page.current_revision.user|print_username }}
47 |
48 | {% endblock %} 49 | 50 | -------------------------------------------------------------------------------- /www/wiki/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongman/algospot/89294f76d4beaac1cc1e0767bfa42a96f77ccc2f/www/wiki/templatetags/__init__.py -------------------------------------------------------------------------------- /www/wiki/tests.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file demonstrates writing tests using the unittest module. These will pass 3 | when you run "manage.py test". 4 | 5 | Replace this with more appropriate tests for your application. 6 | """ 7 | 8 | from django.test import TestCase 9 | 10 | 11 | class SimpleTest(TestCase): 12 | def test_basic_addition(self): 13 | """ 14 | Tests that 1 + 1 always equals 2. 15 | """ 16 | self.assertEqual(1 + 1, 2) 17 | -------------------------------------------------------------------------------- /www/wiki/urls.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django.conf.urls import url, patterns 3 | import views 4 | 5 | urlpatterns = patterns( 6 | 'wiki.views', 7 | url(r'^list/$', views.list, name='wiki-list'), 8 | url(r'^read/(?P.+)$', views.detail, name='wiki-detail'), 9 | url(r'^edit/(?P.+)$', views.edit, name='wiki-edit'), 10 | url(r'^history/(?P.+)$', views.history, name='wiki-history'), 11 | url(r'^old/(?P[0-9]+)/(?P.+)$', views.old, 12 | name='wiki-old'), 13 | url(r'^revert/(?P[0-9]+)/(?P.+)$', views.revert, 14 | name='wiki-revert'), 15 | url(r'^diff$', views.diff, name='wiki-diff-home'), 16 | url(r'^diff/(?P[0-9]+)/(?P[0-9]+)$', views.diff, 17 | name='wiki-diff'), 18 | ) 19 | 20 | -------------------------------------------------------------------------------- /www/wiki/utils.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django.core.urlresolvers import reverse 3 | from django.utils.html import escape 4 | from models import Page 5 | import logging 6 | import re 7 | 8 | logger = logging.getLogger("wiki") 9 | 10 | def link_to_page(title, display): 11 | slug = slugify(title) 12 | if Page.objects.filter(slug=slug).count() == 0: 13 | return u'%s' % (reverse("wiki-edit", kwargs={"slug": slug}), escape(display or title)) 14 | return u'%s' % (reverse("wiki-detail", kwargs={"slug": slug}), escape(display or title)) 15 | 16 | def slugify(title): 17 | return re.sub(r'\s+', '_', title) 18 | 19 | def unslugify(title): 20 | return re.sub(ur'[_\s]+', ' ', title) 21 | 22 | 23 | --------------------------------------------------------------------------------