http://codeforces.com/problemset/problem/19/C
Once Bob saw a string. It contained so many different letters, that the letters were marked by numbers, but at the same time each letter ...
分类:
其他好文 时间:
2015-01-07 23:36:29
阅读次数:
221
module.exports = onceonce.proto = once(function () { Object.defineProperty(Function.prototype, 'once', { value: function () { return once(thi...
分类:
其他好文 时间:
2015-01-05 14:29:18
阅读次数:
185
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without an...
分类:
其他好文 时间:
2015-01-03 17:22:56
阅读次数:
157
邻接矩阵的图示:构建一个这种无向邻接矩阵。參考站点:http://www.geeksforgeeks.org/graph-and-its-representations/这里写了个类,添加删除图的操作。#pragma once#include #include class AdjListGraph{...
分类:
编程语言 时间:
2015-01-03 17:09:04
阅读次数:
239
申明下面的文章属于转载,现在大家新下载的版本跟下面列子这个不一样!我看了很多网上的列子,最后我还是读了那个英文的手册,上面说的很清楚!大家英语不好可以下载有道!其实重点是要包含下面两行:
require_once 'excellib/PHPExcel.php';
require_once 'excellib/PHPExcel/IOFactory.php';
你...
分类:
数据库 时间:
2015-01-03 13:16:45
阅读次数:
185
1.不要使用相对路径常常会看到:1require_once('../../lib/some_class.php');该方法有很多缺点:它首先查找指定的php包含路径, 然后查找当前目录.因此会检查过多路径.如果该脚本被另一目录的脚本包含, 它的基本目录变成了另一脚本所在的目录.另一问题, 当定时任务...
分类:
Web程序 时间:
2015-01-03 13:07:40
阅读次数:
361
非线性数据结构树的密度=结点数/高度二叉树类 1 #pragma once 2 3 class stnode 4 { 5 public: 6 int nodeValue; // node data 7 8 stnode *left, *right, *...
分类:
其他好文 时间:
2015-01-02 22:18:52
阅读次数:
392
现在前端用javascript用的比较多,当然真心的说这个语言是一个非常业余的语言,但是用的人很多,所以也比较火。今天想完成一个javascript外部文件自动加载的设计(类似于java或者php的import和require_once),因此仔细研究了下Javascript的解析顺序,发现要真正的...
分类:
编程语言 时间:
2015-01-01 23:50:43
阅读次数:
264
版本:2.x
目标:基于cocos2dx底层实现一个自己简单的一套的ui,改屏幕坐标原点为右上角。
首先我们通过继承CCNodeRGBA来实现自己的基类,为什么要继承CCNodeRGBA而不是CCNode,因为CCNodeRGBA有对node的颜色与透明度的设置
#pragma once
#include "cocos2d.h"
class View:public cocos2d::CC...
分类:
其他好文 时间:
2015-01-01 14:50:55
阅读次数:
223
关键字:GCD dispatch_once 单例 线程安全 double-check 以前在Java、C#等语言中,我们实现迟缓加载的单例模式一般写成如下形式(伪代码):private MyClass() {...} // 私有化构造方法private static MyClass instanc....
分类:
移动开发 时间:
2014-12-31 08:42:17
阅读次数:
226