草庐IT

mat_bench_fixture

全部标签

html - Polymer 2.x 单元测试将可选内容传递给 fixture 以绑定(bind)到目标属性

我正在尝试将数据插入测试夹具,但目前无法实现。返回此错误:“已获得要标记的模型,但模板不是可绑定(bind)类型”我的测试代码如下:suite('',function(){varmyEl;setup(function(){myEl=fixture('myFixture',{selectedInput:'testinput'});});test('initiatesmy-element',function(){//failsasgivenInputreturns"[[selectedInput]]"assert.equal(myEl.givenInput,'testinput');});

html - Angular Material : How to change top padding of mat-grid-tile

我正在使用angular-materialAngular为5.mat-grid-tile有它自己的顶部填充,使用calc方法计算。我想在mat-grid-tile上设置自定义填充。我该怎么做? 最佳答案 网格图block组件会在元素本身上动态设置顶部内边距,因此您需要在CSS中使用!important修饰符来覆盖它。HTML:CSS:.my-grid-tile{padding-top:24px!important;} 关于html-AngularMaterial:Howtochanget

html - 在 angular7 中,如何在显示元素列表时更改 mat-select 的高度?

这个问题在这里已经有了答案:Stylingmat-selectinAngularMaterial(10个答案)关闭5个月前。在Angular7中,如何在显示元素时增加mat-select的高度?我有以下组件文件:import{Component,ViewEncapsulation}from"@angular/core";import{FormControl}from"@angular/forms";/**@titleSelectwithmultipleselection*/@Component({selector:"select-multiple-example",templateUr

html - Mat-icon 不在其 div 中心

我是css的新手,我无法将mat-icon(思想泡泡)与divclass=img(左侧的绿色方block)对齐-请参阅附图。此时图标有点靠近顶部为了添加svg图标,我使用了MaterialAngular-MatIconRegistry类(不知道它是否重要)我的结果:这是我的html:Sometexthere!这是我的CSS:$conainer-min-width:256px!default;$conainer-max-width:512px!default;$conainer-height:50px!default;div.container{max-width:$container-

html - Angular/Material mat-form-field 输入 - float 标签问题

有什么方法可以阻止占位符作为以下代码片段的标签float?Searchsearch我查看了Angular/Material的官方文档,但似乎这个功能现在已被弃用? 最佳答案 假设您使用的是Material2的最新稳定版本,您可以使用floatLabel="never"强制标签不float。这里是liveworkingdemo这在文档中很清楚https://material.angular.io/components/form-field/api 关于html-Angular/Materi

html - Angular 4 Material - mat-button 样式未应用于 mat-dialog 组件

我想创建一个带有默认样式mat-button的mat-dialog来关闭对话框。除了按钮缺少AngularMaterial应用的MaterialDesign风格外,一切正常。如何让样式显示出来?据我所知,我已经按要求导入了所有模块,并且properlysetupeachpartofAngularMaterialincludingthethemes.my-dialog.component.ts:import{Component,OnInit}from'@angular/core';@Component({selector:'app-my-dialog',templateUrl:'./my

javascript - 如何更改 Angular Material 上 mat-icon 的大小?

这个问题在这里已经有了答案:Howtochangemat-iconsizeinMaterial(11个答案)关闭2年前。AngularMaterial的mat-icon标签总是默认大小为24px。那么如何改变它...???.mat-icon{background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;}

c++ - 如何从 CVPixelBufferRef 转换为 openCV cv::Mat

我想对CVPixelBufferRef执行一些操作,然后得到一个cv::Mat裁剪到感兴趣的区域缩放到固定尺寸均衡直方图转换为灰度-每像素8位(CV_8UC1)我不确定执行此操作的最有效顺序是什么,但是,我知道所有操作都可以在open:CV矩阵上使用,所以我想知道如何转换它。-(void)captureOutput:(AVCaptureOutput*)captureOutputdidOutputSampleBuffer:(CMSampleBufferRef)sampleBufferfromConnection:(AVCaptureConnection*)connection{CVPix

ios - 将 UIImage 转换为 cv::Mat

我有一个UIImage,它是从iPhone相机捕获的图片,现在我希望将UIImage转换为cv::Mat(OpenCV)。我正在使用以下代码行来完成此操作:-(cv::Mat)CVMat{CGColorSpaceRefcolorSpace=CGImageGetColorSpace(self.CGImage);CGFloatcols=self.size.width;CGFloatrows=self.size.height;cv::MatcvMat(rows,cols,CV_8UC4);//8bitspercomponent,4channelsCGContextRefcontextRef=

Docker-compose redis : start with fixture?

我正在使用docker-compose创建一个redis容器。但是,我需要它以一些默认键值开头。这可能吗? 最佳答案 您需要修改您的DockerCompose文件,您也可以从一些包含键值的文件添加,但这里是在DockerCompose文件中添加和获取键的最简单示例。version:'2'services:redis:image:'bitnami/redis:latest'environment:-ALLOW_EMPTY_PASSWORD=yesports:-'6379:6379'command:-/bin/sh--c-|nohupr