1.call 方法的作用是一模一样的,都是用来改变方法的this关键字并且把方法执行: 而且在严格模式下对于第一个参数是null/undefined这种情况的规律也是一样的; 2.apply 和call一模一样,第一个参数是this后面参数变为数组 3.bind 只是改变了fn中的this为obj, ...
分类:
移动开发 时间:
2017-04-13 08:48:40
阅读次数:
176
http://poj.org/problem?id=1861 题意:求最小生成树,并输出哪几个城市相连接,且输出一共有多少条边(一定是n-1条边),和最短边的长度 思路:直接prim,只不过在prim加点东西就可以,可以说是模板题,题目的案例是错的 答案应该是 1 3 1 2 1 3 2 4 ...
分类:
其他好文 时间:
2017-04-12 17:58:57
阅读次数:
184
C++中的const关键字的用法非常灵活,而使用const将大大改善程序的健壮性,本人根据各方面查到的资料进行总结如下,期望对朋友们有所帮助。 Const 是C++中常用的类型修饰符,常类型是指使用类型修饰符const说明的类型,常类型的变量或对象的值是不能被更新的。 一、Const作用 如下表所示 ...
分类:
编程语言 时间:
2017-04-12 10:09:03
阅读次数:
259
http://quote.eastmoney.com/center/list.html#10_0_0_u?sortType=H&sortRule=-1 量比 http://data.eastmoney.com/bbsj/201612/yjbb/0/6.html 业绩 http://fund.east ...
分类:
其他好文 时间:
2017-04-12 09:58:47
阅读次数:
129
#include #include #define N 256 int fun(const char* s1, const char* s2) { int a[N][N]; int len1 = strlen(s1); //字符串s1的长度 int len2 = strlen(s2); //字符串s... ...
分类:
其他好文 时间:
2017-04-12 09:52:35
阅读次数:
142
#include<stdio.h> #define MAX 100 int insert(int a[],int n,int i,int x) { int j; if(n+1>MAX) printf("无插入空间\n"); //数组仅仅能存MAX个数 else if(i<1||i>n+1) prin ...
分类:
编程语言 时间:
2017-04-12 09:49:28
阅读次数:
143
最大岛屿 时间限制:1000 ms | 内存限制:65535 KB 难度:2 最大岛屿 时间限制:1000 ms | 内存限制:65535 KB 难度:2 神秘的海洋,惊险的探险之路,打捞海底宝藏,激烈的海战,海盗劫富等等。加勒比海盗,你知道吧?杰克船长驾驶着自己的的战船黑珍珠1号要征服各个海岛的海 ...
分类:
其他好文 时间:
2017-04-12 09:43:15
阅读次数:
172
传送门 http://www.lydsy.com/JudgeOnline/problem.php?id=4012 题解 代码 1 #include <cstdio> 2 #include <cstring> 3 #include <algorithm> 4 5 #define REP(i, l, r ...
分类:
其他好文 时间:
2017-04-12 09:39:21
阅读次数:
302
#include <stdio.h> #include <stdlib.h> #include <string.h> #define CHUNKSIZE 10 #define stuff '#' typedef struct Chunk { char ch[CHUNKSIZE]; struct Ch ...
分类:
其他好文 时间:
2017-04-12 04:30:14
阅读次数:
285