"代码示例" can be translated into English as "code example" or "code snippet" (depending on the context, with "code snippet" often referring to a smaller, specific piece of code).
Code example: A more general term for any demonstration of code.
Code snippet: Typically used for a short, focused segment of code.
Both are commonly used in technical documentation or programming discussions.