一,首先定义一个类来关联Adapter和Activity能够记住点击的位置public class MyViewHoler{ public CheckBox cb; public TextView tv;}二,Adapter的写法package com.example.listviewcheckde...
分类:
其他好文 时间:
2014-07-06 19:11:23
阅读次数:
123
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Pana...
分类:
其他好文 时间:
2014-07-06 16:45:00
阅读次数:
201
// First program example#import int main (int argc, const char * argv[]) { @autoreleasepool { NSLog (@"Programming is fun!"); } return...
分类:
其他好文 时间:
2014-07-06 13:03:34
阅读次数:
177
Given a collection of intervals, merge all overlapping intervals.For example,Given[1,3],[2,6],[8,10],[15,18],return[1,6],[8,10],[15,18].题目的意思是将相交得区间合并...
分类:
其他好文 时间:
2014-07-05 22:24:49
阅读次数:
177
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:
其他好文 时间:
2014-07-05 20:43:45
阅读次数:
246
原理Android客户端模拟一个HTTP的Post请求到服务器端,服务器端接收相应的Post请求后,返回响应信息给给客户端。PHP服务器Android客户端package com.example.uploadfile.app;import android.app.Activity;import an...
分类:
移动开发 时间:
2014-07-05 18:42:58
阅读次数:
595
Given an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Your algorithm should ru...
分类:
其他好文 时间:
2014-07-05 18:37:04
阅读次数:
188
Microsoft在StrSafe.h定义了新的安全字符串函数为了防止缓冲区溢出,在将一个可写缓冲区作为参数传递时,必须传递它的大小,大小可以有_countof获得,_countof获取字符数, sizeof获取字节数for example: int a[10]; // _countof(a) =....
Iwanttostudyitallthetime,andnowIamreadytostudythisbookinthenextmouth.Time:2014/07/02先看一个程序体验一下:#include<iostream>
intmain()
{
/*Thisisatestexample*/
std::cout<<"Entertwonumbers:"<<std::endl;
intv1,v2;
std::cin>>v1>>v..
分类:
编程语言 时间:
2014-07-03 15:24:04
阅读次数:
221
今天看到一网友观看老男孩shell视频后,问了一个问题如下:解答思想:我们学习shell的最好方法就是参看系统的标杆脚本及帮助的example。下面是网卡启动脚本的有关这位网友问题的脚本样例。很明显上述中括号字符比较等号两边有空格。所以上述的问题答案就不言而喻了。[root@oldb..
分类:
其他好文 时间:
2014-07-03 15:11:06
阅读次数:
178