dukang's notes


  • 首页

  • 标签

  • 分类

  • 归档

  • 搜索

[转] hexo categories和tags页面不显示解决办法

发表于 2019-04-12 | 分类于 hexo | 阅读次数:
字数统计: 105 | 阅读时长 ≈ 1

方法一:

默认是没有 categories 和 tags 的需要

1
2
3
hexo new page "tags" 

hexo new page "categories"

编辑 /tags/index.md /categories/index.md

1
2
3
4
5
type: "tags"
layout: "tags"

type: "categories"
layout: "categories"

阅读全文 »

[转] 在Hexo中渲染MathJax数学公式

发表于 2019-04-12 | 分类于 hexo | 阅读次数:
字数统计: 501 | 阅读时长 ≈ 1

原因

Hexo默认使用”hexo-renderer-marked”引擎渲染网页,该引擎会把一些特殊的markdown符号转换为相应的html标签,比如在markdown语法中,下划线’‘代表斜体,会被渲染引擎处理为标签。
因为类Latex格式书写的数学公式下划线 ‘
‘ 表示下标,有特殊的含义,如果被强制转换为标签,那么MathJax引擎在渲染数学公式的时候就会出错。例如,$x_i$在开始被渲染的时候,处理为$xi$,这样MathJax引擎就认为该公式有语法错误,因为不会渲染。
类似的语义冲突的符号还包括’*’, ‘{‘, ‘}’, ‘\’等。

解决方法

更换Hexo的markdown渲染引擎,hexo-renderer-kramed引擎是在默认的渲染引擎hexo-renderer-marked的基础上修改了一些bug,两者比较接近,也比较轻量级。

阅读全文 »

[转] 十分钟上手sklearn:特征提取,常用模型,交叉验证

发表于 2019-04-12 | 分类于 机器学习 | 阅读次数:
字数统计: 4.7k | 阅读时长 ≈ 17

转载自 Black’Blog 十分钟上手sklearn:特征提取,常用模型,交叉验证

主要内容包括:
1.PCA算法
2.LDA算法
3.线性回归
4.逻辑回归
5.朴素贝叶斯
6.决策树
7.SVM
8.神经网络
9.KNN算法

阅读全文 »

[转] 十分钟上手sklearn:安装,获取数据,数据预处理

发表于 2019-04-12 | 分类于 机器学习 | 阅读次数:
字数统计: 1.3k | 阅读时长 ≈ 5

转载自 Black’Blog 十分钟上手sklearn:安装,获取数据,数据预处理

sklearn是机器学习中一个常用的python第三方模块,对常用的机器学习算法进行了封装
其中包括:
1.分类(Classification)
2.回归(Regression)
3.聚类(Clustering)
4.数据降维(Dimensionality reduction)
5.常用模型(Model selection)
6.数据预处理(Preprocessing)

阅读全文 »

Hello World

发表于 2019-04-11 | 分类于 hexo | 阅读次数:
字数统计: 73 | 阅读时长 ≈ 1

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

阅读全文 »

openssl编译及使用

发表于 2016-08-12 | 阅读次数:
字数统计: 352 | 阅读时长 ≈ 2

源码地址:https://github.com/openssl/openssl.git

分支OpenSSL_1_0_2-stable在windows10编译

1.使用ActiveState Perl工具
有nasm工具,启用汇编文件

1
2
perl Configure VC-WIN32 --prefix=c:\some\openssl\dir
ms\do_nasm

无nasm工具

1
2
perl Configure VC-WIN32 no-asm --prefix=c:/some/openssl/dir
ms\do_ms

2.使用nmake工具
在开始菜单中找到vs的开发工具命令提示,使用如下命令

1
2
3
4
5
6
// 编译
nmake -f ms\ntdll.mak
// 测试
nmake -f ms\ntdll.mak test
// 安装
nmake -f ms\ntdll.mak install

openssl证书转换

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Convert a DER file (.crt .cer .der) to PEM
openssl x509 -inform der -in certificate.cer -out certificate.pem

// Convert a PEM file to DER
openssl x509 -outform der -in certificate.pem -out certificate.der

// Convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to PEM
openssl pkcs12 -in keyStore.pfx -out keyStore.pem -nodes

// You can add -nocerts to only output the private key or add -nokeys to only output the certificates.
// Convert a PEM certificate file and a private key to PKCS#12 (.pfx .p12)
openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt

// Convert PEM to CRT (.CRT file)
openssl x509 -outform der -in certificate.pem -out certificate.crt

OpenSSL Convert PEM

1
2
3
4
5
6
7
8
// Convert PEM to DER
openssl x509 -outform der -in certificate.pem -out certificate.der

// Convert PEM to P7B
openssl crl2pkcs7 -nocrl -certfile certificate.cer -out certificate.p7b -certfile CACert.cer

// Convert PEM to PFX
openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt

OpenSSL Convert DER

1
2
Convert DER to PEM
openssl x509 -inform der -in certificate.cer -out certificate.pem

OpenSSL Convert P7B

1
2
3
4
5
6
7
Convert P7B to PEM
openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer

Convert P7B to PFX
openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer

openssl pkcs12 -export -in certificate.cer -inkey privateKey.key -out certificate.pfx -certfile CACert.cer

OpenSSL Convert PFX

1
2
Convert PFX to PEM
openssl pkcs12 -in certificate.pfx -out certificate.cer -nodes

12
dukang

dukang

16 日志
9 分类
12 标签
© 2019 — 2025 dukang
由 Hexo 强力驱动
|
主题 — NexT.Gemini v5.1.4
蜀ICP备2022004359号