- 博客(55)
- 资源 (5)
- 收藏
- 关注
原创 Duilib + Cef
1. 由于CEF工程中使用了NOMINMAX预编译设置。在引用第三方使用min,max库时,会报错。可以这样处理,#include <algorithm>#define min#define max#include "include\UIlib.h"2. 中文显示错误,可能是dui库编译时 Character Set 没有选择 Use Unicode Chara...
2020-12-17 17:15:57
475
原创 nginx 配置 upload-module ,上传文件服务
平台: linux用户: rootcd /usr/localmkdir nginxcdnginxyum -y install gcc zlib zlib-devel pcre-devel openssl openssl-develwget http://nginx.org/download/nginx-1.9.15.tar.gztar -xvfnginx-1.9.15.tar.gzcd nginx-1.9.15mkdir modulecd modulegit...
2020-07-10 14:19:46
355
原创 Cef write read cookie
写入cookie std::wstring domain = L"dev-box.nn.com"; CefRefPtr<CefCookieManager> manager = CefCookieManager::GetGlobalManager(NULL); CefCookie cookie; CefString(&cookie.name).FromW...
2020-03-19 21:16:26
492
原创 P2P 开发环境搭建
1. 搭建trackerhttps://github.com/chihaya/chihaya 下载后,可以按说明编译出 chihaya.exe ,也可以载入GoLang, 按照编译是的提示,go get <package> ,安装缺少的依赖包。运行后,启动"starting HTTP frontend" addr="0.0.0.0:6969"“st...
2019-07-12 10:12:39
1718
原创 P2P-torrent&tracker&magnet&dht原理
1. Torrent 文件格式解析种子文件包含以下数据:announce-tracker的URL info- 该条映射到一个字典,该字典的键将取决于共享的一个或多个文件: name- 建议保存到的文件和目录名称 piece length- 每个文件块的字节数。通常为{\displaystyle 2^{8}}= 256KB = 262144B pieces- 每个文...
2019-07-12 10:12:29
3962
原创 P2P-libtorrent python examples
下面这段python是基于libtorrent.pyt写的demo,通过torrent文件下载。import libtorrent as ltimport sysimport timeimport scraperdef create_peerlist_data(peer_info): peer_dict = {} peer_dict['id'] = pee...
2019-07-12 10:11:32
635
原创 DWORD to string
DWORD to string char soa[10] = { 0 }; _ultoa(dir_item.second.attribution, soa, 16); string to DWORD unsigned int m_dwIP; std::istring...
2019-07-09 10:54:58
319
原创 Go 学习
1. 创建一个package,输出的函数首字母需要大写package subjectimport ( //"bufio" "fmt" //"io" "io/ioutil" "os" "path/filepath")func FilePathWalkDir(root string) ([]string, error) { var
2018-08-18 22:31:26
731
原创 Set cef srcoll bar's css style
void ClientHandler::OnLoadStart(CefRefPtr browser, CefRefPtr frame) { REQUIRE_UI_THREAD(); std::string js = "var headID = document.head;" "var st
2017-09-27 15:06:10
397
原创 enable cef support pepflashplayer
pepflashplayer 是adobe开发的ppapi插件,cef加载后,可以播放音视频。1. find pepflashplayer.dll QQ 安装目录可以找到 C:\Users\fxf\AppData\Roaming\Tencent\QQ\WebKit\Plugin\Flash\pepflashplayer.dll 右键查看详细信息,查看dll版本。 比如:
2017-08-24 19:54:57
1158
原创 cef native C++ interaction with JS
I do example based on cefclient project.modify client_renderer.cc, class ClientRenderDelegate implements CefV8Handler's interface Execute.class ClientRenderDelegate : public ClientAppRendere
2017-08-16 20:56:50
605
原创 Enable embedded cef fullscreen
I program cefsimple project as demo.Solution 1:fix in void SimpleApp::OnContextInitialized() RECT desktop; const HWND hDesktop = GetDesktopWindow(); GetWindowRect(hDesktop, &desktop);
2017-08-11 10:38:52
700
原创 QT window interaction with win32 window
caller is a QT program.example:#include #include "ui_QtGuiApplication1.h"class QtGuiApplication1 : public QMainWindow{Q_OBJECTpublic:QtGuiApplication1(QWidget *parent = Q_NULLP
2017-08-10 14:17:14
651
原创 QT creator使用过程总结
对于初次使用QT来说, 着实有很多坑。这里总结使用QT一周的经验。1。 安装QT我是用VS2015 编译环境。https://www.qt.io/download-open-source/ 下载QT5.9.1安装包。 安装过程,会选在 vs2015 x86, vs2015x64, gw32, 根据自己的情况,选择。我使用 vs2015 QT plugin,
2017-07-14 14:08:13
5172
原创 enable cef support ffmpeg
refefences:https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding这里有源码包列表。如果automate-git.py git下载失败,只能申请海外服务器。 Env precondition:Win 7+, VS2015u3, Win10.0.14393 SDK, Ninja 1....
2017-06-30 10:32:47
2071
转载 利用NDK编译libiconv
yinzilibiconv在NDK中未开放,因此在代码中无法直接引用iconv.h头文件,会报错no such file ordirectory。这时需要将libiconv的源码利用NDK重新交叉编译。1.下载libiconv的源码:https://github.com/pierrezurek/iconv2.在源码的根目录下./configure,这样才能生成iconv.h
2014-07-14 15:26:45
901
转载 使用android ndk编译boost库
本文引用自 http://blog.csdn.net/jwybobo2007/article/details/8687489
2014-07-02 19:15:15
1037
原创 Android test + emma
Android Junit 是android的测试工程, 和emma配合使用可以测试 java 代码的覆盖率。1. 创建Android Test Project会提示选择要测试的android 工程。 Andoid test 工程由两种方式创建, 一种是在被测试的工程内部创建, 右键--〉 New --〉JUnit Test case; 另一种是创建单独的Test 工程,选择被测
2014-03-23 16:00:58
888
原创 Android JNI Debug
1. 设置android jni工程为debug模式在Application.mk中添加APP_OPTIM := debug #releaseAPP_CFLAG := -g在Manifest.xml中添加android:debuggable="true"好像 Application.mk中的 debug 可以覆盖 manifest中的debug设置
2014-03-22 12:11:35
2271
原创 Android 命令行打包和签名
使用命令行方式进行签名需要JDK中的两个命令行工具:keytool.exe和jarsigner.exe。可按如下两步对apk文件进行签名:1.# keytool -genkey -v -keystore key.pem -alias aliasname -keyalg RSA -validity 3000 其中androidguy-release.keystore表示要生成的密钥
2014-01-02 17:29:04
941
原创 ListView中item progressbar显示混乱的问题
作为程序猿,尤其是开发android的猿,习惯了在网络上查抄各种解决方案,并且很希望有源码下载。真心话,我也是这样。但我还是希望猿们找到solution后能多思考,变成自己的东西。这里我给出了关键的solution,没有给出全部源码。 Precondition:listview中包含点击下载,显示进度条。 Question:listview上下滚动后,进度条显示混乱,实际上
2013-06-08 11:56:36
2490
转载 How to write system service
There is "permission denied" error when accessing /dev/file in service. Root cause is that there is no system privilege for the service.please refer to the below to write a service.http://proces
2012-08-08 16:54:40
681
转载 Android* System-Level Java*/C++ Code Debugging
From http://software.intel.com/en-us/articles/android-system-level-javac-code-debugging/other references: Android* System-Level Java*/C++ Code Debugging1. IntroductionCurrently, th
2012-08-08 16:44:57
1257
原创 Porting u-boot
If you want to port u-boot to a new board, you need to care these aspects. This article is based on snowball u8500.Directory structureboard ------------ Platform, board-levels files. The b
2012-08-07 11:06:04
2320
转载 Linux Kernel -- notify chain
From http://bbs.chinaunix.net/thread-2011776-1-1.html1.通知链表简介 大多数内核子系统都是相互独立的,因此某个子系统可能对其它子系统产生的事件感兴趣。为了满足这个需求,也即是让某个子系统在发生某个事件时通知其它的子系统,Linux内核提供了通知链的机制。通知链表只能够在内核的子系统之间使用,而不能够在内核与用户空间之间进行
2012-07-26 14:42:31
1625
原创 Linux Kernel -- chess game
DescriptionThis is an exercise for kernel coding.Focus on,EXPORT_SYMBOL //communicate between moduleswork_queuewait_queuespinlocklistThere are 3 modules, chess.ko, chessplayer0.ko, che
2012-07-25 17:24:31
1110
原创 Gerrit step by step
About how to install and confiure it, please see another article gerrit + ldap or http>1.gerrit公钥配置 在shell中执行命令 ssh -p 29418 gerrit_fisrt_username@127.0.0.1提示Permission denied
2012-07-25 16:43:07
6844
1
原创 Gerrit user guide
1. Get codegit clone ssh://username@gerrit_server:29418/kernel_goldfishgit clone ssh://fenggxin@10.126.39.248:29418/kernel_goldfish2. push codegit push ssh://gerrit_server:29418/kernel_g
2012-07-25 16:40:03
9600
原创 Linux Kernel -- Debug VirtualBox
references:http://fotis.loukos.me/blog/?p=25Kgdb is a source level debugger for the linux kernel. It requires two machines, one running a kernel compiled with kgdb enabled and the seco
2012-07-25 16:37:36
1224
转载 Linux下面的线程锁,条件变量以及信号量的使用
From http://www.cppblog.com/converse/archive/2009/01/15/72064.html一) 线程锁1) 只能用于"锁"住临界代码区域2) 一个线程加的锁必须由该线程解锁.锁几乎是我们学习同步时最开始接触到的一个策略,也是最简单, 最直白的策略.二) 条件变量,与锁不同, 条件变量用于等待某个条件被触发1) 大体使用的伪
2012-07-25 11:00:40
644
转载 Linux kernel 中的链表list 使用示例
有了这个头文件,可以在用户空间使用kernel的list。如下代码的获取路径http://isis.poly.edu/kulesh/stuff/src/klist/list.h 1 #ifndef __LIST_H 2 #define __LIST_H 3 4 /* This file is from Linux Kernel (include/linux/list
2012-07-24 14:03:15
1478
转载 Linux USB Joystick游戏杆驱动
[cpp] view plaincopyclass="cpp" name="code">//驱动代码(中断传输)#include #include #include #include #include #include #include #include #include // Define
2012-07-23 16:57:19
1501
转载 Linux下USB驱动之skeleton分析
From http://www.linuxidc.com/Linux/2008-10/16887.htmUsb_skeleton.c,是USB驱动的框架,适合USB驱动的初学者。1.结构体内核其实就是一坨坨的数据结构,加上一根根链表。对于初学者,如果直接看USB驱动代码,大概会被那些名字相近的结构体弄得晕头转向,比如usb_host_interface和usb_inte
2012-07-23 16:55:21
818
原创 Linux kernel --- VirtualBox
This article describe about how to roadmap android kernel on VirtualBoxSoftware environment: Ubuntu 10.0.4LS1. Download android source codehttp://source.android.com/source/downloading.html
2012-07-16 16:02:46
1431
原创 gerrit + ldap or http
这几天在学习配置Gerrit的,gerrit 是一个结合git作code review流程管理的基于web的application。真正配置起来还是遇到了好多问题,我这里就直接把正确的方法写出来了,大家不必走弯路。具体要了解某一方面的原理,请参考相关的链接。1. install git$sudo apt-get install git-core2. install
2012-06-26 10:24:08
12534
转载 USB Descriptor
From: http://blog.csdn.net/wavemcu/article/details/7220697USB描述符的分类与介绍USB的符述符分为几类?有人可能会答:设备描述符、配置描述符、接口描述符、端点描述符、字符串描述符等。但这里说的不是这样的。上面的几类描述符属于USB标准描述符。另外还有HID描述符和Hub描述符。所以分类是这样的:1. 标准描述符
2012-05-30 13:35:58
1356
原创 Git Server init
references:http://git-scm.com/book/en/Git-Basics-Getting-a-Git-RepositoryCreate git repository//server side, you should have a common user account, e.g., gituser:$ mkdir /opt/git/projec
2012-04-25 17:19:06
1250
原创 Linux Kernel training (2) Gpio
General Purpose Input Output (通用输入/输出)简称为GPIO,或总线扩展器,利用工业标准I2C、SMBus™或SPI™接口简化了I/O口的扩展。当微控制器或芯片组没有足够的 I/O端口,或当系统需要采用远端串行通信或控制时,GPIO产品能够提供额外的控制和监视功能。One Module driver example, #include #inc
2012-04-20 17:05:42
703
原创 Linux Kerner training (1) Lauterbach and trace32 debug u-boot
LinuxKernel TrainingRefrences:$ git cloneGit://igloocommunity.org/git/kernerl/igloo-kerner.githttp://igloocommunity.org/support/Technical_documentationhttps://wiki.linaro.org/Platform/Andr
2012-04-20 16:47:18
5746
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人