自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(43)
  • 资源 (1)
  • 问答 (1)
  • 收藏
  • 关注

原创 微信开发学习 OAUTH2.0 搭配事件推送

//网页授权反馈function authorization($code){ echo $code; $appid="wx65eff0c7cf9cbca3"; $appsecret="e9367099bff8a8b8d08b67490a7f9eff"; $url = "https://api.weixin.qq.com/sns/oauth2/access_t

2014-07-15 16:04:28 1251

原创 iptables INPUT使用实例说明

这篇文章写很好,主要用于网络与ip的访问。https://www.cnblogs.com/cangqinglang/p/12199777.html额外补充:iptables只是一些过滤规则而已,并不是将端口 kill 掉,相当在程序打开的端口 和 客户端(也可能是本机)连接之间增加了一个过滤器(防火墙),符合规则的就通过,不符合的就关闭全局DROP规则iptables -P INPUT DROPiptables -P OUTPUT DROPiptables -P FORWARD DR

2021-06-29 09:58:10 939

原创 leetcode 1200. Minimum Absolute Difference

2019.10.18把数组中绝对值最小的每对儿数据找出来。最简单的思路是排序,排序后找到最小值,再遍历提取绝对值为最小值的数据。感觉有点笨的方法,应该会有更好的方法。https://github.com/cathyxingchang/leetcode/tree/master/code...

2019-10-18 15:11:01 110

原创 leecode1217. Play with Chips

leetcode1217 挪chips的问题,虽然是个easy但是是个很有趣的问题~一开始有个暴力的想法,就是挨个位置挨个算一遍。后来意识到: 奇数位置的挪到奇数,权重是0; 奇数位置的挪到偶数,权重是1; 偶数位置的挪到奇数,权重是1; 偶数位置的挪到偶数,权重是0;最终的位置状态只有两种:奇数、偶数于是就很简单啦~git:htt...

2019-10-12 20:53:54 142

原创 leecode_258(未完成提高要求)

258. Add Digits Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example:Given num = 38, the process is like: 3 + 8 = 11, 1 +

2016-09-28 16:24:06 347

原创 leetcode_136. Single Number

题目:Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without

2016-09-21 20:20:34 255

原创 网易有道2017内推编程题2

小明同学把1到n这n个数字按照一定的顺序放入了一个队列Q中。现在他对队列Q执行了如下程序:while(!Q.empty()) //队列不空,执行循环{ int x=Q.front(); //取出当前队头的值x Q.pop(); //弹出当前队头 Q.push(x);

2016-08-24 20:28:05 545

原创 网易有道2017内推编程题1

1.洗牌在生活中十分常见,现在需要写一个程序模拟洗牌的过程。 现在需要洗2n张牌,从上到下依次是第1张,第2张,第3张一直到第2n张。首先,我们把这2n张牌分成两堆,左手拿着第1张到第n张(上半堆),右手拿着第n+1张到第2n张(下半堆)。接着就开始洗牌的过程,先放下右手的最后一张牌,再放下左手的最后一张牌,接着放下右手的倒数第二张牌,再放下左手的倒数第二张牌,直到最后放下左手的第一张牌。接着把牌

2016-08-24 20:27:55 396

原创 九度1032

题目描述:读入一个字符串,字符串中包含ZOJ三个字符,个数不一定相等,按ZOJ的顺序输出,当某个字符用完时,剩下的仍然按照ZOJ的顺序输出。输入:题目包含多组用例,每组用例占一行,包含ZOJ三个字符,当输入“E”时表示输入结束。1输出:对于每组输入,请输出一行,表示按照要求处理后的字符串。具体可见样例。样例输入:ZZOOOJJJZZZZ

2016-07-22 21:37:33 297

原创 九度1011

九度1011#include#includeusing namespace std;int main(){ int N; int num[10000]; int maxBegin = 0; int maxEnd = 0; int currentBegin = 0; int currentEnd = 0; int max = -1; int flag = 0; wh

2015-11-14 13:20:43 304

原创 数据结构练习2——括号匹配

#includeint main(){ char c; int STACK[100],top,count,flag; top = -1; count = 0; flag = 0; while ((c = getchar()) != '@') { if (c == '(') { STACK[++top] = c; } if (c == ')')//注意 ')

2015-10-28 23:00:41 377

原创 数据结构练习1——链表合并

#include#include#pragma warning(disable:4996)typedef struct node { int data; struct node *link;}LNode,*LinkList;int main(){ char c; int num;//读取数字 LinkList list1, list2, p, q, r; //建立两个

2015-10-28 22:22:10 468 1

原创 机器学习 Andrew NG

ICA算法 独立组件分析[W,s,v]=svd((repmat(sum(x.*x,1),size(x.1),1).*x)*x');

2015-10-24 12:21:57 460

原创 九度1047 水题

#include#include#include#includeusing namespace std;#pragma warning(disable:4996)bool isPrime(int num);bool isPrime(int num){ if (num==1||num==0||num<=0) { return 0; } for (int i = 2; i

2015-10-20 22:12:07 444

原创 九度1106

#include#includeusing namespace std;int main(){ int num; int sum; int sqrNum; while (true) { sum = 0; sqrNum = 0; cin >> num; if (num == 0) { break; } int tmp = num; while

2015-10-20 22:00:56 353

原创 九度1031

#includeusing namespace std;int main(){ int num; int times; while (true) { cin >> num; if (num == 0) { return 0; } times = 0; while (num != 1) { if (num%2==0) { num =

2015-10-11 23:17:09 258

原创 poj2159 初识hash

这里我就是直接排序了 #include#include#include using namespace std;int main(){ int i; char a[101],b[101]; int alphabetA[26], alphabetB[26]; cin >> a; cin >> b; for (i = 0; i < 26; i++) { alph

2015-09-20 19:39:10 291

转载 cout 小数点后位数(转)

ctags: cout 小数点后位数 iomanip  fixed setprecision printfcout 输出指定位数的浮点数:#include #include    //注意要包含该头文件using namespace std;int main( void ){   const double value = 12.3456789;

2015-09-20 19:34:10 429

原创 poj1338(啊这题我要死了)

第一次的代码 存在很大的问题 因为没办法控制规模 所以产生了溢出#include#include#include#includeusing namespace std;int main(){ int a, b, c, i,n; double num[2000000]; double sum; //首先找到所有的 只有2 3 5为因子的数字 一直找到1500 num

2015-09-18 16:13:13 357

原创 poj1326

poj 1326#include#includeusing namespace std;int main(){ char place[100],cabin; int miles; int sumMiles; sumMiles = 0; while (1) { cin >> place; if (strcmp(place, "0") == 0) { //一组

2015-09-18 11:25:28 474

原创 POJ练习历程

坚持啊亲~2015.09.13 1005 主要是题目看不懂 这个是硬伤 然后别的都还蛮简单的

2015-09-13 18:57:38 427

原创 c语言练习题 4-2 矩阵运算

矩阵连加连减运算#includeint main(){ int rank,a[50][50],b[50][50],c[50][50],i,j; char op; scanf("%d",&rank); for(i=0;i<rank;i++) { for(j=0;j<rank;j++) { scanf("%d",&a[i][j]); } } op=get

2015-09-01 21:53:34 1117

原创 c语言练习题 4-1 删数

删数#includeint main(){ int i,count,j,del,times,tmp,all; char c,a[100]; i=0; while((c=getchar())!='\n') { a[i]=c; i++; } //i对应着数字的个数 count=i; scanf("%d",&del); tmp=del; all=coun

2015-09-01 21:07:56 555

原创 c语言练习题 2-5 反弹

反弹 输入高度n米 和 m次落地#includeint main(){ int i; double distance,high,frequency,back; scanf("%lf%lf",&high,&frequency); distance=high; back=high; for(i=1;i<=frequency-1;i++) { back=back/4;

2015-09-01 17:30:09 510

原创 c语言练习题 2-1 正整数打印

2-1 正整数逆序打印//按照数字读#includeint main(){ int num,temp,digit,ni; scanf("%d",&num); temp=num; ni=0; digit=0; while(temp!=0) { ni=ni*10+temp%10; temp=temp/10; digit++; } if(num==

2015-09-01 11:11:48 826

原创 c语言练习题 3-6 求差集

求差集#includeint main(){ int a[100],b[100],numA,numB,i,j,found; a[0]=-99; b[0]=-99; i=0; while(a[i]!=-1) { i++; scanf("%d",&a[i]); } numA=i; i=0; while(b[i]!=-1) { i++; scanf("%

2015-09-01 10:28:46 2645

原创 c语言练习题 3-5 回文数

3-5 回文数  两个数字之间的回文数#includeint loop(int num);int loop(int num){ int ni,temp; temp=num; ni=0; while(temp!=0) { ni=ni*10+temp%10; temp=temp/10; } if(ni==num) { return 1; } else

2015-08-31 22:31:28 444

原创 c语言练习题 3-4 连续正整数的和

3-4 连续正整数的和 #includeint main(){ int start,i,j,num,sum; scanf("%d",&num); for(start=1;start<=(num/2+1);start++) { sum=0; for(i=start;i<=(num/2+1);i++) { sum=sum+i; if(sum>num)

2015-08-31 22:17:48 1348

原创 c语言练习题 3-3 计算e^x

计算 e^x的近似值输入 x 和阶数 n#includeint main(){ double sum; double temp; int n; double x; int i; scanf("%lf %d",&x,&n); temp=1; sum=1; for(i=1;i<=n;i++) { temp=temp*x/i; sum=sum+temp; }

2015-08-31 22:01:59 2295

原创 c语言练习题 3-2 计算矩形面积

3-3 矩形面积计算#includeint max(int a,int b){ if(a>b) { return a; } else { return b; }}int min(int a,int b){ if(a<b) { return a; } else { return b; }}int main(){ int Ax1

2015-08-31 21:46:04 5283

转载 opencv2.4.8 vs2013内存越界问题

ALL UNANSWEREDsearch or ask your questionASK YOUR QUESTION0OpenCV Error: Assertion Failed (size.width>0 && size.height>0) in unknown f

2014-12-30 16:17:50 1551

原创 latex IEEE论文里的公式换行

换行后等式对齐\begin{equation}\begin{aligned}R(S_2)&= p_2\cdot S_2=\sum_{i\in \mathcal{I}^+(p_2)}B_i+\beta B_{l'}\\&\leq \sum_{i\in \mathcal{I}^+(p_2)}B_i+B_{l'}\leq \sum_{i\in \mathcal{I

2014-11-06 20:06:44 9826 1

原创 latex IEEE单栏文章图片双栏目排列

今天用latex,有个图片比较大,直接用begin{figure}end{figure}插入显得太小,于是想变为双栏的,但直接改width发现还不行,于是查了下,发现需要用begin{figure*}end{figure*},比如:1begin{figure*}[htbp!]2centering

2014-11-06 18:14:22 7020 1

转载 Matlab的imfilter函数用法

Matlab的imfilter函数用法功能:对任意类型数组或多维图像进行滤波。用法:B = imfilter(A,H)   B = imfilter(A,H,option1,option2,...)   或写作g = imfilter(f, w, filtering_mode, boundary_options, size_options)其中,f为输入图像,w为滤波掩

2014-10-29 17:49:53 978

转载 【OpenCV入门教程之一】 OpenCV 2.4.8 +VS2010的开发环境配置

因为读研期间的研究方向是图像处理,所以浅墨这段时间闭门研究了很多OpenCV和图像处理相关的知识与内容。眼看自己积累到一定的程度了,于是决定开始开设这个OpenCV系列专栏,总结自己所学,也分享知识给大家。好了,这篇文章作为OpenCV的启程篇,自然少不了先系统地介绍OpenCV开发环境的配置。浅墨前后经历过OpenCV 2.4.6,OpenCV 2.4.7,OpenCV 2.4.8这三个

2014-10-10 20:45:49 397

原创 fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏

fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏项目\属性\配置属性\清单工具\输入和输出\嵌入清单:原来是“是”,改成“否”。

2014-10-10 20:20:25 302

转载 PHP time() 函数

PHP time() 函数PHP Date / Time 函数定义和用法time() 函数返回当前时间的 Unix 时间戳。语法time(void)参数描述void可选。说明返回自从 Unix 纪元(格林威治时间 1970 年 1 月 1 日 00:00:00)到当前时间的秒

2014-09-26 09:57:05 542

转载 maya api和mel 关系

maya api和mel不是一回事 基本上不是一个级别的 mel不涉及maya的算法 所以他和mayac++api并没有可比性maya的脚本编辑器只是一个扩展功能 并不能改变maya自身的核心算法 比如动力学刚体柔体还有粒子场的动力学算法都是maya开发人员用c++写好的核心算法 mel写出的脚本或者插件都是在其基础上运作的 当然你可以用c++自己编写一套算法自定义节点来实现一些比较特殊的效果

2014-09-22 17:29:56 817

转载 安装Maya插件向导(Visual Studio2008 Express版)

这两个问题困扰了我一天,所以必须把它写下来,第一,maya C++只能用Microsoft跟intel编译器编写吗?能否用简洁点的Dev C++就行了,第二maya插件向导在VS版本对应,按正常位置安装,为什么在VS里没出现向导。终于,找到了两个国外论坛,给了一丝答案,再加上仔细琢磨,终于得出以下成果,故笔。要安装Visual Studio2008 Express英文版本。安装目录的名

2014-09-22 17:25:56 845

原创 Maya C++ api

Maya可以使用标准C++编程语言进行控制。MEL使得用户可以更快捷、个性化的使用Maya图形用户界面(GUI)提供的各种功能,而C++ API可让用户直接访问Maya的核心。简而言之,通过C++ API,用户可以创建本地的个性化插件,并与Maya其他功能无缝结合。C++ API可触及的Maya领域大体可包括:命令;DG节点;工具/语境;文件转换器;变形器;着色器;操纵器;定位器;动力场;

2014-09-22 17:06:56 2386

数据结构链表合并北航

数据结构的基础 将两个链表合成为一个链表的操作 北航数据结构题目~ 大家参考一下 我自己写的 写的可能不是太好~

2013-12-02

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

TA关注的人

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