- 用Python搞定接口自动化测试:轻松实现RPC协议接口测试_python测试rpc接口
2401_84141210
程序员rpc网络协议网络
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。需要这份系统化的资料的朋友,可以戳这里获取一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!Hessian是一款基于HTTP协议的RPC框架,采
- python调用pyd文件_python的py文件生成pyd文件,pycharm直接调用pyd文件
weixin_39799561
python调用pyd文件
这段时间做接口自动化测试,用python直接调用接口,sign值是经过系列复杂算法加密后生成的字符串,保密级别高,不能直接以py文件供大家调用~~pyc文件呢,很容易就被反编译了,pyd文件和一般dll类似,不容易被反编译。生成pyd很容易,网上百度一堆堆,但是调用pyd文件会遇到好多错误。在此贴一下生成pyd到调用pyd文件的方法供参考:1.新建一个setup.py文件:#用cpython生成p
- 接口自动化测试(Python+Requests+Unittest)
2401_85125308
python开发语言
expect_result=“华晨金杯汽车花朵朵”actual_result=result[“data”][0][“comment”][“user_name”]print(actual_result)ifexpect_result==actual_result:print(“pass!”)else:print(“failed!”)运行结果:{‘message’:‘success’,‘err_no’
- JMeter 接口自动化测试:以搜索功能为例的实现思路详解
锦都不二
jmeter
在软件开发和测试领域,接口自动化测试是确保系统间交互顺畅、提高测试效率的重要手段。ApacheJMeter是一款广受欢迎的开源性能测试工具,它不仅能够进行负载测试,也支持接口测试。本文将以一个典型的搜索功能为例,详细解析如何使用JMeter实现接口自动化测试,从功能分析到抓取接口,再到配置与执行测试。1.功能需求分析首先,明确搜索功能的基本需求:用户输入关键词,系统根据关键词检索数据库或索引,并返
- Jmeter进阶-接口自动化
俊俏的萌妹纸
jmeter自动化运维
JMeter是一款广泛使用的开源软件,它不仅可以用于性能测试,还可以用于接口自动化测试。以下是JMeter进行接口自动化测试的一些优缺点:优点:易用性:JMeter上手简单,大部分操作都有对应的元件帮助完成,开源且社区接受度高。灵活性:提供BeanShell脚本能力,允许自定义扩展新的协议支持,比如Dubbo协议的JMeter插件。支持多种协议:除了HTTP,还支持JDBC等,能够将测试结果存入数
- pytest学习笔记--接口自动化测试基础之日志封装学习
鐵馬冰河
笔记学习python功能测试
目录logging实例配置日志级别参数可写str或者int类型Handler对象常用的handler实例对象给handler对象设置日志级别给handler对象设置日志输出格式logging配置error级别以上日志发送邮件logging实例配置日志级别参数可写str或者int类型logger.setLevel(level)方法配置过滤日志级别根据源码可以看到参数level可以使int类型或者st
- Jmeter+ant+jenkins接口自动化测试框架
测试老哥
jmeterjenkinspython软件测试自动化测试测试用例压力测试
视频学习:文末有免费的配套视频可观看点击文末小卡片,免费获取软件测试全套资料,资料在手,涨薪更快大致思路:Jmeter可以做接口测试,也能做压力测试,而且是开源软件;Ant是基与java的构建工具,完成脚本执行并收集结果生成报告,可以跨平台,Jenkins是持续集成工具。将这三者结合起来可以搭建一套WebHTTP接口测试的持续构建环境,实现接口自动化测试,pc系统Windows。1、安装就jmet
- 基于LangChain手工测试用例转接口自动化测试生成工具!
小码哥说测试
技术分享测试面试自动化测试langchain测试用例功能测试集成测试测试工具软件测试接口测试
接口自动化测试用例是一个老生常谈的问题,在未引入人工智能之前,也有非常多的生成方案,比如如下所示,通过har生成接口自动化测试用例:但是以上的生成方式依然是有一些弊端,比如har本身虽然能表述一定的接口信息和业务信息,但是毕竟无法用来表述全部的应用场景与用例场景。而大部分的应用场景和用例场景,均是通过自然语言进行描述的。而解析自然语言,则是大语言模型擅长做的事情。实践演练需求说明以下内容为3条接口
- 功能测试与自动化测试详解
测试1998
python软件测试职场和发展自动化测试功能测试测试工具测试用例
点击文末小卡片,免费获取软件测试全套资料,资料在手,涨薪更快什么是自动化测试?自动化测试是指利用软件测试工具自动实现全部或部分测试,它是软件测试的一个重要组成部分,能完成许多手工测试无法实现或难以实现的测试。能够正确、合理地实施自动测试,可以快速、全面地对软件进行测试,从而提高软件质量,节省经费,缩短软件发布周期。自动化测试一般分为UI自动化测试和接口自动化测试。UI自动化测试是指基于界面元素的自
- python接口自动化测试 - mock模块基本使用介绍
程序员笑笑
软件测试python服务器apache功能测试软件测试自动化测试程序人生
mock作用解决依赖问题,达到解耦作用当我们测试某个目标接口(模块)时,该接口依赖其他接口,当被依赖的接口未开发完成时,可以用mock模拟被依赖接口,完成目标接口的测试模拟复杂业务的接口当我们测试某个目标接口(模块),该接口依赖一个非常复杂的接口时,可以用mock来模拟这个复杂的业务接口;也解决接口依赖一样的原理单元测试如果某个接口(模块)未开发完成时,又需要编写测试用例,则可以通过mock模拟该
- python生成jmeter测试脚本----(一)
可遇_不可求
pythonjmeter开发语言
引言之前的文章写了pytest-bdd做接口自动化测试,最近有个想法,用接口测试框架的接口信息,生产jmeter测试脚本,这样有了接口测试用例后,可以自动生成性能测试脚本。进行性能测试。分析使用jmeter编辑了一个正常的测试脚本,来分析一下jmeter脚本内容。通过上图发现,jmeter脚本就是xml格式的文件,这样我们可以根据生成的脚本,用python直接生成相应格式的脚本,看一下jmeter
- python 接口自动化数据结构(如列表、字典、元组)
测试界晓晓
软件测试python自动化数据结构软件测试自动化测试功能测试程序人生
在Python接口自动化测试中,数据结构扮演着至关重要的角色,用于组织和处理测试数据、请求参数和响应结果。列表(List)列表是Python中的一种可变序列数据类型,它允许存储一系列有序的、可重复的元素,这些元素可以是任何数据类型,包括字符串、数字、布尔值甚至是其他的列表或字典等复杂类型。users_list=['user1','user2','user3']request_urls=['http
- 接口自动化测试实战经验分享,测试用例也能自动生成
心软小念
技术分享自动化测试软件测试测试用例
作为测试,你可能会对以下场景感到似曾相识:开发改好的BUG反复横跳;版本兼容逻辑多,修复一个BUG触发了更多BUG;上线时系统监控毫无异常,过段时间用户投诉某个页面无数据;改动祖传代码时如履薄冰,心智负担极重。为此本文提出一个自动化测试系统,它能够低成本实现100%的测试用例覆盖率,极大减轻管理自动化测试用例的工作量并提高测试效率,保障后台服务平稳变更。欢迎阅读~01背景1.1接口自动化测试介绍顾
- 正交用例生成工具PICT
微笑的AK47
PICT工具一键生成正交试验用例作用:1、解决手动设计大量测试用例、或覆盖不全面问题,提高测试效率2、读取excel,将生成的参数组合自动带入脚本,进行接口自动化测试一、PICT简介PICT工具是在微软公司内部使用的一款承兑组合的命令行生成工具,现在已经对外提供,可以在http://download.microsoft.com/download/f/5/5/f55484df-8494-48fa-8
- python + requests + pytest 接口自动化测试
小卡也很萌
pythonpytest开发语言
测试框架目录目录名称目录内容common1.读取测试用例的方法2.连接数据库的方法(pymysql)3.封装自己的请求4.封装输出日志文件5.读取保存的数据文件封装一些公共方法api存储测试接口case封装测试用例data存放测试数据data.xlsx接口需要用到的字段写进Excellogs存放日志文件report存放测试报告使用
- 怎么做接口自动化测试
Xayh55
postman
在分层测试的“金字塔”模型中,接口测试属于第二层服务集成测试范畴。相比UI层(主要是WEB或APP)自动化测试而言,接口自动化测试收益更大,且容易实现,维护成本低,有着更高的投入产出比,是每个公司开展自动化测试的首选。为了让大家更好地了解接口自动化测试本篇文章以下列三个方面介绍接口自动化测试1、什么是接口自动化测试2、接口自动化测试要素3、常用的落地方案接口自动化测试是什么接口自动化测试,顾名思义
- 好用的UI自动化测试平台推荐
Xayh55
ui
随着软件行业的不断发展,建立一个完善的自动化测试体系变得至关重要。目前,自动化测试主要涵盖接口自动化测试和UI自动化测试两个主要领域。就目前而言,企业在UI自动化测试方面的覆盖率仍然相对较低。接口自动化测试可以模拟和执行应用程序接口的各种操作,以验证接口的功能、性能和稳定性。接口自动化测试主要关注应用程序的后端逻辑和数据交互,而不涉及用户界面。而UI自动化测试是一种利用自动化工具和脚本来模拟和执行
- 接口自动化测试-Pytest核心固件Fixture详解以及应用实战
十一点的氟西汀
接口自动化测试软件测试自动化测试数据库java测试用例python功能测试
目录前言:一、Fixture概述二、Fixture分类在Pytest中,Fixture可以分为4类:三、Fixture使用下面结合实例说明如何使用Fixture。3.1session级别的Fixture3.2module级别的Fixture3.3function级别的Fixture
- 在软件测试过程中如何有效的开展接口自动化测试
测试涛叔
技术分享软件测试jmeter网络协议
一.简介接口自动化测试是指使用自动化测试工具和脚本对软件系统中的接口进行测试的过程。其目的是在软件开发过程中,通过对接口的自动化测试来提高测试效率和测试质量,减少人工测试的工作量和测试成本,并且能够快速发现和修复接口错误,确保软件系统的稳定性和可靠性。接口自动化测试可以有效地支持持续集成和持续交付,帮助团队快速交付高质量的软件产品。二.做接口自动化前的准备确定接口测试的范围和需求1.确定接口测试的
- 面经-软件测试面试常见面试题全套合集系列4-6
测试架构师北凡
接口自动化测试自动化测试面试题jenkins自动化面试职场和发展
前言:软件测试常见面试题到这里就结束了哈,后续·可能会出一个关于自动化测试的,看你们想看什么方面的文字吧,废话不多说直接开始正文。十九、持续集成19.1jenkins+ant+jmeter+svn接口自动化测试?jenkins+ant+jmeter+svn环境搭建原来这个环境是我这边搭建的,主要是几个步骤,第一Jenkins安装、第二,ant安装、第三,jmeter安装、第四,jmeter与ant
- 接口自动化测试框架开发(pytest+allure+aiohttp+ 用例自动生成)
.咖啡加剁椒.
软件测试pytest软件测试自动化测试功能测试程序人生职场和发展
近期准备优先做接口测试的覆盖,为此需要开发一个测试框架,经过思考,这次依然想做点儿不一样的东西。接口测试是比较讲究效率的,测试人员会希望很快能得到结果反馈,然而接口的数量一般都很多,而且会越来越多,所以提高执行效率很有必要接口测试的用例其实也可以用来兼做简单的压力测试,而压力测试需要并发接口测试的用例有很多重复的东西,测试人员应该只需要关注接口测试的设计,这些重复劳动最好自动化来做pytest和a
- 接口01课程简介&接口测试概述
阿登20
一、总的学习背景在测试金字塔模型中分为三层:最底层是单元测试,中间层接口测试,最顶层为UI测试。接口测试位于第二层。接口一般比较稳定,因此接口测试的效益最大,同时接口测试可以跨应用:Web/App跨平台:Win,Mac,Liunx等。本套课程中将会针对接口的基本理论,HTTP协议、接口测试工具、Python接口性能自动化测试来进行综合讲解,让大家全面掌握接口自动化测试。测试金字塔模型如下image
- 接口自动化测试,完整入门篇
.咖啡加剁椒
软件测试功能测试软件测试自动化测试程序人生职场和发展
目录1.什么是接口测试2.基本流程3.需求分析4.用例设计5.脚本开发6.结果分析7.完整脚本8.参考资料1.什么是接口测试顾名思义,接口测试是对系统或组件之间的接口进行测试,主要是校验数据的交换,传递和控制管理过程,以及相互逻辑依赖关系。其中接口协议分为HTTP,WebService,Dubbo,Thrift,Socket等类型,测试类型又主要分为功能测试,性能测试,稳定性测试,安全性测试等。在
- 零基础小白(十三) 串讲unittest/Pytest-数据驱动
巴鶴
接口自动化测试:https://www.jianshu.com/nb/49125734引言数据驱动方式很多,有Excel维护数据,yaml维护数据,今天讲解unittest(ddt)与Pytest(pytest.mark.parametrize())维护数据差异。首先安装ddtpipinstallddt安装ddt.pngunittest数据驱动(ddt)ddt(datadriventest)数据驱
- jmeter接口自动化测试框架
咖啡加剁椒
软件测试jmeter软件测试自动化测试功能测试程序人生职场和发展
接口测试可以分为两部分:一是线上接口(生产环境)自动化测试,需要自动定时执行,每5分钟自动执行一次,相当于每5分钟就检查一遍线上的接口是否正常,有异常能够及时发现,不至于影响用户使用。二是测试环境的接口自动化测试,测试时机可以是1、功能开发完成并提测,检查一边测试环境的所有接口是否正常,有异常则需要解决后再正式介入测试。2、测试完成上线发版前,检查一边测试环境的所有接口是否正常,有异常则需要解决后
- 【自动化】了解接口自动化
记录测试点滴
自动化学习运维
为什么要做接口自动化?满足业务需要快速造数据,减少测试人员造数据成本发布上线前进行冒烟测试回归测试开发修改底层代码,评估不到的范围,自动化进行覆盖下游接口改动,可以及时发现问题做接口自动化前的准备工作?如何做接口自动化测试?1.整理需求需要测试的接口2.制定自动化测试计划和方案3.设计自动化测试用例4.开发自动化脚本,执行脚本并生成报告接口自动化使用的测试框架是什么?主要是用:Python中的un
- python接口自动化测试框架介绍
阿里大叔说测试
python开发语言
之前在项目中搞了一套jmeter+jenkins+git+ant接口自动化测试框架,在项目中运行了大半年了,效果还不错,最近搞了一套requests+unittest+ddt+pymysql+BeautifulReport的接口自动化测试框架,测试用例在yaml文件中,支持数据驱动、连数据库查询。目前框架还不是特别完善,需要在后续的使用中一步步优化,目前尚未使用jenkins做集成,后续结合jen
- RF-接口自动化测试-「Body Data格式」
测试界
接口自动化测试首先需要安装RequestsLibrary库pipinstallrobotframework-requests「BodyData格式」的实践中,使用了自定义的library,兼容了socket协议;关键字封装里面使用了python代码段,兼容了webservice协议;这次就分享下library和封装的关键字,具体的case牵涉到业务层数据,就不展示了。自定义library:除了有s
- python接口自动化测试--基于加密接口的测试用例设计
奶茶半分甜
python接口自动化python自动化开发语言
环境准备在进行实战之前,需要先准备一个对响应加密的接口。对它发起一个get请求后,得到一个加密过后的响应信息。先准备一个JSON格式demo:{"topics":{"orange":"movie","shool":"testing-studio","president":"seveniruby"}}使用base64对其做加密,得到一个加密后的文件demo64.txtbase64demo.json>
- Python测试框架之pytest(一)-晒酷学院
晒酷学院
pytest是一个非常成熟的全功能的python测试框架,主要有以下几个特点:简单灵活,容易上手支持参数化能够支持简单的单元测试和复杂的功能测试,还可以用来做selenium/appium等自动化测试,接口自动化测试(pytest+request)pytest具有很多第三方插件,并且可以自定义扩展,比较好用的如pytest-selenium(集成selenium)、pytest-html(完美ht
- jvm调优总结(从基本概念 到 深度优化)
oloz
javajvmjdk虚拟机应用服务器
JVM参数详解:http://www.cnblogs.com/redcreen/archive/2011/05/04/2037057.html
Java虚拟机中,数据类型可以分为两类:基本类型和引用类型。基本类型的变量保存原始值,即:他代表的值就是数值本身;而引用类型的变量保存引用值。“引用值”代表了某个对象的引用,而不是对象本身,对象本身存放在这个引用值所表示的地址的位置。
- 【Scala十六】Scala核心十:柯里化函数
bit1129
scala
本篇文章重点说明什么是函数柯里化,这个语法现象的背后动机是什么,有什么样的应用场景,以及与部分应用函数(Partial Applied Function)之间的联系 1. 什么是柯里化函数
A way to write functions with multiple parameter lists. For instance
def f(x: Int)(y: Int) is a
- HashMap
dalan_123
java
HashMap在java中对很多人来说都是熟的;基于hash表的map接口的非同步实现。允许使用null和null键;同时不能保证元素的顺序;也就是从来都不保证其中的元素的顺序恒久不变。
1、数据结构
在java中,最基本的数据结构无外乎:数组 和 引用(指针),所有的数据结构都可以用这两个来构造,HashMap也不例外,归根到底HashMap就是一个链表散列的数据
- Java Swing如何实时刷新JTextArea,以显示刚才加append的内容
周凡杨
java更新swingJTextArea
在代码中执行完textArea.append("message")后,如果你想让这个更新立刻显示在界面上而不是等swing的主线程返回后刷新,我们一般会在该语句后调用textArea.invalidate()和textArea.repaint()。
问题是这个方法并不能有任何效果,textArea的内容没有任何变化,这或许是swing的一个bug,有一个笨拙的办法可以实现
- servlet或struts的Action处理ajax请求
g21121
servlet
其实处理ajax的请求非常简单,直接看代码就行了:
//如果用的是struts
//HttpServletResponse response = ServletActionContext.getResponse();
// 设置输出为文字流
response.setContentType("text/plain");
// 设置字符集
res
- FineReport的公式编辑框的语法简介
老A不折腾
finereport公式总结
FINEREPORT用到公式的地方非常多,单元格(以=开头的便被解析为公式),条件显示,数据字典,报表填报属性值定义,图表标题,轴定义,页眉页脚,甚至单元格的其他属性中的鼠标悬浮提示内容都可以写公式。
简单的说下自己感觉的公式要注意的几个地方:
1.if语句语法刚接触感觉比较奇怪,if(条件式子,值1,值2),if可以嵌套,if(条件式子1,值1,if(条件式子2,值2,值3)
- linux mysql 数据库乱码的解决办法
墙头上一根草
linuxmysql数据库乱码
linux 上mysql数据库区分大小写的配置
lower_case_table_names=1 1-不区分大小写 0-区分大小写
修改/etc/my.cnf 具体的修改内容如下:
[client]
default-character-set=utf8
[mysqld]
datadir=/var/lib/mysql
socket=/va
- 我的spring学习笔记6-ApplicationContext实例化的参数兼容思想
aijuans
Spring 3
ApplicationContext能读取多个Bean定义文件,方法是:
ApplicationContext appContext = new ClassPathXmlApplicationContext(
new String[]{“bean-config1.xml”,“bean-config2.xml”,“bean-config3.xml”,“bean-config4.xml
- mysql 基准测试之sysbench
annan211
基准测试mysql基准测试MySQL测试sysbench
1 执行如下命令,安装sysbench-0.5:
tar xzvf sysbench-0.5.tar.gz
cd sysbench-0.5
chmod +x autogen.sh
./autogen.sh
./configure --with-mysql --with-mysql-includes=/usr/local/mysql
- sql的复杂查询使用案列与技巧
百合不是茶
oraclesql函数数据分页合并查询
本片博客使用的数据库表是oracle中的scott用户表;
------------------- 自然连接查询
查询 smith 的上司(两种方法)
&
- 深入学习Thread类
bijian1013
javathread多线程java多线程
一. 线程的名字
下面来看一下Thread类的name属性,它的类型是String。它其实就是线程的名字。在Thread类中,有String getName()和void setName(String)两个方法用来设置和获取这个属性的值。
同时,Thr
- JSON串转换成Map以及如何转换到对应的数据类型
bijian1013
javafastjsonnet.sf.json
在实际开发中,难免会碰到JSON串转换成Map的情况,下面来看看这方面的实例。另外,由于fastjson只支持JDK1.5及以上版本,因此在JDK1.4的项目中可以采用net.sf.json来处理。
一.fastjson实例
JsonUtil.java
package com.study;
impor
- 【RPC框架HttpInvoker一】HttpInvoker:Spring自带RPC框架
bit1129
spring
HttpInvoker是Spring原生的RPC调用框架,HttpInvoker同Burlap和Hessian一样,提供了一致的服务Exporter以及客户端的服务代理工厂Bean,这篇文章主要是复制粘贴了Hessian与Spring集成一文,【RPC框架Hessian四】Hessian与Spring集成
在
【RPC框架Hessian二】Hessian 对象序列化和反序列化一文中
- 【Mahout二】基于Mahout CBayes算法的20newsgroup的脚本分析
bit1129
Mahout
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information re
- nginx三种获取用户真实ip的方法
ronin47
随着nginx的迅速崛起,越来越多公司将apache更换成nginx. 同时也越来越多人使用nginx作为负载均衡, 并且代理前面可能还加上了CDN加速,但是随之也遇到一个问题:nginx如何获取用户的真实IP地址,如果后端是apache,请跳转到<apache获取用户真实IP地址>,如果是后端真实服务器是nginx,那么继续往下看。
实例环境: 用户IP 120.22.11.11
- java-判断二叉树是不是平衡
bylijinnan
java
参考了
http://zhedahht.blog.163.com/blog/static/25411174201142733927831/
但是用java来实现有一个问题。
由于Java无法像C那样“传递参数的地址,函数返回时能得到参数的值”,唯有新建一个辅助类:AuxClass
import ljn.help.*;
public class BalancedBTree {
- BeanUtils.copyProperties VS PropertyUtils.copyProperties
诸葛不亮
PropertyUtilsBeanUtils
BeanUtils.copyProperties VS PropertyUtils.copyProperties
作为两个bean属性copy的工具类,他们被广泛使用,同时也很容易误用,给人造成困然;比如:昨天发现同事在使用BeanUtils.copyProperties copy有integer类型属性的bean时,没有考虑到会将null转换为0,而后面的业
- [金融与信息安全]最简单的数据结构最安全
comsci
数据结构
现在最流行的数据库的数据存储文件都具有复杂的文件头格式,用操作系统的记事本软件是无法正常浏览的,这样的情况会有什么问题呢?
从信息安全的角度来看,如果我们数据库系统仅仅把这种格式的数据文件做异地备份,如果相同版本的所有数据库管理系统都同时被攻击,那么
- vi区段删除
Cwind
linuxvi区段删除
区段删除是编辑和分析一些冗长的配置文件或日志文件时比较常用的操作。简记下vi区段删除要点备忘。
vi概述
引文中并未将末行模式单独列为一种模式。单不单列并不重要,能区分命令模式与末行模式即可。
vi区段删除步骤:
1. 在末行模式下使用:set nu显示行号
非必须,随光标移动vi右下角也会显示行号,能够正确找到并记录删除开始行
- 清除tomcat缓存的方法总结
dashuaifu
tomcat缓存
用tomcat容器,大家可能会发现这样的问题,修改jsp文件后,但用IE打开 依然是以前的Jsp的页面。
出现这种现象的原因主要是tomcat缓存的原因。
解决办法如下:
在jsp文件头加上
<meta http-equiv="Expires" content="0"> <meta http-equiv="kiben&qu
- 不要盲目的在项目中使用LESS CSS
dcj3sjt126com
Webless
如果你还不知道LESS CSS是什么东西,可以看一下这篇文章,是我一朋友写给新人看的《CSS——LESS》
不可否认,LESS CSS是个强大的工具,它弥补了css没有变量、无法运算等一些“先天缺陷”,但它似乎给我一种错觉,就是为了功能而实现功能。
比如它的引用功能
?
.rounded_corners{
- [入门]更上一层楼
dcj3sjt126com
PHPyii2
更上一层楼
通篇阅读完整个“入门”部分,你就完成了一个完整 Yii 应用的创建。在此过程中你学到了如何实现一些常用功能,例如通过 HTML 表单从用户那获取数据,从数据库中获取数据并以分页形式显示。你还学到了如何通过 Gii 去自动生成代码。使用 Gii 生成代码把 Web 开发中多数繁杂的过程转化为仅仅填写几个表单就行。
本章将介绍一些有助于更好使用 Yii 的资源:
- Apache HttpClient使用详解
eksliang
httpclienthttp协议
Http协议的重要性相信不用我多说了,HttpClient相比传统JDK自带的URLConnection,增加了易用性和灵活性(具体区别,日后我们再讨论),它不仅是客户端发送Http请求变得容易,而且也方便了开发人员测试接口(基于Http协议的),即提高了开发的效率,也方便提高代码的健壮性。因此熟练掌握HttpClient是很重要的必修内容,掌握HttpClient后,相信对于Http协议的了解会
- zxing二维码扫描功能
gundumw100
androidzxing
经常要用到二维码扫描功能
现给出示例代码
import com.google.zxing.WriterException;
import com.zxing.activity.CaptureActivity;
import com.zxing.encoding.EncodingHandler;
import android.app.Activity;
import an
- 纯HTML+CSS带说明的黄色导航菜单
ini
htmlWebhtml5csshovertree
HoverTree带说明的CSS菜单:纯HTML+CSS结构链接带说明的黄色导航
在线体验效果:http://hovertree.com/texiao/css/1.htm代码如下,保存到HTML文件可以看到效果:
<!DOCTYPE html >
<html >
<head>
<title>HoverTree
- fastjson初始化对性能的影响
kane_xie
fastjson序列化
之前在项目中序列化是用thrift,性能一般,而且需要用编译器生成新的类,在序列化和反序列化的时候感觉很繁琐,因此想转到json阵营。对比了jackson,gson等框架之后,决定用fastjson,为什么呢,因为看名字感觉很快。。。
网上的说法:
fastjson 是一个性能很好的 Java 语言实现的 JSON 解析器和生成器,来自阿里巴巴的工程师开发。
- 基于Mybatis封装的增删改查实现通用自动化sql
mengqingyu
DAO
1.基于map或javaBean的增删改查可实现不写dao接口和实现类以及xml,有效的提高开发速度。
2.支持自定义注解包括主键生成、列重复验证、列名、表名等
3.支持批量插入、批量更新、批量删除
<bean id="dynamicSqlSessionTemplate" class="com.mqy.mybatis.support.Dynamic
- js控制input输入框的方法封装(数字,中文,字母,浮点数等)
qifeifei
javascript js
在项目开发的时候,经常有一些输入框,控制输入的格式,而不是等输入好了再去检查格式,格式错了就报错,体验不好。 /** 数字,中文,字母,浮点数(+/-/.) 类型输入限制,只要在input标签上加上 jInput="number,chinese,alphabet,floating" 备注:floating属性只能单独用*/
funct
- java 计时器应用
tangqi609567707
javatimer
mport java.util.TimerTask; import java.util.Calendar; public class MyTask extends TimerTask { private static final int
- erlang输出调用栈信息
wudixiaotie
erlang
在erlang otp的开发中,如果调用第三方的应用,会有有些错误会不打印栈信息,因为有可能第三方应用会catch然后输出自己的错误信息,所以对排查bug有很大的阻碍,这样就要求我们自己打印调用的栈信息。用这个函数:erlang:process_display (self (), backtrace).需要注意这个函数只会输出到标准错误输出。
也可以用这个函数:erlang:get_s