Car c= new Car(log); c.print() class Car{ def log public Car(log){ this.log=log } public void print(){ log.info "hello world" } }…
Reading Properties file : Properties prop = new Properties() def path = "D:\\SoapUIStudy\\application.properties" FileInputStream fs = new FileInputStream(path) prop.load(fs) log.info prop.getProperty("name") Result : Tue Jun 16 15:12:…
Code example : package com.file.properties; import java.io.FileInputStream; import java.util.Properties; public class ReadProperties { Properties prop; public ReadProperties(String path) { prop = new Properties(); try{ FileInputStream fs = new FileIn…
package com.file.properties; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.Has…
读取以下两种格式的Excel : *.xls  and *.xlsx 用Apache POI API来实现,需要用到 HSSF 和 XSSF 的类库 HSSF is the POI Project's pure Java implementation of the Excel '97(-2007) (.xls) file format. XSSF is the POI Project's pure Java implementation of the Excel 2007 OOXML (.xls…
package com.file.properties; import java.io.FileInputStream; import java.util.Properties; public class ReadProperties { Properties prop; public ReadProperties(String path) { prop = new Properties(); try{ FileInputStream fs = new FileInputStream(path)…
Building test suites, Test cases and Test steps in SOAP UI Levels : test step level test case level test suite level project level Groovy script test step Write groovy code in groovy script test step log object in SOAP UI Info and error log log.error…
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object (2007-08-29 10:13:56) 转载▼ 错误提示:The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object…
def x=2 def y=3 if(x == y){ log.info "equal" }else{ log.info "not equal" // print out not equal } TestService s1 = new TestService() TestService s2 = new TestService() log.info s1.is(s2) // false s1=s2 log.info s1.is(s2) // true class…
TestService s = new TestService(log,context,testRunner) s.xyz() class TestService{ def log def context def testRunner public TestService(log,context,testRunner){ this.log=log this.context=context this.testRunner=testRunner } public void xyz(){ log.in…
log.info "starting" // we use class to create objects of a class Planet p1 = new Planet() Planet p2 = new Planet() //Planet.name = "Pluto" illegal Planet.shape = "Circle" // static variable Planet.log = log p1.name = "ea…
log.info "starting" // we use class to create objects of a class Planet p1 = new Planet() Planet p2 = new Planet() Planet p3 = new Planet() //Planet.name = "Pluto" illegal Planet.shape = "Circle" p1.name = "earth" /…
Static and non-Static :  非静态方法(不带static)可以访问静态变量和方法(带static),但是反过来就不行. 类的静态成员(变量和方法)属于类本身,在类加载的时候就会分配内存,可以通过类名直接去访问. 非静态成员(变量和方法)属于类的对象,只有在类的对象产生(创建实例)的时候才会分配内存,然后通过类的对象去访问. 在一个类的静态成员中去访问非静态成员之所以会出错是因为在类的非静态成员不存在的时候静态成员就已经存在了,访问一个内存中不存在的东西会出错. 静态变量和方…
With new users purchasing Delphi every single day, it’s not uncommon for me to meet users that are new to the Object Pascal language. One such new user contacted me recently with questions about reading and writing structured data to files on disk.In…
try, catch and finally in db connection Forming groovy connection string and obtaining Connection Object Firing Select Query and obtaining results Foreach and rows functions Finding number of rows in result import groovy.sql.Sql // obtain the connect…
html5里的一些新的标签,看到里面object.embed.video.audio都可以添加视频或音频文件 embed是针对非IE的浏览器的媒体播放器 video是html5出的一种新标准,但并不是所有的浏览器都支持.video虽然号称可以支持三种媒体类型,但常用的只有mp4. 像object,和embed是都可以用来播放视频和音频,而且他们展示效果基本上一样的, 1. video.audio可以看我的另一篇文章https://www.cnblogs.com/jing-tian/p/10930…
Selenium IDE Training List…
Operator : While Loop : For Loop :  Arrays : Code : public class FirstJavaClass { public static void main(String[] args) { int arr[] = new int[5]; arr[0]=78; arr[1]=980; arr[2]=98; arr[3]=9; arr[4]=765; System.out.println(arr[2]); System.out.println(…
Selenium IDE (Only support in Firefox): - Record and Run - UI interface - User extensions - Conversion of code Selenium RC: Multiple Browsers : IE, Chrome, Firefox, Opera, Safari Multiple Languages : Java, PHP, Ruby, Python, C#, Perl Multiple OS : Wi…
What is a web service? http://webservicex.net/ws/default.aspx WebService是一种跨编程语言和跨操作系统平台的远程调用技术. 跨编程语言 : 服务端程序采用java编写,客户端程序则可以采用其他编程语言编写,反之亦然! 跨操作系统平台 : 服务端程序和客户端程序可以在不同的操作系统上运行. 远程调用 : 一台计算机a上的一个程序可以调用到另外一台计算机b上的一个对象的方法. 譬如,银联提供给商场的pos刷卡系统,商场的POS机转…
def x = new String[3] x[0] = "A" x[1] = "B" x[2] = "C" log.info"XXXXXX 1" try{ x[3] = "D" // def z=9/0 }catch(Exception e){ log.info "Some error "+e.getMessage() // Use e.getMessage() to print ex…
Hashset: HashSet set = new HashSet() set.add("India") set.add("USA") set.add("China") log.info "Set size is : " + set.size() set.add("China") log.info "Set size is : " + set.size() Iterator iter…
Array: def x = new String[5] x[0] = "India" x[1] = "USA" x[2] = "Korea" x[3] = "Japan" x[4] = "China" log.info "Size of list is " + x.size() log.info "The first item in list is : "+x[0]…
def x="I like to read books before bed" def temp = x.split(" ") log.info "Size of array is : "+temp.length log.info temp[0] log.info temp[1] log.info x.substring(2,8) log.info x.indexOf("t") log.info x.indexOf("…
Bank.log = log Bank b1 = new Bank() b1.name = "BOA" b1.minbalance = 100 b1.city="London" Bank b2 = new Bank() b2.name = "HSBC" b2.minbalance = 100 b2.city="LA" Bank b3 = new Bank("A",100,"X") log…
Employee.log=log Employee e1 = new Employee() log.info e1.add(1,2,3,4) // optional parameters in groovy log.info e1.add(2,3) log.info e1.add(2,3,10) class Employee { def static log public def add(a,b,c=3,d=10){ return a+b+c+d } } Run result: Tue Oct…
Employee.log=log Employee e1 = new Employee() Employee e2 = new Employee() e1.name = "A" e1.salary = 100 e2.name = "B" e2.salary = 200 e1.printName() e2.printName() def newSalary = e1.increaseSalary(100) log.info "New salary of A…
log.info "starting" // we use class to create objects of a class Planet p1 = new Planet() Planet p2 = new Planet() Planet p3 = new Planet() p1.name = "earth" p1.shape = "circle" p2.name = "jupiter" p2.shape = "…
https://blogs.oracle.com/mysqlinnodb/entry/data_organization_in_innodb https://blogs.oracle.com/mysqlinnodb/entry/redo_logging_in_innodb http://dev.mysql.com/doc/refman/5.6/en/innodb-multiple-tablespaces.html…
原文:http://www.cnblogs.com/mmzs/p/7662863.html 错误类型: 搞了很久才找到原因.解决办法写出来分享: 出现以上错误的原因是玩耍maven时多装了个jre.本来Eclipse在建立项目时,会自动参照你的jre路径,但多个版本就没办法加载了. Java学习交流QQ群:603654340 我们一起学Java! 解决办法: 进入window \ preferences \ java \ Installed JREs…