摘要:
Bilinear image scaling is about the same as nearest neighbor image scaling except with interpolation. Instead of copying the neighboring pixels (which often results in jaggy image), interpolation technique based on surrounding pixels is used to produce much smoother scaling. Although bilinear scal.. 阅读全文
posted @ 2013-09-02 19:11
pangbangb
阅读(975)
评论(0)
推荐(0)
摘要:
1. stack(栈) 后进先出,不支持迭代器,有push()方法,pop()剔除最顶元素,top()返回最顶端的元素#include#include#includeusing namespace std;int main(){ stack s; for(int i=1;i#include#includeusing namespace std;int main(){ queue q; for(int i=0;i#include#includeusing namespace std;int main(){ deque q; for(int i=0;i::iterator iter=q.begin 阅读全文
posted @ 2013-09-02 19:09
pangbangb
阅读(309)
评论(0)
推荐(0)
摘要:
本节主要讲八皇后问题的基本规则和递归回溯算法的实现以及具体的代码实现和代码分析。转载请注明出处。http://write.blog.csdn.net/postedit/10813257一、八皇后问题和递归回溯算法1.八皇后是一个递归回溯算法的典型问题,问题的由来是这样的,在国际象棋中有8*8个位置,那么我们有8个皇后,我们要把8个皇后分别放在不同的行,不同的列和不同的对角线上,也就是说我们要让这8个皇后不能相互攻击。2.八皇后问题最好的解决办法是回溯算法,回溯算法的基本思路如下:①从问题的某一状态出发,搜索可以到达所有状态②当某个状态到达后,可向前回退,并继续搜索其他可达状态③当所有状态都到达 阅读全文
posted @ 2013-09-02 19:07
pangbangb
阅读(2182)
评论(0)
推荐(0)
摘要:
Problem Description 都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。由于gameboy平时老呆在房间里玩游戏,虽然在游戏中是个身手敏捷的高手,但在现实中运动神经特别迟钝,每秒种只有在移动不超过一米的范围内接住坠落的馅饼。现在给这条小径如图标上坐标: 为了使问题简化,假设在接下来的一段时间里,馅饼都掉落在0-1... 阅读全文
posted @ 2013-09-02 19:04
pangbangb
阅读(185)
评论(0)
推荐(0)
摘要:
今天又看了一遍淘宝平四分享的PPT,以前转载网址:http://blog.sina.com.cn/s/blog_995c1f6301017fd2.html 阅读全文
posted @ 2013-09-02 19:02
pangbangb
阅读(317)
评论(0)
推荐(0)
摘要:
ogre自带了一些例子,逐个过一遍并自己动手做一些调整1 Sample_BezierPatch:这个例子直接用数值来构造顶点缓存并创建entity,这种方法一般只能创建简单对象,本人以为复杂对象顶点位置与纹理的数据除非是可以通过什么插件或者用max script等程序方式来创建并导出。核心代码如下,不做过多分析:PatchVertex verts[9] = { {-50, -35, -50, -0.5, 0.5, 0.0, 0.0, 0.0}, { 0, 0, -50, 0.0, 0.5, 0.0, 0.5, 0.0}, { 50, 35, -50, 0.5, 0.5, 0.0, 1.0, 0 阅读全文
posted @ 2013-09-02 19:00
pangbangb
阅读(420)
评论(0)
推荐(0)
摘要:
我顺便明白了。。。。英文题意理解其实好大一部分还是靠感觉,然后自己猜题意,试题意。你要是纠结于英文你就跪了。#include #include #include #include #include using namespace std;typedef long long LL;const int maxn=50005;const LL INF=6000000000;bool vis[maxn*2];int a[maxn*2],u[maxn*2],v[maxn*2],w[maxn*2],cost[maxn*2],first[maxn*2],next[maxn*2];LL d[maxn];int 阅读全文
posted @ 2013-09-02 18:58
pangbangb
阅读(163)
评论(0)
推荐(0)
摘要:
首先像下面的一页pdf,如果想把它分成两页,每一页只是一个ppt页面(为了在kindle里读比较方便), 那么可以首先用A-pdf page cut, 将pdf 切成这样12个部分 然后我们现在要的只是第5和第8部分。 如何实现只要弟5和第8部分呢,A-pdf page cut并没有提供选项给我们,选着需要留下的部分。不过linux下有个神器,pdftk可以完成这个任务。首先将文件每个分成一页一个文件命令是:pdftk mydoc.pdf burst然后我们只需要选着page number%12 == [5,8]的那些页面就符合要求了。 然后再将这些页面合在一起。合并的命令如下:pdftk.. 阅读全文
posted @ 2013-09-02 18:55
pangbangb
阅读(872)
评论(0)
推荐(0)
摘要:
今天在BT下安装了Nessus,好不容易安装好了,注册成功,本以为大功告成,但是在最后关头,却出现一个“未安装flash插件”错误,在bT下尝试着安装flahs插件,蛋碎一地,,,没能解决。我的BT环境为BT_R3 64位,查看了一下bt自带的firefox版本为32位的。 然而在bt中下载自动下载flash插件式根据系统版本来选择,所以默认都是下载64位的flash。对32位的firefox 不起作用,解决办法为:下载“install_flash_player_11_linux.i386.tar.gz”, 然后使用 tar -zvxf install_flash_player_linux.. 阅读全文
posted @ 2013-09-02 18:53
pangbangb
阅读(159)
评论(0)
推荐(0)
摘要:
package com.lucene.test;import java.io.File;import java.io.FileReader;import java.io.IOException;import java.util.Date;import org.apache.log4j.Logger;import org.apache.lucene.analysis.standard.StandardAnalyzer;import org.apache.lucene.document.Document;import org.apache.lucene.document.Field.Store;i 阅读全文
posted @ 2013-09-02 18:51
pangbangb
阅读(308)
评论(0)
推荐(0)

浙公网安备 33010602011771号