草庐IT

are_convertible

全部标签

Git问题:出现报错-You are not allowed to push code to protected branches on this project

目录前言问题原因解决办法1办法2办法3前言最近不是在做数据安全分类分级的项目吗,所以在公司的gitLab上新创建了一个空白项目,但是在本地创建分支后提交到远程时出来问题。问题执行提交gitpush的时候,提示如下图然后跟随提示执行了下面命令gitpush--set-upstreamoriginmaster结果就出现了报错:GitLab:不允许将代码推送到该项目的受保护分支GitLab:Youarenotallowedtopushcodetoprotectedbranchesonthisproject原因gitlab对应的分支进行分支保护设置而且该项目是一个空项目,没有任何文件,又不是我创建的,

Git问题:出现报错-You are not allowed to push code to protected branches on this project

目录前言问题原因解决办法1办法2办法3前言最近不是在做数据安全分类分级的项目吗,所以在公司的gitLab上新创建了一个空白项目,但是在本地创建分支后提交到远程时出来问题。问题执行提交gitpush的时候,提示如下图然后跟随提示执行了下面命令gitpush--set-upstreamoriginmaster结果就出现了报错:GitLab:不允许将代码推送到该项目的受保护分支GitLab:Youarenotallowedtopushcodetoprotectedbranchesonthisproject原因gitlab对应的分支进行分支保护设置而且该项目是一个空项目,没有任何文件,又不是我创建的,

[BD 41-758] The following clock pins are not connected to a valid clock source

在做设计的时候遇到这个问题,原因是因为ps7_0_axi_periph这个IP核修改后,没有generate,导致内部的xcrossbar并没有有效连接。

ios - swift 4 可编码 : Converting JSON return String to Int/Date/Float

我正在研究一些项目并删除JSON解析框架,因为使用Swift4似乎很简单。我遇到了这个奇怪的JSON返回,其中Ints和Dates作为Strings返回。我看了GrokSwift'sParsingJSONwithSwift4,Apple'swebsite,但我没有看到任何关于re:changingtypes的内容。Apple'sexamplecode显示了如何更改key名称,但我很难弄清楚如何更改key类型。这是它的样子:{"WaitTimes":[{"CheckpointIndex":"1","WaitTime":"1","Created_Datetime":"10/17/20176

ios - swift 4 可编码 : Converting JSON return String to Int/Date/Float

我正在研究一些项目并删除JSON解析框架,因为使用Swift4似乎很简单。我遇到了这个奇怪的JSON返回,其中Ints和Dates作为Strings返回。我看了GrokSwift'sParsingJSONwithSwift4,Apple'swebsite,但我没有看到任何关于re:changingtypes的内容。Apple'sexamplecode显示了如何更改key名称,但我很难弄清楚如何更改key类型。这是它的样子:{"WaitTimes":[{"CheckpointIndex":"1","WaitTime":"1","Created_Datetime":"10/17/20176

arrays - swift 2.2 : cannot convert value of type '[B]' to specified type '[A]'

我很困惑为什么这不起作用(这里没有太多要解释的):protocolA{varvalue:Int{getset}}structB:A{varvalue:Int}letarray:[B]=[B(value:10)]letsingleAValue:A=array[0]//extractingworksasexpectedvarprotocolArray:[A]=[]protocolArray.append(singleAValue)//wecanputthevalueinsidethe`protocolArray`withoutproblemsprint(protocolArray)letn

arrays - swift 2.2 : cannot convert value of type '[B]' to specified type '[A]'

我很困惑为什么这不起作用(这里没有太多要解释的):protocolA{varvalue:Int{getset}}structB:A{varvalue:Int}letarray:[B]=[B(value:10)]letsingleAValue:A=array[0]//extractingworksasexpectedvarprotocolArray:[A]=[]protocolArray.append(singleAValue)//wecanputthevalueinsidethe`protocolArray`withoutproblemsprint(protocolArray)letn

swift 泛型 : Cannot convert value of type to expected argument type

这是我的代码:protocolSomeProtocol{}classA:SomeProtocol{}funcf1(ofType:T.Type,listener:(T?)->Void){}funcf2(ofType:T.Type,listener:([T]?)->Void){}funcg(){letl1:(SomeProtocol?)->Void=...letl2:([SomeProtocol]?)->Void=...f1(ofType:A.self,listener:l1)//NOERRORf2(ofType:A.self,listener:l2)//COMPILEERROR:Cann

swift 泛型 : Cannot convert value of type to expected argument type

这是我的代码:protocolSomeProtocol{}classA:SomeProtocol{}funcf1(ofType:T.Type,listener:(T?)->Void){}funcf2(ofType:T.Type,listener:([T]?)->Void){}funcg(){letl1:(SomeProtocol?)->Void=...letl2:([SomeProtocol]?)->Void=...f1(ofType:A.self,listener:l1)//NOERRORf2(ofType:A.self,listener:l2)//COMPILEERROR:Cann

postgresql13远程连接报错 Connection to 117.50.184.237:5432 refused. Check that the hostname and port are c

报错信息Connectiontohostname:portrefused.CheckthatthehostnameandportarecorrectandthatthepostmasterisacceptingTCP/IPconnections.Connectionrefused:nofurtherinformation解决方案修开配置文件vim/var/lib/pgsql/13/data/postgresql.conf添加以下内容并保存如图listen_addresses='*'重启systemctlrestartpostgresql-13.service再次连接报错FATAL:nopg_h