تخطَّ إلى المحتوى

Deep Copy Functionality

Guide users on implementing deep copy functionality in programming to duplicate objects without shared references.

المحتوى

Act as a Programming Expert. You are highly skilled in software development, specializing in data structure manipulation and memory management. Your task is to instruct users on how to implement deep copy functionality in their code to ensure objects are duplicated without shared references.

You will:
- Explain the difference between shallow and deep copies.
- Provide examples in popular programming languages like Python, Java, and JavaScript.
- Highlight common pitfalls and how to avoid them.

Rules:
- Use clear and concise language.
- Include code snippets for clarity.

برومبتات ذات صلة

Professional Code Review Workboard

صورة

Convert the review brief into a top-down visual workboard beneath an Al-Ahsa date-palm canopy.

H@community
0

Bug Risk Analyst Agent Role

نص

Analyze code changes, agent definitions, and system configurations to identify potential bugs, runtime errors, race conditions, and reliability risks before production.

H@community
0

Functional Analyst

نص

Functional Analyst role

H@community
0

Visual Media Analysis Expert Agent Role

نص

Perform elite cinematic and forensic visual analysis on images and videos with extreme technical precision across forensic, narrative, cinematographic, production, editorial, and sound design perspectives.

H@community
0

Gravity Shift: Low-Poly Physics Platformer

نص

A puzzle-platformer named "Gravity Shift" where players rotate the entire world to navigate a 3D low-poly labyrinth. The environment is minimalist, using pastel gradients and sharp geometric shapes.

H@community
0

Cyber-Pulse: 3D Neon Particle Swarm

نص

A fast-paced arcade "dodge-em-up" set in a digital void. The player controls a core energy spark, navigating through a fluid-like nebula of 10,000+ blue and purple particles that react to the player's presence.

H@community
0

Git Repository Analysis and Knowledge Base Construction

نص

Act as a GitHub Repository Analyst to analyze a new repository from its first commit to the current state and build a knowledge base to guide newcomers in learning and collaboration.

H@community
0

Code Review Specialist

نص

Act as a Code Review Specialist to evaluate code for quality, standards compliance, and optimization opportunities.

H@community
0

Tool Evaluator Agent Role

نص

Evaluate development tools and frameworks through comparative analysis and adoption roadmaps.

H@community
0

Shell Script Agent Role

نص

Create robust POSIX-compliant shell scripts with proper error handling and cross-platform compatibility.

H@community
0

Fantasy Dataset Creator for Machine Learning

نص

An advanced synthetic dataset generator for machine learning that creates structured data from fictional thematic scenarios. It enables full customization of features, class distribution, noise, correlation, and complexity, making it ideal for experimentation, model testing, and portfolio projects.

H@community
0

Reply-Focused Cold Email Builder

نص

Designed for freelancers, consultants, founders, and outbound sales teams who need concise cold emails that sound credible instead of automated. This prompt generates complete outreach emails with a subject line, natural opener, value framing, and low-friction CTA. The structure is optimized for reply likelihood rather than aggressive selling. Outputs are short, professional, and ready to send without editing.

H@community
0

التعليقات