File size: 1,562 Bytes
38832d1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[
  {
    "title": "Hello World JavaScript",
    "content": "console.log('Hello, World!');",
    "language": "javascript",
    "description": "A simple Hello World program in JavaScript"
  },
  {
    "title": "Python Data Analysis",
    "content": "import pandas as pd\nimport numpy as np\n\n# Load data\ndf = pd.read_csv('data.csv')\nprint(df.head())",
    "language": "python",
    "description": "Basic data analysis with pandas"
  },
  {
    "title": "HTML Template",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>My Page</title>\n</head>\n<body>\n    <h1>Welcome</h1>\n    <p>This is a sample HTML page.</p>\n</body>\n</html>",
    "language": "html",
    "description": "Basic HTML template"
  },
  {
    "title": "CSS Styling",
    "content": "body {\n    font-family: Arial, sans-serif;\n    margin: 0;\n    padding: 20px;\n    background-color: #f5f5f5;\n}\n\n.container {\n    max-width: 800px;\n    margin: 0 auto;\n    background: white;\n    padding: 20px;\n    border-radius: 8px;\n    box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n}",
    "language": "css",
    "description": "Basic CSS styling for a webpage"
  },
  {
    "title": "SQL Query Example",
    "content": "SELECT \n    users.name,\n    users.email,\n    COUNT(orders.id) as order_count,\n    SUM(orders.total) as total_spent\nFROM users\nLEFT JOIN orders ON users.id = orders.user_id\nWHERE users.created_at >= '2024-01-01'\nGROUP BY users.id\nORDER BY total_spent DESC\nLIMIT 10;",
    "language": "sql",
    "description": "SQL query to get top customers by spending"
  }
]