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
palominolabs/benchpress
worker-core/src/main/java/com/palominolabs/benchpress/worker/SliceRunner.java
[ "@Immutable\npublic final class JobSlice {\n private final UUID jobId;\n private final int sliceId;\n private final Task task;\n private final String progressUrl;\n private final String finishedUrl;\n\n @JsonCreator\n public JobSlice(@JsonProperty(\"jobId\") UUID jobId, @JsonProperty(\"sliceId\...
import com.fasterxml.jackson.databind.ObjectReader; import com.google.inject.Inject; import com.google.inject.Singleton; import com.palominolabs.benchpress.ipc.Ipc; import com.palominolabs.benchpress.job.json.JobSlice; import com.palominolabs.benchpress.job.task.ComponentFactory; import com.palominolabs.benchpress.job....
package com.palominolabs.benchpress.worker; @Singleton @ThreadSafe public final class SliceRunner { private static final Logger logger = LoggerFactory.getLogger(SliceRunner.class); private final ExecutorService executorService = Executors.newCachedThreadPool(); private final CompletionService<Void> com...
private final TaskProgressClient taskProgressClient;
5
jurihock/voicesmith
voicesmith/src/de/jurihock/voicesmith/threads/DetuneThread.java
[ "public enum FrameType\n{\n\tLarge(2),\n\tDefault(1),\n\tMedium(1 / 2D),\n\tSmall(1 / 4D);\n\n\tpublic final double\tratio;\n\n\tprivate FrameType(double ratio)\n\t{\n\t\tthis.ratio = ratio;\n\t}\n}", "public final class Preferences\n{\n\t// TODO: Try different audio sources\n\t// public static final int PCM_IN_S...
import android.content.Context; import de.jurihock.voicesmith.FrameType; import de.jurihock.voicesmith.Preferences; import de.jurihock.voicesmith.Utils; import de.jurihock.voicesmith.dsp.processors.DetuneProcessor; import de.jurihock.voicesmith.dsp.stft.StftPostprocessor; import de.jurihock.voicesmith.dsp.stft.StftPrep...
/* * Voicesmith <http://voicesmith.jurihock.de/> * * Copyright (c) 2011-2014 Juergen Hock * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your...
FrameType frameType = FrameType.Medium;
0
ZSCNetSupportDept/WechatTicketSystem
src/main/java/love/sola/netsupport/wechat/handler/SubscribeHandler.java
[ "public class Attribute {\n\n public static final String AUTHORIZED = \"authorized\";\n public static final String WECHAT = \"wechat\";\n public static final String OPERATOR = \"operator\";\n public static final String USER = \"user\";\n\n}", "@Entity\n@Table(name = \"operators\")\npublic class Operat...
import me.chanjar.weixin.mp.api.WxMpService; import me.chanjar.weixin.mp.bean.WxMpXmlMessage; import me.chanjar.weixin.mp.bean.WxMpXmlOutMessage; import me.chanjar.weixin.mp.bean.outxmlbuilder.TextBuilder; import static love.sola.netsupport.config.Lang.format; import java.util.Map; import love.sola.netsupport.enums.Att...
/* * This file is part of WechatTicketSystem. * * WechatTicketSystem is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * *...
User u = TableUser.getByWechat(fromUser);
2
NudgeApm/nudge-elasticstack-connector
src/main/java/org/nudge/elasticstack/context/elasticsearch/builder/TransactionSerializer.java
[ "public class Configuration {\n\n\tprivate static final Logger LOG = Logger.getLogger(Configuration.class);\n\n\t// Configuration files\n\tprivate static final String CONF_FILE = \"nudge-elastic.properties\";\n\tprivate static final String NUDGE_URL = \"nudge.url\";\n\tprivate static final String NUDGE_API_TOKEN = ...
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import org.apache.log4j.Logger; import org.nudge.elasticstack.Configuration; import org.nudge.elasticstack.context.elasticsearch.bean.BulkFormat; imp...
package org.nudge.elasticstack.context.elasticsearch.builder; /** * Serialize Nudge transaction into JSON object. */ public class TransactionSerializer { private static final Logger LOG = Logger.getLogger(TransactionSerializer.class.getName()); private static final String lineBreak = "\n"; private Configuratio...
public List<LayerEvent> buildLayerEvents(List<LayerDTO> rawdataLayers, TransactionEvent transactionEvent)
7
jmcampanini/gexf4j-core
src/test/java/com/ojn/gexf4j/core/impl/data/AttributeValueImplTest.java
[ "public interface Attribute {\n\n\tString getId();\n\t\n\tString getTitle();\n\tAttribute setTitle(String title);\n\t\n\tAttributeType getAttributeType();\n\t\n\tboolean hasDefaultValue();\n\tAttribute clearDefaultValue();\n\tString getDefaultValue();\n\tAttribute setDefaultValue(String defaultValue);\n\t\n\tList<S...
import java.util.UUID; import com.ojn.gexf4j.core.data.Attribute; import com.ojn.gexf4j.core.data.AttributeClass; import com.ojn.gexf4j.core.data.AttributeType; import com.ojn.gexf4j.core.data.AttributeValue; import com.ojn.gexf4j.core.data.AttributeValueTest;
package com.ojn.gexf4j.core.impl.data; public class AttributeValueImplTest extends AttributeValueTest { @Override
protected Attribute newAttribute() {
0
wrey75/WaveCleaner
src/main/java/com/oxande/xmlswing/components/JTreeUI.java
[ "public class AttributeDefinition {\r\n\t\r\n\tpublic final static Map<String, String> ALIGNS = new HashMap<String, String>();\r\n\tpublic final static Map<String, String> CLOSE_OPERATIONS = new HashMap<String, String>();\r\n\tpublic final static Map<String, String> CURSORS = new HashMap<String, String>();\r\n\tpub...
import javax.swing.JTree; import org.w3c.dom.Element; import com.oxande.xmlswing.AttributeDefinition; import com.oxande.xmlswing.AttributesController; import com.oxande.xmlswing.Parser; import com.oxande.xmlswing.AttributeDefinition.ClassType; import com.oxande.xmlswing.UnexpectedTag; import com.oxande.xmlswing....
package com.oxande.xmlswing.components; public class JTreeUI extends JComponentUI { public static final String TAGNAME = "tree"; public static final AttributeDefinition[] PROPERTIES = { DRAGGABLE_ATTRIBUTE_DEF, new AttributeDefinition( "editable", "setEditable", ClassType.BOOLEAN ), new...
public String parse(JavaClass jclass, JavaMethod initMethod, Element root ) throws UnexpectedTag{
6
javaBin/AndroiditoJZ12
android/src/main/java/com/google/android/apps/iosched/ui/VendorsFragment.java
[ "public class ScheduleContract {\n\n /**\n * Special value for {@link SyncColumns#UPDATED} indicating that an entry\n * has never been updated, or doesn't exist yet.\n */\n public static final long UPDATED_NEVER = -2;\n\n /**\n * Special value for {@link SyncColumns#UPDATED} indicating that...
import no.java.schedule.R; import com.google.android.apps.iosched.provider.ScheduleContract; import com.google.android.apps.iosched.util.UIUtils; import com.actionbarsherlock.app.SherlockListFragment; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.database.Cur...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
private static final String TAG = makeLogTag(VendorsFragment.class);
3
aw20/MongoWorkBench
src/org/aw20/mongoworkbench/eclipse/view/MSystemJavaScript.java
[ "public class EventWorkBenchManager extends Object {\n\tprivate static EventWorkBenchManager thisInst;\n\t\n\tpublic static synchronized EventWorkBenchManager getInst(){\n\t\tif ( thisInst == null )\n\t\t\tthisInst = new EventWorkBenchManager();\n\n\t\treturn thisInst;\n\t}\n\n\tprivate Set<EventWorkBenchListener>\...
import java.io.IOException; import org.aw20.mongoworkbench.EventWorkBenchManager; import org.aw20.mongoworkbench.MongoCommandListener; import org.aw20.mongoworkbench.MongoFactory; import org.aw20.mongoworkbench.command.MongoCommand; import org.aw20.mongoworkbench.command.SystemJavaScriptReadCommand; import org.aw20.mon...
/* * MongoWorkBench is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * Free Software Foundation,version 3. * * MongoWorkBench is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implie...
private SystemJavaScriptReadCommand readCommand;
4
Samistine/BloodMoon
src/main/java/uk/co/jacekk/bukkit/bloodmoon/feature/world/ExtendedNightListener.java
[ "public final class BloodMoon extends BasePlugin {\n\n public static boolean DEBUG = false;\n\n private ArrayList<String> activeWorlds;\n private HashMap<String, PluginConfig> worldConfig;\n protected ArrayList<String> forceWorlds;\n\n @Override\n public void onEnable() {\n super.onEnable(t...
import java.util.ArrayList; import java.util.HashMap; import org.bukkit.World; import org.bukkit.entity.EntityType; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.entity.EntityDeathEvent; import uk.co.jacekk.bukkit.baseplugin.config.PluginConfig; import uk.co.jacekk...
package uk.co.jacekk.bukkit.bloodmoon.feature.world; public class ExtendedNightListener extends BaseListener<BloodMoon> { private final HashMap<String, Integer> killCount = new HashMap<>(); private final ArrayList<EntityType> hostileTypes = new ArrayList<EntityType>() { { add(EntityType...
public void onStart(BloodMoonStartEvent event) {
4
b0noI/AIF2
src/main/java/io/aif/language/sentence/splitters/AbstractSentenceSplitter.java
[ "@FunctionalInterface\npublic interface ISplitter<T1, T2> extends Function<T1, List<T2>> {\n\n public List<T2> split(final T1 target);\n\n @Override\n public default List<T2> apply(final T1 t1) {\n return split(t1);\n }\n}", "public interface ISettings {\n\n @Deprecated\n public ISettings SETTINGS = Guic...
import com.google.common.annotations.VisibleForTesting; import com.google.inject.Guice; import org.apache.log4j.Logger; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.stream.Co...
package io.aif.language.sentence.splitters; public abstract class AbstractSentenceSplitter implements ISplitter<List<String>, List<String>> { private static final Logger logger = Logger.getLogger(AbstractSentenceSplitter.class); private final ISeparatorExtractor sentenceSeparatorExtractor; private final I...
final ISettings settings = Guice.createInjector(new SettingsModule()).getInstance(ISettings.class);
2
free-iot/freeiot-android
app/src/main/java/com/pandocloud/freeiot/ui/helper/ProductInfoHelper.java
[ "public class ProductApi extends AbsOpenApi {\n\t\n\t/**\n\t * get product info\n\t */\n\tprivate static final String PRODUCT_INFO = \"/v1/product/info\";\n\t\n\n\t/**\n\t * get product information by product key\n\t * \n\t * <p>Method: GET</p>\n\t * @param context\n\t * @param productKey\n\t * @param responseHandl...
import com.pandocloud.android.api.interfaces.RequestListener; import com.pandocloud.freeiot.api.ProductApi; import com.pandocloud.freeiot.ui.app.AppConstants; import com.pandocloud.freeiot.ui.app.ProductInfoPrefs; import com.pandocloud.freeiot.ui.bean.ProductInfo; import com.pandocloud.freeiot.ui.bean.http.ProductInfoR...
package com.pandocloud.freeiot.ui.helper; public class ProductInfoHelper { private RequestListener listener; public ProductInfoHelper(RequestListener listener) { if (listener == null) { throw new IllegalArgumentException("ReuqestListener not allow be null..."); } this.listener = listener; } pub...
ProductInfoPrefs.Builder builder = new ProductInfoPrefs.Builder(context);
2
steevp/UpdogFarmer
app/src/main/java/com/steevsapps/idledaddy/LoginActivity.java
[ "public class PrefsManager {\n private final static int CURRENT_VERSION = 2;\n\n private final static String USERNAME = \"username\";\n private final static String PASSWORD = \"password\";\n private final static String LOGIN_KEY = \"login_key\";\n private final static String SENTRY_HASH = \"sentry_ha...
import androidx.lifecycle.Observer; import androidx.lifecycle.ViewModelProviders; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import androidx.annotation.Nullable; import androidx.coordinatorlayout...
package com.steevsapps.idledaddy; public class LoginActivity extends BaseActivity { private final static String TAG = LoginActivity.class.getSimpleName(); private final static String LOGIN_IN_PROGRESS = "LOGIN_IN_PROGRESS"; private final static String TWO_FACTOR_REQUIRED = "TWO_FACTOR_REQUIRED"; ...
twoFactorEditText.setText(SteamGuard.generateSteamGuardCodeForTime(Utils.getCurrentUnixTime() + timeDifference));
4
Idrinth/WARAddonClient
src/main/java/de/idrinth/waraddonclient/model/addon/UnknownAddon.java
[ "public class Utils {\r\n\r\n private Utils() {\r\n }\r\n\r\n public static void emptyFolder(File folder) throws IOException {\r\n if (folder == null || !folder.exists()) {\r\n return;\r\n }\r\n for (File file : Objects.requireNonNull(folder.listFiles())) {\r\n if...
import de.idrinth.waraddonclient.Utils; import de.idrinth.waraddonclient.model.InvalidArgumentException; import de.idrinth.waraddonclient.service.Config; import de.idrinth.waraddonclient.service.ProgressReporter; import de.idrinth.waraddonclient.service.logger.BaseLogger; import de.idrinth.waraddonclient.service.R...
package de.idrinth.waraddonclient.model.addon; public class UnknownAddon implements Addon { private boolean hasSettings = false; private String file = ""; private String reason = ""; private String url = ""; private String name; private String installed = "-"; p...
public void uninstall(ProgressReporter reporter) {
3
grt192/grtframework
src/sensor/base/GRTDriverStation.java
[ "public abstract class Sensor extends GRTLoggedProcess {\n\n //Constants\n public static final double TRUE = 1.0;\n public static final double FALSE = 0.0;\n public static final double ERROR = Double.NaN;\n //Instance variables\n private final Vector stateChangeListeners; //Collection of things ...
import core.Sensor; import event.events.DrivingEvent; import event.events.ShiftEvent; import event.listeners.DrivingListener; import event.listeners.ShiftListener; import java.util.Enumeration; import java.util.Vector;
package sensor.base; /** * Superclass for all DriverStations. * * @author ajc */ public abstract class GRTDriverStation extends Sensor { /* * State Keys */ public static final int KEY_LEFT_VELOCITY = 0; public static final int KEY_RIGHT_VELOCITY = 1; public static final int KEY_LEFT_SHI...
ShiftEvent sev;
2
taoneill/war
war/src/main/java/com/tommytony/war/command/SetCapturePointCommand.java
[ "public class War extends JavaPlugin {\n\tstatic final boolean HIDE_BLANK_MESSAGES = true;\n\tpublic static War war;\n\tprivate static ResourceBundle messages = ResourceBundle.getBundle(\"messages\");\n\tprivate final List<OfflinePlayer> zoneMakerNames = new ArrayList<>();\n\tprivate final List<String> commandWhite...
import com.tommytony.war.War; import com.tommytony.war.Warzone; import com.tommytony.war.config.TeamKind; import com.tommytony.war.mapper.WarzoneYmlMapper; import com.tommytony.war.structure.CapturePoint; import com.tommytony.war.structure.Monument; import org.bukkit.command.CommandSender; import org.bukkit.entity.Play...
package com.tommytony.war.command; /** * Sets a capture point * * @author Connor Monahan */ public class SetCapturePointCommand extends AbstractZoneMakerCommand { public SetCapturePointCommand(WarCommandHandler handler, CommandSender sender, String[] args) throws NotZoneMakerException { super(handler, sender,...
CapturePoint cp = zone.getCapturePoint(this.args[0]);
4
teisun/Android-SunmiLauncher
U3DLauncherPlugin/src/sunmi/launcher/LauncherActivity.java
[ "public class Adaptation{\n\n\tpublic static final int NOTE1 = 1;\n\t\n\tpublic static int screenHeight=0;\n\tpublic static int screenWidth=0;\n\tpublic static float screenDensity=0;\n\tpublic static int densityDpi = 0;\n\tpublic static int version = Integer.valueOf(android.os.Build.VERSION.SDK_INT);\n\t\n\tpublic ...
import java.io.File; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; import java.util.Random; import sunmi.launcher.utils.Adaptation; import sunmi.launcher.utils.BitmapUtils; import sunmi.launcher.utils.DeviceUtitls; import sunmi.launcher.utils.FileUtils; import sunmi.launcher.utils.Lo...
package sunmi.launcher; /** * * TODO主页面 * * @author xuron * @versionCode 1 <1> */ @SuppressLint("NewApi") public class LauncherActivity extends UnityPlayerActivity { //public class LauncherActivity extends Activity { private static final String TAG = "LauncherActivity";
private static final String ICON_FOLDER = FileUtils.getSDCardPath()+"/launcher_icon/";
3
BlochsTech/BitcoinCardTerminal
src/com/blochstech/bitcoincardterminal/ViewModel/ViewStateManagers/MessageManager.java
[ "public class MainActivity extends FragmentActivity {\n\t\n\tprivate NfcAdapter mAdapter;\n\tprivate PendingIntent mPendingIntent;\n\tprivate String[][] techListsArray;\n\t\n\tpublic static MainActivity instance;\n\t\n\tpublic static Context GetMainContext(){\n\t\tContext res = instance != null ? instance.getApplic...
import java.util.LinkedList; import java.util.Queue; import com.blochstech.bitcoincardterminal.MainActivity; import com.blochstech.bitcoincardterminal.Interfaces.Message; import com.blochstech.bitcoincardterminal.Interfaces.Message.MessageType; import com.blochstech.bitcoincardterminal.Model.Model; import com.blochstec...
package com.blochstech.bitcoincardterminal.ViewModel.ViewStateManagers; //The core idea is to avoid any one View having to know all the other Views in order to update say a global status icon, //message or page number.. public class MessageManager { //Singleton pattern: private static MessageManager instance = n...
if(msg != null && !msg.isEmpty() && (Tags.DEBUG || isError)){
5
optimaize/command4j
src/test/java/com/optimaize/command4j/ext/extensions/exception/exceptiontranslation/ExceptionTranslationExtensionTest.java
[ "public interface CommandExecutor {\n\n /**\n * Executes it in the current thread, and blocks until it either finishes successfully or aborts by\n * throwing an exception.\n *\n * @param <A> argument\n * @param <R> Result\n */\n @NotNull\n <A, R> Optional<R> execute(@NotNull Command...
import com.optimaize.command4j.CommandExecutor; import com.optimaize.command4j.CommandExecutorBuilder; import com.optimaize.command4j.Mode; import com.optimaize.command4j.commands.BaseCommand; import com.optimaize.command4j.commands.ThrowUnsupportedOperation; import com.optimaize.command4j.ext.extensions.exception.Exce...
package com.optimaize.command4j.ext.extensions.exception.exceptiontranslation; /** * @author Fabian Kessler */ public class ExceptionTranslationExtensionTest { private static class MyException extends Exception { private MyException(String message, Throwable cause) { super(message, cause); ...
nakedExecutor.execute(cmd, Mode.create(), null);
2
goodow/realtime-channel
src/main/java/com/goodow/realtime/channel/impl/WebSocketBus.java
[ "@JsType\npublic interface Bus {\n String ON_OPEN = \"@realtime/bus/onOpen\";\n String ON_CLOSE = \"@realtime/bus/onClose\";\n String ON_ERROR = \"@realtime/bus/onError\";\n\n /**\n * Close the Bus and release all resources.\n */\n void close();\n\n /* The state of the Bus. */\n State getReadyState();\n\...
import com.goodow.realtime.channel.Bus; import com.goodow.realtime.channel.Message; import com.goodow.realtime.channel.State; import com.goodow.realtime.core.Handler; import com.goodow.realtime.core.Platform; import com.goodow.realtime.core.WebSocket; import com.goodow.realtime.json.Json; import com.goodow.realtime.jso...
/* * Copyright 2013 Goodow.com * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
subscribeLocal(Bus.ON_CLOSE, new Handler<Message<JsonObject>>() {
1
mguetlein/CheS-Mapper
src/main/java/org/chesmapper/view/gui/table/TreeView.java
[ "public class Cluster extends ZoomableCompoundGroup implements CompoundGroupWithProperties, DoubleNameElement,\r\n\t\tComparable<Cluster>\r\n{\r\n\tprivate ClusterData clusterData;\r\n\r\n\tHashMap<String, List<Compound>> compoundsOrderedByPropterty = new HashMap<String, List<Compound>>();\r\n\r\n\tprivate boolean ...
import java.awt.BorderLayout; import java.awt.Component; import java.awt.Graphics; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import javax.swing.Icon; import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JScrollPane; import javax.swing....
package org.chesmapper.view.gui.table; public class TreeView extends BlockableFrame { private static int ICON_W = 50; private static int ICON_H = 50;
protected ViewControler viewControler;
8
jiangqqlmj/Android-Universal-Image-Loader-Modify
sample/src/main/java/com/nostra13/universalimageloader/sample/fragment/ImageListFragment.java
[ "public final class DisplayImageOptions {\n /*图片正在加载过程中的图片*/\n\tprivate final int imageResOnLoading;\n\t/*图片地址为空,显示的图片*/\n\tprivate final int imageResForEmptyUri;\n\t/*图片加载失败,显示的图片*/\n\tprivate final int imageResOnFail;\n\t/*图片资源 正在加载的图片*/\n\tprivate final Drawable imageOnLoading;\n\t/*图片资源 图片地址为空情况*/\n\tprivate...
import android.content.Context; import android.graphics.Bitmap; import android.graphics.Color; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.w...
/******************************************************************************* * Copyright 2011-2014 Sergey Tarasevich * * 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....
ImageLoader.getInstance().displayImage(IMAGE_URLS[position], holder.image, options, animateFirstListener);
1
hawkular/hawkular-android-client
mobile/src/main/java/org/hawkular/client/android/fragment/AlertsFragment.java
[ "public final class HawkularApplication extends Application {\n\n public static Retrofit retrofit;\n private RefWatcher refWatcher;\n\n @Override\n public void onCreate() {\n super.onCreate();\n\n setUpLogging();\n setUpDetections();\n setUpPush();\n setUpLeakCanary();...
import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.Date; import java.util.List; import org.hawkular.client.android.HawkularApplication; import org.hawkular.client.android.R; import org.hawkular.client.android.activity.AlertDetailActivity; import org.hawkular.client.a...
/* * Copyright 2015-2017 Red Hat, Inc. and/or its affiliates * and other contributors as indicated by the @author tags. * * 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://w...
BackendClient.of(this).getAlerts(getAlertsTime(), Time.current(), null, new AlertsCallback(this));
1
feldim2425/OC-Minecarts
src/main/java/mods/ocminecart/client/ClientProxy.java
[ "public class ManualRegister {\n\t\n\tpublic static void registermanual(){\n\t\tManual.addProvider(new ResourceContentProvider(OCMinecart.MODID, \"doc/\"));\n\t\tManual.addProvider(new ManualPathProvider());\n\t\t\n\t\tManual.addTab(new ItemStackTabIconRenderer(new ItemStack(ModItems.item_ComputerCartCase,1,0)), \"...
import cpw.mods.fml.client.registry.RenderingRegistry; import mods.ocminecart.client.manual.ManualRegister; import mods.ocminecart.client.renderer.entity.ComputerCartRenderer; import mods.ocminecart.client.renderer.item.ComputerCartItemRenderer; import mods.ocminecart.common.CommonProxy; import mods.ocminecart.common.i...
package mods.ocminecart.client; public class ClientProxy extends CommonProxy { public void init(){ super.init(); RenderingRegistry.registerEntityRenderingHandler(ComputerCart.class, new ComputerCartRenderer());
MinecraftForgeClient.registerItemRenderer(ModItems.item_ComputerCart, new ComputerCartItemRenderer());
4
pakoito/SongkickInterview
app/src/main/java/com/pacoworks/dereference/screens/songkicklist/SongkickListPresenter.java
[ "public abstract class ZimplBasePresenter<T extends IUi, U extends ZimpleBaseState> {\n private final Class<U> stateClass;\n\n private final List<Subscription> pauseSubscriptions = new ArrayList<>();\n\n private final List<Subscription> destroySubscriptions = new ArrayList<>();\n\n @Inject\n @Getter(...
import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; import javax.inject.Inject; import rx.Observable; import rx.Subscription; import rx.android.schedulers.AndroidSchedulers; import rx.functions.Action1; import rx.functions.Func1; import rx.schedulers.Schedulers; import timber.log.Ti...
/* * Copyright (c) pakoito 2015 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distribute...
private Func1<SearchResult, Observable<List<Artist>>> toCorrectResult() {
2
dragonite-network/dragonite-java
dragonite-sdk/src/main/java/com/vecsight/dragonite/sdk/msg/types/HeartbeatMessage.java
[ "public class IncorrectMessageException extends DragoniteException {\n\n public IncorrectMessageException(final String msg) {\n super(msg);\n }\n\n}", "public final class DragoniteGlobalConstants {\n\n public static final String LIBRARY_VERSION = DragoniteBuildConfig.VERSION;\n\n public static ...
import com.vecsight.dragonite.sdk.exception.IncorrectMessageException; import com.vecsight.dragonite.sdk.misc.DragoniteGlobalConstants; import com.vecsight.dragonite.sdk.msg.MessageType; import com.vecsight.dragonite.sdk.msg.ReliableMessage; import com.vecsight.dragonite.utils.binary.BinaryReader; import com.vecsight.d...
/* * The Dragonite Project * ------------------------- * See the LICENSE file in the root directory for license information. */ package com.vecsight.dragonite.sdk.msg.types; public class HeartbeatMessage implements ReliableMessage { private static final byte VERSION = DragoniteGlobalConstants.PROTOCOL_VER...
final BinaryReader reader = new BinaryReader(msg);
4
saoj/mentabean
src/main/java/org/mentabean/sql/functions/Substring.java
[ "public interface Function extends HasParams {\n\t\n}", "public abstract class Parametrizable implements HasParams {\n\n\tprotected List<Param> params = new ArrayList<Param>();\n\t\n\tpublic abstract String name();\n\t\n\t@Override\n\tpublic Param[] getParams() {\n\t\treturn params.toArray(new Param[0]);\n\t}\n\t...
import org.mentabean.sql.Function; import org.mentabean.sql.Parametrizable; import org.mentabean.sql.param.Param; import org.mentabean.sql.param.ParamFunction; import org.mentabean.sql.param.ParamValue;
package org.mentabean.sql.functions; public class Substring extends Parametrizable implements Function { private Param str, beginIndex, endIndex; public Substring(Param str) { this.str = str; } public Substring endIndex(Param param) { endIndex = param; return this; } public Substring beginIndex(Par...
endIndex = new ParamFunction(new Length(str));
3
jaquadro/ForgeMods
HungerStrike/src/com/jaquadro/minecraft/hungerstrike/HungerStrike.java
[ "public class CommandHungerStrike extends CommandBase {\n\n @Override\n public String getCommandName () {\n return \"hungerstrike\";\n }\n\n @Override\n public int getRequiredPermissionLevel() {\n return 3;\n }\n\n @Override\n public String getCommandUsage (ICommandSender sende...
import com.jaquadro.minecraft.hungerstrike.command.CommandHungerStrike; import com.jaquadro.minecraft.hungerstrike.network.PacketPipeline; import com.jaquadro.minecraft.hungerstrike.network.SyncConfigPacket; import com.jaquadro.minecraft.hungerstrike.network.SyncExtendedPlayerPacket; import com.jaquadro.minecraft.hunge...
package com.jaquadro.minecraft.hungerstrike; @Mod(modid = HungerStrike.MOD_ID, name = HungerStrike.MOD_NAME, version = HungerStrike.MOD_VERSION) public class HungerStrike { public static final String MOD_ID = "hungerstrike"; static final String MOD_NAME = "Hunger Strike"; static final String MOD_VERSION =...
handler.registerCommand(new CommandHungerStrike());
0
xxonehjh/remote-files-sync
src/main/java/com/hjh/files/sync/server/SyncFileServerHandler.java
[ "public class HLogFactory {\n\n\tprivate static ILogFactory instance;\n\n\tpublic static boolean isInstanceNull() {\n\t\treturn null == instance;\n\t}\n\n\tprivate static ILog empty = new ILog() {\n\n\t\t@Override\n\t\tpublic void debug(String msg) {\n\t\t}\n\n\t\t@Override\n\t\tpublic void info(String msg) {\n\t\t...
import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; import org.apache.thrift.TException; import com.hjh.files.sync.common.HLogFactory; import com.hjh.files.sync.common.ILog; import com.hjh.files.sync.common.RemoteFile; import com.hjh.files.sync.common.util.RemoteFileUtil; import tutorial.Remo...
package com.hjh.files.sync.server; public class SyncFileServerHandler implements SyncFileServer.Iface { private static ILog logger = HLogFactory.create(ServerForSync.class); private ServerForSync sync; public SyncFileServerHandler(ServerForSync serverForSync) { this.sync = serverForSync; } @Override pub...
result.add(RemoteFileUtil.to(item));
3
maxanier/MinecraftSecondScreenMod
src/main/java/de/maxgb/minecraft/second_screen/data/ObservingManager.java
[ "public class JSONArray {\n\n\t/**\n\t * The arrayList where the JSONArray's properties are kept.\n\t */\n\tprivate final ArrayList myArrayList;\n\n\t/**\n\t * Construct an empty JSONArray.\n\t */\n\tpublic JSONArray() {\n\t\tthis.myArrayList = new ArrayList();\n\t}\n\n\t/**\n\t * Construct a JSONArray from a Colle...
import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import de.maxgb.minecraft.second_screen.Configs; import de.maxgb.minecraft.second_screen.util.Constants; import de.maxgb.minecraft.second_screen.util....
package de.maxgb.minecraft.second_screen.data; /** * Manages all observed blocks * Saves and loads them and makes sure that every player gets his private and the public block infos * @author Max * */ public class ObservingManager { private static final String TAG = "ObservingManager"; private ...
Logger.w(TAG, "No saved data found");
5
jmhertlein/MCTowns
src/main/java/cafe/josh/mctowns/TownManager.java
[ "public abstract class MCTownsRegion {\n\n private static final long serialVersionUID = \"MCTOWNSREGION\".hashCode(); // DO NOT CHANGE\n private static final int VERSION = 0;\n /**\n * The name of the region, the name of the world in which the region exists\n */\n protected volatile String name,...
import cafe.josh.mctowns.region.MCTownsRegion; import cafe.josh.mctowns.region.Plot; import cafe.josh.mctowns.region.Town; import cafe.josh.mctowns.region.TownLevel; import com.sk89q.worldguard.protection.managers.RegionManager; import com.sk89q.worldguard.protection.managers.storage.StorageException; import com.sk89q....
/* * Copyright (C) 2013 Joshua Michael Hertlein <jmhertlein@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later ve...
Territory t = new Territory(fullTerritoryName,
5
hypfvieh/bluez-dbus
bluez-dbus/src/main/java/org/bluez/mesh/Management1.java
[ "@SuppressWarnings(\"serial\")\npublic class BluezMeshAlreadyExistsException extends DBusException {\n\n public BluezMeshAlreadyExistsException(String _message) {\n super(_message);\n }\n\n}", "@SuppressWarnings(\"serial\")\npublic class BluezMeshBusyException extends DBusException {\n\n public Bl...
import java.util.Map; import org.bluez.exceptions.mesh.BluezMeshAlreadyExistsException; import org.bluez.exceptions.mesh.BluezMeshBusyException; import org.bluez.exceptions.mesh.BluezMeshDoesNotExistException; import org.bluez.exceptions.mesh.BluezMeshFailedException; import org.bluez.exceptions.mesh.BluezMeshInProgres...
package org.bluez.mesh; /** * File generated - 2020-12-28.<br> * Based on bluez Documentation: mesh-api.txt.<br> * <br> * <b>Service:</b> org.bluez.mesh<br> * <b>Interface:</b> org.bluez.mesh.Management1<br> * <br> * <b>Object path:</b><br> * /org/bluez/mesh/node&lt;uuid&gt;<br> * wh...
void UpdateAppKey(UInt16 _appIndex) throws BluezMeshFailedException, BluezMeshInvalidArgumentsException, BluezMeshDoesNotExistException, BluezMeshInProgressException;
4
SumoLogic/sumologic-jenkins-plugin
src/main/java/com/sumologic/jenkins/jenkinssumologicplugin/PluginDescriptorImpl.java
[ "public enum EventSourceEnum {\n\n PERIODIC_UPDATE(\"Periodic_Update\"),\n COMPUTER_ONLINE(\"Computer_Online\"),\n COMPUTER_OFFLINE(\"Computer_Offline\"),\n COMPUTER_TEMP_ONLINE(\"Computer_Temp_Online\"),\n COMPUTER_TEMP_OFFLINE(\"Computer_Temp_Offline\"),\n COMPUTER_PRE_ONLINE(\"Computer_Pre_Onli...
import com.google.gson.Gson; import com.sumologic.jenkins.jenkinssumologicplugin.constants.EventSourceEnum; import com.sumologic.jenkins.jenkinssumologicplugin.constants.LogTypeEnum; import com.sumologic.jenkins.jenkinssumologicplugin.metrics.SumoMetricDataPublisher; import com.sumologic.jenkins.jenkinssumologicplugin....
package com.sumologic.jenkins.jenkinssumologicplugin; /** * Sumo Logic plugin for Jenkins model. * Provides options to parametrize plugin. * <p> * Created by deven on 7/8/15. * Contributors: lukasz, Sourabh Jain */ @Extension public final class PluginDescriptorImpl extends BuildStepDescriptor<Publisher> { ...
Logger.getLogger("").removeHandler(SumoLogHandler.getInstance());
6
msokolov/lux
src/test/java/lux/junit/QueryTestCase.java
[ "public class QueryStats {\n /**\n * the number of documents that matched the lucene query. If XPath was executed (there wasn't\n * a short-circuited eval of some sort), this number of XML documents will have been retrieved\n * from the database and processed.\n */\n public int docCount;\n ...
import static org.junit.Assert.*; import java.io.StringReader; import java.util.ArrayList; import java.util.List; import lux.Compiler; import lux.Evaluator; import lux.QueryStats; import lux.XdmResultSet; import lux.exception.LuxException; import lux.support.SearchExtractor; import lux.xpath.AbstractExpression; import ...
package lux.junit; @Ignore class QueryTestCase { private final String name; private final String query; private final QueryTestResult expectedResult; QueryTestCase (String name, String query, QueryTestResult expected) { this.name = name; this.query = query; this.expect...
QueryStats stats = new QueryStats();
0
Spade-Editor/Spade
src/heroesgrave/spade/image/change/doc/NewLayer.java
[ "public class Document\n{\n\tpublic static int MAX_DIMENSION = 4096;\n\t\n\tprivate LinkedList<IDocChange> changes = new LinkedList<IDocChange>();\n\tprivate LinkedList<IDocChange> reverted = new LinkedList<IDocChange>();\n\t\n\tprivate int width, height;\n\tprivate File file;\n\tprivate Metadata info;\n\tprivate L...
import heroesgrave.spade.image.Document; import heroesgrave.spade.image.Layer; import heroesgrave.spade.image.RawImage; import heroesgrave.spade.image.change.IDocChange; import heroesgrave.spade.image.change.edit.ClearMaskChange; import heroesgrave.spade.main.Spade; import heroesgrave.utils.misc.Metadata;
// {LICENSE} /* * Copyright 2013-2015 HeroesGrave and other Spade developers. * * This file is part of Spade * * Spade is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, ...
public void apply(Document doc)
0
EndlessCodeGroup/RPGInventory
src/main/java/ru/endlesscode/rpginventory/pet/CooldownTimer.java
[ "public class RPGInventory extends PluginLifecycle {\n private static RPGInventory instance;\n\n private Permission perms;\n private Economy economy;\n\n private BukkitLevelSystem.Provider levelSystemProvider;\n private BukkitClassSystem.Provider classSystemProvider;\n\n private FileLanguage langu...
import org.bukkit.entity.Player; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.scheduler.BukkitRunnable; import ru.endlesscode.rpginventory.RPGInventory; import ru.endlesscode.rpginventory.inventory.InventoryManager; import ru....
/* * This file is part of RPGInventory. * Copyright (C) 2015-2017 Osip Fatkullin * * RPGInventory is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) a...
Slot petSlot = Objects.requireNonNull(SlotManager.instance().getPetSlot(), "Pet slot can't be null!");
2
firepick1/FireBOM
src/main/java/org/firepick/firebom/bom/BOM.java
[ "public interface IPartComparable extends Comparable<IPartComparable> {\n Part getPart();\n}", "public interface IRefreshableProxy {\n\n /**\n * Synchronize proxy with remote resource\n */\n void refresh();\n\n /**\n * A newly constructed proxy is not fresh until it is refreshed.\n * F...
import java.util.concurrent.ConcurrentSkipListSet; import org.firepick.firebom.IPartComparable; import org.firepick.firebom.IRefreshableProxy; import org.firepick.firebom.RefreshableTimer; import org.firepick.firebom.exception.ApplicationLimitsException; import org.firepick.firebom.part.Part; import org.firepick.firebo...
package org.firepick.firebom.bom; /* BOM.java Copyright (C) 2013 Karl Lew <karl@firepick.org>. All rights reserved. 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.apa...
private Part rootPart;
4
ktisha/Crucible4IDEA
src/com/jetbrains/crucible/ui/toolWindow/CruciblePanel.java
[ "public class CrucibleManager {\n private final Project myProject;\n private final Map<String, CrucibleSession> mySessions = new HashMap<String, CrucibleSession>();\n\n private static final Logger LOG = Logger.getInstance(CrucibleManager.class.getName());\n\n // implicitly constructed by pico container\n @Supp...
import com.intellij.ide.util.treeView.AbstractTreeBuilder; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.application.ModalityState; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.SimpleToolWindowPanel; ...
package com.jetbrains.crucible.ui.toolWindow; /** * User: ktisha * <p/> * Main code review panel */ public class CruciblePanel extends SimpleToolWindowPanel { private static final Logger LOG = Logger.getInstance(CruciblePanel.class.getName()); private final Project myProject; private final CrucibleReviewM...
columnModel.getColumn(1).setCellRenderer(new DescriptionCellRenderer());
3
Beloumi/PeaFactory
src/peafactory/gui/TextTypePanel.java
[ "public final class PeaFactory {\n\n\t// i18n: \t\n\tprivate static String language; \n\tprivate static Locale currentLocale;\n\tprivate static Locale defaultLocale = Locale.getDefault();\n\tprivate static ResourceBundle languageBundle;\n\tpublic static final Charset UTF_8 = Charset.forName(\"UTF-8\");\n\t\n\tpriva...
import javax.swing.border.LineBorder; import javax.swing.filechooser.FileNameExtensionFilter; import javax.swing.text.*; import javax.swing.text.rtf.RTFEditorKit; import cologne.eck.peafactory.PeaFactory; import cologne.eck.peafactory.peagen.*; import cologne.eck.peafactory.peas.editor_pea.EditorType; import cologne.ec...
package cologne.eck.peafactory.gui; /* * Peafactory - Production of Password Encryption Archives * Copyright (C) 2015 Axel von dem Bruch * * This library 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 Foundati...
} else if (dataType instanceof EditorType) {
1
MindscapeHQ/raygun4android
provider/src/main/java/com/raygun/raygun4android/RaygunClient.java
[ "public class RaygunLogger {\n\n public static void d(String string) {\n if (string != null) {\n Timber.tag(RaygunSettings.LOGGING_TAG).d(string);\n }\n }\n\n public static void i(String string) {\n if (string != null) {\n Timber.tag(RaygunSettings.LOGGING_TAG).i(...
import android.app.Activity; import android.app.Application; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.os.Bundle; import com.raygun.raygun4android.logging.RaygunLogger; import com.raygun.raygun4android.logging.TimberRaygunLoggerIm...
package com.raygun.raygun4android; /** * The official Raygun provider for Android. This is the main class that provides functionality for * automatically sending exceptions to the Raygun service. * * You should call init() on the static RaygunClient instance, passing in the application, instead * of instantiat...
RaygunLogger.d("Configuring Raygun4Android (v" + RaygunSettings.RAYGUN_CLIENT_VERSION + ")");
0
lrtdc/light_drtc
src/main/java/org/light/rtc/admin/AdminNodeKafkaRun.java
[ "@SuppressWarnings({\"cast\", \"rawtypes\", \"serial\", \"unchecked\"})\r\n@Generated(value = \"Autogenerated by Thrift Compiler (0.9.3)\", date = \"2016-03-16\")\r\npublic class TDssService {\r\n\r\n public interface Iface {\r\n\r\n public int addMqinfoToAdminQu(List<String> uLogs) throws org.apache.thrift.TEx...
import java.util.Timer; import org.apache.thrift.protocol.TCompactProtocol; import org.apache.thrift.server.TServer; import org.apache.thrift.server.TThreadPoolServer; import org.apache.thrift.transport.TServerSocket; import org.apache.thrift.transport.TServerTransport; import org.apache.thrift.transport.TTransportExce...
package org.light.rtc.admin; public class AdminNodeKafkaRun { /** * your self defending function for parsing your data stream logs * @param slp */ public void setSteamParser(StreamLogParser slp){ AdminNodeTimer.setStreamLogParser(slp); } private class DataCollect implements Runnable{ @Override publ...
System.out.println(ConfigProperty.getCurDateTime()+"......轻量级实时计算框架任务管理节点(通过Kafka整合CN)服务启动......");
5
elixsr/FwdPortForwardingApp
app/src/main/java/com/elixsr/portforwarder/ui/rules/EditRuleActivity.java
[ "public class FwdApplication extends MultiDexApplication {\n\n private static final String TAG = \"FwdApplication\";\n private Tracker mTracker;\n\n /**\n * Gets the default {@link Tracker} for this {@link Application}.\n *\n * @return tracker\n */\n synchronized public Tracker getDefaul...
import android.content.ContentValues; import android.content.DialogInterface; import android.content.Intent; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.support.design.widget.Snackbar; import android.support.design.widget.TextInputEditText; imp...
/* * Fwd: the port forwarding app * Copyright (C) 2016 Elixsr Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later versi...
if (!getIntent().getExtras().containsKey(RuleHelper.RULE_MODEL_ID)) {
5
weiboad/fiery
server/src/main/java/org/weiboad/ragnar/server/search/IndexSearchSharderManager.java
[ "@Component\n@ConfigurationProperties(prefix = \"fiery\")\npublic class FieryConfig {\n\n private int keepdataday;\n\n private String dbpath;\n\n private String indexpath;\n\n private Boolean kafkaenable;\n\n private String kafkaserver;\n\n private String kafkagroupid;\n\n private String mailfr...
import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.MultiReader; import org.apa...
package org.weiboad.ragnar.server.search; @Component @Scope("singleton") public class IndexSearchSharderManager { private Logger log; @Autowired private FieryConfig fieryConfig; //init private ConcurrentHashMap<String, Analyzer> analyzerList = new ConcurrentHashMap<>(); //Directory pr...
ArrayList<MetaLog> metalist = new ArrayList<MetaLog>();
1
jenkinsci/github-plugin
src/test/java/org/jenkinsci/plugins/github/webhook/WebhookManagerTest.java
[ "public class GitHubPushTrigger extends Trigger<Job<?, ?>> implements GitHubTrigger {\n\n @DataBoundConstructor\n public GitHubPushTrigger() {\n }\n\n /**\n * Called when a POST is made.\n */\n @Deprecated\n public void onPost() {\n onPost(GitHubTriggerEvent.create()\n ...
import com.cloudbees.jenkins.GitHubPushTrigger; import com.cloudbees.jenkins.GitHubRepositoryName; import com.google.common.base.Predicate; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; import hudson.model.FreeStyleProject; import h...
verify(manager, times(1)).serviceWebhookFor(HOOK_ENDPOINT); verify(manager, never()).webhookFor(HOOK_ENDPOINT); verify(manager, times(1)).fetchHooks(); } @Test @WithoutJenkins public void shouldMatchAdminAccessWhenTrue() throws Exception { when(repo.hasAdminAccess()).th...
GitHubPlugin.configuration().getConfigs().add(conf);
2
legobmw99/Allomancy
src/main/java/com/legobmw99/allomancy/modules/powers/PowersSetup.java
[ "public class ClientEventHandler {\n\n\n private final Minecraft mc = Minecraft.getInstance();\n\n private final Set<Entity> metal_entities = new HashSet<>();\n private final Set<MetalBlockBlob> metal_blobs = new HashSet<>();\n private final Set<Player> nearby_allomancers = new HashSet<>();\n\n priva...
import com.legobmw99.allomancy.modules.powers.client.ClientEventHandler; import com.legobmw99.allomancy.modules.powers.client.PowersClientSetup; import com.legobmw99.allomancy.modules.powers.command.AllomancyPowerCommand; import com.legobmw99.allomancy.modules.powers.command.AllomancyPowerType; import com.legobmw99.all...
package com.legobmw99.allomancy.modules.powers; public class PowersSetup { public static void clientInit(final FMLClientSetupEvent e) { MinecraftForge.EVENT_BUS.register(new ClientEventHandler()); PowersClientSetup.initKeyBindings(); } public static void registerCommands(final RegisterCo...
AllomancyPowerCommand.register(e.getDispatcher());
2
tesseract4java/tesseract4java
ocrevalUAtion/src/main/java/eu/digitisation/langutils/TermFrequency.java
[ "public class WarningException extends Exception {\n private static final long serialVersionUID = 1L;\n\n /**\n * Default constructor\n * @param message\n */\n public WarningException(String message) {\n super(message);\n }\n}", "public class Messages {\n\n // private static fina...
import eu.digitisation.input.SchemaLocationException; import eu.digitisation.input.WarningException; import eu.digitisation.log.Messages; import eu.digitisation.math.Counter; import eu.digitisation.text.CharFilter; import eu.digitisation.text.StringNormalizer; import eu.digitisation.text.Text; import eu.digitisation.te...
/* * Copyright (C) 2013 Universidad de Alicante * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This progr...
WordScanner scanner = new WordScanner(content.toString(),
5
doanduyhai/killrvideo-java
src/main/java/killrvideo/service/RatingsService.java
[ "public static final String mergeStackTrace(Throwable throwable) {\n StringJoiner joiner = new StringJoiner(\"\\n\\t\", \"\\n\", \"\\n\");\n joiner.add(throwable.getMessage());\n Arrays.asList(throwable.getStackTrace())\n .forEach(stackTraceElement -> joiner.add(stackTraceElement.toString()));\n\n ...
import static killrvideo.utils.ExceptionUtils.mergeStackTrace; import java.time.Instant; import java.util.UUID; import java.util.concurrent.CompletableFuture; import javax.annotation.PostConstruct; import javax.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype...
package killrvideo.service; @Service //public class RatingsService extends AbstractRatingsService { public class RatingsService extends RatingsServiceImplBase { private static final Logger LOGGER = LoggerFactory.getLogger(RatingsService.class); @Inject MappingManager manager; @Inject M...
LOGGER.error("Exception rating video : " + mergeStackTrace(ex));
0
Kickflip/kickflip-android-sdk
sdk/src/main/java/io/kickflip/sdk/fragment/GlassBroadcastFragment.java
[ "public class Kickflip {\n public static final String TAG = \"Kickflip\";\n private static Context sContext;\n private static String sClientKey;\n private static String sClientSecret;\n\n private static KickflipApiClient sKickflip;\n\n // Per-Stream settings\n private static SessionConfig sSess...
import android.app.Activity; import android.app.Fragment; import android.content.Context; import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.vie...
package io.kickflip.sdk.fragment; /** * This is a drop-in broadcasting fragment. * Currently, only one BroadcastFragment may be instantiated at a time by * design of {@link io.kickflip.sdk.av.Broadcaster}. */ public class GlassBroadcastFragment extends Fragment { private static final String TAG = "GlassBro...
private GLCameraEncoderView mCameraView;
4
TeamAmeriFrance/Guide-API
src/main/java/amerifrance/guideapi/api/IPage.java
[ "public class Book {\n\n private static final String GUITEXLOC = \"guideapi:textures/gui/\";\n\n private List<CategoryAbstract> categories = Lists.newArrayList();\n private String title = \"item.GuideBook.name\";\n private String header = title;\n private String itemName = title;\n private String ...
import amerifrance.guideapi.api.impl.Book; import amerifrance.guideapi.api.impl.abstraction.CategoryAbstract; import amerifrance.guideapi.api.impl.abstraction.EntryAbstract; import amerifrance.guideapi.gui.GuiBase; import amerifrance.guideapi.gui.GuiEntry; import net.minecraft.client.gui.FontRenderer; import net.minecr...
package amerifrance.guideapi.api; public interface IPage { @SideOnly(Side.CLIENT) void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRendererObj); @SideOnly(Side.CLIENT) void drawExtras(Book book, Ca...
boolean canSee(Book book, CategoryAbstract category, EntryAbstract entry, EntityPlayer player, ItemStack bookStack, GuiEntry guiEntry);
4
iLexiconn/Magister.java
src/main/java/net/ilexiconn/magister/handler/ELOHandler.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.container.SingleStudyGuide; import net.ilexiconn.magister.container.Source; import net.ilexiconn.magister.container.StudyGuide; import net.ilexiconn.magister.util.GsonUtil; import net.ilexiconn.magister.util.HttpUtil; import java.io.IOException; import java.util.HashMap; import java.util.M...
/* * 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, publis...
private Magister magister;
0
michelelacorte/SwipeableCard
app/src/main/java/it/michelelacorte/exampleswipeablecard/MainActivity.java
[ "@SuppressWarnings(\"unused\")\npublic class CustomCardAnimation {\n private Context mContext;\n private CardView mCardView;\n private int mStartCardPosition;\n private long mDuration = 500;\n\n /**\n * Public constructor for set-up animation\n * @param context Context\n * @param card Car...
import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.design.widget.NavigationView; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarDrawerToggle; import android.support.v7.app.AlertDialog; import android.support.v7.a...
.setOnClickListenerIconButton(clickIconButton1, clickIconButton2) .build()) .build(); final OptionView dismissableSwipe = new OptionView.Builder() .normalCard() .image(R.drawable.image) .title("Dismi...
final CustomCardAnimation cardAnim = new CustomCardAnimation(getApplicationContext(), cardOther, 200);
0
adiyoss/StructED
src/com/structed/models/algorithms/ProbitLoss.java
[ "public class Consts {\n\n // GENERALS\n\tpublic static final String SPACE = \" \";\n public static final String TAB = \"\\t\";\n public static final String COMMA_NOTE = \",\";\n\tpublic static final String CLASSIFICATION_SPLITTER = \"-\";\n\tpublic static final String COLON_SPLITTER = \":\";\n public s...
import com.structed.models.ClassifierData; import com.structed.constants.ErrorConstants; import com.structed.data.entities.Example; import com.structed.data.entities.Vector; import com.structed.data.Logger; import com.structed.utils.MathHelpers; import java.util.ArrayList; import java.util.Random; import com.structed.c...
/* * The MIT License (MIT) * * StructED - Machine Learning Package for Structured Prediction * * Copyright (c) 2015 Yossi Adi, E-Mail: yossiadidrum@gmail.com * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), t...
public Vector update(Vector currentWeights, Example example, ClassifierData classifierData) {
3
shibing624/crf-seg
src/main/java/org/xm/xmnlp/seg/CRFSegment.java
[ "public class Xmnlp {\n /**\n * 日志组件\n */\n private static Logger logger = LogManager.getLogger();\n\n public static final class Config {\n /**\n * 默认关闭调试\n */\n public static boolean DEBUG = false;\n /**\n * 字符类型对应表\n */\n public static S...
import org.xm.xmnlp.Xmnlp; import org.xm.xmnlp.dictionary.other.CharTable; import org.xm.xmnlp.model.crf.CRFSegmentModel; import org.xm.xmnlp.model.crf.Table; import org.xm.xmnlp.seg.domain.Nature; import org.xm.xmnlp.seg.domain.Term; import org.xm.xmnlp.seg.domain.Vertex; import org.xm.xmnlp.util.CharacterHelper; impo...
package org.xm.xmnlp.seg; /** * 基于CRF的分词器 * * @author XuMing */ public class CRFSegment extends Segment { @Override protected List<Term> segSentence(char[] sentence) { if (sentence.length == 0) return Collections.emptyList(); char[] sentenceConverted = CharTable.convert(sentence);
Table table = new Table();
3
cjstehno/ersatz
ersatz/src/test/java/io/github/cjstehno/ersatz/impl/RequestMatcherTest.java
[ "public enum HttpMethod {\r\n\r\n /**\r\n * Wildcard matching any HTTP method.\r\n */\r\n ANY(\"*\"),\r\n\r\n /**\r\n * HTTP GET method matcher.\r\n */\r\n GET(\"GET\"),\r\n\r\n /**\r\n * HTTP HEAD method matcher.\r\n */\r\n HEAD(\"HEAD\"),\r\n\r\n /**\r\n * HTTP POS...
import io.github.cjstehno.ersatz.cfg.HttpMethod; import io.github.cjstehno.ersatz.encdec.DecoderChain; import io.github.cjstehno.ersatz.encdec.Decoders; import io.github.cjstehno.ersatz.encdec.RequestDecoders; import io.github.cjstehno.ersatz.match.CookieMatcher; import io.github.cjstehno.ersatz.server.MockClientR...
/** * Copyright (C) 2022 Christopher J. Stehno * * 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 ...
RequestDecoders decoders = RequestDecoders.decoders(d -> {
3
maruohon/worldutils
src/main/java/fi/dy/masa/worldutils/command/SubCommandBlockReplacePairs.java
[ "@Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.MOD_VERSION, certificateFingerprint = Reference.FINGERPRINT,\n guiFactory = \"fi.dy.masa.worldutils.config.WorldUtilsGuiFactory\",\n updateJSON = \"https://raw.githubusercontent.com/maruohon/worldutils/master/update.json\",\n ac...
import java.util.ArrayList; import java.util.Collections; import java.util.List; import javax.annotation.Nullable; import org.apache.commons.lang3.tuple.Pair; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; import net.minecraft.server...
package fi.dy.masa.worldutils.command; public class SubCommandBlockReplacePairs extends SubCommand { private static List<Pair<String, String>> blockPairs = new ArrayList<Pair<String, String>>(); private String preparedFrom = EMPTY_STRING; private String preparedTo = EMPTY_STRING; public SubCommandBlo...
return CommandBase.getListOfStringsMatchingLastWord(args, BlockUtils.getAllBlockNames());
6
zetbaitsu/CodePolitan
app/src/main/java/id/zelory/codepolitan/ui/adapter/NewsAdapter.java
[ "public abstract class BenihHeaderAdapter<Data, ViewHolder extends BenihItemViewHolder<Data>,\n Header extends BenihHeaderViewHolder> extends\n BenihRecyclerAdapter<Data, BenihItemViewHolder>\n{\n protected static final int TYPE_HEADER = 0;\n protected static final int TYPE_ITEM = 1;\n protec...
import android.content.Context; import android.os.Bundle; import android.view.ViewGroup; import id.zelory.benih.adapter.BenihHeaderAdapter; import id.zelory.benih.adapter.viewholder.BenihItemViewHolder; import id.zelory.codepolitan.R; import id.zelory.codepolitan.data.model.Article; import id.zelory.codepolitan.ui.adap...
/* * Copyright (c) 2015 Zelory. * * 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...
return new SearchFooterViewHolder(getView(viewGroup, viewType), itemClickListener, longItemClickListener);
5
alphadev-net/drive-mount
app/src/main/java/net/alphadev/usbstorage/DocumentProviderImpl.java
[ "public enum FileAttribute {\n FILESIZE,\n LAST_MODIFIED\n}", "public interface FileSystemProvider {\n /**\n * Returs true if, and only if, the item represented by the given Path is a directory.\n *\n * @param path Path to check\n * @return true if is directory\n */\n boolean isDir...
import android.database.Cursor; import android.database.MatrixCursor; import android.os.CancellationSignal; import android.os.ParcelFileDescriptor; import android.provider.DocumentsContract.Document; import android.provider.DocumentsContract.Root; import android.provider.DocumentsProvider; import android.util.Log; impo...
/** * Copyright © 2014-2015 Jan Seeger * * 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 ag...
return ParcelFileDescriptorUtil.pipeFrom(inputStream);
4
hoijui/JavaOSC
modules/core/src/main/java/com/illposed/osc/argument/handler/StringArgumentHandler.java
[ "public interface BytesReceiver {\n\n\t/**\n\t * Relative <i>put</i> method&nbsp;&nbsp;<i>(optional operation)</i>.\n\t *\n\t * <p> Writes the given byte into this buffer at the current\n\t * position, and then increments the position. </p>\n\t *\n\t * @param data\n\t * The byte to be written\n\t *\n\t * @...
import com.illposed.osc.BytesReceiver; import com.illposed.osc.OSCParseException; import com.illposed.osc.OSCParser; import com.illposed.osc.OSCSerializer; import com.illposed.osc.argument.ArgumentHandler; import java.nio.Buffer; import java.nio.ByteBuffer; import java.nio.charset.CharacterCodingException; import java....
// SPDX-FileCopyrightText: 2015-2017 C. Ramakrishnan / Illposed Software // SPDX-FileCopyrightText: 2021 Robin Vobruba <hoijui.quaero@gmail.com> // // SPDX-License-Identifier: BSD-3-Clause package com.illposed.osc.argument.handler; /** * Parses and serializes an OSC string type. */ public class StringArgumentHandl...
OSCSerializer.terminateAndAlign(output);
3
raffaeleguidi/DirectMemory
DirectMemory-Cache/src/main/java/org/directmemory/cache/Cache.java
[ "public class Every extends In {\r\n\r\n\tpublic Every(double measure) {\r\n\t\tsuper(measure);\r\n\t}\r\n\r\n}\r", "public class Ram extends Sizing {\r\n\r\n}\r", "public class MemoryManager {\r\n\tprivate static Logger logger = LoggerFactory.getLogger(MemoryManager.class);\r\n\tpublic static List<OffHeapMemor...
import java.io.EOFException; import java.io.IOException; import java.util.Timer; import java.util.TimerTask; import java.util.concurrent.ConcurrentMap; import org.directmemory.measures.Every; import org.directmemory.measures.Ram; import org.directmemory.memory.MemoryManager; import org.directmemory.memory.OffHe...
public static Pointer put(String key, Object object, int expiresIn) { try { byte[] payload = serializer.serialize(object, object.getClass()); Pointer ptr = putByteArray(key, payload); ptr.clazz = object.getClass(); return ptr; } catch (IOException e) { logger.error(e.getMessage()); re...
private static void dump(OffHeapMemoryBuffer mem) {
3
caseydavenport/biermacht
src/com/biermacht/brews/xml/RecipeXmlWriter.java
[ "public class Fermentable extends Ingredient implements Parcelable {\n\n // Beer XML 1.0 Required Fields ===================================\n // ================================================================\n // Name - Inherited\n // Version - Inherited\n private String type; // G...
import android.content.Context; import android.os.Environment; import android.util.Log; import com.biermacht.brews.ingredient.Fermentable; import com.biermacht.brews.ingredient.Hop; import com.biermacht.brews.ingredient.Misc; import com.biermacht.brews.ingredient.Water; import com.biermacht.brews.ingredient.Yeast; impo...
Element colorElement = d.createElement("COLOR"); Element addAfterBoilElement = d.createElement("ADD_AFTER_BOIL"); // Assign values nameElement.setTextContent(f.getName()); versionElement.setTextContent(f.getVersion() + ""); typeElement.setTextContent(f.getFermentableType()); a...
public Element getMashChild(Document d, MashProfile m) {
6
nongdenchet/android-mvvm-with-tests
app/src/androidTest/java/apidez/com/android_mvvm_sample/view/fragment/PlacesFragmentIntegrationTest.java
[ "public class ComponentBuilder {\n private AppComponent appComponent;\n\n public ComponentBuilder(AppComponent appComponent) {\n this.appComponent = appComponent;\n }\n\n public PlacesComponent placesComponent() {\n return appComponent.plus(new PlacesModule());\n }\n\n public Purchas...
import android.content.Intent; import android.support.test.rule.ActivityTestRule; import android.test.suitebuilder.annotation.MediumTest; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import org.mockito.Mockito; import apidez.com...
package apidez.com.android_mvvm_sample.view.fragment; /** * Created by nongdenchet on 10/22/15. */ @MediumTest @RunWith(JUnit4.class) public class PlacesFragmentIntegrationTest { @Rule public ActivityTestRule<EmptyActivity> activityTestRule = new ActivityTestRule<>(EmptyActivity.class, true,...
.thenReturn(Observable.just(TestDataUtils.nearByData()));
6
Lambda-3/DiscourseSimplification
src/main/java/org/lambda3/text/simplification/discourse/runner/discourse_tree/extraction/rules/LeadNPExtractor.java
[ "public enum Relation {\n\n UNKNOWN,\n\n // Coordinations\n UNKNOWN_COORDINATION, // the default for coordination\n CONTRAST,\n CAUSE_C,\n RESULT_C,\n LIST,\n DISJUNCTION,\n TEMPORAL_AFTER_C,\n TEMPORAL_BEFORE_C,\n\n // Subordinations\n UNKNOWN_SUBORDINATION, // the default for s...
import org.lambda3.text.simplification.discourse.utils.parseTree.ParseTreeExtractionUtils; import org.lambda3.text.simplification.discourse.utils.words.WordsUtils; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Optional; import edu.stanford.nlp.ling.Word; import edu.stanfor...
/* * ==========================License-Start============================= * DiscourseSimplification : SubordinationPostExtractor * * Copyright © 2017 Lambda³ * * GNU General Public License 3 * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public Lic...
public Optional<Extraction> extract(Leaf leaf) throws ParseTreeException {
4
millecker/senti-storm
src/at/illecker/sentistorm/SentiStormTopology.java
[ "public class FeatureGenerationBolt extends BaseBasicBolt {\n public static final String ID = \"feature-generation-bolt\";\n public static final String CONF_LOGGING = ID + \".logging\";\n private static final long serialVersionUID = 5340637976415982170L;\n private static final Logger LOG = LoggerFactory\n ...
import backtype.storm.topology.IRichSpout; import backtype.storm.topology.TopologyBuilder; import cmu.arktweetnlp.Tagger.TaggedToken; import com.esotericsoftware.kryo.serializers.DefaultSerializers.TreeMapSerializer; import java.util.Arrays; import java.util.TreeMap; import at.illecker.sentistorm.bolt.FeatureGeneration...
/** * 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...
conf.put(DatasetSpout.CONF_STARTUP_SLEEP_MS,
7
akeranen/the-one
src/ui/DTNSimUI.java
[ "public abstract class Report {\n\t/** Name space of the settings that are common to all reports ({@value}). */\n\tpublic static final String REPORT_NS = \"Report\";\n\t/** The interval (simulated seconds) of creating new settings files\n\t * -setting id ({@value}) */\n\tpublic static final String INTERVAL_SETTING ...
import java.util.Vector; import report.Report; import core.ApplicationListener; import core.ConnectionListener; import core.MessageListener; import core.MovementListener; import core.Settings; import core.SettingsError; import core.SimClock; import core.SimError; import core.SimScenario; import core.UpdateListener; imp...
/* * Copyright 2010 Aalto University, ComNet * Released under GPLv3. See LICENSE.txt for details. */ package ui; /** * Abstract superclass for user interfaces; contains also some simulation * settings. */ public abstract class DTNSimUI { /** * Number of reports -setting id ({@value}). Defines how many repor...
protected Vector<Report> reports;
0
bhatti/PlexRBAC
src/main/java/com/plexobject/rbac/service/impl/JAXBContextResolver.java
[ "@Entity\n@XmlRootElement\npublic class Domain extends PersistentObject implements Validatable,\n Identifiable<String> {\n public static final String DEFAULT_DOMAIN_NAME = Configuration\n .getInstance().getProperty(\"default.domain\", \"default\");\n\n @PrimaryKey\n private String id;\n ...
import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.ext.ContextResolver; import javax.ws.rs.ext.Provider; import javax.xml.bind.JAXBContext; import org.apache.log4j.Logger; import org.springframework.context.annotation.Scope; import org.springframework.stereotype....
package com.plexobject.rbac.service.impl; @Path("/jsonFormats") @Component("jaxbContextResolver") @Scope("singleton") @Provider @Produces(MediaType.APPLICATION_JSON) public class JAXBContextResolver implements ContextResolver<JAXBContext> { private static final Logger LOGGER = Logger .getLogger(JAXB...
PagedList.class, Domain.class, Permission.class, Role.class,
4
tteguayco/JITRAX
src/es/ull/etsii/jitrax/analysis/dsl/DatabaseEvalVisitor.java
[ "public class Database {\n\n\tprivate String name;\n\tprivate ArrayList<Table> tables;\n\tprivate DbmsDriver dbmsDriver;\n\t\n\t/**\n\t * @param name name for the database.\n\t */\n\tpublic Database(String aName) {\n\t\tname = aName;\n\t\ttables = new ArrayList<Table>();\n\t}\n\t\n\tpublic Database(String aName, Ar...
import es.ull.etsii.jitrax.adt.Database; import es.ull.etsii.jitrax.adt.Datum; import es.ull.etsii.jitrax.adt.Attribute; import es.ull.etsii.jitrax.adt.Row; import es.ull.etsii.jitrax.adt.Table; import es.ull.etsii.jitrax.adt.DataType; import es.ull.etsii.jitrax.exceptions.DuplicateTableException; import java.util.Arra...
package es.ull.etsii.jitrax.analysis.dsl; /** * This class allows to semantically analyze an expression which describes * a database specification (using a DSL). It has to be syntactically correct. */ public class DatabaseEvalVisitor extends DatabaseBaseVisitor<Object> { private Database database;
private ArrayList<Attribute> auxAttributeList;
2
sherlok/sherlok
src/test/java/org/sherlok/mappings/BundleDefTest.java
[ "public static <T> T read(File f, Class<T> clazz) throws SherlokException {\n try {\n return MAPPER.readValue(new FileInputStream(f), clazz);\n\n } catch (FileNotFoundException io) {\n throw new SherlokException()\n .setMessage(\n clazz.getSimpleName().repla...
import static java.lang.System.currentTimeMillis; import static org.junit.Assert.assertEquals; import static org.sherlok.FileBased.read; import static org.sherlok.mappings.BundleDef.BundleDependency.DependencyType.jar; import static org.sherlok.mappings.BundleDef.BundleDependency.DependencyType.mvn; import static org.s...
/** * Copyright (C) 2014-2015 Renaud Richardet * * 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...
assertEquals("MyName", new EngineDef().setClassz("a.b.c.Dclass")
4
opacapp/opacclient
opacclient/libopac/src/main/java/de/geeksfactory/opacclient/apis/WebOpacNet.java
[ "public class Account {\n private long id;\n private String library;\n\n private String label;\n private String name;\n private String password;\n private long cached;\n private boolean password_known_valid = false;\n private boolean supportPolicyHintSeen = false;\n\n @Override\n publi...
import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import java.io.IOExc...
throws JSONException, IOException, OpacErrorException { // aktion: // 1 = make reservation // 2 = cancel reservation // 3 = check reservation FormBody.Builder formData = new FormBody.Builder(Charset.forName(getDefaultEncoding())); formData.add("aktion", aktio...
String str = Base64.encodeBytes(result);
5
keeps/roda-in
src/main/java/org/roda/rodain/core/sip/creators/SipPreviewCreator.java
[ "public class ConfigurationManager {\n private static final Logger LOGGER = LoggerFactory.getLogger(ConfigurationManager.class.getName());\n\n private static final Path rodainPath = computeRodainPath();\n private static Path schemasPath, templatesPath, logPath, metadataPath, helpPath, externalConfigPath,\n ex...
import java.io.File; import java.io.IOException; import java.nio.file.AccessDeniedException; import java.nio.file.FileSystems; import java.nio.file.FileVisitResult; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.PathMatcher; import java.nio.file.Paths; import java.nio.file.SimpleFileVisitor...
package org.roda.rodain.core.sip.creators; /** * @author Andre Pereira apereira@keep.pt * @since 20-10-2015. */ public class SipPreviewCreator extends Observable implements TreeVisitor { private static final Logger LOGGER = LoggerFactory.getLogger(SipPreviewCreator.class.getName()); private String startPath; ...
private Set<ContentFilter> filters;
4
dperezcabrera/jpoker
src/main/java/org/poker/sample/strategies/SlowlyStrategy.java
[ "@NotThreadSafe\npublic class BetCommand {\n\n private final BetCommandType type;\n private long chips;\n\n public BetCommand(BetCommandType type) {\n this(type, 0);\n }\n\n public BetCommand(BetCommandType type, long chips) {\n ExceptionUtil.checkNullArgument(type, \"type\");\n ...
import org.poker.api.game.BetCommand; import org.poker.api.game.GameInfo; import org.poker.api.game.IStrategy; import org.poker.api.game.PlayerInfo; import org.poker.api.game.TexasHoldEmUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory;
/* * Copyright (C) 2016 David Pérez Cabrera <dperezcabrera@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later ve...
public BetCommand getCommand(GameInfo<PlayerInfo> state) {
0
njustesen/hero-aicademy
src/ai/mcts/Mcts.java
[ "public class GameState {\n\t\n\tpublic static int TURN_LIMIT = 100;\n\tpublic static boolean RANDOMNESS = false;\n\tpublic static int STARTING_AP = 3;\n\tpublic static int ACTION_POINTS = 5;\n\t\n\tprivate static final int ASSAULT_BONUS = 300;\n\tprivate static final double INFERNO_DAMAGE = 350;\n\tprivate static ...
import game.GameState; import java.io.FileNotFoundException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import util.Statistics; import action.Action; import action.Singl...
ap--; } traversal.clear(); clone.imitate(state); // SELECTION + EXPANSION treePolicy(root, clone, traversal); // SIMULATION delta = defaultPolicy.eval(clone, state.p1Turn); // BACKPROPAGATION backupNegaMax(traversal, delta, state.p1Turn); time = (start + budget) - S...
if (edge.action == SingletonAction.endTurnAction)
3
lumag/JBookReader
src/org/jbookreader/renderingengine/RenderEngineTest.java
[ "public class FB2FilesTestFilter implements FilenameFilter {\n\tpublic boolean accept(File dir, String name) {\n\t\tif (name.endsWith(\".fb2\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (name.endsWith(\".xml\")) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t\n}", "public class TestConfig implements ITestCon...
import org.jbookreader.formatengine.IBookPainter; import org.jbookreader.formatengine.impl.FormatEngine; import org.jbookreader.renderingengine.RenderingEngine; import org.jbookreader.util.TextPainter; import org.lumag.filetest.FileTestCase; import org.lumag.filetest.FileTestUtil; import java.io.BufferedOutputStream; i...
/* * JBookReader - Java FictionBook Reader * Copyright (C) 2006 Dmitry Baryshkov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your o...
RenderingEngine engine = new RenderingEngine(new FormatEngine());
5
JavaMoney/javamoney-shelter
retired/regions/src/main/java/org/javamoney/regions/internal/data/ISO3RegionTreeProvider.java
[ "public interface Region {\n\n\t/**\n\t * Get the region's type.\n\t * \n\t * @return the region's type, never {@code null}.\n\t */\n\tpublic RegionType getRegionType();\n\n\t/**\n\t * Access the region's code. The code is unique in combination with the\n\t * region type.\n\t * \n\t * @return the region's type, nev...
import java.util.Locale; import java.util.Map; import javax.inject.Singleton; import org.javamoney.regions.Region; import org.javamoney.regions.RegionTreeNode; import org.javamoney.regions.RegionType; import org.javamoney.regions.spi.BuildableRegionNode; import org.javamoney.regions.spi.RegionProviderSpi; import org.ja...
/* * CREDIT SUISSE IS WILLING TO LICENSE THIS SPECIFICATION TO YOU ONLY UPON THE * CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS AGREEMENT. * PLEASE READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY. BY * DOWNLOADING THIS SPECIFICATION, YOU ACCEPT THE TERMS AND CONDITIONS OF THE * AGREEMENT....
Region region = regionProvider.getRegion(RegionType.of("ISO"),
0
magnusmickelsson/pokeraidbot
src/main/java/pokeraidbot/commands/PokemonVsCommand.java
[ "public class Utils {\n public static final DateTimeFormatter timeParseFormatter = DateTimeFormatter.ofPattern(\"H[:][.]mm\");\n public static final DateTimeFormatter dateAndTimeParseFormatter =\n DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH[:][.]mm\");\n public static final DateTimeFormatter tim...
import com.jagrosh.jdautilities.command.CommandEvent; import com.jagrosh.jdautilities.command.CommandListener; import org.apache.commons.lang3.StringUtils; import pokeraidbot.Utils; import pokeraidbot.domain.config.LocaleService; import pokeraidbot.domain.pokemon.Pokemon; import pokeraidbot.domain.pokemon.PokemonReposi...
package pokeraidbot.commands; /** * !raid vs (boss name) */ public class PokemonVsCommand extends ConfigAwareCommand { private final PokemonRaidStrategyService raidInfoService; private final LocaleService localeService; private final PokemonRepository repo; public PokemonVsCommand(PokemonRepositor...
protected void executeWithConfig(CommandEvent commandEvent, Config config) {
7
feedzai/fos-core
fos-api/src/main/java/com/feedzai/fos/server/remote/api/FOSManagerAdapter.java
[ "public class FOSException extends Exception {\n public FOSException(String message) {\n super(message);\n }\n\n /**\n * Create an exception with a nested throwable and customized message\n * @param message exception message\n * @param t nested throable\n */\n public FOSException(...
import com.google.common.base.Optional; import java.rmi.NotBoundException; import java.rmi.RemoteException; import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; import java.util.List; import java.util.Map; import java.util.UUID; import com.feedzai.fos.api.FOSException; import com.feedzai.fos.api....
/* * $# * FOS API *   * Copyright (C) 2013 Feedzai SA *   * This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU * Lesser General Public License version 3 (the "GPL License"). You may choose either license to govern * your use of this software only upon the condition...
public UUID addModel(ModelConfig modelConfig, @NotBlank ModelDescriptor descriptor) throws FOSException {
5
jclehner/AppOpsXposed
src/at/jclehner/appopsxposed/AppListFragment.java
[ "@TargetApi(19)\npublic class AppOpsManagerWrapper extends ObjectWrapper\n{\n\t// These are all ops included in AOSP Lollipop\n\tpublic static final int OP_NONE = getOpInt(\"OP_NONE\");\n\tpublic static final int OP_COARSE_LOCATION = getOpInt(\"OP_COARSE_LOCATION\");\n\tpublic static final int OP_FINE_LOCATION = ge...
import java.lang.reflect.Field; import java.text.Collator; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import android.annotation.TargetApi; import android.app.AppOpsManager; import android.app.Fragment; import android.app.ListFragment; import android.app...
convertView = mInflater.inflate(R.layout.app_ops_item, parent, false); holder = new ViewHolder(); holder.appIcon = (ImageView) convertView.findViewById(R.id.app_icon); holder.appLine2 = (TextView) convertView.findViewById(R.id.op_name); holder.appName = (TextView) convertView.findViewById(R.id.app_...
final AppOpsManagerWrapper appOps = AppOpsManagerWrapper.from(getContext());
0
AlexanderMisel/gnubridge
src/main/java/org/gnubridge/core/bidding/rules/Respond1ColorWithNewSuit.java
[ "public class Hand {\n\tList<Card> cards;\n\n\t/**\n\t * Caching optimization for pruning played cards\n\t * and perhaps others\n\t */\n\tList<Card> orderedCards;\n\tSuit color;\n\tList<Card> colorInOrder;\n\n\tpublic Hand() {\n\t\tthis.cards = new ArrayList<Card>();\n\t}\n\n\tpublic Hand(Card... cards) {\n\t\tthis...
import org.gnubridge.core.Hand; import org.gnubridge.core.bidding.Auctioneer; import org.gnubridge.core.bidding.Bid; import org.gnubridge.core.bidding.ResponseCalculator; import org.gnubridge.core.deck.Clubs; import org.gnubridge.core.deck.Diamonds; import org.gnubridge.core.deck.NoTrump; import org.gnubridge.core.deck...
package org.gnubridge.core.bidding.rules; public class Respond1ColorWithNewSuit extends Response { private ResponseCalculator pc; private Suit unbidSuit;
public Respond1ColorWithNewSuit(Auctioneer a, Hand h) {
1
angusmacdonald/wordbrain-solver
src/test/nyc/angus/wordgrid/test/SolverTests.java
[ "public class DictionaryLoader {\n\tprivate final static Logger LOGGER = Logger.getLogger(DictionaryLoader.class.getName());\n\n\tprivate DictionaryLoader() {\n\t\t// Static methods. Should not be instantiated.\n\t}\n\n\t/**\n\t * Load the dictionary from the given location into memory.\n\t * <p>\n\t * The dictiona...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.io.IOException; import java.util.LinkedList; import java.util.List; import java.util.Queue; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; import nyc.angus.wordgrid.dictionary.Dict...
package nyc.angus.wordgrid.test; /** * Tests of {@link WordGridSolver}. */ public class SolverTests { private final static Logger LOGGER = Logger.getLogger(SolverTests.class.getName()); private static Set<String> wordSet;
private static TrieDictionary trieDictionary;
1
cyriux/mpcmaid
MpcMaid/src/com/mpcmaid/gui/WaveformPanel.java
[ "public final class Marker implements Comparable {\n\tprivate int location;\n\n\tpublic Marker(int location) {\n\t\tthis.location = location;\n\t}\n\n\tpublic int getLocation() {\n\t\treturn location;\n\t}\n\n\tpublic void setLocation(int location) {\n\t\tthis.location = location;\n\t}\n\n\tpublic int move(final in...
import java.awt.Color; import java.awt.Graphics; import java.awt.Polygon; import java.io.File; import java.util.Iterator; import java.util.List; import javax.swing.BorderFactory; import javax.swing.JPanel; import com.mpcmaid.audio.Marker; import com.mpcmaid.audio.Markers; import com.mpcmaid.audio.Sample; import com.mpc...
package com.mpcmaid.gui; /** * A panel dedicated to display a waveform. It actually contains a Slicer that * must be initialized before using any delegate method. * * @author cyrille martraire */ public class WaveformPanel extends JPanel { private static final int AVERAGE_ENERGY_WINDOW = 43; private stati...
private Slicer slicer;
3
yarolegovich/MaterialPreferences
library/src/main/java/com/yarolegovich/mp/AbsMaterialPreference.java
[ "public class MaterialPreferences {\n\n private static final MaterialPreferences instance = new MaterialPreferences();\n\n public static MaterialPreferences instance() {\n return instance;\n }\n\n public static UserInputModule getUserInputModule(Context context) {\n return instance.userInp...
import android.annotation.TargetApi; import android.content.Context; import android.content.res.TypedArray; import android.graphics.drawable.Drawable; import android.os.Build; import android.text.TextUtils; import android.util.AttributeSet; import android.view.Gravity; import android.view.View; import android.widget.Im...
} finally { ta.recycle(); } onCollectAttributes(attrs); onConfigureSelf(); inflate(getContext(), getLayout(), this); title = (TextView) findViewById(R.id.mp_title); summary = (TextView) findViewById(R.id.mp_summary); icon = (ImageView) findV...
setBackgroundResource(Utils.clickableBackground(getContext()));
4
mikelewis0/easyccg
src/uk/ac/ed/easyccg/rebanking/CCGBankParseReader.java
[ "public abstract class Category {\n private final String asString;\n private final int id;\n private final static String WILDCARD_FEATURE = \"X\"; \n private final static Set<String> bracketAndQuoteCategories = ImmutableSet.of(\"LRB\", \"RRB\", \"LQU\", \"RQU\");\n\n private Category(String asString, String se...
import java.util.concurrent.atomic.AtomicInteger; import uk.ac.ed.easyccg.syntax.Category; import uk.ac.ed.easyccg.syntax.Category.Slash; import uk.ac.ed.easyccg.syntax.SyntaxTreeNode; import uk.ac.ed.easyccg.syntax.SyntaxTreeNode.SyntaxTreeNodeFactory; import uk.ac.ed.easyccg.syntax.Util;
package uk.ac.ed.easyccg.rebanking; /** * Reads in gold-standard parses from CCGBank. */ public class CCGBankParseReader { public final static SyntaxTreeNodeFactory factory = new SyntaxTreeNodeFactory(1000, 10000); private final static String OPEN_BRACKET = "(<"; private final static String OPEN_LEAF = ...
result = factory.makeTerminal(new String(parse[4]), Category.valueOf(parse[1]), new String(parse[2]), null, 1.0, wordIndex.getAndIncrement());
0
Whiley/WhileyTheoremProver
src/main/java/wyal/util/TypeChecker.java
[ "public static interface Named extends Declaration {\n\n\tpublic Name getName();\n\n\tpublic Tuple<VariableDeclaration> getParameters();\n\n\tpublic static abstract class FunctionOrMacro extends AbstractSyntacticItem implements Named {\n\t\tpublic FunctionOrMacro(Name name, Tuple<VariableDeclaration> parameters, St...
import wybs.lang.SyntacticItem; import static wyal.lang.WyalFile.*; import java.util.List; import wyal.lang.*; import wyal.lang.WyalFile.Declaration.Named; import wyfs.util.ArrayUtils; import wyfs.util.Pair; import wyfs.lang.Path; import wytp.types.TypeInferer.Environment; import wytp.types.util.StdTypeEnvironment; imp...
// Copyright 2011 The Whiley Project Developers // // 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...
private TypeSystem types;
3
Tonius/E-Mobile
src/main/java/tonius/emobile/network/message/MessageCellphoneHome.java
[ "public class EMConfig {\n \n public static Configuration config;\n public static List<ConfigSection> configSections = new ArrayList<ConfigSection>();\n \n public static final ConfigSection sectionGeneral = new ConfigSection(\"General Settings\", \"general\");\n public static final ConfigSection s...
import io.netty.buffer.ByteBuf; import net.minecraft.block.Block; import net.minecraft.block.BlockBed; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.util.ChunkCoordinates; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; impor...
package tonius.emobile.network.message; public class MessageCellphoneHome implements IMessage, IMessageHandler<MessageCellphoneHome, IMessage> { private String player; public MessageCellphoneHome() { } public MessageCellphoneHome(String player) { this.player = player; } ...
if (EMConfig.allowTeleportHome) {
0
tsauvine/omr
src/omr/gui/calibration/CalibratePanel.java
[ "public class AnalyzeSheetsTask extends Task {\n\n private Project project;\n\n public AnalyzeSheetsTask(Project project, Observer observer) {\n super(observer);\n \n this.project = project;\n }\n \n @Override\n public void run() {\n SheetStructure structure = project.g...
import java.awt.BorderLayout; import java.util.Observable; import java.util.Observer; import javax.swing.BorderFactory; import javax.swing.BoxLayout; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JSplitPane; import javax.swing.JTabbedPane; import javax.swing.JTable; import javax.swing.JT...
package omr.gui.calibration; public class CalibratePanel extends JPanel implements ListSelectionListener, ChangeListener, Observer { private static final long serialVersionUID = 1L; private Gui gui;
private Project project;
1
BottleRocketStudios/Android-GroundControl
GroundControlSample/app/src/main/java/com/bottlerocketstudios/groundcontrolsample/config/agent/RegionConfigurationAgent.java
[ "public class GroundControl {\n private static final String TAG = GroundControl.class.getSimpleName();\n\n private static final ConcurrentHashMap<String, ExecutionBuilderFactory> sExecutionBuilderFactoryMap = new ConcurrentHashMap<>();\n private static final ConcurrentHashMap<String, UiInformationContainer...
import android.content.Context; import com.bottlerocketstudios.groundcontrol.convenience.GroundControl; import com.bottlerocketstudios.groundcontrol.dependency.DependencyHandlingAgent; import com.bottlerocketstudios.groundcontrol.listener.FunctionalAgentListener; import com.bottlerocketstudios.groundcontrolsample.confi...
/* * Copyright (c) 2016 Bottle Rocket 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 ...
addParallelDependency(GroundControl.bgAgent(getAgentExecutor(), new ConfigurationAgent(mContext)),
0
Aleksey-Terzi/MerchantsTFC
src/com/aleksey/merchants/TileEntities/TileEntityAnvilDie.java
[ "public class CoinInfo\n{\n public String CoinName;\n public int DieColor;\n public String MetalName;\n public int Level;\n \n public CoinInfo(String coinName, int dieColor, String metalName, int level)\n {\n CoinName = coinName;\n DieColor = dieColor;\n MetalName = metalNa...
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.util.AxisAlignedBB; import com.aleksey.merchants.Core.CoinInfo; import com.aleksey.merchants...
{ if (_storage[i] != null) { NBTTagCompound itemTag = new NBTTagCompound(); itemTag.setByte("Slot", (byte) i); _storage[i].writeToNBT(itemTag); itemList.appendTag(itemTag); } } nbt.setTag("Item...
if(coinStack != null && (coinStack.stackSize >= _maxCoinStackSize || !ItemHelper.areItemEquals(coinStack, resultStack)))
4
reines/game
game-client/src/main/java/com/game/client/handlers/packet/ChatHandler.java
[ "public final class Client extends ClientFrame {\n\tprivate static final Logger log = LoggerFactory.getLogger(Client.class);\n\n\tpublic static final String DEFAULT_HOST = \"localhost\";\n\tpublic static final int DEFAULT_PORT = 36954;\n\tpublic static final int[] ICON_SIZES = {128, 64, 32, 16};\n\tpublic static fi...
import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.game.client.Client; import com.game.client.WorldManager; import com.game.client.handlers.PacketHandler; import com.game.client.model.Player; import com.game.client.ui.ChatMessages; import com.game.common.codec.Packet; import com.game.common.model.Hash;
package com.game.client.handlers.packet; public class ChatHandler implements PacketHandler { private static final Logger log = LoggerFactory.getLogger(ChatHandler.class); @Override
public void handlePacket(Client client, WorldManager world, Packet packet) throws Exception {
0
davidmoten/rtree
src/test/java/com/github/davidmoten/rtree/BenchmarksRTree.java
[ "static List<Entry<Object, Rectangle>> entries1000(Precision precision) {\n List<Entry<Object, Rectangle>> list = new ArrayList<Entry<Object, Rectangle>>();\n BufferedReader br = new BufferedReader(\n new InputStreamReader(BenchmarksRTree.class.getResourceAsStream(\"/1000.txt\")));\n String line...
import static com.github.davidmoten.rtree.Utilities.entries1000; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.List; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.State;...
package com.github.davidmoten.rtree; @State(Scope.Benchmark) public class BenchmarksRTree { private final static Precision precision = Precision.DOUBLE; private final List<Entry<Object, Point>> entries = GreekEarthquakes.entriesList(precision);
private final List<Entry<Object, Rectangle>> some = entries1000(precision);
0
4FunApp/4Fun
server/4FunServer/src/com/mollychin/spider/MovieSpider.java
[ "public class MovieInfo {\n\tprivate String date;\n\tprivate String movieName;\n\tprivate double mark;\n\tprivate String pic;\n\tprivate String director;\n\tprivate String playWriter;\n\tprivate String country;\n\tprivate String briefIntro;\n\tprivate String moreInfo;\n\tprivate String pageUrl;\n\tprivate String mo...
import java.io.IOException; import java.sql.Connection; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.select.Elements; import com.mollychin.bean.MovieInfo; import com.mollychin.bean.MovieInfo.ActorInfo; import c...
package com.mollychin.spider; /** * Created by mollychin on 2016/11/16. */ public class MovieSpider { public final static String PICTURE4MOVIE = "Picture4Movie/"; public void movieSpider() { try { MovieSpider movieParser = new MovieSpider(); Document document = JsoupUtil.connect(ConstantsUtil.MOVIE_URL...
ActorInfo actorInfo = new ActorInfo();
1
wymarc/astrolabe-generator
src/main/java/com/wymarc/astrolabe/generator/printengines/postscript/extras/horary/EqualHours.java
[ "public class Astrolabe {\n\n public static final String[] SHOWOPTIONS = { \"Climate and mater\", \"Climate only\", \"Mater only\", \"Mater and nauticum\"};\n public static final String[] SHAPEOPTIONS = { \"Classic\", \"Octagonal\"};\n public static final String[] HOUROPTIONS = { \"Roman\", \"Arabic\", \"A...
import com.wymarc.astrolabe.Astrolabe; import com.wymarc.astrolabe.generator.printengines.postscript.util.EPSToolKit; import com.wymarc.astrolabe.math.AstroMath; import com.wymarc.astrolabe.math.InterSect; import com.wymarc.astrolabe.math.ThreePointCenter; import java.awt.geom.Point2D; import java.util.ArrayList; impor...
/** * $Id: AstrolabeGenerator.java,v 3.1 * <p/> * The Astrolabe Generator is free software; you can redistribute it * and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 3 of * the License, or(at your option) any later version. * <p/> ...
private Astrolabe myAstrolabe = new Astrolabe();
0
sekwah41/Advanced-Portals
src/main/java/com/sekwah/advancedportals/bukkit/listeners/Listeners.java
[ "public class AdvancedPortalsPlugin extends JavaPlugin {\n\n private Settings settings;\n\n protected boolean isProxyPluginEnabled = false;\n\n protected boolean forceRegisterProxyChannels = false;\n protected boolean disableProxyWarning = false;\n\n private boolean worldEditActive = false;\n\n pr...
import com.sekwah.advancedportals.bukkit.AdvancedPortalsPlugin; import com.sekwah.advancedportals.bukkit.PluginMessages; import com.sekwah.advancedportals.bukkit.api.events.WarpEvent; import com.sekwah.advancedportals.bukkit.config.ConfigAccessor; import com.sekwah.advancedportals.bukkit.destinations.Destination; impor...
package com.sekwah.advancedportals.bukkit.listeners; public class Listeners implements Listener { private static boolean UseOnlyServerAxe = false; private static Material WandMaterial; private final AdvancedPortalsPlugin plugin; public static String HAS_WARPED = "hasWarped"; public static Stri...
ConfigAccessor config = new ConfigAccessor(plugin, "config.yml");
3
spring-cloud/spring-cloud-bus
spring-cloud-bus/src/test/java/org/springframework/cloud/bus/BusAutoConfigurationTests.java
[ "@SuppressWarnings(\"serial\")\npublic class AckRemoteApplicationEvent extends RemoteApplicationEvent {\n\n\tprivate final String ackId;\n\n\tprivate final String ackDestinationService;\n\n\tprivate Class<? extends RemoteApplicationEvent> event;\n\n\t@SuppressWarnings(\"unused\")\n\tprivate AckRemoteApplicationEven...
import java.util.HashMap; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import org.junit.After; import org.junit.Test; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigu...
/* * Copyright 2012-2019 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
assertThat(busBridge.message).isInstanceOf(AckRemoteApplicationEvent.class);
0
mzlogin/guanggoo-android
app/src/main/java/org/mazhuang/guanggoo/topiclist/TopicListPresenter.java
[ "public class NetworkTaskScheduler {\n\n private ExecutorService mExecutor;\n\n private static class InstanceHolder {\n private static NetworkTaskScheduler sInstance = new NetworkTaskScheduler();\n }\n\n public static NetworkTaskScheduler getInstance() {\n return InstanceHolder.sInstance;\...
import org.mazhuang.guanggoo.data.NetworkTaskScheduler; import org.mazhuang.guanggoo.data.OnResponseListener; import org.mazhuang.guanggoo.data.entity.ListResult; import org.mazhuang.guanggoo.data.entity.Topic; import org.mazhuang.guanggoo.data.task.BaseTask; import org.mazhuang.guanggoo.data.task.GetTopicListTask; imp...
package org.mazhuang.guanggoo.topiclist; /** * * @author mazhuang * @date 2017/9/16 */ public class TopicListPresenter implements TopicListContract.Presenter { private TopicListContract.View mView; private BaseTask mCurrentTask; private int mPagination; public TopicListPresenter(TopicListCo...
new OnResponseListener<ListResult<Topic>>() {
2
CROW-NDOV/displaydirect
distribution/src/main/java/nl/crowndov/displaydirect/distribution/kv78/RealtimeMessageMapper.java
[ "public class DeleteMessage extends RealtimeMessage implements Serializable {\n\n private static final long serialVersionUID = -4335030844531563517L;\n\n private final int messageCode;\n\n public DeleteMessage(String dataOwnerCode, LocalDate date, int messageCode, String stopCode) {\n super(Type.MES...
import nl.crowndov.displaydirect.distribution.domain.travelinfo.DeleteMessage; import nl.crowndov.displaydirect.distribution.domain.travelinfo.PassTime; import nl.crowndov.displaydirect.distribution.domain.travelinfo.RealtimeMessage; import nl.crowndov.displaydirect.distribution.domain.travelinfo.UpdateMessage; import ...
package nl.crowndov.displaydirect.distribution.kv78; /** * Copyright 2017 CROW-NDOV * * This file is subject to the terms and conditions defined in file 'LICENSE.txt', which is part of this source code package. */ public class RealtimeMessageMapper { private static final Logger LOGGER = LoggerFactory.getLog...
pt.setExpectedArrivalTime((int) DateTimeUtil.getTime(date, r.get("ExpectedArrivalTime")).toEpochSecond());
7
Aurilux/Cybernetica
src/main/java/com/vivalux/cyb/item/module/ModuleLexica.java
[ "@Mod(modid = CYBModInfo.MOD_ID,\n name = CYBModInfo.MOD_NAME,\n guiFactory = CYBModInfo.GUI_FACTORY,\n version = CYBModInfo.MOD_VERSION)\npublic class Cybernetica {\n\t@Instance(CYBModInfo.MOD_ID)\n\tpublic static Cybernetica instance;\n\n\t@SidedProxy(clientSide = CYBModInfo.CLIENT_PROXY, serverSide = CY...
import com.vivalux.cyb.Cybernetica; import com.vivalux.cyb.api.Implant.ImplantType; import com.vivalux.cyb.api.Module; import com.vivalux.cyb.handler.GuiHandler; import com.vivalux.cyb.init.CYBItems; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; ...
package com.vivalux.cyb.item.module; public class ModuleLexica extends Module { public ModuleLexica(String str, String str2) { CYBItems.setItem(this, str, str2);
this.setCompatibles(EnumSet.of(ImplantType.TORSO));
1
AstartesGuardian/WebDAV-Server
WebDAV-Server/src/webdav/server/virtual/contentmutation/CryptedContentMutation.java
[ "public class HTTPEnvRequest\r\n{\r\n public static Builder create()\r\n {\r\n return new Builder();\r\n }\r\n public static class Builder\r\n {\r\n public Builder()\r\n { }\r\n \r\n private HTTPRequest request;\r\n private HTTPCommand command;\r\n pri...
import http.server.message.HTTPEnvRequest; import java.util.ArrayList; import java.util.List; import java.util.function.BiFunction; import webdav.server.tools.Helper; import webdav.server.crypter.CipherCrypter; import webdav.server.crypter.AbstractCrypter; import webdav.server.resource.IResource;
package webdav.server.virtual.contentmutation; public class CryptedContentMutation implements IContentMutation { public CryptedContentMutation( AbstractCrypter.Algorithm algo, String username, String password,
BiFunction<IResource, HTTPEnvRequest, byte[]> keyAdditionSupplier) throws Exception
0
IceReaper/DesktopAdventuresToolkit
src/net/eiveo/original/sections/todo/not_converted_yet/ZONE.java
[ "public class IZON {\r\n\tpublic short width;\r\n\tpublic short height;\r\n\tpublic short type;\r\n\tpublic short[] tiles;\r\n\tpublic Short world;\r\n\t\r\n\tpublic static IZON read(SmartByteBuffer data, boolean isYoda, short world) throws Exception {\r\n\t\tIZON instance = new IZON();\r\n\r\n\t\t// Somehow IZON i...
import java.util.ArrayList; import java.util.List; import net.eiveo.original.sections.IZON; import net.eiveo.original.sections.todo.determine_values.IACT; import net.eiveo.original.sections.todo.determine_values.IZAX; import net.eiveo.original.sections.todo.determine_values.IZX4; import net.eiveo.original.section...
package net.eiveo.original.sections.todo.not_converted_yet; public class ZONE { public List<Zone> zones = new ArrayList<>(); public static ZONE read(SmartByteBuffer data, boolean isYoda) throws Exception { ZONE instance = new ZONE(); int length = 0; int lengthStart = 0; if (!isYoda) { ...
public void write(SmartByteArrayOutputStream outputStream, boolean isYoda) {
5
cqjjjzr/BiliLiveLib
BiliLiveLib/src/main/java/charlie/bililivelib/capsuletoy/CapsuleToyProtocol.java
[ "public class Globals {\n private static final String BILI_PASSPORT_HOST_ROOT = \"passport.bilibili.com\";\n private static final String BILI_LIVE_HOST_ROOT = \"live.bilibili.com\";\n @Getter\n private static int CONNECTION_ALIVE_TIME_SECOND = 10;\n private static Globals instance;\n @Getter\n ...
import charlie.bililivelib.Globals; import charlie.bililivelib.exceptions.BiliLiveException; import charlie.bililivelib.exceptions.NetworkException; import charlie.bililivelib.exceptions.NotLoggedInException; import charlie.bililivelib.internalutil.net.PostArguments; import charlie.bililivelib.user.Session; import com....
package charlie.bililivelib.capsuletoy; /** * 用于处理扭蛋机的协议类。 * * @author Charlie Jiang * @since rv1 */ public class CapsuleToyProtocol { private static final String CAPSULE_OPEN_POST = "/api/ajaxCapsuleOpen"; private static final String CAPSULE_INFO_GET = "/api/ajaxCapsule"; private static final Strin...
return Globals.get().gson().fromJson(rootObject, OpenCapsuleToyInfo.class);
0
WolfgangFahl/Mediawiki-Japi
src/test/java/com/bitplan/mediawiki/japi/TestAPI_Allpages.java
[ "@XmlAccessorType(XmlAccessType.FIELD)\n@XmlType(name = \"\")\npublic class Bl {\n\n @XmlAttribute(name = \"pageid\")\n protected Integer pageid;\n @XmlAttribute(name = \"ns\")\n protected Integer ns;\n @XmlAttribute(name = \"title\")\n protected String title;\n\n /**\n * Ruft den Wert der ...
import com.bitplan.mediawiki.japi.api.Ii; import com.bitplan.mediawiki.japi.api.Im; import com.bitplan.mediawiki.japi.api.Img; import com.bitplan.mediawiki.japi.api.Iu; import com.bitplan.mediawiki.japi.api.P; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.List;...
/** * * This file is part of the https://github.com/WolfgangFahl/Mediawiki-Japi open source project * * Copyright 2015-2021 BITPlan GmbH https://github.com/BITPlan * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * * You may...
List<Iu> ius = lWiki.wiki.getImageUsage("File:" + img.getName(), "", 50);
4
arquillian/arquillian-recorder
arquillian-recorder-screenshooter-base/arquillian-recorder-screenshooter-impl-base/src/main/java/org/arquillian/extension/recorder/screenshooter/impl/ScreenshooterLifecycleObserver.java
[ "public class DefaultFileNameBuilder extends AbstractFileNameBuilder {\n\n protected ResourceMetaData metaData;\n\n protected When when;\n\n protected ResourceIdentifier<ResourceType> resourceIdentifier;\n\n public DefaultFileNameBuilder() {\n setDefaultFileIdentifier();\n }\n\n public Defa...
import org.arquillian.extension.recorder.DefaultFileNameBuilder; import org.arquillian.extension.recorder.RecorderStrategy; import org.arquillian.extension.recorder.RecorderStrategyRegister; import org.arquillian.extension.recorder.When; import org.arquillian.extension.recorder.screenshooter.AnnotationScreenshootingStr...
/* * JBoss, Home of Professional Open Source * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual * contributors by the @authors tag. See the copyright.txt in the * distribution for a full listing of individual contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); * y...
private Instance<RecorderStrategyRegister> recorderStrategyRegister;
1
ZhangFly/WTFSocket_Server_JAVA
src/wtf/socket/WTFSocketServer.java
[ "public interface WTFSocketController {\n\n /**\n * 控制器优先级\n * 数值越低优先级越高,默认的优先级为 WTFSocketPriority.MEDIUM\n *\n * @return 优先级数值\n */\n default int priority() {\n return WTFSocketPriority.MEDIUM;\n }\n\n /**\n * 是否响应该消息\n *\n * @param msg 消息对象\n *\n * @retur...
import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import wtf.socket.controller.WTFSocketController; import wtf.socket.controller.WTFSocketControllersGroup; import wtf.socket.event.WTFSocketEventListenersGroup; import wtf.socket.protocol.WTF...
package wtf.socket; /** * WTFSocket服务器 * <p> * Created by ZFly on 2017/4/25. */ public final class WTFSocketServer { /** * Spring 上下文 */ private ApplicationContext spring = new ClassPathXmlApplicationContext("spring.wtf.socket.xml"); /** * 消息调度组件 * 根据消息的头信息将消息投递到指定的目的地 */ ...
private WTFSocketProtocolFamily protocolFamily;
3