#!/bin/bash#提示用户输入echo -n "Please enter number"read n #读入输入的值放到变量n中sd=0rev=""on=$n #将变量n的值保存到变量on中,方便以后用到echo "You put number is $n"while [$n -gt 0]do...
分类:
其他好文 时间:
2014-07-16 23:03:53
阅读次数:
261
问题如下:BUILD FAILEDD:\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:653: The following error occurred while executing this line:D:\adt-bund...
分类:
其他好文 时间:
2014-07-16 23:03:08
阅读次数:
195
题目//找规律,123321123321123321…发现这样排列恰好可以错开// 其中注意题中数据范围: M是行,N是列,3 #include#include#includeusing namespace std;int main(){ int n, m; while( scanf( ...
分类:
其他好文 时间:
2014-07-16 22:55:54
阅读次数:
143
#include#includevoid getNext(int *Next,char* src){ int i,j; Next[0]=-1; i=0; j=-1; int N=strlen(src); while(i<N-1){ if(j==-1||src[i]==src[j]){ ++i;...
分类:
其他好文 时间:
2014-07-16 21:33:22
阅读次数:
222
引用Jquery$(".figcaption").each(function(i){ var divH = $(this).height(); var $p = $("p", $(this)).eq(0); while ($p.outerHeight() > divH) { $p.text($p.t...
分类:
其他好文 时间:
2014-07-12 08:42:15
阅读次数:
203
session.BeginDataAccess(); if (session.GotoFirstSource()){ do{ RTPPacket *packet; while ((packet = session.GetNextPacket()) != 0){ ...
分类:
其他好文 时间:
2014-07-11 20:51:41
阅读次数:
210
一、单字符function split(s,s1:string):TStringList;beginResult:=TStringList.Create;while Pos(s1,s)>0 dobegin Result.Add(Copy(s,1,Pos(s1,s)-1)); Delete(s,1,P...
分类:
其他好文 时间:
2014-07-11 13:01:10
阅读次数:
219
#coding=utf-8import osimport shutilfobj = open('F:/v3/k.txt','r')line = fobj.readline()while line: if line.find('a') >=0 : line = line.str...
分类:
移动开发 时间:
2014-07-11 11:50:20
阅读次数:
192
一道简单的用getline带空格带回车的字符串输入处理问题还是WA了一次 orz。。。。#include#include#includeusing namespace std;int main(){ int i,j,len; string str; int count=0; while(getlin...
分类:
其他好文 时间:
2014-07-11 09:58:25
阅读次数:
214
迭代协议: 类实现方法__next__,则可以使用for、while来实现迭代 使用iter或者next实现手工迭代: L = [1,2,3]I = iter(L)print(I.next()) 列表推导式: L = [x + y for x in 'abc' for y in 'lmn']prin...
分类:
编程语言 时间:
2014-07-11 09:44:49
阅读次数:
227