Monday, 28 November 2016

RDF

Resource Description Framework (RDF) Model and Syntax Specification

https://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#intro

Monday, 21 November 2016

PowerShell Need leading zero

Problem:
SET Today=%date:~4,2%%date:~7,2%%date:~10,4%%time:~0,2%%time:~3,2%%time:~6,5%.log
 echo %today%

If you run above script, you will get space, if the system time is AM.
Solution:
set hour=%time: =0%
SET Today=%date:~-4%%date:~4,2%%date:~7,2%_%hour:~0,2%%time:~3,2%%time:~6,2%.log
echo %Today%

Thursday, 17 November 2016

powershell PSScriptRoot one folder up

$ParentRootPath = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent # This one will give parent parent path
$RootPath = Split-Path $PSScriptRoot -Parent # This one will give parent path

Monday, 14 November 2016

C# Interview

Interview Questions
 1st Interview Questions
1. What are the differences between Abstract class and interface?
2. Why we need to use interface while abstract class is there?
3. Scenarios that we use Abstract class and interface?
4. What is lazy binding and early binding in C#? in other words tell about polymorphism.
5. What are the security mechanisms you follow to secure your application, DB and services?
6. What is SQL injection? and how to prevent it?
7. What are design patterns why we have to use them?
8. Explain three design patterns that you used in recent projects.
9. How do you ensure that you are writing an effective and error free code?
10. How you write your test project?
11. What is the Fake mechanism you use in the test project?
12. What are the the test frameworks you used so far?
13. How do you test the WCF services?
14. What is Agile methodology?
15. What is sprint?
16. How do you estimate your project?
17. How do you identify which sprint has to be delivered first?
19. What is memory leak?
20. What is Garbage collector?
21. Should we have to invoke the Garbage collector?
22. What would happen if the Garbage collector is not there?
23. How do you prevent class from being inherited?
24. Give me an algorithm for sorting mechanism?
25. Explain me about the bubble sort?
26. Is the bubble sort is efficient, if not what other algorithm should we use?
27. How do you ensure that your application is using resources effectively?
28. What are the security mechanism you follow in SQL SERVER?
29. Explain about different security mechanism available in Azure.
30. Have you used Nunit test framework? how did you implement your test project in that?
31. What is MVC?
32. Explain MVC architecture
33. Explain MVC life cycle.
34. Why i should go for MVC?
35. Explain Recursive algorithm
Questions
C# Questions

1.What is Run time polymorphism?
2.What is Compile Time polymorphism?
3.What is the difference between compile time and run time polymorphism?
4.How do you implement run time polymorphism?
5.What if you don't use virtual keyword?Can the method be overridden without using virtual keyword,if yes how?
6.Generics:Very in depth questions on generics ,where it  is inherited from etc.
7.Array declaration syntax.
8.Where is int data type derived from?


LINQ questions
1.Can you use LINQ with arrays.
Yes
Scenario : We have an array with 5 numbers:1,2,3,4,5.How do you write a LINQ query to return numbers >3
2.Do you use LINQ with only Entity Framework?
3.Where can you use LINQ?

Web Services

1.Difference between WCF and REST?
2.Why REST is more advantageous than normal web services, Comparision between web services,WCF and RESTFUL web services?
3.How do you add a web service to your project?
4.Service contract and operation contract differences.
5.What is fault contract?
6.How to access WSDL files?
7.What is WSDL?
8.Questions on svcutil.exe
9.Have you created WSDL files if yes how and how do you access them?
10.In what format data can be returned by WCF services.
11.You have web service which need to return data in two different formats to different clients .How do you do that?
12.You said restful web services don't return unnecessary information like metadata,What is the advantage.Anyways you will only call the methods when you need by creating a proxy and call the corresponding methods then what if metadata is available or not.

Testing:
1.Have you worked with automation testing and how?
2.Difference between TDD AND DDD.Very in depth questions on how you implement it in your project etc.
3.Questions on automation testing.
4.How do you make sure you have written enough test cases to test a particular scenario?
For example : I have a class and method to do simple addition,How many test cases you write and how do you know that you have written appropriate number of test cases.
5.What methods you use to compare the results in test cases?
6.Have you used any tool to verify whether you have written appropriate number of test cases?

General Questions:
1.Why did you mention you are expert in creating web services?
2.How many years of experience you have in web services?
3.Tell me about the projects you have done and technologies you worked with?

 2nd Interview questions

1. What is responsive design?
2. Why we have to use bootstrap?
3. Does angularjs support responsive design?
4. why we have to use angularJs?
5. Does angularJs support javascript?
6. What are the design pattern you worked on?
7. Why we have to go for TDD?
8. Is 100% code coverage possible in TDD? Justify
9. Is 100% code coverage possible in Agile? Justify
10. Why Agile? Justify
11. What is Scrum? 
12. Have you used Inversion of Control? and many arguments on this. Justify
13. What is dependency injection and explain me the scenarios you used it? and why you used it? again arguments on this.
14. What is difference between Async and await and how both are different from Task parallel library?
15. Are we able to use lamba expressions in TPL? if so then TPL is related to LINQ? Justify
16. What are the concepts you worked on Azure? 
17. Is azure deployment is tough, then what else you learned in Azure? Justify
18. What is Azure BLOB and Azure SQL and explain me how you used them in your projects?
19. Many discussions and questions on Interface, classes, properties, inheritance and how you deal with them.
20. What is TypeScript?
21. How you used ajax in MVC?
22. Questions about Repository patterns and its implementations in MVC.
23. What is SOLID principles?
24. What is Open/Close principle? many arguments on this
25. How are you sure that you are writing a good performance code?
26. Is documentation while writing the code is necessary? What if i give self explanatory names for classes and methods
    instead of writing comments? Justify. argument started again
27. Have you used Fake mechanism, and how you implemented it?
28. Explain me complex scenarios in your project? and many scenarios on that.
29. Explain me how you used Async and await in your project.
30. Explain me performance intensive scenarios in your project and how you handled it?
31. How Agile is different from Waterfall?
32. Why i should go for angularJS while javascript is there?
33. What is promise in Javascript?
34. More scenario questions and arguments on C#.
35. More performance questions on .Net and C#.
36. Various implementation scenarios and justifications.