25 March 2012

Assertive Communication


Assertive Communication

Assertive communication is the ability to express positive and negative ideas and feelings in an open, honest and direct way. It recognises our rights whilst still respecting the rights of others. It allows us to take responsibility for ourselves and our actions without judging or blaming other people. And it allows us to constructively confront and find a mutually satisfying solution where conflict exists.
So why use assertive communication?
All of us use assertive behaviour at times... quite often when we feel vulnerable or unsure of ourselves we may resort to submissive, manipulative or aggressive behaviour.
Yet being trained in assertive communication actually increases the appropriate use of this sort of behaviour. It enables us to swap old behaviour patterns for a more positive approach to life. I've found that changing my response to others (be they work colleagues, clients or even my own family) can be exciting and stimulating.
The advantages of assertive communication
There are many advantages of assertive communication, most notably these:
  • It helps us feel good about ourselves and others
  • It leads to the development of mutual respect with others
  • It increases our self-esteem
  • It helps us achieve our goals
  • It minimises hurting and alienating other people
  • It reduces anxiety
  • It protects us from being taken advantage of by others
  • It enables us to make decisions and free choices in life
  • It enables us to express, both verbally and non-verbally, a wide range of feelings and thoughts, both positive and negative
There are, of course, disadvantages...
Disadvantages of assertive communication
Others may not approve of this style of communication, or may not approve of the views you express. Also, having a healthy regard for another person's rights means that you won't always get what YOU want. You may also find out that you were wrong about a viewpoint that you held. But most importantly, as mentioned earlier, it involves the risk that others may not understand and therefore not accept this style of communication.

Cloud computing - Defination and Explanation

Cloud computing - Defination and Explanation

According to a paper published by IEEE Internet Computing in 2008 "Cloud Computing is a paradigm in which information is permanently stored in servers on the Internet and cached temporarily on clients that include computers, laptops, handhelds, sensors, etc.

In Computer science, Cloud computing is a marketing term. In the case of electricity, users can simply use it. They do not need to worry where the electricity is from, how it is generated, or transported. At the end of the month, they will get a bill for the amount of electricity they consumed.

The idea behind cloud computing is similar: The user can simply use storage, computing power, or specially crafted development environments, without having to worry how these work internally. Cloud computing is a systems architecture model for Internet-based computing. It is the development and use of computer technology on the Internet. The cloud is a metaphor for the Internet based on how the internet is described in computer network diagrams; which means it is an abstraction hiding the complex infrastructure of the internet. It is a style of computing in which IT-related capabilities are provided “as a service”, allowing users to access technology-enabled services from the Internet ("in the cloud")without knowledge of, or control over the technologies behind these servers.

Cloud computing is a general concept that utilizes software as a service (SaaS), such as Web 2.0 and other technology trends, all of which depend on the Internet for satisfying users' needs. For example, Google Apps provides common business applications online that are accessed from a web browser, while the software and data are stored on the Internet servers.

Cloud computing is being driven by providers including Google, Amazon.com, and Yahoo! as well as traditional vendors including IBM, Intel, Microsoft and SAP.

Key characteristics

Capital expenditure minimized, therefore low barrier to entry as infrastructure is owned by the provider and does not need to be purchased for one-time or infrequent intensive computing tasks. Services are typically being available to or specifically targeting retail consumers and small businesses.

Device and location independence which enables users to access systems regardless of location or what device they are using (for example PC, mobile,... etc).

Multitenancy enabling sharing of resources (and costs) among a large pool of users, allowing for:
Centralization of infrastructure in areas with lower costs (eg real estate, electricity)

Peak-load capacity increases (users need not engineer for highest possible load levels)

Utilization and efficiency improvements for systems that are often only 10-20% utilised.

Performance is monitored and consistent but can be affected by insufficient bandwidth or high network load.

Reliability by way of multiple redundant sites, which makes it suitable for business continuity and disaster recovery, however IT and business managers are able to do little when an outage hits them.[32] Historical data on cloud outages is tracked in the Cloud Computing Incidents Database.

Scalability which meets changing user demands quickly, without having to engineer for peak loads. Massive scalability and large user bases are common but not an absolute requirement.

Security which typically improves due to centralization of data, increased security-focused resources, etc. but which raises concerns about loss of control over certain sensitive data. Accesses are typically logged but accessing the audit logs themselves can be difficult or impossible.

Sustainability through improved resource utilisation, more efficient systems and carbon neutrality.




18 March 2012

Difference between view state and a hidden field in asp.net

Difference between view state and a hidden field in asp.net

Both are used to store the value during the postback in asp.net , but

In View state -  not able to change the value by Client side code i.e java script.
Hidden field - possible to change value by Client side code.

In View state - You can store more than one value like Datatable ,Dataset,Collections and Object.
Hidden field - You can store only one value in hidden field





16 March 2012

Pathfinder Coimbatore - Pathfinder Business Analysis (P) Ltd

Pathfinder Coimbatore - IT, BPO Company in  Coimbatore


Address:

Pathfinder Business Analysis (P) Ltd
#18, R.R.Industrial Estate,
Singanallur,
Coimbatore - 641005
Tamilnadu, India
Tel        : +91-422-227-3184
Fax       : +91-422-227-3176



Website:
http://www.pathfinderanalysis.com/


Map:

Click to see in Google map



Adding DataRelations between Datatables in c#

Adding DataRelations between Datatables in c#



In a DataSet with multiple DataTable objects, you can use DataRelation objects to relate one table to another, to navigate through the tables, and to return child or parent rows from a related table.

Adding a DataRelation to a DataSet adds, by default, a UniqueConstraint to the parent table and a ForeignKeyConstraintto the child table. For more information about these default constraints, see DataTable Constraints (ADO.NET).


The following code example creates a DataRelation using two DataTable objects in a DataSet. Each DataTable contains a column named CustID, which serves as a link between the two DataTable objects. The example adds a singleDataRelation to the Relations collection of the DataSet. The first argument in the example specifies the name of theDataRelation being created. The second argument sets the parent DataColumn and the third argument sets the childDataColumn.

customerOrders.Relations.Add("CustOrders",
customerOrders.Tables["Customers"].Columns["CustID"],
customerOrders.Tables["Orders"].Columns["CustID"]);




2 March 2012

HierarchyID Data Type in SQL Server 2008

HierarchyID Data Type in SQL Server 2008

 The HierarchyID data type allows you to construct relationships among data elements within a table, specifically to represent a position in a hierarchy.

 Facts about the HierarchyId data type:

Here are a few facts that you must know before starting to use HierarchyID:
  1. New system CLR type supporting trees.
  2. Internally stored as varbinary <= 900 bytes.
  3. Holds a path that provides a topological sort of a tree.
  4. Has a set of methods that provide tree functionality: GetAncestor, GetDescendant, GetLevel, GetRoot, IsDescendant, Parse, Read, Reparent, ToString, Write.
  5. Efficient querying that can utilize depth-first and breadth-first indexes.
Methods provided are as follows:
  • GetAncestor: Returns a HierarchyID that represents the nth ancestor of this HierarchyID node.
  • GetDescendant: Returns a child node of this HierarchyID node.
  • GetLevel: Returns an integer that represents the depth of this HierarchyID node in the overall hierarchy.
  • GetRoot: Returns the root HierarchyID node of this hierarchy tree. Static.
  • IsDescendant: Returns true if the passed-in child node is a descendant of this HierarchyID node.
  • Parse: Converts a string representation of a hierarchy to a HierarchyID value. Static.
  • Reparent: Moves a node of a hierarchy to a new location within the hierarchy.
  • ToString: Returns a string that contains the logical representation of this HierarchyID.

Example

CREATE TABLE dbo.Employees
(
  empid   INT NOT NULL,
  hid     HIERARCHYID NOT NULL,
  lvl AS hid.GetLevel() PERSISTED,
  empname VARCHAR(25) NOT NULL,
  salary  MONEY       NOT NULL
)
CREATE UNIQUE CLUSTERED INDEX idx_depth_first
  ON dbo.Employees(hid);
CREATE UNIQUE INDEX idx_breadth_first
  ON dbo.Employees(lvl, hid);
CREATE UNIQUE INDEX idx_empid
  ON dbo.Employees(empid);
In the above code snippet, I have created a table using HierarchyID as a data type.
CREATE PROC dbo.usp_AddEmp 
  @empid AS INT, @mgrid AS INT = NULL,
  @empname AS VARCHAR(25), @salary AS MONEY
AS

DECLARE @hid AS HIERARCHYID, @mgr_hid AS HIERARCHYID,
  @last_child_hid AS HIERARCHYID;

IF @mgrid IS NULL
  SET @hid = HIERARCHYID::GetRoot();
ELSE
BEGIN
  SET @mgr_hid = (SELECT hid FROM dbo.Employees WHERE empid = @mgrid);
  SET @last_child_hid =
    (SELECT MAX(hid) FROM dbo.Employees
     WHERE hid.GetAncestor(1) = @mgr_hid);
  SET @hid = @mgr_hid.GetDescendant(@last_child_hid, NULL);
END

INSERT INTO dbo.Employees(empid, hid, empname, salary)
  VALUES(@empid, @hid, @empname, @salary);
In the above code snippet, I have created a Stored Procedure that can be used to insert data into the table with HierarchyID as data type in one of the columns.
-- Subtree
SELECT C.*
FROM dbo.Employees AS P
  JOIN dbo.Employees AS C
    ON P.empid = 3
    AND P.hid.IsDescendant(C.hid) = 1;

-- Path
SELECT P.*
FROM dbo.Employees AS P
  JOIN dbo.Employees AS C
    ON C.empid = 14
    AND P.hid.IsDescendant(C.hid) = 1;

-- Presentation/sorting
SELECT
  REPLICATE(' | ', lvl) + empname AS empname, hid.ToString() AS path
FROM dbo.Employees
ORDER BY hid;

28 February 2012

Click event when Enter button is Pressed in asp.net

Click event when Enter button is Pressed in asp.net

Javascript
function clickButton(e, buttonid){
      var evt = e ? e : window.event;
      var bt = document.getElementById(buttonid);
      if (bt){
          if (evt.keyCode == 13){
                bt.click();
                return false;
          }
      }
}




//code behind TextBox1.Attributes.Add("onkeypress", "return clickButton(event,'" + Button1.ClientID + "')");
 

The code behind generates the following code:

<    asp:Button id="Button1"
           Text="Submit"
           OnClick="SubmitBtn_Click" 
           runat="server" onkeypress="return clickButton(event,'Button1')"/   >




This causes web control Button1 to be clicked when the enter key is hit inside TextBox1.


Implementing OAuth validation in a Web API

 I mplementing OAuth validation in a Web API Implementing OAuth validation in a Web API using C# typically involves several key steps to sec...