reverse

Django using a newly create object in reverse redirect

I am trying to pull the id from the newly created project object so I can redirect the user to the page containing the new project. Right now I get "'ProjectAddForm' object has no attribute 'id'". I have read online that this should work but for some reason it's not. if request.method == 'POST': form = ProjectAddForm(request.P...

Custom reverse of a list in Prolog

Hello, I am trying to write a predicate that given the following list in Prolog: [[1,a,b],[2,c,d],[[3,e,f],[4,g,h],[5,i,j]],[6,k,l]] will produce the following list: [[6,k,l],[[5,i,j],[4,g,h],[3,e,f]],[2,c,d],[1,a,b]] As you can see I would like to preserve the order of the elements at the lowest level, to produce elements in the ...

C#: Displaying text in richtextbox in reverse order/updwards

Hi, I am trying to create a 'log display' using the richtextbox control in C#.NET. public void logLine(string line) { rtxtLoginMessage.AppendText(line + "\r\n"); } Is there a way to display the text in reverse order/upwards? (where the newest log and date will be displayed at the top) Your help is much appreciated. ...

How can I reverse a list in python?

How can i do this in python? array=[0,10,20,40] for (i = array.length() - 1 ;i >= 0; i--) I need to have the elements of an array but from the end to the beginning. ...

How do I finish a reverse string?

So my teacher told me to make a string that makes whatever I type go in the opposite order (e.g. "hello there" becomes "ereht olleh"). So far I worked on the body and I came up with this public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { (The input needs to be in...

about python regular expression match from right direction

normally,we use regular expression match from left to right direction,i want to know is there some switch can match from the right to left in python? or in any other language has this feature embedded e.g. abcd1_abcd2 if give a abcd regular expression,it will match two abcd,what i want is put the last match at first in a reverse direc...

java: reverse list

I want to have a reversed list view on a list (in a similar way than List#sublist provides a sublist view on a list). Is there some function which provides this functionality? I don't want to make any sort of copy of the list nor modify the list. It would be enough if I could get at least a reverse iterator on a list in this case thoug...