offset

Difference between offsetParent and parentElement or parentNode

喜欢而已 提交于 2019-12-03 11:06:37
I have a following DOM structure <body> <div> <table> <outerElement> <innerElement /> </outerElement> <table> </div> </body> DIV has its overflow set to auto so if table grows bigger - it scrolls within the DIV. In this scenario why table.offsetParent returns the body while both table.parentNode and parentElement return the Div? I need to calculate current position of the innerElement within the window, so I traverse from it up thru all parent elements, collecting their offsetTop and offsetLeft values. Up until the DIV offsetParent works fine and then it skips it directly to the body. The

深度学习方法(十三):卷积神经网络结构变化——可变形卷积网络deformable convolutional networks

情到浓时终转凉″ 提交于 2019-12-03 11:03:36
上一篇我们介绍了: 深度学习方法(十二):卷积神经网络结构变化——Spatial Transformer Networks ,STN创造性地在CNN结构中装入了一个可学习的仿射变换,目的是增加CNN的旋转、平移、缩放、剪裁性。为什么要做这个很奇怪的结构呢?原因还是因为CNN不够鲁棒,比如把一张图片颠倒一下,可能就不认识了(这里mark一下,提高CNN的泛化能力,值得继续花很大力气,STN是一个思路,读者以及我自己应该多想想,还有什么方法?)。 今天介绍的这一篇可变形卷积网络deformable convolutional networks,也算是在STN之后的一个新的变换——STN是说CNN Kernel放死了(比如3*3大小),但是可以通过图片变换让CNN效果更好;而deformable是说既然图片可能各种情况,那我索性CNN的Kernel本身是不规整的,比如可以有dilation,也可以旋转的,或者看起来完全没有规则的。如下图,(a)是常规的一个3*3卷积窗口,(b)蓝色点就是原来的卷积窗口加上了一个offset的情况,(c)表示可以对进行窗口进行scale和aspect ratio的变换,(d)表示旋转; 论文引入了两种新的模块来提高卷积神经网络 (CNN) 对变换的建模能力: 可变形卷积 (deformable convolution) 和 可变形兴趣区域池化

Deformable ConvNet算法详解(对象尺寸/形状变换)

若如初见. 提交于 2019-12-03 10:57:49
Deformable ConvNet算法详解(DCN) 算法背景 算法细节 Deformable convolution Deformable RoI pooling Deformable ConvNets 实验 算法背景 论文全称:Deformable Convolutional Networks 论文链接: https://arxiv.org/abs/1703.06211 论文日期:2017.6.5 算法提出背景: CNN本质上仅限于大型模型 ,对几何变换建模的能力主要来自于广泛的数据增强,庞大的模型容量以及一些简单的手工模型。 同时还受到模型几何变化的限制,因为模型都是固定几何结构,卷积层,池化层以及RoI pooling层。 缺失处理几何变化的内部机制。 CNN模型限制的结果: 这就导致了相同CNN层的所有激活单元的感受野尺寸相同,会影响高层CNN层在空间定位编码语义,因为不同的定位与不同的尺寸与变形的对象相关。 所有方法都依赖于基于原始边界框的特征提取,尤其不适用于刚性对象。 因此需要提出一个新的模型, 能够适应检测对象尺寸、姿态、视野、部件变形中的几何变化以及模型几何变换。 基于这些要求,过去有两种解决方法: 数据集(足够的变量),进行数据增强。 花费高,模型复杂。 转换不变的特征与算法,eg. SIFT,sliding window。 缺点:

How to use OFFSET and Fetch without Order by in SQL Server

百般思念 提交于 2019-12-03 10:50:32
I want use OFFSET and Fetch in my SQL server 2012 query.But without any order by.I can not use order by.Because my sort order will be lost. How can I use OFFSET and Fetch without order by and row number and where in my query? My 2 select tables have same structure. INSERT INTO @TempTable [some columns] select [some columns] from table1 order by col1 INSERT INTO @TempTable [same columns] select [some columns] from table2 order by col2 select * from @TempTable OFFSET 20 ROWS FETCH NEXT 50 ROWS ONLY This query has syntax error at OFFSET keyword. By adding an identity column to the temp table

Deformable Convolutional Networks解读

天涯浪子 提交于 2019-12-03 10:43:55
这篇论文是daijifeng老师又一篇好文,一贯的好想法,而且实现的很漂亮, arxiv link Motivation 现实图片中的物体变化很多,之前只能通过数据增强来使网络“记住”这些变种如n object scale, pose, viewpoint, and part deformation,但是这种数据增强只能依赖一些先验知识比如反转后物体类别不变等,但是有些变化是未知而且手动设计太不灵活,不易泛化和迁移。本文就从cnn model的基础结构入手,比如卷积采样时位置是固定的,pool时采样位置也是固定,roi pool也是把roi分成固定的空间bins,这些它就不能处理几何的变化,出现了一些问题,比如编码语义或者空间信息的高层神经元不希望同一层的每个激活单元元的感受野是一样的。在检测中都是以bbox提取特征,这对于非格子的物体是不利的。因此本文提出了可变形的卷积神经网络。 举例: 3x3的卷积或pool,正常的cnn网络采样固定的9个点,而改进后,这九个采样点是可以变形的,特殊的情况如©是放大了(d)是旋转了 实现 普通cnn 以3x3卷积为例 对于每个输出y(p0),都要从x上采样9个位置,这9个位置都在中心位置x(p0)向四周扩散得到的gird形状上,(-1,-1)代表x(p0)的左上角,(1,1)代表x(p0)的右下角,其他类似。 可变形cnn 同样对于每个输出y

SVG stroke-dasharray offset not consistent

走远了吗. 提交于 2019-12-03 10:37:11
I have a series of circles with borders comprised of smaller circles which I will call 'dots'. I am then animating the circles by rotating them with CSS3's transform , each by either 5 or 15 degrees (alternating) more than the last starting with the middle circle not rotating at all. This alternating of degrees is due to the original offset of half of them of 5deg The animation itself works great, but the offset between each dot in a circle is not consistent. This is made obvious when the animation completes, some dots jump back. If they were all off by a consistent amount then it would be an

【转】分布式之消息队列复习精讲

眉间皱痕 提交于 2019-12-03 09:36:13
转自: https://www.cnblogs.com/rjzheng/p/8994962.html 引言 为什么写这篇文章? 博主有两位朋友分别是小A和小B: 小A,工作于传统软件行业(某社保局的软件外包公司),每天工作内容就是和产品聊聊需求,改改业务逻辑。再不然就是和运营聊聊天,写几个SQL,生成下报表。又或者接到客服的通知,某某功能故障了,改改数据,然后下班部署上线。每天过的都是这种生活,技术零成长。 小B,工作于某国企,虽然能接触到一些中间件技术。然而,他只会订阅/发布消息。通俗点说,就是调调API。对为什么使用这些中间件啊?如何保证高可用啊?没有充分的认识。 庆幸的是两位朋友都很有上进心,于是博主写这篇文章,帮助他们复习一下关于消息队列中间件这块的要点 复习要点 本文大概围绕如下几点进行阐述: 为什么使用消息队列? 使用消息队列有什么缺点? 消息队列如何选型? 如何保证消息队列是高可用的? 如何保证消息不被重复消费? 如何保证消费的可靠性传输? 如何保证消息的顺序性? 我们围绕以上七点进行阐述。需要说明一下,本文不是《消息队列从入门到精通》这种课程,因此只是提供一个复习思路,而不是去教你们怎么调用消息队列的API。建议对消息队列不了解的人,去找点消息队列的博客看看,再看本文,收获更大 正文 1、为什么要使用消息队列? 分析 :一个用消息队列的人,不知道为啥用,这就有点尴尬

Converting character offsets into byte offsets (in Python)

匿名 (未验证) 提交于 2019-12-03 09:14:57
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Suppose I have a bunch of files in UTF-8 that I send to an external API in unicode. The API operates on each unicode string and returns a list with (character_offset, substr) tuples. The output I need is the begin and end byte offset for each found substring. If I'm lucky the input text contains only ASCII characters (making character offset and byte offset identical), but this is not always the case. How can I find the begin and end byte offsets for a known begin character offset and substring? I've answered this question myself, but look

Make parts of a JTextArea non editable (not the whole JTextArea!)

匿名 (未验证) 提交于 2019-12-03 09:06:55
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm currently working on a console window in Swing. It's based on a JTextArea and works like a common command line. You type a command in one line and press enter. In the next line, the output is shown and under that output, you could write the next command. Now I want, that you could only edit the current line with your command. All lines above (old commands and results) should be non editable. How can I do this? 回答1: You do not need to create your own component. This can be done (as in I have done it) using a custom DocumentFilter . You

Dynamic Array of ints in j2me

匿名 (未验证) 提交于 2019-12-03 09:02:45
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to do a simple dynamic array of ints in my j2me application, The only dynamic array I see is "java.util.Vector" and this one doesn't seem to accept an int as a new element (only wants Objects). So how do I go around fixing that problem? 回答1: public class DynamicIntArray { private static final int CAPACITY_INCREMENT = 10; private static final int INITIAL_CAPACITY = 10; private final int capacityIncrement; public int length = 0; public int[] array; public DynamicIntArray(int initialCapacity, int capacityIncrement) { this