代码段记录
java连接oracle字符串二种方式
“jdbc:oracle:thin:@host:port:sid” (short connection string)
“jdbc:oracle:thin:@(DESCRIPTION= (ADDRESS = (PROTOCOL = TCP)
(HOST = host)
(PORT = port)
)
(CONNECT_DATA=
(SERVICE_NAME=sid)
(SERVER=DEDICATED)
)
)” (full server string)
C#实现RSA加密解密,以及同Java转换
https://www.cnblogs.com/Laggage/p/11028614.html
fiddlera抓取java的请求
System.setProperty("http.proxyHost", "localhost");
System.setProperty("http.proxyPort", "8888");
System.setProperty("https.proxyHost", "localhost");
System.setProperty("https.proxyPort", "8888");
airtest
https://airtest.readthedocs.io/zh_CN/latest/all_module/airtest.core.android.android.html
https://www.jianshu.com/p/b5ceb98ef9d1
from airtest.core.android.android import Android
devs = device()
print(devs.list_app(third_only=True)) #获取所有第三方包
start_app('com.tencent.wework',activity=None) #启用app
install_app(filepath, replace=False) #在设备上安装应用程序,replace默认为False,为True时意为替换已存在的App
snapshot(filename=None,ensure_orientation=True) #截全屏并保存到指定文件,ensure_orientation用于处理横竖屏的转换
wake() #唤醒屏幕
home() #点击home键
path_app(package) #返回package 的路径
check_app(package) #检查package是否在手机上,返回True or False
java面试题
public class HelloA {
public HelloA(){
System.out.println("A");
}
{
System.out.println("B");
}
static {
System.out.println("C");
}
}
public class HelloB extends HelloA{
public HelloB(){
System.out.print("D");
}
{
System.out.println("E");
}
static {
System.out.println("F");
}
public static void main(String[]args){
new HelloB();
}
}
结果
C
F
B
A
E
D
python 直接用airetest
from airtest.core.api import *
from airtest.cli.parser import cli_setup
import json
if not cli_setup():
auto_setup(__file__, logdir=True, devices=[
"Android:///?cap_method=javacap&ori_method=adbori", #默认
# "Android:///emulator-5554?cap_method=javacap&ori_method=adbori",
# "Android:///emulator-5556?cap_method=javacap&ori_method=adbori",
# "Android://127.0.0.1:5037/emulator-5554?cap_method=javacap&ori_method=adbori",
# "Android://127.0.0.1:5037/F8UDU16203002433?cap_method=javacap&ori_method=adbori",
])
devs=device()
print(devs.list_app(third_only=True))
home()
print('uuid:'+devs.uuid)