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
justyoyo/Contrast
pdf417/src/main/java/com/justyoyo/contrast/pdf417/PDF417.java
// Path: core/src/main/java/com/justyoyo/contrast/WriterException.java // public final class WriterException extends Exception { // // public WriterException() { // } // // public WriterException(String message) { // super(message); // } // // public WriterException(Throwable cause) { // ...
import com.justyoyo.contrast.WriterException; import com.justyoyo.contrast.common.BarcodeMatrix; import com.justyoyo.contrast.common.BarcodeRow; import com.justyoyo.contrast.common.Compaction; import java.nio.charset.Charset;
} else { left = (30 * (y / 3)) + (c - 1); right = (30 * (y / 3)) + (errorCorrectionLevel * 3) + ((r - 1) % 3); } int pattern = CODEWORD_TABLE[cluster][left]; encodeChar(pattern, 17, logic.getCurrentRow()); for (int x = 0; x < ...
// Path: core/src/main/java/com/justyoyo/contrast/WriterException.java // public final class WriterException extends Exception { // // public WriterException() { // } // // public WriterException(String message) { // super(message); // } // // public WriterException(Throwable cause) { // ...
public void generateBarcodeLogic(String msg, int errorCorrectionLevel) throws WriterException {
justyoyo/Contrast
core/src/main/java/com/justyoyo/contrast/common/CharacterSetECI.java
// Path: core/src/main/java/com/justyoyo/contrast/FormatException.java // public final class FormatException extends ReaderException { // // private static final FormatException instance = new FormatException(); // // private FormatException() { // // do nothing // } // // public static FormatException g...
import com.justyoyo.contrast.FormatException; import java.util.HashMap; import java.util.Map;
} } private final int[] values; private final String[] otherEncodingNames; CharacterSetECI(int value) { this(new int[] {value}); } CharacterSetECI(int value, String... otherEncodingNames) { this.values = new int[] {value}; this.otherEncodingNames = otherEncodingNames; } CharacterSe...
// Path: core/src/main/java/com/justyoyo/contrast/FormatException.java // public final class FormatException extends ReaderException { // // private static final FormatException instance = new FormatException(); // // private FormatException() { // // do nothing // } // // public static FormatException g...
public static CharacterSetECI getCharacterSetECIByValue(int value) throws FormatException {
justyoyo/Contrast
pdf417/src/main/java/com/justyoyo/contrast/pdf417/PDF417ErrorCorrection.java
// Path: core/src/main/java/com/justyoyo/contrast/WriterException.java // public final class WriterException extends Exception { // // public WriterException() { // } // // public WriterException(String message) { // super(message); // } // // public WriterException(Throwable cause) { // ...
import com.justyoyo.contrast.WriterException;
752, 533, 175, 134, 14, 381, 433, 717, 45, 111, 20, 596, 284, 736, 138, 646, 411, 877, 669, 141, 919, 45, 780, 407, 164, 332, 899, 165, 726, 600, 325, 498, 655, 357, 752, 768, 223, 849, 647, 63, 310, 863, 251, 366, 304, 282, 738, 675, ...
// Path: core/src/main/java/com/justyoyo/contrast/WriterException.java // public final class WriterException extends Exception { // // public WriterException() { // } // // public WriterException(String message) { // super(message); // } // // public WriterException(Throwable cause) { // ...
static int getRecommendedMinimumErrorCorrectionLevel(int n) throws WriterException {
kms/sdr101-java
src/test/java/org/picofarad/sdr101/blocks/BufferSourceTest.java
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/BufferSource.java // public class BufferSource implements SignalBlock { // private Deque<Double> buffer; // // public BufferSource() { // buffer = new ArrayDeque<Double>(); // } // // public void add(double d) { // buffer.offer...
import org.junit.Assert; import org.junit.Test; import org.picofarad.sdr101.blocks.sources.BufferSource;
/* sdr101-java * Simple software-defined radio for Java. * * (c) Karl-Martin Skontorp <kms@skontorp.net> ~ http://22pf.org/ * Licensed under the GNU GPL 2.0 or later. */ package org.picofarad.sdr101.blocks; public class BufferSourceTest { @Test public void testBufferSourceEmpty() {
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/BufferSource.java // public class BufferSource implements SignalBlock { // private Deque<Double> buffer; // // public BufferSource() { // buffer = new ArrayDeque<Double>(); // } // // public void add(double d) { // buffer.offer...
BufferSource bs = new BufferSource();
kms/sdr101-java
src/test/java/org/picofarad/sdr101/blocks/FullWaveRectifierTest.java
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/BufferSource.java // public class BufferSource implements SignalBlock { // private Deque<Double> buffer; // // public BufferSource() { // buffer = new ArrayDeque<Double>(); // } // // public void add(double d) { // buffer.offer...
import org.junit.Assert; import org.junit.Test; import org.picofarad.sdr101.blocks.sources.BufferSource;
/* sdr101-java * Simple software-defined radio for Java. * * (c) Karl-Martin Skontorp <kms@skontorp.net> ~ http://22pf.org/ * Licensed under the GNU GPL 2.0 or later. */ package org.picofarad.sdr101.blocks; public class FullWaveRectifierTest { @Test public void testFullWaveRectifier() {
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/BufferSource.java // public class BufferSource implements SignalBlock { // private Deque<Double> buffer; // // public BufferSource() { // buffer = new ArrayDeque<Double>(); // } // // public void add(double d) { // buffer.offer...
BufferSource bs = new BufferSource();
kms/sdr101-java
src/test/java/org/picofarad/sdr101/blocks/ImpulseSourceTest.java
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/ImpulseSource.java // public class ImpulseSource implements SignalBlock { // private boolean first; // // public ImpulseSource() { // first = true; // } // // public double output() { // if (first) { // first = fals...
import org.junit.Assert; import org.junit.Test; import org.picofarad.sdr101.blocks.sources.ImpulseSource;
/* sdr101-java * Simple software-defined radio for Java. * * (c) Karl-Martin Skontorp <kms@skontorp.net> ~ http://22pf.org/ * Licensed under the GNU GPL 2.0 or later. */ package org.picofarad.sdr101.blocks; public class ImpulseSourceTest { @Test public void testOutput() {
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/ImpulseSource.java // public class ImpulseSource implements SignalBlock { // private boolean first; // // public ImpulseSource() { // first = true; // } // // public double output() { // if (first) { // first = fals...
ImpulseSource is = new ImpulseSource();
kms/sdr101-java
src/test/java/org/picofarad/sdr101/blocks/FirFilterTest.java
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/ImpulseSource.java // public class ImpulseSource implements SignalBlock { // private boolean first; // // public ImpulseSource() { // first = true; // } // // public double output() { // if (first) { // first = fals...
import java.util.ArrayList; import java.util.List; import org.junit.Assert; import org.junit.Test; import org.picofarad.sdr101.blocks.sources.ImpulseSource;
Assert.assertEquals(2, ff.taps()); c.add(1.0); ff = new FirFilter(c); Assert.assertEquals(3, ff.taps()); } @Test public void testOut() { List<Double> c = new ArrayList<Double>(); c.add(0.0); c.add(1.0); FirFilter ff = new FirFilter(c); ...
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/ImpulseSource.java // public class ImpulseSource implements SignalBlock { // private boolean first; // // public ImpulseSource() { // first = true; // } // // public double output() { // if (first) { // first = fals...
ff.setInput(new ImpulseSource());
kms/sdr101-java
src/test/java/org/picofarad/sdr101/blocks/SummerTest.java
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/BufferSource.java // public class BufferSource implements SignalBlock { // private Deque<Double> buffer; // // public BufferSource() { // buffer = new ArrayDeque<Double>(); // } // // public void add(double d) { // buffer.offer...
import org.junit.Assert; import org.junit.Test; import org.picofarad.sdr101.blocks.sources.BufferSource;
/* sdr101-java * Simple software-defined radio for Java. * * (c) Karl-Martin Skontorp <kms@skontorp.net> ~ http://22pf.org/ * Licensed under the GNU GPL 2.0 or later. */ package org.picofarad.sdr101.blocks; public class SummerTest { @Test public void testSummer() {
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/BufferSource.java // public class BufferSource implements SignalBlock { // private Deque<Double> buffer; // // public BufferSource() { // buffer = new ArrayDeque<Double>(); // } // // public void add(double d) { // buffer.offer...
BufferSource a = new BufferSource();
kms/sdr101-java
src/test/java/org/picofarad/sdr101/blocks/EnvelopeDetectorTest.java
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/SineSource.java // public class SineSource implements SignalBlock { // private int sampleRate; // private double frequency; // private Double newFrequency; // private double phaseOffset; // private int sampleNumber; // // public SineSou...
import org.junit.Test; import org.picofarad.sdr101.blocks.sources.SineSource;
/* sdr101-java * Simple software-defined radio for Java. * * (c) Karl-Martin Skontorp <kms@skontorp.net> ~ http://22pf.org/ * Licensed under the GNU GPL 2.0 or later. */ package org.picofarad.sdr101.blocks; public class EnvelopeDetectorTest { @Test public void testEnvelopeDetector() {
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/SineSource.java // public class SineSource implements SignalBlock { // private int sampleRate; // private double frequency; // private Double newFrequency; // private double phaseOffset; // private int sampleNumber; // // public SineSou...
SineSource lo = new SineSource(44100, 1000);
kms/sdr101-java
src/test/java/org/picofarad/sdr101/blocks/NullSourceTest.java
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/NullSource.java // public class NullSource implements SignalBlock { // public double output() { // return 0.0; // } // }
import org.junit.Assert; import org.junit.Test; import org.picofarad.sdr101.blocks.sources.NullSource;
/* sdr101-java * Simple software-defined radio for Java. * * (c) Karl-Martin Skontorp <kms@skontorp.net> ~ http://22pf.org/ * Licensed under the GNU GPL 2.0 or later. */ package org.picofarad.sdr101.blocks; public class NullSourceTest { @Test public void testOutput() {
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/NullSource.java // public class NullSource implements SignalBlock { // public double output() { // return 0.0; // } // } // Path: src/test/java/org/picofarad/sdr101/blocks/NullSourceTest.java import org.junit.Assert; import org.junit.Test; imp...
NullSource ns = new NullSource();
kms/sdr101-java
src/test/java/org/picofarad/sdr101/blocks/ByteArraySourceTest.java
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/ByteArraySource.java // public class ByteArraySource implements SignalBlock { // byte[] input; // int highIndex; // int lowIndex; // // public ByteArraySource(byte[] b, int h, int l) { // input = b; // highIndex = h; // ...
import org.junit.Assert; import org.junit.Test; import org.picofarad.sdr101.blocks.sources.ByteArraySource;
/* sdr101-java * Simple software-defined radio for Java. * * (c) Karl-Martin Skontorp <kms@skontorp.net> ~ http://22pf.org/ * Licensed under the GNU GPL 2.0 or later. */ package org.picofarad.sdr101.blocks; public class ByteArraySourceTest { @Test public void testOutput() { byte[] b = new byte[4...
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/ByteArraySource.java // public class ByteArraySource implements SignalBlock { // byte[] input; // int highIndex; // int lowIndex; // // public ByteArraySource(byte[] b, int h, int l) { // input = b; // highIndex = h; // ...
ByteArraySource bas = new ByteArraySource(b, 0, 1);
kms/sdr101-java
src/test/java/org/picofarad/sdr101/blocks/FilterFactoryTest.java
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/ImpulseSource.java // public class ImpulseSource implements SignalBlock { // private boolean first; // // public ImpulseSource() { // first = true; // } // // public double output() { // if (first) { // first = fals...
import java.io.FileNotFoundException; import java.io.IOException; import java.util.List; import org.junit.Assert; import org.junit.Test; import org.picofarad.sdr101.blocks.sources.ImpulseSource;
Assert.assertEquals(1.0, c.get(0), 0.0001); Assert.assertEquals(2.0, c.get(1), 0.0001); Assert.assertEquals(0.12345, c.get(2), 0.0001); Assert.assertEquals(-0.5, c.get(3), 0.0001); Assert.assertEquals(-1.0, c.get(4), 0.0001); } @Test public void testLoadFirFromFileBa...
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/ImpulseSource.java // public class ImpulseSource implements SignalBlock { // private boolean first; // // public ImpulseSource() { // first = true; // } // // public double output() { // if (first) { // first = fals...
ff.setInput(new ImpulseSource());
kms/sdr101-java
src/main/java/org/picofarad/sdr101/blocks/FirFilter.java
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/NullSource.java // public class NullSource implements SignalBlock { // public double output() { // return 0.0; // } // }
import java.util.ArrayDeque; import java.util.Deque; import java.util.List; import org.picofarad.sdr101.blocks.sources.NullSource;
/* sdr101-java * Simple software-defined radio for Java. * * (c) Karl-Martin Skontorp <kms@skontorp.net> ~ http://22pf.org/ * Licensed under the GNU GPL 2.0 or later. */ package org.picofarad.sdr101.blocks; public class FirFilter implements SignalBlock { private Double[] coefficients; private Deque<Dou...
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/NullSource.java // public class NullSource implements SignalBlock { // public double output() { // return 0.0; // } // } // Path: src/main/java/org/picofarad/sdr101/blocks/FirFilter.java import java.util.ArrayDeque; import java.util.Deque; imp...
setInput(new NullSource());
kms/sdr101-java
src/test/java/org/picofarad/sdr101/blocks/MixerTest.java
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/BufferSource.java // public class BufferSource implements SignalBlock { // private Deque<Double> buffer; // // public BufferSource() { // buffer = new ArrayDeque<Double>(); // } // // public void add(double d) { // buffer.offer...
import org.junit.Assert; import org.junit.Test; import org.picofarad.sdr101.blocks.sources.BufferSource;
/* sdr101-java * Simple software-defined radio for Java. * * (c) Karl-Martin Skontorp <kms@skontorp.net> ~ http://22pf.org/ * Licensed under the GNU GPL 2.0 or later. */ package org.picofarad.sdr101.blocks; public class MixerTest { @Test public void testMixer() {
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/BufferSource.java // public class BufferSource implements SignalBlock { // private Deque<Double> buffer; // // public BufferSource() { // buffer = new ArrayDeque<Double>(); // } // // public void add(double d) { // buffer.offer...
BufferSource a = new BufferSource();
kms/sdr101-java
src/test/java/org/picofarad/sdr101/blocks/SplitterTest.java
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/BufferSource.java // public class BufferSource implements SignalBlock { // private Deque<Double> buffer; // // public BufferSource() { // buffer = new ArrayDeque<Double>(); // } // // public void add(double d) { // buffer.offer...
import org.junit.Assert; import org.junit.Test; import org.picofarad.sdr101.blocks.sources.BufferSource;
/* sdr101-java * Simple software-defined radio for Java. * * (c) Karl-Martin Skontorp <kms@skontorp.net> ~ http://22pf.org/ * Licensed under the GNU GPL 2.0 or later. */ package org.picofarad.sdr101.blocks; public class SplitterTest { @Test public void testOneWaySplitter() {
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/BufferSource.java // public class BufferSource implements SignalBlock { // private Deque<Double> buffer; // // public BufferSource() { // buffer = new ArrayDeque<Double>(); // } // // public void add(double d) { // buffer.offer...
BufferSource bs = new BufferSource();
kms/sdr101-java
src/test/java/org/picofarad/sdr101/blocks/InvertedSummerTest.java
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/BufferSource.java // public class BufferSource implements SignalBlock { // private Deque<Double> buffer; // // public BufferSource() { // buffer = new ArrayDeque<Double>(); // } // // public void add(double d) { // buffer.offer...
import org.junit.Assert; import org.junit.Test; import org.picofarad.sdr101.blocks.sources.BufferSource;
/* sdr101-java * Simple software-defined radio for Java. * * (c) Karl-Martin Skontorp <kms@skontorp.net> ~ http://22pf.org/ * Licensed under the GNU GPL 2.0 or later. */ package org.picofarad.sdr101.blocks; public class InvertedSummerTest { @Test public void testInvertedSummer() {
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/BufferSource.java // public class BufferSource implements SignalBlock { // private Deque<Double> buffer; // // public BufferSource() { // buffer = new ArrayDeque<Double>(); // } // // public void add(double d) { // buffer.offer...
BufferSource a = new BufferSource();
kms/sdr101-java
src/test/java/org/picofarad/sdr101/blocks/CumulativeAverageFilterTest.java
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/BufferSource.java // public class BufferSource implements SignalBlock { // private Deque<Double> buffer; // // public BufferSource() { // buffer = new ArrayDeque<Double>(); // } // // public void add(double d) { // buffer.offer...
import org.junit.Assert; import org.junit.Test; import org.picofarad.sdr101.blocks.sources.BufferSource; import org.picofarad.sdr101.blocks.sources.SineSource;
/* sdr101-java * Simple software-defined radio for Java. * * (c) Karl-Martin Skontorp <kms@skontorp.net> ~ http://22pf.org/ * Licensed under the GNU GPL 2.0 or later. */ package org.picofarad.sdr101.blocks; public class CumulativeAverageFilterTest { @Test public void testCumulativeAverageFilterSimple() ...
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/BufferSource.java // public class BufferSource implements SignalBlock { // private Deque<Double> buffer; // // public BufferSource() { // buffer = new ArrayDeque<Double>(); // } // // public void add(double d) { // buffer.offer...
BufferSource bs = new BufferSource();
kms/sdr101-java
src/test/java/org/picofarad/sdr101/blocks/CumulativeAverageFilterTest.java
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/BufferSource.java // public class BufferSource implements SignalBlock { // private Deque<Double> buffer; // // public BufferSource() { // buffer = new ArrayDeque<Double>(); // } // // public void add(double d) { // buffer.offer...
import org.junit.Assert; import org.junit.Test; import org.picofarad.sdr101.blocks.sources.BufferSource; import org.picofarad.sdr101.blocks.sources.SineSource;
bs.add(1.0); bs.add(0.0); bs.add(1.0); bs.add(1.0); bs.add(1.0); bs.add(1.0); bs.add(1.0); bs.add(1.0); bs.add(1.0); bs.add(1.0); bs.add(1.0); CumulativeAverageFilter maf = new CumulativeAverageFilter(bs, 2); Asser...
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/BufferSource.java // public class BufferSource implements SignalBlock { // private Deque<Double> buffer; // // public BufferSource() { // buffer = new ArrayDeque<Double>(); // } // // public void add(double d) { // buffer.offer...
SineSource lo = new SineSource(44100, 1000);
kms/sdr101-java
src/test/java/org/picofarad/sdr101/blocks/SineSourceTest.java
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/SineSource.java // public class SineSource implements SignalBlock { // private int sampleRate; // private double frequency; // private Double newFrequency; // private double phaseOffset; // private int sampleNumber; // // public SineSou...
import org.junit.Assert; import org.junit.Test; import org.picofarad.sdr101.blocks.sources.SineSource;
/* sdr101-java * Simple software-defined radio for Java. * * (c) Karl-Martin Skontorp <kms@skontorp.net> ~ http://22pf.org/ * Licensed under the GNU GPL 2.0 or later. */ package org.picofarad.sdr101.blocks; public class SineSourceTest { @Test public void testOutputAt2Hz() {
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/SineSource.java // public class SineSource implements SignalBlock { // private int sampleRate; // private double frequency; // private Double newFrequency; // private double phaseOffset; // private int sampleNumber; // // public SineSou...
SineSource lo = new SineSource(8, 2);
cscotta/deschutes
src/main/java/com/cscotta/deschutes/json/LoggedRollupListener.java
// Path: src/main/java/com/cscotta/deschutes/example/requests/RequestEvent.java // public class RequestEvent implements Event { // // private final Request request; // // public RequestEvent(Request request) { // this.request = request; // } // // @Override // public long getTimestamp() { ...
import java.util.List; import java.util.Map; import com.cscotta.deschutes.example.requests.RequestEvent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.cscotta.deschutes.api.ConcurrentRollup; import com.cscotta.deschutes.api.OutputListener; import com.cscotta.deschutes.json.Json; import org.codehau...
package com.cscotta.deschutes.json; public class LoggedRollupListener implements OutputListener<RequestEvent> { private final ObjectMapper jackson = new Json().objectMapper; private static final Logger log = LoggerFactory.getLogger(LoggedRollupListener.class); @Override
// Path: src/main/java/com/cscotta/deschutes/example/requests/RequestEvent.java // public class RequestEvent implements Event { // // private final Request request; // // public RequestEvent(Request request) { // this.request = request; // } // // @Override // public long getTimestamp() { ...
public void update(List<Long> remove, Map<Long, Map<String, ConcurrentRollup<RequestEvent>>> insert) {
cscotta/deschutes
src/main/java/com/cscotta/deschutes/example/requests/WebsocketRollupListener.java
// Path: src/main/java/com/cscotta/deschutes/api/ConcurrentRollup.java // public interface ConcurrentRollup<Input> extends Event { // // /** // * <p>Rollup method called as events are received by a stream for // * aggregation.</p> // * // * <p>Implementations of ConcurrentRollup should accept {...
import com.cscotta.deschutes.api.ConcurrentRollup; import com.cscotta.deschutes.api.OutputListener; import com.cscotta.deschutes.example.app.websockets.OLAPWebSocket; import com.cscotta.deschutes.json.Json; import org.codehaus.jackson.map.ObjectMapper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import jav...
package com.cscotta.deschutes.example.requests; public class WebsocketRollupListener implements OutputListener<RequestEvent> { private final Set<OLAPWebSocket> users;
// Path: src/main/java/com/cscotta/deschutes/api/ConcurrentRollup.java // public interface ConcurrentRollup<Input> extends Event { // // /** // * <p>Rollup method called as events are received by a stream for // * aggregation.</p> // * // * <p>Implementations of ConcurrentRollup should accept {...
private final ObjectMapper jackson = new Json().objectMapper;
cscotta/deschutes
src/main/java/com/cscotta/deschutes/example/requests/WebsocketRollupListener.java
// Path: src/main/java/com/cscotta/deschutes/api/ConcurrentRollup.java // public interface ConcurrentRollup<Input> extends Event { // // /** // * <p>Rollup method called as events are received by a stream for // * aggregation.</p> // * // * <p>Implementations of ConcurrentRollup should accept {...
import com.cscotta.deschutes.api.ConcurrentRollup; import com.cscotta.deschutes.api.OutputListener; import com.cscotta.deschutes.example.app.websockets.OLAPWebSocket; import com.cscotta.deschutes.json.Json; import org.codehaus.jackson.map.ObjectMapper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import jav...
package com.cscotta.deschutes.example.requests; public class WebsocketRollupListener implements OutputListener<RequestEvent> { private final Set<OLAPWebSocket> users; private final ObjectMapper jackson = new Json().objectMapper; private static final Logger log = LoggerFactory.getLogger(WebsocketRollupLi...
// Path: src/main/java/com/cscotta/deschutes/api/ConcurrentRollup.java // public interface ConcurrentRollup<Input> extends Event { // // /** // * <p>Rollup method called as events are received by a stream for // * aggregation.</p> // * // * <p>Implementations of ConcurrentRollup should accept {...
public void update(List<Long> remove, Map<Long, Map<String, ConcurrentRollup<RequestEvent>>> insert) {
cscotta/deschutes
src/main/java/com/cscotta/deschutes/input/CyclingProtobufPreReader.java
// Path: src/main/java/com/cscotta/deschutes/api/EventWrapper.java // public interface EventWrapper<RawInput, WrappedInput> { // // public WrappedInput wrap(RawInput raw); // // }
import com.cscotta.deschutes.api.EventWrapper; import com.google.protobuf.Parser; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.BufferedInputStream; import java.io.InputStream; import java.util.ArrayList; import java.util.Iterator;
package com.cscotta.deschutes.input; public class CyclingProtobufPreReader<ProtoType, Input> implements Iterable<Input> { final Parser<ProtoType> parser; final InputStream inputStream;
// Path: src/main/java/com/cscotta/deschutes/api/EventWrapper.java // public interface EventWrapper<RawInput, WrappedInput> { // // public WrappedInput wrap(RawInput raw); // // } // Path: src/main/java/com/cscotta/deschutes/input/CyclingProtobufPreReader.java import com.cscotta.deschutes.api.EventWrapper; impo...
final EventWrapper<ProtoType, Input> eventWrapper;
cscotta/deschutes
src/main/java/com/cscotta/deschutes/example/requests/RequestRollups.java
// Path: src/main/java/com/cscotta/deschutes/api/ConcurrentRollup.java // public interface ConcurrentRollup<Input> extends Event { // // /** // * <p>Rollup method called as events are received by a stream for // * aggregation.</p> // * // * <p>Implementations of ConcurrentRollup should accept {...
import com.cscotta.deschutes.api.ConcurrentRollup; import com.cscotta.deschutes.api.RollupFactory; import com.cscotta.deschutes.example.requests.RequestRollup; import com.cscotta.deschutes.example.requests.RequestEvent;
package com.cscotta.deschutes.example.requests; public class RequestRollups { public static final RollupFactory<RequestEvent> collapser = new RollupFactory<RequestEvent>() { @Override
// Path: src/main/java/com/cscotta/deschutes/api/ConcurrentRollup.java // public interface ConcurrentRollup<Input> extends Event { // // /** // * <p>Rollup method called as events are received by a stream for // * aggregation.</p> // * // * <p>Implementations of ConcurrentRollup should accept {...
public ConcurrentRollup<RequestEvent> buildRollup(long timestamp) {
cscotta/deschutes
src/main/java/com/cscotta/deschutes/example/requests/RequestRollups.java
// Path: src/main/java/com/cscotta/deschutes/api/ConcurrentRollup.java // public interface ConcurrentRollup<Input> extends Event { // // /** // * <p>Rollup method called as events are received by a stream for // * aggregation.</p> // * // * <p>Implementations of ConcurrentRollup should accept {...
import com.cscotta.deschutes.api.ConcurrentRollup; import com.cscotta.deschutes.api.RollupFactory; import com.cscotta.deschutes.example.requests.RequestRollup; import com.cscotta.deschutes.example.requests.RequestEvent;
package com.cscotta.deschutes.example.requests; public class RequestRollups { public static final RollupFactory<RequestEvent> collapser = new RollupFactory<RequestEvent>() { @Override public ConcurrentRollup<RequestEvent> buildRollup(long timestamp) {
// Path: src/main/java/com/cscotta/deschutes/api/ConcurrentRollup.java // public interface ConcurrentRollup<Input> extends Event { // // /** // * <p>Rollup method called as events are received by a stream for // * aggregation.</p> // * // * <p>Implementations of ConcurrentRollup should accept {...
return new RequestRollup(timestamp);
cscotta/deschutes
src/main/java/com/cscotta/deschutes/aggregation/Stream.java
// Path: src/main/java/com/cscotta/deschutes/api/Event.java // public interface Event { // // /** // * Retrieve the timestamp of an event, represented as a long in // * milliseconds since epoch. // * // * @return The timestamp of this event, represented as a long in // * milliseconds since...
import com.codahale.metrics.Meter; import com.cscotta.deschutes.api.Event; import com.cscotta.deschutes.api.StreamAggregator; import com.cscotta.deschutes.example.app.App; import com.google.common.collect.Lists; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.List; ...
package com.cscotta.deschutes.aggregation; public class Stream<Input extends Event> { private final Iterable<Input> source;
// Path: src/main/java/com/cscotta/deschutes/api/Event.java // public interface Event { // // /** // * Retrieve the timestamp of an event, represented as a long in // * milliseconds since epoch. // * // * @return The timestamp of this event, represented as a long in // * milliseconds since...
private final Meter meter = App.metrics.meter("event_rate");
cscotta/deschutes
src/main/java/com/cscotta/deschutes/aggregation/Stream.java
// Path: src/main/java/com/cscotta/deschutes/api/Event.java // public interface Event { // // /** // * Retrieve the timestamp of an event, represented as a long in // * milliseconds since epoch. // * // * @return The timestamp of this event, represented as a long in // * milliseconds since...
import com.codahale.metrics.Meter; import com.cscotta.deschutes.api.Event; import com.cscotta.deschutes.api.StreamAggregator; import com.cscotta.deschutes.example.app.App; import com.google.common.collect.Lists; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.List; ...
package com.cscotta.deschutes.aggregation; public class Stream<Input extends Event> { private final Iterable<Input> source; private final Meter meter = App.metrics.meter("event_rate"); private final int processorThreads; private static final Logger log = LoggerFactory.getLogger(Stream.class);
// Path: src/main/java/com/cscotta/deschutes/api/Event.java // public interface Event { // // /** // * Retrieve the timestamp of an event, represented as a long in // * milliseconds since epoch. // * // * @return The timestamp of this event, represented as a long in // * milliseconds since...
private final List<StreamAggregator<Input>> queries = Lists.newCopyOnWriteArrayList();
cscotta/deschutes
src/main/java/com/cscotta/deschutes/input/ProtobufReader.java
// Path: src/main/java/com/cscotta/deschutes/api/EventWrapper.java // public interface EventWrapper<RawInput, WrappedInput> { // // public WrappedInput wrap(RawInput raw); // // }
import com.cscotta.deschutes.api.EventWrapper; import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.Parser; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.*; import java.util.Iterator;
package com.cscotta.deschutes.input; public class ProtobufReader<ProtoType, Input> implements Iterable<Input> { final Parser<ProtoType> parser; final InputStream inputStream;
// Path: src/main/java/com/cscotta/deschutes/api/EventWrapper.java // public interface EventWrapper<RawInput, WrappedInput> { // // public WrappedInput wrap(RawInput raw); // // } // Path: src/main/java/com/cscotta/deschutes/input/ProtobufReader.java import com.cscotta.deschutes.api.EventWrapper; import com.goo...
final EventWrapper<ProtoType, Input> eventWrapper;
CyberEagle/AndroidWidgets
library/src/main/java/br/com/cybereagle/androidwidgets/adapter/WrapperCircularPagerAdapter.java
// Path: library/src/main/java/br/com/cybereagle/androidwidgets/view/CircularViewPager.java // public class CircularViewPager extends ViewPager { // // private WrapperCircularPagerAdapter wrapperCircularPagerAdapter; // // public CircularViewPager(Context context) { // super(context); // } // // ...
import android.os.Parcelable; import android.support.v4.view.PagerAdapter; import android.view.View; import android.view.ViewGroup; import br.com.cybereagle.androidwidgets.view.CircularViewPager;
/* * Copyright 2013 Cyber Eagle * * 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 la...
// Path: library/src/main/java/br/com/cybereagle/androidwidgets/view/CircularViewPager.java // public class CircularViewPager extends ViewPager { // // private WrapperCircularPagerAdapter wrapperCircularPagerAdapter; // // public CircularViewPager(Context context) { // super(context); // } // // ...
private CircularViewPager circularViewPager;
CyberEagle/AndroidWidgets
library/src/main/java/br/com/cybereagle/androidwidgets/view/SquareGridLayout.java
// Path: library/src/main/java/br/com/cybereagle/androidwidgets/util/ViewUtils.java // public class ViewUtils { // // public static final boolean IS_API_11_OR_ABOVE; // // static { // IS_API_11_OR_ABOVE = Build.VERSION.SDK_INT >= 11; // } // // public static int makeSquareMeasureSpec(int widt...
import android.content.Context; import android.util.AttributeSet; import android.widget.FrameLayout; import android.widget.GridLayout; import br.com.cybereagle.androidwidgets.util.ViewUtils;
/* * Copyright 2013 Cyber Eagle * * 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 la...
// Path: library/src/main/java/br/com/cybereagle/androidwidgets/util/ViewUtils.java // public class ViewUtils { // // public static final boolean IS_API_11_OR_ABOVE; // // static { // IS_API_11_OR_ABOVE = Build.VERSION.SDK_INT >= 11; // } // // public static int makeSquareMeasureSpec(int widt...
int finalMeasureSpec = ViewUtils.makeSquareMeasureSpec(widthMeasureSpec, heightMeasureSpec);
CyberEagle/AndroidWidgets
library/src/main/java/br/com/cybereagle/androidwidgets/view/SquareFrameLayout.java
// Path: library/src/main/java/br/com/cybereagle/androidwidgets/util/ViewUtils.java // public class ViewUtils { // // public static final boolean IS_API_11_OR_ABOVE; // // static { // IS_API_11_OR_ABOVE = Build.VERSION.SDK_INT >= 11; // } // // public static int makeSquareMeasureSpec(int widt...
import android.content.Context; import android.util.AttributeSet; import android.widget.FrameLayout; import android.widget.RelativeLayout; import br.com.cybereagle.androidwidgets.util.ViewUtils;
/* * Copyright 2013 Cyber Eagle * * 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 la...
// Path: library/src/main/java/br/com/cybereagle/androidwidgets/util/ViewUtils.java // public class ViewUtils { // // public static final boolean IS_API_11_OR_ABOVE; // // static { // IS_API_11_OR_ABOVE = Build.VERSION.SDK_INT >= 11; // } // // public static int makeSquareMeasureSpec(int widt...
int finalMeasureSpec = ViewUtils.makeSquareMeasureSpec(widthMeasureSpec, heightMeasureSpec);
CyberEagle/AndroidWidgets
library/src/main/java/br/com/cybereagle/androidwidgets/helper/UninterceptableViewPagerHelper.java
// Path: library/src/main/java/br/com/cybereagle/androidwidgets/interfaces/UninterceptableViewPager.java // public interface UninterceptableViewPager { // boolean callRealOnInterceptTouchEvent(MotionEvent motionEvent); // }
import android.support.v4.view.ViewPager; import android.view.MotionEvent; import br.com.cybereagle.androidwidgets.interfaces.UninterceptableViewPager;
/* * Copyright 2013 Cyber Eagle * * 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 la...
// Path: library/src/main/java/br/com/cybereagle/androidwidgets/interfaces/UninterceptableViewPager.java // public interface UninterceptableViewPager { // boolean callRealOnInterceptTouchEvent(MotionEvent motionEvent); // } // Path: library/src/main/java/br/com/cybereagle/androidwidgets/helper/UninterceptableView...
if(!(viewPager instanceof UninterceptableViewPager)){
CyberEagle/AndroidWidgets
library/src/main/java/br/com/cybereagle/androidwidgets/view/SquareImageView.java
// Path: library/src/main/java/br/com/cybereagle/androidwidgets/util/ViewUtils.java // public class ViewUtils { // // public static final boolean IS_API_11_OR_ABOVE; // // static { // IS_API_11_OR_ABOVE = Build.VERSION.SDK_INT >= 11; // } // // public static int makeSquareMeasureSpec(int widt...
import android.content.Context; import android.util.AttributeSet; import android.widget.FrameLayout; import android.widget.ImageView; import br.com.cybereagle.androidwidgets.util.ViewUtils;
/* * Copyright 2013 Cyber Eagle * * 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 la...
// Path: library/src/main/java/br/com/cybereagle/androidwidgets/util/ViewUtils.java // public class ViewUtils { // // public static final boolean IS_API_11_OR_ABOVE; // // static { // IS_API_11_OR_ABOVE = Build.VERSION.SDK_INT >= 11; // } // // public static int makeSquareMeasureSpec(int widt...
int finalMeasureSpec = ViewUtils.makeSquareMeasureSpec(widthMeasureSpec, heightMeasureSpec);
CyberEagle/AndroidWidgets
library/src/main/java/br/com/cybereagle/androidwidgets/view/SquareLinearLayout.java
// Path: library/src/main/java/br/com/cybereagle/androidwidgets/util/ViewUtils.java // public class ViewUtils { // // public static final boolean IS_API_11_OR_ABOVE; // // static { // IS_API_11_OR_ABOVE = Build.VERSION.SDK_INT >= 11; // } // // public static int makeSquareMeasureSpec(int widt...
import android.content.Context; import android.util.AttributeSet; import android.widget.FrameLayout; import android.widget.LinearLayout; import br.com.cybereagle.androidwidgets.util.ViewUtils;
/* * Copyright 2013 Cyber Eagle * * 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 la...
// Path: library/src/main/java/br/com/cybereagle/androidwidgets/util/ViewUtils.java // public class ViewUtils { // // public static final boolean IS_API_11_OR_ABOVE; // // static { // IS_API_11_OR_ABOVE = Build.VERSION.SDK_INT >= 11; // } // // public static int makeSquareMeasureSpec(int widt...
int finalMeasureSpec = ViewUtils.makeSquareMeasureSpec(widthMeasureSpec, heightMeasureSpec);
CyberEagle/AndroidWidgets
library/src/main/java/br/com/cybereagle/androidwidgets/view/PagerContainer.java
// Path: library/src/main/java/br/com/cybereagle/androidwidgets/util/ViewUtils.java // public class ViewUtils { // // public static final boolean IS_API_11_OR_ABOVE; // // static { // IS_API_11_OR_ABOVE = Build.VERSION.SDK_INT >= 11; // } // // public static int makeSquareMeasureSpec(int widt...
import android.content.Context; import android.graphics.Point; import android.os.Build; import android.support.v4.view.ViewPager; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import android.widget.FrameLayout; import br.com.cybereagle.androidwidgets.util.ViewUtils;
/* * Copyright 2013 Cyber Eagle * * 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 la...
// Path: library/src/main/java/br/com/cybereagle/androidwidgets/util/ViewUtils.java // public class ViewUtils { // // public static final boolean IS_API_11_OR_ABOVE; // // static { // IS_API_11_OR_ABOVE = Build.VERSION.SDK_INT >= 11; // } // // public static int makeSquareMeasureSpec(int widt...
ViewUtils.enableSoftwareLayer(this);
CyberEagle/AndroidWidgets
library/src/main/java/br/com/cybereagle/androidwidgets/view/SquareRelativeLayout.java
// Path: library/src/main/java/br/com/cybereagle/androidwidgets/util/ViewUtils.java // public class ViewUtils { // // public static final boolean IS_API_11_OR_ABOVE; // // static { // IS_API_11_OR_ABOVE = Build.VERSION.SDK_INT >= 11; // } // // public static int makeSquareMeasureSpec(int widt...
import android.content.Context; import android.util.AttributeSet; import android.widget.RelativeLayout; import br.com.cybereagle.androidwidgets.util.ViewUtils;
/* * Copyright 2013 Cyber Eagle * * 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 la...
// Path: library/src/main/java/br/com/cybereagle/androidwidgets/util/ViewUtils.java // public class ViewUtils { // // public static final boolean IS_API_11_OR_ABOVE; // // static { // IS_API_11_OR_ABOVE = Build.VERSION.SDK_INT >= 11; // } // // public static int makeSquareMeasureSpec(int widt...
int finalMeasureSpec = ViewUtils.makeSquareMeasureSpec(widthMeasureSpec, heightMeasureSpec);
CyberEagle/AndroidWidgets
library/src/main/java/br/com/cybereagle/androidwidgets/view/CoverFlowPagerContainer.java
// Path: library/src/main/java/br/com/cybereagle/androidwidgets/util/ViewUtils.java // public class ViewUtils { // // public static final boolean IS_API_11_OR_ABOVE; // // static { // IS_API_11_OR_ABOVE = Build.VERSION.SDK_INT >= 11; // } // // public static int makeSquareMeasureSpec(int widt...
import android.content.Context; import android.util.AttributeSet; import android.view.View; import br.com.cybereagle.androidwidgets.util.ViewUtils; import java.util.ArrayList; import java.util.List;
/* * Copyright 2013 Cyber Eagle * * 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 la...
// Path: library/src/main/java/br/com/cybereagle/androidwidgets/util/ViewUtils.java // public class ViewUtils { // // public static final boolean IS_API_11_OR_ABOVE; // // static { // IS_API_11_OR_ABOVE = Build.VERSION.SDK_INT >= 11; // } // // public static int makeSquareMeasureSpec(int widt...
ViewUtils.enableHardwareLayer(child);
snowplow/snowplow-java-tracker
src/main/java/com/snowplowanalytics/snowplow/tracker/Subject.java
// Path: src/main/java/com/snowplowanalytics/snowplow/tracker/constants/Parameter.java // public class Parameter { // // General // public static final String SCHEMA = "schema"; // public static final String DATA = "data"; // public static final String EVENT = "e"; // public static final String EID ...
import java.util.Map; import com.snowplowanalytics.snowplow.tracker.constants.Parameter; import java.util.HashMap;
this.domainUserId = domainUserId; return this; } /** * @param domainSessionId a domainSessionId string * @return itself */ public SubjectBuilder domainSessionId(String domainSessionId) { this.domainSessionId = domainSessionId; ...
// Path: src/main/java/com/snowplowanalytics/snowplow/tracker/constants/Parameter.java // public class Parameter { // // General // public static final String SCHEMA = "schema"; // public static final String DATA = "data"; // public static final String EVENT = "e"; // public static final String EID ...
this.standardPairs.put(Parameter.UID, userId);
snowplow/snowplow-java-tracker
src/main/java/com/snowplowanalytics/snowplow/tracker/http/ApacheHttpClientAdapter.java
// Path: src/main/java/com/snowplowanalytics/snowplow/tracker/constants/Constants.java // public class Constants { // public static final String PROTOCOL_VENDOR = "com.snowplowanalytics.snowplow"; // public static final String PROTOCOL_VERSION = "tp2"; // // public static final String SCHEMA_PAYLOAD_DATA =...
import com.google.common.base.Preconditions; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.ContentType; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; ...
/** * Attempts to send a group of payloads with a * GET request to the configured endpoint. * * @param url the URL send * @return the HttpResponse for the Request */ public int doGet(String url) { try { HttpGet httpGet = new HttpGet(url); HttpRespons...
// Path: src/main/java/com/snowplowanalytics/snowplow/tracker/constants/Constants.java // public class Constants { // public static final String PROTOCOL_VENDOR = "com.snowplowanalytics.snowplow"; // public static final String PROTOCOL_VERSION = "tp2"; // // public static final String SCHEMA_PAYLOAD_DATA =...
httpPost.addHeader("Content-Type", Constants.POST_CONTENT_TYPE);
snowplow/snowplow-java-tracker
src/main/java/com/snowplowanalytics/snowplow/tracker/http/OkHttpClientAdapter.java
// Path: src/main/java/com/snowplowanalytics/snowplow/tracker/constants/Constants.java // public class Constants { // public static final String PROTOCOL_VENDOR = "com.snowplowanalytics.snowplow"; // public static final String PROTOCOL_VERSION = "tp2"; // // public static final String SCHEMA_PAYLOAD_DATA =...
import com.snowplowanalytics.snowplow.tracker.constants.Constants; import java.io.IOException; import com.google.common.base.Preconditions; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.MediaType; import okhttp3.Response; import okhttp3.RequestBody; import org.slf4j.Logger; import org.slf4j.Logger...
/* * Copyright (c) 2014-2021 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
// Path: src/main/java/com/snowplowanalytics/snowplow/tracker/constants/Constants.java // public class Constants { // public static final String PROTOCOL_VENDOR = "com.snowplowanalytics.snowplow"; // public static final String PROTOCOL_VERSION = "tp2"; // // public static final String SCHEMA_PAYLOAD_DATA =...
private final MediaType JSON = MediaType.get(Constants.POST_CONTENT_TYPE);
snowplow/snowplow-java-tracker
src/main/java/com/snowplowanalytics/snowplow/tracker/payload/TrackerParameters.java
// Path: src/main/java/com/snowplowanalytics/snowplow/tracker/DevicePlatform.java // public enum DevicePlatform { // Web { // public String toString() { // return "web"; // } // }, // Mobile { // public String toString() { // return "mob"; // } // ...
import com.snowplowanalytics.snowplow.tracker.DevicePlatform;
/* * Copyright (c) 2014-2021 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
// Path: src/main/java/com/snowplowanalytics/snowplow/tracker/DevicePlatform.java // public enum DevicePlatform { // Web { // public String toString() { // return "web"; // } // }, // Mobile { // public String toString() { // return "mob"; // } // ...
private final DevicePlatform platform;
snowplow/snowplow-java-tracker
src/main/java/com/snowplowanalytics/snowplow/tracker/emitter/RequestCallback.java
// Path: src/main/java/com/snowplowanalytics/snowplow/tracker/events/Event.java // public interface Event { // // /** // * @return the events custom context // */ // List<SelfDescribingJson> getContext(); // // /** // * @return the event's timestamp // * Use {@link #getTrueTimestamp()}...
import com.snowplowanalytics.snowplow.tracker.events.Event; import java.util.List;
/* * Copyright (c) 2014-2021 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
// Path: src/main/java/com/snowplowanalytics/snowplow/tracker/events/Event.java // public interface Event { // // /** // * @return the events custom context // */ // List<SelfDescribingJson> getContext(); // // /** // * @return the event's timestamp // * Use {@link #getTrueTimestamp()}...
void onFailure(int successCount, List<Event> failedEvents);
chms/jdotxt
src/com/todotxt/todotxttouch/task/JdotxtTaskBagImpl.java
// Path: src/com/todotxt/todotxttouch/task/sorter/PredefinedSorters.java // public class PredefinedSorters { // public static final Sorter<Task> DEFAULT = PRIORITY.ascending().then(ID.ascending()); // public static final Sorter<Task> TEXT_ASC = TEXT.ascending().then(ID.ascending()); // public static final S...
import com.todotxt.todotxttouch.task.sorter.PredefinedSorters; import java.util.*;
localRepository.purge(); lastReload = null; lastWrite = null; lastChange = null; } @Override public int size() { return tasks.size(); } @Override public List<Task> getTasks() { return getTasks(null, null); } @Override public List<Task> getTasks(Filter<Task> filter, Comparator<Task> comparator) ...
// Path: src/com/todotxt/todotxttouch/task/sorter/PredefinedSorters.java // public class PredefinedSorters { // public static final Sorter<Task> DEFAULT = PRIORITY.ascending().then(ID.ascending()); // public static final Sorter<Task> TEXT_ASC = TEXT.ascending().then(ID.ascending()); // public static final S...
comparator = PredefinedSorters.DEFAULT;
chms/jdotxt
src/com/todotxt/todotxttouch/task/TaskBagImpl.java
// Path: src/com/todotxt/todotxttouch/task/sorter/PredefinedSorters.java // public class PredefinedSorters { // public static final Sorter<Task> DEFAULT = PRIORITY.ascending().then(ID.ascending()); // public static final Sorter<Task> TEXT_ASC = TEXT.ascending().then(ID.ascending()); // public static final S...
import com.todotxt.todotxttouch.task.sorter.PredefinedSorters; import java.util.*;
localRepository.purge(); lastReload = null; lastWrite = null; lastChange = null; } @Override public int size() { return tasks.size(); } @Override public List<Task> getTasks() { return getTasks(null, null); } @Override public List<Task> getTasks(Filter<Task> filter, Comparator<Task> comparator) ...
// Path: src/com/todotxt/todotxttouch/task/sorter/PredefinedSorters.java // public class PredefinedSorters { // public static final Sorter<Task> DEFAULT = PRIORITY.ascending().then(ID.ascending()); // public static final Sorter<Task> TEXT_ASC = TEXT.ascending().then(ID.ascending()); // public static final S...
comparator = PredefinedSorters.DEFAULT;
marzn/telegrambot-japi
src/main/java/de/vivistra/telegrambot/client/Bot.java
// Path: src/main/java/de/vivistra/telegrambot/settings/BotSettings.java // public class BotSettings { // // private static String apiUrl = "https://api.telegram.org/bot"; // private static String apiToken = ""; // // public static String getApiUrlWithToken() { // return apiUrl + apiToken + "/"; // } // // pu...
import java.io.*; import java.net.SocketException; import javax.net.ssl.SSLContext; import org.apache.http.HttpEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.entity.mi...
package de.vivistra.telegrambot.client; /** * This class connects to the Telegram API and posts querys. */ public class Bot { private static final Logger LOG = LogManager.getLogger();
// Path: src/main/java/de/vivistra/telegrambot/settings/BotSettings.java // public class BotSettings { // // private static String apiUrl = "https://api.telegram.org/bot"; // private static String apiToken = ""; // // public static String getApiUrlWithToken() { // return apiUrl + apiToken + "/"; // } // // pu...
private static String API_URL_WITH_TOKEN = BotSettings.getApiUrlWithToken();
marzn/telegrambot-japi
src/main/java/de/vivistra/telegrambot/model/message/StickerMessage.java
// Path: src/main/java/de/vivistra/telegrambot/model/Sticker.java // public class Sticker { // // Unique identifier for this file // String fileId; // // Sticker width // Integer width; // // Sticker height // Integer height; // // Optional. Sticker thumbnail in .webp or .jpg format // PhotoSize thumb; // // O...
import java.io.File; import de.vivistra.telegrambot.model.Sticker;
package de.vivistra.telegrambot.model.message; public class StickerMessage extends Message { private static final String COMMAND = "sendSticker"; public static final String JSON_KEY = "sticker"; /** * Creates a message * * @param recipient * @param message */ public StickerMessage(Long recipient, Fi...
// Path: src/main/java/de/vivistra/telegrambot/model/Sticker.java // public class Sticker { // // Unique identifier for this file // String fileId; // // Sticker width // Integer width; // // Sticker height // Integer height; // // Optional. Sticker thumbnail in .webp or .jpg format // PhotoSize thumb; // // O...
public StickerMessage(Long recipient, Sticker message) {
marzn/telegrambot-japi
src/main/java/de/vivistra/telegrambot/model/GroupChat.java
// Path: src/main/java/de/vivistra/telegrambot/utils/Assert.java // public class Assert { // public static void notNull(Object value) { // // if (Tester.isNull(value)) { // throw new IllegalArgumentException("Argument is NULL."); // } // } // // public static void notEmpty(String value) { // // if (Teste...
import org.json.JSONObject; import de.vivistra.telegrambot.utils.Assert;
package de.vivistra.telegrambot.model; /** * This class represents a GroupChat */ public class GroupChat { // Unique identifier for this group chat private Long id; // Group name private String title; /** * Creates a GroupChat object * * @param id * @param title */ public GroupChat(long id, Strin...
// Path: src/main/java/de/vivistra/telegrambot/utils/Assert.java // public class Assert { // public static void notNull(Object value) { // // if (Tester.isNull(value)) { // throw new IllegalArgumentException("Argument is NULL."); // } // } // // public static void notEmpty(String value) { // // if (Teste...
Assert.notEmpty(title);
marzn/telegrambot-japi
src/main/java/de/vivistra/telegrambot/model/message/DocumentMessage.java
// Path: src/main/java/de/vivistra/telegrambot/model/Document.java // public class Document { // // Unique file identifier // private String fileId; // // Optional. Document thumbnail as defined by sender // private PhotoSize thumb; // // Optional. Original filename as defined by sender // private String fileName...
import java.io.File; import de.vivistra.telegrambot.model.Document;
package de.vivistra.telegrambot.model.message; public class DocumentMessage extends Message { private static final String COMMAND = "sendDocument"; public static final String JSON_KEY = "document"; /** * Creates a message * * @param recipient * @param message */ public DocumentMessage(Long recipient...
// Path: src/main/java/de/vivistra/telegrambot/model/Document.java // public class Document { // // Unique file identifier // private String fileId; // // Optional. Document thumbnail as defined by sender // private PhotoSize thumb; // // Optional. Original filename as defined by sender // private String fileName...
public DocumentMessage(Long recipient, Document message) {
marzn/telegrambot-japi
src/main/java/de/vivistra/telegrambot/model/message/ContactMessage.java
// Path: src/main/java/de/vivistra/telegrambot/model/Contact.java // public class Contact { // private String firstname; // private String lastname; // private String phone; // private String mail; // // /** // * Creates a document object // * // * @param fileId // * @param thumb // * @param f...
import java.io.File; import de.vivistra.telegrambot.model.Contact;
package de.vivistra.telegrambot.model.message; public class ContactMessage extends Message { private static final String COMMAND = "sendContact"; public static final String JSON_KEY = "contact"; /** * Creates a message from String * * @param recipient * @param message */
// Path: src/main/java/de/vivistra/telegrambot/model/Contact.java // public class Contact { // private String firstname; // private String lastname; // private String phone; // private String mail; // // /** // * Creates a document object // * // * @param fileId // * @param thumb // * @param f...
public ContactMessage(Long recipient, Contact contact) {
marzn/telegrambot-japi
src/main/java/de/vivistra/telegrambot/model/User.java
// Path: src/main/java/de/vivistra/telegrambot/utils/Assert.java // public class Assert { // public static void notNull(Object value) { // // if (Tester.isNull(value)) { // throw new IllegalArgumentException("Argument is NULL."); // } // } // // public static void notEmpty(String value) { // // if (Teste...
import org.json.JSONObject; import de.vivistra.telegrambot.utils.Assert; import de.vivistra.telegrambot.utils.Tester;
package de.vivistra.telegrambot.model; /** * This class represents a Telegram user or bot */ public class User { // Unique identifier for this user or bot private Long id; // User's or bot's first name private String firstName; // Optional. User's or bot's last name private String lastName; // Optional. Use...
// Path: src/main/java/de/vivistra/telegrambot/utils/Assert.java // public class Assert { // public static void notNull(Object value) { // // if (Tester.isNull(value)) { // throw new IllegalArgumentException("Argument is NULL."); // } // } // // public static void notEmpty(String value) { // // if (Teste...
Assert.notNull(id);
marzn/telegrambot-japi
src/main/java/de/vivistra/telegrambot/model/User.java
// Path: src/main/java/de/vivistra/telegrambot/utils/Assert.java // public class Assert { // public static void notNull(Object value) { // // if (Tester.isNull(value)) { // throw new IllegalArgumentException("Argument is NULL."); // } // } // // public static void notEmpty(String value) { // // if (Teste...
import org.json.JSONObject; import de.vivistra.telegrambot.utils.Assert; import de.vivistra.telegrambot.utils.Tester;
* Get users or bots first name * * @return */ public String getFirstName() { return firstName; } /** * Get users or bots last name * * @return */ public String getLastName() { return lastName; } /** * Get users or bots username * * @return */ public String getUserName() { retur...
// Path: src/main/java/de/vivistra/telegrambot/utils/Assert.java // public class Assert { // public static void notNull(Object value) { // // if (Tester.isNull(value)) { // throw new IllegalArgumentException("Argument is NULL."); // } // } // // public static void notEmpty(String value) { // // if (Teste...
return firstName + (!Tester.isEmpty(lastName) ? " " + lastName : "") + " ["
marzn/telegrambot-japi
src/main/java/de/vivistra/telegrambot/model/message/AudioMessage.java
// Path: src/main/java/de/vivistra/telegrambot/model/Audio.java // public class Audio { // // // Unique file identifier // private String fileId; // // Duration of the audio in seconds as defined by sender // private Integer duration; // // Optional. MIME type of the file as defined by sender // private String m...
import java.io.File; import de.vivistra.telegrambot.model.Audio;
package de.vivistra.telegrambot.model.message; public class AudioMessage extends Message { private static final String COMMAND = "sendAudio"; public static final String JSON_KEY = "audio"; /** * Creates a message * * @param recipient * @param message */ public AudioMessage(Long recipient, File messa...
// Path: src/main/java/de/vivistra/telegrambot/model/Audio.java // public class Audio { // // // Unique file identifier // private String fileId; // // Duration of the audio in seconds as defined by sender // private Integer duration; // // Optional. MIME type of the file as defined by sender // private String m...
public AudioMessage(Long recipient, Audio message) {
marzn/telegrambot-japi
src/test/java/de/vivistra/telegrambot/client/TestBotRequest.java
// Path: src/main/java/de/vivistra/telegrambot/receiver/UpdateRequest.java // public class UpdateRequest { // // private static final String COMMAND = "getUpdates"; // private static final Integer TIMEOUT = 60; // in seconds for long polling // private static final Integer LIMIT = 100; // // private static final ...
import static org.junit.Assert.*; import static org.mockito.Mockito.when; import org.apache.http.entity.ContentType; import org.apache.http.entity.mime.MIME; import org.apache.http.entity.mime.MultipartEntityBuilder; import org.junit.Test; import org.mockito.Mockito; import de.vivistra.telegrambot.receiver.UpdateReques...
package de.vivistra.telegrambot.client; public class TestBotRequest { @Test public void testUpdateRequest() {
// Path: src/main/java/de/vivistra/telegrambot/receiver/UpdateRequest.java // public class UpdateRequest { // // private static final String COMMAND = "getUpdates"; // private static final Integer TIMEOUT = 60; // in seconds for long polling // private static final Integer LIMIT = 100; // // private static final ...
UpdateRequest updateRequest = Mockito.mock(UpdateRequest.class);
marzn/telegrambot-japi
src/main/java/de/vivistra/telegrambot/model/message/LocationMessage.java
// Path: src/main/java/de/vivistra/telegrambot/model/Location.java // public class Location { // private Double longitude; // private Double latitude; // // /** // * Creates a document object // * // * @param fileId // * @param thumb // * @param fileName // * @param mimeType // * @param fileSize // ...
import java.io.File; import de.vivistra.telegrambot.model.Location;
package de.vivistra.telegrambot.model.message; public class LocationMessage extends Message { private static final String COMMAND = "sendLocation"; public static final String JSON_KEY = "location"; /** * Creates a message from String * * @param recipient * @param message */
// Path: src/main/java/de/vivistra/telegrambot/model/Location.java // public class Location { // private Double longitude; // private Double latitude; // // /** // * Creates a document object // * // * @param fileId // * @param thumb // * @param fileName // * @param mimeType // * @param fileSize // ...
public LocationMessage(Long recipient, Location message) {
marzn/telegrambot-japi
src/main/java/de/vivistra/telegrambot/model/message/ImageMessage.java
// Path: src/main/java/de/vivistra/telegrambot/model/PhotoSize.java // public class PhotoSize { // // Unique identifier for this file // private String fileId; // // Photo width // private Integer width; // // Photo height // private Integer height; // // Optional. File size // private Integer fileSize; // // ...
import java.io.File; import de.vivistra.telegrambot.model.PhotoSize;
package de.vivistra.telegrambot.model.message; public class ImageMessage extends Message { private static final String COMMAND = "sendPhoto"; public static final String JSON_KEY = "photo"; /** * Creates a message * * @param recipient * @param message */ public ImageMessage(Long recipient, File messa...
// Path: src/main/java/de/vivistra/telegrambot/model/PhotoSize.java // public class PhotoSize { // // Unique identifier for this file // private String fileId; // // Photo width // private Integer width; // // Photo height // private Integer height; // // Optional. File size // private Integer fileSize; // // ...
public ImageMessage(Long recipient, PhotoSize[] message) {
DevotedMC/ExilePearl
src/main/java/com/devotedmc/ExilePearl/command/CmdAdminDecay.java
// Path: src/main/java/com/devotedmc/ExilePearl/ExilePearlApi.java // public interface ExilePearlApi extends Plugin, PearlAccess, PearlLogger, PlayerProvider { // // /** // * Gets the exile pearl configuration // * @return The exile pearl configuration // */ // PearlConfig getPearlConfig(); // // /** // * ...
import com.devotedmc.ExilePearl.ExilePearlApi; import com.devotedmc.ExilePearl.util.Permission;
package com.devotedmc.ExilePearl.command; public class CmdAdminDecay extends PearlCommand { public CmdAdminDecay(ExilePearlApi pearlApi) { super(pearlApi); this.aliases.add("decay"); this.setHelpShort("Performs decay operation on all pearls");
// Path: src/main/java/com/devotedmc/ExilePearl/ExilePearlApi.java // public interface ExilePearlApi extends Plugin, PearlAccess, PearlLogger, PlayerProvider { // // /** // * Gets the exile pearl configuration // * @return The exile pearl configuration // */ // PearlConfig getPearlConfig(); // // /** // * ...
this.permission = Permission.DECAY.node;
DevotedMC/ExilePearl
src/main/java/com/devotedmc/ExilePearl/command/CmdConfig.java
// Path: src/main/java/com/devotedmc/ExilePearl/ExilePearlApi.java // public interface ExilePearlApi extends Plugin, PearlAccess, PearlLogger, PlayerProvider { // // /** // * Gets the exile pearl configuration // * @return The exile pearl configuration // */ // PearlConfig getPearlConfig(); // // /** // * ...
import com.devotedmc.ExilePearl.ExilePearlApi; import com.devotedmc.ExilePearl.util.Permission;
package com.devotedmc.ExilePearl.command; public class CmdConfig extends PearlCommand { public CmdConfig(ExilePearlApi pearlApi) { super(pearlApi); this.aliases.add("config"); this.setHelpShort("Manage ExilePearl configuration"); this.addSubCommand(new CmdConfigLoad(plugin)); this.addSubCommand(new CmdC...
// Path: src/main/java/com/devotedmc/ExilePearl/ExilePearlApi.java // public interface ExilePearlApi extends Plugin, PearlAccess, PearlLogger, PlayerProvider { // // /** // * Gets the exile pearl configuration // * @return The exile pearl configuration // */ // PearlConfig getPearlConfig(); // // /** // * ...
this.permission = Permission.CONFIG.node;
DevotedMC/ExilePearl
src/main/java/com/devotedmc/ExilePearl/command/CmdAutoHelp.java
// Path: src/main/java/com/devotedmc/ExilePearl/ExilePearlApi.java // public interface ExilePearlApi extends Plugin, PearlAccess, PearlLogger, PlayerProvider { // // /** // * Gets the exile pearl configuration // * @return The exile pearl configuration // */ // PearlConfig getPearlConfig(); // // /** // * ...
import java.util.ArrayList; import com.devotedmc.ExilePearl.ExilePearlApi; import vg.civcraft.mc.civmodcore.util.TextUtil;
package com.devotedmc.ExilePearl.command; public class CmdAutoHelp extends PearlCommand {
// Path: src/main/java/com/devotedmc/ExilePearl/ExilePearlApi.java // public interface ExilePearlApi extends Plugin, PearlAccess, PearlLogger, PlayerProvider { // // /** // * Gets the exile pearl configuration // * @return The exile pearl configuration // */ // PearlConfig getPearlConfig(); // // /** // * ...
public CmdAutoHelp(ExilePearlApi pearlApi) {
DevotedMC/ExilePearl
src/main/java/com/devotedmc/ExilePearl/command/CmdAdminReload.java
// Path: src/main/java/com/devotedmc/ExilePearl/ExilePearlApi.java // public interface ExilePearlApi extends Plugin, PearlAccess, PearlLogger, PlayerProvider { // // /** // * Gets the exile pearl configuration // * @return The exile pearl configuration // */ // PearlConfig getPearlConfig(); // // /** // * ...
import com.devotedmc.ExilePearl.ExilePearlApi; import com.devotedmc.ExilePearl.util.Permission;
package com.devotedmc.ExilePearl.command; public class CmdAdminReload extends PearlCommand { public CmdAdminReload(ExilePearlApi pearlApi) { super(pearlApi); this.aliases.add("reload"); this.setHelpShort("Reloads the entire plugin.");
// Path: src/main/java/com/devotedmc/ExilePearl/ExilePearlApi.java // public interface ExilePearlApi extends Plugin, PearlAccess, PearlLogger, PlayerProvider { // // /** // * Gets the exile pearl configuration // * @return The exile pearl configuration // */ // PearlConfig getPearlConfig(); // // /** // * ...
this.permission = Permission.RELOAD.node;
DevotedMC/ExilePearl
src/main/java/com/devotedmc/ExilePearl/command/CmdExilePearl.java
// Path: src/main/java/com/devotedmc/ExilePearl/ExilePearlApi.java // public interface ExilePearlApi extends Plugin, PearlAccess, PearlLogger, PlayerProvider { // // /** // * Gets the exile pearl configuration // * @return The exile pearl configuration // */ // PearlConfig getPearlConfig(); // // /** // * ...
import com.devotedmc.ExilePearl.ExilePearlApi;
package com.devotedmc.ExilePearl.command; public class CmdExilePearl extends PearlCommand { private static CmdExilePearl instance; public static CmdExilePearl instance() { return instance; } public final PearlCommand cmdLocate; public final PearlCommand cmdFree; public final PearlCommand cmdBcast; public ...
// Path: src/main/java/com/devotedmc/ExilePearl/ExilePearlApi.java // public interface ExilePearlApi extends Plugin, PearlAccess, PearlLogger, PlayerProvider { // // /** // * Gets the exile pearl configuration // * @return The exile pearl configuration // */ // PearlConfig getPearlConfig(); // // /** // * ...
public CmdExilePearl(ExilePearlApi pearlApi) {
DevotedMC/ExilePearl
src/main/java/com/devotedmc/ExilePearl/ExilePearl.java
// Path: src/main/java/com/devotedmc/ExilePearl/broadcast/BroadcastListener.java // public interface BroadcastListener { // // /** // * Broadcasts the pearl location // * @param pearl The pearl to broadcast // */ // void broadcast(ExilePearl pearl); // // /** // * Gets whether the broadcast listener contai...
import java.util.Date; import java.util.UUID; import org.bukkit.Location; import org.bukkit.block.Block; import org.bukkit.entity.Entity; import org.bukkit.entity.Item; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import com.devotedmc.ExilePearl.broadcast.BroadcastListener; import com.devoted...
package com.devotedmc.ExilePearl; /** * Interface for a player who is imprisoned in an exile pearl * @author Gordon */ public interface ExilePearl { /** * Gets the pearl item name * @return The item name */ String getItemName(); /** * Gets the exiled player ID * @return The player ID */ UUID ge...
// Path: src/main/java/com/devotedmc/ExilePearl/broadcast/BroadcastListener.java // public interface BroadcastListener { // // /** // * Broadcasts the pearl location // * @param pearl The pearl to broadcast // */ // void broadcast(ExilePearl pearl); // // /** // * Gets whether the broadcast listener contai...
PearlHolder getHolder();
DevotedMC/ExilePearl
src/main/java/com/devotedmc/ExilePearl/ExilePearl.java
// Path: src/main/java/com/devotedmc/ExilePearl/broadcast/BroadcastListener.java // public interface BroadcastListener { // // /** // * Broadcasts the pearl location // * @param pearl The pearl to broadcast // */ // void broadcast(ExilePearl pearl); // // /** // * Gets whether the broadcast listener contai...
import java.util.Date; import java.util.UUID; import org.bukkit.Location; import org.bukkit.block.Block; import org.bukkit.entity.Entity; import org.bukkit.entity.Item; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import com.devotedmc.ExilePearl.broadcast.BroadcastListener; import com.devoted...
*/ ItemStack createItemStack(); /** * Verifies the pearl location * @return true if the location is verified */ boolean verifyLocation(); /** * Validates that an item stack is the exile pearl * @param is The item stack * @return true if validation passes */ boolean validateItemStack(ItemStack is)...
// Path: src/main/java/com/devotedmc/ExilePearl/broadcast/BroadcastListener.java // public interface BroadcastListener { // // /** // * Broadcasts the pearl location // * @param pearl The pearl to broadcast // */ // void broadcast(ExilePearl pearl); // // /** // * Gets whether the broadcast listener contai...
void addBroadcastListener(BroadcastListener bcast);
DevotedMC/ExilePearl
src/main/java/com/devotedmc/ExilePearl/ExilePearlPlugin.java
// Path: src/main/java/com/devotedmc/ExilePearl/core/CorePluginFactory.java // public final class CorePluginFactory implements PearlFactory { // // private final ExilePearlApi pearlApi; // // public static ExilePearlApi createCore(final Plugin plugin) { // return new ExilePearlCore(plugin); // } // // /** // ...
import java.io.File; import java.util.List; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPluginLoader; import com.devotedmc.ExilePearl.core.CorePluginFactory;
package com.devotedmc.ExilePearl; /** * The plugin class for ExilePearl * <p> * The meat of the plugin is located in ExilePearlCore.java * * @author GordonFreemanQ * */ public final class ExilePearlPlugin extends JavaPlugin { private static ExilePearlApi core; public static ExilePearlApi getApi() { re...
// Path: src/main/java/com/devotedmc/ExilePearl/core/CorePluginFactory.java // public final class CorePluginFactory implements PearlFactory { // // private final ExilePearlApi pearlApi; // // public static ExilePearlApi createCore(final Plugin plugin) { // return new ExilePearlCore(plugin); // } // // /** // ...
core = CorePluginFactory.createCore(this);
Gotye-QPlus/GotyeSDK-Android
GotyeSDK/src/com/gotye/sdk/config/GotyeTheme.java
// Path: GotyeSDK/src/com/gotye/sdk/ui/view/tab/GotyeTab.java // public class GotyeTab { // // private GotyeTabType mType; // /** // * tab's view for showing // */ // private View mContentView; // // private GotyeTabHostSelectListener mSelectListener; // // /** // * just hold the p...
import android.content.Context; import android.view.View; import com.gotye.sdk.ui.view.tab.GotyeTab; import com.gotye.sdk.ui.view.tab.GotyeTabType;
package com.gotye.sdk.config; /** * Created by lhxia on 13-12-24. */ public interface GotyeTheme { public int getTitileBackgrounId(Context context);
// Path: GotyeSDK/src/com/gotye/sdk/ui/view/tab/GotyeTab.java // public class GotyeTab { // // private GotyeTabType mType; // /** // * tab's view for showing // */ // private View mContentView; // // private GotyeTabHostSelectListener mSelectListener; // // /** // * just hold the p...
public View createTab(Context context, GotyeTabType type);
Gotye-QPlus/GotyeSDK-Android
GotyeSDK/src/com/gotye/sdk/config/GotyeTheme.java
// Path: GotyeSDK/src/com/gotye/sdk/ui/view/tab/GotyeTab.java // public class GotyeTab { // // private GotyeTabType mType; // /** // * tab's view for showing // */ // private View mContentView; // // private GotyeTabHostSelectListener mSelectListener; // // /** // * just hold the p...
import android.content.Context; import android.view.View; import com.gotye.sdk.ui.view.tab.GotyeTab; import com.gotye.sdk.ui.view.tab.GotyeTabType;
package com.gotye.sdk.config; /** * Created by lhxia on 13-12-24. */ public interface GotyeTheme { public int getTitileBackgrounId(Context context); public View createTab(Context context, GotyeTabType type);
// Path: GotyeSDK/src/com/gotye/sdk/ui/view/tab/GotyeTab.java // public class GotyeTab { // // private GotyeTabType mType; // /** // * tab's view for showing // */ // private View mContentView; // // private GotyeTabHostSelectListener mSelectListener; // // /** // * just hold the p...
public void onTabSelectedChanged(Context context, GotyeTab tab, boolean select);
Gotye-QPlus/GotyeSDK-Android
GotyeSDK/src/com/gotye/sdk/handmark/pulltorefresh/library/PullToRefreshExpandableListView.java
// Path: GotyeSDK/src/com/gotye/sdk/handmark/pulltorefresh/library/internal/EmptyViewMethodAccessor.java // public interface EmptyViewMethodAccessor { // // /** // * Calls upto AdapterView.setEmptyView() // * // * @param emptyView - to set as Empty View // */ // public void setEmptyViewInternal(View emptyVi...
import android.annotation.TargetApi; import android.content.Context; import android.os.Build.VERSION; import android.os.Build.VERSION_CODES; import android.util.AttributeSet; import android.view.View; import android.widget.ExpandableListView; import com.gotye.sdk.handmark.pulltorefresh.library.internal.EmptyViewMethodA...
/******************************************************************************* * Copyright 2011, 2012 Chris Banes. * * 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.apac...
// Path: GotyeSDK/src/com/gotye/sdk/handmark/pulltorefresh/library/internal/EmptyViewMethodAccessor.java // public interface EmptyViewMethodAccessor { // // /** // * Calls upto AdapterView.setEmptyView() // * // * @param emptyView - to set as Empty View // */ // public void setEmptyViewInternal(View emptyVi...
class InternalExpandableListView extends ExpandableListView implements EmptyViewMethodAccessor {
Gotye-QPlus/GotyeSDK-Android
GotyeSDK/src/com/gotye/sdk/ui/adapter/EmotiAdapter.java
// Path: GotyeSDK/src/com/gotye/sdk/utils/GraphicsUtil.java // public class GraphicsUtil { // final static float scale = Resources.getSystem().getDisplayMetrics().density; // // /** // * Converts DIP to pixels. // * // * @param dip // * the value of the dip. // * @return the value of the pixels...
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import android.content.Context; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.drawable.Drawable; import android.view.View; import android.view.View...
package com.gotye.sdk.ui.adapter; public class EmotiAdapter extends BaseAdapter { private Context mContext; private Resources mResources; private List<Integer> data; private HashMap<String, Integer> faceMap; String[] icons;
// Path: GotyeSDK/src/com/gotye/sdk/utils/GraphicsUtil.java // public class GraphicsUtil { // final static float scale = Resources.getSystem().getDisplayMetrics().density; // // /** // * Converts DIP to pixels. // * // * @param dip // * the value of the dip. // * @return the value of the pixels...
ImageCache cache;
Gotye-QPlus/GotyeSDK-Android
GotyeSDK/src/com/gotye/sdk/ui/adapter/EmotiAdapter.java
// Path: GotyeSDK/src/com/gotye/sdk/utils/GraphicsUtil.java // public class GraphicsUtil { // final static float scale = Resources.getSystem().getDisplayMetrics().density; // // /** // * Converts DIP to pixels. // * // * @param dip // * the value of the dip. // * @return the value of the pixels...
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import android.content.Context; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.drawable.Drawable; import android.view.View; import android.view.View...
this.mContext = context; this.mResources = resources; cache = new ImageCache(); data = new ArrayList<Integer>(); faceMap = new HashMap<String, Integer>(); Resources rs = resources; TypedArray ty = rs.obtainTypedArray(R.array.gotye_smiley_resid_array); icons = rs.getStringArray(R.array.gotye_s...
// Path: GotyeSDK/src/com/gotye/sdk/utils/GraphicsUtil.java // public class GraphicsUtil { // final static float scale = Resources.getSystem().getDisplayMetrics().density; // // /** // * Converts DIP to pixels. // * // * @param dip // * the value of the dip. // * @return the value of the pixels...
d = GraphicsUtil.drawableToBitmap(mResources.getDrawable(data.get(position)));
Gotye-QPlus/GotyeSDK-Android
GotyeSDK/src/com/gotye/sdk/ui/fragment/adapter/GotyeMsgBoxAdapter.java
// Path: GotyeSDK/src/com/gotye/sdk/utils/ObjectValuePair.java // public class ObjectValuePair<Key, Value> { // public Key name; // public Value value; // }
import java.util.List; import java.util.Map; import android.content.Context; import android.util.Log; import android.view.GestureDetector; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.BaseExpandableListAdapter; import...
package com.gotye.sdk.ui.fragment.adapter; /** * Created by lhxia on 13-12-25. */ public class GotyeMsgBoxAdapter extends BaseExpandableListAdapter { private Context mContext;
// Path: GotyeSDK/src/com/gotye/sdk/utils/ObjectValuePair.java // public class ObjectValuePair<Key, Value> { // public Key name; // public Value value; // } // Path: GotyeSDK/src/com/gotye/sdk/ui/fragment/adapter/GotyeMsgBoxAdapter.java import java.util.List; import java.util.Map; import android.content.Conte...
private List<ObjectValuePair<Map<String, String>, List<GotyeMsgInfo>>> msgBox;
Gotye-QPlus/GotyeSDK-Android
GotyeSDK/src/com/gotye/sdk/ui/fragment/FragmentHolder.java
// Path: GotyeSDK/src/com/gotye/sdk/ui/view/tab/GotyeTab.java // public class GotyeTab { // // private GotyeTabType mType; // /** // * tab's view for showing // */ // private View mContentView; // // private GotyeTabHostSelectListener mSelectListener; // // /** // * just hold the p...
import android.support.v4.app.Fragment; import com.gotye.sdk.ui.view.tab.GotyeTab;
package com.gotye.sdk.ui.fragment; /** * Created by lhxia on 13-12-24. */ public class FragmentHolder { private Fragment mFragment;
// Path: GotyeSDK/src/com/gotye/sdk/ui/view/tab/GotyeTab.java // public class GotyeTab { // // private GotyeTabType mType; // /** // * tab's view for showing // */ // private View mContentView; // // private GotyeTabHostSelectListener mSelectListener; // // /** // * just hold the p...
private GotyeTab mTab;
Gotye-QPlus/GotyeSDK-Android
GotyeSDK/src/com/gotye/sdk/config/DefaultTheme.java
// Path: GotyeSDK/src/com/gotye/sdk/ui/view/tab/GotyeTab.java // public class GotyeTab { // // private GotyeTabType mType; // /** // * tab's view for showing // */ // private View mContentView; // // private GotyeTabHostSelectListener mSelectListener; // // /** // * just hold the p...
import android.content.Context; import android.view.View; import android.widget.ImageView; import com.gotye.sdk.R; import com.gotye.sdk.exceptions.UnSupportClientModeError; import com.gotye.sdk.ui.view.tab.GotyeTab; import com.gotye.sdk.ui.view.tab.GotyeTabType;
package com.gotye.sdk.config; /** * Created by lhxia on 13-12-24. */ public class DefaultTheme implements GotyeTheme{ @Override public int getTitileBackgrounId(Context context) { return 0; } @Override
// Path: GotyeSDK/src/com/gotye/sdk/ui/view/tab/GotyeTab.java // public class GotyeTab { // // private GotyeTabType mType; // /** // * tab's view for showing // */ // private View mContentView; // // private GotyeTabHostSelectListener mSelectListener; // // /** // * just hold the p...
public View createTab(Context context, GotyeTabType type) {
Gotye-QPlus/GotyeSDK-Android
GotyeSDK/src/com/gotye/sdk/config/DefaultTheme.java
// Path: GotyeSDK/src/com/gotye/sdk/ui/view/tab/GotyeTab.java // public class GotyeTab { // // private GotyeTabType mType; // /** // * tab's view for showing // */ // private View mContentView; // // private GotyeTabHostSelectListener mSelectListener; // // /** // * just hold the p...
import android.content.Context; import android.view.View; import android.widget.ImageView; import com.gotye.sdk.R; import com.gotye.sdk.exceptions.UnSupportClientModeError; import com.gotye.sdk.ui.view.tab.GotyeTab; import com.gotye.sdk.ui.view.tab.GotyeTabType;
package com.gotye.sdk.config; /** * Created by lhxia on 13-12-24. */ public class DefaultTheme implements GotyeTheme{ @Override public int getTitileBackgrounId(Context context) { return 0; } @Override public View createTab(Context context, GotyeTabType type) { ImageView tab = ...
// Path: GotyeSDK/src/com/gotye/sdk/ui/view/tab/GotyeTab.java // public class GotyeTab { // // private GotyeTabType mType; // /** // * tab's view for showing // */ // private View mContentView; // // private GotyeTabHostSelectListener mSelectListener; // // /** // * just hold the p...
public void onTabSelectedChanged(Context context, GotyeTab tab, boolean select) {
Gotye-QPlus/GotyeSDK-Android
GotyeSDK/src/com/gotye/sdk/handmark/pulltorefresh/library/PullToRefreshListView.java
// Path: GotyeSDK/src/com/gotye/sdk/handmark/pulltorefresh/library/internal/EmptyViewMethodAccessor.java // public interface EmptyViewMethodAccessor { // // /** // * Calls upto AdapterView.setEmptyView() // * // * @param emptyView - to set as Empty View // */ // public void setEmptyViewInternal(View emptyVi...
import com.gotye.sdk.handmark.pulltorefresh.library.internal.EmptyViewMethodAccessor; import com.gotye.sdk.handmark.pulltorefresh.library.internal.LoadingLayout; import android.annotation.TargetApi; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; import android.os....
* If the value for Scrolling While Refreshing hasn't been * explicitly set via XML, enable Scrolling While Refreshing. */ if (!a.hasValue(R.styleable.PullToRefresh_ptrScrollingWhileRefreshingEnabled)) { setScrollingWhileRefreshingEnabled(true); } } } @TargetApi(9) final class InternalListVie...
// Path: GotyeSDK/src/com/gotye/sdk/handmark/pulltorefresh/library/internal/EmptyViewMethodAccessor.java // public interface EmptyViewMethodAccessor { // // /** // * Calls upto AdapterView.setEmptyView() // * // * @param emptyView - to set as Empty View // */ // public void setEmptyViewInternal(View emptyVi...
protected class InternalListView extends ListView implements EmptyViewMethodAccessor {
aschaaff/savot
src/test/java/tests/sax/TestSAX.java
// Path: src/main/java/cds/astrores/sax/AstroresSAXParser.java // @SuppressWarnings({"deprecation", "UseOfSystemOutOrSystemErr"}) // public class AstroresSAXParser { // // // the pull parser engine // private AstroresSAXEngine engine = null; // // /** // * Constructor // * // * @param cons...
import java.io.IOException; import cds.astrores.sax.AstroresSAXParser;
package tests.sax; //Copyright 2002-2014 - UDS/CNRS //The SAVOT library is distributed under the terms //of the GNU General Public License version 3. // //This file is part of SAVOT. // // SAVOT is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published...
// Path: src/main/java/cds/astrores/sax/AstroresSAXParser.java // @SuppressWarnings({"deprecation", "UseOfSystemOutOrSystemErr"}) // public class AstroresSAXParser { // // // the pull parser engine // private AstroresSAXEngine engine = null; // // /** // * Constructor // * // * @param cons...
AstroresSAXParser sb = new AstroresSAXParser(consumer, file);
aschaaff/savot
src/main/java/cds/savot/binary/SavotDataWriter.java
// Path: src/main/java/cds/savot/model/SavotTR.java // public final class SavotTR extends SavotBase { // // // TR element set // private TDSet TDs = null; // private int lineInXMLFile = 0; // // /** // * Constructor // */ // public SavotTR() { // } // // /** // * Create a T...
import cds.savot.model.SavotTR; import cds.savot.model.TRSet; import java.io.Closeable; import java.io.Flushable; import java.io.IOException;
package cds.savot.binary; //Copyright 2002-2014 - UDS/CNRS //The SAVOT library is distributed under the terms //of the GNU General Public License version 3. // //This file is part of SAVOT. // // SAVOT is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as pu...
// Path: src/main/java/cds/savot/model/SavotTR.java // public final class SavotTR extends SavotBase { // // // TR element set // private TDSet TDs = null; // private int lineInXMLFile = 0; // // /** // * Constructor // */ // public SavotTR() { // } // // /** // * Create a T...
public void writeTRSet(TRSet rows) throws IOException;
gengo/gengo-java
src/main/java/com/gengo/client/payloads/Attachment.java
// Path: src/main/java/com/gengo/client/exceptions/GengoException.java // @SuppressWarnings("serial") // /** // * Encapsulates all exceptions thrown by the API // */ // public class GengoException extends Exception // { // public GengoException(String e) // { // super(e); // } // // public GengoException(Str...
import org.json.JSONObject; import org.json.JSONException; import com.gengo.client.exceptions.GengoException;
package com.gengo.client.payloads; public class Attachment extends Payload { private JSONObject data; private static final String URL = "url"; private static final String FILENAME = "filename"; private static final String MIMETYPE = "mime_type"; /** * @param url full URL to a resource i.e...
// Path: src/main/java/com/gengo/client/exceptions/GengoException.java // @SuppressWarnings("serial") // /** // * Encapsulates all exceptions thrown by the API // */ // public class GengoException extends Exception // { // public GengoException(String e) // { // super(e); // } // // public GengoException(Str...
throws GengoException
gengo/gengo-java
src/main/java/com/gengo/client/payloads/Payloads.java
// Path: src/main/java/com/gengo/client/exceptions/GengoException.java // @SuppressWarnings("serial") // /** // * Encapsulates all exceptions thrown by the API // */ // public class GengoException extends Exception // { // public GengoException(String e) // { // super(e); // } // // public GengoException(Str...
import java.util.List; import org.json.JSONArray; import com.gengo.client.exceptions.GengoException;
package com.gengo.client.payloads; /** * A collection of payload objects. */ public class Payloads { private JSONArray arr; /** * Initialize an empty collection. */ public Payloads() { arr = new JSONArray(); } /** * Initialize a collection of payloads from a List collection * @param payloads ...
// Path: src/main/java/com/gengo/client/exceptions/GengoException.java // @SuppressWarnings("serial") // /** // * Encapsulates all exceptions thrown by the API // */ // public class GengoException extends Exception // { // public GengoException(String e) // { // super(e); // } // // public GengoException(Str...
public Payloads(List<Payload> payloads) throws GengoException
gengo/gengo-java
src/main/java/com/gengo/client/payloads/Payload.java
// Path: src/main/java/com/gengo/client/exceptions/GengoException.java // @SuppressWarnings("serial") // /** // * Encapsulates all exceptions thrown by the API // */ // public class GengoException extends Exception // { // public GengoException(String e) // { // super(e); // } // // public GengoException(Str...
import org.json.JSONObject; import com.gengo.client.exceptions.GengoException;
package com.gengo.client.payloads; public abstract class Payload { /** * Create a JSONObject representing this payload object * @return the JSONObject created * @throws GengoException */
// Path: src/main/java/com/gengo/client/exceptions/GengoException.java // @SuppressWarnings("serial") // /** // * Encapsulates all exceptions thrown by the API // */ // public class GengoException extends Exception // { // public GengoException(String e) // { // super(e); // } // // public GengoException(Str...
public abstract JSONObject toJSONObject() throws GengoException;
gengo/gengo-java
src/main/java/com/gengo/client/payloads/Revision.java
// Path: src/main/java/com/gengo/client/enums/Tier.java // public enum Tier // { // MACHINE, // STANDARD, // PRO, // ULTRA; // // public String toRequestString() // { // return super.toString().toLowerCase(); // } // // public String toString() // { // return toRequestString(); // } // // }; /...
import org.json.JSONException; import org.json.JSONObject; import com.gengo.client.enums.Tier; import com.gengo.client.exceptions.GengoException;
package com.gengo.client.payloads; /** * Job revision payload */ public class Revision extends JobUpdate { private String comment; public Revision(int jobId, String comment) { super(jobId); init(comment); }
// Path: src/main/java/com/gengo/client/enums/Tier.java // public enum Tier // { // MACHINE, // STANDARD, // PRO, // ULTRA; // // public String toRequestString() // { // return super.toString().toLowerCase(); // } // // public String toString() // { // return toRequestString(); // } // // }; /...
public Revision(String lc_src, String lc_tgt, String body_src, Tier tier, String comment)
gengo/gengo-java
src/main/java/com/gengo/client/payloads/Revision.java
// Path: src/main/java/com/gengo/client/enums/Tier.java // public enum Tier // { // MACHINE, // STANDARD, // PRO, // ULTRA; // // public String toRequestString() // { // return super.toString().toLowerCase(); // } // // public String toString() // { // return toRequestString(); // } // // }; /...
import org.json.JSONException; import org.json.JSONObject; import com.gengo.client.enums.Tier; import com.gengo.client.exceptions.GengoException;
package com.gengo.client.payloads; /** * Job revision payload */ public class Revision extends JobUpdate { private String comment; public Revision(int jobId, String comment) { super(jobId); init(comment); } public Revision(String lc_src, String lc_tgt, String b...
// Path: src/main/java/com/gengo/client/enums/Tier.java // public enum Tier // { // MACHINE, // STANDARD, // PRO, // ULTRA; // // public String toRequestString() // { // return super.toString().toLowerCase(); // } // // public String toString() // { // return toRequestString(); // } // // }; /...
public JSONObject toJSONObject() throws GengoException
gengo/gengo-java
src/main/java/com/gengo/client/payloads/Rejection.java
// Path: src/main/java/com/gengo/client/enums/RejectReason.java // public enum RejectReason // { // QUALITY, // INCOMPLETE, // OTHER // }; // // Path: src/main/java/com/gengo/client/enums/Tier.java // public enum Tier // { // MACHINE, // STANDARD, // PRO, // ULTRA; // // public String toRequestString() // {...
import org.json.JSONException; import org.json.JSONObject; import com.gengo.client.enums.RejectReason; import com.gengo.client.enums.Tier; import com.gengo.client.exceptions.GengoException;
package com.gengo.client.payloads; /** * Job rejection payload */ public class Rejection extends JobUpdate {
// Path: src/main/java/com/gengo/client/enums/RejectReason.java // public enum RejectReason // { // QUALITY, // INCOMPLETE, // OTHER // }; // // Path: src/main/java/com/gengo/client/enums/Tier.java // public enum Tier // { // MACHINE, // STANDARD, // PRO, // ULTRA; // // public String toRequestString() // {...
private RejectReason reason;
gengo/gengo-java
src/main/java/com/gengo/client/payloads/Rejection.java
// Path: src/main/java/com/gengo/client/enums/RejectReason.java // public enum RejectReason // { // QUALITY, // INCOMPLETE, // OTHER // }; // // Path: src/main/java/com/gengo/client/enums/Tier.java // public enum Tier // { // MACHINE, // STANDARD, // PRO, // ULTRA; // // public String toRequestString() // {...
import org.json.JSONException; import org.json.JSONObject; import com.gengo.client.enums.RejectReason; import com.gengo.client.enums.Tier; import com.gengo.client.exceptions.GengoException;
package com.gengo.client.payloads; /** * Job rejection payload */ public class Rejection extends JobUpdate { private RejectReason reason; private String comment; private String captcha; private boolean requeue; public Rejection(int jobId, RejectReason reason, String comment, String captcha...
// Path: src/main/java/com/gengo/client/enums/RejectReason.java // public enum RejectReason // { // QUALITY, // INCOMPLETE, // OTHER // }; // // Path: src/main/java/com/gengo/client/enums/Tier.java // public enum Tier // { // MACHINE, // STANDARD, // PRO, // ULTRA; // // public String toRequestString() // {...
public Rejection(String lc_src, String lc_tgt, String body_src, Tier tier,
gengo/gengo-java
src/main/java/com/gengo/client/payloads/Rejection.java
// Path: src/main/java/com/gengo/client/enums/RejectReason.java // public enum RejectReason // { // QUALITY, // INCOMPLETE, // OTHER // }; // // Path: src/main/java/com/gengo/client/enums/Tier.java // public enum Tier // { // MACHINE, // STANDARD, // PRO, // ULTRA; // // public String toRequestString() // {...
import org.json.JSONException; import org.json.JSONObject; import com.gengo.client.enums.RejectReason; import com.gengo.client.enums.Tier; import com.gengo.client.exceptions.GengoException;
package com.gengo.client.payloads; /** * Job rejection payload */ public class Rejection extends JobUpdate { private RejectReason reason; private String comment; private String captcha; private boolean requeue; public Rejection(int jobId, RejectReason reason, String comment, String captcha...
// Path: src/main/java/com/gengo/client/enums/RejectReason.java // public enum RejectReason // { // QUALITY, // INCOMPLETE, // OTHER // }; // // Path: src/main/java/com/gengo/client/enums/Tier.java // public enum Tier // { // MACHINE, // STANDARD, // PRO, // ULTRA; // // public String toRequestString() // {...
public JSONObject toJSONObject() throws GengoException
gengo/gengo-java
src/main/java/com/gengo/client/payloads/JobUpdate.java
// Path: src/main/java/com/gengo/client/enums/Tier.java // public enum Tier // { // MACHINE, // STANDARD, // PRO, // ULTRA; // // public String toRequestString() // { // return super.toString().toLowerCase(); // } // // public String toString() // { // return toRequestString(); // } // // }; /...
import org.json.JSONException; import org.json.JSONObject; import com.gengo.client.enums.Tier; import com.gengo.client.exceptions.GengoException;
package com.gengo.client.payloads; /** * Abstract base class for update payloads */ public abstract class JobUpdate extends Payload { private int jobId = 0; private String lcSrc; private String lcTgt; private String bodySrc;
// Path: src/main/java/com/gengo/client/enums/Tier.java // public enum Tier // { // MACHINE, // STANDARD, // PRO, // ULTRA; // // public String toRequestString() // { // return super.toString().toLowerCase(); // } // // public String toString() // { // return toRequestString(); // } // // }; /...
private Tier tier;
gengo/gengo-java
src/main/java/com/gengo/client/payloads/JobUpdate.java
// Path: src/main/java/com/gengo/client/enums/Tier.java // public enum Tier // { // MACHINE, // STANDARD, // PRO, // ULTRA; // // public String toRequestString() // { // return super.toString().toLowerCase(); // } // // public String toString() // { // return toRequestString(); // } // // }; /...
import org.json.JSONException; import org.json.JSONObject; import com.gengo.client.enums.Tier; import com.gengo.client.exceptions.GengoException;
package com.gengo.client.payloads; /** * Abstract base class for update payloads */ public abstract class JobUpdate extends Payload { private int jobId = 0; private String lcSrc; private String lcTgt; private String bodySrc; private Tier tier; /** * Create a job update payload id...
// Path: src/main/java/com/gengo/client/enums/Tier.java // public enum Tier // { // MACHINE, // STANDARD, // PRO, // ULTRA; // // public String toRequestString() // { // return super.toString().toLowerCase(); // } // // public String toString() // { // return toRequestString(); // } // // }; /...
public JSONObject toJSONObject() throws GengoException
ardeleanasm/quantum_computing
quantum/src/main/java/com/ars/qubits/QubitZero.java
// Path: complexnumbers/src/main/java/com/ars/complexnumbers/ComplexNumber.java // public class ComplexNumber { // // /** // * The imaginary, Im(z), part of the <code>ComplexNumber</code>. // */ // private double imaginary; // // /** // * The real,Re(z), part of the <code>ComplexNumber</code>. //...
import com.ars.complexnumbers.ComplexNumber;
package com.ars.qubits; /** * <h1>QubitZero</h1> * Representation of the qubit |0>=[1,0]. */ public class QubitZero extends Qubit { /** * Construct a new <code> QubitZero</code> object. */ public QubitZero() {
// Path: complexnumbers/src/main/java/com/ars/complexnumbers/ComplexNumber.java // public class ComplexNumber { // // /** // * The imaginary, Im(z), part of the <code>ComplexNumber</code>. // */ // private double imaginary; // // /** // * The real,Re(z), part of the <code>ComplexNumber</code>. //...
super(new ComplexNumber(1.0, 0.0), new ComplexNumber(0.0, 0.0));
ardeleanasm/quantum_computing
quantum/src/main/java/com/ars/qubits/QubitPlus.java
// Path: complexnumbers/src/main/java/com/ars/complexnumbers/ComplexNumber.java // public class ComplexNumber { // // /** // * The imaginary, Im(z), part of the <code>ComplexNumber</code>. // */ // private double imaginary; // // /** // * The real,Re(z), part of the <code>ComplexNumber</code>. //...
import com.ars.complexnumbers.ComplexNumber;
package com.ars.qubits; /** * <h1>QubitPlus</h1> */ public class QubitPlus extends Qubit { /** * Construct a new <code> QubitPlus</code> object. */ public QubitPlus() {
// Path: complexnumbers/src/main/java/com/ars/complexnumbers/ComplexNumber.java // public class ComplexNumber { // // /** // * The imaginary, Im(z), part of the <code>ComplexNumber</code>. // */ // private double imaginary; // // /** // * The real,Re(z), part of the <code>ComplexNumber</code>. //...
super(new ComplexNumber(1.0 / Math.sqrt(2), 0.0), new ComplexNumber(1.0 / Math.sqrt(2), 0.0));
ardeleanasm/quantum_computing
quantum/src/main/java/com/ars/gates/IdentityGate.java
// Path: quantum/src/main/java/com/ars/qubits/Qubit.java // public class Qubit { // // protected ComplexNumber[] qubitVector; // // /** // * Constructs a new <code>Qubit</code> object. // * @param no0 complex number // * @param no1 complex number // * // */ // public Qubit(ComplexNumber no0,...
import com.ars.qubits.Qubit;
package com.ars.gates; public final class IdentityGate implements IGate{ @Override
// Path: quantum/src/main/java/com/ars/qubits/Qubit.java // public class Qubit { // // protected ComplexNumber[] qubitVector; // // /** // * Constructs a new <code>Qubit</code> object. // * @param no0 complex number // * @param no1 complex number // * // */ // public Qubit(ComplexNumber no0,...
public Qubit applyGate(Qubit inputQubit, int[] targetPosition,
ardeleanasm/quantum_computing
quantum/src/main/java/com/ars/qubits/QubitOne.java
// Path: complexnumbers/src/main/java/com/ars/complexnumbers/ComplexNumber.java // public class ComplexNumber { // // /** // * The imaginary, Im(z), part of the <code>ComplexNumber</code>. // */ // private double imaginary; // // /** // * The real,Re(z), part of the <code>ComplexNumber</code>. //...
import com.ars.complexnumbers.ComplexNumber;
package com.ars.qubits; /** * <h1>QubitOne</h1> * Representation of the qubit |1>=[0,1]. */ public class QubitOne extends Qubit { /** * Construct a new <code> QubitOne</code> object. */ public QubitOne() {
// Path: complexnumbers/src/main/java/com/ars/complexnumbers/ComplexNumber.java // public class ComplexNumber { // // /** // * The imaginary, Im(z), part of the <code>ComplexNumber</code>. // */ // private double imaginary; // // /** // * The real,Re(z), part of the <code>ComplexNumber</code>. //...
super(new ComplexNumber(0.0, 0.0), new ComplexNumber(1.0, 0.0));
ardeleanasm/quantum_computing
quantum/src/main/java/com/ars/algorithms/QuantumAlgorithms.java
// Path: quantum/src/main/java/com/ars/gates/GateProducer.java // public class GateProducer { // // /** // * Return a new <code>GateFactory</code> object. // * @return GatesFactory // */ // public static GatesAbstractFactory getGateFactory() { // return new GateFactory(); // } // } // // Path: qu...
import com.ars.gates.GateProducer; import com.ars.gates.GatesAbstractFactory; import com.ars.gates.IGate; import com.ars.qubits.Qubit;
package com.ars.algorithms; public abstract class QuantumAlgorithms { protected IGate oracle;
// Path: quantum/src/main/java/com/ars/gates/GateProducer.java // public class GateProducer { // // /** // * Return a new <code>GateFactory</code> object. // * @return GatesFactory // */ // public static GatesAbstractFactory getGateFactory() { // return new GateFactory(); // } // } // // Path: qu...
protected Qubit resultQubit;
ardeleanasm/quantum_computing
quantum/src/main/java/com/ars/algorithms/QuantumAlgorithms.java
// Path: quantum/src/main/java/com/ars/gates/GateProducer.java // public class GateProducer { // // /** // * Return a new <code>GateFactory</code> object. // * @return GatesFactory // */ // public static GatesAbstractFactory getGateFactory() { // return new GateFactory(); // } // } // // Path: qu...
import com.ars.gates.GateProducer; import com.ars.gates.GatesAbstractFactory; import com.ars.gates.IGate; import com.ars.qubits.Qubit;
package com.ars.algorithms; public abstract class QuantumAlgorithms { protected IGate oracle; protected Qubit resultQubit;
// Path: quantum/src/main/java/com/ars/gates/GateProducer.java // public class GateProducer { // // /** // * Return a new <code>GateFactory</code> object. // * @return GatesFactory // */ // public static GatesAbstractFactory getGateFactory() { // return new GateFactory(); // } // } // // Path: qu...
protected GatesAbstractFactory gateFactory = GateProducer.getGateFactory();
ardeleanasm/quantum_computing
quantum/src/main/java/com/ars/algorithms/QuantumAlgorithms.java
// Path: quantum/src/main/java/com/ars/gates/GateProducer.java // public class GateProducer { // // /** // * Return a new <code>GateFactory</code> object. // * @return GatesFactory // */ // public static GatesAbstractFactory getGateFactory() { // return new GateFactory(); // } // } // // Path: qu...
import com.ars.gates.GateProducer; import com.ars.gates.GatesAbstractFactory; import com.ars.gates.IGate; import com.ars.qubits.Qubit;
package com.ars.algorithms; public abstract class QuantumAlgorithms { protected IGate oracle; protected Qubit resultQubit;
// Path: quantum/src/main/java/com/ars/gates/GateProducer.java // public class GateProducer { // // /** // * Return a new <code>GateFactory</code> object. // * @return GatesFactory // */ // public static GatesAbstractFactory getGateFactory() { // return new GateFactory(); // } // } // // Path: qu...
protected GatesAbstractFactory gateFactory = GateProducer.getGateFactory();
ardeleanasm/quantum_computing
quantum/src/main/java/com/ars/qubits/QRegister.java
// Path: quantum/src/main/java/com/ars/quantum/exception/RegisterOverflowException.java // public class RegisterOverflowException extends Exception { // /** // * // */ // private static final long serialVersionUID = 4071226864956577717L; // // public RegisterOverflowException(){ // super("Register size excee...
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import com.ars.quantum.exception.RegisterOverflowException; import com.ars.quantum.utils.QRegisterOperations;
package com.ars.qubits; public class QRegister implements Iterable<Qubit> { private List<Qubit> qubitRegister; private int registerSize; public QRegister(int size) { this.registerSize = size; qubitRegister = new ArrayList<>(size); } public QRegister initialize() {
// Path: quantum/src/main/java/com/ars/quantum/exception/RegisterOverflowException.java // public class RegisterOverflowException extends Exception { // /** // * // */ // private static final long serialVersionUID = 4071226864956577717L; // // public RegisterOverflowException(){ // super("Register size excee...
qubitRegister = QRegisterOperations.getInstance().fillWith(qubitRegister, QubitZero::new, registerSize);
ardeleanasm/quantum_computing
quantum/src/main/java/com/ars/qubits/QRegister.java
// Path: quantum/src/main/java/com/ars/quantum/exception/RegisterOverflowException.java // public class RegisterOverflowException extends Exception { // /** // * // */ // private static final long serialVersionUID = 4071226864956577717L; // // public RegisterOverflowException(){ // super("Register size excee...
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import com.ars.quantum.exception.RegisterOverflowException; import com.ars.quantum.utils.QRegisterOperations;
package com.ars.qubits; public class QRegister implements Iterable<Qubit> { private List<Qubit> qubitRegister; private int registerSize; public QRegister(int size) { this.registerSize = size; qubitRegister = new ArrayList<>(size); } public QRegister initialize() { qubitRegister = QRegisterOperations...
// Path: quantum/src/main/java/com/ars/quantum/exception/RegisterOverflowException.java // public class RegisterOverflowException extends Exception { // /** // * // */ // private static final long serialVersionUID = 4071226864956577717L; // // public RegisterOverflowException(){ // super("Register size excee...
public void add(Qubit e) throws RegisterOverflowException {
ardeleanasm/quantum_computing
quantum/src/main/java/com/ars/qubits/QubitMinus.java
// Path: complexnumbers/src/main/java/com/ars/complexnumbers/ComplexNumber.java // public class ComplexNumber { // // /** // * The imaginary, Im(z), part of the <code>ComplexNumber</code>. // */ // private double imaginary; // // /** // * The real,Re(z), part of the <code>ComplexNumber</code>. //...
import com.ars.complexnumbers.ComplexNumber;
package com.ars.qubits; /** * <h1>QubitMinus</h1> */ public class QubitMinus extends Qubit { /** * Construct a new <code> QubitMinus</code> object. */ public QubitMinus() {
// Path: complexnumbers/src/main/java/com/ars/complexnumbers/ComplexNumber.java // public class ComplexNumber { // // /** // * The imaginary, Im(z), part of the <code>ComplexNumber</code>. // */ // private double imaginary; // // /** // * The real,Re(z), part of the <code>ComplexNumber</code>. //...
super(new ComplexNumber(1.0 / Math.sqrt(2), 0.0), new ComplexNumber(-1.0 / Math.sqrt(2), 0.0));
ardeleanasm/quantum_computing
quantumapp/src/main/java/com/ars/quantumapp/GroverRunner.java
// Path: quantumapp/src/main/java/com/ars/algorithms/grover/GroversAlgorithm.java // public class GroversAlgorithm extends QuantumAlgorithms { // private static final int NO_OF_INPUT = 3; // private IGate gateH; // private IGate gateX; // private IGate gateCNot; // private IGate gateCPhaseShift; // // /...
import com.ars.algorithms.grover.GroversAlgorithm;
package com.ars.quantumapp; public class GroverRunner implements Runnable { @Override public void run() {
// Path: quantumapp/src/main/java/com/ars/algorithms/grover/GroversAlgorithm.java // public class GroversAlgorithm extends QuantumAlgorithms { // private static final int NO_OF_INPUT = 3; // private IGate gateH; // private IGate gateX; // private IGate gateCNot; // private IGate gateCPhaseShift; // // /...
GroversAlgorithm ga = null;
ardeleanasm/quantum_computing
quantum/src/test/java/com/ars/qubits/QRegisterTest.java
// Path: quantum/src/main/java/com/ars/quantum/exception/RegisterOverflowException.java // public class RegisterOverflowException extends Exception { // /** // * // */ // private static final long serialVersionUID = 4071226864956577717L; // // public RegisterOverflowException(){ // super("Register size excee...
import static org.junit.Assert.*; import org.junit.After; import org.junit.Before; import org.junit.Test; import com.ars.quantum.exception.RegisterOverflowException;
package com.ars.qubits; public class QRegisterTest { private QRegister qRegister; private static final int REGISTER_LENGTH = 3; @Before public void setUp() throws Exception { } @After public void tearDown() throws Exception { qRegister = null; } @Test public void testSizeNoElementsWithoutInit() { ...
// Path: quantum/src/main/java/com/ars/quantum/exception/RegisterOverflowException.java // public class RegisterOverflowException extends Exception { // /** // * // */ // private static final long serialVersionUID = 4071226864956577717L; // // public RegisterOverflowException(){ // super("Register size excee...
} catch (RegisterOverflowException e) {
googleapis/java-iamcredentials
google-cloud-iamcredentials/src/test/java/com/google/cloud/iam/credentials/v1/MockIAMCredentialsImpl.java
// Path: grpc-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/IAMCredentialsGrpc.java // public abstract static class IAMCredentialsImplBase implements io.grpc.BindableService { // // /** // * // * // * <pre> // * Generates an OAuth 2.0 access token for a service account....
import com.google.api.core.BetaApi; import com.google.cloud.iam.credentials.v1.IAMCredentialsGrpc.IAMCredentialsImplBase; import com.google.protobuf.AbstractMessage; import io.grpc.stub.StreamObserver; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue; import javax.a...
/* * Copyright 2021 Google LLC * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
// Path: grpc-google-cloud-iamcredentials-v1/src/main/java/com/google/cloud/iam/credentials/v1/IAMCredentialsGrpc.java // public abstract static class IAMCredentialsImplBase implements io.grpc.BindableService { // // /** // * // * // * <pre> // * Generates an OAuth 2.0 access token for a service account....
public class MockIAMCredentialsImpl extends IAMCredentialsImplBase {
leandreck/spring-typescript-services
examples/src/main/java/org/leandreck/endpoints/examples/lombok/LombokTypeScriptEndpoint.java
// Path: examples/src/main/java/org/leandreck/endpoints/examples/RootType.java // @TypeScriptType("MyTypeScriptType") // public class RootType { // // private Long id; // // private String name; // private String givenName; // private int weight; // // private SimpleEnum[] simpleArray; // // ...
import java.util.Map; import java.util.Optional; import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; import static org.springframework.web.bind.annotation.RequestMethod.POST; import org.leandreck.endpoints.annotations.TypeScriptEndpoint; import org.leandreck.endpoints.examples.RootType; import org....
/** * Copyright © 2016 Mathias Kowalzik (Mathias.Kowalzik@leandreck.org) * * 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...
// Path: examples/src/main/java/org/leandreck/endpoints/examples/RootType.java // @TypeScriptType("MyTypeScriptType") // public class RootType { // // private Long id; // // private String name; // private String givenName; // private int weight; // // private SimpleEnum[] simpleArray; // // ...
public LombokResponse<List<RootType>, List<Object>, Boolean, SubType, RootType> setFoo(
leandreck/spring-typescript-services
annotations/src/main/java/org/leandreck/endpoints/processor/model/TypeNodeFactory.java
// Path: annotations/src/main/java/org/leandreck/endpoints/processor/model/typefactories/TypeNodeUtils.java // public class TypeNodeUtils { // // static final String NO_TEMPLATE = "NO_TEMPLATE"; // static final String UNDEFINED_TYPE_NAME = "UNDEFINED"; // static final String JAVA_LANG_OBJECT = "java.lang.O...
import org.leandreck.endpoints.annotations.TypeScriptIgnore; import org.leandreck.endpoints.processor.config.TemplateConfiguration; import org.leandreck.endpoints.processor.model.typefactories.ConcreteTypeNodeFactory; import org.leandreck.endpoints.processor.model.typefactories.TypeNodeKind; import org.leandreck.endpoi...
final Map<TypeNodeKind, ConcreteTypeNodeFactory> tmpFactories = new EnumMap<>(TypeNodeKind.class); Arrays.stream(TypeNodeKind.values()).forEach(it -> { try { tmpFactories.put(it, it.getTypeNodeFactory().newConfiguredInstance(this, this.configuration, this.typeUtils, this.elem...
// Path: annotations/src/main/java/org/leandreck/endpoints/processor/model/typefactories/TypeNodeUtils.java // public class TypeNodeUtils { // // static final String NO_TEMPLATE = "NO_TEMPLATE"; // static final String UNDEFINED_TYPE_NAME = "UNDEFINED"; // static final String JAVA_LANG_OBJECT = "java.lang.O...
final String doc = EMPTY_JAVA_DOC + "FIXME: createTypeNode(final TypeMirror typeMirror, final DeclaredType containingType)";