2,543 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
48
views
Swap Uniswap V4 on Universal Router got revert
I'm trying to swap token in v4, but it got revert anyway. this is my code, i already approve erc20 -> permit2, then approver permit2 -> universal router, but it still got revert, i'm swapping ...
0
votes
0
answers
29
views
have problem in swapping with web3.py in uniswap sepolia testnet by eth/usdc pool
i write a code with chatgpt help for swapping tokens in web3.py in eth/usdc pool sepolia testnet.
why?
I’m testing a Uniswap v3 swap on the Sepolia testnet using Python and web3.py.
Although the ...
Advice
0
votes
1
replies
62
views
Swap full but all process terminated : does Linux free "orphans" pages when needed?
this is the first time I encounter a swap issue, I'm lost about how Linux is supposed to behave. I have a RHEL virtual machine running a batch processing RAM intensive application (100+GB RAM, 1GB ...
5
votes
4
answers
247
views
How to efficiently swap two parts of string without allocation? [closed]
I have a long string. In the string, I have two non-overlapping parts. They can have a gap between them. The lengths can be different.
For example a string:
This is a "foo", that is a "...
1
vote
1
answer
232
views
Are swaps allowed to self-check?
While checking &other != this is generally not a good idea in move/copy assignment and the copy-and-swap idiom should be preferred, is it allowed for a swap to perform such a check?
Copy-and-swap ...
5
votes
2
answers
182
views
What is the rationale behind container types in std defining their own swap function even if their move-semantics have been correctly implemented?
Below is the most common implementation of std::swap:
template<typename T>
void std::swap(T& a, T& b) {
auto tmp = std::move(a);
a = std::move(b);
b = std::move(...
4
votes
1
answer
86
views
A wait-free consensus algorithm for three processes, with a swap object and the fetch-and-increment object together in one atomic step
We know that a swap object consists of a shared register and supports a swap operation between the shared register and any local register, which atomically exchanges the values of the two registers.
A ...
0
votes
0
answers
75
views
Why 1inch Swap API returns 3% less than estimated [AggregationRouterV6]
Can it be an error in configuration or swap routing(may be because of partial fill?) that I've got too low output from 1inch aggregation router v6?
Example of transaction:
https://arbiscan.io/tx/...
0
votes
1
answer
124
views
Solana Payment Gateway swaping issue
I am developing a payment gateway on Solana and need to swap tokens programmatically using Node.js. Currently, I am testing SOL to USDC swaps with the Jupiter API.
Everything works until generating ...
1
vote
2
answers
73
views
Swapping strings or values in grouped data based on condition
The following data frame is grouped by the id variable. For each id on variables X, Y, and Z, I wish to replace "no" with "yes" on the first row if and only if the specific id has &...
0
votes
0
answers
61
views
When should I implement a swap() function for my class? [duplicate]
Suppose I'm writing a class intended not just for my private use, but for others to use as well (e.g. it's exposed in a library I'm writing or modifying). Let's suppose also that it's not a singleton.
...
1
vote
0
answers
62
views
Bytes reversing and swaping in nodejs
Context
I have a file of binary logs and each log is 7 bytes.
The first 4 bytes is a timestamp (writeUInt32BE), the following 1 byte is an indicator (num 1 or 2 using writeUInt8) and the last 2 bytes ...
4
votes
4
answers
269
views
Swap the first and the last words and reverse all the middle characters
Description
Guru gave a task to his students. He gave a sentence, and the students have to swap the first and the last words and reverse all the characters between those words. Help the students ...
0
votes
0
answers
301
views
Error when fetching pool keys from Raydium_py Solana
I’m working with a public GitHub repo (you can find it here: https://github.com/AL-THE-BOT-FATHER/raydium_py) that interacts with the Raydium decentralized exchange using Python. I’m trying to fetch ...
-4
votes
1
answer
73
views
Swap 2 lines in text file using assembler
this is my code for swapping 2 lines in DosBox assembly. I can not find out why is it printing the same thing from input.txt to out.txt. I think the problem is with line numbers (and user input). ...