1、错误描写叙述八月 20, 2014 7:10:18 下午 org.apache.catalina.core.StandardWrapperValve invoke严重: Servlet.service() for servlet [jsp] in context with path [/Fusi...
分类:
编程语言 时间:
2014-09-27 18:42:51
收藏:
0 评论:
0 赞:
0 阅读:
357
cu红色为检查异常,就是eclipse要提示你是try catch 还是throws。非检查异常,就是/0,nullpointexception,数据越界访问indexOfOutBounds 异常错误: 最常见的oom错误,还有classnotFoundeError,StackOverflowErr...
分类:
编程语言 时间:
2014-09-27 18:42:31
收藏:
0 评论:
0 赞:
0 阅读:
341
dict(dictionary)是一系列无序对象的集合,由键-值对构成,通过读取键来取得对应的值,具有可变,无序,异构,可嵌套的属性。dict初始化1、直接采用字典格式2、利用dict(),[注]:键没有加''3、利用tuple(元组)4、使用dict.fromkeys(),返回字典,该方法有两个参...
分类:
编程语言 时间:
2014-09-27 18:40:21
收藏:
0 评论:
0 赞:
0 阅读:
754
在Python中,读取文件使用open函数1 file=open(r'E:\temp\test.txt','r')2 var = file.read()3 print(var)4 file.close()第一行打开E:\temp\test.txt文件,注意字符串开头使用了r,r表明字符串内的内容不转...
分类:
编程语言 时间:
2014-09-27 18:39:51
收藏:
0 评论:
0 赞:
0 阅读:
283
(原本准备把内存模型单独放到某一篇文章的某个章节里面讲解,后来查阅了国外很多文档才发现其实JVM内存模型的内容还蛮多的,所以直接作为一个章节的基础知识来讲解,可能该章节概念的东西比较多。一个开发Java的开发者,一旦了解了JVM内存模型就能够更加深入地了解该语言的语言特性,可能这个章节更多的是概念,...
分类:
编程语言 时间:
2014-09-27 18:39:11
收藏:
0 评论:
0 赞:
0 阅读:
363
在Python中写文件也是得先打开文件的。1 file=open(r'E:\temp\test.txt','a')2 file.write('append to file')3 file.close()第一行使用追加模式打开文件,第二行则将内容写入文件,第三行关闭文件。除了write方法外,还有wr...
分类:
编程语言 时间:
2014-09-27 18:39:01
收藏:
0 评论:
0 赞:
0 阅读:
366
六、springmvc的注解xml的配置→注解1、新建一个配置文件还是在config下新建springAnnotation-servlet.xmlweb.xml 修改初始化为classpath*:config/springAnnotation-servlet.xmlspringAnnotation-...
分类:
编程语言 时间:
2014-09-27 18:38:21
收藏:
0 评论:
0 赞:
0 阅读:
373
1 //范磊C++ 第3章 2 3 #include "stdafx.h" 4 #include "iostream" 5 6 //3.1 一个简单的函数 7 void show() 8 { 9 std :: cout > a; 33 cin >> b; 34...
分类:
编程语言 时间:
2014-09-27 18:37:51
收藏:
0 评论:
0 赞:
0 阅读:
333
第12题:拥有超过500个因数的第一个三角数(1+2+3+4+......)def findivisionnum(num): count = 0 n=1 import math while count<num: count = 0 for i in...
分类:
编程语言 时间:
2014-09-27 18:36:01
收藏:
0 评论:
0 赞:
0 阅读:
276
#!/usr/bin/envpython
importrandom
importstring
importsys
similar_char=‘0OoiI1LpP‘
upper=‘‘.join(set(string.uppercase)-set(similar_char))
lower=‘‘.join(set(string.lowercase)-set(similar_char))
symbols=‘!#$%&\*+,-./:;=?@^_`~‘
numbers=‘123456789‘
group=(..
分类:
编程语言 时间:
2014-09-27 17:29:31
收藏:
0 评论:
0 赞:
0 阅读:
309
#!/usr/bin/envpython
importsys
importdatetime
importsocket
fromfile_backwardsimport*
MONTH={
‘Jan‘:1,
‘Feb‘:2,
‘Mar‘:3,
‘Apr‘:4,
‘May‘:5,
‘Jue‘:6,
‘Jul‘:7,
‘Aug‘:8,
‘Sep‘:9,
‘Oct‘:10,
‘Nov‘:11,
‘Dec‘:12,
}
defparse_apache_date(datestr):
day,..
分类:
编程语言 时间:
2014-09-27 17:28:21
收藏:
0 评论:
0 赞:
0 阅读:
297
#!/usr/bin/envpython
fromsubprocessimportPopen,PIPE
importurllib,urllib2
importshlex,re
defgetIfconfig():
p=Popen([‘ifconfig‘],stdout=PIPE)
returnp.stdout.read().split(‘\n\n‘)
defparseIfconfig(data):
macaddr=data.split(‘\n‘)[0].split()[-1]
ipaddr=data.spl..
分类:
编程语言 时间:
2014-09-27 17:27:51
收藏:
0 评论:
0 赞:
0 阅读:
354
#!/usr/bin/envpython
importshlex
fromsubprocessimportPopen,PIPE
defget_ps():
cmd=‘psax-opid,ppid,cmd‘
p=Popen(shlex.split(cmd),stdout=PIPE)
returnp.stdout.readlines()[1:]
defsplit(s):
s=s.split()
returns[0],s[1],‘‘.join(s[2:])
defparser_ps(data):
p..
分类:
编程语言 时间:
2014-09-27 17:27:41
收藏:
0 评论:
0 赞:
0 阅读:
382
#!/usr/bin/python
importlibvirt
conn=libvirt.open(‘qemu:///system‘)
xmldesc=‘‘‘
<domaintype=‘kvm‘>
<name>centos_6.5</name>
<memoryunit=‘KiB‘>524288</memory>
<currentMemoryunit=‘KiB‘>524288</currentMemory>
<vcpupl..
分类:
编程语言 时间:
2014-09-27 17:27:32
收藏:
0 评论:
0 赞:
0 阅读:
293
目录:1.把一个数组的值赋值给一颗二叉树2.具体代码1.树的构建方法package tree;import java.util.LinkedList;import java.util.List;/** * 功能:把一个数组的值存入二叉树中,然后进行3种方式的遍历 * * 参考资料0:数据结构(C语....
分类:
编程语言 时间:
2014-09-27 17:22:01
收藏:
0 评论:
0 赞:
0 阅读:
311
execution中第一个*表示任何返回类型.要注意一点,类名需要用一个.占位再如:save*(..):以save开头的方法
分类:
编程语言 时间:
2014-09-27 17:20:41
收藏:
0 评论:
0 赞:
0 阅读:
319
dojo/_base/declare模块是在Dojo Toolkit中创建类的基石。declare允许多重继承,允许开发者创建灵活的代码避免重复造轮子。Dojo,Dijit和Dojox中的模块都使用了declare;在本教程中,你将学到为什么你也应该使用它。
分类:
编程语言 时间:
2014-09-27 17:20:31
收藏:
0 评论:
0 赞:
0 阅读:
321
1、编写一个tab的自动补全脚本,名为tab.py#!/usr/bin/python # python tab complete import sys import readline import rlcompleter import atexit import os # tab completio...
分类:
编程语言 时间:
2014-09-27 17:19:11
收藏:
0 评论:
0 赞:
0 阅读:
297
1、因为人数不定,所以需要用到线性表或者链表,粗看之下,链表似乎效率高(事实貌似未必。。。)2、用一个package存放链表的定义,其中MyList为接口,MyAbstractList 实现接口,MyLinedList 继承MyAbstraList3、刚百度了下接口和继承的区别,原来java不能多重...
分类:
编程语言 时间:
2014-09-27 17:19:01
收藏:
0 评论:
0 赞:
0 阅读:
290
Python是一门面向对象语言,那么作为面向对象的特征——类也是有的。值得注意的是Python中一切皆对象,并不像C#中为了性能考虑,int这些在Python中也是对象。(C#中int是结构体)如何定义一个类:1 class Person:2 pass使用class关键字,上面定义了一个Pe...
分类:
编程语言 时间:
2014-09-27 17:17:41
收藏:
0 评论:
0 赞:
0 阅读:
288