Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wp-file-.../lib/codemirr.../mode/vb
File: index.html
<!doctype html>
[0] Fix | Delete
[1] Fix | Delete
<title>CodeMirror: VB.NET mode</title>
[2] Fix | Delete
<meta charset="utf-8"/>
[3] Fix | Delete
<link rel=stylesheet href="../../doc/docs.css">
[4] Fix | Delete
[5] Fix | Delete
<link rel="stylesheet" href="../../lib/codemirror.css">
[6] Fix | Delete
<link href="http://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet" type="text/css">
[7] Fix | Delete
<script src="../../lib/codemirror.js"></script>
[8] Fix | Delete
<script src="vb.js"></script>
[9] Fix | Delete
<script type="text/javascript" src="../../addon/runmode/runmode.js"></script>
[10] Fix | Delete
<style>
[11] Fix | Delete
.CodeMirror {border: 1px solid #aaa; height:210px; height: auto;}
[12] Fix | Delete
.CodeMirror-scroll { overflow-x: auto; overflow-y: hidden;}
[13] Fix | Delete
.CodeMirror pre { font-family: Inconsolata; font-size: 14px}
[14] Fix | Delete
</style>
[15] Fix | Delete
<div id=nav>
[16] Fix | Delete
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
[17] Fix | Delete
[18] Fix | Delete
<ul>
[19] Fix | Delete
<li><a href="../../index.html">Home</a>
[20] Fix | Delete
<li><a href="../../doc/manual.html">Manual</a>
[21] Fix | Delete
<li><a href="https://github.com/codemirror/codemirror">Code</a>
[22] Fix | Delete
</ul>
[23] Fix | Delete
<ul>
[24] Fix | Delete
<li><a href="../index.html">Language modes</a>
[25] Fix | Delete
<li><a class=active href="#">VB.NET</a>
[26] Fix | Delete
</ul>
[27] Fix | Delete
</div>
[28] Fix | Delete
[29] Fix | Delete
<article>
[30] Fix | Delete
<h2>VB.NET mode</h2>
[31] Fix | Delete
[32] Fix | Delete
<script type="text/javascript">
[33] Fix | Delete
function test(golden, text) {
[34] Fix | Delete
var ok = true;
[35] Fix | Delete
var i = 0;
[36] Fix | Delete
function callback(token, style, lineNo, pos){
[37] Fix | Delete
//console.log(String(token) + " " + String(style) + " " + String(lineNo) + " " + String(pos));
[38] Fix | Delete
var result = [String(token), String(style)];
[39] Fix | Delete
if (golden[i][0] != result[0] || golden[i][1] != result[1]){
[40] Fix | Delete
return "Error, expected: " + String(golden[i]) + ", got: " + String(result);
[41] Fix | Delete
ok = false;
[42] Fix | Delete
}
[43] Fix | Delete
i++;
[44] Fix | Delete
}
[45] Fix | Delete
CodeMirror.runMode(text, "text/x-vb",callback);
[46] Fix | Delete
[47] Fix | Delete
if (ok) return "Tests OK";
[48] Fix | Delete
}
[49] Fix | Delete
function testTypes() {
[50] Fix | Delete
var golden = [['Integer','keyword'],[' ','null'],['Float','keyword']]
[51] Fix | Delete
var text = "Integer Float";
[52] Fix | Delete
return test(golden,text);
[53] Fix | Delete
}
[54] Fix | Delete
function testIf(){
[55] Fix | Delete
var golden = [['If','keyword'],[' ','null'],['True','keyword'],[' ','null'],['End','keyword'],[' ','null'],['If','keyword']];
[56] Fix | Delete
var text = 'If True End If';
[57] Fix | Delete
return test(golden, text);
[58] Fix | Delete
}
[59] Fix | Delete
function testDecl(){
[60] Fix | Delete
var golden = [['Dim','keyword'],[' ','null'],['x','variable'],[' ','null'],['as','keyword'],[' ','null'],['Integer','keyword']];
[61] Fix | Delete
var text = 'Dim x as Integer';
[62] Fix | Delete
return test(golden, text);
[63] Fix | Delete
}
[64] Fix | Delete
function testAll(){
[65] Fix | Delete
var result = "";
[66] Fix | Delete
[67] Fix | Delete
result += testTypes() + "\n";
[68] Fix | Delete
result += testIf() + "\n";
[69] Fix | Delete
result += testDecl() + "\n";
[70] Fix | Delete
return result;
[71] Fix | Delete
[72] Fix | Delete
}
[73] Fix | Delete
function initText(editor) {
[74] Fix | Delete
var content = 'Class rocket\nPrivate quality as Double\nPublic Sub launch() as String\nif quality > 0.8\nlaunch = "Successful"\nElse\nlaunch = "Failed"\nEnd If\nEnd sub\nEnd class\n';
[75] Fix | Delete
editor.setValue(content);
[76] Fix | Delete
for (var i =0; i< editor.lineCount(); i++) editor.indentLine(i);
[77] Fix | Delete
}
[78] Fix | Delete
function init() {
[79] Fix | Delete
editor = CodeMirror.fromTextArea(document.getElementById("solution"), {
[80] Fix | Delete
lineNumbers: true,
[81] Fix | Delete
mode: "text/x-vb",
[82] Fix | Delete
readOnly: false
[83] Fix | Delete
});
[84] Fix | Delete
runTest();
[85] Fix | Delete
}
[86] Fix | Delete
function runTest() {
[87] Fix | Delete
document.getElementById('testresult').innerHTML = testAll();
[88] Fix | Delete
initText(editor);
[89] Fix | Delete
[90] Fix | Delete
}
[91] Fix | Delete
document.body.onload = init;
[92] Fix | Delete
</script>
[93] Fix | Delete
[94] Fix | Delete
<div id="edit">
[95] Fix | Delete
<textarea style="width:95%;height:200px;padding:5px;" name="solution" id="solution" ></textarea>
[96] Fix | Delete
</div>
[97] Fix | Delete
<pre id="testresult"></pre>
[98] Fix | Delete
<p>MIME type defined: <code>text/x-vb</code>.</p>
[99] Fix | Delete
[100] Fix | Delete
</article>
[101] Fix | Delete
[102] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function