Skip to content

Instantly share code, notes, and snippets.

View tbanj's full-sized avatar
💥
Available for remote work or onsite

Alabi Temitope Wahab tbanj

💥
Available for remote work or onsite
View GitHub Profile
@tbanj
tbanj / pausework_er_diagram.JPG.JPG
Last active April 23, 2019 08:52
Pausework Database Model
pausework_er_diagram.JPG.JPG
@tbanj
tbanj / tommorow.js
Last active April 16, 2019 13:29
api call for next day weather through the use of openweatherapi
const ora = require('ora');
const getWeather = require('../utils/weather');
const getLocation = require('../utils/location');
module.exports = async (args) => {
const spinner = ora().start();
@tbanj
tbanj / hashtable_wth_object.js
Last active April 11, 2019 05:22
Function to find the duplicates in an array using a hash table
/*
Write a function to find the duplicates in an array using a hash table. Your function should accept an array as an argument,
and return the total number of duplicates in the array.
Hash table is like a bucket -=
Represented as an empty array in this case e.g
harshCheck = [];
O(1) time is from Big O Notation which Big O Notation is use to talk about about how long an algorithm takes to run
With Big O Notation we express the runtime in terms of — how quickly it grows relative to the input, as the input gets larger.
@tbanj
tbanj / gist:a00642e659fa329120fea94a915463a9
Created April 3, 2019 12:48
Normalization for Temi Logistics
Normalization for Temi Logistics
1. Entities
Customers
Orders
OrderDetails
Packages and Collies
Dispatchers
Routes
Van
@tbanj
tbanj / gist:1cc78209225b117295cbb6e958590272
Created April 3, 2019 05:24
Mastering Database query of complex table
List out host who offer private rooms services only and arrange the results in ascending order by host name.
SELECT host_name FROM levelup_temitope.listings WHERE room_type ="Private room" ORDER BY host_name ASC;
List out rooms whose prices range between 50 and 100
SELECT room_type FROM levelup_temitope.listings WHERE price BETWEEN 50 AND 100;
List out private rooms that can accommodate 2 or more people.
SELECT room_type FROM levelup_temitope.listings WHERE room_type= "Private room" AND accommodates >=2;