3,822 questions
1
vote
1
answer
69
views
Array Reverse Proof by Dafny
Regarding the array reversal problem, I guess loop invariants are logically correct, based on the symmetry of the elements in the array and their relationship after reversal.
However, I don’t ...
0
votes
1
answer
169
views
Reversing a linked list returns only the head
I have been trying to create a method that can reverse a linked list. However, it only show the head of the original list without the rest of the parts showing up. I have tried making another, similar ...
-2
votes
1
answer
103
views
CMP , DIV & MUL Questions
Last month I started to learn how to use Cheat Engine to script with zero knowledge and some things are not clear to me. My objective was to create a defense boost by dividing the damage taken by ...
-6
votes
4
answers
349
views
A recursive function to reverse an integer w/o string,loops or other functions [closed]
Header:
Int reverse(int n)
Return the number in reverse order of digits.
the rules are:
reverse get one integer
Must be done with recursion
can't use string,loops or any other functions.
can assume ...
0
votes
4
answers
116
views
To return text value between the first and second semicolons counting from the right of a string
I have a field in a table which consist of a string of values separated by semi-colons, e.g. apple; banana; orange; pear
I have been trying to build a SELECT statement to return the second group in ...
1
vote
1
answer
109
views
Tricky Reverse Regex Python 3.11
Can any one please help me with the reverse part of the regex? I got it almost right but the reverse is tricky because if I have an input as:
Input = dogs and cats or (white or black) or (cat and (red ...
0
votes
1
answer
85
views
Reverse Proxy Nginx work inside my network, but from internet redirect to only one Server
I'm Alessio, and I'm facing an issue with the Nginx reverse proxy.
Here is the configuration file for the redirects:
# Nextcloud server configuration
server {
listen 80;
server_name nextcloud....
-1
votes
1
answer
55
views
Reverse all text files in all path with output separate independently
My code run successfully but I want that output files will be separate independently.
import os
path = '/txt_files_path/' # txt files path
for filename in filter(lambda p: p.endswith("txt")...
0
votes
1
answer
100
views
Java - compilation error when reverse order [duplicate]
why the second sort occurs compilation error?
List<List<Long>> list = Lists.newArrayList();
list.stream().sorted(Comparator.comparing(x -> x.get(0))); //works fine
list.stream().sorted(...
3
votes
3
answers
590
views
How to reverse the order of a Powershell ordered hashtable / dictionary
I want to achive a simple goal. Stop some services in a defined order on multiple servers and afterwards start them in the reversed order.
So first step is to define an ordered hashtable / dictonary.
$...
9
votes
1
answer
136
views
Algorithm to reverse an array/string only in terms of rotate operations
Given we can do a left-rotate (and subsequently a right-rotate) of an array only in terms of calls to reverse, like so:
void rotl(std::string &s, const int d)
{
std::reverse(s.begin() , s....
1
vote
2
answers
97
views
Shifting a number based on the remainder of it divided by 4 - C
I have a function implemented which reverses the bits in a number. The number of bits in the number to be reversed can vary. However, of course it must be shifted to the left at the end to align with ...
0
votes
2
answers
748
views
Reverse singly linked list in C and return new head
Please, what am I missing? I am trying to reverse a singly linked list (in-place), but all I get returned is the one node (pointer to the head of the list). I've tried using a void function (as a ...
1
vote
1
answer
53
views
Django reversed for loop slice
I am currently trying to reverse a slice of a list going from 0 to 11
class Game(models.Model):
board = models.JSONField(default=list)
game = Game(board=[4] * 12, scores=[0, 0], current_player=0, ...
0
votes
3
answers
86
views
Trying to redirect user from a booking page in django
This is my first Django project and I am really struggling. It is a simple booking app where the logged in user is on a page with a form to make a booking and a list of current bookings. I can make ...