This file contains 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> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<script src="https://code.jquery.com/jquery-3.1.0.js"></script> | |
</head> | |
<body> | |
<h1>This page does nothing....</h1> |
This file contains 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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
<script> | |
document.addEventListener('DOMContentLoaded', function (event) { | |
console.log('index.html: 9 -> -> ', 'dom'); | |
console.log('index.html: 10 -> -> ', document.getElementById('img').offsetWidth); |
This file contains 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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
<script> | |
document.addEventListener('DOMContentLoaded', function (event) { | |
console.log('index.html: 9 -> -> ', 'dom'); | |
console.log('index.html: 10 -> -> ', document.getElementById('img').offsetWidth); |
This file contains 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
console.log('app2.js: 1 -> -> ', 'apps'); |
This file contains 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
public class Selection { | |
public static void sort(Comparable[] a) { | |
int N = a.length; | |
for (int i = 0; i < N; i++) { | |
int min = i; | |
for (int j = i + 1; j < N; j++) { | |
if (less(a[j], a[min])) { | |
min = j; | |
} | |
} |
This file contains 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
public class Insertion { | |
public static void sort(Comparable[] a) { | |
int N = a.length; | |
// 从第二个元素开始操作 | |
for (int i = 1; i < N; i++) { | |
// 索引之前的所有元素, 从右往左, 一个个进行比较, 如果后一个比前一个小, 则交换相邻的两个元素 | |
for (int j = i; j > 0 && less(a[j], a[j - 1]); j--) { | |
exch(a, j, j-1); | |
} | |
} |
This file contains 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
import java.util.Date; | |
public class Shell { | |
public static void sort(Comparable[] a) { | |
// 希尔排序: | |
// 是基于插入排序的, | |
// 使数组中, *任意* 每隔 h 是有序的, | |
// 当 h=1 时, 整个数组都是有序的 | |
int n = a.length; | |
int h = 1; |
This file contains 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
import java.util.Date; | |
public class Merge { | |
private static Comparable[] aux; | |
public static void sort(Comparable[] a) { | |
aux = new Comparable[a.length]; | |
sort(a, 0, a.length - 1); | |
} |
This file contains 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
import java.util.Date; | |
public class MergeBU { | |
private static Comparable[] aux; | |
public static void sort(Comparable[] a) { | |
int n = a.length; | |
aux = new Comparable[n]; | |
// 1 1 归并, 2 2 归并, 4 4 归并, 8 8 归并... |
This file contains 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
; hello-os | |
; TAB=4 | |
db 0xeb, 0x4e, 0x90 | |
db "helloipl" ; 启动区的名称 8字节 | |
dw 512 ; 每个扇区的大小 512 字节 | |
db 1 ; cluster 的大小 (1个扇区) | |
dw 1 ; FAT 的起始位置 (第 1 个扇区开始) | |
db 2 ; FAT 的个数 (2 个) | |
dw 224 ; 根目录的大小 (224项) |