S**I 发帖数: 15689 | 1 this will cause run-time error almost for sure; erase a vector iterator
invalidates all iterator to elements after the erased iterator. |
|
t****t 发帖数: 6806 | 2 for encapsulated containers (or other objects), people intend to "use" the
exposed methods, e.g. vector::erase(). if it is an array and there is no
erase() method, most likely they won't simulate it.
humans are lazy. if a human want to go through a wall, and someone give him
a pick, he will probably dig through the wall. but if there is no pick, he
probably will take the easy way -- walk around it. haha. |
|
b***i 发帖数: 3043 | 3 这个真的是实际的问题。现在的目标是测试CF卡是否有问题,不是面试题。而且,也可
能不是硬件问题,也许是软件问题?看看有没有知道。
这个固件用的是1999年SanDisk的API,Compact Flash。不知道当年有没有现在的wear
leveling,这个固件当年是否做这些还不清楚,还要看一下资料。
CF卡里面,一个page是512字节,可以写一次,随便读,继续写需要erase,一次erase
一个block既64个page。这是硬件层的。固件Api呢,是FAT16,每个文件必须占用64个
扇区为一个cluster,一个扇区512字节。这个层,我不清楚是否知道CF不能写一个扇区
多次,假设它不知道。软件层写文件的时候,每5秒更新一次,大约20个字节,这样,
假如api那里缓冲够了,就写入CF,而CF负责新找一个sector,把原来的标记为不可用,
这样可以延长寿命。每次写文件的时候,文件在目录表的记录也需要修改,文件长度和
时间要被改。
这个过程出现了问题。现在看到两个CF卡,其中某个目录里,文件的内容不仅出现在文
件的cluster那里,也出现在了文件目录表,覆盖了个文件记录所在... 阅读全帖 |
|
e*********k 发帖数: 12 | 4 下面的代码有时候会crash在LINE_A或LINE_B这两行,哪儿不对?
class A{
//...
map m_int2StrMap;
//...
void problematic(){
//...insert and erase of m_int2StrMap are involved
char temp[6] = {0};
int key = 12345;
//...temp's elements and key might be changed
map::iterator iter = this->m_int2StrMap.find(key);
if(iter != this->m_int2StrMap.end())
{
/*LINE_A*/ this->m_int2StrMap.erase(iter);
... 阅读全帖 |
|
t***q 发帖数: 418 | 5 天,如何能让程序转得快点?
原帖在这里:
http://www.mitbbs.com/article_t0/Programming/31381809.html
主要是要做 title matching.
有两个 file, file A 162283 行 X 12 列。 File B 3695 行 X 6 列。用 A 的 第五
列和 B的第四列进行比较, 对 B 的第四列的每一行, 从 A的 那 162283 行中 找出
与之最相似的那一行。A 的第五列和 B 的第四列都是些影视作品的 title, 是一些长
短不一的 string. 我用的是 Levenshtein algorithm 算每一对string 的相似度,再
把相似度排序,从高到低,找出相似度最大的那一个 string, 也就是影视作品的
title, 加到 file B 对应的那一个title 那一行。再加入一个从file A 出来的对应的
一个id, 到 file B 里。算相似度前,我先对每个title 组成的string做预处理,去掉
“:”,”-“,”season”,”episode “ , 等一些词。... 阅读全帖 |
|
t***q 发帖数: 418 | 6 把 c++ 程序改成这样,快了许多,虽说程序不work,但至少说明,应该在算distance
之前就把 string processing 都做了:
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
size_t uiLevenshteinDistance(const std::string &s1, const std::string &s2)
{
const size_t m(s1.size());
const size_t n(s2.size())... 阅读全帖 |
|
l******o 发帖数: 67 | 7 写了个word search 的程序。 在 windows上 run的结果是对的,但是把程序和文件 放
到 linux上run的时候结果总是不对。 以为是 line ending 的问题,改了下程序还是
不行。 请教下版内大牛帮着看下, 到底是哪里出问题了。 不胜感激
下面是主函数。word_search(honey_comb,s.c_str()) 这个函数,我感觉写的没问题,
因为在windows上run的结果完全没问题
int main(int argc, char *argv[]){
/////////////////////////////////////////////////////////////////////
// read file
ifstream honey_if;
ifstream dict_if;
string honey_path;
string dict_path;
if(argc>=2){
honey_path=argv[1];
}else{
honey_pa... 阅读全帖 |
|
j***y 发帖数: 87 | 8
sure you can do it as long as you have the X Server installed on student...edu
because X works on a client/server mode, and the display system is a server,
while your program is a client.
run 'stty erase ^H' to re-define the erase key. |
|
a*****c 发帖数: 53 | 9 Rise to prominence[edit]
Schön's field of research was condensed matter physics and
nanotechnology.[3] He received his Ph.D. from the University of Konstanz in
1997. In late 1997 he was hired by Bell Labs, located in New Jersey, United
States. There, he worked on electronics in which conventional semiconducting
elements (such as silicon) were replaced by crystalline organic materials.
Specific organic materials can conduct electrical currents, and in a so-
called field-effect transistor (a ... 阅读全帖 |
|
x******3 发帖数: 92 | 10 我现在在美国,准备考GMAT。有几个问题想请教大家:
(1)我报名后,收到了官方介绍 GMAT考试各方面信息的一个小册子。我看到上面说三
分之二的考生的成绩是在400-600之间的。但是在chasedream上,我总是看到很多人考
600多分都不满意,很多人报告的分数都是在700多,甚至750以上的。是不是在美国考
GMAT和在国内考GMAT不一样啊。国内的GMAT机经适用于在美国复习准备GMAT吗?
(2)官方介绍 GMAT考试各方面信息的一个小册子上说明很多私人物品,比如手表很外
套都不能带到考场里,请问考场里的温度大概是多少啊,如果比较冷的话,我可以穿个
外套
(3)考试的时候工作人员会发给一个erasable noteboard booklet和一个marker。所
谓的erasable可以用什么擦啊?
请原谅我问的问题比较简单,因为从来没有参加过GMAT考试。如果有人参加过,可不可
以简单地描述真个考试流程,比如check in的过程和考试的时候要注意的方面。非常感
谢~ |
|
w******a 发帖数: 173 | 11 workaround:
Convert: big raster to big vector
small raster to small vector
Erase: small vector to erase big vector to get the donut.
clip: use donut to clip the big raster |
|
|
x*******9 发帖数: 200 | 13 Recently, when I look for prorgram. I found that some programs say
categorical but no preliminary in my erase, but I take a look at AMA, their
general information say offer preliminary.I am confused about it. I want to
chose categorical and preliminary in my erase. What should I do? Thank you
guys. |
|
b**********r 发帖数: 60 | 14 我上周刚刚考完step 1,在考前在版上找过关于考场注意事项的帖子好像没有特别全的
,那我就把我考试当天的流程简要说一下,给下面就要考试的xdjm们一个大概的认识吧
,特别是没有时间去参加practice exam的同学。至于考经,我觉得还是分数出来以后
再说说吧,现在心里还没底呢,如果分数还行一定type出来,回报麦地=)
1 考试当天要带上准考证,驾照,食物和手表或手机。建议带手表,因为手机原则上是
要关机的。准考证上说的是提前半小时到考场,但其实在practice exam的时候考场工
作人员对我说,其实可以再早半小时,早到早考。我约的是下午一点到九点的考试,但
我12点就到了。首先呢去柜台交准考证,然后他会给你一张考试须知读,读完了去下洗
手间,将食物包包都放入Locker. Locker挺小的,建议女生们不要带大包会塞不进去。
厚外套可以挂在衣架上。一切就绪,等他叫你名字。进去之前口袋里面应该除了ID,
Locker key和耳塞其他什么都没有。进去之后等候了大约15分钟就叫你过去按指纹,讲
一堆有的没的,大概是说只有在authorized time break里面才能ste... 阅读全帖 |
|
b*****e 发帖数: 223 | 15 Our system setting:
WORKINIT Erase all files from WORK library at SAS invocation
WORKTERM Erase all files from WORK library at SAS termination
No way to retrieve work data leh....... |
|
d**********r 发帖数: 502 | 16 12/5 changed to mad plum.
no voice.
filed ticket on 12/5, 12/6 RP support said 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 Erase
All Content and Settings option.
Did Erase All Content and Settings option, still no voice. filed another
ticket, so far no response.
我不能用swap大法,因为听说boost mobile Iphone,换出来就换不进RP了。
除了等还有什么办法?
怀念ptel的服务了,ptel的CS总是available的 |
|
B****e 发帖数: 241 | 17 昨天开的单子,今天收到邮件,按照操作,解决了。
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 Accounts page of your RingPlus... 阅读全帖 |
|
|
w*******y 发帖数: 60932 | 19 OfficeDepot.com offers the Realspace Magellan Collection L-Shaped Desk and
the matching Realspace Magellan Collection Hutch (available in Espresso,
Classic Cherry or Honey Maple) bundled together for $199.99 (regularly $379.
98 for both pieces) after a coupon. Purchase with an inexpensive non-tech
filler item (such as these 79 eraser caps:
http://www.officedepot.com/a/products/206503/Office-Depot-Brand-Eraser-Caps-Red/
) and stack coupon code "56837971" to save another $50 off a purchase of $
20 |
|
|
w*******y 发帖数: 60932 | 21 Pretend and Play School by Learning Resources $2.98 + $6.87 shipping from
Toys R Us
Awards
iParenting
Nick Jr
National Parenting
Ring the bell...it's time to play school! The Pretend & Play School Playset
lets kids set up a classroom and assume the roles of teacher and students.
Fun and educational playset includes a two-sided map, tri-fold board,
pointer, clock with movable hands, dry-erase board, two-sided calendar with
weather, schools supplies pocket, eraser, note pad, hall passes, pencils,
... 阅读全帖 |
|
|
|
|
|
w*******y 发帖数: 60932 | 26 Costco has Roxio Creator 2012 Special Edition $39 FREE Shipping
Link:
http://www.costco.com/Browse/Product.aspx?Prodid=11681240
Special Edition includes: 100 Premium soundtrack titles plus 4 pairs of 3D
glasses.
Easily enhance, preserve and share your digital life with Roxio Creator 2012
. Edit video and create DVDs. Create and convert your videos and photos to
enjoy on just about any device including smartphones, iPhones and iPads.
Fix and enhance photos; improve portraits; create printed phot... 阅读全帖 |
|
|
w*******y 发帖数: 60932 | 28 Sorry for any mistakes, this is my first post. Not sure if its a repost but
I tried searching and didn't see anything and don't know if its ymmv. I've
attached my receipt here. It didn't show the model on receipt but item #,
same as Officedepot.com. See link below.
I was searching for a new camera at Office Depot today and saw this. Price
listed for $199 with a clearance sign on top of it so I asked them what the
price was. He checked the price and told me $149. I was thinking it was a
pretty go... 阅读全帖 |
|
|
p**********d 发帖数: 7918 | 30 【 以下文字转载自 Military 讨论区 】
发信人: powerforward (今天你敏感詞了沒有), 信区: Military
标 题: TG展示力量:上海取消聖帕節遊行
发信站: BBS 未名空间站 (Thu Mar 3 22:20:59 2011, 美东)
China Tightens Controls on Foreign Press
http://www.nytimes.com/2011/03/04/world/asia/04china.html?_r=1&
Shiho Fukada for The New York Times
A police officer, left, filmed a foreign journalist as street cleaners swept
water to keep passersby moving and a plain clothes officer, right, watched
pedestrians on Sunday along Wangfujing Street in Beijing, where a pro... 阅读全帖 |
|
h******t 发帖数: 872 | 31 http://finance.fortune.cnn.com/2011/04/28/the-coming-commodity-
The coming commodity price nightmare
Posted by Colin Barr
April 28, 2011 6:34 am
Here's another sign we have much bigger inflation problems than Ben Bernanke.
The commodity price boom we've all been bellyaching about for the past six
months started not in August, when the Fed chief first started talking about
quantitative easing, but a full eight years earlier – when Bernanke was
but a Fed governor and the housing bubble was a mere ... 阅读全帖 |
|
|
y********e 发帖数: 72 | 33 丢失的是首次登月阿波罗11号的相关原始影像资料。
阿波罗11号使用的是专门生产的Lunar Camera,阿姆斯特朗走下登月舱等等珍贵的历史镜头都是首先由Lunar Camera拍摄,同时从月球将影音信号传回地球。一方面,NASA用遥感胶带存储,保留为原始影像记录;另一方面,信号传给电视台作为电视直播使用,当时直播的是CBS。由于当时Lunar Camera是特制,信号模式和电视信号模式不是完全兼容,转化起来不方便,所以当时电视直播转化出来的电视画面特别的模糊,实际上Lunar Camera的原始信号效果要好不少。
70、80年代,卫星技术大大普及,美国大量卫星上天,产生巨量数据,一时间NASA存储带短缺,无意中抓了存储阿波罗11号原始数据的带子来用,写进新的卫星数据,就erase了原始资料。这个失误确实很愚蠢,也很遗憾,但是发生在管理层越来越官僚的NASA内部,也不是那么意外。
去年为纪念登月40周年,NASA想推出首次登月更清晰的录像,只能利用当时电视台的录像带,求助于CBS的影像档案库,请了好莱坞专门做影像还原技术的公司,才有了后来发布的更清晰的首次登月影像。虽然比电视录像效果提 |
|
T****r 发帖数: 22092 | 34 “无意中抓了”这个词发生在NASA真是很荒谬。
这就不是个人家庭录像带,上边竟然没有任何标识显示,竟然被“无意”中抓来用。
史镜头都是首先由Lunar Camera拍摄,同时从月球将影音信号传回地球。一方面,NASA
用遥感胶带存储,保留为原始影像记录;另一方面,信号传给电视台作为电视直播使用
,当时直播的是CBS。由
产生巨量数据,一时间NASA存储带短缺,无意中抓了存储阿波罗11号原始数据的带子来
用,写进新的卫星数据,就erase了原始资料。这个失误确实很愚蠢,也很遗憾,但是
发生在管理层越来越官僚的NASA内部,也不是那么意外。
录像带,求助于CBS的影像档案库,请了好莱坞专门做影像还原技术的公司,才有了后
来发布的更清晰的首次登月影像。虽然比电视录像效果提高不少,但是如果原始Lunar
Camera数据还在,用今天 |
|
j***j 发帖数: 9831 | 35 Missing from Presidents' Day: The People They Enslaved
http://www.good.is/posts/missing-from-presidents-day-the-people
Schools across the country are adorned with posters of the 44 U.S.
presidents and the years they served in office. U.S. history textbooks
describe the accomplishments and challenges of the major presidential
administrations—George Washington had the Revolutionary War, Abraham
Lincoln the Civil War, Teddy Roosevelt the Spanish-American War, and so on.
Children's books put student... 阅读全帖 |
|
d**********o 发帖数: 578 | 36 The last line of a 17th century poem by John Donne prompted Louise Noble’s
quest. “Women,” the line read, are not only “Sweetness and wit,” but “
mummy, possessed.”
Sweetness and wit, sure. But mummy? In her search for an explanation, Noble,
a lecturer of English at the University of New England in Australia, made a
surprising discovery: That word recurs throughout the literature of early
modern Europe, from Donne’s “Love’s Alchemy” to Shakespeare’s “Othello
” and Edmund Spenser’s “The Faerie Qu... 阅读全帖 |
|
S*******h 发帖数: 7021 | 37 【 以下文字转载自 USANews 讨论区 】
发信人: StanMarsh (ojo), 信区: USANews
标 题: 川普华沙讲话∶西方文明的继续取决于人民意志
发信站: BBS 未名空间站 (Thu Jul 6 12:09:11 2017, 美东)
President Trump Gives Remarks to the People of Poland
The fundamental question of our time is whether the West has the will to
survive. Do we have the confidence in our values to defend them at any cost?
Do we have enough respect for our citizens to protect our borders? Do we
have the desire and the courage to preserve our civilization in the face of
those who would... 阅读全帖 |
|
S*******h 发帖数: 7021 | 38 The story of Poland is the story of a people who have never lost hope, who
have never been broken and who have never, ever forgotten who they are.
And so, I am here today not just to visit an old ally, but to hold it up as
an example for others who seek freedom and who wish to summon the courage
and the will to defend our civilization.
Americans, Poles and nations of Europe value freedom and sovereignty. We
must work together to confront forces, whether they come inside or out, from
the south or... 阅读全帖 |
|
c****g 发帖数: 37081 | 39 time will erase everything.
, |
|
S*********4 发帖数: 5125 | 40
Not a big deal. We should start with small island countries with small
population.
1st, Buy a land as private estate. Open a couple of big companies on it, and
only hire the people from Mainland as workers and security guards.
2nd, Then open more laundries, supermarkets, groceries, schools, clinics and
real estate corps around the companies, and still only hire the people from
Mainland.
3rd, goto 1st....
If the senators don't allow you, buy them. If they still don't, erase a
couple of them.
Whe |
|
a**i 发帖数: 152 | 41 Hmmm. Next step will be sending Erasers ... |
|
E*V 发帖数: 17544 | 42 zz
WASHINGTON – The White House blocked efforts by federal scientists to tell
the public just how bad the Gulf oil spill could have been, according to a
panel appointed by President Barack Obama to investigate the worst offshore
oil spill in U.S. history.
In documents released Wednesday, the national oil spill commission's staff
reveals that in late April or early May the White House budget office denied
a request from the National Oceanic and Atmospheric Administration to make
public the worst-... 阅读全帖 |
|
w**f 发帖数: 292 | 43 这个描述的很准确。。把白人的虚伪和优越感都写出来了
#115 Promising to Learn a New Language
Throughout history, white people have a pretty poor record when it comes to
promises (see Americans, Native for examples). Thankfully, modern white
people are trying to erase the shame of the past by making promises to
themselves that they will never keep.
Writing a novel, going vegan, or sending their future kid to public school
are just a few of these great breakable promises. But by far the most
common self improvement promise... 阅读全帖 |
|
p****g 发帖数: 881 | 44 不错, 有人开始怀疑米帝特务密探警察操纵wiki了
Some on the Internet Start to Wonder—Is WikiLeaks for Real?
By Behrouz Saba | New America Media | December 02, 2010
The quarter of a million American diplomatic cables released by WikiLeaks
reveal that American diplomats have a low opinion of the thuggish Italian
Prime Minister Silvio Berlusconi. They call him “feckless.” Equally
underwhelming are the revelations that Nikolas Sarkozy is “temperamental”
and Muammar al-Gaddafi likes flamenco and blondes. What is more, som... 阅读全帖 |
|
d*********t 发帖数: 4393 | 45 http://www.aeinstein.org/organizations3c9b.html
从独裁到民主: 解放运动的概念框架
From Dictatorship to Democracy (Chinese)
Author: Gene Sharp
Published: March 2005
从独裁到民主: 解放运动的概念框架 (552 kb)
Contents: FROM CHAPTER 1...
In recent years various dictatorships — of both internal and external
origin — have collapsed or stumbled when confronted by defiant, mobilized
people. Often seen as firmly entrenched and impregnable, some of these
dictatorships proved unable to withstand the concerted political, economic,
an... 阅读全帖 |
|
p**********d 发帖数: 7918 | 46 China Tightens Controls on Foreign Press
http://www.nytimes.com/2011/03/04/world/asia/04china.html?_r=1&
Shiho Fukada for The New York Times
A police officer, left, filmed a foreign journalist as street cleaners swept
water to keep passersby moving and a plain clothes officer, right, watched
pedestrians on Sunday along Wangfujing Street in Beijing, where a protest
had been called.
By SHARON LaFRANIERE
Published: March 3, 2011
BEIJING — Apparently unnerved by an anonymous Internet campaign urging... 阅读全帖 |
|
B*******a 发帖数: 452 | 47 http://www.latimes.com/entertainment/news/la-et-china-red-dawn-
LA Times: Reel China: Hollywood tries to stay on China's good side
Without Beijing even uttering a critical word, MGM is changing the villains
in its 'Red Dawn' remake from Chinese to North Korean. It's all about
maintaining access to the Asian superpower's lucrative box office.
China has become such an important market for U.S. entertainment companies
that one studio has taken the extraordinary step of digitally altering a
film to ... 阅读全帖 |
|
a*******o 发帖数: 237 | 48 美国人。。。也是挺神奇的。
Without Beijing even uttering a critical word, MGM is changing the villains
in its
'Red Dawn' remake from Chinese to North Korean.
But potential distributors are nervous about becoming associated with the
finished
film, concerned that doing so would harm their ability to do business with
the rising
Asian superpower, one of the fastest-growing and potentially most lucrative
markets
for American movies, not to mention other U.S. products.
As a result, the filmmakers now are digitally... 阅读全帖 |
|
h********n 发帖数: 427 | 49
http://www.dailybruin.com/index.php/blog/off_the_press/2011/03/
_w
allace_apologizes_announces_she_will_no_longer_attend_ucla
Below is Wallace’s full letter:
In an attempt to produce a humorous YouTube video, I have offended the
UCLA community and the entire Asian culture. I am truly sorry for the
hurtful words I said and the pain it caused to anyone who watched the
video. Especially in the wake of the ongoing disaster in Japan, I would
do anything to take back my insensitive words. I could wri... 阅读全帖 |
|
M**d 发帖数: 4418 | 50 新文章,如需要,可以使用google translator http://translate.google.com/#
http://www.chomsky.info/articles/20110204.htm
Noam Chomsky
The Guardian, February 4, 2011
"The Arab world is on fire," al-Jazeera reported last week, while throughout
the region, western allies "are quickly losing their influence". The shock
wave was set in motion by the dramatic uprising in Tunisia that drove out a
western-backed dictator, with reverberations especially in Egypt, where
demonstrators overwhelmed a dictator's brutal pol... 阅读全帖 |
|