content
stringlengths
263
5.24M
pred_label
stringclasses
1 value
pred_score_pos
float64
0.6
1
package org.dkf.jed2k; public class Statistics { private enum ChannelsNames { UPLOAD_PAYLOAD(0), UPLOAD_PROTOCOL(1), DOWNLOAD_PAYLOAD(2), DOWNLOAD_PROTOCOL(3), CHANNELS_COUNT(4); public final int value; ChannelsNames(int v) { this.value = v; } } StatChannel channels...
__label__POS
0.973711
package org.dkf.jed2k; import org.dkf.jed2k.protocol.Hash; import org.dkf.jed2k.protocol.TransferResumeData; import java.io.File; import java.lang.ref.WeakReference; import java.util.LinkedList; import java.util.List; /** * transfer handle for manipulation of transfer outside of session * all manipulations of sess...
__label__POS
0.98408
package org.dkf.jed2k; import org.dkf.jed2k.data.PieceBlock; import java.util.Collection; import java.util.Iterator; public class DownloadingPiece implements Iterable<DownloadingPiece.Block> { public enum BlockState { STATE_NONE((byte)0), STATE_REQUESTED((byte)1), STATE_WRITING((byte)2),...
__label__POS
0.771172
package org.dkf.jed2k.disk; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import org.slf4j.Logger; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; /** * Created by inkpot on 30.01.2017. */ public class Desk...
__label__POS
0.912503
package org.dkf.jed2k.disk; import org.dkf.jed2k.Transfer; import org.dkf.jed2k.data.PieceBlock; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import java.nio.ByteBuffer; import java.util.LinkedList; /** * Created by inkpot on 24.08.2016. */ public class AsyncRestore exte...
__label__POS
0.955711
package org.dkf.jed2k.pool; import org.dkf.jed2k.Constants; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import org.slf4j.Logger; import java.nio.ByteBuffer; /** * Created by inkpot on 08.07.2016. */ public class BufferPool extends Pool<ByteBuffer> { private static ...
__label__POS
0.684116
package org.dkf.jed2k.pool; import org.dkf.jed2k.exception.JED2KException; /** * Created by apavlov on 06.03.17. */ public class SynchronizedArrayPool extends Pool<byte[]> { private final int bufferSize; public SynchronizedArrayPool(int maxBuffers, int bufferSize) { super(maxBuffers); asser...
__label__POS
0.949563
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
__label__POS
0.720589
package org.dkf.jed2k.util; /** * Created by inkpot on 18.01.2017. */ public class HexDump { final private static char[] hexArray = "0123456789ABCDEF".toCharArray(); private static boolean isAsciiPrintable(char ch) { return ch >= 32 && ch < 127; } private static void appendCharacters(final ...
__label__POS
0.952369
/* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be use...
__label__POS
0.797418
package org.dkf.jed2k.protocol; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.hash.MD4; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.Collection; import java.util.Iterator; import java.u...
__label__POS
0.917122
package org.dkf.jed2k.protocol; import org.dkf.jed2k.exception.JED2KException; import java.math.BigInteger; import java.nio.ByteBuffer; import java.nio.ByteOrder; public class UInt64 extends UNumber implements Comparable<UInt64>{ /** * Generated UID */ private static final long serialVer...
__label__POS
0.980804
package org.dkf.jed2k.protocol; import org.dkf.jed2k.exception.JED2KException; public abstract class Buffer { public abstract Buffer get(UInt8 v) throws JED2KException; public abstract Buffer put(UInt8 v) throws JED2KException; public abstract Buffer get(UInt16 v) throws JED2KException; public abstrac...
__label__POS
0.932994
-1 3:1 11:1 14:1 19:1 39:1 42:1 55:1 64:1 67:1 73:1 75:1 76:1 80:1 83:1 -1 3:1 6:1 17:1 27:1 35:1 40:1 57:1 63:1 69:1 73:1 74:1 76:1 81:1 103:1 -1 4:1 6:1 15:1 21:1 35:1 40:1 57:1 63:1 67:1 73:1 74:1 77:1 80:1 83:1 -1 5:1 6:1 15:1 22:1 36:1 41:1 47:1 66:1 67:1 72:1 74:1 76:1 80:1 83:1 -1 2:1 6:1 16:1 22:1 36:1 40:1...
__label__POS
0.613129
package org.dkf.jed2k.protocol; import org.dkf.jed2k.Utils; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import java.net.InetAddress; import java.net.InetSocketAddress; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import ...
__label__POS
0.629525
package org.dkf.jed2k.protocol; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import static org.dkf.jed2k.Utils.sizeof; public class UInt16 extends UNumber implements Comparabl...
__label__POS
0.885216
package org.dkf.jed2k.protocol; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import static org.dkf.jed2k.Utils.sizeof; public class UInt32 extends UNumber implements Comparabl...
__label__POS
0.939625
package org.dkf.jed2k.protocol; import org.dkf.jed2k.Utils; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; import java.util.Arrays; import java.util.Iterator; public class BitField implements Iterable<Bool...
__label__POS
0.779127
-1 3:1 11:1 14:1 19:1 39:1 42:1 55:1 64:1 67:1 73:1 75:1 76:1 80:1 83:1 -1 3:1 6:1 17:1 27:1 35:1 40:1 57:1 63:1 69:1 73:1 74:1 76:1 81:1 103:1 -1 4:1 6:1 15:1 21:1 35:1 40:1 57:1 63:1 67:1 73:1 74:1 77:1 80:1 83:1 -1 5:1 6:1 15:1 22:1 36:1 41:1 47:1 66:1 67:1 72:1 74:1 76:1 80:1 83:1 -1 2:1 6:1 16:1 22:1 36:1 40:1...
__label__POS
0.613129
package org.dkf.jed2k.protocol; import static org.dkf.jed2k.Utils.byte2String; public class PacketKey implements Comparable<PacketKey> { public final byte protocol; public final byte packet; public PacketKey(byte protocol, byte packet) { this.protocol = protocol; this.packet = packe...
__label__POS
0.946959
package org.dkf.jed2k.protocol; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import java.nio.ByteBuffer; import java.util.*; /** * Created by inkpot on 01.07.2016. * This class handles variable structures with different header sizes like: * itemsCount(N) * item0 * ite...
__label__POS
0.896608
package org.dkf.jed2k.protocol; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; /** * class for optional store some serializable structures * Created by inkpot on 31.07.2016. */ public class Optional<Dat...
__label__POS
0.640634
package org.dkf.jed2k.protocol; public final class Unsigned{ public static UInt8 uint8() { return new UInt8();} public static UInt8 uint8(byte value){ return new UInt8(value);} public static UInt8 uint8(short value){ return new UInt8(value); } public static UInt8 uint8(int value){ return new UInt8(valu...
__label__POS
0.997252
package org.dkf.jed2k.protocol; import org.dkf.jed2k.data.PieceBlock; import org.dkf.jed2k.exception.JED2KException; import java.nio.ByteBuffer; /** * Created by inkpot on 01.07.2016. * Transfer resume data for restore transfer state after restart * */ public class TransferResumeData implements Serializable { ...
__label__POS
0.988572
package org.dkf.jed2k.alert; import org.dkf.jed2k.Time; public abstract class Alert { private long creationTime; public Alert() { creationTime = Time.currentTime(); } public static enum Severity { Debug, Info, Warning, Critical, Fatal, None ...
__label__POS
0.964534
package org.dkf.jed2k.data; import org.dkf.jed2k.data.BlockInfo.BlockState; import java.util.ArrayList; public class PieceInfo { private ArrayList<BlockInfo> blocks; private int finishedCount; public PieceInfo(int numBlocks) { finishedCount = 0; blocks = new ArrayList<BlockInfo>(numBlocks); for(int i = 0; i...
__label__POS
0.999708
package org.dkf.jed2k.data; import org.dkf.jed2k.Constants; import org.dkf.jed2k.Pair; import org.dkf.jed2k.exception.JED2KException; import java.util.ArrayList; import static org.dkf.jed2k.exception.ErrorCode.INVALID_PR_PARAMETER; import static org.dkf.jed2k.exception.ErrorCode.PEER_REQUEST_OVERFLOW; public class ...
__label__POS
0.926324
package org.dkf.jed2k.data; import org.dkf.jed2k.Constants; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.Serializable; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; /** * PieceBlock describes block of data in piece * ...
__label__POS
0.756673
package org.dkf.jed2k.kad; import org.dkf.jed2k.protocol.SearchEntry; import org.dkf.jed2k.protocol.kad.KadSearchEntry; import java.util.ArrayList; import java.util.List; /** * Created by inkpot on 04.01.2017. */ public class KadSearchEntryDistinct { /** * stupid distincter with O(n^2) * remove dupl...
__label__POS
0.999906
-1 3:1 11:1 14:1 19:1 39:1 42:1 55:1 64:1 67:1 73:1 75:1 76:1 80:1 83:1 -1 3:1 6:1 17:1 27:1 35:1 40:1 57:1 63:1 69:1 73:1 74:1 76:1 81:1 103:1 -1 4:1 6:1 15:1 21:1 35:1 40:1 57:1 63:1 67:1 73:1 74:1 77:1 80:1 83:1 -1 5:1 6:1 15:1 22:1 36:1 41:1 47:1 66:1 67:1 72:1 74:1 76:1 80:1 83:1 -1 2:1 6:1 16:1 22:1 36:1 40:1 54:...
__label__POS
0.613129
package org.dkf.jed2k.kad; import org.dkf.jed2k.Time; import org.dkf.jed2k.kad.traversal.TimedLinkedHashMap; import org.dkf.jed2k.protocol.kad.KadId; import org.dkf.jed2k.protocol.kad.KadSearchEntry; import org.slf4j.Logger; import java.util.Collection; import java.util.HashMap; import java.util.Map; /** * Created ...
__label__POS
0.951625
package org.dkf.jed2k.kad; import com.google.gson.annotations.SerializedName; import java.util.List; /** * Created by apavlov on 13.03.17. */ public class StorageDescription { @SerializedName("ip") private String ip; @SerializedName("ports") private List<Integer> ports; @SerializedName("description") p...
__label__POS
0.888988
-1 3:1 11:1 14:1 19:1 39:1 42:1 55:1 64:1 67:1 73:1 75:1 76:1 80:1 83:1 -1 3:1 6:1 17:1 27:1 35:1 40:1 57:1 63:1 69:1 73:1 74:1 76:1 81:1 103:1 -1 4:1 6:1 15:1 21:1 35:1 40:1 57:1 63:1 67:1 73:1 74:1 77:1 80:1 83:1 -1 5:1 6:1 15:1 22:1 36:1 41:1 47:1 66:1 67:1 72:1 74:1 76:1 80:1 83:1 -1 2:1 6:1 16:1 22:1 36:1 40:1 54:...
__label__POS
0.613129
package org.dkf.jed2k.protocol.server; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.Serializable; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; import static org.dkf.jed2k.Utils.sizeof; public class CallbackRequest imp...
__label__POS
0.919346
package org.dkf.jed2k.protocol.server; import org.dkf.jed2k.Utils; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.Container; import org.dkf.jed2k.protocol.Endpoint; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.UInt32; ...
__label__POS
0.688677
package org.dkf.jed2k.protocol.server; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.Hash; import org.dkf.jed2k.protocol.Serializable; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; import static org.dkf.jed2k.Utils.sizeo...
__label__POS
0.933372
package org.dkf.jed2k.protocol.server; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.Dispatchable; import org.dkf.jed2k.protocol.Dispatcher; import org.dkf.jed2k.protocol.Serializable; import java.nio.BufferUnderflowException; import java.nio.By...
__label__POS
0.67294
package org.dkf.jed2k.protocol.server; public class LoginRequest extends UsualPacket { public static int SRV_TCPFLG_COMPRESSION = 0x00000001; public static int SRV_TCPFLG_NEWTAGS = 0x00000008; public static int SRV_TCPFLG_UNICODE = 0x00000010; public static int SRV_TCPFLG_RELATEDSE...
__label__POS
1.00001
package org.dkf.jed2k.protocol.server; import org.dkf.jed2k.protocol.Hash; import org.dkf.jed2k.protocol.SearchEntry; import org.dkf.jed2k.protocol.tag.Tag; public class SharedFileEntry extends UsualPacket implements SearchEntry { @Override public Hash getHash() { return hash; } @Override ...
__label__POS
0.998626
package org.dkf.jed2k.protocol.client; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.hash.MD4; import org.dkf.jed2k.protocol.Dispatchable; import org.dkf.jed2k.protocol.Dispatcher; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; im...
__label__POS
0.614099
package org.dkf.jed2k.protocol.client; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.*; import org.dkf.jed2k.protocol.tag.Tag; import java.nio.ByteBuffer; public class HelloAnswer implements Serializable, Dispatchable { public final Hash hash = new Hash(); public final Endpoint...
__label__POS
0.996623
package org.dkf.jed2k.protocol.client; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.*; import java.nio.ByteBuffer; public class HashSetAnswer implements Serializable, Dispatchable { private final Hash hash = new Hash(); private final Container<UInt16, Hash> parts = Container.m...
__label__POS
0.929126
package org.dkf.jed2k.protocol.client; import org.dkf.jed2k.Constants; import org.dkf.jed2k.data.Range; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.Hash; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.UNumber; import java.nio.ByteBuffer; public abstract cla...
__label__POS
0.993299
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.Container; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.UInt32; import java.nio.ByteBuffer; import java.util.LinkedList; import java.util.List; /** * Created by inkpot on 15....
__label__POS
0.968887
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.UInt32; import org.dkf.jed2k.protocol.UInt8; import java.nio.ByteBuffer; /** * Created by inkpot on 15.11.2016. */ public class KadExtEntry implements Seriali...
__label__POS
0.992731
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.Container; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.UInt16; import org.dkf.jed2k.protocol.UInt8; import java.nio.ByteBuffer; /** * Created by inkpot on 15.11.2016. */ pu...
__label__POS
0.747861
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.Utils; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.Endpoint; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.UInt16; import org.dkf.jed2k.protocol.UInt32; import java.nio.ByteBuffer; /** * Created by ...
__label__POS
0.827804
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.kad.ReqDispatcher; import org.dkf.jed2k.protocol.Container; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.UInt16; import java.net.InetSocketAddress; import java.nio.ByteBuffer; /** * C...
__label__POS
0.862068
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.UInt8; import org.dkf.jed2k.protocol.Unsigned; import java.nio.ByteBuffer; /** * Created by inkpot on 19.01.2017. */ public class Kad2PublishRes implements Se...
__label__POS
0.939708
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.*; import org.dkf.jed2k.protocol.tag.Tag; import java.nio.ByteBuffer; /** * Created by inkpot on 15.11.2016. */ public class KadSearchEntry implements Serializable, SearchEntry { private KadId kid =...
__label__POS
0.897848
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.protocol.PacketHeader; import org.dkf.jed2k.protocol.PacketKey; import org.dkf.jed2k.protocol.Serializable; import java.util.HashMap; import java.util.Map; import java.util.TreeMap; public class PacketCombiner extends org.dkf.jed2k.protocol.PacketCombiner { ...
__label__POS
0.639813
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.hash.MD4; import org.dkf.jed2k.protocol.Hash; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; import java.util.Random; import java.util.zip.CRC32; /*...
__label__POS
0.804975
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.UInt16; import java.nio.ByteBuffer; /** * Created by inkpot on 15.11.2016. */ public class Kad2Pong implements Serializable { private UInt16 portUdp = new...
__label__POS
0.968375
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.Container; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.UInt16; import java.nio.ByteBuffer; /** * Created by inkpot on 15.11.2016. */ public class Kad2SearchRes implements S...
__label__POS
0.940494
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.Container; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.UInt8; import java.nio.ByteBuffer; /** * Created by inkpot on 21.11.2016. */ public class Kad2Res implements Serializ...
__label__POS
0.860015
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.Utils; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.UInt16; import org.dkf.jed2k.protocol.Unsigned; import java.nio.BufferUnderflowException; i...
__label__POS
0.870051
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.Utils; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.Serializable; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; /** * Created by inkpot on 22.01.2017. */ public...
__label__POS
0.937789
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.kad.ReqDispatcher; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.UInt16; import org.dkf.jed2k.protocol.UInt64; import java.net.InetSocketAddress; import java.nio.ByteBuffer; /** * Crea...
__label__POS
0.807687
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.Serializable; import java.nio.ByteBuffer; /** * Created by inkpot on 15.11.2016. */ public class KadEntry implements Serializable { private KadId kid = null; private KadEndpoint kadEndpoint = nu...
__label__POS
0.691132
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.PacketHeader; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; /** * Created by inkpot on 22.11.2016. * special header for UDP Kademlia pac...
__label__POS
0.840566
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.kad.ReqDispatcher; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.UInt16; import java.net.InetSocketAddress; import java.nio.ByteBuffer; /** * Created by inkpot on 15.11.2016. */ publi...
__label__POS
0.967299
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.Utils; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.kad.ReqDispatcher; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.UInt16; import org.dkf.jed2k.protocol.Unsigned; import java.net.InetSocketAddress; import jav...
__label__POS
0.641125
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.kad.ReqDispatcher; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.UInt64; import java.net.InetSocketAddress; import java.nio.ByteBuffer; /** * Created by inkpot on 15.11.2016. */ publi...
__label__POS
0.990373
package org.dkf.jed2k.protocol.kad; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.kad.ReqDispatcher; import org.dkf.jed2k.protocol.Serializable; import java.net.InetSocketAddress; import java.nio.ByteBuffer; /** * Created by inkpot on 19.01.2017. */ public class Kad2PublishSourcesReq implemen...
__label__POS
0.872066
package org.dkf.jed2k.protocol.server.search; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.ByteContainer; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.UInt16; import java.nio.ByteBuffer; import static org.dkf.jed2k.Utils.sizeof; public class NumericEntry ...
__label__POS
0.689145
package org.dkf.jed2k.protocol.server.search; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.Serializable; import java.nio.ByteBuffer; import static org.dkf.jed2k.Utils.sizeof; public class BooleanEntry implements Serializable { public enum Operator { OPER_AND(0x00), ...
__label__POS
0.838034
package org.dkf.jed2k.protocol.server.search; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.protocol.ByteContainer; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.UInt16; import java.nio.ByteBuffer; import static org.dkf.jed2k.Utils.sizeof; public class StringEntry i...
__label__POS
0.849846
package org.dkf.jed2k.kad.traversal.algorithm; import org.dkf.jed2k.Utils; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.kad.NodeImpl; import org.dkf.jed2k.kad.traversal.observer.BootstrapObserver; import org.dkf.jed2k.kad.traversal.observer.Observer; import org.dkf.jed2k.protocol.Endpoint; impor...
__label__POS
0.776219
package org.dkf.jed2k.kad.traversal.algorithm; import org.dkf.jed2k.exception.JED2KException; import org.dkf.jed2k.kad.Listener; import org.dkf.jed2k.kad.NodeImpl; import org.dkf.jed2k.kad.traversal.observer.Observer; import org.dkf.jed2k.protocol.kad.Kad2Req; import org.dkf.jed2k.protocol.kad.KadId; import org.slf4j....
__label__POS
0.8851
package org.dkf.jed2k.kad.traversal.algorithm; import org.dkf.jed2k.Utils; import org.dkf.jed2k.kad.Filter; import org.dkf.jed2k.kad.Listener; import org.dkf.jed2k.kad.NodeEntry; import org.dkf.jed2k.kad.NodeImpl; import org.dkf.jed2k.kad.traversal.observer.FirewalledObserver; import org.dkf.jed2k.kad.traversal.observ...
__label__POS
0.933094
package org.dkf.jed2k.kad.traversal.observer; import org.dkf.jed2k.kad.traversal.algorithm.Traversal; import org.dkf.jed2k.protocol.Endpoint; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.kad.Kad2BootstrapRes; import org.dkf.jed2k.protocol.kad.KadEntry; import org.dkf.jed2k.protocol.kad.Kad...
__label__POS
0.882054
package org.dkf.jed2k.kad.traversal.observer; import org.dkf.jed2k.kad.traversal.algorithm.Traversal; import org.dkf.jed2k.protocol.Endpoint; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.kad.Kad2SearchRes; import org.dkf.jed2k.protocol.kad.KadId; import org.dkf.jed2k.protocol.kad.KadSearch...
__label__POS
0.853707
package org.dkf.jed2k.kad.traversal.observer; import org.dkf.jed2k.kad.traversal.algorithm.Traversal; import org.dkf.jed2k.protocol.Endpoint; import org.dkf.jed2k.protocol.Serializable; import org.dkf.jed2k.protocol.kad.Kad2Res; import org.dkf.jed2k.protocol.kad.KadEntry; import org.dkf.jed2k.protocol.kad.KadId; /** ...
__label__POS
0.961404
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
__label__POS
0.809589
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
__label__POS
0.937165
package org.dkf.jmule; import android.os.ParcelFileDescriptor; import androidx.documentfile.provider.DocumentFile; import org.dkf.jed2k.disk.FileHandler; import org.dkf.jed2k.exception.ErrorCode; import org.dkf.jed2k.exception.JED2KException; import org.slf4j.Logger; import java.io.File; import java.io.FileInputStr...
__label__POS
0.833426
package org.dkf.jmule; import org.dkf.jed2k.alert.*; /** * listener to handle events from session * Created by ap197_000 on 01.09.2016. */ public interface AlertListener { public void onListen(final ListenAlert alert); /** * * @param alert search result from session for all types of search ...
__label__POS
0.888177
/* * Created by Angel Leon (@gubatron), Alden Torres (aldenml) * Copyright (c) 2011-2016, jed2k(R). All rights reserved. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 ...
__label__POS
0.99961
package org.dkf.jmule.transfers; import org.dkf.jed2k.PeerInfo; import org.dkf.jed2k.TransferHandle; import org.dkf.jed2k.TransferStatus; import org.dkf.jed2k.Utils; import org.dkf.jmule.Engine; import org.slf4j.Logger; import java.io.File; import java.util.Date; import java.util.List; /** * Created by ap197_000 on...
__label__POS
0.844033
package org.dkf.jmule.views; import android.content.Context; import android.util.AttributeSet; import android.view.KeyEvent; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; import android.widget.LinearLayout; import org.dkf.jmule.ConfigurationManager; impor...
__label__POS
0.808765
package org.dkf.jmule.views; import android.content.Context; import android.util.AttributeSet; import android.widget.AutoCompleteTextView; import org.dkf.jmule.util.UIUtils; public class FWAutoCompleteTextView extends AutoCompleteTextView { private boolean showKeyboardOnPaste; public FWAutoCompleteTextView(C...
__label__POS
0.704754
package org.dkf.jmule.views; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.RadioGroup; import org.dkf.jed2k.protocol.server.search.SearchRequest; import org.dkf.jmule.R; /** * Creat...
__label__POS
0.878847
package org.dkf.jmule.adapters.menu; import android.content.Context; import org.dkf.jmule.ConfigurationManager; import org.dkf.jmule.Constants; import org.dkf.jed2k.protocol.server.ServerMet; import org.dkf.jmule.Engine; import org.dkf.jmule.R; import org.dkf.jmule.util.ServerUtils; import org.dkf.jmule.views.MenuActi...
__label__POS
0.868696
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
__label__POS
0.614753
using System.Linq; using NUnit.Framework; using U = TileMapService.Utils; namespace TileMapService.Tests { [TestFixture] public class UtilsTests { [Test] public void WebMercatorIsInsideBBox() { Assert.Multiple(() => { Assert.That(U.WebMerca...
__label__POS
0.654337
using System.Globalization; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; using NUnit.Framework; namespace TileMapService.Tests { class TestsU...
__label__POS
0.845407
using Microsoft.AspNetCore.Http; using System.Net; namespace TileMapService { public static class HttpRequestExtensions { /// <summary> /// Returns true if request is local, otherwise false. /// </summary> /// <param name="request">Request.</param> /// <returns>True if ...
__label__POS
0.952003
using System; using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.WebUtilities; namespace TileMapService.Utils { static class UrlHelper { public static string GetQueryBase(string url) { var uri = new Uri(url); var baseUri = uri.GetComponents...
__label__POS
0.996469
package com.alienpants.leafpicrevived; import android.annotation.TargetApi; import android.app.Notification; import android.app.NotificationManager; import android.app.Service; import android.app.job.JobParameters; import android.app.job.JobService; import android.os.Build; import android.util.Log; import androidx.co...
__label__POS
0.653448
package com.alienpants.leafpicrevived; import android.content.Context; import com.bumptech.glide.Glide; import com.bumptech.glide.GlideBuilder; import com.bumptech.glide.Registry; import com.bumptech.glide.module.GlideModule; /** * Created by dnld on 10/03/16. */ public class CustomGlideModule implements GlideMod...
__label__POS
0.946321
package com.alienpants.leafpicrevived; import android.content.Context; import java.io.IOException; import java.io.InputStream; import java.util.Properties; /** * Created by dnld on 31/07/16. */ public class SecretConstants { private static String base64EncodedPublicKey; public static String MAP_BOX_TOKE...
__label__POS
0.999718
package com.alienpants.leafpicrevived.fragments; import android.net.Uri; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.alienpants.leafpicrevived.R; import com.a...
__label__POS
0.686556
package com.alienpants.leafpicrevived.util; import android.graphics.Bitmap; import android.graphics.Matrix; import androidx.annotation.NonNull; import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool; import com.bumptech.glide.load.resource.bitmap.BitmapTransformation; import java.security.MessageDigest; /...
__label__POS
0.98064
/* Copyright (C) 1995 Ian Jackson <iwj10@cus.cam.ac.uk> Copyright (C) 2001 Anthony Towns <aj@azure.humbug.org.au> Copyright (C) 2008-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published ...
__label__POS
0.640116
package com.alienpants.leafpicrevived.util; import android.app.KeyguardManager; import android.content.Context; import android.hardware.fingerprint.FingerprintManager; import android.os.Build; import androidx.annotation.RequiresApi; import com.alienpants.leafpicrevived.R; import static android.content.Context.FINGE...
__label__POS
0.984494
package com.alienpants.leafpicrevived.util; import android.view.GestureDetector; import android.view.MotionEvent; import android.view.View; import androidx.recyclerview.widget.RecyclerView; /** * Created by dnld on 3/24/17. */ public class RecyclerItemClickListener implements RecyclerView.OnItemTouchListener { ...
__label__POS
0.961682
package com.alienpants.leafpicrevived.util; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.net.Uri; import androidx.exifinterface.media.ExifInterface; import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView; ...
__label__POS
0.852404
package com.alienpants.leafpicrevived.util; /** * Storage for server constants - specifically Web URLs */ public class ServerConstants { // GitHub URLs public static final String GITHUB_LEAFPIC = "https://github.com/apcro/leafpicrevived"; public static final String GITHUB_DONALD = "https://github.com/DN...
__label__POS
1.000009
package com.alienpants.leafpicrevived.util; import android.Manifest; import android.app.Activity; import android.content.Context; import android.content.pm.PackageManager; import androidx.appcompat.app.AppCompatActivity; import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat; /** * Crea...
__label__POS
0.998567
package com.alienpants.leafpicrevived.util; import android.content.Context; import android.os.Build; import android.text.Html; import android.text.Spanned; import android.widget.Toast; import androidx.annotation.NonNull; import org.horaapps.liz.ColorPalette; import java.text.SimpleDateFormat; import java.util.Date;...
__label__POS
0.997335