Labels

Friday, December 12, 2014

Creating a Setup Project in Visual Studio-2010

  1. Add a setup project in your project solution by
    Right Click on Solution -> Add -> New project
  2. Add New Project window opens. Select Setup Project by
    Other Project Types -> Setup and Deployment -> Visual Studio Installer
  3. Give some name to your setup project and click OK
  4. Setup Project gets added into your project solution.
  5. Right click on your setup project
  6. Go to Add option and then Project Output
  7. Select Primary Output of in the list box and select your application in the top combo box. Now click OK.
  8. Again right click on your setup project and Go to View option and then Custom Actions
  9. Now Custom Actions window gets opened. Right click the Custom Actions and then Add Custom Action…
  10. A window opens, now you have to double click Application Folder option. Doing this, you get to see Primary output from “Your Project”. Select that option and click OK
  11. You would see that primary output of your project gets added in Install, Commit, Rollback and Uninstall option.
  12. Make sure that your setup project is got added into your project solution.
  13. Right click the project solution and open the property, go to the Configuration and select the Build option
    Build the whole project.
  14. Now you can install your application by right click the Setup project and choose Install option.
  15. Your app gets installed successfully! You can reach its exe in the default path in your setup. (Generally default path is like…C:\Program Files\YourCompanyName\).

Tuesday, August 12, 2014

Java quiz 1 Answer

Java quiz 1 Answer
  1.  B
  2.  B,D,E
  3. D-At line 3, we created a string object and its value is 'Java'. Because no new assignment was made, the new String object created with the 'concat()' method and the 'replace()' method was abandoned instantly. In the end, the value of 's' remains 'Java'
  4.  False- The code segments B and D will compile without any error. A is not a valid way to construct a StringBuffer, you need to create a StringBuffer object using "new". B is a valid construction of a Boolean (any string other than "true" or "false" to the Boolean constructor will result in a Boolean with a value of "false"). C will fail to compile because the valid range for a byte is -128 to +127 (i.e., 8 bits, signed). D is correct, 0x1234 is the hexadecimal representation in java. E fails to compile because the compiler interprets 1.2 as a double being assigned to a float (down-casting), which is not valid. You either need an explicit cast, as in "(float)1.2" or "1.2f", to indicate a float.

Java Quiz 1

Q1- 
1. class Ex1{
2.   public static void main(String[] args) {
3.      int a[][] = new int[3][];
4.       a[1] = new int[]{1,2,3};
5.       a[2] = new int[]{4,5};
6.    System.out.print(a[1][1]);
7.    }
8.  }
 
Which is the output?

A. Compilation fails due to line 3.
B. Compilation fails due to line 4.
C. An exception will be thrown in runtime.
D. 2
E. 3
F. 5
 Ans 
Q2.
 
Choose the three legal identifiers.
A. 1stName
B. _4_
C. @name
D. $
E. getSize
 Ans:
Q3.


Given
1. class S{ 
2. public static void main(String [] args){ 
3. String s = "Java"; 
4. s.concat(" SE 6"); 
5. s.replace('6','7'); 
6. System.out.print(s); 
7. } 
8. }
What is the result?

A. Java SE 6
B. Java SE 7
C. Java SE
D. Java
E. Compilation fails.
  Ans 
Q4.
In the following pieces of code, A and D will compile without any error. True or false?
A: StringBuffer sb1 = "abcd";
B: Boolean b = new Boolean("abcd");
C: byte b = 255;
D: int x = 0x1234;
E: float fl = 1.2;
True
False
 Ans 
 

Thursday, August 7, 2014

How to get back lost PhpMyAdmin password?


 Ans: Your credentials should be the same as you used to login to your Hosting account.