Monthly Archives: August 2017

Print Nested List in List using R

#Lists in R list1 <-list(c(“A”,”B”,”C”),”B”) print(list1) Advertisements

Posted in R, Uncategorized | Leave a comment

Print List using R

#Lists in R list1 <-list(“A”,”B”) print(list1)   How to execute code online : http://www.r-fiddle.org/

Posted in R, Uncategorized | Leave a comment

Print Using R

#This is my first R Code myString <-“Hello R” print(myString)

Posted in R, Uncategorized | Leave a comment

Start Appium for IOS

appium –app /Users/ANIMBALKAR/Downloads/Money_Center.QA_new.ipa -U 4fa2db71161d1d05bb4db2474166cc8702464e45

Posted in Uncategorized | Leave a comment

Using Dictionary Python

”’ Created on Aug 11, 2017 @author: asharda ”’ legs={“human”:2,”cats”:4} for leg in legs: num=legs[leg] print(‘A %s has %d legs’ %(leg,num))

Posted in Python | Leave a comment

Using Stream API Java

import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; import org.testng.annotations.Test; public class FilterTest { @Test public void testNotNull() { Stream<String> language=Stream.of(“java”,”python”,null); List<String> list=language.filter(x->x!=null).collect(Collectors.toList()); list.forEach(System.out::println); } @Test public void testNonZero() { Stream<Integer> numbers=Stream.of(1,2,3,0); List<Integer> list=numbers.filter(x->x!=0).collect(Collectors.toList()); list.forEach(System.out::println); } }

Posted in Java, Uncategorized | Leave a comment

Using Enums

public enum Calculate { PLUS, MINUS, DIVIDE, MULTIPLY; public long operation(long x,long y) throws Exception { switch(this) { case PLUS: return x+y; case MINUS: return x-y; case MULTIPLY: return x*y; case DIVIDE: return x/y; default: throw new Exception(“No Matching Enum”); … Continue reading

Posted in Java, Uncategorized | Leave a comment