Search

23 September, 2017

What is. NET Framework? What is the main components of.NET Framework?

 What is. NET Framework? 
programming infrastructure created by Microsoft for building, deploying, and running applications and services that use .NETtechnologies, such as desktop applications and Web services.
The .NET Framework contains three major parts:

 What is the main components of.NET Framework?

(1) Common Language Runtime or CLR

It performs memory management, exception handling, debugging, security checking, thread execution, code execution, code safety, verification, and compilation. The code that is directly managed by the CLR is called the managed code. When the managed code is compiled, the compiler converts the source code into a CPU independent intermediate language (IL) code. A Just In Time(JIT) compiler compiles the IL code into native code, which is CPU specific.

(2) .Net Framework Class Library

It contains a huge library of reusable types. classes, interfaces, structures, and enumerated values, which are collectively called types.

(3) Common Language Specification

It contains the specifications for the .Net supported languages and implementation of language integration.

(4) Common Type System

It provides guidelines for declaring, using, and managing types at runtime, and cross-language communication.

(5) Metadata and Assemblies

Metadata is the binary information describing the program, which is either stored in a portable executable file (PE) or in the memory. Assembly is a logical unit consisting of the assembly manifest, type metadata, IL code, and a set of resources like image files.

(6) Windows Forms

Windows Forms contain the graphical representation of any window displayed in the application.

(7) The Official Microsoft ASP.NET Site and The Official Microsoft ASP.NET Site AJAX

The Official Microsoft ASP.NET Site is the web development model and AJAX is an extension of The Official Microsoft ASP.NET Site for developing and implementing AJAX functionality. The Official Microsoft ASP.NET Site AJAX contains the components that allow the developer to update data on a website without a complete reload of the page.

(8) Web Page is Unavailable

It is the technology used for working with data and databases. It provides access to data sources like SQL server, OLE DB, XML etc. The Web Page is Unavailable allows connection to data sources for retrieving, manipulating, and updating data.

(9) Windows Workflow Foundation (WF)

It helps in building workflow-based applications in Windows. It contains activities, workflow runtime, workflow designer, and a rules engine.

(10)Windows Presentation Foundation

It provides a separation between the user interface and the business logic. It helps in developing visually stunning interfaces using documents, media, two and three dimensional graphics, animations, and more.

(11) Windows Communication Foundation (WCF)

It is the technology used for building and executing connected systems.

(12) Windows CardSpace

It provides safety for accessing resources and sharing personal information on the internet.

(13) LINQ

It imparts data querying capabilities to .Net languages using a syntax which is similar to the tradition query language SQL.


What are the components of the .Net Framework?

- .Net framework provides tools and technologies to develop windows and web applications.

The .Net framework mainly contains two components:

1. Common Language Runtime(CLR)
2. .Net Framework Class Library (FCL)

- It provides the necessary compile and run time foundation to build and run any language.

1. Common Language Runtime(CLR):
- It provides runtime environment.
- It runs all the .Net programs.
- CLR provides memory management and thread management.
- It allocates the memory for scope and deallocates the memory.

2. .Net Framework Class Library(FCL):
- It accesses the library classes and methods.
- It is also called as Base Class Library.
- It is common for all types of application.

Following are the applications in .Net Class Library:
a. XML web services
b. Windows services
c. Windows application 
d. Web applications
e. Console application

3. Common Type System(CTS):
- CTS describes the set of datatypes which is used in different .Net languages.
- It ensures that objects are written in different .Net languages.

It supports two categories of types:

a. Value type:
- It is allocated on the stack or inline in a structure.
- It can be built-in types, user-defined or enumerations.

b. Reference type:
- It stores a reference to the value's memory address and allocated on the heap.
- It can be self-describing types, pointer types or interface types.

4. Common Language Specification(CLS):
- CLS specifies a set of rules.
- It is a subset of CTS.
- CLS helps in cross language inheritance and debugging.
- CLS ensures that the products of compilers will work properly in .NET environment.

Use Cases for Example ATM System


23 July, 2017

Sum of the series S=1+(1+2)+(1+2+3)+(1+2+3+4)+….+(1+2+3+…+n) where the value of ‘n’ is given by the user.

#include<stdio.h>
int main(){
int n,sum,sum1=0,i,j;
printf("Please enter an integer n=");
scanf("%d",&n);
for(i=1;i<=n;i++){
sum=0;
for(j=1;j<=i;j++)
sum=sum+j;
sum1=sum1+sum;
}
printf("The sum of the series=%d\n",sum1);
return 0;
}

31 January, 2017

Difference among domain, workgroup and homegoup

Domains, workgroups, and homegroups represent different methods for organizing computers in networks. The main difference among them is how the computers and other resources on the networks are managed.

In a workgroup:

  • All computers are peers; no computer has control over another computer.
  • Each computer has a set of user accounts. To log on to any computer in the workgroup, you must have an account on that computer.
  • There are typically no more than twenty computers.
  • A workgroup is not protected by a password.
  • All computers must be on the same local network or subnet.

In a homegroup:

  • Computers on a home network must belong to a workgroup, but they can also belong to a homegroup. A homegroup makes it easy to share pictures, music, videos, documents, and printers with other people on a home network.
  • A homegroup is protected with a password, but you only need to type the password once, when adding your computer to the homegroup.

In a domain:

A domain is a form of a computer network in which all user accounts, computers, printers and other security principals, are registered with a central database located on one or more clusters of central computers known as domain controllers.
  • One or more computers are servers. Network administrators use servers to control the security and permissions for all computers on the domain. This makes it easy to make changes because the changes are automatically made to all computers. Domain users must provide a password or other credentials each time they access the domain.
  • If you have a user account on the domain, you can log on to any computer on the domain without needing an account on that computer.
  • You probably can make only limited changes to a computer's settings because network administrators often want to ensure consistency among computers.
  • There can be thousands of computers in a domain.
  • The computers can be on different local networks.

30 January, 2017

short notes

Video RAM (VRAM) means in general all forms of random access memory (RAM) used to store image data for a computer display. All types of video RAM are special arrangements of dynamic RAM (DRAM). Video RAM is really a buffer between the computer processor and the display and is often called the frame buffer. When images are to be sent to the display, they are first read by the processor as data from some form of main (non-video) RAM and then written to video RAM. From video RAM (the frame buffer), the data is converted by a RAM digital-to-analog converter (RAMDAC) into analog signals that are sent to the display presentation mechanism such as a cathode ray tube (CRT). Usually, video RAM comes in a 1 or 2 megabyte package and is located on the video adapter card in the computer. Most forms of video RAM are dual-ported, which means that while the processor is writing a new image to video RAM, the display is reading from video RAM to refresh its current display content. The dual-port design is the main difference between main RAM and video RAM.

An entity relationship model, also called an entity-relationship (ER) diagram, is a graphical representation of entities and their relationships to each other, typically used in computing in regard to the organization of data within databases or information systems. An entity is a piece of data-an object or concept about which data is stored.'


SDLC MODEL: 

Sensor based network:
A wireless sensor network is a group of specialized transducers with a communications infrastructure for monitoring and recording conditions at diverse locations. Commonly monitored parameters are temperature, humidity, pressure, wind direction and speed, illumination intensity, vibration intensity, sound intensity, power-line voltage, chemical concentrations, pollutant levels and vital body functions.
A sensor network consists of multiple detection stations called sensor nodes, each of which is small, lightweight and portable. Every sensor node is equipped with a transducer, microcomputertransceiver and power source. The transducer generates electrical signals based on sensed physical effects and phenomena. The microcomputer processes and stores the sensor output. The transceiver receives commands from a central computer and transmits data to that computer. The power for each sensor node is derived from a battery.

Full form of






CDMA: Short for Code-Division Multiple Access, a digital cellular technology that uses spread-spectrum techniques. Unlike competing systems, such as GSM, that use TDMA, CDMA does not assign a specific frequency to each user. Instead, every channel uses the full available spectrum. Individual conversations are encoded with a pseudo-random digital sequence.
CDMA consistently provides better capacity for voice and data communications than other commercial mobile technologies, allowing more subscribers to connect at any given time, and it is the common platform on which 3G technologies are built.


TDMA: Time Division Multiple Access, a technology for delivering digital wireless service using time-division multiplexing (TDM). TDMA works by dividing a radio frequency into time slots and then allocating slots to multiple calls. In this way, a single frequency can support multiple, simultaneous data channels. TDMA is used by the GSM digital cellular system.

GSM: Global System for Mobile Communications, one of the leading digital cellular systems. GSM uses narrowband TDMA, which allows eight simultaneous calls on the same radio frequency.


GSM was first introduced in 1991. As of the end of 1997, GSM service was available in more than 100 countries and has become the de facto standard in Europe and Asia.

LCD: liquid crystal display, a type of display used in digital watches and many portable computers. LCD displays utilize two sheets of polarizing material with a liquid crystal solution between them. An electric current passed through the liquid causes the crystals to align so that light cannot pass through them. Each crystal, therefore, is like a shutter, either allowing light to pass through or blocking the light.


HDTV (high definition television) is a television display technology that provides picture quality similar to 35 mm. movies with sound quality similar to that of today's compact disc. Some television stations have begun transmitting HDTV broadcasts to users on a limited number of channels. HDTV generally uses digital rather than analog signal transmission. However, in Japan, the first analog HDTV program was broadcast on June 3, 1989. The first image to appear was the Statue of Liberty and the New York Harbor. It required a 20 Mhz channel, which is why analog HDTV broadcasting is not feasible in most countries.



DVD: "Digital Versatile Disc." A DVD is a type of optical media used for storing digital data. It is the same size as a CD, but has a larger storage capacity. Some DVDs are formatted specifically for video playback, while others may contain different types of data, such as software programs and computer files.



LCD:  light emitting diode, an electronic device that lights up when electricity is passed through it. LEDs are usually red. They are good for displaying images because they can be relatively small, and they do not burn out. However, they require more power than LCDs.

EDGE: Enhanced Data GSM Environment. EDGE is a faster version of GSM wireless service. EDGE enables data to be delivered at rates up to 384 Kbps on a broadband. The standard is based on the GSM standard and uses TDMA multiplexing technology.


XML: Extensible Markup Language, a specification developed by the W3C. XML is a pared-down version of SGML, designed especially for Web documents. It allows designers to create their own customized tags, enabling the definition, transmission, validation, and interpretation of data between applications and between organizations.



RAID: was defined as redundant array of inexpensive disks, but now it usually refers to a redundant array of independent disks. RAID storage uses multiple disks in order to provide fault tolerance, to improve overall performance, and to increase storage capacity in a system. This is in contrast with older storage devices that used only a single disk drive to store data.

RAID allows you to store the same data redundantly (in multiple paces) in a balanced way to improve overall performance. RAID disk drives are used frequently on servers but aren't generally necessary for personal computers.


DAT: digital audio tape, a type of magnetic tape that uses a scheme called helical scan to record data. A DAT cartridge is slightly larger than a credit card in width and height and contains a magnetic tape that can hold from 2 to 24 gigabytes of data. It can support data transfer rates of about 2 MBps. Like other types of tapes, DATs are sequential-access media.


26 December, 2016

Euclid's algorithm for finding Greatest Common divisor of two numbers

/*
*Euclid's algorithm for finding Greatest Common divisor of two numbers
Input: Two integers a and b with a>=b>=0
Output: gcd(a,b)
Date: 26/12/2016
*/

#include<iostream>
#include <stdlib.h>

using namespace std;

int gcd(int a, int b){
    cout << a << endl;
    cout << b << endl;

return b == 0 ? a : gcd(b, a % b);
}

int main(){

int a, b;

cout << "Enter value of a: ";
cin >> a;
cout << "\n";
cout << "Enter value of b: ";
cin >> b;

cout << "GCD OF "<< a << " and " << b << " is: " << gcd(abs(a), abs(b));
cout << "\n";

return 0;
}

16 November, 2016

Importants books we should read

১. পিটার থিয়েলের 'জিরো টু ওয়ান' : ডোনাল্ড ট্রাম্পকে সমর্থন দেওয়ার কারণে বেশ সমালোচনার সম্মুখীন হয়েছিলেন পিটার থিয়েল। কিন্তু ভেঞ্চার তৈরিতে নতুন উপায় যোগ করতে তার এ বইটি অনেক কিছু শেখাবে আপনাকে।
২. জিওফ্রি এ. মুরের 'ক্রসিং দ্য চাজম' : বিজনেস-টু-বিজনেস কম্পানি সৃষ্টি করতে চান? কাজ শুরুর আগে এ বইটি পড়ুন।
৩. এরিক রিয়েসের 'দ্য লিন স্টার্টআপ' : ক্রেতাদের চাহিমা মেটাতে আপনি নতুন কোনো ব্যবসা শুরু করতে চান? তাহলে এই বইটি সহায়ক হতে পারে। ক্রেতার দৃষ্টিভঙ্গীর ওপর ভিত্তি করে চটজলদি নতুন উপায় খুঁজে নিতে জ্ঞান দিয়েছে বইটি।
৪. জিফ কনস্টাবলের 'টকিং টু হিউম্যান্স' : কারো মনে সহানুভূতি সৃষ্টির জন্য কিভাবে কথা বলতে হবে তার শিক্ষা দেওয়া হয়েছে বইটিতে। বিজনেস-টু-কনজ্যুমার কম্পানির জন্য আরেকটি অনন্য বই।
৫. স্টিভ ক্রাগের 'রকেট সার্জারি মেড ইজি' : ক্রেতাদের মনোযোগ কাড়ে এমন গুরুত্বপূর্ণ কোনো পণ্য তৈরি করতে চাইলে বইটি পড়তে হবে। কাজটি সহজ করে দেওয়া হয়েছে বইটিতে।
৬. বেন হরোউইৎজের 'দ্য হার্ড থিং অ্যাবাউট হার্ড থিংকস' : দারুণ জনপ্রিয় হয়েছে বইটি। প্রতিষ্ঠান গড়ে তোলার ক্ষেত্রে অনেক অজানা বিষয়ের জানান দিয়েছেন লেখক।

৭. ক্যাল নিউপোর্টের 'সো গুড দে কান্ট ইগনোর' : যারা ক্যারিয়ার বিষয়ক সিদ্ধান্ত নিয়ে হিমশিম খাচ্ছেন তাদের জন্য বইটি বেশ কাজের।


Development and Freedom by Amartya Kumar Sen

21 September, 2016

Install composer in Ubuntu 16.04

Step 1:
Run
$ sudo apt-get update
If this was not done before.
Step 3:
Install wget for file download in ubuntu
$ sudo apt-get install wget
Step 2:
Download the composer.phar from https://getcomposer.org/download via wget or built-in curl
$ wget https://getcomposer.org/composer.phar
or
$ curl -O https://getcomposer.org/composer.phar
** -O is capital O not Zero(0)
Step 3:
Rename composer.phar to composer
$ mv composer.phar composer
Step 4:
Make composer executable
$ chmod +x composer
Step 5:
Now composer can be run locally through
$ ./composer
But this is available where you are i.e. current directory where the composer file is.
Step 6:
Make composer available globally move it to /user/local/bin by
$ sudo mv composer /usr/local/bin
Now composer will be available anywhere by simply
$ composer

LAMP Stack Installation Guide on Ubuntu Server 16.04 LTS

LAMP stack is a collection of free and open source softwares like Linux, Web Server (Apache), Database server (MySQL / MariaDB) and PHP (Scripting Language). LAMP is the platform which is required to install and build dynamic web sites and application like WordPress, Joomla, OpenCart and Drupal.

In this article i will describe how to install LAMP on Ubuntu Server 16.04 LTS, As We know that Ubuntu is a Linux based Operating system, so it provides the first component of LAMP and i am assuming Ubuntu Server 16.04 is already installed on your system.

Installation of Web Server (Apache2) :

In Ubuntu Linux Web server comes with the name Apache2, Use the beneath apt command to install it.
linuxtechi@ubuntu:~$ sudo apt update
linuxtechi@ubuntu:~$ sudo apt install apache2 -y
When Apache2 package is installed then its service is automatically started and enabled across the reboot, In case it is not started and enabled, use the following command :
linuxtechi@ubuntu:~$ sudo systemctl start apache2.service
linuxtechi@ubuntu:~$ sudo systemctl enable apache2.service
linuxtechi@ubuntu:~$ sudo systemctl status apache2.service
If Ubuntu firewall (ufw) is active, then allow the Web Server ports (80 and 443) in firewall using below commands.
linuxtechi@ubuntu:~$ sudo ufw status
Status: active
linuxtechi@ubuntu:~$ sudo ufw allow in 'Apache Full'
Rule added
Rule added (v6)
linuxtechi@ubuntu:~$
Access Web Server now :
Open the Web browser and type the IP Address or Host name of your server (http://IP_Address_OR_Host_Name), In my Case my server IP is ‘192.168.1.13’

Installation of Data Base Server (MySQL Server 5.7) :

MySQL and MariaDB are the database servers in Ubuntu 16.04. MySQL Server and MariaDB Server’s packages are available in the default repositories and we can install either of the database. Run the following apt command to install MySQL Server from terminal.
linuxtechi@ubuntu:~$ sudo apt install mysql-server mysql-client
During the installation, it will prompt us to set the root password of mysql server.

Confirm root password and click on ‘OK’

Installation of MySQL Server is completed Now. MySQL Service will be started and enabled automatically.We can verify the MySQL Server’s service using below systemcl command :
linuxtechi@ubuntu:~$ sudo systemctl status mysql.service
Installation of MariaDB Server :
Use the beneath command to install MariaDB Server 10.0 from the terminal.
linuxtechi@ubuntu:~$ sudo apt install mariadb-server
Run the following command to set root password of mariadb and disable other options like disable remote login.
linuxtechi@ubuntu:~$ sudo mysql_secure_installation

Installation of PHP ( Scripting Language ) :

PHP 7.0 is available in the Ubuntu repositories. Execute the beneath command from the terminal to install PHP 7 :
linuxtechi@ubuntu:~$ sudo apt install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0
Create a sample php page and place it in apache document root (/var/ww/html)
linuxtechi@ubuntu:~$ vi samplepage.php
<?php
phpinfo();
?>
Save and exit the file.
linuxtechi@ubuntu:~$ sudo mv samplepage.php /var/www/html/
Now Access the sample PHP page from the Web Browser, type : “http://<Server_IP>/samplepage.php” , You should get the page like below.

Above Page shows that our PHP installation is completed successfully.

Installation of phpMyAdmin :

phpMyAdmin allows us to perform all the database related administrative and other DB operation task from its web interface. Its package is already listed in the Ubuntu server repositories.
Use the below commands to Install phpMyAdmin on Ubuntu server 16.04 LTS.
linuxtechi@ubuntu:~$ sudo apt install php-mbstring php7.0-mbstring php-gettext
linuxtechi@ubuntu:~$ sudo systemctl restart apache2.service
linuxtechi@ubuntu:~$ sudo apt install phpmyadmin
During its installation it will prompt us to choose the Web server to be configured for phpMyAdmin.
Select Apache2 and Click on OK.

Click on ‘Yes’ to Configure database for phpMyAdmin.

Specify the password for phpMyAdmin to register with Database Server.

Confirm the password for phpMyAdmin and then click on ‘OK’

Now try to access the phpMyAdmin, open the browser type : “http://Server_IP_OR_Host_Name/phpmyadmin


If this url did not work then use the following options

For Ubuntu 15.04 and 16.04
  • sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
  • sudo a2enconf phpmyadmin.conf
  • sudo service apache2 reload
Use the user name as ‘root’ and password that we set during the installation.

When we click on ‘Go’, it will redirect the page to ‘phpMyAdmin’ Web interface as shown below.

That’s it, LAMP stack is successfully installed and is ready for use