zepto的原型 $.fn 属性: 绑定到原型上面 代码仅供参考,具体功能可以自己扩展。 http://www.cnblogs.com/jiebba/p/6529854.html http://www.cnblogs.com/jiebba 我的博客,来看吧! 如果有错误,请留言修改下 哦! ...
分类:
其他好文 时间:
2017-03-14 10:34:21
阅读次数:
216
使用npm安装一些包失败,类似如下报错情况: 方法一:使用cnpm,用淘宝 NPM 镜像 安装 上面这种镜像使用方式将配置写死,下次用的时候配置还在。附:搜索镜像: http://cnpmjs.org 安装模块 | $ cnpm install [name]从 registry.npm.taobao ...
分类:
其他好文 时间:
2017-03-13 18:48:42
阅读次数:
269
class B { public: //隐式转换 B(int i) { cout 0; } //转换函数 operator string() { return "class_string"; } private: int data; }; int main() { B inst =... ...
分类:
其他好文 时间:
2017-03-13 16:14:45
阅读次数:
148
一个较综合JS习题: function Foo() { getName = function () { alert (1); }; return this; } Foo.getName = function () { alert (2);}; Foo.prototype.getName = func ...
分类:
Web程序 时间:
2017-03-12 13:17:52
阅读次数:
233
题目: 问题描述 已知一个有理数类Zrf_Ratio,实现如下的操作符重载形式: friend std::ostream& operator<<(std::ostream&, const zrf_Ratio&);//输出最简分数 friend std::istream& operator>>(std ...
分类:
编程语言 时间:
2017-03-11 19:43:40
阅读次数:
568
题意: 有重和价值分别为wi,vi的n个物品。从这些物品中挑选出总质量不超过W的物品,求所有挑选出的方案中价值总量的最大值。 限制条件:1<=n<=40 1<=wi,vi<=10^15 1<=W<=10^15 思路: 此题如果用动态规划求解复杂度为O(nW),故不划算。 可以考虑折半搜索的方法,将所 ...
分类:
其他好文 时间:
2017-03-11 13:08:35
阅读次数:
481
一、线性表(list) 1、定义:有序、有限的数据序列,其中的每个数据称为元素(element)。 注:在这里本文中所指的元素的数据类型相同。 2、基本概念:空(empty)、长度(length)、头(head)、尾(tail)、有序表(sorted list)、无序表(unsorted list) ...
分类:
其他好文 时间:
2017-03-11 01:00:32
阅读次数:
194
1 package cn.temptation; 2 3 public class Sample01 { 4 public static void main(String[] args) { 5 // 传递 值类型参数 和 传递 引用类型参数 6 int i = 2; 7 int j = 3; 8 ... ...
分类:
编程语言 时间:
2017-03-09 22:48:43
阅读次数:
228
1 #include 2 #include 3 #include 4 using namespace std; 5 6 struct cmp 7 { 8 bool operator()( const int &a, const int &b ) 9 { 10 return a , greater >... ...
分类:
其他好文 时间:
2017-03-08 22:48:41
阅读次数:
209