函数:1.定义:就是定义在类中具备特定功能的一段小程序段2.函数格式:修饰符返回值类型函数名(参数类型形参1,参数类型形参2...){执行语句return返回值}当没有返回值时,默认返回值类型为void如果返回值为void,函数中可以没有return语句注意:函数只能调用函数,但是不能嵌..
分类:
编程语言 时间:
2015-07-21 15:11:29
阅读次数:
147
Android屏蔽返回键
@Override
public boolean onKeyDown(int keyCode,KeyEvent event){
if(keyCode==KeyEvent.KEYCODE_BACK)
return true;//不执行父类点击事件
return super.onKeyDown(keyCode...
分类:
移动开发 时间:
2015-07-21 14:56:33
阅读次数:
174
break 结束循环,跳出循环体;
continue 结束本次循环,进行下次循环;
return 跳出循环体所在的方法,相当于跳出循环体。...
分类:
其他好文 时间:
2015-07-21 14:45:29
阅读次数:
98
还记得java.lang.String么,如果现在给你一个小程序,你能说出它的结果么 1 public static String ab(String a){ 2 return a + "b"; 3 } 4 5 public static void ...
分类:
编程语言 时间:
2015-07-21 14:35:49
阅读次数:
109
滑动出现类似iPhone短信出现按钮的效果不啰嗦了 上代码关键方法如下- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{ return YES;}- (UITabl...
分类:
其他好文 时间:
2015-07-21 14:35:32
阅读次数:
295
1Given an arrayof integers, find two numbers such that they add up to a specific targetnumber.The functiontwoSum should return indices of the two numbers such that they add up to thetarget, where inde...
分类:
其他好文 时间:
2015-07-21 12:56:09
阅读次数:
93
1.java代码判断字符串中是否包含字母:
思路:使用正则表达式的来验证
1.1示例代码如下:
/**
* 该方法主要使用正则表达式来判断字符串中是否包含字母
* @author fenggaopan 2015年7月21日 上午9:49:40
* @param cardNum 待检验的原始卡号
* @return 返回是否包含
*/
...
分类:
编程语言 时间:
2015-07-21 12:55:26
阅读次数:
115
You are giventwo linked lists representing two non-negative numbers. The digits are storedin reverse order and each of their nodes contain a single digit. Add the twonumbers and return it as a linked ...
分类:
其他好文 时间:
2015-07-21 12:53:28
阅读次数:
121
#include
#include
using namespace std;
int my_len(const char *str)
{
int len = 0;
// while (*str != '\0')
// {
// ++len;
// ++str;
// }
while (*(str++) != '\0')
{
++len;
}
return len;
}...
分类:
编程语言 时间:
2015-07-21 12:49:16
阅读次数:
113
165 Compare Version Numbers用python处理字符串还是比较简单的class Solution: # @param {string} version1 # @param {string} version2 # @return {integer} de...
分类:
其他好文 时间:
2015-07-21 12:38:53
阅读次数:
97