自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(50)
  • 资源 (13)
  • 收藏
  • 关注

原创 【Flutter跨平台插件开发】如何实现kotlin跟C++的相互调用

在 JNI (Java Native Interface) 中,“(Ljava/lang/String;在 Kotlin 中,可以使用 JNI (Java Native Interface) 来设置回调到 C++ 代码。在 JNI 中,“V” 表示 void,也就是说这个方法没有返回值。,你需要创建一个全局引用,这样它就可以跨越多个 JNI 调用。如果你在一个已经被附加到 JVM 的线程中调用回调,你不需要调用这两个方法。函数在 C++ 代码中被调用,然后它调用 Kotlin 中的。,并使用了全局引用。

2024-01-24 20:23:43 1113

原创 flutter在windows平台如何自定义dpi设置

看flutter的导出接口头文件flutter_windows.h可以发现两个api跟dpi相关,只能获取,无法设置。////代码中的使用Destroy();因为这两个值都是从系统拿到的缩放值,可以修改这两个接口,来覆盖系统的缩放值。) {因为这两个值都是从系统拿到的缩放值,可以修改这两个接口,来覆盖系统的缩放值。知道了这个,就可以给flutter加个导出设置缩放值的接口,来达到QT下QT_SCALE_FACTOR的类似效果。

2024-01-15 18:20:40 930

原创 拥有管理员权限的安装包无法通过bat批处理写入注册表

原文:https://stackoverflow.com/questions/63457336/nsis-with-admin-access-fails-to-create-reg-key-via-batch-script注册表对于32位跟64位程序,有不同的空间。32位程序会写入32位程序的注册表空间(会加个WOW6432Node在注册表路径中)例如:32位程序读取如下注册表位置时系统会自动重定向到下面的注册表路径...

2022-06-16 16:56:33 360 1

转载 WSL 打deb包报错:dpkg-deb: error: control directory has bad permissions 777 (must be >=0755 and <=0775)

WSL 打deb包报错:dpkg-deb: error: control directory has bad permissions 777 (must be >=0755 and <=0775)原文链接:https://www.bcskill.com/index.php/2020/02/page/2/报错是因为当前打包的目录权限为777,需要修改为 0755到0775之间的某个权限。由于WSL 默认是没有开启chmod的,所以需要先开启,才能修改目录权限。WSL 启用chmod新建配

2022-05-30 20:19:38 1660

原创 将博客搬至CSDN

将博客搬至CSDN

2022-03-03 13:20:00 46

原创 electron-builder跟electron-packager打包原生插件遇到的问题

自己编写的node addon插件,开发环境下,加载ok,打包后,启动就失败了,找不到了。网上搜了很多资料,都没说到点子上,类似这种,说使用extraResources的,感觉没说到点子上。解决办法其实官网就有说怎么解决electron-builder:打包脚本添加 “asarUnpack”: “./不想打包的目录”electron-packager: 命令行添加–asar.unpackDir=addon这个问题其实是asar引起的,所有可以在asar相关的选项里面找答案。具体添加细节可以在

2022-03-03 13:11:03 802

原创 electron-builder打包后无法启动,提示错误:gpu process launch failed: error_code=18

electron-builder打包后,无法运行,提示如标题所示错误。网上搜了很多资料,都无法解决。最后发现是权限问题:win10上面,非管理员账号,打包时,用了"requestedExecutionLevel": “requireAdministrator”打包时去掉最后那个选项就好了。...

2022-03-03 12:46:07 2896 1

原创 修复 error C2760: syntax error: unexpected token 'identifier', expected 'type specifier'

微软这个坑货,白瞎我一早上。问题复现用vs2019创建一个工程,然后修改windows sdk 到8.1;结果现有代码就编译不通过了,出现以上错误。使用排除法,缩小问题,最终排除到编译一个仅仅包含#include <windows.h>一行代码的cpp文件也会出问题。同样的代码,现有工程没问题,新创建的就有问题。然后开始对比,属性页的各种设置。最后发现有一个不一样。pro...

2020-06-18 13:57:00 98

原创 [c++17]std::filesystem

c++ filesystem来源:http://www.modernescpp.com/index.php/c-17-more-details-about-the-libraryhttps://www.bfilipek.com/2017/08/cpp17-details-filesystem.htmlFilesystem 概览c++ fielsystem 的模子是 boost的filesy...

2020-03-29 21:28:00 54

原创 vc++的调用约定

vc++的调用约定32-bit x86 调用约定本文只讨论微软编译器用到的调用约定,不讨论windows以外的操作系统,也不讨论vc++以外的编译器说到调用约定,大家应该知道c++成员函数的第一个参数是this指针。开始32位的x86 的调用约定都会保存EDI, ESI, EBP, EBX这几个寄存器, 返回值使用EDX:EAX对C (__cdecl)参数入栈顺序:从右到左参数退...

2020-03-19 19:50:00 24

原创 forwarding reference(转发引用) 与 std::forward

来源:https://isocpp.org/blog/2012/11/universal-references-in-c11-scott-meyers参考:http://bajamircea.github.io/coding/cpp/2016/04/07/move-forward.htmlc++11最重要的特性也许就是右值引用了;move语义跟完美转发都是基于右值引用建立起来的。右值引用的...

2020-03-13 11:38:00 39

原创 [cmake]常用命令

来源:https://stackoverflow.com/questions/9017573/define-preprocessor-macro-through-cmakehttps://stackoverflow.com/questions/28597351/how-do-i-add-a-library-path-in-cmake目录添加预编译宏Adds preprocessor defi...

2020-03-06 17:05:00 21

原创 loadlibrary 错误码126

来源:https://stackoverflow.com/questions/14361992/dll-load-library-error-code-126这个问题通常是依赖的dll确实造成的,或者直接依赖,或者间接依赖。查找办法有两个:使用 dependency walker使用 sysinternals utility里面的 Process Monitor( http://tec...

2020-03-02 09:48:00 71

原创 std::mutex的一些性能疑问

翻译自:https://stackoverflow.com/questions/3652056/how-efficient-is-locking-an-unlocked-mutex-what-is-the-cost-of-a-mutex一个锁,锁很多数据;还是一个数据一个锁?如果有很多线程频繁的访问这些数据,那么多个锁,可以增加并行性。不过锁太多不太好维护,损失了代码的可维护性。锁操作会不...

2020-02-24 22:01:00 34

原创 [c++ concurrency]std::mutex

std::mutexmutex代表的是MUTual EXclusive(禁止同时访问),通过memory barrier来实现。不同平台实现不一样,这里不深究了。线程安全队列#include <mutex>#include <queue>class threadSafe_queue { std::queue<int> rawQueue; ...

2020-02-24 15:31:00 30

原创 如何忽略git module 的new commits

参考:https://stackoverflow.com/questions/14418352/ignore-new-commits-for-git-submodule$ git submodule update没怎么看明白,原文的解释:

2020-02-22 14:43:00 55

原创 c++如何通过utf8字符串编码的文件名,在windows上打开一个文件

办不到!!!windows只接受8bit的ANSI或者UTF16编码的文件名,你可以在代码里面使用utf8编码的文件名,但是当你打开文件时,你必须将其转化为8bit的ANSI或者UTF16编码的文件名。幸运的是,VC++的std::ifstream 跟 std::ofstream对标准做了扩展,他们的构造函数跟open()方法可以接受wchat_t*的字符串(utf16编码的)。下面提供一...

2020-02-22 11:21:00 56

原创 c/c++变长参数对比

变长参数参数个数类型不确定的函数,c语言例子如下Technically to use variable number of arguments in C you include stdarg.h. From that you'll get the va_list type as well as three functions that operate on it called va_sta...

2020-02-20 21:51:00 25

原创 c++模版可以导出吗?

首先要弄明白,当我们讨论导出函数时,我们在讨论什么?函数实现在一个模块里面,需要在另一个模块里面调用,那么实现该函数的模块需要把这个函数设置为导出,以便其他模块使用。这里面涉及到连个概念:1,声明2,实现对于普通函数来说,声明跟实现是可以分开的。模版的声明跟实现是在一个头文件里面的模版不存在在哪个模块实现的问题,就一个文件,哪里包含了就在哪里实现。所以模版不存在导出函数的问题,包...

2020-02-20 16:06:00 35

转载 Detection Idiom - A Stopgap for Concepts

on September 14, 2017 under c++【原文链接】https://blog.tartanllama.xyz/detection-idiom/Concepts is a proposed C++ feature which allows succinct, expressive, and powerful constraining of templates. They have

2017-09-25 12:20:22 441

转载 Fold expressions

Fold expressionsWith C++11 we got variadic templates which is a great feature, especially if you want to work with a variable number of input parameters to a function. For example, previously (pre C++1

2017-09-25 12:09:50 395

转载 Use UMDH to identify memory leak problem

Use UMDH to identify memory leak problem原文链接:https://www.thinksaas.cn/group/topic/634356/We sometimes got memory leak problem, and we need to find the leaked memory, Here is a usful tool from MS, UMDH,

2017-08-29 17:12:11 417

转载 Attempt to execute non-executable address ...

出问题的一种可能。转载一发,以免原文没了。原文链接:https://blogs.msdn.microsoft.com/ntdebugging/2008/07/23/data-execution-protection-in-action/Hello, my name is Graham, and I’m an escalation engineer on

2016-08-27 19:13:22 2536

转载 QM Bites – Order Your Includes (Twice Over)

Header includes can be a shambles. Matthew Wilson encourages us to bring some order to the chaos. TL;DR Order includes in groups of descending specificity and lexicographically within groupsBite Con

2016-06-30 13:37:11 606

转载 ThoughtWorks(中国)程序员读书雷达

APR 17TH, 2013 | COMMENTS 软件业的特点是变化。若要提高软件开发的技能,就必须跟上技术发展的步伐。埋首醉心于项目开发与实战,固然能够锤炼自己的开发技巧,却难免受限于经验与学识。世界上并不存在速成的终南捷径,但阅读好的技术书籍,尤其是阅读大师们的经典著作,总能收到事半功倍之效。一位优秀的程序员,或许就是一名好的阅读者。好的阅读者,总是知道如何选择好的书籍。书海浩繁,良莠不齐。

2016-06-26 17:03:04 688

转载 Finding where unmanaged exceptions came from

原文链接:https://blogs.msdn.microsoft.com/jmstall/2005/01/18/finding-where-unmanaged-exceptions-came-from/Sometimes you’re looking at the callstack that’s in a handler after an exception was thrown. This i

2016-06-26 16:17:17 429

转载 A Crash Course on the Depths of Win32™ Structured Exception Handling

At its heart, Win32 structured exception handling is an operating system-provided service. All the docs you're likely to find about SEH describe one particular com-piler's runtime library wrapping aro

2016-04-08 10:50:04 841

翻译 深入浅出SFINAE

网上看到一篇介绍SFINAE的文章,自己听说过很多遍,但都不太确定到底是个啥东西。作者的文章写的很好,就拿来翻译一下练练手。原作者说看了Louis Dionne 的演讲"C++ Metaprogramming: A Paradigm Shift",对其中的Boost.Hana库中的 is_valid 特性特别感兴趣。应该是有感而发,有了此文。如果不知道啥是SFINAE,并且想知道,那么就去看原文吧。原文写的很好,代码里的注释很多,受益匪浅!

2015-12-28 19:25:45 9150 2

翻译 客户端程序无响应,卡死,卡顿了?抓个dump看下卡在哪里了。

客户端程序无响应,卡死,卡顿了?抓个dump看下卡在哪里了。原文链接工具下载链接为什么会无响应windows的客户端程序一般都有一个主线程来处理消息,一般都在winmain函数中实现。主线程根据不同的消息做不同的任务,可以打开一个新的对话框,创建一个新线程等。用户的任何点击(鼠标),滚动(滚动条)操作,都会封装成一个消息,最终传给这个线程来处理。如果,这个线程在某个消息响应中,调用了一个阻塞或很耗时

2015-11-24 17:18:26 5331

转载 Making Pimpl Easy

The Pimpl technique is a useful way to minimize coupling, and separate interface and implementation. Here's a way to simplify Pimpl deployment.By Vladimir BatovJanuary 25, 2008URL:http://drdob

2014-09-22 10:45:25 972

转载 How to: Convert Between Various String Types

This topic demonstrates how to convert various Visual C++ string types into other strings. The strings types that are covered include char *, wchar_t*, _bstr_t,CComBSTR, CString, basic_string, and S

2013-07-04 14:29:51 924

转载 Manipulating the positions of desktop icons

Today's little program demonstrates how you can manipulate the positions of desktop icons.The entire program is just scaffolding to get us far enough that we can call IFolder­View::Get­Item­Positi

2013-06-07 16:43:13 1248

转载 Visual C++ Debugging: How to use 'ASSERT' and deal with assertions failures?

原文链接:http://forums.codeguru.com/showthread.php?315371-Visual-C-Debugging-How-to-use-ASSERT-and-deal-with-assertions-failuresQ: What is an assertion?A: An assertion statement specifies a

2013-05-07 18:56:31 1092

转载 C++的指针的坑:“new[]的指针需要delete[]”和“子类指针可以转父类指针”的两条规则成功的冲突到了一起

原文地址:http://www.cppblog.com/vczh/archive/2013/04/27/199765.htmlposted on 2013-04-27 17:24 陈梓瀚(vczh) C++的指针的坑。剩下的坑留到下一篇文章里面。下面要讲的这个坑,如果不是在粉丝群里面被问了,我还不知道有人会这么做:class Base{ ...}

2013-04-30 13:33:23 1462

转载 Features of C99

IntroductionC99 is the 1999 standard of the C programming language. C is a simple, low level language, that is best suited for systems programming.This article will present a number of C99's fea

2013-04-25 14:53:08 947

转载 Page State–Step by Step

Posted on July 27, 2011 by Jesse LibertyWindows Phone TutorialThe Windows Phone life cycle is not terribly complicated, but it can be the source of some   confusion, and mana

2013-03-07 10:13:13 1048

转载 Threading Model

msdn地址:http://msdn.microsoft.com/en-us/library/ms741870.aspx害怕文章以后找不到,所以复制了一下。完全的复制。Windows Presentation Foundation (WPF) is designed to save developers from the difficulties of threadin

2013-02-25 20:48:57 1624

转载 Windows Phone 8: Evolution of the Runtime and Application Compatibility

Long time back at the wake of the release of Windows Phone 7 (WP7) I posted about the Windows Phone 7 series programming model. I also published how .NET Compact framework powered the applications

2013-01-29 11:50:25 802

转载 A Miser Boss

A Miser BossTime Limit: 2 Seconds Memory Limit: 65536 KB There are three different lathes in a factory namely A,B,C. They are all able to work on all kinds of workpieces. And there aren work

2011-11-15 20:20:03 872

转载 zoj 3551 Bloodsucker

In 0th day, there are n-1 people and 1 bloodsucker. Every day, two and only two of them meet. Nothing will happen if they are of the same species, that is, a people meets a people or a bloodsucker mee

2011-11-10 10:53:11 1400

dumphungwindow

windows程序开发 自动检测程序无响应并生成dump。

2015-11-24

source code for Object-oriented programming with ansi-c

Object-oriented programming with ansi-c书的源码

2013-05-07

Object-oriented programming with ansi-c

Object-oriented programming with ansi-c

2013-05-07

Compilers_-_Principles_Techniques_and_Tools

正本都在这里,不分几部分。英文版啊,1000多页

2012-08-17

orl人脸数据库

ORL人脸数据库, 有22×23的bmp图片 90×112的pgm、bmp格式的图片

2011-11-16

耶鲁人脸库

耶鲁人脸库

2011-10-10

日本jaffe人脸表情数据库

日本jaffe人脸表情数据库 The Japanese Female Facial Expression (JAFFE) Database

2011-10-10

FERET_80_80-人脸数据库

FERET_80_80-人脸数据库. FERET_80_80-人脸数据库. 这有什么描述的?

2011-10-10

算法导论课后习题问题答案

We have not included lecture notes and solutions for every chapter, nor have we included solutions for every exercise and problem within the chapters that we have selected. We felt that Chapter 1 is too nontechnical to include here, and Chap- ter 10 consists of background material that often falls outside algorithms and data- structures courses. We have also omitted the chapters that are not covered in the courses that we teach: Chapters 18ñ20 and 28ñ35, as well as Appendices AñC; future editions of this manual may include some of these chapters. There are two reasons that we have not included solutions to all exercises and problems in the selected chapters. First, writing up all these solutions would take a long time, and we felt it more important to release this manual in as timely a fashion as possible. Second, if we were to include all solutions, this manual would be longer than the text itself!

2011-03-09

三星 play camera

三星 play camera 三星 play camera 三星 play camera

2011-03-09

vc 工程改名字的软件

vc 工程改名字 如果您用VC++创建了一个庞大复杂的工程,而您又想重新命名它,这个软件将有助您在短短几秒钟内完成,减少了繁重的手动更改劳动!如果您想在以前用VC++创建的工程基础上作一些改动而生成另一个新的工程(老的工程保留),这将是您的最佳选择,并且简单快捷!使用本软件,将VC++工程文件改名,几而需简单几步即可以完成工程文件改名动作,并且自动命名由VC++工程向导生成的类、工程配置文件(*.dsp,*.dsw,*.clw,*.rc,*.rc2)、*.H文件、*.CPP文件、帮助文件(*.hpj,*.hm,*.hm等)、注册文件(*.rgs,*.idl,*.odl)等,几乎支持所有VC++工程向导生成的工程。不会更改以前的工程文件,它只是生成了一个新的工程目录!请放心使用。

2009-05-06

程序设计经典问题,河内之塔之类的

程序设计经典问题 for example: 1.河内之塔 说明河内之塔(Towers of Hanoi)是法国人M.Claus(Lucas)于1883年从泰国带至法国的,河内为越战时北越的首都,即现在的胡志明市;1883年法国数学家 Edouard Lucas曾提及这个故事,据说创世纪时Benares有一座波罗教塔,是由三支钻石棒(Pag)所支撑,开始时神在第一根棒上放置64个由上至下依由小至大排列的金盘(Disc),并命令僧侣将所有的金盘从第一根石棒移至第三根石棒,且搬运过程中遵守大盘子在小盘子之下的原则,若每日仅搬一个盘子,则当盘子全数搬运完毕之时,此塔将毁损,而也就是世界末日来临之时。 解法如果柱子标为ABC,要由A搬至C,在只有一个盘子时,就将它直接搬至C,当有两个盘子,就将B当作辅助柱。如果盘数超过2个,将第三个以下的盘子遮起来,就很简单了,每次处理两个盘子,也就是:A->B、A ->C、B->C这三个步骤,而被遮住的部份,其实就是进入程式的递回处理。事实上,若有n个盘子,则移动完毕所需之次数为2^n - 1,所以当盘数为64时,则所需次数为:264- 1 = 18446744073709551615为5.05390248594782e+16年,也就是约5000世纪,如果对这数字没什幺概念,就假设每秒钟搬一个盘子好了,也要约5850亿年左右。

2009-05-06

vc++案例开发集锦.rar

vc++案例开发集锦.rar 只有代码没有书的详细讲解,初学者很难理解,所以只供高手参考

2009-05-04

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除