<?php
//分析
/*
	福建省
		福州市
		龙岩市
	广东省
		广州市
		佛山市
		晋江市
			江门市
	江西省
		南昌市
		赣州市
			宁都县
			大余县
			信封县
		吉安市
cat_id		pri			parent_id
1			福建省			0
2			福州市			1
3			龙岩市			1
4			广东省			0
5			广州市			4
6..
                            
                            
                                分类:
Web程序   时间:
2015-05-12 19:16:56   
                                阅读次数:
150
                             
                    
                        
                            
                            
                                例如我们做到一个计算器的时候我们会遇到1+9+6/8类似这种,那么我们就可以用把这个式子变成后缀表达式然后再来计算。
struct//设定运算符的优先级 
{
	char ch;//运算符 
	int pri;//优先级 
}lpri[] = { { '=', 0 }, { '(', 1 }, { '*', 5 }, { '/', 5 }, { '+', 3 }, { '-', 3 },...
                            
                            
                                分类:
编程语言   时间:
2015-05-12 13:40:09   
                                阅读次数:
114
                             
                    
                        
                            
                            
                                我们接着讲for函数。range()函数和len()函数常常一起用于字符串索引,这里我们要显示每一个的元素及其索引值。#小插曲,在cmd中,清除屏幕的方法是输入cls,即 clean screen。让我们分析一下这个语句。foo='abc'for i in range(len(foo)): pri....
                            
                            
                                分类:
编程语言   时间:
2015-05-10 18:43:42   
                                阅读次数:
127
                             
                    
                        
                            
                            
                                PrintStream 其实是FilterOutputStream的一种public class PrintStream extends FilterOutputStream implements Appendable, Closeable直接已知子类:LogStream 已过时。 无替代版本Pri...
                            
                            
                                分类:
编程语言   时间:
2015-05-09 17:27:19   
                                阅读次数:
118
                             
                    
                        
                            
                            
                                对于awk命令,任何表达式都可以用作数组的下标。所以,也可以用字段作下标。下面的例子中的程序用于计算所有名字在第2 个字段出现的次数,并引入了一种for循环的新形式。
for(index_value in array) statement
在前面介绍的例子中,END块中出现的for循环的工作过程如下:变量name被设为count数组的索引值,在每次for循环的迭代中,执行pri...
                            
                            
                                分类:
编程语言   时间:
2015-05-08 09:42:33   
                                阅读次数:
159
                             
                    
                        
                            
                            
                                local function demoA() print "demoA"endlocal function demoB () print "demoB"endlocal function forfun() print "in forfun"endforfun( demoB )pri...
                            
                            
                                分类:
其他好文   时间:
2015-05-05 21:31:29   
                                阅读次数:
145
                             
                    
                        
                            
                            
                                import java.util.Random;public class FZ { private int a; private int b; int c; public int jia(int a,int b) { System.out.pri...
                            
                            
                                分类:
其他好文   时间:
2015-04-30 12:20:08   
                                阅读次数:
123
                             
                    
                        
                            
                            
                                ?##sys.exc_info() 
返回 (type, value, traceback). type为异常类型, value为异常的参数(通常为异常错误的信息), traceback为跟踪回溯的对象.    exc_type, exc_value, exc_traceback = sys.exc_info()
    print "*** print sys.exc_info:"
    pri...
                            
                            
                                分类:
编程语言   时间:
2015-04-28 11:55:29   
                                阅读次数:
289
                             
                    
                        
                            
                            
                                a[0]=1;  a[1]=2;
之后每个数可以由前面的任意两个数相加得到(可以是同一个数),问得到数字N的最短序列
N最大为100,迭代加深搜索打表
#include "stdio.h"
#include "string.h"
int w;
int pri[110][15]; // 记录答案
int len[110]; // 数字N所需长度
int seq[110]; // DFS的每一...
                            
                            
                                分类:
其他好文   时间:
2015-04-28 11:45:13   
                                阅读次数:
103
                             
                    
                        
                            
                            
                                serialize("数组"); //序列化的函数序列化示范:serialize(array('1'=>1235622,'2'=>'4142122'));unserialize('字符'); //反序列化的函数反序列化示范:unserialize('a:1:{s:13:"package_pri...
                            
                            
                                分类:
Web程序   时间:
2015-04-27 12:52:02   
                                阅读次数:
124