Skip to content

Instantly share code, notes, and snippets.

View pratiktest's full-sized avatar

pratikkale pratiktest

View GitHub Profile

Testing

install mocha

npm install mocha --save

TestNG

  • inspired from Junit and Nunit with new functionalities

Functionalities

  • Annotations
  • each method can have a thread
  • each class can have a thread to run
  • support for data driven testing

Setting up DAL to work with in-memory hsql db

1.Add reference to maven lib in pom.xml

    <properties>
        <hsqldb.version>2.3.2</hsqldb.version>
    </properties>
    <dependency>
      <groupId>org.hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
@pratiktest
pratiktest / 0_reuse_code.js
Created November 18, 2016 19:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@pratiktest
pratiktest / java.md
Last active December 28, 2016 21:22

Java learnings

  • There are two levels in java. Language level and binary level. We can code in Java 8 by setting the language level to java 8 but we can compile the code to java 7.
  • Mostly all parts are extensions of the java previous versions and can be compiled to equivalent previous java binary construct.
  • This is useful if certain library dosent work with the java 8 binary. for eg tha asm in spring 3 dosent work with java 8. If we want asm to work we need to upgrade to spring 4. But upgrading to spring 4 is not possible. So we can compile the code to java 7 by setting binary level to 7.
  • But what if we have java 8 constructs. the java compiler will try to compile them to equivalent java 7 binary construct. If it cant the compilation will fail and we will have to revert to upgrading spring.

Java 8

Optional

  • Array in C lvalue required
    #inlcude stdio.h
      int main(){
        int arr[5];
        arr++
      }
    
    
  • Note the arr+ will produce an error lvalue required

open settings view

cmd,

In settings view we can search for packages and install them alternatively we can also install package using apm command if we have a textmate equivalent bundle

apm init --package language-r --convert https://github.com/textmate/r.tmbundle

Create database

create database test

change to the database test

use test

Download nvm(node version manager)

  • download homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Homebrew installs packages to their own directory and then symlinks their files into /usr/local.