- 博客(37)
- 收藏
- 关注
原创 bk -gstreamer1.0 install
ubuntu 14.04 默认是 gstreamer0.1, apt 安装的是1.2.x本次安装最新版本1.uninstall gstreamer1.0 2. download source code3.install4. test: gst-inspect-1.0error:cannot open shared object file:
2016-11-09 22:29:37
642
转载 Linux环境变量的设置和查看方法
http://soft.chinabyte.com/os/169/11412169.shtml 1. 显示环境变量HOME $ echo $HOME /home/redbooks 2. 设置一个新的环境变量hello $ export HELLO="Hello!" $ echo $HELLO Hello! 3. 使用env
2016-11-09 22:21:25
554
转载 apt-get常用命令
apt-get常用命令一,什么的是apt-get高级包装工具(英语:Advanced Packaging Tools,简称:APT)是Debian及其衍生发行版(如:ubuntu)的软件包管理器。APT可以自动下载,配置,安装二进制或者源代码格式的软 件包,因此简化了 Unix系统上管理软件的过程,apt-get命令一般需要root权限执行,所以一般跟着sudo命令。二,apt-g
2016-11-09 13:23:42
240
原创 toshiba CB30 to development machine(qt+android)
1.激活 1次 chromebook, ssh+socket2.应用商店下载 recovery tool,按照说明 备份系统3.拆后盖,升级ssd 从16g到256G, 650大洋4.恢复系统5.激活 2次6.打开 develop mode7.激活 3次8.安装crouton + ubuntu 14.04. https://github.com/dn
2016-08-29 15:21:01
564
原创 sqlite3 compile error
sqlite3.o: In function `unixDlOpen':/home/Project-libMHP/v3 .3/example/build-minimizedDemo_ConsolePureC-Desktop_Qt_5_3_GCC_64bit-Debug/../../sqlite-amalgamation-3080704/sqlite3.c:30848: undefined re
2015-01-07 19:38:29
524
原创 渣打科营 Mini Code Marathon
代码如下,据说格式错误,nnd #include #include #include typedef struct MatrixListNode_stru{ int n; int m; char* matrix; struct MatrixListNode_stru* next;}MatrixListNode_stru;int connect(MatrixList
2014-12-22 18:58:01
766
转载 ubuntu change swappiness
swappiness Ubuntu Feisty默认的vm.swappiness值是60,这一默认值已经很合适了。但你可以改小一些降低swap的加载,系统性能会有一点点的提升 输入: 代碼: sysctl -q vm.swappiness 你会看到值是60, 更改: 代碼: sudo sysctl vm.swappiness=10 这样你就将值由60改为10
2014-11-10 22:01:01
544
原创 tips: Qt5 call android static function
AndroidManifest.xml: version="1.0"?> package="org.qtproject.qmhp" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:insta
2014-11-02 22:46:42
3120
转载 Ubuntu Linux: Uninstall / Remove Any Installed Software
Command Line Package Management Toolapt-get is the command-line tool for handling packages. It is used for adding / removing / updating packages.Uninstall / Delete / Remove PackageJust use
2014-10-12 16:21:59
631
转载 Qt5:Qt中屏幕或窗口截图功能的实现
QScreen方法1 //功能同样是截屏 , 注:QScreen的构造函数是私有的2 QScreen *screen = QGuiApplication::primaryScreen();3 screen->grabWindow(0).save("123","jpg");
2014-10-05 16:29:10
2863
转载 Qt5: how to handle fonts when deploying?
You can embed the font file(s) into your executable using the Qt resource system.http://qt-project.org/doc/qt-5/resources.htmlThen in your application, you can load the embedded font.QGuiApp
2014-10-03 21:04:15
1159
转载 linux: Count Lines of Code
cloc是一个基于perl的、十分好用的代码统计工具(http://cloc.sourceforge.net/),它所支持的语言还算十分丰富。不过,还是有很多用的较少的语言是不支持的。项目中的一些功能模块用到re2c来实现字符匹配,因此,这些.re文件是cloc无法统计的。不过还好,cloc提供了用户定制功能,使得我们还是可以实现对.re文件进行代码行统计。定制方法很简单,
2014-10-01 23:11:48
805
转载 Write database open in memory to disk (SQLite)
Hello everybody,I am working with SQLite databases in memory (it is faster to work this way), but I need to save the database on disk so as not to lose data, and I have a question: Is it possi
2014-06-18 14:53:56
918
原创 temp2_asset
#-------------------------------------------------## Project created by QtCreator 2014-03-30T16:55:55##-------------------------------------------------QT += core guigreaterThan(
2014-03-30 23:56:37
695
转载 generate apk QT5.2 folder
First check the deployement options, IIRC the default option is using Ministro to automatically load and install the Qt libraries and when you launch the emulator Ministro is not installed there.
2014-03-30 23:52:13
604
转载 C Program to sleep for millisecond in windows, linux
Probably a wrapper using platform specific #defines will do:#if defined(WIN32) #include #elif defined(__UNIX__) #include #else#endif...int millisleep(unsigned ms){#if defined(WIN32) S
2014-03-24 11:52:07
421
转载 others
pthreadhttps://computing.llnl.gov/tutorials/pthreads/http://www.cs.kent.edu/~ruttan/sysprog/lectures/multi-thread/multi-thread.html#prefaceRs232http://www.cmrr.umn.edu/~strupp/serial.h
2014-03-15 23:41:28
422
原创 GL/gl.h: No such file or directory
install OpenGLin brief:$ sudo apt-get install build-essential安装OpenGL Library$sudo apt-get install libgl1-mesa-dev安装OpenGL Utilities$sudo apt-get install libglu1-mesa-dev
2014-03-12 15:39:16
134513
转载 Setting up QCustomPlot
Setting up QCustomPlotGetting QCustomPlot to work with your application is very easy:Get the latest version of QCustomPlot from the download section.Use the qcustomplot.h and qcustomplot.cpp f
2014-03-12 14:17:49
1222
转载 SVN won't import *.a library
Have you checked your global ignore settings. On linux they are stored in ~/.subversion/configThe default on my machine is :global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.p
2014-03-07 16:55:45
671
原创 add Windows build environment-mingw to qt5.2.1 on ubuntu(AMD64)
install minGW w64install debug install debug serverconfigue in qt5.2.1qmake??http://rpm.pbone.net/index.php3/stat/4/idpl/25668832/dir/rawhide/com/mingw64-qt5-qmake-5.2.1-1.fc21.x86_64.rp
2014-03-05 15:53:43
1196
转载 “gcc-mingw-w64” package in Ubuntu
“gcc-mingw-w64” package in UbuntuUbuntu “gcc-mingw-w64” packageg++-mingw-w64: GNU C++ compiler for MinGW-w64g++-mingw-w64-i686: GNU C++ compiler for MinGW-w64 targeti
2014-03-05 11:39:43
1884
翻译 如何从 GRUB rescue 恢复 Win7,win7 USB恢复盘制作
修复系统Mbr原本使用系统恢复光盘进行恢复即可。NND,OEM的win7,创建的光盘,引导后运行一个PC厂家的自制程序,没解决问题。依照如下链接的步骤进行修复http://askubuntu.com/questions/316341/how-to-load-windows-7-from-grub-rescue1. 下载如下的镜像http://ww
2014-02-18 04:01:08
3160
原创 gcc warning 枚举的输入输出
typedef enum {A,B,C,}DATA_SOURCE_ENUM; int main(int argc ,char * argv[]){ DATA_SOURCE_ENUM source; printf("enter data source\n"); scanf("%d",&source); printf("source=%d\n",
2014-02-12 22:10:09
758
转载 jni.h: no such file or directory
You have to add the JDK path to the include path, so the compiler knows the location of the file.Windows:/I "$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32"Linux:-I$(JAVA_HOME)/includ
2014-02-11 11:19:05
1947
转载 c库,c++链接时碰到undefined reference
库文件由c代码生成,在c++代码中链接库中的函数时,会碰到undefined reference的问题。 把与c语言库相关的头文件包含添加一个extern "C"的声明即可。如下: 问题解决。
2014-01-28 15:28:27
574
原创 pthread 子线程全局变量访问
方法1:全局变量声明volatile struct MY_STRUCT *Data; void* my_thread(void* param);// 子线程内void* my_thread(void* param){ MY_STRUCT p =(MY_STRUCT*) Data; /* */}方法2:声明 struct
2014-01-15 17:00:07
826
转载 snprintf VS itoa
use snprintf, it's the new more portable itoa.itoa is not part of standard C, nor is it part of standard C++; but, a lot of compilers and associated libraries support it.An example of a spri
2014-01-10 20:40:37
672
原创 GCC(ARM) warning: comparison is always true due to limited range of data type
char ch;while((ch = getopt(argc,argv,"d:h"))!=EOF switch(ch{ case 'h' ...GCC X86 OK!GCC Arm 警告如下warning: comparison is always true due to limited range of data type改为int c
2013-12-19 11:28:23
1806
转载 C 如何将标准输出重定向到文件
stdin,stdout,stderr是常量,无法直接赋值?FILE *fp;stdin = fpgcc x86编译无警告,运行正常。android gcc(ARM-48) 编译报错error: lvalue required as left operand of assignment stdin = fp; ^解决方
2013-12-19 10:23:58
1348
原创 C99 实现类似 C++ string.find
去除字符串两端的特殊字符。string库里么找到合适函数。#include #include void string_find(char *result, char *source, int length, char k){ int i=0; int j=1; int p =0; while (*(source+1) == k) {
2013-12-18 14:17:53
629
转载 ubuntu下Qtcreator编写c/c++程序无法调试的解决办法
ubuntu12.10(64bit)下使用Qt Creator 2.5.82 (2.6.0-beta)编写c/c++程序,在调试的时候出现如下的问题:ptrace: Operation not permitted.Could not attach to the process. Make sure no other debugger traces this process.Check
2013-12-18 10:39:07
1396
原创 covnerting QString to char
When covnerting QString to char*, try converting int first to std::string, and then to C stringQString a = "String";char b[20];strcpy( b, a.toStdString().c_str();
2013-12-16 14:28:18
489
原创 Qt 编译错误: QMetaObject::connectSlotsByName: No matching signal for xxx
in brief:Qtcreator可以自动按空间名称关联槽,对应的函数必须写成“on_控件名_信号名”的格式;建议还是通过connet函数,人为显式地将信号和槽关联起来。一旦显式connect的方法的同时,又将槽函数的名字起成了“on_控件名_信号名”的格式,那么就会在运行时弹出“QMetaObject::connectSlotsByName: No matching signa
2013-12-16 14:02:43
2084
原创 VMware & Ubuntu下建立Qt5.1.1环境
step1: install GCC & All add-onsstep2: install Qt5.1.1, online or offline install as you like;step3: install openGL libin details: ubuntu 12.04安装OpenGLin brief:$ sudo apt-g
2013-12-13 10:52:14
755
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人