Skip to main content
Filter by
Sorted by
Tagged with
-5 votes
0 answers
76 views

Can anyone teach me what is the issue in the following code lines. This is tapp exchange migration script in move smart contract. let data = vector::empty<u8>(); // pool id (32 bytes) vector::...
Seiji Ito's user avatar
1 vote
1 answer
97 views

We have a boxed slice of an arbitrary type T. I'd like to slice it at a given index, then move the remaining elements after the index into a new Box<[T]>. It's fine if the original Box<[T]>...
Levente Bokor's user avatar
0 votes
0 answers
56 views

I have a function that requires 2 type arguments. In the PTB CLI I have tried all the below to no avail: --move-call $PACKAGE::escrow::swap "<$TYPEARG> <$TYPEARG>" @$ESCROW @$KEY ...
TheodorosNikoleris's user avatar
0 votes
2 answers
221 views

I have a generic collection class that's a wrapper on top of different data types. In this intersection function I created a new object in order to avoid the map::erase() as a small optimization, ...
Dancing_Elf's user avatar
0 votes
0 answers
48 views

I'm moving all polyline features around a centre to a new center. How can I ensure that their spatial relationships are preserved after the features have been moved? It seems I would calculate the ...
goonerify's user avatar
  • 1,786
2 votes
0 answers
105 views

Sui Move’s one-time witness (OTW) pattern ensures a module’s init function runs exactly once. From Move documentation The OTW is a special type of Witness that can be used only once. It cannot be ...
Yilmaz's user avatar
  • 51k
2 votes
1 answer
118 views

In the following code: #include <vector> int main() { using vec_t = std::vector<int>; vec_t v; auto it1{std::move(v).begin()};// type is vec_t::iterator auto it2{std::...
phinz's user avatar
  • 1,647
2 votes
1 answer
78 views

When trying to make a Date readable we sometimes use numeric-edited field,e.g. 01 Date-Readable pic 99.99.99. Decimal-Point is comma is in effect. Although this solution is not how the decimal point ...
user30144283's user avatar
1 vote
0 answers
32 views

I would like to move a geometry line next to another by a distance using PostGIS. The ST_OffsetCurve function allows you to move the geometry, but sometimes the movement is done in the opposite ...
Bak's user avatar
  • 453
0 votes
1 answer
104 views

I'm posting my problem here as I'm new to Aptos and I'm facing an issue I havn't found any solution online before. I've recently joined a team and they are codding using Move that basic multisig ...
jbrionne's user avatar
1 vote
1 answer
64 views

I want to move a File datatype from one struct into another and then drop the original struct. I have a data structure with a logger of type RefCell<Box<dyn std::io::Write>> pub struct ...
Albtzrly's user avatar
  • 946
1 vote
2 answers
92 views

I have a table with data in date format (day/month/year) distributed in row 6 and in several columns that go from E6 to NE6. That is, E6 = 01/01/2025 and NE6 = 12/31/2025. To advance between these ...
Carla Mozer's user avatar
0 votes
1 answer
109 views

I would like to ask how can I move one image from upper canvas to lower canvas in python? here is my code which I would like to move an image from upper canvas to lower canvas: from tkinter import * ...
Mohammad Eftekharian's user avatar
2 votes
3 answers
157 views

I have a std::map which contains a bunch of key value pairs. I want move these elements into a std::vector. I tried using std::transform from <algorithm> to do this, but it doesn't work. Here's ...
Setu's user avatar
  • 1,086
-1 votes
1 answer
41 views

I am making a game in which i have a few Balls moving on their own and never stopping. Now I tried to add a Forcefield which should redirect the balls, which I did with AddForce: ball.gameObject....
Moritz's user avatar
  • 17
1 vote
3 answers
241 views

What is the difference between transfer::share_object vs transfer::public_share_object in Sui Move? I need to create a shared object which can be only modified in the same package but others cannot ...
Ice's user avatar
  • 492
1 vote
0 answers
64 views

I need to fetch a list of all items of a bag collection after adding items. Is there a way or an alternative way to fetch a list? I tried to find a method from Move docs but it does not have methods ...
Ice's user avatar
  • 492
0 votes
0 answers
39 views

I started learning move language on aptos blockchain by solving programming quests on overmind.xyz This is an example: https://github.com/overmind-xyz/heads-up/blob/main/sources/coin_flip.move I ...
Tereza Vekić's user avatar
5 votes
1 answer
150 views

vector is a struct with two public members X and Y; a parameterized constructor that prints integer constructor called; a copy constructor that prints copy constructor called; and a move constructor ...
timmy george's user avatar
0 votes
0 answers
66 views

This has been bothering me for some time. Say we have a constructor that takes many parameters (copies or rvalues): Object(A a, B b, C c, D d, ...); When you need to use this constructor you can do ...
tjzel's user avatar
  • 115
0 votes
1 answer
99 views

In this code (using C++17), will "abc" be used to create a std::string temporary object and then copied into letters by push_back, or will it be moved ? Is it more efficient to use push_back ...
codeology's user avatar
  • 377
2 votes
1 answer
123 views

In the following code 'Drop' is being called only once: #[derive(Default)] struct MyStruct { my_int: i32, my_vec: Vec<i32>, } impl Drop for MyStruct { fn drop(&mut self) { ...
Zebrafish's user avatar
  • 16.5k
0 votes
0 answers
43 views

I'm attempting to make a cube dash when the spacebar is pressed. I already have automatic movement in a random direction set up when the code starts executing. However I am uncertain how to switch ...
stratutrav's user avatar
0 votes
1 answer
142 views

I got a problem while writing an unit test for my module, and I realize that I can't get timestamp in unit test. I tried to get timestamp in the below code, #[test] fun get_seconds() { ...
Gavin's user avatar
  • 57
0 votes
0 answers
71 views

I have the following code snippet: #include <iostream> #include <array> struct Matrix { struct Proxy { Proxy(Matrix& m) : m_ { m } {} Proxy(Proxy&& rhs)...
qloq's user avatar
  • 1,335
1 vote
1 answer
156 views

I have discovered an interesting problem that I am unsure of the reason. Here is my code: #include<vector> #include<iostream> using namespace std; std::vector<int>&& fun_1() ...
SZYoo's user avatar
  • 508
0 votes
1 answer
60 views

I am calling the Parent sheet with the Listbox, and the Parent Sheet should be moved to the right of the "Index" Sheet, and then the Case Statement with the Array Sheets, which are the ...
tome10's user avatar
  • 61
-1 votes
1 answer
1k views

I have three screens on my computer but I only use one of them when I am sharing my screen in a meeting, I want a quick keyboard shortcut to move the window to the screen I am using to share. I used ...
Ali Eftekhari's user avatar
0 votes
2 answers
629 views

Trying to make a snake game, but my version is a little complex, because I am not using a single green or black box for snake, I use different sprites for snake head, tail, body, and corner like this. ...
kekekuli's user avatar
1 vote
1 answer
56 views

I have 2 spreasheets in excel file where I enter the daily objects to be completed in spreadsheet 1 and master data in spreadsheet 2 ( where the the objects which are completed are stored ) As of now, ...
Raman Singh's user avatar
2 votes
0 answers
65 views

I need to delegate the authority of some of my token to another account or smart contract in aptos I searched and found there is a function called offer_signer_capability but my question is how can i ...
mohan A's user avatar
  • 105
0 votes
1 answer
123 views

VBA code that can rotate in sync up one row two columns with positions/names so that the top row will always fall down on last position. The code should ignore the blank cells and only rotate the ...
Mirel's user avatar
  • 11
1 vote
1 answer
82 views

There is the following piece of code #include <iostream> class A { public: A() {} // Explicit move constructor A(A&&) noexcept { std::cout << "move ctor&...
getsoubl's user avatar
  • 1,117
0 votes
3 answers
126 views

I have hundreds of files that when created generate a random file name with either 15 character or 32 character. I need to target only the 32 character files to move. I need this to be a batch command....
Vincent's user avatar
1 vote
1 answer
135 views

I am trying to understand value categories in C++ a bit better, and I encountered some code that got me a bit confused. I looked at some questions such as Accept move-only parameter by value or rvalue ...
Francisco Castanheira's user avatar
-1 votes
1 answer
103 views

if i pass simple int or string all is okay. but when i pass unique_ptr it moves inside bind object (bind_f) and i can't call bind_f(); #include <iostream> #include <memory> #include <...
vansergh's user avatar
  • 101
-3 votes
1 answer
101 views

I've been reading up on copy and move semantics to improve my knowledge of when to use T vs T const & vs T && I wrote a small bit of test code to verify my intuition #include <iostream&...
Sam Coutteau's user avatar
0 votes
2 answers
132 views

please help me introduce a restriction on player movement along the boundaries of the camera. At first I just used box collider 2d, but the enemies are bumping into it. And as the phone screen changes,...
Михаил's user avatar
0 votes
1 answer
59 views

enter image description here Hello, there are several images. One image is in focus and has a red border. I want the border to move to the next image when the right or left side is selected with the ...
Yun's user avatar
  • 9
3 votes
2 answers
178 views

When exactly does an object cast with std::moved get moved? For instance, does the following code constitute use after move? f(std::move(a), a.Something()) Where f = f(A a, int x) and a is an ...
c z's user avatar
  • 9,355
0 votes
3 answers
180 views

The following code would not compile: #include <utility> class Foo{ public: Foo(const Foo& foo) = delete; explicit Foo(Foo&& foo) = default; Foo() = default; Foo ...
ttzytt's user avatar
  • 101
0 votes
1 answer
681 views

Why does this code work, only when I replace the mv with move? forfiless /c "cmd /c mv @FILE @FNAME_changed.@EXT" Generally the short form mv works just well, but when I use it with the ...
Bones's user avatar
  • 9
1 vote
1 answer
76 views

I have this class: struct Handle { int* ptr_to_something; void operator=(Handle&& other) { ptr_to_something = other.ptr_to_something; this->member1 = other....
Zebrafish's user avatar
  • 16.5k
0 votes
2 answers
515 views

I am new to office-script and I have tried to work on this issue with ChatGPT, but this was not helpful at all. :-( I am trying to copy rows from one sheet to another with the code below, but this ...
Eik Moriben's user avatar
3 votes
1 answer
173 views

struct X { X() = default; X(const X& src) { cout << "copy" << endl; } }; int main() { X x1; X x2(move(x1)); } Output: copy struct ...
Andrey Rubliov's user avatar
1 vote
0 answers
45 views

html: <table class="normal_table white" nzTemplateMode> <thead> <tr> <th>Category</th> <th>Items</th> ...
Shawn's user avatar
  • 1,695
0 votes
2 answers
102 views

I have a class that doesn't implement neither a default constructor, nor a copy constructor, just a move constructor, and inside a function I want to insert a new instance of this class into a std::...
Fayeure's user avatar
  • 1,483
1 vote
1 answer
165 views

I have a boost::asio::io_context that I want to move around. Since I cannot move it without a pointer, I use an std::unique_ptr. However, I noticed that when running with -fsanitize=address heap-use-...
SupAl's user avatar
  • 1,131
0 votes
2 answers
60 views

As an example I want to parse a string that can either be 2 dot-separated words or a single word. Each "word" is a combination of alphanumeric and underscore characters, so I write the word-...
exocortex's user avatar
  • 563
5 votes
1 answer
117 views

#include <iostream> #include <thread> template<int Num> class MyClass { public: MyClass(int val) : val_(val) {} // Copy constructor MyClass(const MyClass& other) : ...
Mathieu's user avatar
  • 332

1
2 3 4 5
70