昨天做练习的时候遇到了margin外边距的问题,给body的子元素div设置了margin-top:50px;为什么div元素没有把body撑开(即div顶部距body拉开50px)???而是div连同body整个被拉下来了,body距离为50px???代码结构如下:html{width: 100%...
分类:
其他好文 时间:
2015-08-02 14:57:17
阅读次数:
191
XXX 以上代码的初衷是让子元素的顶部距离父元素50px,但是事实上却并没有实现预期的效果,而是子元素顶部紧贴父元素,并且margin-top好像转移给了父元素,让父元素产生上外边距。这其实是一个典型的外边距合并问题,但是并非所有的浏览器都会产生这种情况,一般标准浏览器都会出现此...
分类:
其他好文 时间:
2015-08-02 11:27:57
阅读次数:
69
??
#include
#include
#include
using namespace std;
stack str;
char s1[9],s2[9];
int main()
{
int n;
str.push('#');
while(~scanf("%d %s %s",&n,s1,s2))
{
while(str.top()!='#')
st...
分类:
其他好文 时间:
2015-08-02 10:16:49
阅读次数:
141
1、配置pillar的top.sls:base:nova:-match:nodegroup-novaneutron:-match:nodegroup-neutron2、pillar的nova和neutron的配置:apache:name:httpdip:172.16.171.120root:/var/www/neutronapache:name:httpdip:172.16.171.110root:/var/www/nova3、配置state的top.sls:base:‘*‘:-a..
分类:
Web程序 时间:
2015-08-02 06:28:08
阅读次数:
238
【064-Minimum Path Sum(最小路径和)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 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...
分类:
编程语言 时间:
2015-08-02 06:23:02
阅读次数:
928
Find the total area covered by tworectilinearrectangles in a2Dplane.Each rectangle is defined by its bottom left corner and top right corner as shown ...
分类:
其他好文 时间:
2015-08-02 00:49:47
阅读次数:
147
在c++的STL中priority_queue相当于堆,使用的操作有push(), pop(), top()等;
使用方法及实例:
#include
#include
#include
using namespace std;
struct node{
int idx;
int key;
node(int a=0, int b=0):idx(a), key(b){}
};...
分类:
其他好文 时间:
2015-08-01 23:41:30
阅读次数:
338
关于phpize是干嘛用的,可以参看php官方文档:
前几日想安装memcache的时候,需要为php安装memcache扩展,按照网上教程的步骤一步步执行时却报了如下错误:
Cannot find config.m4.
Make sure that you run '/usr/local/php/bin/phpize' in the top level source directory of...
分类:
Web程序 时间:
2015-08-01 23:35:11
阅读次数:
226
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes...
分类:
其他好文 时间:
2015-08-01 23:17:36
阅读次数:
108
You are climbing a stair case. It takes n steps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
爬台阶,你每次可以上一层或者两层,问上n层你共有多少何种...
分类:
其他好文 时间:
2015-08-01 20:40:22
阅读次数:
109