Search Results

Search found 9599 results on 384 pages for 'delete overload'.

Page 25/384 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Delete a iptables chain with its all rules

    - by timy
    I have a chain appended with many rules like: > :i_XXXXX_i - [0:0] > -A INPUT -s 282.202.203.83/32 -j i_XXXXX_i > -A INPUT -s 222.202.62.253/32 -j i_XXXXX_i > -A INPUT -s 222.202.60.62/32 -j i_XXXXX_i > -A INPUT -s 224.93.27.235/32 -j i_XXXXX_i > -A OUTPUT -d 282.202.203.83/32 -j i_XXXXX_i > -A OUTPUT -d 222.202.62.253/32 -j i_XXXXX_i > -A OUTPUT -d 222.202.60.62/32 -j i_XXXXX_i > -A OUTPUT -d 224.93.27.235/32 -j i_XXXXX_i when I try to delete this chain with: iptables -X XXXX but got error like (tried iptables -F XXXXX before): iptables: Too many links. Is there a easy way to delete the chain by once command?

    Read the article

  • Windows XP, have to use ctrl+alt+delete to log on as local administrator

    - by wickedj
    Hey, I have a weird issue, a user was was logging into a laptop using the local admin account which was working fine. I had to create another account on the system, which was also an admin account, when this happened the 'administrator' account disappeared from the 'choose an account to login with' screen. A quick workaround is available, if the user presses ctrl+alt+delete it brings you to the screen where you can type in the username and password, so by manually typing 'administrator' it can log in. Normally this would be easily fixed, I figured the admin account had somehow been disabled from the local system, but i checked all settings and it is setup fine. The laptop is not part of a domain, so I used the management console to delete the new account and all that succeeded in doing was making the 'choose an account to log in with' screen display no accounts to choose. So far I see nothing else to fix it, the option to change the default logon screen to style where you type the username and password also seems to be missing. any ideas?

    Read the article

  • C++ segmentation error when first parameter is null in comparison operator overload

    - by user1774515
    I am writing a class called Word, that handles a c string and overloads the <, , <=, = operators. word.h: friend bool operator<(const Word &a, const Word &b); word.cc: bool operator<(const Word &a, const Word &b) { if(a == NULL && b == NULL) return false; if(a == NULL) return true; if(b == NULL) return false; return a.wd < b.wd; //wd is a valid c string } main: char* temp = NULL; //EDIT: i was mistaken, temp is a char pointer Word a("blah"); //a.wd = [b,l,a,h] cout << (temp<a); i get a segmentation error before the first line of the operator< method after the last line in the main. I can correct the problem by writing cout << (a>temp); where the operator> is similarly defined and i get no errors. but my assignment requires (temp < a) to work so this is where i ask for help. EDIT: i made a mistake the first time and i said temp was of type Word, but it is actually of type char*. so i assume that the compiler converts temp to a Word using one of my constructors. i dont know which one it would use and why this would work since the first parameter is not Word. here is the constructor i think is being used to make the Word using temp: Word::Word(char* c, char* delimeters=NULL) { char *temporary = "\0"; if(c == NULL) c = temporary; check(stoppers!=NULL, "(Word(char*,char*))NULL pointer"); //exits the program if the expression is false if(strlen(c) == 0) size = DEFAULT_SIZE; //10 else size = strlen(c) + 1 + DEFAULT_SIZE; wd = new char[size]; check(wd!=NULL, "Word(char*,char*))heap overflow"); delimiters = new char[strlen(stoppers) + 1]; //EDIT: changed to [] check(delimiters!=NULL,"Word(char*,char*))heap overflow"); strcpy(wd,c); strcpy(delimiters,stoppers); count = strlen(wd); } wd is of type char* thanks for looking at this big question and trying to help. let me know if you need more code to look at

    Read the article

  • How to overload shutdown function?

    - by Michal M
    I am using Kohana (v3) framework but I believe it's not tied to a particular framework. What I have is basically an app with a front-end, where I want to use Kohana's native Kohana::shutdown_handler(), but I also have a part of the - RESTful API - where I don't want colourful and html-encoded exception reporting. I want a plain text reporting. The way I thought it might work is to register another shutdown function in API's controller abstract class constructor, but then I realised register_shutdown_function() works differently to set_exception_handler() and instead of replacing it adds another function to the shutdown procedure. What's worse PHP doesn't allow "unregistering" shutdown functions and that's where my problem lies. What to do, if you want to use another shutdown function instead of one already registered?

    Read the article

  • delete item from array in java

    - by davit-datuashvili
    hello can anybody tell me what is wrong here? i want delete item from array but it shows me error ArrayIndexOutBound exception public class delete{ public static void main(String[]args){ int i; //delete item from array int k[]=new int[]{77,99,44,11,00,55,66,33,10}; //delete 55 int searchkey=55; int nums=k.length; for ( i=0;i<nums;i++) if (k[i]==searchkey) break; for (int t=i;t<nums;t++) k[t]=k[t+1]; nums--; for (int m=0;m<nums;m++){ System.out.println(k[m]); } } }

    Read the article

  • Retrieving the MethodInfo of of the correct overload of a generic method

    - by Anne
    I have this type that contains two overloads of a generic method. I like to retrieve one of the overloads (with the Func<T> parameter) using reflection. The problem however is that I can't find the correct parameter type to supply the Type.GetMethod(string, Type[]) method with. Here is my class definition: public class Foo { public void Bar<T>(Func<T> f) { } public void Bar<T>(Action<T> a) { } } And this is what I've come up with, unfortunately without succes: [TestMethod] public void Test1() { Type parameterType = typeof(Func<>); var method = typeof(Foo).GetMethod("Bar", new Type[] { parameterType }); Assert.IsNotNull(method); // Fails } How can I get the MethodInfo of a generic method of which I know the parameters?

    Read the article

  • jQuery and MySQL

    - by Wayne
    I have taken a jQuery script which would remove divs on a click, but I want to implement deleting records of a MySQL database. In the delete.php: <?php $photo_id = $_POST['id']; $sql = "DELETE FROM photos WHERE id = '" . $photo_id . "'"; $result = mysql_query($sql) or die(mysql_error()); ?> The jQuery script: $(document).ready(function() { $('#load').hide(); }); $(function() { $(".delete").click(function() { $('#load').fadeIn(); var commentContainer = $(this).parent(); var id = $(this).attr("id"); var string = 'id='+ id ; $.ajax({ type: "POST", url: "delete.php", data: string, cache: false, success: function(){ commentContainer.slideUp('slow', function() {$("#photo-" + id).remove();}); $('#load').fadeOut(); } }); return false; }); }); The div goes away when I click on it, but then after I refresh the page, it appears again... How do I get it to delete it from the database? Thanks :) EDIT: Woopsie... forgot to add the db.php to it, so it works now .<

    Read the article

  • C++: Overload != When == Overloaded

    - by Mark W
    Say I have a class where I overloaded the operator == as such: Class A { ... public: bool operator== (const A &rhs) const; ... }; ... bool A::operator== (const A &rhs) const { .. return isEqual; } I already have the operator == return the proper Boolean value. Now I want to extend this to the simple opposite (!=). I would like to call the overloaded == operator and return the opposite, i.e. something of the nature bool A::operator!= (const A &rhs) const { return !( this == A ); } Is this possible? I know this will not work, but it exemplifies what I would like to have. I would like to keep only one parameter for the call: rhs. Any help would be appreciated, because I could not come up with an answer after several search attempts.

    Read the article

  • Jail user to home directory while still allowing permission to create and delete files/folders

    - by Sevenupcan
    I'm trying to give a client SFTP access to the root directory of their site on my server (Ubuntu 10.10) so they can manager their website themselves. While I have been successful in jailing a user to a directory and giving them SFTP access; they are only allowed to create and delete new files in sub directories (the directories they own). This means that I must give them access to the parent directory to the root of their site. How can I limit them to the root of their site (for example public_html) while still allowing them the ability create and delete files. All the tutorials I have read suggest that the root must be the owner of the user's home directory, which prevents them from write access inside that directory. I'm relatively new to managing my own server so any advice would be very grateful. Many thanks.

    Read the article

  • Delete current row in a <table> with jQuery

    - by omgkurtnilsen
    I have a table that lists a bunch of customers. The last cell is an ajax delete button. I want the row containing the deleted customer to be deleted through jQuery. <table> <tr><td>Customer info 1</td><td><a href="javascript:deleteCustomer(1);">Delete</a></td> <tr><td>Customer info 2</td><td><a href="javascript:deleteCustomer(2);">Delete</a></td> function deleteCustomer(customerId) { $.post("somepage.php", {cid:customerId}, function(data){ //...delete the row that called the function... }

    Read the article

  • Not able to delete file from the server?

    - by kvijayhari
    I've a file called piture-list.php in my website... When i see them through the ftp client it shows two files with different filesizes.. as File name filesize picture-list.php 19818 picture-list.php 9063 When i select the file with 9063 and delete using ftp it deletes the file with the filesize 19818 then i used the command prompt to list files and happened to see actually there were two files one with the original name and other with a space before the filename (" picture-list.php").. I tried to move, delete the file but nothing is successful.. What may be the issue??

    Read the article

  • Python script to delete old SVN files lacks permission

    - by Rosarch
    I'm trying to delete old SVN files from directory tree. shutil.rmtree and os.unlink raise WindowsErrors, because the script doesn't have permissions to delete them. How can I get around that? Here is the script: # Delete all files of a certain type from a direcotry import os import shutil dir = "c:\\" verbosity = 0; def printCleanMsg(dir_path): if verbosity: print "Cleaning %s\n" % dir_path def cleandir(dir_path): printCleanMsg(dir_path) toDelete = [] dirwalk = os.walk(dir_path) for root, dirs, files in dirwalk: printCleanMsg(root) toDelete.extend([root + os.sep + dir for dir in dirs if '.svn' == dir]) toDelete.extend([root + os.sep + file for file in files if 'svn' in file]) print "Items to be deleted:" for candidate in toDelete: print candidate print "Delete all %d items? [y|n]" % len(toDelete) choice = raw_input() if choice == 'y': deleted = 0 for filedir in toDelete: if os.path.exists(filedir): # could have been deleted already by rmtree try: if os.path.isdir(filedir): shutil.rmtree(filedir) else: os.unlink(filedir) deleted += 1 except WindowsError: print "WindowsError: Couldn't delete '%s'" % filedir print "\nDeleted %d/%d files." % (deleted, len(toDelete)) exit() if __name__ == "__main__": cleandir(dir) Not a single file is able to be deleted. What am I doing wrong?

    Read the article

  • signature output operator overload

    - by coubeatczech
    hi, do you know, how to write signature of a function or method for operator<< for template class in C++? I want something like: template <class A class MyClass{ public: friend ostream & operator<<(ostream & os, MyClass<A mc); } ostream & operator<<(ostream & os, MyClass<A mc){ // some code return os; } But this just won't compile. Do anyone know, how to write it correctly?

    Read the article

  • How to efficiently restore Library folder partially deleted on OS X

    - by flow
    I am using OS X Lion, and trying to delete some files I did accidentally (from home directoy): rm -fr Library I realized about this some 15 seconds later and did killall rm Some folders have been deleted, of course, inside "Library". Now the system seems to be ok, but I fear what will happen in case of reboot. I have a Time Machine backup from 5 days ago. I wonder if it would be a good solution, just to copy whole "Library" folder from my home directory from backup and replace this one. Or, what do you think would be the best approach? PS: In order to restore just deleted directories inside "Library", in which order does "rm" start to delete directories, alphabetically?

    Read the article

  • WebBrowser.Navigate overload doesn't add cookies

    - by kaharas
    Hi guys, I'm experimenting with C#, and right now I'm trying to get a web page that needs cookies. Since I had no success doing it, I wrote this little PHP script ( directly from php.net): <?php foreach (getallheaders() as $name => $value) { echo "$name: $value\n"; } ?> but, when i run: this.WBro.Navigate("http://localhost/cookie.php", null,null,"Cookie: foo=bar"); the foo cookie isn't there, and all I got is a page displaying the "usual" headers ( except the cookie one). Does somebody has any idea of why this happens? Thanks a lot!

    Read the article

  • Organize Outlook email (delete messages that have been replied to)

    - by Les
    Imagine the scenario where you and I converse on a subject via email. Each time we reply to the other's email, we include all the message along with our response. If we strictly alternate our replies, then clearly I can delete all but the last message and retain the entire conversation. Now add several more people to this scenario and remove the strict alternation of replies such that the latest message no longer contains the entire conversation. Is there a tool that can delete messages in the thread such that the entire thread can be reviewed with a minimum number of messages? Or, take it to the next level and merge all responses in such a way as to preserve the entire conversation in a single message.

    Read the article

  • Deleting unneeded rows from a table with 2 criteria

    - by stormbreaker
    Hello. I have a many-to-many relations table and I need to DELETE the unneeded rows. The lastviews table's structure is: | user (int) | document (int) | time (datetime) | This table logs the last users which viewed the document. (user, document) is unique. I show only the last 10 views of a document and until now I deleted the unneeded like this: DELETE FROM `lastviews` WHERE `document` = ? AND `user` NOT IN (SELECT * FROM (SELECT `user` FROM `lastviews` WHERE `document` = ? ORDER BY `time` DESC LIMIT 10) AS TAB) However, now I need to also show the last 5 documents a user has viewed. This means I can no longer delete rows using the previous query because it might delete information I need (say a user didn't view documents in 5 minutes and the rows are deleted) To sum up, I need to delete all the records that don't fit these 2 criterias: SELECT ... FROM `lastviews` WHERE `document` = ? ORDER BY `time` DESC LIMIT 10 and SELECT * FROM `lastviews` WHERE `user` = ? ORDER BY `time` DESC LIMIT 0, 5 I need the logic. Thanks in advance.

    Read the article

  • c# ProcessCmdKey overload, match generic combination

    - by leo
    Hi all, On some control, I want ProcessCmdKey to return true if the keys pressed by the user were ALT and any letter of the alphabet. I'm able to return true if the user presses Alt with the following code, but how can I add the condition of a letter also pressed ? protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if ((keyData & Keys.Alt) != 0) { return true; } } Thanks.

    Read the article

  • does overload operator-> a compile time action?

    - by Brent
    when I tried to compile the code: struct S { void func2() {} }; class O { public: inline S* operator->() const; private: S* ses; }; inline S* O::operator->() const { return ses; } int main() { O object; object->func(); return 0; } there is a compile error reported: D:\code>g++ operatorp.cpp -S -o operatorp.exe operatorp.cpp: In function `int main()': operatorp.cpp:27: error: 'struct S' has no member named 'func' it seems that invoke the overloaded function of "operator-" is done during compile time? I'd add "-S" option for compile only.

    Read the article

  • delete hibernate entity question?

    - by ylazez
    i want to delete a row and cascade all foreign keys in hibernate i am new to hibernate and i want to know if there's a method to delete an entity session.delete(); like the session.save and session.update methods in hibernate?

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >