#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define INF 100000000
using namespace std;
int n;
vector ma[1515];
int dp[1510];
int fun(int x){
...
分类:
其他好文 时间:
2015-04-29 19:55:05
阅读次数:
139
报错位置
SDWebImage里面一些类的方法
objc_msgSend(delegate, @selector(webImageManager:didFinishWithImage:forURL:), self, image, url);
报错内容
......SDWebImage/SDWebImageManager.m:246:22: Too many arguments to fun...
分类:
其他好文 时间:
2015-04-29 19:46:58
阅读次数:
1898
#define UNUSED(x) ((void)(x))void fun(int noused_arg, int b){ UNUSED(noused_arg); printf("%d\n", b);}上面那个函数因为有一个无用的参数,所以如果没有使用UNUSED那个宏,那么就会产生一个warn.....
分类:
其他好文 时间:
2015-04-29 19:27:57
阅读次数:
86
polya计数法
简单模板
void solve(int n,int c)
{
int ans = 0;
for (int i = 1; i <= n; i++) if (n % i == 0)
{
ans += fun(c, i) * euler(n / i);
}
if (n & 1) ans += n * f...
分类:
其他好文 时间:
2015-04-29 08:45:15
阅读次数:
111
大头文分享,进步冒泡排序C#实现,使用委托,包括三种方式:Fun,匿名方法,Lambda表达式冒泡排序是一种简单的排序方法,适合于小量数字排序,对于大量数字(超过10个),还有更高效的排序方法。这里的实现的冒泡排序,需实现功能:不仅数字排序,还要对任意对象排序示例:对People对象的Age(年龄)...
分类:
编程语言 时间:
2015-04-29 00:29:01
阅读次数:
814
一句话:container就用mem_fun,container就用mem_fun_ref参考:http://www.cplusplus.com/reference/functional/mem_fun/http://www.cplusplus.com/reference/functional/me...
分类:
其他好文 时间:
2015-04-27 09:24:11
阅读次数:
151
就像数组名是指向数组的第一个元素的常指针一样,函数名也是指向函数的常指针。可以声明一个指向函数的指针变量,并且用这个指针调用其他函数(只要这个函数和你的函数指针在签名、返回、参数值方面一致即可)。
例1:
long (* fun) (int)
上面就是一个函数指针,该指针返回值类型是long,所带的参数类型是int。
例2:
int fun(char *,int);...
分类:
其他好文 时间:
2015-04-26 22:49:34
阅读次数:
140
#include
using namespace std;
//代理模式中注意代理虽然可以实现某个功能,但是代理并不具备该功能,它的实现是通过调用别人的功能
//至于具体哪个功能,多态中基类指针指派生类对象,指向哪个派生类,就去调用哪个派生类的fun函数
class Base
{
public :virtual void fun()=0;
virtual ~Base(){}
...
分类:
编程语言 时间:
2015-04-25 15:15:54
阅读次数:
162
刚考了计算机二级c有个填空题脑子一时短路写错了(>﹏2 int fun(int n, int m){3 return n == m ? 1 : n % m == 0 || 1 == n ? 0 : fun(n, m + 1);4 }5 int main(){6 return 0;7 ...
分类:
其他好文 时间:
2015-04-25 11:57:37
阅读次数:
114
1. [NSTreadsleepForTimeInterval:0.8f] 这个方法 实际效果 好比打断点 等你再恢复断点执行2.[self performSelector:@selector(fun:) withObject:nil afterDelay:0.8f];这个 就适合UI层级的 异步方...
分类:
移动开发 时间:
2015-04-24 20:46:51
阅读次数:
131