Generic Recycleview with Adapter in Kotlin

Now I will show you how to use Generic RecycleView for different View Types. First of creating Generic Recycleview Adapter (GenericAdapter) class as below. import android.support.v7.widget.RecyclerView import android.view.LayoutInflater import android.view.View import android.view.ViewGroup abstract class GenericAdapter : RecyclerView.Adapter { var listItems: List constructor(listItems: List) { this.listItems …

Finding location within the certain range of Latitude & Longitude using Node.js and MongoDB

In this post, I will explain by example how we can find nearest locations by given latitude and longitude with MongoDB. First step – Create schema:  // create geolocation Schema const GeoSchema = new Schema({    type: {        type:String,       …