Skip to main content
1 vote
1 answer
80 views

I am trying to understand the behavior of iterators in Python, particularly when using the copy.copy() and copy.deepcopy() functions. I have the following script: import copy my_list = ["a",...
shannu_boi's user avatar
2 votes
2 answers
288 views

I bounced into this issue: #24898: MemberwiseClone is missing after upgrade to powershell 7.5.0: class MyClass { [string]$Name [object] CloneProblem() { return $this....
iRon's user avatar
  • 24.4k
0 votes
2 answers
383 views

I am fairly new to xslt 3.0 and have a problem that requires it's use. I am very close but my output is printing the text-only copy of the data that I do not want. I have to basically merge the T3 ...
Jack Creed's user avatar
0 votes
1 answer
63 views

In the book "Implementing Domain Driven Design" of Vaughn Vernon, in the Testing of Value Objects section, the author talks about how we can use just shallow copy instead of deep copy to ...
Khoa Phạm's user avatar
2 votes
3 answers
156 views

I am learning shallow v.s. deep copying a list in Python. I learned that there're two ways to create copies that have the original values unchanged and only modify the new values or vice versa. They'...
LED Fantom's user avatar
  • 1,383
2 votes
2 answers
67 views

'a' array wasn't affected. const a = [1,2,3] const b = [...a] // shallow copy b[0] = 9 console.log(a) // [1,2,3] console.log(b) // [9,2,3] results as expected ---------- const a = [{name:"John&...
Kaan Topal's user avatar
0 votes
0 answers
62 views

I have trouble understanding the deep and shallow copy, and how the method .clone() works in Java. Some sources say it creates a shallow copy, others say it's deep. public class Kopie { public ...
xenfoulis's user avatar
0 votes
0 answers
88 views

In OpenCV, it's possible to create a cv::Mat representing a sub-rectangle of an existing cv::Mat, with cv::Mat::operator() functions. This is made possible by the Mat step parameter which enables non ...
galinette's user avatar
  • 9,420
0 votes
1 answer
80 views

I'm trying to understand the basics of C++ classes and the different forms of copying a class to another one, I made a simple class that use a table as a stack and i created simple function for ...
ILYASS LIRMAQUI's user avatar
-1 votes
1 answer
190 views

I am trying to implement an algorithm which requires the use of a second mutable vector (elements are read only) containing a subset of elements of the first vector. That subset is of different order ...
Gunnar Bernstein's user avatar
0 votes
0 answers
60 views

In my state I have a dictionary of a flat object: export interface INodeVisibility { id: string; level: number; isExpanded: boolean; } export type NodeVisibilityDict = { [key: string]: ...
Sammybar's user avatar
0 votes
2 answers
84 views

I am currently working on a React project and encountered an interesting issue related to shallow copying objects. In my component, I have a form where I collect data, and I noticed that different ...
Ibai Fernández's user avatar
0 votes
0 answers
63 views

In python I have: x = [1,2,3,[4,5,6]] y = x[:] x[3][0] = 9 so now: x = [1,2,3,[9,5,6]] y = [1,2,3,[9,5,6]] but: x[0] = 99 then: x = [99,2,3,[9,5,6]] and: y = [1,2,3,[9,5,6]] how come when I ...
DCR's user avatar
  • 15.8k
-1 votes
2 answers
123 views

The code below is illustrating my problem : public class TreeMapCopyProblem { private static TreeMap<Integer, SortedSet<Integer>> treeMap1; private static TreeMap<Integer, ...
Etienne Savary's user avatar
0 votes
2 answers
74 views

I have a very simple df, which I'm going to make a shallow copy of. # assign dataframe old_df = pd.DataFrame({'values': [10, 20, 30, 40]}) # shallow copy copy_df = old_df.copy(deep=False) I ...
hjyoo99's user avatar
  • 53

15 30 50 per page
1
2 3 4 5
27