草庐IT

local-class

全部标签

local fault和remote fault

1、什么是 localfault和remotefault?在IEEE802.3协议中,localfault和remotefault是一种错误序列,在PCS层定义。MACRX侧收到localfault时,意味本地链路没有正常建立链路,MACRX侧收到remotefault时,意味对端没有正常建立链路。localfault和remotefault是一种链路交互机制,使得对接链路能够通过fault序列建立链路,即linkon。2、localfault和remotefault是如何相互的?从PCS,MAC解复位开始,本地设备和对端设备经行fault序列的交互,然后发送IDLE序列,最后MAC接受侧识别

ios - "Unknown class in interface builder file"在 Storyboard中使用从泛型类继承的类时

我最近重构了我的类BookTableViewController来自UITableViewController的简单继承,所以它现在继承自通用类FetchedResultsTableViewController它本身继承自UITableViewController.类声明如下所示:classBookTableViewController:FetchedResultsTableViewController{overridefuncviewDidLoad(){//breakpointsinheredonotcatch!}}classFetchedResultsTableViewContro

ios - Xcode 6 Beta 5 Swift 错误 : Class Exists in libswift_stdlib_core. dylib 和 libswiftCore.dylib。哪个是未定义的

所以我遇到了一个有趣的错误,它在以前的XcodeBeta版本中不存在。它在运行时从这段代码中弹出:(准确地说是第5行)funcremoveDuplicates(urls:[NSString])->[NSString]{varnewURLs=[urls[0]]forvari=0;i报错如下:objc[322]:类_NSSwiftEnumeratorBase在“MyAppFilePath.app”/Frameworks/libswift_stdlib_core.dylib和“MyAppFilePath.app”/Frameworks/libswiftCore.dylib中实现。将使用两者之

nginx服务停止或重启时报错:open() “/usr/local/nginx/logs/nginx.pid“ failed (2: No such file or directory)的解决办法

问题示例:关闭/重启nginx服务时,报错:[error]open()"/usr/local/nginx/logs/nginx.pid"failed(2:Nosuchfileordirectory)解决方法:1.输入:ps-ef|grepnginx 查看nginx进程号2.输入:kill-QUIT进程号  杀掉nginx进程3.把虚拟机服务器上的nginx安装包和压缩包以及local目录下的nginx都删掉4.重新走一遍安装启动nginx服务的流程,再关闭时就不会报错啦。

ios - swift 错误 : "class cannot be constructed because it has no accessible initializers"

Xcode给我的Swift代码报错:'myColor'cannotbeconstructedbecauseithasnoaccessibleinitializersimportFoundationprotocolPrototype{funcClone()->T}classmyColor:Prototype{varred:Int?vargreen:Int?varblue:Int?init(){}funcClone()->myColor{letnewColor=myColor()newColor.red=self.rednewColor.green=self.greennewColor.b

ios - 核心数据 : No NSValueTransformer with class name XXX was found for attribute YYYY on entity ZZZZ

我在xcdatamodel文件中设置了我的CoreData模型。我的属性YYYY有一个可转换的类型,我在数据模型检查器中设置了转换器名称。在我的案例中,我在我的模型中存储了一个[CLLocation]。classLocationArrayTransformer:NSValueTransformer{overridefunctransformedValue(value:AnyObject?)->AnyObject?{letlocations=valueas![CLLocation]returnNSKeyedArchiver.archivedDataWithRootObject(locat

ios - 具有父类(super class)和子类的 Swift 协议(protocol)扩展方法分派(dispatch)

我发现了一个有趣的行为,它看起来像是一个错误......基于以下文章描述的行为:https://medium.com/ios-os-x-development/swift-protocol-extension-method-dispatch-6a6bf270ba94http://nomothetis.svbtle.com/the-ghost-of-swift-bugs-future当我添加SomeSuperclass而不是直接采用协议(protocol)时,输出不是我所期望的。protocolTheProtocol{funcmethod1()}extensionTheProtocol{

详细解决linux安装mysql后登录报错:Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘ (2)

详细解决linux安装mysql后登录报错:Can’tconnecttolocalMySQLserverthroughsocket‘/tmp/mysql.sock’(2)连接localhost通常通过一个Unix域套接字文件进行,一般会自动生成在/tmp/mysql.sock,所以我们登录mysql时是需要mysql.sock套接字的。但装完后发现/tmp下并没有mysql.sock文件也不要慌,要蛋定~解决方式1首先可以通过“find/-name‘mysql.sock’”找下当前环境中是否存在mysql.sock,如果找到msyql.sock,并且不在/tmp下,直接建个软连接就可以了。不要

nginx: [error] open() “/usr/local/nginx/logs/nginx.pid“ failed (2: No such file or directory)

修改完nginx的配置文件后,需要重启nginx,让配置生效,执行过程中可能会出现这种错误。#执行命令,重新启动nginx./nginx-sreload执行后报错nginx:[error]open()"/usr/local/nginx/logs/nginx.pid"failed(2:Nosuchfileordirectory)错误的原因:未指定nginx.conf的位置,启动时无法加载配置文件进入logs目录,发现缺失了nginx.pid文件,配置文件加载了的情况下,是有这个文件的解决办法:使用nginx-c的参数,指定配置文件的位置#启动文件nginx在sbin目录中,配置文件在conf目录

swift - 构建 iOS 框架时出错 : usr/local/bin/carthage: No such file or directory

在构建我的项目时出现此错误,该项目包含我使用Carthage安装的多个外部框架:/Users/moneycup/Library/Developer/Xcode/DerivedData/MoneyCup-fawvvvubqmiqrzajrxdwjxeiaxbw/Build/Intermediates/MoneyCup.build/Debug-iphonesimulator/MoneyCup.build/Script-03D74C381DE83AC900F61FEE.sh:line2:usr/local/bin/carthage:Nosuchfileordirectory我完全不知道现在该