fix data collector
This commit is contained in:
parent
114bf972c6
commit
9eef07c494
|
@ -185,6 +185,12 @@
|
|||
<artifactId>guava</artifactId>
|
||||
<version>${guava.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.togglz</groupId>
|
||||
<artifactId>togglz-spring</artifactId>
|
||||
<version>2.1.0.Final</version>
|
||||
</dependency>
|
||||
|
||||
<!-- logging -->
|
||||
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
package org.baeldung.config;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.baeldung.reddit.util.MyFeatures;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.togglz.core.Feature;
|
||||
import org.togglz.core.manager.TogglzConfig;
|
||||
import org.togglz.core.repository.StateRepository;
|
||||
import org.togglz.core.repository.file.FileBasedStateRepository;
|
||||
import org.togglz.core.user.UserProvider;
|
||||
|
||||
@Configuration
|
||||
public class FeatureToggleConfig implements TogglzConfig {
|
||||
|
||||
@Override
|
||||
public Class<? extends Feature> getFeatureClass() {
|
||||
return MyFeatures.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StateRepository getStateRepository() {
|
||||
try {
|
||||
return new FileBasedStateRepository(new ClassPathResource("features.properties").getFile());
|
||||
} catch (final IOException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserProvider getUserProvider() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -13,7 +13,7 @@ public class ServletInitializer extends AbstractDispatcherServletInitializer {
|
|||
@Override
|
||||
protected WebApplicationContext createServletApplicationContext() {
|
||||
final AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext();
|
||||
context.register(PersistenceJPAConfig.class, WebConfig.class, SecurityConfig.class);
|
||||
context.register(PersistenceJPAConfig.class, WebConfig.class, SecurityConfig.class, FeatureToggleConfig.class);
|
||||
return context;
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,6 @@ public class ServletInitializer extends AbstractDispatcherServletInitializer {
|
|||
servletContext.addListener(new SessionListener());
|
||||
registerProxyFilter(servletContext, "oauth2ClientContextFilter");
|
||||
registerProxyFilter(servletContext, "springSecurityFilterChain");
|
||||
|
||||
}
|
||||
|
||||
private void registerProxyFilter(ServletContext servletContext, String name) {
|
||||
|
|
|
@ -3,6 +3,8 @@ package org.baeldung.reddit.classifier;
|
|||
import java.io.BufferedReader;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.util.Calendar;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.apache.mahout.classifier.sgd.L2;
|
||||
import org.apache.mahout.classifier.sgd.OnlineLogisticRegression;
|
||||
|
@ -18,6 +20,7 @@ public class RedditClassifier {
|
|||
|
||||
public static int GOOD = 0;
|
||||
public static int BAD = 1;
|
||||
public static int MIN_SCORE = 5;
|
||||
private final OnlineLogisticRegression classifier;
|
||||
private final FeatureVectorEncoder titleEncoder;
|
||||
private final FeatureVectorEncoder domainEncoder;
|
||||
|
@ -44,7 +47,7 @@ public class RedditClassifier {
|
|||
}
|
||||
|
||||
while ((line != null) && (line != "")) {
|
||||
category = (line.startsWith("good")) ? GOOD : BAD;
|
||||
category = extractCategory(line);
|
||||
trainCount[category]++;
|
||||
features = convertLineToVector(line);
|
||||
classifier.train(category, features);
|
||||
|
@ -76,7 +79,7 @@ public class RedditClassifier {
|
|||
Vector features;
|
||||
String line = reader.readLine();
|
||||
while ((line != null) && (line != "")) {
|
||||
category = (line.startsWith("good")) ? GOOD : BAD;
|
||||
category = extractCategory(line);
|
||||
evalCount[category]++;
|
||||
features = convertLineToVector(line);
|
||||
result = classify(features);
|
||||
|
@ -94,12 +97,21 @@ public class RedditClassifier {
|
|||
}
|
||||
|
||||
// ==== private
|
||||
private int extractCategory(String line) {
|
||||
final int score = Integer.parseInt(line.substring(0, line.indexOf(';')));
|
||||
return (score < MIN_SCORE) ? BAD : GOOD;
|
||||
}
|
||||
|
||||
private Vector convertLineToVector(String line) {
|
||||
final Vector features = new RandomAccessSparseVector(4);
|
||||
final String[] items = line.split(";");
|
||||
final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
|
||||
cal.setTimeInMillis(Long.parseLong(items[1]) * 1000);
|
||||
final int hour = cal.get(Calendar.HOUR_OF_DAY);
|
||||
|
||||
titleEncoder.addToVector(items[3], features);
|
||||
domainEncoder.addToVector(items[4], features);
|
||||
features.set(2, Integer.parseInt(items[1])); // hour of day
|
||||
features.set(2, hour); // hour of day
|
||||
features.set(3, Integer.parseInt(items[2])); // number of words in the title
|
||||
return features;
|
||||
}
|
||||
|
|
|
@ -2,9 +2,7 @@ package org.baeldung.reddit.classifier;
|
|||
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.baeldung.reddit.util.UserAgentInterceptor;
|
||||
|
@ -20,20 +18,20 @@ import com.google.common.base.Splitter;
|
|||
public class RedditDataCollector {
|
||||
public static final String TRAINING_FILE = "src/main/resources/train.csv";
|
||||
public static final String TEST_FILE = "src/main/resources/test.csv";
|
||||
public static final int LIMIT = 100;
|
||||
public static final Long YEAR = 31536000L;
|
||||
private final Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
private String postAfter;
|
||||
private Long timestamp;
|
||||
private final RestTemplate restTemplate;
|
||||
private final String subreddit;
|
||||
private final int minScore;
|
||||
|
||||
public RedditDataCollector() {
|
||||
restTemplate = new RestTemplate();
|
||||
final List<ClientHttpRequestInterceptor> list = new ArrayList<ClientHttpRequestInterceptor>();
|
||||
list.add(new UserAgentInterceptor());
|
||||
restTemplate.setInterceptors(list);
|
||||
subreddit = "all";
|
||||
minScore = 4;
|
||||
subreddit = "java";
|
||||
}
|
||||
|
||||
public RedditDataCollector(String subreddit, int minScore) {
|
||||
|
@ -42,35 +40,30 @@ public class RedditDataCollector {
|
|||
list.add(new UserAgentInterceptor());
|
||||
restTemplate.setInterceptors(list);
|
||||
this.subreddit = subreddit;
|
||||
this.minScore = minScore;
|
||||
}
|
||||
|
||||
public void collectData() {
|
||||
final int limit = 100;
|
||||
final int noOfRounds = 80;
|
||||
timestamp = System.currentTimeMillis() / 1000;
|
||||
try {
|
||||
final FileWriter writer = new FileWriter(TRAINING_FILE);
|
||||
for (int i = 0; i < noOfRounds; i++) {
|
||||
getPosts(limit, writer);
|
||||
getPosts(writer);
|
||||
}
|
||||
writer.close();
|
||||
|
||||
final FileWriter testWriter = new FileWriter(TEST_FILE);
|
||||
getPosts(limit, testWriter);
|
||||
getPosts(testWriter);
|
||||
testWriter.close();
|
||||
} catch (final Exception e) {
|
||||
logger.error("write to file error", e);
|
||||
}
|
||||
}
|
||||
|
||||
// ==== private
|
||||
|
||||
private void getPosts(int limit, FileWriter writer) {
|
||||
String fullUrl = "http://www.reddit.com/r/" + subreddit + "/new.json?limit=" + limit;
|
||||
if (postAfter != null) {
|
||||
fullUrl += "&count=" + limit + "&after=" + postAfter;
|
||||
}
|
||||
// ==== Private
|
||||
|
||||
private void getPosts(FileWriter writer) {
|
||||
final String fullUrl = "http://www.reddit.com/r/" + subreddit + "/search.json?sort=new&q=timestamp:" + (timestamp - YEAR) + ".." + timestamp + "&restrict_sr=on&syntax=cloudsearch&limit=" + LIMIT;
|
||||
try {
|
||||
final JsonNode node = restTemplate.getForObject(fullUrl, JsonNode.class);
|
||||
parseNode(node, writer);
|
||||
|
@ -82,22 +75,19 @@ public class RedditDataCollector {
|
|||
}
|
||||
|
||||
private void parseNode(JsonNode node, FileWriter writer) throws IOException {
|
||||
postAfter = node.get("data").get("after").asText();
|
||||
System.out.println(postAfter);
|
||||
String line;
|
||||
String category;
|
||||
List<String> words;
|
||||
final SimpleDateFormat df = new SimpleDateFormat("HH");
|
||||
int score;
|
||||
for (final JsonNode child : node.get("data").get("children")) {
|
||||
category = (child.get("data").get("score").asInt() < minScore) ? "bad" : "good";
|
||||
score = child.get("data").get("score").asInt();
|
||||
words = Splitter.onPattern("\\W").omitEmptyStrings().splitToList(child.get("data").get("title").asText());
|
||||
final Date date = new Date(child.get("data").get("created_utc").asLong() * 1000);
|
||||
timestamp = child.get("data").get("created_utc").asLong();
|
||||
|
||||
line = category + ";";
|
||||
line += df.format(date) + ";";
|
||||
line = score + ";";
|
||||
line += timestamp + ";";
|
||||
line += words.size() + ";" + Joiner.on(' ').join(words) + ";";
|
||||
line += child.get("data").get("domain").asText() + "\n";
|
||||
|
||||
System.out.println(line);
|
||||
writer.write(line);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
package org.baeldung.reddit.util;
|
||||
|
||||
import org.togglz.core.Feature;
|
||||
import org.togglz.core.annotation.EnabledByDefault;
|
||||
import org.togglz.core.annotation.Label;
|
||||
import org.togglz.core.context.FeatureContext;
|
||||
|
||||
public enum MyFeatures implements Feature {
|
||||
|
||||
@EnabledByDefault
|
||||
@Label("Prediction feature")
|
||||
PREDICTION_FEATURE;
|
||||
|
||||
public boolean isActive() {
|
||||
return FeatureContext.getFeatureManager().isActive(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
PREDICTION_FEATURE=false
|
|
@ -1,100 +1,100 @@
|
|||
bad;20;5;The President s Kill List;newyorker.com
|
||||
bad;20;8;Home stretch for the Ancient History Magazine Kickstarter;kickstarter.com
|
||||
good;20;20;A constant Burn to disk link under right click menu but there s no optical drive on retina Macbook Pro;i.imgur.com
|
||||
bad;20;8;Grey s be creeping on the button like;gph.is
|
||||
good;20;16;Droid Life First look at Moto 360 s Gorgeous and Impossible to Find Monolink Metal Band;droid-life.com
|
||||
bad;20;23;US Bleeding Hollow lt Unspoken gt has a couple spots open for our core team 3 7 M HM 10 10 H BRF;self.wowguilds
|
||||
bad;20;30;I drove up to Orlando for nothing I m by the science center What s some stuff I can do for cheap free so I don t waste my day;self.orlando
|
||||
bad;20;20;As we make computers more intelligent they ll eventually gain consciousness Then evolution would ve led to silicon based life;self.Showerthoughts
|
||||
bad;20;5;i am jealous and miserable;self.SuicideWatch
|
||||
bad;20;29;TIL that in addition to the recent gyrocopter landing the last person to land a helicopter on the White House or U S Capital lawn was also a Floridian;reddit.com
|
||||
good;20;7;When we finally arrived at Comic Con;i.imgur.com
|
||||
good;20;22;Just got a call that my OBGYN is out on an emergency for the next week I m being induced this Saturday;self.BabyBumps
|
||||
good;20;10;Scientists discover intense magnetic field close to supermassive black hole;sciencedaily.com
|
||||
bad;20;2;W ow;fap.to
|
||||
bad;20;8;Wedding Photographers did you love your wedding photographer;self.WeddingPhotography
|
||||
bad;20;38;This video reminds me of the hype in this sub for a Fallout 4 in New York Even though the style is a bit WAY off Most of the characters are a bit similar to the Fallout series;youtube.com
|
||||
good;20;6;Max the animatronic abandoned at Disney;i.imgur.com
|
||||
bad;20;2;Francia Expansions;self.HistoricalWorldPowers
|
||||
bad;20;10;When you learn autotools and discover all am in files;youtube.com
|
||||
good;20;1;Instincts;i.imgur.com
|
||||
bad;20;6;No more bing rewards for searches;self.beermoney
|
||||
bad;20;7;Launcher stops working when signing in HELP;self.GTAV
|
||||
bad;20;15;I m new to the gym amp changing my diet but I m loving it;self.loseit
|
||||
bad;20;9;Forbes The Chevy Bolt Tesla s Best News Yet;forbes.com
|
||||
bad;20;12;Forth Rail Bridge obscured by fog OS 720x720 x post r ScottishPhotos;i.imgur.com
|
||||
bad;20;2;Background score;self.Daredevil
|
||||
bad;20;4;To MIT Media Lab;bitcoin-gr.org
|
||||
good;20;3;Havana Street Art;self.cigars
|
||||
bad;20;4;Gear PRS Custom 24;self.Guitar
|
||||
bad;20;34;US Calif Co own a home with SO not married for 2 years Now we are breaking up and she only wants to give me my original down pymt instead of buying me out;self.legaladvice
|
||||
good;20;6;There s been a fur der;imgur.com
|
||||
good;20;17;ICA Use A Test Website UI Greg Miaskiewicz 0 40 1 5 min gt 95 gt 500;self.HITsWorthTurkingFor
|
||||
bad;20;8;balloon popping sound in 5 4 3 2;i.imgur.com
|
||||
good;20;12;My attempt at recreating the Imperial Insignia in the new teaser trailer;imgur.com
|
||||
bad;20;10;This is the most important thing on the internet today;youtu.be
|
||||
bad;20;6;A R Kane and Dirty Beaches;self.ambient
|
||||
bad;20;10;What is a good hot air soldering for a hobbyist;self.AskElectronics
|
||||
bad;20;8;Falconshield This Is War 4 Freljord COLLAB draggles;np.reddit.com
|
||||
bad;20;3;Sacramento home appraiser;sacramentovalleyappraisal.com
|
||||
bad;20;10;FIRST WALK OFF OF THE YEAR UPVOTE PARTY r CHICubs;reddit.com
|
||||
bad;20;23;Ukrainian notables politicians journalists react to murder of Kalashnikov and Buzhina See their fb posts in link Most popular opinion Putin did it;pravda.com.ua
|
||||
bad;20;4;Maclock watch for sale;self.MacMiller
|
||||
bad;20;2;me irl;imgur.com
|
||||
bad;20;7;Looking to recruit EU Aliance Outland BCH;self.wowraf
|
||||
bad;20;10;Trying to understand potential of the restaurant food truck industry;self.Entrepreneur
|
||||
bad;20;3;Democracy Now Bitcoin;bitcoin-gr.org
|
||||
good;20;4;Got pulled over today;self.motorcycles
|
||||
bad;20;7;ESPN Reporter Britt McHenry is a shitlord;liveleak.com
|
||||
bad;20;15;I m looking for places to buy local craft beers by the bottle Any suggestions;self.dayton
|
||||
bad;20;5;No username in login screen;self.techsupport
|
||||
good;20;7;Ads for the upcoming election in Alberta;youtube.com
|
||||
bad;20;11;Michael Savage Hillary Clinton s Looks Alone Could Sink The Campaign;rightwingwatch.org
|
||||
good;20;4;Another from People Magazine;imgur.com
|
||||
bad;20;10;ps4 LF2 CE CROTA CP need sword bearer Psn blackskyes;self.Fireteams
|
||||
bad;20;4;Dealing with Cho mid;self.summonerschool
|
||||
bad;20;3;C 3P0 Question;self.XWingTMG
|
||||
bad;20;10;DUNGEON HUNTER 5 HACK AND CHEATS TOOL RESOURCES GENERATOR UTILITY;self.maxgiron
|
||||
bad;20;11;I m searching for mature anime genre is not too relevant;self.Animesuggest
|
||||
bad;20;3;Cassie s hair;self.MortalKombat
|
||||
bad;20;6;Ha Ha Ha Ha 0 02;youtube.com
|
||||
bad;20;8;Can someone make a simple I hope profile;self.ChromaProfiles
|
||||
bad;20;5;I can t reinstall SMITE;self.Smite
|
||||
bad;20;19;TIL That in 1974 a US Army Private stole a helicopter and landed it at the White House Twice;en.wikipedia.org
|
||||
good;20;2;Rottweiler pup;imgur.com
|
||||
good;20;4;New stealth Bonnaroo additions;self.bonnaroo
|
||||
bad;20;5;Any Houston Rockets fans here;self.Eugene
|
||||
good;20;10;Pictures of Tube Televisions the moment they re Turned Off;imgur.com
|
||||
bad;20;10;Camping this summer with a 9 5 month old Tips;self.beyondthebump
|
||||
good;20;15;Toss this into your old 1 4 7 based packs to improve falling block rendering;minecraftforum.net
|
||||
good;20;13;StreetPass Thank You Bundle takes EXTRA 1 off the new Mii Plaza games;technologytell.com
|
||||
good;20;11;First Step of Becoming a Real Sissy M m F m;self.gonewildstories
|
||||
good;20;10;Big BART delays after apparent suicide at Civic Center station;sfgate.com
|
||||
bad;20;5;tornado sirens in northwest suburbs;self.Minneapolis
|
||||
good;20;2;Me irl;i.imgur.com
|
||||
bad;20;13;Kimi Raikkonen hints at Ferrari stay in 2016 if the team wants him;espn.co.uk
|
||||
bad;20;16;If you had to Explain a game of LoL in one Analogy what would it be;self.leagueoflegends
|
||||
good;20;6;What is your guilty pleasure song;self.AskReddit
|
||||
bad;20;14;Suggestion Don t unlock the next unit until you can afford to buy it;self.swarmsim
|
||||
good;20;1;Metal;imgur.com
|
||||
bad;20;6;TheFatRat Time Lapse House Electro 2015;soundcloud.com
|
||||
bad;20;22;Hey Reddit is it true that the silver fillings dentists put in our teeth contains mercury and could be harmful over time;self.AskReddit
|
||||
good;20;5;request Will Photoshop For Pizza;self.RandomActsOfPizza
|
||||
bad;20;13;My wife likes to put small things on the big thing shelf fixed;i.imgur.com
|
||||
bad;20;14;Mi novio es de M xico y quiero practicar con l pero estoy nerviosa;self.SpanishImmersion
|
||||
bad;20;5;Anybody have experience with PageFair;self.adops
|
||||
good;20;23;Osoba na snimci kriva je za nekoliko kra a bicikala po Zagrebu pa tako i maznuo jedan mom frendu Ako ga prepoznajete javite;youtube.com
|
||||
bad;20;9;Grogheads com Brother Against Brother The AAR Part 1;grogheads.com
|
||||
good;20;29;St Bernadette Soubirous Feast April 16th outside of France One of the many Incorrupt Saints She looked upon the face of the Blessed Virgin Mary 18 times at Lourdes;en.lourdes-france.org
|
||||
bad;20;18;My mom texted asking what food I want in the fridge including my preferred flavor of Greek yogurt;i.imgur.com
|
||||
good;20;18;Spoilers All If Dragon Age II had a subtitle s like Origins and Inquisition what would it be;self.dragonage
|
||||
bad;20;5;Best hidden places on campus;self.IndianaUniversity
|
||||
bad;20;8;Rematch Snack Santa Snackta is wonderful and generous;redditgifts.com
|
||||
bad;20;13;Half Of Yemen s Population Is Going Hungry As Violence Worsens UN Says;huffingtonpost.com
|
||||
good;20;6;RBC Heritage Round 1 Live Thread;self.dfsports
|
||||
bad;20;7;Feeling full all the time swollen liver;self.stopdrinking
|
||||
bad;20;9;Recent events for MLP Zero Hard treasure trail completed;self.TrueLionhearts
|
||||
bad;20;5;PS4 LF2 for NF Weekly;self.Fireteams
|
||||
bad;20;5;Stardust with Ocular by yitaku;soundcloud.com
|
||||
bad;20;4;PC M9 Bayonet Slaughter;self.GlobalOffensiveTrade
|
||||
good;20;2;Spare food;self.tampa
|
||||
3;1357021066;7;Good Examples of Component dragging and dropping;self.java
|
||||
0;1357017936;10;Game only works on mac need help porting to windows;self.java
|
||||
2;1357008210;4;eclipse or keyboard issues;self.java
|
||||
37;1356977564;6;The Long Strange Trip to Java;blinkenlights.com
|
||||
5;1356970069;9;How to Send Email with Embedded Images Using Java;blog.smartbear.com
|
||||
0;1356956937;4;What makes you architect;programming.freeblog.hu
|
||||
0;1356900338;4;Apache Maven I of;javaxperiments.blogspot.com
|
||||
0;1356896219;5;Custom functions per class instance;self.java
|
||||
0;1356891056;5;JMeter Performance and Tuning Tips;ubik-ingenierie.com
|
||||
12;1356888358;19;First fully functional GUI program about making acronyms easier to remember Was wondering if you guys had any tips;github.com
|
||||
2;1356881034;12;Social Tech 101 Why do I love Java Developer Edition Part 1;socialtech101.blogspot.com
|
||||
5;1356826782;7;Configurable deployment descriptors proposal for Java EE;java.net
|
||||
31;1356793800;16;Finished my very first game in java Snake clone It s not much but it works;self.java
|
||||
18;1356766107;10;la4j Linear Alebra for Java 0 3 0 is out;la4j.org
|
||||
1;1356747219;6;RubyFlux a Ruby to Java compiler;github.com
|
||||
15;1356735585;10;Simple JMS 2 0 Sample JMSDestinationDefinition and Synchronous Message Receive;blogs.oracle.com
|
||||
9;1356717174;3;Java Use WebCam;self.java
|
||||
4;1356711735;5;Compiler Optimisation for saving memory;self.java
|
||||
4;1356662279;22;I m interested in your opinion about Java for Python Programmers by Brad Miller or a better alternative for a Java newbie;self.java
|
||||
0;1356633508;4;A good android game;self.java
|
||||
4;1356631759;12;a java library i saw mentioned here can t find pls help;self.java
|
||||
1;1356627923;5;About learning Java a question;self.java
|
||||
0;1356623761;3;Objects and java2d;self.java
|
||||
0;1356593886;2;AffineTransform halp;self.java
|
||||
43;1356584047;7;Java Was Strongly Influenced by Objective C;cs.gmu.edu
|
||||
1;1356580543;7;Having trouble Setting Up Android Development Environment;self.java
|
||||
0;1356560732;13;How can I fetch the first X links of reddit into a list;self.java
|
||||
0;1356551788;4;JDK Download page error;self.java
|
||||
9;1356536557;12;looking for a good book website to learn intermediate core java spring;self.java
|
||||
7;1356487079;11;A popup menu like Filemaker s Any library have an implementation;self.java
|
||||
1;1356455255;6;Just a Few Helpful Solr Functions;ignatyev-dev.blogspot.ru
|
||||
13;1356433373;7;Bart s Blog Xtend the better compromise;bartnaudts.blogspot.de
|
||||
4;1356410180;3;Beginner Question Here;self.java
|
||||
19;1356283667;5;Nashorn JavaScript for the JVM;blogs.oracle.com
|
||||
0;1356234086;5;Problem with Java memory use;self.java
|
||||
0;1356195953;5;Learning Java in two weeks;self.java
|
||||
0;1356127053;10;Twitter4J Download a Twitter Users Tweets to a Text File;github.com
|
||||
20;1356118151;15;Using Apache Commons Functor functional interfaces with Java 8 lambdas cross post from r functionalprogramming;kinoshita.eti.br
|
||||
13;1356102153;7;Date and Time in Java 8 Timezones;insightfullogic.com
|
||||
10;1356088959;8;Implementing a collapsible ui repeat rows in JSF;kahimyang.info
|
||||
8;1356034544;5;OmniFaces 1 3 is released;balusc.blogspot.com
|
||||
1;1356027563;11;How to Configure a JNDI DataSource in the OpenShift Tomcat Cartridge;openshift.redhat.com
|
||||
82;1356020780;7;Doomsday Sale IntelliJ 75 off today only;jetbrains.com
|
||||
3;1355976320;3;IntelliJ Working Directory;self.java
|
||||
0;1355966433;5;Help with java problem please;self.java
|
||||
17;1355928745;12;What s new in Servlet 3 1 Java EE 7 moving forward;blogs.oracle.com
|
||||
11;1355864485;5;Quick poll for research project;self.java
|
||||
0;1355851994;5;Eclipse Text Problem Need Help;self.java
|
||||
29;1355823193;4;Java 8 vs Xtend;blog.efftinge.de
|
||||
2;1355805047;4;Learning Java between semesters;self.java
|
||||
6;1355798488;11;I m a beginner programmer any tips on where to start;self.java
|
||||
7;1355784039;9;Java Advent Calendar far sight look at JDK 8;javaadvent.com
|
||||
2;1355782111;9;Technical Interview coming up Suggestions Pointers Words of Wisdom;self.java
|
||||
0;1355775350;6;someone may help me out here;stackoverflow.com
|
||||
2;1355765235;14;THC and a bit of Thunking Creative ways to deal with multiple return types;kingsfleet.blogspot.it
|
||||
0;1355749586;12;Newbie here can you explain to me what class private stack is;self.java
|
||||
0;1355748318;4;When StackOverflow Goes Bad;blogs.windward.net
|
||||
0;1355721981;4;Java Graphics Projectile HELP;self.java
|
||||
0;1355719622;12;Which one of the following statements about object oriented programming is false;self.java
|
||||
16;1355707814;8;What s the skinny on JavaFX these days;self.java
|
||||
2;1355685929;20;Can someone explain exactly what Apache Ant is How does it differ from just creating a jar file in blueJ;self.java
|
||||
4;1355621071;7;Looking to add test code in Github;self.java
|
||||
7;1355613608;6;Java Version of Jarvis Must Haves;self.java
|
||||
5;1355599765;6;Java Advent Calendar Functional Java Collections;javaadvent.com
|
||||
7;1355597483;13;I m working on a text based RPG and I have some questions;self.java
|
||||
2;1355574445;6;Java EE 7 Community Survey Results;blog.eisele.net
|
||||
0;1355576629;4;Evolution of Java Technology;compilr.org
|
||||
18;1355574828;10;Are your Garbage Collection Logs speaking to you Censum does;blog.eisele.net
|
||||
10;1355559380;13;What is the best GUI tool for creating a 2d platformer in Java;self.java
|
||||
0;1355555357;7;Hit me with your best arrays tutorial;self.java
|
||||
10;1355542403;11;Does any one know of clean 2d graphics library for java;self.java
|
||||
23;1355511507;9;Dark Juno A Dark UI Theme for Eclipse 4;rogerdudler.github.com
|
||||
0;1355504132;10;Java devs that work remote I have a few questions;self.java
|
||||
0;1355501999;9;How do you make use of your Java knowledge;self.java
|
||||
1;1355492027;5;How ClassLoader works in Java;javarevisited.blogspot.com.au
|
||||
0;1355489352;9;Main difference between Abstract Class and Interface Compilr org;compilr.org
|
||||
48;1355487006;8;Date and Time in Java 8 Part 1;insightfullogic.com
|
||||
0;1355485766;3;Java JSON problem;self.java
|
||||
10;1355448875;16;Open source applications large small worth looking at in Java I want to understand application structure;self.java
|
||||
1;1355444452;4;lo mexor pz xxx;heavy-r.com
|
||||
0;1355402889;11;JRebel Remoting to Push Changes to Your Toaster in The Cloud;zeroturnaround.com
|
||||
0;1355402734;6;Are bugs part of technical debt;swreflections.blogspot.ca
|
||||
2;1355400483;9;Compile and Run Java programs with Sublime Text 2;compilr.org
|
||||
0;1355391115;4;console input like craftbukkit;self.java
|
||||
7;1355390023;8;Hosting suggestions needed for a java web app;self.java
|
||||
6;1355359227;17;Java novice here Have noticed funny performance differences across laptop and desktop Nvidia optimus related Details inside;self.java
|
||||
1;1355327090;18;Please advice which java server technology should I choose for this new web app in my new work;self.java
|
||||
0;1355326137;6;code to convert digits into words;compilr.org
|
||||
34;1355319442;7;I want to learn REAL WORLD Java;self.java
|
||||
5;1355285442;3;Hiring Java Developers;self.java
|
||||
0;1355282335;14;Help How can I count the amount of a specific integer in an ArrayList;self.java
|
||||
1;1355272303;24;I m taking a Java 1 final tomorrow I m fairly confident but I would appreciate any tips on things to look out for;self.java
|
||||
38;1355267143;6;Will Java become the next COBOL;self.java
|
||||
0;1355263047;2;Understanding recursion;imgur.com
|
||||
1;1355257558;15;How can I clear the command prompt terminal with java and make it cross platform;self.java
|
||||
2;1355253849;18;Is there a strategy for reducing code clutter when you are printing to the terminal alot Beginner Programmer;self.java
|
||||
1;1355253049;5;BlockingQueues and multiple producer threads;self.java
|
||||
1;1355241441;6;Beginner Struggling with classes Need help;self.java
|
||||
0;1355238089;8;Simple Steps to Merge PDF files using Java;compilr.org
|
||||
23;1355236940;8;Java and vs Python within a business context;self.java
|
||||
|
|
|
File diff suppressed because it is too large
Load Diff
|
@ -80,6 +80,7 @@ border-color: #ddd;
|
|||
</div>
|
||||
</form>
|
||||
<div>
|
||||
<c:if test="MyFeatures.PREDICTION_FEATURE.isActive()">
|
||||
<button id="checkbtn" class="btn btn-default disabled" onclick="predicateResponse()">Predicate Response</button>
|
||||
<span id="prediction"></span>
|
||||
|
||||
|
@ -104,6 +105,7 @@ function predicateResponse(){
|
|||
});
|
||||
}
|
||||
</script>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -56,6 +56,8 @@ public class PersistenceJPATest {
|
|||
alreadySentPost.setSent(true);
|
||||
alreadySentPost.setSubmissionDate(dateFormat.parse("2015-03-03 10:30"));
|
||||
alreadySentPost.setUser(userJohn);
|
||||
alreadySentPost.setSubreddit("funny");
|
||||
alreadySentPost.setUrl("www.example.com");
|
||||
postRepository.save(alreadySentPost);
|
||||
|
||||
notSentYetOld = new Post();
|
||||
|
@ -63,6 +65,8 @@ public class PersistenceJPATest {
|
|||
notSentYetOld.setSent(false);
|
||||
notSentYetOld.setSubmissionDate(dateFormat.parse("2015-03-03 11:00"));
|
||||
notSentYetOld.setUser(userTom);
|
||||
notSentYetOld.setSubreddit("funny");
|
||||
notSentYetOld.setUrl("www.example.com");
|
||||
postRepository.save(notSentYetOld);
|
||||
|
||||
notSentYet = new Post();
|
||||
|
@ -70,6 +74,8 @@ public class PersistenceJPATest {
|
|||
notSentYet.setSent(false);
|
||||
notSentYet.setSubmissionDate(dateFormat.parse("2015-03-03 11:30"));
|
||||
notSentYet.setUser(userJohn);
|
||||
notSentYet.setSubreddit("funny");
|
||||
notSentYet.setUrl("www.example.com");
|
||||
postRepository.save(notSentYet);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue