草庐IT

MXRT1xxx

全部标签

com.alibaba.fastjson.JSONException: write javaBean error, fastjson version 1.2.83, class XXX fieldNa

实际开发中,获取到数据库中数据,放入JSONObject中,每一个keyvalue对应起来,key唯一,value是集合,到最后通过JSONObject.toJSONString(jsonObject)得到问题:但是报com.alibaba.fastjson.JSONException:writejavaBeanerror,fastjsonversion1.2.83,classXXXfieldName0 错误,通过了解是每一个entity中若是有null字段存在,就会转换异常,看报错日志以为是fastjson等错误,其实不是。解决问题:在 JSONObject.toJSONString()方法

redis - ERR Slot xxx 已经忙 (Redis::CommandError)

我想要设置具有6个节点(node1、node2、node3、node4、node5、node6)的redis集群,其中有3个主节点和3个从节点。每个节点都有这个配置文件redis.confport6379cluster-enabledyescluster-config-filenodes.confcluster-node-timeout10000appendonlyyes创建集群时出现错误。创建命令:redis-trib.rbcreate--replicas1node1:6379node2:6379node3:6379node4:6379node5:6379node6:6379错误:>

redis - ERR Slot xxx 已经忙 (Redis::CommandError)

我想要设置具有6个节点(node1、node2、node3、node4、node5、node6)的redis集群,其中有3个主节点和3个从节点。每个节点都有这个配置文件redis.confport6379cluster-enabledyescluster-config-filenodes.confcluster-node-timeout10000appendonlyyes创建集群时出现错误。创建命令:redis-trib.rbcreate--replicas1node1:6379node2:6379node3:6379node4:6379node5:6379node6:6379错误:>

[Bug0034] Git报错 cannot lock ref 'refs/heads/master': is at xxxx but expected xxx error: could not ...

1、问题error:update_reffailedforref'refs/heads/master':cannotlockref'refs/heads/master':isat63654e79f7ae0f902731558b3ae6679a69db09e9butexpectedec20d6ffa52920358e54703f90100bedbca4c855error:couldnotupdaterefs/heads/master2、场景由于为了方便解决冲突获取到最新远程代码(并且本地有冲突代码不想要),直接删除了本地分支想重新创建同名分支,导致报错。3、原因问题不能复现待补充4、解决方案参考

《微信小程序案例4》bindtap点击事件使用自定义数据data-xxx传参方法

一、错误方法bindtap="selected(1)"二、正确方法1、首先在标签中使用data-xxx来自定义要传入的数据,xxx代表数据值2、绑定事件bindtap=xxx3、在js中使用event.currentTarget.dataset.xxx来取你传入的值{itemList}}"bindtap="selected"data-id="{{item.id}}">{item.select?'active':'noactive'}}">{{item.name}}data:{itemList:[{name:'推荐',id:0,select:true},{name:'Xiaomi手机',id:1

解决UnicodeEncodeError: ‘ascii‘ codec can‘t encode characters in position xxx: ordinal not in range

在调用一个库时,出现了一个异常报错类似如UnicodeEncodeError:'ascii'codeccan'tencodecharactersinposition0-1:ordinalnotinrange(128),只要该库返回结果包含中文,该结果时就会出现该异常。原因:Python2默认使用ASCII编码,ASCII编码不包含中文,处理中文时会报错Python3更换为默认使用Unicode编码解决方法(任选其一):1.在文件首部添加#coding=utf-82.在python的Lib\site-packages文件夹下新建一个sitecustomize.py,内容为:#encoding=u

微信小程序 Error: module ‘xxx.js‘ is not defined

可能是两种问题出现的报错一种是因为es6转es5没有开启还有一种可能是因为导入的js文件过大,自动跳过了es6转es5的处理推荐一个压缩js的网址:https://babeljs.io/repl

swift - 变量 'xxx' 从未发生变化,考虑更改为 'let'

更新到xcode7-beta我遇到了一种新的警告。这是我的代码overridefunclayoutAttributesForElementsInRect(rect:CGRect)->[UICollectionViewLayoutAttributes]?{varattributes:[UICollectionViewLayoutAttributes]?=super.layoutAttributesForElementsInRect(rect)ifletlayoutInfo=self.layoutInfo{attributes?.append(layoutInfo)}returnattri

swift - 变量 'xxx' 从未发生变化,考虑更改为 'let'

更新到xcode7-beta我遇到了一种新的警告。这是我的代码overridefunclayoutAttributesForElementsInRect(rect:CGRect)->[UICollectionViewLayoutAttributes]?{varattributes:[UICollectionViewLayoutAttributes]?=super.layoutAttributesForElementsInRect(rect)ifletlayoutInfo=self.layoutInfo{attributes?.append(layoutInfo)}returnattri

* (HEAD detached at origin/xxx)原因及解决方案

*(HEADdetachedatorigin/xxx)原因及解决方法情况:用gitcheckout分支名称来切换分支每次分支名都很长,于是想在GitGUI中切换分支,在GitGUI中点击“checkout”切换分支时提示不在某个本地分支上,如下图所示:执行gitbranch出现*(HEADdetachedatorigin/xxx)gitbranch*(HEADdetachedatorigin/xxx)master原因本地分支不存在,没有指定本地分支,所以是detached。解决方法方法一:执行以下命令,创建并切换到新的分支,创建的新本地分支会自动去追踪到当前的远程分支。#新分支创建的同时切换分