This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Qualifier to distinguish from other app coroutines | |
@Qualifier | |
@Retention(AnnotationRetention.RUNTIME) | |
annotation class ViewModelCoroutineScope | |
@Module | |
@InstallIn(ViewModelComponent::class) | |
class VMScopeModule { | |
@Provides | |
@ViewModelCoroutineScope |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A bounded queue implementation for the KCPB Fellow Application | |
* @author Daniel Santiago | |
*/ | |
public class BoundedQueue<E> { | |
private Node<E> head; | |
private Node<E> tail; | |
private int size; | |
private int maxSize; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package icom5016.modstore.http; | |
import java.io.IOException; | |
import java.io.UnsupportedEncodingException; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.security.InvalidParameterException; | |
import org.apache.http.HttpResponse; | |
import org.apache.http.HttpStatus; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Database Singleton Object | |
database.js is used throughout the app to access the db object. Using mongodb | |
native drivers the db object contains a pool of connections that are used to | |
make requests to the db. To use this singleton object simply require it and | |
either call getDB() or setDB(). The idea is to use setDB in app.js just | |
after we connect to the db and receive the db object, then in any other file we | |
need the db require and call getDB | |
**/ |