03 2020 档案
ASP.NET项目:请使用语言版本6或者更高版本
摘要:错误重现 解决办法 可以通过安装Microsoft.CodeDom.Providers.DotNetCompilerPlatform程序包解决: Install-Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform 转载自:https:
阅读全文
安装CUDA坑:CUDA driver version is insufficient for CUDA runtime version
摘要:本地安装TensorFlow,运行报错,根据网上提示,这个是因为nvdia与cuda版本不兼容 我本地显卡是 GTX 750Ti,下载了NVIDIA-Linux-x86_64-430.64.run,禁用nouveau驱动。安装显卡驱动即可。 参考: https://blog.csdn.net/wan
阅读全文
Failed to load the native TensorFlow runtime. ImportError: libcuda.so.1: cannot open shared object file: No such file or directory
摘要:背景 笔者一个项目,在实体机下面运行,需要使用tensorFlow,之前按照记录的方法一直不报错,最近在虚拟机下报错 以下是在虚拟机下面,已经安装cuda驱动 (myenv) ubuntu@ubuntu:~/myenv/server$ python server.py Traceback (most
阅读全文
Miniconda,Anaconda,Conda中国镜像源的设置
摘要:问题 使用python部署独立环境小伙伴因为网速慢没少吃苦。下面的异常你一定见过,或者似曾相识 CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/clou
阅读全文
org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/json;charset=UTF-8' not supported
摘要:解决方法:添加 contentType : 'application/json', $.ajax({ type: "POST", url: "/xxx", dataType:'json', contentType : 'application/json', async : 'false', data
阅读全文
nginx中配置wss的websocket报错:PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
摘要:背景 笔者最近在项目中使用websocket,通过nginx进行代理,配置如下 server { listen 443 ssl; server_name www.example.com; ssl on; ssl_certificate www.example.com+5.pem; ssl_certi
阅读全文
使用ffmpeg将视频切割成多个ts分片
摘要:<dependency> <groupId>net.bramp.ffmpeg</groupId> <artifactId>ffmpeg</artifactId> <version>0.6.2</version> </dependency> import net.bramp.ffmpeg.FFmpeg
阅读全文
java中将一个数组按照每份固定大小拆分
摘要:stackoverflow代码 public static boolean isMatch(byte[] pattern, byte[] input, int pos) { for(int i=0; i< pattern.length; i++) { if(pattern[i] != input[p
阅读全文
java中xml反序列化,绑定到实体上
摘要:实体类 @XStreamAlias("ROOT") public class VehiclePassInfo { @Id @GeneratedValue(generator = "JDBC") private Integer id; @XStreamAlias("LICENSEKEY") priva
阅读全文
IDEA中使用插件sonarlint连接到SonarQube对代码质量进行管控
摘要:申明:以下部分技术是网络上搜索来的,由于距离写本文时过去一段时间,无法再查找到原来网址, 无法署名版权,如果您看到此处引用您的文字,请留言联系我署名版权,相应的办法归原作者所有,在此表示感谢。 前文:本地安装SonarQube Community8.1社区版进行代码质量管控中已经详细讲解了Sonar
阅读全文
IDEA cannot download sources
摘要:在终端运行 mvn dependency:resolve -Dclassifier=sources 然后自动下载源代码 转载自:https://blog.csdn.net/weixin_42379136/article/details/87804492
阅读全文
ModelMapper从Map转实体,数据类型转换出错failed to convert java.lang.String to java.lang.Long
摘要:org.modelmapper.MappingException: ModelMapper mapping errors: 1) Converter org.modelmapper.internal.converter.NumberConverter@1c93b51e failed to conve
阅读全文
springboot使用jmh基准测试评估json反序列化、实体转换的性能差异
摘要:1、背景 笔者经常把一些经常使用的数据放到redis缓存,方便程序进行读取。 比如按照不同的键名将数值存储到hash值类型中。示例如下 hash hashkey hashValue snapshot 999 "{\"id\":999,\"distId\":999,\"distName\":\"玄武区
阅读全文
Java压缩技术之解压篇,支持:ZIP、RAR、7Z、TAR、GZ、TAR.GZ、BZ2、TAR.BZ2
摘要:转载自:https://blog.csdn.net/qq_28082757/article/details/78932756 这篇文章主要讲解Java解压的操作,后续会写一篇关于压缩的文章。 提醒:文章中有些片段看似代码很多,其实去除trycatch、释放资源真正有用的代码没几句,解压其实都很简单,
阅读全文
java RFC822中将字符串转成Date
摘要:将字符串转成Date import java.text.SimpleDateFormat; import java.util.Date; public class DateUtil { public static Date ParseRFC3339DateFormat(String p_date)
阅读全文
SpringBoot集成JMH进行基准测试2
摘要:接上篇:SpringBoot集成JMH进行基准测试 本地环境:IDEA 2018.3.6 jmh 1.21 。本地使用1.22失败,可能是windows 10下面使用了阿里巴巴的Maven镜像源有bug 上一篇算是一次失败的尝试,后来笔者又查阅了别人的文章,分享一个可用的 运行方法: 右键 AppT
阅读全文
springboot定时任务
摘要:写法一: import com.xxx.entity.ByteDanceDataNode; import com.xxx.service.ByteDanceDataService; import com.xxx.service.DistrictService; import com.xxx.serv
阅读全文
springboot禁用数据库自动装配
摘要:笔者最近在做测试用例(testCase),但是实际这个测试用例根本需要数据库。启动报错: Error starting ApplicationContext. To display the conditions report re-run your application with 'debug'
阅读全文