聚合文章

汇集全部已收录博客的最新文章,点击标题前往原文阅读。

排序方式:最新发布

Word break with cost

Problem1 Given a set of strings W, a cost function c:W\to \R and a string s. Find elements w_1,\ldots,w_k\in W such that s=w_1\ldots w_k, and \sum_{i=1}^k c(w_i) is minimized. This problem is a genera…

Bounds on number of cuts

Consider we have an undirected graph G=(V,E) of n vertices, and there are positive cost c:E\to \R^+ on the edges. We define c(F)=\sum_{e\in F}c(e), to be the cost (value) of F\subset E. Let \mathcal{P…

Maximize Cash Back

Credit cards often offers rewards for purchases. For example, a card that gives 5% cash back for grocery stores. Also, credit cards often can be used to buy gift cards for specific stores. For example…

Yotta Savings and covering designs

Yotta Savings is a FDIC insured savings account that gives you “interest” in another way. It has a 0.2% APR. It is much better than the APR of many banks, but much worse than actual high APR savings a…

Use a box spread as a line of credit

In an idealized world, you could borrow at the Effective Federal Funds Rate (EFFR) and also earn roughly the same rate on cash deposits. For simplicity, assume the relevant short rate is fixed for a m…

CSS 行高

line-height 属性,可以用在块级元素上,顾名思义,就是 每一行的高度。 line-height 属性可以使用下面的单位: px em % 无单位, 比如 1.5 在没有单位的时候,它的工作原理类似百分比。比如 150% 和 1.5 是一样的。后者更实用可读。 为什么 line-height 非常重要 line-height 通过增加行间距,让你的文本更容易阅读。文本的大小影响可读性,建议…

CSS 字号和样式

font-size 这个属性可以设置字体大小。 我们已经了解了 CSS 尺寸单位,可以用于设置字体的大小。 p{ font-size: 16px;} 字体设置为 16px 并不代表每个字都是 16px,具体的大小取决于字体的字体。 font-style 这个属性可以把你的字体变成 _斜体_: h2{ font-style: italic;} 默认值是: font-style: normal;. 另…