1function draw(show_num) { 2 var canvas_width=$('#canvas').width(); 3 var canvas_height=$('#canvas').height(); 4 var canvas = document.getElementById("canvas"); 5 var context = canvas.getContext("2d"); 6 canvas.style.backgroundColor='#fff'; 7 canvas.width = canvas_width; 8 canvas.height = canvas_height; 9 var sCode = "A,B,C,E,F,G,H,J,K,L,M,N,P,Q,R,S,T,W,X,Y,Z,1,2,3,4,5,6,7,8,9,0"; 10 var aCode = sCode.split(","); 11 var aLength = aCode.length; 12 13 for (var i = 0; i <= 3; i++) { 14 var j = Math.floor(Math.random() * aLength); 15 var deg = Math.random() * 30 * Math.PI / 180; 16 var txt = aCode[j]; 17 show_num[i] = txt.toLowerCase(); 18 var x = 10 + i * 20; 19 var y = 20 + Math.random() * 8; 20 context.font = "bold 23px æ°ç´°æé«"; 21 22 context.translate(x, y); 23 context.rotate(deg); 24 25 context.fillStyle = randomColor(); 26 context.fillText(txt, 0, 0); 27 28 context.rotate(-deg); 29 context.translate(-x, -y); 30 } 31// for (var i = 0; i <= 5; i++) { 32// context.strokeStyle = randomColor(); 33// context.beginPath(); 34// context.moveTo(Math.random() * canvas_width, Math.random() * canvas_height); 35// context.lineTo(Math.random() * canvas_width, Math.random() * canvas_height); 36// context.stroke(); 37// } 38 for (var i = 0; i <= 30; i++) { 39 context.strokeStyle = randomColor(); 40 context.beginPath(); 41 var x = Math.random() * canvas_width; 42 var y = Math.random() * canvas_height; 43 context.moveTo(x, y); 44 context.lineTo(x + 1, y + 1); 45 context.stroke(); 46 } 47} 48 49function randomColor() { 50 var r = Math.floor(Math.random() * 128); 51 var g = Math.floor(Math.random() * 128); 52 var b = Math.floor(Math.random() * 128); 53 return "rgb(" + r + "," + g + "," + b + ")"; 54}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.