Month: October 2014

design pattern

—factory and abstract factory pattern in .net———- Note: – This is quiet a confusing architect question especially in design pattern section. Interviewer can take you for a nice ride. So get the difference in your heart. First read the definition provided in the first question about both these patterns. The common thing they have is that they belong to creational patterns.… Read more →

webservices terminology

Web services— Disco The Web Service Discovery Tool (DISCO) is used to discover the URLs of XML Web Services located on a Web server and saves documents related to each XML service on a local disk. The DISCO takes the URL and discovers and produce publishes discovery documents (.wsdl, .xsd, .disco and .dicomap files) as arguments. UDDI Universal Description, Discovery… Read more →

Apicontroller and controller differences

ASP.NET MVC public class TweetsController : Controller { // GET: /Tweets/ [HttpGet] public ActionResult Index() { return Json(Twitter.GetTweets(), JsonRequestBehavior.AllowGet); } } ASP.NET Web API public class TweetsController : ApiController { // GET: /Api/Tweets/ public List<Tweet> Get() { return Twitter.GetTweets(); } } The first major difference you will notice is that actions on Web API controllers do not return views, they… Read more →

sql query updated

–update table with swap between two columns update mmm_1 set id=phone,phone=id; –delete duplicate value from data table and select not duplicate also with x as( select empid,lname,deptno,rn=ROW_NUMBER() over (partition by deptno order by deptno),rn1=dense_rank() over (partition by deptno order by deptno), rn2=Rank() over ( order by deptno) from employees) delete x where x.rn>1; –delete all duplicate values delete employees where… Read more →

code for reverse string in c# and find duplicate record in jquery

static string reverse(string ss) { string[] strArray = ss.Split(‘ ‘) ; string revs=””; //int i = strArray.Length; StringBuilder sb = new StringBuilder(); for (int i = 0; i < strArray.Length; i++)   { string ty = string.Join(“”,strArray[i].Reverse().ToArray()); //            string firstLetter = strArray[i].Substring(0, 1); string firstLetter = ty.Substring(0, 1); //string secondPart = strArray[i].Substring(strArray[i].Length -2 ,0); string secondPart = ty.Substring(1);   sb.Append(firstLetter.ToUpper()… Read more →

Event preventDefault and stopPropagation difference

Event preventDefault: The event.preventDefault() method stops the default action of an element from happening. For example: Prevent a submit button from submitting a form Prevent a link from following the URL Event stopPropagation : The event.stopPropagation() method stops the bubbling of an event to parent elements, preventing any parent event handlers from being executed. -following link to get more about this event—… Read more →

Important HR Questions

Why did you resign from your previous job? I resign from my previous job because of my experience that I have and The salary was not so as my experience and my skills but I will be always thankful to my previous company there I lean how to keep calm at stressed position, how to complete task on time etc.… Read more →