mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
removed bower_components from the repo, because
This commit is contained in:
parent
433bcaeef8
commit
aa1397e0e7
2652 changed files with 3 additions and 971740 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,5 +1,6 @@
|
|||
.DS_Store
|
||||
node_modules
|
||||
src/bower_components
|
||||
trash
|
||||
build
|
||||
target
|
||||
|
|
|
@ -42,7 +42,8 @@
|
|||
"angular-elastic": "~2.3.3",
|
||||
"inflection": "~1.3.5",
|
||||
"FileSaver": "*",
|
||||
"elasticsearch": "~2.2.0"
|
||||
"elasticsearch": "~2.2.0",
|
||||
"bluebird": "~2.1.3"
|
||||
},
|
||||
"devDependencies": {}
|
||||
}
|
||||
|
|
13
src/bower_components/FileSaver/.bower.json
vendored
13
src/bower_components/FileSaver/.bower.json
vendored
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"name": "FileSaver",
|
||||
"homepage": "https://github.com/eligrey/FileSaver.js",
|
||||
"_release": "b8054a26d1",
|
||||
"_resolution": {
|
||||
"type": "branch",
|
||||
"branch": "master",
|
||||
"commit": "b8054a26d13dd700a948735fc05e952c3b7db6c5"
|
||||
},
|
||||
"_source": "git://github.com/eligrey/FileSaver.js.git",
|
||||
"_target": "*",
|
||||
"_originalSource": "FileSaver"
|
||||
}
|
241
src/bower_components/FileSaver/FileSaver.js
vendored
241
src/bower_components/FileSaver/FileSaver.js
vendored
|
@ -1,241 +0,0 @@
|
|||
/* FileSaver.js
|
||||
* A saveAs() FileSaver implementation.
|
||||
* 2014-05-27
|
||||
*
|
||||
* By Eli Grey, http://eligrey.com
|
||||
* License: X11/MIT
|
||||
* See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
/*global self */
|
||||
/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */
|
||||
|
||||
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
|
||||
|
||||
var saveAs = saveAs
|
||||
// IE 10+ (native saveAs)
|
||||
|| (typeof navigator !== "undefined" &&
|
||||
navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator))
|
||||
// Everyone else
|
||||
|| (function(view) {
|
||||
"use strict";
|
||||
// IE <10 is explicitly unsupported
|
||||
if (typeof navigator !== "undefined" &&
|
||||
/MSIE [1-9]\./.test(navigator.userAgent)) {
|
||||
return;
|
||||
}
|
||||
var
|
||||
doc = view.document
|
||||
// only get URL when necessary in case Blob.js hasn't overridden it yet
|
||||
, get_URL = function() {
|
||||
return view.URL || view.webkitURL || view;
|
||||
}
|
||||
, save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a")
|
||||
, can_use_save_link = !view.externalHost && "download" in save_link
|
||||
, click = function(node) {
|
||||
var event = doc.createEvent("MouseEvents");
|
||||
event.initMouseEvent(
|
||||
"click", true, false, view, 0, 0, 0, 0, 0
|
||||
, false, false, false, false, 0, null
|
||||
);
|
||||
node.dispatchEvent(event);
|
||||
}
|
||||
, webkit_req_fs = view.webkitRequestFileSystem
|
||||
, req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem
|
||||
, throw_outside = function(ex) {
|
||||
(view.setImmediate || view.setTimeout)(function() {
|
||||
throw ex;
|
||||
}, 0);
|
||||
}
|
||||
, force_saveable_type = "application/octet-stream"
|
||||
, fs_min_size = 0
|
||||
, deletion_queue = []
|
||||
, process_deletion_queue = function() {
|
||||
var i = deletion_queue.length;
|
||||
while (i--) {
|
||||
var file = deletion_queue[i];
|
||||
if (typeof file === "string") { // file is an object URL
|
||||
get_URL().revokeObjectURL(file);
|
||||
} else { // file is a File
|
||||
file.remove();
|
||||
}
|
||||
}
|
||||
deletion_queue.length = 0; // clear queue
|
||||
}
|
||||
, dispatch = function(filesaver, event_types, event) {
|
||||
event_types = [].concat(event_types);
|
||||
var i = event_types.length;
|
||||
while (i--) {
|
||||
var listener = filesaver["on" + event_types[i]];
|
||||
if (typeof listener === "function") {
|
||||
try {
|
||||
listener.call(filesaver, event || filesaver);
|
||||
} catch (ex) {
|
||||
throw_outside(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
, FileSaver = function(blob, name) {
|
||||
// First try a.download, then web filesystem, then object URLs
|
||||
var
|
||||
filesaver = this
|
||||
, type = blob.type
|
||||
, blob_changed = false
|
||||
, object_url
|
||||
, target_view
|
||||
, get_object_url = function() {
|
||||
var object_url = get_URL().createObjectURL(blob);
|
||||
deletion_queue.push(object_url);
|
||||
return object_url;
|
||||
}
|
||||
, dispatch_all = function() {
|
||||
dispatch(filesaver, "writestart progress write writeend".split(" "));
|
||||
}
|
||||
// on any filesys errors revert to saving with object URLs
|
||||
, fs_error = function() {
|
||||
// don't create more object URLs than needed
|
||||
if (blob_changed || !object_url) {
|
||||
object_url = get_object_url(blob);
|
||||
}
|
||||
if (target_view) {
|
||||
target_view.location.href = object_url;
|
||||
} else {
|
||||
window.open(object_url, "_blank");
|
||||
}
|
||||
filesaver.readyState = filesaver.DONE;
|
||||
dispatch_all();
|
||||
}
|
||||
, abortable = function(func) {
|
||||
return function() {
|
||||
if (filesaver.readyState !== filesaver.DONE) {
|
||||
return func.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
}
|
||||
, create_if_not_found = {create: true, exclusive: false}
|
||||
, slice
|
||||
;
|
||||
filesaver.readyState = filesaver.INIT;
|
||||
if (!name) {
|
||||
name = "download";
|
||||
}
|
||||
if (can_use_save_link) {
|
||||
object_url = get_object_url(blob);
|
||||
save_link.href = object_url;
|
||||
save_link.download = name;
|
||||
click(save_link);
|
||||
filesaver.readyState = filesaver.DONE;
|
||||
dispatch_all();
|
||||
return;
|
||||
}
|
||||
// Object and web filesystem URLs have a problem saving in Google Chrome when
|
||||
// viewed in a tab, so I force save with application/octet-stream
|
||||
// http://code.google.com/p/chromium/issues/detail?id=91158
|
||||
if (view.chrome && type && type !== force_saveable_type) {
|
||||
slice = blob.slice || blob.webkitSlice;
|
||||
blob = slice.call(blob, 0, blob.size, force_saveable_type);
|
||||
blob_changed = true;
|
||||
}
|
||||
// Since I can't be sure that the guessed media type will trigger a download
|
||||
// in WebKit, I append .download to the filename.
|
||||
// https://bugs.webkit.org/show_bug.cgi?id=65440
|
||||
if (webkit_req_fs && name !== "download") {
|
||||
name += ".download";
|
||||
}
|
||||
if (type === force_saveable_type || webkit_req_fs) {
|
||||
target_view = view;
|
||||
}
|
||||
if (!req_fs) {
|
||||
fs_error();
|
||||
return;
|
||||
}
|
||||
fs_min_size += blob.size;
|
||||
req_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) {
|
||||
fs.root.getDirectory("saved", create_if_not_found, abortable(function(dir) {
|
||||
var save = function() {
|
||||
dir.getFile(name, create_if_not_found, abortable(function(file) {
|
||||
file.createWriter(abortable(function(writer) {
|
||||
writer.onwriteend = function(event) {
|
||||
target_view.location.href = file.toURL();
|
||||
deletion_queue.push(file);
|
||||
filesaver.readyState = filesaver.DONE;
|
||||
dispatch(filesaver, "writeend", event);
|
||||
};
|
||||
writer.onerror = function() {
|
||||
var error = writer.error;
|
||||
if (error.code !== error.ABORT_ERR) {
|
||||
fs_error();
|
||||
}
|
||||
};
|
||||
"writestart progress write abort".split(" ").forEach(function(event) {
|
||||
writer["on" + event] = filesaver["on" + event];
|
||||
});
|
||||
writer.write(blob);
|
||||
filesaver.abort = function() {
|
||||
writer.abort();
|
||||
filesaver.readyState = filesaver.DONE;
|
||||
};
|
||||
filesaver.readyState = filesaver.WRITING;
|
||||
}), fs_error);
|
||||
}), fs_error);
|
||||
};
|
||||
dir.getFile(name, {create: false}, abortable(function(file) {
|
||||
// delete file if it already exists
|
||||
file.remove();
|
||||
save();
|
||||
}), abortable(function(ex) {
|
||||
if (ex.code === ex.NOT_FOUND_ERR) {
|
||||
save();
|
||||
} else {
|
||||
fs_error();
|
||||
}
|
||||
}));
|
||||
}), fs_error);
|
||||
}), fs_error);
|
||||
}
|
||||
, FS_proto = FileSaver.prototype
|
||||
, saveAs = function(blob, name) {
|
||||
return new FileSaver(blob, name);
|
||||
}
|
||||
;
|
||||
FS_proto.abort = function() {
|
||||
var filesaver = this;
|
||||
filesaver.readyState = filesaver.DONE;
|
||||
dispatch(filesaver, "abort");
|
||||
};
|
||||
FS_proto.readyState = FS_proto.INIT = 0;
|
||||
FS_proto.WRITING = 1;
|
||||
FS_proto.DONE = 2;
|
||||
|
||||
FS_proto.error =
|
||||
FS_proto.onwritestart =
|
||||
FS_proto.onprogress =
|
||||
FS_proto.onwrite =
|
||||
FS_proto.onabort =
|
||||
FS_proto.onerror =
|
||||
FS_proto.onwriteend =
|
||||
null;
|
||||
|
||||
view.addEventListener("unload", process_deletion_queue, false);
|
||||
saveAs.unload = function() {
|
||||
process_deletion_queue();
|
||||
view.removeEventListener("unload", process_deletion_queue, false);
|
||||
};
|
||||
return saveAs;
|
||||
}(
|
||||
typeof self !== "undefined" && self
|
||||
|| typeof window !== "undefined" && window
|
||||
|| this.content
|
||||
));
|
||||
// `self` is undefined in Firefox for Android content script context
|
||||
// while `this` is nsIContentFrameMessageManager
|
||||
// with an attribute `content` that corresponds to the window
|
||||
|
||||
if (typeof module !== "undefined" && module !== null) {
|
||||
module.exports = saveAs;
|
||||
} else if ((typeof define !== "undefined" && define !== null) && (define.amd != null)) {
|
||||
define([], function() {
|
||||
return saveAs;
|
||||
});
|
||||
}
|
9
src/bower_components/FileSaver/LICENSE.md
vendored
9
src/bower_components/FileSaver/LICENSE.md
vendored
|
@ -1,9 +0,0 @@
|
|||
Copyright © 2014 [Eli Grey][1].
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
[1]: http://eligrey.com
|
89
src/bower_components/FileSaver/README.md
vendored
89
src/bower_components/FileSaver/README.md
vendored
|
@ -1,89 +0,0 @@
|
|||
FileSaver.js
|
||||
============
|
||||
|
||||
FileSaver.js implements the HTML5 W3C `saveAs()` FileSaver interface in browsers that do
|
||||
not natively support it. There is a [FileSaver.js demo][1] that demonstrates saving
|
||||
various media types.
|
||||
|
||||
FileSaver.js is the solution to saving files on the client-side, and is perfect for
|
||||
webapps that need to generate files, or for saving sensitive information that shouldn't be
|
||||
sent to an external server.
|
||||
|
||||
Looking for `canvas.toBlob()` for saving canvases? Check out
|
||||
[canvas-toBlob.js](https://github.com/eligrey/canvas-toBlob.js) for a cross-browser implementation.
|
||||
|
||||
Supported Browsers
|
||||
------------------
|
||||
|
||||
| Browser | Constructs as | Filenames | Max Blob Size | Dependencies |
|
||||
| -------------- | ------------- | ------------ | ------------- | ------------ |
|
||||
| Firefox 20+ | Blob | Yes | 800 MiB | None |
|
||||
| Firefox < 20 | data: URI | No | n/a | [Blob.js](https://github.com/eligrey/Blob.js) |
|
||||
| Chrome | Blob | Yes | 345 MiB | None |
|
||||
| Chrome for Android | Blob | Yes | ? | None |
|
||||
| IE 10+ | Blob | Yes | 600 MiB | None |
|
||||
| Opera 15+ | Blob | Yes | 345 MiB | None |
|
||||
| Opera < 15 | data: URI | No | n/a | [Blob.js](https://github.com/eligrey/Blob.js) |
|
||||
| Safari 6.1+* | Blob | No | ? | None |
|
||||
| Safari < 6 | data: URI | No | n/a | [Blob.js](https://github.com/eligrey/Blob.js) |
|
||||
|
||||
Feature detection is possible:
|
||||
|
||||
```js
|
||||
try {
|
||||
var isFileSaverSupported = !!new Blob;
|
||||
} catch (e) {}
|
||||
```
|
||||
|
||||
### IE < 10
|
||||
|
||||
It is possible to save HTML documents (and only HTML documents) in IE < 10 without Flash-based
|
||||
polyfills. See [sudodoki's comment](https://github.com/eligrey/FileSaver.js/issues/56#issuecomment-30917476)
|
||||
for more information on how to accomplish this.
|
||||
|
||||
### Safari 6.1+
|
||||
|
||||
Blobs may be opened instead of saved sometimes—you may have to direct your Safari users to manually
|
||||
press <kbd>⌘</kbd>+<kbd>S</kbd> to save the file after it is opened. Further information is available
|
||||
[on the issue tracker](https://github.com/eligrey/FileSaver.js/issues/12).
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
```js
|
||||
FileSaver saveAs(in Blob data, in DOMString filename)
|
||||
```
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
### Saving text
|
||||
|
||||
```js
|
||||
var blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
|
||||
saveAs(blob, "hello world.txt");
|
||||
```
|
||||
|
||||
The standard W3C File API [`Blob`][3] interface is not available in all browsers.
|
||||
[Blob.js][4] is a cross-browser `Blob` implementation that solves this.
|
||||
|
||||
### Saving a canvas
|
||||
|
||||
```js
|
||||
var canvas = document.getElementById("my-canvas"), ctx = canvas.getContext("2d");
|
||||
// draw to canvas...
|
||||
canvas.toBlob(function(blob) {
|
||||
saveAs(blob, "pretty image.png");
|
||||
});
|
||||
```
|
||||
|
||||
Note: The standard HTML5 `canvas.toBlob()` method is not available in all browsers.
|
||||
[canvas-toBlob.js][5] is a cross-browser `canvas.toBlob()` that polyfills this.
|
||||
|
||||
|
||||

|
||||
|
||||
[1]: http://eligrey.com/demos/FileSaver.js/
|
||||
[3]: https://developer.mozilla.org/en-US/docs/DOM/Blob
|
||||
[4]: https://github.com/eligrey/Blob.js
|
||||
[5]: https://github.com/eligrey/canvas-toBlob.js
|
50
src/bower_components/FileSaver/demo/demo.css
vendored
50
src/bower_components/FileSaver/demo/demo.css
vendored
|
@ -1,50 +0,0 @@
|
|||
html {
|
||||
background-color: #DDD;
|
||||
}
|
||||
body {
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
width: 900px;
|
||||
margin: 0 auto;
|
||||
font-family: Verdana, Helvetica, Arial, sans-serif;
|
||||
-webkit-box-shadow: 0 0 10px 2px rgba(0, 0, 0, .5);
|
||||
-moz-box-shadow: 0 0 10px 2px rgba(0, 0, 0, .5);
|
||||
box-shadow: 0 0 10px 2px rgba(0, 0, 0, .5);
|
||||
padding: 7px 25px 70px;
|
||||
background-color: #FFF;
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: Georgia, "Times New Roman", serif;
|
||||
}
|
||||
h2, form {
|
||||
text-align: center;
|
||||
}
|
||||
form {
|
||||
margin-top: 5px;
|
||||
}
|
||||
.input {
|
||||
width: 500px;
|
||||
height: 300px;
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
}
|
||||
section {
|
||||
margin-top: 40px;
|
||||
}
|
||||
#canvas {
|
||||
cursor: crosshair;
|
||||
}
|
||||
#canvas, #html {
|
||||
border: 1px solid #000;
|
||||
}
|
||||
.filename {
|
||||
text-align: right;
|
||||
}
|
||||
#html {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
overflow: auto;
|
||||
padding: 1em;
|
||||
}
|
216
src/bower_components/FileSaver/demo/demo.js
vendored
216
src/bower_components/FileSaver/demo/demo.js
vendored
|
@ -1,216 +0,0 @@
|
|||
/*! FileSaver.js demo script
|
||||
* 2012-01-23
|
||||
*
|
||||
* By Eli Grey, http://eligrey.com
|
||||
* License: X11/MIT
|
||||
* See LICENSE.md
|
||||
*/
|
||||
|
||||
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/demo/demo.js */
|
||||
|
||||
/*jshint laxbreak: true, laxcomma: true, smarttabs: true*/
|
||||
/*global saveAs, self*/
|
||||
|
||||
(function(view) {
|
||||
"use strict";
|
||||
// The canvas drawing portion of the demo is based off the demo at
|
||||
// http://www.williammalone.com/articles/create-html5-canvas-javascript-drawing-app/
|
||||
var
|
||||
document = view.document
|
||||
, $ = function(id) {
|
||||
return document.getElementById(id);
|
||||
}
|
||||
, session = view.sessionStorage
|
||||
// only get URL when necessary in case Blob.js hasn't defined it yet
|
||||
, get_blob = function() {
|
||||
return view.Blob;
|
||||
}
|
||||
|
||||
, canvas = $("canvas")
|
||||
, canvas_options_form = $("canvas-options")
|
||||
, canvas_filename = $("canvas-filename")
|
||||
, canvas_clear_button = $("canvas-clear")
|
||||
|
||||
, text = $("text")
|
||||
, text_options_form = $("text-options")
|
||||
, text_filename = $("text-filename")
|
||||
|
||||
, html = $("html")
|
||||
, html_options_form = $("html-options")
|
||||
, html_filename = $("html-filename")
|
||||
|
||||
, ctx = canvas.getContext("2d")
|
||||
, drawing = false
|
||||
, x_points = session.x_points || []
|
||||
, y_points = session.y_points || []
|
||||
, drag_points = session.drag_points || []
|
||||
, add_point = function(x, y, dragging) {
|
||||
x_points.push(x);
|
||||
y_points.push(y);
|
||||
drag_points.push(dragging);
|
||||
}
|
||||
, draw = function(){
|
||||
canvas.width = canvas.width;
|
||||
ctx.lineWidth = 6;
|
||||
ctx.lineJoin = "round";
|
||||
ctx.strokeStyle = "#000000";
|
||||
var
|
||||
i = 0
|
||||
, len = x_points.length
|
||||
;
|
||||
for(; i < len; i++) {
|
||||
ctx.beginPath();
|
||||
if (i && drag_points[i]) {
|
||||
ctx.moveTo(x_points[i-1], y_points[i-1]);
|
||||
} else {
|
||||
ctx.moveTo(x_points[i]-1, y_points[i]);
|
||||
}
|
||||
ctx.lineTo(x_points[i], y_points[i]);
|
||||
ctx.closePath();
|
||||
ctx.stroke();
|
||||
}
|
||||
}
|
||||
, stop_drawing = function() {
|
||||
drawing = false;
|
||||
}
|
||||
|
||||
// Title guesser and document creator available at https://gist.github.com/1059648
|
||||
, guess_title = function(doc) {
|
||||
var
|
||||
h = "h6 h5 h4 h3 h2 h1".split(" ")
|
||||
, i = h.length
|
||||
, headers
|
||||
, header_text
|
||||
;
|
||||
while (i--) {
|
||||
headers = doc.getElementsByTagName(h[i]);
|
||||
for (var j = 0, len = headers.length; j < len; j++) {
|
||||
header_text = headers[j].textContent.trim();
|
||||
if (header_text) {
|
||||
return header_text;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
, doc_impl = document.implementation
|
||||
, create_html_doc = function(html) {
|
||||
var
|
||||
dt = doc_impl.createDocumentType('html', null, null)
|
||||
, doc = doc_impl.createDocument("http://www.w3.org/1999/xhtml", "html", dt)
|
||||
, doc_el = doc.documentElement
|
||||
, head = doc_el.appendChild(doc.createElement("head"))
|
||||
, charset_meta = head.appendChild(doc.createElement("meta"))
|
||||
, title = head.appendChild(doc.createElement("title"))
|
||||
, body = doc_el.appendChild(doc.createElement("body"))
|
||||
, i = 0
|
||||
, len = html.childNodes.length
|
||||
;
|
||||
charset_meta.setAttribute("charset", html.ownerDocument.characterSet);
|
||||
for (; i < len; i++) {
|
||||
body.appendChild(doc.importNode(html.childNodes.item(i), true));
|
||||
}
|
||||
var title_text = guess_title(doc);
|
||||
if (title_text) {
|
||||
title.appendChild(doc.createTextNode(title_text));
|
||||
}
|
||||
return doc;
|
||||
}
|
||||
;
|
||||
canvas.width = 500;
|
||||
canvas.height = 300;
|
||||
|
||||
if (typeof x_points === "string") {
|
||||
x_points = JSON.parse(x_points);
|
||||
} if (typeof y_points === "string") {
|
||||
y_points = JSON.parse(y_points);
|
||||
} if (typeof drag_points === "string") {
|
||||
drag_points = JSON.parse(drag_points);
|
||||
} if (session.canvas_filename) {
|
||||
canvas_filename.value = session.canvas_filename;
|
||||
} if (session.text) {
|
||||
text.value = session.text;
|
||||
} if (session.text_filename) {
|
||||
text_filename.value = session.text_filename;
|
||||
} if (session.html) {
|
||||
html.innerHTML = session.html;
|
||||
} if (session.html_filename) {
|
||||
html_filename.value = session.html_filename;
|
||||
}
|
||||
|
||||
drawing = true;
|
||||
draw();
|
||||
drawing = false;
|
||||
|
||||
canvas_clear_button.addEventListener("click", function() {
|
||||
canvas.width = canvas.width;
|
||||
x_points.length =
|
||||
y_points.length =
|
||||
drag_points.length =
|
||||
0;
|
||||
}, false);
|
||||
canvas.addEventListener("mousedown", function(event) {
|
||||
event.preventDefault();
|
||||
drawing = true;
|
||||
add_point(event.pageX - canvas.offsetLeft, event.pageY - canvas.offsetTop, false);
|
||||
draw();
|
||||
}, false);
|
||||
canvas.addEventListener("mousemove", function(event) {
|
||||
if (drawing) {
|
||||
add_point(event.pageX - canvas.offsetLeft, event.pageY - canvas.offsetTop, true);
|
||||
draw();
|
||||
}
|
||||
}, false);
|
||||
canvas.addEventListener("mouseup", stop_drawing, false);
|
||||
canvas.addEventListener("mouseout", stop_drawing, false);
|
||||
|
||||
canvas_options_form.addEventListener("submit", function(event) {
|
||||
event.preventDefault();
|
||||
canvas.toBlob(function(blob) {
|
||||
saveAs(
|
||||
blob
|
||||
, (canvas_filename.value || canvas_filename.placeholder) + ".png"
|
||||
);
|
||||
}, "image/png");
|
||||
}, false);
|
||||
|
||||
text_options_form.addEventListener("submit", function(event) {
|
||||
event.preventDefault();
|
||||
var BB = get_blob();
|
||||
saveAs(
|
||||
new BB(
|
||||
[text.value || text.placeholder]
|
||||
, {type: "text/plain;charset=" + document.characterSet}
|
||||
)
|
||||
, (text_filename.value || text_filename.placeholder) + ".txt"
|
||||
);
|
||||
}, false);
|
||||
|
||||
html_options_form.addEventListener("submit", function(event) {
|
||||
event.preventDefault();
|
||||
var
|
||||
BB = get_blob()
|
||||
, xml_serializer = new XMLSerializer()
|
||||
, doc = create_html_doc(html)
|
||||
;
|
||||
saveAs(
|
||||
new BB(
|
||||
[xml_serializer.serializeToString(doc)]
|
||||
, {type: "application/xhtml+xml;charset=" + document.characterSet}
|
||||
)
|
||||
, (html_filename.value || html_filename.placeholder) + ".xhtml"
|
||||
);
|
||||
}, false);
|
||||
|
||||
view.addEventListener("unload", function() {
|
||||
session.x_points = JSON.stringify(x_points);
|
||||
session.y_points = JSON.stringify(y_points);
|
||||
session.drag_points = JSON.stringify(drag_points);
|
||||
session.canvas_filename = canvas_filename.value;
|
||||
|
||||
session.text = text.value;
|
||||
session.text_filename = text_filename.value;
|
||||
|
||||
session.html = html.innerHTML;
|
||||
session.html_filename = html_filename.value;
|
||||
}, false);
|
||||
}(self));
|
|
@ -1,2 +0,0 @@
|
|||
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/demo/demo.js */
|
||||
(function(n){"use strict";var s=n.document,g=function(A){return s.getElementById(A)},b=n.sessionStorage,x=function(){return n.Blob},f=g("canvas"),r=g("canvas-options"),y=g("canvas-filename"),p=g("canvas-clear"),q=g("text"),t=g("text-options"),h=g("text-filename"),m=g("html"),e=g("html-options"),i=g("html-filename"),u=f.getContext("2d"),z=false,a=b.x_points||[],o=b.y_points||[],d=b.drag_points||[],j=function(A,C,B){a.push(A);o.push(C);d.push(B)},l=function(){f.width=f.width;u.lineWidth=6;u.lineJoin="round";u.strokeStyle="#000000";var B=0,A=a.length;for(;B<A;B++){u.beginPath();if(B&&d[B]){u.moveTo(a[B-1],o[B-1])}else{u.moveTo(a[B]-1,o[B])}u.lineTo(a[B],o[B]);u.closePath();u.stroke()}},c=function(){z=false},w=function(E){var D="h6 h5 h4 h3 h2 h1".split(" "),C=D.length,F,G;while(C--){F=E.getElementsByTagName(D[C]);for(var B=0,A=F.length;B<A;B++){G=F[B].textContent.trim();if(G){return G}}}},v=s.implementation,k=function(D){var B=v.createDocumentType("html",null,null),J=v.createDocument("http://www.w3.org/1999/xhtml","html",B),A=J.documentElement,H=A.appendChild(J.createElement("head")),K=H.appendChild(J.createElement("meta")),I=H.appendChild(J.createElement("title")),E=A.appendChild(J.createElement("body")),C=0,G=D.childNodes.length;K.setAttribute("charset",D.ownerDocument.characterSet);for(;C<G;C++){E.appendChild(J.importNode(D.childNodes.item(C),true))}var F=w(J);if(F){I.appendChild(J.createTextNode(F))}return J};f.width=500;f.height=300;if(typeof a==="string"){a=JSON.parse(a)}if(typeof o==="string"){o=JSON.parse(o)}if(typeof d==="string"){d=JSON.parse(d)}if(b.canvas_filename){y.value=b.canvas_filename}if(b.text){q.value=b.text}if(b.text_filename){h.value=b.text_filename}if(b.html){m.innerHTML=b.html}if(b.html_filename){i.value=b.html_filename}z=true;l();z=false;p.addEventListener("click",function(){f.width=f.width;a.length=o.length=d.length=0},false);f.addEventListener("mousedown",function(A){A.preventDefault();z=true;j(A.pageX-f.offsetLeft,A.pageY-f.offsetTop,false);l()},false);f.addEventListener("mousemove",function(A){if(z){j(A.pageX-f.offsetLeft,A.pageY-f.offsetTop,true);l()}},false);f.addEventListener("mouseup",c,false);f.addEventListener("mouseout",c,false);r.addEventListener("submit",function(A){A.preventDefault();f.toBlob(function(B){saveAs(B,(y.value||y.placeholder)+".png")},"image/png")},false);t.addEventListener("submit",function(A){A.preventDefault();var B=x();saveAs(new B([q.value||q.placeholder],{type:"text/plain;charset="+s.characterSet}),(h.value||h.placeholder)+".txt")},false);e.addEventListener("submit",function(B){B.preventDefault();var D=x(),A=new XMLSerializer,C=k(m);saveAs(new D([A.serializeToString(C)],{type:"application/xhtml+xml;charset="+s.characterSet}),(i.value||i.placeholder)+".xhtml")},false);n.addEventListener("unload",function(){b.x_points=JSON.stringify(a);b.y_points=JSON.stringify(o);b.drag_points=JSON.stringify(d);b.canvas_filename=y.value;b.text=q.value;b.text_filename=h.value;b.html=m.innerHTML;b.html_filename=i.value},false)}(self));
|
57
src/bower_components/FileSaver/demo/index.xhtml
vendored
57
src/bower_components/FileSaver/demo/index.xhtml
vendored
|
@ -1,57 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US-x-Hixie">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>FileSaver.js demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="demo.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<h1><a href="https://github.com/eligrey/FileSaver.js">FileSaver.js</a> demo</h1>
|
||||
<p>
|
||||
The following examples demonstrate how it is possible to generate and save any type of data right in the browser using the W3C <code>saveAs()</code> <a href="http://www.w3.org/TR/file-writer-api/#the-filesaver-interface">FileSaver</a> interface, without contacting any servers.
|
||||
</p>
|
||||
<section id="image-demo">
|
||||
<h2>Saving an image</h2>
|
||||
<canvas class="input" id="canvas" width="500" height="300"/>
|
||||
<form id="canvas-options">
|
||||
<label>Filename: <input type="text" class="filename" id="canvas-filename" placeholder="doodle"/>.png</label>
|
||||
<input type="submit" value="Save"/>
|
||||
<input type="button" id="canvas-clear" value="Clear"/>
|
||||
</form>
|
||||
</section>
|
||||
<section id="text-demo">
|
||||
<h2>Saving text</h2>
|
||||
<textarea class="input" id="text" placeholder="Once upon a time..."/>
|
||||
<form id="text-options">
|
||||
<label>Filename: <input type="text" class="filename" id="text-filename" placeholder="a plain document"/>.txt</label>
|
||||
<input type="submit" value="Save"/>
|
||||
</form>
|
||||
</section>
|
||||
<section id="html-demo">
|
||||
<h2>Saving rich text</h2>
|
||||
<div class="input" id="html" contenteditable="">
|
||||
<h3>Some example rich text</h3>
|
||||
<ul>
|
||||
<li><del>Plain</del> <ins>Boring</ins> text.</li>
|
||||
<li><em>Emphasized text!</em></li>
|
||||
<li><strong>Strong text!</strong></li>
|
||||
<li>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="70" height="70">
|
||||
<circle cx="35" cy="35" r="35" fill="red"/>
|
||||
<text x="10" y="40">image</text>
|
||||
</svg>
|
||||
</li>
|
||||
<li><a href="https://github.com/eligrey/FileSaver.js">A link.</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<form id="html-options">
|
||||
<label>Filename: <input type="text" class="filename" id="html-filename" placeholder="a rich document"/>.xhtml</label>
|
||||
<input type="submit" value="Save"/>
|
||||
</form>
|
||||
</section>
|
||||
<script async="" src="https://raw.github.com/eligrey/Blob.js/master/Blob.min.js"/>
|
||||
<script async="" src="https://raw.github.com/eligrey/canvas-toBlob.js/master/canvas-toBlob.js"/>
|
||||
<script async="" src="https://raw.github.com/eligrey/FileSaver.js/master/FileSaver.js"/>
|
||||
<script async="" src="https://raw.github.com/eligrey/FileSaver.js/master/demo/demo.js"/>
|
||||
</body>
|
||||
</html>
|
14
src/bower_components/ace-builds/.bower.json
vendored
14
src/bower_components/ace-builds/.bower.json
vendored
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"name": "ace-builds",
|
||||
"homepage": "https://github.com/ajaxorg/ace-builds",
|
||||
"version": "1.1.3",
|
||||
"_release": "1.1.3",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.1.3",
|
||||
"commit": "fc9d2cae9fe8e6e95e74c86a31d21caadd8f9f39"
|
||||
},
|
||||
"_source": "git://github.com/ajaxorg/ace-builds.git",
|
||||
"_target": "~1.1.1",
|
||||
"_originalSource": "ace-builds"
|
||||
}
|
275
src/bower_components/ace-builds/ChangeLog.txt
vendored
275
src/bower_components/ace-builds/ChangeLog.txt
vendored
|
@ -1,275 +0,0 @@
|
|||
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
|
24
src/bower_components/ace-builds/LICENSE
vendored
24
src/bower_components/ace-builds/LICENSE
vendored
|
@ -1,24 +0,0 @@
|
|||
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.
|
21
src/bower_components/ace-builds/README.md
vendored
21
src/bower_components/ace-builds/README.md
vendored
|
@ -1,21 +0,0 @@
|
|||
Ace (Ajax.org Cloud9 Editor)
|
||||
============================
|
||||
|
||||
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) -
|
||||
|
||||
|
||||
For a simple way of embedding ace into webpage see https://github.com/ajaxorg/ace-builds/blob/master/editor.html
|
||||
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/scrollable-page.html), or [minimal demo](http://ajaxorg.github.com/ace-builds/editor.html)
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 48 KiB |
|
@ -1,47 +0,0 @@
|
|||
/*PACKAGE
|
||||
@import url(//fonts.googleapis.com/css?family=Droid+Sans+Mono);
|
||||
PACKAGE*/
|
||||
|
||||
html {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
font-family: Arial, Helvetica, sans-serif, Tahoma, Verdana, sans-serif;
|
||||
font-size: 12px;
|
||||
background: rgb(14, 98, 165);
|
||||
color: white;
|
||||
}
|
||||
|
||||
#logo {
|
||||
padding: 15px;
|
||||
margin-left: 70px;
|
||||
}
|
||||
|
||||
#editor {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 280px;
|
||||
bottom: 0px;
|
||||
right: 0px;
|
||||
background: white;
|
||||
}
|
||||
|
||||
#controls {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#controls td {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#controls td + td {
|
||||
text-align: left;
|
||||
}
|
39
src/bower_components/ace-builds/editor.html
vendored
39
src/bower_components/ace-builds/editor.html
vendored
|
@ -1,39 +0,0 @@
|
|||
<!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">function foo(items) {
|
||||
var i;
|
||||
for (i = 0; i < items.length; i++) {
|
||||
alert("Ace Rocks " + items[i]);
|
||||
}
|
||||
}</pre>
|
||||
|
||||
<script src="src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script>
|
||||
var editor = ace.edit("editor");
|
||||
editor.setTheme("ace/theme/twilight");
|
||||
editor.getSession().setMode("ace/mode/javascript");
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,268 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Ace Kitchen Sink</title>
|
||||
<meta name="author" content="Fabian Jakobs">
|
||||
<!--
|
||||
|
||||
Ace
|
||||
version
|
||||
commit
|
||||
|
||||
-->
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="kitchen-sink/styles.css" type="text/css" media="screen" charset="utf-8">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a href="http://ajaxorg.github.com/ace/" >
|
||||
<img id="logo" src="kitchen-sink/logo.png">
|
||||
</a>
|
||||
<table id="controls">
|
||||
<tr>
|
||||
<td>
|
||||
<label for="doc">Document</label>
|
||||
</td><td>
|
||||
<select id="doc" size="1">
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="mode">Mode</label>
|
||||
</td><td>
|
||||
<select id="mode" size="1">
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="split">Split</label>
|
||||
</td><td>
|
||||
<select id="split" size="1">
|
||||
<option value="none">None</option>
|
||||
<option value="below">Below</option>
|
||||
<option value="beside">Beside</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="theme">Theme</label>
|
||||
</td><td>
|
||||
<select id="theme" size="1">
|
||||
<optgroup label="Bright">
|
||||
<option value="ace/theme/chrome">Chrome</option>
|
||||
<option value="ace/theme/clouds">Clouds</option>
|
||||
<option value="ace/theme/crimson_editor">Crimson Editor</option>
|
||||
<option value="ace/theme/dawn">Dawn</option>
|
||||
<option value="ace/theme/dreamweaver">Dreamweaver</option>
|
||||
<option value="ace/theme/eclipse">Eclipse</option>
|
||||
<option value="ace/theme/github">GitHub</option>
|
||||
<option value="ace/theme/solarized_light">Solarized Light</option>
|
||||
<option value="ace/theme/textmate" selected="selected">TextMate</option>
|
||||
<option value="ace/theme/tomorrow">Tomorrow</option>
|
||||
<option value="ace/theme/xcode">XCode</option>
|
||||
</optgroup>
|
||||
<optgroup label="Dark">
|
||||
<option value="ace/theme/ambiance">Ambiance</option>
|
||||
<option value="ace/theme/chaos">Chaos</option>
|
||||
<option value="ace/theme/clouds_midnight">Clouds Midnight</option>
|
||||
<option value="ace/theme/cobalt">Cobalt</option>
|
||||
<option value="ace/theme/idle_fingers">idleFingers</option>
|
||||
<option value="ace/theme/kr_theme">krTheme</option>
|
||||
<option value="ace/theme/merbivore">Merbivore</option>
|
||||
<option value="ace/theme/merbivore_soft">Merbivore Soft</option>
|
||||
<option value="ace/theme/mono_industrial">Mono Industrial</option>
|
||||
<option value="ace/theme/monokai">Monokai</option>
|
||||
<option value="ace/theme/pastel_on_dark">Pastel on dark</option>
|
||||
<option value="ace/theme/solarized_dark">Solarized Dark</option>
|
||||
<option value="ace/theme/twilight">Twilight</option>
|
||||
<option value="ace/theme/tomorrow_night">Tomorrow Night</option>
|
||||
<option value="ace/theme/tomorrow_night_blue">Tomorrow Night Blue</option>
|
||||
<option value="ace/theme/tomorrow_night_bright">Tomorrow Night Bright</option>
|
||||
<option value="ace/theme/tomorrow_night_eighties">Tomorrow Night 80s</option>
|
||||
<option value="ace/theme/vibrant_ink">Vibrant Ink</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="fontsize">Font Size</label>
|
||||
</td><td>
|
||||
<select id="fontsize" size="1">
|
||||
<option value="10px">10px</option>
|
||||
<option value="11px">11px</option>
|
||||
<option value="12px" selected="selected">12px</option>
|
||||
<option value="14px">14px</option>
|
||||
<option value="16px">16px</option>
|
||||
<option value="20px">20px</option>
|
||||
<option value="24px">24px</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="folding">Code Folding</label>
|
||||
</td><td>
|
||||
<select id="folding" size="1">
|
||||
<option value="manual">manual</option>
|
||||
<option value="markbegin" selected="selected">mark begin</option>
|
||||
<option value="markbeginend">mark begin and end</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="keybinding">Key Binding</label>
|
||||
</td><td>
|
||||
<select id="keybinding" size="1">
|
||||
<option value="ace">Ace</option>
|
||||
<option value="vim">Vim</option>
|
||||
<option value="emacs">Emacs</option>
|
||||
<option value="custom">Custom</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="soft_wrap">Soft Wrap</label>
|
||||
</td><td>
|
||||
<select id="soft_wrap" size="1">
|
||||
<option value="off">Off</option>
|
||||
<option value="40">40 Chars</option>
|
||||
<option value="80">80 Chars</option>
|
||||
<option value="free">Free</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="2">
|
||||
<table id="more-controls">
|
||||
<tr>
|
||||
<td>
|
||||
<label for="select_style">Full Line Selection</label>
|
||||
</td><td>
|
||||
<input type="checkbox" name="select_style" id="select_style" checked>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="highlight_active">Highlight Active Line</label>
|
||||
</td><td>
|
||||
<input type="checkbox" name="highlight_active" id="highlight_active" checked>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="show_hidden">Show Invisibles</label>
|
||||
</td><td>
|
||||
<input type="checkbox" name="show_hidden" id="show_hidden" checked>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="display_indent_guides">Show Indent Guides</label>
|
||||
</td><td>
|
||||
<input type="checkbox" name="display_indent_guides" id="display_indent_guides" checked>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="show_hscroll">Persistent HScroll</label>
|
||||
</td><td>
|
||||
<input type="checkbox" name="show_hscroll" id="show_hscroll">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="animate_scroll">Animate scrolling</label>
|
||||
</td><td>
|
||||
<input type="checkbox" name="animate_scroll" id="animate_scroll">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="show_gutter">Show Gutter</label>
|
||||
</td><td>
|
||||
<input type="checkbox" id="show_gutter" checked>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="show_print_margin">Show Print Margin</label>
|
||||
</td><td>
|
||||
<input type="checkbox" id="show_print_margin" checked>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="soft_tab">Use Soft Tab</label>
|
||||
</td><td>
|
||||
<input type="checkbox" id="soft_tab" checked>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="highlight_selected_word">Highlight selected word</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="highlight_selected_word" checked>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="enable_behaviours">Enable Behaviours</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="enable_behaviours">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="fade_fold_widgets">Fade Fold Widgets</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="fade_fold_widgets">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="highlight_token">Show token info</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="highlight_token">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="editor-container"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../demo/kitchen-sink/require.js"></script>
|
||||
<script src="src/ace.js" data-ace-base="src"></script>
|
||||
<script src="src/keybinding-vim.js"></script>
|
||||
<script src="src/keybinding-emacs.js"></script>
|
||||
<script src="kitchen-sink/demo.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
require(["kitchen-sink/demo", "ace/ace"])
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
282
src/bower_components/ace-builds/kitchen-sink.html
vendored
282
src/bower_components/ace-builds/kitchen-sink.html
vendored
|
@ -1,282 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Ace Kitchen Sink</title>
|
||||
<meta name="author" content="Fabian Jakobs">
|
||||
<!--
|
||||
Ace
|
||||
version
|
||||
commit
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<link href="./doc/site/images/favicon.ico" rel="icon" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="kitchen-sink/styles.css" type="text/css" media="screen" charset="utf-8">
|
||||
<script async="true" src="http://use.edgefonts.net/source-code-pro.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="optionsPanel" style="position:absolute;height:100%;width:260px">
|
||||
<a href="http://c9.io" title="Cloud9 IDE | Your code anywhere, anytime">
|
||||
<img id="c9-logo" src="kitchen-sink/logo.png" style="width: 172px;margin: -9px 30px -12px 51px;">
|
||||
</a>
|
||||
<div style="position: absolute; overflow: hidden; top:100px; bottom:0">
|
||||
<div style="width: 120%; height:100%; overflow-y: scroll">
|
||||
|
||||
<table id="controls">
|
||||
<tr>
|
||||
<td>
|
||||
<label for="doc">Document</label>
|
||||
</td><td>
|
||||
<select id="doc" size="1">
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="mode">Mode</label>
|
||||
</td><td>
|
||||
<select id="mode" size="1">
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="split">Split</label>
|
||||
</td><td>
|
||||
<select id="split" size="1">
|
||||
<option value="none">None</option>
|
||||
<option value="below">Below</option>
|
||||
<option value="beside">Beside</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="theme">Theme</label>
|
||||
</td><td>
|
||||
<select id="theme" size="1">
|
||||
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="fontsize">Font Size</label>
|
||||
</td><td>
|
||||
<select id="fontsize" size="1">
|
||||
<option value="10px">10px</option>
|
||||
<option value="11px">11px</option>
|
||||
<option value="12px" selected="selected">12px</option>
|
||||
<option value="13px">13px</option>
|
||||
<option value="14px">14px</option>
|
||||
<option value="16px">16px</option>
|
||||
<option value="18px">18px</option>
|
||||
<option value="20px">20px</option>
|
||||
<option value="24px">24px</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="folding">Code Folding</label>
|
||||
</td><td>
|
||||
<select id="folding" size="1">
|
||||
<option value="manual">manual</option>
|
||||
<option value="markbegin" selected="selected">mark begin</option>
|
||||
<option value="markbeginend">mark begin and end</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="keybinding">Key Binding</label>
|
||||
</td><td>
|
||||
<select id="keybinding" size="1">
|
||||
<option value="ace">Ace</option>
|
||||
<option value="vim">Vim</option>
|
||||
<option value="emacs">Emacs</option>
|
||||
<option value="custom">Custom</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="soft_wrap">Soft Wrap</label>
|
||||
</td><td>
|
||||
<select id="soft_wrap" size="1">
|
||||
<option value="off">Off</option>
|
||||
<option value="40">40 Chars</option>
|
||||
<option value="80">80 Chars</option>
|
||||
<option value="free">Free</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="2">
|
||||
<table id="more-controls">
|
||||
<tr>
|
||||
<td>
|
||||
<label for="select_style">Full Line Selection</label>
|
||||
</td><td>
|
||||
<input type="checkbox" name="select_style" id="select_style" checked>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="highlight_active">Highlight Active Line</label>
|
||||
</td><td>
|
||||
<input type="checkbox" name="highlight_active" id="highlight_active" checked>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="show_hidden">Show Invisibles</label>
|
||||
</td><td>
|
||||
<input type="checkbox" name="show_hidden" id="show_hidden" checked>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="display_indent_guides">Show Indent Guides</label>
|
||||
</td><td>
|
||||
<input type="checkbox" name="display_indent_guides" id="display_indent_guides" checked>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="show_hscroll">Persistent HScroll</label>
|
||||
</td><td>
|
||||
<input type="checkbox" name="show_hscroll" id="show_hscroll">
|
||||
<label for="show_hscroll">VScroll</label>
|
||||
<input type="checkbox" name="show_vscroll" id="show_vscroll">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="animate_scroll">Animate scrolling</label>
|
||||
</td><td>
|
||||
<input type="checkbox" name="animate_scroll" id="animate_scroll">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="show_gutter">Show Gutter</label>
|
||||
</td><td>
|
||||
<input type="checkbox" id="show_gutter" checked>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="show_print_margin">Show Print Margin</label>
|
||||
</td><td>
|
||||
<input type="checkbox" id="show_print_margin" checked>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="soft_tab">Use Soft Tab</label>
|
||||
</td><td>
|
||||
<input type="checkbox" id="soft_tab" checked>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="highlight_selected_word">Highlight selected word</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="highlight_selected_word" checked>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="enable_behaviours">Enable Behaviours</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="enable_behaviours">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="fade_fold_widgets">Fade Fold Widgets</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="fade_fold_widgets">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="elastic_tabstops">Enable Elastic Tabstops</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="elastic_tabstops">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="isearch">Incremental Search</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="isearch">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="highlight_token">Show token info</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="highlight_token">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="read_only">Read-only</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="read_only">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<label for="scrollPastEnd">Scroll Past End</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="scrollPastEnd" checked>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="button" value="Edit Snippets" onclick="env.editSnippets()">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<a href="http://ace.c9.io">
|
||||
<img id="ace-logo" src="doc/site/images/ace-logo.png" style="width: 134px;margin: 46px 0px 4px 66px;">
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="editor-container"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="src/ace.js" data-ace-base="src" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="src/keybinding-vim.js"></script>
|
||||
<script src="src/keybinding-emacs.js"></script>
|
||||
<script src="kitchen-sink/demo.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
require("kitchen-sink/demo");
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
6643
src/bower_components/ace-builds/kitchen-sink/demo.js
vendored
6643
src/bower_components/ace-builds/kitchen-sink/demo.js
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,17 +0,0 @@
|
|||
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!");
|
||||
}
|
||||
}
|
|
@ -1,247 +0,0 @@
|
|||
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()
|
|
@ -1,122 +0,0 @@
|
|||
.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
|
|
@ -1,57 +0,0 @@
|
|||
{
|
||||
# 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 = { };
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
// ace can highlight scad!
|
||||
module Element(xpos, ypos, zpos){
|
||||
translate([xpos,ypos,zpos]){
|
||||
union(){
|
||||
cube([10,10,4],true);
|
||||
cylinder(10,15,5);
|
||||
translate([0,0,10])sphere(5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
union(){
|
||||
for(i=[0:30]){
|
||||
# Element(0,0,0);
|
||||
Element(15*i,0,0);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = [3, 5, 7, 11]){
|
||||
rotate([i*10,0,0])scale([1,1,i])cube(10);
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
***************************************
|
||||
** 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.
|
|
@ -1,51 +0,0 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
with Ada.Text_IO; use Ada.Text_IO;
|
||||
procedure Hello is
|
||||
begin
|
||||
Put_Line("Hello, world!");
|
||||
end Hello;
|
|
@ -1,18 +0,0 @@
|
|||
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
|
|
@ -1,35 +0,0 @@
|
|||
#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
|
|
@ -1,15 +0,0 @@
|
|||
:: 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
|
|
@ -1,25 +0,0 @@
|
|||
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
|
|
@ -1,44 +0,0 @@
|
|||
// 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;
|
||||
a+=2; // equivalent to a=a+2
|
||||
cout << a;
|
||||
#if VERBOSE >= 2
|
||||
prints("trace message");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Print an error message and get out */
|
||||
#define ABORT \
|
||||
do { \
|
||||
print( "Abort\n" ); \
|
||||
exit(8); \
|
||||
} while (0) /* Note: No semicolon */
|
|
@ -1,42 +0,0 @@
|
|||
-- 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
|
|
@ -1,19 +0,0 @@
|
|||
(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
|
|
@ -1 +0,0 @@
|
|||
TODO
|
|
@ -1,22 +0,0 @@
|
|||
#!/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 π"
|
|
@ -1,22 +0,0 @@
|
|||
#!/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 π"
|
|
@ -1,5 +0,0 @@
|
|||
<!--- hello world --->
|
||||
|
||||
<cfset welcome="Hello World!">
|
||||
|
||||
<cfoutput>#welcome#</cfoutput>
|
|
@ -1,44 +0,0 @@
|
|||
// 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;
|
||||
a+=2; // equivalent to a=a+2
|
||||
cout << a;
|
||||
#if VERBOSE >= 2
|
||||
prints("trace message");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Print an error message and get out */
|
||||
#define ABORT \
|
||||
do { \
|
||||
print( "Abort\n" ); \
|
||||
exit(8); \
|
||||
} while (0) /* Note: No semicolon */
|
|
@ -1,4 +0,0 @@
|
|||
public void HelloWorld() {
|
||||
//Say Hello!
|
||||
Console.WriteLine("Hello World");
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
.text-layer {
|
||||
font-family: Monaco, "Courier New", monospace;
|
||||
font-size: 12pX;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.blinker {
|
||||
animation-duration: 1s;
|
||||
animation-name: blink;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
animation-timing-function: linear;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
40% {
|
||||
opacity: 0;
|
||||
}
|
||||
40.5% {
|
||||
opacity: 1
|
||||
}
|
||||
100% {
|
||||
opacity: 1
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
<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>
|
|
@ -1,14 +0,0 @@
|
|||
#!/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);
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
// 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));
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
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
|
|
@ -1,110 +0,0 @@
|
|||
// 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] ;
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
<!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>
|
|
@ -1,20 +0,0 @@
|
|||
%% 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).
|
|
@ -1,41 +0,0 @@
|
|||
: 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
|
||||
;
|
|
@ -1,46 +0,0 @@
|
|||
<#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 > 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>
|
|
@ -1,46 +0,0 @@
|
|||
<#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 > 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>
|
|
@ -1,28 +0,0 @@
|
|||
@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
|
||||
"""
|
|
@ -1,20 +0,0 @@
|
|||
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);
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
// 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)
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
//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
|
|
@ -1,36 +0,0 @@
|
|||
!!!5
|
||||
|
||||
# <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
|
||||
# <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
|
||||
# <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
|
||||
# <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
|
||||
|
||||
|
||||
/adasdasdad
|
||||
%div{:id => "#{@item.type}_#{@item.number}", :class => '#{@item.type} #{@item.urgency}', :phoney => `asdasdasd`}
|
||||
/ file: app/views/movies/index.html.haml
|
||||
\d
|
||||
%ads:{:bleh => 33}
|
||||
%p==ddd==
|
||||
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]/
|
||||
==Hello!==
|
|
@ -1,8 +0,0 @@
|
|||
{{!-- Ace + :-}} --}}
|
||||
|
||||
<div id="comments">
|
||||
{{#each comments}}
|
||||
<h2><a href="/posts/{{../permalink}}#{{id}}">{{title}}</a></h2>
|
||||
<div>{{body}}</div>
|
||||
{{/each}}
|
||||
</div>
|
|
@ -1,20 +0,0 @@
|
|||
-- 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)
|
|
@ -1,10 +0,0 @@
|
|||
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]
|
|
@ -1,17 +0,0 @@
|
|||
<!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>
|
|
@ -1,26 +0,0 @@
|
|||
<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 %>
|
|
@ -1,4 +0,0 @@
|
|||
[.ShellClassInfo]
|
||||
IconResource=..\logo.png
|
||||
[ViewState]
|
||||
FolderType=Generic
|
|
@ -1,45 +0,0 @@
|
|||
!!!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
|
|
@ -1,15 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
function foo(items, nada) {
|
||||
for (var i=0; i<items.length; i++) {
|
||||
alert(items[i] + "juhu\n");
|
||||
} // Real Tab.
|
||||
}
|
|
@ -1,66 +0,0 @@
|
|||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
TODO
|
|
@ -1,46 +0,0 @@
|
|||
<html>
|
||||
<body>
|
||||
<script>
|
||||
var x = "abc";
|
||||
function y {
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.class {
|
||||
background: #124356;
|
||||
}
|
||||
</style>
|
||||
|
||||
<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]);
|
||||
}
|
||||
}
|
||||
%>
|
||||
</body>
|
||||
</html>
|
|
@ -1,9 +0,0 @@
|
|||
/*EXPECTED
|
||||
hello world!
|
||||
*/
|
||||
class Test {
|
||||
static function run() : void {
|
||||
// console.log("hello world!");
|
||||
log "hello world!";
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
for op = (:+, :*, :&, :|, :$)
|
||||
@eval ($op)(a,b,c) = ($op)(($op)(a,b),c)
|
||||
end
|
||||
|
||||
|
||||
function g(x,y)
|
||||
return x * y
|
||||
x + y
|
||||
end
|
||||
|
||||
cd("data") do
|
||||
open("outfile", "w") do f
|
||||
write(f, data)
|
||||
end
|
||||
end
|
|
@ -1,22 +0,0 @@
|
|||
\usepackage{amsmath}
|
||||
\title{\LaTeX}
|
||||
\date{}
|
||||
\begin{document}
|
||||
\maketitle
|
||||
\LaTeX{} is a document preparation system for the \TeX{}
|
||||
typesetting program. It offers programmable desktop publishing
|
||||
features and extensive facilities for automating most aspects of
|
||||
typesetting and desktop publishing, including numbering and
|
||||
cross-referencing, tables and figures, page layout, bibliographies,
|
||||
and much more. \LaTeX{} was originally written in 1984 by Leslie
|
||||
Lamport and has become the dominant method for using \TeX; few
|
||||
people write in plain \TeX{} anymore. The current version is
|
||||
\LaTeXe.
|
||||
|
||||
% This is a comment; it will not be shown in the final output.
|
||||
% The following shows a little of the typesetting power of LaTeX:
|
||||
\begin{align}
|
||||
E &= mc^2 \\
|
||||
m &= \frac{m_0}{\sqrt{1-\frac{v^2}{c^2}}}
|
||||
\end{align}
|
||||
\end{document}
|
|
@ -1,28 +0,0 @@
|
|||
/* styles.less */
|
||||
|
||||
@base: #f938ab;
|
||||
|
||||
.box-shadow(@style, @c) when (iscolor(@c)) {
|
||||
box-shadow: @style @c;
|
||||
-webkit-box-shadow: @style @c;
|
||||
-moz-box-shadow: @style @c;
|
||||
}
|
||||
.box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) {
|
||||
.box-shadow(@style, rgba(0, 0, 0, @alpha));
|
||||
}
|
||||
|
||||
// Box styles
|
||||
.box {
|
||||
color: saturate(@base, 5%);
|
||||
border-color: lighten(@base, 30%);
|
||||
|
||||
div { .box-shadow(0 0 5px, 30%) }
|
||||
|
||||
a {
|
||||
color: @base;
|
||||
|
||||
&:hover {
|
||||
color: lighten(@base, 50%);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,76 +0,0 @@
|
|||
The following examples can be found in full at http://liquidmarkup.org/
|
||||
|
||||
Liquid is an extraction from the e-commerce system Shopify.
|
||||
Shopify powers many thousands of e-commerce stores which all call for unique designs.
|
||||
For this we developed Liquid which allows our customers complete design freedom while
|
||||
maintaining the integrity of our servers.
|
||||
|
||||
Liquid has been in production use since June 2006 and is now used by many other
|
||||
hosted web applications.
|
||||
|
||||
It was developed for usage in Ruby on Rails web applications and integrates seamlessly
|
||||
as a plugin but it also works excellently as a stand alone library.
|
||||
|
||||
Here's what it looks like:
|
||||
|
||||
<ul id="products">
|
||||
{% for product in products %}
|
||||
<li>
|
||||
<h2>{{ product.title }}</h2>
|
||||
Only {{ product.price | format_as_money }}
|
||||
|
||||
<p>{{ product.description | prettyprint | truncate: 200 }}</p>
|
||||
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
|
||||
Some more features include:
|
||||
|
||||
<h2>Filters</h2>
|
||||
<p> The word "tobi" in uppercase: {{ 'tobi' | upcase }} </p>
|
||||
<p>The word "tobi" has {{ 'tobi' | size }} letters! </p>
|
||||
<p>Change "Hello world" to "Hi world": {{ 'Hello world' | replace: 'Hello', 'Hi' }} </p>
|
||||
<p>The date today is {{ 'now' | date: "%Y %b %d" }} </p>
|
||||
|
||||
|
||||
<h2>If</h2>
|
||||
<p>
|
||||
{% if user.name == 'tobi' or user.name == 'marc' %}
|
||||
hi marc or tobi
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
|
||||
<h2>Case</h2>
|
||||
<p>
|
||||
{% case template %}
|
||||
{% when 'index' %}
|
||||
Welcome
|
||||
{% when 'product' %}
|
||||
{{ product.vendor | link_to_vendor }} / {{ product.title }}
|
||||
{% else %}
|
||||
{{ page_title }}
|
||||
{% endcase %}
|
||||
</p>
|
||||
|
||||
|
||||
<h2>For Loops</h2>
|
||||
<p>
|
||||
{% for item in array %}
|
||||
{{ item }}
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
||||
|
||||
<h2>Tables</h2>
|
||||
<p>
|
||||
{% tablerow item in items cols: 3 %}
|
||||
{% if tablerowloop.col_first %}
|
||||
First column: {{ item.variable }}
|
||||
{% else %}
|
||||
Different column: {{ item.variable }}
|
||||
{% endif %}
|
||||
{% endtablerow %}
|
||||
</p>
|
|
@ -1,22 +0,0 @@
|
|||
(defun prompt-for-cd ()
|
||||
"Prompts
|
||||
for CD"
|
||||
(prompt-read "Title" 1.53 1 2/4 1.7 1.7e0 2.9E-4 +42 -7 #b001 #b001/100 #o777 #O777 #xabc55 #c(0 -5.6))
|
||||
(prompt-read "Artist" &rest)
|
||||
(or (parse-integer (prompt-read "Rating") :junk-allowed t) 0)
|
||||
(if x (format t "yes") (format t "no" nil) ;and here comment
|
||||
) 0xFFLL -23ull
|
||||
;; second line comment
|
||||
'(+ 1 2)
|
||||
(defvar *lines*) ; list of all lines
|
||||
(position-if-not #'sys::whitespacep line :start beg))
|
||||
(quote (privet 1 2 3))
|
||||
'(hello world)
|
||||
(* 5 7)
|
||||
(1 2 34 5)
|
||||
(:use "aaaa")
|
||||
(let ((x 10) (y 20))
|
||||
(print (+ x y))
|
||||
) LAmbDa
|
||||
|
||||
"asdad\0eqweqe"
|
|
@ -1,245 +0,0 @@
|
|||
# Defines an editing mode for [Ace](http://ace.ajax.org).
|
||||
#
|
||||
# Open [test/ace.html](../test/ace.html) to test.
|
||||
|
||||
require, exports, module <-! define \ace/mode/ls
|
||||
|
||||
identifier = /(?![\d\s])[$\w\xAA-\uFFDC](?:(?!\s)[$\w\xAA-\uFFDC]|-[A-Za-z])*/$
|
||||
|
||||
exports.Mode = class LiveScriptMode extends require(\ace/mode/text)Mode
|
||||
->
|
||||
@$tokenizer =
|
||||
new (require \ace/tokenizer)Tokenizer LiveScriptMode.Rules
|
||||
if require \ace/mode/matching_brace_outdent
|
||||
@$outdent = new that.MatchingBraceOutdent
|
||||
|
||||
indenter = // (?
|
||||
: [({[=:]
|
||||
| [-~]>
|
||||
| \b (?: e(?:lse|xport) | d(?:o|efault) | t(?:ry|hen) | finally |
|
||||
import (?:\s* all)? | const | var |
|
||||
let | new | catch (?:\s* #identifier)? )
|
||||
) \s* $ //
|
||||
|
||||
getNextLineIndent: (state, line, tab) ->
|
||||
indent = @$getIndent line
|
||||
{tokens} = @$tokenizer.getLineTokens line, state
|
||||
unless tokens.length and tokens[*-1]type is \comment
|
||||
indent += tab if state is \start and indenter.test line
|
||||
indent
|
||||
|
||||
toggleCommentLines: (state, doc, startRow, endRow) ->
|
||||
comment = /^(\s*)#/; range = new (require \ace/range)Range 0 0 0 0
|
||||
for i from startRow to endRow
|
||||
if out = comment.test line = doc.getLine i
|
||||
then line.=replace comment, \$1
|
||||
else line.=replace /^\s*/ \$&#
|
||||
range.end.row = range.start.row = i
|
||||
range.end.column = line.length + 1
|
||||
doc.replace range, line
|
||||
1 - out * 2
|
||||
|
||||
checkOutdent: (state, line, input) -> @$outdent?checkOutdent line, input
|
||||
|
||||
autoOutdent: (state, doc, row) -> @$outdent?autoOutdent doc, row
|
||||
|
||||
### Highlight Rules
|
||||
|
||||
keywordend = /(?![$\w]|-[A-Za-z]|\s*:(?![:=]))/$
|
||||
stringfill = token: \string, regex: '.+'
|
||||
|
||||
LiveScriptMode.Rules =
|
||||
start:
|
||||
* token: \keyword
|
||||
regex: //(?
|
||||
:t(?:h(?:is|row|en)|ry|ypeof!?)
|
||||
|c(?:on(?:tinue|st)|a(?:se|tch)|lass)
|
||||
|i(?:n(?:stanceof)?|mp(?:ort(?:\s+all)?|lements)|[fs])
|
||||
|d(?:e(?:fault|lete|bugger)|o)
|
||||
|f(?:or(?:\s+own)?|inally|unction)
|
||||
|s(?:uper|witch)
|
||||
|e(?:lse|x(?:tends|port)|val)
|
||||
|a(?:nd|rguments)
|
||||
|n(?:ew|ot)
|
||||
|un(?:less|til)
|
||||
|w(?:hile|ith)
|
||||
|o[fr]|return|break|let|var|loop
|
||||
)//$ + keywordend
|
||||
|
||||
* token: \constant.language
|
||||
regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend
|
||||
|
||||
* token: \invalid.illegal
|
||||
regex: '(?
|
||||
:p(?:ackage|r(?:ivate|otected)|ublic)
|
||||
|i(?:mplements|nterface)
|
||||
|enum|static|yield
|
||||
)' + keywordend
|
||||
|
||||
* token: \language.support.class
|
||||
regex: '(?
|
||||
:R(?:e(?:gExp|ferenceError)|angeError)
|
||||
|S(?:tring|yntaxError)
|
||||
|E(?:rror|valError)
|
||||
|Array|Boolean|Date|Function|Number|Object|TypeError|URIError
|
||||
)' + keywordend
|
||||
|
||||
* token: \language.support.function
|
||||
regex: '(?
|
||||
:is(?:NaN|Finite)
|
||||
|parse(?:Int|Float)
|
||||
|Math|JSON
|
||||
|(?:en|de)codeURI(?:Component)?
|
||||
)' + keywordend
|
||||
|
||||
* token: \variable.language
|
||||
regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend
|
||||
|
||||
* token: \identifier
|
||||
regex: identifier + /\s*:(?![:=])/$
|
||||
|
||||
* token: \variable
|
||||
regex: identifier
|
||||
|
||||
* token: \keyword.operator
|
||||
regex: /(?:\.{3}|\s+\?)/$
|
||||
|
||||
* token: \keyword.variable
|
||||
regex: /(?:@+|::|\.\.)/$
|
||||
next : \key
|
||||
|
||||
* token: \keyword.operator
|
||||
regex: /\.\s*/$
|
||||
next : \key
|
||||
|
||||
* token: \string
|
||||
regex: /\\\S[^\s,;)}\]]*/$
|
||||
|
||||
* token: \string.doc
|
||||
regex: \'''
|
||||
next : \qdoc
|
||||
|
||||
* token: \string.doc
|
||||
regex: \"""
|
||||
next : \qqdoc
|
||||
|
||||
* token: \string
|
||||
regex: \'
|
||||
next : \qstring
|
||||
|
||||
* token: \string
|
||||
regex: \"
|
||||
next : \qqstring
|
||||
|
||||
* token: \string
|
||||
regex: \`
|
||||
next : \js
|
||||
|
||||
* token: \string
|
||||
regex: '<\\['
|
||||
next : \words
|
||||
|
||||
* token: \string.regex
|
||||
regex: \//
|
||||
next : \heregex
|
||||
|
||||
* token: \comment.doc
|
||||
regex: '/\\*'
|
||||
next : \comment
|
||||
|
||||
* token: \comment
|
||||
regex: '#.*'
|
||||
|
||||
* token: \string.regex
|
||||
regex: //
|
||||
/(?: [^ [ / \n \\ ]*
|
||||
(?: (?: \\.
|
||||
| \[ [^\]\n\\]* (?:\\.[^\]\n\\]*)* \]
|
||||
) [^ [ / \n \\ ]*
|
||||
)*
|
||||
)/ [gimy$]{0,4}
|
||||
//$
|
||||
next : \key
|
||||
|
||||
* token: \constant.numeric
|
||||
regex: '(?:0x[\\da-fA-F][\\da-fA-F_]*
|
||||
|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*
|
||||
|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)
|
||||
(?:e[+-]?\\d[\\d_]*)?[\\w$]*)'
|
||||
|
||||
* token: \lparen
|
||||
regex: '[({[]'
|
||||
|
||||
* token: \rparen
|
||||
regex: '[)}\\]]'
|
||||
next : \key
|
||||
|
||||
* token: \keyword.operator
|
||||
regex: \\\S+
|
||||
|
||||
* token: \text
|
||||
regex: \\\s+
|
||||
|
||||
heregex:
|
||||
* token: \string.regex
|
||||
regex: '.*?//[gimy$?]{0,4}'
|
||||
next : \start
|
||||
* token: \string.regex
|
||||
regex: '\\s*#{'
|
||||
* token: \comment.regex
|
||||
regex: '\\s+(?:#.*)?'
|
||||
* token: \string.regex
|
||||
regex: '\\S+'
|
||||
|
||||
key:
|
||||
* token: \keyword.operator
|
||||
regex: '[.?@!]+'
|
||||
* token: \identifier
|
||||
regex: identifier
|
||||
next : \start
|
||||
* token: \text
|
||||
regex: '.'
|
||||
next : \start
|
||||
|
||||
comment:
|
||||
* token: \comment.doc
|
||||
regex: '.*?\\*/'
|
||||
next : \start
|
||||
* token: \comment.doc
|
||||
regex: '.+'
|
||||
|
||||
qdoc:
|
||||
token: \string
|
||||
regex: ".*?'''"
|
||||
next : \key
|
||||
stringfill
|
||||
|
||||
qqdoc:
|
||||
token: \string
|
||||
regex: '.*?"""'
|
||||
next : \key
|
||||
stringfill
|
||||
|
||||
qstring:
|
||||
token: \string
|
||||
regex: /[^\\']*(?:\\.[^\\']*)*'/$
|
||||
next : \key
|
||||
stringfill
|
||||
|
||||
qqstring:
|
||||
token: \string
|
||||
regex: /[^\\"]*(?:\\.[^\\"]*)*"/$
|
||||
next : \key
|
||||
stringfill
|
||||
|
||||
js:
|
||||
token: \string
|
||||
regex: /[^\\`]*(?:\\.[^\\`]*)*`/$
|
||||
next : \key
|
||||
stringfill
|
||||
|
||||
words:
|
||||
token: \string
|
||||
regex: '.*?\\]>'
|
||||
next : \key
|
||||
stringfill
|
|
@ -1,16 +0,0 @@
|
|||
// ancestors
|
||||
parentof("douglas", "john").
|
||||
parentof("john", "bob").
|
||||
parentof("bob", "ebbon").
|
||||
|
||||
parentof("douglas", "jane").
|
||||
parentof("jane", "jan").
|
||||
|
||||
ancestorof(A, B) <- parentof(A, B).
|
||||
ancestorof(A, C) <- ancestorof(A, B), parentof(B,C).
|
||||
|
||||
grandparentof(A, B) <- parentof(A, C), parentof(C, B).
|
||||
|
||||
cousins(A,B) <- grandparentof(C,A), grandparentof(C,B).
|
||||
|
||||
parentof[`arg](A, B) -> int[32](A), !string(B).
|
|
@ -1,75 +0,0 @@
|
|||
/*
|
||||
Testing syntax highlighting
|
||||
of Ace Editor
|
||||
for the Linden Scripting Language
|
||||
*/
|
||||
|
||||
integer someIntNormal = 3672;
|
||||
integer someIntHex = 0x00000000;
|
||||
integer someIntMath = PI_BY_TWO;
|
||||
|
||||
integer event = 5673; // unimplemented reserved keyword!
|
||||
|
||||
key someKeyTexture = TEXTURE_DEFAULT;
|
||||
string someStringSpecial = EOF;
|
||||
|
||||
some_user_defined_function_without_return_type(string inputAsString)
|
||||
{
|
||||
llSay(PUBLIC_CHANNEL, inputAsString);
|
||||
}
|
||||
|
||||
string user_defined_function_returning_a_string(key inputAsKey)
|
||||
{
|
||||
return (string)inputAsKey;
|
||||
}
|
||||
|
||||
default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
key someKey = NULL_KEY;
|
||||
someKey = llGetOwner();
|
||||
|
||||
string someString = user_defined_function_returning_a_string(someKey);
|
||||
|
||||
some_user_defined_function_without_return_type(someString);
|
||||
}
|
||||
|
||||
touch_start(integer num_detected)
|
||||
{
|
||||
list agentsInRegion = llGetAgentList(AGENT_LIST_REGION, []);
|
||||
integer numOfAgents = llGetListLength(agentsInRegion);
|
||||
|
||||
integer index; // defaults to 0
|
||||
for (; index <= numOfAgents - 1; index++) // for each agent in region
|
||||
{
|
||||
llRegionSayTo(llList2Key(agentsInRegion, index), PUBLIC_CHANNEL, "Hello, Avatar!");
|
||||
}
|
||||
}
|
||||
|
||||
touch_end(integer num_detected)
|
||||
{
|
||||
someIntNormal = 3672;
|
||||
someIntHex = 0x00000000;
|
||||
someIntMath = PI_BY_TWO;
|
||||
|
||||
event = 5673; // unimplemented reserved keyword!
|
||||
|
||||
someKeyTexture = TEXTURE_DEFAULT;
|
||||
someStringSpecial = EOF;
|
||||
|
||||
llCloud(ZERO_VECTOR); // invalid deprecated function!
|
||||
|
||||
llWhisper(PUBLIC_CHANNEL, "Leaving \"default\" now...");
|
||||
state other;
|
||||
}
|
||||
}
|
||||
|
||||
state other
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
llWhisper(PUBLIC_CHANNEL, "Entered \"state other\", returning to \"default\" again...");
|
||||
state default;
|
||||
}
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
--[[--
|
||||
num_args takes in 5.1 byte code and extracts the number of arguments
|
||||
from its function header.
|
||||
--]]--
|
||||
|
||||
function int(t)
|
||||
return t:byte(1)+t:byte(2)*0x100+t:byte(3)*0x10000+t:byte(4)*0x1000000
|
||||
end
|
||||
|
||||
function num_args(func)
|
||||
local dump = string.dump(func)
|
||||
local offset, cursor = int(dump:sub(13)), offset + 26
|
||||
--Get the params and var flag (whether there's a ... in the param)
|
||||
return dump:sub(cursor):byte(), dump:sub(cursor+1):byte()
|
||||
end
|
||||
|
||||
-- Usage:
|
||||
num_args(function(a,b,c,d, ...) end) -- return 4, 7
|
||||
|
||||
-- Python styled string format operator
|
||||
local gm = debug.getmetatable("")
|
||||
|
||||
gm.__mod=function(self, other)
|
||||
if type(other) ~= "table" then other = {other} end
|
||||
for i,v in ipairs(other) do other[i] = tostring(v) end
|
||||
return self:format(unpack(other))
|
||||
end
|
||||
|
||||
print([===[
|
||||
blah blah %s, (%d %d)
|
||||
]===]%{"blah", num_args(int)})
|
||||
|
||||
--[=[--
|
||||
table.maxn is deprecated, use # instead.
|
||||
--]=]--
|
||||
print(table.maxn{1,2,[4]=4,[8]=8) -- outputs 8 instead of 2
|
||||
|
||||
print(5 --[[ blah ]])
|
|
@ -1,71 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<% --[[--
|
||||
index.lp from the Kepler Project's LuaDoc HTML doclet.
|
||||
http://keplerproject.github.com/luadoc/
|
||||
--]] %>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="<%=luadoc.doclet.html.link("luadoc.css")%>" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
<%=luadoc.doclet.html.include("menu.lp", { doc=doc })%>
|
||||
|
||||
</div> <!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
|
||||
<%if not options.nomodules and #doc.modules > 0 then%>
|
||||
<h2>Modules</h2>
|
||||
<table class="module_list">
|
||||
<!--<tr><td colspan="2">Modules</td></tr>-->
|
||||
<%for _, modulename in ipairs(doc.modules) do%>
|
||||
<tr>
|
||||
<td class="name"><a href="<%=luadoc.doclet.html.module_link(modulename, doc)%>"><%=modulename%></a></td>
|
||||
<td class="summary"><%=doc.modules[modulename].summary%></td>
|
||||
</tr>
|
||||
<%end%>
|
||||
</table>
|
||||
<%end%>
|
||||
|
||||
|
||||
|
||||
<%if not options.nofiles and #doc.files > 0 then%>
|
||||
<h2>Files</h2>
|
||||
<table class="file_list">
|
||||
<!--<tr><td colspan="2">Files</td></tr>-->
|
||||
<%for _, filepath in ipairs(doc.files) do%>
|
||||
<tr>
|
||||
<td class="name"><a href="<%=luadoc.doclet.html.file_link(filepath)%>"><%=filepath%></a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
<%end%>
|
||||
</table>
|
||||
<%end%>
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
|
@ -1 +0,0 @@
|
|||
(title:"foo bar" AND body:"quick fox") OR title:fox
|
|
@ -1,186 +0,0 @@
|
|||
Ace (Ajax.org Cloud9 Editor)
|
||||
============================
|
||||
|
||||
Ace is a standalone code editor written in JavaScript. Our goal is to create a browser based editor that matches and extends the features, usability and performance of existing native editors such as TextMate, Vim or Eclipse. It can be easily embedded in any web page or JavaScript application. Ace is developed as the primary editor for [Cloud9 IDE](http://www.cloud9ide.com/) and the successor of the Mozilla Skywriter (Bespin) Project.
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
* Syntax highlighting
|
||||
* Automatic indent and outdent
|
||||
* An optional command line
|
||||
* Handles huge documents (100,000 lines and more are no problem)
|
||||
* Fully customizable key bindings including VI and Emacs modes
|
||||
* Themes (TextMate themes can be imported)
|
||||
* Search and replace with regular expressions
|
||||
* Highlight matching parentheses
|
||||
* Toggle between soft tabs and real tabs
|
||||
* Displays hidden characters
|
||||
* Drag and drop text using the mouse
|
||||
* Line wrapping
|
||||
* Unstructured / user code folding
|
||||
* Live syntax checker (currently JavaScript/CoffeeScript)
|
||||
|
||||
Take Ace for a spin!
|
||||
--------------------
|
||||
|
||||
Check out the Ace live [demo](http://ajaxorg.github.com/ace/) or get a [Cloud9 IDE account](http://run.cloud9ide.com) to experience Ace while editing one of your own GitHub projects.
|
||||
|
||||
If you want, you can use Ace as a textarea replacement thanks to the [Ace Bookmarklet](http://ajaxorg.github.com/ace/build/textarea/editor.html).
|
||||
|
||||
History
|
||||
-------
|
||||
|
||||
Previously known as “Bespin” and “Skywriter” it’s now known as Ace (Ajax.org Cloud9 Editor)! Bespin and Ace started as two independent projects, both aiming to build a no-compromise code editor component for the web. Bespin started as part of Mozilla Labs and was based on the canvas tag, while Ace is the Editor component of the Cloud9 IDE and is using the DOM for rendering. After the release of Ace at JSConf.eu 2010 in Berlin the Skywriter team decided to merge Ace with a simplified version of Skywriter's plugin system and some of Skywriter's extensibility points. All these changes have been merged back to Ace. Both Ajax.org and Mozilla are actively developing and maintaining Ace.
|
||||
|
||||
Getting the code
|
||||
----------------
|
||||
|
||||
Ace is a community project. We actively encourage and support contributions. The Ace source code is hosted on GitHub. It is released under the BSD License. This license is very simple, and is friendly to all kinds of projects, whether open source or not. Take charge of your editor and add your favorite language highlighting and keybindings!
|
||||
|
||||
```bash
|
||||
git clone git://github.com/ajaxorg/ace.git
|
||||
cd ace
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
Embedding Ace
|
||||
-------------
|
||||
|
||||
Ace can be easily embedded into any existing web page. The Ace git repository ships with a pre-packaged version of Ace inside of the `build` directory. The same packaged files are also available as a separate [download](https://github.com/ajaxorg/ace/downloads). Simply copy the contents of the `src` subdirectory somewhere into your project and take a look at the included demos of how to use Ace.
|
||||
|
||||
The easiest version is simply:
|
||||
|
||||
```html
|
||||
<div id="editor">some text</div>
|
||||
<script src="src/ace.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
var editor = ace.edit("editor");
|
||||
};
|
||||
</script>
|
||||
```
|
||||
|
||||
With "editor" being the id of the DOM element, which should be converted to an editor. Note that this element must be explicitly sized and positioned `absolute` or `relative` for Ace to work. e.g.
|
||||
|
||||
```css
|
||||
#editor {
|
||||
position: absolute;
|
||||
width: 500px;
|
||||
height: 400px;
|
||||
}
|
||||
```
|
||||
|
||||
To change the theme simply include the Theme's JavaScript file
|
||||
|
||||
```html
|
||||
<script src="src/theme-twilight.js" type="text/javascript" charset="utf-8"></script>
|
||||
```
|
||||
|
||||
and configure the editor to use the theme:
|
||||
|
||||
```javascript
|
||||
editor.setTheme("ace/theme/twilight");
|
||||
```
|
||||
|
||||
By default the editor only supports plain text mode; many other languages are available as separate modules. After including the mode's JavaScript file:
|
||||
|
||||
```html
|
||||
<script src="src/mode-javascript.js" type="text/javascript" charset="utf-8"></script>
|
||||
```
|
||||
|
||||
Then the mode can be used like this:
|
||||
|
||||
```javascript
|
||||
var JavaScriptMode = require("ace/mode/javascript").Mode;
|
||||
editor.getSession().setMode(new JavaScriptMode());
|
||||
```
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
You find a lot more sample code in the [demo app](https://github.com/ajaxorg/ace/blob/master/demo/demo.js).
|
||||
|
||||
There is also some documentation on the [wiki page](https://github.com/ajaxorg/ace/wiki).
|
||||
|
||||
If you still need help, feel free to drop a mail on the [ace mailing list](http://groups.google.com/group/ace-discuss).
|
||||
|
||||
Running Ace
|
||||
-----------
|
||||
|
||||
After the checkout Ace works out of the box. No build step is required. Open 'editor.html' in any browser except Google Chrome. Google Chrome doesn't allow XMLHTTPRequests from files loaded from disc (i.e. with a file:/// URL). To open Ace in Chrome simply start the bundled mini HTTP server:
|
||||
|
||||
```bash
|
||||
./static.py
|
||||
```
|
||||
|
||||
Or using Node.JS
|
||||
|
||||
```bash
|
||||
./static.js
|
||||
```
|
||||
|
||||
The editor can then be opened at http://localhost:8888/index.html.
|
||||
|
||||
Package Ace
|
||||
-----------
|
||||
|
||||
To package Ace we use the dryice build tool developed by the Mozilla Skywriter team. Before you can build you need to make sure that the submodules are up to date.
|
||||
|
||||
```bash
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
Afterwards Ace can be built by calling
|
||||
|
||||
```bash
|
||||
./Makefile.dryice.js normal
|
||||
```
|
||||
|
||||
The packaged Ace will be put in the 'build' folder.
|
||||
|
||||
To build the bookmarklet version execute
|
||||
|
||||
```bash
|
||||
./Makefile.dryice.js bm
|
||||
```
|
||||
|
||||
Running the Unit Tests
|
||||
----------------------
|
||||
|
||||
The Ace unit tests run on node.js. Before the first run a couple of node modules have to be installed. The easiest way to do this is by using the node package manager (npm). In the Ace base directory simply call
|
||||
|
||||
```bash
|
||||
npm link .
|
||||
```
|
||||
|
||||
To run the tests call:
|
||||
|
||||
```bash
|
||||
node lib/ace/test/all.js
|
||||
```
|
||||
|
||||
You can also run the tests in your browser by serving:
|
||||
|
||||
http://localhost:8888/lib/ace/test/tests.html
|
||||
|
||||
This makes debugging failing tests way more easier.
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
Ace wouldn't be what it is without contributions! Feel free to fork and improve/enhance Ace any way you want. If you feel that the editor or the Ace community will benefit from your changes, please open a pull request. To protect the interests of the Ace contributors and users we require contributors to sign a Contributors License Agreement (CLA) before we pull the changes into the main repository. Our CLA is the simplest of agreements, requiring that the contributions you make to an ajax.org project are only those you're allowed to make. This helps us significantly reduce future legal risk for everyone involved. It is easy, helps everyone, takes ten minutes, and only needs to be completed once. There are two versions of the agreement:
|
||||
|
||||
1. [The Individual CLA](https://github.com/ajaxorg/ace/raw/master/doc/Contributor_License_Agreement-v2.pdf): use this version if you're working on an ajax.org in your spare time, or can clearly claim ownership of copyright in what you'll be submitting.
|
||||
2. [The Corporate CLA](https://github.com/ajaxorg/ace/raw/master/doc/Corporate_Contributor_License_Agreement-v2.pdf): have your corporate lawyer review and submit this if your company is going to be contributing to ajax.org projects
|
||||
|
||||
If you want to contribute to an ajax.org project please print the CLA and fill it out and sign it. Then either send it by snail mail or fax to us or send it back scanned (or as a photo) by email.
|
||||
|
||||
Email: fabian.jakobs@web.de
|
||||
|
||||
Fax: +31 (0) 206388953
|
||||
|
||||
Address: Ajax.org B.V.
|
||||
Keizersgracht 241
|
||||
1016 EA, Amsterdam
|
||||
the Netherlands
|
|
@ -1 +0,0 @@
|
|||
TODO
|
|
@ -1,33 +0,0 @@
|
|||
// animated duplicates, instances script
|
||||
proc animatedDuplication (int $rangeStart, int $rangeEnd, int $numOfDuplicates, int $duplicateOrInstance)
|
||||
{
|
||||
int $range_start = $rangeStart;
|
||||
int $range_end = $rangeEnd;
|
||||
int $num_of_duplicates = $numOfDuplicates;
|
||||
int $step_size = ($range_end - $range_start) / $num_of_duplicates;
|
||||
int $i = 0;
|
||||
int $temp;
|
||||
|
||||
currentTime $range_start; // set to range start
|
||||
|
||||
string $selectedObjects[]; // to store selected objects
|
||||
$selectedObjects = `ls -sl`; // store selected objects
|
||||
select $selectedObjects;
|
||||
|
||||
while ($i <= $num_of_duplicates)
|
||||
{
|
||||
$temp = $range_start + ($step_size * $i);
|
||||
currentTime ($temp);
|
||||
// seleced the objects to duplicate or instance
|
||||
select $selectedObjects;
|
||||
if($duplicateOrInstance == 0)
|
||||
{
|
||||
duplicate;
|
||||
}
|
||||
else
|
||||
{
|
||||
instance;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
@create phone
|
||||
&pickup phone=$pick up:@ifelse [u(is,u(mode),ICC)]={@pemit %#=You pick up the [fullname(me)].[set(me,PHONER:%#)][set(me,MODE:CIP)][set([u(INCOMING)],CONNECTED:[num(me)])][set(me,CONNECTED:[u(INCOMING)])]%r[showpicture(PICPICKUP)]%rUse '[color(green,black,psay <message>)]' (or '[color(green,black,p <message>)]') to talk into the phone.;@oemit %#=%N picks up the [fullname(me)].},{@pemit %#=You pick up the phone but no one is there. You hear a dialtone and then hang up. [play(u(DIALTONE))];@oemit %#=%N picks up the phone, but no one is on the other end.}
|
||||
&ringfun phone=[ifelse(eq(comp([u(%0/ringtone)],off),0),[color(black,cyan,INCOMING CALL FROM %1)],[play([switch([u(%0/ringtone)],1,[u(%0/ringtone1)],2,[u(%0/ringtone2)],3,[u(%0/ringtone3)],4,[u(%0/ringtone4)],5,[u(%0/ringtone5)],6,[u(%0/ringtone6)],7,[u(%0/ringtone7)],8,[u(%0/ringtone8)],9,[u(%0/ringtone9)],custom,[u(%0/customtone)],vibrate,[u(%0/vibrate)])])]
|
||||
&ringloop phone=@switch [u(ringstate)]=1,{@emit [setq(q,[u(connecting)])][set(%qq,rangs:0)][set(%qq,mode:WFC)][set(%qq,INCOMING:)];@ifelse [u(%qq/HASVMB)]={@tr me/ROUTEVMB=[u(connecting)];},{@pemit %#=[u(MSGCNC)];}},2,{@pemit %#=The call is connected.[setq(q,[u(CONNECTING)])][set(me,CONNECTED:%qq)][set(%qq,CONNECTED:[num(me)])][set(%qq,MODE:CIP)];@tr me/ciploop;@tr %qq/ciploop;},3,{@emit On [fullname(me)]'s earpiece you hear a ringing sound.[play(u(LINETONE))];@tr me/ringhere;@increment [u(connecting)]/RANGS;@wait 5={@tr me/ringloop};},4,{}
|
||||
&ringstate phone=[setq(q,u(connecting))][setq(1,[gt(u(%qq/rangs),sub(u(%qq/rings),1))])][setq(2,[and(u(is,u(%qq/MODE),CIP),u(is,u(%qq/INCOMING),[num(me)]))][setq(3,[u(is,u(%qq/MODE),ICC)])][ifelse(%q1,1,ifelse(%q2,2,ifelse(%q3,3,4)))]
|
||||
;comment
|
||||
@@(comment)
|
||||
say [time()]
|
|
@ -1 +0,0 @@
|
|||
TODO
|
|
@ -1,104 +0,0 @@
|
|||
@protocol Printing: someParent
|
||||
-(void) print;
|
||||
@end
|
||||
|
||||
@interface Fraction: NSObject <Printing, NSCopying> {
|
||||
int numerator;
|
||||
int denominator;
|
||||
}
|
||||
@end
|
||||
|
||||
@"blah\8" @"a\222sd\d" @"\faw\"\? \' \4 n\\" @"\56"
|
||||
@"\xSF42"
|
||||
|
||||
-(NSDecimalNumber*)addCount:(id)addObject{
|
||||
|
||||
return [count decimalNumberByAdding:addObject.count];
|
||||
|
||||
}
|
||||
|
||||
NS_DURING NS_HANDLER NS_ENDHANDLER
|
||||
|
||||
@try {
|
||||
if (argc > 1) {
|
||||
@throw [NSException exceptionWithName:@"Throwing a test exception" reason:@"Testing the @throw directive." userInfo:nil];
|
||||
}
|
||||
}
|
||||
@catch (id theException) {
|
||||
NSLog(@"%@", theException);
|
||||
result = 1 ;
|
||||
}
|
||||
@finally {
|
||||
NSLog(@"This always happens.");
|
||||
result += 2 ;
|
||||
}
|
||||
|
||||
@synchronized(lock) {
|
||||
NSLog(@"Hello World");
|
||||
}
|
||||
|
||||
struct { @defs( NSObject) }
|
||||
|
||||
char *enc1 = @encode(int);
|
||||
|
||||
IBOutlet|IBAction|BOOL|SEL|id|unichar|IMP|Class
|
||||
|
||||
|
||||
@class @protocol
|
||||
|
||||
@public
|
||||
// instance variables
|
||||
@package
|
||||
// instance variables
|
||||
@protected
|
||||
// instance variables
|
||||
@private
|
||||
// instance variables
|
||||
|
||||
YES NO Nil nil
|
||||
NSApp()
|
||||
NSRectToCGRect (Protocol ProtocolFromString:"NSTableViewDelegate"))
|
||||
|
||||
[SPPoint pointFromCGPoint:self.position]
|
||||
|
||||
NSRoundDownToMultipleOfPageSize
|
||||
|
||||
#import <stdio.h>
|
||||
|
||||
int main( int argc, const char *argv[] ) {
|
||||
printf( "hello world\n" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
NSChangeSpelling
|
||||
|
||||
@"0 != SUBQUERY(image, $x, 0 != SUBQUERY($x.bookmarkItems, $y, $y.@count == 0).@count).@count"
|
||||
|
||||
@selector(lowercaseString) @selector(uppercaseString:)
|
||||
|
||||
NSFetchRequest *localRequest = [[NSFetchRequest alloc] init];
|
||||
localRequest.entity = [NSEntityDescription entityForName:@"VNSource" inManagedObjectContext:context];
|
||||
localRequest.sortDescriptors = [NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"resolution" ascending:YES]];
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"0 != SUBQUERY(image, $x, 0 != SUBQUERY($x.bookmarkItems, $y, $y.@count == 0).@count).@count"];
|
||||
[NSPredicate predicateWithFormat:]
|
||||
NSString *predicateString = [NSString stringWithFormat:@"SELF beginsWith[cd] %@", searchString];
|
||||
NSPredicate *pred = [NSPredicate predicateWithFormat:predicateString];
|
||||
NSArray *filteredKeys = [[myMutableDictionary allKeys] filteredArrayUsingPredicate:pred];
|
||||
|
||||
localRequest.predicate = [NSPredicate predicateWithFormat:@"whichChart = %@" argumentArray: listChartToDownload];
|
||||
localRequest.fetchBatchSize = 100;
|
||||
arrayRequest = [context executeFetchRequest:localRequest error:&error1];
|
||||
|
||||
[localRequest release];
|
||||
|
||||
#ifndef Nil
|
||||
#define Nil __DARWIN_NULL /* id of Nil class */
|
||||
#endif
|
||||
|
||||
@implementation MyObject
|
||||
- (unsigned int)areaOfWidth:(unsigned int)width
|
||||
height:(unsigned int)height
|
||||
{
|
||||
return width*height;
|
||||
}
|
||||
@end
|
|
@ -1,18 +0,0 @@
|
|||
(*
|
||||
* Example of early return implementation taken from
|
||||
* http://ocaml.janestreet.com/?q=node/91
|
||||
*)
|
||||
|
||||
let with_return (type t) (f : _ -> t) =
|
||||
let module M =
|
||||
struct exception Return of t end
|
||||
in
|
||||
let return = { return = (fun x -> raise (M.Return x)); } in
|
||||
try f return with M.Return x -> x
|
||||
|
||||
|
||||
(* Function that uses the 'early return' functionality provided by `with_return` *)
|
||||
let sum_until_first_negative list =
|
||||
with_return (fun r ->
|
||||
List.fold list ~init:0 ~f:(fun acc x ->
|
||||
if x >= 0 then acc + x else r.return acc))
|
|
@ -1,48 +0,0 @@
|
|||
(*****************************************************************************
|
||||
* A simple bubble sort program. Reads integers, one per line, and prints *
|
||||
* them out in sorted order. Blows up if there are more than 49. *
|
||||
*****************************************************************************)
|
||||
PROGRAM Sort(input, output);
|
||||
CONST
|
||||
(* Max array size. *)
|
||||
MaxElts = 50;
|
||||
TYPE
|
||||
(* Type of the element array. *)
|
||||
IntArrType = ARRAY [1..MaxElts] OF Integer;
|
||||
|
||||
VAR
|
||||
(* Indexes, exchange temp, array size. *)
|
||||
i, j, tmp, size: integer;
|
||||
|
||||
(* Array of ints *)
|
||||
arr: IntArrType;
|
||||
|
||||
(* Read in the integers. *)
|
||||
PROCEDURE ReadArr(VAR size: Integer; VAR a: IntArrType);
|
||||
BEGIN
|
||||
size := 1;
|
||||
WHILE NOT eof DO BEGIN
|
||||
readln(a[size]);
|
||||
IF NOT eof THEN
|
||||
size := size + 1
|
||||
END
|
||||
END;
|
||||
|
||||
BEGIN
|
||||
(* Read *)
|
||||
ReadArr(size, arr);
|
||||
|
||||
(* Sort using bubble sort. *)
|
||||
FOR i := size - 1 DOWNTO 1 DO
|
||||
FOR j := 1 TO i DO
|
||||
IF arr[j] > arr[j + 1] THEN BEGIN
|
||||
tmp := arr[j];
|
||||
arr[j] := arr[j + 1];
|
||||
arr[j + 1] := tmp;
|
||||
END;
|
||||
|
||||
(* Print. *)
|
||||
FOR i := 1 TO size DO
|
||||
writeln(arr[i])
|
||||
END.
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
=begin
|
||||
perl example code for Ace
|
||||
=cut
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
my $num_primes = 0;
|
||||
my @primes;
|
||||
|
||||
# Put 2 as the first prime so we won't have an empty array
|
||||
$primes[$num_primes] = 2;
|
||||
$num_primes++;
|
||||
|
||||
MAIN_LOOP:
|
||||
for my $number_to_check (3 .. 200)
|
||||
{
|
||||
for my $p (0 .. ($num_primes-1))
|
||||
{
|
||||
if ($number_to_check % $primes[$p] == 0)
|
||||
{
|
||||
next MAIN_LOOP;
|
||||
}
|
||||
}
|
||||
|
||||
# If we reached this point it means $number_to_check is not
|
||||
# divisable by any prime number that came before it.
|
||||
$primes[$num_primes] = $number_to_check;
|
||||
$num_primes++;
|
||||
}
|
||||
|
||||
for my $p (0 .. ($num_primes-1))
|
||||
{
|
||||
print $primes[$p], ", ";
|
||||
}
|
||||
print "\n";
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
|
||||
BEGIN;
|
||||
|
||||
/**
|
||||
* Samples from PostgreSQL src/tutorial/basics.source
|
||||
*/
|
||||
CREATE TABLE weather (
|
||||
city varchar(80),
|
||||
temp_lo int, -- low temperature
|
||||
temp_hi int, -- high temperature
|
||||
prcp real, -- precipitation
|
||||
"date" date
|
||||
);
|
||||
|
||||
CREATE TABLE cities (
|
||||
name varchar(80),
|
||||
location point
|
||||
);
|
||||
|
||||
|
||||
INSERT INTO weather
|
||||
VALUES ('San Francisco', 46, 50, 0.25, '1994-11-27');
|
||||
|
||||
INSERT INTO cities
|
||||
VALUES ('San Francisco', '(-194.0, 53.0)');
|
||||
|
||||
INSERT INTO weather (city, temp_lo, temp_hi, prcp, "date")
|
||||
VALUES ('San Francisco', 43, 57, 0.0, '1994-11-29');
|
||||
|
||||
INSERT INTO weather (date, city, temp_hi, temp_lo)
|
||||
VALUES ('1994-11-29', 'Hayward', 54, 37);
|
||||
|
||||
|
||||
SELECT city, (temp_hi+temp_lo)/2 AS temp_avg, "date" FROM weather;
|
||||
|
||||
SELECT city, temp_lo, temp_hi, prcp, "date", location
|
||||
FROM weather, cities
|
||||
WHERE city = name;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Dollar quotes starting at the end of the line are colored as SQL unless
|
||||
* a special language tag is used. Dollar quote syntax coloring is implemented
|
||||
* for Perl, Python, JavaScript, and Json.
|
||||
*/
|
||||
create or replace function blob_content_chunked(
|
||||
in p_data bytea,
|
||||
in p_chunk integer)
|
||||
returns setof bytea as $$
|
||||
-- Still SQL comments
|
||||
declare
|
||||
v_size integer = octet_length(p_data);
|
||||
begin
|
||||
for i in 1..v_size by p_chunk loop
|
||||
return next substring(p_data from i for p_chunk);
|
||||
end loop;
|
||||
end;
|
||||
$$ language plpgsql stable;
|
||||
|
||||
|
||||
-- pl/perl
|
||||
CREATE FUNCTION perl_max (integer, integer) RETURNS integer AS $perl$
|
||||
# perl comment...
|
||||
my ($x,$y) = @_;
|
||||
if (! defined $x) {
|
||||
if (! defined $y) { return undef; }
|
||||
return $y;
|
||||
}
|
||||
if (! defined $y) { return $x; }
|
||||
if ($x > $y) { return $x; }
|
||||
return $y;
|
||||
$perl$ LANGUAGE plperl;
|
||||
|
||||
-- pl/python
|
||||
CREATE FUNCTION usesavedplan() RETURNS trigger AS $python$
|
||||
# python comment...
|
||||
if SD.has_key("plan"):
|
||||
plan = SD["plan"]
|
||||
else:
|
||||
plan = plpy.prepare("SELECT 1")
|
||||
SD["plan"] = plan
|
||||
$python$ LANGUAGE plpythonu;
|
||||
|
||||
-- pl/v8 (javascript)
|
||||
CREATE FUNCTION plv8_test(keys text[], vals text[]) RETURNS text AS $javascript$
|
||||
var o = {};
|
||||
for(var i=0; i<keys.length; i++){
|
||||
o[keys[i]] = vals[i];
|
||||
}
|
||||
return JSON.stringify(o);
|
||||
$javascript$ LANGUAGE plv8 IMMUTABLE STRICT;
|
||||
|
||||
-- json
|
||||
select * from json_object_keys($json$
|
||||
{
|
||||
"f1": 5,
|
||||
"f2": "test",
|
||||
"f3": {}
|
||||
}
|
||||
$json$);
|
||||
|
||||
|
||||
-- psql commands
|
||||
\df cash*
|
||||
|
||||
|
||||
-- Some string samples.
|
||||
select 'don''t do it now;' || 'maybe later';
|
||||
select E'dont\'t do it';
|
||||
select length('some other''s stuff' || $$cat in hat's stuff $$);
|
||||
|
||||
select $$ strings
|
||||
over multiple
|
||||
lines - use dollar quotes
|
||||
$$;
|
||||
|
||||
END;
|
|
@ -1,19 +0,0 @@
|
|||
<?php
|
||||
|
||||
function nfact($n) {
|
||||
if ($n == 0) {
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
return $n * nfact($n - 1);
|
||||
}
|
||||
}
|
||||
|
||||
echo "\n\nPlease enter a whole number ... ";
|
||||
$num = trim(fgets(STDIN));
|
||||
|
||||
// ===== PROCESS - Determing the factorial of the input number =====
|
||||
$output = "\n\nFactorial " . $num . " = " . nfact($num) . "\n\n";
|
||||
echo $output;
|
||||
|
||||
?>
|
|
@ -1,11 +0,0 @@
|
|||
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
|
||||
|
||||
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
|
||||
|
||||
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
|
||||
|
||||
Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
|
||||
|
||||
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.
|
||||
|
||||
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur
|
|
@ -1,24 +0,0 @@
|
|||
# This is a simple comment
|
||||
function Hello($name) {
|
||||
Write-host "Hello $name"
|
||||
}
|
||||
|
||||
function add($left, $right=4) {
|
||||
if ($right -ne 4) {
|
||||
return $left
|
||||
} elseif ($left -eq $null -and $right -eq 2) {
|
||||
return 3
|
||||
} else {
|
||||
return 2
|
||||
}
|
||||
}
|
||||
|
||||
$number = 1 + 2;
|
||||
$number += 3
|
||||
|
||||
Write-Host Hello -name "World"
|
||||
|
||||
$an_array = @(1, 2, 3)
|
||||
$a_hash = @{"something" = "something else"}
|
||||
|
||||
& notepad .\readme.md
|
|
@ -1,18 +0,0 @@
|
|||
partition([], _, [], []).
|
||||
partition([X|Xs], Pivot, Smalls, Bigs) :-
|
||||
( X @< Pivot ->
|
||||
Smalls = [X|Rest],
|
||||
partition(Xs, Pivot, Rest, Bigs)
|
||||
; Bigs = [X|Rest],
|
||||
partition(Xs, Pivot, Smalls, Rest)
|
||||
).
|
||||
|
||||
quicksort([]) --> [].
|
||||
quicksort([X|Xs]) -->
|
||||
{ partition(Xs, X, Smaller, Bigger) },
|
||||
quicksort(Smaller), [X], quicksort(Bigger).
|
||||
|
||||
perfect(N) :-
|
||||
between(1, inf, N), U is N // 2,
|
||||
findall(D, (between(1,U,D), N mod D =:= 0), Ds),
|
||||
sumlist(Ds, N).
|
|
@ -1,15 +0,0 @@
|
|||
# You are reading the ".properties" entry.
|
||||
! The exclamation mark can also mark text as comments.
|
||||
# The key and element characters #, !, =, and : are written with a preceding backslash to ensure that they are properly loaded.
|
||||
website = http\://en.wikipedia.org/
|
||||
language = English
|
||||
# The backslash below tells the application to continue reading
|
||||
# the value onto the next line.
|
||||
message = Welcome to \
|
||||
Wikipedia!
|
||||
# Add spaces to the key
|
||||
key\ with\ spaces = This is the value that could be looked up with the key "key with spaces".
|
||||
# Unicode
|
||||
tab : \u0009
|
||||
empty-key=
|
||||
last.line=value
|
|
@ -1,16 +0,0 @@
|
|||
message Point {
|
||||
required int32 x = 1;
|
||||
required int32 y = 2;
|
||||
optional string label = 3;
|
||||
}
|
||||
|
||||
message Line {
|
||||
required Point start = 1;
|
||||
required Point end = 2;
|
||||
optional string label = 3;
|
||||
}
|
||||
|
||||
message Polyline {
|
||||
repeated Point point = 1;
|
||||
optional string label = 2;
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
#!/usr/local/bin/python
|
||||
|
||||
import string, sys
|
||||
|
||||
# If no arguments were given, print a helpful message
|
||||
if len(sys.argv)==1:
|
||||
print '''Usage:
|
||||
celsius temp1 temp2 ...'''
|
||||
sys.exit(0)
|
||||
|
||||
# Loop over the arguments
|
||||
for i in sys.argv[1:]:
|
||||
try:
|
||||
fahrenheit=float(string.atoi(i))
|
||||
except string.atoi_error:
|
||||
print repr(i), "not a numeric value"
|
||||
else:
|
||||
celsius=(fahrenheit-32)*5.0/9.0
|
||||
print '%i\260F = %i\260C' % (int(fahrenheit), int(celsius+.5))
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue