kristofer / Spark/Docker Troubleshooting Guide
0 喜歡
0 分支
1 檔案
最後活躍
Spark-Docker-SQL - Troubleshooting Guide
🚨 Quick Emergency Fixes
🔥 "Everything is Broken" - Nuclear Option
# Stop everything and restart fresh
docker-compose down -v --remove-orphans
docker system prune -f
docker volume prune -f
kristofer / DTOs (java & python)
0 喜歡
0 分支
2 檔案
最後活躍
Data Transfer Objects (DTOs) Explained for Beginners (Java, then Python)
Data Transfer Objects (DTOs) via Java; Explained for Beginners
What Are DTOs?
A Data Transfer Object (DTO) is a simple container for data that travels between different parts of your application. Think of a DTO like an envelope specifically designed to carry exactly what's needed—no more, no less.
public class OrderDTO {
private Long id;
private String customerName;
kristofer / gist:d3baa93bb0434570863f9306365bece1
0 喜歡
0 分支
1 檔案
最後活躍
1 | sjldjaslkdjalkjddlasjlkjsa.kmd |
kristofer / Maven for Java Newbies
0 喜歡
0 分支
1 檔案
最後活躍
Maven and POM.xml for Newbie Java Programmers
What is Maven?
Maven is a powerful build automation and project management tool primarily used for Java projects. Think of it as your project's organizer and assistant that handles several critical tasks:
- Dependency Management: Automatically downloads and manages libraries your project needs
- Project Building: Compiles your code, runs tests, and packages your application
- Project Structure: Enforces a standard directory layout for consistent organization
kristofer / FASTAPI and Data Modeling Python
0 喜歡
0 分支
1 檔案
最後活躍
FastAPI, a modern Python web framework, is often used with database modeling to create robust APIs. Here's how it's typically done:
- Database Choice: FastAPI doesn't enforce a specific database. You can choose SQL (like PostgreSQL, MySQL, SQLite) or NoSQL databases. For SQL databases, SQLAlchemy is a common choice as an ORM (Object-Relational Mapper). SQLModel, created by the same author as FastAPI, is designed to work seamlessly with it.
- Data Models: Pydantic: FastAPI uses Pydantic for data validation and serialization. You define data models using Pydantic, which are then used to validate incoming requests and structure responses. SQLModel: SQLModel extends Pydantic to define database tables directly as Python classes. This allows you to define both data structures and database schemas in one place. SQLAlchemy: If using SQLAlchemy, you define models that map to database tables.
上一頁
下一頁