一般的讲数字信号处理的书中都会提到窗函数。大多数只会提及其中的几种。这里我把这些窗都用C语言实现了一下,都不复杂,但如果要自己去弄也挺费时间。所有函数都用Matlab验证了。包括以下窗:

 /*窗类型*/
typedef enum
{
Bartlett = ,
BartLettHann,
BlackMan,
BlackManHarris,
Bohman,
Chebyshev,
FlatTop,
Gaussian,
Hamming,
Hann,
Kaiser,
Nuttal,
Parzen,
Rectangular,
Taylor,
Triangular,
Tukey
}winType;

别的不多说了,直接上干货。

 /*
*file WindowFunction.h
*author Vincent Cui
*e-mail whcui1987@163.com
*version 0.3
*data 31-Oct-2014
*brief 各种窗函数的C语言实现
*/ #ifndef _WINDOWFUNCTION_H_
#define _WINDOWFUNCTION_H_ #include "GeneralConfig.h" #define BESSELI_K_LENGTH 10 #define FLATTOPWIN_A0 0.215578995
#define FLATTOPWIN_A1 0.41663158
#define FLATTOPWIN_A2 0.277263158
#define FLATTOPWIN_A3 0.083578947
#define FLATTOPWIN_A4 0.006947368 #define NUTTALL_A0 0.3635819
#define NUTTALL_A1 0.4891775
#define NUTTALL_A2 0.1365995
#define NUTTALL_A3 0.0106411 #define BLACKMANHARRIS_A0 0.35875
#define BLACKMANHARRIS_A1 0.48829
#define BLACKMANHARRIS_A2 0.14128
#define BLACKMANHARRIS_A3 0.01168 dspErrorStatus taylorWin(dspUint_16 N, dspUint_16 nbar, dspDouble sll, dspDouble **w);
dspErrorStatus triangularWin(dspUint_16 N, dspDouble **w);
dspErrorStatus tukeyWin(dspUint_16 N, dspDouble r, dspDouble **w);
dspErrorStatus bartlettWin(dspUint_16 N, dspDouble **w);
dspErrorStatus bartLettHannWin(dspUint_16 N, dspDouble **w);
dspErrorStatus blackManWin(dspUint_16 N, dspDouble **w);
dspErrorStatus blackManHarrisWin(dspUint_16 N, dspDouble **w);
dspErrorStatus bohmanWin(dspUint_16 N, dspDouble **w);
dspErrorStatus chebyshevWin(dspUint_16 N, dspDouble r, dspDouble **w);
dspErrorStatus flatTopWin(dspUint_16 N, dspDouble **w);
dspErrorStatus gaussianWin(dspUint_16 N, dspDouble alpha, dspDouble **w);
dspErrorStatus hammingWin(dspUint_16 N, dspDouble **w);
dspErrorStatus hannWin(dspUint_16 N, dspDouble **w);
dspErrorStatus kaiserWin(dspUint_16 N, dspDouble beta, dspDouble **w);
dspErrorStatus nuttalWin(dspUint_16 N, dspDouble **w);
dspErrorStatus parzenWin(dspUint_16 N, dspDouble **w);
dspErrorStatus rectangularWin(dspUint_16 N, dspDouble **w); #endif

WindowFunction.h

 /*
*file WindowFunction.c
*author Vincent Cui
*e-mail whcui1987@163.com
*version 0.3
*data 31-Oct-2014
*brief 各种窗函数的C语言实现
*/ #include "WindowFunction.h"
#include "GeneralConfig.h"
#include "MathReplenish.h"
#include "math.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h> /*函数名:taylorWin
*说明:计算泰勒窗。泰勒加权函数
*输入:
*输出:
*返回:
*调用:prod()连乘函数
*其它:用过以后,需要手动释放掉*w的内存空间
* 调用示例:ret = taylorWin(99, 4, 40, &w); 注意此处的40是正数 表示-40dB
*/
dspErrorStatus taylorWin(dspUint_16 N, dspUint_16 nbar, dspDouble sll, dspDouble **w)
{
dspDouble A;
dspDouble *retDspDouble;
dspDouble *sf;
dspDouble *result;
dspDouble alpha,beta,theta;
dspUint_16 i,j; /*A = R cosh(PI, A) = R*/
A = (dspDouble)acosh(pow((dspDouble)10.0,(dspDouble)sll/20.0)) / PI;
A = A * A; /*开出存放系数的空间*/
retDspDouble = (dspDouble *)malloc(sizeof(dspDouble) * (nbar - ));
if(retDspDouble == NULL)
return DSP_ERROR;
sf = retDspDouble; /*开出存放系数的空间*/
retDspDouble = (dspDouble *)malloc(sizeof(dspDouble) * N);
if(retDspDouble == NULL)
return DSP_ERROR;
result = retDspDouble; alpha = prod(, , (nbar - ));
alpha *= alpha;
beta = (dspDouble)nbar / sqrt( A + pow((nbar - 0.5), ) );
for(i = ; i <= (nbar - ); i++)
{
*(sf + i - ) = prod(,,(nbar - + i)) * prod(,,(nbar - - i));
theta = ;
for(j = ; j <= (nbar - ); j++)
{
theta *= - (dspDouble)(i * i) / ( beta * beta * ( A + (j - 0.5) * (j - 0.5)) );
}
*(sf + i - ) = alpha * (dspDouble)theta / (*(sf + i - ));
} /*奇数阶*/
if((N % ) == )
{
for(i = ; i < N; i++)
{
alpha = ;
for(j = ; j <= (nbar - ); j++)
{
alpha += (*(sf + j - )) * cos( * PI * j * (dspDouble)(i - ((N-)/))/N );
}
*(result + i) = + * alpha;
}
}
/*偶数阶*/
else
{
for(i = ; i < N; i++)
{
alpha = ;
for(j = ; j <= (nbar - ); j++)
{
alpha += (*(sf + j - )) * cos( PI * j * (dspDouble)( * (i - (N/)) + ) / N );
}
*(result + i) = + * alpha; }
}
*w = result;
free(sf); return DSP_SUCESS; } /*
*函数名:triangularWin
*说明:计算三角窗函数
*输入:
*输出:
*返回:
*调用:
*其它:用过以后,需要手动释放掉*w的内存空间
* 调用示例:ret = triangularWin(99, &w);
*/
dspErrorStatus triangularWin(dspUint_16 N, dspDouble **w)
{
dspDouble *ptr;
dspUint_16 i; ptr = (dspDouble *)malloc(N * sizeof(dspDouble));
if(ptr == NULL)
return DSP_ERROR; /*阶数为奇*/
if((N % ) == )
{
for(i = ; i < ((N - )/); i++)
{
*(ptr + i) = * (dspDouble)(i + ) / (N + );
}
for(i = ((N - )/); i < N; i++)
{
*(ptr + i) = * (dspDouble)(N - i) / (N + );
}
}
/*阶数为偶*/
else
{
for(i = ; i < (N/); i++)
{
*(ptr + i) = (i + i + ) * (dspDouble) / N;
}
for(i = (N/); i < N; i++)
{
*(ptr + i) = *(ptr + N - - i);
}
}
*w = ptr; return DSP_SUCESS;
} /*
*函数名:tukeyWin
*说明:计算tukey窗函数
*输入:
*输出:
*返回:linSpace()
*调用:
*其它:用过以后,需要手动释放掉*w的内存空间
* 调用示例:ret = tukeyWin(99, 0.5, &w);
*/
dspErrorStatus tukeyWin(dspUint_16 N, dspDouble r, dspDouble **w)
{
dspErrorStatus retErrorStatus;
dspUint_16 index;
dspDouble *x,*result,*retPtr;
dspDouble alpha; retErrorStatus = linSpace(, , N, &x);
if(retErrorStatus == DSP_ERROR)
return DSP_ERROR; result = (dspDouble *)malloc(N * sizeof(dspDouble));
if(result == NULL)
return DSP_ERROR; /*r <= 0 就是矩形窗*/
if(r <= )
{
retErrorStatus = rectangularWin(N, &retPtr);
if(retErrorStatus == DSP_ERROR)
return DSP_ERROR;
/*将数据拷出来以后,释放调用的窗函数的空间*/
memcpy(result, retPtr, ( N * sizeof(dspDouble)));
free(retPtr);
}
/*r >= 1 就是汉宁窗*/
else if(r >= )
{
retErrorStatus = hannWin(N, &retPtr);
if(retErrorStatus == DSP_ERROR)
return DSP_ERROR;
/*将数据拷出来以后,释放调用的窗函数的空间*/
memcpy(result, retPtr, ( N * sizeof(dspDouble)));
free(retPtr);
}
else
{
for(index = ; index < N; index++)
{
alpha = *(x + index);
if(alpha < (r/))
{
*(result + index) = (dspDouble)( + cos( * PI * (dspDouble)(alpha - (dspDouble)r/)/r))/;
}
else if((alpha >= (r/)) && (alpha <( - r/)))
{
*(result + index) = ;
}
else
{
*(result + index) = (dspDouble)( + cos( * PI * (dspDouble)(alpha - + (dspDouble)r/)/r))/;
} }
} free(x); *w = result; return DSP_SUCESS; } /*
*函数名:bartlettWin
*说明:计算bartlettWin窗函数
*输入:
*输出:
*返回:
*调用:
*其它:用过以后,需要手动释放掉*w的内存空间
* 调用示例:ret = bartlettWin(99, &w);
*/
dspErrorStatus bartlettWin(dspUint_16 N, dspDouble **w)
{
dspDouble *ret;
dspUint_16 n; ret = (dspDouble *)malloc(N * sizeof(dspDouble));
if(ret == NULL)
return DSP_ERROR; for(n = ; n < ( N - ) / ; n++)
{
*(ret + n) = * (dspDouble)n / (N - );
} for(n = ( N - ) / ; n < N; n++)
{
*(ret + n) = - * (dspDouble)n / (( N - ));
} *w = ret; return DSP_SUCESS;
} /*
*函数名:bartLettHannWin
*说明:计算bartLettHannWin窗函数
*输入:
*输出:
*返回:
*调用:
*其它:用过以后,需要手动释放掉*w的内存空间
* 调用示例:ret = bartLettHannWin(99, &w);
*/
dspErrorStatus bartLettHannWin(dspUint_16 N, dspDouble **w)
{
dspUint_16 n;
dspDouble *ret; ret = (dspDouble *)malloc(N * sizeof(dspDouble));
if(ret == NULL)
return DSP_ERROR;
/*奇*/
if(( N % ) == )
{
for(n = ; n < N; n++)
{
*(ret + n) = 0.62 - 0.48 * myAbs( ( (dspDouble)n / ( N - ) ) - 0.5 ) + 0.38 * cos( * PI * ( ((dspDouble)n / ( N - ) ) - 0.5 ) );
}
for(n = ; n < (N-)/; n++)
{
*(ret + n) = *(ret + N - - n);
}
}
/*偶*/
else
{
for(n = ; n < N; n++)
{
*(ret + n) = 0.62 - 0.48 * myAbs( ( (dspDouble)n / ( N - ) ) - 0.5 ) + 0.38 * cos( * PI * ( ((dspDouble)n / ( N - ) ) - 0.5 ) );
}
for(n = ; n < N/; n++)
{
*(ret + n) = *(ret + N - - n);
}
} *w = ret; return DSP_SUCESS; } /*
*函数名:blackManWin
*说明:计算blackManWin窗函数
*输入:
*输出:
*返回:
*调用:
*其它:用过以后,需要手动释放掉*w的内存空间
* 调用示例:ret = blackManWin(99, &w);
*/
dspErrorStatus blackManWin(dspUint_16 N, dspDouble **w)
{
dspUint_16 n;
dspDouble *ret;
ret = (dspDouble *)malloc(N * sizeof(dspDouble));
if(ret == NULL)
return DSP_ERROR; for(n = ; n < N; n++)
{
*(ret + n) = 0.42 - 0.5 * cos( * PI * (dspDouble)n / ( N - )) + 0.08 * cos( * PI * ( dspDouble )n / ( N - ) );
} *w = ret; return DSP_SUCESS;
} /*
*函数名:blackManHarrisWin
*说明:计算blackManHarrisWin窗函数
*输入:
*输出:
*返回:
*调用:
*其它:用过以后,需要手动释放掉*w的内存空间
* 调用示例:ret = blackManHarrisWin(99, &w);
* minimum 4-term Blackman-harris window -- From Matlab
*/
dspErrorStatus blackManHarrisWin(dspUint_16 N, dspDouble **w)
{
dspUint_16 n;
dspDouble *ret; ret = (dspDouble *)malloc(N * sizeof(dspDouble));
if(ret == NULL)
return DSP_ERROR; for(n = ; n < N; n++)
{
*(ret + n) = BLACKMANHARRIS_A0 - BLACKMANHARRIS_A1 * cos( * PI * (dspDouble)n / (N) ) + \
BLACKMANHARRIS_A2 * cos( * PI * (dspDouble)n/ (N) ) - \
BLACKMANHARRIS_A3 * cos( * PI * (dspDouble)n/ (N) );
} *w = ret; return DSP_SUCESS;
} /*
*函数名:bohmanWin
*说明:计算bohmanWin窗函数
*输入:
*输出:
*返回:
*调用:
*其它:用过以后,需要手动释放掉*w的内存空间
* 调用示例:ret = bohmanWin(99, &w);
*/
dspErrorStatus bohmanWin(dspUint_16 N, dspDouble **w)
{
dspUint_16 n;
dspDouble *ret;
dspDouble x;
ret = (dspDouble *)malloc(N * sizeof(dspDouble));
if(ret == NULL)
return DSP_ERROR; for(n = ; n < N; n++)
{
x = - + n * (dspDouble) / ( N - ) ;
/*取绝对值*/
x = x >= ? x : ( x * ( - ) );
*(ret + n) = ( - x ) * cos( PI * x) + (dspDouble)( / PI) * sin( PI * x);
} *w = ret; return DSP_SUCESS;
} /*
*函数名:chebyshevWin
*说明:计算chebyshevWin窗函数
*输入:
*输出:
*返回:
*调用:
*其它:用过以后,需要手动释放掉*w的内存空间
* 调用示例:ret = chebyshevWin(99,100, &w);
*/
dspErrorStatus chebyshevWin(dspUint_16 N, dspDouble r, dspDouble **w)
{
dspUint_16 n,index;
dspDouble *ret;
dspDouble x, alpha, beta, theta, gama; ret = (dspDouble *)malloc(N * sizeof(dspDouble));
if(ret == NULL)
return DSP_ERROR; /*10^(r/20)*/
theta = pow((dspDouble), (dspDouble)(myAbs(r)/));
beta = pow(cosh(acosh(theta)/(N - )),);
alpha = - (dspDouble) / beta; if((N % ) == )
{
/*计算一半的区间*/
for( n = ; n < ( N + ) / ; n++ )
{
gama = ;
for(index = ; index < n; index++)
{
x = index * (dspDouble)( N - - * n + index) /(( n - index ) * (n + -index));
gama = gama * alpha * x + ;
}
*(ret + n) = (N - ) * alpha * gama;
} theta = *( ret + (N - )/ );
*ret = ; for(n = ; n < ( N + ) / ; n++ )
{
*(ret + n) = (dspDouble)(*(ret + n)) / theta;
} /*填充另一半*/
for(; n < N; n++)
{
*(ret + n) = ret[N - n - ];
}
}
else
{
/*计算一半的区间*/
for( n = ; n < ( N + ) / ; n++ )
{
gama = ;
for(index = ; index < n; index++)
{
x = index * (dspDouble)( N - - * n + index) /(( n - index ) * (n + -index));
gama = gama * alpha * x + ;
}
*(ret + n) = (N - ) * alpha * gama;
} theta = *( ret + (N/) - );
*ret = ; for(n = ; n < ( N + ) / ; n++ )
{
*(ret + n) = (dspDouble)(*(ret + n)) / theta;
} /*填充另一半*/
for(; n < N; n++)
{
*(ret + n) = ret[N - n - ];
}
} *w = ret; return DSP_SUCESS;
} /*
*函数名:flatTopWin
*说明:计算flatTopWin窗函数
*输入:
*输出:
*返回:
*调用:
*其它:用过以后,需要手动释放掉*w的内存空间
* 调用示例:ret = flatTopWin(99, &w);
*/
dspErrorStatus flatTopWin(dspUint_16 N, dspDouble **w)
{
dspUint_16 n;
dspDouble *ret;
ret = (dspDouble *)malloc(N * sizeof(dspDouble));
if(ret == NULL)
return DSP_ERROR; for(n = ; n < N; n++)
{
*(ret + n) = FLATTOPWIN_A0 - FLATTOPWIN_A1 * cos( * PI * (dspDouble)n / (N - )) +\
FLATTOPWIN_A2 * cos( * PI * (dspDouble)n / (N - )) -\
FLATTOPWIN_A3 * cos( * PI * (dspDouble)n / (N - )) +\
FLATTOPWIN_A4 * cos( * PI * (dspDouble)n / (N - ));
} *w = ret; return DSP_SUCESS;
} /*
*函数名:gaussianWin
*说明:计算gaussianWin窗函数
*输入:
*输出:
*返回:
*调用:
*其它:用过以后,需要手动释放掉*w的内存空间
* 调用示例:ret = gaussianWin(99,2.5, &w);
*/
dspErrorStatus gaussianWin(dspUint_16 N, dspDouble alpha, dspDouble **w)
{
dspUint_16 n;
dspDouble k, beta, theta;
dspDouble *ret; ret = (dspDouble *)malloc(N * sizeof(dspDouble));
if(ret == NULL)
return DSP_ERROR; for(n =; n < N; n++)
{
if((N % ) == )
{
k = n - (N - )/;
beta = * alpha * (dspDouble)k / (N - );
}
else
{
k = n - (N)/;
beta = * alpha * (dspDouble)k / (N - );
} theta = pow(beta, );
*(ret + n) = exp((-) * (dspDouble)theta / );
} *w = ret; return DSP_SUCESS;
} /*
*函数名:hammingWin
*说明:计算hammingWin窗函数
*输入:
*输出:
*返回:
*调用:
*其它:用过以后,需要手动释放掉*w的内存空间
* 调用示例:ret = hammingWin(99, &w);
*/
dspErrorStatus hammingWin(dspUint_16 N, dspDouble **w)
{
dspUint_16 n;
dspDouble *ret;
ret = (dspDouble *)malloc(N * sizeof(dspDouble));
if(ret == NULL)
return DSP_ERROR; for(n = ; n < N; n++)
{
*(ret + n) = 0.54 - 0.46 * cos ( * PI * ( dspDouble )n / ( N - ) );
} *w = ret; return DSP_SUCESS;
} /*
*函数名:hannWin
*说明:计算hannWin窗函数
*输入:
*输出:
*返回:
*调用:
*其它:用过以后,需要手动释放掉*w的内存空间
* 调用示例:ret = hannWin(99, &w);
*/
dspErrorStatus hannWin(dspUint_16 N, dspDouble **w)
{
dspUint_16 n;
dspDouble *ret;
ret = (dspDouble *)malloc(N * sizeof(dspDouble));
if(ret == NULL)
return DSP_ERROR; for(n = ; n < N; n++)
{
*(ret + n) = 0.5 * ( - cos( * PI * (dspDouble)n / (N - )));
} *w = ret; return DSP_SUCESS;
} /*
*函数名:kaiserWin
*说明:计算kaiserWin窗函数
*输入:
*输出:
*返回:
*调用:besseli()第一类修正贝塞尔函数
*其它:用过以后,需要手动释放掉*w的内存空间
* 调用示例:ret = kaiserWin(99, 5, &w);
*/
dspErrorStatus kaiserWin(dspUint_16 N, dspDouble beta, dspDouble **w)
{
dspUint_16 n;
dspDouble *ret;
dspDouble theta; ret = (dspDouble *)malloc(N * sizeof(dspDouble));
if(ret == NULL)
return DSP_ERROR; for(n = ; n < N; n++)
{
theta = beta * sqrt( - pow( ( ( * (dspDouble)n/(N -)) - ), ) );
*(ret + n) = (dspDouble)besseli(, theta, BESSELI_K_LENGTH) / besseli(, beta, BESSELI_K_LENGTH);
} *w = ret; return DSP_SUCESS;
} /*
*函数名:nuttalWin
*说明:计算nuttalWin窗函数
*输入:
*输出:
*返回:
*调用:
*其它:用过以后,需要手动释放掉*w的内存空间
* 调用示例:ret = nuttalWin(99, &w);
*/
dspErrorStatus nuttalWin(dspUint_16 N, dspDouble **w)
{
dspUint_16 n;
dspDouble *ret; ret = (dspDouble *)malloc(N * sizeof(dspDouble));
if(ret == NULL)
return DSP_ERROR; for(n = ; n < N; n++)
{
*(ret + n) =NUTTALL_A0 - NUTTALL_A1 * cos( * PI * (dspDouble)n / (N - )) +\
NUTTALL_A2 * cos( * PI * (dspDouble)n / (N - )) -\
NUTTALL_A3 * cos( * PI * (dspDouble)n / (N - )); } *w = ret; return DSP_SUCESS;
} /*
*函数名:parzenWin
*说明:计算parzenWin窗函数
*输入:
*输出:
*返回:
*调用:
*其它:用过以后,需要手动释放掉*w的内存空间
* 调用示例:ret = parzenWin(99, &w);
*/
dspErrorStatus parzenWin(dspUint_16 N, dspDouble **w)
{
dspUint_16 n;
dspDouble *ret;
dspDouble alpha,k; ret = (dspDouble *)malloc(N * sizeof(dspDouble));
if(ret == NULL)
return DSP_ERROR; if(( N % ) == )
{
for(n = ; n < N; n++)
{
k = n - (N - ) / ;
alpha = * (dspDouble)myAbs(k) / N;
if(myAbs(k) <= (N - ) / )
{
*(ret + n) = - * pow(alpha,) + * pow(alpha, );
}
else
{
*(ret + n) = * pow( ( - alpha), );
} }
}
else
{
for(n = ; n < N; n++)
{
k = n - (N - ) / ;
alpha = * (dspDouble)myAbs(k) / N;
if(myAbs(k) <= (dspDouble)(N -) / )
{
*(ret + n) = - * pow(alpha,) + * pow(alpha, );
}
else
{
*(ret + n) = * pow( ( - alpha), );
} }
} *w = ret; return DSP_SUCESS;
} /*
*函数名:rectangularWin
*说明:计算rectangularWin窗函数
*输入:
*输出:
*返回:
*调用:
*其它:用过以后,需要手动释放掉*w的内存空间
* 调用示例:ret = rectangularWin(99, &w);
*/
dspErrorStatus rectangularWin(dspUint_16 N, dspDouble **w)
{
dspUint_16 n;
dspDouble *ret; ret = (dspDouble *)malloc(N * sizeof(dspDouble));
if(ret == NULL)
return DSP_ERROR; for(n = ; n < N; n++)
{
*(ret + n) = ;
} *w = ret; return DSP_SUCESS;
}

WindowFunction.c

欢迎多交流!

窗函数的C语言实现的更多相关文章

  1. 单位冲击响应与频响以及FIR实现代码(C语言)(转)

    源:FIR数字滤波器C语言 1.单位冲击响应与频响 就如同之前所说的一样,使用下图所示的单位冲击响应,所设计的滤波器,是无法实现的. 现在,让我们看看其这个滤波器的频响.所谓频响,就是计算其单位冲击响 ...

  2. C语言 · 高精度加法

    问题描述 输入两个整数a和b,输出这两个整数的和.a和b都不超过100位. 算法描述 由于a和b都比较大,所以不能直接使用语言中的标准数据类型来存储.对于这种问题,一般使用数组来处理. 定义一个数组A ...

  3. Windows server 2012 添加中文语言包(英文转为中文)(离线)

    Windows server 2012 添加中文语言包(英文转为中文)(离线) 相关资料: 公司环境:亚马孙aws虚拟机 英文版Windows2012 中文SQL Server2012安装包,需要安装 ...

  4. iOS开发系列--Swift语言

    概述 Swift是苹果2014年推出的全新的编程语言,它继承了C语言.ObjC的特性,且克服了C语言的兼容性问题.Swift发展过程中不仅保留了ObjC很多语法特性,它也借鉴了多种现代化语言的特点,在 ...

  5. C语言 · Anagrams问题

    问题描述 Anagrams指的是具有如下特性的两个单词:在这两个单词当中,每一个英文字母(不区分大小写)所出现的次数都是相同的.例如,"Unclear"和"Nuclear ...

  6. C语言 · 字符转对比

    问题描述 给定两个仅由大写字母或小写字母组成的字符串(长度介于1到10之间),它们之间的关系是以下4中情况之一: 1:两个字符串长度不等.比如 Beijing 和 Hebei 2:两个字符串不仅长度相 ...

  7. JAVA语言中的修饰符

    JAVA语言中的修饰符 -----------------------------------------------01--------------------------------------- ...

  8. Atitit 项目语言的选择 java c#.net  php??

    Atitit 项目语言的选择 java c#.net  php?? 1.1. 编程语言与技术,应该使用开放式的目前流行的语言趋势1 1.2. 从个人职业生涯考虑,java优先1 1.3. 从项目实际来 ...

  9. 【开源】简单4步搞定QQ登录,无需什么代码功底【无语言界限】

    说17号发超简单的教程就17号,qq核审通过后就封装了这个,现在放出来~~ 这个是我封装的一个开源项目:https://github.com/dunitian/LoTQQLogin ————————— ...

随机推荐

  1. Android Fragment StartActivityForresult调用实例

    fragment里面的onActivityResult 怎样才能被调用,很简单,就一句话, startActivityForResult(intent, getActivity().RESULT_FI ...

  2. 基于jQuery的Jsonp跨域[Get方式]

    由于目前的项目需要无刷新的跨域操作数据,整理了下自己使用的基于jQuery的Jsonp跨域[Get方式]. 代码如下: Javascript部分 $(function(){ $.ajax({ asyn ...

  3. 面向对象程序设计-C++_课时28静态对象_课时29静态成员

    Static in C++ Two basic meanings Static Storage --allocated once at a fixed address Visibility of a ...

  4. 给Object扩展新方法

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  5. 1.Solution的Build、Rebuild和Clean

    大家好,我是原文,这篇随笔是对原文的翻译以及自己的体会. 做程序员没追求的话是永远找不到女朋友的,当然有追求也找不到,这个先不提,好在有追求的时候我是充实而且开心的.现在我们的问题是,每天调试项目,在 ...

  6. log4j.xml配置示例

    这是log4j1.x版本讲解,log4j-1.2.16.jar    1. 一般的log4j.xml的两种配置方式: 1.Logger 完成日志信息的处理定义输出的层次和决定信息是否输出DEBUG&l ...

  7. C++_基础_运算符重载

    内容: (1)输入输出运算符重载 (2)友元类和友元函数 (3)双目运算符重载 (4)单目运算符重载 (5)不能被重载的运算符 (6)只能定义为成员形式的运算符 1.输入输出运算符重载如: int n ...

  8. BZOJ 3261: 最大异或和( 可持久化trie )

    搞成前缀和然后就可以很方便地用可持久化trie维护了.时间复杂度O((N+M)*25) -------------------------------------------------------- ...

  9. USACO Section 5.1 Fencing the Cows(凸包)

    裸的凸包..很好写,废话不说,直接贴代码. ----------------------------------------------------------------------------- ...

  10. 关于Connection must be valid and open.

    这个Bug真心很操蛋! 我的网站在公司做的运行一切都没问题,回家后咋自己的电脑上出现了Connection must be valid and open.这个问题. 我最后还是在英文网站的一个不起眼的 ...