-
Notifications
You must be signed in to change notification settings - Fork 749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need DSA problems ASAP #112
Comments
Callout we already have a |
On It |
@hkirat .. using piston is fine ?? code.editor.mp4 |
piston? |
@hkirat , so i have used piston execute for running code - https://piston.readthedocs.io/en/latest/api-v2/#execute |
Have started working on this, integrating it with judge0. Might take ~2 days. |
@nimit9 right now i am working on langauge support almost done .. |
Hey @Rash-Hit please go ahead with it, this is something where I think I'll get to learn something, so just building it out of fun and curiosity. Trying to build it very robustly and with a good looking UI. Won't be stealing your bounty lol |
@hkirat Progress so far .. Progress.So.Far.mp4 |
@hkirat completed DSA Admin dashboard please have a look adminDashboardDSA.1.1.mp4 |
If this is Monaco Editor. Add a path attribute to the editor which you can keep the language name. So that it will context switch and will give you the correct format even when you switch language.
<Editor
heading="Editor"
height={"100%"}
defaultLanguage={globalState.currentLanguage.languageCode}
value={globalState.editorCode}
onChange={setCode}
theme={globalState.isDarkMode ? "vs-dark" : "vs-light"}
options={options}
path={globalState.currentLanguage.languageCode}
/> |
Might help someone, the db might can look like something like this enum SubmissionResult {
PENDING
PASS
FAIL
RUNTIME_ERROR
COMPILATION_ERROR
}
model User {
id Int @id @default(autoincrement())
submissions Submission[]
createdProblems ProblemStatement[]
}
model ProblemStatement {
id Int @id @default(autoincrement())
title String @unique
problemText String
testCases TestCase[]
submissions Submission[]
passedSubmissions Int @default(0)
failedSubmissions Int @default(0)
creator User @relation(fields: [creatorId], references: [id])
creatorId Int
}
model TestCase {
id Int @id @default(autoincrement())
input String
expectedOutput String
problemStatement ProblemStatement @relation(fields: [problemStatementId], references: [id])
problemStatementId Int
}
model Submission {
id Int @id @default(autoincrement())
code String
language String
result SubmissionResult @default(PENDING)
runtime Int // in milliseconds
memoryUsage Int // in bytes
errorMessage String
createdAt DateTime @default(now())
problemStatement ProblemStatement @relation(fields: [problemStatementId], references: [id])
problemStatementId Int
user User @relation(fields: [userId], references: [id])
userId Int
} This is for prisma but can be replicated :0 Hope it helps someone |
How is the current progress of this? Intrested in working on this! Feel free to add me with you. |
UserDashboard.mp4User Dashboard
|
@hkirat If you like the prototype for both Admin and userDashboard I can create the pull request else if you want me to add some other features please tell |
@hkirat Completed ~60-70% of this Pending Things:
Below is the video with things already done, Using judge0 self hosted on local. Code.Submit.webmCode-Exec.Test.Run.webm |
I have created a similar project can i try to integrate that to this project |
Nimit can you please update with the latest completed and pending things? I am ready to work on any of this mentioned. |
There is already a
code
type that shows code on the right, problem statement on the leftWe need
Admin dashboard
Allow admins to put in
User side
User can see the problem statement on the left
Code editor on the right
Submit the code
After the code is submitted, it hits a HTTP Endpoint which runs all test cases one after the other
We can use judge0 for this, assume it is already deployed
Languages to support for now -
The text was updated successfully, but these errors were encountered: