repo_name
stringlengths
7
104
file_path
stringlengths
11
238
context
list
import_statement
stringlengths
103
6.85k
code
stringlengths
60
38.4k
next_line
stringlengths
10
824
gold_snippet_index
int32
0
8
8enet/AppOpsX
app/src/main/java/com/zzzmode/appopsx/ui/permission/PermPresenter.java
[ "public class AppOpsManager {\n\n public static final int MODE_ALLOWED = 0;\n\n\n public static final int MODE_IGNORED = 1;\n\n\n public static final int MODE_ERRORED = 2;\n\n\n public static final int MODE_DEFAULT = 3;\n\n\n public static int strOpToOp(String op) {\n return 0;\n }\n\n public static Strin...
import android.app.AppOpsManager; import android.content.Context; import android.preference.PreferenceManager; import android.util.SparseIntArray; import com.zzzmode.appopsx.OpsxManager; import com.zzzmode.appopsx.R; import com.zzzmode.appopsx.common.OpsResult; import com.zzzmode.appopsx.ui.core.AppOpsx; import com.zzz...
reSortByModePerms(opEntryInfos); } else { mView.showProgress(false); mView.showPerms(opEntryInfos); } } else { autoDisable(); } } else { mView.showError(context.ge...
info.mode = AppOpsManager.MODE_ALLOWED;
0
reinra/dynaform
src/main/java/org/dynaform/web/demo/DebugVisitor.java
[ "public class BaseFormVisitor implements FormVisitor {\r\n\r\n\tpublic <E> void element(FormElement<E> element) {\r\n\t\t// do nothing\r\n\t}\r\n\t\r\n\tpublic <F extends Form> void section(FormSection<F> section) {\r\n\t section.getContent().accept(this);\r\n\t}\r\n\r\n\tpublic <F extends Form> void repeat(FormRe...
import org.dynaform.xml.form.BaseFormVisitor; import org.dynaform.xml.form.Form; import org.dynaform.xml.form.FormAll; import org.dynaform.xml.form.FormChoice; import org.dynaform.xml.form.FormElement; import org.dynaform.xml.form.FormRepeat; import org.dynaform.xml.form.FormSection; import org.dynaform.xml.form...
package org.dynaform.web.demo; /** * @author Rein Raudjärv */ public class DebugVisitor extends BaseFormVisitor { private static final Log log = LogFactory.getLog(DebugVisitor.class); private static final DebugVisitor INSTANCE = new DebugVisitor(); public static DebugVisitor getInstance()...
public void all(FormAll all) {
2
patrickfav/density-converter
src/test/java/at/favre/tools/dconvert/test/AndroidConverterTest.java
[ "public class Arguments implements Serializable {\n private static final long serialVersionUID = 7;\n\n public static final float DEFAULT_SCALE = 3f;\n public static final float DEFAULT_COMPRESSION_QUALITY = 0.9f;\n public static final int DEFAULT_THREAD_COUNT = 4;\n public static final int MAX_THREA...
import java.util.List; import java.util.Map; import java.util.stream.Collectors; import static org.junit.Assert.*; import at.favre.tools.dconvert.arg.Arguments; import at.favre.tools.dconvert.arg.EPlatform; import at.favre.tools.dconvert.arg.ImageType; import at.favre.tools.dconvert.converters.AndroidConverter; import ...
/* * Copyright (C) 2016 Patrick Favre-Bulle * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
for (ImageType.ECompression compression : Arguments.getOutCompressionForType(arguments.outputCompressionMode, Arguments.getImageType(srcImageFile))) {
2
roncoo/roncoo-adminlte-springmvc
src/main/java/com/roncoo/adminlte/controller/admin/SecurityController.java
[ "public class RcRole implements Serializable {\r\n private Long id;\r\n\r\n private String statusId;\r\n\r\n @JsonFormat(pattern = \"yyyy-MM-dd HH:mm:ss\")\r\n private Date createTime;\r\n\r\n @JsonFormat(pattern = \"yyyy-MM-dd HH:mm:ss\")\r\n private Date updateTime;\r\n\r\n private String rol...
import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.sp...
package com.roncoo.adminlte.controller.admin; @Controller @RequestMapping(value = "/admin/security/", method = RequestMethod.POST) public class SecurityController extends BaseController { @Autowired private UserBiz biz; @RequestMapping(value = LIST, method = RequestMethod.GET) public void list() ...
Result<List<RcRole>> resultRole = biz.queryRoleList();
0
ahammer/StockSimulator
core/src/com/metalrain/stocksimulator/state/entities/MarketItemEntity.java
[ "public class MarketDemandComponent extends Component {\n public double supply = 0;\n public double demand = 0;\n public double supplyFalloff = 0.99;\n public double demandFalloff = 0.99;\n}", "public class MarketItemComponent extends Component {\n}", "public class MarketVolatilityComponent extends ...
import com.badlogic.ashley.core.Entity; import com.metalrain.stocksimulator.state.components.MarketDemandComponent; import com.metalrain.stocksimulator.state.components.MarketItemComponent; import com.metalrain.stocksimulator.state.components.MarketVolatilityComponent; import com.metalrain.stocksimulator.state.componen...
package com.metalrain.stocksimulator.state.entities; /** * Created by Adam Hammer on 6/22/2015. */ public class MarketItemEntity extends Entity { public MarketItemEntity() {} public MarketItemEntity(String name, int initialPrice, int minPrice, int volatility) { add(new NameComponent(name)); ...
add(new MarketVolatilityComponent(minPrice, volatility));
2
SilenceDut/NBAPlus
app/src/main/java/com/me/silencedut/nbaplus/app/AppService.java
[ "public class DBHelper {\n\n private static DBHelper sInstance;\n private static final Object WATCH_DOG=new Object();\n private static final String DB_NAME = \"nbaplus\";\n private DaoSession daoSession;\n private SQLiteDatabase db;\n public static DBHelper getInstance(Context context) {\n ...
import android.os.Handler; import android.os.HandlerThread; import com.google.gson.Gson; import com.me.silencedut.greendao.DBHelper; import com.me.silencedut.nbaplus.network.NbaplusAPI; import com.me.silencedut.nbaplus.network.NbaplusFactory; import com.me.silencedut.nbaplus.network.NewsDetileAPI; import com.me.silence...
package com.me.silencedut.nbaplus.app; /** * Created by SilenceDut on 2015/11/28. */ public class AppService { private static final AppService NBAPLUS_SERVICE=new AppService(); private static Gson sGson; private static EventBus sBus ; private static DBHelper sDBHelper; private static Nbapl...
private static NewsDetileAPI sNewsDetileApi;
3
Labs64/NetLicensingClient-java
NetLicensingClient-demo/src/main/java/com/labs64/netlicensing/examples/OfflineValidation.java
[ "public class Context extends GenericContext<String> {\n\n private String publicKey;\n\n public Context() {\n super(String.class);\n }\n\n public Context setBaseUrl(final String baseUrl) {\n return (Context) this.setValue(Constants.BASE_URL, baseUrl);\n }\n\n public String getBaseUrl...
import java.io.IOException; import java.io.StringReader; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; import com.labs64.netlicensing.domain.vo.Context; import com.labs64.netlicensing.domain.vo.MetaInfo; import com.labs64.netlicensing.domain.vo.ValidationRes...
package com.labs64.netlicensing.examples; /** * Demonstrates how to work with offline validation file. * <p> * This example uses pre-generated validation file and key. In a real-world application you'll need to do the following * steps in order to obtain your own files: * </p> * <ul> * <li>Create NetLicensin...
final ValidationResult validationResult = ValidationService.validateOffline(context, validationFile, meta);
4
integeruser/jgltut
src/integeruser/jgltut/tut10/FragmentPointLighting.java
[ "public class MousePoles {\n public enum MouseButtons {\n MB_LEFT_BTN,\n MB_RIGHT_BTN,\n MB_MIDDLE_BTN\n }\n\n public enum MouseModifiers {\n MM_KEY_SHIFT,\n MM_KEY_CTRL,\n MM_KEY_ALT\n }\n\n ////////////////////////////////\n public static class ObjectDat...
import integeruser.jglsdk.glutil.MousePoles.*; import integeruser.jgltut.Tutorial; import integeruser.jgltut.commons.ProjectionBlock; import integeruser.jgltut.framework.Framework; import integeruser.jgltut.framework.Mesh; import integeruser.jgltut.framework.MousePole; import integeruser.jgltut.framework.Timer; import ...
package integeruser.jgltut.tut10; /** * Visit https://github.com/integeruser/jgltut for info and updates. * Original: https://bitbucket.org/alfonse/gltut/src/default/Tut%2010%20Plane%20Lights/Fragment%20Point%20Lighting.cpp * <p> * Part III. Illumination * Chapter 10. Plane Lights * <p> * I,J,K,L - control...
cylinderMesh = new Mesh("UnitCylinder.xml");
4
miurahr/tmpotter
src/main/java/org/tmpotter/preferences/Preferences.java
[ "@SuppressWarnings(\"serial\")\npublic class TranslationException extends Exception {\n /**\n * Constructs an instance of <code>TranslationException</code> with the\n * specified detail message.\n *\n * @param msg the detail message.\n */\n public TranslationException(String msg) {\n ...
import org.tmpotter.exceptions.TranslationException; import org.tmpotter.util.LFileCopy; import org.tmpotter.util.StringUtil; import org.tmpotter.util.Utilities; import org.tmpotter.util.xml.XMLBlock; import org.tmpotter.util.xml.XMLStreamReader; import org.tmpotter.util.xml.XMLUtil; import java.io.BufferedReader; impo...
return res; } /** * Sets the value of some preference. * * @param name preference key name, usually Preferences.PREF_... * @param value preference value as a string */ public void setPreference(String name, String value) { changed = true; if (!StringUtil.is...
} catch (TranslationException | IndexOutOfBoundsException | IOException te) {
0
mitdbg/AdaptDB
src/main/java/core/adapt/AccessMethod.java
[ "public class PartitionIterator implements Iterator<IteratorRecord> {\n\n\tpublic enum ITERATOR {\n\t\tSCAN, FILTER, REPART\n\t};\n\n\tprotected IteratorRecord record;\n\tprotected byte[] recordBytes;\n\n\tprotected static char newLine = '\\n';\n\n\tprotected byte[] bytes;\n\tprotected int bytesLength, offset, prev...
import core.adapt.iterator.PartitionIterator; import core.adapt.opt.Optimizer; import core.adapt.spark.SparkQueryConf; import core.common.globals.Globals; import core.common.globals.TableInfo; import core.common.index.RobustTree; import core.common.key.RawIndexKey; import core.utils.HDFSUtils;
package core.adapt; /** * This access method class considers filter access method over the distributed * dataset. The filter could be extracted as: - the selection predicate in * selection query - the sub-range filter (different for each node) in * join/aggregate query * * Currently, we support filtering only o...
RawIndexKey key;
6
danijel3/KaldiJava
src/main/java/pl/edu/pjwstk/kaldi/service/ServiceDaemon.java
[ "public class Java {\n\n\tprivate static String sep = \":\";\n\n\tpublic static void java(String class_name, String[] args,\n\t\t\tList<File> cp_files, boolean async) {\n\n\t\tString class_path = \"\";\n\t\tfor (File file : cp_files) {\n\t\t\tif (!class_path.isEmpty())\n\t\t\t\tclass_path += sep;\n\t\t\tclass_path ...
import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.io.PrintWriter; import java.security.NoSuchAlgorithmException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.LinkedList; import java.util.Locale; ...
package pl.edu.pjwstk.kaldi.service; public class ServiceDaemon { static File settings_file = null; static HashMap<String, String> cache_map = new HashMap<String, String>(); public static void main(String[] args) { try { Locale.setDefault(Locale.ENGLISH); Log.initFile("KaldiServiceDaemon", true); ...
dbTasks.Task running_tasks[] = dbTasks.getAllRunning();
3
AstroGypsophila/TryGank
TryGank/app/src/main/java/com/gypsophila/trygank/business/gank/model/SearchBusinessImpl.java
[ "public abstract class BaseActivity extends AppCompatActivity {\n\n protected RequestManager requestManager = null;\n private Context mContext;\n\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n mContext = this;\n requestManager = new RequestManager();\n super....
import com.gypsophila.commonlib.activity.BaseActivity; import com.gypsophila.commonlib.net.RequestCallback; import com.gypsophila.commonlib.net.RequestParameter; import com.gypsophila.trygank.business.gank.GankJsonUtils; import com.gypsophila.trygank.business.RemoteService; import com.gypsophila.trygank.entity.SearchPl...
package com.gypsophila.trygank.business.gank.model; /** * Description : * Author : AstroGypsophila * GitHub : https://github.com/AstroGypsophila * Date : 2016/10/23 */ public class SearchBusinessImpl implements IGankBusiness { @Override public void loadBeans(BaseActivity activity, ...
SearchPlusBean searchPlusBean = GankJsonUtils.readJsonSearchPlusBean(content);
5
danisola/restify
url/src/test/java/com/danisola/restify/url/types/UuidVarTest.java
[ "public class RestParser {\n\n private final Pattern pathPattern;\n private final VarType[] pathTypes;\n private final ParamVar[] paramVars;\n private final int numVars;\n\n RestParser(Pattern pathPattern, VarType[] pathTypes, ParamVar[] paramVars, int numVars) {\n this.pathPattern = pathPatte...
import com.danisola.restify.url.RestParser; import com.danisola.restify.url.RestUrl; import org.junit.Test; import java.util.UUID; import static com.danisola.restify.url.RestParserFactory.parser; import static com.danisola.restify.url.matchers.IsInvalid.isInvalid; import static com.danisola.restify.url.matchers.IsValid...
package com.danisola.restify.url.types; public class UuidVarTest { @Test public void whenNegIntIsNotExpectedThenParse() {
RestParser parser = parser("/users/{}", uuidVar("userId"));
0
diribet/aqdef-tools
src/main/java/cz/diribet/aqdef/parser/line/AbstractLineParser.java
[ "public interface AqdefConstants {\n\n\t/**\n\t * Separates lines of data file\n\t */\n\tString LINE_SEPARATOR = \"\\r\\n\";\n\n\t/**\n\t * Separates value from k-key on single line\n\t */\n\tString VALUES_SEPARATOR = \" \";\n\n\t/**\n\t * Separates fields of single characteristic in lines with measured values (not...
import java.util.Set; import cz.diribet.aqdef.AqdefConstants; import cz.diribet.aqdef.KKey; import cz.diribet.aqdef.KKeyMetadata; import cz.diribet.aqdef.KKeyRepository; import cz.diribet.aqdef.convert.IKKeyValueConverter; import cz.diribet.aqdef.model.AqdefObjectModel; import cz.diribet.aqdef.parser.ParserContext; imp...
package cz.diribet.aqdef.parser.line; @Data public abstract class AbstractLineParser implements AqdefConstants { private static final Logger LOG = LoggerFactory.getLogger(AbstractLineParser.class); private final KKeyRepository kKeyRepository = KKeyRepository.getInstance(); /** * Set to true if th...
KKeyMetadata kKeyMetadata = kKeyRepository.getMetadataFor(key);
2
echocat/gradle-golang-plugin
src/test/java/org/echocat/gradle/plugins/golang/testing/reports/ReportsRoundtripTest.java
[ "public class GolangTestOutputBasedReportObserver implements ReportObserver {\n\n private static final char LINE_SEPARATOR = Objects.equals(getProperty(\"line.separator\", \"\\n\"), \"\\r\") ? '\\r' : '\\n';\n private static final Pattern START_PATTERN = Pattern.compile(\"^=== RUN\\\\s+(.+)\\\\s*$\");\n pr...
import org.echocat.gradle.plugins.golang.testing.report.GolangTestOutputBasedReportObserver; import org.echocat.gradle.plugins.golang.testing.report.Report; import org.echocat.gradle.plugins.golang.testing.report.ReportObserver; import org.echocat.gradle.plugins.golang.testing.report.ReportTransformer; import org.echoc...
package org.echocat.gradle.plugins.golang.testing.reports; @RunWith(Parameterized.class) public class ReportsRoundtripTest { private static final String[] TESTS = { "01-pass", "02-fail", "03-skip", "04-go_1_4", "06-mixed", "07-compiled_test", "08-parallel...
final Report report = observer.getReport();
1
mikroskeem/Shuriken
instrumentation/src/test/java/eu/mikroskeem/test/shuriken/instrumentation/testagent/TestAgent5.java
[ "public class Ensure {\n /**\n * Ensure that condition is true\n *\n * @param condition Condition\n * @param exception Exception what will be thrown, if condition isn't true\n * @param args Exception arguments\n */\n @Contract(\"false, _, _ -> fail\")\n public static void ensureCond...
import eu.mikroskeem.shuriken.common.Ensure; import eu.mikroskeem.shuriken.instrumentation.Descriptor; import org.objectweb.asm.ClassWriter; import org.objectweb.asm.Opcodes; import org.objectweb.asm.Type; import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.tree.FieldInsnNode; import org.objectweb.asm.tre...
package eu.mikroskeem.test.shuriken.instrumentation.testagent; /** * @author Mark Vainomaa */ public class TestAgent5 implements ClassFileTransformer { private final static String TARGET_CL = "eu/mikroskeem/test/shuriken/instrumentation/testclasses/TestTransformable5"; private final static int TARGET_A = ...
FieldInsnNode fInsnNode = findFieldInstruction(method.instructions, PUT, TARGET_CL, "foundProperty", Type.getDescriptor(String.class));
2
marcio-da-silva-arantes/MINLP
MINLP/src/minlp/samples/specific/global_optimization/AluffiPentini1985.java
[ "public interface Expr {\n public Expr prod(double coef) throws Exception;\n public Expr prod(Expr expr2) throws Exception;\n \n public Expr sum(Expr expr2) throws Exception;\n public Expr sum(double constant) throws Exception;\n public Expr minus(Expr expr2) throws Exception;\n public Expr min...
import minlp.Expr; import minlp.MINLP; import minlp.Var; import minlp.cplex.CPLEX; import minlp.glpk.GLPK; import minlp.gurobi.Gurobi; import minlp.nlVar;
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package minlp.samples.specific.global_optimization; /** * * @author marcio */ public class AluffiPentini1985 { /** * <pre...
MINLP mip = new Gurobi(); //to diferent solvers use: CPLEX or Gurobi or GLPK;
5
hceylan/guava
guava-tests/test/com/google/common/testing/NullPointerTesterTest.java
[ "@GwtCompatible(emulated = true)\n// TODO(user): If BiMultimap graduates from labs, this class should implement it.\npublic abstract class ImmutableMultimap<K, V>\n implements Multimap<K, V>, Serializable {\n\n /** Returns an empty multimap. */\n public static <K, V> ImmutableMultimap<K, V> of() {\n return ...
import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.base.Function; import com.google.common.base.Supplier; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMultimap; import com.google.common.col...
/* * Copyright (C) 2005 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
static List<Class<?>> failClasses = Lists.newArrayList();
3
spotify/crtauth-java
src/main/java/com/spotify/crtauth/CrtAuthClient.java
[ "public class KeyNotFoundException extends CrtAuthException {\n\n public KeyNotFoundException() {\n super();\n }\n\n public KeyNotFoundException(String message) {\n super(message);\n }\n\n public KeyNotFoundException(Throwable throwable) {\n super(throwable);\n }\n}", "public class ProtocolVersionE...
import com.spotify.crtauth.exceptions.KeyNotFoundException; import com.spotify.crtauth.exceptions.ProtocolVersionException; import com.spotify.crtauth.protocol.Challenge; import com.spotify.crtauth.protocol.CrtAuthCodec; import com.spotify.crtauth.protocol.Response; import com.spotify.crtauth.signer.Signer; import stat...
/* * Copyright (c) 2015 Spotify AB. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
Challenge deserializedChallenge = CrtAuthCodec.deserializeChallenge(decodedChallenge);
2
iloveeclipse/plugindependencies
org.eclipselabs.plugindependencies.ui/src/org/eclipselabs/plugindependencies/ui/view/TreeProblem.java
[ "public class Feature extends OSGIElement {\n\n public final static Feature DUMMY_FEATURE = new Feature(\"\", NamedElement.EMPTY_VERSION);\n\n\n private List<ManifestEntry> requiredFeatureEntries;\n\n private List<ManifestEntry> includedPluginEntries;\n\n private List<ManifestEntry> includedFeatureEntri...
import java.util.ArrayList; import org.eclipselabs.plugindependencies.core.Feature; import org.eclipselabs.plugindependencies.core.NamedElement; import org.eclipselabs.plugindependencies.core.Package; import org.eclipselabs.plugindependencies.core.Plugin; import org.eclipselabs.plugindependencies.core.Problem;
/******************************************************************************* * Copyright (c) 2017 Andrey Loskutov * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at ...
if(named instanceof Plugin) {
3
spencergibb/halfpipe
halfpipe-consul/src/main/java/halfpipe/consul/ConsulEndpoint.java
[ "public interface AgentClient {\n @RequestLine(\"GET /v1/agent/services\")\n Map<String, Service> getServices();\n\n @RequestLine(\"PUT /v1/agent/service/register\")\n void register(Service service);\n\n @RequestLine(\"PUT /v1/agent/service/deregister/{serviceId}\")\n void deregister(@Named(\"serv...
import halfpipe.consul.client.AgentClient; import halfpipe.consul.client.CatalogClient; import halfpipe.consul.client.KVClient; import halfpipe.consul.model.KeyValue; import halfpipe.consul.model.Service; import halfpipe.consul.model.ServiceNode; import halfpipe.web.EndpointDelegate; import lombok.Data; import org.spri...
package halfpipe.consul; /** * User: spencergibb * Date: 5/1/14 * Time: 3:30 PM */ public class ConsulEndpoint extends EndpointMvcAdapter { @Inject
KVClient kvClient;
2
FenixEdu/oddjet
src/test/java/org/fenixedu/oddjet/test/document/DiplomaSupplement.java
[ "public class Template {\n\n /** The bytes of the template document file. */\n private byte[] bytes;\n /** The file path to the template document file. */\n private String path;\n /** The locale of the template. */\n private Locale locale;\n /** Map of template data parameters. */\n final pr...
import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.fenixedu.oddjet.Template; import org.fenixedu.oddjet.exception.IllegalTemplateDataSourceNameException; import org.fenixedu.oddjet.exception.IllegalTemplateParameterNameException; import org.fenixedu.oddjet.table.EntryListTableData...
package org.fenixedu.oddjet.test.document; public class DiplomaSupplement extends Template { public DiplomaSupplement(String odtFilePath) throws SecurityException, IOException { super(odtFilePath); try { addParameter("full_name", "Manuel dos Santos"); addParameter("family...
program.add(new ProgramCurricularUnit("2000/01", "Mais Materiais e cenas", "normal", "semestre", 6.0, 16, 16, obs
6
stoussaint/spring-data-marklogic
src/main/java/com/_4dconcept/springframework/data/marklogic/core/query/QueryBuilder.java
[ "public interface MarklogicCollectionUtils {\n\n default <T> List<String> extractCollections(T entity, MappingContext<? extends MarklogicPersistentEntity<?>, MarklogicPersistentProperty> mappingContext) {\n ArrayList<String> collections = new ArrayList<>();\n\n collections.addAll(extractCollections...
import com._4dconcept.springframework.data.marklogic.MarklogicCollectionUtils; import com._4dconcept.springframework.data.marklogic.MarklogicTypeUtils; import com._4dconcept.springframework.data.marklogic.MarklogicUtils; import com._4dconcept.springframework.data.marklogic.core.MarklogicOperationOptions; import com._4d...
/* * Copyright 2017 the original author or authors. * * 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 applica...
String collection = MarklogicUtils.expandsExpression(determinePrincipalCollection(), determineTargetClass());
2
biafra23/EtherWallet
geth-connector/src/main/java/com/jaeckel/geth/EthereumJsonRpc.java
[ "public class EthAccountsResponse {\n\n public List<String> result;\n\n @Override\n public String toString() {\n return \"EthAccountsResponse{\" +\n// \"id='\" + id + '\\'' +\n// \", jsonrpc='\" + jsonrpc + '\\'' +\n \", result=\" + result +\n ...
import com.jaeckel.geth.json.EthAccountsResponse; import com.jaeckel.geth.json.EthBlockNumberResponse; import com.jaeckel.geth.json.EthGetBalanceResponse; import com.jaeckel.geth.json.EthSyncingResponse; import com.jaeckel.geth.json.NetPeerCountResponse; import com.jaeckel.geth.json.PersonalListAccountsResponse; import...
package com.jaeckel.geth; public interface EthereumJsonRpc { void netPeerCount(Callback<NetPeerCountResponse> callback) throws IOException;
void ethSyncing(Callback<EthSyncingResponse> callback) throws IOException;
3
ppedemon/Bluejelly
bluejelly-runtime/src/test/java/bluejelly/runtime/test/ExnModule.java
[ "public class ExecutionContext implements Runnable {\n \n // Execution context state describes what's on top of the stack\n private static enum State { REDEX, WHNF, PAP };\n \n // Node to evaluate\n private Node n;\n \n // Execution thread for this context\n private Thread t;\n \n /...
import bluejelly.runtime.ExecutionContext; import bluejelly.runtime.Module; import bluejelly.runtime.ann.JellyCode; import bluejelly.runtime.nodes.Int; import bluejelly.runtime.nodes.Node; import bluejelly.runtime.nodes.Str;
/* * The Bluejelly project, Copyright 2012. * * This source code is distributed under the terms of * the BSD license, see the LICENSE file for details. */ package bluejelly.runtime.test; /** * Dummy exception testing module. * * @author ppedemon */ public class ExnModule implements Module { @Jell...
Node[] s = ctx.s;
3
querydsl/codegen
src/test/java/com/mysema/codegen/ComplexEvaluationTest.java
[ "public class ClassType implements Type {\n\n private final TypeCategory category;\n\n private final Class<?> javaClass;\n\n private final String className;\n\n private final List<Type> parameters;\n\n private Type arrayType, componentType, enclosingType;\n\n public ClassType(Class<?> javaClass, T...
import static org.junit.Assert.*; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.junit.Test; import com.mysema.codegen.model.ClassType; import com.mysema.codegen.model.Type; import com.mysema.codegen.model.TypeCategory; import com.mysema.codegen.model.Types; import com.mysema.c...
/* * Copyright (c) 2010 Mysema Ltd. * All rights reserved. * */ package com.mysema.codegen; public class ComplexEvaluationTest { private EvaluatorFactory factory = new ECJEvaluatorFactory(getClass().getClassLoader()); @Test @SuppressWarnings("unchecked") public void Complex() {
ClassType resultType = new ClassType(TypeCategory.LIST, List.class, Types.STRING);
2
6thsolution/ApexNLP
apex/src/main/java/com/sixthsolution/apex/nlp/event/StandardTimeExtractor.java
[ "public enum Tag {\n NONE(97),\n NUMBER(98),\n PREPOSITION(99),\n RELATIVE_PREPOSITION(100),\n RELATIVE_SUFFIX(101),\n //LOCATION\n LOCATION_PREFIX(102),\n LOCATION_SUFFIX(103),\n LOCATION_NAME(137),\n //TIME\n TIME_PREFIX(104), //e.g. at, in ,the\n TIME_START_RANG...
import com.sixthsolution.apex.nlp.dict.Tag; import com.sixthsolution.apex.nlp.dict.TagValue; import com.sixthsolution.apex.nlp.ner.ChunkedPart; import com.sixthsolution.apex.nlp.ner.Entity; import com.sixthsolution.apex.nlp.tagger.TaggedWord; import com.sixthsolution.apex.nlp.util.Pair; import org.threeten.bp.LocalDate...
package com.sixthsolution.apex.nlp.event; /** * @author Saeed Masoumi (s-masoumi@live.com) * @author Rozhin Bayati */ public class StandardTimeExtractor implements Extractor { LocalTime time; @Override
public void extract(EventBuilder builder, LocalDateTime source, ChunkedPart chunkedPart) {
2
greipadmin/greip
org.greip/src/org/greip/label/StyledLabel.java
[ "public class Greip {\r\n\r\n\tpublic static final int LINK = 1;\r\n\tpublic static final int DECORATOR = 2;\r\n\tpublic static final int IMAGE = 2;\r\n\r\n\tpublic static final int JUSTIFY = 1 << 28;\r\n}\r", "public final class Util {\r\n\r\n\tprivate static final String ELLIPSES = \"...\"; //$NON-NLS-1$\r\n\r\...
import java.text.ParseException; import java.util.function.Consumer; import org.eclipse.swt.SWT; import org.eclipse.swt.SWTException; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Font; import...
/** * Copyright (c) 2017 by Thomas Lorbeer * * All rights reserved. This program and the accompanying materials are made * available under the terms of the Eclipse Public License v1.0 which * accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * **/ package or...
Util.whenNotNull(link, () -> {
1
DigiArea/es5-model
com.digiarea.es5/src/com/digiarea/es5/ArrayLiteral.java
[ "public abstract class Literal extends Expression {\r\n\r\n Literal() {\r\n super();\r\n }\r\n\r\n Literal(JSDocComment jsDocComment, int posBegin, int posEnd) {\r\n super(jsDocComment, posBegin, posEnd);\r\n }\r\n\r\n}\r", "public abstract class Expression extends Node {\r\n\r\n Expr...
import com.digiarea.es5.Literal; import com.digiarea.es5.Expression; import com.digiarea.es5.NodeList; import com.digiarea.es5.JSDocComment; import com.digiarea.es5.visitor.VoidVisitor; import com.digiarea.es5.visitor.GenericVisitor;
package com.digiarea.es5; /** * The Class ArrayLiteral. */ public class ArrayLiteral extends Literal { /** * The expressions. */ private NodeList<Expression> expressions = null; public NodeList<Expression> getExpressions() { return expressions; } public vo...
public <C> void accept(VoidVisitor<C> v, C ctx) throws Exception {
4
Bernardo-MG/repository-pattern-java
src/test/java/com/wandrell/pattern/test/integration/repository/access/h2/eclipselink/ITModifyH2EclipselinkJpaRepository.java
[ "public class PersistenceContextPaths {\n\n /**\n * Eclipselink JPA persistence.\n */\n public static final String ECLIPSELINK = \"classpath:context/persistence/jpa-eclipselink.xml\";\n\n /**\n * Hibernate JPA persistence.\n */\n public static final String HIBERNATE = \"classpath:context...
import com.wandrell.pattern.test.util.config.properties.DatabaseScriptsPropertiesPaths; import com.wandrell.pattern.test.util.config.properties.JdbcPropertiesPaths; import com.wandrell.pattern.test.util.config.properties.JpaPropertiesPaths; import com.wandrell.pattern.test.util.config.properties.PersistenceProviderProp...
/** * The MIT License (MIT) * <p> * Copyright (c) 2015 the original author or authors. * <p> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limi...
public final class ITModifyH2EclipselinkJpaRepository extends AbstractITModify {
7
MingweiSamuel/Zyra
src/test/java/com/mingweisamuel/zyra/test/ApiLeagueV4Test.java
[ "public class Queue {\n private Queue() {}\n\n\n public static final String RANKED_SOLO_5x5 = \"RANKED_SOLO_5x5\";\n public static final String RANKED_TEAM_3x3 = \"RANKED_TEAM_3x3\";\n public static final String RANKED_TEAM_5x5 = \"RANKED_TEAM_5x5\";\n public static final String RANKED_PREMADE_5x5 = ...
import com.mingweisamuel.zyra.enums.Queue; import com.mingweisamuel.zyra.enums.Region; import com.mingweisamuel.zyra.enums.Tier; import com.mingweisamuel.zyra.leagueV4.LeagueItem; import com.mingweisamuel.zyra.leagueV4.LeaguePosition; import com.mingweisamuel.zyra.leagueV4.LeagueList; import org.junit.Ignore; import or...
package com.mingweisamuel.zyra.test; /** * Integration tests for {@link com.mingweisamuel.zyra.LeagueV4Endpoints}. */ public class ApiLeagueV4Test extends ApiTest { @Test public void getLeaguePositions() { checkGetLeaguePositions(api.leaguesV4.getAllLeaguePositionsForSummoner(Region.NA, SUMMONER_...
CompletableFuture<LeagueList> challenger =
5
Hatzen/EasyPeasyVPN
src/main/java/de/hartz/vpn/main/installation/client/MetaClient.java
[ "public class UserData implements Serializable{\n\n private static UserData instance;\n\n private UserList userList = new UserList();\n private ArrayList<Mediator> mediatorList = new ArrayList<>();\n\n //client only.\n public static String serverIp;\n public static Integer serverPort;\n //END O...
import de.hartz.vpn.main.UserData; import de.hartz.vpn.main.installation.InstallationController; import de.hartz.vpn.main.server.ConfigState; import de.hartz.vpn.utilities.Constants; import de.hartz.vpn.utilities.NetworkUtilities; import de.hartz.vpn.utilities.OpenVPNUtilities; import java.io.*; import java.net.Socket;...
package de.hartz.vpn.main.installation.client; /** * Meta client to get the network config file and the needed certificate. */ public class MetaClient extends Thread { interface ClientListener { void onError(Exception e); void onCommandFinished(String command); void onFinish(); }...
this.serverIp = UserData.serverIp;
0
Idrinth/WARAddonClient
src/main/java/de/idrinth/waraddonclient/CliMain.java
[ "public class AliasOption extends Option {\r\n private final List<String> alternatives = new ArrayList<>();\r\n\r\n public AliasOption(String opt, String longOpt, boolean required, String description, String ...alternativeLongOpts) {\r\n super(opt, longOpt, required, description);\r\n alternativ...
import de.idrinth.waraddonclient.cli.AliasOption; import de.idrinth.waraddonclient.cli.AliasParser; import de.idrinth.waraddonclient.cli.Progress; import de.idrinth.waraddonclient.service.*; import de.idrinth.waraddonclient.model.CmdAddonList; import de.idrinth.waraddonclient.service.logger.CliLogger; import de.i...
package de.idrinth.waraddonclient; public class CliMain extends BaseMain { private final String[] args; public CliMain(String[] args) { this.args = args; add(new CliLogger(false)); }
protected void main(MultiLogger logger, Config config, Request client, FileSystem file) throws FileSystem.FileSystemException, ParserConfigurationException {
5
Nescafemix/hintcase
app/src/main/java/com/joanfuentes/hintcaseexample/TargetHintActivity.java
[ "public class HintCase {\n public static final int DEFAULT_SHAPE_OFFSET_IN_DP = 10;\n public static final int NO_OFFSET_IN_PX = 0;\n public static final int BACKGROUND_COLOR_TRANSPARENT = 0x00000000;\n public static final int HINT_BLOCK_POSITION_LEFT = 0;\n public static final int HINT_BLOCK_POSITION...
import android.app.Activity; import android.os.Bundle; import android.os.Handler; import android.support.design.widget.Snackbar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.Gravity; import android.view.Menu; import android.view.MenuItem; import android....
package com.joanfuentes.hintcaseexample; public class TargetHintActivity extends AppCompatActivity { public Activity getActivity() { return this; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.acti...
.setShapeAnimators(new RevealCircleShapeAnimator(),
3
lrscp/ControlAndroidDeviceFromPC
src/com/android/ddmuilib/handler/MethodProfilingHandler.java
[ "public interface IMethodProfilingHandler {\n /**\n * Called when a method tracing was successful.\n * @param remoteFilePath the device-side path of the trace file.\n * @param client the client that was profiled.\n */\n void onSuccess(String remoteFilePath, Client client);\n\n /**\n * C...
import com.android.ddmlib.Client; import com.android.ddmlib.ClientData.IMethodProfilingHandler; import com.android.ddmlib.DdmConstants; import com.android.ddmlib.IDevice; import com.android.ddmlib.Log; import com.android.ddmlib.SyncException; import com.android.ddmlib.SyncService; import com.android.ddmlib.SyncService....
/* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
SyncProgressHelper.run(new SyncRunnable() {
4
rbrick/Mojo
Bukkit/src/main/java/me/rbrickis/mojo/bukkit/command/BukkitCommandRegistry.java
[ "public class BukkitParametricRegistry extends ParametricRegistry {\n\n public BukkitParametricRegistry() {\n super();\n bind(Player.class).to(argument -> {\n Player found = null;\n for (Player player : Bukkit.getOnlinePlayers()) {\n if (player.getName().equalsI...
import me.rbrickis.mojo.annotations.Command; import me.rbrickis.mojo.bukkit.annotations.Player; import me.rbrickis.mojo.bukkit.parametric.BukkitParametricRegistry; import me.rbrickis.mojo.command.CommandHolder; import me.rbrickis.mojo.parametric.graph.CommandGraph; import me.rbrickis.mojo.registry.CommandRegistry; impo...
package me.rbrickis.mojo.bukkit.command; public class BukkitCommandRegistry implements CommandRegistry { // Commands that we have registered ourselves. private Map<String, CommandHolder> ourCommands = new HashMap<>(); private CommandGraph commandGraph;
private SimpleCommandMap commandMap = Reflection.getSafeClass(Bukkit.getServer().getPluginManager())
4
jbush001/WaveView
src/test/java/SearchTest.java
[ "public final class Search {\n private final BooleanExpressionNode searchExpression;\n\n /// Generate a search given a set of nets that matches at the given\n /// timestamp.\n public static String generateFromValuesAt(NetDataModel[] nets, long timestamp) {\n StringBuilder searchExpr = new StringB...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import org.junit.Test; import waveview.search.Search; import waveview.search.SearchFormatException; import waveview.wavedata.BitValue; import waveview....
// // Copyright 2016 Jeff Bush // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
.appendTransition(0, 5, new BitVector("0", 2))
3
jurihock/voicesmith
voicesmith/src/de/jurihock/voicesmith/threads/LowDelayThread.java
[ "public enum FrameType\n{\n\tLarge(2),\n\tDefault(1),\n\tMedium(1 / 2D),\n\tSmall(1 / 4D);\n\n\tpublic final double\tratio;\n\n\tprivate FrameType(double ratio)\n\t{\n\t\tthis.ratio = ratio;\n\t}\n}", "public final class Preferences\n{\n\t// TODO: Try different audio sources\n\t// public static final int PCM_IN_S...
import android.content.Context; import de.jurihock.voicesmith.FrameType; import de.jurihock.voicesmith.Preferences; import de.jurihock.voicesmith.Utils; import de.jurihock.voicesmith.dsp.processors.AmplifyProcessor; import de.jurihock.voicesmith.io.AudioDevice;
/* * Voicesmith <http://voicesmith.jurihock.de/> * * Copyright (c) 2011-2014 Juergen Hock * * 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...
private final AmplifyProcessor amplifier;
3
dhemery/runtime-suite
test/com/dhemery/runtimesuite/tests/AnIncludeClassCategoriesFilter.java
[ "public interface ClassFilter {\n\t/**\n\t * Indicates whether a class satisfies this filter's criteria.\n\t * @param candidateClass the class to evaluate against this filter's criteria.\n\t * @return {@code true} only if {@code candidateClass} satisfies this filter's criteria.\n\t */\n\tboolean passes(Class<?> can...
import static org.junit.Assert.*; import org.junit.Test; import com.dhemery.runtimesuite.ClassFilter; import com.dhemery.runtimesuite.filters.IncludeClassCategories; import example.categories.CategoryA; import example.categories.CategoryB; import example.tests.ClassInCategoriesAandB; import example.tests.ClassInCategor...
package com.dhemery.runtimesuite.tests; public class AnIncludeClassCategoriesFilter { @Test public void withAnEmptyCategoryList_passesNoClasses() { ClassFilter filter = new IncludeClassCategories();
assertFalse(filter.passes(ClassWithNoCategories.class));
8
struberg/juel
modules/impl/src/main/java/de/odysseus/el/tree/impl/Parser.java
[ "public enum Symbol {\r\n\tEOF,\r\n\tPLUS(\"'+'\"), MINUS(\"'-'\"),\r\n\tMUL(\"'*'\"), DIV(\"'/'|'div'\"), MOD(\"'%'|'mod'\"),\r\n\tLPAREN(\"'('\"), RPAREN(\"')'\"),\r\n\tIDENTIFIER,\r\n\tNOT(\"'!'|'not'\"), AND(\"'&&'|'and'\"), OR(\"'||'|'or'\"),\r\n\tEMPTY(\"'empty'\"), INSTANCEOF(\"'instanceof'\"),\r\n\tINTEGER,...
import de.odysseus.el.tree.impl.Scanner.ScanException; import de.odysseus.el.tree.impl.Scanner.Symbol; import de.odysseus.el.tree.impl.Scanner.Token; import de.odysseus.el.tree.impl.ast.*; import static de.odysseus.el.tree.impl.Scanner.Symbol.*; import static de.odysseus.el.tree.impl.Builder.Feature.*; import jav...
/** * Parse a floating point literal. * @param string string to parse * @return <code>Double.valueOf(string)</code> */ protected Number parseFloat(String string) throws ParseException { try { return Double.valueOf(string); } catch (NumberFormatException e) { fail(FLOAT); return null; ...
public Tree tree() throws ScanException, ParseException {
3
StumbleUponArchive/hbase
src/test/java/org/apache/hadoop/hbase/replication/TestReplication.java
[ "public class HBaseTestingUtility {\n private static final Log LOG = LogFactory.getLog(HBaseTestingUtility.class);\n private Configuration conf;\n private MiniZooKeeperCluster zkCluster = null;\n\n /**\n * The default number of regions per regionserver when creating a pre-split\n * table.\n */\n private ...
import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration; import ...
/* * Copyright 2010 The Apache Software Foundation * * 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 ...
private static ZooKeeperWatcher zkw1;
5
scalyr/Scalyr-Java-Client
src/test/com/scalyr/api/tests/UtilTests.java
[ "public class Converter {\n /**\n * Convert any numeric type to Integer. If `parseSI` is set to true, try to parse SI units as well.\n * <p>\n * A null input is returned as-is. Non-numeric inputs trigger an exception. Out-of-range\n * values trigger undefined behavior.\n */\n public static Integer toInt...
import com.scalyr.api.internal.ScalyrUtil; import com.scalyr.api.internal.Tuple; import com.scalyr.api.json.JSONObject; import com.scalyr.api.json.JSONParser; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.io.ByteArrayOutpu...
/* * Scalyr client library * Copyright 2012 Scalyr, Inc. * * 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 applic...
Tuple[] tuples = new Tuple[]{
4
occi4java/occi4java
infrastructure/src/main/java/occi/infrastructure/compute/actions/RestartAction.java
[ "public abstract class Action {\n\t/**\n\t * The identifying Category of the Action. \n\t */\n\tprivate static Category category;\n\n\tpublic abstract void execute(URI uri, Method method);\n\n\t/**\n\t * Returns the category of the action. \n\t * \n\t * @return the category\n\t */\n\tpublic Category getCategory() {...
import occi.infrastructure.interfaces.ComputeInterface; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.net.URI; import java.net.URISyntaxException; import java.util.HashSet; import java.util.UUID; import javax.naming.directory.SchemaViolationException; import occi.core.Action; import occi.core.Cat...
/** * Copyright (C) 2010-2011 Sebastian Heckmann, Sebastian Laag * * Contact Email: <sebastian.heckmann@udo.edu>, <sebastian.laag@udo.edu> * * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a c...
public enum Restart implements Method {
2
zsawyer/MumbleLink
mod/src/main/java/zsawyer/mods/mumblelink/addons/pa/es/ExtendedPASupport.java
[ "public interface Activateable {\r\n\r\n /**\r\n * enable all major activities both initially and subsequently to\r\n * intermissions\r\n */\r\n public abstract void activate();\r\n\r\n /**\r\n * suspend all major activities\r\n */\r\n public abstract void deactivate();\r\n}\r", "p...
import net.minecraft.client.Minecraft; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.EventPriority; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftf...
/* mod_MumbleLink - Positional Audio Communication for Minecraft with Mumble Copyright 2011-2013 zsawyer (http://sourceforge.net/users/zsawyer) This file is part of mod_MumbleLink (http://sourceforge.net/projects/modmumblelink/). mod_MumbleLink is free software: you can redistribute it and/or modify it ...
public class ExtendedPASupport implements Activateable, IdentityManipulator {
0
guzhigang001/QNewsDemo
app/src/main/java/com/example/administrator/ggcode/Activity/MainActivity.java
[ "@SuppressWarnings(\"unused\") public class ActivityUtils {\n\n // 使用弱引用,避免不恰当地持有Activity或Fragment的引用。\n // 持有Activity的引用会阻止Activity的内存回收,增大OOM的风险。\n private WeakReference<Activity> activityWeakReference;\n private WeakReference<Fragment> fragmentWeakReference;\n\n private Toast toast;\n\n public ...
import android.Manifest; import android.annotation.TargetApi; import android.content.ContentUris; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.PackageManager; import android.database.Cursor; import android.graphics.Bitmap; import androi...
package com.example.administrator.ggcode.Activity; public class MainActivity extends AppCompatActivity { private static final String TAG = "MainActivity------>"; @BindView(R.id.fl_content) FrameLayout flContent; @BindView (R.id.nv_left) NavigationView nvLeft; @BindView (R.id.dl_activity_m...
private GIFFragment gifFragment; //动态图
3
tliron/scripturian
components/scripturian/source/com/threecrickets/scripturian/adapter/NashornProgram.java
[ "public class Executable\n{\n\t//\n\t// Constants\n\t//\n\n\t/**\n\t * Prefix prepended to on-the-fly scriptlets stored in the document source.\n\t */\n\tpublic static final String ON_THE_FLY_PREFIX = \"_ON_THE_FLY_\";\n\n\t//\n\t// Static operations\n\t//\n\n\t/**\n\t * If the executable does not yet exist in the ...
import jdk.nashorn.internal.runtime.Context; import jdk.nashorn.internal.runtime.ErrorManager; import jdk.nashorn.internal.runtime.ScriptFunction; import jdk.nashorn.internal.runtime.ScriptObject; import jdk.nashorn.internal.runtime.ScriptRuntime; import jdk.nashorn.internal.runtime.Source; import com.threecrickets.scr...
/** * Copyright 2009-2017 Three Crickets LLC. * <p> * The contents of this file are subject to the terms of the LGPL version 3.0: * http://www.gnu.org/copyleft/lesser.html * <p> * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly f...
public void execute( ExecutionContext executionContext ) throws ParsingException, ExecutionException
2
lacuna/bifurcan
src/io/lacuna/bifurcan/durable/codecs/HashMap.java
[ "public class BlockPrefix {\n\n public enum BlockType {\n // root (2 bits)\n PRIMITIVE,\n TABLE,\n DIFF, // continuation\n COLLECTION, // continuation\n\n // 3 bits preceded by COLLECTION\n HASH_MAP,\n SORTED_MAP,\n HASH_SET,\n SORTED_SET,\n LIST,\n COLLECTION_PLACEHOLDER_...
import io.lacuna.bifurcan.*; import io.lacuna.bifurcan.durable.BlockPrefix; import io.lacuna.bifurcan.durable.BlockPrefix.BlockType; import io.lacuna.bifurcan.durable.ChunkSort; import io.lacuna.bifurcan.durable.Util; import io.lacuna.bifurcan.durable.io.DurableBuffer; import io.lacuna.bifurcan.utils.Iterators; import ...
package io.lacuna.bifurcan.durable.codecs; /** * The underlying encode/decode logic for DurableMap. * <p> * Encoding: * - the number of entries [VLQ] * - the number of HashSkipTable tiers [uint8] * - the number of SkipTable tiers [uint8] * - a HashSkipTable of hashes onto entry offsets * - a SkipTable of ind...
DurableBuffer entries = new DurableBuffer();
4
Tyde/TuCanMobile
app/src/main/java/com/dalthed/tucan/scraper/VVScraper.java
[ "@ReportsCrashes(formKey = \"\", // will not be used\n\thttpMethod = Method.PUT,\n\treportType = Type.JSON,\n\tformUri = \"http://dttyde.de:5984/acra-tucan/_design/acra-storage/_update/report\",\n\tformUriBasicAuthLogin = \"tucanApp\",\n formUriBasicAuthPassword = \"thordielrbl\")\n//@ReportsCrashes(formUri = \"...
import java.util.ArrayList; import java.util.Iterator; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import android.content.Context; import android.content.Intent; import android.util.Log; import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListe...
/** * This file is part of TuCan Mobile. * * TuCan Mobile 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. * * TuCan Mobile is d...
RequestObject thisRequest = new RequestObject(TucanMobile.TUCAN_PROT
3
olmozavala/OWGIS_V2
src/java/com/mapviewer/business/OpenLayersManager.java
[ "public class OpenLayerMapConfig {\n\t\n private int imageResolution;\n\tprivate String center = null;\n\tprivate String zoom = null;\n\tprivate int zoomLevels;\n\tprivate double zoomFactor;\n\tprivate double maxResolution;//Controls the maximum resolution of the map\n\tprivate String restrictedExtent = \"-180.0...
import com.mapviewer.conf.OpenLayerMapConfig; import com.mapviewer.exceptions.XMLFilesException; import com.mapviewer.model.Layer; import com.mapviewer.model.menu.MenuEntry; import com.mapviewer.tools.ConvertionTools; import com.mapviewer.tools.StringAndNumbers; import java.util.ArrayList;
/* * Copyright (c) 2013 Olmo Zavala * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in the * Software without restriction, including without limitation the rights to use, copy, * modify, merge, publish, dis...
if (tempLayer.isThisLayer(StringAndNumbers.strArrayFromStringColon(menuSelected[menuNumber]))) {
5
mmlevin/secu3droid
secu3droid/src/org/secu3/android/ErrorsActivity.java
[ "public class ProtoFieldInteger extends BaseProtoField implements Parcelable {\n\tprivate int value;\n\tprivate int multiplier;\n\tprivate boolean signed;\n\n\t@Override\n\tpublic void writeToParcel(Parcel dest, int flags) {\n\t\tsuper.writeToParcel(dest, flags);\n\t\tdest.writeInt(value);\n\t\tdest.writeInt(multip...
import java.util.ArrayList; import org.secu3.android.api.io.ProtoFieldInteger; import org.secu3.android.api.io.Secu3Packet; import org.secu3.android.api.io.Secu3Service; import org.secu3.android.api.io.Secu3Manager.SECU3_TASK; import org.secu3.android.parameters.ParamItemsAdapter; import org.secu3.android.parameters.it...
/* Secu3Droid - An open source, free manager for SECU-3 engine * control unit * Copyright (C) 2013 Maksim M. Levin. Russia, Voronezh * * SECU-3 - An open source, free engine control unit * Copyright (C) 2007 Alexey A. Shabelnikov. Ukraine, Gorlovka * * This program is free software: you can redistribute it and...
errors.add(new ParamItemBoolean(this, errorNames[i], getString (R.string.errors_code,errorBCs[i]), false));
6
zxcpro/zing
zing-client/src/main/java/org/zxc/zing/client/remote/RemoteClient.java
[ "public class ProviderInfo {\n private String address;\n private int port;\n\n public ProviderInfo(String address, int port) {\n this.address = address;\n this.port = port;\n }\n\n public int getPort() {\n return port;\n }\n\n public void setPort(int port) {\n this.p...
import com.google.common.util.concurrent.SettableFuture; import io.netty.bootstrap.Bootstrap; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelFutureListener; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; import io.netty.channel.EventLoopGroup; import io.netty.c...
package org.zxc.zing.client.remote; /** * Created by xuanchen.zhao on 15-12-12. */ public class RemoteClient { private static final Logger log = LoggerFactory.getLogger(RemoteClient.class);
private ProviderInfo providerInfo;
0
thirdy/durian
durian/src/main/java/qic/Main.java
[ "public static final String GUILD_LIST_FILENAME = \"guild.txt\";\r", "public static class ParseResult {\n\tString result;\n\tList<String> invalidSearchTerms = null;\n\tpublic ParseResult(String result, List<String> invalidSearchTerms) {\n\t\tthis.result = result;\n\t\tthis.invalidSearchTerms = invalidSearchTerms;...
import static java.util.Arrays.asList; import static java.util.stream.Collectors.joining; import static org.apache.commons.lang3.StringUtils.substringAfter; import static qic.Command.Status.ERROR; import static qic.util.Config.GUILD_LIST_FILENAME; import java.awt.Window; import java.io.File; import java.io.FileNotFound...
/* * Copyright (C) 2015 thirdy * * 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 2 * of the License, or (at your option) any later version. * * This program is distributed...
SwingUtilities.invokeLater(() -> new QicFrame(Main.this, query));
4
gdi-by/downloadclient
src/main/java/de/bayern/gdi/gui/controller/ButtonBarController.java
[ "public class ProgressDialog extends Dialog<ButtonType> implements CountListener, ProcessorListener {\n\n /**\n * Button to open the download directory.\n */\n public static final ButtonType OPEN_FILES = new ButtonType(I18n.getMsg(\"progressdialog.button.openfiles\"));\n\n private final DialogPane ...
import de.bayern.gdi.gui.ProgressDialog; import de.bayern.gdi.model.DownloadStep; import de.bayern.gdi.processor.ConverterException; import de.bayern.gdi.processor.DownloadStepConverter; import de.bayern.gdi.processor.Processor; import de.bayern.gdi.processor.job.DownloadStepJob; import de.bayern.gdi.config.Config; imp...
/* * DownloadClient Geodateninfrastruktur Bayern * * (c) 2016 GSt. GDI-BY (gdi.bayern.de) * * 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/LICE...
File uniqueName = Misc.uniqueFile(downloadDir, "config", "xml",
7
bingoogolapple/Graduation-Design
FrogCare/src/com/bingoogol/frogcare/ui/SettingActivity.java
[ "public class BlacklistInterceptService extends Service {\n\tprivate static final String TAG = \"BlacklistInterceptService\";\n\tprivate BlacklistSmsInterceptReceiver mBlacklistSmsInterceptReceiver;\n\tprivate BlacklistDao mBlacklistDao;\n\tprivate TelephonyManager mTelephonyManager;\n\tprivate BlacklistPhoneInterc...
import android.content.Intent; import android.os.Bundle; import android.view.View; import com.bingoogol.frogcare.R; import com.bingoogol.frogcare.service.BlacklistInterceptService; import com.bingoogol.frogcare.service.AttributionService; import com.bingoogol.frogcare.service.ApplockService; import com.bingoogol.frogca...
package com.bingoogol.frogcare.ui; public class SettingActivity extends BaseActivity { private static final String TAG = "SettingActivity"; private SettingView sv_setting_autoupdate; private SettingView sv_setting_applock; private SettingView sv_setting_attribution; private SettingView sv_setting_blacklist; pr...
if (ServiceStatusUtils.isServiceRunning(mApp, ApplockService.class.getName())) {
6
Nilhcem/frcndict-android
src/com/nilhcem/frcndict/core/layout/ClickableHanzi.java
[ "public final class HanziListener implements OnCompletionListener {\n\n\tprivate static final String TAG = \"HanziListener\";\n\tprivate static final String EXTENSION = \".mp3\";\n\n\tprivate int mCurIdx;\n\tprivate final File mVoicesDir;\n\tprivate List<File> mFiles;\n\tprivate final MediaPlayer mMediaPlayer;\n\n\...
import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Locale; import android.app.Activity; import android.app.AlertDialog; import android.app.Service; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPr...
package com.nilhcem.frcndict.core.layout; @SuppressWarnings("deprecation") public final class ClickableHanzi extends LinearLayout { private static final String START_FONT_TAG = "<font"; private static final String END_FONT_TAG = "</font>"; private static final Integer ACTION_OPEN_CHAR = 0; private static fina...
int arrayIdx = SettingsActivity.getArrayIdxFontSizes(prefs);
3
Protino/Fad-Flicks
app/src/androidTest/java/com/calgen/prodek/fadflicks/retrofit_tests/TestMovieDBApi.java
[ "public class ApiClient {\n private Retrofit retrofit;\n private boolean isDebug;\n private HttpLoggingInterceptor httpLoggingInterceptor = new HttpLoggingInterceptor();\n\n /**\n * Set the {@link Retrofit} log level.\n *\n * @param isDebug If true, the log level is set to\n * ...
import android.test.AndroidTestCase; import com.calgen.prodek.fadflicks.api.ApiClient; import com.calgen.prodek.fadflicks.model.Credits; import com.calgen.prodek.fadflicks.model.MovieDetails; import com.calgen.prodek.fadflicks.model.MovieResponse; import com.calgen.prodek.fadflicks.model.ReviewResponse; import com.calg...
/* * Copyright 2016 Gurupad Mamadapur * * 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 appl...
Call<Credits> call = apiClient.movieInterface().getCredits(TestData.MOVIE_ID);
1
rwitzel/streamflyer
streamflyer-core/src/test/java/com/github/rwitzel/streamflyer/xml/XmlVersionModifierTest.java
[ "public interface Modifier {\r\n\r\n /**\r\n * Processes the characters in the given character buffer, i.e. deletes or replaces or inserts characters, or keeps\r\n * the characters as they are.\r\n * \r\n * @param characterBuffer\r\n * The next characters provided from the modifiab...
import com.github.rwitzel.streamflyer.util.StringUtils; import com.github.rwitzel.streamflyer.xml.XmlPrologRidiculouslyLongException; import com.github.rwitzel.streamflyer.xml.XmlVersionModifier; import com.github.rwitzel.streamflyer.xml.XmlVersionReader; import static org.junit.Assert.assertEquals; import static org.j...
/** * Copyright (C) 2011 rwitzel75@googlemail.com * * 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 applic...
return new XmlVersionModifier(newXmlVersion, newNumberOfChars);
4
zhao-mingjian/qvod
app/src/main/java/com/zmj/qvod/presenter/IndexFragmentPresenter.java
[ "public class MyFragmentPagerAdapter<T> extends FragmentPagerAdapter {\n\n private List<T> mFragment;\n private List<String> mTitleList;\n\n /**\n * 普通,主页使用\n */\n public MyFragmentPagerAdapter(FragmentManager fm, List<T> mFragment) {\n super(fm);\n this.mFragment = mFragment;\n ...
import android.graphics.drawable.AnimationDrawable; import android.support.annotation.NonNull; import android.support.v4.app.Fragment; import android.text.TextUtils; import android.widget.ImageView; import com.jude.beam.expansion.BeamBasePresenter; import com.jude.utils.JUtils; import com.weavey.loading.lib.LoadingLayo...
package com.zmj.qvod.presenter; /** * Created by matt on 2017/3/14. */ public class IndexFragmentPresenter extends BeamBasePresenter<IndexFragment> { private ArrayList<String> mTitleList = new ArrayList<>(); private ArrayList<Fragment> mFragments = new ArrayList<>(); // private Subscription sub...
private VideoRes videoRes;
2
ResearchStack/ResearchStack
backbone/src/main/java/org/researchstack/backbone/ui/step/layout/SurveyStepLayout.java
[ "public abstract class ResourcePathManager {\n private static Gson gson = new GsonBuilder().setDateFormat(\"MMM yyyy\").create();\n\n private static ResourcePathManager instance;\n\n /**\n * Initializes the ResourcePathManager singleton. It is best to call this method inside your\n * {@link Applica...
import android.content.Context; import android.content.Intent; import android.os.Parcelable; import android.support.annotation.NonNull; import android.support.annotation.StringRes; import android.text.Html; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.wi...
package org.researchstack.backbone.ui.step.layout; public class SurveyStepLayout extends FixedSubmitBarLayout implements StepLayout { public static final String TAG = SurveyStepLayout.class.getSimpleName(); //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ...
private StepResult stepResult;
1
RutledgePaulV/q-builders
src/main/java/com/github/rutledgepaulv/qbuilders/delegates/concrete/ConditionPropertyDelegate.java
[ "@SuppressWarnings(\"unchecked\")\npublic class QBuilder<T extends QBuilder<T>> implements Partial<T> {\n\n protected LogicalNode root;\n protected LogicalNode current;\n\n public QBuilder() {\n root = current = new OrNode();\n }\n\n public final <S extends Enum<S>> EnumProperty<T,S> enumerati...
import com.github.rutledgepaulv.qbuilders.builders.QBuilder; import com.github.rutledgepaulv.qbuilders.conditions.Condition; import com.github.rutledgepaulv.qbuilders.delegates.virtual.PropertyDelegate; import com.github.rutledgepaulv.qbuilders.nodes.*; import com.github.rutledgepaulv.qbuilders.operators.ComparisonOper...
/* * * * com.github.rutledgepaulv.qbuilders.delegates.concrete.ConditionPropertyDelegate * * * * * * Copyright (C) 2016 Paul Rutledge <paul.v.rutledge@gmail.com> * * * * * * This software may be modified and distributed under the terms * * * of the MIT license. See the LICENSE file for details. * ...
private class NamespacingVisitor extends AbstractVoidContextNodeVisitor<Void> {
6
msdx/AndroidPNClient
androidpn/src/main/java/org/jivesoftware/smack/PacketReader.java
[ "protected static class ListenerWrapper {\n\n private PacketListener packetListener;\n private PacketFilter packetFilter;\n\n /**\n * Create a class which associates a packet filter with a listener.\n * \n * @param packetListener the packet listener.\n * @param packetFilter the associated f...
import org.jivesoftware.smack.packet.Packet; import org.jivesoftware.smack.packet.Presence; import org.jivesoftware.smack.packet.XMPPError; import org.jivesoftware.smack.sasl.SASLMechanism.Challenge; import org.jivesoftware.smack.sasl.SASLMechanism.Failure; import org.jivesoftware.smack.sasl.SASLMechanism.Success; impo...
* 1) An opening stream was sent from a non XMPP 1.0 compliant server * 2) Stream features were received from an XMPP 1.0 compliant server that does not support TLS * 3) TLS negotiation was successful * */ private void releaseConnectionIDLock() { connectionSemaphore.release(); } ...
for (ListenerWrapper listenerWrapper : connection.recvListeners.values()) {
0
CBSkarmory/AWGW
src/main/java/cbskarmory/units/air/StealthBomber.java
[ "public class Player {\n\n public static int numberOfPlayers;\n public final CO CO;\n public final int id;\n private ArrayList<Unit> unitsControlled;\n private int money;\n private ArrayList<Property> propertiesOwned;\n private int commTowers;\n private Color teamColor;\n\n /**\n * Co...
import cbskarmory.Player; import cbskarmory.PassiveFlag.MoveType; import cbskarmory.terrain.Terrain; import cbskarmory.units.Stealth; import cbskarmory.units.Unit; import cbskarmory.weapons.WeaponType;
/* * Copyright(c) 2017 CBSkarmory (https://github.com/CBSkarmory) * * This code 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. * * This code is distributed in the hope that it will be useful, * but WI...
public boolean couldTarget(Unit toCheck, Terrain hypothetical) { //cannot target air
2
romainmoreau/gsm-modem
gsm-modem-client-web/src/main/java/fr/romainmoreau/gsmmodem/client/web/WebGsmModemClient.java
[ "public class GsmModemException extends Exception {\n\tprivate static final long serialVersionUID = 1L;\n\n\tpublic GsmModemException() {\n\t\tsuper();\n\t}\n\n\tpublic GsmModemException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {\n\t\tsuper(message, cause, enableSuppre...
import java.io.IOException; import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.util.Arrays; import org.springframework.web.client.RestTemplate; import fr.romainmoreau.gsmmodem.client.api.GsmModemException; import fr.romainmoreau.gsmmodem.clie...
package fr.romainmoreau.gsmmodem.client.web; public class WebGsmModemClient extends AbstractGsmModemClient { private final RestTemplate restTemplate; private final URI uri; public WebGsmModemClient(String protocol, String host, int port) throws MalformedURLException, URISyntaxException { restTemplate = new R...
SendCommand sendCommand = new SendCommand();
4
maximeAudrain/jenerate
org.jenerate/src/java/org/jenerate/internal/generate/method/handler/MethodGeneratorHandler.java
[ "public enum MethodsGenerationCommandIdentifier implements CommandIdentifier {\r\n\r\n EQUALS_HASH_CODE(\"org.jenerate.commands.GenerateEqualsHashCodeCommand\"),\r\n TO_STRING(\"org.jenerate.commands.GenerateToStringCommand\"),\r\n COMPARE_TO(\"org.jenerate.commands.GenerateCompareToCommand\");\r\n\r\n ...
import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelEx...
/** * Copyright (c) 2014 European Organisation for Nuclear Research (CERN), All Rights Reserved. */ package org.jenerate.internal.generate.method.handler; /** * Handler that determine which generation should be performed depending on the event commandId. It also ensures that * the currently selected obj...
private static final PreferencesManager PREFERENCES_MANAGER = new PreferencesManagerImpl();
5
madcyph3r/AdvancedMaterialDrawer
example/src/main/java/de/madcyph3r/example/example/headItemTypes/HeadItemOneBlackThemeActivity.java
[ "public class FragmentInstruction extends Fragment {\n\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\n Bundle bundle = this.getArguments();\n String instruction;\n String title;\n if(bundle !=...
import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.support.v4.app.Fragment; import de.madcyph3r.example.R; import de.madcyph3r.example.example.FragmentDummy; import de.madcyph3r.example.example.FragmentInstruction; import de.madcyph3r.materialnavigationdrawer...
package de.madcyph3r.example.example.headItemTypes; public class HeadItemOneBlackThemeActivity extends MaterialNavHeadItemActivity { MaterialNavigationDrawer drawer = null; @Override protected boolean finishActivityOnNewIntent() { return false; } @Override protected int getNewInten...
menu.add(new MaterialItemSectionFragment(this, "Instruction", fragmentInstruction, "HeadItem Black Style (One Item)"));
4
Belgabor/AMTweaker
src/main/java/mods/belgabor/amtweaker/mods/amt/handlers/Processor.java
[ "public class AMTListAddition extends BaseListAddition {\n private Object amt_recipe = null;\n\n public AMTListAddition(String description, List list, AMTRecipeWrapper recipe) {\n super(description, list, recipe);\n }\n\n @Override\n public void apply() {\n if (amt_recipe == null) {\n ...
import minetweaker.MineTweakerAPI; import minetweaker.api.item.IIngredient; import minetweaker.api.item.IItemStack; import mods.belgabor.amtweaker.mods.amt.util.AMTListAddition; import mods.belgabor.amtweaker.mods.amt.util.AMTRecipeWrapper; import mods.belgabor.amtweaker.util.BaseListWildcardRemoval; import mods.defeat...
package mods.belgabor.amtweaker.mods.amt.handlers; @ZenClass("mods.amt.Processor") public class Processor { // Adding a new processor recipe @Deprecated @ZenMethod public static void addRecipe(IItemStack output, IItemStack secondary, IIngredient[] inputs, boolean isFoodRecipe, float secondaryChance,...
(areEqualNull(r.getOutput(), output)) &&
6
MewX/light-novel-library_Wenku8_Android
studio-android/LightNovelLibrary/app/src/main/java/org/mewx/wenku8/activity/UserInfoActivity.java
[ "@SuppressWarnings({\"UnusedDeclaration\"})\npublic class GlobalConfig {\n\n // online arguments\n public static final String blogPageUrl = \"https://wenku8.mewx.org/\";\n public static final String versionCheckUrl = \"https://wenku8.mewx.org/version\";\n public static final String noticeCheckSc = \"htt...
import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.TextView; import android.widget.Toast; import com.afollestad.mate...
package org.mewx.wenku8.activity; /** * Created by MewX on 2015/6/14. * User Info Activity. */ public class UserInfoActivity extends BaseMaterialActivity { // private vars private RoundedImageView rivAvatar; private TextView tvUserName, tvNickyName, tvScore, tvExperience, tvRank; private TextVi...
byte[] b = LightNetwork.LightHttpPostConnection(Wenku8API.BASE_URL, Wenku8API.getUserSignParams());
2
ParaskP7/sample-code-posts
app/src/main/java/io/petros/posts/activity/post/presenter/PostPresenterImpl.java
[ "public interface PostModel {\n\n @Nullable\n User getUser(final Integer userId);\n\n}", "public interface PostView {\n\n void loadPostUserAndPost();\n\n void loadPostUser(final String userEmail, final String userName, final String userUsername);\n\n void notifyUserAboutUserUnavailability();\n\n ...
import android.os.Bundle; import java.util.List; import javax.annotation.Nullable; import io.petros.posts.activity.post.model.PostModel; import io.petros.posts.activity.post.view.PostView; import io.petros.posts.model.Comment; import io.petros.posts.model.Post; import io.petros.posts.model.User; import io.petros.posts....
package io.petros.posts.activity.post.presenter; public class PostPresenterImpl implements PostPresenter { private final PostModel postModel; private final RetrofitService retrofitService; private final RxSchedulers rxSchedulers;
private final InternetAvailabilityDetector internetAvailabilityDetector;
5
beckchr/juel
modules/impl/src/main/java/de/odysseus/el/tree/impl/Parser.java
[ "public static enum Feature {\r\n\t/**\r\n\t * Method invocations as in <code>${foo.bar(1)}</code> as specified in JSR 245,\r\n\t * maintenance release 2.\r\n\t * The method to be invoked is resolved at evaluation time by calling\r\n\t * {@link ELResolver#invoke(javax.el.ELContext, Object, Object, Class[], Object[]...
import de.odysseus.el.tree.impl.Scanner.ScanException; import de.odysseus.el.tree.impl.Scanner.Symbol; import de.odysseus.el.tree.impl.Scanner.Token; import de.odysseus.el.tree.impl.ast.*; import static de.odysseus.el.tree.impl.Scanner.Symbol.*; import static de.odysseus.el.tree.impl.Builder.Feature.*; import jav...
/* * Copyright 2006-2009 Odysseus Software GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
private List<FunctionNode> functions = Collections.emptyList();
1
edouardhue/comeon
src/test/java/comeon/core/mediareaders/MediaTest.java
[ "public final class MediaUploadBatch {\n\n private final File[] files;\n\n private final Template template;\n\n private final Set<Media> media;\n\n private final Set<PreProcessor> preProcessors;\n\n private final ExternalMetadataSource<?> externalMetadataSource;\n\n public MediaUploadBatch(final F...
import com.drew.lang.GeoLocation; import com.drew.metadata.exif.ExifSubIFDDescriptor; import com.drew.metadata.exif.ExifSubIFDDirectory; import com.google.common.base.Charsets; import com.google.common.collect.Sets; import com.google.common.io.Files; import com.google.common.io.Resources; import comeon.core.MediaUpload...
package comeon.core.mediareaders; /** * IPTC Keywords are limited to 64 bytes. Too bad ! * * @author Édouard Hue */ public class MediaTest { private static final String SHORT_CAT_NAME = "Category:Women facing right and looking right"; private static final String LONG_CAT_NAME_2 = "Category:Annual genera...
final MediaUploadBatch batch = new MediaUploadBatch(new File[0], mockTemplate, Sets.newHashSet(new IptcPreProcessor(), new GpsPreProcessor()), new NullMetadataSource());
4
feedzai/fos-weka
src/test/java/com/feedzai/fos/impl/weka/WekaScorerTest.java
[ "public class WekaManagerConfig extends FosConfig {\n /**\n * The file extension of the header files.\n */\n public static final String HEADER_EXTENSION = \"header\";\n /**\n * Name of the configuration parameter for the maximum number of scoring threads\n */\n private static final Strin...
import org.apache.commons.configuration.BaseConfiguration; import org.junit.Test; import org.powermock.reflect.Whitebox; import java.util.Map; import java.util.UUID; import static junit.framework.Assert.assertEquals; import com.feedzai.fos.api.FOSException; import com.feedzai.fos.api.config.FosConfig; import com.feedza...
/* * $# * FOS Weka *   * Copyright (C) 2013 Feedzai SA *   * 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. * ...
Assert.assertTrue(((Map<Integer, WekaThreadSafeScorer>) Whitebox.getInternalState(wekaScorer, "wekaThreadSafeScorers")).get(testUUID) instanceof WekaThreadSafeScorerPool);
3
box/box-android-sdk
box-content-sample/src/main/java/com/box/androidsdk/sample/MainActivity.java
[ "public class BoxConfig {\n\n private static BoxCache mCache = null;\n\n /**\n * Flag for whether logging is enabled. This will log all requests and responses made by the SDK\n */\n public static boolean IS_LOG_ENABLED = false;\n\n /**\n * Flag for whether the app is currently run in debug m...
import android.app.ProgressDialog; import android.content.Context; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAd...
package com.box.androidsdk.sample; /** * Sample content app that demonstrates session creation, and use of file api. */ public class MainActivity extends AppCompatActivity implements BoxAuthentication.AuthListener { BoxSession mSession = null; BoxSession mOldSession = null; private ListView mListVie...
private ArrayAdapter<BoxItem> mAdapter;
6
idega/com.idega.xformsmanager
src/java/com/idega/xformsmanager/manager/impl/XFormsManagerSelectImpl.java
[ "public interface PropertiesSelect extends PropertiesComponent {\n\t\n\tpublic static final int LOCAL_DATA_SRC = 1;\n\tpublic static final int EXTERNAL_DATA_SRC = 2;\n\t\n\tpublic abstract LocalizedItemsetBean getItemset();\n\n\tpublic abstract String getExternalDataSrc();\n\n\tpublic abstract void setExternalDataS...
import org.chiba.xml.dom.DOMUtil; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Service; import org.w3c.dom.Document; import org.w3c.dom.Element; import com.idega.xformsmanager.business.component.properties.PropertiesSelect; import com.idega.xformsmanager.component.FormCompo...
package com.idega.xformsmanager.manager.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.7 $ * * Last modified: $Date: 2008/11/06 14:32:30 $ by $Author: civilis $ */ @FormComponentType(FormComponentType.select) @Service @Scope("singleton") public clas...
protected ComponentDataBean newXFormsComponentDataBeanInstance() {
2
sivaprasadreddy/jblogger
src/main/java/com/sivalabs/jblogger/web/controllers/BaseController.java
[ "@Entity\n@Table(name = \"TAGS\")\n@Data\npublic class Tag implements Serializable, Comparable<Tag>\n{\n\tprivate static final long serialVersionUID = 1L;\n\n\t@Id\n\t@SequenceGenerator(name=\"tag_id_generator\", sequenceName=\"tag_id_seq\", initialValue = 100, allocationSize=1)\n\t@GeneratedValue(generator = \"tag...
import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.MessageSource; import org.springframework.security.core.annotation.Authentication...
package com.sivalabs.jblogger.web.controllers; public abstract class BaseController { protected final Logger logger = LoggerFactory.getLogger(getClass()); @Autowired protected ApplicationEventPublisher publisher; @Autowired protected MessageSource messageSource; @Autowired protected BlogService blogService; ...
public Map<Tag, Integer> tagPostsCountMap() {
0
marcb1/droid-ssh
scp/src/main/java/marc/scp/activities/AddFolderPair.java
[ "public class Constants\n{\n public final static String LOG_PREFIX = \"DROID_SSH.\";\n\n public final static String PREFERENCE_PARCEABLE = \"com.whomarc.scp.PREFERENCE\";\n public final static String FILE_PARCEABLE = \"com.whomarc.scp.FILE\";\n\n // terminal constants\n public final static String RIG...
import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.EditText; import android.widget.Spinner; import java.io.File; import java.util.ArrayL...
package marc.scp.activities; /** * Created by Marc on 5/15/14. */ public class AddFolderPair extends Activity { //singleton instances private Database _dbInstance; private Dialogs _dialogInstance; private ViewGroup _contentView; privat...
_file = (FileSync)getIntent().getParcelableExtra(Constants.FILE_PARCEABLE);
0
GoogleChrome/custom-tabs-client
customtabs/tests/src/android/support/customtabs/trusted/LauncherActivityTest.java
[ "public static final String EXTRA_LAUNCH_AS_TRUSTED_WEB_ACTIVITY =\n \"android.support.customtabs.extra.LAUNCH_AS_TRUSTED_WEB_ACTIVITY\";", "public final class CustomTabsIntent {\n\n /**\n * Indicates that the user explicitly opted out of Custom Tabs in the calling application.\n * <p>\n * I...
import static android.support.customtabs.TrustedWebUtils.EXTRA_LAUNCH_AS_TRUSTED_WEB_ACTIVITY; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import android.app.Instrumentation; import android.content.Context; import android.net.Uri; import android.support.customtabs.CustomTabs...
/* * Copyright 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
.getIntExtra(CustomTabsIntent.EXTRA_TOOLBAR_COLOR, 0);
1
tsenger/animamea
animamea/src/de/tsenger/sandbox/TimeMeasurement.java
[ "public class AmCardHandler {\n\n\tprivate Card card = null;;\n\tprivate CardChannel channel = null;\n\tprivate SecureMessaging sm = null;\n\tprivate boolean connected = false;\n\t\n\tstatic Logger logger = Logger.getLogger(AmCardHandler.class);\n\n\t/**\n\t * Sendet die übergebene CommandAPDU an die konnektierte K...
import de.tsenger.animamea.asn1.SecurityInfos; import de.tsenger.animamea.iso7816.FileAccess; import de.tsenger.animamea.iso7816.SecureMessaging; import de.tsenger.animamea.iso7816.SecureMessagingException; import de.tsenger.animamea.pace.PaceException; import de.tsenger.animamea.pace.PaceOperator; import de.tsenger.an...
/** * Copyright 2011, Tobias Senger * * This file is part of animamea. * * Animamea 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 la...
SecureMessaging sm = null;
1
sismics/home
home-core/src/main/java/com/sismics/home/core/dao/dbi/SensorSampleDao.java
[ "public enum SensorSampleType {\n\n /**\n * Raw sample from sensor input.\n */\n RAW,\n \n /**\n * Sample compacted from all samples from the same minute.\n */\n MINUTE,\n \n /**\n * Sample compacted from all samples from the same hour.\n */\n HOUR,\n \n /**\n ...
import java.sql.Timestamp; import java.util.Date; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.UUID; import org.skife.jdbi.v2.Handle; import org.skife.jdbi.v2.Query; import com.google.common.collect.Maps; import com.sismics.home.core.constant.SensorSampl...
package com.sismics.home.core.dao.dbi; /** * Sensor sample DAO. * * @author bgamard */ public class SensorSampleDao { /** * Creates a new sensor sample. * * @param sample Sensor sample to create */ public String create(SensorSample sample) { // Init sensor sample data ...
final Handle handle = ThreadLocalContext.get().getHandle();
4
BullyBoo/Encryption
encoder/src/main/java/ru/bullyboo/encoder/Encoder.java
[ "public class BuilderAES extends BaseBuilder<BuilderAES>{\n\n private volatile String method;\n\n private volatile byte[] key = new byte[]{};\n private volatile AES.Key keySize = AES.Key.SIZE_128;\n\n private volatile byte[] iVector = new byte[]{};\n\n /**\n * Set the encryption method for encryp...
import ru.bullyboo.encoder.builders.BuilderAES; import ru.bullyboo.encoder.builders.BuilderARCFOUR; import ru.bullyboo.encoder.builders.BuilderBlowfish; import ru.bullyboo.encoder.builders.BuilderDES; import ru.bullyboo.encoder.builders.BuilderDESede; import ru.bullyboo.encoder.builders.BuilderHMAC; import ru.bullyboo....
/* * Copyright (C) 2017 BullyBoo * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
public static BuilderHMAC BuilderHMAC() {
5
RoboTricker/Transport-Pipes
src/main/java/de/robotricker/transportpipes/duct/Duct.java
[ "public class TransportPipes extends JavaPlugin {\n\n private Injector injector;\n\n private SentryService sentry;\n private ThreadService thread;\n private DiskService diskService;\n\n @Override\n public void onEnable() {\n\n if (Bukkit.getVersion().contains(\"1.13\")) {\n Legac...
import net.querz.nbt.CompoundTag; import org.bukkit.Bukkit; import org.bukkit.Chunk; import org.bukkit.GameMode; import org.bukkit.Material; import org.bukkit.Particle; import org.bukkit.World; import org.bukkit.block.data.BlockData; import org.bukkit.entity.Panda; import org.bukkit.entity.Player; import org.bukkit.inv...
package de.robotricker.transportpipes.duct; public abstract class Duct { protected GlobalDuctManager globalDuctManager; protected DuctSettingsInventory settingsInv; private DuctType ductType; private BlockLocation blockLoc; private World world; private Chunk chunk;
private Map<TPDirection, Duct> connectedDucts;
8
yyxhdy/ManyEAs
src/jmetal/util/wrapper/XReal.java
[ "public class Solution implements Serializable {\n\t/**\n\t * Stores the problem\n\t */\n\tprivate Problem problem_;\n\n\t/**\n\t * Stores the type of the encodings.variable\n\t */\n\tprivate SolutionType type_;\n\n\t/**\n\t * Stores the decision variables of the solution.\n\t */\n\tprivate Variable[] variable_;\n\...
import jmetal.core.Solution; import jmetal.core.SolutionType; import jmetal.encodings.solutionType.ArrayRealAndBinarySolutionType; import jmetal.encodings.solutionType.ArrayRealSolutionType; import jmetal.encodings.solutionType.BinaryRealSolutionType; import jmetal.encodings.solutionType.RealSolutionType; import jmetal...
// XReal.java // // Author: // Antonio J. Nebro <antonio@lcc.uma.es> // Juan J. Durillo <durillo@lcc.uma.es> // // Copyright (c) 2011 Antonio J. Nebro, Juan J. Durillo // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public Licen...
Configuration.logger_.severe("jmetal.util.wrapper.XReal.getValue, solution type " +
7
jprante/elasticsearch-knapsack
src/main/java/org/xbib/elasticsearch/action/knapsack/imp/TransportKnapsackImportAction.java
[ "public interface KnapsackParameter {\n\n /**\n * The indices used for knapsack\n */\n String INDEX_PARAM = \"index\";\n\n /**\n * The type used for knapsack\n */\n String TYPE_PARAM = \"type\";\n\n /**\n * The archive file path parameter name for the knapsack archive\n */\n ...
import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.admin.indices.alias.IndicesAliasesAction; import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequestBuilder; import org.elasticsearch.action.admin.indices.create.CreateIndexAction; import org.elasticsearch.action.admin.indice...
/* * Copyright (C) 2014 Jörg Prante * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
private final KnapsackService knapsack;
1
notem/Saber-Bot
src/main/java/ws/nmathe/saber/commands/general/ConfigCommand.java
[ "public class Main\n{\n private static ShardManager shardManager;\n private static BotSettingsManager botSettingsManager = new BotSettingsManager();\n private static EntryManager entryManager = new EntryManager();\n private static ScheduleManager scheduleManager = new Sched...
import com.google.api.client.auth.oauth2.Credential; import com.google.api.services.calendar.Calendar; import com.vdurmont.emoji.EmojiManager; import net.dv8tion.jda.api.JDA; import net.dv8tion.jda.api.entities.*; import net.dv8tion.jda.api.events.message.MessageReceivedEvent; import org.bson.Document; import ws.nmathe...
"To enable RSVP for the schedule, use the ``rsvp`` option and provide the argument **on** (see Examples for details)" + "\n\n" + "Custom rsvp options can be configured by using ``rsvp add`` and ``rsvp remove``.\n" + "When adding a new rsvp group two argume...
if(!VerifyUtilities.verifyZone(args[index]))
8
msgpack-rpc/msgpack-rpc-java
src/main/java/org/msgpack/rpc/loop/netty/NettyEventLoop.java
[ "public class Session {\n protected Address address;\n protected EventLoop loop;\n private ClientTransport transport;\n private Reflect reflect;\n\n private int requestTimeout;\n private AtomicInteger seqid = new AtomicInteger(0); // FIXME rand()?\n private Map<Integer, FutureImpl> reqtable = n...
import org.msgpack.rpc.config.TcpClientConfig; import java.util.concurrent.ExecutorService; import java.util.concurrent.ScheduledExecutorService; import org.jboss.netty.channel.socket.ClientSocketChannelFactory; import org.jboss.netty.channel.socket.ServerSocketChannelFactory; import org.jboss.netty.channel.socket.nio....
// // MessagePack-RPC for Java // // Copyright (C) 2010 FURUHASHI Sadayuki // // 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...
protected ServerTransport listenTcpTransport(TcpServerConfig config,
3
wotateam/wota
src/wota/ai/bienemaja/MyHillAI.java
[ "public class Ant extends BaseAnt {\n\t\n\t/** health is decreased by attacking enemies. Ant dies if health reaches 0. */\n\tpublic final double health;\n\t\n\t/** amount of sugar which is carried */\n\tpublic final int sugarCarry;\n\t\n\t/** The name of this ant's AI class, not including the package name.*/\n\tpub...
import java.util.LinkedList; import java.util.List; import wota.gameobjects.Ant; import wota.gameobjects.AntMessage; import wota.gameobjects.Caste; import wota.gameobjects.Hill; import wota.gameobjects.Message; import wota.gameobjects.Sugar; import wota.utility.Modulo; import wota.utility.SeededRandomizer; import wota....
/** * */ package wota.ai.bienemaja; /** * */ public abstract class MyHillAI extends wota.gameobjects.HillAI { /* * your Queen is not able to move but can * communicate and create new ants. * * You can create new ants with createAnt(caste, antAIClass) * e.g. if you want a gatherer and the AI ...
if(Modulo.mod(message.content,100)==11){
6
WebcamStudio/webcamstudio
src/webcamstudio/components/MasterPanel.java
[ "public final class WebcamStudio extends JFrame implements StreamDesktop.Listener {\n\n public static Preferences prefs = null;\n public static Properties animations = new Properties();\n public static Properties facesW = new Properties();\n // FF = 0 ; AV = 1 ; GS = 2\n public static int outFMEbe = ...
import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.event.ActionEvent; import java.awt.image.BufferedImage; import java.awt.image.ColorModel; import java.awt.image.WritableRaster; import java.beans.PropertyVetoException; import java.util.A...
.addComponent(lblHeight))) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panMixerLayout.createSequentialGroup() .addGap(19, 19, 19) .addComponent(tglLockRatio))) .addPreferredGap(javax.swing.LayoutStyl...
listenerCPOP.resetButtonsStates(evt);
1
noctarius/castmapr
src/main/java/com/noctarius/castmapr/core/operation/MultiMapReduceOperation.java
[ "public class CollectorImpl<Key, Value>\n implements Collector<Key, Value>\n{\n\n public final Map<Key, List<Value>> emitted = new HashMap<Key, List<Value>>();\n\n @Override\n public void emit( Key key, Value value )\n {\n List<Value> values = emitted.get( key );\n if ( values == null )...
import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import com.hazelcast.collection.CollectionContainer; import com.hazelcast.collection.CollectionProxyId; import com.hazelcast.collection.CollectionProxyType; import com.hazelcast.collection.Col...
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed u...
public MultiMapReduceOperation( String name, Mapper<KeyIn, ValueIn, KeyOut, ValueOut> mapper,
1
MarcProe/lp2go
app/src/main/java/org/librepilot/lp2go/ui/alertdialog/NumberInputAlertDialog.java
[ "public class VisualLog {\r\n\r\n //private static Activity activity;\r\n private static String nullstring = \"null\";\r\n //private static TextView txtDebugLog;\r\n\r\n static private String checkNull(String msg) {\r\n return msg == null ? nullstring : msg;\r\n }\r\n\r\n static public void...
import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.text.Editable; import android.text.InputFilter; import android.text.InputType; import android.text.TextWatcher; import android.text.method.DigitsKeyListener; import android.view.View; import a...
/* * @file NumberInputAlertDialog.java * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016. * @see The GNU Public License (GPL) Version 3 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as publi...
input.setFilters(new InputFilter[]{new InputFilterMinMax(getContext(), mMin, mMax)});
3
6thsolution/ApexNLP
english-nlp/src/test/java/com/sixthsolution/apex/nlp/english/test/tokenization/EnglishDetectorTest.java
[ "public class EnglishTokenizer extends StandardTokenizer {\n @Override\n protected String normalize(String sentence) {\n return super.normalize(sentence)\n .replaceAll(\"(\\\\d+)(\\\\s+)(\\\\d+)\", \"$1 , $3\")\n .replaceAll(\"(,)\",\" $1 \")\n .replaceAll(\...
import com.sixthsolution.apex.nlp.english.EnglishTokenizer; import com.sixthsolution.apex.nlp.english.EnglishVocabulary; import com.sixthsolution.apex.nlp.ner.regex.ChunkDetector; import com.sixthsolution.apex.nlp.tagger.StandardTagger; import com.sixthsolution.apex.nlp.test.ChunkDetectorAssertion; import org.junit.Bef...
package com.sixthsolution.apex.nlp.english.test.tokenization; /** * @author Saeed Masoumi (s-masoumi@live.com) */ public abstract class EnglishDetectorTest { @Before public void setUp() { ChunkDetectorAssertion.init(new EnglishTokenizer(), new StandardTagger(EnglishVocabulary.build...
protected abstract ChunkDetector provideDetector();
2
gsh199449/spider
src/main/java/com/gs/spider/controller/commons/spider/CommonsSpiderController.java
[ "public class AsyncGatherBaseController extends BaseController {\n private AsyncGatherService asyncGatherService;\n private Logger LOG = LogManager.getLogger(AsyncGatherBaseController.class);\n\n public AsyncGatherBaseController(AsyncGatherService asyncGatherService) {\n this.asyncGatherService = as...
import com.gs.spider.controller.AsyncGatherBaseController; import com.gs.spider.model.commons.Webpage; import com.gs.spider.model.utils.ResultBundle; import com.gs.spider.model.utils.ResultListBundle; import com.gs.spider.service.AsyncGatherService; import com.gs.spider.service.commons.spider.CommonsSpiderService; impo...
package com.gs.spider.controller.commons.spider; /** * CommonsWebpageDownloadController * * @author Gao Shen * @version 16/4/8 */ @Controller @RequestMapping("/commons/spider") public class CommonsSpiderController extends AsyncGatherBaseController { private Logger LOG = LogManager.getLogger(CommonsSpiderCon...
private CommonsSpiderService spiderService;
5
TeamAmeriFrance/Guide-API
src/main/java/amerifrance/guideapi/proxy/ClientProxy.java
[ "public class BookEvent extends Event {\n\n private final Book book;\n private final ItemStack stack;\n private final EntityPlayer player;\n\n protected BookEvent(Book book, ItemStack stack, EntityPlayer player) {\n this.book = book;\n this.stack = stack;\n this.player = player;\n ...
import amerifrance.guideapi.api.BookEvent; import amerifrance.guideapi.api.GuideAPI; import amerifrance.guideapi.api.IGuideItem; import amerifrance.guideapi.api.impl.Book; import amerifrance.guideapi.api.impl.abstraction.CategoryAbstract; import amerifrance.guideapi.api.impl.abstraction.EntryAbstract; import amerifranc...
package amerifrance.guideapi.proxy; public class ClientProxy extends CommonProxy { @Override public void playSound(SoundEvent sound) { Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.getMasterRecord(sound, 1.0F)); } @Override public void openEntry(Book book, Ca...
BookEvent.Open event = new BookEvent.Open(book, stack, player);
0
enguerrand/xdat
src/main/java/org/xdat/chart/ScatterPlot2D.java
[ "public class UserPreferences {\n\n private static final UserPreferences INSTANCE = new UserPreferences();\n\n\tprivate static final Preferences PREFS = Preferences.userNodeForPackage(UserPreferences.class);\n\n\tpublic static final int IMPORT_FROM_HOMEDIR = 0;\n\n\tpublic static final int IMPORT_FROM_LASTDIR = ...
import org.jetbrains.annotations.Nullable; import org.xdat.UserPreferences; import org.xdat.data.AxisType; import org.xdat.data.DataSheet; import org.xdat.data.Design; import org.xdat.data.Parameter; import java.awt.Color; import java.util.HashMap; import java.util.Map;
/* * Copyright 2014, Enguerrand de Rochefort * * This file is part of xdat. * * xdat 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 v...
private Parameter parameterForXAxis;
4
Dynious/Biota
src/main/java/com/dynious/biota/config/PlantConfig.java
[ "@Mod(modid = Reference.MOD_ID, name = Reference.NAME, version = Reference.VERSION, dependencies = Reference.DEPENDENCIES, guiFactory = \"com.dynious.biota.config.GuiFactory\")\npublic class Biota\n{\n @Mod.Instance(Reference.MOD_ID)\n public static Biota instance;\n\n @SidedProxy(clientSide = Reference.CL...
import com.dynious.biota.Biota; import com.dynious.biota.api.BlockAndMeta; import com.dynious.biota.api.DefaultPlantSpreader; import com.dynious.biota.api.IBiotaAPI; import com.dynious.biota.api.IPlantSpreader; import com.dynious.biota.biosystem.spreader.TallGrassSpreader; import com.dynious.biota.lib.Reference; import...
package com.dynious.biota.config; public class PlantConfig {
private static final float[][] NORMAL_NUTRIENTS = { { Settings.NORMAL_PHOSPHORUS }, { Settings.NORMAL_POTASSIUM }, { Settings.NORMAL_NITROGEN } };
7
swarmcom/jSynapse
src/main/java/org/swarmcom/jsynapse/controller/client/api/v1/AuthenticationRestApi.java
[ "public class JsynapseApi {\n\n public static final String CLIENT_V1_API = \"/_matrix/client/api/v1\";\n public static final String CONTENT_V1_API = \"/_matrix/media/v1\";\n\n @ExceptionHandler\n @ResponseStatus(NOT_FOUND)\n public String handleEntityNotFound(EntityNotFoundException ex) {\n re...
import org.springframework.web.bind.annotation.*; import org.swarmcom.jsynapse.controller.JsynapseApi; import org.swarmcom.jsynapse.domain.Authentication.AuthenticationResult; import org.swarmcom.jsynapse.domain.Authentication.AuthenticationSubmission; import org.swarmcom.jsynapse.domain.Authentication.AuthenticationFl...
/* * (C) Copyright 2015 eZuce Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
private final AuthenticationService authenticationService;
4
tang-jie/AvatarMQ
src/com/newlandframework/avatarmq/netty/MessageProcessor.java
[ "public class ProducerAckMessage extends BaseMessage implements Serializable {\n\n private String ack;\n private int status;\n private String msgId;\n\n public String getAck() {\n return ack;\n }\n\n public void setAck(String ack) {\n this.ack = ack;\n }\n\n public int getStatu...
import com.newlandframework.avatarmq.msg.ProducerAckMessage; import com.newlandframework.avatarmq.core.CallBackInvoker; import com.newlandframework.avatarmq.core.CallBackListener; import com.newlandframework.avatarmq.core.NotifyCallback; import com.newlandframework.avatarmq.model.RequestMessage; import com.newlandframe...
/** * Copyright (C) 2016 Newland Group Holding Limited * * 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 appli...
Map<String, CallBackInvoker<Object>> callBackMap = factory.getCallBackMap();
1
Fedict/commons-eid
commons-eid-tests/src/test/java/be/bosa/commons/eid/client/tests/integration/BeIDTest.java
[ "public class BeIDCard implements AutoCloseable {\n\n\tprivate static final String UI_MISSING_LOG_MESSAGE = \"No BeIDCardUI set and can't load DefaultBeIDCardUI\";\n\tprivate static final String UI_DEFAULT_REQUIRES_HEAD = \"No BeIDCardUI set and DefaultBeIDCardUI requires a graphical environment\";\n\tprivate stati...
import be.bosa.commons.eid.client.BeIDCard; import be.bosa.commons.eid.client.BeIDCards; import be.bosa.commons.eid.client.CancelledException; import be.bosa.commons.eid.client.FileType; import be.bosa.commons.eid.client.event.BeIDCardListener; import static org.junit.Assert.assertNotNull;
/* * Commons eID Project. * Copyright (C) 2014 - 2018 BOSA. * * This is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License version 3.0 as published by * the Free Software Foundation. * * This software is distributed in the hope that it will be usef...
BeIDCards beIDCards = new BeIDCards(new TestLogger());
1
annefried/sitent
de.uni-saarland.coli.sitent/src/main/java/sitent/syntSemFeatures/io/FeatureExtractionPipeline.java
[ "public class SyntSemFeaturesCSVWriter extends JCasAnnotator_ImplBase {\n\n\tpublic static final String PARAM_OUTPUT_FOLDER = \"outputFolder\";\n\t@ConfigurationParameter(name = PARAM_OUTPUT_FOLDER, mandatory = true, defaultValue = \"null\", description = \"Output folder for CSV with extracted features (in standoff...
import static org.apache.uima.fit.factory.CollectionReaderFactory.createReader; import static org.apache.uima.fit.pipeline.SimplePipeline.runPipeline; import java.io.File; import java.io.IOException; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cl...
package sitent.syntSemFeatures.io; /** * This class contains a configuration of a UIMA pipeline that extracts the * syntactic-semantic features as described in the ACL 2015 paper. * Running this will take a while as parsing is included. */ public class FeatureExtractionPipeline { private static String wordN...
parseWriter = AnalysisEngineFactory.createEngineDescription(ParseWriterAnnotator.class,
5
pemessier/SoulEVSpy
app/src/androidTest/java/org/hexpresso/elm327/CommandTest.java
[ "public abstract class AbstractCommand implements Command {\r\n\r\n protected String mCommand = null; // ELM327 command\r\n protected long mResponseTimeDelay = 200; // Time delay before receiving the response, in milliseconds\r\n protected Response mResponse = new...
import android.test.AndroidTestCase; import junit.framework.Assert; import org.hexpresso.elm327.commands.AbstractCommand; import org.hexpresso.elm327.commands.Response; import org.hexpresso.elm327.commands.ResponseFilter; import org.hexpresso.elm327.commands.general.VehicleIdentifierNumberCommand; import org.hexp...
package org.hexpresso.elm327; /** * Created by Pierre-Etienne Messier <pierre.etienne.messier@gmail.com> on 2015-10-24. */ public class CommandTest extends AndroidTestCase { ByteArrayInputStream input = null; ByteArrayOutputStream output = null; final String msg2101 = "7EC 10 3D 61 01...
VehicleIdentifierNumberCommand cmd = (VehicleIdentifierNumberCommand) new VehicleIdentifierNumberCommand().withAutoProcessResponse(true);
3
PistoiaHELM/HELMNotationToolkit
test/org/helm/notation/tools/NucleotideTest.java
[ "public class MonomerException extends Exception {\n\n\t/**\n\t * Creates a new instance of <code>MonomerException</code> without detail\n\t * message.\n\t */\n\tpublic MonomerException() {\n\t}\n\n\t/**\n\t * Constructs an instance of <code>MonomerException</code> with the\n\t * specified detail message.\n\t * \n\...
import static org.junit.Assert.*; import java.io.IOException; import org.helm.notation.MonomerException; import org.helm.notation.MonomerFactory; import org.helm.notation.NotationException; import org.helm.notation.StructureException; import org.helm.notation.model.Monomer; import org.helm.notation.model.Nucleotide; im...
package org.helm.notation.tools; public class NucleotideTest { @Test public void testGetNotation() throws NotationException, IOException, JDOMException, StructureException, MonomerException { String notation = NucleotideSequenceParser.getNotation("AUG"); assertEquals("R(A)P.R(U)P.R(G)P", notation); Str...
Monomer baseMonomer = MonomerFactory.getInstance().getMonomerDB()
4
ikromin/jphotoframe
src/main/java/net/igorkromin/jphotoframe/ui/PhotoUpdateThread.java
[ "public class ConfigOptions {\n\n public static final String DEFAULT_DEVICE_NUM = \"0\";\n public static final String DEFAULT_IMG_TIME = \"30000\";\n public static final String DEFAULT_WEATHER_UPDATE_TIME = \"600000\";\n public static final String DEFAULT_FORMAT_TIME = \"H:mm\";\n public static final...
import net.igorkromin.jphotoframe.ConfigOptions; import net.igorkromin.jphotoframe.ImageDirectory; import net.igorkromin.jphotoframe.img.BackgroundFiller; import net.igorkromin.jphotoframe.img.Factory; import net.igorkromin.jphotoframe.img.ImageScaler; import net.igorkromin.jphotoframe.img.ImageUtil; import net.igorkro...
/** * JPhotoFrame - a simple Java application for displaying a collection of photos in a full-screen slideshow. * Copyright (C) 2015 Igor Kromin * * 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 Foun...
private ImageScaler scaler;
4