display

Properly display JSON in table angular

十年热恋 提交于 2019-12-23 16:54:43
问题 I have an API which return me a JSON array: {"i":11,"j":12,"iterationNumber":9,"results":[12,6,3,10,5,16,8,4,2,1]} How can I make a table in angular, so the data is displayed correctly? Currently I have this: My html code is: <table class="table table-striped " ng-show="tableR"> <thead> <tr> <th>i Value</th> <th>j Value</th> <th>iternation Number Value</th> <th>results</th> </tr> </thead> <tbody> <tr ng-repeat="x in data"> <td>{{x.i}}</td> <td>{{x.j}}</td> <td>{{x.iterationNumber}}</td> <td>{

Give Button and Text on the same line and text to be center of button

谁说我不能喝 提交于 2019-12-23 15:54:22
问题 <input type="button" class="click" id="click" value="Click" style="width: 45px; margin-top: 1.5%; height: 20px; text-align: center; color: white; background: #23b7e5; font-size: 13px; border-color: #23b7e5; border-radius:2px; padding: 0px; "> <label class="control-label" style="border: thin red solid; margin-top: 10px;">Here to find location</label> I want button and text box in the same line which i got but i am not getting text to be center of button. I get this output. I want "Here to find

后台管理页面

一个人想着一个人 提交于 2019-12-23 15:47:06
m母板: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>{% block title %}{% endblock %}</title> <link rel="stylesheet" href="/static/css/commons.css" /> {% block css %}{% endblock %} <style> body{ margin: 0; } .left{ float: left; } .right{ float: right; } .hide{ display: none; } .pg-header{ height: 48px; background-color: #2f72ab; min-width: 1100px; line-height: 48px; } .pg-header .logo{ color: white; font-size: 24px; width: 200px; background-color: #1c5a9c; text-align: center; } .pg-header .hl-menu .item{ color: white; padding: 0 10px; height: 48px; display: inline-block; }

前端常用的CSS代码

て烟熏妆下的殇ゞ 提交于 2019-12-23 13:56:44
(非原创): demo演示 1、垂直居中对齐 .vc { position : absolute ; top : 50% ; left : 50% ; transform : translate ( -50%, -50% ) ; } .vc { position : absolute ; top : 50% ; left : 50% ; width : 100px ; height : 100px ; margin : -50px 0 -50px ; } ``````css 在这里插入代码片 2、全屏显示 html, body { position : fixed ; width : 100% ; height : 100% ; } div { height : 100% ; } 3、不同a标签链接使用不同样式 // link a [ href ^ = "http://" ] { background: url ( link . gif ) no-repeat center right ; } / / emails a [ href ^ = "mailto:" ] { background: url ( email . png ) no-repeat center right ; } / / pdfs a [ href$ = ".pdf" ] { background: url (

sonarqube+sonar runner分析C#代码

家住魔仙堡 提交于 2019-12-23 06:31:35
最近研究一个代码覆盖率和代码分析工具。遇到一些比较坑的问题,现在分享给大家。 1、Sonar介绍 Sonar是一个用于代码质量管理的开源平台,用于管理Java源代码的质量。通过插件机制,Sonar 可以集成不同的测试工具,代码分析工具,以及持续集成工具,比如pmd-cpd、checkstyle、findbugs、Jenkins。通过不同的插件对这些结果进行再加工处理,通过量化的方式度量代码质量的变化,从而可以方便地对不同规模和种类的工程进行代码质量管理。 同时 Sonar 还对大量的持续集成工具提供了接口支持,可以很方便地在持续集成中使用 Sonar。 此外,Sonar 的插件还可以对 Java 以外的其他编程语言提供支持,对国际化以及报告文档化也有良好的支持 一:先搭好环境 1.jdk 1.7的版本,我现在用的1.8的版本,尽量用最新版的: http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html 安装运行JDK以后,还需要做下面的几项配置: -计算机属性》高级系统设置》高级》环境变量》系统变量 - 添加服务器环境变量JAVA_HOME, 内容为Java的安装目录。例如我这里的安装目录为C:\Java\jdk1.8.0_11 -

配置sonar和jenkins进行代码审查

柔情痞子 提交于 2019-12-23 06:31:07
转自: http://www.cnblogs.com/gao241/p/3190701.html, 版权归原作者所有。 本文以CentOS操作系统为例介绍Sonar的安装配置,以及如何与Jenkins进行集成,通过pmd-cpd、checkstyle、findbugs等工具对代码进行持续审查。 一、安装配置sonar 1、Sonar介绍 Sonar是一个用于代码质量管理的开源平台,用于管理Java源代码的质量。通过插件机制,Sonar 可以集成不同的测试工具,代码分析工具,以及持续集成工具,比如pmd-cpd、checkstyle、findbugs、Jenkins。通过不同的插件对这些结果进行再加工处理,通过量化的方式度量代码质量的变化,从而可以方便地对不同规模和种类的工程进行代码质量管理。 同时 Sonar 还对大量的持续集成工具提供了接口支持,可以很方便地在持续集成中使用 Sonar。 此外,Sonar 的插件还可以对 Java 以外的其他编程语言提供支持,对国际化以及报告文档化也有良好的支持。 2、配置数据库 Apache Derby 是Sonar自带并且默认安装使用的数据库,此外Sonar对如下数据库提供支持:MySQL 5.x, Oracle 10g XE, Postgresql, MS SqlServer等,本文以mysql为例介绍如何配置数据库: 1)创建数据库

Python爬虫入门 Urllib库的基本使用

浪尽此生 提交于 2019-12-23 06:13:26
1.分分钟扒一个网页下来 怎样扒网页呢?其实就是根据URL来获取它的网页信息,虽然我们在浏览器中看到的是一幅幅优美的画面,但是其实是由浏览器解释才呈现出来的,实质它是一段HTML代码,加 JS、CSS,如果把网页比作一个人,那么HTML便是他的骨架,JS便是他的肌肉,CSS便是它的衣服。所以最重要的部分是存在于HTML中的,下面我们就写个例子来扒一个网页下来。 1 import urllib2 2 3 request = urllib2.Request("http://www.baidu.com") 4 reponse = urllib2.urlopen(request) 5 6 print reponse.read() 1 var _chrome_37_fix = document.createElement("style"); 2 _chrome_37_fix.type="text/css"; 3 _chrome_37_fix.setAttribute("data-for","result"); 4 _chrome_37_fix.innerHTML = ".t,.f16,#kw,.s_ipt,.c-title,.c-title-size,.to_zhidao,.to_tieba,.to_zhidao_bottom{font-size:15px;} .ec-hospital

How to Hide a DIV if Variable is Null

岁酱吖の 提交于 2019-12-23 02:07:18
问题 I have a div and a variable inside it, and would like to hide the div if the variable is empty. Any clues? For example: <div class='h-box'> <h1>text<h1/> <p><?php echo regular_he(); ?><p/> </div> 回答1: You can check if it is empty with PHP is_empty function: <?php if(is_empty($var_to_check)): ?> <div class='h-box'> <h1>text<h1/> <p><?php echo regular_he(); ?><p/> </div> <?php endif; ?> See docs: http://php.net/manual/en/function.empty.php 回答2: You can check variable by only if that is empty or

左边固定 右边自适应

青春壹個敷衍的年華 提交于 2019-12-23 02:00:20
1.css display flex 和 flex-flow:now; .container{display: flex;display:-webkit-flex;flex-flow:now;} .left{width:200px;height: 100px;} .right{flex:1;-webkit-flex:1;} <div class="container">   <div class="left">222</div>   <div class="right">2222222</div> </div> 2.float:left .left{width:200px;height: 100px;float:left;} .right{margin-left:200px;} 3.position:absolute .left{width:200px;height: 100px;position:absolute;left:0;top:0;} .right{margin-left:200px;} 4.display:table .container{display: table;width:100%;} .left{width:200px;height: 100px;} .right,.left{display:table-cell;} 5 width:calc(100% -

实现滚动时页面伸缩效果

北战南征 提交于 2019-12-23 01:04:48
  不知道怎么起这篇文章的标题才能表达出我实现的页面效果,   项目背景:嵌在原生开发的APP中。   上图给大家看一下      左侧图片代表进入app时页面的展示效果,右侧为页面滑动时的效果。   因为原生开发的APP有导航栏的,所以根据他们封装的抛出H5的API,将导航栏设置为透明色,这样才可以将原生开发的导航栏的背景色去掉。   首先说一下整个页面的布局。   因为这个布局我是用fixed定位写的,尤其是中间白色区域中顶部的标题Tab切换部分滑到顶部时固定。所以使用的页面的布局代码大致如下 <body> <div class="container"> <header class="headBox">   <ul class="headerList"> <li class="header-item">     <i class="indexIcon scan"></i> <p class="header-title">按钮一</p> </li> <li class="header-item">   <i class="indexIcon authorze"></i>   <p class="header-title">按钮二</p> </li> <li class="header-item"> <i class="indexIcon lending"></i> <p