由买买提看人间百态

topics

全部话题 - 话题: deleting
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
o******r
发帖数: 259
1
【 以下文字转载自 Database 讨论区 】
【 原文由 observer 所发表 】
用CDaoDatabase打开Excel 文件,
update记录都可以,
偏偏delete就出exception,
DAO Call Failed.
m_pDAODatabase->Execute( V_BSTR(&var), COleVariant((long)nOptions))
In file daocore.cpp on line 1544
scode = 800A0E21
Error Code = 3617
Source = DAO.Database
Description = Deleting data in a linked table is not supported by this ISAM.
难道设计这个接口的人就从来没想过有可能要delete一条记录吗?
数据记录都放在一个Excel文件里,
在VC里用CDaoDatabase/CDaoRecordset去查询,更新
有什么办法吗?
r*****r
发帖数: 397
2
来自主题: Programming版 - new and delete in c++
I feel that I need to delete everytime after I use "new" to create a pointer.
What if I want to put the new inside a loop?For example
myobj * np;
for (int i =1;i ...
np = new myobj();
}
delete np;
will this work?Or do I have to delete np inside the loop?
a*********e
发帖数: 228
3
来自主题: Programming版 - delete this problem
I have a class A, in the constructor, I say: if somevariable != 2,
delete this. basically, i hope that after calling delete this,
the pointer i make from "new A(int)" becomes NULL, but it turns out
that the pointer is still valid, only the member variable value is
reset to zero. Anybody knows what is going on? Wouldn't delete this
should call the destrcutor of the class?
N**s
发帖数: 837
4
来自主题: Programming版 - delete一问
answer is delete [] p
delete p only delete the first T, other 9 still there, if new is not
overloaded
b**n
发帖数: 289
5
来自主题: Programming版 - Why my new or delete operator would fail?
Original program is too long here. My new operator sometimes gave me "
segmentation fault" from the following code:
double *ptr = new (nothrow) double [size]
assert(ptr);
And my delete operator some times just crashed my code. I used a new
operator to allocate memory, and then use delete to delete that chunk of
memory. But it still crashed.
I use g++-4.1 here.
Wish someone can give me some advice.
Many Thanks,
w****j
发帖数: 6262
6
我要定义一个指向指针的指针C来表达二维数组,大小为N*N,然后释放掉内存,这样写
对么?
double **C=new double *[N]
for(i=0;i C[i]=new double [N];
.................
.................
for(i=0;i {
delete []C[i];
}
delete [] C;
请问是不是一定要这样一级一级释放,还是 直接一个delete [] C;就可以了?
多谢
d*******d
发帖数: 2050
7
来自主题: Programming版 - one question about operator delete
我试验了一下,只要自己写了dtor,无论是不是virtual的,delete都忽略了。
如果没有写dtor, delete执行了。
你的解释还是不够清楚,我还是很困惑。
自己不写dtor,系统也得先call default dtor啊,这个时候系统也会知道这是个null p
tr,也可以忽略delete啊。
s**********b
发帖数: 7
8
来自主题: Programming版 - one question about operator delete
Thanks to this post, I probe what under the hood for inline func. call.
There are two cases:
case 1: with ctor.(by user)
case 2: without ctor.
compiler deals with those two cases differently, preprocessor as the same.
For preprocessor:
case 1: with ctor, preprocessor create "macro"s for inline functions, inline
functions (overridden operator delete function) will be called via macro.
In this case, operator delete will NOT be called by overhead or "this". C++
treat your call as delete NULL point
z******i
发帖数: 59
9
来自主题: Programming版 - 请教 C++的一个困惑 (operator delete)
You don't define "delete" operator be virtual. You make destructor virtual.
See below.
#include
#include
using namespace std;
class A
{
public:
virtual ~A()
{
cout << "I am A\n";
}
//void operator delete(void* p, size_t size){cout << size << endl;};
private:
int k;
};
class B:public A
{
public:
virtual ~B()
{
cout << "I am B\n";
}
//void operator delete(void* p, size_t size){cout << size<
k**f
发帖数: 372
10
来自主题: Programming版 - 请问delete的问题
If possible, you should use new in constructors and delete in desstructors.
So at the end of your program, all the allocated memory will be released.
If you use the right library, such as STL containers, and the right type of
smart pointers (look for them in boost.org or search "C++ TR1"), you seldom
need to use new and delete in your code. Then you don't have to worry about
memory leak caused by unmatched new and delete.
s*i
发帖数: 31
11
In c or c++, if given a node in a linked list, and you want to delete the
node after it. You can just:
obsolete_node = node->next
node->next=node->next->next
free(obsolete-node) //or "delete obsolete_node"
But java has garbage collection, and no such keyword as free or delete. So
in java, can i simply skip the last statement, and it'll be correct? Because
obsolete_node no longer has any references to it, so the garbage collector
will free up its memory ?
a*****t
发帖数: 30
12
来自主题: Programming版 - C++ delete
在thinking in C++里, 重载类的delete, 函数原型是:
static void operator delete (void * p)
而在effective C++中item 8/ item 10,重载函数的原型是:
void operator delete(void *p, size_t size) ---多了size参数,
想知道这两者统一吗?还是我搞错了什么
s*******1
发帖数: 20
13
来自主题: Programming版 - C++ delete
What happens after delete? It seems that the object still exists after
delete in the program below.
Thanks.
#include
using namespace std;
class C{
public:
void f(){cout << "exist!" << endl;}
int x;
};
int main()
{
C* Cptr = new C;
Cptr->x=1;
delete Cptr;
Cptr->f();
cout << Cptr->x << endl;
return 0;
}
//output
exist!
1
z****e
发帖数: 2024
14
来自主题: Programming版 - C++ delete
delete Cptr;
Cptr=0;
to dereference a deleted pointer is undefined. (dangerous)
to dereference a null pointer is a run time error.(safer, but bad, usually segmentation fault)
"delete" calls destructor and modify the linked list which holds address of accessible memory blocks.
U********d
发帖数: 577
15
来自主题: Programming版 - C++ delete
Delete一般是操作系统实现的,通常情况下你delete掉一个对象,操作系统只是将这个
对象所在的内存块标记为空闲,比如windows2000通常情况是把这个堆链回到freelist
或者其他几个堆管理的队列里面去。
把这块内存清0的工作是很费时间的,操作系统一般不主动作这件事情,所以删除掉后
无论内容还是对象的指针都没有任何变化。至于栈上的数值,除非你显示地指定Cptr=
null,否则在它整个生命周期里面也没有任何人会管他,这两个条件导致你短时间内无
论取成员变量还是调用成员函数都没有任何区别。
有可能变化的情况是你再次new了一个,操作系统有可能把同一块地址再分配给你然后
你又做了其他的事情。还有一种可能就是等足够长的时间System Idle Process把这块
地址清0了。
把操作系统看作政府的话,可以简单的认为delete只是贴了一个拆迁的标签,表示这栋
房子以后可以随便拆了。贴标签后你再去访问里面的人,可能钉子户还在,因为没有人
赶他走,但是你不能保证每次去都能看到,因为指不定哪天操作系统就给你拆迁了。
i**p
发帖数: 902
16
来自主题: Programming版 - C++ delete[]
delete[] does not work here.
Do I have to delete the 3 objects one by one?
Circle *sarray[] = {new Circle, new Circle, new Circle};
delete[] sarray; // core dump
x*****a
发帖数: 18
17
来自主题: Programming版 - delete files in windows
Hi all,
I have a question: I want to delete all files which contain certain
string in a directory (must delete all those files in subdirectories).
For example: In D:myfiles, want to delete all files with a name
containing "(1)".
Is the following command right?
del -r /s *(1)*
Thanks,
k****r
发帖数: 807
18
来自主题: Programming版 - HOW TO DELETE IN KEY-VALUE STORE
re: Isn't delete just a write? Delete operation is appended in commit log,
during compaction, the row is removed.
If delete is one special type of write, can I understand the it as a rewrite
on a key?
BTW, how to swap the page cache for keys? Lets say, the older data file and
index file are like keyA-valueA1, keyB-valueB1, keyC-valueC1, and the new
coming ones are: keyA-valueA2, keyC-valueC2. Then, what is swap doing on
cache? it should still be like keyA...keyB...keyC, but only value of A and B... 阅读全帖
w**z
发帖数: 8232
19
来自主题: Programming版 - HOW TO DELETE IN KEY-VALUE STORE
In case of C*, make sure to run repair at least once within GC grade period.
Otherwise, tombstones may come back to live. As goodbug said, deletes might
not get to all the nodes because of the eventual consistency, and repair
will fix that.
Read this blog if you want to know more, delete in distributes system is
tricky.
http://thelastpickle.com/blog/2011/05/15/Deletes-and-Tombstones
n******7
发帖数: 12463
20
来自主题: Programming版 - linux 能查到 deleted file list 吗
google一下啦
我帮你google了一下
http://superuser.com/questions/530104/how-to-find-which-files-a

"Pretty much impossible" This is just plain wrong and because of this I have
to downvote this. Deletion times are stored in some filesystems, example of
such fs is ext3 filesystem. ext3grep might help when hunting down. I got
superuser.com/a/433785/132604 that has some information and links to
utilities that could be used to find (possibly recover too) deleted files
and information about them. When you del... 阅读全帖
l****p
发帖数: 18
21
【 以下文字转载自 Windows 讨论区 】
发信人: lovelp (loved+lg), 信区: Windows
标 题: Help Help: How to recover deleted directory.
发信站: BBS 未名空间站 (Sat Aug 18 22:01:30 2007)
No backup...Accidentally deleted one very important directory. Shift +
delete in vista and not found in Recycled Bin.
Some software can recover this??? thanks...
r*e
发帖数: 112
22
as title, I happen find there are two of such strange files, and
have no idea how do they come from .
But when I try to delete it, weriod thing happens:
The original file is deleted, but, a new file is generated again. //fdDD
e.g : original , it is : .nfs83C4
after deletion , it is : .nfsA3C4
Although, those files are not huge, 40Kb, but, I do hope I can get
rid of those two stupid files.
Tx!
z*******w
发帖数: 79
23
来自主题: Unix版 - C++ new/delete not thread safe?
I have a program with 2 threads running on Solaris using g++.
I noticed that I got core-dumped at one thread's:
new char[2];
gdb trace tell me it's inside malloc.
And I checked my program, it happend when one thread 1 send data
to another thread 2. In thread 1 it will delete some data, thread 2
will use new to create an instance.
After I comment the delete of thread 1, I got no core-dump at all.
So, I am very suspicious of g++'s new/delete is not thread safe.
Can somebody verify this? Th
j********t
发帖数: 6
24
来自主题: Unix版 - Why I can not delete a folder?
I am using solaris 7.
I use following command to delete a folder
rm -rf test
it said
rm: unable to remove directory test: File exists
Then I go to that folder and found a hidden file called .nfsDDA11. Then I
manually delete this file, then it generate another hidden file called
.nfsEDA11.
How can I permently delete this folder? Thanks,
s*********f
发帖数: 155
25
It could oligomerize after deletion so knowing it is bigger by how much is
important.
Mass spect seems a nice way to confirm you have the right protein size.
Some proteins run abnormally on SDS PAGE, that is, showing up at positions
significantly different from expected.
Is it possible to have different post-translational modification after the
deletion?
What is the protein? Why are you deleting these 5 aa?
a*********7
发帖数: 342
26
谢谢大家的帮助,我还有一些信息:
大概就大1,2个KD, 从western blot 上看. 我觉的不可能是stop codon 的问题,因
为我已经试过不同的载体了,每个载体都出现一样的结果. 而且我 试过只delete最末
端2个aa, 结果在western blot 上看和野生型没区别。为什么多delete 3个就大了呢
,我个人觉的可能是deletion 导致结构变化,然后出现了不同的posttranslational
modification. 大家觉的有没有道理?
b******o
发帖数: 545
27
来自主题: Statistics版 - how to delete rows by string value?
for instance I have a data file as
name gender age income county
jason M 26 40K MORRIS
ADAM M 21 100K CLIFF
JORGE M 30 20K WARREN
ERIKA F 21 43K CLIFF
if I want to delete all the cliff county results,
the " if county = 'cliff' then delete;" doesn't work,
even after I define a string ='cliff', then "if county=string then
delete", still not working.
any suggestion?
Thank you!
k**e
发帖数: 2728
28
来自主题: board版 - question about deleting posts
all actions under cterm
when i "t" the target posts and then hit "D", it will ask me to put in the i
nitial post number and the last number for deleting. however, posts within t
his range that didn't get tagged with a "t" (shown as green X), will then be
tagged with a white X. when i did "D", will the posts tagged with the white
X also be deleted? as a reslut in fact, none of them are gone.
If I choose to delete the tagged pasts manually one by one by hitting "d", w
ill that take off points from
P**********e
发帖数: 2964
29
来自主题: board版 - question about deleting posts
if you make a sign to the posts to be deleted with "t",then you can press "D
" to choose
this mode: delete the posts with deleting sign"t".
m***i
发帖数: 517
30
以下是Minbari给我的一封信, 应他的要求, post在这里.
寄信人: Minbari (踏雪寻梅)
标 题: 从delete版恢复文章
发信站: The unknown SPACE (Sat Aug 12 18:18:04 2000)
来 源: 128.135.136.116
对于从deleted版恢复文章一事, 由于相关题目与海峡版无关, 我已经将之删除.
对于其它一些无限纠缠我早已给出答复的所谓"投诉"文章, 我也已同主题.
从8/7至8/12止, 我已经四次发布版务公告提醒大家注意讨论主题, 不要涉及具体
ID及其它与海峡版无关内容, 同时警告使用脏话者, 在此基础上, 近期我们将更严格的
处理在本版使用脏话, 灌水, 针对个人ID等一系列扰乱版本版秩序的行为.
由于从deleted版恢复文章的主题已经不存在于海峡版, 我不宜再在版面上发表有关评论. 但
以下是我的看法, 如果有智囊团成员对你的行为提出质疑, 请将此信转载至BT版.
智囊团成员, 应版务要求, 恢复版面上被删除的文章, 是对版务工作的配合,
也并无违反任何已知的智囊团规定. 而这次事件, 版务要求恢复
g********2
发帖数: 6571
31
来自主题: USANews版 - NSA has all of Hillary's deleted emails!
PHILADELPHIA – The National Security Agency (NSA) has “all” of Hillary
Clinton’s deleted emails and the FBI could gain access to them if they so
desired, William Binney, a former highly placed NSA official, declared in a
radio interview broadcast on Sunday.
Speaking as an analyst, Binney raised the possibility that the hack of the
Democratic National Committee’s server was done not by Russia but by a
disgruntled U.S. intelligence worker concerned about Clinton’s compromise
of national security s... 阅读全帖
T**********2
发帖数: 341
32
"Hillary Clinton Deleted Emails Using Program Intended To ‘Prevent Recovery
’"
http://dailycaller.com/2016/08/25/hillary-clinton-deleted-emails-using-program-intended-to-prevent-recovery/
W*****B
发帖数: 4796
33
她不是用抹布给擦掉了吗?

:"Hillary Clinton Deleted Emails Using Program Intended To ‘Prevent
Recovery’"
http://dailycaller.com/2016/08/25/hillary-clinton-deleted-emails-using-program-intended-to-prevent-recovery/
t**g
发帖数: 3107
34
Stop Deleting Your Tweets.........私人的帐户吧?
介个.....比Delete 政府的3万条电子邮件更犯法吗?
q****x
发帖数: 7404
35
来自主题: JobHunting版 - 问个C++ delete[]问题
从那个删除重复元素的数组问题想到的。怎么回收被删掉元素的空间?下面这样不行。
int main()
{
char* cp = new char[10];
char* cp2 = cp + 2;
delete [] cp2;
delete [] cp;
}
A**u
发帖数: 2458
36
来自主题: JobHunting版 - 问个C++ delete[]问题
记得看effective c++上讨论 deletel delete[],
画了个 delete[]的内存分布
[size][0][1][2][3]
这样子的.
w****x
发帖数: 2483
37
来自主题: JobHunting版 - find, insert, delete, getRandom in O(1)
/*
Given a collection of integer, design a class that supports:
add(data) - insert an element
delete(data) - delete an element
getRandom(data) - return a random element
*/
class Solution
{
public:
void add(int x)
{
if (m_mp.find(x) != m_mp.end())
return;
m_vec.push_back(x);
m_mp[x] = m_vec.size()-1;
}
void del(int x)
{
if (m_mp.find(x) == m_mp.end())
return;
int index = m_mp[x];
m_mp.erase(m_mp.find(x));
... 阅读全帖
w****x
发帖数: 2483
38
来自主题: JobHunting版 - find, insert, delete, getRandom in O(1)
/*
Given a collection of integer, design a class that supports:
add(data) - insert an element
delete(data) - delete an element
getRandom(data) - return a random element
*/
class Solution
{
public:
void add(int x)
{
if (m_mp.find(x) != m_mp.end())
return;
m_vec.push_back(x);
m_mp[x] = m_vec.size()-1;
}
void del(int x)
{
if (m_mp.find(x) == m_mp.end())
return;
int index = m_mp[x];
m_mp.erase(m_mp.find(x));
... 阅读全帖
s****A
发帖数: 80
39
来自主题: JobHunting版 - 请问一下关于new和delete的概念
1.关于野指针,一般的做法是不是
delete b;
a=NULL; b=NULL;
?
2. 你的意思是我也可以
int *a=new int[100];
... ...
int *b=a;
delete [] b;
效果是一样的?
s**x
发帖数: 7506
40
来自主题: JobHunting版 - 请问一下关于new和delete的概念
貌似你没搞清楚变量的基本概念, 变量就是 value 的 holder, 指针就是数, 只要是
数值一样的, delete a, delete b 肯定是一样的。 same for all the others.
s********t
发帖数: 11
41
这个题说明很少,只有一句delete any k digits,没看懂是什么意思。哪位知道给讲
讲?多谢啦。
http://lintcode.com/en/problem/delete-digits/#
S*******C
发帖数: 822
42
来自主题: JobHunting版 - lintcode delete digits怎么做?
Delete Digits
12%
Accepted
Given string A representative a positive integer which has N digits, remove
any k digits of the number, the remaining digits are arranged according to
the original order to become a new positive integer. Make this new positive
integers as small as possible.
N <= 240 and k <=N,
Example
Given an integer A = 178542, k = 4
return a string "12"
Tags Expand
Greedy
public class Solution {
/**
*@param A: A positive integer which has N digits, A is a string.
*@par... 阅读全帖
S*******C
发帖数: 822
43
来自主题: JobHunting版 - lintcode delete digits怎么做?
Delete Digits
12%
Accepted
Given string A representative a positive integer which has N digits, remove
any k digits of the number, the remaining digits are arranged according to
the original order to become a new positive integer. Make this new positive
integers as small as possible.
N <= 240 and k <=N,
Example
Given an integer A = 178542, k = 4
return a string "12"
Tags Expand
Greedy
public class Solution {
/**
*@param A: A positive integer which has N digits, A is a string.
*@par... 阅读全帖
g******z
发帖数: 5809
44
I even offer to paid in full for Deletion, Hunter Warfield stated they
couldnt do it! I even had an Attorney call, they told him they couldnt
delete. Any thoughts or ideas how to get rid of this?
m****2
发帖数: 780
45
嗯.通常需要从债主那边发起.债主要求DELETE,COLLECTION才会帮你.
有些比较NICE的COLLECTION,只要你提供了从债主那边来的证明,证明BALANCE已经结清
了,就会同意DELETE.
一切从债主开始.
m****u
发帖数: 229
46
US DoD standard is to delete it and write something random back then delete it again.
And do this 6 times to ensure the data can't be recovered.
t*********t
发帖数: 1058
r*******t
发帖数: 8550
48
来自主题: NewYork版 - xmly, don't delete post like this
delete posts that are not good for you, is not a good behavior, specially
you as BAN3 ZHU3.
There were lot of good posts in that post! You should give Bao Zi instead
of deleting all...
Be mature, recover the post, xmly!
w*****2
发帖数: 20
49
来自主题: SanFrancisco版 - Yelp deleted my comment Jimmy Kimmel Live!
Yelp deleted my comment Jimmy Kimmel Live! along with many other posts
protest against the hate speech toward Chinese. Please see their email below
. I have known they delete bad posts if the business pays them.
***********************
Hi there,
We're contacting you about your review of Jimmy Kimmel Live!. Though we
understand this business has recently received media attention and that
users may have strong opinions, Yelp reviews should be focused on everyday
customer experiences with a busines... 阅读全帖
e*********e
发帖数: 2175
50
Again, whenever I delete a post, I'll always post a follow-up note to let
everyone know which post I've deleted and why.
I have a full-time job and young kids, etc. So please bear with my delays
in replying to your emails.
Thank you.
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)