- 博客(422)
- 资源 (153)
- 收藏
- 关注
原创 vtk 常用头文件和lib文件
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。原文链接:https://blog.csdn.net/u010141025/article/details/50735594。2. 常用的LIB文件。
2024-02-26 09:50:22
1115
原创 c++ ini 改造
排名第一,但有个问题,就是GetKeys枚举出来的结果是排序的,这个很不友好。fifo_map.hpp是不排序c++ map结构。好了,现在运行后,就不会有 排序的问题了。这两天在用ini文件,
2022-09-29 14:56:50
385
原创 vs2019 pybind11 生成linux可以使用的扩展库
pybind11扩展库非常强大,如何用vs2019生成工程,这样就可以避免使用cmake来在linux上边生成工程文件了。 A. linux上边的工作 下载pybind11只要下载不需要编译,网上很我文章要编译,实际上只要里边的头文件就可以,根本不需要编译,我就下载到了 ~/pybind11目录下边了 pip install pytest anaconda3安装 python3.8 B. windows下边的操作 1...
2021-06-22 13:06:34
503
转载 protobuf gzip压缩 解压缩的使用方法
#include <google/protobuf/io/gzip_stream.h>#include <google/protobuf/io/zero_copy_stream_impl.h>std::string output;// 压缩序列化google::protobuf::io::GzipOutputStream::Options options;options.format = google::protobuf::io::GzipOutputStream::GZ.
2021-06-09 15:41:21
1565
1
转载 RxJava 结合 OkHttp 访问网络
https://blog.csdn.net/caoshen2014/article/details/100129281
2021-05-21 18:37:44
177
转载 ConstraintLayout 约束性布局知识梳理
HaiyuKingConstraintLayoutDemo【约束性布局知识梳理】【基于1.1.3】版权声明:本文为HaiyuKing原创文章前言在较新版本的Android Studio中新建项目默认使用 ConstraintLayout进行布局的。ConstraintLayout是一个允许您以灵活的方式定位和调整小部件的ViewGroup。注意: ConstraintLayout作为支持库提供,您可以在API级别9(Gingerbread)开始的Android系统上使用。开发..
2021-05-20 18:41:01
1040
转载 java localBroadcastManager 发消息的例子
本地发送消息的例子:package com.app;import android.content.BroadcastReceiver;import android.content.Context;import android.content.Intent;import android.content.IntentFilter;import android.os.Bundle;import android.support.v4.content.LocalBroadcastManager;
2021-04-18 11:25:49
135
转载 用git 小乌龟 提交github上边的代码配置
1. 怎么解决小乌龟Git总是要求输入密码的问题?TortoiseGit一般也叫git小乌龟,是Git的客户端版本,不需要输入命令,可视化操作,比较人性化,有中文版。当你在用TortoiseGit拉取或者提交代码的时候,可能遇到过git小乌龟总是要让你输入密码,无法拉取、提交代码,见下图。怎么解决这个问题?1.复制私钥文件id_rsa,将复制的文件的文件名改为id_rsa.ppk。2.打开TortoiseGit的安装目录,找到puttygen.exe,双击运行。3.点击Loa
2021-04-13 19:37:46
1210
翻译 android AsyncTask 被废弃替代方案
定义抽象类:package com.example.myapplication;import android.app.Activity;public abstract class BackgroundTask { private Activity activity; public BackgroundTask(Activity activity) { this.activity = activity; } private void sta.
2021-04-13 10:35:45
5573
1
原创 android中简单的db的使用
直接上代码:package com.xxxximport androidx.appcompat.app.AppCompatActivity;import androidx.core.content.FileProvider;import android.content.Context;import android.content.Intent;import android.content.pm.ApplicationInfo;import android.content.pm.Pac.
2021-04-12 16:40:35
640
原创 android上边用代码安装apk文件
在android上边用代码安装apk文件。 private void install(String filePath) { Log.i(TAG, "开始执行安装: " + filePath); File apkFile = new File(filePath); Intent intent = new Intent(Intent.ACTION_VIEW); intent.setFlags(Intent.FLAG_ACTIVITY
2021-04-02 16:31:42
1284
原创 ppl timer 测试
ppl里边可以直接使用timer并且是c++风格的,很好用:// testTimer.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <agents.h>#include <iostream>#include <ppl.h>#include <concrtrm.h>using namespace Concurrency;using namespace std;// Simulat.
2021-03-01 13:06:12
435
原创 不会崩溃的trace
printf有个问题当我们不小心用错参数就会产生崩溃,怎么办呢,用下边的代码就不会产生崩溃了1.下载tinyformat2.加入#define MAKE_ERROR_FUNC(n) \ template<TINYFORMAT_ARGTYPES(n)> \ void mytrace(int code, const char
2021-02-04 14:47:57
175
原创 rsa 长密钥实现及测试
1.今天看了一下RSA非对称的c++实现。网上有简单的实现,但是生成的密钥太短,并且运行效率很差。2.用boost实现的版本。可以运行在vs2010及以上的版本。void testbigRSA(){ using namespace MYRSA; RSA_bigPrime bsa_bigPrime; Key2 key = bsa_bigPrime.getKey(); cout << "钥匙如下:"<< endl; cout << "公钥:...
2020-12-29 16:54:43
442
1
原创 用windbg定位内存泄漏
windbg调试代码中内存泄漏的方法,记录如下:1. 运行:gflags -i testDlg.exe +ust (gflags -i testDlg.exe -ust)2.设置windbg的调试符号。3.在windbg打开应用程序testDlg.exe4.运行一段时间,关闭应用程序。5.显示:testDlgDlg.cpp(241) : {455} normal block at 0x000000000498A9B0, 100 bytes long.Data: <...
2020-10-30 17:53:36
900
原创 share_ptr 通过 sendmessage 或 postmessage传递
class base{public: virtual int Exec() = 0; virtual string name() = 0;};class cmdbase:public base{public: virtual int Exec(){ printf("cmdbase..."); return 0; } virtual string name() { return "cmdbase"; }public: int m_count;};clas.
2020-10-29 16:22:56
479
1
原创 windbg 调试符号
如何加载调试符号呢,因为现微软不允许直接下载只能用下边方法:1. 挂在代理服务器2. windbg->file->Symbol File Path...// 调试符号e:\mylocalsymbols;SRV*e:\mylocalsymbols*http://msdl.microsoft.com/download/symbols;C:\Users\Administrator\Downloads\18788...
2020-10-15 10:37:07
212
原创 c++ 流写读文件容易发生的错误
c++流读写时的好文章http://courses.cs.vt.edu/cs2604/fall01/binio.html用c++流读取文件发生错误,如果没有判断就会发生崩溃。#include <iostream>#include <fstream>void mytest(){ char buffer[100]; std::ifstream myFile ("d:\\test.bat", std::iostream::binary); // 如果.
2020-09-25 10:20:13
1061
原创 win32 里边 判断系统64位,编译32位下运行程序
我们经常会遇到在系统是64位,编译在32位下进行写代码,下边给出例子:// 这个函数只在32位下边才进行调用void SetExceptionPolicy(){ BOOL os64 = FALSE; // 判断系统是64位,还是32位 SYSTEM_INFO si; GetNativeSystemInfo(&si); // Display the contents of the SYSTEM_INFO structure. TRACE("si.wProcessorArchit
2020-09-22 14:27:10
412
原创 windows 路径 常用函数使用 UTF8-ascii ascii-UTF8 串转换
char buffer[MAX_PATH]; GetModuleFileNameA( NULL, buffer, MAX_PATH ); PathRemoveFileSpecA(buffer); // c: d: 和后边路径合并 char cfg_path[MAX_PATH]; PathCombineA(cfg_path, buffer, "config.cfg"); char* s = PathFindExtensionA(cfg_path); fmt::print("{}\n", ..
2020-08-11 10:07:43
575
原创 windbg 使用条件断点 ba
背景,我今天要调试一个大程序,里边的一个变量改变了,但代码量实在太大,如果想监控一个类的成员变量是否等于4,怎么办呢?#pragma onceclass CMyTest{public: CMyTest() { m_abc = 0; } void set(int a) { m_abc = a; }; int m_abc;};//调用的地方就是CMytest test;for( int i = 0; i< 100...
2020-07-04 23:10:50
462
原创 ubuntu 记录
1. codeblocks添加已存在的Makefile和工程源码展开1)“File -> New -> Project”,选择“Empty Project”或者“console application“并创建。2)选中 Project,右键,选择“Add files”,将 c/cpp 和 head files 加入工程。3)选中 Project,右键,选择“Properties”,“Project settings”选项卡中的“Makefile”填入Makefile 文件名,并勾选“Th
2020-05-12 15:41:18
180
原创 c++ 11 知识点
1. 万能引用:int add(){ return 100;}const int &n = add(); // 编译通过int &p = add(); // 不能编译通过
2020-05-08 00:47:57
237
原创 java fastjson 的测试
public static String ReadFile(String Path){ BufferedReader reader = null; String laststr = ""; try{ FileInputStream fileInputStream = new FileInputStream(Path)...
2020-04-03 17:48:24
357
原创 c++ string 常用封装
bool replace(std::string& str, const std::string& from, const std::string& to) { size_t start_pos = str.find(from); if(start_pos == std::string::npos) return false; st...
2020-01-09 17:17:57
311
原创 cocos2dx 动态替换图片
摸索很久才搞定,文件名相同时,替换精灵图片void HelloWorld::UpatePicture( std::string path ){ CCImage* img = new CCImage(); img->autorelease(); img->initWithImageFile(path); cocos2d::CCText...
2020-01-04 19:53:03
928
转载 springBoot中@Controller和@RestController的区别的小坑
这两个的区别其实是个很简单的问题,但是对于初学者可能遇到了会掉坑里。@RestController注解相当于@ResponseBody + @Controller合在一起的作用。1、如果注解Controller使用@RestController,则Controller中的方法无法返回jsp页面,或者html,配置的视图解析器 InternalResourceViewRes...
2019-12-13 19:55:48
627
原创 opencv mat 显示对 cocos2dx 上边
// Assuming frame is cv::Matauto texture = new Texture2D;texture->initWithData(frame.data, frame.elemSize() * frame.cols * frame.rows, Texture2D::PixelFormat::RGBA8888, ...
2019-12-10 23:26:53
246
转载 ios segmeng 简单使用
1.@property (nonatomic,strong)UISegmentedControl *segControl;2.-(UISegmentedControl *)segControl { if (!_segControl) { //宽度是固定的,不会因为设置的数值改变而改变 _segControl = [[UISegmentedCon...
2019-12-07 10:53:07
189
转载 老Mac 最新OS X Mojave 10.14 安裝方法
下载的地址:https://doc-14-bo-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/0jcbo3aurk5e33uiakrb4v16uacv06hb/1573099200000/03575845384465834951/*/1pigKkDQ969HwMc0FDEYnh4UuZ1Rlp...
2019-11-07 13:45:02
4507
原创 java 小练习
我想把java最常用的操作,写一些测试代码,以后用起来方便些。1.集合小测试: list set map包括了集合的交集,并集,补集。import org.apache.commons.collections4.CollectionUtils;import java.util.*;public class Main { static void testList()...
2019-10-22 15:58:20
133
转载 Mac mini 2011 到 macOS Catalina
Posted on 2019.10.14 by Volcano如何升级老迈的Mac到macOS Catalina不久前macOS Catalina 10.15正式版发布,想到还有一台吃灰许久的Mac mini 2011mid,这个老机器我已经替换了SSD硬盘,加了内存,日常浏览网页也不觉得吃力。再加上从前用这台机器做过业余私活赚过些许外快,也有些感情。也许可以升级到最新的macOS? 但是...
2019-10-21 11:54:41
14037
2
原创 FreeImage 用BYTE* 写入
FreeImage库 写入png 带alpha通道的图像: std::wstring filesave = L"d:\\a.png"; FIBITMAP* dib; dib = FreeImage_Load(FIF_PNG, "d:\\12.png"); FIBITMAP *src = FreeImage_ConvertTo32Bits(dib); int width = F...
2019-10-14 15:26:19
465
python 标准库 中文版
2015-10-28
python 标准库 英文版及代码
2015-10-28
无顺序 map c++ vs2010-vs2022都可以编译的 版本
2023-09-21
java jdbc maven test
2019-03-31
ios jsoncpp jsonkit test
2016-12-22
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人