[
](http://nodejs.org/api/documentation.html#documentation_stability_index)
| use std::f64::consts::PI; | |
| fn deriv(f: |f64| -> f64, g: |(|f64| -> f64)|) { | |
| g(|x: f64| -> f64 { | |
| let epsilon = 0.0000000001; | |
| (f(x + epsilon) - f(x)) / epsilon | |
| }); | |
| } | |
| fn main() { |
| // Parts from Ace; see <https://raw.githubusercontent.com/ajaxorg/ace/master/LICENSE> | |
| CodeMirror.defineMode("asciidoc", function(cmCfg, modeCfg) { | |
| // Ace highlight rules function imported below. | |
| var HighlightRules = function() { | |
| var identifierRe = "[a-zA-Z\u00a1-\uffff]+\\b"; | |
| this.$rules = { | |
| "start": [ | |
| {token: "empty", regex: /$/}, |
| for(i=0;++i<5;)for(j=2;++j<22;)eval('a=patch_'+i+'_'+j).parentNode.appendChild(a) |
| for(j=8;j++<88;)eval('a=patch_'+(j%4+1)+'_'+(j>>2)).parentNode.appendChild(a) |
| for(i=1;i<5;i++)for(j=2;j<22;)eval('a=patch_'+i+'_'+j++).parentNode.appendChild(a) |
| { | |
| "font-family": "Open Sans", | |
| "font-weight": "400", | |
| "font-stretch": "normal", | |
| "units-per-em": "2048", | |
| "panose-1": "2 11 6 6 3 5 4 2 2 4", | |
| "ascent": "1638", | |
| "descent": "-410", | |
| "x-height": "1096", | |
| "cap-height": "1462", |
| for(i=1;i<5;i++)for(j=2;j<22;)eval('a=patch_'+i+'_'+j++).parentNode.appendChild(a) |