Tuesday, April 29, 2014

Peer code review

Java Code Review Tools




 2. 
https://developers.google.com/java-dev-tools/download-codepro?csw=1

Java
AgileJ StructureViews – Reverse engineered Java class diagrams with an emphasis on filtering.
ObjectWeb ASM – allows decomposing, modifying, and recomposing binary Java classes (i.e. bytecode).
Checkstyle – Besides some static code analysis, it can be used to show violations of a configured coding standard.
FindBugs – An open-source static bytecode analyzer for Java (based on Jakarta BCEL) from the University of Maryland.
GrammaTech CodeSonar – Defect detection (Buffer overruns, memory leaks, ...), concurrency and security checks, architecture visualization and software metrics for C, C++ and Java source code.
IntelliJ IDEA– Cross-platform Java IDE with own set of several hundred code inspections available for analyzing code on-the-fly in the editor and bulk analysis of the whole project.
Jtest – Testing and static code analysis product by Parasoft.
LDRA Testbed – A software analysis and testing tool suite for Java.
PMD – A static ruleset based Java source code analyzer that identifies potential problems.
SemmleCode – Object oriented code queries for static program analysis.
SonarJ – Monitors conformance of code to intended architecture, also computes a wide range of software metrics.
Soot – A language manipulation and optimization framework consisting of intermediate languages for Java.
Squale – A platform to manage software quality (also available for other languages, using commercial analysis tools though).
JavaScript
Closure Compiler – JavaScript optimizer that rewrites code to be faster and smaller, and checks use of native JavaScript functions.
JSLint – JavaScript syntax checker and validator.
JSHint – A community driven fork of JSLint.

Friday, April 25, 2014

JAVA INTERVIEW QUESTION

  • whats inline thread?
  • iterate thro a hasmap and print values
  • How to sort arraylist?
  • whats bean managed transaction - ejb
  • whats named query - hibernate
  • whats the use of having keyword - sql
  • oracle stored procedure and functions
  • various types of struts actions
  • whos responsible for serilization .
  • is there any chance for deadlock in java
  • Deadlock describes a situation where two or more threads are blocked forever, waiting for each other.
  • spring simpleform controlller and method
  • whats webservice?
  • a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards.[1]
  • what are jsp core librabries?
  • Core Tags
  • Formatting tags
  • SQL tags
  • XML tags
  • JSTL Functions
  • various level of synchronization?
1)Method level Synchronization: A method can be Synchronized by adding a perfix word "Synchronize". Here we have Parametrised Synchronization options also.
1)Method level Synchronization: A method can be Synchronized by adding a perfix word "Synchronize". Here we have Parametrised Synchronization options also.
example: public Synchronize void foo(){}
2)Block level Synchronization: A block can be Synchronized by adding a perfix word "Synchronize". Here we have Parametrised Synchronization options also.
Synchronize {    }

  • how to call stroed procedure from hibernate

...

     name="com.mkyong.common.Stock" table="stock" ...>
         name="stockId" type="java.lang.Integer">
             name="STOCK_ID" />
             class="identity" />
        
name="stockCode" type="string"> name="STOCK_CODE" length="10" not-null="true" unique="true" /> ...   name="callStockStoreProcedure"> alias="stock" class="com.mkyong.common.Stock"/> <![CDATA[CALL GetStocks(:stockCode)]]>  

Wednesday, April 16, 2014

TypeError: jQuery.toJSON is not a function

I'm trying to use jQuery and Ajax and I use this method. but I get the error $.toJSON is not a function in my firebug . where is the problem? I use jquery 1.3.2 . thanks
  $(document).ready(function () {
        $("#S1").click(function 
            () {
            $("#t1").slideToggle("fast");
            $("#S1").css("background-color", "yellow");
            var ID = $("#HiddenField2").attr("Value");
            var params = new Object();
            params.Key = ID;
            $.ajax({
                type: "POST",
                url: "viewMessages.aspx/readen",
                data: $.toJSON(params),
                contentType: "application/json",
                dataType: "json",
                success: function () {

                }
            });
        });
    });

There is no $.toJSON() function: http://api.jquery.com/jQuery.toJSON. Perhaps you want to use JSON.stringify() instead.
This error occurs because of jquery-json library missing. follow the url https://code.google.com/p/jquery-json to download.