layer

社区观点 | 关于比原链MOV巡查官制度的几点思考

限于喜欢 提交于 2019-12-05 01:41:16
在ChainNode白皮书解密读书会01期活动中,比原链高级研究员刘秋杉带领大家领读「MOV:下一代去中心跨链 Layer 2 价值交换协议」白皮书,得到了很多粉丝的关注,其中gentledog的读书帖「关于MOV巡查官制度的几点思考」获得了读书活动的第一名。 正文如下: 根据白皮书,MOV中有巡查官一职防止侧链作恶。我就在想,这个制度是否存在漏洞呢?经过一番思考,似乎有以下几种攻击方式: 1、复制交易攻击 巡查官发现问题并在主链上发起一笔交易,有人获取这笔交易内容后,提高手续费或者直接向网络隐瞒这笔交易,然后再发起一笔同样内容的交易,从而窃取巡查官的劳动成果。在这种情况下,巡查官能够获取的利益几乎为零,甚至为负,这样就不会有动力去巡查了。 这种攻击是有对策的。有一样东西是作恶者无法复制的:钱包地址!可以采取提案(承诺)+证据的模式,巡查官可以先提交承诺(数据+钱包地址的哈希值),等区块确认后,再公布数据(钱包地址可以不用公布)。这样就能比较完美地解决这个问题了。 2、假装作恶攻击 当网关节点给予的奖励大于侧链作恶者所遭受的损失时,可以采取这种攻击。侧链作恶者可以假装作恶,然后串通巡查官抢先提交作恶的证据,从网关节点处骗取奖励,当奖励大于作恶者所受到的惩罚时,作恶者就获利了。这种攻击说明,网关节点给予的奖励是有上限的,它不能大于作恶者所受到的惩罚,并不一定与作恶程度对等。 3

CLEARTEXT communication to xxx not permitted by network security policy

拜拜、爱过 提交于 2019-12-04 22:49:07
Android P http网络请求不通,报出异常:java.net.UnknownServiceException: CLEARTEXT communication to xxxx not permitted by network security policy Google表示,为保证用户数据和设备的安全,针对下一代 Android 系统(Android P) 的应用程序,将要求默认使用加密连接,这意味着 Android P 将禁止 App 使用所有未加密的连接,因此运行 Android P 系统的安卓设备无论是接收或者发送流量,未来都不能明码传输,需要使用下一代(Transport Layer Security)传输层安全协议,而 Android Nougat 和 Oreo 则不受影响。 因此在Android P 使用HttpUrlConnection进行http请求会出现以下异常 java.io.IOException: Cleartext HTTP traffic to **** not permitted 使用OKHttp请求则出现 java.net.UnknownServiceException: CLEARTEXT communication ** not permitted by network security policy 在Android P系统的设备上

Draw hole on UIBlurEffect

随声附和 提交于 2019-12-04 20:08:38
问题 Xcode 8.0 - Swift 2.3 I have an internal extension to create blur layer that works great: internal extension UIView { /** Add and display on current view a blur effect. */ internal func addBlurEffect(style style: UIBlurEffectStyle = .ExtraLight, atPosition position: Int = -1) -> UIView { // Blur Effect let blurEffectView = self.createBlurEffect(style: style) if position >= 0 { self.insertSubview(blurEffectView, atIndex: position) } else { self.addSubview(blurEffectView) } return

开发者注意:受欢迎的人工智能应用,应该具备这7个特质!

偶尔善良 提交于 2019-12-04 18:43:26
人工智能和语音识别正在迅速发展。 根据Gartner的报告,到2020年,人工智能将在无人管理的情况下管理85%的客户互动。 这很有可能,因为我们已经在教导我们的机器将数据解释为逻辑解决方案。 人工智能技术已经让用户的生活变得更加轻松,作为产品开发者或者说产品经理,如何构建自己的人工智能产品?为了进一步获得问题的答案,我们与一些成功的AI产品创始人进行了交谈,他们都在打造人工智能产品上有所建树。 1、为用户打造一种习惯,这非常有价值 Nathan Benaich,Playfair Capital科技公司的投资者 一个由AI驱动的真正出色的产品将带来令人赞叹的时刻,也即,开箱即用,能完成以前不可能完成的任务,这是一种神奇的感觉。 以Google相册为例,它可以检索与搜索查询匹配的图像。或SwiftKey,它可以预测您接下来要输入的单词。再比如特斯拉的自动驾驶仪,能够从驾驶员那里进行自动控制。这些产品都能带来令人惊喜的感觉,一种非同寻常的体验,因为它们对改变人类的生活非常有价值,因此很快就成为用户的一种习惯。 2、优秀的AI产品应该为帮助用户完成任务而生 x.ai首席执行官兼创始人Dennis R.Mortensen 优秀的AI产品应该是为了让用户的能力变得更强,帮助用户去完成任务,尽可能减少用户应该做的工作。这些才是真正的人工智能助理。 这些AI助理或虚拟助手

开发者注意:受欢迎的人工智能应用,应该具备这7个特质!

家住魔仙堡 提交于 2019-12-04 18:41:18
人工智能和语音识别正在迅速发展。 根据Gartner的报告,到2020年,人工智能将在无人管理的情况下管理85%的客户互动。 这很有可能,因为我们已经在教导我们的机器将数据解释为逻辑解决方案。 人工智能技术已经让用户的生活变得更加轻松,作为产品开发者或者说产品经理,如何构建自己的人工智能产品?为了进一步获得问题的答案,我们与一些成功的AI产品创始人进行了交谈,他们都在打造人工智能产品上有所建树。 1、为用户打造一种习惯,这非常有价值 Nathan Benaich,Playfair Capital科技公司的投资者 一个由AI驱动的真正出色的产品将带来令人赞叹的时刻,也即,开箱即用,能完成以前不可能完成的任务,这是一种神奇的感觉。 以Google相册为例,它可以检索与搜索查询匹配的图像。或SwiftKey,它可以预测您接下来要输入的单词。再比如特斯拉的自动驾驶仪,能够从驾驶员那里进行自动控制。这些产品都能带来令人惊喜的感觉,一种非同寻常的体验,因为它们对改变人类的生活非常有价值,因此很快就成为用户的一种习惯。 2、优秀的AI产品应该为帮助用户完成任务而生 x.ai首席执行官兼创始人Dennis R.Mortensen 优秀的AI产品应该是为了让用户的能力变得更强,帮助用户去完成任务,尽可能减少用户应该做的工作。这些才是真正的人工智能助理。 这些AI助理或虚拟助手

How to apply Perspective 3d Transform on image and save that image in document directory

拟墨画扇 提交于 2019-12-04 14:36:10
I am applying 3D transform on a image layer by follow code. UIImageView *view = (UIImageView *)[recognizer view]; CGPoint translation = [recognizer translationInView:self.view]; CGPoint newCenter = view.center; newCenter.x += translation.x; newCenter.y += translation.y; view.center = newCenter; [recognizer setTranslation:CGPointZero inView:self.view]; Following is the from which the points are converted to transform. UIView+Quadrilateral [self.view transformToFitQuadTopLeft:self.topLeftControl.center topRight:self.topRightControl.center bottomLeft:self.bottomLeftControl.center bottomRight:self

Draw from a separate thread with NSOpenGLLayer

此生再无相见时 提交于 2019-12-04 13:49:03
问题 I'm working on an app which needs to draw with OpengGL at a refresh rate at least equal to the refresh rate of the monitor. And I need to perform the drawing in a separate thread so that drawing is never locked by intense UI actions. Actually I'm using a NSOpenGLView in combination with CVDisplayLink and I'm able to achive 60-80FPS without any problem. Since I need also to display some cocoa controls on top of this view I tried to subclass NSOpenGLView and make it layer-backed, following

CSS Margin Negative without Moving Parent Container

跟風遠走 提交于 2019-12-04 13:35:47
I am trying to get on this page ( http://musicaladvocacy.org/ ) the area where it says "Home" (The White Container in the grey gradient) to go ~60 px up, but as you can see it does that as well as moves the parent container up. I just want the white box to move up NOT the whole thing. So it should look like this: http://musicaladvocacy.org/index-margin.jpg Thanks for any ideas! You can apply position:relative; top:-60px; on the element you need to shift up. #el { position:relative; top:-60px; z-index: 5; } You could also add 1px padding to the top of the parent, and continue using negative

java applet: is there a simple way to draw and erase in a two-layered 2D scene?

扶醉桌前 提交于 2019-12-04 13:10:31
I have an applet which displays some data using circles and lines. As the data continually changes, the display is updated, which means that sometimes the circles and lines must be erased, so I just draw them in white (my background color) to erase them. (There are a lot of them, so erasing everything and then recomputing and redrawing everything except the erased item would be a horribly slow way to erase a single item.) The logic of the situation is that there are two layers that need to be displayed, and I need to be able to erase an object in one layer without affecting the other layer. I

Showing sets of markers on different layers of Google map

ぃ、小莉子 提交于 2019-12-04 11:50:05
I need to show a set of markers on a Google map. I know markers can be added directly on a Google map but given that I have 3 sets of markers, one for shops, one for parks and another one for hotels, how can I show them on 3 different layers and so that later on using javascript, I be able to hide one set of markers by doing sort of: myLayer2.setMap(null); I have checked Panoramio layer but it needs the images first to be uploaded to panoramio , but in my case for some particular security reason I cannot upload them to panoramio. I will have images locally and set those at runtime based upon