remove cricket files
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/0c047de2 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/0c047de2 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/0c047de2 Branch: refs/heads/master Commit: 0c047de2917240dde0fb865b6812f55f78dd07a6 Parents: 3b7cd88 Author: asankasa <[email protected]> Authored: Mon Oct 13 10:39:02 2014 +0530 Committer: Imesh Gunaratne <[email protected]> Committed: Thu Nov 13 10:56:28 2014 +0530 ---------------------------------------------------------------------- .../out/production/untitled/Cricket.class | Bin 1897 -> 0 bytes .../out/production/untitled/Cricket1.class | Bin 733 -> 0 bytes .../out/production/untitled/NumberGrid.class | Bin 2379 -> 0 bytes .../untitled/out/production/untitled/test.class | Bin 2164 -> 0 bytes components/untitled/src/Cricket.java | 94 ---------------- components/untitled/src/Cricket1.java | 16 --- components/untitled/src/NumberGrid.java | 106 ------------------- components/untitled/src/test.java | 86 --------------- 8 files changed, 302 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/0c047de2/components/untitled/out/production/untitled/Cricket.class ---------------------------------------------------------------------- diff --git a/components/untitled/out/production/untitled/Cricket.class b/components/untitled/out/production/untitled/Cricket.class deleted file mode 100644 index 6188da5..0000000 Binary files a/components/untitled/out/production/untitled/Cricket.class and /dev/null differ http://git-wip-us.apache.org/repos/asf/stratos/blob/0c047de2/components/untitled/out/production/untitled/Cricket1.class ---------------------------------------------------------------------- diff --git a/components/untitled/out/production/untitled/Cricket1.class b/components/untitled/out/production/untitled/Cricket1.class deleted file mode 100644 index 59fea0d..0000000 Binary files a/components/untitled/out/production/untitled/Cricket1.class and /dev/null differ http://git-wip-us.apache.org/repos/asf/stratos/blob/0c047de2/components/untitled/out/production/untitled/NumberGrid.class ---------------------------------------------------------------------- diff --git a/components/untitled/out/production/untitled/NumberGrid.class b/components/untitled/out/production/untitled/NumberGrid.class deleted file mode 100644 index 86e7088..0000000 Binary files a/components/untitled/out/production/untitled/NumberGrid.class and /dev/null differ http://git-wip-us.apache.org/repos/asf/stratos/blob/0c047de2/components/untitled/out/production/untitled/test.class ---------------------------------------------------------------------- diff --git a/components/untitled/out/production/untitled/test.class b/components/untitled/out/production/untitled/test.class deleted file mode 100644 index e42be12..0000000 Binary files a/components/untitled/out/production/untitled/test.class and /dev/null differ http://git-wip-us.apache.org/repos/asf/stratos/blob/0c047de2/components/untitled/src/Cricket.java ---------------------------------------------------------------------- diff --git a/components/untitled/src/Cricket.java b/components/untitled/src/Cricket.java deleted file mode 100644 index 021e9eb..0000000 --- a/components/untitled/src/Cricket.java +++ /dev/null @@ -1,94 +0,0 @@ -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; - -public class Cricket { - - static String[] days = { "mon", "tues", "wed", "thu", "fri", "sat", "sun" }; - static int[] day30 = { 4, 6, 9, 11 }; - static int[] day31 = { 1, 3,5,7,8,10,12}; - - public static int getMonth() { - - - int dayOne = 1; - String curMon = "Jan"; - String curDay = "wed"; - int curYr = 2014; - - int count = 1; - int newDay = 29; - boolean monExits = false; - - - if (!monExits) { - if (curYr % 4 == 0) { - - } else { - count--; - } - } - return count; - } - - - - public static void main(String[] args) throws IOException { - - - boolean monExits = false; - BufferedReader inp = new BufferedReader( new - InputStreamReader(System.in)); - int T = Integer.parseInt(inp.readLine()); - - for (int i = 2014; i < 2014 + T; i++) { - - for(int month=1; month<=12; month++){ - - //if mont has 30 days - - for (int a : day30) { - if (a == month) { - // count++; - monExits = true; - - } - } - for (int a : day31) { - if (a == month) { - // count=count+2; - monExits = true; - - - - } - } - - if(monExits==false){ - - //day 29,30 - - } - - - - } - - - - - } - - - /* - * countDays(); - * - * HashMap<Integer, String[]> months = new HashMap<>(); months.put(30, - * new String[] { "Apr", "June", "Sep", "Nov" }); months.put(31, new - * String[] { "Jan", "Mar", "May", "July", "Aug", "Oct", "Dec" }); - * - * System.out.println(months.get(30)); - */ - - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/0c047de2/components/untitled/src/Cricket1.java ---------------------------------------------------------------------- diff --git a/components/untitled/src/Cricket1.java b/components/untitled/src/Cricket1.java deleted file mode 100644 index e19bea6..0000000 --- a/components/untitled/src/Cricket1.java +++ /dev/null @@ -1,16 +0,0 @@ -import java.util.Scanner; - -/** - * Created by sanjaya on 10/11/14. - */ -public class Cricket1 { - - public static void main(String args[]){ - - Scanner scanner = new Scanner(System.in); - int x = scanner.nextInt(); - - - System.out.println(35 +" " +33 +" "+ 68); - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/0c047de2/components/untitled/src/NumberGrid.java ---------------------------------------------------------------------- diff --git a/components/untitled/src/NumberGrid.java b/components/untitled/src/NumberGrid.java deleted file mode 100644 index 38fab79..0000000 --- a/components/untitled/src/NumberGrid.java +++ /dev/null @@ -1,106 +0,0 @@ -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.util.ArrayList; - - -public class NumberGrid { - - - public static void main(String args[]) throws IOException { - - - BufferedReader stdin = new BufferedReader(new InputStreamReader( - System.in)); - String line; - - String firstLineArray[] = new String[4]; - - - boolean readFirstLine = true; - - - ArrayList<int[]> arrayList = new ArrayList<int[]>(); - - while ((line = stdin.readLine()) != null && line.length() != 0) { - - if (readFirstLine) { - firstLineArray = line.split(" "); - readFirstLine = false; - } else { - - String[] strings = line.split(" "); - int[] ints = new int[strings.length]; - for (int i = 0; i < strings.length; i++) { - ints[i] = Integer.parseInt(strings[i]); - } - arrayList.add(ints); - } - - } - - int rows = Integer.parseInt(firstLineArray[0]); - int coloms = Integer.parseInt(firstLineArray[1]); - int height = Integer.parseInt(firstLineArray[2]); - int width = Integer.parseInt(firstLineArray[3]); - - - int total = 0; - int newTotal = 0; - - - //for each row - for (int YPosition = 0; YPosition + height <= rows; YPosition++) { - - for (int XPosition =0; XPosition+width <= coloms ; XPosition++) { - newTotal = 0; - - for (int j = YPosition; j < YPosition + height; j++) { - for (int k = XPosition; k < XPosition + width; k++) { - - newTotal += arrayList.get(j)[k]; - - - } - - } - if(total<newTotal){ - total = newTotal; - } - - } - } - - //change height into width and width into height and check again - - int temp; - temp = height; - height = width; - width = temp; - - //for each row - for (int YPosition = 0; YPosition + height <= rows; YPosition++) { - - for (int XPosition =0; XPosition+width <= coloms ; XPosition++) { - newTotal = 0; - - for (int j = YPosition; j < YPosition + height; j++) { - for (int k = XPosition; k < XPosition + width; k++) { - - newTotal += arrayList.get(j)[k]; - - } - - } - if(total<newTotal){ - total = newTotal; - } - - } - } - - System.out.println(total); - } - - -} http://git-wip-us.apache.org/repos/asf/stratos/blob/0c047de2/components/untitled/src/test.java ---------------------------------------------------------------------- diff --git a/components/untitled/src/test.java b/components/untitled/src/test.java deleted file mode 100644 index 3caaeba..0000000 --- a/components/untitled/src/test.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Created by sanjaya on 10/11/14. - */ -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; - -public class test{ - - - static String array1[] = new String[2]; - static double array2[] = new double[7]; - static double array3[] = new double[7]; - static int i =0; - - public static void main(String args[]) throws IOException { - - - BufferedReader stdin = new BufferedReader(new InputStreamReader( - System.in)); - String line; - - - while ((line = stdin.readLine()) != null && line.length() != 0) { - - array1 = line.split(" "); - array2[i]= Double.parseDouble(array1[0]); - array3[i]= Double.parseDouble(array1[1]); - - i++; - - - } - - - System.out.println(getPearsonCorrelation(array2, array3)); - - } - - public static double getPearsonCorrelation(double[] scores1,double[] scores2){ - - double result = 0; - - double sum_sq_x = 0; - - double sum_sq_y = 0; - - double sum_coproduct = 0; - - double mean_x = scores1[0]; - - double mean_y = scores2[0]; - - for(int i=2;i<scores1.length+1;i+=1){ - - double sweep =Double.valueOf(i-1)/i; - - double delta_x = scores1[i-1]-mean_x; - - double delta_y = scores2[i-1]-mean_y; - - sum_sq_x += delta_x * delta_x * sweep; - - sum_sq_y += delta_y * delta_y * sweep; - - sum_coproduct += delta_x * delta_y * sweep; - - mean_x += delta_x / i; - - mean_y += delta_y / i; - - } - - double pop_sd_x = (double) Math.sqrt(sum_sq_x/scores1.length); - - double pop_sd_y = (double) Math.sqrt(sum_sq_y/scores1.length); - - double cov_x_y = sum_coproduct / scores1.length; - - result = cov_x_y / (pop_sd_x*pop_sd_y); - - return result; - - } - -} \ No newline at end of file
