padding

ShapeDrawable做放大镜效果

眉间皱痕 提交于 2019-12-02 05:31:28
引用一下ShapeDrawable的类的说明: java.lang.Object ? android.graphics.drawable.Drawable ? android.graphics.drawable.ShapeDrawable Class Overview A Drawable object that draws primitive shapes. A ShapeDrawable takes a Shape object and manages its presence on the screen. If no Shape is given, then the ShapeDrawable will default to a RectShape. It can be defined in an XML file with the <shape> element. file location: res/drawable/filename.xml The filename is used as the resource ID. compiled resource datatype: Resource pointer to a ShapeDrawable. resource reference: In Java: R.drawable.filename In XML: @

Vue自行封装常用组件-弹出框

ぐ巨炮叔叔 提交于 2019-12-02 04:56:24
使用方法: 1.在父组件中引入 "box.vue" //import popUpBox from "./box.vue"; 2.在父组件中注册 popUpBox //components:{popUpBox}, 3.放在父组件中使用 //<popUpBox></popUpBox> 4.调用popUpBox组件 //this.geAlert(0) 注: index.vue为 父组件,后者为子组件,效果图先上,可以先看是否是自己想要的组件,再选择使用 index.vue <template> <div> <popUpBox ref="modal" @on-confirm="confirm"> <div slot="modal__bd"> <div class="modal_form"> <p class="txetTitle">待付款订单</p> </div> <p class="textFelid">您好,查看您有一笔待支付订单,可直接支付,点击下方“确认”可直接支付。</p> </div> </popUpBox> </div> </template> <script> import popUpBox from "./box.vue"; export default { data() { return { }; }, components:{ //注册组件 popUpBox },

前端之Bootstrap框架

江枫思渺然 提交于 2019-12-02 04:55:03
前端之Bootstrap框架 概览 深入了解 Bootstrap 底层结构的关键部分,包括我们让 web 开发变得更好、更快、更强壮的最佳实践。 HTML5 文档类型 Bootstrap 使用到的某些 HTML 元素和 CSS 属性需要将页面设置为 HTML5 文档类型。在你项目中的每个页面都要参照下面的格式进行设置。 <!DOCTYPE html> <html lang="zh-CN"> ... </html> 移动设备优先 在 Bootstrap 2 中,我们对框架中的某些关键部分增加了对移动设备友好的样式。而在 Bootstrap 3 中,我们重写了整个框架,使其一开始就是对移动设备友好的。这次不是简单的增加一些可选的针对移动设备的样式,而是直接融合进了框架的内核中。也就是说, Bootstrap 是移动设备优先的 。针对移动设备的样式融合进了框架的每个角落,而不是增加一个额外的文件。 为了确保适当的绘制和触屏缩放,需要在 <head> 之中 添加 viewport 元数据标签 。 <meta name="viewport" content="width=device-width, initial-scale=1"> 在移动设备浏览器上,通过为视口(viewport)设置 meta 属性为 user-scalable=no 可以禁用其缩放(zooming)功能

Lottie animation padding

纵饮孤独 提交于 2019-12-02 04:09:31
问题 I have a question for the ones of you who have experience using lottie json files. I am not so experienced using lottie so I thought maybe I am missing some obvious knowledge. When I render my animation into a view, the animation object are placed in the center of the view like that _____________________________________________ | | | [animated object] | |_____________________________________________| Is there a way I can modify the json file to make the animated objects fit the whole view

AES padding and writing the ciphertext to a disk file

怎甘沉沦 提交于 2019-12-02 03:51:09
问题 I have a string which I encrypt with the following mehtod in C++ using Crypto++: std::ifstream t(filename); //File to be encrypt std::stringstream buffer; buffer << t.rdbuf(); ofstream combined_file2(filename2); //Encrypted file combined_file2 << encrypt(buffer.str()); string encrypt(string data) { // Key and IV setup std::string key = "0123456789abcdef"; std::string iv = "aaaaaaaaaaaaaaaa"; //Alternative //byte key[CryptoPP::AES::DEFAULT_KEYLENGTH], iv[CryptoPP::AES::BLOCKSIZE]; //memset(key

yolov1, yolo v2 和yolo v3系列

隐身守侯 提交于 2019-12-02 03:43:52
  目标检测模型主要分为two-stage和one-stage, one-stage的代表主要是yolo系列和ssd。简单记录下学习yolo系列的笔记。 1 yolo V1    yolo v1是2015年的论文 you only look once:unified,real-time object detection 中提出,为one-stage目标检测的开山之作。其网络架构如下:(24个卷积层和两个全连接层,注意最后一个全连接层可以理解为1*4096到1*1470(7*7*30)的线性变换)   yolo v1的理解主要在于三点:    1.1 网格划分 : 输入图片为448*448,yolo将其划为为49(7*7)个cell, 每个cell只负责预测一个物体框, 如果这个物体的中心点落在了这个cell中,这个cell就负责预测这个物体       1.2 预测结果 :最后网络的输出为7*7*30, 也可以看做49个1*30的向量,每个向量的组成如下: (x, y, w, h, confidence) *2 + 20; 即 每一个向量预测两个bounding box及对应的置信度,还有物体属于20个分类(VOC数据集包括20分类)的概率。   1.3 Loss 函数理解 :loss函数如下图所示,下面几个概念需要理清楚        s2:最后网络的输出为7*7*30,

pytorch-VGG网络

≯℡__Kan透↙ 提交于 2019-12-02 03:43:06
VGG网络结构 第一层: 3x3x3x64, 步长为1, padding=1 第二层: 3x3x64x64, 步长为1, padding=1 第三层: 3x3x64x128, 步长为1, padding=1 第四层: 3x3x128x128, 步长为1, padding=1 第五层: 3x3x128x256, 步长为1, padding=1 第六层: 3x3x256x256, 步长为1, padding=1 第七层: 3x3x256x256, 步长为1, padding=1 第八层: 3x3x256x512, 步长为1, padding=1 第九层: 3x3x512x512, 步长为1, padding=1 第十层:3x3x512x512, 步长为1, padding=1 第十一层: 3x3x512x512, 步长为1, padding=1 第十二层: 3x3x512x512, 步长为1, padding=1 第十三层:3x3x512x512, 步长为1, padding=1 第十四层: 512*7*7, 4096的全连接操作 第十五层: 4096, 4096的全连接操作 第十六层: 4096, num_classes 的 全连接操作 import torch from torch import nn class VGG(nn.Module): def __init__(self,

pytorch-Alexnet 网络

烈酒焚心 提交于 2019-12-02 03:36:16
Alexnet网络结构, 相比于LeNet,Alexnet加入了激活层Relu, 以及dropout层 第一层网络结构: 11x11x3x96, 步长为4, padding=2 第二层网络结构: 5x5x96x256, 步长为1, padding=1 第三层网络结构: 3x3x256x384,步长为1, padding=1 第四层网络结构: 3x3x256x384,步长为1,padding=1 第五层网络结构: 3x3x384x384, 步长为1,padding=1 第六层网络结构: 3x3x384x256, 步长为1, padding=1 第七层网络结构: 进行维度变化, 进行dropout操作, 进行(256*6*6, 4096)全连接操作 第八层:进行dropout操作,进行全连接操作(4096, 4096) 第九层: 输出层的操作, 进行全连接(4096, num_classes) from torch import nn class AlexNet(nn.Module): def __init__(self, num_classes): super(AlexNet, self).__init__() self.feature = nn.Sequential( nn.Conv2d(3, 96, kernel_size=11, stride=4, padding=2), nn

Horizontally space out my checkboxes using css? [closed]

橙三吉。 提交于 2019-12-02 03:03:07
I have a list of checkboxes that I'd like to have spaced out on a single horizontal line. <div class="timesheet-daily-entry-fields-container"> <input id="TimesheetMondayCheckbox" class="timesheet-daily-checkbox" type="checkbox"/> <input id="TimesheetTuesdayCheckbox" class="timesheet-daily-checkbox" type="checkbox"/> <input id="TimesheetWednesdayCheckbox" class="timesheet-daily-checkbox" type="checkbox"/> <input id="TimesheetThursdayCheckbox" class="timesheet-daily-checkbox" type="checkbox"/> <input id="TimesheetFridayCheckbox" class="timesheet-daily-checkbox" type="checkbox"/> <input id=

AES padding and writing the ciphertext to a disk file

半腔热情 提交于 2019-12-02 02:05:29
I have a string which I encrypt with the following mehtod in C++ using Crypto++: std::ifstream t(filename); //File to be encrypt std::stringstream buffer; buffer << t.rdbuf(); ofstream combined_file2(filename2); //Encrypted file combined_file2 << encrypt(buffer.str()); string encrypt(string data) { // Key and IV setup std::string key = "0123456789abcdef"; std::string iv = "aaaaaaaaaaaaaaaa"; //Alternative //byte key[CryptoPP::AES::DEFAULT_KEYLENGTH], iv[CryptoPP::AES::BLOCKSIZE]; //memset(key, 0x00, CryptoPP::AES::DEFAULT_KEYLENGTH); //memset(iv, 0x00, CryptoPP::AES::BLOCKSIZE); std::string