摘要:
for (var index in myArray) { // don't actually do this console.log(myArray[index]); }缺点:数组的索引值index是String类型的“0”,“1”,“2”等等,而不是Number类型。当你进行算术运算时(“2”+... 阅读全文
摘要:
function percent(s, e, i){ s = Number(s), isNaN(s) && (s = "0"); var n = "%"; return e === !1 && (n = ""), parseFloat((100 * s).toFixed(i)) + n}s 需... 阅读全文
摘要:
用sql查询每个分组中amount最大的前两条记录:SELECT *FROM HW trWHERE(SELECT COUNT(*) FROM HW WHERE tr.DEPID=DEPID AND AMOUNT>tr.AMOUNT)< 2ORDER BY DEPID, TR.AMOUNT DESC应... 阅读全文
摘要:
SELECT /*+ rule*/ a.sid, b.owner, object_name, object_type FROM v$lock a, all_objects b WHERE TYPE = 'TM' and a.id1 = b.object_id;查到的都是被锁的表SELECT * FR... 阅读全文