Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我正在尝试将某些程序的输出记录到 DynamoDB 表中,但我需要保留让我们说只有最后 5000 行。实现这一目标的最佳方法是什么?我的意思是,每次我需要在其中放入一些东西并检查是否会超出限制、检索第一行并将其删除时,这听起来有点极端。
您将如何在 RAM 中执行此操作?您将使用循环缓冲区。在 DynamoDB 上做同样的事情。每次写入表时,递增主键并将其取模 5000。
考虑我们已经声明了一个这样的字符串:string x;和一个这样的字符向量:vector<char> x_vec; 我在想这样做有什么好处
string x;
vector<char> x_vec;
cout<<x;
超过
for(int i=0;i<x.length();i