码迷,mamicode.com
首页 >  
搜索关键字:length of last word    ( 43804个结果
选择排序
1 public class SlectedSort 2 { 3 public static void sort(int[] a) 4 { 5 int N = a.length; 6 for (int i = 0; i < N; i++) 7 ...
分类:其他好文   时间:2014-05-15 10:25:02    阅读次数:142
01-结构体NSRange、NSPoint、NSSize、NSRect、及NSString简介
1.结构体1>.NSRange(location, length); 从location这个位置开始计数长度为lengthNSRange的创建方式:NSRange r1 = {location, length}; // es: NSRange r1 = {2, 4}; 一般不这样写NSRange r...
分类:其他好文   时间:2014-05-15 09:50:55    阅读次数:246
UVA之1121 - Subsequence
【题目】 A sequence of N positive integers (10 N , each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal length of the subse...
分类:其他好文   时间:2014-05-15 07:58:17    阅读次数:329
冒泡排序
算法原理: 第一趟:从j=0开始,比较相邻的两个数a[j]和a[j+1],如果a[j]>a[j+1],则交换他俩的位置,这样会将大的数放在后面。每比较一次让j++,当j=length-1时终止。 这样一趟走完,最后面的数应该是最大数。 那么第二趟,还是从0开始,只不过这次j的终止条件是j=length-2。第二趟走完,最后两个数应该是数组中最大的两个数并且有序排列。 重复若干趟,直到j的终...
分类:其他好文   时间:2014-05-15 07:56:49    阅读次数:238
leetcode第一刷_Letter Combinations of a Phone Number
水题。数字一共就9个,去掉1是用来显示标点的,剩下8个。 穷举一下map,然后有几个数字,就输出这几个数字的排列,是一个dfs嘛。 map num; void allCombinations(string &digits, int start, int len, string &pres, vector &res){ if(len == digits.length()){ ...
分类:其他好文   时间:2014-05-15 01:42:26    阅读次数:264
POJ 1002 487-3279
Description Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phrase. For example, you can call the Universit...
分类:其他好文   时间:2014-05-15 00:20:39    阅读次数:332
HTML Basic points
这篇文章是我学习html视频资料时候自己稍微试验的一些html代码。学习的主要点可能在这里就可以全部包括了。随着我学习视频,这篇代码会随时被更新。h1h2h6 google before br testing a link to last a - jump to lastbrp paragraph ...
分类:Web程序   时间:2014-05-14 22:44:31    阅读次数:520
php header cache
phpheader()中的cache有四种标识头:Last-Modified,Expires,Pragma:no-cache,Cache-Control。以下的测试环境为谷歌浏览器,其余的未测试Last-Modified:在判断缓存的时候,If-Modified-Since会将此值发送给服务器。Expires:后面的日期用于标识缓存在什么时候过期Pragma:尽量用Cac..
分类:Web程序   时间:2014-05-14 19:06:02    阅读次数:323
分析osip的解析报文
staticint_osip_message_parse(osip_message_t*sip,constchar*buf,size_tlength,intsipfrag){inti;constchar*next_header_index;char*tmp;char*beg;tmp=osip_malloc(length+2);if(tmp==NULL){OSIP_TRACE(osip_trace(__FILE__,__LINE__,OSIP_ERROR,NULL,"Couldnotallocatememory..
分类:其他好文   时间:2014-05-14 16:06:25    阅读次数:296
string wstring
//只扩展为wstring,不考虑编码 std::wstringString2WString(conststd::string&str) { std::wstringwstr(str.length(),L‘‘); std::copy(str.begin(),str.end(),wstr.begin()); returnwstr; } //只拷贝低字节至string中 std::stringWString2String(conststd::wstring&ws..
分类:其他好文   时间:2014-05-14 15:58:11    阅读次数:262
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!