Koffee With Kode

Simplify Programming...

Mongoose find to match id with values stored as comma separated string
Mongoose find to match id with values stored as comma separated string

Mongoose query (find) to match id with values stored as comma separated string in MongoDB Assuming that we have stored the values into db is like [ { "tags": "fun,game,reading,photography" }, { "tags": "politics,game,workout,photography" }, { "tags": "programming,photography,business" } ] Model: Customer Customer.find({$where : 'this.categoryid.indexOf("' + categoryId + '") != -1'}); Originally posted Here

Git cheatsheet for beginners
Git cheatsheet for beginners

Git cheatsheet for beginners Now days git is a very useful and powerful skill to have and almost necessary in many development companies. getting job offers for software developers, you may realize that knowing git is nearly as important as knowing an actual normal programming language. But still many people forget to check out how... » read more

Sketch 2 Code – Hands-drawn design into a HTML
Sketch 2 Code – Hands-drawn design into a HTML

Sketch 2 Code – Transform any hands-drawn design into a HTML code with AI. Now days sometimes, we are fast forwarding for getting the new ideas and business. For showing to our client/managers by just hand written sketch is not worthy, We have to create a at least a simple design may be sometime with... » read more

Fast Excel : Best Package for Import/Export for Laravel
Fast Excel : Best Package for Import/Export for Laravel

Fast Excel import/export for Laravel This is one of the my favorite package for import excel or export to excel very fast with a very less code. A Very big thanks to the creator of this package. Credits: Spout Quick start Install via composer: composer require rap2hpoutre/fast-excel Export a Model to .xlsx file: use Rap2hpoutre\FastExcel\FastExcel;... » read more

Emoji are not inserting in database node js mysql
Emoji are not inserting in database node js mysql

When we are using MySQL database, now days we need to integrate the smileys [Emoji] for any description or status texts. Let’s an example that we need to save user bio into mysql database, then we can store emoji into status just like WhatsApp is storing the emoji into status or any description where user... » read more

React Hooks Quick Introduction
React Hooks Quick Introduction

React Hooks are added in React 16.8. we can use state and other React features without writing a class. On this above example we will create a small task. When Click on Click to increase count button then current value will be increased and same as when Click on Click to decrease count button then... » read more

Simple Tree View | Hierarchy Structure for React JS
Simple Tree View | Hierarchy Structure for React JS

We will use react-animated-tree npm package for react js, can be used for react hierarchy structure. Link : react-animated-tree content, Name of the node (string or React-component) type, optional description, good for displaying icons, too (string or React-component) open, optional: default open state canHide, optional: when set true displays an eye icon visible, optional: default... » read more