首页 > 其他
第九周-程序阅读
/*Copyright (c)2016,烟台大学计算机与控制工程学院 *All rights reserved. *文件名称:my.cpp *作 者:张瀚文 *完成日期:2016年5月6日 * *问题描述: 阅读程序,写出程序的运行结果并理解其运行机制。 */ #include #include using namespace std; class A { char *a; ...
分类:其他   时间:2016-05-07 09:07:06    收藏:0  评论:0  赞:0  阅读:175
把音频数据写入wave文件
使用DirectX SDK中带的CWaveFile类可以进行wave文件的读写,新建一个wave文件,并将头信息和音频数据写入文件: CWavefile *g_pWaveFile; WAVEFORMATEX wfxInput; ZeroMemory(&wfxInput,sizeof(wfxInput)); wfxInput.wFormatTag = WAVE_FORMAT_PCM; wf...
分类:其他   时间:2016-05-07 09:06:19    收藏:0  评论:0  赞:0  阅读:197
ParallaxHeaderViewPager源码解析
github地址: https://github.com/boxme/ParallaxHeaderViewPager 介绍: ViewPager + tab + 视差效果 + sticky效果的demo 运行效果: 页面的基本组成是 :SlidingTabLayout + viewPager + fragment。 有兴趣的读者可以读一下官方的介绍:http://nerds.airbnb.c...
分类:其他   时间:2016-05-07 09:05:56    收藏:0  评论:0  赞:0  阅读:185
第十周-点类族设计项目1
问题及代码: /*copyright 计算机与控制工程学院 完成日期:2016年5月6日 作者:马艳艳 问题描述:先建立一个Point(点)类,包含数据成员x,y(坐标点),实现需要的成员函数,并设计main函数完成测试; 输入描述:无 输出描述:坐标值 ; */ #include using namespace std; class Point { public: Point(d...
分类:其他   时间:2016-05-07 09:05:36    收藏:0  评论:0  赞:0  阅读:188
高精度求N!
#include #include #include #include using namespace std; typedef long long LL; const LL MOD = 100000000000000; const int MAXN = 40000; LL a[MAXN]; int main() {...
分类:其他   时间:2016-05-07 09:05:07    收藏:0  评论:0  赞:0  阅读:194
STL学习笔记— —iterator迭代器
头文件所有的容器都定义了自己的迭代器类型,所以一般情况下,不需要再自己添加迭代器头文件。但是如果要使用一些特殊的迭代器,如反向迭代器,或者一些迭代器辅助函数,那么就需要添加头文件。迭代器类型 类型 能力 提供者 输入迭代器 一次向前读取 istream 输出迭代器 向前写入 ostream,inserter 前向迭代器 向前读取和写入...
分类:其他   时间:2016-05-07 09:04:58    收藏:0  评论:0  赞:0  阅读:194
STL学习_List篇
STL学习——List篇 简介List与Vector不同,它不使用连续空间,而是每次插入或删除一个元素,就配置或释放一个元素空间。故list对空间的使用精准,不浪费任何空间。list对任何位置的元素插入或删除,常数时间完成。 List与Vector的使用,视元素的多少,元素的构造复杂度,元素存取行为的特性而定。 List节点List本身与List节点不同,List是一个双向的链表。其节点信息如下:...
分类:其他   时间:2016-05-07 09:04:49    收藏:0  评论:0  赞:0  阅读:263
投简历
Problem W Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Total Submission(s) : 38   Accepted Submission(s) : 13 Problem Description Speakless很早就想出国,现在他已经考完了所有需要的...
分类:其他   时间:2016-05-07 09:04:39    收藏:0  评论:0  赞:0  阅读:225
HDOJ(HDU) 2304 Electrical Outlets(求和、、)
Problem Description Roy has just moved into a new apartment. Well, actually the apartment itself is not very new, even dating back to the days before people had electricity in their houses. Because of...
分类:其他   时间:2016-05-07 09:03:57    收藏:0  评论:0  赞:0  阅读:210
LeetCode Linked List Cycle
判断一个链表中是否存在着一个环,能否在不申请额外空间的前提下完成?...
分类:其他   时间:2016-05-07 09:03:46    收藏:0  评论:0  赞:0  阅读:257
leetcode 079 word search
Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically...
分类:其他   时间:2016-05-07 09:03:27    收藏:0  评论:0  赞:0  阅读:242
通过案例对SparkStreaming透彻理解三板之二
1.解密Spark Streaming运行机制 2.解密Spark Streaming架构 I.Spark Core是基于RDD形成的,RDD之间都会有依赖关系,Spark Streaming在RDD上的时间维度,DStream就是在RDD的基础之上加上了时间维度。DStream就是RDD的模板,随着时间的流逝不断地实例化DStream,以数据进行填充DStream Graph,静态的...
分类:其他   时间:2016-05-07 09:03:07    收藏:0  评论:0  赞:0  阅读:244
51Nod 1049 最大子段和
N个整数组成的序列a[1],a[2],a[3],…,a[n],求该序列如a[i]+a[i+1]+…+a[j]的连续子段和的最大值。当所给的整数均为负数时和为0。 例如:-2,11,-4,13,-5,-2,和最大的子段为:11,-4,13。和为20。 Input 第1行:整数序列的长度N(2 <= N <= 50000) 第2 - N + 1行:N个整数(-10...
分类:其他   时间:2016-05-07 09:02:57    收藏:0  评论:0  赞:0  阅读:259
第九周项目2-深复制体验
/*Copyright (c)2016,烟台大学计算机与控制工程学院 *All rights reserved. *文件名称:my.cpp *作 者:张瀚文 *完成日期:2016年5月6日 * *问题描述:(1)阅读下面的程序,补足未完成的注释 (2)将注释(a)所在的那一行去掉,会出现什么现象?为什么? 为什么a数据成员所占用的存储空间...
分类:其他   时间:2016-05-07 09:02:16    收藏:0  评论:0  赞:0  阅读:175
hdu 3639 Hawk-and-Chicken 【强连通分量+反向建图dfs】
链接:http://acm.hdu.edu.cn/showproblem.php?pid=3639 题意:有n个人,m条边,每条边代表u给v投一票,票可以传递,比如A->B,B->C,这时C可以得到2票,求出得到最大票数的人有哪些。 分析:从一个强连通到另一个强连通分量的贡献为这两个强连通分量大小和减一。显然票数最大的人在图的端点。 将缩点后的图方向,可以得到一些入度为0的点,用DFS可以求...
分类:其他   时间:2016-05-07 09:01:57    收藏:0  评论:0  赞:0  阅读:192
GestureDetector
1,触屏一刹那,触发MotionEvent事件2,被OntouchListener 监听,在onTouch()中获取得到MotionEvent对象3,GestureDetector转发MotionEvent对象至OnGestureListener GestureDetector.onTouchEvent(event); 4,OnGestureListener获取该对象,根据该对象封装的信息做出...
分类:其他   时间:2016-05-07 09:01:07    收藏:0  评论:0  赞:0  阅读:301
ZOJ1008 Gnome Tetravex(DFS)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1008 题意: 哈特近来一直在玩有趣的 Gnome Tetravex 游戏。在游戏开始时,玩家会得到 n×n(n≤5) 个正方形。每个正方形都被分成 4个标有数字的三角形(数字的范围是 0到9)。这四个三角形分 别被称为“左三角形”、“右三角形”、“上三角形”和...
分类:其他   时间:2016-05-07 09:00:57    收藏:0  评论:0  赞:0  阅读:199
fragment及fragment的通信
引用API的一段话作为开头A Fragment is a piece of an application's user interface or behavior that can be placed in an Activity. Interaction with fragments is done through FragmentManager, which can be obtained vi...
分类:其他   时间:2016-05-07 09:00:39    收藏:0  评论:0  赞:0  阅读:265
CodeForces Round#22 C System Administrator 构造割点图
题目描述:Description Bob got a job as a system administrator in X corporation. His first task was to connect n servers with the help of m two-way direct connection so that it becomes possible to transmit...
分类:其他   时间:2016-05-07 09:00:17    收藏:0  评论:0  赞:0  阅读:169
vtk提取二维bmp图像某区域
#include #include #include #include #include #include #include #include #include //测试图像:../data/lena.bmp int main(int argc, char* argv[]) { vtkSmartPointerreader = vtkSmartPointer::New()...
分类:其他   时间:2016-05-07 09:00:07    收藏:0  评论:0  赞:0  阅读:133
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!