Questions tagged [reverse]

Rearranging the order of a sequence such that the final order is a mirror image of the original.

Rearranging the order of a sequence such that the final order is a mirror image of the original.

3773 questions
1
vote
2 answers

How to use only the last part of each line in file for python?

#!/usr/bin/python import sys, re fname = sys.argv[1] barcodefname = sys.argv[2] barcodefile = open(barcodefname, "r") #list = open(barcodefname, "r").readlines(-1) for barcode in barcodefile: barcode = barcode.strip() print…
Justin P
  • 23
  • 3
1
vote
1 answer

How to invert the MQL query (for freebase)?

I am trying to list all the types for a particular id: { "id": "/en/sony", "type": [{ "name": "Topic", "id": null }] } This query giving me the following result: http://tinyurl.com/lubavey { "result": { "type": [ { …
Rajesh Surana
  • 883
  • 1
  • 10
  • 15
1
vote
2 answers

Is it possible to do reverse debugging with qemu?

I read on this page that they were going to add revese execution support to existing simulators such as qemu. Since this page has been last edited since 2012, I would like to know if the current version of qemu supports this functionnality. If so,…
Mahouk
  • 902
  • 9
  • 28
1
vote
1 answer

ArrayList in Java; Swap and reverse at same time

Is there any method to swap and reverse at the same time? Let's me explain: If i have, for example, ten integers: 1 2 3 4 5 6 7 8 9 10, now i want to reverse from 6 to 10, with result: 1 2 3 4 5 10 9 8 7 6, and now from 8 to 6, with result: 1 2 3 4…
1
vote
2 answers

how to rewrite url in haproxy

Hi I am trying to redirect url and access using backend but i struct in configuration my initial configuration is acl url_tag18 path_beg /v1 use_backend cdn if url_tag18 backend cdn reqrep ^([^\ ]*\ )/v1(.*) wp/\1 server web02 …
Akki
  • 557
  • 3
  • 7
  • 16
1
vote
4 answers

JAVA - Reverse String without temp String, array, Stringbuilder, substring

I have a question for you. So, I have to reverse a String with this requirement : Only use : 1 variable string (for input), 1 variable char & 1 variable int Can't use another string, string builder, list, array or collections Output result assigned…
technonews
  • 23
  • 3
1
vote
1 answer

Javascript: Can array shift and reverse methods not be called in the same line of code?

This single line in javascript: myarray.reverse().shift().reverse() doesn't seem to work in the same way as the three separate lines myarray.reverse(); myarray.shift(); myarray.reverse(); Is this expected? Or is it a bug? I know I…
mak
  • 13
  • 2
1
vote
2 answers

How to invert the values of a two-dimensional matrix by using slicing in NumPy?

To reverse the last row is the first, we can write: import numpy as np a = np.arange(20) a = a.reshape(4,5) c = a[::-1,:] print c c: [[15 16 17 18 19] [10 11 12 13 14] [ 5 6 7 8 9] [ 0 1 2 3 4]] But how does the slicing reverse use…
1
vote
1 answer

Calculating CRC initial value instead of appending the CRC to payload

Most of the CRCs I've implemented were appending the calculated CRC value to the message (payload) and checking for a zero result at the receiver after all bytes incl. CRC value were fed through the CRC register. Obviously this is a quite standard…
fhw72
  • 1,066
  • 1
  • 11
  • 19
1
vote
0 answers

Reverse proxy returning page not found (ASP.NET MVC)

I am having two websites (ASP.NET MVC) on my local PC. One is site1.com and the second one is site2.com. I want site1.com/blog to be served from site2.com using URL rewrites. When I put http://site1.com/blog/home/about (home/about exists on…
mosu
  • 587
  • 2
  • 8
  • 20
1
vote
3 answers

Logic behind the Array.Reverse() method

what is the native logic work behind public static void Reverse(Array array, int index, int length);
prantick
  • 21
  • 2
1
vote
1 answer

CatapultC reverse bit order

Does anyone know how to convert between little and big endians in CataputC? Part of the design, I am working on, needs to use litle endian and rest uses big endian. I am searching for something equivalent to "downto" "to" keywords in vhdl.
Nic30g
  • 659
  • 6
  • 15
1
vote
1 answer

OCaml - Need some help at implementing my rev function

I've got an assignment where I have to recode a big part of the different functions found on "list". I'm currently having trouble implementing the rev function. type 'a my_list = | Item of ('a * 'a my_list) | Empty;; This is the type of…
Koonetz
  • 53
  • 6
1
vote
2 answers

Reverse Triangle using shell

OK so Ive been at this for a couple days,im new to this whole bash UNIX system thing i just got into it but I am trying to write a script where the user inputs an integer and the script will take that integer and print out a triangle using the…
vickes
  • 65
  • 3
  • 14
1
vote
2 answers

Apache Reverse Proxy to URL With Parameters

I am trying to setup a reverse proxy with 2 CentOS 6.5 machines running Apache 2.2.15, where the private URL contains parameters (static, same for all requests coming through the public url), so the setup should work like this: User --> public.url/…
Delta Zulu
  • 41
  • 1
  • 1
  • 6
1 2 3
99
100