| title,content,language,description |
| Hello World JavaScript,"console.log('Hello, World!');",javascript,A simple Hello World program in JavaScript |
| Python Data Analysis,"import pandas as pd |
| import numpy as np |
|
|
| # Load data |
| df = pd.read_csv('data.csv') |
| print(df.head())",python,Basic data analysis with pandas |
| HTML Template,"<!DOCTYPE html> |
| <html> |
| <head> |
| <title>My Page</title> |
| </head> |
| <body> |
| <h1>Welcome</h1> |
| <p>This is a sample HTML page.</p> |
| </body> |
| </html>",html,Basic HTML template |
| CSS Styling,"body { |
| font-family: Arial, sans-serif; |
| margin: 0; |
| padding: 20px; |
| background-color: #f5f5f5; |
| } |
|
|
| .container { |
| max-width: 800px; |
| margin: 0 auto; |
| background: white; |
| padding: 20px; |
| border-radius: 8px; |
| box-shadow: 0 2px 4px rgba(0,0,0,0.1); |
| }",css,Basic CSS styling for a webpage |
| SQL Query Example,"SELECT |
| users.name, |
| users.email, |
| COUNT(orders.id) as order_count, |
| SUM(orders.total) as total_spent |
| FROM users |
| LEFT JOIN orders ON users.id = orders.user_id |
| WHERE users.created_at >= '2024-01-01' |
| GROUP BY users.id |
| ORDER BY total_spent DESC |
| LIMIT 10;",sql,SQL query to get top customers by spending |