Skip to main content

Posts

Showing posts from 2014

calculator

package com.play; import java.io.Console; import java.util.Scanner; public class Calculator { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("Enter a Numebr"); Scanner f= new  Scanner(System.in); int firstNum=f.nextInt(); System.out.println("Enter another Numebr"); Scanner s= new  Scanner(System.in); int SecondNum=s.nextInt(); System.out.println("Choose the following option 1: Add 2: substract 3: divide 4: multiply"); Scanner option= new  Scanner(System.in); int Choosedoption=option.nextInt(); switch (Choosedoption) { case 1: System.out.println(Add(firstNum,SecondNum)); case 2: System.out.println(Substract(firstNum,SecondNum)); case 3: System.out.println(Divide(firstNum,SecondNum)); case 4: System.out.println(Multiply(firstNum,SecondNum)); } } public static int Add(int firstnum, int secNum...

basic java

string text = "500"; int num = int.Parse (text); Console.WriteLine(num);       String text = "500"; int num = int.Parse (text); System.out.println(num); ----------------------------------------------------------- String text = "500";   int num = int.Parse (text);//incorrect int num = Integer.parseInt(text);//do this System.out.println(num);

Java inheritance question ?

package com.vit; public class InheritanceDemo {     public static void main(String args[])     {           Super1 super1 = new Super2();         super1.base1();                 Super2 super2 = new Super3();         super2.base1();             } } class Super1 {      public Super1()      {          System.out.println("with in super1()");      }      public void base1()      {          System.out.println("Base is called from super1");      } } class Super2 extends Super1 {      public Super2()      { ...

Shortcuts in eclipse

Shortcuts in eclipse control + shift + O = For importing all the class library control + f11= To run the java project f11= To run in debug perspective control + ? = to comment on the code control + space= For importing the class library and to find out the multiple option for class or methods   alt + shift + R= refactor: rename  alt+ shift + T= refactor : have an option for multiple choice.

KnockoutJS

KnockoutJS  Knockout is a JavaScript library that helps you to create rich, responsive display and editor user interfaces with a clean underlying data model. Any time you have sections of UI that update dynamically (e.g., changing depending on the user’s actions or when an external data source changes), KO can help you implement it more simply and maintainably. http://knockoutjs.com/documentation/introduction.html http://learn.knockoutjs.com/#/?tutorial=intro // This is a simple *viewmodel* - JavaScript that defines the data and behavior of your UI this . DisplayMyName = function ( ) {          var currentVal = this . lastName ( ) ;         // Read the current value          this . lastName ( "Suraj Shrestha" . toUpperCase ( ) ) ; // Write back a modified value      } function AppViewModel1 ( ) {      this . firstName = ko . observable ( "" ) ;   ...

Presentation topics

Topics for presentation : Knockout.js, Angular.js, Node,js, Kendo UI, MVC 4, Nuget, Ninject, Unity Framework, Dependency Injection , PMC Package Manager Control, Mordenizer, Moq, Json, Html5, Entity Framework code1st. Spring.net Castle Windsor , Structure Map and Microsoft Unity ,

Apache Jmeter:

Apache Jmeter: 1. For Regular Expression extractor http://community.blazemeter.com/knowledgebase/articles/65150-using-regex-regular-expression-extractor-with-jm 2. For Xpath Extractor http://blazemeter.com/blog/using-xpath-extractor-jmeter-0