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
function buildSvg(arr) { | |
return arr.reduce((acc, itm, idx) => { | |
const { path, fill } = itm; | |
return acc += `<path d="${path}" fill="${fill}" />`; | |
}, ''); | |
} | |
function getPathString(option) { | |
const { x, y, r, sectors } = option; |
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
# https://leetcode-cn.com/classic/problems/rank-scores/description/ | |
CREATE TABLE IF NOT EXISTS Scores ( | |
Id INT AUTO_INCREMENT PRIMARY KEY , | |
Score DECIMAL(3, 2) | |
); | |
INSERT INTO Scores (Score) VALUES (3.5); | |
INSERT INTO Scores (Score) VALUES (3.65); | |
INSERT INTO Scores (Score) VALUES (4.0); |
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 | |
CYLS equ 10 | |
org 0x7c00 ; 指明程序装载地址, 因为前面的内存地址已经被占用了 | |
jmp entry | |
db 0x90 | |
db "helloipl" ; 启动区的名称 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 | |
org 0x7c00 ; 指明程序装载地址, 因为前面的内存地址已经被占用了 | |
jmp entry | |
db 0x90 | |
db "helloipl" ; 启动区的名称 8字节 | |
dw 512 ; 每个扇区的大小 512 字节 | |
db 1 ; cluster 的大小 (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
; hello-os | |
; TAB=4 | |
org 0x7c00 ; 指明程序装载地址, 因为前面的内存地址已经被占用了 | |
jmp entry | |
db 0x90 | |
db "helloipl" ; 启动区的名称 8字节 | |
dw 512 ; 每个扇区的大小 512 字节 | |
db 1 ; cluster 的大小 (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
; hello-os | |
; TAB=4 | |
org 0x7c00 ; 指明程序装载地址, 因为前面的内存地址已经被占用了 | |
jmp entry | |
db 0x90 | |
db "helloipl" ; 启动区的名称 8字节 | |
dw 512 ; 每个扇区的大小 512 字节 | |
db 1 ; cluster 的大小 (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
; 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项) |
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
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 Shell { | |
public static void sort(Comparable[] a) { | |
// 希尔排序: | |
// 是基于插入排序的, | |
// 使数组中, *任意* 每隔 h 是有序的, | |
// 当 h=1 时, 整个数组都是有序的 | |
int n = a.length; | |
int h = 1; |
NewerOlder