Selasa, 28 Februari 2017

How to Return Objects instead of Primitives in Programming

We can not only pass objects as function arguments but can also return objects from functions. We can return an object in the following three ways: Returning by value which makes a duplicate copy of the local object. Returning by using a reference to the object. In this way the address of the object is passed implicitly to the calling function. Returning by using the ‘this pointer’ which explicitly sends the address of the object to the calling function.   Following program demonstrates the three ways of returning objects from a function: 1 2 3 4 5 6 7 8

The post How to Return Objects instead of Primitives in Programming appeared first on Coding Security.


How to Return Objects instead of Primitives in Programming
read more

How to use pointers in Arrays in C Programming Language

When an array is declared in a program, the compiler allocates a base address and sufficient amount of storage to contain all the elements of the array in contiguous (continuous) memory locations. A pointer is a derived data type in C. It is built from one of the fundamental data types available in C. Pointers contain memory addresses as their values. Since these memory addresses are the locations in the computer memory where program instructions and data are stored, pointers can be used to access and manipulate data stored in the memory. Pointers are more efficient in handling arrays and

The post How to use pointers in Arrays in C Programming Language appeared first on Coding Security.


How to use pointers in Arrays in C Programming Language
read more

What are the methods and controls in the Abstract Window ToolKit

In this article we will look at how to create and work with various AWT controls available in the java.awt package along with sample code.   We can add and remove controls to a Container like Applet and Frame using the following methods available in the Container class: Component add(Component ref) Component remove(Component ref)   Label A label is a GUI control which can be used to display static text. Label can be created using the Label class and its constructors which are listed below: Label() Label(String str) Label(String str, int how) The parameter how specifies the text alignment. Valid values are

The post What are the methods and controls in the Abstract Window ToolKit appeared first on Coding Security.


What are the methods and controls in the Abstract Window ToolKit
read more

Senin, 27 Februari 2017

An Introduction to Basic Networking Concepts

Network A network is a collection of interconnected computers, which are connected using communication media along with communication devices. Examples of communication devices are: modems, routers and bridges. Examples of communication media are: telephone cables, coaxial cables, twisted pair cables and fiber optical cables. Using a network has several advantages like: Easy to share the information. Easy to share the resources like printers etc. Saves time and money. Network Model A network model refers to how the computers over the network communicate with each other. The famous networking model is client-server model. In this model there are two types of

The post An Introduction to Basic Networking Concepts appeared first on Coding Security.


An Introduction to Basic Networking Concepts
read more

What are synchronized blocks in java Programming

Synchronized Blocks Sometimes while working with third-party classes, we might want to synchronize the access to methods in those classes. In such cases, synchronized methods cannot be used. Instead we can use synchronized blocks. Syntax of a synchronized block is as follows: synchronized(object-reference) {   //Statements to be synchronized }   The above program can be modified to contain a synchronized block as shown below: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

The post What are synchronized blocks in java Programming appeared first on Coding Security.


What are synchronized blocks in java Programming
read more

What are the templates of the Class in C++ Programming

Using templates programmers can create abstract classes that define the behavior of the class without actually knowing what data type will be handled by the class operations. Such classes are known as class templates. Syntax for creating a class template is as follows: 1 2 3 4 5 6 7 template<class Type1, class Type2, ...> class ClassName { ... //Body of the class ... };   Syntax for creating an object of the template class is as follows: 1 ClassName<Type> ObjectName(params–list);   The process of creating an object of a template class or creating a specific class from a class

The post What are the templates of the Class in C++ Programming appeared first on Coding Security.


What are the templates of the Class in C++ Programming
read more

Minggu, 26 Februari 2017

What is a hidden field in Session Data Management

Hidden Fields Some web users who are concerned with the security implications of a cookie will disable the cookies in their browser. In such cases, another way to store session data is by using hidden fields. A hidden field is a part of HTML form. As the name implies, a hidden field (input element whose type is set to hidden) and its data is not visible to a user. The server will process the session data which will be available in the hidden fields. A hidden field can store only one value at a time. Both cookies and hidden fields

The post What is a hidden field in Session Data Management appeared first on Coding Security.


What is a hidden field in Session Data Management
read more