除了mx、ms外
Author Archives: coder4
Leave a reply
今日神坑
Ubuntu制作离线安装源
需求:在一个没联网的机器安装若干deb包,其中依赖很复杂
1~3在联网机器执行,4在没网机器执行
1 下载所需deb包及其依赖
下面vim后面可以跟多个包
mkdir offline-debs
cd offline-debs
sudo apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-e[......]
Typescript小知识
1 Utility Types(工具类型)
keyof
只抽属性名
interface exampleA {
name:string;
id:number;
create:string;
}
type TypeA = keyof exampleA; // 其实就相当于 type TypeA = 'name'|'id'|'create'
let b:TypeA = 'name';
b = 'id';
// b = 'end'; // Type '"end"[......]
按照中文姓氏排序
js
var names = ["王五", "李四", "赵六", "张三", "郝七", "陈二", "蔡八", "孙九", "黄十", "路一"];
// 中文姓氏排序
names.sort(function(a, b) {
return a.localeCompare(b,"zh");
});
java
List<String> names = Arrays.asList("王五", "李四", "赵六", "张三", "郝七", "陈二", "蔡八"[......]