Code Examples Gallery
Browse curated, runnable examples across 11 languages. Click any card to open, edit & run it live.
Bubble Sort in C++
Sort an array in place and print it — a first sorting algorithm.
Open & run →Center a Box with Flexbox
The classic perfectly-centered card using only three flexbox properties.
Open & run →Responsive Grid Gallery
An auto-fitting image grid that reflows to any screen width with one line of CSS.
Open & run →Semantic Article Layout
A well-structured article using header, article, section and footer landmarks.
Open & run →A Simple Class in Java
Define a class, construct an object, and call a method.
Open & run →Live Digital Clock
Update the DOM every second with setInterval and toLocaleTimeString.
Open & run →Tiny To-Do List
Add and remove items — a minimal intro to event handling and the DOM.
Open & run →FizzBuzz in Python
The interview classic — print 1–20 replacing multiples of 3/5.
Open & run →List Comprehensions
Build squares and filter evens in a single readable expression.
Open & run →Hello World
Print a greeting to the console — the simplest Python program.
Open & run →Fibonacci
Generate the first N Fibonacci numbers using an iterative approach.
Open & run →OOP Example
Create classes, constructors and methods — basic object-oriented Python.
Open & run →List Comprehension
Build squares and flatten matrices with Python list comprehensions.
Open & run →Hello World
Log a greeting — the simplest JavaScript program.
Open & run →Async / Await
Demonstrate Promises and async/await with sequential delays.
Open & run →Array Methods
Use filter, map, and reduce to transform an array of numbers.
Open & run →Destructuring
Unpack nested objects and arrays with ES6 destructuring.
Open & run →Hello World
Echo a greeting — the simplest PHP script.
Open & run →Arrays & Loops
Iterate indexed and associative arrays with foreach and array_walk.
Open & run →OOP Example
Inheritance with Shape and Circle classes using typed properties.
Open & run →Hello World
Print to stdout with iostream — the simplest C++ program.
Open & run →Bubble Sort
Sort an array in place and print it — a first sorting algorithm.
Open & run →Binary Search
Search a sorted array efficiently with binary search.
Open & run →Linked List
Implement a simple singly linked list with push and print.
Open & run →Hello World
Print a greeting with printf — the simplest C program.
Open & run →Pointers
Swap two integers using pointer arguments.
Open & run →Hello World
Print a greeting — the simplest Java program.
Open & run →Classes & Objects
Define a Student class, sort an ArrayList, and print results.
Open & run →Streams API
Filter, map and reduce arrays with the Java Streams API.
Open & run →Hello World
Print a greeting — the simplest Go program.
Open & run →Goroutines
Launch concurrent goroutines and synchronize with WaitGroup.
Open & run →Hello World
Print a greeting — the simplest Ruby program.
Open & run →Blocks & Iterators
Use blocks, each_with_index, map, and select on an array of names.
Open & run →Hello World
Echo a greeting — the simplest Bash script.
Open & run →Script Basics
Variables, loops, and conditionals in a single Bash script.
Open & run →