自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 资源 (6)
  • 收藏
  • 关注

原创 OpenGL中点算法画圆弧、内接多边形算法画圆

#include "stdafx.h"#include #include #include #include #include #include #include #define PI acos(-1.0)#define Jiao (36.0/180*PI)void init1(){ glClearColor(0.0,0.0,0.0,1.0);}double x[110],y[110];void

2015-09-22 09:12:51 5469

原创 OpenGL中点算法和DDA算法画直线

#include "stdafx.h"#include#include#include#include#include#include#include#define INF 0x3f3f3f3fvoid init(){ glClearColor(0.0,0.0,0.0,1.0);}void Set(int x,int y,int c1,int c

2015-09-15 09:28:27 2898

原创 树状数组区间更新 hdu4031

AttackProblem DescriptionToday is the 10th Annual of “September 11 attacks”, the Al Qaeda is about to attack American again. However, American is protected by a high wall this time, which can be treati

2015-09-11 13:45:05 361

原创 2007 Asia Regional Chengdu(树状数组神题+割点暴力+STL)

A Sequence of NumbersProblem DescriptionYou are given a sequence of N integers (each within the range [0, 2162^{16} - 1] ) along with P operations and in order to solve this problem you need to process

2015-09-09 11:39:40 552

原创 OpenGL画五角星

include “stdafx.h”include include include include include include include define PI acos(-1.0)define Jiao (36.0/180*PI)void init1(){ glClearColor(0.0,0.0,0.0,1.0);//黑色背景 } double x[11],y[11];v

2015-09-08 09:51:09 1042

原创 2010 Asia Regional Tianjin Site —— Online Contest (线段树二维转一维,2-SAT,floyed变形)hdu3621-3631

Bomb GameProblem DescriptionRobbie is playing an interesting computer game. The game field is an unbounded 2-dimensional region. There are N rounds in the game. At each round, the computer will give Ro

2015-09-07 21:50:15 986

原创 BFS最短路+状态dp(hdu3681)好

Prison BreakProblem DescriptionRompire is a robot kingdom and a lot of robots live there peacefully. But one day, the king of Rompire was captured by human beings. His thinking circuit was changed by h

2015-09-07 20:16:07 540

原创 旋转数组

上次去阿里面试的题目,当时写的那叫搓啊。。。题目描述 把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转。输入一个非递减序列的一个旋转,输出旋转数组的最小元素。例如数组{3,4,5,1,2}为{1,2,3,4,5}的一个旋转,该数组的最小值为1。 思路网上都有,这里给出实现:int minNumberInRotateArray(vector<int> rotateArray) {

2015-09-05 21:09:24 402

原创 二维数组中查找

在一个二维数组中,每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序。请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数。 bool Find(vector<vector<int> > array,int target) { int col=array.size()-1,row=0; while(col>=0&&row<ar

2015-09-05 20:10:52 255

原创 python用called函数实现函数对象

在c++里函数对象是重载了()运算符的对象,可以直接调用,他也有很多模板函数对象,像加减乘除等等,那么python如何实现函数对象那?其实很简单,python有一个特殊函数,叫做_ called_,它允许创建可调用的对象,所以只要重写这个函数就可以了class plus(): def __call__(self,x,y): return x+yadd=plus()prin

2015-09-05 10:27:57 791

转载 python描述符和property

Python描述符简介 Python之美[从菜鸟到高手]–玩转描述符和属性 在说property之前,我们需要理解描述符,因为不管property还是classmethod都是构建在描述符的基础上,那么到底什么是描述符呢? 描述符,用一句话来说,就是将某种特殊类型的类的实例指派给另一个类的属性(注意:这里是类属性,而不是对象属性)。而这种特殊类型的类就是实现了get,set,delete的新式类

2015-09-04 18:03:18 554

原创 python包装和授权

首先了解什么是包装和授权。 我们知道,面向对象程序设计中有一个理念就是封装,而实际上面向对象也让程序员在使用一些类(自己定义或则别人定义)对象的时候非常方便。包装就是一个希望将某个对象(或类),进行重新打包,装换成另外一种更适合当前使用场合的对外接口。相似娱乐界对明星的包装一样,其实本质没有什么改变,只是表面变得更容易受当下人欢迎而已。用到程序编程中,就是将程序包装成,当前环境跟适合的样子(主要

2015-09-04 11:04:16 4087

原创 python重载运算符

class Time60(object): 'Time60 - trace hours and minutes' def __init__(self,h,m): 'constructor - takes hours and minutes' self.h=h self.m=m def __str__(self):

2015-09-03 20:45:20 538

高效awk编程

awk是一个强大的文本分析工具,相对于grep的查找,sed的编辑,awk在其对数据分析并生成报告时,显得尤为强大。简单来说awk就是把文件逐行的读入,以空格为默认分隔符将每行切片,切开的部分再进行各种分析处理。 awk有3个不同版本: awk、nawk和gawk,未作特别说明,一般指gawk,gawk 是 AWK 的 GNU 版本。 awk其名称得自于它的创始人 Alfred Aho 、Peter Weinberger 和 Brian Kernighan 姓氏的首个字母。实际上 AWK 的确拥有自己的语言: AWK 程序设计语言 , 三位创建者已将它正式定义为“样式扫描和处理语言”。它允许您创建简短的程序,这些程序读取输入文件、为数据排序、处理数据、对输入执行计算以及生成报表,还有无数其他的功能。

2018-06-03

hadoop-eclipse-plugin-2.7.2.jar

2016-03-19

空空如也

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

TA关注的人

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