Skip to content

Instantly share code, notes, and snippets.

View Unalo's full-sized avatar
🎯
Focusing

Unalo Unalo

🎯
Focusing
View GitHub Profile

Expense Tracker

Create an expense tracking up that allows a user to enter daily, weekly and monthly expenses and show an expense total for the month.

  • Monthly * 1
  • Weekly * 4
  • Weekday * 4
  • Weekend * 2
  • Once-off * 1
  • Daily * 30
@Unalo
Unalo / data.md
Last active February 22, 2023 06:54
student data structure
const studentsMarks = [
  { id: 1, name: 'John', english: 80, grade: 12 },
  { id: 2, name: 'Jane', english: 75, grade: 12 },
  { id: 3, name: 'Bob', english: 90, grade: 12 },
  { id: 4, name: 'Alice', english: 85, grade: 12 },
  { id: 5, name: 'Sam', english: 70, grade: 12 },
  { id: 6, name: 'Sara', english: 95, grade: 12 },
  { id: 7, name: 'Tom', english: 60, grade: 12 },
  { id: 8, name: 'Eva', english: 82, grade: 12 },
@Unalo
Unalo / workshop-template.md
Last active February 16, 2023 13:14
Suggested workshop template for Algorithms

Check-in

  • What comes to mind when you hear the word Algorithm?
  • Why do you think algorithms are important?
  • What algorithms you have used before? (Call out)
  • Google
  • If you were to compare Algorithms to plant which plant would it be? why?

Share on AWD group on slack

What we will look at

@Unalo
Unalo / pizza.md
Last active March 23, 2022 12:26

You are required to create a web app, to help local Municipality to track electricity usage per household. Each month the Municipality gives Household's 50 units each. As you use appliances, units will drop accordingly. If the units per household is equal or below 30, add a class warning into your current units.

In your app you must have the following.

  • Be able to top up teriffs.
  • Electricity usage, buy choosing a appliance.
  • Calculate total usage per household.
  • Calculate total usage per street (5 Houses makes a street)
  • Calculate the lowest usage per house in a street.
  • Calculate the highest usage per street.

WakaTime makes coding time tracking fully automatic for every programmer. It gives powerful insights about how you code, and let you get back to what matters most: creating amazing software!.

Add wakatime on VsCode

  • Open VsCode and press Ctrl + Shift + X
  • search for Wakatime
  • Find Wakatime in the results, then click Install
  • Restart VsCode.

Now let's setup Wakatime

Eslint For VsCode

ESLint is a tool for formatting (linting) your code. It analyze your code and warn you of any potential errors. In order for it to work, you need to configure it with specific rules. Luckily, Standard provides an ESLint configuration that anyone can use.

  1. First we need to install Node.js
  2. Inside your current project. Initialize npm configuration. Using this command. npm init -y
  3. Now enable support for linting common JavaScript features. Paste this in your terminal
    • npm i -D eslint eslint-config-standard eslint-plugin-import eslint-plugin-node eslint-plugin-promise eslint-plugin-standard
  4. Now create a .eslintrc.js file, use this command touch .eslintrc.js
package SwitchExamples;
public class TestExample {
public static void main(String[] args) {
int a[] = {1, 2, 3};
int day = 0;
for (int p : a) {
switch (p) {