Design a site like this with
Get started

9th day of traninig

Today I start learning codeIgniter MVC framework.

CodeIgniter is a PHP MVC framework for developing applications rapidly. CodeIgniter provides out of the box libraries for connecting to the database and performing various operations. Like sending emails, uploading files, managing sessions, etc.
Today I install codeIgniter Framework and learn it work flow which consist of model, views and Controller and routing basics.


5th day of Training

Today, I start learning web development, concept related to it and languages required to build web apps.
As I need make Multilevel Leave approval System, that is based on Jorani a open source leave management system made in php/mysql.

Language used in it are PHP, MYSQL, HTML. Framework used are Bootstraps, CodeIgniter MVC PHP framework, jquery library ,Datatables library.

Therefor I start learning Php from today by referring w3school.
Todays learning:-

Today I learn php syntax, Datatypes, Operators,Conditional statements, Looping statements and practice program of these concepts.

Day 4 : 6-06-2019

Today I start learning about DNS as I am facing some problem related to domain name and wildcard domain while dealing sandstorm .

Thus I come to know different terms related DNS as following.

  • Domain Name System

The domain name system, more commonly known as "DNS" is the networking system in place that allows us to resolve human-friendly names to unique addresses.

  • Domain Name

A domain name is the human-friendly name that we are used to associating with an internet resource. For instance, "" is a domain name. Some people will say that the "google" portion is the domain, but we can generally refer to the combined form as the domain name.

The URL "" is associated with the servers owned by Google Inc. The domain name system allows us to reach the Google servers when we type "" into our browsers.

  • IP Address

An IP address is what we call a network addressable location. Each IP address must be unique within its network. When we are talking about websites, this network is the entire internet.

IPv4, the most common form of addresses, are written as four sets of numbers, each set having up to three digits, with each set separated by a dot. For example, "" could be a valid IPv4 IP address. With DNS, we map a name to that address so that you do not have to remember a complicated set of numbers for each place you wish to visit on a network.

  • Top-Level Domain

A top-level domain, or TLD, is the most general part of the domain. The top-level domain is the furthest portion to the right (as separated by a dot). Common top-level domains are "com", "net", "org", "gov", "edu", and "io".

Top-level domains are at the top of the hierarchy in terms of domain names. Certain parties are given management control over top-level domains by ICANN (Internet Corporation for Assigned Names and Numbers). These parties can then distribute domain names under the TLD, usually through a domain registrar.

  • Hosts

Within a domain, the domain owner can define individual hosts, which refer to separate computers or services accessible through a domain. For instance, most domain owners make their web servers accessible through the bare domain ( and also through the "host" definition "www" (

You can have other host definitions under the general domain. You could have API access through an "api" host ( or you could have ftp access by defining a host called "ftp" or "files" ( or The host names can be arbitrary as long as they are unique for the domain.

  • SubDomain

A subject related to hosts are subdomains.

DNS works in a hierarchy. TLDs can have many domains under them. For instance, the "com" TLD has both "" and "" underneath it. A "subdomain" refers to any domain that is part of a larger domain. In this case, "" can be said to be a subdomain of "com". This is typically just called the domain or the "ubuntu" portion is called a SLD, which means second level domain.

Likewise, each domain can control "subdomains" that are located under it. This is usually what we mean by subdomains. For instance you could have a subdomain for the history department of your school at "". The "history" portion is a subdomain.

The difference between a host name and a subdomain is that a host defines a computer or resource, while a subdomain extends the parent domain. It is a method of subdividing the domain itself.

Whether talking about subdomains or hosts, you can begin to see that the left-most portions of a domain are the most specific. This is how DNS works: from most to least specific as you read from left-to-right.

  • Fully Qualified Domain Name

A fully qualified domain name, often called FQDN, is what we call an absolute domain name. Domains in the DNS system can be given relative to one another, and as such, can be somewhat ambiguous. A FQDN is an absolute name that specifies its location in relation to the absolute root of the domain name system.

This means that it specifies each parent domain including the TLD. A proper FQDN ends with a dot, indicating the root of the DNS hierarchy. An example of a FQDN is "". Sometimes software that calls for FQDN does not require the ending dot, but the trailing dot is required to conform to ICANN standards.

  • Name Server

A name server is a computer designated to translate domain names into IP addresses. These servers do most of the work in the DNS system. Since the total number of domain translations is too much for any one server, each server may redirect request to other name servers or delegate responsibility for a subset of subdomains they are responsible for.

Name servers can be "authoritative", meaning that they give answers to queries about domains under their control. Otherwise, they may point to other servers, or serve cached copies of other name servers’ data.

  • Zone File

A zone file is a simple text file that contains the mappings between domain names and IP addresses. This is how the DNS system finally finds out which IP address should be contacted when a user requests a certain domain name.

Zone files reside in name servers and generally define the resources available under a specific domain, or the place that one can go to get that information.

  • Records

Within a zone file, records are kept. In its simplest form, a record is basically a single mapping between a resource and a name. These can map a domain name to an IP address, define the name servers for the domain, define the mail servers for the domain, etc.

6 Week Training Dairy

Day 1 :3-06-2019

  • 9.00 am to 11.00 am

solid modaling with pyhton traning

  • 11.00 am to 12.00am

reading about sandstorm and it documentation

  • 12.00 pm to 2.00pm

understading and implement code of game of life

  • 2.00 pm to 4.00 pm

solid modeling with python traning

  • 4.00pm to 6.00 pm

installing and configuring sandstorm server as developing server as


    • 9.00 am to 11.00 am

solid modeling with python traning

      • 11.00 am 12.00 pm

Configuring outbound email using smtp host so that user can login to sandstorm server using email and invitation email can be send to new user . And reading thread Sandbox on CSE server on GreatDevelopers Group

      • 12.00 pm to 2.00

Installing sandstorm with sub domain so that sandstorm server can be accessed on internet setup link not working error occur

      • 2.00am to 3.00 am

        solid modeling with python

      • 3.00 pm to 6.00 pm

        Trying to resolve reason behind setup link not working error and finding the solution for it .

        REASON FOR ERROR : SANDSTORM SERVER will * not work online from an local IP in organization’s network.

        *unless your organization provide you an hostname to resolve IP .

Solution : you need a public IP to run server as subdomain of OR you need a domain name .


      • 9.00am to 10.00am

        solid modling with python

      • 11.00 am to 1.30 am

trying to install sandstorm on exp server .

    • 2.00pm to 5.00 pm

      learning how to secure sandstorm server domain name ie. converting http to https usind SSL certificate .

Draw a rotating triangle by using JavaScript.


In this post you can learn how to draw a rotating triangle on canvas by using HTML and JavaScript. And design it with CSS.

Firstly user enter length of perpendicular , base and angle to rotate triangle as input.        As shown below:emptycanvas In output user get a triangle on canvas and hypotenuse, area and perimeter of triangle in next block. As shown below:                        filledcanvas So lets make it,

Drawing Triangles

First, make sure you have a canvas element defined in your HTML page, and give it an id of myCanvas. To help you out with this, here is what my HTML looks like:

<!doctype html>
<div id=”header” >
<h1><i> DRAW TRIANGLE </i></h1>
<div class=”canvas”>
<canvas id=”myCanvas”>
<div class=”input”>
<label>Enter length of base</label>
<input type=”text” id=”userInputx”=></input>
<label>Enter length of perpendicular</label>
<input type=”text” id=”userInputy”=></input>
<label>Enter angle to rotate triangle</label>
<input type=”text” id=”userInputr”=></input>
<button onclick=”test()”>Submit</button>
<p id=”detail” ></p>
<div class =”footer”>
<h3><i>Made by SHIV CHARAN</i></h3>


It is inside this canvas element we will draw our triangle.

Brief Intro to Canvas

The canvas element allows you to programatically place pixels on the screen. It does all of this by expecting you to specify simple (and often tedious) draw commands that mimic the path a pen would take on a piece of paper

The way you draw a triangle is by putting into code the following steps:

  1. Declare your intent to draw lines so that the canvas knows what to expect
  2. Move your virtual pen to to the x and y co-ordinate where you wish to start drawing the triangle
  3. With your virtual pen at the starting point, use the lineTo method to draw lines between two points.
  4. Specify the fill color, line color / thickness, etc. to adjust how your triangle looks

Inside the script tag, add the following lines of code:

function test()

var uIx = document.getElementById(“userInputx”).value;

var uIy = document.getElementById(“userInputy”).value;
var uIr= document.getElementById(“userInputr”).value;

var canvasElement = document.querySelector(“#myCanvas”);
var c=Math.sqrt(Math.pow(uIx,2)+Math.pow(uIy,2));
var context = canvasElement.getContext(“2d”);

// the triangle

context.moveTo(5, 5);


context.lineTo(uIx*30, uIy*30);


// the outline

context.lineWidth = 5;

context.strokeStyle = ‘#000000’;


// the fill color

context.fillStyle = “#FF0000”;


var area=uIy*uIx/2;
var para= parseInt(uIx) +parseInt(uIy) +parseInt(c);
var p=document.getElementById(“detail”);

p.innerHTML=”Value of hypotenous is “+c+”. Area is “+area+” .Perimeter is “+para ;

To  style our HTML let design it with CSS, to do so ,add the following line of code in style teg of html;

h1{background-color: #ff0000;text-align: center;border-radius: 10px;border:2px solid black;}
div.canvas{ border:2px solid black;margin: 2%; border-radius: 10px; width:default; overflow: scroll; background-color:;}
div.input{padding: 2%;background-color: #ff0000; border-radius: 10px;border:2px solid black;}
label{display: inline-block;font-family: arial;color: #000000;width: 48%;}
input{width: 48%;border-radius: 10px;border:2px solid black;padding: 1px;}
button{background-color: white;width: 96%;font-family: arial;margin-top: 2%;border-radius: 10px;border:2px solid black;float: middle;}
#header{padding: 5px; border: 5px double #000000;border-radius: 10px;}
#myCanvas{ overflow: scroll;text-align: center;text-overflow: scroll;}
p{background-color: white;border-radius: 10px;border:2px solid black; font-family: arial;padding: 2%;text-align: center;text-indent: 3px;}
div .footer{background-color: black;color: #ff0000;font-family: arial;text-align: center;padding:2%;height: 10%;border-radius: 10px;}

Now, Let’s look at how the lines of code we have written (javascript)map to the triangle that you see on the screen. Starting at the top…

var uIx = document.getElementById(“userInputx”).value;

var uIy = document.getElementById(“userInputy”).value;
var uIr= document.getElementById(“userInputr”).value;

These two line of code store input length of perpendicular , base and angle in variable uIx and uIy and uIr respectively.

var canvasElement = document.querySelector(“#myCanvas”);
var context = canvasElement.getContext(“2d”);

These two lines are a mainstay at the top of almost every canvas-related code you will be dealing with. The first line gets a pointer thecanvas element in our HTML. The second line gets you access to the canvas element’s context object that allows you to actually draw things into the canvas.


The first line calculate the hypotenuse of triangle and other provide appropriate size to canvas.


First line create another canvas at coordinate (c*30,c*30) to provide area to rotate triangle.And second line rotate the triangle.

// the triangle

context.moveTo(5, 5);


context.lineTo(uIx*30, uIy*30);


Because these lines are crucial to drawing our triangle, I’m going to slow down and dive into greater detail on what each line does.

The first line sets it all up:


The beginPath method signals to the canvas that you intend to draw a path. I know that is a very unsatisfying explanation, but I never said this line of code was deep and full of meaning. It will hopefully make more sense as we look at the rest of the lines

The next line defines where to start our path from:


That is handled by the moveTo function which takes an x and y co-ordinate value. In our case, we are going to be starting the path from a horizontal and vertical position of 5:

starting point

With the starting point set, it’s time to start drawing the lines that make up our triangle:


The first lineTo function draws a line from our starting point of (5,uIy*30) to (uIx*30, uIy*30);

the first line is upon us

The second lineTo function picks up from where the pen currently is and draws a line from (, 300) to (300, 300):

another line bites the dust

Right now, we have an L shape that isn’t quite a triangle. To make this a triangle, we need to close this path by drawing a straight line from where we are back to the beginning.


The closePath() method tells your pen to draw a line back to the starting point.