Because each plan item increases the total string length by roughly the same amount, the ratio of subsequent plateaus provides an indicator of the resize factor for the underlying array.
因为每个计划项增加的字符串长度总数大体相同,所以随后的稳定期比例可以作为重新设置底层数组大小的参考指标。
The example in Listing 9 parses the shopping cart XML file and generates a bill with the individual item totals and the sum total for the purchase ( Listing 10).
清单 9 解析这个购物车 XML 文件并生成一个账单,该账单显示项目合计和采购总计(见 清单 10)。
For example, with an online purchase, you want to store not only the item lines but also the total amount, because the buyer has approved the total amount.
比如,对于在线购买,需要存储的不仅仅是每个产品行,还包括总价格,因为买主已经认可了总价格。
应用推荐