Skip to content

Instantly share code, notes, and snippets.

View huihut's full-sized avatar
🌴
On vacation

huihut huihut

🌴
On vacation
View GitHub Profile
@huihut
huihut / CppCallPython.cpp
Created May 16, 2018 10:18
C++ call Python module
#include <iostream>
#include <Python.h>
// C++ call Python module
bool CppCallPython()
{
// Python initialize
Py_Initialize();
if (!Py_IsInitialized())
{
@huihut
huihut / CreateCSV.cpp
Last active June 17, 2018 07:27
C++ 使用 Qt 生成 CSV 文件,可用于生成带标签的数据集 CSV 文件,标签为图片上一级的文件夹名字。
// C++ 使用 Qt 生成 CSV 文件
// 以下函数实现生成特定类型的 CSV 文件,可用于生成带标签的数据集 CSV 文件,标签为图片上一级的文件夹名字。
// 作者:https://github.com/huihut
/*
目录结构(使用 tree 命令查看):
xx@xxs-MacBook-Pro:~/code/dataset$ tree
.
@huihut
huihut / launch.json
Created June 12, 2018 09:11
Configuring launch.json for C/C++ debugging
// Available variables which can be used inside of strings.
// ${workspaceRoot}: the root folder of the team
// ${file}: the current opened file
// ${fileBasename}: the current opened file's basename
// ${fileDirname}: the current opened file's dirname
// ${fileExtname}: the current opened file's extension
// ${cwd}: the current working directory of the spawned process
{
"version": "0.2.0",
@huihut
huihut / tasks.json
Created June 12, 2018 09:12
Configuring tasks.json for C/C++ debugging
// Available variables which can be used inside of strings.
// ${workspaceRoot}: the root folder of the team
// ${file}: the current opened file
// ${fileBasename}: the current opened file's basename
// ${fileDirname}: the current opened file's dirname
// ${fileExtname}: the current opened file's extension
// ${cwd}: the current working directory of the spawned process
{
@huihut
huihut / create_csv.py
Last active June 17, 2018 08:16
Python 生成 CSV 文件,可用于生成带标签的数据集 CSV 文件,标签从0开始自动升序:0,1,2,3...
#!/usr/bin/python
# -*- coding: UTF-8 -*-
# Python 生成 CSV 文件
# Python 生成 CSV 文件,可用于生成带标签的数据集 CSV 文件,标签从0开始自动升序:0,1,2,3...
# 作者:https://github.com/huihut
# 参考:https://github.com/opencv/opencv_attic/blob/master/opencv/modules/contrib/doc/facerec/src/create_csv.py
'''
@huihut
huihut / VMwareKey.txt
Created July 19, 2018 07:09
VMware 所有版本永久许可证激活密钥
注:如果是WinXP或32位系统请用 10.0 版本;11.0 版本之后支持Win7或更高版64位系统。
VMware 所有版本永久许可证激活密钥:
VMware Workstation v14 for Windows
FF31K-AHZD1-H8ETZ-8WWEZ-WUUVA
CV7T2-6WY5Q-48EWP-ZXY7X-QGUWD
VMware Workstation v12 for Windows
5A02H-AU243-TZJ49-GTC7K-3C61N
@huihut
huihut / CodingInterviews005-从尾到头打印链表.cpp
Last active July 19, 2018 07:33
CodingInterviews005-从尾到头打印链表
/*
题目:从尾到头打印链表
题目描述:输入一个链表,按链表值从尾到头的顺序返回一个ArrayList。
*/
/**
* struct ListNode {
* int val;
@huihut
huihut / VS2017-Professional-Enterprise-Key.txt
Created August 2, 2018 09:26
VS2017 专业版(Professional)和企业版(Enterprise)激活密钥
专业版(Professional):
KBJFW-NXHK6-W4WJM-CRMQB-G3CDH
企业版(Enterprise):
NJVYC-BMHX2-G77MM-4XJMR-6Q8QF
@huihut
huihut / Windows10-professional-activation.md
Created August 2, 2018 09:32
Windows10 专业版 激活方法
  1. 以管理员身份运行CMD
  2. slmgr.vbs /upk
  3. slmgr /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX
  4. slmgr /skms zh.us.to
  5. slmgr /ato
@huihut
huihut / type _conversion_between_PlatformString_and_stdstring.cpp
Last active April 13, 2022 15:47
WinRT(C++/CX) type conversion between Platform::String^ and std::string
#include <string>
std::string Managed_Str_To_Std_Str(Platform::String^ ms)
{
std::wstring w_str(ms->Begin());
return std::string(w_str.begin(), w_str.end());
}
Platform::String^ Std_Str_To_Managed_Str(const std::string & input)
{