Orange Juice
An opensource API Server of Online Judge.
一个开源的在线评测系统 API 服务器。
不涉及任何前端部分。
Light Online Judge. -- Let there be light
An opensource API Server of Online Judge.
一个开源的在线评测系统 API 服务器。
不涉及任何前端部分。
reform out team and reschedule the project and... finish it.
as the title goes
Review src/main/java/models/User.java
.
I run all the tests successfully in my own environment, whereas when pushing up and trying merging my branch into your master branch, the Travis logged and displayed errors as below:
Tests in error:
``SubmissionTest.TestXXX:24 » DuplicateKey Write failed with error code 11000 an...``
Tests run: 3, Failures: 0, Errors: 1, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.093 s
[INFO] Finished at: 2017-03-03T07:24:51+00:00
[INFO] Final Memory: 25M/335M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project orange-juice: There are test failures.
[ERROR]
[ERROR] Please refer to /home/travis/build/zccz14/Orange-Juice-Java/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
The command "mvn package" exited with 1.
cache.2
store build cache
0.00s
5.45schange detected (content changed, file is created, or file is deleted):
/home/travis/.m2/repository/com/funcxy/oj/orange-juice/1.0-SNAPSHOT/maven-metadata-local.xml
/home/travis/.m2/repository/com/funcxy/oj/orange-juice/1.0-SNAPSHOT/orange-juice-1.0-SNAPSHOT.jar
/home/travis/.m2/repository/com/funcxy/oj/orange-juice/1.0-SNAPSHOT/_remote.repositories
/home/travis/.m2/repository/com/funcxy/oj/orange-juice/maven-metadata-local.xml
changes detected, packing new archive
uploading archive
Done. Your build exited with 1.
which showing it ran 3 tests, but just 2 on mine. And the file containing the error information hinted by Travis is not my own.
So I don't think my code containing errors. Just merge my branch.
Protocol Buffers(GFW proxy required) are a language-neutral, platform-neutral extensible mechanism for serializing structured data.
So the official website showed.
On which plenty of Google projects used as resource(data) representation.
This is a long term enhancement. Consider it only when we met the performance bottleneck of data transmission. And for the readability, JSON is the peerless choice.
So take it easy, as a interesting new tech to know.
How to update a part of Object in MongoDB?
@zccz14
If so, we can manipulate the whole HTTP response.
Here is my router for GET
in problem controller:
@RequestMapping(method = RequestMethod.GET)
public List<Problem> getProblem(Problem problem){
return problemService.find(problem);
}
And codes for find()
in problemService:
public List<Problem> find(Problem problem) {
List<Problem> problemList = new ArrayList<>();
if (problem.getType() != null)
problemList.addAll(findByType(problem.getType()));
System.out.println(problemList);
if (problem.getTitle() != null)
problemList.retainAll(findByTitle(problem.getTitle()));
System.out.println(problemList);
if (problem.getCreator() != null)
problemList.addAll(findByCreator(problem.getCreator()));
return problemList;
}
And according to the discussion before, users can use title or type or creator or some other things to identify a sort of problems. So here comes the dilemma: if a user uses both type
and title
to identify a specific problem(more precisely, many problems whose type and title are the same.), we need to get the intersection of problems from both findByType()
and findByTitle()
(Right?).
But the method retainAll()
in interface List<>
just compares the references rather than their inner contents, when we try getting the intersection from those two methods, we will get none.(Because we access MongoDB twice, so the two methods actually give back two different references.)
How to solve this? Maybe solve it in the front-end? @zccz14 @zccz14 @zccz14
Complete the following API:
/users/sign-up
with username, email and password./users/sign-in
with username and password./users/sign-out
.Review src/main/java/com/funcxy/oj/models/Submission.java
.
Review src/main/java/com/funcxy/oj/models/Problem.java
We need a series of Error class to help with error handling.
There is an @JsonIgnore
behind password
field of domain class User
, which causes a bug that the deserializer ignore the password field.
Review src/main/java/com/funcxy/oj/models/ProblemList.java
.
How to get a part of an Object ?
@zccz14
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.