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
iLexiconn/Magister.java
src/main/java/net/ilexiconn/magister/container/SingleMessage.java
[ "public class Magister {\n public static final String VERSION = \"0.1.2\";\n\n public static final int SESSION_TIMEOUT = 1200000;\n\n public Gson gson = new GsonBuilder()\n .registerTypeAdapter(Profile.class, new ProfileAdapter())\n .registerTypeAdapter(Study[].class, new StudyAdapter...
import net.ilexiconn.magister.util.GsonUtil; import net.ilexiconn.magister.util.HttpUtil; import java.io.*; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; import java.security.InvalidParameterException; import java.text.ParseException; import java.util.ArrayList; import java....
/* * Copyright (c) 2015 iLexiconn * * 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, p...
public SingleMessage(Magister m, String topic, String content, Contact[] recipients, File attachment) throws ParseException, IOException {
0
cert-se/megatron-java
src/se/sitic/megatron/decorator/CountryCodeDecorator.java
[ "public class JobContext {\n private TypedProperties props;\n private Job job;\n private DbManager dbManager;\n \n /** Time job was started (in ms). */\n private long startedTimestamp;\n\n /** Total number of lines in file. */\n private long noOfLines = -1L;\n\n /** Line number in file th...
import java.util.Iterator; import java.util.List; import org.apache.log4j.Logger; import se.sitic.megatron.core.JobContext; import se.sitic.megatron.core.MegatronException; import se.sitic.megatron.core.TypedProperties; import se.sitic.megatron.entity.LogEntry; import se.sitic.megatron.geoip.GeoIpCountryManager; import...
package se.sitic.megatron.decorator; /** * Adds country code if missing and ip-address exists. */ public class CountryCodeDecorator implements IDecorator { private static final Logger log = Logger.getLogger(CountryCodeDecorator.class); private GeoIpCountryManager geoIpManager; private long noOfL...
List<Long> ipAddresses = AppUtil.getIpAddressesToDecorate(logEntry);
4
julianmaster/ChiptuneTracker
core/src/com/chiptunetracker/view/SampleView.java
[ "public class Chanels {\n\tpublic final static int CHANELS = 4;\n\tprivate Chanel[] chanels;\n\tprivate Synthesizer synth;\n\tprivate LineOut lineOut;\n\t\n\tprivate boolean playSample = false;\n\t\n\tprivate boolean playPattern = false;\n\tprivate boolean start = false;\n\tprivate int currentPattern;\n\t\n\tpublic...
import java.util.ArrayList; import java.util.List; import com.asciiterminal.ui.AsciiSelectableTerminalButton; import com.asciiterminal.ui.AsciiTerminal; import com.asciiterminal.ui.AsciiTerminalButton; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Input; import com.badlogic.gdx.graphics.Color; import com.badlogi...
if(volumeCursor != 0) { Sound sound = sample.sounds[soundCursor]; if(sound == null) { sound = new Sound(); sample.sounds[soundCursor] = sound; } sound.note = note; sound.octave = octaveCursor; sound.instrument = instrumentCursor; sound.volume = volumeCursor; sound.effect = effectCu...
Data data = chiptuneTracker.getData();
2
celiosilva/leitoor
leitoor/src/main/java/br/com/delogic/leitoor/controller/professor/AcompanhamentoController.java
[ "public enum Avaliacao {\n\n INCORRETO(\"Incorreto\"), CORRETO(\"Correto\");\n\n private final String descricao;\n\n private Avaliacao(String desc) {\n this.descricao = desc;\n }\n\n public String getDescricao() {\n return descricao;\n }\n\n}", "public class AvaliacaoQuestionarioMo...
import java.util.Collections; import java.util.List; import javax.inject.Inject; import javax.inject.Named; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind....
package br.com.delogic.leitoor.controller.professor; @Controller @RequestMapping("/professor/acompanhamento") public class AcompanhamentoController { @Inject @Named("resumoAcompanhamento") private SqlQuery<ResumoAcompanhamento> resumoAcompanhamento; @Inject @Named("resumoTarefas") private...
DetalharLeituraAlunoModel detalhes = atividadeService.getInformacoesDetalheLeitura(idTarefaEnviada);
2
mpusher/mpush-client-java
src/main/java/com/mpush/client/AckRequestMgr.java
[ "public interface Logger {\n\n void enable(boolean enabled);\n\n void d(String s, Object... args);\n\n void i(String s, Object... args);\n\n void w(String s, Object... args);\n\n void e(Throwable e, String s, Object... args);\n}", "public interface AckCallback {\n void onSuccess(Packet response)...
import com.mpush.api.Logger; import com.mpush.api.ack.AckCallback; import com.mpush.api.ack.AckContext; import com.mpush.api.ack.AckModel; import com.mpush.api.ack.RetryCondition; import com.mpush.api.connection.Connection; import com.mpush.api.protocol.Packet; import com.mpush.util.thread.ExecutorManager; import java....
/* * (C) Copyright 2015-2016 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...
private Packet request;
6
evant/redux
sample-android/src/main/java/com/example/sample_android/store/MainStore.java
[ "public class Datastore {\n\n // poor-man's persistence\n private SharedPreferences prefs;\n\n public Datastore(Context context) {\n prefs = context.getSharedPreferences(\"datastore\", Context.MODE_PRIVATE);\n }\n\n public void store(List<TodoItem> items) {\n StringBuilder data = new St...
import android.content.Context; import com.example.sample_android.Datastore; import com.example.sample_android.action.Action; import com.example.sample_android.middleware.PersistenceMiddleware; import com.example.sample_android.reducer.TodoListReducers; import com.example.sample_android.state.TodoList; import me.tatark...
package com.example.sample_android.store; /** * To keep everything together, you can subclass {@link SimpleStore} and add your own {@code dispatch()} methods to it. */ public class MainStore extends SimpleStore<TodoList> { private final Dispatcher<Action, Action> dispatcher; private final Dispatcher<Thun...
.chain(new LogMiddleware<Action, Action>("ACTION"),
5
ZhuoKeTeam/MasterHelper
app/src/main/java/com/team/zhuoke/masterhelper/view/test/activity/TestSharePreferencesActivity.java
[ "public class SharePreferencesHelper {\n private static final String TAG = \"SharePreferencesHelper\";\n /**\n * TagName区域\n */\n public static final String USER_INFO = \"user_info\"; // 用户信息\n public static final String DEVICE_INFO = \"phone_info\"; ...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.CheckBox; import android.widget.EditText; import android.widget.TextView; import com.team.zhuoke.masterhelper.R; import com...
package com.team.zhuoke.masterhelper.view.test.activity; /** * Created by admin on 2017/1/11. */ public class TestSharePreferencesActivity extends AppCompatActivity{ // @InjectView(R.id.et_login_username) EditText mLoginUsername; // 获取用户账号的如数狂 // @InjectView(R.id.et_login_passw...
SharePreferencesHelper.putString(DEVICE_ID,
1
kciray8/IronBrain
IBServer/src/main/java/org/ironbrain/dao/FieldDao.java
[ "public class Result<T> {\n public State getRes() {\n return res;\n }\n\n public void setRes(State res) {\n this.res = res;\n }\n\n public String getMessage() {\n return message;\n }\n\n public void setMessage(String message) {\n this.message = message;\n }\n\n ...
import org.hibernate.criterion.Restrictions; import org.ironbrain.Result; import org.ironbrain.core.DirectionToField; import org.ironbrain.core.Field; import org.ironbrain.core.Section; import org.ironbrain.core.SectionToField; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.st...
package org.ironbrain.dao; @Repository @SuppressWarnings("unchecked") public class FieldDao extends BaseDao { @Autowired private SectionDao sectionDao; public Result<Integer> addField(String name) { Field field = new Field(); field.setLabel(name); field.setOwner(data.getUserId())...
public SectionToField addFieldToSection(Integer fieldId, Integer sectionId) {
4
googleapis/java-analytics-data
samples/snippets/src/main/java/com/example/analytics/QuickstartJsonCredentialsSample.java
[ "@BetaApi\n@Generated(\"by gapic-generator-java\")\npublic class BetaAnalyticsDataClient implements BackgroundResource {\n private final BetaAnalyticsDataSettings settings;\n private final BetaAnalyticsDataStub stub;\n\n /** Constructs an instance of BetaAnalyticsDataClient with default settings. */\n public st...
import com.google.analytics.data.v1beta.BetaAnalyticsDataClient; import com.google.analytics.data.v1beta.BetaAnalyticsDataSettings; import com.google.analytics.data.v1beta.DateRange; import com.google.analytics.data.v1beta.Dimension; import com.google.analytics.data.v1beta.Metric; import com.google.analytics.data.v1bet...
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
try (BetaAnalyticsDataClient analyticsData =
0
EKT/Biblio-Transformation-Engine
bte-io/src/main/java/gr/ekt/bteio/loaders/CSVDataLoader.java
[ "public interface DataLoadingSpec {\n /**\n * Returns the number of records that should be read.\n *\n * Since the number of records cannot be an integer less than\n * zero, negative values can be used to signal that the user needs\n * all the records form a source.\n *\n * @return Th...
import gr.ekt.bte.core.DataLoadingSpec; import gr.ekt.bte.core.RecordSet; import gr.ekt.bte.core.StringValue; import gr.ekt.bte.dataloader.FileDataLoader; import gr.ekt.bte.exceptions.EmptySourceException; import gr.ekt.bte.exceptions.MalformedSourceException; import gr.ekt.bte.record.MapRecord; import java.io.FileNotF...
/** * Copyright (c) 2007-2013, National Documentation Centre (EKT, www.ekt.gr) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * Redistributions of source code must retain the abov...
public RecordSet getRecords() throws MalformedSourceException, EmptySourceException {
5
vizziv/Nutrons2012
src/edu/neu/nutrons/reboundrumble/AutoModeSelector.java
[ "public class PulseTriggerBoolean {\n\n private boolean state = false;\n private boolean oldIn = false;\n\n public void feed(boolean in) {\n if(oldIn == false && in == true) {\n state = true;\n }\n else {\n state = false;\n }\n oldIn = in;\n }\n\n...
import edu.neu.nutrons.lib.PulseTriggerBoolean; import edu.neu.nutrons.lib.Utils; import edu.neu.nutrons.reboundrumble.commands.auto.ShootFromFenderAutoMode; import edu.neu.nutrons.reboundrumble.commands.auto.ShootFromKeyAutoMode; import edu.neu.nutrons.reboundrumble.commands.auto.ShootFromKeyHackyAutoMode; import edu....
package edu.neu.nutrons.reboundrumble; /** * Used to select an autonomous mode. * * @author Ziv */ public class AutoModeSelector { // Constants. private final int KEY = 0; private final int KEY_ALT = 1; private final int BRIDGE = 9001; private final int FENDER = 9002; private final int NU...
autoMode = new DTManualCheesyCmd();
6
teivah/TIBreview
src/test/java/com/tibco/exchange/tibreview/processor/resourcerule/ConfigurationProcessorTest.java
[ "public final class Constants {\n\tpublic static final String[] PROCESSES_NAMESPACES = { \"bpws\",\n\t\t\t\"http://docs.oasis-open.org/wsbpel/2.0/process/executable\", \"tibex\",\n\t\t\t\"http://www.tibco.com/bpel/2007/extensions\", \"bwext\", \"http://tns.tibco.com/bw/model/core/bwext\", \"xsl\",\n\t\t\t\"http://w...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.List; import javax.xml.namespace.NamespaceContext; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathExpression; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; ...
package com.tibco.exchange.tibreview.processor.resourcerule; public class ConfigurationProcessorTest { private static final Logger LOGGER = Logger.getLogger(ConfigurationProcessorTest.class); @Test public void testProcess() {
TIBResource fileresource;
2
eriq-augustine/jocr
src/com/eriqaugustine/ocr/drivers/ClassifierTest.java
[ "public interface OCRClassifier {\n public String classify(WrapImage image);\n}", "public class CharacterImage {\n private static final int DEFAULT_POINT_SIZE = 2;\n\n private static final double DEFAULT_POINT_DENSITY = 0.75;\n\n private static final double DEFAULT_OVERLAP_PERCENT = 0.50;\n\n private st...
import com.eriqaugustine.ocr.classifier.OCRClassifier; import com.eriqaugustine.ocr.image.CharacterImage; import com.eriqaugustine.ocr.image.TextImage; import com.eriqaugustine.ocr.image.WrapImage; import com.eriqaugustine.ocr.utils.FontUtils; import com.eriqaugustine.ocr.utils.ImageUtils; import com.eriqaugustine.ocr....
package com.eriqaugustine.ocr.drivers; /** * The base to for a quick classifier spot check. * This will handle most of the setup, it just needs a constructed classifier. */ public abstract class ClassifierTest { // Suggested training set. protected final String trainingCharacters; protected Classifier...
WrapImage[][] gridTextImages = TextImage.gridBreakup(baseImage);
2
quhfus/DoSeR-Disambiguation
doser-dis-disambiguationserver/src/main/java/doser/server/actions/disambiguation/DisambiguationService.java
[ "public final class DisambiguationMainService {\n\n\tpublic final static int MAXCLAUSECOUNT = 4096;\n\n\tprivate static final int TIMERPERIOD = 10000;\n\n\tprivate static DisambiguationMainService instance = null;\n\n//\tprivate Model hdtdbpediaCats;\n//\tprivate Model hdtdbpediaCats_ger;\n//\tprivate Model hdtdbpe...
import java.util.LinkedList; import java.util.List; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bi...
package doser.server.actions.disambiguation; @Controller @RequestMapping("/disambiguation") public class DisambiguationService { public DisambiguationService() { super(); } /** * Testing * * @param request * @return */ @RequestMapping(value = "/disambiguateWithoutCategories-single", method = Requ...
final List<EntityDisambiguationDPO> listToDis = request.getSurfaceFormsToDisambiguate();
6
OpenModLoader/OpenModLoader
src/main/java/com/openmodloader/loader/ModContext.java
[ "public class EventMap {\n private final ImmutableMap<Class<?>, Collection<Listener<?>>> events;\n\n private EventMap(ImmutableMap<Class<?>, Collection<Listener<?>>> events) {\n this.events = events;\n }\n\n @SuppressWarnings(\"unchecked\")\n public <E extends IEvent> Stream<IEventListener<E>>...
import com.openmodloader.api.event.EventMap; import com.openmodloader.api.event.IEventDispatcher; import com.openmodloader.api.mod.Mod; import com.openmodloader.api.mod.config.IEventConfig; import com.openmodloader.api.mod.config.IModConfig; import com.openmodloader.api.mod.config.IRegistrationConfig; import com.openmo...
package com.openmodloader.loader; public class ModContext implements Iterable<Mod> { private final Collection<Mod> mods; private final Collection<IEventConfig> eventConfigs = new ArrayList<>(); private final Collection<IRegistrationConfig> registrationConfigs = new ArrayList<>(); public ModContext(...
EventMap.Builder eventBuilder = EventMap.builder();
0
jenshadlich/s3srv
src/main/java/de/jeha/s3srv/operations/objects/ExistsObject.java
[ "public class RFC822Date {\n\n private static final DateTimeZone GMT = new FixedDateTimeZone(\"GMT\", \"GMT\", 0, 0);\n\n private static final DateTimeFormatter DATE_FORMAT = DateTimeFormat.forPattern(\"EEE, dd MMM yyyy HH:mm:ss 'GMT'\")\n .withLocale(Locale.US)\n .withZone(GMT);\n\n ...
import de.jeha.s3srv.common.RFC822Date; import de.jeha.s3srv.common.errors.ErrorCodes; import de.jeha.s3srv.common.http.Headers; import de.jeha.s3srv.common.security.AuthorizationContext; import de.jeha.s3srv.model.S3Object; import de.jeha.s3srv.operations.AbstractOperation; import de.jeha.s3srv.storage.StorageBackend;...
package de.jeha.s3srv.operations.objects; /** * @author jenshadlich@googlemail.com */ public class ExistsObject extends AbstractOperation { private static final Logger LOG = LoggerFactory.getLogger(ExistsObject.class); public ExistsObject(StorageBackend storageBackend) { super(storageBackend); ...
return createErrorResponse(ErrorCodes.INVALID_ACCESS_KEY_ID, resource, null);
1
kpavlov/fixio
core/src/main/java/fixio/netty/pipeline/client/ClientSessionHandler.java
[ "public interface FixMessage {\n\n String FIX_4_0 = \"FIX.4.0\";\n String FIX_4_1 = \"FIX.4.1\";\n String FIX_4_2 = \"FIX.4.2\";\n String FIX_4_3 = \"FIX.4.3\";\n String FIX_4_4 = \"FIX.4.4\";\n String FIX_5_0 = \"FIXT.1.1\";\n\n FixMessageHeader getHeader();\n\n List<FixMessageFragment> get...
import org.slf4j.LoggerFactory; import java.net.PasswordAuthentication; import java.util.List; import fixio.events.LogonEvent; import fixio.fixprotocol.FieldType; import fixio.fixprotocol.FixMessage; import fixio.fixprotocol.FixMessageBuilder; import fixio.fixprotocol.FixMessageBuilderImpl; import fixio.fixprotocol.Fix...
/* * Copyright 2014 The FIX.io Project * * The FIX.io Project licenses this file to you 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 * * Unles...
final FixMessageHeader header = msg.getHeader();
3
jclawson/hazeltask
hazeltask-core/src/main/java/com/hazeltask/executor/DistributedExecutorServiceImpl.java
[ "public class HazeltaskServiceListener<T extends ServiceListenable<T>> {\n public void onBeginStart(T svc){};\n public void onEndStart(T svc){};\n public void onBeginShutdown(T svc){};\n public void onEndShutdown(T svc){};\n}", "public class HazeltaskTopology<GROUP extends Serializable> {\n private...
import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.UUID; import java.util.concurrent.Callable; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.ExecutionException; import java.util.concu...
package com.hazeltask.executor; /** * @author jclawson * */ @Slf4j public class DistributedExecutorServiceImpl<GROUP extends Serializable> implements DistributedExecutorService<GROUP> { private ExecutorConfig<GROUP> executorConfig; private final HazeltaskTopology<GROUP> topology;
private final ListRouter<Member> memberRouter;
3
youth5201314/XFrame
app/src/main/java/com/youth/xf/App.java
[ "public class AsyncHttpEngine implements IHttpEngine {\n private AsyncHttpClient client;\n\n public AsyncHttpEngine() {\n client = new AsyncHttpClient();\n }\n\n @Override\n public void get(String url, Map<String, Object> params, final HttpCallBack callBack) {\n RequestParams requestPar...
import com.youth.xf.http.AsyncHttpEngine; import com.youth.xf.http.OKHttpEngine; import com.youth.xf.loder.GlideImageLoader; import com.youth.xframe.base.XApplication; import com.youth.xframe.XFrame; import cat.ereza.customactivityoncrash.CustomActivityOnCrash;
package com.youth.xf; public class App extends XApplication { @Override public void onCreate() { super.onCreate(); CustomActivityOnCrash.install(this); //初始化日志 XFrame.initXLog(); //初始化多状态界面View XFrame.initXLoadingView() .setErrorViewResId(R.lay...
XFrame.initXHttp(new AsyncHttpEngine());
0
castle/castle-java
src/test/java/io/castle/client/AbstractCastleHttpLayerTest.java
[ "public class OkHttpFactory implements RestApiFactory {\n\n private final OkHttpClient client;\n private final CastleGsonModel modelInstance;\n private final CastleConfiguration configuration;\n\n public OkHttpFactory(CastleConfiguration configuration, CastleGsonModel modelInstance) {\n this.conf...
import io.castle.client.internal.backend.OkHttpFactory; import io.castle.client.internal.config.CastleConfiguration; import io.castle.client.internal.config.CastleConfigurationBuilder; import io.castle.client.internal.config.CastleSdkInternalConfiguration; import io.castle.client.model.AuthenticateFailoverStrategy; imp...
package io.castle.client; public abstract class AbstractCastleHttpLayerTest { private final AuthenticateFailoverStrategy testAuthenticateFailoverStrategy; Castle sdk; MockWebServer server; HttpUrl testServerBaseUrl; protected AbstractCastleHttpLayerTest(AuthenticateFailoverStrategy testAuthent...
CastleConfiguration mockedApiConfiguration = CastleConfigurationBuilder.aConfigBuilder()
2
KodeMunkie/imagetozxspec
src/main/java/uk/co/silentsoftware/ui/PopupPreviewFrame.java
[ "public class LanguageSupport {\n\n\tprivate static Logger log = LoggerFactory.getLogger(LanguageSupport.class);\n\t\n\t/**\n\t * The base file name for the internalisation\n\t */\n\tprivate final static String MESSAGES_FILE = \"Messages\";\n\t\n\t/**\n\t * The captions from the loaded file. Ordinarily the properti...
import uk.co.silentsoftware.config.LanguageSupport; import uk.co.silentsoftware.config.OptionsObject; import uk.co.silentsoftware.config.ScalingObject; import uk.co.silentsoftware.ui.ImageToZxSpec.UiCallback; import uk.co.silentsoftware.ui.listener.CustomDropTargetListener; import javax.swing.*; import java.awt.*; impo...
/* Image to ZX Spec * Copyright (C) 2020 Silent Software (Benjamin Brown) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License * as published by the Free Software Foundation, either version 3 * of the License, or (at your option) an...
setTitle(getCaption("preview_title"));
5
berlinguyinca/spectra-hash
core/src/test/java/edu/ucdavis/fiehnlab/spectra/hash/core/impl/SplashVersion1Test.java
[ "public interface Spectrum {\n\n /**\n * ion of a spectra\n * @return\n */\n public List<Ion> getIons();\n\n /**\n * convmerts the spectrum to a relative spectra\n * @return\n * @param scale\n */\n Spectrum toRelative(int scale);\n\n /**\n *\n * @return\n */\n ...
import edu.ucdavis.fiehnlab.spectra.hash.core.Spectrum; import edu.ucdavis.fiehnlab.spectra.hash.core.Splash; import edu.ucdavis.fiehnlab.spectra.hash.core.listener.SplashListener; import edu.ucdavis.fiehnlab.spectra.hash.core.listener.SplashingEvent; import edu.ucdavis.fiehnlab.spectra.hash.core.types.Ion; import edu....
package edu.ucdavis.fiehnlab.spectra.hash.core.impl; /** * Tests all asspects of the Splash Version 2 and ensures that the generated keys, meets the exspectations. It also ensures * that there are no duplicated found in a limited data set, from different sources. * <p/> * DataSets for Sources are based on: * <...
Splash splash = getHashImpl();
1
tommai78101/PokemonWalking
game/src/main/java/main/SaveDataManager.java
[ "public abstract class SubMenu implements MenuDisplayable {\n\tprotected String name;\n\tprotected String description;\n\tprotected MenuEvent menuEvent;\n\tprotected GameState stateType;\n\tprotected boolean isExitingMenu;\n\tprotected boolean exitsToGame;\n\tprotected boolean needsFlashingAnimation;\n\n\tpublic Su...
import java.awt.Graphics; import java.io.File; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import abstracts.SubMenu; import data.GameSave; import dialogue.Dialogue; import entity.Player; import level.WorldConstants; import main.StateManager.G...
package main; public class SaveDataManager extends SubMenu { public static final String SAVE_FILE_NAME = "data.sav"; public static final String MODDED_SAVE_FILE_NAME = "mod" + File.separator + "data.sav"; public enum SaveStatus { ASK, OVERWRITE, SAVING, SAVED, SAVE_COMPLETE, ERROR } private SaveSt...
super(WorldConstants.MENU_ITEM_NAME_SAVE, WorldConstants.MENU_ITEM_DESC_SAVE, GameState.SAVE);
4
krishnaraj/oneclipboard
oneclipboardandroid/src/main/java/com/cb/oneclipboard/ClipboardApplication.java
[ "public class KeyStoreBuilder {\n private InputStream publicKeyStoreInputStream;\n private InputStream privateKeyStoreInputStream;\n private String publicKeyStorePass;\n private String privateKeyStorePass;\n\n public KeyStoreBuilder publicKeyStoreInputStream(InputStream publicKeyStoreInputStream) {\n...
import android.app.Application; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.ClipboardManager; import android.content.Context; import android.content.Intent; import android.support.v4.app.NotificationCompat; import android.support.v4.content.LocalBroadcastManager; imp...
package com.cb.oneclipboard; public class ClipboardApplication extends Application { public static final int NOTIFICATION_ID = 1; public static final String CLIPBOARD_UPDATED = "clipboard_updated"; private static final String TAG = ClipboardApplication.class.getName(); private static final String[] P...
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, IntentUtil.getHomePageIntent(context), PendingIntent.FLAG_CANCEL_CURRENT);
3
genious7/FanFictionReader
fanfictionReader/src/main/java/com/spicymango/fanfictionreader/menu/categorymenu/CategoryMenuActivity.java
[ "public class Settings extends AppCompatActivity {\n\n\tpublic final static int SANS_SERIF = 0;\n\tpublic final static int SERIF = 1;\n\n\t/**\n\t * An enum for the old text size format, before it was customizable. Retained only for\n\t * compatibility\n\t */\n\tprivate enum TextSize{\n\t\tSMALL(14,\"S\"),\n\t\tMED...
import java.util.List; import java.util.Objects; import org.apache.commons.lang3.text.WordUtils; import com.spicymango.fanfictionreader.R; import com.spicymango.fanfictionreader.Settings; import com.spicymango.fanfictionreader.menu.BaseFragment; import com.spicymango.fanfictionreader.menu.categorymenu.CategoryMenuLoade...
package com.spicymango.fanfictionreader.menu.categorymenu; public class CategoryMenuActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { Settings.setOrientationAndThemeNoActionBar(this); super.onCreate(savedInstanceState); setContentView(R.layout.activity_fr...
public final static class CategoryMenuFragment extends BaseFragment<CategoryMenuItem> {
1
ceylon/ceylon-model
src/com/redhat/ceylon/model/loader/model/LazyModule.java
[ "public interface ArtifactResult {\n /**\n * Get name.\n *\n * @return the artifact name.\n */\n String name();\n\n /**\n * Get version.\n *\n * @return the version.\n */\n String version();\n\n /**\n * Get import type.\n *\n * @return the import type\n ...
import java.io.File; import java.io.IOException; import java.util.Enumeration; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import com.redhat.ceylon.model.cmr.ArtifactResult; import com.redhat.ceylon.model.cmr.JDKUtils; import com.re...
package com.redhat.ceylon.model.loader.model; /** * Represents a lazy Module declaration. * * @author Stéphane Épardaud <stef@epardaud.fr> */ public abstract class LazyModule extends Module { private boolean isJava = false; protected Set<String> jarPackages = new HashSet<String>(); public LazyModul...
if (artifact instanceof ContentAwareArtifactResult) {
3
RefineriaWeb/base_app_android
presentation/src/main/java/presentation/sections/dashboard/DashBoardActivity.java
[ "public class DashboardPresenter extends Presenter<DashboardView> {\n private final GetMenuItemsUseCase useCase;\n\n @Inject public DashboardPresenter(Wireframe wireframe, SubscribeOn subscribeOn, ObserveOn observeOn, ParserException parserException, UI ui, GetMenuItemsUseCase useCase) {\n super(wirefr...
import android.content.Context; import android.content.res.Configuration; import android.os.Bundle; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarDrawerToggle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view...
/* * Copyright 2015 RefineriaWeb * * 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...
replaceFragmentIfItIsNotCurrentDisplayed(UserFragment.class);
4
tzaeschke/TinSpin
src/main/java/ch/ethz/globis/tinspin/TestManager.java
[ "public enum IDX implements IndexHandle {\n\t//Our implementations\n\t//===================\n\t/** Naive array implementation, for verification only */\n\tARRAY(PointArray.class.getName(), RectangleArray.class.getName()),\n\t/** PH-Tree */\n\tPHC(PointPHC.class.getName(), RectanglePHC.class.getName()),\n\t/** PH-Tr...
import java.util.List; import ch.ethz.globis.tinspin.TestInstances.IDX; import ch.ethz.globis.tinspin.TestInstances.TST; import ch.ethz.globis.tinspin.data.TestPoint; import ch.ethz.globis.tinspin.util.Logging; import ch.ethz.globis.tinspin.util.rmi.TestManagerRMI; import ch.ethz.globis.tinspin.wrappers.Candidate...
/* * Copyright 2011-2016 ETH Zurich. All Rights Reserved. * * This software is the proprietary information of ETH Zurich. * Use is subject to license terms. */ package ch.ethz.globis.tinspin; public class TestManager { private static Logging log = new Logging(); public static void main(String...
Class<? extends TestPoint> testClass,
2
Simperium/simperium-android
Simperium/src/androidTestSupport/java/com/simperium/WebSocketManagerTest.java
[ "public class WebSocketManager implements ChannelProvider, Channel.OnMessageListener {\n\n public enum ConnectionStatus {\n DISCONNECTING, DISCONNECTED, CONNECTING, CONNECTED\n }\n\n public interface Connection {\n public void close();\n public void send(String message);\n }\n\n ...
import com.simperium.android.WebSocketManager; import com.simperium.client.Bucket; import com.simperium.client.ChannelProvider; import com.simperium.models.Note; import com.simperium.test.MockBucket; import com.simperium.test.MockConnection; import com.simperium.test.MockChannelSerializer; import com.simperium.test.Moc...
package com.simperium; public class WebSocketManagerTest extends TestCase { static public final String APP_ID = "mock-app-id"; static public final String SESSION_ID = "mock-session-id";
WebSocketManager mSocketManager;
0
850759383/ZhihuDailyNews
app/src/main/java/com/yininghuang/zhihudailynews/SplashActivity.java
[ "public class MainActivity extends BaseActivity implements NavAdapter.OnNavItemClickListener {\n\n private static final int LIGHT_THEME = R.style.AppTheme_NoActionBar_TranslucentStatusBar;\n private static final int DARK_THEME = R.style.AppThemeDark_NoActionBar_TranslucentStatusBar;\n\n private Toolbar too...
import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.load.resource.drawable.GlideDrawable; import com.bumptech.glide.request.RequestListener; import com.bumptech.glide.request....
package com.yininghuang.zhihudailynews; /** * Created by Yining Huang on 2016/10/17. */ public class SplashActivity extends AppCompatActivity { ImageView mStartupImage; TextView mImageDescribe; private SubscriptionList subscriptions = new SubscriptionList(); @Override public void onCreate...
ImageLoader.load(SplashActivity.this, mStartupImage, url, new RequestListener<String, GlideDrawable>() {
6
thevash/vash
src/test/TestTreeBuilder.java
[ "public class TestOperationIntegration {\n\tprivate Options opt;\n\tprivate ImageParameters ip;\n\t\n\t@Before\n\tpublic void setUp() throws Exception {\n\t\tthis.opt = new Options();\n\t\tthis.opt.setWidth(128);\n\t\tthis.opt.setHeight(128);\n\t\tthis.ip = new ImageParameters(this.opt.getWidth(), this.opt.getHeigh...
import test.operation.TestOperationIntegration; import vash.ImageParameters; import vash.Output; import vash.OutputParameters; import vash.Tree; import vash.TreeParameters; import static org.junit.Assert.fail; import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; import java.io.InputStre...
/* * Copyright 2011, Zettabyte Storage LLC * * This file is part of Vash. * * Vash is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any la...
Output out = new Output(op, tree);
2
paveyry/LyreLand
src/training/GenreLearner.java
[ "public class ScoreAnalyser {\n private transient String fileName_;\n private transient Score score_;\n\n // Data of the score.\n private transient String title_;\n private Tonality tonality_;\n private double barUnit_;\n private int beatsPerBar_;\n private int tempo_;\n private int partN...
import analysis.ScoreAnalyser; import analysis.harmonic.ChordDegree; import analysis.harmonic.Tonality; import training.probability.MarkovMatrix; import training.probability.ProbabilityVector; import training.rhythmic.RhythmicLearner; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import...
package training; public class GenreLearner { private String categoryName_; private MarkovMatrix<ChordDegree> markovDegree_; private ProbabilityVector<List<ChordDegree>> endingsVector_; private ProbabilityVector<Tonality> tonalityVector_; private ProbabilityVector<Double> barUnitVector_; priv...
RhythmicLearner.learn(scoreAnalyser, rhythmMatrices_);
5
tomitribe/crest
tomitribe-crest/src/main/java/org/tomitribe/crest/cmds/processors/Commands.java
[ "public class EditorLoader {\n\n private EditorLoader() {\n // no-op\n }\n\n static {\n Lazy.init();\n }\n\n public static void load() {\n // no-op\n }\n\n private static Archive thisArchive() {\n try {\n final Class<?> reference = EditorLoader.class;\n\n ...
import org.tomitribe.crest.EditorLoader; import org.tomitribe.crest.api.Command; import org.tomitribe.crest.cmds.Cmd; import org.tomitribe.crest.cmds.CmdGroup; import org.tomitribe.crest.cmds.CmdMethod; import org.tomitribe.crest.cmds.OverloadedCmdMethod; import org.tomitribe.crest.cmds.targets.SimpleBean; import org.t...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
final CmdMethod cmd = new CmdMethod(method, target, dc);
3
Vrael/eManga
app/src/main/java/com/emanga/emanga/app/fragments/HistorySectionFragment.java
[ "public class ReaderActivity extends OrmliteFragmentActivity {\n\n\tpublic static final String TAG = \"ReaderActivity\";\n\n\tpublic static final String ACTION_OPEN_CHAPTER = \"com.emanga.emanga.app.intent.action\"\n + TAG + \".openChapter\";\n public static final String ACTION_OPEN_CHAPTER_NUMBER = \...
import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.GridView; import ...
package com.emanga.emanga.app.fragments; /** * Created by Ciro on 24/03/2014. */ /** * A fragment that with history */ public class HistorySectionFragment extends OrmliteFragment { public final static String TAG = HistorySectionFragment.class.getSimpleName(); private GridView mGridView; private I...
holder.date.setText(ThumbnailChapterAdapter.formatDate(chapter.read));
1
kzwang/elasticsearch-osem
src/main/java/com/github/kzwang/osem/processor/ObjectProcessor.java
[ "public enum CacheType {\n MAPPING, ID_FIELD, INDEX_TYPE_NAME, ROUTING_PATH, PARENT_PATH\n}", "public class OsemCache {\n\n private static OsemCache instance = null;\n\n\n private HashMap<CacheType, HashMap<Object, Object>> cache = Maps.newHashMap();\n\n\n /**\n * Get Singleton {@link OsemCache} c...
import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.github.kzwang.osem.annotat...
package com.github.kzwang.osem.processor; /** * Serialize/Deserialize object using Jackson */ public class ObjectProcessor { private static final ESLogger logger = Loggers.getLogger(ObjectProcessor.class); private ObjectMapper serializeMapper; private ObjectMapper deSerializeMapper; private Os...
serializeMapper.registerModule(new JacksonElasticSearchOsemModule());
3
cloudera/flume
flume-core/src/test/java/com/cloudera/flume/shell/TestFlumeShell.java
[ "public class FlumeNode implements Reportable {\n static final Logger LOG = LoggerFactory.getLogger(FlumeNode.class);\n final static String PHYSICAL_NODE_REPORT_PREFIX = \"pn-\";\n static final String R_NUM_LOGICAL_NODES = \"Logical nodes\";\n\n // hook for jsp/web display\n private static FlumeNode instance;\...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import...
out.close(); retval = sh.executeLine("exec load '" + saveFile.getAbsolutePath() + "'"); assertEquals(0, retval); ConfigurationManager manager = flumeMaster.getSpecMan(); FlumeConfigData data = manager.getConfig("foo"); assertEquals(data.getSinkConfig(), "console"); assertEquals(data.getSou...
FlumeNode n = new FlumeNode(FlumeConfiguration.get(), nodename,
0
TarsierMessenger/TarsierMessenger
app/src/main/java/ch/tarsier/tarsier/ui/adapter/ChatListAdapter.java
[ "public class Tarsier extends Application {\n\n private static final String TARSIER_TAG = \"TarsierApp\";\n private static Tarsier app;\n\n private UserPreferences mUserPreferences;\n private Database mDatabase;\n private EventHandler mEventHandler;\n\n private PeerRepository mPeerRepository;\n ...
import android.app.Activity; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.TextView; import java.util.ArrayList; import java.util.List; import ch.tars...
package ch.tarsier.tarsier.ui.adapter; /** * ChatListAdapter is the adapter for the ChatListActivity. * * @see ch.tarsier.tarsier.ui.activity.ChatListActivity * @author gluthier */ public class ChatListAdapter extends ArrayAdapter<Chat> { private static final String INTRO_TEXT = ">"; private Context ...
Peer sender = null;
3
UWFlow/flow-android
src/com/uwflow/flow_android/adapters/ProfilePagerAdapter.java
[ "public class Constants {\n public static final String FLOW_DOMAIN = \"uwflow.com\";\n public static final String SESSION_COOKIE_DOMAIN = FLOW_DOMAIN;\n public static final String BASE_URL = \"https://uwflow.com/\";\n public static final String FBID = \"fbid\";\n public static final String FACEBOOK_A...
import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; import com.uwflow.flow_android.constant.Constants; import com.uwflow.flow_android.fragment.ProfileCourseFragment; import com.uwflow.flow_android.fragm...
package com.uwflow.flow_android.adapters; public class ProfilePagerAdapter extends FragmentStatePagerAdapter { private Bundle mBundle; protected Boolean mIsUserMe; private static final int USER_PROFILE_TAB_NUMBER = 4; private static final int USER_FRIEND_PROFILE_TAB_NUMBER = 3; private static fin...
fragment = new ProfileScheduleFragment();
4
ibek/issue-keeper
issue-keeper-junit/src/test/java/qa/tools/ikeeper/test/query/CacheReadMultipleJirasTest.java
[ "public class CacheClient implements ITrackerClient {\n\n private final CacheConnector issueConnector;\n\n private List<ITrackerClient> clients;\n\n public CacheClient(ITrackerClient... clients) {\n this(CacheConnector.DEFAULT_CACHE_FILE_PATH, clients);\n }\n\n public CacheClient(String cacheF...
import org.assertj.core.api.Assertions; import org.junit.*; import org.junit.rules.TestRule; import qa.tools.ikeeper.annotation.Jira; import qa.tools.ikeeper.client.CacheClient; import qa.tools.ikeeper.client.JiraClient; import qa.tools.ikeeper.client.connector.CacheConnector; import qa.tools.ikeeper.interceptor.QueryI...
package qa.tools.ikeeper.test.query; public class CacheReadMultipleJirasTest { private static final List<String> executed = new ArrayList<String>(); @AfterClass public static void checkExecutions() { Assertions.assertThat(executed).hasSize(1); Assertions.assertThat(executed).contains("ru...
issueKeeper = new IKeeperJUnitConnector(new QueryInterceptor(), new CacheClient(
4
gallery/gallery-remote
com/gallery/GalleryRemote/prefs/URLPanel.java
[ "public class Log implements PreferenceNames, Runnable {\n\tpublic final static int LEVEL_CRITICAL = 0;\n\tpublic final static int LEVEL_ERROR = 1;\n\tpublic final static int LEVEL_INFO = 2;\n\tpublic final static int LEVEL_TRACE = 3;\n\n\tstatic String levelName[] = {\"CRITI\", \"ERROR\", \"INFO \", \"TRACE\"};\n\...
import com.gallery.GalleryRemote.Log; import com.gallery.GalleryRemote.GalleryRemote; import com.gallery.GalleryRemote.MainFrame; import com.gallery.GalleryRemote.model.Gallery; import com.gallery.GalleryRemote.util.GRI18n; import javax.swing.*; import javax.swing.border.TitledBorder; import javax.swing.event.ListSelec...
package com.gallery.GalleryRemote.prefs; /** * Created by IntelliJ IDEA. * User: paour * Date: May 8, 2003 */ public class URLPanel extends PreferencePanel implements ListSelectionListener, ActionListener { public static final String MODULE = "URLPa"; JLabel icon = new JLabel(GRI18n.getString(MODULE, "icon")...
modifyGallery((Gallery) jGalleries.getModel().getElementAt(index));
3
rebane621/e621-android
src/main/java/de/e621/rebane/activities/DrawerWrapper.java
[ "public class FilterManager {\r\n\r\n String[] Blacklist = new String[0];\r\n Context context;\r\n String Filter = \"\";\r\n static boolean isRunning = false;\r\n\r\n private static Pattern numericFilter = null;\r\n\r\n public FilterManager(Context context, String... blacklists) {\r\n if (n...
import android.annotation.SuppressLint; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.annotation.StringRes; import android.support.design.widget.NavigationView; import android.support.v4.view.GravityCompat;...
package de.e621.rebane.activities; public class DrawerWrapper extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener { FilterManager blacklist = null; LoginManager login; public static SQLiteDB database = null; public static String baseURL; priv...
if (!DMailService.isRunning() && Boolean.parseBoolean(database.getValue(SettingsActivity.SETTINGDMAILSERVICE)) && login.isLoggedIn()) {
5
ScreamingHawk/fate-sheets
app/src/main/java/link/standen/michael/fatesheets/adapter/CharacterArrayAdapter.java
[ "public class CoreCharacterEditActivity extends SharedMenuActivity implements CharacterEditActivity {\n\n\t/**\n\t * The {@link android.support.v4.view.PagerAdapter} that will provide\n\t * fragments for each of the sections. We use a\n\t * {@link FragmentPagerAdapter} derivative, which will keep every\n\t * loaded...
import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.res.Resources; import android.support.annotation.LayoutRes; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.design.widget.Snackbar; ...
package link.standen.michael.fatesheets.adapter; /** * Manages a list of characters. */ public class CharacterArrayAdapter extends ArrayAdapter<String> { private static final String TAG = CharacterArrayAdapter.class.getName(); private final CharacterListActivity context; private final int resourceId; privat...
intent.putExtra(Character.INTENT_EXTRA_NAME, name);
3
genepi/imputationserver
src/main/java/genepi/imputationserver/steps/CompressionEncryption.java
[ "public class ImputationPipeline {\n\n\tpublic static final String PIPELINE_VERSION = \"michigan-imputationserver-1.6.5\";\n\n\tpublic static final String IMPUTATION_VERSION = \"minimac4-1.0.2\";\n\n\tpublic static final String BEAGLE_VERSION = \"beagle.18May20.d20.jar\";\n\n\tpublic static final String EAGLE_VERSI...
import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.Vector; import org.apache.commons.io.FileUtils; import cloudgene.sdk.internal.IExternalWorkspace; import cloudgene.sdk.internal.WorkflowContext; import cloudgene.sdk.internal.WorkflowStep...
package genepi.imputationserver.steps; public class CompressionEncryption extends WorkflowStep { @Override public boolean run(WorkflowContext context) { String workingDirectory = getFolder(CompressionEncryption.class); String output = context.get("outputimputation"); String outputScores = context.get("ou...
password = PasswordCreator.createPassword();
7
oxoooo/excited-android
app/src/main/java/ooo/oxo/excited/fragment/ChannelFragment.java
[ "public class ChannelActivity extends RxAppCompatActivity implements\r\n OnItemClickListener, View.OnClickListener,\r\n AppBarLayout.OnOffsetChangedListener, IData.IItems {\r\n\r\n private SwipeRefreshLayout refreshLayout;\r\n private ViewGroup webViewContent;\r\n private MusicView webView;\r...
import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.design.widget.AppBarLayout; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View;...
package ooo.oxo.excited.fragment; public class ChannelFragment extends BaseFragment implements ChannelAdapter.OnChannelClickListener { public static final String CHANNEL = "channel"; public static final String TAG = "Channel"; public final int REQUEST_CHANNEL = 0x1; private SwipeRefre...
Intent intent = new Intent(context, ChannelActivity.class);
0
cristcost/sensormix
sensormix-admin-webapp/src/test/java/com/google/developers/gdgfirenze/admin/server/SensormixServiceMock.java
[ "@RemoteServiceRelativePath(\"service\")\npublic interface GwtSensormixService extends RemoteService, SensormixService {\n}", "public class SensormixServiceJpaImpl implements SensormixService, SensormixAdminInterface {\r\n\r\n /**\r\n * The class logger.\r\n */\r\n private static Logger logger = Logger.getL...
import java.util.Date; import java.util.List; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; import javax.servlet.ServletException; import com.google.developers.gdgfirenze.admin.client.service.GwtSensormixService; import com.google.developers.gdgfirenze.dataservice.SensormixService...
/* * Copyright 2013, Cristiano Costantini, Giuseppe Gerla, Michele Ficarra, Sergio Ciampi, Stefano * Cigheri. * * 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/...
private SensormixService getService() {
5
baishui2004/common_gui_tools
src/main/java/bs/tool/commongui/plugins/ClassFinder.java
[ "public abstract class AbstractGuiJPanel extends JPanel {\n\n private static final long serialVersionUID = 1L;\n\n public AbstractGuiJPanel() {\n }\n\n /**\n * 获取当前面板.\n */\n public JPanel getContextPanel() {\n return this;\n }\n\n /**\n * 给面板增加指定标题及字体的Label.\n */\n pu...
import bs.tool.commongui.AbstractGuiJPanel; import bs.tool.commongui.GuiUtils; import bs.tool.commongui.utils.FileUtils; import bs.tool.commongui.utils.SimpleMouseListener; import bs.util.io.PropertiesUtils; import javax.swing.*; import javax.swing.filechooser.FileFilter; import java.awt.*; import java.awt.event.MouseE...
package bs.tool.commongui.plugins; /** * Java类查找. */ public class ClassFinder extends AbstractGuiJPanel { private static final long serialVersionUID = 1L; /** * 查找类表单. */ private JTextField searchClassTextField = new JTextField(); /** * 查找文件/文件夹路径表单. */ private JTextField...
searchButton.addMouseListener(new SimpleMouseListener() {
3
TakWolf/CNode-Material-Design
app/src/main/java/org/cnodejs/android/md/model/api/SessionCallback.java
[ "public class ErrorResult extends Result {\n\n @NonNull\n public static ErrorResult from(@NonNull Response response) {\n ErrorResult errorResult = null;\n ResponseBody errorBody = response.errorBody();\n if (errorBody != null) {\n try {\n errorResult = EntityUtil...
import android.app.Activity; import android.content.DialogInterface; import android.support.annotation.NonNull; import org.cnodejs.android.md.R; import org.cnodejs.android.md.model.entity.ErrorResult; import org.cnodejs.android.md.model.entity.Result; import org.cnodejs.android.md.ui.activity.LoginActivity; import org....
package org.cnodejs.android.md.model.api; public class SessionCallback<T extends Result> extends ToastCallback<T> { public SessionCallback(@NonNull Activity activity) { super(activity); } @Override
public final boolean onResultError(int code, Headers headers, ErrorResult errorResult) {
0
biboudis/streamalg
src/main/java/streams/fold/Stream.java
[ "public interface StreamAlg<C> {\n <T> App<C, T> source(T[] array);\n\n <T, R> App<C, R> map(Function<T, R> f, App<C, T> app);\n\n <T, R> App<C, R> flatMap(Function<T, App<C, R>> f, App<C, T> app);\n\n <T> App<C, T> filter(Predicate<T> f, App<C, T> app);\n}", "public class PullFactory implements Strea...
import streams.algebras.StreamAlg; import streams.factories.PullFactory; import streams.factories.PushFactory; import streams.factories.RefCell; import streams.higher.App; import streams.higher.Pull; import streams.higher.Push; import java.util.Iterator; import java.util.function.Consumer; import java.util.function.Fun...
package streams.fold; /** * Authors: * Aggelos Biboudis (@biboudis) * Nick Palladinos (@NickPalladinos) */ public abstract class Stream<T> { public static <T> Stream<T> of(T[] src) { return new Source<>(src); } public <R> Stream<R> map(Function<T, R> mapper) { return new Map<>(mappe...
abstract <C> App<C, T> fold(StreamAlg<C> algebra);
0
multi-os-engine/moe-plugin-gradle
src/main/java/org/moe/gradle/tasks/Launchers.java
[ "public abstract class AbstractMoePlugin implements Plugin<Project> {\n\n /**\n * MOE group.\n */\n public static final String MOE = \"moe\";\n\n /**\n * Required major version of Gradle.\n */\n private static final int GRADLE_MIN_VERSION_MAJOR = 4;\n /**\n * Required minor versio...
import org.apache.commons.io.output.NullOutputStream; import org.apache.tools.ant.taskdefs.condition.Os; import org.gradle.api.DefaultTask; import org.gradle.api.GradleException; import org.gradle.api.Project; import org.gradle.api.Task; import org.gradle.api.logging.Logger; import org.gradle.api.logging.Logging; impor...
/* Copyright (C) 2016 Migeran 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 dis...
Mode mode = Mode.RELEASE;
5
fluentxml4j/fluentxml4j
core/src/main/java/com/github/fluentxml4j/internal/transform/TransformNodeImpl.java
[ "public class FluentXmlConfigurationException extends RuntimeException\n{\n\tprivate static final long serialVersionUID = 0xABAD1DEAL;\n\n\tpublic FluentXmlConfigurationException(String message, Throwable cause)\n\t{\n\t\tsuper(message, cause);\n\t}\n\n\tpublic FluentXmlConfigurationException(Throwable cause)\n\t{\...
import com.github.fluentxml4j.FluentXmlConfigurationException; import com.github.fluentxml4j.FluentXmlProcessingException; import com.github.fluentxml4j.internal.transform.filters.PrefixMappingFilterImpl; import com.github.fluentxml4j.internal.util.StaxUtils; import com.github.fluentxml4j.serialize.SerializeWithTransfo...
package com.github.fluentxml4j.internal.transform; class TransformNodeImpl implements TransformNode { private TransformationChain transformationChain; TransformNodeImpl(Source source) { this.transformationChain = new TransformationChain(source); } TransformNodeImpl(XMLEventReader in) {
this(StaxUtils.newStAXSource(in));
3
ptitfred/magrit
server/core/src/main/java/org/kercoin/magrit/core/build/BuildTask.java
[ "@Singleton\npublic class Context {\n\t\n\tprivate final Configuration configuration = new Configuration();\n\t\n\tprivate Injector injector;\n\t\n\tprivate final GitUtils gitUtils;\n\t\n\tprivate final ExecutorService commandRunnerPool;\n\n\tpublic Context() {\n\t\tgitUtils = null;\n\t\tcommandRunnerPool = null;\n...
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintStream; import java.util.Date; import org.apache.commons.exec.CommandLine; import org.apache.commons.exec.DefaultExecutor; import org.apache.commons.exec.ExecuteException; import org.apache.commons.exec.Pum...
/* Copyright 2011-2012 Frederic Menou and others referred in AUTHORS file. This file is part of Magrit. Magrit is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your ...
public BuildTask(Context ctx, RepositoryGuard guard,
0
ypresto/miniguava
miniguava-collect-immutables/src/main/java/net/ypresto/miniguava/collect/immutables/InternalIterators.java
[ "public static void checkArgument(boolean expression) {\n if (!expression) {\n throw new IllegalArgumentException();\n }\n}", "public final class Objects {\n private Objects() {}\n\n /**\n * Determines whether two possibly-null objects are equal. Returns:\n *\n * <ul>\n * <li>{@code true} if {@code...
import javax.annotation.Nullable; import static net.ypresto.miniguava.base.Preconditions.checkArgument; import net.ypresto.miniguava.annotations.MiniGuavaSpecific; import net.ypresto.miniguava.base.Objects; import net.ypresto.miniguava.base.Preconditions; import net.ypresto.miniguava.collect.Iterators; import net.ypres...
/* * Copyright (C) 2007 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 <T> UnmodifiableListIterator<T> forArray(
5
leavjenn/Hews
app/src/main/java/com/leavjenn/hews/ui/BasePostListFragment.java
[ "public class Utils implements com.leavjenn.hews.misc.UtilsContract {\n\n private Context mContext;\n\n public Utils(Context context) {\n mContext = context;\n }\n\n public static CharSequence formatTime(long timeStamp) {\n timeStamp = timeStamp * 1000;\n CharSequence timeAgo = Date...
import android.app.Activity; import android.app.Fragment; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerV...
package com.leavjenn.hews.ui; public class BasePostListFragment extends Fragment implements PostAdapter.OnReachBottomListener, SharedPreferences.OnSharedPreferenceChangeListener { public static final String TAG = "BaseListFragment"; protected SwipeRefreshLayout swipeRefreshLayout; protected Recycler...
protected DataManager mDataManager;
3
mirswamp/java-cli
src/main/java/org/continuousassurance/swamp/session/handlers/RunRequestHandler.java
[ "public class AssessmentRun extends SwampThing{\n public AssessmentRun(Session session) {\n super(session);\n }\n public AssessmentRun(Session session, Map map) {\n super(session, map);\n }\n\n @Override\n protected SwampThing getNewInstance() {\n return new AssessmentRun(getS...
import net.sf.json.JSONArray; import net.sf.json.JSONObject; import org.continuousassurance.swamp.api.AssessmentRun; import org.continuousassurance.swamp.api.Project; import org.continuousassurance.swamp.api.RunRequest; import org.continuousassurance.swamp.session.MyResponse; import org.continuousassurance.swamp.sessio...
package org.continuousassurance.swamp.session.handlers; /** * <p>Created by Jeff Gaynor<br> * on 12/22/14 at 3:39 PM */ public class RunRequestHandler<T extends RunRequest> extends AbstractHandler<RunRequest> { public static final String RUN_REQUEST_UUID_KEY = "run_request_uuid"; public static final Str...
public boolean submitOneTimeRequest(Collection<AssessmentRun> aRuns, boolean notifyWhenDone){
0
jeick/jamod
src/main/java/net/wimpi/modbus/io/ModbusSerialTransport.java
[ "public interface Modbus {\n\n\t/**\n\t * JVM flag for debug mode. Can be set passing the system property\n\t * net.wimpi.modbus.debug=false|true (-D flag to the jvm).\n\t */\n\tpublic static final boolean debug = \"true\".equals(System\n\t\t\t.getProperty(\"net.wimpi.modbus.debug\"));\n\n\t/**\n\t * Defines the cl...
import jssc.SerialPort; import net.wimpi.modbus.Modbus; import net.wimpi.modbus.ModbusIOException; import net.wimpi.modbus.msg.ModbusMessage; import net.wimpi.modbus.msg.ModbusRequest; import net.wimpi.modbus.msg.ModbusResponse; import net.wimpi.modbus.util.ModbusUtil; import java.io.IOException; import jssc.SerialInpu...
/*** * Copyright 2002-2010 jamod development team * * 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...
System.out.println("Echo: " + ModbusUtil.toHex(echoBuf, 0, echoBuf.length));
5
cianfrocco-lab/COSMIC-CryoEM-Gateway
gateway_config/portal/src/main/java/edu/sdsc/globusauth/action/TransferStatusAction.java
[ "public class ProfileManager extends HibernateUtil {\n public OauthProfile add(OauthProfile oathProfile) {\n User user = new User();\n String password = \"Globus\" + oathProfile.getUsername() + Calendar.getInstance().getTimeInMillis();\n user.setFirstName(oathProfile.getFirstName());\n ...
import edu.sdsc.globusauth.controller.ProfileManager; import edu.sdsc.globusauth.controller.Transfer2DataManager; import edu.sdsc.globusauth.util.OauthConstants; import org.apache.log4j.Logger; import org.globusonline.transfer.Authenticator; import org.globusonline.transfer.GoauthAuthenticator; import org.globusonline....
package edu.sdsc.globusauth.action; /** * Created by cyoun on 11/29/16. * Update by Mona Wong */ public class TransferStatusAction extends NgbwSupport { private static final Logger logger = Logger.getLogger(TransferStatusAction.class.getName()); private JSONTransferAPIClient client; private List<Map<...
Authenticator authenticator = new GoauthAuthenticator(accesstoken);
3
TheGoodlike13/hls-downloader
src/test/java/eu/goodlike/hls/download/m3u/data/builder/MasterPlaylistBuilderTest.java
[ "public final class MediaPlaylist implements DownloadableMediaPlaylist {\n\n @Override\n public CompletableFuture<?> download() {\n return getMediaPlaylistData().handlePlaylistData();\n }\n\n @Override\n public String toString() {\n return Str.of(getName())\n .andIf(resol...
import com.google.common.collect.ImmutableList; import eu.goodlike.hls.download.m3u.MediaPlaylist; import eu.goodlike.hls.download.m3u.MediaPlaylistFactory; import eu.goodlike.hls.download.m3u.MultiMediaPlaylist; import eu.goodlike.hls.download.m3u.MultiMediaPlaylistFactory; import eu.goodlike.hls.download.m3u.data.Mas...
package eu.goodlike.hls.download.m3u.data.builder; public class MasterPlaylistBuilderTest { private static final HttpUrl URL = HttpUrl.parse("https://localhost:8080/"); private static final String PLAYLIST_NAME = "source"; private static final String RESOLUTION = "1920x1080"; private static final St...
new MediaPlaylist(name, resolution, url, null, null);
0
emboss/krypt-core-java
src/impl/krypt/asn1/parser/ChunkInputStream.java
[ "public class ParseException extends RuntimeException {\n\n public ParseException(Throwable cause) {\n super(cause);\n }\n\n public ParseException(String message, Throwable cause) {\n super(message, cause);\n }\n\n public ParseException(String message) {\n super(message);\n }\...
import impl.krypt.asn1.Tag; import impl.krypt.asn1.TagClass; import java.io.FilterInputStream; import java.io.IOException; import java.io.InputStream; import impl.krypt.asn1.ParseException; import impl.krypt.asn1.ParsedHeader; import impl.krypt.asn1.Parser;
/* * krypt-core API - Java version * * Copyright (c) 2011-2013 * Hiroshi Nakamura <nahi@ruby-lang.org> * Martin Bosslet <martin.bosslet@gmail.com> * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the ...
private ParsedHeader currentHeader;
1
karsany/obridge
obridge-main/src/main/java/org/obridge/mappers/PojoMapper.java
[ "public class Procedure {\n\n private String objectName;\n private String procedureName;\n private String overload;\n private String methodType;\n private List<ProcedureArgument> argumentList;\n private List<BindParam> bindParams = null;\n private String callString;\n\n private Procedure() {...
import org.obridge.util.StringHelper; import java.util.ArrayList; import java.util.List; import org.obridge.model.data.Procedure; import org.obridge.model.data.ProcedureArgument; import org.obridge.model.data.TypeAttribute; import org.obridge.model.generator.Pojo; import org.obridge.model.generator.PojoField;
/* * The MIT License (MIT) * * Copyright (c) 2016 Ferenc Karsany * * 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 * us...
p.setClassName(StringHelper.toCamelCase(typeName));
5
InstaList/instalist-android
app/src/main/java/org/noorganization/instalist/view/listadapter/ExpandableCategoryItemListAdapter.java
[ "public class GlobalApplication extends Application {\n\n private final static String LOG_TAG = GlobalApplication.class.getName();\n\n private static GlobalApplication mInstance;\n private ShoppingList mCurrentShoppingList;\n\n private boolean mBufferItemChangedMessages;\n private boolean mHandlingPr...
import android.content.Context; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseExpandableListAdapter; import android.widget.TextView; import android.widget.Toast; import org.noorganization.instalist.GlobalApplication; impor...
/* * Copyright 2016 Tino Siegmund, Michael Wodniok * * 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 applicabl...
view.setOnClickListener(new OnShoppingListClickListener(mIOnShoppingListClickEvents, shoppingList));
4
saltedge/saltedge-android
app/src/main/java/com/saltedge/sdk/sample/features/TransactionsActivity.java
[ "public interface FetchTransactionsResult {\n\n /**\n * Callback method is invoked when Fetch Transactions operation finished with success\n *\n * @param transactions List of SETransaction objects\n */\n void onSuccess(List<SETransaction> transactions);\n\n /**\n * Callback method is in...
import android.app.Activity; import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.AdapterView; import android.widget.ListView; import android.widget.TextView; import androidx.ap...
/* Copyright © 2019 Salt Edge. https://saltedge.com 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, publis...
UITools.destroyProgressDialog(progressDialog);
6
TranquilMarmot/spaceout
src/com/bitwaffle/spaceguts/util/menu/MenuCommandMap.java
[ "public class Audio {\n\t/** Used for deleting all sound sources on shutdown (see {@link SoundSource}'s constructor, each SoundSource gets added to this when it's created */\n\tprotected static ArrayList<SoundSource> soundSources = new ArrayList<SoundSource>();\n\t\n\t/** Factor to use for doppler effect */\n\tpriv...
import java.util.HashMap; import java.util.Map; import com.bitwaffle.spaceguts.audio.Audio; import com.bitwaffle.spaceguts.graphics.gui.GUI; import com.bitwaffle.spaceguts.graphics.gui.menu.LoadMenu; import com.bitwaffle.spaceguts.graphics.gui.menu.MainMenu; import com.bitwaffle.spaceguts.graphics.gui.menu.PauseMenu; i...
package com.bitwaffle.spaceguts.util.menu; public class MenuCommandMap { /* * TODO: Convert to some kind of interface so this can * be created from the game (spaceout) instead of the * engine (spaceguts) */ private static final String XML_PATH = "res/XML/"; Map<String, MenuCommand> commandMap; publ...
LoadMenu lmenu = new LoadMenu(0, 0, XML_PATH);
2
maoruibin/AppPlus
app/src/main/java/com/gudong/appkit/ui/fragment/SettingsFragment.java
[ "public class WeChatHelper {\n\n private Context mContext;\n\n public WeChatHelper(Context context) {\n mContext = context;\n }\n\n public void checkDownloadListDialog(boolean isCheckDataBeforeShowList) {\n List<File> list = listTencentDownloads();\n if (isCheckDataBeforeShowList) {...
import com.gudong.appkit.event.EEvent; import com.gudong.appkit.event.RxBus; import com.gudong.appkit.event.RxEvent; import com.gudong.appkit.ui.activity.BaseActivity; import com.gudong.appkit.ui.control.NavigationManager; import com.gudong.appkit.ui.control.ThemeControl; import com.gudong.appkit.utils.Utils; import co...
/* * Copyright (c) 2015 GuDong * * 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,...
RxBus.getInstance().send(RxEvent.get(EEvent.RECENT_LIST_IS_SHOW_SELF_CHANGE));
3
alphagov/locate-api
locate-api-service/src/test/uk/gov/gds/locate/api/services/AddressTransformationServiceTest.java
[ "public class AesEncryptionProduct {\n private final byte[] encryptedContent;\n\n private final byte[] initializationVector;\n\n public AesEncryptionProduct(byte[] encryptedContent, byte[] initializationVector) {\n this.encryptedContent = encryptedContent;\n this.initializationVector = initia...
import com.google.common.collect.ImmutableList; import org.apache.commons.codec.binary.Base64; import org.junit.Test; import uk.gov.gds.locate.api.encryption.AesEncryptionProduct; import uk.gov.gds.locate.api.helpers.DetailsBuilder; import uk.gov.gds.locate.api.helpers.OrderingBuilder; import uk.gov.gds.locate.api.help...
public void shouldOrderAddressesByPaoNumberAndSuffix() { Details d = new DetailsBuilder("postal").postal(true).residential(true).build(); Ordering o1 = new OrderingBuilder().saoStartNumber(1).saoStartSuffix("a").paoStartNumber(100).paoStartSuffix("a").build(); Ordering o2 = new OrderingBuil...
AesEncryptionProduct encryptedBit = encrypt("this this this", aesKeyFromBase64EncodedString(testKey));
5
andyiac/githot
app/src/main/java/com/knight/arch/ui/ReposDetailsActivity.java
[ "public interface ApiService {\n\n @GET(\"/search/users\")\n Observable<Users<User>> getUsersRxJava(\n @Query(value = \"q\", encodeValue = false) String query,\n @Query(\"page\") int pageId\n );\n\n @GET(\"/search/users\")\n Observable<Users<User>> getUsersRxJava(\n @...
import android.content.Intent; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.v7.app.ActionBar; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.text....
package com.knight.arch.ui; /** * @author andyiac * @date 15-8-4 * @web http://blog.andyiac.com/ */ public class ReposDetailsActivity extends InjectableActivity { private Repository mRepository; private RecyclerView mRecyclerView; private HotReposDetailsListAdapterHolder adapter; private Linea...
mRecyclerView.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL_LIST, paddingStart, false));
6
maximeflamant/waveplay
src/com/nixus/raop/RaopHelper.java
[ "public class PropertyManager {\n\n private Map<String,ServiceProperties> all;\n private File file;\n private Timer writetimer;\n private volatile boolean propertiesdirty;\n\n public PropertyManager() {\n this.all = new LinkedHashMap<String,ServiceProperties>();\n this.writetimer = new ...
import java.io.FileWriter; import java.io.IOException; import java.net.InetAddress; import java.net.NetworkInterface; import java.net.SocketException; import java.util.ArrayList; import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.u...
package com.nixus.raop; /** * RaopHelper, helper for raop * @author Maxime Flamant * */ public class RaopHelper extends Observable implements ServicesManager{ public static Map<String,ServiceContextImpl> contexts;
public static PropertyManager pm;
0
frett27/jfgdb
jfgdb/src/test/java/org/fgdbapi/thindriver/descriptionobjects/TestUsingDescription.java
[ "public class TableHelper {\n\n /** inner dataElement handled by this table helper */\n private DETable dataElement;\n\n /** name of the table */\n private String name;\n\n /**\n * statically create a tablehelper for creating a new table\n *\n * @param name\n * @return\n */\n public static TableHelp...
import java.io.ByteArrayInputStream; import java.io.File; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.fgdbapi.thindriver.TableHelper; import org.fgdbapi.thindriver.swig.FGDBJNIWrapper; i...
package org.fgdbapi.thindriver.descriptionobjects; public class TestUsingDescription { private Geodatabase g; private File gdbfile; @Before public void setup() throws Exception { File tempFolder = File.createTempFile("test", "folder"); tempFolder.delete(); tempFolder.mkdirs(); gdbfile = ...
EsriGeometryType.ESRI_GEOMETRY_POLYGON,
4
gamblore/AndroidPunk
src/net/androidpunk/FP.java
[ "public class PunkActivity extends Activity implements OnTouchListener {\r\n\t\r\n\tprivate static final String TAG = \"PunkActivity\";\r\n\t\r\n\tpublic static int static_width = 800;\r\n\tpublic static int static_height = 480;\r\n\tpublic static Class<? extends Engine> engine_class = Engine.class;\r\n\t\r\n\tpriv...
import java.io.IOException; import java.io.InputStream; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Random; import java.util.Vector; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import net.androidpunk.android.Punk...
} } } /** * Get a list of a directory of the assets path. * @param path to check for files * @return a string array of the filenames. */ public static String[] getAssetList(String path) { try { return FP.context.getAssets().list(path); } catch (IOException e) { e.printStackTrace(); } r...
public static MultiVarTween tween(Object object, Map<String, Number> values, float duration) {
5
gazbert/bxbot-ui-server
bxbot-ui-server-repository/src/main/java/com/gazbert/bxbot/ui/server/repository/local/impl/BotConfigRepositoryXmlDatastore.java
[ "public final class ConfigurationManager {\n\n private static final Logger LOG = LogManager.getLogger();\n private final static Object MUTEX = new Object();\n\n private ConfigurationManager() {\n }\n\n /*\n * Loads and returns the requested configuration.\n */\n public static <T> T loadCon...
import org.apache.logging.log4j.Logger; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.UUID; import java.util.stream.Collectors; import com.gazbert.bxbot....
/* * The MIT License (MIT) * * Copyright (c) 2017 Gareth Jon Lynch * * 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 * ...
final List<BotType> botTypes = internalBotsConfig.getBots()
2
gstreamer-java/gst1-java-core
src/org/freedesktop/gstreamer/Buffer.java
[ "public interface GstBufferAPI extends com.sun.jna.Library {\n \n GstBufferAPI GSTBUFFER_API = GstNative.load(GstBufferAPI.class);\n\n public static final int GST_LOCK_FLAG_READ = (1 << 0);\n public static final int GST_LOCK_FLAG_WRITE = (1 << 1);\n public static final int GST_MAP_READ = GST_LOCK_FLA...
import com.sun.jna.Pointer; import com.sun.jna.ptr.PointerByReference; import java.util.EnumSet; import java.util.Iterator; import java.util.NoSuchElementException; import org.freedesktop.gstreamer.glib.NativeFlags; import org.freedesktop.gstreamer.glib.Natives; import org.freedesktop.gstreamer.lowlevel.GType; import o...
/* * Copyright (c) 2020 Neil C Smith * Copyright (c) 2019 Christophe Lafolet * Copyright (C) 2014 Tom Greenwood <tgreenwood@cafex.com> * Copyright (C) 2007 Wayne Meissner * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu> * 2000 Wim Taymans <wtay@chello.be> * * This file is part of...
GstMetaPtr ptr = GSTBUFFER_API.gst_buffer_get_meta(this, apiType);
6
bvarner/javashare
src/main/java/org/beShare/network/Tranto.java
[ "public class BeShareUser {\r\n\t// BeShare User Number\r\n\tprivate String connectionNum;\r\n\t// name node\r\n\tprivate boolean bot;\r\n\tprivate String name;\r\n\tprivate int port;\r\n\tprivate long installid;\r\n\tprivate String client;\r\n\tprivate String ipaddress;\r\n\t// userstatus ...
import com.meyer.muscle.client.MessageTransceiver; import com.meyer.muscle.client.StorageReflectConstants; import com.meyer.muscle.message.Message; import com.meyer.muscle.support.TypeConstants; import com.meyer.muscle.thread.MessageListener; import com.meyer.muscle.thread.MessageQueue; import org.beShare.data.Be...
/* Change Log: Class Started: 1-30-2002 History ------- 1.0 - Finished impelmenting all chat functions. 1.0.1 - Began transition to JavaShareEvents. 1.0.2 - Made the move from ActionEvents to JavaShareEvents, also added Vector to hold registered listeners, and iterates through the vector when firing...
public Tranto(JavaShareEventListener bse){
4
marcb1/droid-ssh
scp/src/main/java/marc/scp/activities/MainActivity.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.app.Dialog; import android.content.DialogInterface; import android.os.Bundle; import android.os.Parcelable; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.content.Intent; import android.view.ViewGroup; import android.widget.Ada...
package marc.scp.activities; // This is the main activity; it is first started when the app is launched public class MainActivity extends Activity { static { Security.insertProviderAt(new org.spongycastle.jce.provider.BouncyCastleProvider(), 1); Security.removeProvider("BC"); } p...
private Dialogs _dialogsInstance;
7
NICMx/rdap-server
src/main/java/mx/nic/rdap/server/listener/RdapInitializer.java
[ "public class RdapConfiguration {\n\tprivate static Properties systemProperties;\n\n\t// property keys\n\tprivate static final String LANGUAGE_KEY = \"language\";\n\tprivate static final String MINIMUN_SEARCH_PATTERN_LENGTH_KEY = \"minimum_search_pattern_length\";\n\tprivate static final String MAX_NUMBER_OF_RESULT...
import java.io.IOException; import java.io.InputStream; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Map.Entry; import java.util.Properties; import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; import javax.servle...
package mx.nic.rdap.server.listener; @WebListener public class RdapInitializer implements ServletContextListener { /** File from which we will load the renderer. */ private static final String RENDERERS_FILE = "renderers"; /** File from which we will load the rdap server configuration. */ private ...
PrivacyUtil.loadAllPrivacySettings();
3
socialsensor/social-event-detection
src/app/Main.java
[ "public class SameClassLink {\n public float weight;\n public String id;\n public static int counter;\n \n public SameClassLink() {\n }\n\n public SameClassLink(float weight) {\n this.weight = weight;\n counter += 1;\n id = Integer.toString(counter);\n }\n \n publi...
import java.io.File; import java.util.HashSet; import java.util.Set; import clustering.SameClassLink; import models.MultimodalItem; import indexing.spatial.SpatialIndex; import indexing.textual.TextualIndex; import indexing.time.TimeIndex; import indexing.visual.VisualIndex; import utils.Constants; import collections.E...
package app; public class Main { private static TextualIndex textualIndex;
private static VisualIndex visualIndex;
5
sastix/cms
server/src/main/java/com/sastix/cms/server/services/cache/hazelcast/HazelcastCacheService.java
[ "public interface Constants {\n\n /**\n * Rest API Version.\n */\n static String REST_API_1_0 = \"1.0\";\n String GET_API_VERSION = \"/apiversion\";\n String DEFAULT_LANGUAGE = \"en\";\n\n /**\n * CONTENT API ENDPOINTS\n */\n static String CREATE_RESOURCE = \"createResource\";\n ...
import com.hazelcast.core.IMap; import com.hazelcast.core.IdGenerator; import com.sastix.cms.common.Constants; import com.sastix.cms.common.cache.CacheDTO; import com.sastix.cms.common.cache.QueryCacheDTO; import com.sastix.cms.common.cache.RemoveCacheDTO; import com.sastix.cms.common.cache.exceptions.CacheValidationEx...
/* * Copyright(c) 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 appl...
RemoveCacheDTO removeCacheDTO = new RemoveCacheDTO();
3
lemberg/d8androidsdk
DrupalSDK/src/main/java/com/ls/drupal/DrupalClient.java
[ "public class AnonymousLoginManager implements ILoginManager\n{\n\n\t@Override\n\tpublic Object login(String userName, String password, RequestQueue queue)\n\t{\n\t\treturn null;\n\t}\n\n @Override\n public boolean shouldRestoreLogin() {\n return false;\n }\n\n @Override\n public boolean canRe...
import com.android.volley.DefaultRetryPolicy; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.toolbox.Volley; import com.ls.drupal.login.AnonymousLoginManager; import com.ls.drupal.login.ILoginManager; import com.ls.http.base.BaseRequest; import com.ls.http.base.Base...
/* * The MIT License (MIT) * Copyright (c) 2014 Lemberg Solutions Limited * 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...
this.setLoginManager(new AnonymousLoginManager());
0
cloudera/flume
flume-core/src/main/java/com/cloudera/flume/agent/LogicalNode.java
[ "public class Context {\n Map<String, Object> table = new HashMap<String, Object>();\n final Context parent;\n\n final public static Context EMPTY = new Context(null);\n\n public Context(Context parent) {\n this.parent = parent;\n }\n\n /**\n * This should only be used rarely. You probably want\n * Log...
import java.io.File; import java.io.IOException; import java.util.Date; import java.util.HashMap; import java.util.Map; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.atomic.AtomicLong; import org.slf4j.Logger; import org.slf4j.LoggerFactory; impo...
/** * Licensed to Cloudera, Inc. under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Cloudera, Inc. licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use th...
private Driver driver; // the connector that pumps data from src to snk
3
awvalenti/bauhinia
coronata/coronata-builder/src/main/java/com/github/awvalenti/bauhinia/coronata/CoronataBuilder.java
[ "public interface CoronataButtonObserver {\n\n\tvoid buttonPressed(CoronataWiiRemoteButton button);\n\n\tvoid buttonReleased(CoronataWiiRemoteButton button);\n\n}", "public interface CoronataConnectionObserver {\n\n\tvoid connected(CoronataWiiRemote wiiRemote);\n\n}", "public interface CoronataDisconnectionObse...
import com.github.awvalenti.bauhinia.coronata.observers.CoronataButtonObserver; import com.github.awvalenti.bauhinia.coronata.observers.CoronataConnectionObserver; import com.github.awvalenti.bauhinia.coronata.observers.CoronataDisconnectionObserver; import com.github.awvalenti.bauhinia.coronata.observers.CoronataError...
package com.github.awvalenti.bauhinia.coronata; public class CoronataBuilder { private final CoronataConfig config = new CoronataConfig(); private CoronataBuilder() { } public static CoronataBuilder beginConfig() { return new CoronataBuilder(); } public CoronataBuilder wiiRemotesExpected(int count) { co...
public CoronataBuilder onPhase(CoronataPhaseObserver o) {
6
AstartesGuardian/WebDAV-Server
WebDAV-Server/src/webdav/server/virtual/entity/remote/webdav/RsWebDavGhost.java
[ "public class ExtendableByteBuffer\r\n{\r\n public ExtendableByteBuffer()\r\n { }\r\n \r\n protected int internalBufferSize = 1500;\r\n protected List<byte[]> content = new ArrayList<>();\r\n protected int totalLength = 0;\r\n \r\n \r\n \r\n public ExtendableByteBuffer setInternalBuffe...
import http.ExtendableByteBuffer; import http.FileSystemPath; import http.server.exceptions.UserRequiredException; import http.server.message.HTTPEnvRequest; import http.server.message.HTTPRequest; import java.io.IOException; import webdav.server.resource.IResource; import webdav.server.resource.ResourceType; i...
package webdav.server.virtual.entity.remote.webdav; public class RsWebDavGhost extends IRsGhost { public RsWebDavGhost(FileSystemPath path, byte[] ip, int port) { super(path); this.ip = ip; this.port = port; } private final byte[] ip; private fin...
protected IResource generateUndefinedResource(FileSystemPath path, HTTPEnvRequest env) throws UserRequiredException
2
BoD/irondad
src/main/java/org/jraf/irondad/handler/HandlerManager.java
[ "public class Config {\n\n public static final boolean LOGD = true;\n\n}", "public class Constants {\n public static final String TAG = \"irondad/\";\n\n public static final String PROJECT_FULL_NAME = \"BoD irondad\";\n public static final String PROJECT_URL = \"https://github.com/BoD/irondad\";\n ...
import java.util.List; import java.util.Map; import org.jraf.irondad.Config; import org.jraf.irondad.Constants; import org.jraf.irondad.protocol.ClientConfig; import org.jraf.irondad.protocol.ClientConfig.HandlerClassAndConfig; import org.jraf.irondad.protocol.Command; import org.jraf.irondad.protocol.Connection; impor...
/* * This source is part of the * _____ ___ ____ * __ / / _ \/ _ | / __/___ _______ _ * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / * /___/ * repository. * * Copyright (C) 2013 Benoit 'BoD' Lubek (BoD@JRAF.org) * * This library is free sof...
HandlerClassAndConfig handlerClassAndConfig = clientConfig.getHandlerConfig(configName);
3
Ghosts/Maus
src/main/java/GUI/Views/FileExplorerView.java
[ "public class BottomBar implements Repository {\n private static Label connectionsLabel = null;\n\n public static Label getConnectionsLabel() {\n return connectionsLabel;\n }\n\n public HBox getBottomBar() {\n HBox hBox = new HBox();\n HBox.setHgrow(hBox, Priority.ALWAYS);\n ...
import GUI.Components.BottomBar; import GUI.Components.FileContextMenu; import GUI.Components.TopBar; import GUI.Styler; import Logger.Level; import Logger.Logger; import Server.ClientObject; import javafx.geometry.Insets; import javafx.geometry.Pos; import javafx.scene.control.Button; import javafx.scene.control.Label...
package GUI.Views; public class FileExplorerView { private static ClientObject client; private static void setClient(ClientObject client) { FileExplorerView.client = client; } private static String getExtensionImage(String s) { String extension = ""; int i = s.lastIndexOf('...
Label title = (Label) Styler.styleAdd(new Label("Current Directory:"), "title");
3
EsriDE/OpenDataBridge
api/transformation/src/main/java/esride/opendatabridge/application/AppStarter.java
[ "public interface IAgolItemReader {\n\n public AgolItem getAgolItemById(String agolId);\n\n public List<String> getAgolItemIdByTitle(String title);\n\n public List<String> getAgolItemIdByUrl(String url);\n\n public String getAgolItemIdByCatalogId(String catalogId);\n\n public void touchItem(String ag...
import esride.opendatabridge.agolreader.IAgolItemReader; import esride.opendatabridge.agolwriter.IAgolService; import esride.opendatabridge.pipeline.controller.PipelineController; import esride.opendatabridge.processing.Transformer; import esride.opendatabridge.processing.TransformerException; import esride.opendatabri...
package esride.opendatabridge.application; /** * The AppStarter class starts the transformation process with some special program parameters. * See {@link esride.opendatabridge.application.StartParameter StartParameter} for details. * User: sma * Date: 19.03.13 * Time: 15:53 */ public class AppStarter { ...
IReader reader = initializer.getReader();
4
AfterLifeLochie/fontbox
src/main/java/net/afterlifelochie/fontbox/document/Heading.java
[ "public interface ITracer {\r\n\r\n\t/**\r\n\t * <p>\r\n\t * Called by Fontbox to trace a particular event to the tracer.\r\n\t * </p>\r\n\t * <p>\r\n\t * Events triggered usually take the following parameter forms:\r\n\t * <ol>\r\n\t * <li>The method name being invoked (the source)</li>\r\n\t * <li>The return argu...
import java.io.IOException; import net.afterlifelochie.fontbox.api.ITracer; import net.afterlifelochie.fontbox.data.FormattedString; import net.afterlifelochie.fontbox.document.property.AlignmentMode; import net.afterlifelochie.fontbox.layout.LayoutException; import net.afterlifelochie.fontbox.layout.PageWriter; ...
package net.afterlifelochie.fontbox.document; public class Heading extends Element { /** The heading ID */ public String id; /** The heading text string */ public FormattedString text; /** * Creates a new Heading element * * @param id * The heading's unique identifier * @p...
public void layout(ITracer trace, PageWriter writer) throws IOException, LayoutException {
0
AEminium/AeminiumRuntime
src/aeminium/runtime/implementations/implicitworkstealing/task/ImplicitTask.java
[ "public interface Body {\n\t/**\n\t * This method contains the code of the body, that is executed by the task. \n\t * \n\t * @param current Reference to the associated task object.\n\t */\n public void execute(final Runtime rt, final Task current) throws Exception;\n}", "public interface Task {\n\tpublic void ...
import aeminium.runtime.implementations.implicitworkstealing.scheduler.WorkStealingThread; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import aeminium.runtime.Body; import aeminium.runtime.Task; import aeminium.runtime.implementations.Configuration; impo...
/** * Copyright (c) 2010-11 The AEminium Project (see AUTHORS file) * * This file is part of Plaid Programming Language. * * Plaid Programming Language 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, ei...
public Body body;
0
8Yards/Nebula_Android
src/org/nebula/activities/Register.java
[ "public class RESTProfileManager extends Resource {\r\n\r\n\tpublic RESTProfileManager() {\r\n\t\tsuper(\"RESTProfiles\");\r\n\t}\r\n\r\n\tpublic Status register(Profile p) throws ClientProtocolException,\r\n\t\t\tIOException, JSONException {\r\n\t\tHashMap<String, Object> h = new HashMap<String, Object>();\r\n\t\t...
import org.nebula.R; import org.nebula.client.rest.RESTProfileManager; import org.nebula.main.NebulaApplication; import org.nebula.models.MyIdentity; import org.nebula.models.Profile; import org.nebula.models.Status; import android.app.Activity; import android.os.Bundle; import android.view.View; import androi...
/* * author: saad ali * rearchitecture and programming: saad ali, prajwol * validation: sharique */ package org.nebula.activities; public class Register extends Activity { public static final int REGISTER_SUCCESSFULL = 11; public static final int REGISTER_FAILURE = 10; private EditText fullName;...
MyIdentity myIdentity = NebulaApplication.getInstance()
1
mini2Dx/miniscript
core/src/main/java/org/mini2Dx/miniscript/core/ScriptExecutionTask.java
[ "public class ScriptSkippedException extends RuntimeException {\n\tprivate static final long serialVersionUID = -7901574884568506426L;\n\n}", "public class ScriptBeginNotification implements ScriptNotification {\n\tprivate final AtomicBoolean processed = new AtomicBoolean(false);\n\tprivate final ScriptInvocation...
import java.util.concurrent.atomic.AtomicBoolean; import org.mini2Dx.miniscript.core.exception.ScriptSkippedException; import org.mini2Dx.miniscript.core.notification.ScriptBeginNotification; import org.mini2Dx.miniscript.core.notification.ScriptExceptionNotification; import org.mini2Dx.miniscript.core.notification.Scr...
/** * The MIT License (MIT) * * Copyright (c) 2016 Thomas Cashman * * 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...
.offer(new ScriptSkippedNotification(scriptInvocationListener, script.getId()));
3
magmaOffenburg/magmaChallenge
srcTools/magma/tools/benchmark/view/bench/passingchallenge/PassingBenchmarkTableView.java
[ "public interface IModelReadOnly {\n\t/**\n\t * @return the results per team\n\t */\n\tList<ITeamResult> getTeamResults();\n\n\tboolean isRunning();\n\n\tList<TeamConfiguration> loadConfigFile(File file) throws InvalidConfigFileException;\n\n\tvoid attach(IObserver<IModelReadOnly> observer);\n\n\t/**\n\t * Removes ...
import java.util.ArrayList; import java.util.List; import javax.swing.JTable; import javax.swing.ListSelectionModel; import javax.swing.table.DefaultTableModel; import magma.tools.benchmark.model.IModelReadOnly; import magma.tools.benchmark.model.ITeamResult; import magma.tools.benchmark.model.TeamConfiguration; import...
package magma.tools.benchmark.view.bench.passingchallenge; public class PassingBenchmarkTableView extends BenchmarkTableView { public static PassingBenchmarkTableView getInstance(IModelReadOnly model, String startScriptFolder) { PassingBenchmarkTableView view = new PassingBenchmarkTableView(model, startScriptFold...
List<ITeamResult> teamResults = model.getTeamResults();
1
gtomato/carouselview
carouselview/src/main/java/com/gtomato/android/ui/widget/CarouselView.java
[ "public class CarouselLayoutManager extends RecyclerView.LayoutManager {\n\tprivate static final String TAG = CarouselLayoutManager.class.getSimpleName();\n\n\tpublic final static ViewTransformer DEFAULT_TRANSFORMER = new ImmutableTransformer(new LinearViewTransformer());\n\tpublic final static CarouselView.Scrolle...
import android.content.Context; import android.support.v4.view.MotionEventCompat; import android.support.v7.widget.RecyclerView; import android.util.AttributeSet; import android.util.Log; import android.view.MotionEvent; import android.view.View; import com.gtomato.android.ui.manager.CarouselLayoutManager; import com.g...
throw new UnsupportedOperationException("setOnScrollListener(RecyclerView.OnScrollListener) is not supported, use setOnScrollListener(CarouselView.OnScrollListener) instead."); } /** * Set an OnItemSelectedListener. * @param onItemSelectedListener * @return this */ public CarouselView setOnItemSelectedLis...
setTransformerInternal(new LinearViewTransformer());
3
dotcool/coolreader
src/com/dotcool/reader/task/RelinkImagesTask.java
[ "public class LNReaderApplication extends FOCApplication {\n\tprivate static final String TAG = LNReaderApplication.class.toString();\n\tprivate static NovelsDao novelsDao = null;\n\tprivate static DownloadListActivity downloadListActivity = null;\n\tprivate static UpdateService service = null;\n\tprivate static LN...
import java.io.File; import java.util.ArrayList; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import android.os.AsyncTask; import android.util.Log; import com.dotcool.reader.LNReaderApplication; import com.dotcool.R; import com.dotcool.reader...
package com.dotcool.reader.task; public class RelinkImagesTask extends AsyncTask<Void, ICallbackEventData, Void> implements ICallbackNotifier { private static final String TAG = RelinkImagesTask.class.toString(); private final String rootPath; private ICallbackNotifier callback; private String source; private...
publishProgress(new CallbackEventData(message));
1
tim-group/karg
src/test/java/com/timgroup/karg/examples/RecordTypeExample.java
[ "public static final Keyword<String> DISPLAY_NAME = newKeyword();", "public interface Keyword<T> extends KeywordArgumentsLens<T> {\n\n KeywordArguments metadata();\n KeywordArgument of(T value);\n T from(KeywordArguments keywordArguments);\n T from(KeywordArguments keywordArguments, T defaultValue);\n...
import static com.timgroup.karg.keywords.Keywords.DISPLAY_NAME; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import java.util.List; import java.util.Map; import org.hamcrest.Matcher; import org.hamcrest.Matchers; import org.junit.Test; import com.google.common.collect.Lis...
package com.timgroup.karg.examples; public class RecordTypeExample { private static abstract class RecordType { // Metadata keywords used to tag keywords that will identify data columns used by a record type. public static final Keyword<String> COLUMN_NAME = Keywords.newKeyword()...
DISPLAY_NAME.of("Alternative Reference"),
0
SQiShER/java-object-diff
src/main/java/de/danielbechler/diff/access/CollectionItemAccessor.java
[ "public class EqualsIdentityStrategy implements IdentityStrategy\n{\n\tprivate static final EqualsIdentityStrategy instance = new EqualsIdentityStrategy();\n\n\tpublic boolean equals(final Object working, final Object base)\n\t{\n\t\treturn Objects.isEqual(working, base);\n\t}\n\n\tpublic static EqualsIdentityStrat...
import de.danielbechler.diff.identity.EqualsIdentityStrategy; import de.danielbechler.diff.identity.IdentityStrategy; import de.danielbechler.diff.selector.CollectionItemElementSelector; import de.danielbechler.diff.selector.ElementSelector; import de.danielbechler.util.Assert; import java.util.Collection; import java....
/* * Copyright 2012 Daniel Bechler * * 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 i...
public ElementSelector getElementSelector()
3
unofficial/npr-android-app
src/org/npr/android/news/PlaybackService.java
[ "public class M3uParser implements PlaylistParser {\n private final BufferedReader reader;\n\n public M3uParser(File file) throws FileNotFoundException {\n this.reader = new BufferedReader(new FileReader(file), 1024);\n }\n\n @Override\n public List<String> getUrls() {\n LinkedList<String> urls = new Lin...
import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; import android.content.ContentUris; import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.m...
// This file was not good and MediaPlayer quit Log.w(LOG_TAG, "MediaPlayer refused to play current item. Bailing on prepare."); } } cleanup(); if (onCompletionListener != null) { onCompletionListener.onCompletion(mp); } if (playlistUrls != null && playl...
PlaylistParser parser;
2
bkueng/clash_of_balls
src/com/sapos_aplastados/game/clash_of_balls/menu/PopupGameStart.java
[ "public class Font2D implements IDrawable {\n\n\tprivate static final String LOG_TAG = \"Font2D\";\n\t\n\tprivate Texture m_texture;\n\tprivate Vector m_text_field_size;\n\t\n\tprivate Typeface m_typeface;\n\tprivate String m_string;\n\tprivate int m_font_size;\n\tprivate TextAlign m_align;\n\tprivate float m_color...
import com.sapos_aplastados.game.clash_of_balls.game.Vector; import org.jbox2d.dynamics.BodyDef; import org.jbox2d.dynamics.World; import android.content.Context; import android.graphics.Typeface; import com.sapos_aplastados.game.clash_of_balls.R; import com.sapos_aplastados.game.clash_of_balls.Font2D; import com.sapos...
/* * Copyright (C) 2012-2013 Hans Hardmeier <hanshardmeier@gmail.com> * Copyright (C) 2012-2013 Andrin Jenal * Copyright (C) 2012-2013 Beat Küng <beat-kueng@gmx.net> * * 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 * ...
private Vector m_timeout_font_pos;
6
FedUni/caliko
caliko-demo/src/main/java/au/edu/federation/caliko/demo3d/RotorConstrainedBaseBones.java
[ "public class FabrikBone3D implements FabrikBone<Vec3f,FabrikJoint3D>, Serializable\r\n{\r\n\tprivate static final long serialVersionUID = 1L;\r\n\t\r\n\t/** A line separator for the current system running this code. */\r\n\tprivate static final String NEW_LINE = System.lineSeparator();\r\n\t\r\n\t/** The minimum v...
import au.edu.federation.caliko.FabrikBone3D; import au.edu.federation.caliko.FabrikChain3D; import au.edu.federation.caliko.FabrikStructure3D; import au.edu.federation.caliko.FabrikChain3D.BaseboneConstraintType3D; import au.edu.federation.utils.Colour4f; import au.edu.federation.utils.Mat4f; import au.edu.federation....
package au.edu.federation.caliko.demo3d; /** * @author jsalvo */ public class RotorConstrainedBaseBones extends CalikoDemoStructure3D { @Override public void setup() {
this.structure = new FabrikStructure3D("Demo 3 - Rotor Constrained Base Bones");
2
xbynet/crawler
crawler-core/src/test/java/net/xby1993/crawler/QiushibaikeCrawler.java
[ "public abstract class Processor implements Closeable{\n\tprivate FileDownloader fileDownloader=null;\n\tprivate Spider spider=null;\n\t\n\tpublic abstract void process(Response resp);\n\t\n\tpublic boolean download(Request req,String savePath){\n\t\treturn fileDownloader.download(req, savePath);\n\t}\n\tpublic boo...
import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import ...
package net.xby1993.crawler; public class QiushibaikeCrawler extends Processor{ @Override public void process(Response resp) { String currentUrl=resp.getRequest().getUrl();
JsoupParser parser=resp.html();
4
CreativeMD/EnhancedVisuals
src/main/java/team/creative/enhancedvisuals/client/VisualManager.java
[ "@Mod(modid = EnhancedVisuals.MODID, name = EnhancedVisuals.NAME, version = EnhancedVisuals.VERSION, acceptedMinecraftVersions = \"\", dependencies = \"required-after:creativecore\", guiFactory = \"team.creative.enhancedvisuals.client.EVSettings\")\npublic class EnhancedVisuals {\n\t\n\tpublic static final String M...
import java.awt.Color; import java.util.Collection; import java.util.Iterator; import java.util.Random; import javax.annotation.Nullable; import com.creativemd.creativecore.common.config.premade.IntMinMax; import com.creativemd.creativecore.common.config.premade.curve.Curve; import com.creativemd.creativecore.common.co...
package team.creative.enhancedvisuals.client; public class VisualManager { private static Minecraft mc = Minecraft.getMinecraft(); public static Random rand = new Random(); private static HashMapList<VisualCategory, Visual> visuals = new HashMapList<>(); public static void onTick(@Nullabl...
for (VisualHandler handler : VisualRegistry.handlers()) {
7
google/Accessibility-Test-Framework-for-Android
src/main/java/com/google/android/apps/common/testing/accessibility/framework/suggestions/ExpandViewSizeFixSuggestionProducer.java
[ "public class AccessibilityHierarchyCheckResult extends AccessibilityCheckResult {\n\n private final int resultId;\n private final @Nullable ViewHierarchyElement element;\n private final @Nullable ResultMetadata metadata;\n private final ImmutableList<Answer> answers;\n\n /**\n * Constructor when there are {...
import com.google.android.apps.common.testing.accessibility.framework.AccessibilityHierarchyCheckResult; import com.google.android.apps.common.testing.accessibility.framework.Parameters; import com.google.android.apps.common.testing.accessibility.framework.ResultMetadata; import com.google.android.apps.common.testing.a...
package com.google.android.apps.common.testing.accessibility.framework.suggestions; /** * Produces a {@link FixSuggestion} which suggests expanding the culprit View's size to fix a small * touch target size issue. * * <p>The produced fix suggestion can either be a {@link SetViewAttributeFixSuggestion} if only one...
DisplayInfo defaultDisplay = hierarchy.getDeviceState().getDefaultDisplayInfo();
7
antelink/SourceSquare
src/test/java/com/antelink/sourcesquare/results/TreeMapBuilderIT.java
[ "public class SourceSquareResults {\n\n private TreemapNode rootNode;\n\n private Collection<Badge> badges;\n\n private int nodeLevel;\n\n public SourceSquareResults() {\n super();\n }\n\n public TreemapNode getRootNode() {\n return this.rootNode;\n }\n\n public void setRootNod...
import org.junit.Ignore; import org.junit.Test; import com.antelink.sourcesquare.SourceSquareResults; import com.antelink.sourcesquare.client.scan.SourceSquareEngine; import com.antelink.sourcesquare.client.scan.SourceSquareFSWalker; import com.antelink.sourcesquare.event.base.EventBus; import com.antelink.sourcesquare...
/** * Copyright (C) 2009-2012 Antelink SAS * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License Version 3 as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but WITHO...
final SourceSquareFSWalker walker = new SourceSquareFSWalker(engine, eventBus, builder);
2
cckevincyh/SafeChatRoom
SafeChat_Room/src/chat_room/client/backstage/ClienManage.java
[ "public class Message implements Serializable{\n\tprivate String MessageType;\n\tprivate String Content;\n\tprivate String Time;\n\tprivate String Sender;\n\tprivate String Getter;\n\tprivate byte[] Key;\t//秘钥\n\t\n\t\n\t\n\tpublic Message(String messageType, String sender, byte[] key) {\n\t\tsuper();\n\t\tMessageT...
import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.EOFException; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileWriter; impor...
} return mess; } /** * 发送信息的方法 * @param mess 信息 */ public void SendMessage(Message mess){ if(s!=null){ try { /************加密****************/ //发送消息之前需要加密 EncryptionUtils.encryptMessage("publicKey.key", mess); /************加密****************/ os = new ObjectOutputStream(s.ge...
DecryptionUtils.decryptFileKey(mess);
4
ykaragol/checkersmaster
CheckersMaster/test/checkers/algorithm/TestGreedyAlgorithm.java
[ "public class CalculationContext{\r\n\r\n\tprivate int depth;\r\n\tprivate Player player;\r\n\tprivate IEvaluation evaluationFunction;\r\n\tprivate ISuccessor successorFunction;\r\n\tprivate IAlgorithm algorithm;\r\n\r\n\r\n\tpublic void setDepth(int depth) {\r\n\t\tthis.depth = depth;\r\n\t}\r\n\r\n\tpublic int ge...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import org.junit.Before; import org.junit.Test; import checkers.domain.CalculationContext; import checkers.domain.Model; import checkers.domain.Move; import checkers.domain.Playe...
package checkers.algorithm; public class TestGreedyAlgorithm { private GreedyAlgorithm algorithm; private CalculationContext context; private Model model; private MenCountEvaluation evaluation; @Before public void setUp() throws Exception { algorithm = new GreedyAlgorithm(); context = new...
Successors successors = new Successors();
5