首页 > 编程语言
Java设计模式(03--工厂模式)
工厂模式概念:实例化对象用工厂代替new操作。工厂模式分为工厂方法模式和抽象工厂模式,抽象工厂模式是工厂方法模式的拓展。 工厂模式的意图:定义一个接口来创建对象,但是让子类决定哪些类需要被实例化。工厂方法让实例化的工作推迟到子类中去实现。 什么情况下适合工厂模式?·有一组类似的对象需要创建。·在编码 ...
分类:编程语言   时间:2017-02-21 00:24:15    收藏:0  评论:0  赞:0  阅读:334
简学Python第三章__函数式编程、递归、内置函数
Python第三章__函数式编程、递归、闭包 欢迎加入Linux_Python学习群 群号:478616847 目录: 函数式编程 传参与返回值 递归 匿名函数 闭包 高阶函数 内置函数 函数式编程 传参与返回值 递归 匿名函数 高阶函数 内置函数 在第三章,我们引入新的概念函数,在以往的代码编写中 ...
分类:编程语言   时间:2017-02-21 00:23:53    收藏:0  评论:0  赞:0  阅读:479
利用正则表达式编写python 爬虫,抓取网页电话号码!
利用正则表达式编写python爬虫,抓取网页联系我们电话号码!这里以九奥科技(www.jiuaoo.com)为例,抓犬联系我们’里面的电话号码,并输出。#!/usrweilie/bin/python #coding=utf-8 importre importurllib defgethtml(url):#获取网页html jiuaoopage=urllib.urlopen(url) html..
分类:编程语言   时间:2017-02-20 23:38:57    收藏:0  评论:0  赞:0  阅读:1552
SpringMVC template和HttpClient post提交
服务器的接口如果是springmvc客户端除了用springmvc提供的RestTemplate请求如下publicclassRestClient{privatestaticLoggerlogger=Logger.getLogger(RestClient.class);@SuppressWarnings({rawtypes,unchecked})publicstaticObjectpost(Stringurl,Map<string,object="">m..
分类:编程语言   时间:2017-02-20 23:37:48    收藏:0  评论:0  赞:0  阅读:436
R语言 选取某一行的最大值
可以先自定义函数,也可以用的时候再定义。>mat<-matrix(c(1:3,7:9,4:6),byrow=T,nc=3) >mat [,1][,2][,3] [1,]123 [2,]789 [3,]456 >apply(mat,2,function(x){order(x,decreasing=T)[1]})#查找每一列 [1]222 >apply(mat,1,function(x){order(x,decreasing=T..
分类:编程语言   时间:2017-02-20 23:37:05    收藏:0  评论:0  赞:0  阅读:1607
eclipse中内存溢出java.lang.OutOfMemoryError: PermGen space解决
设置tomcat的时候,应该点击server的配置,配置下我标红的地方就好了。-Xms256M-Xmx512M-XX:PermSize=256m-XX:MaxPermSize=512m
分类:编程语言   时间:2017-02-20 23:36:06    收藏:0  评论:0  赞:0  阅读:275
Java动态代理 - 注意点
如果实现的接口是non-public的。那么接口跟proxyclass必须在同一个包里。如果在不同接口中有相同的Methodsignature,当有一个的反回类型是void或primitivetype时,其他的必须一样。如果不是上叙情况,那么其中必须有一个类型是可以assign给其他类型的。实现的接口数是由虚拟机..
分类:编程语言   时间:2017-02-20 23:35:11    收藏:0  评论:0  赞:0  阅读:249
SpringMVC 解决GET请求时中文乱码的问题
<filter><filter-name>CharacterEncoding</filter-name><filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class><init-param><param-name>encoding</param-name><param-value>UTF-8</..
分类:编程语言   时间:2017-02-20 23:34:33    收藏:0  评论:0  赞:0  阅读:251
python内置函数3-cmp()
Helponbuilt-infunctioncmpinmodule__builtin__:cmp(...)cmp(x,y)->integerReturnnegativeifx<y,zeroifx==y,positiveifx>y.cmp(x,y)Comparethetwoobjectsxandyandreturnanintegeraccordingtotheoutcome.Thereturnvalueisnegativeifx<y,zeroifx==yandstrictlypositi..
分类:编程语言   时间:2017-02-20 23:28:50    收藏:0  评论:0  赞:0  阅读:269
python内置函数3-compile()
Helponbuilt-infunctioncompileinmodule__builtin__:compile(...)compile(source,filename,mode[,flags[,dont_inherit]])->codeobjectCompilethesourcestring(aPythonmodule,statementorexpression)intoacodeobjectthatcanbeexecutedbytheexecstatementoreval().Thefilename..
分类:编程语言   时间:2017-02-20 23:27:52    收藏:0  评论:0  赞:0  阅读:210
python内置函数3-complex()
Helponclasscomplexinmodule__builtin__:classcomplex(object)|complex(real[,imag])->complexnumber||Createacomplexnumberfromarealpartandanoptionalimaginarypart.|Thisisequivalentto(real+imag*1j)whereimagdefaultsto0.||Methodsdefinedhere:||__abs__(...)|x.__abs_..
分类:编程语言   时间:2017-02-20 23:27:01    收藏:0  评论:0  赞:0  阅读:281
影响JavaScript应用可扩展性因素
引言:JavaScript应用变得越来越庞大。这是因为使用JavaScript能做的事情远比我们大多数人所需求的要多得多。我们不能仅因为技术上可行,就去考虑软件系统的扩展问题。为一个不需要扩展的系统增加扩展性是不值得的,尤其对最终用户来说,这只会使系统显得更加笨重。本文选自《..
分类:编程语言   时间:2017-02-20 23:25:18    收藏:0  评论:0  赞:0  阅读:234
python内置函数3-delattr()
Helponbuilt-infunctiondelattrinmodule__builtin__:delattr(...)delattr(object,name)Deleteanamedattributeonanobject;delattr(x,‘y‘)isequivalentto``delx.y‘‘.delattr(object,name)Thisisarelativeofsetattr().Theargumentsareanobjectandastring.Thestringmustbethenameof..
分类:编程语言   时间:2017-02-20 23:25:06    收藏:0  评论:0  赞:0  阅读:224
python读取excel表格的数据
1.在Windows命令行中安装第三方模块xlrd,先切到python安装目录(Python34),然后切到Scripts,然后输入命令easy_installxlrd按回车进行安装安装完成2.新建一个excel表,然后保存,造数据3.编写python脚本#utf-8importxlrd#导入第三方模块xlrdexcel=xlrd.open_workbook(‘C:\\..
分类:编程语言   时间:2017-02-20 23:24:32    收藏:0  评论:0  赞:0  阅读:205
python读取excel表格的数据
1.在Windows命令行中安装第三方模块xlrd,先切到python安装目录(Python34),然后切到Scripts,然后输入命令easy_installxlrd按回车进行安装安装完成2.新建一个excel表,然后保存,造数据3.编写python脚本#utf-8importxlrd#导入第三方模块xlrdexcel=xlrd.open_workbook(‘C:\\..
分类:编程语言   时间:2017-02-20 23:24:16    收藏:0  评论:0  赞:0  阅读:299
Spring-ehcache RMI形式的分布式缓存配置
ehcache所需jar:ehchache-core和spring注解所需spring-context<dependency> <groupId>net.sf.ehcache</groupId> <artifactId>ehcache-core</artifactId> <version>2.6.6</version> </dependency> <dependency> <gro..
分类:编程语言   时间:2017-02-20 23:24:04    收藏:0  评论:0  赞:0  阅读:270
python内置函数3-dir()
Helponbuilt-infunctiondirinmodule__builtin__:dir(...)dir([object])->listofstringsIfcalledwithoutanargument,returnthenamesinthecurrentscope.Else,returnanalphabetizedlistofnamescomprising(someof)theattributesofthegivenobject,andofattributesreachablefromit...
分类:编程语言   时间:2017-02-20 23:23:47    收藏:0  评论:0  赞:0  阅读:309
多种脚本语言生成九九乘法口诀表
一、语言种类不断的完善中…………1、CentOS7AWK[xqliu@virtual01Desktop]$awk‘BEGIN{for(n=0;n<9;n++){m=n+1;for(i=0;i++<m;)printfi"x"m"="i*m"";print""}}‘1x1=11x2=22x2=41x3=32x3=63x3=91x4=42x4=83x4=124x4=161x5=52x5=103x5=154x5=205x5=251x6=62x6=123x6=184x6=2..
分类:编程语言   时间:2017-02-20 23:23:30    收藏:0  评论:0  赞:0  阅读:253
Windows 系统下配置python环境变量
在Dos中,输入setpath=%path%;C:\python36,其中红字部分为python的安装路径
分类:编程语言   时间:2017-02-20 23:23:02    收藏:0  评论:0  赞:0  阅读:266
python读取excel表格的数据
1.在Windows命令行中安装第三方模块xlrd,先切到python安装目录(Python34),然后切到Scripts,然后输入命令easy_installxlrd按回车进行安装安装完成2.新建一个excel表,然后保存,造数据3.编写python脚本#utf-8importxlrd#导入第三方模块xlrdexcel=xlrd.open_workbook(‘C:\\..
分类:编程语言   时间:2017-02-20 23:22:49    收藏:0  评论:0  赞:0  阅读:253
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!