Skip to content

Instantly share code, notes, and snippets.

View Divya0319's full-sized avatar
🎯
Focusing

Divya Gupta Divya0319

🎯
Focusing
  • Bangalore, India
View GitHub Profile
@Divya0319
Divya0319 / rectangle.py
Created August 10, 2024 13:06
OOPS-3 Additional problem 3 - Rectangles Python LLD
import copy
from .point import Point
class Rectangle:
def __init__(self, *args):
if len(args) == 2:
# Case 1: Two Point objects
if all(isinstance(arg, Point) for arg in args):
@Divya0319
Divya0319 / RedBusSchemaDesign.txt
Created August 8, 2024 12:27
Red Bus Schema Design
Tables:
1. Bus(bus_id -> PK, bus_no, reg_company_name, total_seats, available_seats, bus_type(AC, NONAC, SLEEPER)
2. Route(route_id -> PK, source, destination)
3. Bus_route(bus_route_id -> PK, bus_id -> FK referencing bus(bus-id) , route_id -> FK referencing route(route_id) , direction(UP, DOWN)
4. Bus_seat(bus_seat_id -> PK, bus_id -> FK referencing bus(bus_id) , seat_number
5. User(user_id -> PK, password, email, user_name)
6. Booking(booking_id -> PK, user_id -> FK referencing user(user_id), bus_route_id -> FK referencing Bus_route(bus_route_id), booking_date
7. Payment(payment_id -> PK, booking_id -> FK referencing Booking(booking_id), amount, payment_date, payment_method(CASH, CARD, UPI, NETBANKING), payment_status(PENDING, COMPLETED, FAILED)
8. Passenger(passenger_id -> PK, booking_id -> FK referencing booking(booking_id), name, age, gender, bus_seat_id -> FK referencing Bus_seat(bus_seat_id)
9. Travel(travel_id -> PK, passenger_id -> FK referencing passenger(passenger_id), traveled(bo
// Lines to add in module level build.gradle file for modules you publish
ext {
// Provide your own coordinates here
PUBLISH_GROUP_ID = 'io.github.divya0319'
PUBLISH_VERSION = '1.2.3'
PUBLISH_ARTIFACT_ID = 'Watermarking Bitmap in Android'
}
apply from: "${rootProject.projectDir}/scripts/publish-module.gradle"
class LoginActivity : BaseActivity() {
public override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_login)
ButterKnife.bind(this)
checkForAppUpdate()
}