Skip to content

Instantly share code, notes, and snippets.

View devark28's full-sized avatar
Available

Bruce Emmanuel SHIMWA devark28

Available
View GitHub Profile

I'll help you correct and complete your USSD code. Here's a refactored version with proper structure and the express API handler:

import express from 'express';

// Define the menu structure
class MenuItem {
  index: number;
  text: string;
  children: MenuItem[];
<body>
<div class="box" id="one">One</div>
<div class="box" id="two">Two</div>
<div class="box" id="three">Three</div>
<div class="box" id="four">Four</div>
<div class="box">Other</div>
<div class="box">Other</div>
<div class="box">Other</div>
<div class="box">Other</div>
<div class="box">Other</div>
<!-- visualizing flex lines -->
<!-- uncomment the commented out CSS properties one line at a time -->
<body>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<!-- reproducing the flex-wrap effect with grid -->
<!-- resize your window to see the effect -->
<body>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
#!/usr/bin/env python3
# We'll be using docstrings to document our classes and methods
# instead of comments. This is the recommended way to document
# Python code, and it gives your IDE the ability to show you
# the documentation when you hover over a class or method.
class Assignment:
"""
Assignment class
"""
#!/usr/bin/env python3
class Patient:
"""
A class to represent a patient in a hospital.
"""
id = None # (integer) A unique identifier for each patient.
name = None # (string) Name of the patient.
age = None # (integer) Age of the patient.
gender = None # (string) Gender of the patient.
admission_date = None # (string) Date of admission.
class PeopleOnCampus:
__init__(self, name, email, gender, phone_nbr="", occupation="", identification=""):
self.name = name
self.email = email
self.phone_nbr = phone_nbr
self.gender = gender
self.occupation = occupation
self.identification = identification
class Facilitators(PeopleOnCampus):
@devark28
devark28 / space-toilet.py
Last active November 1, 2024 18:55
Toilet class
class Toilet:
occupied = False
ready = True
name = "The Toilet"
def __init__(self, color, name):
self.color = color
self.name = name
def leave(self):
self.occupied = False