Skip to content

四号程序员

Keep It Simple and Stupid

  • Home
  • 读过的书
  • 从0到1实战微服务架构(第2版)

Typescript小知识

Leave a reply

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"[......]

继续阅读

This entry was posted in 前端技术 and tagged typescript, Utility Types, 小知识 on 2023-10-17 by coder4.

按照中文姓氏排序

Leave a reply

js
var names = ["王五", "李四", "赵六", "张三", "郝七", "陈二", "蔡八", "孙九", "黄十", "路一"];

// 中文姓氏排序
names.sort(function(a, b) {
return a.localeCompare(b,"zh");
});
java
List<String> names = Arrays.asList("王五", "李四", "赵六", "张三", "郝七", "陈二", "蔡八"[......]

继续阅读

This entry was posted in Java and tagged Java && J2EE, JS, 姓氏排序 on 2023-10-13 by coder4.

强制apt使用IPv4

Leave a reply

# root
echo 'Acquire::ForceIPv4 "true;"' > /etc/apt/apt.conf.d/99force-ipv4

 [......]

继续阅读

This entry was posted in Linux and tagged apt, ipv4 on 2023-10-13 by coder4.

scikit-learn文本分类

Leave a reply

import numpy as np
import pandas as pd

df = pd.read_csv('./smsspamcollection.tsv', sep='\t')
df.head()
df['label'].value_counts()

# split data set
from sklearn.model_selection import train_test_split
X = df['message']
y = df['label']
df.[......]

继续阅读

This entry was posted in 机器学习 and tagged Naive Bayes, scikit-learn, svm, 分类, 文本分类 on 2023-10-09 by coder4.

ghostscript中的有用选项

Leave a reply

https://ghostscript.com/docs/9.54.0/Devices.htm[......]

继续阅读

This entry was posted in Linux on 2023-10-08 by coder4.

Post navigation

← Older posts
Newer posts →

Categories

  • Android
  • C && C++
  • Go
  • iOS
  • Java
  • Linux
  • Mac
  • NLP
  • opencv
  • Perl
  • PHP
  • Python
  • RPC
  • Ruby
  • Visual C++ && C#
  • Windows
  • Wordpress
  • 前端技术
  • 大数据技术
  • 心情随笔
  • 搜索技术
  • 数据库技术
  • 未分类
  • 机器学习
  • 笔面题
  • 算法&数据结构
  • 网络&网络模拟
  • 计算机技术
  • 设计

Tags

  • Android
  • C
  • CentOS
  • c语言
  • Debian
  • docker
  • go
  • gtk
  • Hadoop
  • Hive
  • ios
  • Java && J2EE
  • Java && J2EE
  • Java核心技术
  • KVM
  • Linux
  • MySQL
  • nginx
  • Oracle
  • PHP
  • Python
  • Python Essential Reference
  • shell
  • socket
  • Ubuntu
  • VC
  • windows
  • 严蔚敏
  • 中文
  • 乱码
  • 卷2
  • 字符串
  • 安装
  • 实现
  • 排序
  • 教程
  • 数据结构
  • 核心技术
  • 算法
  • 算法技术手册
  • 编译
  • 读书笔记
  • 递归
  • 配置
  • 重读
Proudly powered by WordPress