`
文章列表
因为部署时需要考虑灵活的放置日志数据等相关文件,所以在springboot启动时需要定义注入参数路径 我又回来啦,哈哈哈哈哈   1、 java -jar xxx.jar --变量名=参数 java -jar xxx.jar --aaa=aaa 在application-dev.properties中定义该变量,可默认定义一个值 aaa=ccc 若启动jar带参数 在@value中取到的内容即为aaa   2、   application-dev.properties log.path=${bone.main.dir}/${xxxx}   3、logback日 ...
<?xml version="1.0" encoding="UTF-8" ?> <configuration debug="true" scan="true" scanPeriod="30 seconds"> <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active&qu ...

python

 
python pandas 列合并亲测可用 import pandas as pd df1 = pd.read_csv(u'input.csv', encoding='gbk') df2 = pd.read_csv('input1.csv', encoding='gbk') outfile = pd.merge(df1, df2, how='left', left_on=u'汉字井号',right_on='WELL') outfile.to_csv('outfile.csv', index=False, encoding='gbk') ...
主类 public static void main(String[] args)throws Exception { File file = new File("K:/input"); File[] list = file.listFiles(); List list1 = new ArrayList(); LinkedHashMap map = null; String[] title = null; for (File file1:list){ map = read(file1); list1.addAll((ArrayList)map.get("2&q ...
<dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> <version>20090211</version> </dependency> public static String Json2Csv(String json) throws JSONException { JSONArray jsonArray = new JSONArray("[&qu ...
public static void tif_2_jpg(String path)throws Exception{ FileSeekableStream ss = new FileSeekableStream(path); TIFFDecodeParam param0 = null; TIFFEncodeParam param = new TIFFEncodeParam(); JPEGEncodeParam param1 = new JPEGEncodeParam(); ImageDecoder de ...
某个500强公司,虚拟机开发,什么东西都不能当到本地,上传请去麻烦该公司的相关员工,让驻场的人情何以堪 1、命令行打包,之前确定是否装了maven mvn package -Dmaven.test.skip=true 2、依赖包无法用开发工具直接下载,只能在内网下载jar包,自己去配置相关依赖注意这个包是用来操作tiff转JPG的 example:mvn install:install-file -DgroupId=javax.media -DartifactId=jai-core -Dversion=1.1.3-SNAPSHOT -Dfile=/Users/hong ...
创建mysql用户: [root@localhost mysql]# useradd mysql 设置权限: [root@localhost mysql]# cd /usr/local [root@localhost local]# chown -R mysql:mysql mysql/ 切换到mysql用户 [root@localhost local]# su - mysql [mysql@localhost ~]$ cd /usr/local/mysql/scripts/ 安装 yum –y install perl perl-devel [mysql@localhos ...

查询一周打包

      最近把一些东西写在文档里,发觉轻易找不到,很苦恼,还是抓紧写在别的地方比较好tar czvf backtup.tar.gz --newer-mtime  "2012-10-01 00:00:00" backup/    打包大于这个日期的文件   查询文件数量   ls -l|grep"^-"| wc -l   查询两天前的所有图片并打包  
      大周一的,上班没带耳机 pom文件依赖 <!--mail--> <dependency> <groupId>com.sun.mail</groupId> <artifactId>javax.mail</artifactId> <version>1.5.6</version> </dependency> <dependency>
public class BlockQueueService { private static final Logger logger = LoggerFactory.getLogger(BlockQueueService.class); private static final long MILLILS = 120000; private BlockingQueue<String> receivedImg = new LinkedBlockingQueue<>(); /** * 添加解读任务 ...
开发工具 IDEA   某个SSM工程在mybatis plugin插件安装后   其他工程mapper命名,飘红   原因:           安装了插件的命名与生成的的文件命名十分匹配,其他工程则因为不匹配导致xml映射解析不到 so要么generator与plugin连用。   要么就别用,要么所有工程都用,命名飘红严重不舒服!!! <!--5f39ae17-8c62-4a45-bc43-b32064c9388a:W3siYmxvY2tUeXBlIjoicGFyYWdyYXBoIiwic3R5bGVzIjp7ImFsaWduIjoibGVmdCIsImlu ...
public static final HashMap map = new HashMap(); static { map.put("89504E47", "png"); map.put("49492A00", "tif"); map.put("FFD8FF", "jpg"); } public static String getFileType(String filePath) ...
寻常的跨域解决方式有   1、 src > javascript中 2、 jsonp 3、 cors后台框架修改xml   <!--跨域调用的解决方案--> <filter> <description>crossDomain</description> <filter-name>CORS</filter-name> <filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class& ...
gitlab修改用户密码   1. 进入gitlab的管理  sudo gitlab-rails console production  ;  2. 查询丢失人的用户信息       user  =  User.where(id: 1).first  or         user  =    User.where(name:''xiaoqiang").first;  通过这个可以查询用户      name、email和id等信息  3. 重置密码为123456 user.password='12345678'   4. 确认密码为123456 user.password_con ...
Global site tag (gtag.js) - Google Analytics