任何一个任务必须包含初始化和处理函数(即ProcessEvent),其具体信息如下: Any OSAL Task must implement two methods:one to perform task initialization and the other to handle task ev
分类:
其他好文 时间:
2016-02-21 12:47:11
阅读次数:
151
Implement int sqrt(int x). Compute and return the square root of x. 自己的代码: 1 int mySqrt(int x) { 2 if(x == 0 || x == 1) 3 return x; 4 int begin = 0; 5
分类:
其他好文 时间:
2016-02-21 11:27:50
阅读次数:
118
题意 给出字符串a与b 可以将a中的单个字符改为# 问最少改多少次 a中就找不到b了 一开始想的是用strstr 因为如果找到 可以将strstr(a,b)-a+1改成# 即改首字母 用while循环strstr来做题 然而改第一个字母不行 因为有可能重叠 比如在lll之中找ll 改了第一个还能找出
分类:
其他好文 时间:
2016-02-20 22:53:32
阅读次数:
253
摘自: http://www.ntu.edu.sg/home/ehchua/programming/java/J4a_GUI.html Refer to the WindowEventDemo, a WindowEvent listener is required to implement the
分类:
其他好文 时间:
2016-02-20 17:34:03
阅读次数:
117
28. Implement strStr() Problem's Link ---------------------------------------------------------------------------- Mean: 给定两个字符串str1和str2,输出str2在str1中
分类:
其他好文 时间:
2016-02-19 18:58:44
阅读次数:
215
1, 多态 : 父类的引用指向子类对象,有继承,有重写 多态表达了 : cat 是一种 Animal 规则 : 多态对象不能调用父类中没有的方法 定义 : Animal cat = new Cat(); 2, 接口 : 类实现接口implement,也是一种极度抽象的抽象类,也是类很多行为的集合 接
分类:
编程语言 时间:
2016-02-18 12:00:09
阅读次数:
136
Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below ...
分类:
编程语言 时间:
2016-02-17 00:54:23
阅读次数:
226
题 题意 给你一个字符串s1,字符串s2,s1循环移位,使s2包含在s1中,则s2 是s1的亲和串 分析 把s1自身复制一遍接在后面。 方法一: 用strstr函数。 方法二: KMP算法。 方法三: 用C++的string的find函数。 代码 方法一: #include<cstdio> #inc
分类:
其他好文 时间:
2016-02-14 18:27:41
阅读次数:
179
1>>>>>>>> Difference between HttpServlet vs Generic Severlet javax.servlet.Servlet---- is an interface defining what a servlet must implement.it defin
分类:
Web程序 时间:
2016-02-14 06:50:09
阅读次数:
210
//implement a calculator //no bracket #include <iostream> #include<cctype>//the 'isdigit' which was included in it will be used in the funcion named n
分类:
其他好文 时间:
2016-02-08 21:14:55
阅读次数:
194