环境Visual Studio 2012,具体代码如下#include #include #include void PrintNumber(int num){ std::cout f_print_num = PrintNumber; f_print_num(1024); // ...
分类:
编程语言 时间:
2014-06-28 14:19:07
阅读次数:
267
--1、while循环declare @sum intdeclare @i intset @i=1set @sum=0while(@i90) print @iendprint @sum--2、goto语句declare @num intset @num=100flag:print @numsel.....
分类:
数据库 时间:
2014-06-28 13:30:20
阅读次数:
267
PROGRAM_MAX_LENGTH = 60*60*3 #3 hoursskiptimes = 0TOTALTIMES = 0def xxx(): print TOTALTIMES #fine consider it as constant #TOTALTIMES += 1 #N...
分类:
编程语言 时间:
2014-06-28 12:47:52
阅读次数:
294
原地址:http://blog.jobbole.com/48541/Python编程中常用的12种基础知识总结:正则表达式替换,遍历目录方法,列表按列排序、去重,字典排序,字典、列表、字符串互转,时间对象操作,命令行参数解析(getopt),print 格式化输出,进制转换,Python调用系统命令...
分类:
编程语言 时间:
2014-06-23 07:55:02
阅读次数:
404
1 #coding:utf-82 3 import os4 5 6 for root,dirs,files in os.walk("D:"):7 for fileItem in files:8 print root + os.sep + fileItem结果如下
分类:
其他好文 时间:
2014-06-23 00:30:04
阅读次数:
244
1.使用 git add 命令添加文件名含中文字符的文件时
乱码类似:
view source
print?
1
\316\304\261\276\316\304\265\265.txt
解决方案:
编辑C:\Git\etc\inputrc文件中对应的行,
查找以下2行,并修改其值,
原先:
view so...
分类:
其他好文 时间:
2014-06-22 22:09:50
阅读次数:
270
1.使用print命令查看变量值
使用print命令(简写为p)可以查看变量值。
使用如下的程序1进行测试。
#include
struct node{
int index;
struct node* next;
};
int main(void) {
struct node head;
head.index = 1;...
分类:
其他好文 时间:
2014-06-22 20:53:08
阅读次数:
301
题目要求:
Input a value n, then print out a N×N matrix.
Example 1: Input 2, then
1 2
4 3
Example2: Input 4, then
1 2 3 4
12 13 14 5
11 16 15 6
10 9 8 7
Please write a program to...
分类:
其他好文 时间:
2014-06-22 00:38:02
阅读次数:
409
python自带调试工具库:pdb
# -*- coding:utf-8 -*-
def func(num):
s = num * 10
return s
if __name__ == '__main__':
print 'debug starting...'
print '*' * 10
print ‘debug ending…’
num...
分类:
数据库 时间:
2014-06-21 20:55:59
阅读次数:
357
import socket #获取本机IP地址 self.local_ip = socket.gethostbyname(socket.gethostname()) print (self.local_ip) python 判断本机是否联网 1 ...
分类:
编程语言 时间:
2014-06-21 14:19:26
阅读次数:
273