GithubHelp home page GithubHelp logo

ub-cse / officehours Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 173.0 53 KB

A web-based system to manage office hours

License: GNU General Public License v3.0

Dockerfile 6.72% HTML 11.77% JavaScript 16.81% Scala 64.70%

officehours's Introduction

OfficeHours

A web-based system to manage office hours

officehours's People

Contributors

dependabot[bot] avatar jessehartloff avatar nicholasmy avatar raycal2000 avatar t3pfaffe avatar vrundpat avatar wrjohnson2000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

officehours's Issues

Are any of these PR's going to be merged?

Should I just close my PR? Because otherwise it sticks at the top of my github feed. If these PR's were just for the sake of the assignment I can close it. But if you actually intend to merge some of these I can keep it up. I will probably just remove it by the end of the week if there isnt a response though.

Failed to compile project in Scala SDK 2.13

Expected Behavior

Compile project in Scala SDK 2.13

Current Behavior

While compiling the project with SDK 2.13, the compiler would throw illegal cyclic inheritance involving trait Iterable.

J:\Code\OfficeHours\src\main\scala\model\OfficeHoursServer.scala:18:58
illegal cyclic inheritance involving trait Iterable
  var usernameToSocket: Map[String, SocketIOClient] = Map()

image

Possible Solution

Switching Scala SDK back to 2.12.9 would work.

image

I saw some posts about the illegal cyclic inheritance error in StackOverflow, but not sure why, it might be an issue with Scala.

I recommend switching Scala SDK back to 2.12.9 if you meet the same issue before anyone figures out what causes the issue.

Timestamp is incorrect when a user joins the queue

Expected Behavior

The server returns the current UNIX time in ms.

Current Behavior

The server returns a time that is seemingly random.

Possible Solution

Change System.nanoTime() to System.currentTimeMillis()

https://github.com/UB-CSE/OfficeHours/blob/develop/src/main/scala/model/OfficeHoursServer.scala#L63

class EnterQueueListener(server: OfficeHoursServer) extends DataListener[String] {
  override def onData(socket: SocketIOClient, username: String, ackRequest: AckRequest): Unit = {
>>>>server.database.addStudentToQueue(StudentInQueue(username, System.nanoTime()))<<<<
    server.socketToUsername += (socket -> username)
    server.usernameToSocket += (username -> socket)
    server.server.getBroadcastOperations.sendEvent("queue", server.queueJSON())
  }
}

Steps to Reproduce

  1. Click the join queue button a few times
  2. Look at the time stamps in the waiting list
  3. Convert time stamps from UNIX to human time

Context (Environment)

It is important to see when people have queued.
This information could help give an estimate of how long someone would have to wait before they queue or it could indicated that the TA's can not keep up with the demand.

Detailed Description

According to https://docs.oracle.com/javase/8/docs/api/java/lang/System.html, System.nanoTime() returns the Returns the current value of the running Java Virtual Machine's high-resolution time source, in nanoseconds., not the current UNIX time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.