i have to create one root folder in current config. I'm storing some value in this root folder. i can delete the values in this root folder. but i cannot delete the root folder.
I am using fcntl locks in C on linux and have a dilemma of trying to delete a file that may possibly be locked from other processes that also check for the fcntl locking mechanism. What would be the preferred way of handling this file which must be deleted, (Should I simply delete the file w/o regard of other processes that may have reader locks or is there a better way)?
Any help would be much appreciated.
i came across this line is stroustrup An operator function must either be a member or take at least one argument of a user-defined type (functions redefining the new and delete operators need not).
Dont operator new and operator delete take an user defined type as one of their arguments?
what does it mean, am i missing something here
Hello, is there a way to remove text from a text box using a submit button?
I don't want to delete text from all boxes on the form.
And I don't want to delete text 'onclick', for the element.
I need the code to clear the text box, to initiate from within a block.
Thanks for your help!
Hello,
I have few columns in my DataGridView, and there is data in my rows,
I saw few solutions in here, but I can not combine them!
simply a way to right-click on a row it select the whole row and show a menu with an option to delete the row and when the option selected it will delete the row
I made few attempts but none is working and it looks messy
any suggestions?
cheers
I want to be able to edit and delete resources myself, but not allow users of the application to do so.
Is there an easy way of doing this in Rails?
An incomplete solution would be just to remove the "delete" and "edit" buttons from the index view, but that doesn't disable their ability to do so via direct HTTP requests.
Running Rails 2.2.2 and ruby 1.8.7
I am running Selenium Grid and most of my Scripts fails due to unable to delete FF cookies.
Each testcase needs to delete browser cookies .If any one aware of this please let me know.
I need to delete/remove an item in my Iphone application. For that i should make tat item wiggle(shake) when i give long press. And then it should ask for an alert to delete or not???
Can anyone guide me plz??? It ll be more helpful if u help me with a source code
Tanx in advance
hi folks.,
i am using System.Net.Mail for sending mail in asp.net..
how to delete attachment file after it is send as attachment mail..
i tried to use File.Delete method.. but i am getting this error..
the process cannot access the file path\fun.jpg' because it is being used by another process.
thank you
I need to delete some nodes from an XML variable and I want to keep the original intact.
So I pass the XML to a new variable and delete the nodes from that one but the original changes with it.
Is there a way to protect the XML from the original variable?
hi,
i know this is probably frowned upon by maven lovers, but the whole 'target' directory is a waste of space in the context of our program and it's deployment. we have other build processes responsible for creating the actual deployment and i currently manually delete the target dir after every maven build, so that its contents don't interfere with my file searches etc...
is there a way to delete this dir automatically at the end of a maven build/install?
thanks, p.
Consider the following code:
class CString
{
private:
char* buff;
size_t len;
public:
CString(const char* p):len(0), buff(nullptr)
{
cout << "Constructor called!"<<endl;
if (p!=nullptr)
{
len= strlen(p);
if (len>0)
{
buff= new char[len+1];
strcpy_s(buff, len+1, p);
}
}
}
CString (const CString& s)
{
cout << "Copy constructor called!"<<endl;
len= s.len;
buff= new char[len+1];
strcpy_s(buff, len+1, s.buff);
}
CString& operator = (const CString& rhs)
{
cout << "Assignment operator called!"<<endl;
if (this != &rhs)
{
len= rhs.len;
delete[] buff;
buff= new char[len+1];
strcpy_s(buff, len+1, rhs.buff);
}
return *this;
}
CString operator + (const CString& rhs) const
{
cout << "Addition operator called!"<<endl;
size_t lenght= len+rhs.len+1;
char* tmp = new char[lenght];
strcpy_s(tmp, lenght, buff);
strcat_s(tmp, lenght, rhs.buff);
return CString(tmp);
}
~CString()
{
cout << "Destructor called!"<<endl;
delete[] buff;
}
};
int main()
{
CString s1("Hello");
CString s2("World");
CString s3 = s1+s2;
}
My problem is that I don't know how to delete the memory allocated in the addition operator function(char* tmp = new char[length]). I couldn't do this in the constructor(I tried delete[] p) because it is also called from the main function with arrays of chars as parameters which are not allocated on the heap...How can I get around this? (Sorry for my bad English...)
hello guys. I struggled a lot before posting here :) now, I want to replace my default javascript confirmation for deleting a file. I saw a lot of examples here, but no example with form input.
Now I have his form:
<form action="delete.php" method="post">
<input type="hidden" name="id" value="<{$pid}>" />
<input type="hidden" name="picture" value="<{$lang_del_pic}>" />
<input type="image" src="<{xoImgUrl}>img/del-icon.gif" width="16" height="16" align="bottom" border="0" alt="Delete media" name="pictured" value="<{$lang_del_pic}>" onclick="javascript: return confirm('<{$lang_confirm_del}>');" />
</form>
Now, I did everything, I have this div:
<div id="dialog-confirm" title="Empty the recycle bin?">
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>These items will be permanently deleted and cannot be recovered. Are you sure?</p>
</div>
this javascript:
<script type="text/javascript">
$(document).ready(function() {
$("#dialog").dialog({
autoOpen: false,
modal: true
});
});
$(".confirmLink").click(function(e) {
e.preventDefault();
var targetUrl = $(this).attr("href");
$("#dialog").dialog({
buttons : {
"Confirm" : function() {
window.location.href = targetUrl;
},
"Cancel" : function() {
$(this).dialog("close");
}
}
});
$("#dialog").dialog("open");
});
</script>
and this new form:
<form name="dialog-confirm" id="dialog-confirm" method="post">
<input type="hidden" name="id" value="<{$pid}>" />
<input type="hidden" name="picture" value="<{$lang_del_pic}>" />
<input type="image" src="<{xoImgUrl}>img/del-icon.gif" width="16" height="16" align="bottom" border="0" alt="Delete media" name="pictured" value="" id="opener" />
</form>
On press, I call successfuly the jQuery modal diolog, and everything works, but somehow, when I press 'delete all' the script tells me - "the script is called without the necessary parameters"
Now I guess I am failig to send the pic ID to be deleted with the jQuery, .. but do not know how to fix it. Any ideas ?
Which one do you prefer to delete objects? Especially in QT, but other practices are also welcome. These two alternatives seem same to me, are they?
1.Bound to another class, and destroy when it is destroyed.
SomeClass::SomeClass{
socket_ = new QTcpSocket(this);
}
or
2.Destroy in the destructor of class
SomeClass::SomeClass{
socket_ = new QTcpSocket();
}
SomeClass::~SomeClass{
delete socket_;
}
Hi guys,
I need to delete duplicate users in django (by duplicate I mean two or more users with the same email).
If your instance there are three records like this:
id email
3 [email protected]
56 [email protected]
90 [email protected]
I need to delete records 56 and 90 and leave the oldest record id - 3
Is there a way to quickly do this.
Thanks :)
i think it is two ways :
right click and select the 'deleteme'
2.has any other way ???
so how does enable the right-click on google-maps,and then delete the marker.
thanks
Hello,
I have a CouchDB database in production. One of the documents has been edited (in Futon by an other developer).
And it's lost it's ID (don't ask me how he did it).
So now the document's id is an empty string, which makes it impossible to edit or delete via Futon.
Is there a way I could hack into CouchDB to delete that document anyway ?
I am trying to delete all worksheet in excel exept last one and save it then move its location. I can not get it took work as it deletes all other worksheets but errors out with and out of range error.
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
objExcel.DisplayAlerts = False
Set objWorkbook = objExcel.Workbooks.Open("C:\M-tek 10-31-12_Tony.xlsx")
i = objWorkbook.Worksheets.Count
Do while i = i
i = i - 1
objWorkbook.Worksheets(i).Delete
Loop
I created table in google app engine using jpa.The contains three columns
*groupname
*groupid
*groupdesc
My constraints is i want to delete entire columns i.e i want to delete groupid.How to do this?
Thanks in advance
Hi,
If I have a vector<string*> *vect or a map<pair<string*, int*>, string*> *map,
how to clean up everything (including all object the vector/map contains)?
(Everything (vector, map, contents, pairs, string, ints) is allocated with new)
Is
delete vect;
delete map;
enough?
I'm attempting to delete a facebook story/action, like so:
curl -F 'access_token=[valid_token]' -X DELETE https://graph.facebook.com/[action_id]
Facebook is responding with an internal server error, like so:
{"error":
{"message":"An unexpected error has occurred. Please retry your request later.",
"type":"OAuthException","code":2}}
Is this an error caused by my actions, or something on Facebook's end?
Additional info
When I run
curl -X GET https://graph.facebook.com/[action_id]?access_token=[valid_token]
the result is "false"
I have a Parent Table A and child tables B,C with many to one relations.
Lets say I have data like, for primary key 1 in parent table A I have 3 rows in child table B and 4 rows in child table C.
Now if I want to delete the rows of the child table during an update of the parent table(that means Now, I want to update the table only with one row in each child tables and delete the other rows in them) then how to handle this scenario in hibernate?
Can anyone please tell me how to delete a recurly account. As, I have tried with the following commands,
r = Recurly::Account.find(account_code)
r.delete
And also, I have tried with "r.destroy".
But, it only changing the state of recurly account from "active" to "closed" and not deleting the account completely.
I am using rails 2.3.11 for this application.
Thanks in advance.
K. Subrahmanyam.
How would I delete all corresponding dictionaries in a list of dictionaries based on one of the dictionaries having a character in it.
data = [
{ 'x' : 'a', 'y' : '1' },
{ 'x' : 'a', 'y' : '1/1' },
{ 'x' : 'a', 'y' : '2' },
{ 'x' : 'b', 'y' : '1' },
{ 'x' : 'b', 'y' : '1' },
{ 'x' : 'b', 'y' : '1' },
]
For example, how would I delete all of the x = a due to one of the y in the x=a having a / in it? Based on the example data above, here is where I would like to get to:
cleaneddata = [
{ 'x' : 'b', 'y' : '1' },
{ 'x' : 'b', 'y' : '1' },
{ 'x' : 'b', 'y' : '1' },
]