-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContestGenerateMy.java
More file actions
28 lines (24 loc) · 1.04 KB
/
Copy pathContestGenerateMy.java
File metadata and controls
28 lines (24 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author rn-sshawish
*/
public class ContestGenerateMy {
public static void main(String[] args) {
String [] metric = {"ft", "dn", "sfa", "rc", "rv", "rs"};
// for (int i = 0; i < metric.length; i++) {
// System.out.println(String.format("\"%s\" :{\"$sum\":\"$%s\"}", metric[i], metric[i]));
// System.out.println(String.format("\"%s\" :{\"$sum\":\"$%s\"}", metric[i]+"vid", metric[i]+"vid"));
// }
for (int i = 0; i < metric.length; i++) {
System.out.println();
System.out.println(String.format("contentGroup.put(\"%s\", new Document(\"$sum\",\"$%s\"));", metric[i], metric[i]));
System.out.println();
System.out.println(String.format("contentGroup.put(\"%s\", new Document(\"$sum\",\"$%s\"));", metric[i]+"vid", metric[i]+"vid"));
}
}
}