- 博客(26)
- 收藏
- 关注
转载 IO多路复用之select总结
摘自https://www.cnblogs.com/Anker/p/3258674.html博客;写的比较清晰;尤其是那个流程图,所以拷贝该博客,当做笔记;IO多路复用之select总结1、基本概念 IO多路复用是指内核一旦发现进程指定的一个或者多个IO条件准备读取,它就通知该进程。IO多路复用适用如下场合: (1)当客户处理多个描述字时(一般是...
2019-09-16 17:00:00
203
转载 ourhdr.h(UNIX环境高级编程第一个用例)
#include "./base/ourhdr.h" 将ourhdr.h放到同级base路径下#include <sys/types.h>#include <dirent.h>#include "./base/ourhdr.h"int main(int argc,char* argv[]){ DIR *dp; s...
2019-09-16 15:25:00
200
转载 C#全局键盘监听(Hook)的使用(转载)
转载https://www.cnblogs.com/zhaoyuncai/p/7684958.html稍微有些改动这里只添加按键按下一.为什么需要全局键盘监听?在某些情况下应用程序需要实现快捷键执行特定功能,例如大家熟知的QQ截图功能Ctrl+Alt+A快捷键,只要QQ程序在运行(无论是拥有焦点还是处于后台运行状态),都可以按下快捷键使用此功能…这个时候在程序中...
2019-06-03 18:34:00
802
转载 修改WebBrowser内核版本
WebBrowser内核版本过低会导致类似如下功能1 SetWebBrowserFeatures(11);//11是设置ie版本为11public static void SetWebBrowserFeatures(int ieVersion) { // don't change the registry i...
2019-05-16 10:24:00
1472
转载 C#窗体变透明,而窗体上的控件不透明
1、先把窗体的颜色变成一种很不常见的颜色。2、把该窗体的TransparecyKey的颜色设置成窗体的颜色。3、加入控件,但是控件的颜色不能和窗体颜色一致,否则控件也透明。TransParencyKey 的颜色只要与 BackColor的颜色相等即可https://zhidao.baidu.com/question/145525809.html转载于:https://w...
2019-04-04 11:24:00
653
转载 Lambda函数应用
下面是各种变量截取的选项:[] 不截取任何变量[&} 截取外部作用域中所有变量,并作为引用在函数体中使用[=] 截取外部作用域中所有变量,并拷贝一份在函数体中使用[=, &foo] 截取外部作用域中所有变量,并拷贝一份在函数体中使用,但是对foo变量使用引用[bar] 截取bar变量并且拷贝一份在函数体重使用,同时不截取其他变量[t...
2019-03-14 18:05:00
122
转载 linux 添加动态库链接
临时设置一、在终端中输入 export LD_LIBRARY_PATH=./二、永久添加1、在/etc/ld.so.conf.d路径中添加 *.conf 例如(DaHSdk.conf)sudo chmod 777 DaHSdk.confgedit DaHSdk.conf 2、在DaHSdk.conf 中 添加编译路径(绝对路径)3、...
2019-03-14 18:01:00
198
转载 获取屏幕数量及宽高--GetSystemMetrics
1 #include <iostream> 2 #include <Windows.h> 3 #include "winuser.h" 4 5 6 int main() 7 { 8 // 获取桌面x坐标,可以为负值 9 int xScreen = ::GetSystemMetrics(SM_XVIRTUAL...
2019-03-04 10:34:00
816
转载 freeswitch 会议创建命令
参考资料https://freeswitch.org/confluence/display/FREESWITCH/mod_conference转载https://www.jianshu.com/p/00031e4c8ea6查询已经存在的会议```conference <conf name> list [delim <string>...
2019-01-24 15:52:00
2216
转载 c++ lambda表达式 C++11
1 #include <iostream> 2 #include <functional> 3 #include <string> 4 5 6 void fun1(std::string i,std::function<int(std::string& y)> send) 7 { 8 ...
2019-01-24 14:36:00
80
转载 C++实现发送邮件
备注:代码是从别人博客拷贝下来,如有问题;请联系QQ:972510639SmtpEmail.h 1 #ifndef __SMTP_EMAIL_H__ //避免重复包含 2 #define __SMTP_EMAIL_H__ 3 4 #include <iostream> 5 #include <list> 6 #include &...
2018-12-18 10:23:00
3685
转载 线程池简单代码
转载别人代码;做备忘condition.h 1 #ifndef _CONDITION_H_ 2 #define _CONDITION_H_ 3 4 #include <pthread.h> 5 6 //封装一个互斥量和条件变量作为状态 7 typedef struct condition 8 { 9 pthread_mutex_...
2018-11-30 11:44:00
245
转载 mqtt
//MQTT注册(连接)bool RegisterMQTT(const std::string& user, const std::string& pwd, const std::string& serviceIp, const std::string& source){ int rc = -1; rc = MQTTAsync_create(&...
2018-01-26 11:13:00
120
转载 动态库之间回调函数使用
在底层dll实现接口.h文件typedef interfaceBase* (lpObjCreate)();class interfaceBase{ virtual setcallback(callbackBase* callback){};}class callbackBase{virtual void callback(){};}.cpp...
2018-01-16 20:23:00
767
转载 Expression: __acrt_first_block == header 错误
编译完成后,报onecoreuap\inetcore\urlmon\zones\zoneidentifier.cxx(359)\urlmon.dll!727F1C60:(caller:727F1A28)ReturnHr(1)tid(28f0)80070002系统找不到指定的文件。Expression: __acrt_first_block == header错误...
2018-01-16 20:02:00
464
转载 linphone发消息
void SendNews(CString sip,CString msg){ std::string str= CUtility::string_To_UTF8(msg.GetString()); LinphoneChatRoom* chat_room = linphone_core_get_chat_room_from_uri(the_core, sip.GetString()); ...
2017-12-28 17:02:00
465
转载 linphone打电话
bool call(CString sip){ if (sip.IsEmpty()) return false; char* normalizedUserName = NULL; LinphoneProxyConfig* proxyCfg = NULL; //get default proxy linphone_core_get_default_proxy(the_core, &...
2017-12-28 16:58:00
230
转载 linphone初始化
memset(&vTable, 0, sizeof(vTable)); vTable.global_state_changed = CLinphoneProxyConfig::global_state_changed; vTable.registration_state_changed = CLinphoneProxyConfig::registration_state_chan...
2017-12-28 16:56:00
475
转载 linphone注册用例
bool Register(CString user, CString pwd, CString Service){CString szidentity = _T(""); szidentity.Format(_T("sip:%s@%s"), user.GetString(), Service.GetString()); const char *identity =szide...
2017-12-28 16:51:00
464
转载 LinPhone笔记(全部转载其他人博客)
linphone官网linphone 笔记: http://blog.youkuaiyun.com/ccfxue/article/category/6356356/1linphone 用例 :http://blog.youkuaiyun.com/ccfxue/article/details/52571838(Liblinphone 3.9.1中文--Modules--Tutorials:)Mis...
2017-12-28 16:29:00
242
转载 外国开源网站
https://github.com/https://www.codeproject.com/转载于:https://www.cnblogs.com/huyupei/p/8046091.html
2017-12-16 11:02:00
124
转载 shared_ptr
#define SHAREDPTR(cls)\class cls;\typedefshared_ptr<cls> cls##Ptr;转载于:https://www.cnblogs.com/huyupei/p/7800542.html
2017-11-07 19:00:00
80
转载 error LNK2019: 无法解析的外部符号
我遇到的错误是,将一个指针复制给另外一个指针(复制的类型不匹配);编译时报错,最后Lnk也出错,只看到Lnk错误,一直排查Lnk错误,后来发现上面还有个 指针复值错误;解决了指针复值错误;Lnk错误消失这类引起问题,在编译时会报错;即指针之间的复制出错;需要检查确保编译完全没有出错;再查看博客,按照别人博客问题排查。别人博客园的方案:http://www.cnblogs....
2017-10-09 14:50:00
148
转载 c++中的隐藏、重载、覆盖(重写)
1 重载、覆盖、隐藏成员函数被重载的特征:(1)相同的范围(在同一个类中);(2)函数名字相同;(3)参数不同;(4)virtual关键字可有可无。 备注:(函数重载只看参数个数和类型,不看返回值;但不能出现只是返回值不同的重载) 覆盖是指派生类函数覆盖基类函数,特征是:(1)不同的范围(分别位于派生类与基类);(2)函数名...
2017-09-30 14:52:00
83
转载 boost实现回调调函
class A{ public: A(); ~A(); int funA();}typedef std::fun(int()) CallFun;//绑定回调函数CallFun fun1 = boost::bind(&A::funA,&fun);//使用int i = fun1();/*如果是回调群,可以使用m...
2017-09-29 10:24:00
319
转载 CString转换到string,string转换到CString,int,char 之间的转换
CString cstr;std::string str = _com_util::ConvertBSTRToString(cstr.GetBuffer());CString cstr = _com_util::ConvertBSTRToBSTR(str.c_str());当然还有其它的一些方法,只是觉得该方法比较方便,而且使用系统API更安全;int 到 CString...
2017-09-29 09:28:00
115
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人