Saturday, July 30, 2011

Your current security settings put your computer at risk

This article explains how to disable IE9 security notification with easy registry edit. You might have noticed whenever we enable activeX control in IE9 from security settings as shown below picture the IE9 starts promting the security notification message every time we open IE.

Pict1. Image showing the security setting screen


IE9 default Security notification :

Pict2. Image of IE9 notification mesage

Easy Step to resolve:

1. Click on start-->Run.
2. Type  regedit
3. it launches the Registry Editor dialog box
4. Inside Computer node, Select HKEY_LOCAL_MACHINE-->SOFTWARE-->Microsoft-->Internet Explorer-->MAIN-->FeatureControl-->FEATURE_SECURITYBAND.
5. Right click on right side panel.
6. Clcik New-->DWORD(32 bit ) value.
7 Rename as iexplore.exe and giv value as 00000000
8.Be sure after all these step the registry value is the same as shown below, if you are seeing same screen, Then you are done. just close the Registry Editor dialog box and open Internet Explorer. You will not find the Notification message again. if you found this article useful your comment will be appreciated.

Wednesday, July 27, 2011

Credit Card Validation

function validateCreditCard(s) {
function cardval(s) {
// remove non-numerics
var v = "0123456789";
var w = "";
for (i=0; i < s.length; i++) { x = s.charAt(i); if (v.indexOf(x,0) != -1) w += x; } // validate number j = w.length / 2; if (j < 6.5 || j > 8 || j == 7) return false;
k = Math.floor(j);
m = Math.ceil(j) - k;
c = 0;
for (i=0; i 9 ? Math.floor(a/10 + a%10) : a;
}
for (i=0; i return (c%10 == 0);
}

Date Validation

function checkDate() {

var myDayStr = document.CheckDate.formDate.value;
var myMonthStr = document.CheckDate.formMonth.value;
var myYearStr = document.CheckDate.formYear.value;
var myMonth = new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); var myDateStr = myDayStr + ' ' + myMonth[myMonthStr] + ' ' + myYearStr;

/* Using form values, create a new date object
using the setFullYear function */
var myDate = new Date();
myDate.setFullYear( myYearStr, myMonthStr, myDayStr );

if ( myDate.getMonth() != myMonthStr ) {
alert( 'I\'m sorry, but "' + myDateStr + '" is NOT a valid date.' );
} else {
alert( 'Congratulations! "' + myDateStr + '" IS a valid date.' );
}

}



Back to JavaScript Tutorial Page Back to JavaScript Validations Page

Function to validate Email Address

function Emailchk(email)
{

var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
if(reg.test(email) == false)
{

return false;
}
else
{
return true;
}

}



Back to JavaScript Tutorial Page Back to JavaScript Validations Page

Allow only Character in Field

function Char()
{
 w=window.event.keyCode
 if (w>96 & w<123 | w>64 & w<91 | w==8 | w==32)
 {
  return
 }
 else
 {
  window.event.keyCode=null
 }
}



Back to JavaScript Tutorial Page Back to JavaScript Validations Page

Numeric Validation

function IsNumeric(strString)
// check for valid numeric strings
{
var strValidChars = "0123456789.-";
var strChar;
var blnResult = true;

if (strString.length == 0) return false;

// test strString consists of valid characters listed above
for (i = 0; i < strString.length && blnResult == true; i++)
{
strChar = strString.charAt(i);
if (strValidChars.indexOf(strChar) == -1)
{
blnResult = false;
}

}
return blnResult;

}



Back to JavaScript Tutorial Page Back to JavaScript Validations Page

Function to restrict Right Click and Refresh(F5)

function notAllowed()
{
 if(event.ctrlKey)
 {
  alert("This Operation Is Not Allowed");
  event.keyCode=0; 
  return false;
 }
 if ((event.altKey))
 {
  alert("This Operation Is Not Allowed");
  event.keyCode=0; 
  return false;
 }
 if (event.keyCode==112)
 {
  //alert("This Alt Operation Is Not Allowed");
  event.keyCode=0; 
  return false;
 }
 if(event.keyCode==114 )
 {
  alert("This Operation Is Not Allowed");
  event.keyCode=0; 
  return false;
 }
 if(parseInt(event.button)==2)
 {
  alert("This Operation Is Not Allowed"); 
  return false;    
 }
 if((event.keyCode==116)||(event.keyCode==122)||(event.keyCode==18)||(event.keyCode==93)||(event.keyCode==16))
 {
  alert("This Operation Is Not Allowed");
  event.keyCode=0; 
  return false;
 }


 return true;
 }




Back to JavaScript Tutorial Page Back to JavaScript Validations Page

Tuesday, July 26, 2011

JavaScript validations




Back to JavaScript Tutorial Page

JavaScript Features


1. Browser support
To access flash content, you need to install flash plugin in your browser. But to use javascript, you don't have to use any plugin at all. This is because all browsers have accepted javascript as a scripting language for them and provides integrated support for it. All you need to do is to handle some of the tasks that are dependent on DOM (Document Object Model) of different browsers properly.

2. Can be used on client side as well as on server side
As javascript has access to Document object model of browser, you can actually change the structure of web pages at runtime. Due to this, javascript can be used to add different effects to webpages. On the other hand, javascript could be used on the server side as well. For example, in Alfresco which is a popular open source enterprise content management system, javascript is used in creating webscripts. This makes adding custom tasks to alfresco quite simple.

3. Functional programming language
In javascript, function could be assigned to variables just like any other data types. Not only that, but a function can accept another function as a parameter and can also return a function. You can have functions with no name as well. Clearly, this gives you the ability to code in functional programming style.

4. Support for objects
Javascript is an object oriented language. However, the way javascript handles objects and inheritance is bit different from conventional object oriented programming languages like Java. Due to this, javascript supports most of the object oriented concepts while being simple to learn and use.


Back to JavaScript Tutorial Page

JavaScript Tutorial

JavaScript is the Scripting language used to add functionality,Validtae forms,Communicate with the server and much more. JavaScript is an implementation of the ECMAScript language standard, primarily used in the form of client-side Script, implemented as part of a web browser in order to provide enhanced user interfaces and dynamic websites.

ECMAScript is the scripting language standardized by Ecma International in the ECMA-262 specification and ISO/IEC 16262. The language is widely used for client-side scripting on the web.

JavaScript was originally developed by Brendan Eich of Netscape in 1995 under the name Mocha,later LiveScript, and finally renamed to JavaScript.

Javascript key code numbers and the ACSII numbers that represent the character.


09  =
Tab
11  =
Home
13  =
Enter
32  =
Space Bar
33  =   !
34  =   "
35  =   #
36  =   $
37  =   %
38  =   &
39  =   '
40  =   (
41  =   )
42  =   *
43  =   +
44  =   ,
45  =   -
46  =   .
47  =   /
48  =   0
49  =   1
50  =   2
51  =   3
52  =   4
53  =   5
54  =   6
55  =   7
56  =   8
57  =   9
58  =   :
59  =   ;
60  =   <
61  =   =
62  =   >
63  =   ?
64  =   @
65  =   A
66  =   B
67  =   C
68  =   D
69  =   E
70  =   F
71  =   G
72  =   H
73  =   I
74  =   J
75  =   K
76  =   L
77  =   M
78  =   N
79  =   O
80  =   P
81  =   Q
82  =   R
83  =   S
84  =   T
85  =   U
86  =   V
87  =   W
88  =   X
89  =   Y
90  =   Z
91  =   [
92  =  
93  =   ]
94  =   ^
95  =   -
96  =   `
97  =   a
98  =   b
99  =   c
100  =   d
101  =   e
102  =   f
103  =   g
104  =   h
105  =   i
106  =   j
107  =   k
108  =   l
109  =   m
110  =   n
111  =   o
112  =   p
113  =   q
114  =   r
115  =   s
116  =   t
117  =   u
118  =   v
119  =   w
120  =   x
121  =   y
122  =   z
123  =   {
124  =   |
125  =   }
126  =   ~

Basic .NET, ASP.NET, OOPS and SQL Server Interview questions


Basic .NET, ASP.NET, OOPS and SQL Server Interview questions and answers.

·         What is IL code, CLR,CTS,GAC,GC?>

·         How can we do Assembly versioning?

·         can you explain how ASP.NET application life cycle and page life cycle events fire?

·         What is the problem with Functional Programming?

·         Can you define OOP and the 4 principles of OOP?

·         What are Classes and Objects?

·         What is Inheritance?

·         What is Polymorphism, overloading, overriding and virtual?

·         Can you explain encapsulation and abstraction?

·         What is an abstract class?

·         Define Interface & What is the diff. between abstract & interface?

·         What problem does Delegate Solve ?

·         What is a Multicast delegate ?

·         What are events and what's the difference between delegates and events?

·         How can we make Asynchronous method calls using delegates ?

·         What is a stack, Heap, Value types and Reference types ?

·         What is boxing and unboxing ?

·         Can you explain ASP.NET application and Page life cycle ?

·         What is Authentication, Authorization, Principal & Identity objects?

·         How can we do Inproc and outProc session management ?

·         How can we windows , forms and passport authentication and authorization in ASP.NET ?

·         In a parent child relationship which constructor fires first ?



Complete .NET invoicing project end to end

·         Introduction to .NET Projects

·         Different levels of Programming

·         Necessary Tools

·         What should we learn ?

·         The IIS

·         Making UI using .net IDE

·         Database, The SQL Server

·         Connecting ASP.net with Database

·         Loading the Data Grid

·         Update and Delete

·         Validations

·         Issue with the Code

·         Two Tier Architecture

·         Three Tier Architecture

·         Database Normalization

·         Session and State Management

·         Using Enterprise Application Block

·         Aggregation and Composition

·         Implementing Interfaces and Factory

·         Inheritance relationship

·         Abstract Class Implementation

.NET best practices and SQL Server Training / Interview Questions and Answers

·         Basics :- Query plan, Logical operators and Logical reads

·         Point 1 :- Unique keys improve table scan performance.

·         Point 2 :- Choose Table scan for small & Seek scan for large records

·         Point 3 :- Use Covering index to reduce RID (Row Identifier) lookup

·         Point4:- Keep index size as small as possible.

·         Point5:- use numeric as compared to text data type.

·         Point6:- use indexed view for aggregated SQL Queries

·         Finding high memory consuming functions

·         Improve garbage collector performance using finalize/dispose pattern

·         How to use performance counters to gather performance data

WCF,WPF,Silverlight ,LINQ, Azure and EF 4.0 interview question and answers

·         What is SOA, Services and Messages ?

·         What is the difference between Service and Component?

·         What are basic steps to create a WCF service ?

·         What are endpoints, address, contracts and bindings?

·         What are various ways of hosting WCF service?

·         What is the difference of hosting a WCF service on IIS and Self hosting?

·         What is the difference between BasicHttpBinding and WsHttpBinding?

·         How can we do debugging and tracing in WCF?

·         Can you explain transactions in WCF (theory)?

·         How can we self host WCF service ?

·         What are the different ways of implementing WCF Security?

·         How can we implement SSL security on WCF(Transport Security)?

·         How can we implement transport security plus message security in WCF ?

·         How can we do WCF instancing ?

·         How Can we do WCF Concurency and throttling?

·         Can you explain the architecture of Silverlight ?

·         What are the basic things needed to make a silverlight application ?

·         How can we do transformations in SilverLight ?

·         Can you explain animation fundamentals in SilverLight?

·         What are the different layout methodologies in SilverLight?

·         Can you explain one way , two way and one time bindings?

·         How can we consume WCF service in SilverLight?

·         How can we connect databases using SilverLight?

·         What is LINQ and can you explain same with example?

·         Can you explain a simple example of LINQ to SQL?

·         How can we define relationships using LINQ to SQL?

·         How can we optimize LINQ relationships queries using ‘DataLoadOptions’?

·         Can we see a simple example of how we can do CRUD using LINQ to SQL?

·         How can we call a stored procedure using LINQ?

·         What is the need of WPF when we had GDI, GDI+ and DirectX?

·         Can you explain how we can make a simple WPF application?

·         Can you explain the three rendering modes i.e. Tier 0 , Tier 1 and Tier 2?

·         Can you explain the Architecture of WPF?

·         What is Azure?

·         Can you explain Azure Costing?

·         Can we see a simple Azure sample program?

·         What are the different steps to create a simple Worker application?

·         Can we understand Blobs in steps, Tables & Queues ?

·         Can we see a simple example for Azure tables?

·         What is Package and One click deploy(Deployment Part - 1) ?

·         What is Web.config transformation (Deployment Part-2)?

·         What is MEF and how can we implement the same?

·         How is MEF different from DIIOC?

·         Can you show us a simple implementation of MEF in Silverlight ?

Design pattern, Estimation, VSTS, Project management interview questions and answers

Design Pattern Training / Interview Questions and Answers

·         Introduction

·         Factory Design Pattern

·         Abstract Factory Design Pattern

·         Builder Design Pattern

·         Prototype Design Pattern

·         Singleton Design Pattern

·         Adapter Design Pattern

·         Bridge Design Pattern

·         Composite Design Pattern

·         Decorator Design Pattern

·         Facade Design Pattern

·         Flyweight Design Pattern

·         Proxy Design Pattern

·         Mediator Design Pattern

·         Memento Design Pattern

·         Interpreter Design Pattern

·         Iterator Design Pattern

·         COR Design Pattern

·         Command Design Pattren

·         State Design Pattern

·         Strategy Design Pattern

·         Observer Design Pattern

·         Template Design Pattern

·         Visitor Design Pattern

·         Dependency IOC Design pattern

·         MVC , MVP , DI IOC and MVVM Training / Interview Questions and Answers



UML Training / Interview Questions and Answers

·         Introduction

·         Use Case Diagrams

·         Class Digrams

·         Object Diagrams

·         Sequence Digrams

·         Collaboration Diagrams

·         Activity Diagram

·         State chart Diagrams

·         Component Diagrams

·         Deployment Diagrams

·         Stereo Types Diagrams

·         Package Diagram and UML Project Flow.

Function points Training / Interview Questions and Answers

·         Introduction

·         Application Boundary

·         EI Fundamentals

·         EO Fundamentals

·         EQ Fundamentals

·         EIF

·         Fundamentals

·         ILF Fundamentals

·         GSC Fundamentals

·         Productivity Factor

·         Costing and a complete estimation of customer screen using function points.

·         FXCOP and Stylecop Training / Interview Questions and Answers



VSTS Training / Interview Questions and Answers

·         VSTS questions and answer videos

·         What is Unit Testing & can we see an example of the same?

·         How can we write data driven test using NUNIT & VS Test?

·         Can we see simple example of a unit test for database operation?

·         How can we do automated testing using Visual Studio Test?

·         How can we do Load Testing using VSTS test?

·         Can you explain database unit testing?

·         How can we do test coverage using VSTS system?

·         How can we do manual Testing using VSTS?

·         What is Ordered Test in VSTS test?




Enterprise Application Blocks Training

·         Introduction

·         Validation Application Block

·         Logging Application Block

·         Exception error Handling

·         Data Application Block

·         Caching Application Block

·         Security Application Block

·         Policy Injection Application Block and

·         Unity Application Block

Share point interview Training / Interview Questions and Answers videos

·         What is SharePoint, WSS and MOSS?

·         How does WSS actually work?

·         What is Site and SiteCollection?

·         What is the use of SQL server in SharePoint & use of Virtual path provider?

·         What is Ghosting and UnGhosting in SharePoint?

·         How can we create a site in SharePoint?

·         How can we Customize a SharePoint Site?

·         What kind of readymade functional modules exists collaboration?

·         Can you display a simple Custom Page in SharePoint?

·         How can we implement behind code ASPX pages in SharePoint?

·         What is the concept of features in SharePoint?

·         I want a feature to be only displayed to admin?

·         How do we debug SharePoint error’s?

·         Why customized pages are parsed using no-compile mode?

·         Can you explain WSS model?

·         How can we use custom controls in SharePoint?

·         How can we display ASCX control in SharePoint pages?

·         What are Web Parts?

·         How can we deploy a simple Webpart in SharePoint?

·         How can we achieve customization and personalization using WebParts?

·         How can we create custom editor for WebPart?

·         SharePoint is about centralizing documents, how similar is to the windows folder?

·         What are custom fields and content types?

·         Can you explain SharePoint Workflows?

·         What is a three-state Workflow in SharePoint?

·         How can we create sharepoint workflow using sharepoint designer?