0.前言
水平居中基本方法——指定块的宽度并设定块的左右外边距为auto,上下外边距可取0,那么该块可以在父元素中水平居中。
样式如下:
1:margin:0px auto
2:margin-left:auto; margin-right:auto;
垂直居中基本方法——设定块的上下内边距相等。
样式如下:
padding-top:20px; paddin...
分类:
Web程序 时间:
2014-06-19 12:59:35
阅读次数:
540
Volist标签主要用于在模板中循环输出数据集或者多维数组。
web页面代码
table,tr,td{border: 1px solid gray;text-align: center;}
pre{font-size: 16px;}
...
分类:
Web程序 时间:
2014-06-19 12:42:12
阅读次数:
497
问题
查找某个值在list中的位置
解决思路
可以用折半查询的方法解决此问题。
解决(Python)
#! /usr/bin/env python
#coding:utf-8
#折半查找某个元素在list中的位置
def half_search(lst,value,left,right):
length = len(lst)
while left<ri...
分类:
其他好文 时间:
2014-06-19 11:09:48
阅读次数:
527
@CHARSET "UTF-8";.mytable a { color:
#c75f3e;}.mytable { width: 100%; border-left: 1px solid #c1dad7; border-top: 1px
solid #c1dad7; pa...
分类:
其他好文 时间:
2014-06-16 08:16:07
阅读次数:
461
1 left join
左外连接:查询结果以左表数据为准。假如左表有四条数据,右表有三条数据,则查询结果为四条,且都是左表中有的数据。例如:EMP表:SAL表:左连接select*fromEMPLeftjoinSALonEMP.ENAME=SAL.ENAME;左连接,表EMP是主表,因此查询结果是显...
分类:
数据库 时间:
2014-06-16 06:30:58
阅读次数:
246
原题地址:https://oj.leetcode.com/problems/unique-paths/题意:A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The ...
分类:
编程语言 时间:
2014-06-15 23:37:55
阅读次数:
311
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).
The robot can only move either down or right at any point in time. The robot is trying to reach the...
分类:
其他好文 时间:
2014-06-15 19:28:54
阅读次数:
246
1、position:static 所有的元素的默认定位都是position:static,这意味着元素没有被定位,而且在文档中出现在它应该在的位置。2、position:relative 如果设定position:relative,就可以使用top,bottom,left和right来相对于元素....
分类:
Web程序 时间:
2014-06-14 19:38:05
阅读次数:
223
手工设置文本与图片相对位置时,常用到如下方法:
setCompoundDrawables(left, top, right, bottom)
setCompoundDrawablesWithIntrinsicBounds(left, top, right, bottom)
意思是设置Drawable显示在text的左、上、右、下位置。
但是两者有些区别:
setCompoun...
分类:
移动开发 时间:
2014-06-14 00:18:45
阅读次数:
491
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.
Note: You can only move either down or right at...
分类:
其他好文 时间:
2014-06-13 20:36:56
阅读次数:
280