- 博客(33)
- 资源 (7)
- 收藏
- 关注
原创 java ignore ssl verify& using https
httpclient ignore ssl verify& using https
2022-03-23 10:26:05
193
原创 asyncio一些概念简单理解
#### CO_COROUTINE is used to mark native coroutines (defined with new syntax).# CO_ITERABLE_COROUTINE is used to make generator-based coroutines compatible with native coroutines (set by types.co...
2020-07-12 16:05:25
237
原创 python日志文件
version: 1disable_existing_loggers: Falseroot: LEVLE: ERROR handlers: [console] propagate: Falseloggers: infoFileLogger: level: DEBUG handlers: [console, info_file...
2020-03-11 15:17:32
336
原创 按照依赖关系排序
import copyimport utils.functool@utils.functool.settimeout(timeout=15)def dependsOnSort(testFunNames, dependRelaton): """ 有个问题就是如果出现A依赖B,而B又依赖A就会出现问题 :param testFunNames: 一个列表,被排序的列表...
2019-09-12 09:37:30
1317
原创 跨平台超时终端线程且获取线程返回值
def settimeout(timeout=15): """ 超过函数执行时间raise TimeoutError :param args: :param kwargs: :return: """ def _(func): def handler(): raise TimeoutError("fun...
2019-09-12 09:27:13
209
原创 pika rabbitmq ssl
import pikaIP = "localhost"port = 8888ssl_options = { # 带签名的 "ca_certs": r"D:\workSpace\codeDir\python\test\certificates\ssl\ca\cacert.pem", "keyfile": r"D:\workSpace\codeDir\python\...
2019-06-03 09:18:15
765
原创 docker mysql5.6
docker pull mysql:5.6docker run -p 3306:3306 --name mysql -v /home/zbo/docker/mysql5.6/conf:/etc/mysql/conf.d -v /home/zbo/docker/mysql5.6/logs:/logs -v /home/zbo/docker/mysql5.6/data:/var/lib/mysql...
2018-12-02 17:21:50
494
1
原创 python unittest失败重跑
class TestCase_(TestCase): # 是否开启失败重跑 FAILURE_REPEAT_RUN_FLAG = False # 失败重跑尝试次数 FAILURE_REPEAT_RUN_NUM = 3 # 设置重跑时间间隔 REPEAT_TIME_INTERVAL = 5 def run(self, result=None...
2018-08-31 18:49:31
3293
原创 AIDL例子
1、aidl接口文件(包名)服务端和客户端必须保持一致。2、客户端调用服务端的接口时,有二种方法。这里需要说明的是。setaction中内容是在服务端manifest中service标签的<action>字段。 setpackage字段是服务端的包名即manifest.xml中填写的包名。// 第一种方式 第一个参数是服务端package名, 第二个参数是服务端service类路径 ...
2018-05-08 10:23:52
499
原创 遍历电脑整个硬盘查找指定格式文件
#!/usr/bin/env python# -*- encoding:utf8 -*-import wximport os, os.path, itertoolsimport reimport wmifrom threading import Thread, activeCountimport sysreload(sys)sys.setdefaultencoding('utf...
2018-03-07 21:44:41
1253
原创 json递归查找key对应的值
public static JsonNode getJsonNodeByKey(Object object, String key) { if (object == null || object == "") return null; Class cls = object.getClass(); if(cls ==
2017-09-17 23:14:33
3393
1
转载 genymotion 无法安装genymotion-arm-translation.zip
http://blog.youkuaiyun.com/SkipperKevin/article/details/70885620?locationNum=11&fps=1我们利用android-sdk-windows中自带的adb.exe在控制台手动安装Genymotion-ARM-Translation_vX.X.zip(任何版本)。1)首先我们右键Genymotion图标,以管
2017-09-05 15:51:11
1927
原创 python多个模块py文件的数据共享
模块a.py 想用 b.py中公有数据 cntb的python文件#!/usr/bin/env python# coding:utf8from wx import CallAfter,MessageBox,Timer,EVT_TIMERimport mathtry: import xml.etree.clementTree as ETexcept: import
2017-03-22 19:26:49
3108
翻译 android读取本地图片按照指定尺寸缩放
private Bitmap decodeSampleBitmapFromPath(String path, int reqWidth, int reqHeight) { BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true;
2017-03-16 19:40:13
1270
原创 apk通过runtime.getruntime().exec(monkey)执行
在apk中点按钮,在onclick事件中执行monkey命令下面是执行monkey的代码 mBtmonkey.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { new Threa
2017-03-15 16:01:01
1944
原创 centos升级python2.6 ->2.7.13 yum失效
centos6.4 升级了python从2.6.6 - > 2.7.13导致yum失败,而我之前不知道yum依赖python2.6.6直接给2.6库删除,导致网上的其他教程根本就没法用,因为python库中的包都没了。这个时候如果你从contos 中的packages中安装yum是安装不上的,需要下载yunman 进行安装安装步骤:1、先执行 rpm -qa yum | x
2017-03-09 14:52:22
2290
原创 android studio 编写robotium测试本工程的apk
android studio下编写robotium,运行,配置1、robotium的测试代码应该放在android studi哦工程下的androidTest目录下。2、编写好测试代码后,配置Runner, 以com.zutubi.android.junitreport.JUnitReportTestRunner为例 ,需要在build.gradle文件中的defaultCon
2017-02-10 15:56:53
633
原创 修改searchview搜索框光标
private void setCursorIcon(){ try { Class cls = Class.forName("android.support.v7.widget.SearchView"); Field field = cls.getDeclaredField("mSearchSrcTextView");
2017-02-06 18:46:22
4455
原创 获取attr文件中的属性
TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.ArcMenu, defStyle, 0); /** * 获取默认的位置 */ int pos = ta.getInt(R.styleable.ArcMenu_position, POSITION_RIGHT_BOTTOM); mRad
2016-11-17 17:18:09
1730
原创 mvn 用reportng美化输出
4.0.0 sele sele 0.0.1-SNAPSHOT UTF-8 org.testng testng 6.9.9 org.seleniumhq.selenium selenium-java 2.50.1 com.google.inject guice
2016-08-17 15:21:16
876
原创 归并排序
class MergeSort { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub int[] array = new int[]{7,3,43,5,65,7,8,98,90,5,345,35,34}; int[]
2016-08-15 16:17:54
354
原创 堆排序
public class HeapSortCls{ public HeapSortCls(int[] lst) { // TODO Auto-generated constructor stub this.lst = lst; this.len = lst.length; } public void createHeap(){ int startIndex = (lst.le
2016-08-15 08:36:01
261
原创 selenium wait.until
package com.test_;import org.openqa.selenium.By;import org.openqa.selenium.WebDriver;import org.openqa.selenium.WebElement;import org.openqa.selenium.chrome.ChromeDriver;
2016-07-04 08:42:03
2921
原创 python文件查找
#!/usr/bin/env python #-*- encoding:utf8 -*-import wx import os,os.path,itertoolsimport reimport wmiimport multiprocessingimport sysreload(sys)sys.setdefaultencoding('utf8')def getdiskpart(
2016-03-22 17:42:43
596
原创 os.path.abspath()错误
import osimport os.pathres = []#def paththourgh(dir):# for x,y,z in os.walk(dir):# for i in z:# if i[-3:] == '.py':# res.append(os.path.join(x
2016-01-05 10:00:45
2135
原创 python 快速排序
def quciksort(lst, begin, end): if i >= j: return i = begin j = end key = lst[i] while i < j: while i < j and lst[j] >= key: j -= 1 ...
2015-12-17 18:31:53
320
原创 threading.Thread join setDeamon
def run():print u"线程启动\n"time.sleep(5)t=threading.Thread(target=run)t.setDaemon(0)t.start()#t.join()print u'主线程结束'join阻塞的启动 t 线程的线程也就是主线程,阻塞到t线程执行完成 主线程才接着执行setDeamon(True)
2015-11-26 16:28:24
364
原创 threading.Thread condition锁
#!/usr/bin/evn python#-*-encoding:utf8-*-#这个程序会死锁,因为notify()函数是随机唤醒的,唤醒的不一定是生产者。当其他生产者都在wait,而消费者唤醒的确是另外一个消费者那么久死锁了import sysreload(sys)sys.setdefaultencoding('utf8')import threadi
2015-11-26 15:28:00
534
原创 MFC创建DLL
pythondll.h文件 #ifndef _PYTHONDLL_H_#define _PYTHONDLL_H_#ifdef BUILD_DLL#define OS_API __declspec(dllexport) //如果是生成dll工程,那么导出#else#define OS_API __declspec(dllimport) //如果是生成使用dll的工
2015-07-14 16:52:20
398
原创 jira安装
\\ 2015.07.01 zboJira安装目的:在2003上安装jira ,集成JIRASubversion plugin插件 前置条件软件:1、jira 官网下载我用的atlassian-jira-6.0.4-x32.exe(主要是有现成的破解文件)网上可以下载到,官网下载的话需要翻墙2、Mysql数据库(不用一定和网上说的一样)当时我安装的时候就下载的最新版的
2015-07-14 16:39:51
974
原创 unittest理解
# -*-coding:utf8-*-import unittestimport ctypes#创建一个测试用例,其中test前缀的函数为被测测试函数class FooTest(unittest.TestCase): def setUp(self): self.a=1 def testpass(self):
2015-05-25 23:23:31
391
原创 python 断点续传下载
def download(url,filename):req=urllib2.Request(url)if os.path.exists(filename):#print '%s is exists' %filename.split('\\')[-1]file_Length=int(os.path.getsize(filename))fp=urllib2.u
2015-05-20 08:32:50
898
原创 cstring的输出
一个cstring 用pringf和wcout输出Cstring str = _T("OK");printf("%S",(LPCTSTR)str);orwcoutorwcout因为:Cstring是unicode字符串,需用宽字符的函数处理才能输出。
2015-05-08 08:47:18
1270
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人