Vendor ACE Code Editor

master
Noah 2020-02-17 21:21:34 -08:00
parent 4d97fec246
commit c4ec197456
1843 changed files with 682495 additions and 0 deletions

View File

@ -0,0 +1,6 @@
*Issue #, if available:*
*Description of changes:*
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

View File

@ -0,0 +1,4 @@
## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
opensource-codeofconduct@amazon.com with any additional questions or comments.

View File

@ -0,0 +1,61 @@
# Contributing Guidelines
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
documentation, we greatly value feedback and contributions from our community.
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
information to effectively respond to your bug report or contribution.
## Reporting Bugs/Feature Requests
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
When filing an issue, please check [existing open](https://github.com/ajaxorg/ace-builds/issues), or [recently closed](https://github.com/ajaxorg/ace-builds/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
* A reproducible test case or series of steps
* The version of our code being used
* Any modifications you've made relevant to the bug
* Anything unusual about your environment or deployment
## Contributing via Pull Requests
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
1. You are working against the latest source on the *master* branch.
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
To send us a pull request, please:
1. Fork the repository.
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
3. Ensure local tests pass.
4. Commit to your fork using clear commit messages.
5. Send us a pull request, answering any default questions in the pull request interface.
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
## Finding contributions to work on
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels ((enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/ajaxorg/ace-builds/labels/help%20wanted) issues is a great place to start.
## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
opensource-codeofconduct@amazon.com with any additional questions or comments.
## Security issue notifications
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
## Licensing
See the [LICENSE](https://github.com/ajaxorg/ace-builds/blob/master/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.

View File

@ -0,0 +1,459 @@
2020.01.14 Version 1.4.8
* highlight both matched braces, and highlight unmatched brace in red
* improve snippet manager
* compatibility with webpack file-loader v5
* improve vim mode
2019.10.17 Version 1.4.7
* add placeholder option
2019.09.08 Version 1.4.6
* restore native behavior of ctrl-p on mac (jumptomatching command is moved to cmd-\)
* improve snippet manager
* fix backspace handling on mobile
2019.06.17 Version 1.4.5
* improve scrolling and selection on mobile
* improve type definitions
2019.04.24 Version 1.4.4
* add experimental command prompt
* add chrystal, nim and nginx highlight rules
* fix regression in vim mode on ios
2019.02.21 Version 1.4.3
* add sublime keybindings
* add rtl option
* implement ` and < textobjects in vim mode
2018.11.21 Version 1.4.2
* fix regression in vim mode
* improve keyboard input handling on ipad and IE
* add new syntax highlighters
2018.08.07 Version 1.4.1
* fix regression in autocomplete
2018.08.06 Version 1.4.0
* remove usage of innerHTML
* improved handling of textinput for IME and mobile
* add support for relative line numbers
* improve autocompletion popup
2018.03.26 Version 1.3.3
* fix regession in static-highlight extension
* use css animation for cursor blinking
2018.03.21 Version 1.3.2
* add experimental support for using ace-builds with webpack
2018.02.11 Version 1.3.1
* fixed regression with selectionChange event not firing some times
* improved handling of non-ascii characters in vim normal mode
2018.01.31 Version 1.3.0
* added copy copyWithEmptySelection option
* improved undoManager
* improved settings_menu plugin
* improved handling of files with very long lines
* fixed bug with scrolling editor out of view in transformed elements
2017.10.17 Version 1.2.9
* added support for bidirectional text, with monospace font (Alex Shensis)
* added support for emoji 😊
* new language modes
- Red (Toomas Vooglaid)
- CSound (Nathan Whetsell)
- JSSM (John Haugeland)
* New Themes
- Dracula (Austin Schwartz)
2017.07.02 Version 1.2.8
* Fixed small bugs in searchbox and autocompleter
2017.06.18 Version 1.2.7
* Added Support for arrow keys on external IPad keyboard (Emanuele Tamponi)
* added match counter to searchbox extension
- implemented higlighting of multiline strings in yaml mode (Maxim Trushin)
- improved haml syntax highlighter (Andrés Álvarez)
2016.12.03 Version 1.2.6
* Fixed IME handling on new Chrome
* Support for php 7 in the syntax checker
2016.08.16 Version 1.2.5
* Fixed regression in noconflict mode
2016.07.27 Version 1.2.4
* Maintenance release with several new modes and small bugfixes
2016.01.17 Version 1.2.3
* Bugfixes
- fix memory leak in setSession (Tyler Stalder)
- double click not working on linux/mac
* new language modes
- reStructuredText (Robin Jarry)
- NSIS (Jan T. Sott)
2015.10.28 Version 1.2.1
* new language modes
- Swift
- JSX
2015.07.11 Version 1.2.0
* New Features
- Indented soft wrap (danyaPostfactum)
- Rounded borders on selections
* API Changes
- unified delta types `{start, end, action, lines}` (Alden Daniels https://github.com/ajaxorg/ace/pull/1745)
- "change" event listeners on session and editor get delta objects directly
* new language modes
- SQLServer (Morgan Yarbrough)
2015.04.03 Version 1.1.9
- Small Enhancements and Bugfixes
2014.11.08 Version 1.1.8
* API Changes
- `editor.commands.commandKeyBinding` now contains direct map from keys to commands instead of grouping them by hashid
* New Features
- Improved autoindent for html and php modes (Adam Jimenez)
- Find All from searchbox (Colton Voege)
* new language modes
- Elixir, Elm
2014.09.21 Version 1.1.7
* Bugfixes
- fix several bugs in autocompletion
- workaround for inaccurate getBoundingClientRect on chrome 37
2014.08.17 Version 1.1.6
* Bugfixes
- fix regression in double tap to highlight
- Improved Latex Mode (Daniel Felder)
* API Changes
- editor.destroy destroys editor.session too (call editor.setSession(null) to prevent that)
* new language modes
- Praat (José Joaquín Atria)
- Eiffel (Victorien Elvinger)
- G-code (Adam Joseph Cook)
2014.07.09 Version 1.1.5
* Bugfixes
- fix regression in autocomplete popup
* new language modes
- gitignore (Devon Carew)
2014.07.01 Version 1.1.4
* New Features
- Highlight matching tags (Adam Jimenez)
- Improved jump to matching command (Adam Jimenez)
* new language modes
- AppleScript (Yaogang Lian)
- Vala
2014.03.08 Version 1.1.3
* New Features
- Allow syntax checkers to be loaded from CDN (Derk-Jan Hartman)
- Add ColdFusion behavior (Abram Adams)
- add showLineNumbers option
- Add html syntax checker (danyaPostfactum)
* new language modes
- Gherkin (Patrick Nevels)
- Smarty
2013.12.02 Version 1.1.2
* New Features
- Accessibility Theme for Ace (Peter Xiao)
- use snipetManager for expanding emmet snippets
- update jshint to 2.1.4
- improve php syntax checker (jdalegonzalez)
- add option for autoresizing
- add option for autohiding vertical scrollbar
- improvements to highlighting of xml like languages (danyaPostfactum)
- add support for autocompletion and snippets (gjtorikyan danyaPostfactum and others)
- add option to merge similar changes in undo history
- add scrollPastEnd option
- use html5 dragndrop for text dragging (danyaPostfactum)
* API Changes
- fixed typo in HashHandler commmandManager
* new language modes
- Nix (Zef Hemel)
- Protobuf (Zef Hemel)
- Soy
- Handlebars
2013.06.04 Version 1.1.1
- Improved emacs keybindings (Robert Krahn)
- Added markClean, isClean methods to UndoManager (Joonsoo Jeon)
- Do not allow `Toggle comments` command to remove spaces from indentation
- Softer colors for indent guides in dark themes
* new language modes
- Ada
- Assembly_x86
- Cobol
- D
- ejs
- MATLAB
- MySQL
- Twig
- Verilog
2013.05.01, Version 1.1.0
* API Changes
- Default position of the editor container is changed to relative. Add `.ace_editor {position: absolute}` css rule to restore old behavior
- Changed default line-height to `normal` to not conflict with bootstrap. Use `line-height: inherit` for old behavior.
- Changed marker types accepted by session.addMarker. It now accepts "text"|"line"|"fullLine"|"screenLine"
- Internal classnames used by editor were made more consistent
- Introduced `editor.setOption/getOption/setOptions/getOptions` methods
- Introduced positionToIndex, indexToPosition methods
* New Features
- Improved emacs mode (chetstone)
with Incremental search and Occur modes (Robert Krahn)
- Improved ime handling
- Searchbox (Vlad Zinculescu)
- Added elastic tabstops lite extension (Garen Torikian)
- Added extension for whitespace manipulation
- Added extension for enabling spellchecking from contextmenu
- Added extension for displaying available keyboard shortcuts (Matthew Christopher Kastor-Inare III)
- Added extension for displaying options panel (Matthew Christopher Kastor-Inare III)
- Added modelist extension (Matthew Christopher Kastor-Inare III)
- Improved toggleCommentLines and added ToggleCommentBlock command
- `:;` pairing in CSS mode (danyaPostfactum)
- Added suppoert for Delete and SelectAll from context menu (danyaPostfactum)
- Make wrapping behavior optional
- Selective bracket insertion/skipping
- Added commands for increase/decrease numbers, sort lines (Vlad Zinculescu)
- Folding for Markdown, Lua, LaTeX
- Selective bracket insertion/skipping for C-like languages
* Many new languages
- Scheme (Mu Lei)
- Dot (edwardsp)
- FreeMarker (nguillaumin)
- Tiny Mushcode (h3rb)
- Velocity (Ryan Griffith)
- TOML (Garen Torikian)
- LSL (Nemurimasu Neiro, Builders Brewery)
- Curly (Libo Cannici)
- vbScript (Jan Jongboom)
- R (RStudio)
- ABAP
- Lucene (Graham Scott)
- Haml (Garen Torikian)
- Objective-C (Garen Torikian)
- Makefile (Garen Torikian)
- TypeScript (Garen Torikian)
- Lisp (Garen Torikian)
- Stylus (Garen Torikian)
- Dart (Garen Torikian)
* Live syntax checks
- PHP (danyaPostfactum)
- Lua
* New Themes
- Chaos
- Terminal
2012.09.17, Version 1.0.0
* New Features
- Multiple cursors and selections (https://c9.io/site/blog/2012/08/be-an-armenian-warrior-with-block-selection-on-steroids/)
- Fold buttons displayed in the gutter
- Indent Guides
- Completely reworked vim mode (Sergi Mansilla)
- Improved emacs keybindings
- Autoclosing of html tags (danyaPostfactum)
* 20 New language modes
- Coldfusion (Russ)
- Diff
- GLSL (Ed Mackey)
- Go (Davide Saurino)
- Haxe (Jason O'Neil)
- Jade (Garen Torikian)
- jsx (Syu Kato)
- LaTeX (James Allen)
- Less (John Roepke)
- Liquid (Bernie Telles)
- Lua (Lee Gao)
- LuaPage (Choonster)
- Markdown (Chris Spencer)
- PostgreSQL (John DeSoi)
- Powershell (John Kane)
- Sh (Richo Healey)
- SQL (Jonathan Camile)
- Tcl (Cristoph Hochreiner)
- XQuery (William Candillion)
- Yaml (Meg Sharkey)
* Live syntax checks
- for XQuery and JSON
* New Themes
- Ambiance (Irakli Gozalishvili)
- Dreamweaver (Adam Jimenez)
- Github (bootstraponline)
- Tommorrow themes (https://github.com/chriskempson/tomorrow-theme)
- XCode
* Many Small Enhancements and Bugfixes
2011.08.02, Version 0.2.0
* Split view (Julian Viereck)
- split editor area horizontally or vertivally to show two files at the same
time
* Code Folding (Julian Viereck)
- Unstructured code folding
- Will be the basis for language aware folding
* Mode behaviours (Chris Spencer)
- Adds mode specific hooks which allow transformations of entered text
- Autoclosing of braces, paranthesis and quotation marks in C style modes
- Autoclosing of angular brackets in XML style modes
* New language modes
- Clojure (Carin Meier)
- C# (Rob Conery)
- Groovy (Ben Tilford)
- Scala (Ben Tilford)
- JSON
- OCaml (Sergi Mansilla)
- Perl (Panagiotis Astithas)
- SCSS/SASS (Andreas Madsen)
- SVG
- Textile (Kelley van Evert)
- SCAD (Jacob Hansson)
* Live syntax checks
- Lint for CSS using CSS Lint <http://csslint.net/>
- CoffeeScript
* New Themes
- Crimson Editor (iebuggy)
- Merbivore (Michael Schwartz)
- Merbivore soft (Michael Schwartz)
- Solarized dark/light <http://ethanschoonover.com/solarized> (David Alan Hjelle)
- Vibrant Ink (Michael Schwartz)
* Small Features/Enhancements
- Lots of render performance optimizations (Harutyun Amirjanyan)
- Improved Ruby highlighting (Chris Wanstrath, Trent Ogren)
- Improved PHP highlighting (Thomas Hruska)
- Improved CSS highlighting (Sean Kellogg)
- Clicks which cause the editor to be focused don't reset the selection
- Make padding text layer specific so that print margin and active line
highlight are not affected (Irakli Gozalishvili)
- Added setFontSize method
- Improved vi keybindings (Trent Ogren)
- When unfocused make cursor transparent instead of removing it (Harutyun Amirjanyan)
- Support for matching groups in tokenizer with arrays of tokens (Chris Spencer)
* Bug fixes
- Add support for the new OSX scroll bars
- Properly highlight JavaScript regexp literals
- Proper handling of unicode characters in JavaScript identifiers
- Fix remove lines command on last line (Harutyun Amirjanyan)
- Fix scroll wheel sluggishness in Safari
- Make keyboard infrastructure route keys like []^$ the right way (Julian Viereck)
2011.02.14, Version 0.1.6
* Floating Anchors
- An Anchor is a floating pointer in the document.
- Whenever text is inserted or deleted before the cursor, the position of
the cursor is updated
- Usesd for the cursor and selection
- Basis for bookmarks, multiple cursors and snippets in the future
* Extensive support for Cocoa style keybindings on the Mac <https://github.com/ajaxorg/ace/issues/closed#issue/116/comment/767803>
* New commands:
- center selection in viewport
- remove to end/start of line
- split line
- transpose letters
* Refator markers
- Custom code can be used to render markers
- Markers can be in front or behind the text
- Markers are now stored in the session (was in the renderer)
* Lots of IE8 fixes including copy, cut and selections
* Unit tests can also be run in the browser
<https://github.com/ajaxorg/ace/blob/master/lib/ace/test/tests.html>
* Soft wrap can adapt to the width of the editor (Mike Ratcliffe, Joe Cheng)
* Add minimal node server server.js to run the Ace demo in Chrome
* The top level editor.html demo has been renamed to index.html
* Bug fixes
- Fixed gotoLine to consider wrapped lines when calculating where to scroll to (James Allen)
- Fixed isues when the editor was scrolled in the web page (Eric Allam)
- Highlighting of Python string literals
- Syntax rule for PHP comments
2011.02.08, Version 0.1.5
* Add Coffeescript Mode (Satoshi Murakami)
* Fix word wrap bug (Julian Viereck)
* Fix packaged version of the Eclipse mode
* Loading of workers is more robust
* Fix "click selection"
* Allow tokizing empty lines (Daniel Krech)
* Make PageUp/Down behavior more consistent with native OS (Joe Cheng)
2011.02.04, Version 0.1.4
* Add C/C++ mode contributed by Gastón Kleiman
* Fix exception in key input
2011.02.04, Version 0.1.3
* Let the packaged version play nice with requireJS
* Add Ruby mode contributed by Shlomo Zalman Heigh
* Add Java mode contributed by Tom Tasche
* Fix annotation bug
* Changing a document added a new empty line at the end

View File

@ -0,0 +1,24 @@
Copyright (c) 2010, Ajax.org B.V.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Ajax.org B.V. nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -0,0 +1,23 @@
Ace (Ajax.org Cloud9 Editor)
============================
[![CDNJS](https://img.shields.io/cdnjs/v/ace.svg)](https://cdnjs.com/libraries/ace)
[![npm](https://img.shields.io/npm/v/ace-builds.svg)](https://www.npmjs.com/package/ace-builds)
Ace is a code editor written in JavaScript.
This repository has only generated files.
If you want to work on ace please go to https://github.com/ajaxorg/ace instead.
here you can find pre-built files for convenience of embedding.
it contains 4 versions
* [src](https://github.com/ajaxorg/ace-builds/tree/master/src) concatenated but not minified
* [src-min](https://github.com/ajaxorg/ace-builds/tree/master/src-min) concatenated and minified with uglify.js
* [src-noconflict](https://github.com/ajaxorg/ace-builds/tree/master/src-noconflict) uses ace.require instead of require
* [src-min-noconflict](https://github.com/ajaxorg/ace-builds/tree/master/src-min-noconflict) concatenated, minified with uglify.js, and uses ace.require instead of require
For a simple way of embedding ace into webpage see [editor.html](https://github.com/ajaxorg/ace-builds/blob/master/editor.html) or list of other [simple examples](https://github.com/ajaxorg/ace-builds/tree/master/demo)
To see ace in action go to [kitchen-sink-demo](http://ajaxorg.github.com/ace-builds/kitchen-sink.html), [scrollable-page-demo](http://ajaxorg.github.com/ace-builds/demo/scrollable-page.html) or [minimal demo](http://ajaxorg.github.com/ace-builds/editor.html),

View File

@ -0,0 +1,393 @@
declare module 'ace-builds/src-noconflict/ext-beautify';
declare module 'ace-builds/src-noconflict/ext-elastic_tabstops_lite';
declare module 'ace-builds/src-noconflict/ext-emmet';
declare module 'ace-builds/src-noconflict/ext-error_marker';
declare module 'ace-builds/src-noconflict/ext-keybinding_menu';
declare module 'ace-builds/src-noconflict/ext-language_tools';
declare module 'ace-builds/src-noconflict/ext-linking';
declare module 'ace-builds/src-noconflict/ext-modelist';
declare module 'ace-builds/src-noconflict/ext-options';
declare module 'ace-builds/src-noconflict/ext-prompt';
declare module 'ace-builds/src-noconflict/ext-rtl';
declare module 'ace-builds/src-noconflict/ext-searchbox';
declare module 'ace-builds/src-noconflict/ext-settings_menu';
declare module 'ace-builds/src-noconflict/ext-spellcheck';
declare module 'ace-builds/src-noconflict/ext-split';
declare module 'ace-builds/src-noconflict/ext-static_highlight';
declare module 'ace-builds/src-noconflict/ext-statusbar';
declare module 'ace-builds/src-noconflict/ext-textarea';
declare module 'ace-builds/src-noconflict/ext-themelist';
declare module 'ace-builds/src-noconflict/ext-whitespace';
declare module 'ace-builds/src-noconflict/keybinding-emacs';
declare module 'ace-builds/src-noconflict/keybinding-sublime';
declare module 'ace-builds/src-noconflict/keybinding-vim';
declare module 'ace-builds/src-noconflict/mode-abap';
declare module 'ace-builds/src-noconflict/mode-abc';
declare module 'ace-builds/src-noconflict/mode-actionscript';
declare module 'ace-builds/src-noconflict/mode-ada';
declare module 'ace-builds/src-noconflict/mode-apache_conf';
declare module 'ace-builds/src-noconflict/mode-apex';
declare module 'ace-builds/src-noconflict/mode-applescript';
declare module 'ace-builds/src-noconflict/mode-aql';
declare module 'ace-builds/src-noconflict/mode-asciidoc';
declare module 'ace-builds/src-noconflict/mode-asl';
declare module 'ace-builds/src-noconflict/mode-assembly_x86';
declare module 'ace-builds/src-noconflict/mode-autohotkey';
declare module 'ace-builds/src-noconflict/mode-batchfile';
declare module 'ace-builds/src-noconflict/mode-bro';
declare module 'ace-builds/src-noconflict/mode-c9search';
declare module 'ace-builds/src-noconflict/mode-cirru';
declare module 'ace-builds/src-noconflict/mode-clojure';
declare module 'ace-builds/src-noconflict/mode-cobol';
declare module 'ace-builds/src-noconflict/mode-coffee';
declare module 'ace-builds/src-noconflict/mode-coldfusion';
declare module 'ace-builds/src-noconflict/mode-crystal';
declare module 'ace-builds/src-noconflict/mode-csharp';
declare module 'ace-builds/src-noconflict/mode-csound_document';
declare module 'ace-builds/src-noconflict/mode-csound_orchestra';
declare module 'ace-builds/src-noconflict/mode-csound_score';
declare module 'ace-builds/src-noconflict/mode-csp';
declare module 'ace-builds/src-noconflict/mode-css';
declare module 'ace-builds/src-noconflict/mode-curly';
declare module 'ace-builds/src-noconflict/mode-c_cpp';
declare module 'ace-builds/src-noconflict/mode-d';
declare module 'ace-builds/src-noconflict/mode-dart';
declare module 'ace-builds/src-noconflict/mode-diff';
declare module 'ace-builds/src-noconflict/mode-django';
declare module 'ace-builds/src-noconflict/mode-dockerfile';
declare module 'ace-builds/src-noconflict/mode-dot';
declare module 'ace-builds/src-noconflict/mode-drools';
declare module 'ace-builds/src-noconflict/mode-edifact';
declare module 'ace-builds/src-noconflict/mode-eiffel';
declare module 'ace-builds/src-noconflict/mode-ejs';
declare module 'ace-builds/src-noconflict/mode-elixir';
declare module 'ace-builds/src-noconflict/mode-elm';
declare module 'ace-builds/src-noconflict/mode-erlang';
declare module 'ace-builds/src-noconflict/mode-forth';
declare module 'ace-builds/src-noconflict/mode-fortran';
declare module 'ace-builds/src-noconflict/mode-fsharp';
declare module 'ace-builds/src-noconflict/mode-fsl';
declare module 'ace-builds/src-noconflict/mode-ftl';
declare module 'ace-builds/src-noconflict/mode-gcode';
declare module 'ace-builds/src-noconflict/mode-gherkin';
declare module 'ace-builds/src-noconflict/mode-gitignore';
declare module 'ace-builds/src-noconflict/mode-glsl';
declare module 'ace-builds/src-noconflict/mode-gobstones';
declare module 'ace-builds/src-noconflict/mode-golang';
declare module 'ace-builds/src-noconflict/mode-graphqlschema';
declare module 'ace-builds/src-noconflict/mode-groovy';
declare module 'ace-builds/src-noconflict/mode-haml';
declare module 'ace-builds/src-noconflict/mode-handlebars';
declare module 'ace-builds/src-noconflict/mode-haskell';
declare module 'ace-builds/src-noconflict/mode-haskell_cabal';
declare module 'ace-builds/src-noconflict/mode-haxe';
declare module 'ace-builds/src-noconflict/mode-hjson';
declare module 'ace-builds/src-noconflict/mode-html';
declare module 'ace-builds/src-noconflict/mode-html_elixir';
declare module 'ace-builds/src-noconflict/mode-html_ruby';
declare module 'ace-builds/src-noconflict/mode-ini';
declare module 'ace-builds/src-noconflict/mode-io';
declare module 'ace-builds/src-noconflict/mode-jack';
declare module 'ace-builds/src-noconflict/mode-jade';
declare module 'ace-builds/src-noconflict/mode-java';
declare module 'ace-builds/src-noconflict/mode-javascript';
declare module 'ace-builds/src-noconflict/mode-json';
declare module 'ace-builds/src-noconflict/mode-jsoniq';
declare module 'ace-builds/src-noconflict/mode-jsp';
declare module 'ace-builds/src-noconflict/mode-jssm';
declare module 'ace-builds/src-noconflict/mode-jsx';
declare module 'ace-builds/src-noconflict/mode-julia';
declare module 'ace-builds/src-noconflict/mode-kotlin';
declare module 'ace-builds/src-noconflict/mode-latex';
declare module 'ace-builds/src-noconflict/mode-less';
declare module 'ace-builds/src-noconflict/mode-liquid';
declare module 'ace-builds/src-noconflict/mode-lisp';
declare module 'ace-builds/src-noconflict/mode-livescript';
declare module 'ace-builds/src-noconflict/mode-logiql';
declare module 'ace-builds/src-noconflict/mode-logtalk';
declare module 'ace-builds/src-noconflict/mode-lsl';
declare module 'ace-builds/src-noconflict/mode-lua';
declare module 'ace-builds/src-noconflict/mode-luapage';
declare module 'ace-builds/src-noconflict/mode-lucene';
declare module 'ace-builds/src-noconflict/mode-makefile';
declare module 'ace-builds/src-noconflict/mode-markdown';
declare module 'ace-builds/src-noconflict/mode-mask';
declare module 'ace-builds/src-noconflict/mode-matlab';
declare module 'ace-builds/src-noconflict/mode-maze';
declare module 'ace-builds/src-noconflict/mode-mel';
declare module 'ace-builds/src-noconflict/mode-mixal';
declare module 'ace-builds/src-noconflict/mode-mushcode';
declare module 'ace-builds/src-noconflict/mode-mysql';
declare module 'ace-builds/src-noconflict/mode-nginx';
declare module 'ace-builds/src-noconflict/mode-nim';
declare module 'ace-builds/src-noconflict/mode-nix';
declare module 'ace-builds/src-noconflict/mode-nsis';
declare module 'ace-builds/src-noconflict/mode-objectivec';
declare module 'ace-builds/src-noconflict/mode-ocaml';
declare module 'ace-builds/src-noconflict/mode-pascal';
declare module 'ace-builds/src-noconflict/mode-perl';
declare module 'ace-builds/src-noconflict/mode-perl6';
declare module 'ace-builds/src-noconflict/mode-pgsql';
declare module 'ace-builds/src-noconflict/mode-php';
declare module 'ace-builds/src-noconflict/mode-php_laravel_blade';
declare module 'ace-builds/src-noconflict/mode-pig';
declare module 'ace-builds/src-noconflict/mode-plain_text';
declare module 'ace-builds/src-noconflict/mode-powershell';
declare module 'ace-builds/src-noconflict/mode-praat';
declare module 'ace-builds/src-noconflict/mode-prolog';
declare module 'ace-builds/src-noconflict/mode-properties';
declare module 'ace-builds/src-noconflict/mode-protobuf';
declare module 'ace-builds/src-noconflict/mode-puppet';
declare module 'ace-builds/src-noconflict/mode-python';
declare module 'ace-builds/src-noconflict/mode-r';
declare module 'ace-builds/src-noconflict/mode-razor';
declare module 'ace-builds/src-noconflict/mode-rdoc';
declare module 'ace-builds/src-noconflict/mode-red';
declare module 'ace-builds/src-noconflict/mode-redshift';
declare module 'ace-builds/src-noconflict/mode-rhtml';
declare module 'ace-builds/src-noconflict/mode-rst';
declare module 'ace-builds/src-noconflict/mode-ruby';
declare module 'ace-builds/src-noconflict/mode-rust';
declare module 'ace-builds/src-noconflict/mode-sass';
declare module 'ace-builds/src-noconflict/mode-scad';
declare module 'ace-builds/src-noconflict/mode-scala';
declare module 'ace-builds/src-noconflict/mode-scheme';
declare module 'ace-builds/src-noconflict/mode-scss';
declare module 'ace-builds/src-noconflict/mode-sh';
declare module 'ace-builds/src-noconflict/mode-sjs';
declare module 'ace-builds/src-noconflict/mode-slim';
declare module 'ace-builds/src-noconflict/mode-smarty';
declare module 'ace-builds/src-noconflict/mode-snippets';
declare module 'ace-builds/src-noconflict/mode-soy_template';
declare module 'ace-builds/src-noconflict/mode-space';
declare module 'ace-builds/src-noconflict/mode-sparql';
declare module 'ace-builds/src-noconflict/mode-sql';
declare module 'ace-builds/src-noconflict/mode-sqlserver';
declare module 'ace-builds/src-noconflict/mode-stylus';
declare module 'ace-builds/src-noconflict/mode-svg';
declare module 'ace-builds/src-noconflict/mode-swift';
declare module 'ace-builds/src-noconflict/mode-tcl';
declare module 'ace-builds/src-noconflict/mode-terraform';
declare module 'ace-builds/src-noconflict/mode-tex';
declare module 'ace-builds/src-noconflict/mode-text';
declare module 'ace-builds/src-noconflict/mode-textile';
declare module 'ace-builds/src-noconflict/mode-toml';
declare module 'ace-builds/src-noconflict/mode-tsx';
declare module 'ace-builds/src-noconflict/mode-turtle';
declare module 'ace-builds/src-noconflict/mode-twig';
declare module 'ace-builds/src-noconflict/mode-typescript';
declare module 'ace-builds/src-noconflict/mode-vala';
declare module 'ace-builds/src-noconflict/mode-vbscript';
declare module 'ace-builds/src-noconflict/mode-velocity';
declare module 'ace-builds/src-noconflict/mode-verilog';
declare module 'ace-builds/src-noconflict/mode-vhdl';
declare module 'ace-builds/src-noconflict/mode-visualforce';
declare module 'ace-builds/src-noconflict/mode-wollok';
declare module 'ace-builds/src-noconflict/mode-xml';
declare module 'ace-builds/src-noconflict/mode-xquery';
declare module 'ace-builds/src-noconflict/mode-yaml';
declare module 'ace-builds/src-noconflict/mode-zeek';
declare module 'ace-builds/src-noconflict/theme-ambiance';
declare module 'ace-builds/src-noconflict/theme-chaos';
declare module 'ace-builds/src-noconflict/theme-chrome';
declare module 'ace-builds/src-noconflict/theme-clouds';
declare module 'ace-builds/src-noconflict/theme-clouds_midnight';
declare module 'ace-builds/src-noconflict/theme-cobalt';
declare module 'ace-builds/src-noconflict/theme-crimson_editor';
declare module 'ace-builds/src-noconflict/theme-dawn';
declare module 'ace-builds/src-noconflict/theme-dracula';
declare module 'ace-builds/src-noconflict/theme-dreamweaver';
declare module 'ace-builds/src-noconflict/theme-eclipse';
declare module 'ace-builds/src-noconflict/theme-github';
declare module 'ace-builds/src-noconflict/theme-gob';
declare module 'ace-builds/src-noconflict/theme-gruvbox';
declare module 'ace-builds/src-noconflict/theme-idle_fingers';
declare module 'ace-builds/src-noconflict/theme-iplastic';
declare module 'ace-builds/src-noconflict/theme-katzenmilch';
declare module 'ace-builds/src-noconflict/theme-kr_theme';
declare module 'ace-builds/src-noconflict/theme-kuroir';
declare module 'ace-builds/src-noconflict/theme-merbivore';
declare module 'ace-builds/src-noconflict/theme-merbivore_soft';
declare module 'ace-builds/src-noconflict/theme-monokai';
declare module 'ace-builds/src-noconflict/theme-mono_industrial';
declare module 'ace-builds/src-noconflict/theme-pastel_on_dark';
declare module 'ace-builds/src-noconflict/theme-solarized_dark';
declare module 'ace-builds/src-noconflict/theme-solarized_light';
declare module 'ace-builds/src-noconflict/theme-sqlserver';
declare module 'ace-builds/src-noconflict/theme-terminal';
declare module 'ace-builds/src-noconflict/theme-textmate';
declare module 'ace-builds/src-noconflict/theme-tomorrow';
declare module 'ace-builds/src-noconflict/theme-tomorrow_night';
declare module 'ace-builds/src-noconflict/theme-tomorrow_night_blue';
declare module 'ace-builds/src-noconflict/theme-tomorrow_night_bright';
declare module 'ace-builds/src-noconflict/theme-tomorrow_night_eighties';
declare module 'ace-builds/src-noconflict/theme-twilight';
declare module 'ace-builds/src-noconflict/theme-vibrant_ink';
declare module 'ace-builds/src-noconflict/theme-xcode';
declare module 'ace-builds/src-noconflict/snippets/abap';
declare module 'ace-builds/src-noconflict/snippets/abc';
declare module 'ace-builds/src-noconflict/snippets/actionscript';
declare module 'ace-builds/src-noconflict/snippets/ada';
declare module 'ace-builds/src-noconflict/snippets/apache_conf';
declare module 'ace-builds/src-noconflict/snippets/apex';
declare module 'ace-builds/src-noconflict/snippets/applescript';
declare module 'ace-builds/src-noconflict/snippets/aql';
declare module 'ace-builds/src-noconflict/snippets/asciidoc';
declare module 'ace-builds/src-noconflict/snippets/asl';
declare module 'ace-builds/src-noconflict/snippets/assembly_x86';
declare module 'ace-builds/src-noconflict/snippets/autohotkey';
declare module 'ace-builds/src-noconflict/snippets/batchfile';
declare module 'ace-builds/src-noconflict/snippets/bro';
declare module 'ace-builds/src-noconflict/snippets/c9search';
declare module 'ace-builds/src-noconflict/snippets/cirru';
declare module 'ace-builds/src-noconflict/snippets/clojure';
declare module 'ace-builds/src-noconflict/snippets/cobol';
declare module 'ace-builds/src-noconflict/snippets/coffee';
declare module 'ace-builds/src-noconflict/snippets/coldfusion';
declare module 'ace-builds/src-noconflict/snippets/crystal';
declare module 'ace-builds/src-noconflict/snippets/csharp';
declare module 'ace-builds/src-noconflict/snippets/csound_document';
declare module 'ace-builds/src-noconflict/snippets/csound_orchestra';
declare module 'ace-builds/src-noconflict/snippets/csound_score';
declare module 'ace-builds/src-noconflict/snippets/csp';
declare module 'ace-builds/src-noconflict/snippets/css';
declare module 'ace-builds/src-noconflict/snippets/curly';
declare module 'ace-builds/src-noconflict/snippets/c_cpp';
declare module 'ace-builds/src-noconflict/snippets/d';
declare module 'ace-builds/src-noconflict/snippets/dart';
declare module 'ace-builds/src-noconflict/snippets/diff';
declare module 'ace-builds/src-noconflict/snippets/django';
declare module 'ace-builds/src-noconflict/snippets/dockerfile';
declare module 'ace-builds/src-noconflict/snippets/dot';
declare module 'ace-builds/src-noconflict/snippets/drools';
declare module 'ace-builds/src-noconflict/snippets/edifact';
declare module 'ace-builds/src-noconflict/snippets/eiffel';
declare module 'ace-builds/src-noconflict/snippets/ejs';
declare module 'ace-builds/src-noconflict/snippets/elixir';
declare module 'ace-builds/src-noconflict/snippets/elm';
declare module 'ace-builds/src-noconflict/snippets/erlang';
declare module 'ace-builds/src-noconflict/snippets/forth';
declare module 'ace-builds/src-noconflict/snippets/fortran';
declare module 'ace-builds/src-noconflict/snippets/fsharp';
declare module 'ace-builds/src-noconflict/snippets/fsl';
declare module 'ace-builds/src-noconflict/snippets/ftl';
declare module 'ace-builds/src-noconflict/snippets/gcode';
declare module 'ace-builds/src-noconflict/snippets/gherkin';
declare module 'ace-builds/src-noconflict/snippets/gitignore';
declare module 'ace-builds/src-noconflict/snippets/glsl';
declare module 'ace-builds/src-noconflict/snippets/gobstones';
declare module 'ace-builds/src-noconflict/snippets/golang';
declare module 'ace-builds/src-noconflict/snippets/graphqlschema';
declare module 'ace-builds/src-noconflict/snippets/groovy';
declare module 'ace-builds/src-noconflict/snippets/haml';
declare module 'ace-builds/src-noconflict/snippets/handlebars';
declare module 'ace-builds/src-noconflict/snippets/haskell';
declare module 'ace-builds/src-noconflict/snippets/haskell_cabal';
declare module 'ace-builds/src-noconflict/snippets/haxe';
declare module 'ace-builds/src-noconflict/snippets/hjson';
declare module 'ace-builds/src-noconflict/snippets/html';
declare module 'ace-builds/src-noconflict/snippets/html_elixir';
declare module 'ace-builds/src-noconflict/snippets/html_ruby';
declare module 'ace-builds/src-noconflict/snippets/ini';
declare module 'ace-builds/src-noconflict/snippets/io';
declare module 'ace-builds/src-noconflict/snippets/jack';
declare module 'ace-builds/src-noconflict/snippets/jade';
declare module 'ace-builds/src-noconflict/snippets/java';
declare module 'ace-builds/src-noconflict/snippets/javascript';
declare module 'ace-builds/src-noconflict/snippets/json';
declare module 'ace-builds/src-noconflict/snippets/jsoniq';
declare module 'ace-builds/src-noconflict/snippets/jsp';
declare module 'ace-builds/src-noconflict/snippets/jssm';
declare module 'ace-builds/src-noconflict/snippets/jsx';
declare module 'ace-builds/src-noconflict/snippets/julia';
declare module 'ace-builds/src-noconflict/snippets/kotlin';
declare module 'ace-builds/src-noconflict/snippets/latex';
declare module 'ace-builds/src-noconflict/snippets/less';
declare module 'ace-builds/src-noconflict/snippets/liquid';
declare module 'ace-builds/src-noconflict/snippets/lisp';
declare module 'ace-builds/src-noconflict/snippets/livescript';
declare module 'ace-builds/src-noconflict/snippets/logiql';
declare module 'ace-builds/src-noconflict/snippets/logtalk';
declare module 'ace-builds/src-noconflict/snippets/lsl';
declare module 'ace-builds/src-noconflict/snippets/lua';
declare module 'ace-builds/src-noconflict/snippets/luapage';
declare module 'ace-builds/src-noconflict/snippets/lucene';
declare module 'ace-builds/src-noconflict/snippets/makefile';
declare module 'ace-builds/src-noconflict/snippets/markdown';
declare module 'ace-builds/src-noconflict/snippets/mask';
declare module 'ace-builds/src-noconflict/snippets/matlab';
declare module 'ace-builds/src-noconflict/snippets/maze';
declare module 'ace-builds/src-noconflict/snippets/mel';
declare module 'ace-builds/src-noconflict/snippets/mixal';
declare module 'ace-builds/src-noconflict/snippets/mushcode';
declare module 'ace-builds/src-noconflict/snippets/mysql';
declare module 'ace-builds/src-noconflict/snippets/nginx';
declare module 'ace-builds/src-noconflict/snippets/nim';
declare module 'ace-builds/src-noconflict/snippets/nix';
declare module 'ace-builds/src-noconflict/snippets/nsis';
declare module 'ace-builds/src-noconflict/snippets/objectivec';
declare module 'ace-builds/src-noconflict/snippets/ocaml';
declare module 'ace-builds/src-noconflict/snippets/pascal';
declare module 'ace-builds/src-noconflict/snippets/perl';
declare module 'ace-builds/src-noconflict/snippets/perl6';
declare module 'ace-builds/src-noconflict/snippets/pgsql';
declare module 'ace-builds/src-noconflict/snippets/php';
declare module 'ace-builds/src-noconflict/snippets/php_laravel_blade';
declare module 'ace-builds/src-noconflict/snippets/pig';
declare module 'ace-builds/src-noconflict/snippets/plain_text';
declare module 'ace-builds/src-noconflict/snippets/powershell';
declare module 'ace-builds/src-noconflict/snippets/praat';
declare module 'ace-builds/src-noconflict/snippets/prolog';
declare module 'ace-builds/src-noconflict/snippets/properties';
declare module 'ace-builds/src-noconflict/snippets/protobuf';
declare module 'ace-builds/src-noconflict/snippets/puppet';
declare module 'ace-builds/src-noconflict/snippets/python';
declare module 'ace-builds/src-noconflict/snippets/r';
declare module 'ace-builds/src-noconflict/snippets/razor';
declare module 'ace-builds/src-noconflict/snippets/rdoc';
declare module 'ace-builds/src-noconflict/snippets/red';
declare module 'ace-builds/src-noconflict/snippets/redshift';
declare module 'ace-builds/src-noconflict/snippets/rhtml';
declare module 'ace-builds/src-noconflict/snippets/rst';
declare module 'ace-builds/src-noconflict/snippets/ruby';
declare module 'ace-builds/src-noconflict/snippets/rust';
declare module 'ace-builds/src-noconflict/snippets/sass';
declare module 'ace-builds/src-noconflict/snippets/scad';
declare module 'ace-builds/src-noconflict/snippets/scala';
declare module 'ace-builds/src-noconflict/snippets/scheme';
declare module 'ace-builds/src-noconflict/snippets/scss';
declare module 'ace-builds/src-noconflict/snippets/sh';
declare module 'ace-builds/src-noconflict/snippets/sjs';
declare module 'ace-builds/src-noconflict/snippets/slim';
declare module 'ace-builds/src-noconflict/snippets/smarty';
declare module 'ace-builds/src-noconflict/snippets/snippets';
declare module 'ace-builds/src-noconflict/snippets/soy_template';
declare module 'ace-builds/src-noconflict/snippets/space';
declare module 'ace-builds/src-noconflict/snippets/sparql';
declare module 'ace-builds/src-noconflict/snippets/sql';
declare module 'ace-builds/src-noconflict/snippets/sqlserver';
declare module 'ace-builds/src-noconflict/snippets/stylus';
declare module 'ace-builds/src-noconflict/snippets/svg';
declare module 'ace-builds/src-noconflict/snippets/swift';
declare module 'ace-builds/src-noconflict/snippets/tcl';
declare module 'ace-builds/src-noconflict/snippets/terraform';
declare module 'ace-builds/src-noconflict/snippets/tex';
declare module 'ace-builds/src-noconflict/snippets/text';
declare module 'ace-builds/src-noconflict/snippets/textile';
declare module 'ace-builds/src-noconflict/snippets/toml';
declare module 'ace-builds/src-noconflict/snippets/tsx';
declare module 'ace-builds/src-noconflict/snippets/turtle';
declare module 'ace-builds/src-noconflict/snippets/twig';
declare module 'ace-builds/src-noconflict/snippets/typescript';
declare module 'ace-builds/src-noconflict/snippets/vala';
declare module 'ace-builds/src-noconflict/snippets/vbscript';
declare module 'ace-builds/src-noconflict/snippets/velocity';
declare module 'ace-builds/src-noconflict/snippets/verilog';
declare module 'ace-builds/src-noconflict/snippets/vhdl';
declare module 'ace-builds/src-noconflict/snippets/visualforce';
declare module 'ace-builds/src-noconflict/snippets/wollok';
declare module 'ace-builds/src-noconflict/snippets/xml';
declare module 'ace-builds/src-noconflict/snippets/xquery';
declare module 'ace-builds/src-noconflict/snippets/yaml';
declare module 'ace-builds/src-noconflict/snippets/zeek';
declare module 'ace-builds/webpack-resolver';

887
pvt-www/_builtin/js/ace-1.4.8/ace.d.ts vendored Normal file
View File

@ -0,0 +1,887 @@
/// <reference path="./ace-modules.d.ts" />
export namespace Ace {
export type NewLineMode = 'auto' | 'unix' | 'windows';
export interface Anchor extends EventEmitter {
getPosition(): Point;
getDocument(): Document;
setPosition(row: number, column: number, noClip?: boolean): void;
detach(): void;
attach(doc: Document): void;
}
export interface Document extends EventEmitter {
setValue(text: string): void;
getValue(): string;
createAnchor(row: number, column: number): Anchor;
getNewLineCharacter(): string;
setNewLineMode(newLineMode: NewLineMode): void;
getNewLineMode(): NewLineMode;
isNewLine(text: string): boolean;
getLine(row: number): string;
getLines(firstRow: number, lastRow: number): string[];
getAllLines(): string[];
getTextRange(range: Range): string;
getLinesForRange(range: Range): string[];
insert(position: Point, text: string): Point;
insertInLine(position: Point, text: string): Point;
clippedPos(row: number, column: number): Point;
clonePos(pos: Point): Point;
pos(row: number, column: number): Point;
insertFullLines(row: number, lines: string[]): void;
insertMergedLines(position: Point, lines: string[]): Point;
remove(range: Range): Point;
removeInLine(row: number, startColumn: number, endColumn: number): Point;
removeFullLines(firstRow: number, lastRow: number): string[];
removeNewLine(row: number): void;
replace(range: Range, text: string): Point;
applyDeltas(deltas: Delta[]): void;
revertDeltas(deltas: Delta[]): void;
applyDelta(delta: Delta, doNotValidate?: boolean): void;
revertDelta(delta: Delta): void;
indexToPosition(index: number, startRow: number): Point;
positionToIndex(pos: Point, startRow?: number): number;
}
export interface FoldLine {
folds: Fold[];
range: Range;
start: Point;
end: Point;
shiftRow(shift: number): void;
addFold(fold: Fold): void;
containsRow(row: number): boolean;
walk(callback: Function, endRow?: number, endColumn?: number): void;
getNextFoldTo(row: number, column: number): null | { fold: Fold, kind: string };
addRemoveChars(row: number, column: number, len: number): void;
split(row: number, column: number): FoldLine;
merge(foldLineNext: FoldLine): void;
idxToPosition(idx: number): Point;
}
export interface Fold {
range: Range;
start: Point;
end: Point;
foldLine?: FoldLine;
sameRow: boolean;
subFolds: Fold[];
setFoldLine(foldLine: FoldLine): void;
clone(): Fold;
addSubFold(fold: Fold): Fold;
restoreRange(range: Range): void;
}
interface Folding {
getFoldAt(row: number, column: number, side: number): Fold;
getFoldsInRange(range: Range): Fold[];
getFoldsInRangeList(ranges: Range[]): Fold[];
getAllFolds(): Fold[];
getFoldStringAt(row: number,
column: number,
trim?: number,
foldLine?: FoldLine): string | null;
getFoldLine(docRow: number, startFoldLine?: FoldLine): FoldLine | null;
getNextFoldLine(docRow: number, startFoldLine?: FoldLine): FoldLine | null;
getFoldedRowCount(first: number, last: number): number;
addFold(placeholder: string | Fold, range?: Range): Fold;
addFolds(folds: Fold[]): void;
removeFold(fold: Fold): void;
removeFolds(folds: Fold[]): void;
expandFold(fold: Fold): void;
expandFolds(folds: Fold[]): void;
unfold(location: null | number | Point | Range,
expandInner?: boolean): Fold[] | undefined;
isRowFolded(docRow: number, startFoldRow?: FoldLine): boolean;
getFoldRowEnd(docRow: number, startFoldRow?: FoldLine): number;
getFoldRowStart(docRow: number, startFoldRow?: FoldLine): number;
getFoldDisplayLine(foldLine: FoldLine,
endRow: number | null,
endColumn: number | null,
startRow: number | null,
startColumn: number | null): string;
getDisplayLine(row: number,
endColumn: number | null,
startRow: number | null,
startColumn: number | null): string;
toggleFold(tryToUnfold?: boolean): void;
getCommentFoldRange(row: number,
column: number,
dir: number): Range | undefined;
foldAll(startRow?: number, endRow?: number, depth?: number): void;
setFoldStyle(style: string): void;
getParentFoldRangeData(row: number, ignoreCurrent?: boolean): {
range?: Range,
firstRange: Range
};
toggleFoldWidget(toggleParent?: boolean): void;
updateFoldWidgets(delta: Delta): void;
}
export interface Range {
start: Point;
end: Point;
isEqual(range: Range): boolean;
toString(): string;
contains(row: number, column: number): boolean;
compareRange(range: Range): number;
comparePoint(p: Point): number;
containsRange(range: Range): boolean;
intersects(range: Range): boolean;
isEnd(row: number, column: number): boolean;
isStart(row: number, column: number): boolean;
setStart(row: number, column: number): void;
setEnd(row: number, column: number): void;
inside(row: number, column: number): boolean;
insideStart(row: number, column: number): boolean;
insideEnd(row: number, column: number): boolean;
compare(row: number, column: number): number;
compareStart(row: number, column: number): number;
compareEnd(row: number, column: number): number;
compareInside(row: number, column: number): number;
clipRows(firstRow: number, lastRow: number): Range;
extend(row: number, column: number): Range;
isEmpty(): boolean;
isMultiLine(): boolean;
clone(): Range;
collapseRows(): Range;
toScreenRange(session: EditSession): Range;
moveBy(row: number, column: number): void;
}
export interface EditSessionOptions {
wrap: string | number;
wrapMethod: 'code' | 'text' | 'auto';
indentedSoftWrap: boolean;
firstLineNumber: number;
useWorker: boolean;
useSoftTabs: boolean;
tabSize: number;
navigateWithinSoftTabs: boolean;
foldStyle: 'markbegin' | 'markbeginend' | 'manual';
overwrite: boolean;
newLineMode: NewLineMode;
mode: string;
}
export interface VirtualRendererOptions {
animatedScroll: boolean;
showInvisibles: boolean;
showPrintMargin: boolean;
printMarginColumn: number;
printMargin: boolean | number;
showGutter: boolean;
fadeFoldWidgets: boolean;
showFoldWidgets: boolean;
showLineNumbers: boolean;
displayIndentGuides: boolean;
highlightGutterLine: boolean;
hScrollBarAlwaysVisible: boolean;
vScrollBarAlwaysVisible: boolean;
fontSize: number;
fontFamily: string;
maxLines: number;
minLines: number;
scrollPastEnd: boolean;
fixedWidthGutter: boolean;
theme: string;
hasCssTransforms: boolean;
maxPixelHeight: number;
}
export interface MouseHandlerOptions {
scrollSpeed: number;
dragDelay: number;
dragEnabled: boolean;
focusTimeout: number;
tooltipFollowsMouse: boolean;
}
export interface EditorOptions extends EditSessionOptions,
MouseHandlerOptions,
VirtualRendererOptions {
selectionStyle: string;
highlightActiveLine: boolean;
highlightSelectedWord: boolean;
readOnly: boolean;
copyWithEmptySelection: boolean;
cursorStyle: 'ace' | 'slim' | 'smooth' | 'wide';
mergeUndoDeltas: true | false | 'always';
behavioursEnabled: boolean;
wrapBehavioursEnabled: boolean;
autoScrollEditorIntoView: boolean;
keyboardHandler: string;
placeholder: string;
value: string;
session: EditSession;
}
export interface SearchOptions {
needle: string | RegExp;
preventScroll: boolean;
backwards: boolean;
start: Range;
skipCurrent: boolean;
range: Range;
preserveCase: boolean;
regExp: RegExp;
wholeWord: string;
caseSensitive: boolean;
wrap: boolean;
}
export interface EventEmitter {
once(name: string, callback: Function): void;
setDefaultHandler(name: string, callback: Function): void;
removeDefaultHandler(name: string, callback: Function): void;
on(name: string, callback: Function, capturing?: boolean): void;
addEventListener(name: string, callback: Function, capturing?: boolean): void;
off(name: string, callback: Function): void;
removeListener(name: string, callback: Function): void;
removeEventListener(name: string, callback: Function): void;
}
export interface Point {
row: number;
column: number;
}
export interface Delta {
action: 'insert' | 'remove';
start: Point;
end: Point;
lines: string[];
}
export interface Annotation {
row?: number;
column?: number;
text: string;
type: string;
}
export interface Command {
name?: string;
bindKey?: string | { mac?: string, win?: string };
readOnly?: boolean;
exec: (editor: Editor, args?: any) => void;
}
export type CommandLike = Command | ((editor: Editor) => void);
export interface KeyboardHandler {
handleKeyboard: Function;
}
export interface MarkerLike {
range: Range;
type: string;
renderer?: MarkerRenderer;
clazz: string;
inFront: boolean;
id: number;
update?: (html: string[],
// TODO maybe define Marker class
marker: any,
session: EditSession,
config: any) => void;
}
export type MarkerRenderer = (html: string[],
range: Range,
left: number,
top: number,
config: any) => void;
export interface Token {
type: string;
value: string;
index?: number;
start?: number;
}
export interface Completion {
value: string;
score: number;
meta?: string;
name?: string;
caption?: string;
}
export interface Tokenizer {
removeCapturingGroups(src: string): string;
createSplitterRegexp(src: string, flag?: string): RegExp;
getLineTokens(line: string, startState: string | string[]): Token[];
}
interface TokenIterator {
getCurrentToken(): Token;
getCurrentTokenColumn(): number;
getCurrentTokenRow(): number;
getCurrentTokenPosition(): Point;
getCurrentTokenRange(): Range;
stepBackward(): Token;
stepForward(): Token;
}
export interface SyntaxMode {
getTokenizer(): Tokenizer;
toggleCommentLines(state: any,
session: EditSession,
startRow: number,
endRow: number): void;
toggleBlockComment(state: any,
session: EditSession,
range: Range,
cursor: Point): void;
getNextLineIndent(state: any, line: string, tab: string): string;
checkOutdent(state: any, line: string, input: string): boolean;
autoOutdent(state: any, doc: Document, row: number): void;
// TODO implement WorkerClient types
createWorker(session: EditSession): any;
createModeDelegates(mapping: { [key: string]: string }): void;
transformAction(state: string,
action: string,
editor: Editor,
session: EditSession,
text: string): any;
getKeywords(append?: boolean): Array<string | RegExp>;
getCompletions(state: string,
session: EditSession,
pos: Point,
prefix: string): Completion[];
}
export interface Config {
get(key: string): any;
set(key: string, value: any): void;
all(): { [key: string]: any };
moduleUrl(name: string, component?: string): string;
setModuleUrl(name: string, subst: string): string;
loadModule(moduleName: string | [string, string],
onLoad: (module: any) => void): void;
init(packaged: any): any;
defineOptions(obj: any, path: string, options: { [key: string]: any }): Config;
resetOptions(obj: any): void;
setDefaultValue(path: string, name: string, value: any): void;
setDefaultValues(path: string, optionHash: { [key: string]: any }): void;
}
export interface OptionsProvider {
setOptions(optList: { [key: string]: any }): void;
getOptions(optionNames?: string[] | { [key: string]: any }): { [key: string]: any };
setOption(name: string, value: any): void;
getOption(name: string): any;
}
export interface UndoManager {
addSession(session: EditSession): void;
add(delta: Delta, allowMerge: boolean, session: EditSession): void;
addSelection(selection: string, rev?: number): void;
startNewGroup(): void;
markIgnored(from: number, to?: number): void;
getSelection(rev: number, after?: boolean): { value: string, rev: number };
getRevision(): number;
getDeltas(from: number, to?: number): Delta[];
undo(session: EditSession, dontSelect?: boolean): void;
redo(session: EditSession, dontSelect?: boolean): void;
reset(): void;
canUndo(): boolean;
canRedo(): boolean;
bookmark(rev?: number): void;
isAtBookmark(): boolean;
}
export interface EditSession extends EventEmitter, OptionsProvider, Folding {
selection: Selection;
on(name: 'changeFold',
callback: (obj: { data: Fold, action: string }) => void): Function;
on(name: 'changeScrollLeft', callback: (scrollLeft: number) => void): Function;
on(name: 'changeScrollTop', callback: (scrollTop: number) => void): Function;
on(name: 'tokenizerUpdate',
callback: (obj: { data: { first: number, last: number } }) => void): Function;
setOption<T extends keyof EditSessionOptions>(name: T, value: EditSessionOptions[T]): void;
getOption<T extends keyof EditSessionOptions>(name: T): EditSessionOptions[T];
setDocument(doc: Document): void;
getDocument(): Document;
resetCaches(): void;
setValue(text: string): void;
getValue(): string;
getSelection(): Selection;
getState(row: number): string;
getTokens(row: number): Token[];
getTokenAt(row: number, column: number): Token | null;
setUndoManager(undoManager: UndoManager): void;
markUndoGroup(): void;
getUndoManager(): UndoManager;
getTabString(): string;
setUseSoftTabs(val: boolean): void;
getUseSoftTabs(): boolean;
setTabSize(tabSize: number): void;
getTabSize(): number;
isTabStop(position: Point): boolean;
setNavigateWithinSoftTabs(navigateWithinSoftTabs: boolean): void;
getNavigateWithinSoftTabs(): boolean;
setOverwrite(overwrite: boolean): void;
getOverwrite(): boolean;
toggleOverwrite(): void;
addGutterDecoration(row: number, className: string): void;
removeGutterDecoration(row: number, className: string): void;
getBreakpoints(): string[];
setBreakpoints(rows: number[]): void;
clearBreakpoints(): void;
setBreakpoint(row: number, className: string): void;
clearBreakpoint(row: number): void;
addMarker(range: Range,
className: string,
type: "fullLine" | "screenLine" | "text" | MarkerRenderer,
inFront?: boolean): number;
addDynamicMarker(marker: MarkerLike, inFront: boolean): MarkerLike;
removeMarker(markerId: number): void;
getMarkers(inFront?: boolean): MarkerLike[];
highlight(re: RegExp): void;
highlightLines(startRow: number,
endRow: number,
className: string,
inFront?: boolean): Range;
setAnnotations(annotations: Annotation[]): void;
getAnnotations(): Annotation[];
clearAnnotations(): void;
getWordRange(row: number, column: number): Range;
getAWordRange(row: number, column: number): Range;
setNewLineMode(newLineMode: NewLineMode): void;
getNewLineMode(): NewLineMode;
setUseWorker(useWorker: boolean): void;
getUseWorker(): boolean;
setMode(mode: string | SyntaxMode, callback?: () => void): void;
getMode(): SyntaxMode;
setScrollTop(scrollTop: number): void;
getScrollTop(): number;
setScrollLeft(scrollLeft: number): void;
getScrollLeft(): number;
getScreenWidth(): number;
getLineWidgetMaxWidth(): number;
getLine(row: number): string;
getLines(firstRow: number, lastRow: number): string[];
getLength(): number;
getTextRange(range: Range): string;
insert(position: Point, text: string): void;
remove(range: Range): void;
removeFullLines(firstRow: number, lastRow: number): void;
undoChanges(deltas: Delta[], dontSelect?: boolean): void;
redoChanges(deltas: Delta[], dontSelect?: boolean): void;
setUndoSelect(enable: boolean): void;
replace(range: Range, text: string): void;
moveText(fromRange: Range, toPosition: Point, copy?: boolean): void;
indentRows(startRow: number, endRow: number, indentString: string): void;
outdentRows(range: Range): void;
moveLinesUp(firstRow: number, lastRow: number): void;
moveLinesDown(firstRow: number, lastRow: number): void;
duplicateLines(firstRow: number, lastRow: number): void;
setUseWrapMode(useWrapMode: boolean): void;
getUseWrapMode(): boolean;
setWrapLimitRange(min: number, max: number): void;
adjustWrapLimit(desiredLimit: number): boolean;
getWrapLimit(): number;
setWrapLimit(limit: number): void;
getWrapLimitRange(): { min: number, max: number };
getRowLineCount(row: number): number;
getRowWrapIndent(screenRow: number): number;
getScreenLastRowColumn(screenRow: number): number;
getDocumentLastRowColumn(docRow: number, docColumn: number): number;
getdocumentLastRowColumnPosition(docRow: number, docColumn: number): Point;
getRowSplitData(row: number): string | undefined;
getScreenTabSize(screenColumn: number): number;
screenToDocumentRow(screenRow: number, screenColumn: number): number;
screenToDocumentColumn(screenRow: number, screenColumn: number): number;
screenToDocumentPosition(screenRow: number,
screenColumn: number,
offsetX?: number): Point;
documentToScreenPosition(docRow: number, docColumn: number): Point;
documentToScreenPosition(position: Point): Point;
documentToScreenColumn(row: number, docColumn: number): number;
documentToScreenRow(docRow: number, docColumn: number): number;
getScreenLength(): number;
destroy(): void;
}
export interface KeyBinding {
setDefaultHandler(handler: KeyboardHandler): void;
setKeyboardHandler(handler: KeyboardHandler): void;
addKeyboardHandler(handler: KeyboardHandler, pos: number): void;
removeKeyboardHandler(handler: KeyboardHandler): boolean;
getKeyboardHandler(): KeyboardHandler;
getStatusText(): string;
}
interface CommandMap {
[name: string]: Command;
}
type execEventHandler = (obj: {
editor: Editor,
command: Command,
args: any[]
}) => void;
export interface CommandManager extends EventEmitter {
byName: CommandMap,
commands: CommandMap,
on(name: 'exec', callback: execEventHandler): Function;
on(name: 'afterExec', callback: execEventHandler): Function;
once(name: string, callback: Function): void;
setDefaultHandler(name: string, callback: Function): void;
removeDefaultHandler(name: string, callback: Function): void;
on(name: string, callback: Function, capturing?: boolean): Function;
addEventListener(name: string, callback: Function, capturing?: boolean): void;
off(name: string, callback: Function): void;
removeListener(name: string, callback: Function): void;
removeEventListener(name: string, callback: Function): void;
exec(command: string, editor: Editor, args: any): boolean;
toggleRecording(editor: Editor): void;
replay(editor: Editor): void;
addCommand(command: Command): void;
removeCommand(command: Command, keepCommand?: boolean): void;
bindKey(key: string | { mac?: string, win?: string },
command: CommandLike,
position?: number): void;
}
export interface VirtualRenderer extends OptionsProvider, EventEmitter {
container: HTMLElement;
setOption<T extends keyof VirtualRendererOptions>(name: T, value: VirtualRendererOptions[T]): void;
getOption<T extends keyof VirtualRendererOptions>(name: T): VirtualRendererOptions[T];
setSession(session: EditSession): void;
updateLines(firstRow: number, lastRow: number, force?: boolean): void;
updateText(): void;
updateFull(force?: boolean): void;
updateFontSize(): void;
adjustWrapLimit(): boolean;
setAnimatedScroll(shouldAnimate: boolean): void;
getAnimatedScroll(): boolean;
setShowInvisibles(showInvisibles: boolean): void;
getShowInvisibles(): boolean;
setDisplayIndentGuides(display: boolean): void;
getDisplayIndentGuides(): boolean;
setShowPrintMargin(showPrintMargin: boolean): void;
getShowPrintMargin(): boolean;
setPrintMarginColumn(showPrintMargin: boolean): void;
getPrintMarginColumn(): boolean;
setShowGutter(show: boolean): void;
getShowGutter(): boolean;
setFadeFoldWidgets(show: boolean): void;
getFadeFoldWidgets(): boolean;
setHighlightGutterLine(shouldHighlight: boolean): void;
getHighlightGutterLine(): boolean;
getContainerElement(): HTMLElement;
getMouseEventTarget(): HTMLElement;
getTextAreaContainer(): HTMLElement;
getFirstVisibleRow(): number;
getFirstFullyVisibleRow(): number;
getLastFullyVisibleRow(): number;
getLastVisibleRow(): number;
setPadding(padding: number): void;
setScrollMargin(top: number,
bottom: number,
left: number,
right: number): void;
setHScrollBarAlwaysVisible(alwaysVisible: boolean): void;
getHScrollBarAlwaysVisible(): boolean;
setVScrollBarAlwaysVisible(alwaysVisible: boolean): void;
getVScrollBarAlwaysVisible(): boolean;
freeze(): void;
unfreeze(): void;
updateFrontMarkers(): void;
updateBackMarkers(): void;
updateBreakpoints(): void;
setAnnotations(annotations: Annotation[]): void;
updateCursor(): void;
hideCursor(): void;
showCursor(): void;
scrollSelectionIntoView(anchor: Point,
lead: Point,
offset?: number): void;
scrollCursorIntoView(cursor: Point, offset?: number): void;
getScrollTop(): number;
getScrollLeft(): number;
getScrollTopRow(): number;
getScrollBottomRow(): number;
scrollToRow(row: number): void;
alignCursor(cursor: Point | number, alignment: number): number;
scrollToLine(line: number,
center: boolean,
animate: boolean,
callback: () => void): void;
animateScrolling(fromValue: number, callback: () => void): void;
scrollToY(scrollTop: number): void;
scrollToX(scrollLeft: number): void;
scrollTo(x: number, y: number): void;
scrollBy(deltaX: number, deltaY: number): void;
isScrollableBy(deltaX: number, deltaY: number): boolean;
textToScreenCoordinates(row: number, column: number): { pageX: number, pageY: number };
visualizeFocus(): void;
visualizeBlur(): void;
showComposition(position: number): void;
setCompositionText(text: string): void;
hideComposition(): void;
setTheme(theme: string, callback?: () => void): void;
getTheme(): string;
setStyle(style: string, include?: boolean): void;
unsetStyle(style: string): void;
setCursorStyle(style: string): void;
setMouseCursor(cursorStyle: string): void;
attachToShadowRoot(): void;
destroy(): void;
}
export interface Selection extends EventEmitter {
moveCursorWordLeft(): void;
moveCursorWordRight(): void;
fromOrientedRange(range: Range): void;
setSelectionRange(match: any): void;
getAllRanges(): Range[];
addRange(range: Range): void;
isEmpty(): boolean;
isMultiLine(): boolean;
setCursor(row: number, column: number): void;
setAnchor(row: number, column: number): void;
getAnchor(): Point;
getCursor(): Point;
isBackwards(): boolean;
getRange(): Range;
clearSelection(): void;
selectAll(): void;
setRange(range: Range, reverse?: boolean): void;
selectTo(row: number, column: number): void;
selectToPosition(pos: any): void;
selectUp(): void;
selectDown(): void;
selectRight(): void;
selectLeft(): void;
selectLineStart(): void;
selectLineEnd(): void;
selectFileEnd(): void;
selectFileStart(): void;
selectWordRight(): void;
selectWordLeft(): void;
getWordRange(): void;
selectWord(): void;
selectAWord(): void;
selectLine(): void;
moveCursorUp(): void;
moveCursorDown(): void;
moveCursorLeft(): void;
moveCursorRight(): void;
moveCursorLineStart(): void;
moveCursorLineEnd(): void;
moveCursorFileEnd(): void;
moveCursorFileStart(): void;
moveCursorLongWordRight(): void;
moveCursorLongWordLeft(): void;
moveCursorBy(rows: number, chars: number): void;
moveCursorToPosition(position: any): void;
moveCursorTo(row: number, column: number, keepDesiredColumn?: boolean): void;
moveCursorToScreen(row: number, column: number, keepDesiredColumn: boolean): void;
toJSON(): SavedSelection | SavedSelection[];
fromJSON(selection: SavedSelection | SavedSelection[]): void;
}
interface SavedSelection {
start: Point;
end: Point;
isBackwards: boolean;
}
var Selection: {
new(session: EditSession): Selection;
}
export interface Editor extends OptionsProvider, EventEmitter {
container: HTMLElement;
renderer: VirtualRenderer;
id: string;
commands: CommandManager;
keyBinding: KeyBinding;
session: EditSession;
selection: Selection;
on(name: 'blur', callback: (e: Event) => void): Function;
on(name: 'input', callback: () => void): Function;
on(name: 'change', callback: (delta: Delta) => void): Function;
on(name: 'changeSelectionStyle', callback: (obj: { data: string }) => void): Function;
on(name: 'changeSession',
callback: (obj: { session: EditSession, oldSession: EditSession }) => void
): Function;
on(name: 'copy', callback: (obj: { text: string }) => void): Function;
on(name: 'focus', callback: (e: Event) => void): Function;
on(name: 'paste', callback: (obj: { text: string }) => void): Function;
setOption<T extends keyof EditorOptions>(name: T, value: EditorOptions[T]): void;
getOption<T extends keyof EditorOptions>(name: T): EditorOptions[T];
setKeyboardHandler(keyboardHandler: string, callback?: () => void): void;
getKeyboardHandler(): string;
setSession(session: EditSession): void;
getSession(): EditSession;
setValue(val: string, cursorPos?: number): string;
getValue(): string;
getSelection(): Selection;
resize(force?: boolean): void;
setTheme(theme: string, callback?: () => void): void;
getTheme(): string;
setStyle(style: string): void;
unsetStyle(style: string): void;
getFontSize(): string;
setFontSize(size: string): void;
focus(): void;
isFocused(): boolean;
flur(): void;
getSelectedText(): string;
getCopyText(): string;
execCommand(command: string | string[], args?: any): boolean;
insert(text: string, pasted?: boolean): void;
setOverwrite(overwrite: boolean): void;
getOverwrite(): boolean;
toggleOverwrite(): void;
setScrollSpeed(speed: number): void;
getScrollSpeed(): number;
setDragDelay(dragDelay: number): void;
getDragDelay(): number;
setSelectionStyle(val: string): void;
getSelectionStyle(): string;
setHighlightActiveLine(shouldHighlight: boolean): void;
getHighlightActiveLine(): boolean;
setHighlightGutterLine(shouldHighlight: boolean): void;
getHighlightGutterLine(): boolean;
setHighlightSelectedWord(shouldHighlight: boolean): void;
getHighlightSelectedWord(): boolean;
setAnimatedScroll(shouldAnimate: boolean): void;
getAnimatedScroll(): boolean;
setShowInvisibles(showInvisibles: boolean): void;
getShowInvisibles(): boolean;
setDisplayIndentGuides(display: boolean): void;
getDisplayIndentGuides(): boolean;
setShowPrintMargin(showPrintMargin: boolean): void;
getShowPrintMargin(): boolean;
setPrintMarginColumn(showPrintMargin: number): void;
getPrintMarginColumn(): number;
setReadOnly(readOnly: boolean): void;
getReadOnly(): boolean;
setBehavioursEnabled(enabled: boolean): void;
getBehavioursEnabled(): boolean;
setWrapBehavioursEnabled(enabled: boolean): void;
getWrapBehavioursEnabled(): boolean;
setShowFoldWidgets(show: boolean): void;
getShowFoldWidgets(): boolean;
setFadeFoldWidgets(fade: boolean): void;
getFadeFoldWidgets(): boolean;
remove(dir?: 'left' | 'right'): void;
removeWordRight(): void;
removeWordLeft(): void;
removeLineToEnd(): void;
splitLine(): void;
transposeLetters(): void;
toLowerCase(): void;
toUpperCase(): void;
indent(): void;
blockIndent(): void;
blockOutdent(): void;
sortLines(): void;
toggleCommentLines(): void;
toggleBlockComment(): void;
modifyNumber(amount: number): void;
removeLines(): void;
duplicateSelection(): void;
moveLinesDown(): void;
moveLinesUp(): void;
moveText(range: Range, toPosition: Point, copy?: boolean): Range;
copyLinesUp(): void;
copyLinesDown(): void;
getFirstVisibleRow(): number;
getLastVisibleRow(): number;
isRowVisible(row: number): boolean;
isRowFullyVisible(row: number): boolean;
selectPageDown(): void;
selectPageUp(): void;
gotoPageDown(): void;
gotoPageUp(): void;
scrollPageDown(): void;
scrollPageUp(): void;
scrollToRow(row: number): void;
scrollToLine(line: number, center: boolean, animate: boolean, callback: () => void): void;
centerSelection(): void;
getCursorPosition(): Point;
getCursorPositionScreen(): Point;
getSelectionRange(): Range;
selectAll(): void;
clearSelection(): void;
moveCursorTo(row: number, column: number): void;
moveCursorToPosition(pos: Point): void;
jumpToMatching(select: boolean, expand: boolean): void;
gotoLine(lineNumber: number, column: number, animate: boolean): void;
navigateTo(row: number, column: number): void;
navigateUp(): void;
navigateDown(): void;
navigateLeft(): void;
navigateRight(): void;
navigateLineStart(): void;
navigateLineEnd(): void;
navigateFileEnd(): void;
navigateFileStart(): void;
navigateWordRight(): void;
navigateWordLeft(): void;
replace(replacement: string, options?: Partial<SearchOptions>): number;
replaceAll(replacement: string, options?: Partial<SearchOptions>): number;
getLastSearchOptions(): Partial<SearchOptions>;
find(needle: string, options?: Partial<SearchOptions>, animate?: boolean): void;
findNext(options?: Partial<SearchOptions>, animate?: boolean): void;
findPrevious(options?: Partial<SearchOptions>, animate?: boolean): void;
undo(): void;
redo(): void;
destroy(): void;
setAutoScrollEditorIntoView(enable: boolean): void;
completers: Completer[];
}
type CompleterCallback = (error: any, completions: Completion[]) => void;
interface Completer {
getCompletions(editor: Editor,
session: EditSession,
position: Point,
prefix: string,
callback: CompleterCallback): void;
}
}
export const version: string;
export const config: Ace.Config;
export function require(name: string): any;
export function edit(el: Element | string, options?: Partial<Ace.EditorOptions>): Ace.Editor;
export function createEditSession(text: Ace.Document | string, mode: Ace.SyntaxMode): Ace.EditSession;
export const VirtualRenderer: {
new(container: HTMLElement, theme?: string): Ace.VirtualRenderer;
};
export const EditSession: {
new(text: string | Document, mode?: Ace.SyntaxMode): Ace.EditSession;
};
export const UndoManager: {
new(): Ace.UndoManager;
};
export const Range: {
new(startRow: number, startColumn: number, endRow: number, endColumn: number): Ace.Range;
fromPoints(start: Ace.Point, end: Ace.Point): Ace.Range;
comparePoints(p1: Ace.Point, p2: Ace.Point): number;
};

View File

@ -0,0 +1,20 @@
{
"name": "ace-builds",
"description": "Ace (Ajax.org Cloud9 Editor)",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"ignore": [
"demo"
],
"repository": {
"type": "git",
"url": "https://github.com/ajaxorg/ace-builds.git"
},
"author": "",
"license": "BSD",
"bugs": {
"url": "https://github.com/ajaxorg/ace-builds/issues"
},
"homepage": "https://github.com/ajaxorg/ace-builds"
}

View File

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ACE Autocompletion demo</title>
<style type="text/css" media="screen">
body {
overflow: hidden;
}
#editor {
margin: 0;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
</style>
</head>
<body>
<pre id="editor"></pre>
<!-- load ace -->
<script src="../src-noconflict/ace.js"></script>
<!-- load ace language tools -->
<script src="../src-noconflict/ext-language_tools.js"></script>
<script>
// trigger extension
ace.require("ace/ext/language_tools");
var editor = ace.edit("editor");
editor.session.setMode("ace/mode/html");
editor.setTheme("ace/theme/tomorrow");
// enable autocompletion and snippets
editor.setOptions({
enableBasicAutocompletion: true,
enableSnippets: true,
enableLiveAutocompletion: false
});
</script>
<script src="./show_own_source.js"></script>
</body>
</html>

View File

@ -0,0 +1,66 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Editor</title>
<style type="text/css" media="screen">
.ace_editor {
border: 1px solid lightgray;
margin: auto;
height: 200px;
width: 80%;
}
.scrollmargin {
height: 80px;
text-align: center;
}
</style>
</head>
<body>
<pre id="editor1">autoresizing editor</pre>
<div class="scrollmargin"></div>
<pre id="editor2">minHeight = 2 lines</pre>
<div class="scrollmargin"></div>
<pre id="editor3" style="width: 40%;"></pre>
<div class="scrollmargin"></div>
<pre id="editor"></pre>
<!-- load ace -->
<script src="../src/ace.js"></script>
<script>
var editor1 = ace.edit("editor1", {
theme: "ace/theme/tomorrow_night_eighties",
mode: "ace/mode/html",
maxLines: 30,
wrap: true,
autoScrollEditorIntoView: true
});
var editor2 = ace.edit("editor2", {
theme: "ace/theme/tomorrow_night_blue",
mode: "ace/mode/html",
autoScrollEditorIntoView: true,
maxLines: 30,
minLines: 2
});
var editor = ace.edit("editor3");
editor.setOptions({
autoScrollEditorIntoView: true,
maxLines: 8
});
editor.renderer.setScrollMargin(10, 10, 10, 10);
var editor = ace.edit("editor");
editor.setTheme("ace/theme/tomorrow");
editor.session.setMode("ace/mode/html");
editor.setAutoScrollEditorIntoView(true);
editor.setOption("maxLines", 100);
</script>
<script src="./show_own_source.js"></script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -0,0 +1,120 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link href="style.css" rel="stylesheet" type="text/css">
<title>Ace Bookmarklet Builder</title>
</head>
<body>
<div id="wrapper">
<div class="content" style="width: 950px">
<div class="column1" style="margin-top: 47px">
<textarea id="textarea" style="width:300px; height:300px">
/**
* This is Ace injected using a bookmarklet.
*/
function foo() {
var bar = true;
}</textarea><br>
SourceUrl: <br>
<input id="srcURL" style="width:300px" value="https://ajaxorg.github.io/ace-builds/src-noconflict"></input><br>
<br>
<a href="#" onmouseover="buildBookmarklet()" onmousedown="buildBookmarklet()" class="bookmarkletLink">Ace Bookmarklet Link</a>
<br>
<br>
<a href="https://github.com/ajaxorg/ace/">
<div class="fork_on_github"></div>
</a>
</div>
<div class="column2">
<h1>Ace Bookmarklet Builder</h1>
<p id="first">
</p>
<h2>How to use it:</h2>
<ul>
<li>Select the options as you want them to be by default.</li>
<li>Enter the "SourceUrl". This has to be the URL pointing to a folder containing ace.js (you can leave the default to load the scripts from GitHub).</li>
<li>Drag the <a href="#" onmouseover="buildBookmarklet()" onmousedown="buildBookmarklet()" class="bookmarkletLink">"Ace Bookmarklet Link"</a> link to your toolbar or store it somewhere else.</li>
<li>Click the bookmarklet.</li>
<li>Click three times on a textarea you want to replace - Ace will replace it.</li>
<li>To change settings, use <strong>Ctrl-,</strong> shortcut. (<strong>Cmd-,</strong> on mac).</li>
</ul>
<textarea cols="80">Test bookmarklet here!</textarea>
</div>
</div>
</div>
<script>
function inject(options, callback) {
var load = function(path, callback) {
var head = document.getElementsByTagName('head')[0];
var s = document.createElement('script');
s.src = options.baseUrl + "/" + path;
head.appendChild(s);
s.onload = s.onreadystatechange = function(_, isAbort) {
if (isAbort || !s.readyState || s.readyState == "loaded" || s.readyState == "complete") {
s = s.onload = s.onreadystatechange = null;
if (!isAbort)
callback();
}
};
};
var pending = [];
var transform = function(el) { pending.push(el) };
load("ace.js", function() {
ace.config.loadModule("ace/ext/textarea", function(m) {
transform = function(el) {
if (!el.ace)
el.ace = m.transformTextarea(el, options.ace);
};
pending = pending.forEach(transform);
callback && setTimeout(callback);
});
});
if (options.target)
return transform(options.target);
window.addEventListener("click", function(e) {
if (e.detail == 3 && e.target.localName == "textarea")
transform(e.target);
});
}
// Call the inject function to load the ace files.
var textAce;
inject({
baseUrl: "../../src-noconflict",
target: document.querySelector("textarea")
}, function () {
// Transform the textarea on the page into an ace editor.
textAce = document.querySelector("textarea").ace;
textAce.setDisplaySettings(true);
buildBookmarklet();
});
function buildBookmarklet() {
var injectSrc = inject.toString().split("\n").join("");
injectSrc = injectSrc.replace(/\s+/g, " ");
Function("", injectSrc); // check if injectSrc is still valid js
var options = textAce.getOptions();
options.baseUrl = document.getElementById("srcURL").value;
var els = document.querySelectorAll(".bookmarkletLink");
for (var i = 0; i < els.length; i++)
els[i].href = "javascript:(" + injectSrc + ")(" + JSON.stringify(options) + ")";
}
</script>
</body>
</html>

View File

@ -0,0 +1,226 @@
body {
margin:0;
padding:0;
background-color:#e6f5fc;
}
H2, H3, H4 {
font-family:Trebuchet MS;
font-weight:bold;
margin:0;
padding:0;
}
H2 {
font-size:28px;
color:#263842;
padding-bottom:6px;
}
H3 {
font-family:Trebuchet MS;
font-weight:bold;
font-size:22px;
color:#253741;
margin-top:43px;
margin-bottom:8px;
}
H4 {
font-family:Trebuchet MS;
font-weight:bold;
font-size:21px;
color:#222222;
margin-bottom:4px;
}
P {
padding:13px 0;
margin:0;
line-height:22px;
}
UL{
line-height : 22px;
}
PRE{
background : #333;
color : white;
padding : 10px;
}
#header {
height : 227px;
position:relative;
overflow:hidden;
background: url(images/background.png) repeat-x 0 0;
border-bottom:1px solid #c9e8fa;
}
#header .content .signature {
font-family:Trebuchet MS;
font-size:11px;
color:#ebe4d6;
position:absolute;
bottom:5px;
right:42px;
letter-spacing : 1px;
}
.content {
width:970px;
position:relative;
margin:0 auto;
}
#header .content {
height:184px;
margin-top:22px;
}
#header .content .logo {
width : 282px;
height : 184px;
background:url(images/logo.png) no-repeat 0 0;
position:absolute;
top:0;
left:0;
}
#header .content .title {
width : 605px;
height : 58px;
background:url(images/ace.png) no-repeat 0 0;
position:absolute;
top:98px;
left:329px;
}
#wrapper {
background:url(images/body_background.png) repeat-x 0 0;
min-height:250px;
}
#wrapper .content {
font-family:Arial;
font-size:14px;
color:#222222;
width:1000px;
}
#wrapper .content .column1 {
position:relative;
float:left;
width:315px;
margin-right:31px;
}
#wrapper .content .column2 {
position:relative;
float:left;
width:600px;
padding-top:47px;
}
.fork_on_github {
width:310px;
height:80px;
background:url(images/fork_on_github.png) no-repeat 0 0;
position:relative;
overflow:hidden;
cursor:pointer;
}
.fork_on_github:hover {
background-position:0 -80px;
}
.divider {
height:3px;
background-color:#bedaea;
margin-bottom:3px;
}
.menu {
padding:23px 0 0 24px;
}
UL.content-list {
padding:15px;
margin:0;
}
UL.menu-list {
padding:0;
margin:0 0 20px 0;
list-style-type:none;
line-height : 16px;
}
UL.menu-list LI {
color:#2557b4;
font-family:Trebuchet MS;
font-size:14px;
padding:7px 0;
border-bottom:1px dotted #d6e2e7;
}
UL.menu-list LI:last-child {
border-bottom:0;
}
A {
color:#2557b4;
text-decoration:none;
}
A:hover {
text-decoration:underline;
}
P#first{
background : rgba(255,255,255,0.5);
padding : 20px;
font-size : 16px;
line-height : 24px;
margin : 0 0 20px 0;
}
#footer {
height:40px;
position:relative;
overflow:hidden;
background:url(images/bottombar.png) repeat-x 0 0;
position:relative;
margin-top:40px;
}
UL.menu-footer {
padding:0;
margin:8px 11px 0 0;
list-style-type:none;
float:right;
}
UL.menu-footer LI {
color:white;
font-family:Arial;
font-size:12px;
display:inline-block;
margin:0 1px;
}
UL.menu-footer LI A {
color:#8dd0ff;
text-decoration:none;
}
UL.menu-footer LI A:hover {
text-decoration:underline;
}

View File

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ACE ChromeVox demo</title>
<style type="text/css" media="screen">
body {
overflow: hidden;
}
#editor {
margin: 0;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
</style>
</head>
<body>
<pre id="editor"></pre>
<!-- load ace -->
<script src="../src/ace.js"></script>
<!-- load ace accessibility extension -->
<script src="../src/ext-chromevox.js"></script>
<script>
// trigger extension
ace.require("ace/ext/chromevox");
var editor = ace.edit("editor");
editor.session.setMode("ace/mode/html");
editor.setTheme("ace/theme/tomorrow");
</script>
<script src="./show_own_source.js"></script>
</body>
</html>

View File

@ -0,0 +1,122 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ACE Code Lens demo</title>
<style type="text/css" media="screen">
body {
overflow: hidden;
}
#editor {
margin: 0;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
</style>
</head>
<body>
<pre id="editor"></pre>
<!-- load ace -->
<script src="../src/ace.js"></script>
<!-- load ace code_lens extension -->
<script src="../src/ext-code_lens.js"></script>
<script>
var editor = ace.edit("editor");
editor.session.setMode("ace/mode/html");
var commandId = "describeCodeLens";
editor.commands.addCommand({
name: commandId,
exec: function(editor, args) {
// services available in `ctx`
alert('CodeLens command called with arguments ' + args);
}
});
editor.commands.addCommand({
name: "clearCodeLenses",
exec: function(editor, args) {
editor.setOption("enableCodeLens", false);
codeLens.clear(editor.session);
}
});
editor.setOption("enableCodeLens", true);
codeLens.registerCodeLensProvider(editor, {
provideCodeLenses: function(session, callback) {
var p = [{
start: {row: 0},
command: {
id: "clearCodeLenses",
title: "Clear all code lenses",
arguments: []
}
}];
var l = session.getLength()
for (var row = 2; row < l; row ++) {
var line = session.getLine(row);
var endColumn = line.length;
var m = /[{>]\s*$/.exec(line);
if (!m) continue;
p.push({
start: {
row: row,
column: m.index,
},
command: {
id: commandId,
title: "Line " + (row + 1),
arguments: ["line", row]
}
});
if (m.index < 10) continue;
p.push({
start: {
row: row,
column: m.index,
},
end: {
row: row,
column: m.index + 1,
},
command: {
id: commandId,
title: "column " + endColumn,
arguments: ["column", endColumn]
}
});
if (m.index < 30) continue;
p.push({
start: {
row: row,
column: m.index,
},
command: {
id: commandId,
title: "Third Link",
arguments: ["3", row]
}
});
}
callback(p);
}
});
window.editor = editor;
window.codeLens = codeLens;
</script>
<script src="./show_own_source.js"></script>
</body>
</html>

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ACE Emmet demo</title>
<style type="text/css" media="screen">
body {
overflow: hidden;
}
#editor {
margin: 0;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
</style>
</head>
<body>
<pre id="editor"></pre>
<!-- load emmet code and snippets compiled for browser -->
<script src="https://cloud9ide.github.io/emmet-core/emmet.js"></script>
<!-- load ace -->
<script src="../src/ace.js"></script>
<!-- load ace emmet extension -->
<script src="../src/ext-emmet.js"></script>
<script>
var editor = ace.edit("editor");
editor.session.setMode("ace/mode/html");
// enable emmet on the current editor
editor.setOption("enableEmmet", true);
</script>
<script src="./show_own_source.js"></script>
</body>
</html>

View File

@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ACE Editor Inside iframe</title>
<style type="text/css" media="screen">
body, html {
height: 100%;
margin:0; padding:0;
}
#editor {
padding: 20px; margin: 20px
width: 80%; height: 80%;
}
</style>
</head>
<body>
<div style="height: 100%"></div>
<div><textarea></textarea></div>
<iframe id="editor-iframe" src='data:text/html,
<pre id="editor" style="height:100%"></pre>
<script src="https://ajaxorg.github.io/ace-builds/src/ace.js"></script>
<script>
var editor = ace.edit("editor");
editor.setTheme("ace/theme/twilight");
editor.session.setMode("ace/mode/javascript");
</script>
'></iframe>
</body>
</html>

View File

@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Editor</title>
<style type="text/css" media="screen">
body {
overflow: hidden;
}
#editor {
margin: 0;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
</style>
</head>
<body>
<pre id="editor"></pre>
<!-- load ace -->
<script src="../src/ace.js"></script>
<script>
var editor = ace.edit("editor")
editor.setTheme("ace/theme/twilight")
editor.session.setMode("ace/mode/html")
// add command to lazy-load keybinding_menu extension
editor.commands.addCommand({
name: "showKeyboardShortcuts",
bindKey: {win: "Ctrl-Alt-h", mac: "Command-Alt-h"},
exec: function(editor) {
ace.config.loadModule("ace/ext/keybinding_menu", function(module) {
module.init(editor);
editor.showKeyboardShortcuts()
})
}
})
editor.execCommand("showKeyboardShortcuts")
</script>
<script src="./show_own_source.js"></script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
# A sample .gitignore file.
.buildlog
.DS_Store
.svn
# Negated patterns:
!foo.bar
# Also ignore user settings...
/.settings

View File

@ -0,0 +1,53 @@
#
# example Dockerfile for http://docs.docker.io/en/latest/examples/postgresql_service/
#
FROM ubuntu
MAINTAINER SvenDowideit@docker.com
# Add the PostgreSQL PGP key to verify their Debian packages.
# It should be the same key as https://www.postgresql.org/media/keys/ACCC4CF8.asc
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
# Add PostgreSQL's repository. It contains the most recent stable release
# of PostgreSQL, ``9.3``.
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list
# Update the Ubuntu and PostgreSQL repository indexes
RUN apt-get update
# Install ``python-software-properties``, ``software-properties-common`` and PostgreSQL 9.3
# There are some warnings (in red) that show up during the build. You can hide
# them by prefixing each apt-get statement with DEBIAN_FRONTEND=noninteractive
RUN apt-get -y -q install python-software-properties software-properties-common
RUN apt-get -y -q install postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3
# Note: The official Debian and Ubuntu images automatically ``apt-get clean``
# after each ``apt-get``
# Run the rest of the commands as the ``postgres`` user created by the ``postgres-9.3`` package when it was ``apt-get installed``
USER postgres
# Create a PostgreSQL role named ``docker`` with ``docker`` as the password and
# then create a database `docker` owned by the ``docker`` role.
# Note: here we use ``&&\`` to run commands one after the other - the ``\``
# allows the RUN command to span multiple lines.
RUN /etc/init.d/postgresql start &&\
psql --command "CREATE USER docker WITH SUPERUSER PASSWORD 'docker';" &&\
createdb -O docker docker
# Adjust PostgreSQL configuration so that remote connections to the
# database are possible.
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf
# And add ``listen_addresses`` to ``/etc/postgresql/9.3/main/postgresql.conf``
RUN echo "listen_addresses='*'" >> /etc/postgresql/9.3/main/postgresql.conf
# Expose the PostgreSQL port
EXPOSE 5432
# Add VOLUMEs to allow backup of config, logs and databases
VOLUME ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"]
# Set the default command to run when starting the container
CMD ["/usr/lib/postgresql/9.3/bin/postgres", "-D", "/var/lib/postgresql/9.3/main", "-c", "config_file=/etc/postgresql/9.3/main/postgresql.conf"]

View File

@ -0,0 +1,17 @@
class Haxe
{
public static function main()
{
// Say Hello!
var greeting:String = "Hello World";
trace(greeting);
var targets:Array<String> = ["Flash","Javascript","PHP","Neko","C++","iOS","Android","webOS"];
trace("Haxe is a great language that can target:");
for (target in targets)
{
trace (" - " + target);
}
trace("And many more!");
}
}

View File

@ -0,0 +1,247 @@
vars it, p
p = {label, value|
print("\n" + label)
print(inspect(value))
}
-- Create an array from 0 to 15
p("range", i-collect(range(5)))
-- Create an array from 0 to 15 and break up in chunks of 4
p("chunked range", i-collect(i-chunk(4, range(16))))
-- Check if all or none items in stream pass test.
p("all < 60 in range(60)", i-all?({i|i<60}, range(60)))
p("any < 60 in range(60)", i-any?({i|i>60}, range(60)))
p("all < 60 in range(70)", i-all?({i|i<60}, range(70)))
p("any < 60 in range(70)", i-any?({i|i>60}, range(70)))
-- Zip three different collections together
p("zipped", i-collect(i-zip(
range(10),
[1,2,3,4,5],
i-map({i|i*i}, range(10))
)))
vars names, person, i, doubles, lengths, cubeRange
names = ["Thorin", "Dwalin", "Balin", "Bifur", "Bofur", "Bombur", "Oin",
"Gloin", "Ori", "Nori", "Dori", "Fili", "Kili", "Bilbo", "Gandalf"]
for name in names {
if name != "Bilbo" && name != "Gandalf" {
print(name)
}
}
person = {name: "Tim", age: 30}
for key, value in person {
print(key + " = " + value)
}
i = 0
while i < 10 {
i = i + 1
print(i)
}
print("range")
for i in range(10) {
print(i + 1)
}
for i in range(10) {
print(10 - i)
}
-- Dynamic object that gives the first 10 doubles
doubles = {
@len: {| 10 }
@get: {key|
if key is Integer { key * key }
}
}
print("#doubles", #doubles)
print("Doubles")
for k, v in doubles {
print([k, v])
}
-- Dynamic object that has names list as keys and string lenth as values
lengths = {
@keys: {| names }
@get: {key|
if key is String { #key }
}
}
print ("Lengths")
for k, v in lengths {
print([k, v])
}
cubeRange = {n|
vars i, v
i = 0
{
@call: {|
v = i
i = i + 1
if v < n { v * v * v }
}
}
}
print("Cubes")
for k, v in cubeRange(5) {
print([k, v])
}
print("String")
for k, v in "Hello World" {
print([k, v])
}
print([i for i in range(10)])
print([i for i in range(20) if i % 3])
-- Example showing how to do parallel work using split..and
base = {bootstrap, target-dir|
split {
copy("res", target-dir)
} and {
if newer("src/*.less", target-dir + "/style.css") {
lessc("src/" + bootstrap + ".less", target-dir + "/style.css")
}
} and {
build("src/" + bootstrap + ".js", target-dir + "/app.js")
}
}
vars Dragon, pet
Dragon = {name|
vars asleep, stuff-in-belly, stuff-in-intestine,
feed, walk, put-to-bed, toss, rock,
hungry?, poopy?, passage-of-time
asleep = false
stuff-in-belly = 10 -- He's full.
stuff-in-intestine = 0 -- He doesn't need to go.
print(name + ' is born.')
feed = {|
print('You feed ' + name + '.')
stuff-in-belly = 10
passage-of-time()
}
walk = {|
print('You walk ' + name + ".")
stuff-in-intestine = 0
passage-of-time
}
put-to-bed = {|
print('You put ' + name + ' to bed.')
asleep = true
for i in range(3) {
if asleep {
passage-of-time()
}
if asleep {
print(name + ' snores, filling the room with smoke.')
}
}
if asleep {
asleep = false
print(name + ' wakes up slowly.')
}
}
toss = {|
print('You toss ' + name + ' up into the air.')
print('He giggles, which singes your eyebrows.')
passage-of-time()
}
rock = {|
print('You rock ' + name + ' gently.')
asleep = true
print('He briefly dozes off...')
passage-of-time()
if asleep {
asleep = false
print('...but wakes when you stop.')
}
}
hungry? = {|
stuff-in-belly <= 2
}
poopy? = {|
stuff-in-intestine >= 8
}
passage-of-time = {|
if stuff-in-belly > 0 {
-- Move food from belly to intestine
stuff-in-belly = stuff-in-belly - 1
stuff-in-intestine = stuff-in-intestine + 1
} else { -- Our dragon is starving!
if asleep {
asleep = false
print('He wakes up suddenly!')
}
print(name + ' is starving! In desperation, he ate YOU!')
abort "died"
}
if stuff-in-intestine >= 10 {
stuff-in-intestine = 0
print('Whoops! ' + name + ' had an accident...')
}
if hungry?() {
if asleep {
asleep = false
print('He wakes up suddenly!')
}
print(name + "'s stomach grumbles...")
}
if poopy?() {
if asleep {
asleep = false
print('He wakes up suddenly!')
}
print(name + ' does the potty dance...')
}
}
-- Export the public interface to this closure object.
{
feed: feed
walk: walk
put-to-bed: put-to-bed
toss: toss
rock: rock
}
}
pet = Dragon('Norbert')
pet.feed()
pet.toss()
pet.walk()
pet.put-to-bed()
pet.rock()
pet.put-to-bed()
pet.put-to-bed()
pet.put-to-bed()
pet.put-to-bed()

View File

@ -0,0 +1,122 @@
.PHONY: apf ext worker mode theme package test
default: apf worker
update: worker
# packages apf
# This is the first line of a comment \
and this is still part of the comment \
as is this, since I keep ending each line \
with a backslash character
apf:
cd node_modules/packager; node package.js projects/apf_cloud9.apr
cd node_modules/packager; cat build/apf_release.js | sed 's/\(\/\*FILEHEAD(\).*//g' > ../../plugins-client/lib.apf/www/apf-packaged/apf_release.js
# package debug version of apf
apfdebug:
cd node_modules/packager/projects; cat apf_cloud9.apr | sed 's/<p:define name=\"__DEBUG\" value=\"0\" \/>/<p:define name=\"__DEBUG\" value=\"1\" \/>/g' > apf_cloud9_debug2.apr
cd node_modules/packager/projects; cat apf_cloud9_debug2.apr | sed 's/apf_release/apf_debug/g' > apf_cloud9_debug.apr; rm apf_cloud9_debug2.apr
cd node_modules/packager; node package.js projects/apf_cloud9_debug.apr
cd node_modules/packager; cat build/apf_debug.js | sed 's/\(\/\*FILEHEAD(\).*\/apf\/\(.*\)/\1\2/g' > ../../plugins-client/lib.apf/www/apf-packaged/apf_debug.js
# package_apf--temporary fix for non-workering infra
pack_apf:
mkdir -p build/src
mv plugins-client/lib.apf/www/apf-packaged/apf_release.js build/src/apf_release.js
node build/r.js -o name=./build/src/apf_release.js out=./plugins-client/lib.apf/www/apf-packaged/apf_release.js baseUrl=.
# makes ace; at the moment, requires dryice@0.4.2
ace:
cd node_modules/ace; make clean pre_build; ./Makefile.dryice.js minimal
# packages core
core: ace
mkdir -p build/src
node build/r.js -o build/core.build.js
# generates packed template
helper:
node build/packed_helper.js
helper_clean:
mkdir -p build/src
node build/packed_helper.js 1
# packages ext
ext:
node build/r.js -o build/app.build.js
# calls dryice on worker & packages it
worker: plugins-client/lib.ace/www/worker/worker-language.js
plugins-client/lib.ace/www/worker/worker-language.js plugins-client/lib.ace/www/worker/worker-javascript.js : \
$(wildcard node_modules/ace/*) $(wildcard node_modules/ace/*/*) $(wildcard node_modules/ace/*/*/mode/*) \
$(wildcard plugins-client/ext.language/*) \
$(wildcard plugins-client/ext.language/*/*) \
$(wildcard plugins-client/ext.linereport/*) \
$(wildcard plugins-client/ext.codecomplete/*) \
$(wildcard plugins-client/ext.codecomplete/*/*) \
$(wildcard plugins-client/ext.jslanguage/*) \
$(wildcard plugins-client/ext.jslanguage/*/*) \
$(wildcard plugins-client/ext.csslanguage/*) \
$(wildcard plugins-client/ext.csslanguage/*/*) \
$(wildcard plugins-client/ext.htmllanguage/*) \
$(wildcard plugins-client/ext.htmllanguage/*/*) \
$(wildcard plugins-client/ext.jsinfer/*) \
$(wildcard plugins-client/ext.jsinfer/*/*) \
$(wildcard node_modules/treehugger/lib/*) \
$(wildcard node_modules/treehugger/lib/*/*) \
$(wildcard node_modules/ace/lib/*) \
$(wildcard node_modules/ace/*/*) \
Makefile.dryice.js
mkdir -p plugins-client/lib.ace/www/worker
rm -rf /tmp/c9_worker_build
mkdir -p /tmp/c9_worker_build/ext
ln -s `pwd`/plugins-client/ext.language /tmp/c9_worker_build/ext/language
ln -s `pwd`/plugins-client/ext.codecomplete /tmp/c9_worker_build/ext/codecomplete
ln -s `pwd`/plugins-client/ext.jslanguage /tmp/c9_worker_build/ext/jslanguage
ln -s `pwd`/plugins-client/ext.csslanguage /tmp/c9_worker_build/ext/csslanguage
ln -s `pwd`/plugins-client/ext.htmllanguage /tmp/c9_worker_build/ext/htmllanguage
ln -s `pwd`/plugins-client/ext.linereport /tmp/c9_worker_build/ext/linereport
ln -s `pwd`/plugins-client/ext.linereport_php /tmp/c9_worker_build/ext/linereport_php
node Makefile.dryice.js worker
cp node_modules/ace/build/src/worker* plugins-client/lib.ace/www/worker
define
ifeq
override
# copies built ace modes
mode:
mkdir -p plugins-client/lib.ace/www/mode
cp `find node_modules/ace/build/src | grep -E "mode-[a-zA-Z_0-9]+.js"` plugins-client/lib.ace/www/mode
# copies built ace themes
theme:
mkdir -p plugins-client/lib.ace/www/theme
cp `find node_modules/ace/build/src | grep -E "theme-[a-zA-Z_0-9]+.js"` plugins-client/lib.ace/www/theme
gzip_safe:
for i in `ls ./plugins-client/lib.packed/www/*.js`; do \
gzip -9 -v -c -q -f $$i > $$i.gz ; \
done
gzip:
for i in `ls ./plugins-client/lib.packed/www/*.js`; do \
gzip -9 -v -q -f $$i ; \
done
c9core: apf ace core worker mode theme
package_clean: helper_clean c9core ext
package: helper c9core ext
test check:
test/run-tests.sh

View File

@ -0,0 +1,57 @@
{
# Name of our deployment
network.description = "HelloWorld";
# Enable rolling back to previous versions of our infrastructure
network.enableRollback = true;
# It consists of a single server named 'helloserver'
helloserver =
# Every server gets passed a few arguments, including a reference
# to nixpkgs (pkgs)
{ config, pkgs, ... }:
let
# We import our custom packages from ./default passing pkgs as argument
packages = import ./default.nix { pkgs = pkgs; };
# This is the nodejs version specified in default.nix
nodejs = packages.nodejs;
# And this is the application we'd like to deploy
app = packages.app;
in
{
# We'll be running our application on port 8080, because a regular
# user cannot bind to port 80
# Then, using some iptables magic we'll forward traffic designated to port 80 to 8080
networking.firewall.enable = true;
# We will open up port 22 (SSH) as well otherwise we're locking ourselves out
networking.firewall.allowedTCPPorts = [ 80 8080 22 ];
networking.firewall.allowPing = true;
# Port forwarding using iptables
networking.firewall.extraCommands = ''
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
'';
# To run our node.js program we're going to use a systemd service
# We can configure the service to automatically start on boot and to restart
# the process in case it crashes
systemd.services.helloserver = {
description = "Hello world application";
# Start the service after the network is available
after = [ "network.target" ];
# We're going to run it on port 8080 in production
environment = { PORT = "8080"; };
serviceConfig = {
# The actual command to run
ExecStart = "${nodejs}/bin/node ${app}/server.js";
# For security reasons we'll run this process as a special 'nodejs' user
User = "nodejs";
Restart = "always";
};
};
# And lastly we ensure the user we run our application as is created
users.extraUsers = {
nodejs = { };
};
};
}

View File

@ -0,0 +1,41 @@
***************************************
** Program: EXAMPLE **
** Author: Joe Byte, 07-Jul-2007 **
***************************************
REPORT BOOKINGS.
* Read flight bookings from the database
SELECT * FROM FLIGHTINFO
WHERE CLASS = 'Y' "Y = economy
OR CLASS = 'C'. "C = business
(...)
REPORT TEST.
WRITE 'Hello World'.
USERPROMPT = 'Please double-click on a line in the output list ' &
'to see the complete details of the transaction.'.
DATA LAST_EOM TYPE D. "last end-of-month date
* Start from today's date
LAST_EOM = SY-DATUM.
* Set characters 6 and 7 (0-relative) of the YYYYMMDD string to "01",
* giving the first day of the current month
LAST_EOM+6(2) = '01'.
* Subtract one day
LAST_EOM = LAST_EOM - 1.
WRITE: 'Last day of previous month was', LAST_EOM.
DATA : BEGIN OF I_VBRK OCCURS 0,
VBELN LIKE VBRK-VBELN,
ZUONR LIKE VBRK-ZUONR,
END OF I_VBRK.
SORT i_vbrk BY vbeln ASCENDING.
SORT i_vbrk BY vbeln DESCENDING.
RETURN.

View File

@ -0,0 +1,171 @@
%abc-2.1
H:This file contains some example English tunes
% note that the comments (like this one) are to highlight usages
% and would not normally be included in such detail
O:England % the origin of all tunes is England
X:1 % tune no 1
T:Dusty Miller, The % title
T:Binny's Jig % an alternative title
C:Trad. % traditional
R:DH % double hornpipe
M:3/4 % meter
K:G % key
B>cd BAG|FA Ac BA|B>cd BAG|DG GB AG:|
Bdd gfg|aA Ac BA|Bdd gfa|gG GB AG:|
BG G/2G/2G BG|FA Ac BA|BG G/2G/2G BG|DG GB AG:|
W:Hey, the dusty miller, and his dusty coat;
W:He will win a shilling, or he spend a groat.
W:Dusty was the coat, dusty was the colour;
W:Dusty was the kiss, that I got frae the miller.
X:2
T:Old Sir Simon the King
C:Trad.
S:Offord MSS % from Offord manuscript
N:see also Playford % reference note
M:9/8
R:SJ % slip jig
N:originally in C % transcription note
K:G
D|GFG GAG G2D|GFG GAG F2D|EFE EFE EFG|A2G F2E D2:|
D|GAG GAB d2D|GAG GAB c2D|[1 EFE EFE EFG|[A2G] F2E D2:|\ % no line-break in score
M:12/8 % change of meter
[2 E2E EFE E2E EFG|\ % no line-break in score
M:9/8 % change of meter
A2G F2E D2|]
X:3
T:William and Nancy
T:New Mown Hay
T:Legacy, The
C:Trad.
O:England; Gloucs; Bledington % place of origin
B:Sussex Tune Book % can be found in these books
B:Mally's Cotswold Morris vol.1 2
D:Morris On % can be heard on this record
P:(AB)2(AC)2A % play the parts in this order
M:6/8
K:G
[P:A] D|"G"G2G GBd|"C"e2e "G"dBG|"D7"A2d "G"BAG|"C"E2"D7"F "G"G2:|
[P:B] d|"G"e2d B2d|"C"gfe "G"d2d| "G"e2d B2d|"C"gfe "D7"d2c|
"G"B2B Bcd|"C"e2e "G"dBG|"D7"A2d "G"BAG|"C"E2"D7"F "G"G2:|
% changes of meter, using inline fields
[T:Slows][M:4/4][L:1/4][P:C]"G"d2|"C"e2 "G"d2|B2 d2|"Em"gf "A7"e2|"D7"d2 "G"d2|\
"C"e2 "G"d2|[M:3/8][L:1/8] "G"B2 d |[M:6/8] "C"gfe "D7"d2c|
"G"B2B Bcd|"C"e2e "G"dBG|"D7"A2d "G"BAG|"C"E2"D7"F "G"G2:|
X:4
T:South Downs Jig
R:jig
S:Robert Harbron
M:6/8
L:1/8
K:G
|: d | dcA G3 | EFG AFE | DEF GAB | cde d2d |
dcA G3 | EFG AFE | DEF GAB | cAF G2 :|
B | Bcd e2c | d2B c2A | Bcd e2c | [M:9/8]d2B c2B A3 |
[M:6/8]DGF E3 | cBA FED | DEF GAB |1 cAF G2 :|2 cAF G3 |]
X:5
T:Atholl Brose
% in this example, which reproduces Highland Bagpipe gracing,
% the large number of grace notes mean that it is more convenient to be specific about
% score line-breaks (using the $ symbol), rather than using code line breaks to indicate them
I:linebreak $
K:D
{gcd}c<{e}A {gAGAG}A2 {gef}e>A {gAGAG}Ad|
{gcd}c<{e}A {gAGAG}A>e {ag}a>f {gef}e>d|
{gcd}c<{e}A {gAGAG}A2 {gef}e>A {gAGAG}Ad|
{g}c/d/e {g}G>{d}B {gf}gG {dc}d>B:|$
{g}c<e {gf}g>e {ag}a>e {gf}g>e|
{g}c<e {gf}g>e {ag}a2 {GdG}a>d|
{g}c<e {gf}g>e {ag}a>e {gf}g>f|
{gef}e>d {gf}g>d {gBd}B<{e}G {dc}d>B|
{g}c<e {gf}g>e {ag}a>e {gf}g>e|
{g}c<e {gf}g>e {ag}a2 {GdG}ad|
{g}c<{GdG}e {gf}ga {f}g>e {g}f>d|
{g}e/f/g {Gdc}d>c {gBd}B<{e}G {dc}d2|]
X:6
T:Untitled Reel
C:Trad.
K:D
eg|a2ab ageg|agbg agef|g2g2 fgag|f2d2 d2:|\
ed|cecA B2ed|cAcA E2ed|cecA B2ed|c2A2 A2:|
K:G
AB|cdec BcdB|ABAF GFE2|cdec BcdB|c2A2 A2:|
X:7
T:Kitchen Girl
C:Trad.
K:D
[c4a4] [B4g4]|efed c2cd|e2f2 gaba|g2e2 e2fg|
a4 g4|efed cdef|g2d2 efed|c2A2 A4:|
K:G
ABcA BAGB|ABAG EDEG|A2AB c2d2|e3f edcB|ABcA BAGB|
ABAG EGAB|cBAc BAG2|A4 A4:|
%abc-2.1
%%pagewidth 21cm
%%pageheight 29.7cm
%%topspace 0.5cm
%%topmargin 1cm
%%botmargin 0cm
%%leftmargin 1cm
%%rightmargin 1cm
%%titlespace 0cm
%%titlefont Times-Bold 32
%%subtitlefont Times-Bold 24
%%composerfont Times 16
%%vocalfont Times-Roman 14
%%staffsep 60pt
%%sysstaffsep 20pt
%%musicspace 1cm
%%vocalspace 5pt
%%measurenb 0
%%barsperstaff 5
%%scale 0.7
X: 1
T: Canzonetta a tre voci
C: Claudio Monteverdi (1567-1643)
M: C
L: 1/4
Q: "Andante mosso" 1/4 = 110
%%score [1 2 3]
V: 1 clef=treble name="Soprano"sname="A"
V: 2 clef=treble name="Alto" sname="T"
V: 3 clef=bass middle=d name="Tenor" sname="B"
%%MIDI program 1 75 % recorder
%%MIDI program 2 75
%%MIDI program 3 75
K: Eb
% 1 - 4
[V: 1] |:z4 |z4 |f2ec |_ddcc |
w: Son que-sti~i cre-spi cri-ni~e
w: Que-sti son gli~oc-chi che mi-
[V: 2] |:c2BG|AAGc|(F/G/A/B/)c=A|B2AA |
w: Son que-sti~i cre-spi cri-ni~e que - - - - sto~il vi-so e
w: Que-sti son~gli oc-chi che mi-ran - - - - do fi-so mi-
[V: 3] |:z4 |f2ec|_ddcf |(B/c/_d/e/)ff|
w: Son que-sti~i cre-spi cri-ni~e que - - - - sto~il
w: Que-sti son~gli oc-chi che mi-ran - - - - do
% 5 - 9
[V: 1] cAB2 |cAAA |c3B|G2!fermata!Gz ::e4|
w: que-sto~il vi-so ond' io ri-man-go~uc-ci-so. Deh,
w: ran-do fi-so, tut-to re-stai con-qui-so.
[V: 2] AAG2 |AFFF |A3F|=E2!fermata!Ez::c4|
w: que-sto~il vi-so ond' io ri-man-go~uc-ci-so. Deh,
w: ran-do fi-so tut-to re-stai con-qui-so.
[V: 3] (ag/f/e2)|A_ddd|A3B|c2!fermata!cz ::A4|
w: vi - - - so ond' io ti-man-go~uc-ci-so. Deh,
w: fi - - - so tut-to re-stai con-qui-so.
% 10 - 15
[V: 1] f_dec |B2c2|zAGF |\
w: dim-me-lo ben mi-o, che que-sto\
=EFG2 |1F2z2:|2F8|] % more notes
w: sol de-si-o_. % more lyrics
[V: 2] ABGA |G2AA|GF=EF |(GF3/2=E//D//E)|1F2z2:|2F8|]
w: dim-me-lo ben mi-o, che que-sto sol de-si - - - - o_.
[V: 3] _dBc>d|e2AF|=EFc_d|c4 |1F2z2:|2F8|]
w: dim-me-lo ben mi-o, che que-sto sol de-si-o_.

View File

@ -0,0 +1,51 @@
package code
{
/*****************************************
* based on textmate actionscript bundle
****************************************/
import fl.events.SliderEvent;
public class Foo extends MovieClip
{
//*************************
// Properties:
public var activeSwatch:MovieClip;
// Color offsets
public var c1:Number = 0; // R
//*************************
// Constructor:
public function Foo()
{
// Respond to mouse events
swatch1_btn.addEventListener(MouseEvent.CLICK,swatchHandler,false,0,false);
previewBox_btn.addEventListener(MouseEvent.MOUSE_DOWN,dragPressHandler);
// Respond to drag events
red_slider.addEventListener(SliderEvent.THUMB_DRAG,sliderHandler);
// Draw a frame later
addEventListener(Event.ENTER_FRAME,draw);
}
protected function clickHandler(event:MouseEvent):void
{
car.transform.colorTransform = new ColorTransform(0,0,0,1,c1,c2,c3);
}
protected function changeRGBHandler(event:Event):void
{
c1 = Number(c1_txt.text);
if(!(c1>=0)){
c1 = 0;
}
updateSliders();
}
}
}

View File

@ -0,0 +1,5 @@
with Ada.Text_IO; use Ada.Text_IO;
procedure Hello is
begin
Put_Line("Hello, world!");
end Hello;

View File

@ -0,0 +1,44 @@
public class testBlockDuplicatesLeadTrigger {
static testMethod void testDuplicateTrigger(){
Lead[] l1 =new Lead[]{
new Lead( Email='homer@fox.tv', LastName='Simpson', Company='fox' )
};
insert l1; // add a known lead
Lead[] l2 =new Lead[]{
new Lead( Email='homer@fox.tv', LastName='Simpson', Company='fox' )
};
// try to add a matching lead
try { insert l2; } catch ( System.DmlException e) {
system.assert(e.getMessage().contains('first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, A lead with this email address already exists'),
e.getMessage());
}
// test duplicates in the same batch
Lead[] l3 =new Lead[]{
new Lead( Email='marge@fox.tv', LastName='Simpson', Company='fox' ),
new Lead( Email='marge@fox.tv', LastName='Simpson', Company='fox' )
};
try { insert l3; } catch ( System.DmlException e) {
system.assert(e.getMessage().contains('first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Another new lead has the same email'),
e.getMessage());
}
// test update also
Lead[] lup = new Lead[]{
new Lead( Email='marge@fox.tv', LastName='Simpson', Company='fox' )
};
insert lup;
Lead marge = [ select id,Email from lead where Email = 'marge@fox.tv' limit 1];
system.assert(marge!=null);
marge.Email = 'homer@fox.tv';
try { update marge; } catch ( System.DmlException e) {
system.assert(e.getMessage().contains('irst error: FIELD_CUSTOM_VALIDATION_EXCEPTION, A lead with this email address already exists'),
e.getMessage());
}
}
}

View File

@ -0,0 +1,3 @@
FOR user IN users
FILTER user.username == "olivier"
RETURN user

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,81 @@
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20180105
*
* ASL example
*/
DefinitionBlock ("", "SSDT", 1, "PmRef", "Cpu0Ist", 0x00003000)
{
External (_PR_.CPU0, DeviceObj)
External (_SB_.CPUP, UnknownObj)
Scope (\_PR.CPU0)
{
Method (_PCT, 0, NotSerialized) // _PCT: Performance Control
{
If (((CFGD & One) && (PDC0 & One)))
{
Return (Package (0x02)
{
ResourceTemplate ()
{
Register (FFixedHW,
0x00, // Bit Width
0x00, // Bit Offset
0x0000000000000000, // Address
,)
},
ResourceTemplate ()
{
Register (FFixedHW,
0x00, // Bit Width
0x00, // Bit Offset
0x0000000000000000, // Address
,)
}
})
}
Return (Package (0x02)
{
ResourceTemplate ()
{
Register (SystemIO,
0x10, // Bit Width
0x00, // Bit Offset
0x0000000000001000, // Address
,)
},
ResourceTemplate ()
{
Register (SystemIO,
0x08, // Bit Width
0x00, // Bit Offset
0x00000000000000B3, // Address
,)
}
})
}
Name (PSDF, Zero)
Method (_PSD, 0, NotSerialized) // _PSD: Power State Dependencies
{
If (!PSDF)
{
DerefOf (HPSD [Zero]) [0x04] = TCNT /* External reference */
DerefOf (SPSD [Zero]) [0x04] = TCNT /* External reference */
PSDF = Ones
}
If ((PDC0 & 0x0800))
{
Return (HPSD) /* \_PR_.CPU0.HPSD */
}
Return (SPSD) /* \_PR_.CPU0.SPSD */
}
}
}

View File

@ -0,0 +1,18 @@
section .text
global main ;must be declared for using gcc
main: ;tell linker entry point
mov edx, len ;message length
mov ecx, msg ;message to write
mov ebx, 1 ;file descriptor (stdout)
mov eax, 4 ;system call number (sys_write)
int 0x80 ;call kernel
mov eax, 1 ;system call number (sys_exit)
int 0x80 ;call kernel
section .data
msg db 'Hello, world!',0xa ;our dear string
len equ $ - msg ;length of our dear string

View File

@ -0,0 +1,35 @@
#NoEnv
SetBatchLines -1
CoordMode Mouse, Screen
OnExit GuiClose
zoom := 9
computeSize(){
global as_x
as_x := Round(ws_x/zoom/2 - 0.5)
if (zoom>1) {
pix := Round(zoom)
} ele {
pix := 1
}
ToolTip Message %as_x% %zoom% %ws_x% %hws_x%
}
hdc_frame := DllCall("GetDC", UInt, MagnifierID)
; comment
DrawCross(byRef x="", rX,rY,z, dc){
;specify the style, thickness and color of the cross lines
h_pen := DllCall( "gdi32.dll\CreatePen", Int, 0, Int, 1, UInt, 0x0000FF)
}
;Ctrl ^; Shift +; Win #; Alt !
^NumPadAdd::
^WheelUp::
^;:: ;comment
If(zoom < ws_x and ( A_ThisHotKey = "^WheelUp" or A_ThisHotKey ="^NumPadAdd") )
zoom *= 1.189207115 ; sqrt(sqrt(2))
Gosub,setZoom
return

View File

@ -0,0 +1,15 @@
:: batch file highlighting in Ace!
@echo off
CALL set var1=%cd%
echo unhide everything in %var1%!
:: FOR loop in bat is super strange!
FOR /f "tokens=*" %%G IN ('dir /A:D /b') DO (
echo %var1%%%G
attrib -r -a -h -s "%var1%%%G" /D /S
)
pause
REM that's all

View File

@ -0,0 +1,26 @@
##! Add countries for the originator and responder of a connection
##! to the connection logs.
module Conn;
export {
redef record Conn::Info += {
## Country code for the originator of the connection based
## on a GeoIP lookup.
orig_cc: string &optional &log;
## Country code for the responser of the connection based
## on a GeoIP lookup.
resp_cc: string &optional &log;
};
}
event connection_state_remove(c: connection)
{
local orig_loc = lookup_location(c$id$orig_h);
if ( orig_loc?$country_code )
c$conn$orig_cc = orig_loc$country_code;
local resp_loc = lookup_location(c$id$resp_h);
if ( resp_loc?$country_code )
c$conn$resp_cc = resp_loc$country_code;
}

View File

@ -0,0 +1,25 @@
Searching for var in/.c9/metadata/workspace/pluginsregexp, case sensitive, whole word
configs/default.js:
1: var fs = require("fs");
2: var argv = require('optimist').argv;
3: var path = require("path");
5: var clientExtensions = {};
6: var clientDirs = fs.readdirSync(__dirname + "/../plugins-client");
7: for (var i = 0; i < clientDirs.length; i++) {
8: var dir = clientDirs[i];
12: var name = dir.split(".")[1];
16: var projectDir = (argv.w && path.resolve(process.cwd(), argv.w)) || process.cwd();
17: var fsUrl = "/workspace";
19: var port = argv.p || process.env.PORT || 3131;
20: var host = argv.l || "localhost";
22: var config = {
configs/local.js:
2: var config = require("./default");
configs/packed.js:
1: var config = require("./default");
Found 15 matches in 3 files

View File

@ -0,0 +1,46 @@
// compound assignment operators
#include <iostream>
#include \
<iostream>
#include \
\
<iostream>
#include \
\
"iostream"
#include <boost/asio/io_service.hpp>
#include "boost/asio/io_service.hpp"
#include \
\
"iostream" \
"string" \
<vector>
using namespace std;
//
int main ()
{
int a, b=3; /* foobar */
a = b; // single line comment\
continued
a+=2; // equivalent to a=a+2
cout << a;
#if VERBOSE >= 2
prints("trace message\n");
#endif
return 0;
}
/* Print an error message and get out */
#define ABORT \
do { \
print( "Abort\n" ); \
exit(8); \
} while (0) /* Note: No semicolon */

View File

@ -0,0 +1,42 @@
-- https://github.com/Cirru/cirru-gopher/blob/master/code/scope.cr,
set a (int 2)
print (self)
set c (child)
under c
under parent
print a
print $ get c a
set c x (int 3)
print $ get c x
set just-print $ code
print a
print just-print
eval (self) just-print
eval just-print
print (string "string with space")
print (string "escapes \n \"\\")
brackets ((((()))))
"eval" $ string "eval"
print (add $ (int 1) (int 2))
print $ unwrap $
map (a $ int 1) (b $ int 2)
print a
int 1
, b c
int 2
, d

View File

@ -0,0 +1,19 @@
(defn parting
"returns a String parting in a given language"
([] (parting "World"))
([name] (parting name "en"))
([name language]
; condp is similar to a case statement in other languages.
; It is described in more detail later.
; It is used here to take different actions based on whether the
; parameter "language" is set to "en", "es" or something else.
(condp = language
"en" (str "Goodbye, " name)
"es" (str "Adios, " name)
(throw (IllegalArgumentException.
(str "unsupported language " language))))))
(println (parting)) ; -> Goodbye, World
(println (parting "Mark")) ; -> Goodbye, Mark
(println (parting "Mark" "es")) ; -> Adios, Mark
(println (parting "Mark", "xy")) ; -> java.lang.IllegalArgumentException: unsupported language xy

View File

@ -0,0 +1 @@
TODO

View File

@ -0,0 +1,22 @@
#!/usr/bin/env coffee
try
throw URIError decodeURI(0xC0ffee * 123456.7e-8 / .9)
catch e
console.log 'qstring' + "qqstring" + '''
qdoc
''' + """
qqdoc
"""
do ->
###
herecomment
###
re = /regex/imgy.test ///
heregex # comment
///imgy
this isnt: `just JavaScript`
undefined
sentence = "#{ 22 / 7 } is a decent approximation of π"

View File

@ -0,0 +1,5 @@
<!--- hello world --->
<cfset welcome="Hello World!">
<cfoutput>#welcome#</cfoutput>

View File

@ -0,0 +1,33 @@
# crystal comment
require "llvm"
NUM_CELLS = 30000
CELL_SIZE_IN_BYTES = 1
abstract class Instruction
abstract def compile(program, bb)
end
class Increment < Instruction
def initialize(@amount : Int32)
end
def compile(program, bb)
cell_val_is_zero = builder.icmp LLVM::IntPredicate::EQ, cell_val, zero
call_args = [@ctx.int32.const_int(NUM_CELLS), @ctx.int32.const_int(CELL_SIZE_IN_BYTES)]
builder.cond cell_val_is_zero, loop_after, loop_body_block
@body.each do |instruction|
loop_body_block = instruction.compile(program, loop_body_block)
end
builder.position_at_end loop_body_block
unless matching_close_index
error "Unmatched '[' at position #{i}"
end
bb
end
end

View File

@ -0,0 +1,4 @@
public void HelloWorld() {
//Say Hello!
Console.WriteLine("Hello World");
}

View File

@ -0,0 +1,13 @@
text
<CsoundSynthesizer>
<CsInstruments>
0dbfs = 1
prints "hello, world\n"
</CsInstruments>
<CsScore>
i 1 0 0
</CsScore>
<html>
<!DOCTYPE html>
</html>
</CsoundSynthesizer>

View File

@ -0,0 +1,79 @@
/*
* comment
*/
; comment
// comment
instr/**/1,/**/N_a_M_e_,/**/+Name/**///
iDuration = p3
outc:a(aSignal)
endin
opcode/**/aUDO,/**/i[],/**/aik//
aUDO
endop
123 0123456789
0xabcdef0123456789 0XABCDEF
1e2 3e+4 5e-6 7E8 9E+0 1E-2 3. 4.56 .789
"characters$MACRO."
"\\\a\b\n\r\t\012\345\67\""
{{
characters$MACRO.
}}
{{\\\a\b\n\r\t\"\012\345\67}}
+ - ~ ¬ ! * / ^ % << >> < > <= >= == != & # | && || ? : += -= *= /=
0dbfs A4 kr ksmps nchnls nchnls_i sr
do else elseif endif enduntil fi if ithen kthen od then until while
return rireturn
aLabel:
label2:
goto aLabel
reinit aLabel
cggoto 1==0, aLabel
timout 0, 0, aLabel
loop_ge 0, 0, 0, aLabel
readscore {{
i 1 0 0
}}
pyrun {{
# Python
}}
lua_exec {{
-- Lua
}}
#include/**/"file.udo"
#include/**/|file.udo|
#ifdef MACRO
#else
#ifndef MACRO
#endif
#undef MACRO
# define MACRO#macro_body#
#define/**/
MACRO/**/
#\#macro
body\##
#define MACRO(ARG1#ARG2) #macro_body#
#define/**/
MACRO(ARG1'ARG2'ARG3)/**/
#\#macro
body\##
$MACRO $MACRO.
$MACRO(x)
@0
@@ 1
$MACRO.(((x#y\)))' "(#'x)\)x\))"# {{x\))x)\)(#'}});

View File

@ -0,0 +1,22 @@
/*
* comment
*/
; comment
// comment
a b C d e f i q s t v x y
z
np0 nP1 Np2 NP3
m/**/label;
n label
123 0123456789
0xabcdef0123456789 0XABCDEF
1e2 3e+4 5e-6 7E8 9E+0 1E-2 3. 4.56 .789
"characters$MACRO."
{ 1 I
{ 2 J
{ 3 K
$I $J $K
}
}
}
#include "score.sco"

View File

@ -0,0 +1,43 @@
.text-layer {
font: 12px Monaco, "Courier New", monospace;
font-size: 3vmin;
cursor: text;
}
.blinker {
animation: blink 1s linear infinite alternate;
}
@keyframes blink {
0%, 40% {
opacity: 0; /*
*/
opacity: 1
}
40.5%, 100% {
opacity: 1
}
}
@document url(http://c9.io/), url-prefix(http://ace.c9.io/build/),
domain(c9.io), regexp("https:.*") /**/
{
/**/
img[title]:before
{
content: attr(title) "\AImage \
retrieved from"
attr(src); /*
*/
white-space: pre;
display: block;
background: url(asdasd); "err
}
}
@viewport {
min-zoom: 1;
max-zoom: 200%;
user-zoom: fixed;
}

View File

@ -0,0 +1,16 @@
<html>
<head>
<style type="text/css">
.text-layer {
font-family: Monaco, "Courier New", monospace;
font-size: 12px;
cursor: text;
}
</style>
</head>
<body>
<h1 style="color:red">{{author_name}}</h1>
</body>
</html>

View File

@ -0,0 +1,14 @@
#!/usr/bin/env rdmd
// Computes average line length for standard input.
import std.stdio;
void main() {
ulong lines = 0;
double sumLength = 0;
foreach (line; stdin.byLine()) {
++lines;
sumLength += line.length;
}
writeln("Average line length: ",
lines ? sumLength / lines : 0);
}

View File

@ -0,0 +1,19 @@
// Go ahead and modify this example.
import "dart:html";
// Computes the nth Fibonacci number.
int fibonacci(int n) {
if (n < 2) return n;
return fibonacci(n - 1) + fibonacci(n - 2);
}
// Displays a Fibonacci number.
void main() {
int i = 20;
String message = "fibonacci($i) = ${fibonacci(i)}";
// This example uses HTML to display the result and it will appear
// in a nested HTML frame (an iframe).
document.body.append(new HeadingElement.h1()..appendText(message));
}

View File

@ -0,0 +1,69 @@
diff --git a/lib/ace/edit_session.js b/lib/ace/edit_session.js
index 23fc3fc..ed3b273 100644
--- a/lib/ace/edit_session.js
+++ b/lib/ace/edit_session.js
@@ -51,6 +51,7 @@ var TextMode = require("./mode/text").Mode;
var Range = require("./range").Range;
var Document = require("./document").Document;
var BackgroundTokenizer = require("./background_tokenizer").BackgroundTokenizer;
+var SearchHighlight = require("./search_highlight").SearchHighlight;
/**
* class EditSession
@@ -307,6 +308,13 @@ var EditSession = function(text, mode) {
return token;
};
+ this.highlight = function(re) {
+ if (!this.$searchHighlight) {
+ var highlight = new SearchHighlight(null, "ace_selected-word", "text");
+ this.$searchHighlight = this.addDynamicMarker(highlight);
+ }
+ this.$searchHighlight.setRegexp(re);
+ }
/**
* EditSession.setUndoManager(undoManager)
* - undoManager (UndoManager): The new undo manager
@@ -556,7 +564,8 @@ var EditSession = function(text, mode) {
type : type || "line",
renderer: typeof type == "function" ? type : null,
clazz : clazz,
- inFront: !!inFront
+ inFront: !!inFront,
+ id: id
}
if (inFront) {
diff --git a/lib/ace/editor.js b/lib/ace/editor.js
index 834e603..b27ec73 100644
--- a/lib/ace/editor.js
+++ b/lib/ace/editor.js
@@ -494,7 +494,7 @@ var Editor = function(renderer, session) {
* Emitted when a selection has changed.
**/
this.onSelectionChange = function(e) {
- var session = this.getSession();
+ var session = this.session;
if (session.$selectionMarker) {
session.removeMarker(session.$selectionMarker);
@@ -509,12 +509,40 @@ var Editor = function(renderer, session) {
this.$updateHighlightActiveLine();
}
- var self = this;
- if (this.$highlightSelectedWord && !this.$wordHighlightTimer)
- this.$wordHighlightTimer = setTimeout(function() {
- self.session.$mode.highlightSelection(self);
- self.$wordHighlightTimer = null;
- }, 30, this);
+ var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp()
};
diff --git a/lib/ace/search_highlight.js b/lib/ace/search_highlight.js
new file mode 100644
index 0000000..b2df779
--- /dev/null
+++ b/lib/ace/search_highlight.js
@@ -0,0 +1,3 @@
+new
+empty file

View File

@ -0,0 +1,110 @@
// Original source: http://www.graphviz.org/content/lion_share
##"A few people in the field of genetics are using dot to draw "marriage node diagram" pedigree drawings. Here is one I have done of a test pedigree from the FTREE pedigree drawing package (Lion Share was a racehorse)." Contributed by David Duffy.
##Command to get the layout: "dot -Tpng thisfile > thisfile.png"
digraph Ped_Lion_Share {
# page = "8.2677165,11.692913" ;
ratio = "auto" ;
mincross = 2.0 ;
label = "Pedigree Lion_Share" ;
"001" [shape=box , regular=1,style=filled,fillcolor=white ] ;
"002" [shape=box , regular=1,style=filled,fillcolor=white ] ;
"003" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
"004" [shape=box , regular=1,style=filled,fillcolor=white ] ;
"005" [shape=box , regular=1,style=filled,fillcolor=white ] ;
"006" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
"007" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
"009" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
"014" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
"015" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
"016" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
"ZZ01" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
"ZZ02" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
"017" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
"012" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
"008" [shape=box , regular=1,style=filled,fillcolor=white ] ;
"011" [shape=box , regular=1,style=filled,fillcolor=white ] ;
"013" [shape=box , regular=1,style=filled,fillcolor=white ] ;
"010" [shape=box , regular=1,style=filled,fillcolor=white ] ;
"023" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
"020" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
"021" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
"018" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
"025" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
"019" [shape=box , regular=1,style=filled,fillcolor=white ] ;
"022" [shape=box , regular=1,style=filled,fillcolor=white ] ;
"024" [shape=box , regular=1,style=filled,fillcolor=white ] ;
"027" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
"026" [shape=box , regular=1,style=filled,fillcolor=white ] ;
"028" [shape=box , regular=1,style=filled,fillcolor=grey ] ;
"marr0001" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"001" -> "marr0001" [dir=none,weight=1] ;
"007" -> "marr0001" [dir=none,weight=1] ;
"marr0001" -> "017" [dir=none, weight=2] ;
"marr0002" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"001" -> "marr0002" [dir=none,weight=1] ;
"ZZ02" -> "marr0002" [dir=none,weight=1] ;
"marr0002" -> "012" [dir=none, weight=2] ;
"marr0003" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"002" -> "marr0003" [dir=none,weight=1] ;
"003" -> "marr0003" [dir=none,weight=1] ;
"marr0003" -> "008" [dir=none, weight=2] ;
"marr0004" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"002" -> "marr0004" [dir=none,weight=1] ;
"006" -> "marr0004" [dir=none,weight=1] ;
"marr0004" -> "011" [dir=none, weight=2] ;
"marr0005" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"002" -> "marr0005" [dir=none,weight=1] ;
"ZZ01" -> "marr0005" [dir=none,weight=1] ;
"marr0005" -> "013" [dir=none, weight=2] ;
"marr0006" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"004" -> "marr0006" [dir=none,weight=1] ;
"009" -> "marr0006" [dir=none,weight=1] ;
"marr0006" -> "010" [dir=none, weight=2] ;
"marr0007" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"005" -> "marr0007" [dir=none,weight=1] ;
"015" -> "marr0007" [dir=none,weight=1] ;
"marr0007" -> "023" [dir=none, weight=2] ;
"marr0008" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"005" -> "marr0008" [dir=none,weight=1] ;
"016" -> "marr0008" [dir=none,weight=1] ;
"marr0008" -> "020" [dir=none, weight=2] ;
"marr0009" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"005" -> "marr0009" [dir=none,weight=1] ;
"012" -> "marr0009" [dir=none,weight=1] ;
"marr0009" -> "021" [dir=none, weight=2] ;
"marr0010" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"008" -> "marr0010" [dir=none,weight=1] ;
"017" -> "marr0010" [dir=none,weight=1] ;
"marr0010" -> "018" [dir=none, weight=2] ;
"marr0011" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"011" -> "marr0011" [dir=none,weight=1] ;
"023" -> "marr0011" [dir=none,weight=1] ;
"marr0011" -> "025" [dir=none, weight=2] ;
"marr0012" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"013" -> "marr0012" [dir=none,weight=1] ;
"014" -> "marr0012" [dir=none,weight=1] ;
"marr0012" -> "019" [dir=none, weight=2] ;
"marr0013" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"010" -> "marr0013" [dir=none,weight=1] ;
"021" -> "marr0013" [dir=none,weight=1] ;
"marr0013" -> "022" [dir=none, weight=2] ;
"marr0014" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"019" -> "marr0014" [dir=none,weight=1] ;
"020" -> "marr0014" [dir=none,weight=1] ;
"marr0014" -> "024" [dir=none, weight=2] ;
"marr0015" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"022" -> "marr0015" [dir=none,weight=1] ;
"025" -> "marr0015" [dir=none,weight=1] ;
"marr0015" -> "027" [dir=none, weight=2] ;
"marr0016" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"024" -> "marr0016" [dir=none,weight=1] ;
"018" -> "marr0016" [dir=none,weight=1] ;
"marr0016" -> "026" [dir=none, weight=2] ;
"marr0017" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"026" -> "marr0017" [dir=none,weight=1] ;
"027" -> "marr0017" [dir=none,weight=1] ;
"marr0017" -> "028" [dir=none, weight=2] ;
}

View File

@ -0,0 +1,127 @@
/*
* Copyright 2010 JBoss Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
Original source
https://github.com/droolsjbpm/drools/blob/master/drools-examples/
http://docs.jboss.org/drools/
*/
package com.example.ace
import java.math.BigDecimal
import function my.package.Foo.hello
declare FactType
@author( Bob )
id : String
name : String @maxLength(100) @notnull
value : BigDecimal
end
declare FactType2 extends AnotherType
end
declare trait TraitType extends com.package.AnotherType
end
declare trait GoldenCustomer
balance : long @Alias( "org.acme.foo.accountBalance" )
end
global org.slf4j.Logger logger
/**
* @param name who we'll salute?
*/
function String hello(String name) {
return "Hello "+name+"!";
}
rule "Trim all strings"
dialect "java"
no-loop
when // fdsfds
$s : String(a == null || == "empty", $g : size)
Cheese( name matches "(Buffalo)?\\S*Mozarella" )
CheeseCounter( cheeses contains $var ) // contains with a variable
CheeseCounter( cheese memberof $matureCheeses )
Cheese( name soundslike 'foobar' )
Message( routingValue str[startsWith] "R1" )
Cheese( name in ( "stilton", "cheddar", $cheese ) )
Person( eval( age == girlAge + 2 ), sex = 'M' )
then
/**
* TODO There mus be better way
*/
retract($s);
String a = "fd";
a.toString();
insert($s.trim());
end
query isContainedIn( String x, String y )
Location( x, y; )
or
( Location( z, y; ) and isContainedIn( x, z; ) )
end
rule "go" salience 10
when
$s : String( )
then
System.out.println( $s );
end
rule "When all English buses are not red"
when
not(forall( $bus : Bus( nationality == 'english')
Bus( this == $bus, color = 'red' ) ))
then
// What if all english buses are not red?
end
rule "go1"
when
String( this == "go1" )
isContainedIn("Office", "House"; )
then
System.out.println( "office is in the house" );
end
rule "go2"
when
String( this == "go2" )
isContainedIn("Draw", "House"; )
then
System.out.println( "Draw in the House" );
end
/**
* Go Right
*/
rule GoRight dialect "mvel" salience (Math.abs( $df.colDiff )) when
$df : DirectionDiff(colDiff > 0 )
$target : Cell( row == $df.row, col == ($df.col + 1) )
CellContents( cell == $target, cellType != CellType.WALL )
not Direction(character == $df.fromChar, horizontal == Direction.RIGHT )
then
System.out.println( "monster right" );
retract( $df );
insert( new Direction($df.fromChar, Direction.RIGHT, Direction.NONE ) );
end

View File

@ -0,0 +1,26 @@
UNB+UNOA:1+005435656:1+006415160:1+060515:1434+00000000000778'
UNH+00000000000117+INVnrOIC:D:97B:UN'
BGM+380+342459+9'
DTM+3:20060515:102'
RFF+ON:521052'
NAD+BY+792820524::16++CUMMINS MID-RANGE ENGINE PLANT'
NAD+SE+005435656::16++GENERAL WIDGET COMPANY'
CUX+1:USD'
LIN+1++157870:IN'
IMD+F++:::WIDGET'
QTY+47:1020:EA'
ALI+US'
MOA+203:1202.58'
PRI+INV:1.179'
LIN+2++157871:IN'
IMD+F++:::DIFFERENT WIDGET'
QTY+47:20:EA'
ALI+JP'
MOA+203:410'
PRI+INV:20.5'
UNS+S'
MOA+39:2137.58'
ALC+C+ABG'
MOA+8:525'
UNT+23+00000000000117'
UNZ+1+00000000000778'

View File

@ -0,0 +1,30 @@
note
description: "Represents a person."
class
PERSON
create
make, make_unknown
feature {NONE} -- Creation
make (a_name: like name)
-- Create a person with `a_name' as `name'.
do
name := a_name
ensure
name = a_name
end
make_unknown
do ensure
name = Void
end
feature -- Access
name: detachable STRING
-- Full name or Void if unknown.
end

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<title>Cloud9 Rocks!</title>
</head>
<body>
<table class="table">
<tr>
<th>Name</th>
<th>Size</th>
</tr>
<% if (!isRoot) { %>
<tr>
<td><a href="..">..</a></td>
<td></td></td>
</tr>
<% } %>
<% entries.forEach(function(entry) { %>
<tr>
<td>
<span class="glyphicon <%= entry.mime == 'directory' ? 'folder': 'file'%>"></span>
<a href="<%= entry.name %>"><%= entry.name %></a>
</td>
<td><%= entry.size %></td>
</tr>
<% }) %>
</table>
</body>
</html>

View File

@ -0,0 +1,42 @@
defmodule HelloModule do
@moduledoc """
This is supposed to be `markdown`.
__Yes__ this is [mark](http://down.format)
# Truly
## marked
* with lists
* more
* and more
Even.with(code)
blocks |> with |> samples
_Docs are first class citizens in Elixir_ (Jose Valim)
"""
# A "Hello world" function
def some_fun do
IO.puts "Juhu Kinners!"
end
# A private function
defp priv do
is_regex ~r"""
This is a regex
spanning several
lines.
"""
x = elem({ :a, :b, :c }, 0) #=> :a
end
end
test_fun = fn(x) ->
cond do
x > 10 ->
:greater_than_ten
true ->
:maybe_ten
end
end

View File

@ -0,0 +1,12 @@
{- Ace {- 4 -} Elm -}
main = lift clock (every second)
clock t = collage 400 400 [ filled lightGrey (ngon 12 110)
, outlined (solid grey) (ngon 12 110)
, hand orange 100 t
, hand charcoal 100 (t/60)
, hand charcoal 60 (t/720) ]
hand clr len time =
let angle = degrees (90 - 6 * inSeconds time)
in traced (solid clr) <| segment (0,0) (len * cos angle, len * sin angle)

View File

@ -0,0 +1,20 @@
%% A process whose only job is to keep a counter.
%% First version
-module(counter).
-export([start/0, codeswitch/1]).
start() -> loop(0).
loop(Sum) ->
receive
{increment, Count} ->
loop(Sum+Count);
{counter, Pid} ->
Pid ! {counter, Sum},
loop(Sum);
code_switch ->
?MODULE:codeswitch(Sum)
% Force the use of 'codeswitch/1' from the latest MODULE version
end.
codeswitch(Sum) -> loop(Sum).

View File

@ -0,0 +1,41 @@
: HELLO ( -- ) CR ." Hello, world!" ;
HELLO <cr>
Hello, world!
: [CHAR] CHAR POSTPONE LITERAL ; IMMEDIATE
0 value ii 0 value jj
0 value KeyAddr 0 value KeyLen
create SArray 256 allot \ state array of 256 bytes
: KeyArray KeyLen mod KeyAddr ;
: get_byte + c@ ;
: set_byte + c! ;
: as_byte 255 and ;
: reset_ij 0 TO ii 0 TO jj ;
: i_update 1 + as_byte TO ii ;
: j_update ii SArray get_byte + as_byte TO jj ;
: swap_s_ij
jj SArray get_byte
ii SArray get_byte jj SArray set_byte
ii SArray set_byte
;
: rc4_init ( KeyAddr KeyLen -- )
256 min TO KeyLen TO KeyAddr
256 0 DO i i SArray set_byte LOOP
reset_ij
BEGIN
ii KeyArray get_byte jj + j_update
swap_s_ij
ii 255 < WHILE
ii i_update
REPEAT
reset_ij
;
: rc4_byte
ii i_update jj j_update
swap_s_ij
ii SArray get_byte jj SArray get_byte + as_byte SArray get_byte xor
;

View File

@ -0,0 +1,33 @@
#include "globalDefines.h"
!=========================================================
program main
!=========================================================
use params_module, only : nx, ny, nz
implicit none
integer, parameter :: g = 9.81
real, allocatable, dimension(:,:,:) :: array
integer :: a, b, c
real*8 :: x, y, z
b = 5
c = 7
#ifdef ARRAY_COMP
allocate(array(10,10,10), status=a)
write(c,'(i5.5)') b
#endif
if(x.lt.5.0) then
array(:,:,:) = g
else
array(:,:,:) = x - y
endif
return
!========================================================
end program main
!========================================================

View File

@ -0,0 +1,14 @@
(* fsharp (* example *) *)
module Test =
let (*) x y = (x + y)
let func1 x =
if x < 100 then
x*x
else
x*x + 1
let list = (-1, 42) :: [ for i in 0 .. 99 -> (i, func1(i)) ]
let verbatim = @"c:\Program "" Files\"
let trippleQuote = """ "hello world" """
// print
printfn "The table of squares from 0 to 99 is:\n%A" list

View File

@ -0,0 +1,51 @@
machine_name : "BGP";
machine_version : 1.0.0;
machine_author : "John Haugeland <stonecypher@gmail.com>";
machine_license : MIT;
graph_layout : dot;
Idle 'Invite' => Invited;
Invited 'Invite, 1xx' -> Invited;
Invited '3xx' -> Redirecting;
Invited 'Cancel' -> Cancelling;
Invited '200' => Accepted;
Invited '407' => AuthRequested;
Invited '4xx-6xx' -> Failed;
AuthRequested 'Ack' => Invited;
Redirecting 'Act' -> Redirected;
Cancelling '200 (Invite)' -> LateCancel;
Cancelling '200 (Cancel)' -> Cancelled;
Accepted 'Cancel' -> LateCancel;
Accepted 'Ack' => Established;
Failed 'Ack' -> Terminated;
Redirected 'Invite' -> Invited;
Redirected 'Timeout' -> Terminated;
LateCancel 'Ack' -> Established;
Cancelled '487' -> Failed;
Established 'Invite' => SessionModifying;
Established 'Bye' -> Closing;
SessionModifying '488' -> SessionModificationRefused;
SessionModifying '200' => SessionModified;
Closing 'Bye,Ack,200 (Invite)' -> Closing;
Closing '200 (Bye)' -> Terminated;
SessionModificationRefused 'Ack' -> Established;
SessionModified 'Ack' => Established;
SessionModified 'Bye' -> Closing;

View File

@ -0,0 +1,46 @@
<#ftl encoding="utf-8" />
<#setting locale="en_US" />
<#import "library" as lib />
<#--
FreeMarker comment
${abc} <#assign a=12 />
-->
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8" />
<title>${title!"FreeMarker"}<title>
</head>
<body>
<h1>Hello ${name!""}</h1>
<p>Today is: ${.now?date}</p>
<#assign x = 13>
<#if x &gt; 12 && x lt 14>x equals 13: ${x}</#if>
<ul>
<#list items as item>
<li>${item_index}: ${item.name!?split("\n")[0]}</li>
</#list>
</ul>
User directive: <@lib.function attr1=true attr2='value' attr3=-42.12>Test</@lib.function>
<@anotherOne />
<#if variable?exists>
Deprecated
<#elseif variable??>
Better
<#else>
Default
</#if>
<img src="images/${user.id}.png" />
</body>
</html>

View File

@ -0,0 +1,31 @@
O003 (DIAMOND SQUARE)
N2 G54 G90 G49 G80
N3 M6 T1 (1.ENDMILL)
N4 M3 S1800
N5 G0 X-.6 Y2.050
N6 G43 H1 Z.1
N7 G1 Z-.3 F50.
N8 G41 D1 Y1.45
N9 G1 X0 F20.
N10 G2 J-1.45
(CUTTER COMP CANCEL)
N11 G1 Z-.2 F50.
N12 Y-.990
N13 G40
N14 G0 X-.6 Y1.590
N15 G0 Z.1
N16 M5 G49 G28 G91 Z0
N17 CALL O9456
N18 #500=0.004
N19 #503=[#500+#501]
N20 VC45=0.0006
VS4=0.0007
N21 G90 G10 L20 P3 X5.Y4. Z6.567
N22 G0 X5000
N23 IF [#1 LT 0.370] GOTO 49
N24 X-0.678 Y+.990
N25 G84.3 X-0.1
N26 #4=#5*COS[45]
N27 #4=#5*SIN[45]
N28 VZOFZ=652.9658
%

View File

@ -0,0 +1,28 @@
@these @_are_ @tags
Feature: Serve coffee
Coffee should not be served until paid for
Coffee should not be served until the button has been pressed
If there is no coffee left then money should be refunded
Scenario Outline: Eating
Given there are <start> cucumbers
When I eat <eat> cucumbers
Then I should have <left> cucumbers
Examples:
| start | eat | left |
| 12 | 5 | 7 |
| @20 | 5 | 15 |
Scenario: Buy last coffee
Given there are 1 coffees left in the machine
And I have deposited 1$
When I press the coffee button
Then I should be served a "coffee"
# this a comment
"""
this is a
pystring
"""

View File

@ -0,0 +1,20 @@
uniform float amplitude;
attribute float displacement;
varying vec3 vNormal;
void main() {
vNormal = normal;
// multiply our displacement by the
// amplitude. The amp will get animated
// so we'll have animated displacement
vec3 newPosition = position +
normal *
vec3(displacement *
amplitude);
gl_Position = projectionMatrix *
modelViewMatrix *
vec4(newPosition,1.0);
}

View File

@ -0,0 +1,171 @@
/*
* A Gobstones implementation of Conwey's Game of Life
* that tries to use most of Gobstones syntax.
*
* Check out more about Gobstones at http://gobstones.org
*/
-----------------------------------------------------------
-- HELPERS TO MOVE AROUND ALL THE BOARD --
-----------------------------------------------------------
// This helpers allow the user to move around the board
// one cell at a time
procedure GoToStartOfBoard(firstDir, secondDir) {
IrAlBorde(opuesto(firstDir))
IrAlBorde(opuesto(secondDir))
}
function isEndOfBoard(firstDir, secondDir) {
return (not puedeMover(firstDir) && not puedeMover(secondDir))
}
procedure NextCellOfTheBoard(firstDir, secondDir) {
if (puedeMover(firstDir)) {
Mover(firstDir)
} else {
IrAlBorde(opuesto(firstDir))
Mover(secondDir)
}
}
-----------------------------------------------------------
-- TYPE DECLARATIONS --
-----------------------------------------------------------
// The cell type declarations
type CellStatus is variant {
case Alive {}
case Dead {}
}
type Cell is record {
field status # CellStatus
field color # Color
}
-----------------------------------------------------------
-- PROGRAM DEFINITION --
-----------------------------------------------------------
interactive program {
# Map key press to actions
K_UP -> { PrepareNextTick() }
K_RIGHT -> { CompleteNextTick() }
K_RETURN -> { SimulateNextTick() }
}
/*
program {
return ( numberOfNeighbors())
}
*/
-----------------------------------------------------------
-- FUNCTIONS --
-----------------------------------------------------------
function isCellAlive() {
return (hayBolitas(Verde))
}
function cellStatus() {
return (
choose
Alive when (isCellAlive())
Dead otherwise
)
}
function readCell() {
return (
Cell(color <- Verde, status <- cellStatus())
)
}
function numberOfNeighbors() {
amountOfNeighbors := 0
foreach dir in [minDir() .. maxDir()] {
amountOfNeighbors := amountOfNeighbors + aliveCellsAt(dir)
}
return (amountOfNeighbors)
}
function aliveCellsAt(dir) {
firstCompare := puedeMover(dir) && hasAliveCellAt(dir)
secondCompare := puedeMover(dir) && puedeMover(siguiente(dir)) && hasAliveCellAtD(dir)
value :=
matching (firstCompare) select
1 on True
0 otherwise
+
matching (secondCompare) select
1 on True
0 otherwise
return (value)
}
function hasAliveCellAt(dir) {
Mover(dir)
return (isCellAlive())
}
function hasAliveCellAtD(dir) {
Mover(dir)
Mover(siguiente(dir))
return (isCellAlive())
}
-----------------------------------------------------------
-- ROCEDURES DECLARATIONS --
-----------------------------------------------------------
procedure TagAsReanimated() {
Poner(Azul)
}
procedure TagAsDead() {
Poner(Rojo)
}
procedure ProcessAction() {
switch (hayBolitas(Rojo)) {
True -> { Sacar(Verde); Sacar(Rojo) }
_ -> {}
}
switch (hayBolitas(Azul)) {
True -> { Poner(Verde); Sacar(Azul) }
_ -> {}
}
}
procedure TagCell(numNeighbors) {
if ( isCellAlive() && numNeighbors < 2) { TagAsDead() }
elseif ( isCellAlive() && numNeighbors > 3) { TagAsDead() }
elseif ((not isCellAlive()) && numNeighbors == 3) { TagAsReanimated() }
}
procedure SimulateTicks(amount) {
repeat(amount) {
SimulateNextTick()
}
}
procedure SimulateNextTick() {
PrepareNextTick()
CompleteNextTick()
}
procedure PrepareNextTick() {
GoToStartOfBoard(Norte, Este)
while (not isEndOfBoard(Norte, Este)) {
TagCell(numberOfNeighbors())
NextCellOfTheBoard(Norte, Este)
}
TagCell(numberOfNeighbors())
}
procedure CompleteNextTick() {
GoToStartOfBoard(Norte, Este)
while (not isEndOfBoard(Norte, Este)) {
ProcessAction()
NextCellOfTheBoard(Norte, Este)
}
ProcessAction()
}

View File

@ -0,0 +1,34 @@
// Concurrent computation of pi.
// See http://goo.gl/ZuTZM.
//
// This demonstrates Go's ability to handle
// large numbers of concurrent processes.
// It is an unreasonable way to calculate pi.
package main
import (
"fmt"
"math"
)
func main() {
fmt.Println(pi(5000))
}
// pi launches n goroutines to compute an
// approximation of pi.
func pi(n int) float64 {
ch := make(chan float64)
for k := 0; k <= n; k++ {
go term(ch, float64(k))
}
f := 0.0
for k := 0; k <= n; k++ {
f += <-ch
}
return f
}
func term(ch chan float64, k float64) {
ch <- 4 * math.Pow(-1, k) / (2*k + 1)
}

View File

@ -0,0 +1,73 @@
# Main Schema
schema {
query: Query;
}
scalar Date;
# Simple type to contain all scalar types
type AllTypes {
# Field Description for String
testString: String;
# Field Description for Int
testInt: Int;
# Field Description for ID
testID: ID;
# Field Description for Boolean
testBoolean: Boolean;
# Field Description for Float
testFloat: Float;
}
interface ISearchable {
searchPreview: String!;
}
union ProductTypes = Movie | Book;
# Testing enum
enum MovieGenere {
ACTION
COMEDY
THRILLER
DRAMA
}
# Testing Input
input SearchByGenere {
before: Date;
after: Date;
genere: MovieGenere!;
}
# Testing Interface
type Movie implements ISearchable {
id: ID!;
searchPreview: String!;
rentPrice: Float;
publishDate: Date;
genere: MovieGenere;
cast: [String];
}
# Testing Interface
type Book implements ISearchable {
id: ID!;
searchPreview: String!;
price: Float;
publishDate: Date;
authors: [String];
}
type Query {
testString: String;
testDate; Date;
allTypes: AllTypes;
allProducts: [ProductTypes];
# searches only movies by genere with sophisticated argument
searchMovieByGenere(searchObject: SearchByGenere!): [Movie];
# Searchs all products by text string
searchProduct(text: String!): [ISearchable];
}

View File

@ -0,0 +1,41 @@
//http://groovy.codehaus.org/Martin+Fowler%27s+closure+examples+in+Groovy
class Employee {
def name, salary
boolean manager
String toString() { return name }
}
def emps = [new Employee(name:'Guillaume', manager:true, salary:200),
new Employee(name:'Graeme', manager:true, salary:200),
new Employee(name:'Dierk', manager:false, salary:151),
new Employee(name:'Bernd', manager:false, salary:50)]
def managers(emps) {
emps.findAll { e -> e.isManager() }
}
assert emps[0..1] == managers(emps) // [Guillaume, Graeme]
def highPaid(emps) {
threshold = 150
emps.findAll { e -> e.salary > threshold }
}
assert emps[0..2] == highPaid(emps) // [Guillaume, Graeme, Dierk]
def paidMore(amount) {
{ e -> e.salary > amount}
}
def highPaid = paidMore(150)
assert highPaid(emps[0]) // true
assert emps[0..2] == emps.findAll(highPaid)
def filename = 'test.txt'
new File(filename).withReader{ reader -> doSomethingWith(reader) }
def readersText
def doSomethingWith(reader) { readersText = reader.text }
assert new File(filename).text == readersText

View File

@ -0,0 +1,75 @@
!!!5
/[if IE]
%a{ :href => 'http://www.mozilla.com/en-US/firefox/' }
%h1 Get Firefox
-# This is a HAML comment. It will not show in the output HTML
-#
This is a HAML multiline comment
This won't be displayed
Nor will this
Nor will this.
/ This is a HTML comment. It will be rendered as HTML
/
%p This doesn't render...
%div
%h1 Because it's commented out!
.row
.col-md-6
.col-md-6
#users.row.green
#articles{:style => "border: 5px;"}
#lists.list-inline
%div#todos.bg-green{:id => "#{@item.type}_#{@item.number}", :class => '#{@item.type} #{@item.urgency}', :phoney => `asdasdasd`}
/ file: app/views/movies/index.html.haml
%ads:{:bleh => 33}
%p
Date/Time:
- now = DateTime.now
%strong= now
= if now DateTime.parse("December 31, 2006")
= "Happy new " + "year!"
%sfd.dfdfg
#content
.title
%h1= @title
= link_to 'Home', home_url
#contents
%div#content
%div.articles
%div.article.title Blah
%div.article.date 2006-11-05
%div.article.entry
Neil Patrick Harris
%div[@user, :greeting]
%bar[290]
/ This is a comment
/ This is another comment with line break above
.row
.col-md-6
.col-md-6
.col-md-6
.row
.col-md-6
.col-md-6

View File

@ -0,0 +1,8 @@
{{!-- Ace + :-}} --}}
<div id="comments">
{{#each comments}}
<h2><a href="/posts/{{../permalink}}#{{id}}">{{title}}</a></h2>
<div>{{{body}}}</div>
{{/each}}
</div>

View File

@ -0,0 +1,20 @@
-- Type annotation (optional)
fib :: Int -> Integer
-- With self-referencing data
fib n = fibs !! n
where fibs = 0 : scanl (+) 1 fibs
-- 0,1,1,2,3,5,...
-- Same, coded directly
fib n = fibs !! n
where fibs = 0 : 1 : next fibs
next (a : t@(b:_)) = (a+b) : next t
-- Similar idea, using zipWith
fib n = fibs !! n
where fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
-- Using a generator function
fib n = fibs (0,1) !! n
where fibs (a,b) = a : fibs (b,a+b)

View File

@ -0,0 +1,77 @@
name: reload
version: 0.1.0.0
synopsis: Initial project template from stack
Description:
The \'cabal\' command-line program simplifies the process of managing
Haskell software by automating the fetching, configuration, compilation
and installation of Haskell libraries and programs.
homepage: https://github.com/jpmoresmau/dbIDE/reload#readme
license: BSD3
license-file: LICENSE
author: JP Moresmau
maintainer: jpmoresmau@gmail.com
copyright: 2016 JP Moresmau
category: Web
build-type: Simple
-- extra-source-files:
cabal-version: >=1.10
Flag network-uri
description: Get Network.URI from the network-uri package
default: True
library
hs-source-dirs: src
exposed-modules: Language.Haskell.Reload
build-depends: base >= 4.7 && < 5
, aeson
, scotty
, wai
, text
, directory
, filepath
, bytestring
, containers
, mime-types
, transformers
, wai-handler-launch
, wai-middleware-static
, wai-extra
, http-types
default-language: Haskell2010
other-modules: Language.Haskell.Reload.FileBrowser
ghc-options: -Wall -O2
executable reload-exe
hs-source-dirs: app
main-is: Main.hs
ghc-options: -threaded -O2 -rtsopts -with-rtsopts=-N
build-depends: base
, reload
default-language: Haskell2010
test-suite reload-test
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
build-depends: base
, reload
, hspec
, hspec-wai
, hspec-wai-json
, aeson
, directory
, filepath
, text
, containers
, unordered-containers
, bytestring
, wai-extra
ghc-options: -threaded -O2 -rtsopts -with-rtsopts=-N
default-language: Haskell2010
other-modules: Language.Haskell.Reload.FileBrowserSpec
Language.Haskell.ReloadSpec
source-repository head
type: git
location: https://github.com/jpmoresmau/dbIDE/reload

View File

@ -0,0 +1,16 @@
{
# specify rate in requests/second (because comments are helpful!)
rate: 1000
// prefer c-style comments?
/* feeling old fashioned? */
# did you notice that rate doesn't need quotes?
hey: look ma, no quotes for strings either!
# best of all
notice: []
anything: ?
# yes, commas are optional!
}

View File

@ -0,0 +1,10 @@
Redirect /linux http://www.linux.org
Redirect 301 /kernel http://www.linux.org
# comment
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^Mozilla.*
RewriteRule ^/$ /homepage.max.html [L]
RewriteRule ^/$ /homepage.std.html [L]

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.text-layer {
font-family: Monaco, "Courier New", monospace;
font-size: 12px;
cursor: text;
}
</style>
</head>
<body>
<h1 style="color:red">Juhu Kinners</h1>
</body>
</html>

View File

@ -0,0 +1,26 @@
<h1>Listing Books</h1>
<table>
<tr>
<th>Title</th>
<th>Summary</th>
<th></th>
<th></th>
<th></th>
</tr>
<%= for book <- @books do %>
<tr>
<%# comment %>
<td><%= book.title %></td>
<td><%= book.content %></td>
<td><%= link "Show", to: book_path(@conn, :show, book) %></td>
<td><%= link "Edit", to: book_path(@conn, :edit, book) %></td>
<td><%= link "Delete", to: book_path(@conn, :delete, book), method: :delete, data: [confirm: "Are you sure?"] %></td>
</tr>
<% end %>
</table>
<br />
<%= link "New book", to: book_path(@conn, :new) %>

View File

@ -0,0 +1,26 @@
<h1>Listing Books</h1>
<table>
<tr>
<th>Title</th>
<th>Summary</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @books.each do |book| %>
<tr>
<%# comment %>
<td><%= book.title %></td>
<td><%= book.content %></td>
<td><%= link_to 'Show', book %></td>
<td><%= link_to 'Edit', edit_book_path(book) %></td>
<td><%= link_to 'Remove', book, :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New book', new_book_path %>

View File

@ -0,0 +1,4 @@
[.ShellClassInfo]
IconResource=..\logo.png
[ViewState]
FolderType=Generic

View File

@ -0,0 +1,6 @@
// computes factorial of a number
factorial := method(n,
if(n == 0, return 1)
res := 1
Range 1 to(n) foreach(i, res = res * i)
)

View File

@ -0,0 +1,45 @@
!!!doctype
!!!5
!!!
include something
include another_thing
// let's talk about it
//
here it is. a block comment!
and another row!
but not here.
//
a far spaced
should be lack of block
// also not a comment
div.attemptAtBlock
span#myName
#{implicit}
!{more_explicit}
#idDiv
.idDiv
test(id="tag")
header(id="tag", blah="foo", meh="aads")
mixin article(obj, parents)
mixin bleh()
mixin clever-name
-var x = "0";
- y each z
- var items = ["one", "two", "three"]
each item in items
li= item

View File

@ -0,0 +1,18 @@
import java.util.ArrayList;
import java.util.Vector;
public class InfiniteLoop {
/*
* This will cause the program to hang...
*
* Taken from:
* http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
*/
public static void main(String[] args) {
double d = Double.parseDouble("2.2250738585072012e-308");
// unreachable code
System.out.println("Value: " + d);
}
}

View File

@ -0,0 +1,5 @@
function foo(items, nada) {
for (var i=0; i<items.length; i++) {
alert(items[i] + "juhu\n");
} // Real Tab.
}

View File

@ -0,0 +1,66 @@
{
"query": {
"count": 10,
"created": "2011-06-21T08:10:46Z",
"lang": "en-US",
"results": {
"photo": [
{
"farm": "6",
"id": "5855620975",
"isfamily": "0",
"isfriend": "0",
"ispublic": "1",
"owner": "32021554@N04",
"secret": "f1f5e8515d",
"server": "5110",
"title": "7087 bandit cat"
},
{
"farm": "4",
"id": "5856170534",
"isfamily": "0",
"isfriend": "0",
"ispublic": "1",
"owner": "32021554@N04",
"secret": "ff1efb2a6f",
"server": "3217",
"title": "6975 rusty cat"
},
{
"farm": "6",
"id": "5856172972",
"isfamily": "0",
"isfriend": "0",
"ispublic": "1",
"owner": "51249875@N03",
"secret": "6c6887347c",
"server": "5192",
"title": "watermarked-cats"
},
{
"farm": "6",
"id": "5856168328",
"isfamily": "0",
"isfriend": "0",
"ispublic": "1",
"owner": "32021554@N04",
"secret": "0c1cfdf64c",
"server": "5078",
"title": "7020 mandy cat"
},
{
"farm": "3",
"id": "5856171774",
"isfamily": "0",
"isfriend": "0",
"ispublic": "1",
"owner": "32021554@N04",
"secret": "7f5a3180ab",
"server": "2696",
"title": "7448 bobby cat"
}
]
}
}
}

View File

@ -0,0 +1,25 @@
{
foo: 'bar',
while: true,
this: 'is a \
multi-line string',
// this is an inline comment
here: 'is another', // inline comment
/* this is a block comment
that continues on another line */
hex: 0xDEADbeef,
half: .5,
delta: +10,
to: Infinity, // and beyond!
finally: 'a trailing comma',
oh: [
"we shouldn't forget",
'arrays can have',
'trailing commas too',
],
}

View File

@ -0,0 +1 @@
TODO

View File

@ -0,0 +1,101 @@
<%-- initial comment --%>
<%@ page import="java.util.Date" %>
<%--@ page isELIgnored="true" //Now EL will be ignored --%>
<html>
<jsp:declaration>
int day = 3;
</jsp:declaration>
<%@ include file="relative url" %>
<jsp:directive.include file="relative url" />
<head>
<title>Day <%= day %></title>
</head>
<body>
<script>
var x = "abc";
function y {
}
</script>
<style>
.class {
background: #124356;
}
</style>
<p>
Today's date: <%= (new java.util.Date()).toLocaleString()%>
</p>
<%! int day = 3; %>
<jsp:directive.page attribute="value" />
<%-- This comment will not be visible in the page source --%>
<!-- html comment -->
<body>
<p>
Today's date: <%= (new java.util.Date()).toLocaleString()%>
</p>
<%! int i = 0; %>
<jsp:declaration>
int j = 10;
</jsp:declaration>
<%-- This is JSP comment --%>
<%@ directive attribute="value" %>
<h2>Select Languages:</h2>
<form ACTION="jspCheckBox.jsp">
<input type="checkbox" name="id" value="Java"> Java<BR>
<input type="checkbox" name="id" value=".NET"> .NET<BR>
<input type="checkbox" name="id" value="PHP"> PHP<BR>
<input type="checkbox" name="id" value="C/C++"> C/C++<BR>
<input type="checkbox" name="id" value="PERL"> PERL <BR>
<input type="submit" value="Submit">
</form>
<%
String select[] = request.getParameterValues("id");
if (select != null && select.length != 0) {
out.println("You have selected: ");
for (int i = 0; i < select.length; i++) {
out.println(select[i]);
}
}
%>
<%
switch(day) {
case 0:
out.println("It\'s Sunday.");
break;
case 1:
out.println("It\'s Monday.");
break;
case 2:
out.println("It\'s Tuesday.");
break;
case 3:
out.println("It\'s Wednesday.");
break;
case 4:
out.println("It\'s Thursday.");
break;
case 5:
out.println("It\'s Friday.");
break;
//hello
default:
out.println("It's Saturday.");
}
%>
<p>
<jsp:scriptlet>
out.println("Your IP address is " + request.getRemoteAddr());
</jsp:scriptlet>
</p>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More