首页 > 编程语言
python中的自定义函数
1格式:deffunctionName(参数列表):方法体例子1:>>>defgreet_user(): print(“hello”) >>>greet_user() hello例子2:>>>defgreet_user(username):#username形参 print(“hello,”+username+“!”) >>>greet_user(“zhangsan”)#zhangsan..
分类:编程语言   时间:2017-02-22 15:35:19    收藏:0  评论:0  赞:0  阅读:163
FineReport中如何用JavaScript自定义地图标签
在日常使用地图过程中,通常会遇到地图标签,提示点等显示不满足我们的需求,需要进行JavaScript代码编写。例如:在使用地图过程中,会发现很多地名显示的位置偏离。这时候就需要使用JavaScript进行调控。以黑龙江和内蒙古为例,来介绍下如何在FineReport中利用JavaScript自定..
分类:编程语言   时间:2017-02-22 15:34:09    收藏:0  评论:0  赞:0  阅读:157
python内置函数5-filter()
Helponbuilt-infunctionfilterinmodule__builtin__:filter(...)filter(functionorNone,sequence)->list,tuple,orstringReturnthoseitemsofsequenceforwhichfunction(item)istrue.IffunctionisNone,returntheitemsthataretrue.Ifsequenceisatupleorstring,returnthesametype,..
分类:编程语言   时间:2017-02-22 15:33:20    收藏:0  评论:0  赞:0  阅读:148
python requests模块详解
requests是python的一个HTTP客户端库,跟urllib,urllib2类似,那为什么要用requests而不用urllib2呢?官方文档中是这样说明的:python的标准库urllib2提供了大部分需要的HTTP功能,但是API太逆天了,一个简单的功能就需要一大堆代码。我也看了下requests的文档,确实很简单,..
分类:编程语言   时间:2017-02-22 15:32:42    收藏:0  评论:0  赞:0  阅读:306
python内置函数5-float()
Helponclassfloatinmodule__builtin__:classfloat(object)|float(x)->floatingpointnumber||Convertastringornumbertoafloatingpointnumber,ifpossible.||Methodsdefinedhere:||__abs__(...)|x.__abs__()<==>abs(x)||__add__(...)|x.__add__(y)<==>x+y||__coerc..
分类:编程语言   时间:2017-02-22 15:31:35    收藏:0  评论:0  赞:0  阅读:124
C++动态库初探
近期公司需要开发三方动态库接口,虽然未分配到我的身上,但还是饶有兴趣的回忆了一下C++,并尝试使用VisualC++开发一个小的动态库接口例子。以下就是这几日开发经验。第一步在VisualC++下创建动态库项目;第二步创建动态库方法执行代码;第三步创建C#console项目创建NativeMetho..
分类:编程语言   时间:2017-02-22 15:31:04    收藏:0  评论:0  赞:0  阅读:233
python内置函数5-format()
Helponbuilt-infunctionformatinmodule__builtin__:format(...)format(value[,format_spec])->stringReturnsvalue.__format__(format_spec)format_specdefaultsto""format(value[,format_spec])Convertavaluetoa“formatted”representation,ascontrolledbyformat_spec.Thei..
分类:编程语言   时间:2017-02-22 15:28:02    收藏:0  评论:0  赞:0  阅读:198
python内置函数5-frozenset()
Helponclassfrozensetinmodule__builtin__:classfrozenset(object)|frozenset()->emptyfrozensetobject|frozenset(iterable)->frozensetobject||Buildanimmutableunorderedcollectionofuniqueelements.||Methodsdefinedhere:||__and__(...)|x.__and__(y)<==>x&..
分类:编程语言   时间:2017-02-22 15:27:11    收藏:0  评论:0  赞:0  阅读:165
python内置函数5-getattr()
Helponbuilt-infunctiongetattrinmodule__builtin__:getattr(...)getattr(object,name[,default])->valueGetanamedattributefromanobject;getattr(x,‘y‘)isequivalenttox.y.Whenadefaultargumentisgiven,itisreturnedwhentheattributedoesn‘texist;withoutit,anexceptionisr..
分类:编程语言   时间:2017-02-22 15:26:22    收藏:0  评论:0  赞:0  阅读:157
java线程状态
从java.lang.Thread.State可以看到java线程有以下状态:NEW Athreadthathasnotyetstartedisinthisstate.RUNNABLE AthreadexecutingintheJavavirtualmachineisinthisstate.BLOCKED Athreadthatisblockedwaitingforamonitorlock isinthisstate.WAITING Athreadthatiswaitingindef..
分类:编程语言   时间:2017-02-22 15:24:45    收藏:0  评论:0  赞:0  阅读:254
RxJava操作符——条件和布尔操作符(Conditional and Boolean Operators)
AllAll操作符根据一个函数对源Observable发射的所有数据进行判断,最终返回的结果就是这个判断结果。这个函数使用发射的数据作为参数,内部判断所有的数据是否满足我们定义好的判断条件,如果全部都...
分类:编程语言   时间:2017-02-22 15:11:52    收藏:0  评论:0  赞:0  阅读:267
python空格替换
','.join(filter(lambda x: x, a.split(' '))) ...
分类:编程语言   时间:2017-02-22 15:07:55    收藏:0  评论:0  赞:0  阅读:223
C++中的深拷贝和浅拷贝 QT中的深拷贝,浅拷贝和隐式共享
下面是C++中定义的深,浅拷贝 当用一个已初始化过了的自定义类类型对象去初始化另一个新构造的对象的时候,拷贝构造函数就会被自动调用。也就是说,当类的对象需要拷贝时,拷贝构造函数将会被调用。以下情况都会调用拷贝构造函数: (1)一个对象以值传递的方式传入函数体 (2)一个对象以值传递的方式从函数返回 ...
分类:编程语言   时间:2017-02-22 15:07:08    收藏:0  评论:0  赞:0  阅读:560
线程和进程的关系
在多个CPU的主机上,线程是可以同时执行的。 多线程对于多进程的优点: 1、在多进程的情况下,每个进程都有自己的地址空间。而在多线程情况下,同一进程内的线程共享进程的地址空间, 因此,创建一个新的进程要耗费时间来为其分配系统资源,而创建一个新的线程花费的时间要少得多。 2、在系统调度方面,由于进程拥 ...
分类:编程语言   时间:2017-02-22 14:23:14    收藏:0  评论:0  赞:0  阅读:116
学习spring之前必学之反射技术(一)
引述要学习Spring框架的技术内幕,必须事先掌握一些基本的Java知识,正所谓“登高必自卑,涉远必自迩”。 以下几项Java知识和Spring框架息息相关,不可不学 Java语言允许通过程序化的方式间接对Class进行操作,Class文件由类装载器装载后,在JVM中将形成一份 描述Class结构的 ...
分类:编程语言   时间:2017-02-22 14:20:12    收藏:0  评论:0  赞:0  阅读:129
【java规则引擎】java规则引擎搭建开发环境
Drools官网:http://www.jboss.org/drools Drools and jBPM consist out of several projects:(Drools软件包提供的几个部分的功能) Drools Guvnor (Business Rules Manager) (规则集 ...
分类:编程语言   时间:2017-02-22 13:36:33    收藏:0  评论:0  赞:0  阅读:254
java中的关键字 -- static
基本介绍 static关键字通常来注明一个class内的某个field或者某个方法是不依赖于对象的建立的。换句话说,无论我们是否创造了该class的一个具体的实例, static的值或者方法都可以被我们调用: 需要注意的是,由于一个值被注明了static,程序在运行时也只会为这个值安排一个特定且唯一 ...
分类:编程语言   时间:2017-02-22 13:28:23    收藏:0  评论:0  赞:0  阅读:131
问题 : lang.NoClassDefFoundError: org/springframework/core/annotation/AnnotatedElementUtils,的解决方法
今天在做junit 测试的时候 出现了一个问题,花了一段时间 才解决。 java.lang.NoClassDefFoundError: org/springframework/core/annotation/AnnotatedElementUtils at org.springframework.t ...
分类:编程语言   时间:2017-02-22 13:27:48    收藏:0  评论:0  赞:0  阅读:1191
POCO c++ 使用例子
1.定时器 #include "Poco/Timer.h" #include "Poco/Thread.h" using Poco::Timer; using Poco::TimerCallback; class TimerExample { public: void onT... ...
分类:编程语言   时间:2017-02-22 13:26:29    收藏:0  评论:0  赞:1  阅读:1726
【eclipse】 怎么解决java.lang.NoClassDefFoundError错误
前言 在日常Java开 发中,我们经常碰到java.lang.NoClassDefFoundError这样的错误,需要花费很多时间去找错误的原因,具体是哪个类不见了?类 明明还在,为什么找不到?而且我们很容易把java.lang.NoClassDefFoundError和 java.lang.Cla ...
分类:编程语言   时间:2017-02-22 13:26:09    收藏:0  评论:0  赞:0  阅读:275
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!