W*****B 发帖数: 4796 | 1 这小子真傻,再等两天就能出狱了,
Aaron Hernandez's murder conviction erased
Published May 09, 2017FoxNews.com
Cites legal doctrine that a conviction must be vacated if the defendant dies
before an appeal
video
Judge erases murder conviction against Aaron Hernandez
A judge on Tuesday erased former NFL star Aaron Hernandez’s conviction in a
2013 murder because Hernandez died before his appeal was heard.
Hernandez, who had been a standout tight end for the New England Patriots
before his arrest, hanged himself in ... 阅读全帖 |
|
发帖数: 1 | 2 I walk in on Friday nights
Same old bar, same burned out lights
Same people and all the same faces
So why in the hell does it feel like a different place?
Meet my friends for a girls' night out
Seems there ain't much to talk about
Same drinks that we're all raising
But all of the toasts just don't feel the same
We used to be the life of the party
We used to be the ones that they wished they were
But now it's like they don't know how to act
Maybe they're like me and they want us back
It's like th... 阅读全帖 |
|
T*********I 发帖数: 10729 | 3 稀拉里原来一被问到erase,就恬不知耻地反问,你问的erase是黑板擦的erase吗?
现在网友如法炮制地搞了一个hack是用斧子。
哈哈哈 |
|
d*2 发帖数: 2053 | 4 https://www.nytimes.com/2017/04/23/technology/travis-kalanick-pushes-uber-
and-himself-to-the-precipice.html
Travis Kalanick’s drive to win in life has led to
a pattern of risk-taking that has at times put his
ride-hailing company on the brink of implosion.
By MIKE ISAACAPRIL 23, 2017
SAN FRANCISCO — Travis Kalanick, the chief executive of Uber, visited Apple
’s headquarters in early 2015 to meet with Timothy D. Cook, who runs the
iPhone maker. It was a session that Mr. Kalanick was dreading.
Fo... 阅读全帖 |
|
W*****B 发帖数: 4796 | 5 【 以下文字转载自 Military 讨论区 】
发信人: WCNMLGB (CCC), 信区: Military
标 题: Aaron Hernandez的谋杀裁决被取消了!
发信站: BBS 未名空间站 (Tue May 9 13:36:49 2017, 美东)
这小子真傻,再等两天就能出狱了,
Aaron Hernandez's murder conviction erased
Published May 09, 2017FoxNews.com
Cites legal doctrine that a conviction must be vacated if the defendant dies
before an appeal
video
Judge erases murder conviction against Aaron Hernandez
A judge on Tuesday erased former NFL star Aaron Hernandez’s conviction in a
2013 murder because Hernandez died befo... 阅读全帖 |
|
D*****r 发帖数: 6791 | 6 You can buy a $20 OBD-II scan tool. It can erase error code (the Service
engine soon light). Then you don't have to ask others to erase it for you.
But take a look at the error code. It might be related to the A/C
And erasing the trouble code might not help you pass the emission tests
because when they scan the OBD system, the sensors will report unfinished
drive cycle.
2000 Mitsubishi Mirage will probably use MUT-II protocol, but since it's
sold after 1996, it should be OBD-II compatible which... 阅读全帖 |
|
g*****k 发帖数: 623 | 7 Why you people like to decrement m instead of incrementing m?
By increment, you can get rid of push_back and erase, if you reserve size m
for subset.
Thus you can access subset[m] each time and don't need to erase elements.
题目的意思相当于有序打印集合A所有大小为3的子集,代码如下:
void run(int a[], int n, int m, vector &subset)
{
if(n < m) return ;
if(m == 0) {
for(int i = 0; i < subset.size(); i++)
cout << subset[i] << " ";
cout << endl;
return ;
}
subset.push_bac... 阅读全帖 |
|
s****a 发帖数: 528 | 8 1. build hash table for words in : wordsSet
2. sort the words from shortest to longest: wordsArray
while(!wordsArray.empty())
{
string word = wordsArray.back();
wordsArray.pop_back();
int maxLength = word.length();
if (maxLength == 1) return 1;
if (wordsSet.find(word) == wordsSet.end())
continue; // this word is already tested
wordsSet.erase(word);
WordsStack subWordsStack;
subWordsStack.push(word);
// check if the word can be build up from 1 to maxle... 阅读全帖 |
|
s****a 发帖数: 528 | 9 1. build hash table for words in : wordsSet
2. sort the words from shortest to longest: wordsArray
while(!wordsArray.empty())
{
string word = wordsArray.back();
wordsArray.pop_back();
int maxLength = word.length();
if (maxLength == 1) return 1;
if (wordsSet.find(word) == wordsSet.end())
continue; // this word is already tested
wordsSet.erase(word);
WordsStack subWordsStack;
subWordsStack.push(word);
// check if the word can be build up from 1 to maxle... 阅读全帖 |
|
k***t 发帖数: 276 | 10 参照网上的思路写了一个。哪位大拿给Review一下。谢了。
我平时只写C,不用C++。所以可能有初级错误:)
#include
#include // HashMap
#include
using namespace std;
// cache entry
struct Entry {
int v; // dummy structure
};
class LRU {
private:
list > mlist;
unordered_map >::iterator> mht;
int cnt;
const static int MAX_SIZE = 10000;
public:
LRU () {cnt=0;}
~LRU () {}
void addEntry (string mURL, Entry mEntry) {
mlist.push_fron... 阅读全帖
|
|
w*******r 发帖数: 2953 | 11 改完的程序在下面,这下疾病可以随便定义了,也可以治病了。
想给给个病安个计数器,记得好像有个什么关健词可以让所有的object改动的都是
同一个变量而不是各自的变量(counter),记不起来了,所以这个counter打印得
不对,有知道的告诉我一声。
#include
#include
#include
using namespace std;
class Disability
{
public:
Disability(){counter = 0; };
Disability(string, string);
~Disability(){};
string get_disease_name() const { return name; };
string get_disease_desc() const { return desc; };
void incr_sick_human_counter() {counter++; };
unsigned long get_hum... 阅读全帖 |
|
b*****u 发帖数: 648 | 12 int ValidWords ( char[][]matrix, int n, map dictionary)
{
int result = 0;
//every element as starting point
for(int i = 0; i< n; i++)
{
for (int j = 0; j
{
map usage;
string testWord;
testWord += matrix[i][j];
usage[i*n+j]=1;
moveNext (testWord; i, j, dictionary,usage,result);
}
}
return result;
}
// move to next step
void moveNext (string testWord, int i, int j, m... 阅读全帖 |
|
a******e 发帖数: 710 | 13 开始只是想到了O(n)的算法。 O(m)的算法可以这么实现
#include
#include
using namespace std;
struct DListNode {
char val;
DListNode *prev;
DListNode * next;
DListNode(char v): val(v), prev(nullptr), next(nullptr) {}
};
void printList(DListNode* head){
while (head!=nullptr) {
cout<val<<", ";
head = head->next;
}
cout<
}
void printSet(unordered_set &s) {
for (auto iter=s.begin(); iter!=s.end(); ++iter)
cout<<(*ite... 阅读全帖 |
|
g***j 发帖数: 1275 | 14 Given an unsorted array of integers, find the length of the longest
consecutive elements sequence.
For example,
Given [100, 4, 200, 1, 3, 2],
The longest consecutive elements sequence is [1, 2, 3, 4]. Return its length
Your algorithm should run in O(n) complexity.
我在网上看到了几段code,用到了set或者map,每次要在set或者map里面找到,然后删
掉,我想问,这样的code时间是n么?find in a set难道不是logn么?当然也有用到
map的,我觉得找元素都是logn啊,那么最终的时间就是nlogn啊,比如如下code
class Solution {
public:
int longestConsecutive(vector &num) {
// Start typing... 阅读全帖 |
|
s*********t 发帖数: 52 | 15 你说的查hashtable的个数,因为非空bucket不是连续排列的,所以这个操作的复杂度
是O(M),M是bucket的个数,这个耗时比O(N)还大,我试了一下你说的方法,没有
查剩余数字的个数差,而是数删掉的数字的数量,可以通过大数据,我这里用的是set
,find的复杂度实际上是O(log_n),也能通过大数据,如果换成unordered_set,会更
快。
class Solution {
public:
int longestConsecutive(vector &num) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
set myset;
int ret = -INT_MAX;
for (int i = 0; i < num.size(); i++) {
if (myset.find(num[i]) == myset... 阅读全帖 |
|
H*********a 发帖数: 34 | 16 用的list和unordered_map
----------------------------
谢谢提醒,改过之后,发现还是通不过
class LRUCache{
public:
int cap;
unordered_map mymap;
list mylist;
LRUCache(int capacity) {
cap = capacity;
}
int get(int key) {
unordered_map::iterator it = mymap.find(key);
if (it == mymap.end())
return -1;
else {
list::iterator it_list = mylist.begin();
while(*it_list != key) it_list++;
myl... 阅读全帖 |
|
y*****e 发帖数: 18 | 17 /*
Algorithm: Modified Binary search
[1,3],[6,9], insert and merge [2,5] in as [1,5],[6,9].
1. BSearch to find the 'first' interval whose end >= newInterval.start.
If does not find, the new interval should be appended at the tail.
2. BSearch to find the 'last' interval whose start <= newInterval.end.
If does not find, the new interval should be inserted before the head.
3. Erase the found 'first' to 'last' intervals and insert the new merged
interval at index 'first'
*/
vector i... 阅读全帖 |
|
y*****e 发帖数: 18 | 18 /*
Algorithm: Modified Binary search
[1,3],[6,9], insert and merge [2,5] in as [1,5],[6,9].
1. BSearch to find the 'first' interval whose end >= newInterval.start.
If does not find, the new interval should be appended at the tail.
2. BSearch to find the 'last' interval whose start <= newInterval.end.
If does not find, the new interval should be inserted before the head.
3. Erase the found 'first' to 'last' intervals and insert the new merged
interval at index 'first'
*/
vector i... 阅读全帖 |
|
B********t 发帖数: 147 | 19 自己写的最少行的版本,感觉背下来都要敲25分钟
class Solution {
public:
bool solveSudoku(vector> &v1, vector> &v2,
vector> &v3, vector > &board) {
for (int i = 0; i < board.size(); ++i)
for (int j = 0; j < board.size(); ++j)
if (board[i][j] == '.') {
int k = (i/3)*(board.size()/3) + j/3;
for (char c = '1'; c <= '9'; ++c) {
if (v1[i].find(c) == v1[i].end... 阅读全帖 |
|
f**********t 发帖数: 1001 | 20 // Given an string array sorted by characters in another string.
// Return that sorting base string.
// Example. give you
// {foo, cat, cao, bag, bat, aac}
// return: fcbagto
void buildGraph(vector &vs, unsigned col, unsigned up, unsigned down,
map> &res) {
char pre = '#';
unsigned count = 0;
unsigned uu = up;
for (unsigned i = up; i < down; ++i) {
if (vs[i].size() <= col) {
break;
}
if (vs[i][col] == pre) {
++count;
} else {
... 阅读全帖 |
|
p****6 发帖数: 3 | 21 this is the c++ version, based on greedy method.
string DeleteDigits(string A, int k) {
// wirte your code here
int len = A.size();
if(len==k) return "0";
int idx = 0;
while(k>0){
if(A[idx]>A[idx+1]){
A.erase(A.begin()+idx);
k--;
} else{
while(A[idx] <= A[idx+1])
idx++;
A.erase(A.begin()+idx);
k--;
idx = 0;
... 阅读全帖 |
|
p****6 发帖数: 3 | 22 this is the c++ version, based on greedy method.
string DeleteDigits(string A, int k) {
// wirte your code here
int len = A.size();
if(len==k) return "0";
int idx = 0;
while(k>0){
if(A[idx]>A[idx+1]){
A.erase(A.begin()+idx);
k--;
} else{
while(A[idx] <= A[idx+1])
idx++;
A.erase(A.begin()+idx);
k--;
idx = 0;
... 阅读全帖 |
|
Y**i 发帖数: 6922 | 23 清洁的一大原则:勤快!不要让污垢积累,否则再厉害的清洁用品也帮不了你.我家都是
weekday随手清洁,周末再大清洁一次.
[[厨房]]
我家用的抹布是Micro Fiber材质的,到处都有的卖.我之前在BBB买了一捆,都1年了吧,
到现在还没用完,这个东西不贵的,但比普通的抹布的确好用点.
我家用的Sponge是Non Scratch的,钢丝球这类的我家是没有.我怕把家里的东西擦坏,用的
都是Non Scratch的清洁工具.
<<大理石>>
对付大理石我用Perfect Granite.平时做饭,如果弄脏了,不是特别油的话,我用湿抹布
擦掉.如果特别油的话,我用Perfect Granite擦.然后每周末的大扫除,我会用Perfect
Granite再全部擦一遍.
<<不锈钢电器>>
对付我家的不锈钢电器,我用Perfect Stainless.这个东西不用喷很多,一点点就能擦不
小的区域了.擦不锈钢电器一定要用Micro Fiber的抹布,如果你不想擦伤你的不锈钢,这
是电器店里的人告诉我的.Perfect Stainless清洁+上光,我一周用一次,很好.
<<平时的dish ... 阅读全帖 |
|
Y**i 发帖数: 6922 | 24 清洁的一大原则:勤快!不要让污垢积累,否则再厉害的清洁用品也帮不了你.我家都是
weekday随手清洁,周末再大清洁一次.
[[厨房]]
我家用的抹布是Micro Fiber材质的,到处都有的卖.我之前在BBB买了一捆,都1年了吧,
到现在还没用完,这个东西不贵的,但比普通的抹布的确好用点.
我家用的Sponge是Non Scratch的,钢丝球这类的我家是没有.我怕把家里的东西擦坏,用的
都是Non Scratch的清洁工具.
<<大理石>>
对付大理石我用Perfect Granite.平时做饭,如果弄脏了,不是特别油的话,我用湿抹布
擦掉.如果特别油的话,我用Perfect Granite擦.然后每周末的大扫除,我会用Perfect
Granite再全部擦一遍.
<<不锈钢电器>>
对付我家的不锈钢电器,我用Perfect Stainless.这个东西不用喷很多,一点点就能擦不
小的区域了.擦不锈钢电器一定要用Micro Fiber的抹布,如果你不想擦伤你的不锈钢,这
是电器店里的人告诉我的.Perfect Stainless清洁+上光,我一周用一次,很好.
<<平时的dish ... 阅读全帖 |
|
j**x 发帖数: 446 | 25 先不着急买油漆,先试试magic eraser看看。我家当时很多墙上的弄脏的地方东西就
用magic eraser搞定了,然后请人洗了地毯,所有deposit都退给我们了回来了。
如果magic eraser搞不定,就去home depot之类的店去问问,油漆要什么都会告诉你的
。是个人就会刷。但是如果找不到match的油漆,说不定得刷整面墙。 |
|
|
a***o 发帖数: 24 | 27 儿子刚上K班一个月,今天接到老师一个措辞严厉的邮件的信,还抄送给校长了,看了
以后一肚火,请大家支招。
I wanted to touch base with you in regards to your son's behavior yesterday.
Joseph got upset when he saw his mom before the Study Trip and was told that
he was going in someone's car for the Library Study Trip. He began hitting
his mom multiple times, would not use his words and cried. I then told the
driver, Mr. Ramirez, that Joseph would be going alone with his mother.
When we got back to the school, we had about 10 minutes left and Joseph... 阅读全帖 |
|
x*******i 发帖数: 3847 | 28 1。每ID限推荐2个物品,限家居用品,厨房用品
Clean Up Eraser&Sponge only from Rite Aid
2。必须附上介绍/推荐的原因/使用心得,必须有图片
一个字:好
二个字:好用
三个字:很好用
四个字:非常好用
五个字:实在是好用
六个字:不得了的好用
七个字:黯然销魂的好用
八个字:情不自禁流泪的好用
九个字:。。。。。。。。好用
擦炉子,擦台面,擦墙壁,擦地板,擦浴缸,擦玻璃,擦镜子,擦龙头,只有你想不到
的,没有你擦不干净的,这就是Clean Up Eraser&Sponge only!!! from Rite Aid
3。说明什么价格入手比较好,哪里有deal,如何购买
这么好用的东西,多少钱?我不敢说出价格,因为每家的Rite Aid存货都不多,我怕说出价格来,一下就被抢光了。。。。1刀,没错,1刀,只要1刀!
每个包装有2块,平均一块只要5毛钱,只要5毛钱!想想论坛上的5毛党,多么廉价的5
毛党,可是这么廉价的5毛钱居然能换回如此神奇的东西,5毛党们哭了,他们第一次觉
得自己的劳动是有价值的。
如果您拥有Rite Aid的银卡,您只需要支付9... 阅读全帖 |
|
j********7 发帖数: 208 | 29 明年初准备和几个朋友去南美,早就听说这三个国家签证不好拿,尤其是玻利维亚签证
号称是世界上最难拿签证的国家,版上考古也印证了这一点,我坚决不能接受成为猪一
样队友的现实,匆匆准备之后,还是抱着必死的决心在一个月之内搞定了这三个签证(
智利还没拿到,不过基本没问题了)。下面就都是干货了
签证时间 玻利维亚=秘鲁<智利 玻利维亚=秘鲁=1周 智利=15-20天
材料准备难度 秘鲁<玻利维亚<智利
玻利维亚
准备材料:VISA REQUIREMENTS FOR CHINESE CITIZENS
This VISA is valid for thirty (30) days since the entrance date, it will
work for a single entry and it cannot be done upon arrival.
Fill and sign the Sworn Statement form.
Valid Passport for at least six (6) months, make sure there are available
pa... 阅读全帖 |
|
b******n 发帖数: 2328 | 30 "Best Of Me"
I was made the wrong way
Won't you do me the right way
Where you gonna be tonight
'cause I won't stay too long
Maybe you're the light for me
When you talk to me it strikes me
Won't somebody help me
'cause I don't feel too strong
Was it something that I said
Was it something that I did
Or the combination of both that did me wrong
You know I'm hoping you'll sing along
Though it's not your favorite song
Don't wanna be there when there's nothing left to say
You know that some of us spin... 阅读全帖 |
|
Y*C 发帖数: 405 | 31 HDR Bracket HDR之包围曝光
HDR(高动态范围)图像的自动包围式曝光和timelapses。
SET键调整拍摄照片的数量,PLAY键调整照片曝光EV值的级差。请按下Q键则迅速关闭此
功能。
在拍照的M模式下,本功能为快门包围。在其它模式为曝光补偿包围。
HDR图像可以采取:
* ML遥控触发器:LCD的面部感应器和音频触发。
* ML定时器(HDR延时摄影)
* 按下快门,第一张照片是中间曝光(无EV补偿)的,并且使用2秒延时自拍。另外,
该模式工作时将拍下三张或以上照片,也就是说照片数量设置为2时,也是拍下3张照
片。
为了达到最佳效果,切换到手动对焦,并使用相对较慢的曝光时间。
对于每个HDR图片集,ML也写了一个进入脚本,用enfuse堆叠曝光(4.x版)。这个脚
本存储在DCIM文件/###佳能和命名后的第一张照片集,例如如果HDR顺序是从IMG_
1001.JPG ... IMG_1005.JPG,HDR脚本将被命名为HDR_1001.SH和由此产生的HDR图像将
作为HDR_1001.JPG保存。
要在计算机上运行的HDR的脚本,将在相同的目录中并运行(... 阅读全帖 |
|
d**********o 发帖数: 1321 | 32 一个单词引发的血案(2)
如果说,因为12、12这个周五upload到github上去的review docs上一个词特别刺眼,
那一定是批在review第二页纸下方的这个“practice”了。
记得那个周五中午,我见代课老师的办公室门是开着的,便敲门应允进去了。老师说他
正在改我的review。说到最后,他指给我看我review的最后几段的“practise”说,他
知道英国等一些国家名字也用“practise”,但在美国,作动词用时是practise, 但作
名词用的时候还是用“practice”,并把这名词规规矩矩、端端正正地写在了这页纸的
下方。我不以为意。
及至这天下午紧接着系里发出的邮件,我也以为天上掉馅饼,系里有多的奖学金的话,
不是说我春天也可以拿到TA了吗?LinkedIn上当天也刮这种风,虽然自己当时并不没有
回,但晚上临睡前还是发信回复给系里,问一下到底是什么情况。但系里小秘第二天中
午用她的周末时间给我的回复是,那是发给全系的邮件,即使系里有奖学金,我是没有
资格的,因为先前导师与我已经讲好了春天我只能注册一个学分。我友好地回复系里小
秘的邮件。不给奖学金不是... 阅读全帖 |
|
m**d 发帖数: 21441 | 33 QBASIC - Statements
命令:
BEEP, BLOAD, BSAVE, CALL, CHAIN, CHDIR, CIRCLE, CLEAR, CLOSE, CLS, COLOR,
COM, COMMON, CONST, DATA, DATE$, DECLARE, DEF, DEFDBL, DEFINT, DEFLNG,
DEFSNG, DEFSTR, DIM, DO, DRAW, END, ENVIRON, ERASE, ERROR, EXIT, FIELD,
FILES, FOR, FUNCTION, GET, GOSUB, GOTO, IF, INPUT, IOCTL, KEY, KILL, LET,
LINE, LINE INPUT, LOCATE, LOCK, LPRINT, LSET, MID$, MKDIR, NAME, ON, OPEN,
OPTION, OUT, PAINT, PALETTE, PCOPY, PEN, PLAY, POKE, PRESET, PRINT, PSET,
PUT, RANDOMIZE, READ, REDIM, REM, ... 阅读全帖 |
|
l**a 发帖数: 5175 | 34 I don't agree with you on
可惜最后出了意外,自己卷铺盖卷跑了///
I think you are still under his control,
if someone completely out of his influence,
this person will never come back to mitbbs or wisdom.
Completely erase some memory is very difficult.
You need to erase something from your 8识.
something is in your 8识, this need to be changed.
if it gets into 8识, it may not seem matters now,
it matters when you are dying, and your next life.
it influence on who you will be with in your next life...
what you will be... 阅读全帖 |
|
S**I 发帖数: 15689 | 35 Disk Utilities->Erase->Erase Free Space->7-pass/35-pass Erase of Deleted
Files |
|
l******a 发帖数: 1503 | 36 Erase了基本就是知道找不回来了 最后的努力,不丢隐私。 所以既然erase了 就啥都
没了吧。 我没用过但是觉得应该不会有提示。
: 如果“erase ipad"以后,开机时还会出现“Ipad lost提示和联系电话吗”
|
|
发帖数: 1 | 37 谁叫自己上了嵌入式的贼船,工资低呢。。。C看多了,也不能刷题转码搞互联网
为什么摄像头领域不能有像开源openwrt一样的项目呢?
把海康的dmesg贴出来,大家可以参考,他们用安霸S3L,https://www.ambarella.com/
products/security-ip-cameras/security-ip-camera-products#S3L
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 3.10.73+ ([email protected]) (gcc version 5
.2.1 20151005 (Linaro GCC 5.2-2015.11-2) ) #1 PREEMPT Mon Jan 23 10:38:22
CST 2017
[ 0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=
10c53c7d
[ 0.000000] CPU: PIPT / ... 阅读全帖 |
|
b***n 发帖数: 590 | 38 member functions of the C++ (SGI STL, according to Hou's book)
STL list container:
void pop_front() {erase(begin());}
void pop_back() {iterator tmp=end(); erase(--tmp);}
For the pop_back(), why not juse write as:
void pop_back() {erase(--end());}
looks like it should also work.
Thanks! |
|
c*****z 发帖数: 182 | 39 在list中有两个操作insert和erase,它们都是返回一个iterator的类型,可是在代码
中返回的方式不同,如下:
在insert中:
iterator insert(iterator __position, const _Tp& __x) {
_Node* __tmp = _M_create_node(__x);
__tmp->_M_next = __position._M_node;
__tmp->_M_prev = __position._M_node->_M_prev;
__position._M_node->_M_prev->_M_next = __tmp;
__position._M_node->_M_prev = __tmp;
return __tmp;
}
在erase中:
iterator erase(iterator __position) {
_List_node_base* __next_node = __position._M_node->_M_next;
_List_nod |
|
t****t 发帖数: 6806 | 40 while (!vsn.empty() && vsn.back().count<2) vsn.pop_back();
因为你不能保证vsn.back()总是存在, 所以你要先看它是不是空的.
如果你知道一个iterator a, 要从这个iterator一直删到最后, 可以写
vsn.erase(a, vsn.end());
std::remove不是删除元素用的, 是把要删的元素交换到range的最后. 删除用
container.erase(). 所以对于vector, 可以这样用:
vsn.erase(remove(vsn.begin(), vsn.end(), your_condition), vsn.end());
这些在effective STL里都有...STL虽然很容易用, 但是完全不看手册光凭函数名想当
然, 也是不行的. |
|
B*******g 发帖数: 1593 | 41 考 我越来越confused了
先问问general map::erase
Erase elements
Removes from the map container either a single element or a range of
elements ([first,last)).
This effectively reduces the container size by the number of elements
removed, calling each element's destructor.
如果我是map map::erase() 不会delete 吧? 文中的意思是map会析构
A?
~Foo() 运行了几次?
Solaris
pointer'
ref
triggered |
|
i**********r 发帖数: 36 | 42 【 以下文字转载自 Linux 讨论区 】
【 原文由 interstellar 所发表 】
i upgraded to redhat7.2, and now in vim the backspace key doesn't
erase the letter before cursor, but show up as ^?. i need to use
ctrl+backspace to erase. what can i do so that using backspace only
will erase.
another similar question, when i telnet to a remote unix system, even
on the command line, backspace show up as ^?, how can fix this one? |
|
c**********e 发帖数: 2007 | 43 For 5, I think we can use a doubly linked list plus a hash_map.
The linked list should have a tail pointer. Each node is of a structure
struct Node {
Obj* obj;
long id;
Node* next;
Node* prev;
}
The linked list has both a header pointer and a tail pointer. The hash_map's
key is its id. It also has a Node*, which point to its corresponding Node
in the linked list.
add(id,*obj), erase(id), deque() can all be done in O(1).
add(id,*obj) adds at the head, and adds it to the hash_map too.
... 阅读全帖 |
|
M***D 发帖数: 249 | 44 Antipsychotics: A New Hope Against Glioblastoma
Researchers have discovered that FDA-approved antipsychotic drugs possess
tumor-killing activity against the most aggressive form of primary brain
cancer, glioblastoma.
The team of scientists from the University of California, San Diego School
of Medicine, led by principal investigator Clark C. Chen, MD, PhD, used a
technology platform called shRNA to test how each gene in the human genome
contributed to glioblastoma growth.
ShRNA stands for small ... 阅读全帖 |
|
d**********r 发帖数: 502 | 45 RingPlus Support commented about 21 hours ago.
Hello,
Thank you for bringing this to our attention. We have successfully processed
an over-the-air update to fix the issue. If your device does not
automatically connect to the RingPlus network, please connect to wifi and
attempt one of the following provisioning steps listed below.
Android
Reset Your Carrier Services
- Fire up the dialer application
- Dial ##72786#
- It will ask you for your password or “MSL” - Your MSL can be found in
the Account... 阅读全帖 |
|
|