自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 python批量转换图片格式:JPEG到jpg

import os import string dirName = r"C:\dateset\ImageNet\data\ImageNet2012\ILSVRC2012_bbox_train_v2\Beer\img\\" #最后要加双斜杠,不然会报错 li=os.listdir(dirName) for filename in li: newname = filename newname ...

2020-04-10 14:40:19 1244

原创 python批量去掉xml文件的头部

#!/usr/bin/python import os def listFiles(): fileDir = “C:\Users\it.admin\PycharmProjects\pil” fileList = [] for root, dirs, files in os.walk(fileDir): for fileObj in files: fileList.append(os.path.jo...

2020-04-10 14:36:17 1190

原创 获取两个字符串中最大相同子串

class StringTest { public static String getMaxSubString(String s1,String s2) { String max = “”, min = “”; max = (s1.length()>s2.length())?s1:s2; min = (max==s1)?s2:s1; sop("max="+max+"...min="+...

2020-04-10 14:22:18 247

原创 查找字符串中子串出现的次数

class StringTest2 { //方式一 public static int getSubCount(String str,String key) { int count = 0; int index = 0; while((index = str.indexof(key)) != -1) { str = str.substring(index+key.length()); ...

2020-04-10 14:17:30 364

原创 去除字符串两端的空格

class SrringTest { string sop(String str) { System.out.println(str); } public stctic void main(String [] args) { String s = " abc de "; sop("("+s”)"); s = myTrim(s); sop("("+s")"); } pu...

2020-04-10 14:15:46 175

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除