Skip to content

Instantly share code, notes, and snippets.

View emmsdan's full-sized avatar
💫
. if you can you think? then I can build it...

Emmanuel Daniel emmsdan

💫
. if you can you think? then I can build it...
View GitHub Profile
const App = () => {
const [word, setWord] = React.useState('');
const [array, setArray] = React.useState([]);
function isPal(word) {
return word.split('').reverse().join('') === word;
}
function setValue (evnt) {
setWord(evnt.target.value)
}
// 1. Given an array arr and a number N, find a pair (x,y) such that x+y=N. Return null if it doesn’t exist.
// 2. Find the sum of continuous subarray within a one-dimensional array of numbers that has the largest sum.
// 1....
function isPairInArray(arr, n) {
for (let i=0;i < arr.length; i++) {
for (let j=1; j < arr.length; j++) {
@emmsdan
emmsdan / backend.js
Last active October 22, 2021 22:37
Basic things a backend nodejs Dev should know
// build any express app that shows backend skills
const skills = [
'deep database knowledge',
'deep security knowledge',
'deep testing (unit, integrated, and e2e)',
'worker_thread and clusters',
'networking'
]
@emmsdan
emmsdan / business-categories.json
Created November 11, 2020 13:33
About 3500 + business categories
[
"Abbey"
, "Aboriginal and Torres Strait Islander Organisation"
, "Aboriginal Art Gallery"
, "Abrasives Supplier"
, "Accountant"
, "Accounting Firm"
, "Accounting School"
, "Accounting Software Company"
// <Route exact path="/staff/:staffId/:type" Component={StaffReference} />
// type == personal or work
// GET: /api/v1/get-refer/:staffId/:type
const { staffId, type } = req.params;
let findRef;
if (type === 'personal'){
findRef = await PersonalReference.findOne({ where: { staffId }});
function generateKeyPad (options, callback) {
const btnSize = {
button: (options.size === 1 ? '15%' : options.size === 2 ? '20%' : '32%') + ' !important',
clear: (options.size === 1 ? '31%' : options.size === 2 ? '41%' : '32%') + ' !important'
}
// Define stylesheet
const styleSheet = `
.input-container {
width: 100% !important;
display: flex !important;
@emmsdan
emmsdan / cloudSettings
Last active December 14, 2019 08:54
settings for my vscode
{"lastUpload":"2019-12-14T08:54:20.796Z","extensionVersion":"v3.4.3"}
const features = [
'can record video',
'can upload video to cloud',
'can search video',
'can start, stop and switch video outputs'
]
const screens = {
type: ['galary', 'analyst']
}
@emmsdan
emmsdan / cookie.io.ts
Last active June 13, 2019 09:13
simple application that allows people to add evidence of completion before a task is marked as completed.

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites