Skip to content

Instantly share code, notes, and snippets.

I love coding

Oyetoke Toby CITGuru

I love coding
Block or report user

Report or block CITGuru

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile




route: /login method: POST

Request Body

CITGuru / List.js
Created Aug 15, 2019
List Component
View List.js
import React, { useState, useEffect } from "react";
import axios from "axios";
const List = () => {
const url = "";
const [data, setData] = useState([]);
useEffect(() => {
axios.get(url).then(res => {
View app.js
const data = [
{name:"Oyetoke Toby", age:20, job_title:"Software Engineer", country:"Nigeria", gender:"male"},
{name:"Apata Dorcas", age:21, job_title:"Makeup Stylist", country:"Nigeria", gender:"female"},
{name:"Jonh Doe", age:22, job_title:"Graphic Designer", country:"US", gender:"male"},
{name:"Leke Oyetoke", age:30, job_title:"IT Manager", country:"Nigeria", gender:"male"},
const App =() => {
return (
View UserInformation.js
import React from 'react'
import PropTypes from 'prop-types'
const UserInformation = props => {
const {
} = useModalWithData()
View UserDetail.js
import React from 'react'
import PropTypes from 'prop-types'
function UserDetail(props) {
const { data } = props
if (!data) return null
return (
<h4>Name: {}</h4>
<h4>Age: {data.age}</h4>
View UserTable.js
import React from 'react'
import PropTypes from 'prop-types'
function UserTable(props) {
const { data, setSelected, setModalState } = props
return (
View useModalWithData.js
export const useModalWithData = (
initialMode = false,
initialSelected = null
) => {
const [modalOpen, setModalOpen] = useModal(initialMode)
const [selected, setSelected] = useState(initialSelected)
const setModalState = state => {
if (state === false) {
View app.js
const App = ()=>{
const [itemModalOpen, setItemModalOpen, toggleModal] = useModal()
return (
<div className="App">
<button onClick={toggleModal}>Show Modal</button>
title="Item Modal"
handleClose={() => setItemModalOpen(false)}
View modals.js
import React from 'react'
import PropTypes from 'prop-types'
import {
} from 'bloomer'
View foobarchallenge.go
package main
import "fmt"
In order to destroy Commander Lambda's LAMBCHOP doomsday device, you'll need access to it. But the only door leading to the LAMBCHOP chamber is secured with a unique lock system whose number of passcodes changes daily. Commander Lambda gets a report every day that includes the locks' access codes, but only she knows how to figure out which of several lists contains the access codes. You need to find a way to determine which list contains the access codes once you're ready to go in.
Fortunately, now that you're Commander Lambda's personal assistant, she's confided to you that she made all the access codes "lucky triples" in order to help her better find them in the lists. A "lucky triple" is a tuple (x, y, z) where x divides y and y divides z, such as (1, 2, 4). With that information, you can figure out which list contains the number of access codes that matches the number of locks on the door when you're ready to go in (for example, if there's 5 passcodes, you'd need to find a
You can’t perform that action at this time.