Followers

TRENDING NOW

Print Friendly and PDF
Place where all sort of programming stuff and reviews,technology news are shared and Useful Project of C++,C,java C# etc

Running on over 80 percent of smartphones and tablets in the world, Google’s Android is the number one mobile operating system. The Android operating system is open and flexible, which makes it awesome — for users and developers alike — in so many ways. But the OS’s openness and flexibility also leave the system vulnerable to invasion by malware. Malware can be used to compromise the security and privacy of your Android device.

Protect android

In most cases, malware in Android smartphones and tablets appears in the form of an application. Sometimes, an app includes malicious codes that make it perform certain actions without your consent. For instance, some applications broadcast your location data when you are searching for local maps. But malware is not the only threat when it comes to the security and privacy of your Android device. The operating system is under constant attack and older versions are more vulnerable than new ones.

Is there something that Android users can do to secure their devices? Yes. Plenty, actually. In this article, we explore various ways you can protect your Android device from a wide range of threats out there. Read on to find out more.

Use VPN

VPN is short for Virtual Private Network. A VPN service encrypts your internet connection and is arguably the best privacy tool for securing your Android device when you are connected to the internet. creates a virtual network of any number of connected devices online thus concealing the IP addresses of devices on the network. Android VPNs optimized for the OS are rapidly growing in popularity among Android users.

Since the internet has become such a huge part of our lives, we need to ensure that we are fully protected when we go online. Android VPN is one of the best ways to protect yourself from hackers and snoopers as you go about your business online. If you frequent online shopping sites such as Amazon, you can enjoy the perks of using a VPN to shop online without having to worry about someone stealing your credit card information and other personal data.

Enable Two-Factor Authentication

Two-factor authentication may seem like an inconvenience but it’s one of the most effective ways to lock down your Google services. 2-FA requires you to verify with a unique verification code and a passcode sent via OTP every time you log in to your Google account. To enable two-factor authentication, log in to your account, go to settings, and click on ‘Using 2-step verification.’ When 2-FA is enabled, no one can access your account even if your password is hacked.

Only Install Apps from Trusted Sources

The Android operating system allows users to install apps from third-party app banks through a process known as sideloading. To be able to install applications from third-party platforms, users are required to enable ‘Install apps from Unknown Sources’ in device settings. This is not recommended. Apps downloaded from third-party app banks may contain malware. Always disable the installation of apps from unknown sources to be on the safer side. Go to Settings > Security to make sure that this feature is disabled.

Install Anti-Virus Software

The latest versions of the Android operating system do a pretty good job when it comes to securing your smartphone or tablet. However, experts maintain that it’s not enough and users ought to do more to protect their data. Just like your computer, your Android device is also susceptible to data theft. Installing antivirus software and other security apps can be useful. Popular choices include Kaspersky, Avast, Norton, McAfee, and Bitdefender. Look for features such as Automatic Scan, Malware Detection, Anti-Theft, etc.

When it comes to device security, you can never be completely safe. This is especially true for Android-powered smartphones. Hackers are constantly coming up with creative ways to compromise the security of your device and steal data. However, by following these suggestions, you can make your Android smartphone more secure.

no image
Place where all sort of programming stuff and reviews,technology news are shared and Useful Project of C++,C,java C# etc
How to print Ul Li break it every 7 elements by using for loop in PHP.In this tutorial taking 100 elements and print it all number.

Php Code 

<!DOCTYPE html>

<head>

<title>Simple Program</title>
</head>
<body>
<?php
$j=1;
echo "<ul>";
for($i=1;$i<=100;$i++){
    echo "<li>";
    echo "$i";
    echo "</li>";
    if($j % 7 == 0)
 {
  
 echo "</ul>";
 echo "<ul>";
 }
  $j++;
}
echo "</ul>";

?>

</body>
</html>
no image
Place where all sort of programming stuff and reviews,technology news are shared and Useful Project of C++,C,java C# etc
In this article, I am going to explain how to perform Crud Operation with AngularJs in asp.net MVC.

First Of All,  Create A Database with Name Testdb with following script copy and paste into SQL server.

Database Table 
USE [Testdb]
GO

/****** Object:  Table [dbo].[Employe]    Script Date: 9/16/2017 1:15:19 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Employe](
    [Id] [int] IDENTITY(1,1) NOT NULL,
    [Name] [varchar](50) NULL,
    [Phone] [int] NULL,
    [Salary] [int] NULL,
    [Department] [varchar](50) NULL,
    [EmailId] [varchar](50) NULL,
 CONSTRAINT [PK_Employe] PRIMARY KEY CLUSTERED 
(
    [Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
 ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

After Creating Database we need to run the Visual Studio create a new empty MVC Project.Now first going to right-click on Models Folder and then Click addNew Item → Data→Select  ADO.Net Entity Data model after Completing the whole steps than import the Appropriate database into your project. 

Entity Data Model Look like this
namespace CrudApp.Models
{
    using System;
    using System.Collections.Generic;
    
    public partial class Employe
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public Nullable<int> Phone { get; set; }
        public Nullable<int> Salary { get; set; }
        public string Department { get; set; }
        public string EmailId { get; set; }
    }
}
After Completing the entity data model now time to create a controller into Controller folder with Name TechSpiderController.cs. 
First Adding the model reference into controller file in my case Model Name Look line this 
using CrudApp.Models;
TechSpiderController.cs

First, i am initializing the entity database connection into my controller file in my case I have a connection string name TestdbEntities that comes from web.config file 


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using CrudApp.Models;
namespace CrudApp.Controllers
{
    public class TechSpiderController : Controller
    {

        TestdbEntities db = new TestdbEntities();

        // GET: Demo
        public ActionResult Index()
        {
            return View();
        }
}
}

Whole Source code of this Controller 


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using CrudApp.Models;
namespace CrudApp.Controllers
{
    public class TechSpiderController : Controller
    {

        TestdbEntities db = new TestdbEntities();

        // GET: Demo
        public ActionResult Index()
        {
            return View();
        }

        public JsonResult GetEmployee()
        {
            var emp = db.Employes.ToList();
            return Json(emp, JsonRequestBehavior.AllowGet);


        }
        [HttpPost]
        public JsonResult InsertEmployee(Employe em)
        {
            db.Employes.Add(em);
            db.SaveChanges();
            string message = "Success";
            return new JsonResult { Data = message, JsonRequestBehavior = 
             JsonRequestBehavior.AllowGet };


        }
        [HttpPost]
        public JsonResult UpdateEmployee(int id,string name,string department,
          int phone,int salary,string emailId)
        
        {

            var emp = db.Employes.Where(x => x.Id == id).FirstOrDefault();
            emp.Name = name;
            emp.Phone = phone;
            emp.Department = department;
            emp.Salary = salary;
            emp.EmailId = emailId;
            db.SaveChanges();
            return Json(emp, JsonRequestBehavior.AllowGet);
        }
        [HttpDelete]
        public JsonResult DeleteEmployee(int id)
        {
            Employe emp = db.Employes.Find(id);
            db.Employes.Remove(emp);
            db.SaveChanges();
            return Json(emp, JsonRequestBehavior.AllowGet);
        }
        [HttpGet]
        public JsonResult getByid(int id)
        {
            Employe emp = db.Employes.Find(id);
            return Json(emp, JsonRequestBehavior.AllowGet);
        }
    }
}

Now it's time to add view into your project right click on View in controller file and click  Add View→Save 

Index.chtml


@{ 
    ViewBag.Title = "Crud with AngularJs asp.net MVC";
}
<style>
    input[type=button][disabled=disabled] {
        opacity: 0.65;
        cursor: not-allowed;
    }

    table tr th {
        padding: 10px 30px;
    }

    table tr td {
        padding: 10px 30px;
    }
</style>
<h2>AngularJs Tutorial : CRUD operation</h2> <div ng-app="myapp" ng-controller="TechSpiderController"> <form name="myform"> <table class="table"> <tr> <td>Name :</td> <td> <input type="text" ng-model="empModel.Name" placeholder="Name"
                   class='form-control' required />
                </td>
            </tr>
            <tr>
                <td>Phone :</td>
                <td>
                    <input type="text" ng-model="empModel.Phone" placeholder="Phone" 
                class='form-control' required />
                </td>
            </tr>
            <tr>
                <td>Salary :</td>
                <td>
                    <input type="text" ng-model="empModel.Salary" placeholder="Salary" 
                    class='form-control' required />
                </td>
            </tr>
            <tr>
                <td>Department :</td>
                <td>
                    <input type="text" ng-model="empModel.Department" placeholder="Department" 
                   class='form-control' required />
                </td>
            </tr>
            <tr>
                <td>Email :</td>
                <td>
                    <input type="email" ng-model="empModel.EmailId"
                  class='form-control' placeholder="Email" required />
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <input type="button" value="Save" id="btnsave" ng-disabled="isDisabledsave"
                    ng-click="myform.$valid && saveCustomer()" />
                    <input type="button" value="Update" id="btnupdate" ng-disabled="isDisabledupdate" 
                   ng-click="myform.$valid && updateCustomer()" />
                </td>
            </tr>
        </table>
    </form>
    <table>
        <tr>
            <th>S.No</th>

            <th>
                Name
            </th>
            <th>
                Phone
            </th>
            <th>
                Department
            </th>
            <th>
                Salary
            </th>
            <th>
                Email
            </th>
        </tr>
        <tr ng-repeat="empModel in employees">
            <td>{{empModel.Id}}</td>
            <td>{{empModel.Name }}</td>
            <td>{{empModel.Phone }}</td>
            <td>{{empModel.Department}}</td>
            <td>{{empModel.Salary }}</td>
            <td>{{empModel.EmailId ||'Email not available'}}</td>
            <td>
                <a href="" ng-click="getCustomer(empModel)" title="Delete Record">Edit</a>  |
                <a href="" ng-click="deleteemp(empModel)" title="Delete Record">
                    Delete
                </a>
            </td>
        </tr>
    </table>

</div>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.js"></script>
<script>
    var angular = angular.module('mapp', []);

    angular.controller('TechSpiderController', function ($scope, $http) {

        GetAllData();
        $scope.isDisabledupdate = true;
        //Get All Employee
        function GetAllData() {
            $http.get('/Demo/GetEmployee').success(function (data) {
                $scope.employees = data;
            });
        };

        //Insert Employee
        $scope.saveCustomer = function () {
            debugger
            $http({
                method: 'POST',
                url: '/Demo/InsertEmployee',
                data: $scope.empModel
            }).success(function () {
                GetAllData();
                $scope.empModel = null;
                alert("Employee Added Successfully!!!");
            }).error(function () {
                alert(data.errors);
            });
            GetAllData();
        };

        //Delete Employee
        $scope.deleteemp = function (empModel) {
            debugger
            varIsConf = confirm('Want to delete ' + empModel.Name + '. Are you sure?');
            if (varIsConf) {
                $http.delete('/Demo/DeleteEmployee/' + empModel.Id).success(function () {
                    $scope.errors = [];
                    GetAllData();
                    alert(empModel.Name + " Deleted Successfully!!!");
                }).error(function () {
                    alert(data.errors);
                });
            }
        };

        //Get Employee by id to edit
        $scope.getCustomer = function (empModel) {
            $http.get('/Demo/getByid/' + empModel.Id)
                .success(function (data, status, headers, config) {
                    //debugger;
                    $scope.empModel = data;
                    GetAllData();
                    $scope.isDisabledsave = true;
                    $scope.isDisabledupdate = false;
                })
                .error(function () {
                    alert(data.errors);
                });
        };

        //Update Employee
        $scope.updateCustomer = function () {
            debugger
            $http({
                method: 'POST',
                url: '/Demo/UpdateEmployee',
                data: $scope.empModel
            }).success(function () {
                GetAllData();
                $scope.isDisabledsave = false;
                $scope.isDisabledupdate = true;
                $scope.empModel = null;
                alert("Employee Updated Successfully!!");
            }).error(function () {
                alert(data.errors);
            });
        };

    });
</script>

If You have any confusion in this articles please feel free and discuss with us.





no image
Place where all sort of programming stuff and reviews,technology news are shared and Useful Project of C++,C,java C# etc
In C#, types are divided into two categories:
  • value types 
  • Reference types. 
Value types directly contain their data, and reference types store references to their data. The third category of types called pointers is available only in unsafe code. This pointer type will not be discussed in this document.

VALUE TYPES

In C#, a value type can be either a Struct or an enumeration. C# contains a set of predefined Struct types called the simple types. These simple types are identified through reserved words. All value types implicitly inherit from a class called object. Also, no type can derive from a value type. It is not possible for a value type to be null (null means “nothing” or “no value”). Assigning a variable of a value type creates a copy of the value. This is different from assigning a variable of a reference type, which copies the reference and not the object identified by the reference.

Example

Int,char,byte,bool,decimal ,double, enum , long ,sbyte,short ,struct,uint ,ulong ,ushort

REFERENCE TYPES

A reference type is one of the following: a class, an interface, an array, or a delegate. A reference type value is a reference to an instance of the type. null is compatible with all reference types and indicates the absence of an instance.

Class Types

A class defines a data structure containing data members (constants and fields), function members (methods, properties, events, indexers, operators, instance constructors, destructors and static constructors), and nested types.

The Object Type

The object class type is the ultimate base class of all other types. Every type in C# directly or indirectly derives from the object class type.

The String Type

The string type inherits directly from the class object.

Interface Types

An interface defines a contract. A class implementing an interface must adhere to its contract.

Array Types

An array is a data structure containing a number of variables that are accessed through indices. The variables contained in an array are called the elements of the array. They are all of the same types, and this type is called the element type of the array
Place where all sort of programming stuff and reviews,technology news are shared and Useful Project of C++,C,java C# etc
In C#, a variable represents a storage location. A variable has a type that determines what values can be stored in this variable. Because C# is a type-safe language, the C# compiler guarantees that values stored in variables are always of the appropriate type.

 The value of a variable is changed through the assignment operator and through the use of the ++ and -- operators. A variable must be definitely assigned before its value can be obtained: variables are either initially assigned or initially unassigned. An initially assigned variable has a well-defined initial value, while an initially unassigned variable has no initial value.
Variables In C#

CATEGORIES OF VARIABLES IN C#

C# has seven categories of variables: static variables, instance variables, array elements, value parameters, reference parameters, output parameters, and local variables. The following sections describe each of these categories.

Static Variables

A variable, declared with the static keyword, is a static variable. The initial value of a static variable is the default value of the variable’s type. A static variable is initially assigned.

Instance Variables

A variable declared without the static keyword is an instance variable. An instance variable of a class exists when a new instance of that class is created and ceases to exist when there are no references to that instance and the instance’s destructor (if any) has executed. The initial value of an instance variable of a class is the default value of the variable’s type. An instance variable of a class is initially assigned.

Array Elements

Array elements exist when an array instance is created and cease to exist when there are no references to that array instance. The initial value of each of the elements of an array is the default value of the type of the array elements. An array element is initially assigned.

Local Variables

A local variable is declared within a block, a for-statement, a switch-statement, or a using-statement. The lifetime of a local variable is implementation-dependent. For example, the compiler could generate code that results in the variable’s storage having a shorter lifetime than its containing block. A local variable is not automatically initialized and it has no default value. A local variable is initially unassigned. It is a compile-time error to refer to the local variable in a position that precedes its declaration.

Value Parameters

A parameter declared without a ref or out modifier is a value parameter. A value parameter is initially assigned.

Reference Parameters

A parameter declared with a ref modifier is a reference parameter. A reference parameter represents the same storage location as the variable given as the argument in the function member invocation. Therefore, the value of a reference parameter is always the same as the underlying variable. A variable has to be definitely assigned before it can be passed as a reference parameter in a function member invocation. A reference parameter is considered initially assigned to a function member.

Output Parameters

An output parameter is a parameter declared with an out modifier. An output parameter represents the same storage location as the variable given as the argument in the function member invocation. Therefore, the value of an output parameter is always the same as the underlying variable. A variable does not need to be definitely assigned before it can be passed as an output parameter in a function member invocation. An output parameter is initially unassigned within a function member.

no image
Place where all sort of programming stuff and reviews,technology news are shared and Useful Project of C++,C,java C# etc
In this Article am describing how to integrate SMS API in C#  that can send SMS to your mobile phone within Pakistan.
 First go to this website and signup here

Here are the simple Steps that you follow  :

  1. First Launch a visual studio 
  2. Create a console Application in visual studio 
  3. After that first added assembly reference into your project

using System.Net;
using System.Web;
Here is Implementation

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Web;
namespace ConsoleApp3
{
    class Program
    {
        static void Main(string[] args)
        {
            string MyUsername = "xxxx"; //Your Username At Sendpk.com 
            string MyPassword = "xxxx"; //Your Password At Sendpk.com 
            string toNumber = "xxxxx"; //Recepient cell phone number with country code 
            string Masking = "Tech Spider"; //Your Company Brand Name 
            string MessageText = "Application Done";
            string jsonResponse = SendSMS(Masking, toNumber, MessageText, MyUsername, MyPassword);
            Console.Write(jsonResponse);
            //Console.Read(); //to keep console window open if trying in visual studio 
            Console.ReadLine();
        }
        public static string SendSMS(string Masking, string toNumber, string MessageText, string MyUsername, string MyPassword)
        {
            String URI = "http://Sendpk.com" +
            "/api/sms.php?" +
            "username=" + MyUsername +
            "&password=" + MyPassword +
            "&sender=" + Masking +
            "&mobile=" + toNumber +
            "&message=" + Uri.UnescapeDataString(MessageText); // Visual Studio 10-15 
          
            try
            {
                WebRequest req = WebRequest.Create(URI);
                WebResponse resp = req.GetResponse();
                var sr = new System.IO.StreamReader(resp.GetResponseStream());
                return sr.ReadToEnd().Trim();
            }
            catch (WebException ex)
            {
                var httpWebResponse = ex.Response as HttpWebResponse;
                if (httpWebResponse != null)
                {
                    switch (httpWebResponse.StatusCode)
                    {
                        case HttpStatusCode.NotFound:
                            return "404:URL not found :" + URI;
                            break;
                        case HttpStatusCode.BadRequest:
                            return "400:Bad Request";
                            break;
                        default:
                            return httpWebResponse.StatusCode.ToString();
                    }
                }
            }
            return null;
            
        }
    
    }
   
    }
Place where all sort of programming stuff and reviews,technology news are shared and Useful Project of C++,C,java C# etc
Definition 

A frame diagram is a generic problem diagram capturing such a problem pattern is called a frame.

Instead of writing problem diagrams from scratch for every problem world we need to delimit, we might predefine a number of frequent problem patterns. A specific problem diagram can then be obtained in matching situations by instantiating the corresponding pattern (Jackson, 2001). This is another illustration of the knowledge reuse technique 

Explanation 

The interface labels are now typed parameters; they are prefixed by 'C''E' or 'Y', depending on whether they are to be instantiated to casual, event or symbolic phenomena, respectively. 


A generic component in a frame diagram can be further annotated by its type:

Causal Component

A component marked by a 'C', has some internal causality that can be enforced, e.g. it reacts predictably in response to external stimuli. A machine component is intrinsically causal. 

Biddable Component

 A  component marked by a 'B', has no such enforceable causality, e.g. it consists of people.

Lexical Component

A component, marked by an 'X', is a symbolic representation of data.

The upper part shows two frame diagrams. The one on the left-hand side represents the Simple Workpieces frame. It captures a problem class where a machine is a tool allowing a user to generate information that can be analysed and used for other purposes. The frame diagram on the right-hand side represents the Information Display frame. It captures a problem class where the machine must present information in a required form to environment components

The frame diagram specifies that the information machine component monitors a causal phenomenon C1 from the RealWorld component and produces an event phenomenon E2 for a Display component as a result. The requirement constraining the latter component is a generic accuracy requirement, as indicated by the ' .....,• symbol; it prescribes that the information displayed should accurately reflect a causal phenomenon C3 from the RealWorld component. 
Frame Diagram

The lower part shows corresponding frame instantiations yielding problem diagrams. The phenomenon instantiations, compatible with the corresponding p~rameter type, are shown on the bottom. The component instantiations, compatible with the corresponding Component type, are annotated with the name of the generic component to indicate their role in the frame instantiation. For example, the instantiated right-hand side requirement states that the notified meeting date and location must be the one determined by the Scheduler component.

Other frames can be similarly defined and instantiated, for example for problems where the environment behaviours must be controlled by the machine in accordance with commands issued by an operator, or for problems where the machine must transform input data into output data (Jackson, 2001).

Context and problem diagrams provide a simple, convenient notation for delimiting the scope of the system-to-be in terms of components relevant to the problem world and their static interconnections. There is a price to pay for such simplicity. The properties of the interaction between pairs of components are not made precise. The granularity of components and the criteria for a component to appear in a diagram are not very clear either. 


For example

A network component might be part of the problem world of scheduling meetings involving participants who are geographically distributed. According to which precise criteria should this component appear or not. Problem diagrams may also become clumsy for large sets of requirements. 

How do we compose or decompose them? What properties must be preserved under composition or decomposition? we will come back to those issues. A more precise semantics will be given for components and connections, providing criteria for identifying and refining components and interconnections. We will also see there how the / useful view offered by context and problem diagrams can be derived systematically from goal diagrams.



Place where all sort of programming stuff and reviews,technology news are shared and Useful Project of C++,C,java C# etc
Problem diagrams

A context diagram can be further detailed by indicating explicitly which component controls a shared phenomenon, which component constitutes the machine we need to build, and which components are affected by which requirements. The resulting diagram is called a problem diagram (Jackson, 2001).

A problem diagram excerpt for the meeting scheduling system. A rectangle with a double vertical stripe represents the machine we need to build. A rectangle with a single stripe represents a component to be designed. An interface can be declared separately; the exclamation mark after a component name prefixing a declaration indicates that this component controls the phenomena in the declared set.

 For example

 The f label declaration  states that the Scheduler machine controls the phenomena determineDate and determineLocation. A dashed oval represents a requirement. It may be connected to a component through a dashed line, to indicate that the requirement refers to it, or by· a dashed arrow, to indicate that the requirement constrains it. Such connections may be labelled as well to indicate which corresponding phenomena are referenced or constrained by the requirement. 
problem diagram

For example

 The h label declaration  indicates that the requirement appearing there constrains the phenomena Date and Location controlled by the Scheduler machine.
Place where all sort of programming stuff and reviews,technology news are shared and Useful Project of C++,C,java C# etc
Definition
A context diagram is a simple graph where nodes represent system components and edges represent connections through shared phenomena declared by the labels (DeMarco, 1978; Jackson, 2001).

For example

The Initiator component controls the meetingRequest event, whereas the Scheduler component monitors it; the Scheduler component controls the constraintsRequest event, whereas the Participant component controls the constraintsSent event.

context diagram
A component in general does not interact with all other components. A context diagram provides a simple visualization of the direct environment of each component; that is, the set of 'neighbour' components with which it interacts, together with their respective interfaces.
no image
Place where all sort of programming stuff and reviews,technology news are shared and Useful Project of C++,C,java C# etc
You can redefine or overload most of the built-in operators available in C#. Thus a programmer can use operators with user-defined types as well. Overloaded operators are functions with special names the keyword operator followed by the symbol for the operator being defined. similar to any other function, an overloaded operator has a return type and a parameter list.

For example:

using System;
public class Program
{
 int x, y, z;
 public Program()
 {
 x = y = z = 0;
 }
 public Program(int i, int j, int k)
 {
 x = i;
 y = j;
 z = k;
 }
 public static Program operator +(Program a, Program b)
 {
 Program c = new Program();
 c.x = a.x + b.x;
 c.y = a.y + b.y;
 c.z = a.y + b.y;
 return c;
 }
 public static Program operator -(Program a, Program b)
 {
 Program c = new Program();
 c.x = a.x - b.x;
 c.y = a.y - b.y;
 c.z = a.y - b.y;
 return c;
 }
 public void show()
 {
 Console.WriteLine(x + " , " + y + " , " + z);
 }
}
class second
 {
 static void Main(string[] args)
 {
 Program n1 = new Program(1,2,3);
 Program n2 = new Program(10,10,10);
 Program n3 = new Program();
 Console.WriteLine("here is n1");
 n1.show();
 Console.WriteLine("here is n2");
 n2.show();
 n3 = n1 + n2;
 Console.WriteLine("Result of n1 + n2");
 
 n3.show();
 n3 = n1 + n2+n3;
 Console.WriteLine("Result of n1 + n2 + n3");
 n3.show();

 n3 = n3 - n1;
 Console.WriteLine("Result of n3 - n1");
 n3.show();
 n3 = n3 - n2;
 Console.WriteLine("Result of n3 - n2");
 n3.show();

 }
 }
no image
Place where all sort of programming stuff and reviews,technology news are shared and Useful Project of C++,C,java C# etc
Definition :

 Inconsistencies are the rule that  violate a consistency rule that links them explicitly or implicitly.

Types of inconsistency

Different types of consistency rule define different types of inconsistency: 


  • Terminology clash
  • Designation clash 
  • Structure clash
  • Strong conflict
  • Week conflict

Terminology clash

 The same concept is given different names in different statements.  For example, one statement states some condition for 'participating' in a meeting whereas another statement states an apparently similar or related condition for 'attending' a meeting. 

Designation clash

The same name designates different concepts in different statements. For example, one stakeholder interprets 'meeting participation' as full participation until the meeting ends, whereas another interprets it as partial participation. 

Structure clash

The same concept is given different structures in different statements. For example, one statement speaks of a participant's excluded dates as 'a set of time points', whereas another speaks of it as 'a set of time intervals'

Strong conflict

 There are statements that cannot be satisfied when taken together; their logical conjunction evaluates to false in all circumstances. This amounts to classical inconsistency in logic. In our meeting scheduler, there would be a strong conflict between one statement stating that 'the constraints of a participant may not be disclosed to anyone else' and another stating that 'the meeting initiator should know the participants' constraints'. (Those statements might originate from stakeholders having the participant's and initiator's viewpoint, respectively.) 

Weak conflict or divergence. There are statements that are not satisfiable together under some condition. This condition, called a boundary condition, captures a particular combination of circumstances that makes the statements strongly conflicting when it becomes true. The boundary condition must be feasible; that is, it can be made true