Stella981 Stella981
3年前
CDH集群手动导入scm库
一、手动导入scm库背景:正常安装clouderascmserver时,安装scm库是通过脚本 /usr/share/cmf/schema/scm\_prepare\_database.sh来自动建库的。/usr/share/cmf/schema/scm_prepare_database.shmy
Stella981 Stella981
3年前
SecurityContextHolder.getContext().getAuthentication()为null的情况
原理:UserDetails userDetails\(UserDetails)SecurityContextHolder.getContext().getAuthentication().getPrincipal();如果想用上面的代码获得当前用户,必须在spring security过滤器执行中执行,否则在过滤链执行完时org.spri
Easter79 Easter79
3年前
SpringMVC接收Postman post json数据
当postman向服务端post数据时,一般要求在body里已xwwwformurlencoded格式写成keyvalue的形式。服务端通过以下代码可以取到参数finalMap<String,StringallParamsMaps.newHashMap();finalEnumeration<Stringpar
Easter79 Easter79
3年前
Swagger如何测试Date类型参数
问题Swagger测试时,参数直接输入日期格式化后的类型,会报参数日期转换错误:ConversionFailedException解决网上说在参数上添加注解@DateTimeFormat(pattern“yyyyMMdd”)或者是添加@JsonFormat(pattern”yyyyMMddHH:mm:
Stella981 Stella981
3年前
Android Wear 2.0 AlarmManager 后台定时任务
以前在Android4.0时,alarmManager没什么问题。后来android为了优化系统耗电情况,引入了doze模式,参见此页https://developer.android.com/training/monitoringdevicestate/dozestandby(https://www.oschina.net/action/
Stella981 Stella981
3年前
Js四则运算精度问题处理
JavaScript小数在做四则运算时,精度会丢失,这会在项目中引起诸多不便。先看个具体的例子://较小的数运算console.log(0.099999990.00000001);//0.09999999999999999console.log(0.099999990.00000001);//0.09
Stella981 Stella981
3年前
PostgreSQL drop database 显示会话没有关闭 [已解决]
错误重现有时候需要删除某个数据库时,会报如下错误,显示有一个连接正在使用数据库,无法删除ERROR:database"pilot"isbeingaccessedbyotherusersDETAIL:Thereis1othersessionusingthedatabase.解决方法
WMS仓库管理系统选型中要考虑几点
市场上有许多WMS(https://www.sap.cn/products/scm/extendedwarehousemanagement.html)仓库管理软件系统。然而,现在许多仓库管理系统都在采用WMS。那么在选择WMS仓库管理系统时应该
小万哥 小万哥
1年前
MySQL 数据库表格创建、数据插入及获取插入的 ID:Python 教程
创建表格要在MySQL中创建表格,请使用"CREATETABLE"语句。确保在创建连接时定义了数据库的名称。示例创建一个名为"customers"的表格:pythonimportmysql.connectormydbmysql.connector.conn
小万哥 小万哥
1年前
C# Break 和 Continue 语句以及数组详解
CBreak它被用于“跳出”switch语句。break语句也可用于跳出循环。以下示例在i等于4时跳出循环:示例:csharpfor(inti0;i<10;i)if(i4)break;Console.WriteLine(i);CContinuecont