Posts

Showing posts from September, 2018

Kendo Grid Integration Using jQuery

Image
Kendo Grid Integration Using jQuery
Introduction In this article, we will learn about the very powerful Kendo Grid by Telerik that provides rich inbuilt features with less coding. We integrate the kendo grid using jQuery. Kendo can be used with any modern technology, such as  - ASP.ET WebForm, ASP.NET MVC, .NET Core MVC, Node.js, PHP etc. Prerequisites
Visual Studio Code or any Text EditorWeb Service or Web API For this demo, I have used the web service created and hosted by Telerik. Source code for this web service is open source that you can review on GitHub as well.

NoteKendo Grid is a licensed version.

DescriptionAs we know, each and every application requires any tabular format to display small or large data with basic functionality, like Grid with Sorting, Filtering, Paging etc.

Here, the Kendo Grid provides the above functionality along with other advanced and powerful inbuilt features as mentioned below. Column ReorderingColumn ResizingExcel-Like filter menu which contains(Start With…

Web scrapping using cheerio js in nodejs

Image
Learn Web scrapping using cheerio js in node jsIntroductionIn this article, we learn how to do web scraping using cheerio js in node js server side.Description
cheerio.jsisthe Fast, flexible, and lean implementation of core jQuery designed specifically for the server. It means we can fetch/request any page from a server-side and retrieve element using valid CSS selectors same way we can use jQuery.
Prerequisite Node or npm must be installed in your machineInstall node-fetch and cheerio in node projectHow to setup and Installation of web scrapping project
npm init (Create node application)npm install node-fetch cheerio --saveTo usage of a cheerio, js see below cheerio-sample.js file 


As per the above code first, of all load cheerio module and then use jquery like selector to get specific
element.

Using cheerio. js, I have created c-sharp corner Blogs, Articles, News statistics as per sites and also generated c-sharp corner statics dashboard.

I have attached code snippet for web scraping of c-sh…

Display code snippet in blogger

Image
IntroductionIn this article, we learn about an easy way to Display or add code snippet/Samplein Blogger article and highlight different types of language code snippet using GitHub code or gist code.Description
To display code in an article or to highlight code in blogger or in any other
blogging platform you can use Github Gist, I found this way is very easy which 

doesn't depend on any external highlighting javascript library or CSS library.

Step 1Here you can create any public gist for code snippet for javascript (.js),
Csharp(.cs), shell script (.sh) etc So it can be loaded in an article.

Once you saved gist file one link or Embed option is displayed on a gist as per
below screenshot.



Step 2 Copy Embed Link or gist link and paste that embed code link in Article's in HTML mode
not in compose mode. I have attached a screenshot for blogger article as below. 



Step 3  Once you have added embed script in blogger article you can see a preview of code
the snippet which rendered as below scree…

How To Create And Publish npm Package

Image
How To Create And Publish npm PackageIntroduction
In this article, we will learn about easy steps for creating and publishing your javascript or node js utility package to npm package repository.

How did I get the idea for creating and publishing of npm packages?
Actually, I was working on creating a dashboard with charts. As most library charts have their own convention for passing data to generate charts e.g. tui-chartshighcharts etc. while preparing data I had to rename some keys as per the required convention. I have to rename multiple keys from an array of an object. In C# or Dot Net, you have probably heard about the term "DTO - Data Transfer Object" or Automapper which provides this functionality in which it converts one class to another class type with required fields. Here, I have searched for javascript and JSON utility library using underscore js and lodash as well, but I didn't find any solution,  so I created a utility function and published it on npm. So I c…