Friday, December 28, 2012

Convert string to date in c#

Below code shows how to convert string which has both date and time to just the date without time.

string value = "1/1/2012 08:15:20";

DateTime dt = Convert.ToDateTime(value);
string shortDate = dt.ToShortDateString();

Accenture WPF interview questions for Experienced people

Accenture WPF Interview Questions

1. What is PRISM,CAL
2.Difference between MVVM,MVC patterns
3. Difference between Delegates and Events..How it is used in WPF Application.
4.How the MVVM Pattern works. Which layer talks to which layer like Model to viewmodel or vice versa?
5.Difference between SQL Server 2008,2005, 2008 R2.
6.Have you worked on SSRS?
7.You have hosted a WCF Service on one machine and if it goes down..what will you do?
8.2 dropdownlists in your WPF User control. if you change value in one dropdown how it will get notified to other dropdown?
9.Different ways of hosting/deploying wpf apps?
10. Have you used WPF Usercontrols in your WPF applications.
11.What are attached properties in WPF?
12. What are Dependency properties in WPF? Give an example where you have used in your project.
13.Is WPF a webbased or windows based application?

Saturday, September 1, 2012

Oracle Tips

1. To Implement Sleep function in PL/SQL use below code:
2. Any arithmetic expression containing a null always evaluates to null.
3. ORDER BY clause does not affect the ROWNUM of each row.
4. Why use RowNum
a. To limit the no. of rows returned by a query.
b. To assign unique value to each row of a table.
5. In order to create an empty copy of an existing table use below query:
SELECT * FROM old_table
WHERE 1 = 2;

SQL> Select the Duplicates with:

SELECT ename,empid FROM Emp
GROUP BY ename, empid

Delete the Duplicates with

DELETE from Emp A
WHERE (A.ename,A.empid) IN
    (SELECT B.ename, B.empid FROM Emp B
      WHERE A.ename= B.enameAND A.empid = B.empid
       AND A.rowid > B.rowid);