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 isEqualObject(obj1, obj2) { | |
| if ( (!obj1 && obj1 !== 0) || (!obj2 && obj2 !== 0) || (typeof obj1 !== 'object') || (typeof obj2 !== 'object')) { | |
| return false | |
| } | |
| let attrArray1 = Object.keys(obj1), | |
| attrArray2 = Object.keys(obj2) | |
| if (attrArray1.length !== attrArray2.length) { | |
| return false |
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
| :root { | |
| --width-base: 800px; | |
| --font-size-base: 14px; | |
| --color-gray: #d0d0d0; | |
| --color-title: color(var(--color-gray) blackness(80%)); | |
| --color-content: color(var(--color-gray) blackness(70%)); | |
| --color-link: color(blue blackness(60%)); |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Flash test</title> | |
| <!-- <script type="text/javascript" src="http://s7.qhimg.com/!e3780b03/swfobject-2.3.js"></script> --> | |
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script> | |
| <script type="text/javascript"> | |
| swfobject.embedSWF("/LPlayer.swf", 'video-player', "800", "500", "9", null, null, {allowScriptAccess: 'always'}, null, function(e) { |
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 bubbleSort(arr) { | |
| var temp, j, | |
| low = 0, | |
| heigh = arr.length - 1; | |
| while (low < heigh) { | |
| for (j = low; j < heigh; ++j) { | |
| if (arr[j] > arr[j + 1]) { | |
| temp = arr[j]; | |
| arr[j] = arr[j + 1]; |
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 defineOverload(obj, funcName, fun) { | |
| var old = obj[funcName]; | |
| obj[funcName] = function() { | |
| if (arguments.length == fun.length) { | |
| return fun.apply(obj, arguments) | |
| } else if (typeof old == "function"){ | |
| return old.apply(obj, arguments); | |
| } | |
| } | |
| } |
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 directInsertSort(arr) { | |
| var sentinel; | |
| for (var i = 1; i<arr.length; i++) { | |
| // 如果当前的成员比前一个大,则保持不变, | |
| // 将与前面有序序列成员进行对比 | |
| if (arr[i]<arr[i-1]) { | |
| sentinel = arr[i]; | |
| arr[i] = arr[i-1]; | |
| var j = i-1; |