Action接口:publicinterfaceAction{publicStringexecute(Stringstr);}Action的两个实现publicclassUpperActionimplementsAction{privateStringmessage;publicStringgetMessage(){returnmessage;}publicvoidsetMessage(Stringstring){message=string;}publicStringexecute(Stri..
分类:
编程语言 时间:
2014-05-13 03:17:13
收藏:
0 评论:
0 赞:
0 阅读:
349
一、没有使用克隆带来的问题publicclassCloneTest{staticStudents=newStudent("aaa",20);//直接赋值带来的问题publicstaticvoidnoclone(){//传的是引用的副本,改变了noCloneStudent也改变了sStudentnoCloneStudent=newStudent();noCloneStudent=s;noCloneStudent.setName("bbb..
分类:
编程语言 时间:
2014-05-13 03:08:58
收藏:
0 评论:
0 赞:
0 阅读:
439
如今,基于Web的应用越来越多,传统的Html已经满足不了如今的需求。我们需要一个交互式的Web,于是便诞生了各种Web语言。如Asp,Jsp,Php等。当然,这些语言与传统的语言有着密切的联系,如Php基于C和C语言,Jsp基于Java语言。Tomcat即是一个Jsp和Servlet的运行平台。Tomcat是..
分类:
其他 时间:
2014-05-13 05:00:49
收藏:
0 评论:
0 赞:
0 阅读:
475
NFS与PRCNFS就是(NetworkFileSystem的缩写,最初是由sum这家公司所发展起来的。它最大的功能就是可能通过网络,让不同的机器、不同的操作系统可以共享彼此的文件。NFS是通过网络来传输数据的,那么NFS使用哪个端口来进行数据传输呢?基本上NFS这个服务器的端口开在2049,但是..
分类:
其他 时间:
2014-05-13 03:29:36
收藏:
0 评论:
0 赞:
0 阅读:
385
表驱动法:是一种编程模式将选择条件ifelse查表换成直接查表switch(month){case1,3,5,7,8,10,12:day=30;break;case2:day=28;break;default:day=30;break;}换成:day【mouthLen】={31283130313031,,,}
分类:
其他 时间:
2014-05-13 04:13:38
收藏:
0 评论:
0 赞:
0 阅读:
360
importjava.io.FileNotFoundException;
importjava.io.FileOutputStream;
importjava.io.IOException;
importandroid.R.integer;
importandroid.content.Context;
importandroid.os.Environment;
publicclassFileService{
privateContextcontext;
publicFileService(Contextcon..
分类:
移动平台 时间:
2014-05-13 02:59:48
收藏:
0 评论:
0 赞:
0 阅读:
538
Q1:SectorCount->>CapacitySectorCount*SectorSize=totalbytes2097152*512=1073741824/1024/1024/1024=1GBQ2:Capacity->>SectorCountConverttototalbytes/sectorsize=SectorCount1GB*1024*1024*1024(bytes)=1073741824/512=2097152
分类:
其他 时间:
2014-05-13 04:33:13
收藏:
0 评论:
0 赞:
0 阅读:
409
今天朋友公司做内网,需求是mail跟文件共享,之前在MicrosoftWindowsServer2003部署MagicWinmail4.7的时候基本很简单,装完简单配置就能正常使用。想到2003显得太陈旧了于是给朋友公司做了个MicrosoftWindowsServer2008X86Enterprise版本的服务器,安装完MagicWinmail之后发现..
分类:
Windows开发 时间:
2014-05-13 02:01:23
收藏:
0 评论:
0 赞:
0 阅读:
495
3.1概述读和写是I/O的基本过程。从一个通道中读取很简单:只需创建一个缓冲区,然后让通道将数据读到这个缓冲区中。写入也相当简单:创建一个缓冲区,用数据填充它,然后让通道用这些数据来执行写入操作。在本节中,我们将学习有关在Java程序中读取和写入数据的一些知识。我们..
分类:
其他 时间:
2014-05-13 01:29:33
收藏:
0 评论:
0 赞:
0 阅读:
404
最近的项目开发中,遇到了一个多文件上传的问题,即在不刷新页面的情况下,上传多个文件至服务器。现总结分享如下:本文主要采用了基于jsp的ajax,jquery,servlet等技术。1.upload.jsp点击上传时,调用对应的fileupload函数,通过ajax将文件异步传送到servlet中处理。注意在文..
分类:
Web开发 时间:
2014-05-13 03:23:22
收藏:
0 评论:
0 赞:
0 阅读:
549
#!/usr/bin/envpython#coding:utf8importsmtplib,sysfromemail.mime.textimportMIMETextfromconfig.mailssimportmail_list,contentdefsend_mail():mail_host,mail_user,mail_pass,mail_postfix,sub,me,mailto_list=mail_listme=mail_user+"<"+mail_user+"@"+mail_postfix+"&..
分类:
编程语言 时间:
2014-05-13 02:41:19
收藏:
0 评论:
0 赞:
0 阅读:
646
#!/usr/bin/envpython#coding:utf8#此脚本为查找递归目录下所有文件匹配的内容importos,sys,tabdefpaths(path):list_path=os.walk(path)all_file=[]forp,d,flinlist_path:forfinfl:pfile=os.path.join(p,f)ifos.path.isdir(pfile):paths(pfile)all_file.append(pfile)returnall..
分类:
编程语言 时间:
2014-05-13 03:50:03
收藏:
0 评论:
0 赞:
0 阅读:
528
OneofthefilesthattheaverageUnixsysadminrarelylooksat,almostneverchangesandyetdependsoneverytimeheorsherebootsasystemisthe/etc/inittabfile.Thismodestlittlefilecontrolswhathappenswheneverasystemisrebootedorforcedtochangerunlevels.Let‘stakealookattheconfigurat..
分类:
系统服务 时间:
2014-05-13 04:47:30
收藏:
0 评论:
0 赞:
0 阅读:
526
#!/usr/bin/envpython#coding:utf8importos,sysimportdatetime,shutil,subprocessfromconfig.configimportslow_configclasscut_mysql(object):mysql_user,mysql_pass,date_day,slow_log_name,slow_log_path,mysqlsla_log_name,mysqldumpslow_log_name,new_log_path,new_log_nam..
分类:
数据库技术 时间:
2014-05-13 02:40:18
收藏:
0 评论:
0 赞:
0 阅读:
1656
#!/usr/bin/envpython#coding:utf8fromoptparseimportOptionParserimportsys,os#parser=OptionParser()defset():parser=OptionParser("Usage:%prog[file1][file2]...")parser.add_option("-c","--chars",dest="characters",action="store_true",default=False,help="onlycountc..
分类:
编程语言 时间:
2014-05-13 04:32:13
收藏:
0 评论:
0 赞:
0 阅读:
579
Fromtimetotime,peoplewantmetocreateLINUXinitscriptsforthem.Iusuallyjusttakeanexistingoneforanotherserviceandchangeituptoworkformynewapplication,butmostofthemhavebecomesolongthesedaysthatIenduphavingtohackoutatonofcodejusttoreducethemdowntotheverybasicscript..
分类:
系统服务 时间:
2014-05-13 04:00:22
收藏:
0 评论:
0 赞:
0 阅读:
500
#!/usr/bin/envpython#coding:utf8importos,sysimportmd5,tabfrommysql_co.my_dbimportset_mysqlfromssh_co.ssh_connectimportsshdfromssh_co.cfg.configimportssh_message,item_pathfromfileimportfindfiledefmy_mysql():db_file={}my_connect=set_mysql()f_file=findfile.mai..
分类:
编程语言 时间:
2014-05-13 01:44:53
收藏:
0 评论:
0 赞:
0 阅读:
483
ThisisourongoingLinuxcommandserieswherewearegoingtoreviewhowwecanusechkconfigcommandefficientlywithit’savailableparameters.TheChkconfigcommandtoolallowstoconfigureservicesstartandstopautomaticallyinthe/etc/rd.d/init.dscriptsthroughcommandline.Let’sseesome..
分类:
系统服务 时间:
2014-05-13 04:27:04
收藏:
0 评论:
0 赞:
0 阅读:
525
#!/usr/bin/envpython#coding:utf8#随机生成自定义长度密码fromrandomimportchoiceimportstring,pickledefGenPassword(length=8,chars=string.ascii_letters+string.digits):return‘‘.join([choice(chars)foriinrange(length)])defpasslist(r_user,c_user,ip_list,web_list):di..
分类:
编程语言 时间:
2014-05-13 01:26:26
收藏:
0 评论:
0 赞:
0 阅读:
669
母亲节礼物太强大了,老妈很高兴。她说:贺卡上的话写的真好,平时亲人都很难说出口。在这里感谢软件学院,感谢物联网研究院。平时工作很忙,确实很少陪老人,今天下午还去单位加了半天班。把最近的工作进展跟老爸聊了聊,他听了很高兴。最近虽然很累,但是这一切都值了。
分类:
其他 时间:
2014-05-13 01:46:58
收藏:
0 评论:
0 赞:
0 阅读:
256