padding

py 的 第 39 天

懵懂的女人 提交于 2019-12-28 14:26:18
---恢复内容开始--- 内容回顾:     1.高级选择器         后代选择器             选择的是儿子、孙子,重孙子             div p{}         子代选择器             选择的是亲儿子             div>p         组合选择器             div.active{}       属性选择器             input[type='text']{}         伪类选择器             爱恨准则                 a:link{}                 a:visited{}                 a:hover{}                 a:active             对a来设置字体颜色,一定要选中a         伪元素选择器                 p:first-letter{}                 p:before{ content:' ' }                 //与浮动有关系                 p:after{ content:' ' } 2.css的继承性和层叠行         在css中,color、text-xxx、font-xxx、 line

12.16日志

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-28 11:25:06
研究一下Pyramid Feature Attention Network for Saliency detection的模型代码 先是VGG16的结构 def VGG16(img_input, dropout=False, with_CPFE=False, with_CA=False, with_SA=False, droup_rate=0.3): # Block 1 #shape=(?, 256, 256, 64) x = Conv2D(64, (3, 3), activation='relu', padding='same', name='block1_conv1')(img_input) #shape=(?, 256, 256, 64) x = Conv2D(64, (3, 3), activation='relu', padding='same', name='block1_conv2')(x) C1 = x #shape=(?, 128, 128, 64) x = MaxPooling2D((2, 2), strides=(2, 2), name='block1_pool')(x) if dropout: x = Dropout(droup_rate)(x) # Block 2 # shape=(?, 128, 128, 128) x = Conv2D(128, (3,

自用CSS基础笔记-①入门知识

匆匆过客 提交于 2019-12-28 08:42:21
CSS优化界面 CSS选择器:(C3) ①id选择器②类选择器③标签选择器 ④通配符选择器⑤伪类选择器:(链接伪类a:link/visited/hover/active,结构伪类E:frist-child/E:last-child/E:nth-child(n),目标伪类:target) ⑥复合选择器 ⒈交集选择器[既标签又类名,连写] ⒉并集选择器[逗号] ⒊后代选择器[空格] ⒋子元素选择器[>] ⑦属性选择器 ⑴E[attr] (attr是属性值) ⑵E[attr=val](全等) ⑶E[attr^=val](属性值以val开头)⑷E[attr$=val](属性值以val结尾)⑸E[attr*=val](任意位置包含val) ⑧伪元素选择器:: E::frist-letter,E::frist-line,E::selection,E::before,E::after。(前/后添加content)类选择、伪类选择器就是选取对象,而伪元素选择器本质是插入一个行内元素(盒子)审查不到标签却能显示盒模型,要伪元素不占位要用绝对定位。 CSS简写: ①background:url(images/x.png) no-repeat fixed center -25px,url(images/x.png) no-repeat scroll center -25px #000;颜色最后加

setBackgroundResource() discards my XML layout attributes

笑着哭i 提交于 2019-12-28 08:06:14
问题 I have a view which is used as an item in a ListView . In my custom adapter, I change the background of the view using View.setBackgroundResource() depending on the item's position in the list. (I have separate assets for the first and last items in the list.) This sets the correct background image as expected, but it has the nasty side-effect that all the padding I'd set in the XML definition of the view is completely ignored. (If I set the background drawable in the XML, and don't try to

卷积:kernel size/padding/stride

六眼飞鱼酱① 提交于 2019-12-28 03:54:11
卷积的原理 卷积尺寸变化 输出尺寸=(输入尺寸-filter尺寸+2*padding)/stride+1 宽和高都是这么计算的; 输入图片大小为200×200,依次经过一层卷积(kernel size 5×5,padding 1,stride 2),pooling(kernel size 3×3,padding 0,stride 1),又一层卷积(kernel size 3×3,padding 1,stride 1)之后,输出特征图大小为:97 计算尺寸不被整除只在GoogLeNet中遇到过。卷积向下取整,池化向上取整。 (200-5+21)/2+1 为99.5,取99 (99-3)/1+1 为97 (97-3+21)/1+1 为97 常见的: stride为1,kernel为 3 ,padding为1 卷积前后尺寸不变 stride为1,kernel为 5 ,padding为2 卷积前后尺寸不变 ———————————————— 版权声明:本文为CSDN博主「maylisa_du」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/weixin_42490152/article/details/100160864 来源: CSDN 作者: c2a2o2 链接: https://blog

Python 爬虫---百度首页

ぐ巨炮叔叔 提交于 2019-12-28 00:30:30
#这个是urllib2的前身 import urllib.request #把自己伪装成浏览器,防止被封。。。 ua_headers = {"User-Agent" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36"} #通过urllib2.Request()方法构造一个请求对象 request = urllib.request.Request("http://www.baidu.com/",headers = ua_headers) #向指定的url地址发送请求,并返回服务器响应的类文件对象 response = urllib.request.urlopen(request) #服务器返回的类文件对象支持Python文件对象的操作方法 #read()方法就是读取文件里的全部内容,返回字符串 html = response.read() #打印响应的内容 print(html) 结果: D:\Python3Work\u1\venv\Scripts\python.exe D:/Python3Work/u1/爬虫基础/urllib2的使用.py b'<!DOCTYPE html>\n<!--STATUS

rem与em

耗尽温柔 提交于 2019-12-27 17:29:58
链接:http://caibaojian.com/rem-vs-em.html 你可能已经很熟练使用这两个灵活的单位,但你可能不完全了解何时使用 rem ,何时使用 em。 本教程将帮你弄清楚! Em 和 rem都是灵活、 可扩展的单位,由浏览器转换为像素值,具体取决于您的设计中的字体大小设置。 如果你使用值 1em 或 1rem,它可以被浏览器翻译成 从16px到 160px 或其他任意值。 CSS 边距设置为 1em 浏览器翻译成16px CSS padding设为 16px 浏览器翻译成160px 另一方面,浏览器使用 px 值,所以 1px 将始终显示为完全 1px。 滑动滑块试试这个 CodePen 例子,你可以看到rem 和 em 单位的值可以转化为不同的像素值,而 px 单位保持固定大小: 最大的问题是 使用 em 和 rem 单位可以让我们的设计更加灵活,能够控制元素整体放大缩小,而不是固定大小。 我们可以使用这种灵活性,使我们在开发期间,能更加快速灵活的调整,允许浏览器用户调整浏览器大小来达到最佳体验。 Em 和 rem 单位提供的这种灵活性和工作方式都很相似,所以最大的问题是,我们何时应使用 em 值,何时应使用 rem 值呢? 主要区别 Em 和 rem 单位之间的区别是浏览器根据谁来转化成px值 理解这种差异是决定何时使用哪个单元的关键。 我们要通过复习

Padding-bottom/top in flexbox layout

ぃ、小莉子 提交于 2019-12-27 16:50:10
问题 I have a flexbox layout containing two items. One of them uses padding-bottom : #flexBox { border: 1px solid red; width: 50%; margin: 0 auto; padding: 1em; display: flex; flex-direction: column; } #text { border: 1px solid green; padding: .5em; } #padding { margin: 1em 0; border: 1px solid blue; padding-bottom: 56.25%; /* intrinsic aspect ratio */ height: 0; } <div id='flexBox'> <div id='padding'></div> <div id='text'>Some text</div> </div> The blue element maintains its aspect ratio

Padding-bottom/top in flexbox layout

末鹿安然 提交于 2019-12-27 16:49:44
问题 I have a flexbox layout containing two items. One of them uses padding-bottom : #flexBox { border: 1px solid red; width: 50%; margin: 0 auto; padding: 1em; display: flex; flex-direction: column; } #text { border: 1px solid green; padding: .5em; } #padding { margin: 1em 0; border: 1px solid blue; padding-bottom: 56.25%; /* intrinsic aspect ratio */ height: 0; } <div id='flexBox'> <div id='padding'></div> <div id='text'>Some text</div> </div> The blue element maintains its aspect ratio

Base64 length calculation?

允我心安 提交于 2019-12-27 10:59:49
问题 After reading the base64 wiki ... I'm trying to figure out how's the formula working : Given a string with length of n , the base64 length will be Which is : 4*Math.Ceiling(((double)s.Length/3))) I already know that base64 length must be %4==0 to allow the decoder know what was the original text length. The max number of padding for a sequence can be = or == . wiki :The number of output bytes per input byte is approximately 4 / 3 (33% overhead) Question: How does the information above settle