Friday, May 15, 2020

Create Text into the Picture


CREATE TEXT PICTURE USING STRING


Create Bitmap Picture using String | Picture using String | Bitmap with C# String | Draw a text using C# | Create Picture of Text using C# | Create Text into the Picture


//using System.Drawing;
        //using System.Drawing.Text;
        //using System.Drawing.Drawing2D;
        //using System.Drawing.Imaging;
        public void create_image_from_text(string text)//pass string value
        {
            Bitmap bitmap = new Bitmap(1, 1);//create object of bitmap class
            Font font = new Font("Arial", 25, FontStyle.Regular, GraphicsUnit.Pixel);//set font, size
            Graphics graphics = Graphics.FromImage(bitmap);//pass object to graphics class
            int width = (int)graphics.MeasureString(text, font).Width;//set width
            int height = (int)graphics.MeasureString(text, font).Height;//set height
            bitmap = new Bitmap(bitmap, new Size(width, height));//bind height & width with object
            graphics = Graphics.FromImage(bitmap);//create image
            graphics.Clear(Color.Transparent);//set image transparent, if not then choose back color
            graphics.SmoothingMode = SmoothingMode.AntiAlias;//pic smoothness
            graphics.TextRenderingHint = TextRenderingHint.AntiAlias;
            graphics.DrawString(text, font, new SolidBrush(Color.FromArgb(0, 0, 0)), 0, 0);//set font color
            graphics.Flush();//free memory
            graphics.Dispose();//reset
            string fileName = text + ".png";//set filename
            bitmap.Save(Server.MapPath("~/AppFiles/") + fileName, ImageFormat.Png);//save to path
            bitmap.Dispose();//reset
        }


Html Useful Drag and Drop Functionality

HTML DRAG AND DROP FUNCTIONALITY IMPLEMENTATION


Image Drag and Drop into the HTML using JQUERY | DRAG and DROP into the Web Page 


Drag and drop code in two-part:

first: HTML part in which you can see both drop and draggable div 
second: Javascript code to drag and drop div

HTML Part:

<div id="div1" draggable="true" ondragstart="drag(event)" class="item" val1="123">my div</div>// this div will be draggable

<div ondrop='drop(event)' ondragover='allowDrop(event)' style='background-color:wheat;'></div> //this div will be dropable

Javascript Part:

function allowDrop(ev) {
            ev.preventDefault();
        }

        function drag(ev) {
            ev.dataTransfer.setData("Text", ev.target.id);
        }

function drop(ev) {
            ev.preventDefault();
            var data = ev.dataTransfer.getData("Text");
            ev.target.appendChild(document.getElementById(data));

            var target = ev.target || ev.srcElement;
            var id = target.id;           
        }

AspNet Grid View

ASP.NET GRID VIEW CONTROL

How to check multiple textbox duplicate value in GridView control | Validate duplicate entry into the grid view in asp.net webform


Validate multiple Textbox duplicate value in GridView


function GridViewDuplicateTextboxValueValidation(CheckTxtID) {
//This is using to find textbox in grid view control.
            var $arrT = $('#<%=GridControlList.ClientID %>').find('input:text[id*="txtFormorder"]');
            if ($arrT.length > 0) {
                for (var i = 0; i < $arrT.length; i++) {
                    var $txt = $arrT[i];
                    if ($txt != document.getElementById(CheckTxtID)) {
                        if ($($txt).val().toString() == document.getElementById(CheckTxtID).value.toString()) {
                            alert("Order " + document.getElementById(CheckTxtID).value + " already exist.");
                            document.getElementById(CheckTxtID).value = "";
                        }
                    }
                }
            }
        }

SQL DATABASE BASIC QUERIES

SQL DATABASE BASIC QUERIES


SQL query for getting record using like keyword with multiple values? | Get Multiple Records with Like Query | Using Like query Get Multiple Records


//This the query will return which data having the first letter a, b

and z.

SQL COMMAND :

Select columnName From TableName Where columnName Like '[ABZ]%'


//This query will return A to Z which data having the first latter

 A B, C......... Z.

SQL COMMAND : 

Select columnName From TableName Where columnName Like '[A-B]%'


Manual Software Test Case Document Writing


MANUAL SOFTWARE TEST CASE DOCUMENT 

Basic Introduction to creating Manual Test Case Document


How to create a test case document into the manual testing?

General Instruction

 

1.    All Text Field must have “max length” parameter set as per the value to be stored in table and must be equal to column length in table.

2.    All Text Field must have “placeholder” parameter set as per label.

3.    Required field must be applied to at least one column.

4.    After saving required information the add screen must get redirected to list page.

5.    All field must be tested for Sql injection. Must be handled for apostrophe(‘), Slash(/) etc symbol if allowed.

 

Field Specific Validation.

 

1.    Email Field.

a.    Must be valid email on all the pages

2.    Numeric Field.

a.    Must allow only numeric value.

3.    Price Field.

a.    Must allow numeric values only

b.    Must have format #0.00

c.    Must be comma separated for display only in International System.

d.    Must have max length which is properly validated and handled in database and query.

e.    Must be right align always.

4.    Telephone.

a.    Must allow only Numeric values with + and - and ()

b.    Must not allow alphabet to be inserted.

c.    Must be handled in query and database.

5.    Date Field.

a.    Must not allow alphabet

b.    Select date from datepicker

c.    Default format dd/mm/yyyy

d.    Save date in database as yyyy-mm-dd hh:mm:ss

 

 


OOPs Interview Questions

OOPs Interview Questions

Best Interview Questions for students

Viva Questions for students | Viva Exam Question for BCA, MCA, M.TECH, BSC CS, MSC IT, B.TECH and BE students


Whats is a Class?

A user-defined data structure that groups properties and methods. Class doesn’t occupy memory.

What is an Object?

An instance of the class is called an object. An object is created in memory using the keyword “new”.

Difference between Struct and Class:

  Struct is a Value type and are stored on the stack, while Class are Reference type and are stored on the heap.
 • Struct “does not support” inheritance, while class supports inheritance. However, a struct can implements interface. 
Struct should be used when you want to use a small data structure, while Class is a better choice for the complex data structure.

What is the difference between instantiating structures with and without using the new keyword?

When a structure is instantiated using the new keyword, a constructor (no-argument or custom, if provided) is called which initializes the fields in the structure. When a structure is instantiated without using the new keyword, no constructor is called. Hence, one has to explicitly initialize all the fields of the structure before using it when instantiated without the new keyword.


Whats is an Encapsulation? 

Wrapping up of data and function into a single unit is known as Encapsulation.

What are Properties?

The attribute of the object is called properties. Eg1:- A car has color as property.

Example:

private string m_Color;;

public string Color

{
    get

    {

        return m_Color;

    }

    set

    {

        m_Color = value;

    }

}



Car Maruti = new Car();

Maruti.Color= “White”;

Console.Write(Maruti.Color);


What is Constructor?


 • A constructor is a special method whose task is to initialize the object of its class.

 • It is special because its name is the same as the class name. 

 • They do not have return types, not even void and therefore they cannot return values. 

 • They cannot be inherited, though a derived class can call the base class constructor.

 • Constructor is invoked whenever an object of its associated class is created.

 • Note: There is always at least one constructor in every class. If you do not write a constructor, C# automatically provides one for you, this is called default constructor. Eg: class A, default constructor is A().


Static Members of the class?


Static members belong to the whole class rather than to individual object Static members are accessed with the name of class rather than reference to objects.


class Test

{

public int rollNo;

public int mathsMarks;

public static int totalMathMarks;

}

class TestDemo

{

    public static void main()

    {

        Test stud1 = new Test();

        stud1.rollNo = 1;

        stud1.mathsMarks = 40;

        stud2.rollNo = 2;

        stud2.mathsMarks = 43;

        Test.totalMathsMarks = stud1.mathsMarks + stud2.mathsMarks;

    }

}


What is a Static Method of the class?

Methods that you can call directly without first creating an instance of a class. Eg: Main() Method, Console.WriteLine() You can use static fields, methods, properties and even constructors which will be called before any instance of the class is created. As static methods may be called without any reference to object, you can not use instance members inside static methods or properties, while you may call a static member from a non-static context. The reason for being able to call static members from non-static context is that static members belong to the class and are present irrespective of the existence of even a single object.


Whats is Static Constructor?

In C# it is possible to write a static no-parameter constructor for a class. Such a class is executed once, when first object of class is created.

One reason for writing a static constructor would be if your class has some static fields or properties that need to be initialized from an external source before the class is first used.

Eg:

Class MyClass

{

static MyClass()

{

//Initialization Code for static fields and properties.

}

}

What is a Destructor?

A destructor is just opposite to constructor.

It has same as the class name, but with prefix ~ (tilde).

They do not have return types, not even void and therefore they cannot return values.

destructor is invoked whenever an object is about to be garbage collected



class person

{

//constructor

person()

{

}

//destructor

~person()

{

//put resource freeing code here.

}

}


Online Education System


ONLINE EDUCATION SYSTEM PROJECT REPORT | ONLINE EDUCATION SYSTEM


Project Overview

Education is the most important aspect of any person in life and career. We all have dreams and aspirations about our life and career. For those people for whom studying at a regular college becomes difficult, it becomes easier to enroll in a distance education program. With many universities offering online education, distance education has become a concept that is easily accessible to all. Online education allows everyone to study at their own convenience from their home without any worry about class hours and getting to and from and campus.

Online education is a form of distance learning that emphasizes the use of a personal computer. Students take courses via the Internet and utilize a variety of audio and video technologies to enhance their electronic communication with instructors. Of course, there are some hybrid educations courses that allow students to complete a portion of their work online, but also require in-class sessions.

Human Resource Management System

HUMAN RESOURCE MANAGEMENT SYSTEM PROJECT REPORT | HUMAN RESOURCE MANAGEMENT SYSTEM


Project Overview


          For an organization to run successfully and efficiently it's very important that it have efficient workers and to use it's resources very well specially Human resources. So one of the important goals of an organization is to recruit right people for the right job.

So there should be a proper recruiting process management system so that all the activities and selection procedure can be carried out effectively without losing its transparency. An on-line recruitment system will be of great help in carrying out recruitment operations and with this very objective in mind this On-Line Recruitment Process  has been made. In this web base recruitment system we will manage all such activities (like creating vacancies, Short listing applicants, scheduling interviews, selecting final applicants also processing applicant’s detail and their status) that will save time, manpower and the biggest advantage of being it web based.

This web based system will provide better prospective for the enhancement of organization  regarding to quality and transparency. 

The HR center is a powerful application designed to allow companies to streamline their human resource tasks and manager their employees more efficiently

·         Employee and Company Information            

·         Employee Time, Attendance, and Leave Request

·         HR Documentation Management

 

The HR Center includes a comprehensive employee information database, work information, beneficiary information, and more for each employee. It comes standard with employee self-service access allowing employees to update their personal information, request time off or input their daily timesheet entries. It also has role –based access level control that is functionally based on whether a user is an employee, a manager, or an HR administrators.

Online Course Management Systems



ONLINE COURSE MANAGEMENT SYSTEM PROJECT REPORT | ONLINE COURSE MANAGEMENT SYSTEM


Project Overview


Course Management systems have become more and more widely used in past 30 years. It was developed simultaneously at number of institutions. We will produce a working online course management system which will provide student validation functionality. To develop this online course system a combination of software, hardware, and coding knowledge will be required. A relational database will be used to store information about students and course content. A relational database was chosen as it provides an effective solution users for to access information. Server Pages will be used to create the actual online application that will communicate between the database and the user. The decision to use Server Pages in the online course system project was made because it is platform-independent and will provide an opportunity for the team to learn and apply a new programming validation technology

 

Tourism Management System


ONLINE TOURISM MANAGEMENT MANAGEMENT PROJECT REPORT | ONLINE TOURISM MANAGEMENT SYSTEM


Project Overview

All details of Customer, Tours, Packages, Country, State, registration etc are maintained in registers. All Payments & dues are also maintained in registers. All Bills are manually created and send at a desired place for further use. The daily-to-daily entries are also being manual. 

          Preliminary the investigation took me to the Accounts room of Agency, where I came across the current working process. Although the process of maintaining data is not a recorded one as such there were no documents to be reviewed in order to determine the efficacy of the current working process. So I had to emphasize on the observation I made while in the office. In order to complement my onsite observations, I undertook a simple interview of office bearers. The results of which are broadly cataloged below.

SQL Server Unique Constraint

SQL Server Unique Constraint Whats is Unique Constraint in SQL | How to create Unique Constraint in SQL | Unique Constraint with Example in ...