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
keepalived+nginx双机热备+负载均衡
最近因业务扩展,需要将当前的apache 转为nginx(web), 再在web前端放置nginx(负载均衡)。同时结合keepalived 对前端nginx实现HA。
nginx进程基于于Master+Slave(worker)多进程模型,自身具有非常稳定的子进程管理功能。在Master进程分配模式下,Master进程永远不进行业务处理,只是进行任务分发,从而达到Master进程的存活高可靠性,Slave(worker)进程所有的业务信号都 由主进程发...
分类:
其他好文 时间:
2014-06-19 10:29:19
阅读次数:
307
原题地址: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
热点热词-Yi18事件风云榜 (top.yi18.net) 基于热点关键词二开放的新闻事件关注榜,
系统实时采集人们关注事件-基于百度搜索、搜狗热词、google趋势而采集的实时关注
事件与新闻。...
分类:
移动开发 时间:
2014-06-15 16:43:08
阅读次数:
572
OR1200中实现ICache的文件有or1200_ic_top.v、or1200_ic_fsm.v、or1200_ic_tag.v、or1200_ic_ram.v、or1200_spram.v,分别实现了ICache模块、IC_FSM模块、IC_TAG模块、IC_RAM模块、单口RAM。在ICache中例化了IC_FSM、IC_TAG、IC_RAM模块,在IC_TAG、IC_RAM模块中例化了单口RAM。如图12.4所示。其中IC_TAG、IC_RAM可以称为数据部分,IC_FSM可以称为控制部分,在数据...
分类:
其他好文 时间:
2014-06-14 06:24:13
阅读次数:
335
手工设置文本与图片相对位置时,常用到如下方法:
setCompoundDrawables(left, top, right, bottom)
setCompoundDrawablesWithIntrinsicBounds(left, top, right, bottom)
意思是设置Drawable显示在text的左、上、右、下位置。
但是两者有些区别:
setCompoun...
分类:
移动开发 时间:
2014-06-14 00:18:45
阅读次数:
491
一、脚本编程知识点1、获取变量中字符的长度:${#VARNAME}2、变量赋值:a)${parameter:-word}:如果parameter为空或未定义,则变量展开为“word”;否则,展开为parameter的值; 如:A=3 echo${A:-30} unsetA echo${A:-30}b)${parameter:+word}:如果parameter为空或未定义..
分类:
系统相关 时间:
2014-06-13 21:06:11
阅读次数:
473
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
有时候我们经常为我们的sql语句执行效率低下发愁,反复优化后,可还是得不到提高
那么你就用这条语句找出你sql到底是在哪里慢了 示例: SET STATISTICS io ON SET STATISTICS time ON go
---你要测试的sql语句 select top 100 * from...
分类:
数据库 时间:
2014-06-13 17:12:43
阅读次数:
275