This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div style="font-family: sans-serif;"> | |
<? var data = valid(); ?> | |
<form id="form" name="form"> | |
<? if(Object.prototype.toString.call(data) === '[object Array]') { ?> | |
<? for (var i = 0; i < data.length; i++) { ?> | |
<? for (var j = 0; j < data[i].length; j++) { ?> | |
<input type="checkbox" id="ch<?= '' + i + j ?>" name="ch<?= '' + i + j ?>" value="<?= data[i][j] ?>"><?= data[i][j] ?><br> | |
<? } ?> | |
<? } ?> | |
<? } else { ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function qsort(A, left, right, i, last) { | |
if (left >= right) | |
return | |
last = left | |
for (i = left+1; i <= right; i++) | |
if (A[i] < A[left]) | |
swap(A, ++last, i) | |
swap(A, left, last) | |
qsort(A, left, last-1) | |
qsort(A, last+1, right) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Two space soft indents (fake tabs) OR tabs... BUT NEVER BOTH - DO NOT MIX | |
// 2. Whitespace, Parens, Braces, Linebreaks | |
// if/else/for/while/try always have spaces, braces and multiple lines. | |
-------------------------------------------------------------------- | |