// sort.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include using namespace std;void print ( int a[] ,int n ){ for...
分类:
编程语言 时间:
2015-10-08 23:04:38
阅读次数:
232
#! /usr/bin/python # -*-coding:'uft-8'-*-from __future__ import print_function #python2使用py3的print方法import io,sysf=io.StringIO()sys.stdout=f #重定义sy...
分类:
其他好文 时间:
2015-10-08 20:02:33
阅读次数:
163
$regsall = array_merge(array_unique($regsall)); print_r($regsall);----------------------------------------------------function FetchRepeatMemberInArr....
分类:
Web程序 时间:
2015-10-08 13:06:58
阅读次数:
171
#include<stdio.h>
intmain()
{
inti,j,k;
for(i=0;i<=6;i++)
{
for(j=0;j<=5-i;j++)
printf("");
for(k=0;k<=2*i;k++)
printf("*");
printf("\n");
}
for(i=0;i<=5;i++)
{
for(j=0;j<=i;j++)
printf("");
for(k=0;k<=10-2*i;k++)
print..
分类:
编程语言 时间:
2015-10-07 23:04:46
阅读次数:
257
package lx;public class lx { public static void main(String[] args) { for(int i = 1;i = i; h--) { System.out.print(" ");//打印空格,从9个到1个 } for(...
分类:
其他好文 时间:
2015-10-07 22:59:52
阅读次数:
136
#!/usr/bin/env python1 import glob2 import os3 os.chdir(“./”)4 for file in glob.glob(“*.py”):5 print fileprint “#######Another One##########”impor...
分类:
编程语言 时间:
2015-10-07 12:00:49
阅读次数:
1842
# 帮助文档1、dir函数式可以查看对象的属性:Python命令窗口输入 dir(str) 即可查看str的属性。2.如何查看对象某个属性的帮助文档 ? 如要查看str的split属性,可以用__doc__(双下划线), 使用方法为print(str.split.__doc__) 或者help函.....
分类:
编程语言 时间:
2015-10-07 10:49:42
阅读次数:
241
#! /usr/bin/python# -*- coding:'utf-8'-*-text='ab cc sdddd 'print ' '.join(n for n in text.split(' ') if n)data=[]word=''for letter in text: if ...
分类:
其他好文 时间:
2015-10-06 16:45:08
阅读次数:
98
从0~9中随机产生4个互不相等的数,方法一:import randoms=[]while(len(s)<4): x=random.randint(0,9) if x not in s: s.append(x) print(s)方法二:import random...
分类:
编程语言 时间:
2015-10-06 16:42:14
阅读次数:
173
#使用str.format()函数 #使用'{}'占位符 print('I\'m {},{}'.format('Hongten','Welcome to my space!')) >>> I'm Hongten,Welcome to my space! print('#' * 40) #...
分类:
其他好文 时间:
2015-10-06 14:04:29
阅读次数:
161