函数指针,顾名思义,指向函数的指针。 C++中函数指针的声明形式为: void (*pfn)() C++中函数指针的赋值:pfn=funName 或 &funName C++中函数指针的使用:pfn() 或(*fun)() 看到了上面的赋值跟使用的时候,我们不禁会产生疑问,为什么指针的...
分类:
其他好文 时间:
2015-02-15 14:58:42
阅读次数:
125
一、算法
高斯模糊算法 详见:高斯模糊,基本思想就是利用高斯函数,将一个坐标点的所有邻域的加权平均值设置为这些点的颜色值。
中值滤波算法就更简单了:将一个坐标点的所有邻域的平均值设置为这些点的像素值。
二、算法的代码实现
高斯函数:
使用宏定义来替换:
#define PI 3.1415926
//高斯模糊函数
#define GAUSS_FUN(x, y) (exp(-(x*x)...
分类:
编程语言 时间:
2015-02-14 17:34:16
阅读次数:
270
#include "StdAfx.h"#include "LuaEx.h"lua_State *L=NULL;CFun Lua_Fun;CLuaEx::CLuaEx(void){}CLuaEx::~CLuaEx(void){}static int Lua_Xun(lua_State *L){ ...
分类:
其他好文 时间:
2015-02-12 20:02:05
阅读次数:
195
JavaScript技巧篇:1》状态机 var state = function () { this.count = 0; this.fun = null; this.nowcount = 0; ...
分类:
编程语言 时间:
2015-02-12 16:01:42
阅读次数:
169
原文:JavaScript技巧&写法JavaScript技巧篇: 1》状态机 var state = function () { this.count = 0; this.fun = null; this.nowcount = 0; }; ...
分类:
编程语言 时间:
2015-02-12 15:26:01
阅读次数:
192
项目中 Business层,大多数代码都是public static fun(string xx) 这样的代码,没有接口。AOP 对象都是依赖于接口的,对于这种无接口的类有没有办法AOP。 答案有肯定的。可以用PostSharp。 AOP 依赖接口的我称之为动态AOP,编译时(MSI...
分类:
其他好文 时间:
2015-02-11 16:19:36
阅读次数:
302
UVA - 11437
Triangle Fun
Time Limit: 1000MS
Memory Limit: Unknown
64bit IO Format: %lld & %llu
Submit Status
Description
Problem A
Triangle Fun
Input: Standard Input
...
分类:
其他好文 时间:
2015-02-10 23:18:33
阅读次数:
534
注:原文http://www.2cto.com/kf/201406/307790.html这里作为学习,写在这里在面向对象的方式编写js脚本时,定义实例的方法主要有两种:this.XXX = function()P{ 和 function.prototype.XXX= function(){}fun...
分类:
编程语言 时间:
2015-02-10 18:12:25
阅读次数:
164
(function($){$.extend({BE:function(opt){vardef={id:null,type:null,fun:null}$.extend({},opt,def);$(document).delegate(opt.id,opt.type,opt.fun);}});})(j...
分类:
其他好文 时间:
2015-02-10 13:03:59
阅读次数:
109
http://poj.org/problem?id=3187
/*总结:头文件#include ,
next_permutation(num,num+n)生成数组num的全排列,
*/
#include
#include
using namespace std;
int fun(int *num,int n)
{
int num1[10];//不能直接使用num操作,涉及内存管理,需要用替...
分类:
其他好文 时间:
2015-02-10 11:18:36
阅读次数:
234