repo_name stringlengths 7 104 | file_path stringlengths 13 198 | context stringlengths 67 7.15k | import_statement stringlengths 16 4.43k | code stringlengths 40 6.98k | prompt stringlengths 227 8.27k | next_line stringlengths 8 795 |
|---|---|---|---|---|---|---|
scaliby/ceidg-captcha | ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/common/impl/MultiLayerNetworkSaverImpl.java | // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/StoreChooser.java
// public interface StoreChooser {
// Optional<File> getDirectory();
// }
//
// Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/exception/ImageStoreException.java
// public class ImageStore... | import lombok.extern.log4j.Log4j;
import net.scaliby.ceidgcaptcha.common.common.StoreChooser;
import net.scaliby.ceidgcaptcha.common.exception.ImageStoreException;
import net.scaliby.ceidgcaptcha.machinelearning.common.MultiLayerNetworkSaver;
import org.deeplearning4j.nn.multilayer.MultiLayerNetwork;
import org.deeplea... | package net.scaliby.ceidgcaptcha.machinelearning.common.impl;
@Log4j
public class MultiLayerNetworkSaverImpl implements MultiLayerNetworkSaver {
| // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/StoreChooser.java
// public interface StoreChooser {
// Optional<File> getDirectory();
// }
//
// Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/exception/ImageStoreException.java
// public class ImageStore... | private final StoreChooser storeChooser; |
scaliby/ceidg-captcha | ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/common/impl/MultiLayerNetworkSaverImpl.java | // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/StoreChooser.java
// public interface StoreChooser {
// Optional<File> getDirectory();
// }
//
// Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/exception/ImageStoreException.java
// public class ImageStore... | import lombok.extern.log4j.Log4j;
import net.scaliby.ceidgcaptcha.common.common.StoreChooser;
import net.scaliby.ceidgcaptcha.common.exception.ImageStoreException;
import net.scaliby.ceidgcaptcha.machinelearning.common.MultiLayerNetworkSaver;
import org.deeplearning4j.nn.multilayer.MultiLayerNetwork;
import org.deeplea... | package net.scaliby.ceidgcaptcha.machinelearning.common.impl;
@Log4j
public class MultiLayerNetworkSaverImpl implements MultiLayerNetworkSaver {
private final StoreChooser storeChooser;
@Inject
public MultiLayerNetworkSaverImpl(StoreChooser storeChooser) {
this.storeChooser = storeChooser;
... | // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/StoreChooser.java
// public interface StoreChooser {
// Optional<File> getDirectory();
// }
//
// Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/exception/ImageStoreException.java
// public class ImageStore... | throw new ImageStoreException(e); |
scaliby/ceidg-captcha | ceidg-captcha-rest/src/main/java/net/scaliby/ceidgcaptcha/rest/service/impl/CEIDGCaptchaPredictionServiceImpl.java | // Path: ceidg-captcha-rest/src/main/java/net/scaliby/ceidgcaptcha/rest/common/MultiLayerNetworkLoader.java
// public interface MultiLayerNetworkLoader {
//
// MultiLayerNetwork load();
//
// }
//
// Path: ceidg-captcha-rest/src/main/java/net/scaliby/ceidgcaptcha/rest/common/OutputLabeler.java
// public interfac... | import net.scaliby.ceidgcaptcha.rest.common.MultiLayerNetworkLoader;
import net.scaliby.ceidgcaptcha.rest.common.OutputLabeler;
import net.scaliby.ceidgcaptcha.rest.converter.BufferedImageToINDArrayConverter;
import net.scaliby.ceidgcaptcha.rest.service.CEIDGCaptchaPredictionService;
import org.deeplearning4j.nn.multil... | package net.scaliby.ceidgcaptcha.rest.service.impl;
public class CEIDGCaptchaPredictionServiceImpl implements CEIDGCaptchaPredictionService {
private final MultiLayerNetworkLoader multiLayerNetworkLoader; | // Path: ceidg-captcha-rest/src/main/java/net/scaliby/ceidgcaptcha/rest/common/MultiLayerNetworkLoader.java
// public interface MultiLayerNetworkLoader {
//
// MultiLayerNetwork load();
//
// }
//
// Path: ceidg-captcha-rest/src/main/java/net/scaliby/ceidgcaptcha/rest/common/OutputLabeler.java
// public interfac... | private final BufferedImageToINDArrayConverter bufferedImageToINDArrayConverter; |
scaliby/ceidg-captcha | ceidg-captcha-rest/src/main/java/net/scaliby/ceidgcaptcha/rest/service/impl/CEIDGCaptchaPredictionServiceImpl.java | // Path: ceidg-captcha-rest/src/main/java/net/scaliby/ceidgcaptcha/rest/common/MultiLayerNetworkLoader.java
// public interface MultiLayerNetworkLoader {
//
// MultiLayerNetwork load();
//
// }
//
// Path: ceidg-captcha-rest/src/main/java/net/scaliby/ceidgcaptcha/rest/common/OutputLabeler.java
// public interfac... | import net.scaliby.ceidgcaptcha.rest.common.MultiLayerNetworkLoader;
import net.scaliby.ceidgcaptcha.rest.common.OutputLabeler;
import net.scaliby.ceidgcaptcha.rest.converter.BufferedImageToINDArrayConverter;
import net.scaliby.ceidgcaptcha.rest.service.CEIDGCaptchaPredictionService;
import org.deeplearning4j.nn.multil... | package net.scaliby.ceidgcaptcha.rest.service.impl;
public class CEIDGCaptchaPredictionServiceImpl implements CEIDGCaptchaPredictionService {
private final MultiLayerNetworkLoader multiLayerNetworkLoader;
private final BufferedImageToINDArrayConverter bufferedImageToINDArrayConverter; | // Path: ceidg-captcha-rest/src/main/java/net/scaliby/ceidgcaptcha/rest/common/MultiLayerNetworkLoader.java
// public interface MultiLayerNetworkLoader {
//
// MultiLayerNetwork load();
//
// }
//
// Path: ceidg-captcha-rest/src/main/java/net/scaliby/ceidgcaptcha/rest/common/OutputLabeler.java
// public interfac... | private final OutputLabeler outputLabeler; |
scaliby/ceidg-captcha | ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/service/impl/MachineLearningServiceImpl.java | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/factory/DataSetIteratorFactory.java
// public interface DataSetIteratorFactory {
//
// DataSetIterator create(InputSplit inputSplit);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgca... | import net.scaliby.ceidgcaptcha.machinelearning.factory.DataSetIteratorFactory;
import net.scaliby.ceidgcaptcha.machinelearning.resource.InputSplitResource;
import net.scaliby.ceidgcaptcha.machinelearning.resource.NetworkConfigurationResource;
import net.scaliby.ceidgcaptcha.machinelearning.resource.NetworkStatisticsRe... | package net.scaliby.ceidgcaptcha.machinelearning.service.impl;
public class MachineLearningServiceImpl implements MachineLearningService {
private final DataSetIteratorFactory dataSetIteratorFactory; | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/factory/DataSetIteratorFactory.java
// public interface DataSetIteratorFactory {
//
// DataSetIterator create(InputSplit inputSplit);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgca... | private final InputSplitService inputSplitService; |
scaliby/ceidg-captcha | ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/service/impl/MachineLearningServiceImpl.java | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/factory/DataSetIteratorFactory.java
// public interface DataSetIteratorFactory {
//
// DataSetIterator create(InputSplit inputSplit);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgca... | import net.scaliby.ceidgcaptcha.machinelearning.factory.DataSetIteratorFactory;
import net.scaliby.ceidgcaptcha.machinelearning.resource.InputSplitResource;
import net.scaliby.ceidgcaptcha.machinelearning.resource.NetworkConfigurationResource;
import net.scaliby.ceidgcaptcha.machinelearning.resource.NetworkStatisticsRe... | package net.scaliby.ceidgcaptcha.machinelearning.service.impl;
public class MachineLearningServiceImpl implements MachineLearningService {
private final DataSetIteratorFactory dataSetIteratorFactory;
private final InputSplitService inputSplitService; | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/factory/DataSetIteratorFactory.java
// public interface DataSetIteratorFactory {
//
// DataSetIterator create(InputSplit inputSplit);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgca... | private final NetworkConfigurationResource networkConfigurationResource; |
scaliby/ceidg-captcha | ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/service/impl/MachineLearningServiceImpl.java | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/factory/DataSetIteratorFactory.java
// public interface DataSetIteratorFactory {
//
// DataSetIterator create(InputSplit inputSplit);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgca... | import net.scaliby.ceidgcaptcha.machinelearning.factory.DataSetIteratorFactory;
import net.scaliby.ceidgcaptcha.machinelearning.resource.InputSplitResource;
import net.scaliby.ceidgcaptcha.machinelearning.resource.NetworkConfigurationResource;
import net.scaliby.ceidgcaptcha.machinelearning.resource.NetworkStatisticsRe... | package net.scaliby.ceidgcaptcha.machinelearning.service.impl;
public class MachineLearningServiceImpl implements MachineLearningService {
private final DataSetIteratorFactory dataSetIteratorFactory;
private final InputSplitService inputSplitService;
private final NetworkConfigurationResource networkCon... | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/factory/DataSetIteratorFactory.java
// public interface DataSetIteratorFactory {
//
// DataSetIterator create(InputSplit inputSplit);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgca... | InputSplitResource inputSplitResource = inputSplitService.getInputSplit(); |
scaliby/ceidg-captcha | ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/service/impl/MachineLearningServiceImpl.java | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/factory/DataSetIteratorFactory.java
// public interface DataSetIteratorFactory {
//
// DataSetIterator create(InputSplit inputSplit);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgca... | import net.scaliby.ceidgcaptcha.machinelearning.factory.DataSetIteratorFactory;
import net.scaliby.ceidgcaptcha.machinelearning.resource.InputSplitResource;
import net.scaliby.ceidgcaptcha.machinelearning.resource.NetworkConfigurationResource;
import net.scaliby.ceidgcaptcha.machinelearning.resource.NetworkStatisticsRe... | package net.scaliby.ceidgcaptcha.machinelearning.service.impl;
public class MachineLearningServiceImpl implements MachineLearningService {
private final DataSetIteratorFactory dataSetIteratorFactory;
private final InputSplitService inputSplitService;
private final NetworkConfigurationResource networkCon... | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/factory/DataSetIteratorFactory.java
// public interface DataSetIteratorFactory {
//
// DataSetIterator create(InputSplit inputSplit);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgca... | public NetworkStatisticsResource test(MultiLayerNetwork multiLayerNetwork) { |
scaliby/ceidg-captcha | ceidg-captcha-downloader/src/main/java/net/scaliby/ceidgcaptcha/downloader/common/impl/ImageParserImpl.java | // Path: ceidg-captcha-downloader/src/main/java/net/scaliby/ceidgcaptcha/downloader/common/ImageParser.java
// public interface ImageParser {
//
// BufferedImage parseImage(HttpResponse httpResponse);
//
// }
//
// Path: ceidg-captcha-downloader/src/main/java/net/scaliby/ceidgcaptcha/downloader/exception/CEIDGHt... | import net.scaliby.ceidgcaptcha.downloader.common.ImageParser;
import net.scaliby.ceidgcaptcha.downloader.exception.CEIDGHttpException;
import org.apache.http.HttpResponse;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException; | package net.scaliby.ceidgcaptcha.downloader.common.impl;
public class ImageParserImpl implements ImageParser {
@Override
public BufferedImage parseImage(HttpResponse httpResponse) {
try {
return ImageIO.read(httpResponse.getEntity().getContent());
} catch (IOException e) { | // Path: ceidg-captcha-downloader/src/main/java/net/scaliby/ceidgcaptcha/downloader/common/ImageParser.java
// public interface ImageParser {
//
// BufferedImage parseImage(HttpResponse httpResponse);
//
// }
//
// Path: ceidg-captcha-downloader/src/main/java/net/scaliby/ceidgcaptcha/downloader/exception/CEIDGHt... | throw new CEIDGHttpException(e); |
scaliby/ceidg-captcha | ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/CEIDGCaptchaCommonModule.java | // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/StoreChooser.java
// public interface StoreChooser {
// Optional<File> getDirectory();
// }
//
// Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/impl/SwingStoreChooser.java
// public class SwingStore... | import com.google.inject.AbstractModule;
import net.scaliby.ceidgcaptcha.common.common.StoreChooser;
import net.scaliby.ceidgcaptcha.common.common.impl.SwingStoreChooser;
import net.scaliby.ceidgcaptcha.common.factory.JFileChooserFactory;
import net.scaliby.ceidgcaptcha.common.factory.impl.JFileChooserFactoryImpl; | package net.scaliby.ceidgcaptcha.common;
public class CEIDGCaptchaCommonModule extends AbstractModule {
@Override
protected void configure() { | // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/StoreChooser.java
// public interface StoreChooser {
// Optional<File> getDirectory();
// }
//
// Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/impl/SwingStoreChooser.java
// public class SwingStore... | bind(StoreChooser.class).to(SwingStoreChooser.class); |
scaliby/ceidg-captcha | ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/CEIDGCaptchaCommonModule.java | // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/StoreChooser.java
// public interface StoreChooser {
// Optional<File> getDirectory();
// }
//
// Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/impl/SwingStoreChooser.java
// public class SwingStore... | import com.google.inject.AbstractModule;
import net.scaliby.ceidgcaptcha.common.common.StoreChooser;
import net.scaliby.ceidgcaptcha.common.common.impl.SwingStoreChooser;
import net.scaliby.ceidgcaptcha.common.factory.JFileChooserFactory;
import net.scaliby.ceidgcaptcha.common.factory.impl.JFileChooserFactoryImpl; | package net.scaliby.ceidgcaptcha.common;
public class CEIDGCaptchaCommonModule extends AbstractModule {
@Override
protected void configure() { | // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/StoreChooser.java
// public interface StoreChooser {
// Optional<File> getDirectory();
// }
//
// Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/impl/SwingStoreChooser.java
// public class SwingStore... | bind(StoreChooser.class).to(SwingStoreChooser.class); |
scaliby/ceidg-captcha | ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/CEIDGCaptchaCommonModule.java | // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/StoreChooser.java
// public interface StoreChooser {
// Optional<File> getDirectory();
// }
//
// Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/impl/SwingStoreChooser.java
// public class SwingStore... | import com.google.inject.AbstractModule;
import net.scaliby.ceidgcaptcha.common.common.StoreChooser;
import net.scaliby.ceidgcaptcha.common.common.impl.SwingStoreChooser;
import net.scaliby.ceidgcaptcha.common.factory.JFileChooserFactory;
import net.scaliby.ceidgcaptcha.common.factory.impl.JFileChooserFactoryImpl; | package net.scaliby.ceidgcaptcha.common;
public class CEIDGCaptchaCommonModule extends AbstractModule {
@Override
protected void configure() {
bind(StoreChooser.class).to(SwingStoreChooser.class); | // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/StoreChooser.java
// public interface StoreChooser {
// Optional<File> getDirectory();
// }
//
// Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/impl/SwingStoreChooser.java
// public class SwingStore... | bind(JFileChooserFactory.class).to(JFileChooserFactoryImpl.class); |
scaliby/ceidg-captcha | ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/CEIDGCaptchaCommonModule.java | // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/StoreChooser.java
// public interface StoreChooser {
// Optional<File> getDirectory();
// }
//
// Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/impl/SwingStoreChooser.java
// public class SwingStore... | import com.google.inject.AbstractModule;
import net.scaliby.ceidgcaptcha.common.common.StoreChooser;
import net.scaliby.ceidgcaptcha.common.common.impl.SwingStoreChooser;
import net.scaliby.ceidgcaptcha.common.factory.JFileChooserFactory;
import net.scaliby.ceidgcaptcha.common.factory.impl.JFileChooserFactoryImpl; | package net.scaliby.ceidgcaptcha.common;
public class CEIDGCaptchaCommonModule extends AbstractModule {
@Override
protected void configure() {
bind(StoreChooser.class).to(SwingStoreChooser.class); | // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/StoreChooser.java
// public interface StoreChooser {
// Optional<File> getDirectory();
// }
//
// Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/common/impl/SwingStoreChooser.java
// public class SwingStore... | bind(JFileChooserFactory.class).to(JFileChooserFactoryImpl.class); |
scaliby/ceidg-captcha | ceidg-captcha-downloader/src/main/java/net/scaliby/ceidgcaptcha/downloader/common/impl/SwingCaptchaLabeler.java | // Path: ceidg-captcha-downloader/src/main/java/net/scaliby/ceidgcaptcha/downloader/common/CaptchaLabeler.java
// public interface CaptchaLabeler {
// Optional<String> getLabel(BufferedImage bufferedImage);
// }
//
// Path: ceidg-captcha-downloader/src/main/java/net/scaliby/ceidgcaptcha/downloader/exception/Captch... | import net.scaliby.ceidgcaptcha.downloader.common.CaptchaLabeler;
import net.scaliby.ceidgcaptcha.downloader.exception.CaptchaLabelingException;
import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
import java.util.Arrays;
im... | package net.scaliby.ceidgcaptcha.downloader.common.impl;
public class SwingCaptchaLabeler implements CaptchaLabeler {
private final Object lock = new Object();
@Override
public Optional<String> getLabel(BufferedImage bufferedImage) {
try {
return getLabelInternal(bufferedImage);
... | // Path: ceidg-captcha-downloader/src/main/java/net/scaliby/ceidgcaptcha/downloader/common/CaptchaLabeler.java
// public interface CaptchaLabeler {
// Optional<String> getLabel(BufferedImage bufferedImage);
// }
//
// Path: ceidg-captcha-downloader/src/main/java/net/scaliby/ceidgcaptcha/downloader/exception/Captch... | throw new CaptchaLabelingException(e); |
scaliby/ceidg-captcha | ceidg-captcha-downloader/src/main/java/net/scaliby/ceidgcaptcha/downloader/common/impl/ImageWriterImpl.java | // Path: ceidg-captcha-downloader/src/main/java/net/scaliby/ceidgcaptcha/downloader/common/ImageWriter.java
// public interface ImageWriter {
//
// void write(RenderedImage image, String format, File path);
//
// }
//
// Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/exception/ImageStor... | import net.scaliby.ceidgcaptcha.downloader.common.ImageWriter;
import net.scaliby.ceidgcaptcha.common.exception.ImageStoreException;
import javax.imageio.ImageIO;
import java.awt.image.RenderedImage;
import java.io.File;
import java.io.IOException; | package net.scaliby.ceidgcaptcha.downloader.common.impl;
public class ImageWriterImpl implements ImageWriter {
@Override
public void write(RenderedImage image, String format, File path) {
try {
ImageIO.write(image, format, path);
} catch (IOException e) { | // Path: ceidg-captcha-downloader/src/main/java/net/scaliby/ceidgcaptcha/downloader/common/ImageWriter.java
// public interface ImageWriter {
//
// void write(RenderedImage image, String format, File path);
//
// }
//
// Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/exception/ImageStor... | throw new ImageStoreException(e); |
scaliby/ceidg-captcha | ceidg-captcha-downloader/src/main/java/net/scaliby/ceidgcaptcha/downloader/factory/impl/ImageStoreFactoryImpl.java | // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/exception/ImageStoreException.java
// public class ImageStoreException extends RuntimeException {
//
// public ImageStoreException() {
// }
//
// public ImageStoreException(String message) {
// super(message);
// }
// ... | import net.scaliby.ceidgcaptcha.common.exception.ImageStoreException;
import net.scaliby.ceidgcaptcha.downloader.factory.ImageStoreFactory;
import java.io.File; | package net.scaliby.ceidgcaptcha.downloader.factory.impl;
public class ImageStoreFactoryImpl implements ImageStoreFactory {
@Override
public File createImageStore(File basePath, String label) {
File imageStore = new File(basePath, label);
if (!imageStore.mkdir()) { | // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/exception/ImageStoreException.java
// public class ImageStoreException extends RuntimeException {
//
// public ImageStoreException() {
// }
//
// public ImageStoreException(String message) {
// super(message);
// }
// ... | throw new ImageStoreException("Can't create labelled store"); |
scaliby/ceidg-captcha | ceidg-captcha-rest/src/main/java/net/scaliby/ceidgcaptcha/rest/CEIDGCaptchaRestMain.java | // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/CEIDGCaptchaCommonModule.java
// public class CEIDGCaptchaCommonModule extends AbstractModule {
// @Override
// protected void configure() {
// bind(StoreChooser.class).to(SwingStoreChooser.class);
// bind(JFileChooserFa... | import net.scaliby.ceidgcaptcha.common.CEIDGCaptchaCommonModule;
import net.scaliby.ceidgcaptcha.common.CEIDGCaptchaPropertiesModule;
import net.scaliby.ceidgcaptcha.rest.handler.CEIDGCaptchaPredictionHandler;
import ratpack.guice.Guice;
import ratpack.server.RatpackServer; | package net.scaliby.ceidgcaptcha.rest;
public class CEIDGCaptchaRestMain {
public static void main(String[] args) throws Exception {
RatpackServer.start(server -> {
server.serverConfig(config -> config
.props(CEIDGCaptchaRestMain.class.getClassLoader().getResource("ratpack... | // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/CEIDGCaptchaCommonModule.java
// public class CEIDGCaptchaCommonModule extends AbstractModule {
// @Override
// protected void configure() {
// bind(StoreChooser.class).to(SwingStoreChooser.class);
// bind(JFileChooserFa... | .module(CEIDGCaptchaPropertiesModule.class) |
scaliby/ceidg-captcha | ceidg-captcha-rest/src/main/java/net/scaliby/ceidgcaptcha/rest/CEIDGCaptchaRestMain.java | // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/CEIDGCaptchaCommonModule.java
// public class CEIDGCaptchaCommonModule extends AbstractModule {
// @Override
// protected void configure() {
// bind(StoreChooser.class).to(SwingStoreChooser.class);
// bind(JFileChooserFa... | import net.scaliby.ceidgcaptcha.common.CEIDGCaptchaCommonModule;
import net.scaliby.ceidgcaptcha.common.CEIDGCaptchaPropertiesModule;
import net.scaliby.ceidgcaptcha.rest.handler.CEIDGCaptchaPredictionHandler;
import ratpack.guice.Guice;
import ratpack.server.RatpackServer; | package net.scaliby.ceidgcaptcha.rest;
public class CEIDGCaptchaRestMain {
public static void main(String[] args) throws Exception {
RatpackServer.start(server -> {
server.serverConfig(config -> config
.props(CEIDGCaptchaRestMain.class.getClassLoader().getResource("ratpack... | // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/CEIDGCaptchaCommonModule.java
// public class CEIDGCaptchaCommonModule extends AbstractModule {
// @Override
// protected void configure() {
// bind(StoreChooser.class).to(SwingStoreChooser.class);
// bind(JFileChooserFa... | .module(CEIDGCaptchaCommonModule.class) |
scaliby/ceidg-captcha | ceidg-captcha-rest/src/main/java/net/scaliby/ceidgcaptcha/rest/CEIDGCaptchaRestMain.java | // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/CEIDGCaptchaCommonModule.java
// public class CEIDGCaptchaCommonModule extends AbstractModule {
// @Override
// protected void configure() {
// bind(StoreChooser.class).to(SwingStoreChooser.class);
// bind(JFileChooserFa... | import net.scaliby.ceidgcaptcha.common.CEIDGCaptchaCommonModule;
import net.scaliby.ceidgcaptcha.common.CEIDGCaptchaPropertiesModule;
import net.scaliby.ceidgcaptcha.rest.handler.CEIDGCaptchaPredictionHandler;
import ratpack.guice.Guice;
import ratpack.server.RatpackServer; | package net.scaliby.ceidgcaptcha.rest;
public class CEIDGCaptchaRestMain {
public static void main(String[] args) throws Exception {
RatpackServer.start(server -> {
server.serverConfig(config -> config
.props(CEIDGCaptchaRestMain.class.getClassLoader().getResource("ratpack... | // Path: ceidg-captcha-common/src/main/java/net/scaliby/ceidgcaptcha/common/CEIDGCaptchaCommonModule.java
// public class CEIDGCaptchaCommonModule extends AbstractModule {
// @Override
// protected void configure() {
// bind(StoreChooser.class).to(SwingStoreChooser.class);
// bind(JFileChooserFa... | .post("predict-captcha", CEIDGCaptchaPredictionHandler.class) |
scaliby/ceidg-captcha | ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/CEIDGCaptchaMachineLearningRunner.java | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/common/MultiLayerNetworkSaver.java
// public interface MultiLayerNetworkSaver {
//
// void save(MultiLayerNetwork network);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/mach... | import lombok.extern.log4j.Log4j;
import net.scaliby.ceidgcaptcha.machinelearning.common.MultiLayerNetworkSaver;
import net.scaliby.ceidgcaptcha.machinelearning.factory.MultiLayerConfigurationFactory;
import net.scaliby.ceidgcaptcha.machinelearning.factory.MultiLayerNetworkFactory;
import net.scaliby.ceidgcaptcha.machi... | package net.scaliby.ceidgcaptcha.machinelearning;
@Log4j
public class CEIDGCaptchaMachineLearningRunner implements Runnable {
| // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/common/MultiLayerNetworkSaver.java
// public interface MultiLayerNetworkSaver {
//
// void save(MultiLayerNetwork network);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/mach... | private final MultiLayerConfigurationFactory multiLayerConfigurationFactory; |
scaliby/ceidg-captcha | ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/CEIDGCaptchaMachineLearningRunner.java | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/common/MultiLayerNetworkSaver.java
// public interface MultiLayerNetworkSaver {
//
// void save(MultiLayerNetwork network);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/mach... | import lombok.extern.log4j.Log4j;
import net.scaliby.ceidgcaptcha.machinelearning.common.MultiLayerNetworkSaver;
import net.scaliby.ceidgcaptcha.machinelearning.factory.MultiLayerConfigurationFactory;
import net.scaliby.ceidgcaptcha.machinelearning.factory.MultiLayerNetworkFactory;
import net.scaliby.ceidgcaptcha.machi... | package net.scaliby.ceidgcaptcha.machinelearning;
@Log4j
public class CEIDGCaptchaMachineLearningRunner implements Runnable {
private final MultiLayerConfigurationFactory multiLayerConfigurationFactory; | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/common/MultiLayerNetworkSaver.java
// public interface MultiLayerNetworkSaver {
//
// void save(MultiLayerNetwork network);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/mach... | private final MachineLearningService machineLearningService; |
scaliby/ceidg-captcha | ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/CEIDGCaptchaMachineLearningRunner.java | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/common/MultiLayerNetworkSaver.java
// public interface MultiLayerNetworkSaver {
//
// void save(MultiLayerNetwork network);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/mach... | import lombok.extern.log4j.Log4j;
import net.scaliby.ceidgcaptcha.machinelearning.common.MultiLayerNetworkSaver;
import net.scaliby.ceidgcaptcha.machinelearning.factory.MultiLayerConfigurationFactory;
import net.scaliby.ceidgcaptcha.machinelearning.factory.MultiLayerNetworkFactory;
import net.scaliby.ceidgcaptcha.machi... | package net.scaliby.ceidgcaptcha.machinelearning;
@Log4j
public class CEIDGCaptchaMachineLearningRunner implements Runnable {
private final MultiLayerConfigurationFactory multiLayerConfigurationFactory;
private final MachineLearningService machineLearningService; | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/common/MultiLayerNetworkSaver.java
// public interface MultiLayerNetworkSaver {
//
// void save(MultiLayerNetwork network);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/mach... | private final MultiLayerNetworkFactory multiLayerNetworkFactory; |
scaliby/ceidg-captcha | ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/CEIDGCaptchaMachineLearningRunner.java | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/common/MultiLayerNetworkSaver.java
// public interface MultiLayerNetworkSaver {
//
// void save(MultiLayerNetwork network);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/mach... | import lombok.extern.log4j.Log4j;
import net.scaliby.ceidgcaptcha.machinelearning.common.MultiLayerNetworkSaver;
import net.scaliby.ceidgcaptcha.machinelearning.factory.MultiLayerConfigurationFactory;
import net.scaliby.ceidgcaptcha.machinelearning.factory.MultiLayerNetworkFactory;
import net.scaliby.ceidgcaptcha.machi... | package net.scaliby.ceidgcaptcha.machinelearning;
@Log4j
public class CEIDGCaptchaMachineLearningRunner implements Runnable {
private final MultiLayerConfigurationFactory multiLayerConfigurationFactory;
private final MachineLearningService machineLearningService;
private final MultiLayerNetworkFactory m... | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/common/MultiLayerNetworkSaver.java
// public interface MultiLayerNetworkSaver {
//
// void save(MultiLayerNetwork network);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/mach... | private final MultiLayerNetworkSaver multiLayerNetworkSaver; |
scaliby/ceidg-captcha | ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/CEIDGCaptchaMachineLearningRunner.java | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/common/MultiLayerNetworkSaver.java
// public interface MultiLayerNetworkSaver {
//
// void save(MultiLayerNetwork network);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/mach... | import lombok.extern.log4j.Log4j;
import net.scaliby.ceidgcaptcha.machinelearning.common.MultiLayerNetworkSaver;
import net.scaliby.ceidgcaptcha.machinelearning.factory.MultiLayerConfigurationFactory;
import net.scaliby.ceidgcaptcha.machinelearning.factory.MultiLayerNetworkFactory;
import net.scaliby.ceidgcaptcha.machi... | package net.scaliby.ceidgcaptcha.machinelearning;
@Log4j
public class CEIDGCaptchaMachineLearningRunner implements Runnable {
private final MultiLayerConfigurationFactory multiLayerConfigurationFactory;
private final MachineLearningService machineLearningService;
private final MultiLayerNetworkFactory m... | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/common/MultiLayerNetworkSaver.java
// public interface MultiLayerNetworkSaver {
//
// void save(MultiLayerNetwork network);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/mach... | NetworkStatisticsResource networkStatisticsResource = machineLearningService.test(multiLayerNetwork); |
scaliby/ceidg-captcha | ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/factory/impl/DataSetIteratorFactoryImpl.java | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/factory/DataSetIteratorFactory.java
// public interface DataSetIteratorFactory {
//
// DataSetIterator create(InputSplit inputSplit);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgca... | import net.scaliby.ceidgcaptcha.machinelearning.factory.DataSetIteratorFactory;
import net.scaliby.ceidgcaptcha.machinelearning.factory.ImageTransformFactory;
import net.scaliby.ceidgcaptcha.machinelearning.resource.ImageTransformConfigurationResource;
import net.scaliby.ceidgcaptcha.machinelearning.resource.NetworkCon... | package net.scaliby.ceidgcaptcha.machinelearning.factory.impl;
public class DataSetIteratorFactoryImpl implements DataSetIteratorFactory {
private final NetworkConfigurationResource networkConfigurationResource; | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/factory/DataSetIteratorFactory.java
// public interface DataSetIteratorFactory {
//
// DataSetIterator create(InputSplit inputSplit);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgca... | private final ImageTransformConfigurationResource imageTransformConfigurationResource; |
scaliby/ceidg-captcha | ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/factory/impl/DataSetIteratorFactoryImpl.java | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/factory/DataSetIteratorFactory.java
// public interface DataSetIteratorFactory {
//
// DataSetIterator create(InputSplit inputSplit);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgca... | import net.scaliby.ceidgcaptcha.machinelearning.factory.DataSetIteratorFactory;
import net.scaliby.ceidgcaptcha.machinelearning.factory.ImageTransformFactory;
import net.scaliby.ceidgcaptcha.machinelearning.resource.ImageTransformConfigurationResource;
import net.scaliby.ceidgcaptcha.machinelearning.resource.NetworkCon... | package net.scaliby.ceidgcaptcha.machinelearning.factory.impl;
public class DataSetIteratorFactoryImpl implements DataSetIteratorFactory {
private final NetworkConfigurationResource networkConfigurationResource;
private final ImageTransformConfigurationResource imageTransformConfigurationResource;
priva... | // Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgcaptcha/machinelearning/factory/DataSetIteratorFactory.java
// public interface DataSetIteratorFactory {
//
// DataSetIterator create(InputSplit inputSplit);
//
// }
//
// Path: ceidg-captcha-machine-learning/src/main/java/net/scaliby/ceidgca... | private final ImageTransformFactory imageTransformFactory; |
alexmojaki/boxes | src/main/java/alex/mojaki/boxes/observers/change/ThrowOnNull.java | // Path: src/main/java/alex/mojaki/boxes/PowerBox.java
// public interface PowerBox<T> extends Box<T> {
//
// /**
// * Return the result of applying the {@link GetMiddleware}s added to the box's family, in the order they were
// * added, to the value stored by this box, then similarly notify the {@link G... | import alex.mojaki.boxes.PowerBox; | package alex.mojaki.boxes.observers.change;
/**
* Throws an {@code IllegalArgumentException} when the value changes to {@code null}.
* <p>
* Note that all boxes start with a null value, and adding this does not affect that. It will only throw an exception
* when you explicitly set null as the value.
* <p>
* You... | // Path: src/main/java/alex/mojaki/boxes/PowerBox.java
// public interface PowerBox<T> extends Box<T> {
//
// /**
// * Return the result of applying the {@link GetMiddleware}s added to the box's family, in the order they were
// * added, to the value stored by this box, then similarly notify the {@link G... | public void onChange(PowerBox box, Object originalValue, Object finalValue, Object requestedValue) { |
alexmojaki/boxes | src/main/java/alex/mojaki/boxes/middleware/symmetric/EnsureBounds.java | // Path: src/main/java/alex/mojaki/boxes/PowerBox.java
// public interface PowerBox<T> extends Box<T> {
//
// /**
// * Return the result of applying the {@link GetMiddleware}s added to the box's family, in the order they were
// * added, to the value stored by this box, then similarly notify the {@link G... | import alex.mojaki.boxes.PowerBox;
import alex.mojaki.boxes.utils.InstanceStore;
import static alex.mojaki.boxes.utils.Utils.lessThan; | }
if (min != null && max != null && lessThan(max, min)) {
throw new IllegalArgumentException("The maximum (" + max + ") was set to less than the minimum (" + min + ")");
}
//noinspection unchecked
return new EnsureBounds(min, max);
}
... | // Path: src/main/java/alex/mojaki/boxes/PowerBox.java
// public interface PowerBox<T> extends Box<T> {
//
// /**
// * Return the result of applying the {@link GetMiddleware}s added to the box's family, in the order they were
// * added, to the value stored by this box, then similarly notify the {@link G... | public Comparable<T> apply(PowerBox<Comparable<T>> box, Comparable<T> firstValue, Comparable<T> currentValue) { |
alexmojaki/boxes | src/main/java/alex/mojaki/boxes/PowerBox.java | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | import alex.mojaki.boxes.middleware.change.ChangeMiddleware;
import alex.mojaki.boxes.middleware.get.GetMiddleware;
import alex.mojaki.boxes.observers.change.ChangeObserver;
import alex.mojaki.boxes.observers.get.GetObserver; | package alex.mojaki.boxes;
/**
* A {@link Box} which can dynamically change its behaviour regarding its value changing or {@link PowerBox#get()}
* being called.
*/
public interface PowerBox<T> extends Box<T> {
/**
* Return the result of applying the {@link GetMiddleware}s added to the box's family, in th... | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | PowerBox<T> addChangeMiddleware(ChangeMiddleware... middlewares); |
alexmojaki/boxes | src/main/java/alex/mojaki/boxes/PowerBox.java | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | import alex.mojaki.boxes.middleware.change.ChangeMiddleware;
import alex.mojaki.boxes.middleware.get.GetMiddleware;
import alex.mojaki.boxes.observers.change.ChangeObserver;
import alex.mojaki.boxes.observers.get.GetObserver; | package alex.mojaki.boxes;
/**
* A {@link Box} which can dynamically change its behaviour regarding its value changing or {@link PowerBox#get()}
* being called.
*/
public interface PowerBox<T> extends Box<T> {
/**
* Return the result of applying the {@link GetMiddleware}s added to the box's family, in th... | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | PowerBox<T> addGetMiddleware(GetMiddleware... middlewares); |
alexmojaki/boxes | src/main/java/alex/mojaki/boxes/PowerBox.java | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | import alex.mojaki.boxes.middleware.change.ChangeMiddleware;
import alex.mojaki.boxes.middleware.get.GetMiddleware;
import alex.mojaki.boxes.observers.change.ChangeObserver;
import alex.mojaki.boxes.observers.get.GetObserver; | package alex.mojaki.boxes;
/**
* A {@link Box} which can dynamically change its behaviour regarding its value changing or {@link PowerBox#get()}
* being called.
*/
public interface PowerBox<T> extends Box<T> {
/**
* Return the result of applying the {@link GetMiddleware}s added to the box's family, in th... | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | PowerBox<T> addChangeObserver(ChangeObserver... observers); |
alexmojaki/boxes | src/main/java/alex/mojaki/boxes/PowerBox.java | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | import alex.mojaki.boxes.middleware.change.ChangeMiddleware;
import alex.mojaki.boxes.middleware.get.GetMiddleware;
import alex.mojaki.boxes.observers.change.ChangeObserver;
import alex.mojaki.boxes.observers.get.GetObserver; | package alex.mojaki.boxes;
/**
* A {@link Box} which can dynamically change its behaviour regarding its value changing or {@link PowerBox#get()}
* being called.
*/
public interface PowerBox<T> extends Box<T> {
/**
* Return the result of applying the {@link GetMiddleware}s added to the box's family, in th... | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | PowerBox<T> addGetObserver(GetObserver... observers); |
alexmojaki/boxes | src/test/java/alex/mojaki/boxes/test/ForwardingBoxTest.java | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | import alex.mojaki.boxes.*;
import alex.mojaki.boxes.middleware.change.ChangeMiddleware;
import alex.mojaki.boxes.middleware.get.GetMiddleware;
import alex.mojaki.boxes.observers.change.ChangeObserver;
import alex.mojaki.boxes.observers.get.GetObserver;
import org.junit.Test;
import java.util.Arrays;
import java.util.L... | package alex.mojaki.boxes.test;
public class ForwardingBoxTest {
@Test
public void testUnsettableBox() {
Box<String> box = box();
Box<String> unsettable = unsettableAdapter(box);
testUnsettableSetBehaviour(box, unsettable);
}
@Test
public void testUnsettablePowerBox() {... | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | unsettable.addChangeMiddleware(new ChangeMiddleware() { |
alexmojaki/boxes | src/test/java/alex/mojaki/boxes/test/ForwardingBoxTest.java | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | import alex.mojaki.boxes.*;
import alex.mojaki.boxes.middleware.change.ChangeMiddleware;
import alex.mojaki.boxes.middleware.get.GetMiddleware;
import alex.mojaki.boxes.observers.change.ChangeObserver;
import alex.mojaki.boxes.observers.get.GetObserver;
import org.junit.Test;
import java.util.Arrays;
import java.util.L... | package alex.mojaki.boxes.test;
public class ForwardingBoxTest {
@Test
public void testUnsettableBox() {
Box<String> box = box();
Box<String> unsettable = unsettableAdapter(box);
testUnsettableSetBehaviour(box, unsettable);
}
@Test
public void testUnsettablePowerBox() {... | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | }).addChangeObserver(new ChangeObserver() { |
alexmojaki/boxes | src/test/java/alex/mojaki/boxes/test/ForwardingBoxTest.java | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | import alex.mojaki.boxes.*;
import alex.mojaki.boxes.middleware.change.ChangeMiddleware;
import alex.mojaki.boxes.middleware.get.GetMiddleware;
import alex.mojaki.boxes.observers.change.ChangeObserver;
import alex.mojaki.boxes.observers.get.GetObserver;
import org.junit.Test;
import java.util.Arrays;
import java.util.L... | package alex.mojaki.boxes.test;
public class ForwardingBoxTest {
@Test
public void testUnsettableBox() {
Box<String> box = box();
Box<String> unsettable = unsettableAdapter(box);
testUnsettableSetBehaviour(box, unsettable);
}
@Test
public void testUnsettablePowerBox() {... | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | }).addGetObserver(new GetObserver() { |
alexmojaki/boxes | src/test/java/alex/mojaki/boxes/test/ForwardingBoxTest.java | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | import alex.mojaki.boxes.*;
import alex.mojaki.boxes.middleware.change.ChangeMiddleware;
import alex.mojaki.boxes.middleware.get.GetMiddleware;
import alex.mojaki.boxes.observers.change.ChangeObserver;
import alex.mojaki.boxes.observers.get.GetObserver;
import org.junit.Test;
import java.util.Arrays;
import java.util.L... | package alex.mojaki.boxes.test;
public class ForwardingBoxTest {
@Test
public void testUnsettableBox() {
Box<String> box = box();
Box<String> unsettable = unsettableAdapter(box);
testUnsettableSetBehaviour(box, unsettable);
}
@Test
public void testUnsettablePowerBox() {... | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | }).addGetMiddleware(new GetMiddleware() { |
alexmojaki/boxes | src/main/java/alex/mojaki/boxes/middleware/symmetric/DefaultValue.java | // Path: src/main/java/alex/mojaki/boxes/PowerBox.java
// public interface PowerBox<T> extends Box<T> {
//
// /**
// * Return the result of applying the {@link GetMiddleware}s added to the box's family, in the order they were
// * added, to the value stored by this box, then similarly notify the {@link G... | import alex.mojaki.boxes.PowerBox;
import alex.mojaki.boxes.middleware.get.GetMiddleware;
import alex.mojaki.boxes.utils.InstanceStore; | package alex.mojaki.boxes.middleware.symmetric;
// @formatter:off
/**
* If the current value is null, replace it with some default value.
* For example:
*
* <pre>{@code
* PowerBox<String> name = new CommonBox<String>(Example.class, "name")
* .addGetMiddleware(DefaultValue.getInstance("Unknown"));
* name.g... | // Path: src/main/java/alex/mojaki/boxes/PowerBox.java
// public interface PowerBox<T> extends Box<T> {
//
// /**
// * Return the result of applying the {@link GetMiddleware}s added to the box's family, in the order they were
// * added, to the value stored by this box, then similarly notify the {@link G... | public Object apply(PowerBox box, Object firstValue, Object currentValue) { |
alexmojaki/boxes | src/main/java/alex/mojaki/boxes/observers/change/ChangePrinter.java | // Path: src/main/java/alex/mojaki/boxes/PowerBox.java
// public interface PowerBox<T> extends Box<T> {
//
// /**
// * Return the result of applying the {@link GetMiddleware}s added to the box's family, in the order they were
// * added, to the value stored by this box, then similarly notify the {@link G... | import alex.mojaki.boxes.PowerBox;
import alex.mojaki.boxes.utils.Utils; | package alex.mojaki.boxes.observers.change;
/**
* Print to standard out changes made to the box this is added to. This uses
* {@link Utils#describeChange(PowerBox, Object, Object, Object)}, which may help write your own method for
* your specific logging needs.
*/
public class ChangePrinter implements ChangeObser... | // Path: src/main/java/alex/mojaki/boxes/PowerBox.java
// public interface PowerBox<T> extends Box<T> {
//
// /**
// * Return the result of applying the {@link GetMiddleware}s added to the box's family, in the order they were
// * added, to the value stored by this box, then similarly notify the {@link G... | public void onChange(PowerBox box, Object originalValue, Object finalValue, Object requestedValue) { |
alexmojaki/boxes | src/main/java/alex/mojaki/boxes/observers/change/ChangePrinter.java | // Path: src/main/java/alex/mojaki/boxes/PowerBox.java
// public interface PowerBox<T> extends Box<T> {
//
// /**
// * Return the result of applying the {@link GetMiddleware}s added to the box's family, in the order they were
// * added, to the value stored by this box, then similarly notify the {@link G... | import alex.mojaki.boxes.PowerBox;
import alex.mojaki.boxes.utils.Utils; | package alex.mojaki.boxes.observers.change;
/**
* Print to standard out changes made to the box this is added to. This uses
* {@link Utils#describeChange(PowerBox, Object, Object, Object)}, which may help write your own method for
* your specific logging needs.
*/
public class ChangePrinter implements ChangeObser... | // Path: src/main/java/alex/mojaki/boxes/PowerBox.java
// public interface PowerBox<T> extends Box<T> {
//
// /**
// * Return the result of applying the {@link GetMiddleware}s added to the box's family, in the order they were
// * added, to the value stored by this box, then similarly notify the {@link G... | System.out.println(Utils.describeChange(box, originalValue, finalValue, requestedValue)); |
alexmojaki/boxes | src/main/java/alex/mojaki/boxes/middleware/symmetric/SymmetricMiddleware.java | // Path: src/main/java/alex/mojaki/boxes/PowerBox.java
// public interface PowerBox<T> extends Box<T> {
//
// /**
// * Return the result of applying the {@link GetMiddleware}s added to the box's family, in the order they were
// * added, to the value stored by this box, then similarly notify the {@link G... | import alex.mojaki.boxes.PowerBox;
import alex.mojaki.boxes.middleware.change.ChangeMiddleware;
import alex.mojaki.boxes.middleware.get.GetMiddleware; | package alex.mojaki.boxes.middleware.symmetric;
/**
* Middleware which implements both {@code GetMiddleware} and {@code ChangeMiddleware} with the same effect on values.
*/
public abstract class SymmetricMiddleware<T> implements ChangeMiddleware<T>, GetMiddleware<T> {
/**
* Call {@code apply(box, requeste... | // Path: src/main/java/alex/mojaki/boxes/PowerBox.java
// public interface PowerBox<T> extends Box<T> {
//
// /**
// * Return the result of applying the {@link GetMiddleware}s added to the box's family, in the order they were
// * added, to the value stored by this box, then similarly notify the {@link G... | public T onChange(PowerBox<T> box, T originalValue, T currentValue, T requestedValue) { |
alexmojaki/boxes | src/main/java/alex/mojaki/boxes/ForwardingPowerBox.java | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | import alex.mojaki.boxes.middleware.change.ChangeMiddleware;
import alex.mojaki.boxes.middleware.get.GetMiddleware;
import alex.mojaki.boxes.observers.change.ChangeObserver;
import alex.mojaki.boxes.observers.get.GetObserver; | package alex.mojaki.boxes;
/**
* A {@code PowerBox} that wraps around another {@code PowerBox} and forwards the interface methods
* and {@code toString}.
* This is not useful on its own but makes it easy it to implement the decorator pattern by subclassing.
*/
public abstract class ForwardingPowerBox<T> implement... | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | public PowerBox<T> addChangeMiddleware(ChangeMiddleware... middlewares) { |
alexmojaki/boxes | src/main/java/alex/mojaki/boxes/ForwardingPowerBox.java | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | import alex.mojaki.boxes.middleware.change.ChangeMiddleware;
import alex.mojaki.boxes.middleware.get.GetMiddleware;
import alex.mojaki.boxes.observers.change.ChangeObserver;
import alex.mojaki.boxes.observers.get.GetObserver; | package alex.mojaki.boxes;
/**
* A {@code PowerBox} that wraps around another {@code PowerBox} and forwards the interface methods
* and {@code toString}.
* This is not useful on its own but makes it easy it to implement the decorator pattern by subclassing.
*/
public abstract class ForwardingPowerBox<T> implement... | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | public PowerBox<T> addGetMiddleware(GetMiddleware... middlewares) { |
alexmojaki/boxes | src/main/java/alex/mojaki/boxes/ForwardingPowerBox.java | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | import alex.mojaki.boxes.middleware.change.ChangeMiddleware;
import alex.mojaki.boxes.middleware.get.GetMiddleware;
import alex.mojaki.boxes.observers.change.ChangeObserver;
import alex.mojaki.boxes.observers.get.GetObserver; | package alex.mojaki.boxes;
/**
* A {@code PowerBox} that wraps around another {@code PowerBox} and forwards the interface methods
* and {@code toString}.
* This is not useful on its own but makes it easy it to implement the decorator pattern by subclassing.
*/
public abstract class ForwardingPowerBox<T> implement... | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | public PowerBox<T> addChangeObserver(ChangeObserver... observers) { |
alexmojaki/boxes | src/main/java/alex/mojaki/boxes/ForwardingPowerBox.java | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | import alex.mojaki.boxes.middleware.change.ChangeMiddleware;
import alex.mojaki.boxes.middleware.get.GetMiddleware;
import alex.mojaki.boxes.observers.change.ChangeObserver;
import alex.mojaki.boxes.observers.get.GetObserver; | package alex.mojaki.boxes;
/**
* A {@code PowerBox} that wraps around another {@code PowerBox} and forwards the interface methods
* and {@code toString}.
* This is not useful on its own but makes it easy it to implement the decorator pattern by subclassing.
*/
public abstract class ForwardingPowerBox<T> implement... | // Path: src/main/java/alex/mojaki/boxes/middleware/change/ChangeMiddleware.java
// public interface ChangeMiddleware<T> {
//
// /**
// * Return the given {@code currentValue} or some transformation of it.
// * Called during {@link PowerBox#set(Object)} for zero or more of these objects before applying t... | public PowerBox<T> addGetObserver(GetObserver... observers) { |
Tonius/E-Mobile | src/main/java/tonius/emobile/client/ClientProxy.java | // Path: src/main/java/tonius/emobile/CommonProxy.java
// public class CommonProxy {
//
// public void playDiallingSound(EntityPlayer player) {
// }
//
// public void showDiallingParticles(double posX, double posY, double posZ) {
// }
//
// public void showTeleportParticles(double pos... | import java.util.Random;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import tonius.emobile.CommonProxy;
import tonius.emobile.client.audio.SoundDialling; | package tonius.emobile.client;
public class ClientProxy extends CommonProxy {
private static Minecraft mc = Minecraft.getMinecraft();
private static Random rand = new Random();
@Override
public void playDiallingSound(EntityPlayer player) { | // Path: src/main/java/tonius/emobile/CommonProxy.java
// public class CommonProxy {
//
// public void playDiallingSound(EntityPlayer player) {
// }
//
// public void showDiallingParticles(double posX, double posY, double posZ) {
// }
//
// public void showTeleportParticles(double pos... | mc.getSoundHandler().playSound(new SoundDialling(player)); |
Tonius/E-Mobile | src/main/java/tonius/emobile/network/message/MessageTeleportParticles.java | // Path: src/main/java/tonius/emobile/EMobile.java
// @Mod(modid = "emobile", guiFactory = "tonius.emobile.config.ConfigGuiFactoryEM", dependencies = "after:ThermalExpansion")
// public class EMobile {
//
// @Instance("emobile")
// public static EMobile instance;
// @SidedProxy(serverSide = "tonius.emo... | import io.netty.buffer.ByteBuf;
import tonius.emobile.EMobile;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext; | package tonius.emobile.network.message;
public class MessageTeleportParticles implements IMessage, IMessageHandler<MessageTeleportParticles, IMessage> {
public double posX;
public double posY;
public double posZ;
public MessageTeleportParticles() {
}
public MessageTeleportPartic... | // Path: src/main/java/tonius/emobile/EMobile.java
// @Mod(modid = "emobile", guiFactory = "tonius.emobile.config.ConfigGuiFactoryEM", dependencies = "after:ThermalExpansion")
// public class EMobile {
//
// @Instance("emobile")
// public static EMobile instance;
// @SidedProxy(serverSide = "tonius.emo... | EMobile.proxy.showTeleportParticles(msg.posX, msg.posY, msg.posZ); |
Tonius/E-Mobile | src/main/java/tonius/emobile/config/EMConfig.java | // Path: src/main/java/tonius/emobile/EMobile.java
// @Mod(modid = "emobile", guiFactory = "tonius.emobile.config.ConfigGuiFactoryEM", dependencies = "after:ThermalExpansion")
// public class EMobile {
//
// @Instance("emobile")
// public static EMobile instance;
// @SidedProxy(serverSide = "tonius.emo... | import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import net.minecraftforge.common.config.Configuration;
import tonius.emobile.EMobile;
import cpw.mods.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.event.FMLPre... |
// tweaks default
public static final int enderPearlStackSize_default = 16;
// fluxCellphone default
public static final boolean fluxCellphoneEnabled_default = true;
public static final int fluxCellphoneMaxEnergy_default = 600000;
public static final int fluxCellphoneMaxInput_default =... | // Path: src/main/java/tonius/emobile/EMobile.java
// @Mod(modid = "emobile", guiFactory = "tonius.emobile.config.ConfigGuiFactoryEM", dependencies = "after:ThermalExpansion")
// public class EMobile {
//
// @Instance("emobile")
// public static EMobile instance;
// @SidedProxy(serverSide = "tonius.emo... | EMobile.logger.info("Loading configuration file"); |
Tonius/E-Mobile | src/main/java/tonius/emobile/gui/container/ContainerCellphoneRF.java | // Path: src/main/java/tonius/emobile/util/StackUtils.java
// public class StackUtils {
//
// public static NBTTagCompound getNBT(ItemStack itemStack) {
// if (itemStack.stackTagCompound == null) {
// itemStack.stackTagCompound = new NBTTagCompound();
// }
// return itemStac... | import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.ICrafting;
import net.minecraft.item.ItemStack;
import tonius.emobile.util.StackUtils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; | package tonius.emobile.gui.container;
public class ContainerCellphoneRF extends ContainerCellphoneBase {
public ItemStack cellphone;
private int lastEnergy;
private Short energyFirstHalf = null;
private Short energySecondHalf = null;
public ContainerCellphoneRF(InventoryPlayer invPlayer,... | // Path: src/main/java/tonius/emobile/util/StackUtils.java
// public class StackUtils {
//
// public static NBTTagCompound getNBT(ItemStack itemStack) {
// if (itemStack.stackTagCompound == null) {
// itemStack.stackTagCompound = new NBTTagCompound();
// }
// return itemStac... | int energy = StackUtils.getNBT(this.cellphone).getInteger("Energy"); |
Tonius/E-Mobile | src/main/java/tonius/emobile/network/message/MessageDiallingParticles.java | // Path: src/main/java/tonius/emobile/EMobile.java
// @Mod(modid = "emobile", guiFactory = "tonius.emobile.config.ConfigGuiFactoryEM", dependencies = "after:ThermalExpansion")
// public class EMobile {
//
// @Instance("emobile")
// public static EMobile instance;
// @SidedProxy(serverSide = "tonius.emo... | import io.netty.buffer.ByteBuf;
import tonius.emobile.EMobile;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext; | package tonius.emobile.network.message;
public class MessageDiallingParticles implements IMessage, IMessageHandler<MessageDiallingParticles, IMessage> {
public double posX;
public double posY;
public double posZ;
public MessageDiallingParticles() {
}
public MessageDiallingPartic... | // Path: src/main/java/tonius/emobile/EMobile.java
// @Mod(modid = "emobile", guiFactory = "tonius.emobile.config.ConfigGuiFactoryEM", dependencies = "after:ThermalExpansion")
// public class EMobile {
//
// @Instance("emobile")
// public static EMobile instance;
// @SidedProxy(serverSide = "tonius.emo... | EMobile.proxy.showDiallingParticles(msg.posX, msg.posY, msg.posZ); |
Tonius/E-Mobile | src/main/java/tonius/emobile/util/ServerUtils.java | // Path: src/main/java/tonius/emobile/network/PacketHandler.java
// public class PacketHandler {
//
// public static final SimpleNetworkWrapper instance = NetworkRegistry.INSTANCE.newSimpleChannel("EMobile");
//
// public static void preInit() {
// EMobile.logger.info("Registering network mess... | import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import tonius.emobile.network.PacketHandler;
import tonius.emobile.network.message.M... | package tonius.emobile.util;
public class ServerUtils {
public static EntityPlayerMP getPlayerOnServer(String name) {
return MinecraftServer.getServer().getConfigurationManager().func_152612_a(name);
}
public static boolean isPlayerConnected(EntityPlayerMP player) {
return Minecr... | // Path: src/main/java/tonius/emobile/network/PacketHandler.java
// public class PacketHandler {
//
// public static final SimpleNetworkWrapper instance = NetworkRegistry.INSTANCE.newSimpleChannel("EMobile");
//
// public static void preInit() {
// EMobile.logger.info("Registering network mess... | PacketHandler.instance.sendToAllAround(new MessageDiallingSound(player.getEntityId()), new TargetPoint(player.dimension, player.posX, player.posY, player.posZ, 256)); |
Tonius/E-Mobile | src/main/java/tonius/emobile/util/ServerUtils.java | // Path: src/main/java/tonius/emobile/network/PacketHandler.java
// public class PacketHandler {
//
// public static final SimpleNetworkWrapper instance = NetworkRegistry.INSTANCE.newSimpleChannel("EMobile");
//
// public static void preInit() {
// EMobile.logger.info("Registering network mess... | import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import tonius.emobile.network.PacketHandler;
import tonius.emobile.network.message.M... | package tonius.emobile.util;
public class ServerUtils {
public static EntityPlayerMP getPlayerOnServer(String name) {
return MinecraftServer.getServer().getConfigurationManager().func_152612_a(name);
}
public static boolean isPlayerConnected(EntityPlayerMP player) {
return Minecr... | // Path: src/main/java/tonius/emobile/network/PacketHandler.java
// public class PacketHandler {
//
// public static final SimpleNetworkWrapper instance = NetworkRegistry.INSTANCE.newSimpleChannel("EMobile");
//
// public static void preInit() {
// EMobile.logger.info("Registering network mess... | PacketHandler.instance.sendToAllAround(new MessageDiallingSound(player.getEntityId()), new TargetPoint(player.dimension, player.posX, player.posY, player.posZ, 256)); |
Tonius/E-Mobile | src/main/java/tonius/emobile/config/ConfigGuiEM.java | // Path: src/main/java/tonius/emobile/config/EMConfig.java
// public static class ConfigSection {
//
// public String name;
// public String id;
//
// public ConfigSection(String name, String id) {
// this.name = name;
// this.id = id;
// EMConfig.configSections.add... | import java.util.ArrayList;
import java.util.List;
import net.minecraft.client.gui.GuiScreen;
import net.minecraftforge.common.config.ConfigCategory;
import net.minecraftforge.common.config.ConfigElement;
import tonius.emobile.config.EMConfig.ConfigSection;
import tonius.emobile.util.StringUtils;
import cpw.mods.fml.cl... | package tonius.emobile.config;
public class ConfigGuiEM extends GuiConfig {
public ConfigGuiEM(GuiScreen parentScreen) { | // Path: src/main/java/tonius/emobile/config/EMConfig.java
// public static class ConfigSection {
//
// public String name;
// public String id;
//
// public ConfigSection(String name, String id) {
// this.name = name;
// this.id = id;
// EMConfig.configSections.add... | super(parentScreen, getConfigElements(parentScreen), "emobile", false, false, StringUtils.translate("config.title")); |
Tonius/E-Mobile | src/main/java/tonius/emobile/config/ConfigGuiEM.java | // Path: src/main/java/tonius/emobile/config/EMConfig.java
// public static class ConfigSection {
//
// public String name;
// public String id;
//
// public ConfigSection(String name, String id) {
// this.name = name;
// this.id = id;
// EMConfig.configSections.add... | import java.util.ArrayList;
import java.util.List;
import net.minecraft.client.gui.GuiScreen;
import net.minecraftforge.common.config.ConfigCategory;
import net.minecraftforge.common.config.ConfigElement;
import tonius.emobile.config.EMConfig.ConfigSection;
import tonius.emobile.util.StringUtils;
import cpw.mods.fml.cl... | package tonius.emobile.config;
public class ConfigGuiEM extends GuiConfig {
public ConfigGuiEM(GuiScreen parentScreen) {
super(parentScreen, getConfigElements(parentScreen), "emobile", false, false, StringUtils.translate("config.title"));
}
private static List<IConfigElement> getConfigE... | // Path: src/main/java/tonius/emobile/config/EMConfig.java
// public static class ConfigSection {
//
// public String name;
// public String id;
//
// public ConfigSection(String name, String id) {
// this.name = name;
// this.id = id;
// EMConfig.configSections.add... | for (ConfigSection configSection : EMConfig.configSections) { |
Tonius/E-Mobile | src/main/java/tonius/emobile/inventory/InventoryCellphone.java | // Path: src/main/java/tonius/emobile/item/ItemCellphone.java
// public class ItemCellphone extends Item {
//
// public ItemCellphone() {
// this.setMaxStackSize(1);
// this.setUnlocalizedName("emobile.cellphone");
// this.setTextureName("emobile:cellphone");
// this.setCreative... | import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemEnderPearl;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import tonius.emobile.item.ItemCellphone;
import tonius.emobile.util.St... | package tonius.emobile.inventory;
public class InventoryCellphone implements IInventory {
private ItemStack cellphone;
private ItemStack[] inv = new ItemStack[1];
public InventoryCellphone(ItemStack cellphone) { | // Path: src/main/java/tonius/emobile/item/ItemCellphone.java
// public class ItemCellphone extends Item {
//
// public ItemCellphone() {
// this.setMaxStackSize(1);
// this.setUnlocalizedName("emobile.cellphone");
// this.setTextureName("emobile:cellphone");
// this.setCreative... | if (cellphone == null || !(cellphone.getItem() instanceof ItemCellphone)) { |
Tonius/E-Mobile | src/main/java/tonius/emobile/inventory/InventoryCellphone.java | // Path: src/main/java/tonius/emobile/item/ItemCellphone.java
// public class ItemCellphone extends Item {
//
// public ItemCellphone() {
// this.setMaxStackSize(1);
// this.setUnlocalizedName("emobile.cellphone");
// this.setTextureName("emobile:cellphone");
// this.setCreative... | import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemEnderPearl;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import tonius.emobile.item.ItemCellphone;
import tonius.emobile.util.St... | package tonius.emobile.inventory;
public class InventoryCellphone implements IInventory {
private ItemStack cellphone;
private ItemStack[] inv = new ItemStack[1];
public InventoryCellphone(ItemStack cellphone) {
if (cellphone == null || !(cellphone.getItem() instanceof ItemCellphone)) {
... | // Path: src/main/java/tonius/emobile/item/ItemCellphone.java
// public class ItemCellphone extends Item {
//
// public ItemCellphone() {
// this.setMaxStackSize(1);
// this.setUnlocalizedName("emobile.cellphone");
// this.setTextureName("emobile:cellphone");
// this.setCreative... | this.readFromNBT(StackUtils.getNBT(cellphone)); |
Tonius/E-Mobile | src/main/java/tonius/emobile/network/message/MessageDiallingSound.java | // Path: src/main/java/tonius/emobile/EMobile.java
// @Mod(modid = "emobile", guiFactory = "tonius.emobile.config.ConfigGuiFactoryEM", dependencies = "after:ThermalExpansion")
// public class EMobile {
//
// @Instance("emobile")
// public static EMobile instance;
// @SidedProxy(serverSide = "tonius.emo... | import io.netty.buffer.ByteBuf;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import tonius.emobile.EMobile;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import c... | package tonius.emobile.network.message;
public class MessageDiallingSound implements IMessage, IMessageHandler<MessageDiallingSound, IMessage> {
public int entityID;
public MessageDiallingSound() {
}
public MessageDiallingSound(int entityID) {
this.entityID = entityID;
}
... | // Path: src/main/java/tonius/emobile/EMobile.java
// @Mod(modid = "emobile", guiFactory = "tonius.emobile.config.ConfigGuiFactoryEM", dependencies = "after:ThermalExpansion")
// public class EMobile {
//
// @Instance("emobile")
// public static EMobile instance;
// @SidedProxy(serverSide = "tonius.emo... | EMobile.proxy.playDiallingSound((EntityPlayer) entity); |
shimniok/WheelEncoderGenerator | src/main/java/com/botthoughts/util/AppInfo.java | // Path: src/main/java/com/botthoughts/wheelencodergenerator/App.java
// public class App extends Application {
//
// public static Application app;
// public static Stage stage;
// protected static Scene scene;
// protected static FXMLLoader fxmlLoader;
//
// @Override
// public void start(Stage stage) t... | import com.botthoughts.wheelencodergenerator.App;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties; | /*
* Copyright 2021 mes.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wri... | // Path: src/main/java/com/botthoughts/wheelencodergenerator/App.java
// public class App extends Application {
//
// public static Application app;
// public static Stage stage;
// protected static Scene scene;
// protected static FXMLLoader fxmlLoader;
//
// @Override
// public void start(Stage stage) t... | InputStream stream = App.class.getResourceAsStream("/app.properties"); |
shimniok/WheelEncoderGenerator | src/test/java/com/botthoughts/wheelencodergenerator/model/GrayEncoderTest.java | // Path: src/main/java/com/botthoughts/wheelencodergenerator/EncoderTrack.java
// public class EncoderTrack {
// public double outerDiameter;
// public double innerDiameter;
// public double startAngle;
// public double stripeAngle;
// public int stripeCount;
//
// /**
// *
// * @par... | import com.botthoughts.wheelencodergenerator.EncoderTrack;
import com.botthoughts.wheelencodergenerator.model.GrayEncoder;
import java.util.List;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.BeforeAll;
import org.jun... | /*
* Copyright 2021 mes.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wri... | // Path: src/main/java/com/botthoughts/wheelencodergenerator/EncoderTrack.java
// public class EncoderTrack {
// public double outerDiameter;
// public double innerDiameter;
// public double startAngle;
// public double stripeAngle;
// public int stripeCount;
//
// /**
// *
// * @par... | GrayEncoder instance = new GrayEncoder(); |
shimniok/WheelEncoderGenerator | src/test/java/com/botthoughts/wheelencodergenerator/model/GrayEncoderTest.java | // Path: src/main/java/com/botthoughts/wheelencodergenerator/EncoderTrack.java
// public class EncoderTrack {
// public double outerDiameter;
// public double innerDiameter;
// public double startAngle;
// public double stripeAngle;
// public int stripeCount;
//
// /**
// *
// * @par... | import com.botthoughts.wheelencodergenerator.EncoderTrack;
import com.botthoughts.wheelencodergenerator.model.GrayEncoder;
import java.util.List;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.BeforeAll;
import org.jun... | /*
* Copyright 2021 mes.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wri... | // Path: src/main/java/com/botthoughts/wheelencodergenerator/EncoderTrack.java
// public class EncoderTrack {
// public double outerDiameter;
// public double innerDiameter;
// public double startAngle;
// public double stripeAngle;
// public int stripeCount;
//
// /**
// *
// * @par... | List<EncoderTrack> result = instance.getTracks(id, od, resolution, index, clockwise); |
shimniok/WheelEncoderGenerator | src/test/java/com/botthoughts/wheelencodergenerator/model/BasicEncoderTest.java | // Path: src/main/java/com/botthoughts/wheelencodergenerator/EncoderTrack.java
// public class EncoderTrack {
// public double outerDiameter;
// public double innerDiameter;
// public double startAngle;
// public double stripeAngle;
// public int stripeCount;
//
// /**
// *
// * @par... | import com.botthoughts.wheelencodergenerator.EncoderTrack;
import java.util.List;
import java.util.function.UnaryOperator;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
im... | /*
* Copyright 2021 mes.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wri... | // Path: src/main/java/com/botthoughts/wheelencodergenerator/EncoderTrack.java
// public class EncoderTrack {
// public double outerDiameter;
// public double innerDiameter;
// public double startAngle;
// public double stripeAngle;
// public int stripeCount;
//
// /**
// *
// * @par... | List<EncoderTrack> tracks = instance.getTracks(id, od, resolution, index, clockwise); |
shimniok/WheelEncoderGenerator | src/main/java/com/botthoughts/wheelencodergenerator/model/GrayEncoder.java | // Path: src/main/java/com/botthoughts/wheelencodergenerator/EncoderTrack.java
// public class EncoderTrack {
// public double outerDiameter;
// public double innerDiameter;
// public double startAngle;
// public double stripeAngle;
// public int stripeCount;
//
// /**
// *
// * @par... | import com.botthoughts.wheelencodergenerator.EncoderTrack;
import java.util.ArrayList;
import java.util.List; | /*
* Copyright 2021 mes.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wri... | // Path: src/main/java/com/botthoughts/wheelencodergenerator/EncoderTrack.java
// public class EncoderTrack {
// public double outerDiameter;
// public double innerDiameter;
// public double startAngle;
// public double stripeAngle;
// public int stripeCount;
//
// /**
// *
// * @par... | public List<EncoderTrack> getTracks(double id, double od, int resolution, boolean index, |
shimniok/WheelEncoderGenerator | src/test/java/com/botthoughts/wheelencodergenerator/model/BinaryEncoderTest.java | // Path: src/main/java/com/botthoughts/wheelencodergenerator/EncoderTrack.java
// public class EncoderTrack {
// public double outerDiameter;
// public double innerDiameter;
// public double startAngle;
// public double stripeAngle;
// public int stripeCount;
//
// /**
// *
// * @par... | import com.botthoughts.wheelencodergenerator.EncoderTrack;
import java.util.List;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Asserti... | assertEquals(false, result);
result = instance.validResolution(instance.RESOLUTION_MIN-1);
assertEquals(false, result);
result = instance.validResolution(instance.RESOLUTION_MIN-2);
assertEquals(false, result);
result = instance.validResolution(instance.RESOLUTION_MAX+1);
assertEquals(... | // Path: src/main/java/com/botthoughts/wheelencodergenerator/EncoderTrack.java
// public class EncoderTrack {
// public double outerDiameter;
// public double innerDiameter;
// public double startAngle;
// public double stripeAngle;
// public int stripeCount;
//
// /**
// *
// * @par... | List<EncoderTrack> result = instance.getTracks(id, od, resolution, index, clockwise); |
shimniok/WheelEncoderGenerator | src/main/java/com/botthoughts/wheelencodergenerator/EncoderView.java | // Path: src/main/java/com/botthoughts/util/ResizeableCanvas.java
// abstract public class ResizeableCanvas extends Canvas {
//
// public ResizeableCanvas() {
// super();
// // Redraw canvas when size changes.
// widthProperty().addListener(evt -> draw());
// heightProperty().addListener(evt -> draw(... | import com.botthoughts.util.ResizeableCanvas;
import com.botthoughts.wheelencodergenerator.model.EncoderModel;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.paint.Color;
import javafx.scene.shape.ArcType; | double od = t.outerDiameter * scale;
double id = t.innerDiameter * scale;
gc.setFill(backgroundColor);
gc.fillOval(x1, y1, od, od);
// Draw the stripes for the track
gc.setFill(foregroundColor);
for (int s = 0; s < t.stripeCount; s += 2) {
gc.fillArc(x1, y1, od, od,
... | // Path: src/main/java/com/botthoughts/util/ResizeableCanvas.java
// abstract public class ResizeableCanvas extends Canvas {
//
// public ResizeableCanvas() {
// super();
// // Redraw canvas when size changes.
// widthProperty().addListener(evt -> draw());
// heightProperty().addListener(evt -> draw(... | EncoderModel enc = ep.getEncoder(); |
shimniok/WheelEncoderGenerator | src/test/java/com/botthoughts/wheelencodergenerator/model/QuadratureEncoderTest.java | // Path: src/main/java/com/botthoughts/wheelencodergenerator/EncoderTrack.java
// public class EncoderTrack {
// public double outerDiameter;
// public double innerDiameter;
// public double startAngle;
// public double stripeAngle;
// public int stripeCount;
//
// /**
// *
// * @par... | import com.botthoughts.wheelencodergenerator.EncoderTrack;
import java.util.List;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Asserti... | /*
* Copyright 2021 mes.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wri... | // Path: src/main/java/com/botthoughts/wheelencodergenerator/EncoderTrack.java
// public class EncoderTrack {
// public double outerDiameter;
// public double innerDiameter;
// public double startAngle;
// public double stripeAngle;
// public int stripeCount;
//
// /**
// *
// * @par... | List<EncoderTrack> tracks = instance.getTracks(id, od, resolution, index, clockwise); |
shimniok/WheelEncoderGenerator | src/main/java/com/botthoughts/wheelencodergenerator/model/QuadratureEncoder.java | // Path: src/main/java/com/botthoughts/wheelencodergenerator/EncoderTrack.java
// public class EncoderTrack {
// public double outerDiameter;
// public double innerDiameter;
// public double startAngle;
// public double stripeAngle;
// public int stripeCount;
//
// /**
// *
// * @par... | import com.botthoughts.wheelencodergenerator.EncoderTrack;
import java.util.ArrayList;
import java.util.List; | /*
* Copyright 2021 mes.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wri... | // Path: src/main/java/com/botthoughts/wheelencodergenerator/EncoderTrack.java
// public class EncoderTrack {
// public double outerDiameter;
// public double innerDiameter;
// public double startAngle;
// public double stripeAngle;
// public int stripeCount;
//
// /**
// *
// * @par... | public List<EncoderTrack> getTracks(double id, double od, int resolution, boolean index, |
shimniok/WheelEncoderGenerator | src/main/java/com/botthoughts/wheelencodergenerator/model/BinaryEncoder.java | // Path: src/main/java/com/botthoughts/wheelencodergenerator/EncoderTrack.java
// public class EncoderTrack {
// public double outerDiameter;
// public double innerDiameter;
// public double startAngle;
// public double stripeAngle;
// public int stripeCount;
//
// /**
// *
// * @par... | import com.botthoughts.wheelencodergenerator.EncoderTrack;
import java.util.ArrayList;
import java.util.List; | /*
* Copyright 2021 mes.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wri... | // Path: src/main/java/com/botthoughts/wheelencodergenerator/EncoderTrack.java
// public class EncoderTrack {
// public double outerDiameter;
// public double innerDiameter;
// public double startAngle;
// public double stripeAngle;
// public int stripeCount;
//
// /**
// *
// * @par... | public List<EncoderTrack> getTracks(double id, double od, int resolution, boolean index, |
shimniok/WheelEncoderGenerator | src/main/java/com/botthoughts/wheelencodergenerator/model/EncoderModel.java | // Path: src/main/java/com/botthoughts/wheelencodergenerator/EncoderTrack.java
// public class EncoderTrack {
// public double outerDiameter;
// public double innerDiameter;
// public double startAngle;
// public double stripeAngle;
// public int stripeCount;
//
// /**
// *
// * @par... | import com.botthoughts.wheelencodergenerator.EncoderTrack;
import java.util.List;
import java.util.function.UnaryOperator; | /*
* Copyright 2021 mes.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wri... | // Path: src/main/java/com/botthoughts/wheelencodergenerator/EncoderTrack.java
// public class EncoderTrack {
// public double outerDiameter;
// public double innerDiameter;
// public double startAngle;
// public double stripeAngle;
// public int stripeCount;
//
// /**
// *
// * @par... | abstract public List<EncoderTrack> getTracks(double id, double od, int resolution, boolean index, |
r2bapps/TaskManager | TaskManagerTest/src/r2b/apps/test/taskmanager/custom/CustomAsyncTask.java | // Path: TaskManagerLib/src/r2b/apps/lib/taskmanager/BaseAsyncTask.java
// public abstract class BaseAsyncTask extends Task<Void> {
//
// /**
// * Builder.
// * @param id The task identifier.
// * @param priority The task priority.
// */
// public BaseAsyncTask(long id, PRIORITY priority) {
// super(id); ... | import r2b.apps.lib.taskmanager.BaseAsyncTask;
import r2b.apps.lib.taskmanager.PRIORITY;
import android.util.Log; | package r2b.apps.test.taskmanager.custom;
public class CustomAsyncTask extends BaseAsyncTask {
private static long DEFAULT_ID = 0;
private static long DEFAULT_THREAD_ID = 0;
private long sleep;
private String name;
private long threadId;
public CustomAsyncTask(long sleep, String name) { | // Path: TaskManagerLib/src/r2b/apps/lib/taskmanager/BaseAsyncTask.java
// public abstract class BaseAsyncTask extends Task<Void> {
//
// /**
// * Builder.
// * @param id The task identifier.
// * @param priority The task priority.
// */
// public BaseAsyncTask(long id, PRIORITY priority) {
// super(id); ... | super(DEFAULT_ID, PRIORITY.DEFAULT); |
r2bapps/TaskManager | TaskManagerTest/src/r2b/apps/test/taskmanager/custom/PriorityAsyncTask.java | // Path: TaskManagerLib/src/r2b/apps/lib/taskmanager/BaseAsyncTask.java
// public abstract class BaseAsyncTask extends Task<Void> {
//
// /**
// * Builder.
// * @param id The task identifier.
// * @param priority The task priority.
// */
// public BaseAsyncTask(long id, PRIORITY priority) {
// super(id); ... | import r2b.apps.lib.taskmanager.BaseAsyncTask;
import r2b.apps.lib.taskmanager.PRIORITY;
import android.util.Log; | package r2b.apps.test.taskmanager.custom;
public class PriorityAsyncTask extends BaseAsyncTask {
private static long DEFAULT_THREAD_ID = 0;
private long sleep;
private String name;
private long threadId;
private long beginExecution = -1;
| // Path: TaskManagerLib/src/r2b/apps/lib/taskmanager/BaseAsyncTask.java
// public abstract class BaseAsyncTask extends Task<Void> {
//
// /**
// * Builder.
// * @param id The task identifier.
// * @param priority The task priority.
// */
// public BaseAsyncTask(long id, PRIORITY priority) {
// super(id); ... | public PriorityAsyncTask(long sleep, String name, PRIORITY priority) { |
r2bapps/TaskManager | TaskManagerLib/src/r2b/apps/lib/taskmanager/Task.java | // Path: TaskManagerLib/src/r2b/apps/utils/Logger.java
// public final class Logger {
//
// /**
// * Send a INFO log message.
// *
// * @param tag
// * Used to identify the source of a log message. It usually
// * identifies the class or activity where the log call occurs.
// * @par... | import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;
import r2b.apps.utils.Logger; | }
return ((PriorityFutureTask<V>) priorityFutureTask).getPriority();
}
/**
* Get task identifier.
* @return The identifier, should be unique.
*/
public long getId() {
return id;
}
/* (non-Javadoc)
* @see java.util.concurrent.Callable#call()
*/
@Override
public V call() throws Exception {
... | // Path: TaskManagerLib/src/r2b/apps/utils/Logger.java
// public final class Logger {
//
// /**
// * Send a INFO log message.
// *
// * @param tag
// * Used to identify the source of a log message. It usually
// * identifies the class or activity where the log call occurs.
// * @par... | Logger.performance( |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/jobs/MovieCategoryJob.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.birbit.android.jobqueue.RetryConstraint;
import javax.inject.Inject;
import org.greenrobot.eventbus.EventBus;
import us.nineworlds.serenity.common.android.injection.InjectingJob;
import us.nineworlds.serenity.common.media.model.IMediaCo... | package us.nineworlds.serenity.jobs;
public class MovieCategoryJob extends InjectingJob {
EventBus eventBus = EventBus.getDefault();
@Inject SerenityClient client;
String key;
public MovieCategoryJob(String key) {
this.key = key;
}
@Override public void onAdded() {
}
@Override public void o... | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | IMediaContainer mediaContainer = client.retrieveItemByIdCategory(key); |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/jobs/SeasonsRetrievalJob.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.birbit.android.jobqueue.RetryConstraint;
import javax.inject.Inject;
import org.greenrobot.eventbus.EventBus;
import us.nineworlds.serenity.common.android.injection.InjectingJob;
import us.nineworlds.serenity.common.media.model.IMediaCo... | package us.nineworlds.serenity.jobs;
public class SeasonsRetrievalJob extends InjectingJob {
@Inject SerenityClient client;
EventBus eventBus = EventBus.getDefault();
String key;
public SeasonsRetrievalJob(@NonNull String key) {
this.key = key;
}
@Override public void onAdded() {
}
@Overrid... | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | IMediaContainer mediaContainer = client.retrieveSeasons(key); |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/ui/video/player/EventLogger.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/annotations/InjectionConstants.java
// public class InjectionConstants {
//
// public static final String APPLICATION_SCOPE = "Application Scope";
//
// }
| import android.os.SystemClock;
import android.util.Log;
import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.PlaybackParameters;
import com.google.android.exoplayer2.Player;
import com.google.android.exoplayer2.audio.AudioRendererEventListener;
import... | /*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/annotations/InjectionConstants.java
// public class InjectionConstants {
//
// public static final String APPLICATION_SCOPE = "Application Scope";
//
// }
// Path: serenity-app/src/main/java/us/nineworlds/serenity/ui/video/player/EventLogger.jav... | Toothpick.inject(this, Toothpick.openScope(InjectionConstants.APPLICATION_SCOPE)); |
NineWorlds/serenity-android | plexapp-rest-library/src/test/java/us/nineworlds/plex/rest/tests/TestPlexFactory.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | import us.nineworlds.plex.rest.tests.utils.NanoHTTPD;
import us.nineworlds.serenity.common.media.model.IDirectory;
import us.nineworlds.serenity.common.media.model.IMediaContainer;
import us.nineworlds.serenity.common.media.model.ITrack;
import us.nineworlds.serenity.common.rest.SerenityClient;
import static org.junit.... | /**
* The MIT License (MIT)
* Copyright (c) 2012 David Carver
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy... | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | IMediaContainer mediaContainer = factory.retrieveLibrary(); |
NineWorlds/serenity-android | plexapp-rest-library/src/test/java/us/nineworlds/plex/rest/tests/TestPlexFactory.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | import us.nineworlds.plex.rest.tests.utils.NanoHTTPD;
import us.nineworlds.serenity.common.media.model.IDirectory;
import us.nineworlds.serenity.common.media.model.IMediaContainer;
import us.nineworlds.serenity.common.media.model.ITrack;
import us.nineworlds.serenity.common.rest.SerenityClient;
import static org.junit.... | SerenityClient factory = PlexappFactory.getInstance(config);
IMediaContainer mediaContainer = factory.retrieveItemByIdCategory("6", "all");
List<IDirectory> directories = mediaContainer.getDirectories();
assertEquals(6, directories.size());
}
@Test public void testRetrieveAllMusic() throws Exceptio... | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | ITrack track = mediaContainer.getTracks().get(0); |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/StartupBroadcastReceiver.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/annotations/InjectionConstants.java
// public class InjectionConstants {
//
// public static final String APPLICATION_SCOPE = "Application Scope";
//
// }
| import toothpick.Toothpick;
import us.nineworlds.serenity.common.annotations.InjectionConstants;
import us.nineworlds.serenity.core.util.AndroidHelper;
import us.nineworlds.serenity.injection.InjectingBroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferen... | /**
* The MIT License (MIT)
* Copyright (c) 2012 David Carver
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy... | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/annotations/InjectionConstants.java
// public class InjectionConstants {
//
// public static final String APPLICATION_SCOPE = "Application Scope";
//
// }
// Path: serenity-app/src/main/java/us/nineworlds/serenity/StartupBroadcastReceiver.java
i... | Toothpick.inject(this, Toothpick.openScope(InjectionConstants.APPLICATION_SCOPE)); |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/ui/browser/tv/TVShowBrowserPresenter.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/annotations/InjectionConstants.java
// public class InjectionConstants {
//
// public static final String APPLICATION_SCOPE = "Application Scope";
//
// }
//
// Path: serenity-app/src/main/java/us/nineworlds/serenity/events/TVCategoryEvent.java
/... | import androidx.annotation.NonNull;
import moxy.InjectViewState;
import moxy.MvpPresenter;
import moxy.viewstate.strategy.SkipStrategy;
import moxy.viewstate.strategy.StateStrategyType;
import com.birbit.android.jobqueue.JobManager;
import java.util.List;
import javax.inject.Inject;
import org.greenrobot.eventbus.Event... | package us.nineworlds.serenity.ui.browser.tv;
@InjectViewState
@StateStrategyType(SkipStrategy.class)
public class TVShowBrowserPresenter extends MvpPresenter<TVShowBrowserView> {
EventBus eventBus = EventBus.getDefault();
@Inject JobManager jobManager;
public TVShowBrowserPresenter() {
}
@Override publi... | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/annotations/InjectionConstants.java
// public class InjectionConstants {
//
// public static final String APPLICATION_SCOPE = "Application Scope";
//
// }
//
// Path: serenity-app/src/main/java/us/nineworlds/serenity/events/TVCategoryEvent.java
/... | Toothpick.inject(this, Toothpick.openScope(InjectionConstants.APPLICATION_SCOPE)); |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/ui/browser/tv/TVShowBrowserPresenter.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/annotations/InjectionConstants.java
// public class InjectionConstants {
//
// public static final String APPLICATION_SCOPE = "Application Scope";
//
// }
//
// Path: serenity-app/src/main/java/us/nineworlds/serenity/events/TVCategoryEvent.java
/... | import androidx.annotation.NonNull;
import moxy.InjectViewState;
import moxy.MvpPresenter;
import moxy.viewstate.strategy.SkipStrategy;
import moxy.viewstate.strategy.StateStrategyType;
import com.birbit.android.jobqueue.JobManager;
import java.util.List;
import javax.inject.Inject;
import org.greenrobot.eventbus.Event... | package us.nineworlds.serenity.ui.browser.tv;
@InjectViewState
@StateStrategyType(SkipStrategy.class)
public class TVShowBrowserPresenter extends MvpPresenter<TVShowBrowserView> {
EventBus eventBus = EventBus.getDefault();
@Inject JobManager jobManager;
public TVShowBrowserPresenter() {
}
@Override publi... | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/annotations/InjectionConstants.java
// public class InjectionConstants {
//
// public static final String APPLICATION_SCOPE = "Application Scope";
//
// }
//
// Path: serenity-app/src/main/java/us/nineworlds/serenity/events/TVCategoryEvent.java
/... | jobManager.addJobInBackground(new TVCategoryJob(key)); |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/ui/browser/tv/TVShowBrowserPresenter.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/annotations/InjectionConstants.java
// public class InjectionConstants {
//
// public static final String APPLICATION_SCOPE = "Application Scope";
//
// }
//
// Path: serenity-app/src/main/java/us/nineworlds/serenity/events/TVCategoryEvent.java
/... | import androidx.annotation.NonNull;
import moxy.InjectViewState;
import moxy.MvpPresenter;
import moxy.viewstate.strategy.SkipStrategy;
import moxy.viewstate.strategy.StateStrategyType;
import com.birbit.android.jobqueue.JobManager;
import java.util.List;
import javax.inject.Inject;
import org.greenrobot.eventbus.Event... | package us.nineworlds.serenity.ui.browser.tv;
@InjectViewState
@StateStrategyType(SkipStrategy.class)
public class TVShowBrowserPresenter extends MvpPresenter<TVShowBrowserView> {
EventBus eventBus = EventBus.getDefault();
@Inject JobManager jobManager;
public TVShowBrowserPresenter() {
}
@Override publi... | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/annotations/InjectionConstants.java
// public class InjectionConstants {
//
// public static final String APPLICATION_SCOPE = "Application Scope";
//
// }
//
// Path: serenity-app/src/main/java/us/nineworlds/serenity/events/TVCategoryEvent.java
/... | TVShowRetrievalJob tvShowRetrievalJob = new TVShowRetrievalJob(key, category); |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/ui/browser/tv/TVShowBrowserPresenter.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/annotations/InjectionConstants.java
// public class InjectionConstants {
//
// public static final String APPLICATION_SCOPE = "Application Scope";
//
// }
//
// Path: serenity-app/src/main/java/us/nineworlds/serenity/events/TVCategoryEvent.java
/... | import androidx.annotation.NonNull;
import moxy.InjectViewState;
import moxy.MvpPresenter;
import moxy.viewstate.strategy.SkipStrategy;
import moxy.viewstate.strategy.StateStrategyType;
import com.birbit.android.jobqueue.JobManager;
import java.util.List;
import javax.inject.Inject;
import org.greenrobot.eventbus.Event... | package us.nineworlds.serenity.ui.browser.tv;
@InjectViewState
@StateStrategyType(SkipStrategy.class)
public class TVShowBrowserPresenter extends MvpPresenter<TVShowBrowserView> {
EventBus eventBus = EventBus.getDefault();
@Inject JobManager jobManager;
public TVShowBrowserPresenter() {
}
@Override publi... | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/annotations/InjectionConstants.java
// public class InjectionConstants {
//
// public static final String APPLICATION_SCOPE = "Application Scope";
//
// }
//
// Path: serenity-app/src/main/java/us/nineworlds/serenity/events/TVCategoryEvent.java
/... | @Subscribe(threadMode = ThreadMode.MAIN) public void onTVCategoryResponse(TVCategoryEvent event) { |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/ui/browser/tv/TVShowBrowserPresenter.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/annotations/InjectionConstants.java
// public class InjectionConstants {
//
// public static final String APPLICATION_SCOPE = "Application Scope";
//
// }
//
// Path: serenity-app/src/main/java/us/nineworlds/serenity/events/TVCategoryEvent.java
/... | import androidx.annotation.NonNull;
import moxy.InjectViewState;
import moxy.MvpPresenter;
import moxy.viewstate.strategy.SkipStrategy;
import moxy.viewstate.strategy.StateStrategyType;
import com.birbit.android.jobqueue.JobManager;
import java.util.List;
import javax.inject.Inject;
import org.greenrobot.eventbus.Event... | package us.nineworlds.serenity.ui.browser.tv;
@InjectViewState
@StateStrategyType(SkipStrategy.class)
public class TVShowBrowserPresenter extends MvpPresenter<TVShowBrowserView> {
EventBus eventBus = EventBus.getDefault();
@Inject JobManager jobManager;
public TVShowBrowserPresenter() {
}
@Override publi... | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/annotations/InjectionConstants.java
// public class InjectionConstants {
//
// public static final String APPLICATION_SCOPE = "Application Scope";
//
// }
//
// Path: serenity-app/src/main/java/us/nineworlds/serenity/events/TVCategoryEvent.java
/... | @Subscribe(threadMode = ThreadMode.MAIN) public void onTVShowResponse(TVShowRetrievalEvent event) { |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/ui/browser/movie/MovieBrowserContract.java | // Path: serenity-app/src/main/java/us/nineworlds/serenity/events/MovieRetrievalEvent.java
// public class MovieRetrievalEvent extends SerenityEvent {
//
// public MovieRetrievalEvent(IMediaContainer mediaContainer) {
// super(mediaContainer);
// }
// }
| import moxy.MvpView;
import java.util.List;
import moxy.viewstate.strategy.AddToEndSingleStrategy;
import moxy.viewstate.strategy.StateStrategyType;
import us.nineworlds.serenity.core.model.CategoryInfo;
import us.nineworlds.serenity.core.model.SecondaryCategoryInfo;
import us.nineworlds.serenity.core.model.VideoConten... | package us.nineworlds.serenity.ui.browser.movie;
/**
* Created by dcarver on 10/10/17.
*/
public interface MovieBrowserContract {
interface MovieBrowserView extends MvpView {
@StateStrategyType(AddToEndSingleStrategy.class)
void populateCategory(List<CategoryInfo> categories, String key);
@StateS... | // Path: serenity-app/src/main/java/us/nineworlds/serenity/events/MovieRetrievalEvent.java
// public class MovieRetrievalEvent extends SerenityEvent {
//
// public MovieRetrievalEvent(IMediaContainer mediaContainer) {
// super(mediaContainer);
// }
// }
// Path: serenity-app/src/main/java/us/nineworlds/seren... | void onMoviePosterResponse(MovieRetrievalEvent event); |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/fragments/MainMenuFragment.java | // Path: serenity-app/src/main/java/us/nineworlds/serenity/events/ErrorMainMenuEvent.java
// public class ErrorMainMenuEvent extends SerenityEvent {
//
// public ErrorMainMenuEvent() {
// super(null);
// }
// }
| import android.app.Activity;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.leanback.widget.HorizontalGridView;
import androidx.leanback.widget.OnChildSelectedListener;
import androidx.leanback.widget.OnChildViewHolderSelectedListener;
import androidx.recyclerview.widget.LinearLayoutMana... | }
private void setupGallery() {
mainGallery.setWindowAlignment(HorizontalGridView.WINDOW_ALIGN_BOTH_EDGE);
MainMenuTextViewAdapter adapter = new MainMenuTextViewAdapter();
mainGallery.setAdapter(adapter);
mainGallery.setVisibility(View.VISIBLE);
adapter.updateMenuItems(menuItems);
Activity... | // Path: serenity-app/src/main/java/us/nineworlds/serenity/events/ErrorMainMenuEvent.java
// public class ErrorMainMenuEvent extends SerenityEvent {
//
// public ErrorMainMenuEvent() {
// super(null);
// }
// }
// Path: serenity-app/src/main/java/us/nineworlds/serenity/fragments/MainMenuFragment.java
import ... | @Subscribe(threadMode = ThreadMode.MAIN) public void onMainMenuErrorResponse(ErrorMainMenuEvent event) { |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/ui/browser/tv/episodes/EpisodePosterOnItemSelectedListener.java | // Path: serenity-app/src/main/java/us/nineworlds/serenity/ui/adapters/AbstractPosterImageGalleryAdapter.java
// public abstract class AbstractPosterImageGalleryAdapter extends InjectingRecyclerViewAdapter implements
// View.OnKeyListener {
//
// protected static List<VideoContentInfo> posterList = null;
// pr... | import android.app.Activity;
import android.graphics.Bitmap;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
i... | @BindView(R.id.movieActionBarPosterTitle)
TextView seriesTitle;
@BindView(R.id.movieSummary)
TextView episodeSummary;
@BindView(R.id.movieBrowserPosterTitle)
TextView title;
@BindView(R.id.videoTextExtra)
TextView videoTextExtra;
@BindView(R.id.fanArt)
View fanArt;
@BindView(... | // Path: serenity-app/src/main/java/us/nineworlds/serenity/ui/adapters/AbstractPosterImageGalleryAdapter.java
// public abstract class AbstractPosterImageGalleryAdapter extends InjectingRecyclerViewAdapter implements
// View.OnKeyListener {
//
// protected static List<VideoContentInfo> posterList = null;
// pr... | AbstractPosterImageGalleryAdapter adapter; |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/SerenityApplication.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/annotations/InjectionConstants.java
// public class InjectionConstants {
//
// public static final String APPLICATION_SCOPE = "Application Scope";
//
// }
| import android.app.Application;
import android.content.BroadcastReceiver;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import com.birbit.android.j... | /**
* The MIT License (MIT)
* Copyright (c) 2012-2014 David Carver
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use,... | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/annotations/InjectionConstants.java
// public class InjectionConstants {
//
// public static final String APPLICATION_SCOPE = "Application Scope";
//
// }
// Path: serenity-app/src/main/java/us/nineworlds/serenity/SerenityApplication.java
import... | Scope scope = Toothpick.openScope(InjectionConstants.APPLICATION_SCOPE); |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/jobs/TVCategoryJob.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import com.birbit.android.jobqueue.RetryConstraint;
import javax.inject.Inject;
import org.greenrobot.eventbus.EventBus;
import us.nineworlds.serenity.common.android.injection.InjectingJob;
import us.n... | package us.nineworlds.serenity.jobs;
public class TVCategoryJob extends InjectingJob {
EventBus eventBus = EventBus.getDefault();
@Inject SerenityClient client;
String key;
public TVCategoryJob(String key) {
this.key = key;
}
@Override public void onAdded() {
}
@VisibleForTesting public Str... | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | IMediaContainer mediaContainer = client.retrieveSeriesCategoryById(key); |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/jobs/TVCategoryJob.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import com.birbit.android.jobqueue.RetryConstraint;
import javax.inject.Inject;
import org.greenrobot.eventbus.EventBus;
import us.nineworlds.serenity.common.android.injection.InjectingJob;
import us.n... | package us.nineworlds.serenity.jobs;
public class TVCategoryJob extends InjectingJob {
EventBus eventBus = EventBus.getDefault();
@Inject SerenityClient client;
String key;
public TVCategoryJob(String key) {
this.key = key;
}
@Override public void onAdded() {
}
@VisibleForTesting public Str... | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | eventBus.post(new TVCategoryEvent(mediaContainer, key)); |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/jobs/TVShowRetrievalJob.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import com.birbit.android.jobqueue.RetryConstraint;
import javax.inject.Inject;
import org.greenrobot.eventbus.EventBus;
import us.nineworlds.serenity.common.android.injection.InjectingJob;
import us.n... | package us.nineworlds.serenity.jobs;
public class TVShowRetrievalJob extends InjectingJob {
@Inject SerenityClient client;
EventBus eventBus = EventBus.getDefault();
String key;
String category;
public TVShowRetrievalJob(@NonNull String key, String category) {
this.key = key;
this.category = cat... | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | IMediaContainer mediaContainer = client.retrieveSeriesById(key, category); |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/jobs/TVShowRetrievalJob.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import com.birbit.android.jobqueue.RetryConstraint;
import javax.inject.Inject;
import org.greenrobot.eventbus.EventBus;
import us.nineworlds.serenity.common.android.injection.InjectingJob;
import us.n... | package us.nineworlds.serenity.jobs;
public class TVShowRetrievalJob extends InjectingJob {
@Inject SerenityClient client;
EventBus eventBus = EventBus.getDefault();
String key;
String category;
public TVShowRetrievalJob(@NonNull String key, String category) {
this.key = key;
this.category = cat... | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | TVShowRetrievalEvent event = new TVShowRetrievalEvent(mediaContainer, key, category); |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/jobs/TVCategorySecondaryJob.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.birbit.android.jobqueue.RetryConstraint;
import javax.inject.Inject;
import org.greenrobot.eventbus.EventBus;
import us.nineworlds.serenity.common.android.injection.InjectingJob;
import us.nineworlds.serenity.common.media.model.IMediaCo... | package us.nineworlds.serenity.jobs;
public class TVCategorySecondaryJob extends InjectingJob {
EventBus eventBus = EventBus.getDefault();
@Inject SerenityClient client;
String key;
String category;
public TVCategorySecondaryJob(@NonNull String key, @NonNull String category) {
this.key = key;
th... | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | IMediaContainer mediaContainer = client.retrieveItemByIdCategory(key, category); |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/ui/browser/tv/episodes/EpisodeBrowserActivity.java | // Path: serenity-app/src/main/java/us/nineworlds/serenity/ui/adapters/AbstractPosterImageGalleryAdapter.java
// public abstract class AbstractPosterImageGalleryAdapter extends InjectingRecyclerViewAdapter implements
// View.OnKeyListener {
//
// protected static List<VideoContentInfo> posterList = null;
// pr... | import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
import androidx.legacy.app.ActionBarDrawerToggle;
import androidx.recyclerview.widget.RecyclerView;
import android.view.KeyEvent;
import android.view.View;
import android.widget.FrameLayout;
imp... | /**
* The MIT License (MIT)
* Copyright (c) 2013 David Carver
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy... | // Path: serenity-app/src/main/java/us/nineworlds/serenity/ui/adapters/AbstractPosterImageGalleryAdapter.java
// public abstract class AbstractPosterImageGalleryAdapter extends InjectingRecyclerViewAdapter implements
// View.OnKeyListener {
//
// protected static List<VideoContentInfo> posterList = null;
// pr... | public AbstractPosterImageGalleryAdapter seasonEpisodeAdapter; |
NineWorlds/serenity-android | serenity-app/src/test/java/us/nineworlds/serenity/test/InjectingTest.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/annotations/InjectionConstants.java
// public class InjectionConstants {
//
// public static final String APPLICATION_SCOPE = "Application Scope";
//
// }
| import org.junit.After;
import org.junit.Before;
import toothpick.Scope;
import toothpick.Toothpick;
import toothpick.config.Module;
import us.nineworlds.serenity.common.annotations.InjectionConstants; | /**
* The MIT License (MIT)
* Copyright (c) 2012 David Carver
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy... | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/annotations/InjectionConstants.java
// public class InjectionConstants {
//
// public static final String APPLICATION_SCOPE = "Application Scope";
//
// }
// Path: serenity-app/src/test/java/us/nineworlds/serenity/test/InjectingTest.java
import ... | return Toothpick.openScope(InjectionConstants.APPLICATION_SCOPE); |
NineWorlds/serenity-android | plexapp-rest-library/src/main/java/us/nineworlds/plex/rest/PlexappClient.java | // Path: plexapp-rest-library/src/main/java/us/nineworlds/plex/rest/services/PlexTextService.java
// public interface PlexTextService {
//
// @GET(":/scrobble?identifier=com.plexapp.plugins.library")
// Call<String> watched(@Query("key") String key);
//
// @GET(":/unscrobble?identifier=com.plexapp.plugins... | import retrofit2.Retrofit;
import retrofit2.converter.scalars.ScalarsConverterFactory;
import retrofit2.converter.simplexml.SimpleXmlConverterFactory;
import us.nineworlds.plex.rest.config.IConfiguration;
import us.nineworlds.plex.rest.model.impl.MediaContainer;
import us.nineworlds.plex.rest.services.PlexMediaContaine... | /**
* The MIT License (MIT)
* Copyright (c) 2012 David Carver
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy... | // Path: plexapp-rest-library/src/main/java/us/nineworlds/plex/rest/services/PlexTextService.java
// public interface PlexTextService {
//
// @GET(":/scrobble?identifier=com.plexapp.plugins.library")
// Call<String> watched(@Query("key") String key);
//
// @GET(":/unscrobble?identifier=com.plexapp.plugins... | private PlexTextService textClient; |
NineWorlds/serenity-android | plexapp-rest-library/src/main/java/us/nineworlds/plex/rest/PlexappClient.java | // Path: plexapp-rest-library/src/main/java/us/nineworlds/plex/rest/services/PlexTextService.java
// public interface PlexTextService {
//
// @GET(":/scrobble?identifier=com.plexapp.plugins.library")
// Call<String> watched(@Query("key") String key);
//
// @GET(":/unscrobble?identifier=com.plexapp.plugins... | import retrofit2.Retrofit;
import retrofit2.converter.scalars.ScalarsConverterFactory;
import retrofit2.converter.simplexml.SimpleXmlConverterFactory;
import us.nineworlds.plex.rest.config.IConfiguration;
import us.nineworlds.plex.rest.model.impl.MediaContainer;
import us.nineworlds.plex.rest.services.PlexMediaContaine... | okClient.cache(null);
Retrofit.Builder builder = new Retrofit.Builder();
Retrofit mediaContainerAdapter = builder.baseUrl(resourcePath.getRoot())
.addConverterFactory(SimpleXmlConverterFactory.createNonStrict(serializer))
.client(okClient.build())
.build();
mediaContainerclient... | // Path: plexapp-rest-library/src/main/java/us/nineworlds/plex/rest/services/PlexTextService.java
// public interface PlexTextService {
//
// @GET(":/scrobble?identifier=com.plexapp.plugins.library")
// Call<String> watched(@Query("key") String key);
//
// @GET(":/unscrobble?identifier=com.plexapp.plugins... | public IMediaContainer retrieveRootData() throws Exception { |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/events/TVShowRetrievalEvent.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | import us.nineworlds.serenity.common.media.model.IMediaContainer; | package us.nineworlds.serenity.events;
public class TVShowRetrievalEvent extends SerenityEvent {
private String key;
private String category;
| // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | public TVShowRetrievalEvent(IMediaContainer mediaContainer, String key, String category) { |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/core/services/MovieSearchIntentService.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import us.nineworlds.serenity.common.media.model.IMediaContainer; | /**
* The MIT License (MIT)
* Copyright (c) 2012 David Carver
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy... | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IMediaContainer.java
// public interface IMediaContainer {
// String getTitle2();
//
// void setTitle2(String title2);
//
// List<IDirectory> getDirectories();
//
// void setDirectories(List<IDirectory> directory);
//
// int ... | @Override protected IMediaContainer retrieveVideos() throws Exception { |
NineWorlds/serenity-android | emby-lib/src/main/java/us/nineworlds/serenity/emby/model/Media.java | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IPart.java
// public interface IPart {
// List<IStream> getStreams();
//
// void setStreams(List<IStream> streams);
//
// String getContainer();
//
// void setContainer(String container);
//
// String getKey();
//
// void ... | import java.util.List;
import us.nineworlds.serenity.common.media.model.IMedia;
import us.nineworlds.serenity.common.media.model.IPart; | package us.nineworlds.serenity.emby.model;
public class Media implements IMedia {
private String aspectRatio;
private String audioCodec;
private String videoCodec;
private String videoResolution;
private String container;
private String audioChannels; | // Path: serenity-common/src/main/java/us/nineworlds/serenity/common/media/model/IPart.java
// public interface IPart {
// List<IStream> getStreams();
//
// void setStreams(List<IStream> streams);
//
// String getContainer();
//
// void setContainer(String container);
//
// String getKey();
//
// void ... | private List<IPart> videoParts; |
NineWorlds/serenity-android | serenity-app/src/test/java/us/nineworlds/serenity/ui/browser/tv/TVShowBrowserPresenterTest.java | // Path: serenity-app/src/main/java/us/nineworlds/serenity/events/TVCategoryEvent.java
// public class TVCategoryEvent extends MainCategoryEvent {
//
// public TVCategoryEvent(IMediaContainer mediaContainer, String key) {
// super(mediaContainer, key);
// }
// }
//
// Path: serenity-app/src/main/java/us/ninew... | import com.birbit.android.jobqueue.JobManager;
import java.util.List;
import org.apache.commons.lang3.RandomStringUtils;
import org.greenrobot.eventbus.EventBus;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito... | package us.nineworlds.serenity.ui.browser.tv;
public class TVShowBrowserPresenterTest extends InjectingTest {
@Mock JobManager mockJobManager;
@Mock EventBus mockEventBus;
@Mock SerenityClient mockSerenityClient;
@Mock TVShowBrowserView mockView;
TVShowBrowserPresenter presenter;
@Before public voi... | // Path: serenity-app/src/main/java/us/nineworlds/serenity/events/TVCategoryEvent.java
// public class TVCategoryEvent extends MainCategoryEvent {
//
// public TVCategoryEvent(IMediaContainer mediaContainer, String key) {
// super(mediaContainer, key);
// }
// }
//
// Path: serenity-app/src/main/java/us/ninew... | doNothing().when(mockJobManager).addJobInBackground(any(TVCategoryJob.class)); |
NineWorlds/serenity-android | serenity-app/src/test/java/us/nineworlds/serenity/handlers/AutoConfigureHandlerRunnableTest.java | // Path: serenity-app/src/test/java/us/nineworlds/serenity/test/InjectingTest.java
// public abstract class InjectingTest {
//
// protected Scope scope;
//
// @Before public void setUp() throws Exception {
// scope = openScope();
// installTestModules();
// Toothpick.inject(this, scope);
// }
//
//... | import org.junit.runner.RunWith;
import org.robolectric.Robolectric;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.shadows.ShadowToast;
import toothpick.config.Module;
import us.nineworlds.plex.server.GDMServer;
import us.nineworlds.serenity.common.Server;
import us.nineworlds.serenity.injection.... | /**
* The MIT License (MIT)
* Copyright (c) 2012 David Carver
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy... | // Path: serenity-app/src/test/java/us/nineworlds/serenity/test/InjectingTest.java
// public abstract class InjectingTest {
//
// protected Scope scope;
//
// @Before public void setUp() throws Exception {
// scope = openScope();
// installTestModules();
// Toothpick.inject(this, scope);
// }
//
//... | public class AutoConfigureHandlerRunnableTest extends InjectingTest { |
NineWorlds/serenity-android | serenity-app/src/main/java/us/nineworlds/serenity/ui/util/VideoPlayerIntentUtils.java | // Path: serenity-app/src/main/java/us/nineworlds/serenity/core/externalplayer/ExternalPlayerFactory.java
// public class ExternalPlayerFactory {
//
// private final VideoContentInfo videoContent;
// private final Context activity;
//
// /**
// *
// */
// public ExternalPlayerFactory(VideoContentInfo vc... | import java.util.LinkedList;
import us.nineworlds.serenity.R;
import us.nineworlds.serenity.core.SerenityConstants;
import us.nineworlds.serenity.core.externalplayer.ExternalPlayer;
import us.nineworlds.serenity.core.externalplayer.ExternalPlayerFactory;
import us.nineworlds.serenity.core.model.VideoContentInfo;
import... | /**
* The MIT License (MIT)
* Copyright (c) 2012 David Carver
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy... | // Path: serenity-app/src/main/java/us/nineworlds/serenity/core/externalplayer/ExternalPlayerFactory.java
// public class ExternalPlayerFactory {
//
// private final VideoContentInfo videoContent;
// private final Context activity;
//
// /**
// *
// */
// public ExternalPlayerFactory(VideoContentInfo vc... | ExternalPlayerFactory factory = new ExternalPlayerFactory(videoContent, activity); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.