自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(32)
  • 资源 (8)
  • 收藏
  • 关注

原创 关联容器之set与multiset

#include #include #include #include using namespace std;/* 关联容器之set与multiset set集合容器,实际是一棵树,每棵子树的左结点小于根节点的值, 而根节点的值小于右节点的值,整棵树可以用中序遍历得到一个 set的元素不能重复,multiset的元素可以重复 */int main

2013-09-09 13:43:15 624

原创 关联容器之multimap

#include #include #include using namespace std;/* 关联容器之multimap Key可以是重复的 Key-Value可以不是一一对应的关系 *//*int main(){ //创建空容器 multimap m_map; //插入一个元素 m_map.insert(pair("苍井

2013-09-09 13:42:24 559

原创 关联容器之map

#include #include #include using namespace std;/* 关联容器之map Key-Value一一对应 按照key的大小排序 */int main(){ //创建空容器 map m_map; //插入一个元素 m_map.insert(pair(1001, "苍井空")); m_map

2013-09-09 13:40:24 540

原创 容器适配器之priority_queue

#include #include using namespace std;/* 容器适配器之priority_queue 默认vector,deque可以,list不可以 优先权与元素的值成正比 */int main (int argc, const char * argv[]){ priority_queue pri_queue;

2013-09-09 11:38:25 503

原创 容器适配器之queue

#include #include#include#include#includeusing namespace std;/* 容器适配器queue 先进先出 必须pop_front() 关联基础容器list、deque 没有vector*/int main(){ //定义queue 默认是deque queue m_queue; //指出类型 //queu

2013-09-08 01:10:03 534

原创 容器适配器之stack

#include #include#include#includeusing namespace std;/* 容器适配器stack 关联所有基础类型的容器*/int main(){ //定义stack 默认是deque //stack m_stack; //指出类型 stack> m_stack; //push 入栈操作 m_stack.push("去年买了个

2013-09-08 00:35:22 495

原创 顺序容器之list

#include#include#includeusing namespace std;/* 顺序容器list 任意位置插入、删除操作时多选用此容器,特别适用于对表的操作*/int main(){ //定义两个string的list容器 list aver,hero; aver.push_back("苍老师"); aver.push_back("波老师"); her

2013-09-07 20:21:49 536

原创 顺序容器之vector

#include#includeusing namespace std;/* 标准容器Vector 默认容器,主要用于随机存取*/class student{};int main(){ int i = 0; //定义10个int元素的容器对象V,初值=0 vector V(10,0); for(i = 0; i < 10; i++) //改变元素的值,自动范围检查

2013-09-07 19:38:50 550

转载 C/C++ 内存分配方式,堆区,栈区,new/delete/malloc/free

http://blog.youkuaiyun.com/rujielaisusan/article/details/4622197内存分配方式内存分配方式有三种:[1] 从静态存储区域分配。内存在程序编译的时候就已经分配好,这块内存在程序的整个运行期间都存在。例如全局变量, static 变量。[2] 在栈上创建。在执行函数时,函数内局部变量的存储单元都可以在栈上创建,函数执行结束时这些存储

2013-06-29 17:14:31 447

原创 递归与分治2

#include/*递归 实现折半查找*///普通折半查找int binSearch_Normal(int A[],int n,int e){ int low = 0,high = n-1,mid; while(low <= high) { mid = (low + high) / 2; if(A[mid] == e) return mid; if(e > A

2013-06-22 00:32:03 425

原创 递归与分治

#include/*递归与分治 求一个整数的全部划分数6=66=5+16=4+2 6=4+1+16=3+3 6=3+2+1 6=3+1+16=2+2+2 6=2+2+1+1 6=2+1+1+1+16=1+1+1+1+1+1*/int part(int n,int m){ if(m==1) return 1; if(m>n) return part(n,n); if(

2013-06-21 23:59:28 481

原创 穷举法

#include/*穷举法 Tom五本书,给3位同学的分法。*/int main(){ int i,j,k; for(i=0;i<5;i++) { for(j=0;j<5;j++) { for(k=0;k<5;k++) if(i!=j && i!=k && j!=k) { printf("%d %d %d\n",i,j,k); }

2013-06-21 23:28:06 443

原创 简单的str函数重写

#include#include/*简单的str函数重写*/int my_atoi( const char *str ){ if (str == 0 ) return 0; int nRet = 0; bool bFlag = false; int i=0; if (strlen(str) == 0) return

2013-06-18 14:04:06 601

原创 局部证明哥德巴赫猜想

#include#include/*哥德巴赫猜想的局部证明(1-1000000已证)*//*函数声明*/int testifyGB_Guess(int low ,int high);int isGoldbach(int n);int isPrime(int n);/*证明low——high是否符合*/int testifyGB_Guess(int low ,int hig

2013-06-15 21:34:37 710

原创 链表

#include#include/*链表及其操作*//*定义*/typedef struct node{ int data;//数据域 struct node *next;//指针域}LNode,*LinkList;/*遍历链表*/void printLinkList(LinkList p){ if(!p) exit(0); printf("----------

2013-06-15 20:31:27 412

原创 静态顺序表

#include#include/*静态顺序表及其操作*/#define MaxSize 10/*静态定义顺序表*/int Sqlist[MaxSize]={4,5,6,7,8};int len=5;/*遍历*/void PrintElem(int Sqlist[],int n){ int i; for(i=0;i<n;i++) { printf("%d\n",

2013-06-15 18:53:05 524

转载 普通寻路算法

#include/* 普通寻路算法 回溯法,近似穷举 找到的路径不一定是最短路径*/#define MAX_NUMBER_LENGTH 6 void print_path();/*用矩阵表示地图:其中1表示路,0表示没有路,2表示终点,起始地点为(1,0)*/ static int gPath[MAX_NUMBER_LENGTH][MAX_NUMBER_LENGTH] =

2013-06-12 22:01:23 537

原创 流程控制 NN矩阵

#include /*输入两个数,第一个数决定一个nXn的矩阵,第二个数决定从1开始赋值,赋值的上限 5 18 输出:1 2 3 4 516 17 18 0 6 15 0 0 0 714 0 0 0 813 12 11 10 9*/#define MAX 100 void main() { int a[MAX][MAX]={0};

2013-06-11 21:54:20 818

原创 流程控制

Description 输入10个数,找出出现次数最多的数 (如果多个并列,则按数字出现顺序分别输出)比如:输入:1 5 27 33 24 1 27 18 1920 输出:1 27输入: 3 21 44 5 21 9 21 2 80  输出:21 Input1 1 3 4 5 6 7 8 9 0

2013-06-11 21:37:34 749

转载 约瑟夫环问题两解

原文:http://www.cnblogs.com/EricYang/archive/2009/09/04/1560478.html继续笔试准备ing……分享一下昨天做到的其中一题,其实题目很老,也做过n遍了,但复习起来也是颇有韵味,同时还发现另一种妙解,感觉不错的。问题描述:      约瑟夫环问题(Josephus)      用户输入M,N值,从1至N开始顺序循环

2013-06-11 20:24:56 583

原创 虚幻脚本入门

我的作品:http://v.youku.com/v_show/id_XNTMwMTU0OTIw.html前边的话: Unreal Script,即虚幻脚本,后缀名UC,以下用UC代替。 写这篇帖子的目的是为了让更多的想学习UC但没有UC使用经验的爱好者对UC有个理性认识,不再认为UC是个门槛很高的东西,如果读完这篇文章,你有信心和欲望开发自己的UC工程,我的

2013-03-24 12:52:00 3228

原创 陶仁贤学习笔记6(天空环境、阳光效果)

ps贴图 maya模型制作 udk配置天空及阳光主光灯(ds)暖色调 辅助灯光(skylight)冷色调 阴影处加light调节色调 特效:灰光lightshaft 光晕lensflare 背景图模糊 Dof(world property)

2013-01-18 14:35:42 742

原创 陶仁贤学习笔记5

UDK中Kismet图形编程工具,实现场景或剧情的动作。例如:自动升降电梯、自动开门。步骤:1转换静态网格为mover2Kismet中进行设置(matinee)3设置动画效果Kismet内容复杂,细水长流了。基础教程就到此结束,起到了个入门了解的作用。

2013-01-13 14:28:13 528

原创 陶仁贤学习笔记4

灯光构建:spotlight、dominatespotlight、固体网格当做光源,产品级别在构建质量中。待解决的问题:dominatespotlight对障碍的投影效果还不是很好。

2013-01-10 13:38:40 451

原创 陶仁贤学习笔记3

今天完全是熟练固体网格布局,没有什么新知识,但是高手就是这样一点一滴积累而来的。home+lef定位,shift+b选择所有表面。附图两张,初具规模了~~

2013-01-09 22:34:53 662

原创 陶仁贤学习笔记2

开始跟着做基础的关卡,killZ(自动掉落死亡)的设置,立体贴图,引入static meshes,慢慢熟练了操作。附图一张材质从下到上依次是concrete1、titel1、organic15、master15、static sid、bridgepanel。解决了问题:2012-11版本的启动报错问题——这是因为中文版配置文件中一个key出现了多次造成的,具体打Engine\EditorR

2013-01-08 22:15:12 1023

原创 陶仁贤学习笔记1

今天学习了基本的立方体建立、调节、填充,光源建立(L+left)、参数设置,基本贴图、贴图设置(double)。附图一张:

2013-01-08 11:42:35 910

转载 tcp udp实现文件传输(java)

tcp    package org.tcp;import java.io.BufferedInputStream;   import java.io.DataInputStream;   import java.io.DataOutputStream;   import java.io.File;   import java.io.FileInputStream;   imp

2012-05-25 08:25:41 1038 1

转载 java中显示弹出对话框 show messagebox 利用JOptionPane类

1、属于javax.swing 包。2、功能:定制四种不同种类的标准对话框。ConfirmDialog 确认对话框。提出问题,然后由用户自己来确认(按"Yes"或"No"按钮)InputDialog      提示输入文本MessageDialog 显示信息OptionDialog  组合其它三个对话框类型。3、这四个对话框可以采用showXXXDialog()来显

2012-02-25 15:28:33 1561

原创 碎碎碎

1.一个骰子有6面,概率均匀,我有7件事要随机均匀选择,如何扔?如果我有4件事,5件事,8件事,9件事,10件事,...n件事要选择,那么我如何用最少的扔掷次数,来做到均匀分布?扔2次,对应1-36,共36个数,去掉36,然后mod 7,对应那7件事儿。也就是说如果2次扔的都是6,就重来,....36modn。

2012-02-09 22:34:27 320

转载 WebGoat学习笔记一---Access Control Flaws

l  Using anAccess Control Matrix不同的用户访问权限不相同,题目要求我们找到能够访问AccountManager非管理员用户,那么我们只需要尝试user和resoure的组合就可以了,经过尝试,发现Larry用户的身份是 [User, Manager],却可以访问Account Managerl  Bypass a PathBased Access C

2011-11-22 19:56:01 1176

转载 WebGoat学习笔记二---AJAX Security

l  LAB:DOM-Based cross-site scripting题目叫我们用WebGoat/images/logos/owasp.jpg 图片来污染网页可以看到当我们在文本框中出入字符后网页会立即显示输入的字符,所以我在文本框中输入如下的html代码,提交后STAGE1完成Stage2:文本框中输入Stage3:在文本框中输入"Stage4:

2011-11-22 19:55:28 2095

无线网络_无线局域网

3.2.1.1 载波检测技术 物理和虚拟载波检测技术用来决定媒质的使用情况。如果任意一个指示为繁忙,那么媒 质就判定为繁忙;否则判定为空闲。 物理载波检测技术由PHY 提供,具体由PHY 层定义。物理载波检测通过接收信号的能 量强弱来确定,因传输介质不同,CSMA/CA 与CSMA/CD 的检测方式也不同。CSMA/CD 通过电缆中电压的变化来检测,当数据发生碰撞时,电缆中的电压就会随着发生变化;而 CSMA/CA 采用能量检测(ED)、载波检测(CS)和能量载波混合检测三种检测信道空闲的 方式。每当信道由空闲转为忙或由忙转为空闲时,物理层都产生一种基单元—— PHY_CCA.indicaton(STATE),它有2 个参数值:信道忙BUSY 和信道闲IDLE。当物理 层检测到信道忙,其值为BUSY,反之,为IDLE。 虚拟载波检测由MAC 提供,使用网络分配矢量(NAV)。NAV 根据实际数据交换之前 的RTS/CTS 帧中的持续时间信息,保留了对未来媒质上通信量的预测。持续时间信息也可 以在所有CP 中非PS-Poll 控制帧的MAC 头中得到。 载波检测技术将NAV状态和STA的传输状态与物理载波检测结合起来以判断媒质的繁 忙/空闲状态。NAV 可以看作一个指针,其值以固定速率递减,若减小到0,虚拟载波检测 就指示媒质空闲;如果非0,则指示繁忙。只要有STA 在传送,媒质就被判定为繁忙。

2011-12-22

无线网络_无线传感器网络

Abstract Despite a large number of approaches developed for wireless sensor network (WSN) localization, there are still many unsolved problems in this area. The challenges to be addressed are both in analyzing characterizations of the localizable WSNs and designing efficient localization algorithms under a variety of conditions. In this paper we first draw on powerful results from graph rigidity theory and combinatorial theory, revealing that the combination of distance constraint and bearing constraint leads to necessary and sufficient condition for unique localization. This enlightens our proposing an anchor-free and computationally simple ad hoc localization algorithm for WSNs. A novel combination of distance and direction estimation technique is introduced to detect and estimate ranges between neighbors. Using this information we construct unidirectional local coordinate systems to avoid the reflection ambiguity. Such local maps then converge to form a global network wide coordinate system using a transformation matrix [T], which finally leads to node absolute positions. Simulation results have shown that our algorithm achieves high accuracy without using any error refining schemes. Keywords Unique localization analysis, Anchor-free, Localization algorithm, Wireless sensor network

2011-12-22

无线网络_移动IP

Mobile Node:A host or router that changes its point of attachment from one network or subnetwork to another. A mobile node may change its location without changing its IP address; it may continue to communicate with other Internet nodes at any location using its (constant) IP address, assuming link-layer connectivity to a point of attachment is available.

2011-12-22

2 ORACLE基本管理1

ORACLE基本管理

2012-01-15

1 认识ORACLE

1 认识ORACLE

2012-01-15

3 ORACLE基本管理2

3 ORACLE基本管理2

2012-01-15

无线网络概况

Description of wireless networks Wireless network evolution Wireless network challenges & key technologies Current researches

2011-12-22

无线网络物理层

Theoretical Basis for Data Communication Transmission Media Wireless Transmission Wireless & Mobile Channel Impairments

2011-12-22

空空如也

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

TA关注的人

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