现在位置: 首页 > keck发表的所有文章
  • 12月
  • 25日
综合 ⁄ 共 7479字 评论关闭
相对同时刚出校门同学从事其它行业而言优厚的薪水,以及不断学习更新的专业知识不仅仅让你感到生活的充实,更满足了你那不让外人知的虚荣心。在刚出校门的几年中,你经常回头看看被你落在后面的同学们,在内心怜悯他们的同时,你也会对自已天天加班的努力工作感到心里平衡:“有付出才会有回报”这句话在那几年中你说的最多,不管是对自已的朋友们还是自已的爱人。第二句最常说的话是对公司的领导:“不行我就走人!”,实际上你也真的走过几回。对了,在这几年中,因为你的经济条件不错,你开始买房、开始谈恋爱、结婚、开始有了自......
阅读全文
  • 06月
  • 08日
综合 ⁄ 共 1364字 评论关闭
很莫名其妙昨天写的jQuery简单例子,今天就不能正常运行   代码如下 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html >   <head>     <title>index4.html</title>     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">     <meta http-equiv="description" content="this is my page">     <meta http-equiv="content-type" content="text/html; charset=UTF-8">         <!--<link rel="stylesheet" type="text/css" href=".......
阅读全文
  • 05月
  • 14日
综合 ⁄ 共 2291字 评论关闭
 我们都知道,静态static方法中不能调用非静态non-static方法,准确地说是不能直接调用non-static方法。但是可以通过将一个对象的引用传入static方法中,再去调用该对象的non-static方法。       其实这个事实的应用很经常,以至于我们不去重视:在主函数(static方法)中我们经常创建某个类的实例,再利用其饮用变量调用它的非静态方法。   //StaticMethodTest.java //A ststic method cannot call a non-static method, but we can transfer a object reference, which include a non-static metho to the static method, thus......
阅读全文
  • 04月
  • 15日
综合 ⁄ 共 178字 评论关闭
CREATE TABLE `pp1` ( `v` varchar(32) NOT NULL, `k` varchar(128) NOT NULL, PRIMARY KEY (`k`) ) ENGINE=InnoDb DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci PARTITION BY KEY(k) PARTITIONS 32; as easy as you seen
阅读全文
  • 04月
  • 12日
综合 ⁄ 共 581字 评论关闭
题目: 给定一个数N,打印所有和为N的分解形式: 如对于N=5: 1+1+1+1+1 1+1+1+2 等等。   还算比较好写的,但是第一次写了之后发现有重复的,比如对于N=3,会有1+2和2+1两种形式都出来了。 为了去掉重复的可能,递归到每一个子和的时候,只能从比前一个数大的那些数开始取。 代码:   #include<iostream> #include<iterator> #include<vector> #include<algorithm> using namespace std; int target; ostream_iterator<int> os(cout," "); void search(vector<int>& have, in......
阅读全文
  • 12月
  • 04日
综合 ⁄ 共 2098字 评论关闭
要解决的问题是关于霍夫曼树的,题目在: http://acm.hdu.edu.cn/showproblem.php?pid=1053 直接写代码吧,不得不说写得真的很复杂,调试了半天,出了好多错哈: #include<cstdio> #include<queue> #include<cstring> #include<string> using namespace std; const int R = 27; // A~Z, _ const int MAXLEN = 100; char str[MAXLEN]; class Item{ public: char ch; int freq; Item* left, *right; bool operator< (const Item i)const { ......
阅读全文
  • 11月
  • 15日
综合 ⁄ 共 7111字 评论关闭
转载 说明:由于图形化界面方法(如Add/Remove... 和Synaptic Package Manageer)比较简单,所以这里主要总结在终端通过命令行方式进行的软件包安装、卸载和删除的方法。 一、Ubuntu中软件安装方法 1、APT方式 (1)普通安装:apt-get install softname1 softname2 …; (2)修复安装:apt-get -f install softname1 softname2... ;(-f Atemp to correct broken dependencies) (3)重新安装:apt-get --reinstall install softname1 softname2...; 2、Dpkg方式 (1)普通安装:dpkg -i package_name.deb 3、源码安装(.tar、tar.gz......
阅读全文
  • 10月
  • 20日
综合 ⁄ 共 232字 评论关闭
在Xcode 6之后,新建的工程,不在创建.pch文件了,而有时候,需要这个,比如,使用 MKNetworkKit时,需要在pch中添加 #endif #ifdef __OBJC__ #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> #import "MKNetworkKit.h" #endif 那么没有这个文件改怎么办,答案是添加一个。步骤如下: 1、创建一个新的pch的文件 2、添加到工程中 3,修改工程配置文件 清理,即可
阅读全文
  • 10月
  • 17日
综合 ⁄ 共 1746字 评论关闭
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3702 Gibonacci number Time Limit: 2 Seconds      Memory Limit: 65536 KB In mathematical terms, the normal sequence F(n) of Fibonacci numbers is defined by the recurrence relation F(n)=F(n-1)+F(n-2) with seed values F(0)=1, F(1)=1 In this Gibonacci numbers problem, the sequence G(n) is defined similar G(n)=G(n-1)+G(n-2) with the seed value for G(0) is 1 for any case, and the seed value for G(1) is a random integer t, (......
阅读全文
Nearest Common Ancestors Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 17144 Accepted: 9128 Description A rooted tree is a well-known data structure in computer science and engineering. An example is shown below: In the figure, each node is labeled with an integer from {1, 2,...,16}. Node 8 is the root of the tree. Node x is an ancestor of node y if node x is in the path between the root and node y. For example, node 4 is an ancestor of node 16. Node 10 is also a......
阅读全文
  • 10月
  • 05日
综合 ⁄ 共 6452字 评论关闭
一、Redis简介: Redis(http://redis.io)是一款开源的、高性能的键-值存储(key-value store),它是用ANSI C来编写。Redis的项目名是Remote Dictionary Server的缩写,但它常被称作是一款数据结构服务器(data structureserver)。Redis的键值可以包括字符串(strings)、哈希(hashes)、列表(lists)、集合(sets)和 有序集合(sorted sets)等数据类型。 对于这些数据类型,你可以执行原子操作。例如:对字符串进行附加操作(append);递增哈希中的值;向列表中增加元素;计算集合的交集、并集与差集等。 为了获得优异的......
阅读全文
  • 09月
  • 27日
综合 ⁄ 共 209字 评论关闭
对MVC的理解  MVC是一种设计模式, 这种设计模式用于分离代码的不同模块, 用于提高代码的健壮性和复用性。    M:Model 指的程序的数据相关。如果以游戏为例:model可以用于描述游戏角色的攻击力、杀伤力、血量!  V:View 凡是在界面上看到的内容都是View.换句话说:就是显示具体的内容。  C:Controller 如果M和V之前有过多的关联, 那么一定会影响代码的复用性。 如果要有好的复用性, 就必须让代码模块之间具备
阅读全文