- 博客(643)
- 收藏
- 关注
原创 《基于MFC的OpenGL编程》Part 4 Drawing Simple 3D objects
视见体Viewing Volume is nothing but the region of 3D Cartesian space in that will occupy the window. It is nothing but the minimum and maximum x, y and z values that are inside the window. So if a
2008-11-05 15:44:00 559
原创 《基于MFC的OpenGL编程》Part 3 Drawing Simple 2D Shapes
剪裁区域 In OpenGL when you create a window to draw in we must specify the coordinate system we want to use and how to map the specified coordinates into physical screen coordinates. We would be
2008-11-05 15:44:00 592
原创 《基于MFC的OpenGL编程》系列文章
1,《基于MFC的OpenGL编程》Part 1 A Primer2,《基于MFC的OpenGL编程》Part 2 Setting up OpenGL on Windows3,《基于MFC的OpenGL编程》Part 3 Drawing Simple 2D Shapes4,《基于MFC的OpenGL编程》Part 4 Drawing Simple 3D object
2008-11-05 10:44:00 1106
原创 《基于MFC的OpenGL编程》Part 2 Setting up OpenGL on Windows
源代码下载:OpenGL_ch2.rar WGL – Windows的 OpenGL扩展层 The WGL extension consists of a set of functions (wglCreateContext, wglDeleteContext etc.) and structures (such as PIXELFORMATDESCRIPTOR, GLYPHM
2008-11-04 21:44:00 737
原创 《基于MFC的OpenGL编程》Part 1 A Primer
3D图形学基本概念PerspectivePerspective refers to the angles between the lines that lend the illusion of three dimensions. Colors and ShadingMoving beyond line drawing, we need to add color to c
2008-11-04 21:44:00 652
原创 八皇后问题(牛人非递归版)
原文链接:《八皇后问题的非递归解法》 想不服都不行,实在是太牛的代码,诡异的算法思路,出神入化的STL技巧。。。Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include cmath>#include iostrea
2008-11-04 20:44:00 650
原创 2003年广东省赛试题1 奥斯卡奖
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include iostream>#include string>#include vector>#include algorithm>using names
2008-11-04 19:44:00 618
原创 2003年广东省赛试题3 国际象棋
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include iostream>#include string>#include cmath>using namespace std;enum TRes
2008-11-04 17:44:00 768
原创 ZOJ1002 Fire Net(非递归版)
以前用递归的回溯搜索思路做过一次,参见ZOJ1002 Fire Net(递归版),今天想着用非递归的方法试试看,呵呵,比我想象中要难啊,主要还是堆栈里究竟放什么,这一点上思路一直没理清。因此用了整整一天的时间,总算用非递归的方法把1002给AC掉了,在代码中我引入了堆栈层次的概念,模拟系统堆栈的行为,并且在搜索时加入了剪枝,但代码写得还是很烂,继续思考如何改进。Code hig
2008-11-02 16:44:00 724
原创 八皇后问题(非递归版)
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include iostream>#include stack>using namespace std;const int MAXSIZE = 8;//棋盘大小int che
2008-11-01 13:44:00 1474
原创 八皇后问题(递归版)
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->/** * @author phinecos * @since 2008/10/31 */class EightQueen{ static final int MA
2008-10-31 16:44:00 573
原创 ZOJ1090 The Circumference of the Circle
计算几何题,使用的数学公式参考http://topic.csdn.net/t/20050329/22/3892541.html Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include iostr
2008-10-31 10:44:00 658
原创 ZOJ1081 Points Within
计算几何问题,基本思想从要判断的点引一条射线看和多边形交点的个数,如果是奇数个,那么就在多边形内,否则在多边形外。先判断点是否在多边形边上的情况判掉,再判断线段相交。Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#in
2008-10-30 20:44:00 669
原创 ZOJ1078 Palindrom Numbers
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include iostream>#include stack>#include vector>using namespace std;bool IsPa
2008-10-30 18:44:00 602
原创 ZOJ 1074 To the Max
最大矩阵和问题,简单DPCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include iostream>#include limits>using namespace std;cons
2008-10-30 16:44:00 573
原创 ZOJ1025 Wooden Sticks
典型的贪心算法,和前面1029一样也是工作时间调度问题。Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include iostream>#include vector>#include algorithm>
2008-10-29 11:44:00 742
原创 ZOJ1029 Moving Tables
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include iostream>#include vector>#include algorithm> using namespace std;cons
2008-10-28 16:44:00 952
原创 ZOJ1061 Web Navigation
原始版本:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include iostream>#include stack>#include string>using namespace std;vo
2008-10-28 11:44:00 1086
原创 ZOJ1070 Bode Plot
简单的物理公式计算Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include iostream>#include cmath>#include iomanip>using namespace
2008-10-28 09:44:00 1300
原创 ZOJ1067 Color Me Less
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include iostream>#include cmath>#include limits>using namespace std;const int
2008-10-27 21:45:00 925
原创 ZOJ1072 Microprocessor Simulation
这道题我觉得加法这里比较难懂,和分成高字和低字,分别存放在寄存器A和B中。Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include iostream>using namespace std;
2008-10-27 20:45:00 696
原创 ZOJ1009 Enigma
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include iostream> #include string> using namespace std; int rotor[3][26];//密码表int rrou
2008-10-24 14:45:00 1069
原创 ZOJ1045&&1048
两道简单题,此外,1049有网友给出的计算公式是 Z=3.14*(x*x+y*y)/100.0+1.0,可惜我不明白其原理ZOJ1045 HangOverCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#includ
2008-10-23 21:45:00 1218
原创 ZOJ1051 A New Growth Industry
这道题就是读懂题目太费劲了,非要扯到什么DNA上去,其实就是简单的数组处理,和上下左右的加加,然后查表把所得值加到当前项上来,若越界则处理下。Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include iostre
2008-10-23 19:45:00 1678 1
原创 ZOJ1056 The Worm Turns
题目大意:整个游戏棋盘是50*50大小的,左上角在(1,1),贪吃蛇由20个节点组成,头部位置在(25,30),水平延展到(25,11),可以有四个运动方向:东,西,南,北。题目就是给你一个运动序列,判断最终结果是下面3种情况的哪一种:1)正常。2)头撞到自己身体。3)出界。Code highlighting produced by Actipro CodeHighlighte
2008-10-23 15:45:00 840
原创 ZOJ1057 Undercut
简单题,就是输出时注意格式问题:输出一行结果后需要加入一个空白行。Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include iostream>using namespace std;int
2008-10-23 14:45:00 787
原创 基于朴素贝叶斯分类器的文本分类算法(下)
源代码下载:NaviveBayesClassify.rar Preface文本的分类和聚类是一个比较有意思的话题,我以前也写过一篇blog《基于K-Means的文本聚类算法》,加上最近读了几本数据挖掘和机器学习的书籍,因此很想写点东西来记录下学习的所得。在本文的上半部分《基于朴素贝叶斯分类器的文本分类算法(上)》一文中简单介绍了贝叶斯学习的基本理论,这一篇将展示如何将该理
2008-10-21 16:45:00 2761 1
原创 基于朴素贝叶斯分类器的文本分类算法(上)
转载请保留作者信息:作者:phinecos(洞庭散人)Blog:http://phinecos.cnblogs.com/Email:[email protected] Preface 本文缘起于最近在读的一本书-- Tom M.Mitchell的《机器学习》,书中第6章详细讲解了贝叶斯学习的理论知识,为了将其应用到实际中来,参考了网上许多资料,从而得此文
2008-10-21 14:45:00 3359 2
原创 Winpcap网络开发库入门
Winpcap是一个强大的网络开发库,可以实现许多功能:获取可用的网络适配器;获取指定适配器信息(比如名称和描述信息);捕获指定网卡的数据封包;发送数据封包;过滤捕获的包以获取特定包等。 首先到http://www.winpcap.org/install/default.htm下载安装winpcap 驱动和DLL组件。
2008-10-20 16:45:00 1477
原创 人工神经网络之反向传播算法
都说《机器学习》是学计算机的人必须要看的一本书,确实不是浪得虚名。看了一章人工神经网络(ANN)中关于反向传播算法的内容,相比单个感知器而言,采用多层网络的反向传播算法能表示出更多种类的非线性曲面,下面总结下它基本的处理框架。ANN核心数据结构:typedef struct { int input_n; /* number of
2008-10-18 21:45:00 3309
原创 工作小结
1,Win2000下动态加载DLL时遇到一个奇怪的问题,CString sdkPath = _T("C://WINDOWS//system32"); ::SetCurrentDirectory(sdkPath); handle = ::LoadLibrary(_T("C://WINDOWS//system32//termb.dll")); if (handle ==
2008-10-10 17:45:00 780
原创 Base64编解码(C++版)
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include string>using namespace std;class ZBase64{public: /*编码 DataByte [in]输入的数据长度,以
2008-10-10 16:45:00 920
原创 重装系统遇到的一个问题
国庆回家休息了几天,家里电脑是我本科时用的,最近出现一个奇怪的问题,xp系统无法进入,而且重装系统时总是会报错: Anunexpected error(0) occurred at line 17763 in d:/xpsprtm/base/boot/setup/arcdisp.c.系统没有报警连续长鸣,应该不是内存条松动的原因,硬盘没有出现什么异常情况,用工具软件检查后也没有发现
2008-10-10 16:45:00 574
原创 Ajax数据传输的一个问题
问题:用ajax从前台页面传字符串变量给服务器端,想传的内容是abc+,但接收以后用System.out.println()输出是abc空格。原因:url中有些字符被转义,比如空格被编码成加号,于是传的参数明明是加号,获取的值却成了空格。如何解决呢?如果是通过url传递参数,应该对其进行必要的编码。解决办法:在客户端加入下述代码先进行编码:function URLencod
2008-09-24 10:45:00 636
原创 图片数据Base64编解码(java实现)
package com.vista.test;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.IOException;import java.io.InputStream;import java.io.OutputStream;import sun.misc.BASE64Decode
2008-09-23 17:45:00 2114
原创 ZOJ1005 Jugs
Normal 0 7.8 磅 0 2 false false false MicrosoftInternetExplorer4 <!-- /* F
2008-09-21 21:45:00 892
原创 ZOJ1003 Crashing Balloon
Normal 0 7.8 磅 0 2 false false false MicrosoftInternetExplorer4 <!-- /* F
2008-09-18 12:45:00 852
原创 ZOJ1002 Fire Net(递归版)
代码:#includeiostream>using namespace std;char map[4][4];// 地图int maxNum,n;bool CanPut(int row, int col){//测试是否可以放置碉堡到row行col列处,因为位置是从小到大前进的,因此只需要测试比待测试点小的位置 int i; //测试c
2008-09-18 09:45:00 819
原创 ZOJ1109 Language of FatMouse
Normal 0 7.8 磅 0 2 false false false MicrosoftInternetExplorer4 <!-- /* F
2008-09-17 21:46:00 1212
原创 工作小结
Normal 0 7.8 磅 0 2 false false false MicrosoftInternetExplorer4 <!-- /* F
2008-09-17 20:46:00 611
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人