Skip to main content

Posts

Best way to represent Many-to-many, One-to-many, and many-to-multiple relationship

Visualization is the best part to show many-to-multiple, many-to-many and one-to-many. Definitely, it will help us understand complex data in the right direction. It will help us to make presentations and dashboards. Simple to understand. And it is not difficult or you shouldn't need to learn new things. There are many communities to help you. I prepared this article with the help of  D3.JS Example -  1                               Demo           Download Example - 2                               Demo         Download

Business hours calculation using PHP

Most of ticketing alert projects needed SLA calculation to exclude holidays and weekends or Off business hours. First of all, let us take a look at types of SLA we need to calculate. For instance, few companies will work 24/7 shifts and 8x5, 8x7 etc. So we need to consider business hours. In this example, I'm considering business hours which starts at 09:00 AM and ends at 06:00 PM. Also, using this code we can calculate 24/7 too. Let's consider business hours started at 9:00 AM to 18:00 PM without weekends. Now, take the actual work start period and end period.                                                       Demo <?php $incident_work_started = '2018-09-12 09:28:07'; $incident_work_ended = '2018-09-19 17:45:00'; $totalHours = round(get_working_hours($incident_work_started,$incident_work_ended),2)."\n"; e...

What are the differences between Angular Js, Angular 2 and Angular 4?

 Angular Js was introduced in 2010 as a javascript framework for building client applications So it came into popularity. And angular team started adding new features to the core. But the framework is designed with needs up to date applications in might plus it was overly complex. So, the Angular team decided to write the original framework using typescript. As a result, Angular 2 came out in may 2016.     This new version entirely different from angular 1. This made a lot of developers unhappy 😕.  Because numerous applications built with Angular 1. Each application over a few thousand lines of code has to be written. So Angular Team took typescript. Now, this is a much better framework and it is easier & very clear to understand to work with.  After a few minor upgrades in Angular 2 such as 2.1, 2.2, and 2.3, a sudden update came into existence i.e Angular 4.Again all developers got confused 😞 including me. Then what happened to Angular 3 😨....

AngularJS - Directives

First, we have to learn AngularJs directives, Directives are simple special attributes in HTML. It has own set of built-in directives which offers functionality to your applications. To check all directive list https://docs.angularjs.org/api/ng/directive  For example, I take ng-app , ng-model ,  ng-init and ng-bind .  First will talk about the ng-app directive, the ng-app directive is initializing the AngularJS application. To take the values of all HTML inputs ( input, radio, select and textarea ) we use the ng-model.     ng-bind is print the expression. we can also be written inside double braces: {{ expression }} . AngularJS - Directives Example 1  Note: All these directives are work in inside the ng-app closed tag. you can assign ng-app directive to any tag. like <HTML>, <DIV>, <SPAN> but make sure initialize the main parent tag.     Now, We can check data initializes before page load. For this, ...

What is AngularJS?

AngularJs is nothing but an MVC style javascript framework for creating single page apps. It is a javascript framework or we can say  "A framework will build client applications in HTML, CSS and Javascript/Typescript" This should be added within HTML  <script> tag. <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.2/angular.min.js"></script> Angular Js mainly used to make a single page, data-driven application. As well as we can add additional content brought into the web page without the need to refresh. Before going to AngularJS, We should know the     HTML     CSS     JavaScript     Json (optional)  Benefits of using angular Js     Gives our applications a clean structure     Includes a lot of re-usable code     Makes our applications more testable      Using Angular makes your life easier!   Let's Start learning with ...

D3 tree chart

D3.js is a JavaScript library for controlling records in view of information. D3 encourages you to breathe life into information utilizing HTML, SVG, and CSS. D3's accentuation on web principles gives you the full capacities of present-day programs without binds yourself to a restrictive structure, consolidating ground-breaking representation parts and an information-driven way to deal with DOM control. Here I'm going to show of D3 Tree chart. D3 Tree chart helps you go in-depth of child roots. DEMO Download <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>JS Bin</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="//d3js.org/d3.v3.min.js"></script> <style> .node { cursor: pointer; } .overlay{ ...