Questions tagged [reversing]

Reversing refers to performing a task in the direction opposite to that which the task is normally performed in. It also refers to changing the order of an ordered list of items such that they are rearranged from the last item to the first item. For questions related to discovering the principles of a human made system through analysis, please use [tag:reverse-engineering].

Reversing refers to performing a task in the direction opposite to that which the task is normally performed in.

It also refers to changing the order of an ordered list of items such that they are rearranged from the last item to the first item.

For questions related to discovering the principles of a human made system through analysis, please use .

113 questions
-2
votes
1 answer

How to reverse the order of a input file using C++?

I need to reverse the order of the file and outputted into another file. For example, the input: hello this is a testing file again just so much fun Expected output: just so much fun this is a testing file again hello This is my…
Kait26
  • 9
  • 1
-2
votes
4 answers

Reversing a number using list in python

I want to reverse a number but I get this error: "TypeError: 'type' object is not subscriptable" I would be grateful if you could correct my code.here is my code: number=input("enter your number ") num=int(number) count=0 list1=[] while(num!=0): …
-3
votes
1 answer

Reversing/recoding survey items in R

I am working on a survey document on CVS by R. Before the analysis, I want to reverse the coding of some items on 4 likert scale. To turn 1 to 4, 2 to 3, 3 to 2, and 4 to 1. Any ideas on how to do that?
sebgok
  • 15
  • 2
-3
votes
2 answers

Reversing a number's digits using modular division

My homework is to find the "emirp numbers" (pairs of primes like 13 ⇆ 31) up to 10,000. I can reverse the digits using [::-1], but I must do it with % instead. Here's my code. It works, but how can I reverse the digits using % instead of…
-3
votes
3 answers

Error reversing a string in Java

I want to reverse a String, I know there are thousands of examples, but I wanted to do the job by myself and I created this, but it doesn't work properly. public String ReverseString(String str){ str = str.toLowerCase(); char…
Cristian
  • 359
  • 3
  • 6
  • 12
-4
votes
4 answers

I am trying to reverse an array the user inputs like {hello, Donald, Trump} -> pmurT, dlanoD etc but it outputs [null]

I'm new to java and wanted to reverse an array the user inputs (including character) so apple, banana becomes ananab, elppa. But it outputs [null] package test; import java.util.Arrays; import java.util.Collections; import…
-4
votes
1 answer

Reversing the output of a function in python that is not a list

I will get a number for the output of this piece of code: base = int(raw_input("Pick your base: ")) base = str(base) question = "Pick your number! (the base is "+base+" ): " number = int(raw_input(question)) def func(number): if number != 0:…
-4
votes
2 answers

Algo reversing c#

I have some algorithm written in c#: int num3 = 260005; string text = this.textBox1.Text; int length = text.Length - 4; int num5 = ((Convert.ToInt32(text.Substring(4, length)) - 0x7d1) / 2) - 0x7d1; if (num3 == num5) { do somthing!!! } Can…
1 2 3 4 5 6 7
8