This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Normalization for Temi Logistics | |
1. Entities | |
Customers | |
Orders | |
OrderDetails | |
Packages and Collies | |
Dispatchers | |
Routes | |
Van |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ora = require('ora'); | |
const getWeather = require('../utils/weather'); | |
const getLocation = require('../utils/location'); | |
module.exports = async (args) => { | |
const spinner = ora().start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const expect = require('chai').expect; | |
const getLocation = require('../utils/location'); | |
describe('Test Location API', () => { | |
it('expect res type to equal object', () => { | |
return getLocation().then(res => { | |
expect(typeof res).to.equal('object'); | |
}) | |
}); | |
it('expect county code to be NG', () => { | |
return getLocation().then(res => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This gist entail using javascript to implement array multiplier | |
var arrayMulti = [5, 10, 7, 11]; | |
const arrayMap = arrayMulti.map((element) => {return element * 2;}); | |
console.log(arrayMap); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import './dashboard.scss'; | |
import axios from 'axios'; | |
// import './css/jquery.datatables.css'; | |
import env from '../../env'; | |
import InfiniteCalendar from 'react-infinite-calendar'; | |
import 'react-infinite-calendar/styles.css'; // only needs to be imported once |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let shoppingingcart = require("./ShoppingCart.js"); | |
let items = function(name, price) { | |
this.name = name; | |
this.price = price; | |
}; | |
let Oranges = new items("oranges", 10); | |
let Bananas = new items("Bananas", 10); | |
let Rice = new items("Rice", 10); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"Abia": [ | |
"Aba North", | |
"Aba South", | |
"Arochukwu", | |
"Bende", | |
"Ikwuano", | |
"Isiala-Ngwa North", | |
"Isiala-Ngwa South", |
OlderNewer