line-block:设置行间的距离(行高),只能控制块级元素,span这样的行内元素无法控制,并且当块级元素 中包含span的时候设置line-block会使span的自适应高度小于块级元素的高度,上边的距离会产生空隙 white-space:设置文字为一行显示不换行,比如LI的文字如果宽度超过了 ...
分类:
其他好文 时间:
2016-09-23 12:50:43
阅读次数:
105
题目链接:http://acm.timus.ru/problem.aspx?space=1&num=1113 网上的解答铺天盖地。我硬是花了两天才懂了点。 wiki上的解释:https://en.wikipedia.org/wiki/Jeep_problem 解答:每个点的油量是500,500*2, ...
分类:
其他好文 时间:
2016-09-23 01:23:20
阅读次数:
153
———————————————————— <script type="text/javascript"> function goScroll(o){ var space=document.getElementById(o).offsetTop; document.getElementById(o). ...
分类:
其他好文 时间:
2016-09-22 21:24:06
阅读次数:
221
Given an input string, reverse the string word by word. A word is defined as a sequence of non-space characters. The input string does not contain lea ...
分类:
其他好文 时间:
2016-09-22 13:00:59
阅读次数:
119
一、文本处理工具1.文本查看命令cat[OPTION]…[FILE]…-n显示行号-b空格行不加行号,有字符的行才加-s相邻的空行压缩为一行,长和-n联用-v处理windows中的^M-T可以看到tab\space-A显示所有控制符(包括windows文本中的^M,^T)-E显示行结束符$(回车)tac[OPTION]…[FILE]…将每..
分类:
其他好文 时间:
2016-09-21 23:46:15
阅读次数:
463
Python语法简洁清晰,特色之一是强制用空白符(white space)作为语句缩进。Python具有丰富和强大的库。它常被昵称为胶水语言,能够把用其他语言制作的各种模块(尤其是C/C++)很轻松地联结在一起。 最喜欢写脚本用,爽丫丫! 点击下载 ...
分类:
编程语言 时间:
2016-09-20 23:50:17
阅读次数:
174
str.replace(/^\s+|\s+$/g, '') 解析: str:要替换的字符串 \s : 表示 space ,空格+: 一个或多个^: 开始,^\s,以空格开始$: 结束,\s$,以空格结束|:或者/g:global, 全局replace() 替换 str.replace(/^\s+|\ ...
分类:
Web程序 时间:
2016-09-20 22:33:11
阅读次数:
189
题目: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last ...
分类:
其他好文 时间:
2016-09-20 00:00:24
阅读次数:
321
题目链接:http://acm.timus.ru/problem.aspx?space=1&num=1112 题意:n根线段,要拿走一些,使得任何的线段的左段没有在某一个线段的内部。 其实说白了,就是拿走最少的线段,使得不重合。 数据量很小,100,直接LIS O(n^2)搞。 首先按x从小到大排, ...
分类:
其他好文 时间:
2016-09-19 22:28:38
阅读次数:
135
Determine whether an integer is a palindrome. Do this without extra space. 判断一个数是否是回文数,不能用额外的空间 我第一次做的时候,没有考虑到不能用额外的空间(空间复杂度为(n)),用了一个字符串来保存数字,而且题目的设定 ...
分类:
其他好文 时间:
2016-09-19 19:21:02
阅读次数:
123