Skip to content

Instantly share code, notes, and snippets.

View nonsocode's full-sized avatar
🖖
I want it so i get it

Chinonso Chukwuogor nonsocode

🖖
I want it so i get it
View GitHub Profile
@nonsocode
nonsocode / n-select.vue
Last active August 2, 2018 21:58
A simple multi select Component for Vuejs
<template>
<div class="n-select" :class="{'is-small' : small, opened: list}" ref="nSelect">
<div class="over-con">
<div class="search-container" ref="searchContainer" @click.stop="openAndSearch">
<template v-if="multiple">
<div class="selected-item" v-for="val in selected" :key="trackBy ? val[trackBy] : val" >
<span class="text">{{label ? val[label] : val}}</span>
<button class="close" @click="removeItem(val)">&times;</button>
</div>
</template>
@nonsocode
nonsocode / n-errorbag.js
Created August 9, 2018 13:19
A simple Frontend Validation Error bag meant to work with Laravel validation
class ErrorBag {
constructor(errors = {}) {
this.setErrors(errors);
}
hasErrors() {
return !!this.keys.length;
}
get keys() {
@nonsocode
nonsocode / time_excercise.md
Last active November 24, 2022 21:45
Time complexity

Q1.

def f():
	int a[N + 1][M + 1][K + 1]
	sum = 0
	for i = 1 to N:
		for j = i to M:
			for k = j to K:
				sum += a[i][j]
	print(sum)