Given an array of integers, find two numbers such
that they add up to a specific target number.The function twoSum should return
indices of the two nu...
分类:
其他好文 时间:
2014-05-26 19:50:39
阅读次数:
314
类似于java的toString()- (NSString *)description{ //
包含对象类型名称,以及对象的指针地址 return [NSString stringWithFormat:@" {answer: %@, title: %@,
icon: %@, option...
分类:
其他好文 时间:
2014-05-26 19:39:09
阅读次数:
301
#include "stdio.h"int ax[]
={1000,5,6,8,9,800,5,200,3,6,5,8,9};int paixu (int n, int ret){ if (n==0) return
ret>ax[0]?ret:ax[0]; int ret1= ret>ax[n]? ...
分类:
其他好文 时间:
2014-05-26 18:41:12
阅读次数:
220
/// /// 文本长度判断 /// public static bool
TextLength(int min, int max, string s) { if (s.Length max) { return false; }
else { return true; } } /// ///...
分类:
Web程序 时间:
2014-05-25 23:09:29
阅读次数:
349
var userid = $("username");var usersp =
$("usersp");var reg = /^[A-Za-z0-9_\-\u4e00-\u9fa5]+$/;function $(id){ return
document.getElementById(id);} f....
分类:
其他好文 时间:
2014-05-25 22:43:36
阅读次数:
299
前提条件是已经安装了g++要是没有安装,就yum install
g++1,编写Hello.cpp1>vim2>#include int main(){ printf("Hello,the world!");
return 0;}3>:w hello.cpp2,退出vim !q3,编译#g++ .....
分类:
编程语言 时间:
2014-05-25 22:19:17
阅读次数:
468
1.gcc的-g选项
如果要使用gdb进行调试,必须在编译时在gcc中加入-g选项,使用参数 -g 表示将源代码信息编译到可执行文件中。
如果不使用-g选项:
#include
int main(void)
{
int i = 1;
i = i + 1;
printf("i = %d\n",i);
return 0;
}gcc main.c
gdb a.out
(...
分类:
其他好文 时间:
2014-05-25 21:38:46
阅读次数:
238
You are given two linked lists representing two non-negative numbers. The digits are
stored in reverse order and each of their nodes contain a single digit. Add the two numbers
and return i...
分类:
其他好文 时间:
2014-05-25 21:36:52
阅读次数:
268
#import NSInteger myCompare(id obj1,id obj2,void
*context){ //不分大小写进行升序排序 //return [obj1 caseInsensitiveCompare:obj2]; return
-[obj1 caseInsensitive.....
分类:
其他好文 时间:
2014-05-25 20:36:35
阅读次数:
250
IOS目录中RootViewController.mm//显示竖屏- (BOOL)
shouldAutorotate { return NO;}//显示横屏- (BOOL) shouldAutorotate { return
YES;}还有一个屏目适配:AppDelegate 中:CCDire...
分类:
其他好文 时间:
2014-05-25 20:33:59
阅读次数:
205