![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
独行黑鹰
微电子、软件、硬件爱好者、研发、
展开
-
Mac上编译libimobiledevice库
1. 安装依赖库:1. brew install openssl (or brew install libgnutls)2. brew install libplist 3. brew install libusb4. brew install libusbmuxd2. openssl 安装1. brew install gnutls2. brew install libgcrypt3. brew install openssl // 下边这句话是为了解决 sudo apt-原创 2021-08-25 16:48:23 · 568 阅读 · 0 评论 -
Qt C++/OC 混编之qmake
以下说明在qmake中添加混编的常用命令:macx { // 以下通知编译器要进行OC和C++进行混编 QMAKE_CXXFLAGS += -x objective-c++ // 以下是添加依赖库的添加方式 平台通用 LIBS += -framework Foundation LIBS += -framework Cocoa // 以下是添加.h 文件的方式 OBJECTIVE_HEADERS += \ OSWindow.原创 2021-07-20 14:10:29 · 543 阅读 · 0 评论 -
Chromium Angle 在 Windows and Mac 编译
1. 准备好代理;第一步:window系统开启代理;第二步:下载window专用的 depot_tools,新建一个文件夹depot_tools,然后把depot_tools解压到这个文件夹depot_tools(一定带上git的文件夹,是隐藏的),将建立的这个文件夹depot_tools的路径设置到环境变量里面,并且必须在python的前面;第三步:以管理员的身份进入命令行操作,找个可用的磁盘位置,输入命令 mkdir angle && cd angle;第四步:执行git原创 2021-04-05 00:31:03 · 1237 阅读 · 0 评论 -
成绩转换 NYOJ 98
#include02.using namespace std;03.int main()04.{05.int k;06.int mark;07.cin>>k;08.while(k--)09.{10.cin>>mark;11.switch(mark/10)12.{13.case 10:cout"A"原创 2014-08-25 16:19:19 · 349 阅读 · 0 评论 -
1的个数 NYOJ 100
#include02.using namespace std;03.int main()04.{05.int k;06.int h;07.int n;08.cin>>k;09.while(k--)10.{11.n=0;12.cin>>h;13.while(h>=1)14.{原创 2014-08-25 16:18:13 · 333 阅读 · 0 评论 -
NYOJ 23 取石子
刚开始看到的时候我很郁闷说原创 2014-04-30 23:14:34 · 320 阅读 · 0 评论 -
NYOJ 2
#include#includeusing namespace std;int main(){int a;cin>>a;while(a--){int c,j=0,k=1;char b[10005],d[10005];cin>>b;c=strlen(b);d[0]=b[0];for(int i=1;i{if(b[i]==')'&&d[k原创 2014-04-05 11:55:17 · 373 阅读 · 0 评论 -
基于Drectshow的GetCurrentImage使用方法无法显示图片的解决方法(本文转载)
在BasicWindow中GetCurrentImage方法使用要注意的两个问题:1、在建立filter graph是,我们renderer某个源时,系统默认采用video renderer,此时如果调用GetCurrentImage方法,并不可靠,有时甚至不能抓拍到;解决此问题 可以采用“Directshow实务精选”中提供的抓拍Filter来实现抓拍;但看够文章的人都知道比较复杂,其实有个转载 2014-03-28 10:36:21 · 1376 阅读 · 0 评论 -
QT 登录界面制作
shanping.pro#-------------------------------------------------## Project created by QtCreator 2014-03-17T13:58:27##-------------------------------------------------QT += core gui原创 2014-03-18 09:29:56 · 2511 阅读 · 0 评论 -
GLUTesslator 网格图形 Qt
Griding.pro#-------------------------------------------------## Project created by QtCreator 2015-02-04T10:28:19##-------------------------------------------------QT += core gui openglgreater原创 2015-03-03 21:59:43 · 1321 阅读 · 0 评论 -
NYOJ 6 喷水装置(一)
南阳OJ喷泉放置位置。原创 2015-03-23 16:48:45 · 584 阅读 · 0 评论 -
Qt tcp 通信
客户端部分代码:# NCClien.pro#-------------------------------------------------## Project created by QtCreator 2015-11-30T10:38:00##-------------------------------------------------QT += core...原创 2015-11-30 18:20:04 · 1123 阅读 · 0 评论 -
Mysql 5.5.52 Community 安装乱码相机和乱码排错
# 以下内容是对mysql中my.ini的配置详情# The following options will be passed to all MySQL clients [client]#这里是设置客户端的字符集default-character-set=gbk#password = your_password #以下是设置了客户端的端口号#password = yourp原创 2016-09-09 14:55:21 · 300 阅读 · 0 评论 -
DBus windows下编译方法
我用到的工具:第一个工具:dbus-1.6.8的源码、dbus-1.10.的我试了一下编译不通过,只能用dubs-1.6.8是能够通过的。注意这里使用的是dbus的源码;第二个工具:Expat 2.2.0 这个应该是解析xml文件使用的工具;第三个工具:cmake-3.7.1是一个msi文件的,我看它的安装目录中有Qt的库感觉应该是Qt做的这玩意,这是题外话;第四个工具:独立版本Qt原创 2016-12-29 20:20:13 · 1978 阅读 · 0 评论 -
Qt MySql 驱动的编译
首先 要找到这个玩意,进入这个dos窗口然后: cd D:\Qt\Qt5.4.2\5.4\Src\qtbase\src\plugins\sqldrivers\mysql(这个路径因人而异)然后运行以下命令:qmake "INCLUDEPATH+=D:\mysql\include" "LIBS+=D:\mysql\lib\libmysql.lib" -o Makefile mysql原创 2016-09-09 19:20:00 · 1544 阅读 · 0 评论 -
known incorrect sRGB profile 问题解决方案
由于Qt新版本对png文件的检测比较严格,所以有了libpng warning: iCCP: known incorrect sRGB profile 的提醒,我的解决办法是写一个程序直接转换掉,就可以去掉对应的提醒。源码如下:ChangePNG.cpp#include "ChangePNG.h"#include "ui_ChangePNG.h"#include <Q...原创 2018-05-17 17:17:01 · 13262 阅读 · 2 评论 -
NYOJ 558 一二三 问题解决
#include <iostream>#include<string>using namespace std;int main(){ int n; cin>>n; while(n--) { int m=0; string str,str1="one"; cin>>st...原创 2018-05-18 17:16:54 · 150 阅读 · 0 评论 -
QTableWidget 以单元个滑动或者以像素滑动
// 垂直方向按照像素的形式来滑动m_pTableWidget->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);// 水平滑动条按照像素来滑动m_pTableWidget->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel); enum ...原创 2017-12-28 13:25:44 · 2811 阅读 · 0 评论 -
VTK 编译方法
记得第一次使用VTK还是两年前的事情,其实VTK写的还是蛮不错的,功能对我们这些做小中型的工业显示已经足够用。最近一位朋友不会编译,我就想些一个博客分享给大家。准备条件:VTK、VTKData 、 VS、 对应版本VS版本的QT版本(一定要把Qt 库目录设置到环境变量里面,为了后期cmake程序可以识别路径,否则自己手动找比较麻烦)、cmake我用的VS是VS2015, QT 是 Q...原创 2019-05-25 20:50:19 · 1498 阅读 · 0 评论 -
NYOJ 22素数求和
#includeusing namespace std;int ss(int k);int i;int main(){ int n; cin>>n; while(n--) { int m; int h=0; cin>>m; int*a=new int[m];原创 2013-05-31 22:05:26 · 405 阅读 · 0 评论 -
NYOJ 96 n-1位数
#include<iostream>using namespace std;int main(){int len,j=0,i,t;cin>>len;int*p=new int[len];int*h=new int[len];for(i=0;i<len;i++){ cin>>p[i]; h[i]=p[i];...原创 2013-05-31 12:47:08 · 637 阅读 · 0 评论 -
NYOJ 665 台球碰撞
#include<iostream>#include<iomanip>#include <cmath>using namespace std;int main(){ int t; int l, w, r, a, v, s; double x, y; double pi = acos( -1 ); double vx, vy;...原创 2013-05-30 23:59:45 · 689 阅读 · 0 评论 -
NYOJ 709 异型卵
#include<stdio.h>int main(){ int n,m,t,i,w,j; scanf("%d",&n); while(n--) { scanf("%d %d",&t,&m); w=0; int*a=new int[m-t+2]; int*p...原创 2013-05-30 23:49:57 · 448 阅读 · 0 评论 -
NYOJ 32 组合数
#include<iostream>#define max 100int a[max];using namespace std;void comb(int n,int r);int main(){int b,c;cin>>b>>c;a[0]=c;comb(b,c);return 0;}void comb(int n,i...原创 2013-05-31 00:04:09 · 516 阅读 · 0 评论 -
NYOJ 33 蛇形填数
#include<iostream>#include<iomanip>using namespace std;void snake(int n);int main(){int n;cin>>n;snake(n);return 0;}void snake(int n){int m,i,j,t=1;if(n%2==0)...原创 2013-05-31 00:02:49 · 427 阅读 · 0 评论 -
NYOJ 8 一种排序
#include<iostream>#include<algorithm>using namespace std;struct square{int a;int b;int c;};bool camp(square x,square y){if(x.a!=y.a)return x.a<y.a;if(x.b!=y....原创 2013-05-31 00:00:51 · 363 阅读 · 0 评论 -
NYOJ 714 Card Trick
#include <iostream>using namespace std;int main(){ int n,m,i,k,temp,j; cin>>n; while(n--) { cin>>m; int*a=new int[m]; for(i=m-1;i>=0;i--)...原创 2013-05-30 23:48:35 · 408 阅读 · 0 评论 -
NYOJ 714 Card Trick
#includeusing namespace std;int main(){ int n,m; cin>>n; while(n--) { cin>>m; switch(m) { case 1: cout case 2: cout case 3: cout case 4: cout原创 2013-05-30 23:51:01 · 392 阅读 · 0 评论 -
NYOJ 240 小明的调查统计
#include<iostream>#include<algorithm>using namespace std;struct student{ int ban; int num; int cheng;};bool camp(student x,student y){ if(x.cheng!=y.cheng) r...原创 2013-05-30 23:52:48 · 501 阅读 · 0 评论 -
NYOJ 599 奋斗的小蜗牛
#include<iostream>using namespace std;int main(){int n,m,i;cin>>n;int*p=new int[n];for(i=0;i<n;i++){cin>>m;if(0<m&&m<10)p[i]=1;else if((...原创 2013-05-31 12:36:19 · 506 阅读 · 0 评论 -
NYOJ 7 街区最短路径
#include<iostream>using namespace std;int main(){int n,t,h,k,i,m,j,z;int a[20][2];int b[20];cin>>n;for(i=0;i<n;i++){cin>>m;for(j=0;j<m;j++){cin&g...原创 2013-05-31 12:37:42 · 489 阅读 · 0 评论 -
NYOJ 4 ASCⅡ码排序
#include<iostream>using namespace std;int main(){int i,j,p,t,h;cin>>t;int**m=new int*[t];for(i=0;i<t;i++)m[i]=new int[3];char**n=new char*[t];for(i=0;i<t;i++)...原创 2013-05-31 12:39:45 · 344 阅读 · 0 评论 -
NYOJ 67 三角形面积
#include<iostream>#include<iomanip>#include<cmath>using namespace std;double segment(double a,double b);double area(double a,double b,double c);int main(){int j,i=0;dou...原创 2013-05-31 12:44:35 · 697 阅读 · 0 评论 -
NYOJ 41 三个数从小到大排序
#includeusing namespace std;int main(){ int i,j,k,t; int a[3]; for(i=0;i cin>>a[i]; for(j=0;j for(k=j+1;k { if(a[j]>a[k]) { int empty; empty=a[j]; a[j]=a[原创 2013-05-31 12:52:09 · 399 阅读 · 0 评论 -
NYOJ 324 猴子吃桃
#includeusing namespace std;int main(){ int peach(int m); int j,t,len; cin>>len; int *p=new int[len]; for(j=0;j { cin>>p[j]; } for(t=0;t { cout } return 0;}int pea原创 2013-05-31 12:50:53 · 411 阅读 · 0 评论 -
NYOJ 11 奇偶分离
#include<iostream>using namespace std;int main(){int len;cin>>len;int *p=new int[len];for(int i=0;i<len;i++){cin>>p[i];}for(int j=0;j<len;j++){if(p[...原创 2013-05-31 12:49:44 · 443 阅读 · 0 评论 -
NYOJ 68 三点顺序
#include<iostream>using namespace std;int main(){int i=0,x1,y1,x2,y2,x,y,a1,a2,b1,b2;int h[10000];cin>>x>>y>>x1>>y1>>x2>>y2;while((x+y+x1+y1+x2+...原创 2013-05-31 12:41:39 · 659 阅读 · 0 评论 -
NYOJ 39 水仙花
#includeusing namespace std;int main(){ int n,a,b,c; cin>>n; if(n!=0) { a=n/100; b=n/10-a*10; c=n-b*10-a*100; if(a*a*a+b*b*b+c*c*c==n) cout原创 2013-05-31 12:53:25 · 440 阅读 · 0 评论 -
NYOJ 13 Fibonacci数
#include<iostream>using namespace std;int main(){int Fibonacci(int n);int i,len;cin>>len;int*p=new int[len];for(i=0;i<len;i++){cin>>p[i];}for(i=0;i<len...原创 2013-05-31 12:45:34 · 525 阅读 · 0 评论 -
NYOJ 31 5个数求最值
#include<iostream>using namespace std;int main(){int a[5],max,i;for(i=0;i<5;i++)cin>>a[i];int min=max=a[0];for(i=1;i<5;i++){if(a[i]>max)max=a[i];}for...原创 2013-05-31 12:43:12 · 641 阅读 · 0 评论