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
irccloud/android
src/com/irccloud/android/fragment/UsersListFragment.java
[ "public class ColorScheme {\n private static ColorScheme instance = new ColorScheme();\n\n public static ColorScheme getInstance() {\n return instance;\n }\n\n public static String getUserTheme() {\n String theme = PreferenceManager.getDefaultSharedPreferences(IRCCloudApplication.getInstan...
import android.app.Activity; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.View.OnLongClickListener; import android.view.ViewGrou...
public int bg_color; public int heading_color; public boolean last; public User user; } public static class ViewHolder extends RecyclerView.ViewHolder { public RowUserBinding binding; public ViewHolder(View v) { super(v); binding = DataBi...
Server s = ServersList.getInstance().getServer(cid);
4
kobakei/Anago
app/src/main/java/io/github/kobakei/anago/net/GitHubApiClient.java
[ "@Table\npublic class AuthToken {\n @PrimaryKey\n public final long id;\n @Column\n public final String token;\n @Column\n public final String hashed_token;\n @Column\n public final List<String> scopes;\n @Column\n public final String fingerprint;\n\n @Setter\n public AuthToken(l...
import java.util.List; import io.github.kobakei.anago.entity.AuthToken; import io.github.kobakei.anago.entity.Content; import io.github.kobakei.anago.entity.Issue; import io.github.kobakei.anago.entity.PullRequest; import io.github.kobakei.anago.entity.Repo; import io.github.kobakei.anago.entity.User; import io.github....
package io.github.kobakei.anago.net; /** * GitHub API client * Created by keisuke on 2016/09/18. */ public interface GitHubApiClient { @PUT("/authorizations/clients/{client_id}/{fingerprint}") Single<AuthToken> putAuthorization(@Header("Authorization") String authorization, ...
Single<List<Repo>> getPublicRepos(@Query("page") int page,
4
Wootric/WootricSDK-Android
androidsdk/src/test/java/com/wootric/androidsdk/network/tasks/CheckEligibilityTaskTest.java
[ "public class SurveyValidator implements CheckEligibilityTask.Callback, GetRegisteredEventsTask.Callback {\n\n private OnSurveyValidatedListener onSurveyValidatedListener;\n private User user;\n private EndUser endUser;\n private Settings settings;\n private WootricRemoteClient wootricRemoteClient;\n...
import com.wootric.androidsdk.SurveyValidator; import com.wootric.androidsdk.network.WootricRemoteClient; import com.wootric.androidsdk.objects.EndUser; import com.wootric.androidsdk.objects.Settings; import com.wootric.androidsdk.objects.User; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito....
package com.wootric.androidsdk.network.tasks; @RunWith(RobolectricTestRunner.class) public class CheckEligibilityTaskTest { @Mock WootricRemoteClient wootricRemoteClient; @Test public void testGet_RequestWithProperties() throws Exception { EndUser endUser = new EndUser(); Settings sett...
SurveyValidator surveyValidator = new SurveyValidator(testUser(), endUser, settings,
0
amzn/amazon-instant-access-sdk-java
src/test/java/com/amazon/dtasdk/v2/servlets/AccountLinkingServletTest.java
[ "public class Credential {\n private String secretKey;\n private String publicKey;\n\n public Credential(String secretkey, String publicKey) {\n this.secretKey = secretkey;\n this.publicKey = publicKey;\n }\n\n public String getSecretKey() {\n return secretKey;\n }\n\n publ...
import com.amazon.dtasdk.signature.Credential; import com.amazon.dtasdk.signature.CredentialStore; import com.amazon.dtasdk.signature.SigningException; import com.amazon.dtasdk.v2.serialization.messages.GetUserIdSerializableRequest; import com.amazon.dtasdk.v2.serialization.messages.GetUserIdSerializableResponse; impor...
/* * Copyright 2017-2021 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "l...
Credential credential = new Credential("SECRETKEY", "KEYID");
0
Whiley/WhileyTheoremProver
src/main/java/wytp/proof/util/DeltaProof.java
[ "public interface Formula extends Expr {\n\n\t@Override\n\tpublic Formula clone(SyntacticItem[] children);\n\n\tpublic static class Truth extends Expr.Constant implements Formula {\n\n\t\tpublic Truth(boolean value) {\n\t\t\tsuper(new Value.Bool(value));\n\t\t}\n\n\t\tpublic Truth(Value.Bool value) {\n\t\t\tsuper(v...
import java.util.BitSet; import wyfs.util.ArrayUtils; import wytp.proof.Formula; import wytp.proof.Proof; import wytp.proof.util.AbstractProof.AbstractState; import wytp.types.TypeInferer; import wytp.types.TypeInferer.Environment; import wytp.types.util.StdTypeEnvironment; import wyal.lang.WyalFile.Declaration.Assert;...
// 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 State(State state, Proof.Rule rule, FastDelta delta, Formula... dependencies) {
1
offa/NBCndUnit
src/test/java/bv/offa/netbeans/cnd/unittest/cpputest/CppUTestTimeHandlerTest.java
[ "public class CndTestCase extends Testcase\n{\n private final TestFramework framework;\n private FailureInfo failureInfo;\n \n \n public CndTestCase(String name, TestFramework framework, TestSession session)\n {\n super(name, framework.getName(), session);\n this.framework = framewor...
import static org.mockito.Mockito.*; import org.netbeans.modules.gsf.testrunner.api.TestSession; import bv.offa.netbeans.cnd.unittest.api.CndTestCase; import bv.offa.netbeans.cnd.unittest.api.ManagerAdapter; import bv.offa.netbeans.cnd.unittest.api.TestFramework; import static bv.offa.netbeans.cnd.unittest.testhelper.H...
/* * NBCndUnit - C/C++ unit tests for NetBeans. * Copyright (C) 2015-2021 offa * * This file is part of NBCndUnit. * * NBCndUnit 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...
private ManagerAdapter manager;
1
luminis-ams/elastic-rest-spring-wrapper
src/main/java/eu/luminis/elastic/search/SearchService.java
[ "@Component\npublic class ClusterManagementService {\n\n private static final Logger LOGGER = LoggerFactory.getLogger(ClusterManagementService.class);\n private static final String HEADER_CONTENT_TYPE_KEY = \"Content-Type\";\n private static final String DEFAULT_HEADER_CONTENT_TYPE = \"application/json\";\...
import com.fasterxml.jackson.databind.ObjectMapper; import eu.luminis.elastic.cluster.ClusterManagementService; import eu.luminis.elastic.document.QueryExecutionException; import eu.luminis.elastic.search.response.HitsAggsResponse; import eu.luminis.elastic.search.response.HitsResponse; import eu.luminis.elastic.search...
package eu.luminis.elastic.search; /** * Service that provides methods to execute search requests. */ @Service public class SearchService { private static final Logger logger = LoggerFactory.getLogger(SearchService.class); private final ClusterManagementService clusterManagementService; private final...
ElasticQueryResponse<T> elasticQueryResponse = doExecuteQuery(clusterName, request);
5
HGGM-LIM/jclustering
src/main/java/jclustering/techniques/ClusteringTechnique.java
[ "public static JComboBox getMetricList(ClusteringTechnique t, ImagePlusHyp ip) {\n\n JComboBox c = createChoices(\"metrics\", getAllMetrics(), t);\n t.setMetric(getClusteringMetric((String)c.getItemAt(0), ip));\n\n return c;\n\n}", "public static ClusteringMetric getClusteringMetric(String name,\n ...
import static jclustering.GUIUtils.getMetricList; import static jclustering.Utils.getClusteringMetric; import ij.ImagePlus; import java.awt.Component; import java.awt.Panel; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.util.ArrayList; import javax.swing.JComboBox; import javax.swing....
package jclustering.techniques; /** * This superclass should be extended by all user-implemented clustering * techniques. If no configuration panel is needed, only the {@link #process()} * method must be implemented. Otherwise, the method {@link #makeConfig()} must * also be filled. * * @author <a href="mai...
protected ImagePlusHyp ip;
4
thom-nic/openfire-jboss-clustering
src/main/java/com/enernoc/rnd/openfire/cluster/session/ClusteredClientSession.java
[ "public class ClientSessionTask extends RemoteSessionTask {\r\n private JID address;\r\n\r\n public ClientSessionTask() {\r\n super();\r\n }\r\n\r\n public ClientSessionTask(JID address, Operation operation) {\r\n super(operation);\r\n this.address = address;\r\n }\r\n\r\n pro...
import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import org.dom4j.Element; import org.dom4j.tree.DefaultElement; import org.jivesoftware.openfire.SessionManager; import org.jivesoftware.openfire.privacy.PrivacyList; import org.jivesoftware.openfire.privacy.PrivacyListManager; import ...
/** * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * dist...
return new ClientSessionTask(address, operation);
0
BracketCove/Profiler
app/src/test/java/com/wiseass/profiler/CreateAccountPresenterTest.java
[ "public interface CreateAccountContract {\n interface View extends BaseView<Presenter> {\n void makeToast(@StringRes int stringId);\n\n String getEmail();\n\n String getPassword();\n\n String getPasswordConfirmation();\n\n String getName();\n\n //TODO: add name input to ...
import com.wiseass.profiler.createaccount.CreateAccountContract; import com.wiseass.profiler.createaccount.CreateAccountPresenter; import com.wiseass.profiler.data.auth.AuthInjection; import com.wiseass.profiler.data.auth.AuthSource; import com.wiseass.profiler.data.database.DatabaseInjection; import com.wiseass.profil...
package com.wiseass.profiler; /** * Responsible for Creating a new User in the AuthService. * Created by Ryan on 13/01/2017. */ @RunWith(MockitoJUnitRunner.class) public class CreateAccountPresenterTest { public static final String VALID_PASSWORD = "123456"; public static final String INVALID_PASSWOR...
private AuthSource authSource;
3
RutledgePaulV/q-builders
src/main/java/com/github/rutledgepaulv/qbuilders/delegates/virtual/NumberPropertyDelegate.java
[ "@SuppressWarnings(\"unchecked\")\npublic class QBuilder<T extends QBuilder<T>> implements Partial<T> {\n\n protected LogicalNode root;\n protected LogicalNode current;\n\n public QBuilder() {\n root = current = new OrNode();\n }\n\n public final <S extends Enum<S>> EnumProperty<T,S> enumerati...
import com.github.rutledgepaulv.qbuilders.builders.QBuilder; import com.github.rutledgepaulv.qbuilders.conditions.Condition; import com.github.rutledgepaulv.qbuilders.operators.ComparisonOperator; import com.github.rutledgepaulv.qbuilders.properties.virtual.NumberProperty; import com.github.rutledgepaulv.qbuilders.stru...
/* * * * com.github.rutledgepaulv.qbuilders.delegates.virtual.NumberPropertyDelegate * * * * * * Copyright (C) 2016 Paul Rutledge <paul.v.rutledge@gmail.com> * * * * * * This software may be modified and distributed under the terms * * * of the MIT license. See the LICENSE file for details. * * *...
public final Condition<T> gt(S number) {
1
simo415/spc
src/com/sijobe/spc/hooks/CheckUpdates.java
[ "public class Constants {\n\n /**\n * Contains the version string of the current Minecraft version\n */\n public static final String VERSION = \"4.9\";\n \n /**\n * The name of the mod\n */\n public static final String NAME = \"Single Player Commands\";\n \n /**\n * The current version ...
import com.sijobe.spc.core.Constants; import com.sijobe.spc.core.PlayerMP; import com.sijobe.spc.updater.CheckVersion; import com.sijobe.spc.updater.ModVersion; import com.sijobe.spc.updater.UpdateCallback; import com.sijobe.spc.util.FontColour; import com.sijobe.spc.wrapper.Player; import java.util.ArrayList; import j...
package com.sijobe.spc.hooks; /** * Loaded on player load and checks for updates of the mod. * * TODO: Fix updater so it isn't shit * TODO: Check once, alert users afterward * * @author simo_415 */ public class CheckUpdates extends PlayerMP { /** * The players names who have already been alerted ...
public void onTick(Player player) {
6
awslabs/amazon-sqs-java-messaging-lib
src/main/java/com/amazon/sqs/javamessaging/SQSSession.java
[ "public static class MessageManager {\n\n private final PrefetchManager prefetchManager;\n\n private final javax.jms.Message message;\n\n public MessageManager(PrefetchManager prefetchManager, javax.jms.Message message) {\n this.prefetchManager = prefetchManager;\n this.message = message;\n ...
import java.io.Serializable; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java...
/* * Copyright 2010-2019 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "lice...
private final NegativeAcknowledger negativeAcknowledger;
3
antest1/kcanotify
app/src/main/java/com/antest1/kcanotify/KcaInspectorDetailActivity.java
[ "public static final int KCANOTIFY_DB_VERSION = 5;", "public static final int KCANOTIFY_QTDB_VERSION = 3;", "public static final List<String> PREFS_BOOLEAN_LIST = Arrays.asList(PREF_BOOLEAN_ARRAY);", "public static Boolean getBooleanPreferences(Context ctx, String key) {\n SharedPreferences pref = ctx.getS...
import android.content.SharedPreferences; import android.graphics.PorterDuff; import android.os.Bundle; import androidx.core.content.ContextCompat; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; import android.view.MenuItem; import android.view.MotionEvent; import android.vie...
LocaleUtils.updateConfig(this); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle bundle = getIntent().getExtras(); final String type_key = bundle.getString("key", null); if (type_key == null) { fi...
value_text = String.valueOf(getBooleanPreferences(getApplicationContext(), key));
3
DataBiosphere/terra-cloud-resource-lib
google-notebooks/src/test/java/bio/terra/cloudres/google/notebooks/AIPlatformNotebooksCowTest.java
[ "public class OperationCow<T> {\n /** The underlying api service Operation (within an adapter). */\n private final OperationAdapter<T> operationAdapter;\n\n private final OperationAdapter.Factory<T> operationAdapterFactory;\n private final GetRequestFactory<T> getRequestFactory;\n\n public OperationCow(\n ...
import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import bio.terra.cloudres.google.api.services.common.OperationCow; import bio.terra.cloudres.google.api.services.common.testing.OperationTestUtil...
package bio.terra.cloudres.google.notebooks; @Tag("integration") public class AIPlatformNotebooksCowTest { private static final AIPlatformNotebooksCow notebooks = defaultNotebooksCow(); /** A dynamically created Google Project to manipulate AI Notebooks within for testing. */ private static Project reusablePro...
IntegrationCredentials.getAdminGoogleCredentialsOrDie());
6
magnifikus/modPLC
src/minecraft/de/squig/plc/logic/elements/Pulse.java
[ "public class LogicTextureTile {\n\tprivate final static int ONOffset = 4;\n\t\n\tpublic final static LogicTextureTile OUTPUT = new LogicTextureTile(0,4,ONOffset);\n\t//public final static LogicTextureTile INPUT = new LogicTextureTile(1,4,ONOffset);\n\t\n\tpublic final static LogicTextureTile LINELEFT = new LogicTe...
import de.squig.plc.client.gui.controller.LogicTextureTile; import de.squig.plc.logic.Circuit; import de.squig.plc.logic.Signal; import de.squig.plc.logic.elements.functions.ElementFunction; import de.squig.plc.logic.helper.LogHelper;
package de.squig.plc.logic.elements; public class Pulse extends CircuitElement { private Signal oldSignal = Signal.OFF; public Pulse(Circuit circuit, int mapX, int mapY) { super(circuit, mapX, mapY, ElementFunction.PULSE);
setTexture(LogicTextureTile.LOGIC_PULSE);
0
ltettoni/logic2j
src/main/java/org/logic2j/core/library/impl/CoreLibrary.java
[ "public static TermApi termApi() {\n return termApi;\n}", "public static TermApiExt termApiExt() {\n return termApi;\n}", "public interface ClauseProvider {\n\n /**\n * Provide {@link Clause}s (facts or rules) potentially matching theGoal argument, which often is a Struct with bound or unbound\n * variab...
import static org.logic2j.engine.model.TermApiLocator.termApi; import static org.logic2j.engine.model.TermApiLocator.termApiExt; import java.util.ArrayList; import java.util.Collection; import java.util.LinkedHashSet; import org.logic2j.core.api.ClauseProvider; import org.logic2j.core.api.library.annotation.Functor; im...
/* * logic2j - "Bring Logic to your Java" - Copyright (c) 2017 Laurent.Tettoni@gmail.com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your opt...
public CoreLibrary(PrologImplementation theProlog) {
5
peshkira/c3po
c3po-core/src/main/java/com/petpet/c3po/utils/Configurator.java
[ "public class FITSHelper {\n\n /**\n * The properties file.\n */\n private static Properties FITS_PROPS;\n\n /**\n * Reads the mappings into the {@link Properties} object.\n */\n public static void init() {\n try {\n InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsSt...
import com.petpet.c3po.dao.DBCache; import com.petpet.c3po.dao.DefaultPersistenceLayer; import com.petpet.c3po.utils.exceptions.C3POPersistenceException; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.Properties; import j...
/******************************************************************************* * Copyright 2013 Petar Petrov <me@petarpetrov.org> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * ...
String persistence = this.getStringProperty( Constants.CNF_PERSISTENCE );
2
lovro-i/apro
src/fr/lri/tao/apro/hiap/NodeWorker.java
[ "public class Points extends ArrayList<Point> {\n \n private final Map<Long, Point> pointMap = new HashMap<Long, Point>();\n \n @Override\n public boolean add(Point point) { \n this.pointMap.put(point.getId(), point);\n return super.add(point);\n }\n \n public Point getByIndex(int index) {\n ret...
import fr.lri.tao.apro.data.points.Points; import fr.lri.tao.apro.data.points.PointsProvider; import fr.lri.tao.apro.data.points.SimilarityMeasure; import fr.lri.tao.apro.ap.Apro; import fr.lri.tao.apro.util.Logger; import fr.lri.tao.numa.NUMA; import fr.lri.tao.numa.SysUtils;
package fr.lri.tao.apro.hiap; /** Worker on a NUMA node that takes one set of points and performs Affinity Propagation on it. * The resulting set of exemplars is fed back to HiAP set of all exemplars for later performing WAP */ public class NodeWorker extends Thread { private final HiAP hiap; private final I...
Points points = queue.get();
0
EyeTribe/tet-java-client
javafx-sample/src/main/java/com/theeyetribe/javafx/scenes/SceneMainController.java
[ "public class GazeManager extends GazeManagerCore\n{\n private GazeManager()\n {\n super();\n }\n\n public static GazeManager getInstance()\n {\n return Holder.INSTANCE;\n }\n\n private static class Holder\n {\n // thread-safe initialization on demand\n static fin...
import com.theeyetribe.clientsdk.GazeManager; import com.theeyetribe.clientsdk.data.CalibrationResult; import com.theeyetribe.clientsdk.data.GazeData; import com.theeyetribe.clientsdk.data.Point2D; import com.theeyetribe.clientsdk.utils.GazeUtils; import com.theeyetribe.javafx.utils.FrameRateGazeDataDeque; import com.t...
{ super.onStart(); mIsRecievingFrames = false; } @Override public void onGazeUpdate(GazeData gazeData) { Platform.runLater(() -> { if (!mIsRecievingFrames) { progress.setVisible(false); updateState(); ...
GazeManager.getInstance().activateAsync();
0
chedim/minedriod
src/main/java/com/onkiup/minedroid/gui/views/EditText.java
[ "public interface Context {\n /**\n * @return Context id\n */\n int contextId();\n\n}", "public class ColorDrawable implements Drawable {\n\n /**\n * Rectangle color\n */\n protected GLColor color;\n\n /**\n * Rectangle size\n */\n protected Point size;\n private boole...
import com.onkiup.minedroid.Context; import com.onkiup.minedroid.gui.drawables.ColorDrawable; import com.onkiup.minedroid.gui.drawables.Drawable; import com.onkiup.minedroid.gui.events.KeyEvent; import com.onkiup.minedroid.gui.events.MouseEvent; import com.onkiup.minedroid.gui.primitives.Point; import java.lang.reflect...
private void key_199(KeyEvent event) { if (getText().length() == 0) return; List<String>[] lines = text.getSplitLines(getText(), resolvedLayout.getInnerWidth(), selectionEnd); if (lines[0].size() == 0) return; selectionStart = selectionEnd = selectionEnd - lines[0].get(lines[0].size(...
public void handleMouseEvent(MouseEvent event) {
4
syd711/mephisto_iii
src/main/java/de/calette/mephisto3/ui/system/SystemPanel.java
[ "public class Mephisto3 extends Application {\n public static final int WIDTH = Callete.getConfiguration().getInt(\"width\", 700);\n public static final int HEIGHT = Callete.getConfiguration().getInt(\"height\", 395);\n public static StackPane rootStack;\n\n public static void main(String[] args) {\n launch(...
import callete.api.Callete; import callete.api.services.system.SystemService; import callete.api.util.SystemUtils; import de.calette.mephisto3.Mephisto3; import de.calette.mephisto3.control.ServiceController; import de.calette.mephisto3.control.ServiceState; import de.calette.mephisto3.ui.ControllablePanel; import de.c...
package de.calette.mephisto3.ui.system; /** * Display different system information. */ public class SystemPanel extends ControllablePanel { private final static Logger LOG = LoggerFactory.getLogger(SystemPanel.class); private ProgressIndicator diskSpace; private Text freeMem; private Text usedMem; priv...
ComponentUtil.createText(key, "system-key", infoBox);
4
gizwits/Gizwits-WaterHeater_Android
src/zxing/CaptureActivity.java
[ "public final class CameraManager {\n\n private static final String TAG = CameraManager.class.getSimpleName();\n\n private static final int MIN_FRAME_WIDTH = 240;\n private static final int MIN_FRAME_HEIGHT = 240;\n private static final int MAX_FRAME_WIDTH = 480;\n private static final int MAX_FRAME_HEIGHT = 3...
import java.io.IOException; import java.util.Vector; import zxing.camera.CameraManager; import zxing.decoding.CaptureActivityHandler; import zxing.decoding.InactivityTimer; import zxing.view.ViewfinderView; import android.content.Intent; import android.graphics.Bitmap; import android.media.AudioManager; import android....
package zxing; public class CaptureActivity extends BaseActivity implements Callback { private CaptureActivityHandler handler; private ViewfinderView viewfinderView; private boolean hasSurface; private Vector<BarcodeFormat> decodeFormats; private String characterSet; private InactivityTimer inactivityTimer; ...
setContentView(R.layout.zxing_layout);
4
bechte/junit-hierarchicalcontextrunner
src/test/java/de/bechte/junit/runners/context/processing/ContextExecutorTest.java
[ "public class ContextDescriber extends SuiteDescriber {\n private final ChildResolver<FrameworkMethod> methodResolver;\n private final Describer<FrameworkMethod> methodDescriber;\n\n public ContextDescriber(final ChildResolver<Class<?>> contextResolver,\n final ChildResolver<FrameworkMethod> met...
import de.bechte.junit.runners.context.description.ContextDescriber; import de.bechte.junit.stubs.ContextTestClassStub; import de.bechte.junit.stubs.ContextTestClassWithInheritedAbstractInnerClassStub; import de.bechte.junit.stubs.EmptyTestClassStub; import de.bechte.junit.stubs.SimpleTestClassStub; import org.junit.Be...
package de.bechte.junit.runners.context.processing; public class ContextExecutorTest { @Mock private ContextDescriber describer; @Mock private RunNotifier notifier; private ContextExecutor executor; @Before public void setUp() throws Exception { initMocks(this); execut...
executor.run(null, ContextTestClassStub.class, notifier);
1
ofelbaum/spb-transport-app
src/main/java/com/emal/android/transport/spb/GMapVehicleSyncAdapter.java
[ "public abstract class AbstractDrawerActivity extends FragmentActivity {\n private static final String TAG = AbstractDrawerActivity.class.getName();\n private ApplicationParams appParams;\n private DrawerLayout mDrawerLayout;\n private ListView mDrawerList;\n private ActionBarDrawerToggle mDrawerTogg...
import android.app.Activity; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Handler; import android.view.Menu; import com.emal.android.transport.spb.activity.AbstractDrawerActivity; import com.emal.android.transport.spb.portal.PortalClient; import com.emal.android.transport.spb...
package com.emal.android.transport.spb; /** * User: alexey.emelyanenko@gmail.com * Date: 5/19/13 1:18 AM */ public class GMapVehicleSyncAdapter implements VehicleSyncAdapter { private static final String TAG = GMapVehicleSyncAdapter.class.getName(); private Activity activity; private SupportMapFragmen...
private int syncTime = Constants.DEFAULT_SYNC_MS;
3
petosorus/dotalys-cli
src/de/lighti/components/batch/BatchDialog.java
[ "public class ProgressDialog extends JDialog {\r\n /**\r\n * \r\n */\r\n private static final long serialVersionUID = 2666391304959459393L;\r\n private JProgressBar progressBar;\r\n\r\n public ProgressDialog( Dialog owner ) {\r\n super( owner );\r\n\r\n setModalityType( ModalityTyp...
import java.awt.Component; import java.awt.Dimension; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.beans.Pro...
package de.lighti.components.batch; public class BatchDialog extends JDialog { private static String escapeUrlAsFilename( String url ) { final StringBuffer sb = new StringBuffer(); // Apply the regex. final Matcher m = PATTERN.matcher( url ); while (m.find()) { ...
chooser.setFileFilter( DataImporter.FILE_FILTER );
4
biboudis/streamalg
src/test/java/algebras/TestAlgebrasFlatMapAlgebras.java
[ "public class BaseTest {\n protected final ByteArrayOutputStream outContent = new ByteArrayOutputStream();\n protected final ByteArrayOutputStream errContent = new ByteArrayOutputStream();\n\n @Before\n public void setUpStreams() {\n System.setOut(new PrintStream(outContent));\n System.set...
import base.BaseTest; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import streams.algebras.ExecIterateStreamAlg; import streams.factories.ExecPullFactory; import streams.factories.ExecPullWithIterateFactory; import streams.factories.PullFactory; import streams.higher.App; import streams.high...
package algebras; /** * Authors: * Aggelos Biboudis (@biboudis) * Nick Palladinos (@NickPalladinos) */ public class TestAlgebrasFlatMapAlgebras extends BaseTest { public Long[] v, v_small; @Before public void setUp() { v = IntStream.range(0, 15).mapToObj(Long::new).toArray(Long[]::new); ...
App<Pull.t, Long> map = algebra.map(y -> {
5
Azanor/thaumcraft-api
internal/IInternalMethodHandler.java
[ "public interface ISeal {\n\t\n\t/**\n\t * @return\n\t * A unique string identifier for this seal. A good idea would be to append your modid before the identifier. \n\t * For example: \"thaumcraft:fetch\"\n\t * This will also be used to create the item model for the seal placer so you will have to define a json usi...
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import thaumcraft.api.aspects.AspectList; import thaumcraft.api.capabilities.IPlayerKnowledge.EnumKnowledgeType; import thaumcraft.api.capabilities.IPlayerWarp...
package thaumcraft.api.internal; /** * * @author Azanor * * @see IInternalMethodHandler#addKnowledge * @see IInternalMethodHandler#progressResearch * @see IInternalMethodHandler#completeResearch * @see IInternalMethodHandler#doesPlayerHaveRequisites * @see IInternalMethodHandler#addWarpToPlayer * @see IInte...
public ISealEntity getSealEntity(int dim, SealPos pos);
1
piyell/NeteaseCloudMusic
app/src/main/java/com/zsorg/neteasecloudmusic/presenters/SubMusicPresenter.java
[ "public class CONST {\n public static final String MUSIC_TYPE = \"MUSIC_TYPE\";\n public static final int TYPE_SINGLE = 0;\n public static final int TYPE_SINGER = 1;\n public static final int TYPE_ALBUM = 2;\n public static final int TYPE_FOLDER = 3;\n\n public static final String INTENT_PLAYLIST_...
import com.zsorg.neteasecloudmusic.CONST; import com.zsorg.neteasecloudmusic.models.PlaylistModel; import com.zsorg.neteasecloudmusic.models.beans.MusicBean; import com.zsorg.neteasecloudmusic.models.db.DiskMusicDao; import com.zsorg.neteasecloudmusic.views.ISubMusicView; import java.util.List;
package com.zsorg.neteasecloudmusic.presenters; /** * Project:NeteaseCloudMusic * * @Author: piyel_000 * Created on 2017/1/16. * E-mail:piyell@qq.com */ public class SubMusicPresenter { private final ISubMusicView mIView;
private final DiskMusicDao musicDao;
3
Wackymax/CPOrm
CPOrm/src/main/java/za/co/cporm/model/query/Select.java
[ "public class CPOrm {\n\n private static Context applicationContext;\n private static TableDetailsCache tableDetailsCache;\n\n public enum ChangeType {\n INSERT,\n UPDATE,\n DELETE\n }\n\n /**\n * This is an optional initialize method that can be used to set the application c...
import android.content.ContentResolver; import android.content.Context; import android.database.Cursor; import android.net.Uri; import android.text.TextUtils; import za.co.cporm.model.CPOrm; import za.co.cporm.model.generate.TableDetails; import za.co.cporm.model.map.SqlColumnMappingFactory; import za.co.cporm.model.ut...
* @return The current select instance */ public DataFilterCriterion.Builder<DataFilterCriteria.Builder<Select<Model>>> andBracket() { return new DataFilterCriterion.Builder<DataFilterCriteria.Builder<Select<Model>>>(new DataFilterCriteria.Builder<Select<Model>>(this, DataFilterClause.DataFilterCo...
public CPOrmCursor<Model> queryAsCursor() {
3
porscheinformatik/selenium-components
src/main/java/at/porscheinformatik/seleniumcomponents/component/ButtonComponent.java
[ "public interface WebElementSelector\n{\n\n /**\n * Creates a selector that always uses the specified element. This selector ignores the {@link SearchContext}.\n *\n * @param description a description for toString, to make it easier to find the specified element. Most-often the\n * des...
import static at.porscheinformatik.seleniumcomponents.WebElementSelector.*; import at.porscheinformatik.seleniumcomponents.AbstractSeleniumComponent; import at.porscheinformatik.seleniumcomponents.ActiveSeleniumComponent; import at.porscheinformatik.seleniumcomponents.SeleniumComponent; import at.porscheinformatik.sele...
/** * */ package at.porscheinformatik.seleniumcomponents.component; /** * @author Daniel Furtlehner */ public class ButtonComponent extends AbstractSeleniumComponent implements ActiveSeleniumComponent { public ButtonComponent(SeleniumComponent parent) { super(parent, selectByTagName("button")); ...
public ButtonComponent(SeleniumComponent parent, WebElementSelector selector)
4
cmarchand/gaulois-pipe
gaulois-pipe/src/test/java/top/marchand/xml/gaulois/config/SchemaConfigTest.java
[ "public class GauloisPipe {\r\n\r\n /**\r\n * Logger.\r\n */\r\n private static final Logger LOGGER = LoggerFactory.getLogger(GauloisPipe.class);\r\n public static final String INSTANCE_DEFAULT_NAME = \"instance1\";\r\n \r\n private String instanceName;\r\n private Config config;\r\n \r...
import fr.efl.chaine.xslt.GauloisPipe; import fr.efl.chaine.xslt.InvalidSyntaxException; import fr.efl.chaine.xslt.SaxonConfigurationFactory; import fr.efl.chaine.xslt.config.Config; import fr.efl.chaine.xslt.config.ConfigUtil; import fr.efl.chaine.xslt.utils.ParameterValue; import java.util.HashMap; import net.sf.saxo...
/** * This Source Code Form is subject to the terms of * the Mozilla Public License, v. 2.0. If a copy of * the MPL was not distributed with this file, You * can obtain one at https://mozilla.org/MPL/2.0/. */ package top.marchand.xml.gaulois.config; /** * Class to test validity of configuration schema. * @a...
DatatypeFactory factory = DatatypeFactory.getInstance(configFactory.getConfiguration());
6
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/api/CatalogControllerTests.java
[ "public final class ApplicationInstance {\n\n\tprivate List<ApplicationEvent> changes = new ArrayList<>();\n\n\tprivate final String id;\n\tprivate final String application;\n\tprivate final URI baseUri;\n\tprivate State state;\n\tprivate Status healthStatus = Status.UNKNOWN;\n\tprivate Links actuatorEndpoints = ne...
import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.verify; import static org.mockito.BDDMockito.when; import static org.mockito.Mockito.verifyNoMoreInteractions; import java.util.Collections; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMoc...
/* * Copyright 2015-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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
when(this.catalogService.getCatalog()).thenReturn(CatalogMother.emptyCatalog());
3
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/service/impl/MailJobServiceImpl.java
[ "public abstract class BaseJPAServiceImpl<T extends Entity, ID extends Serializable> implements BaseService<T, ID> {\n protected BaseJPARepository<T, ID> baseJpaRepository;\n protected Class<T> entityClass;\n\n public T insert(T object) throws Exception {\n return baseJpaRepository.insert(object);\n...
import yourwebproject2.framework.data.BaseJPAServiceImpl; import yourwebproject2.model.entity.Job; import yourwebproject2.model.entity.User; import yourwebproject2.model.repository.JobRepository; import yourwebproject2.service.MailJobService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springfra...
package yourwebproject2.service.impl; /** * @author: kameshr */ @Service @Transactional public class MailJobServiceImpl extends BaseJPAServiceImpl<Job, Long> implements MailJobService { private static Logger LOG = LoggerFactory.getLogger(MailJobServiceImpl.class); protected @Autowired
JobRepository jobRepository;
3
svarzee/gpsoauth-java
src/main/java/xxx/sun/security/ssl/Handshaker.java
[ "final static class BulkCipher {\n\n // descriptive name including key size, e.g. AES/128\n final String description;\n\n // JCE cipher transformation string, e.g. AES/CBC/NoPadding\n final String transformation;\n\n // algorithm name, e.g. AES\n final String algorithm;\n\n // supported and com...
import sun.misc.HexDumpEncoder; import sun.security.internal.spec.TlsKeyMaterialParameterSpec; import sun.security.internal.spec.TlsKeyMaterialSpec; import sun.security.internal.spec.TlsMasterSecretParameterSpec; import xxx.sun.security.ssl.CipherSuite.BulkCipher; import xxx.sun.security.ssl.CipherSuite.KeyExchange; im...
/* * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free ...
KeyExchange keyExchange;
1
alaisi/postgres-async-driver
src/main/java/com/github/pgasync/PgConnectible.java
[ "public class DataConverter {\n\n private final Map<Class<?>, Converter<?>> typeToConverter;\n private final Charset encoding;\n\n public DataConverter(List<Converter<?>> converters, Charset encoding) {\n this.typeToConverter = converters.stream()\n .collect(Collectors.toMap(Converter...
import com.github.pgasync.conversion.DataConverter; import com.pgasync.Connection; import com.pgasync.NettyConnectibleBuilder; import com.pgasync.Connectible; import com.pgasync.Row; import com.pgasync.Transaction; import java.nio.charset.Charset; import java.util.Map; import java.util.concurrent.CompletableFuture; imp...
package com.github.pgasync; public abstract class PgConnectible implements Connectible { final String validationQuery; final String username; final DataConverter dataConverter; final Executor futuresExecutor; final Function<Executor, ProtocolStream> toStream; protected final String password...
public CompletableFuture<Transaction> begin() {
5
nisovin/Shopkeepers
src/main/java/com/nisovin/shopkeepers/shoptypes/BookPlayerShopkeeper.java
[ "public class Settings {\n\n\tpublic static String fileEncoding = \"UTF-8\";\n\tpublic static boolean debug = false;\n\n\tpublic static boolean disableOtherVillagers = false;\n\tpublic static boolean hireOtherVillagers = false;\n\tpublic static boolean blockVillagerSpawns = false;\n\tpublic static boolean enableSpa...
import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.List; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Chest; import org.bukkit.configuration.ConfigurationSection; import org.bu...
String bookTitle = getTitleOfBook(item); if (bookTitle != null) { int price = this.getPriceFromColumn(inventory, column); if (price > 0) { shopkeeper.addOffer(bookTitle, price); } else { shopkeeper.removeOffer(bookTitle); } } } } } } protected static clas...
this.registerUIHandler(new WrittenBookPlayerShopEditorHandler(DefaultUIs.EDITOR_WINDOW, this));
6
cloud-software-foundation/c5-replicator
c5-replicator-log/src/main/java/c5db/log/SequentialLogWithHeader.java
[ "public static <T> T decodeAndCheckCrc(InputStream inputStream, Schema<T> schema)\n throws IOException, CrcError {\n // TODO this should check the length first and compare it with a passed-in maximum length\n final T message = schema.newMessage();\n final CrcInputStream crcStream = new CrcInputStream(inputStr...
import static c5db.log.LogPersistenceService.PersistenceNavigator; import static c5db.log.LogPersistenceService.PersistenceNavigatorFactory; import static c5db.log.LogPersistenceService.PersistenceReader; import c5db.interfaces.log.SequentialEntryCodec; import c5db.log.generated.OLogHeader; import com.google.common.col...
/* * Copyright 2014 WANdisco * * WANdisco licenses this file to you under the Apache License, * version 2.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
public static SequentialLogWithHeader readLogFromPersistence(BytePersistence persistence,
2
txusballesteros/Android-Clean-Testing
app/src/test/java/com/txusballesteros/testing/presentation/MainPresenterUnitTest.java
[ "@RunWith(JUnit4.class)\n@SmallTest\npublic abstract class UnitTest {\n @Before\n public final void setup() {\n initializeMocks();\n onSetup();\n }\n\n private void initializeMocks() {\n MockitoAnnotations.initMocks(this);\n }\n\n protected abstract void onSetup();\n}", "pub...
import org.junit.Test; import org.mockito.Mock; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; import java.util.List; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.doReturn...
/* * Copyright Txus Ballesteros 2016 (@txusballesteros) * * This file is part of some open source application. * * 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 copyrig...
@Mock List<ImageModel> mapperResultMock;
3
MPieter/Notification-Analyser
NotificationAnalyser/app/src/main/java/com/tierep/notificationanalyser/ui/AppDetail.java
[ "public class NotificationItemAdapter extends ArrayAdapter<NotificationItem> {\n private SimpleDateFormat dateFormatStd = new SimpleDateFormat(\"yyyy-MM-dd\");\n private SimpleDateFormat dateFormatToday = new SimpleDateFormat(\"HH:mm\");\n private SimpleDateFormat dateFormatOlder = new SimpleDateFormat(\"y...
import android.app.Activity; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.widget.CheckBox; import android.widget.ImageView; import and...
package com.tierep.notificationanalyser.ui; /** * This activity needs an intent that provides information about which application items should be * displayed, for which time period (day, week or month) and for which date. */ public class AppDetail extends Activity { public static final String EXTRA_PACKAGENA...
private List<NotificationItem> makeListObjects() {
4
horizon-institute/artcodes-android
library/src/main/java/uk/ac/horizon/artcodes/detect/marker/MarkerDetector.java
[ "public interface CameraFocusControl\n{\n void focus(Runnable callback);\n}", "public interface DetectorSetting\n{\n\tvoid nextValue();\n\n\t@DrawableRes\n\tint getIcon();\n\n\t@StringRes\n\tint getText();\n}", "public class ImageBuffers\n{\n\tprivate byte[] buffer;\n\n\t/**\n\t * cameraImage stores the full...
import android.content.Context; import android.util.Log; import org.opencv.core.Core; import org.opencv.core.Mat; import org.opencv.core.MatOfPoint; import org.opencv.core.MatOfPoint2f; import org.opencv.core.Point; import org.opencv.core.Rect; import org.opencv.core.RotatedRect; import org.opencv.core.Scalar; import o...
/* * Artcodes recognises a different marker scheme that allows the * creation of aesthetically pleasing, even beautiful, codes. * Copyright (C) 2013-2016 The University of Nottingham * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Pu...
public static class Factory implements ImageProcessorFactory
7
michaelmarconi/oncue
oncue-worker/src/main/java/oncue/worker/AbstractWorker.java
[ "public class AkkaClient implements Client {\n\n\tprivate LoggingAdapter log;\n\n\tprivate Settings settings;\n\n\tprivate ActorRef scheduler;\n\n\tpublic AkkaClient(ActorSystem system, ActorRef scheduler) {\n\t\tthis.scheduler = scheduler;\n\t\tlog = Logging.getLogger(system, this);\n\t\tsettings = SettingsProvide...
import oncue.client.AkkaClient; import oncue.client.Client; import oncue.common.messages.Job; import oncue.common.messages.Job.State; import oncue.common.messages.JobProgress; import oncue.common.settings.Settings; import oncue.common.settings.SettingsProvider; import org.joda.time.DateTime; import akka.actor.UntypedAc...
/******************************************************************************* * Copyright 2013 Michael Marconi * * 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.o...
protected Settings settings = SettingsProvider.SettingsProvider.get(getContext().system());
6
cvtienhoven/graylog-plugin-aggregates
src/main/java/org/graylog/plugins/aggregates/maintenance/AggregatesMaintenance.java
[ "@JsonAutoDetect\n@JsonIgnoreProperties(ignoreUnknown = true)\n@AutoValue\npublic abstract class AggregatesConfig {\n\n @JsonProperty(\"purgeHistory\")\n public abstract boolean purgeHistory();\n\n @JsonProperty(\"historyRetention\")\n public abstract String historyRetention();\n\n @JsonProperty(\"re...
import java.util.ArrayList; import java.util.Calendar; import java.util.List; import java.util.Optional; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import javax.inject.Inject; import javax.inject.Named; import com.codah...
package org.graylog.plugins.aggregates.maintenance; public class AggregatesMaintenance extends Periodical { private static final Logger LOG = LoggerFactory.getLogger(AggregatesMaintenance.class); private final AlertService alertService; private final StreamService streamService; private final RuleS...
private final AtomicReference<AggregatesConfig> config;
0
wl1244hotmai/BLE-Mesh
quoteSendApp/src/main/java/sword/blemesh/singlehop/ui/activity/MainActivity.java
[ "public class PeerFragment extends BleMeshFragment implements BleMeshService.Callback,\n BleMeshFragment.Callback {\n\n /** Bundle parameters */\n // BleMeshFragment provides username, servicename\n private static final String ARG_MODE = \"mod...
import android.app.AlertDialog; import android.app.FragmentTransaction; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v7.app.AppCompatActivity;...
package sword.blemesh.singlehop.ui.activity; /** * An Activity illustrating use of BleMesh's {@link PeerFragment} to facilitate * simple synchronous data exchange. */ public class MainActivity extends AppCompatActivity implements Toolbar.OnMenuItemClickListener, WelcomeFragment.WelcomeFragmentListener,...
PeerFragment.PeerFragmentListener {
0
mikaelhg/openblocks
src/main/java/edu/mit/blocks/renderable/BlockLabel.java
[ "public class Block implements ISupportMemento {\r\n\r\n //Defines a NULL id for a Block\r\n public static final Long NULL = Long.valueOf(-1);\r\n\r\n //block identifying information\r\n private final Long blockID;\r\n private String label;\r\n private String pageLabel = null;\r\n private Strin...
import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.Point; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.util.List; import java...
package edu.mit.blocks.renderable; /** * BlockLabel is a region on a block in which text is displayed and possibly edited. The * location and font of a BlockLabel is specified in BlockShape and the text displayed is specified * by a Block, BlockLabel is the gateway for text to be rendered and modified. ...
if (Block.NULL.equals(blockID)) {
0
zeevy/grblcontroller
app/src/main/java/in/co/gorest/grblcontroller/ui/ConsoleTabFragment.java
[ "public class IconButton extends Button implements HasOnViewAttachListener {\n\n private HasOnViewAttachListenerDelegate delegate;\n\n public IconButton(Context context) {\n super(context);\n init();\n }\n\n public IconButton(Context context, AttributeSet attrs) {\n super(context, a...
import android.app.AlertDialog; import android.content.DialogInterface; import androidx.databinding.DataBindingUtil; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import androidx.appcompat.widget.S...
/* * /** * * Copyright (C) 2017 Grbl Controller Contributors * * * * 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...
fragmentInteractionListener.onGcodeCommandReceived(GrblUtils.GRBL_VIEW_PARSER_STATE_COMMAND);
8
eltrueno/TruenoNPC
src/es/eltrueno/npc/protocollib/TruenoNPC_ProtocolLib.java
[ "public interface TruenoNPC {\n\n /**\n *\n *\n * @author el_trueno\n *\n *\n **/\n\n void delete();\n Location getLocation();\n int getEntityID(Player p);\n boolean isDeleted();\n int getNpcID();\n TruenoNPCSkin getSkin();\n}", "public class TruenoNPCApi {\n\n /**\...
import com.comphenix.protocol.PacketType; import com.comphenix.protocol.ProtocolLibrary; import com.comphenix.protocol.events.PacketContainer; import com.comphenix.protocol.reflect.StructureModifier; import com.comphenix.protocol.wrappers.*; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import c...
npcs.add(this); } } @Override public TruenoNPCSkin getSkin(){ return this.skin; } @Override public void delete(){ npcs.remove(this); for(Player p : Bukkit.getOnlinePlayers()) { destroy(p); } this.deleted = true; } ...
final TruenoNPCSpawnEvent event = new TruenoNPCSpawnEvent(p, this);
3
Watchful1/PermissionsChecker
src/main/java/gr/watchful/permchecker/mainClass.java
[ "public interface NamedScrollingListPanelListener {\n\t//holy guacamole long class name\n\tpublic void selectionChanged(NamedSelectionEvent event);\n}", "public class NamedSelectionEvent {\n\tprivate String parentName;\n\tprivate int selected;\n\t\n\tpublic NamedSelectionEvent(String parentName, int selected) {\n...
import gr.watchful.permchecker.datastructures.*; import gr.watchful.permchecker.listenerevent.NamedScrollingListPanelListener; import gr.watchful.permchecker.listenerevent.NamedSelectionEvent; import gr.watchful.permchecker.logging.MyLogger; import gr.watchful.permchecker.panels.ModPacksPanel; import gr.watchful.permch...
package gr.watchful.permchecker; @SuppressWarnings("serial") public class mainClass extends JFrame implements ListsPacks { private final static Logger LOGGER = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME); private JTabbedPane tabbedPane; private ModPacksPanel modPacksPanel; private UpdatePanel updatePanel; publ...
modPacksList.addListener(new NamedScrollingListPanelListener() {
0
eriq-augustine/jocr
src/com/eriqaugustine/ocr/drivers/GridBreakup.java
[ "public class WrapImage {\n private static Logger logger = LogManager.getLogger(WrapImage.class.getName());\n\n private MagickImage internalImage;\n\n private int imageWidth;\n private int imageHeight;\n\n private Pixel[] cachePixels;\n // {<threshold>: discretePixels}\n private Map<Integer, boolean[]...
import com.eriqaugustine.ocr.image.WrapImage; import com.eriqaugustine.ocr.image.TextImage; import com.eriqaugustine.ocr.utils.FileUtils; import com.eriqaugustine.ocr.utils.FontUtils; import com.eriqaugustine.ocr.utils.ImageUtils;
package com.eriqaugustine.ocr.drivers; /** * Breakup an image. */ public class GridBreakup { private static final String BASE_OUT_DIR = "out"; private static final String OUT_PREFIX = "gridBreakup"; public static void main(String[] args) { if (args.length < 1) { System.err.println("USAGE: j...
FontUtils.registerLocalFonts();
3
BoD/android-contentprovider-generator
etc/sample-generated-code/org/jraf/androidcontentprovidergenerator/sample/provider/personteam/PersonTeamColumns.java
[ "public class SampleProvider extends BaseContentProvider {\n private static final String TAG = SampleProvider.class.getSimpleName();\n\n private static final boolean DEBUG = BuildConfig.LOG_DEBUG_PROVIDER;\n\n private static final String TYPE_CURSOR_ITEM = \"vnd.android.cursor.item/\";\n private static ...
import org.jraf.androidcontentprovidergenerator.sample.provider.company.CompanyColumns; import org.jraf.androidcontentprovidergenerator.sample.provider.manual.ManualColumns; import org.jraf.androidcontentprovidergenerator.sample.provider.person.PersonColumns; import org.jraf.androidcontentprovidergenerator.sample.provi...
/* * This source is part of the * _____ ___ ____ * __ / / _ \/ _ | / __/___ _______ _ * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / * /___/ * repository. * * Copyright (C) 2012-2017 Benoit 'BoD' Lubek (BoD@JRAF.org) * * This program is fre...
public static final Uri CONTENT_URI = Uri.parse(SampleProvider.CONTENT_URI_BASE + "/" + TABLE_NAME);
0
konifar/annict-android
app/src/main/java/com/konifar/annict/view/fragment/MyProgramsFragment.java
[ "public abstract class ArrayRecyclerAdapter<T, VH extends RecyclerView.ViewHolder>\n extends RecyclerView.Adapter<VH> implements Iterable<T> {\n\n protected final ArrayList<T> list;\n\n final Context context;\n\n public ArrayRecyclerAdapter(@NonNull Context context) {\n this.context = context;\n ...
import com.annimon.stream.Stream; import com.konifar.annict.R; import com.konifar.annict.databinding.FragmentMyProgramsBinding; import com.konifar.annict.databinding.ItemProgramBinding; import com.konifar.annict.pref.DefaultPrefs; import com.konifar.annict.view.widget.ArrayRecyclerAdapter; import com.konifar.annict.vie...
package com.konifar.annict.view.fragment; public class MyProgramsFragment extends BaseFragment implements TabPage { private static final String TAG = MyProgramsFragment.class.getSimpleName(); @Inject MyProgramsViewModel viewModel; @Inject CompositeSubscription compositeSubscription; pri...
protected class MyProgramsAdapter extends ArrayRecyclerAdapter<MyProgramItemViewModel, BindingHolder<ItemProgramBinding>> {
1
optimaize/command4j
src/test/java/com/optimaize/command4j/impl/DefaultCommandExecutorTest.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.google.common.base.Stopwatch; import com.optimaize.command4j.CommandExecutor; import com.optimaize.command4j.CommandExecutorBuilder; import com.optimaize.command4j.CommandExecutorService; import com.optimaize.command4j.Mode; import com.optimaize.command4j.commands.BaseCommand; import com.optimaize.command4j....
package com.optimaize.command4j.impl; /** * @author Fabian Kessler */ public class DefaultCommandExecutorTest { @Test public void runSingleThreaded() throws Exception { int commandSleepMillis = 100; int numExecutions = 10; int numThreads = 1; int allowedMargin = 100; ...
CommandExecutor commandExecutor = new CommandExecutorBuilder().build();
1
presidentio/test-data-generator
src/main/java/com/presidentio/testdatagenerator/benchmark/ExpressionProxyBenchmark.java
[ "public class PropConst {\n\n public static final String TYPE = \"type\";\n public static final String VALUE = \"value\";\n public static final String SIZE = \"size\";\n public static final String DOMAIN = \"domain\";\n public static final String EXPR = \"expr\";\n public static final String FILE ...
import com.presidentio.testdatagenerator.cons.PropConst; import com.presidentio.testdatagenerator.cons.TypeConst; import com.presidentio.testdatagenerator.context.Context; import com.presidentio.testdatagenerator.model.Field; import com.presidentio.testdatagenerator.provider.ExpressionProxyProvider; import com.presiden...
package com.presidentio.testdatagenerator.benchmark; /** * Created by Vitalii_Gergel on 3/19/2015. */ @Fork(1) @Warmup(iterations = 3) @OutputTimeUnit(TimeUnit.MICROSECONDS) @Measurement(iterations = 10) @State(Scope.Benchmark) public class ExpressionProxyBenchmark {
private Context context1;
2
mguetlein/CheS-Mapper
src/main/java/org/chesmapper/view/gui/table/ClusterTable.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.Color; import java.awt.Component; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.util.List; import javax.swing.JComponent; import javax.swing.JTable; import javax.swing.ListSelectionModel; import javax.swing.event.ListSelectionEvent; import javax.swing.event...
package org.chesmapper.view.gui.table; public class ClusterTable extends CCDataTable {
ClusterTable(ViewControler viewControler, ClusterController clusterControler, Clustering clustering,
1
elixsr/FwdPortForwardingApp
app/src/main/java/com/elixsr/portforwarder/forwarding/ForwardingService.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.app.IntentService; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.PowerManager; import android.support.v4.app.NotificationCompat; import android.support.v4.app.Task...
e.printStackTrace(); } } } private InetSocketAddress generateFromIpUsingInterface(String interfaceName, int port) throws SocketException, ObjectNotFoundException { String address = null; InetSocketAddress inetSocketAddress; for (Enumeration<NetworkI...
Intent resultIntent = new Intent(this, MainActivity.class);
1
CMPUT301F16T01/Carrier
app/src/androidTest/java/comcmput301f16t01/github/carrier/SearchingTests.java
[ "public class ElasticRequestController extends ElasticController {\n /**\n * This listener listens to the two major fetch request tasks (offered requests, and requested\n * requests). When either of the tasks are finished in async mode, it will notify this listener.\n * @see FetchRiderRequestsTask\n ...
import junit.framework.Assert; import comcmput301f16t01.github.carrier.Requests.ElasticRequestController; import comcmput301f16t01.github.carrier.Requests.Request; import comcmput301f16t01.github.carrier.Requests.RequestController; import comcmput301f16t01.github.carrier.Requests.RequestList; import comcmput301f16t01.g...
package comcmput301f16t01.github.carrier; public class SearchingTests extends ApplicationTest { // somewhere in Kawasaki, Japan private final double latitude1 = 35.5308; private final double longitude1 = 139.7030; // somewhere in Seoul, South Korea private final double latitude2 = 37.5665; ...
RequestController.addRequest(request3);
2
horizon-institute/artcodes-android
app/src/main/java/uk/ac/horizon/artcodes/fragment/ExperienceLibraryFragment.java
[ "public final class Analytics\n{\n\tpublic enum Target\n\t{\n\t\tAPP,\n\t\t// Add more trackers here if you need, and update the code in #get(Target) below\n\t}\n\n\tprivate static final String CONTENT_TYPE = \"Experience\";\n\tprivate static final String SCAN_EVENT = \"scan_content\";\n\tprivate static final Strin...
import android.graphics.Color; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; import androidx.annotation.ColorInt; import androidx.annotation.DrawableRes; import androidx.annotation.NonNull; import com.google.android.material.floatingactionbutton.FloatingActionButton; impo...
/* * Artcodes recognises a different marker scheme that allows the * creation of aesthetically pleasing, even beautiful, codes. * Copyright (C) 2013-2016 The University of Nottingham * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Pu...
fab.setOnClickListener(v -> ExperienceEditActivity.start(getActivity(), new Experience(), account));
2
wongminbin/CMS
src/main/java/com/shishuo/cms/service/ArticleService.java
[ "public class ArticleConstant {\n\n\t/**\n\t * 文件状态\n\t * \n\t * @author Herbert\n\t * \n\t */\n\tpublic static enum Status {\n\t\t/**\n\t\t * 隐藏\n\t\t */\n\t\thidden, /**\n\t\t * /** 公开的\n\t\t */\n\t\tdisplay,\n\t};\n\n\t/**\n\t * 审核\n\t * \n\t * @author Herbert\n\t * \n\t */\n\tpublic static enum check {\n\t\t/**...
import java.io.IOException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.annotatio...
/* * Copyright © 2013 Changsha Shishuo Network Technology Co., Ltd. All rights reserved. * 长沙市师说网络科技有限公司 版权所有 * http://www.shishuo.com */ package com.shishuo.cms.service; /** * * 文章服务 * * @author Zhangjiale * */ @Service public class ArticleService { @Autowired private ArticleDao articleDao; @Aut...
public ArticleVo getArticleById(long articleId)
2
irccloud/android
src/com/irccloud/android/fragment/SpamFragment.java
[ "public class NetworkConnection {\n private static final String TAG = \"IRCCloud\";\n private static NetworkConnection instance = null;\n\n private static final ServersList mServers = ServersList.getInstance();\n private static final BuffersList mBuffers = BuffersList.getInstance();\n private static ...
import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; import android.util.SparseBooleanArray; import android.view.LayoutInflater; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget....
/* * Copyright (c) 2015 IRCCloud, Ltd. * * 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 ...
ArrayList<Buffer> buffers;
3
exxeleron/qJava
src/sample/java/TickSubscriber.java
[ "public class QCallbackConnection extends QBasicConnection {\n\n protected QListener messageListener;\n protected Thread listenerThread;\n final CopyOnWriteArraySet<QMessagesListener> messagesListeners;\n\n /**\n * Initializes a new QCallbackConnection instance.\n * \n * @param host\n * ...
import java.io.IOException; import java.util.Arrays; import com.exxeleron.qjava.QCallbackConnection; import com.exxeleron.qjava.QErrorMessage; import com.exxeleron.qjava.QMessage; import com.exxeleron.qjava.QMessagesListener; import com.exxeleron.qjava.QTable;
/** * Copyright (c) 2011-2014 Exxeleron GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicab...
public void errorReceived( final QErrorMessage message ) {
1
sastix/cms
common/client/src/main/java/com/sastix/cms/common/client/impl/ApiVersionClientImpl.java
[ "public interface Constants {\n\n /**\n * Rest API Version.\n */\n static String REST_API_1_0 = \"1.0\";\n String GET_API_VERSION = \"/apiversion\";\n String DEFAULT_LANGUAGE = \"en\";\n\n /**\n * CONTENT API ENDPOINTS\n */\n static String CREATE_RESOURCE = \"createResource\";\n ...
import com.sastix.cms.common.Constants; import com.sastix.cms.common.dataobjects.VersionDTO; import com.sastix.cms.common.client.ApiVersionClient; import com.sastix.cms.common.client.RetryRestTemplate; import com.sastix.cms.common.exception.VersionNotSupportedException; import org.springframework.beans.factory.annotati...
/* * Copyright(c) 2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
String url = getUrlRoot() + "/" + Constants.GET_API_VERSION;
0
eli1982/intellij-perl-plugin
src/com/intellij/perlplugin/extensions/PerlParserDefinition.java
[ "public class PerlFile extends PsiFileBase {\n public PerlFile(@NotNull FileViewProvider viewProvider) {\n super(viewProvider, PerlLanguage.INSTANCE);\n }\n\n @NotNull\n @Override\n public FileType getFileType() {\n return PerlFileType.INSTANCE;\n }\n\n @Override\n public Strin...
import com.intellij.lang.ASTNode; import com.intellij.lang.Language; import com.intellij.lang.ParserDefinition; import com.intellij.lang.PsiParser; import com.intellij.lexer.Lexer; import com.intellij.openapi.project.Project; import com.intellij.perlplugin.language.PerlFile; import com.intellij.perlplugin.language.Perl...
package com.intellij.perlplugin.extensions; public class PerlParserDefinition implements ParserDefinition { public static final TokenSet WHITE_SPACES = TokenSet.create(TokenType.WHITE_SPACE); public static final TokenSet COMMENTS = TokenSet.create(PerlTypes.LINE_COMMENT); public static final IFileElement...
return new PerlParser();
3
Netflix/Raigad
raigad/src/main/java/com/netflix/raigad/backup/RestoreBackupManager.java
[ "public class RestoreBackupException extends Exception {\n\n private static final long serialVersionUID = 1L;\n\n public RestoreBackupException(String msg, Throwable th)\n {\n super(msg, th);\n }\n\n public RestoreBackupException(String msg)\n {\n super(msg);\n }\n\n public Res...
import com.google.inject.Inject; import com.google.inject.Singleton; import com.google.inject.name.Named; import com.netflix.raigad.backup.exception.RestoreBackupException; import com.netflix.raigad.configuration.IConfiguration; import com.netflix.raigad.scheduler.SimpleTimer; import com.netflix.raigad.scheduler.Task; ...
/** * Copyright 2017 Netflix, Inc. * <p> * 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or...
return new SimpleTimer(JOBNAME);
2
jaychang0917/SimpleRecyclerView
app/src/main/java/com/jaychang/demo/srv/DividerActivity.java
[ "public class BookCell extends SimpleCell<Book, BookCell.ViewHolder>\n implements Updatable<Book> {\n\n private static final String KEY_TITLE = \"KEY_TITLE\";\n private boolean showHandle;\n\n public BookCell(Book item) {\n super(item);\n }\n\n @Override\n protected int getLayoutRes() {\n return R.layo...
import android.os.Bundle; import android.view.View; import com.jaychang.demo.srv.cell.BookCell; import com.jaychang.demo.srv.cell.NumberCell; import com.jaychang.demo.srv.model.Book; import com.jaychang.demo.srv.util.DataUtils; import com.jaychang.srv.SimpleRecyclerView; import java.util.ArrayList; import java.util.Lis...
package com.jaychang.demo.srv; public class DividerActivity extends BaseActivity { @BindView(R.id.linearVerRecyclerView)
SimpleRecyclerView linearVerRecyclerView;
4
winterstein/elasticsearch-java-client
test/com/winterwell/es/client/admin/PutMappingRequestBuilderTest.java
[ "public class ESTest {\n\n\t@BeforeClass\n\tpublic static void setupES() {\n\t\tESConfig config = ConfigFactory.get().getConfig(ESConfig.class);\n\t\tPrinter.out(config);\n\t}\n\t\n\tprotected static ESHttpClient getESJC() {\n//\t\tDep.setIfAbsent(ESConfig.class, new ESConfig()); done in setupES\n//\t\tESConfig esc...
import static org.junit.Assert.*; import java.util.Map; import org.junit.Test; import com.winterwell.es.ESTest; import com.winterwell.es.ESType; import com.winterwell.es.client.ESHttpClient; import com.winterwell.es.client.GetRequestBuilder; import com.winterwell.es.client.GetResponse; import com.winterwell.es.client.I...
package com.winterwell.es.client.admin; public class PutMappingRequestBuilderTest extends ESTest { @Test public void testPutMappingRequestBuilder() { ESHttpClient esjc = getESJC(); // make an index String v = Utils.getRandomString(3); String idx = "test_mapping_"+v; CreateIndexRequest cir = esjc.adm...
ESType mytype = new ESType()
1
hea3ven/BuildingBricks
src/main/java/com/hea3ven/buildingbricks/compat/jei/material/MaterialRecipeCategory.java
[ "static class MaterialRecipe implements IRecipeWrapper {\n\n\tprivate final Material mat;\n\n\tpublic MaterialRecipe(Material mat) {\n\t\tthis.mat = mat;\n\t}\n\n\tpublic Material getMaterial() {\n\t\treturn mat;\n\t}\n\n\tpublic ItemStack getMain() {\n\t\treturn mat.getFirstBlock().getStack();\n\t}\n\n\t@Override\...
import mezz.jei.api.IGuiHelper; import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IDrawableStatic; import mezz.jei.api.gui.IGuiItemStackGroup; import mezz.jei.api.gui.IRecipeLayout; import mezz.jei.api.recipe.IRecipeCategory; import mezz.jei.api.recipe.IRecipeWrapper; import javax.annotation.Nonnull; import ne...
package com.hea3ven.buildingbricks.compat.jei.material; public class MaterialRecipeCategory implements IRecipeCategory { private final IDrawableStatic background; public MaterialRecipeCategory(IGuiHelper guiHelper) { background = guiHelper.createDrawable(GuiTrowel.BG_RESOURCE, 43, 8, 126, 72, 0, 0, 0, 0); ...
BlockDescription blockDesc = blockRotation.get(blockType);
2
bit-man/SwissArmyJavaGit
javagit/src/test/java/edu/nyu/cs/javagit/api/TestGitFileSystem.java
[ "@Ignore\npublic class TestBase extends TestCase {\n\n @Before\n public void setUp() throws IOException, JavaGitException {\n JavaGitConfiguration.setGitPath(TestProperty.GIT_PATH.asString());\n }\n}", "public static enum Status {\n // untracked (created but not added to the repository)\n UNTRAC...
import edu.nyu.cs.javagit.TestBase; import edu.nyu.cs.javagit.api.GitFileSystemObject.Status; import edu.nyu.cs.javagit.api.commands.GitInit; import edu.nyu.cs.javagit.api.commands.GitStatusResponse; import edu.nyu.cs.javagit.utilities.FileUtilities; import org.junit.After; import org.junit.Before; import org.junit.Tes...
/* * ==================================================================== * Copyright (c) 2008 JavaGit Project. All rights reserved. * * This software is licensed using the GNU LGPL v2.1 license. A copy * of the license is included with the distribution of this source * code in the LICENSE.txt file. The text o...
assertEquals("Error. Status for single file,", Status.UNTRACKED, gitFile.getStatus());
1
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java
[ "public class BuildConfiguration\n{\n /**\n * Constant for the default configuration name.\n */\n public static final String DEFAULT_CONFIGURATION = \"Release\";\n\n /**\n * Construct a default BuildConfiguration.\n */\n public BuildConfiguration()\n {\n name = DEFAULT_CONFIGUR...
import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.security.InvalidParameterException; import java.text.ParseException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.rege...
String msg = "Packaging doesn't match project file type. " + "If you specify a solution file then packaging must be " + MSBuildPackaging.MSBUILD_SOLUTION; getLog().error( msg ); throw new MojoExecutionException( msg ); } ret...
protected List<VCProject> getParsedProjects( BuildPlatform platform, BuildConfiguration configuration )
0
presidentio/test-data-generator
src/main/java/com/presidentio/testdatagenerator/InitTask.java
[ "public class Context {\n\n private Parent parent;\n\n private Map<String, Template> templates;\n\n private Map<String, Object> variables;\n\n private Sink sink;\n\n public Context(Map<String, Template> templates, Map<String, Object> variables, Sink sink) {\n this.templates = templates;\n ...
import com.presidentio.testdatagenerator.context.Context; import com.presidentio.testdatagenerator.model.Output; import com.presidentio.testdatagenerator.model.Template; import com.presidentio.testdatagenerator.output.Sink; import com.presidentio.testdatagenerator.output.SinkFactory; import com.presidentio.testdatagene...
/** * 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * dist...
private Sink buildSink(Output output) {
1
Zoey76/L2J_LoginServer
src/main/java/com/l2jserver/login/network/gameserverpackets/BlowFishKey.java
[ "public final class Config\r\n{\r\n\tprivate static final Logger LOGGER = Logger.getLogger(Config.class.getName());\r\n\t\r\n\tpublic static final String EOL = System.lineSeparator();\r\n\t\r\n\tprivate static final String HEXID_FILE = \"./config/hexid.txt\";\r\n\tprivate static final String LOGIN_CONFIGURATION_FIL...
import java.security.GeneralSecurityException; import java.util.logging.Level; import java.util.logging.Logger; import javax.crypto.Cipher; import com.l2jserver.login.Config; import com.l2jserver.login.GameServerThread; import com.l2jserver.login.network.L2JGameServerPacketHandler.GameServerState; import com.l2j...
/* * Copyright (C) 2004-2015 L2J Server * * This file is part of L2J Server. * * L2J Server 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 opti...
if (Config.DEBUG)
0
StumbleUponArchive/hbase
src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
[ "public class HBaseTestingUtility {\n private static final Log LOG = LogFactory.getLog(HBaseTestingUtility.class);\n private Configuration conf;\n private MiniZooKeeperCluster zkCluster = null;\n\n /**\n * The default number of regions per regionserver when creating a pre-split\n * table.\n */\n private ...
import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; import...
// Get the configured number of cache read-ahead regions. int prefetchRegionNumber = conf.getInt("hbase.client.prefetch.limit", 10); // the total number of cached regions == region('aaa") + prefeched regions. LOG.info("Testing how many regions cached"); assertEquals("Number of cached region is inc...
FilterList allFilters = new FilterList(/* FilterList.Operator.MUST_PASS_ALL */);
4
GitLqr/LQRBiliBlili
app/src/main/java/com/lqr/biliblili/mvp/ui/fragment/main/home/LiveFragment.java
[ "public abstract class MySupportFragment<P extends IPresenter> extends BaseFragment<P> implements ISupportFragment {\n final SupportFragmentDelegate mDelegate = new SupportFragmentDelegate(this);\n protected FragmentActivity _mActivity;\n\n @Override\n public SupportFragmentDelegate getSupportDelegate()...
import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; impor...
package com.lqr.biliblili.mvp.ui.fragment.main.home; /** * @创建者 CSDN_LQR * @描述 直播 */ public class LiveFragment extends MySupportFragment<LivePresenter> implements LiveContract.View { private View mHeaderView; private EditText mEtSearch; private BGABanner mBanner; private CommonTabLayout mCtlCat...
tabEntities.add(new TabEntity(ArmsUtils.getString(_mActivity, R.string.live_home_follow_anchor), R.mipmap.live_home_follow_anchor, R.mipmap.live_home_follow_anchor));
5
Spade-Editor/Spade
src/heroesgrave/spade/image/Layer.java
[ "public abstract class BlendMode implements Composite, CompositeContext\n{\n\tprivate static HashMap<String, BlendMode> modes = new HashMap<String, BlendMode>();\n\tpublic static final BlendMode NORMAL = new Normal();\n\t\n\tstatic\n\t{\n\t\taddBlendMode(NORMAL);\n\t}\n\t\n\tpublic final String name;\n\t\n\tpublic ...
import javax.swing.tree.DefaultMutableTreeNode; import heroesgrave.spade.image.blend.BlendMode; import heroesgrave.spade.image.change.IChange; import heroesgrave.spade.image.change.IMaskChange; import heroesgrave.spade.main.Spade; import heroesgrave.utils.misc.Metadata; import java.awt.Graphics2D; import java.awt.image...
// {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, ...
private BlendMode blend;
0
CollapsedDom/Stud.IP-Client
core/client/src/main/java/de/danner_web/studip_client/model/PluginModel.java
[ "public class OAuthServer implements Serializable {\n\n\t/**\n *\n */\n\tprivate static final long serialVersionUID = -8829174284201506171L;\n\n\t// Base properties\n\tprivate String name;\n\tprivate String consumerKey;\n\tprivate String consumerSecret;\n\tprivate String studipBaseUrl;\n\tprivate String accessU...
import static java.nio.file.StandardCopyOption.*; import java.io.File; import java.io.FileFilter; import java.io.FilenameFilter; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.net.M...
package de.danner_web.studip_client.model; public class PluginModel extends Observable { /** * Logger dieser Klasse. */ private static Logger logger = LogManager.getLogger(PluginModel.class); /** * This List contains all PluginInformation that are loaded (Jar File in * folder) ...
OAuthServer server = oauthServerModel.getOAuthServer(info);
0
JoshuaD84/HypnosMusicPlayer
src/net/joshuad/hypnos/library/Track.java
[ "public class Hypnos extends Application {\n\n\tprivate static final Logger LOGGER = Logger.getLogger( Hypnos.class.getName() );\n\t\n\tpublic enum ExitCode {\n\t\tNORMAL,\n\t\tUNKNOWN_ERROR,\n\t\tAUDIO_ERROR, \n\t\tUNSUPPORTED_OS\n\t}\n\t\n\tpublic enum OS {\n\t\tWIN_XP ( \"Windows XP\" ),\n\t\tWIN_VISTA ( \"Windo...
import java.awt.image.BufferedImage; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import java.nio.channels.ClosedByInterruptException; import java.nio.file.DirectoryStream; imp...
Path otherPaths = getSecondaryAlbumCoverPath (); if ( otherPaths != null ) { return new Image( otherPaths.toUri().toString() ); } return null; } private ArtistTagImagePriority tagImagePriority() { try { TagField tagImagePriority = getAudioFile().getTag().getFirstField( FieldKey.CUSTOM4 ); ...
deleteImageFromID3 ( getPath().toFile(), ImageFieldKey.getIndexFromKey( tagPair.getKey() ), audioSystem );
2
SiMolecule/centres
core/src/main/java/com/simolecule/centres/config/Sp2Bond.java
[ "public abstract class BaseMol<A, B> {\n\n private Fraction[] atomnums;\n\n public static final String CIP_LABEL_KEY = \"cip.label\";\n public static final String CONF_INDEX = \"conf.index\";\n\n public abstract Object getBaseImpl();\n\n public abstract int getNumAtoms();\n\n public abstract int getNumBond...
import com.simolecule.centres.Node; import com.simolecule.centres.Stats; import com.simolecule.centres.rules.Priority; import com.simolecule.centres.rules.Rules; import com.simolecule.centres.rules.SequenceRule; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; import com...
/* * Copyright (c) 2020 John Mayfield * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following d...
Stats.INSTANCE.countRule(Math.max(priority1.getRuleIdx(), priority2.getRuleIdx()));
3
michelinus/nfsw-server
src/main/java/br/com/soapboxrace/jpa/CustomCarEntity.java
[ "@XmlAccessorType(XmlAccessType.FIELD)\n@XmlType(name = \"PaintsType\", propOrder = { \"customPaintTrans\" })\n@XmlRootElement(name = \"Paints\")\npublic class PaintsType {\n\t\n\t@XmlAccessorType(XmlAccessType.FIELD)\n\t@XmlType(propOrder = { \"Slot\", \"Sat\", \"Hue\", \"Var\", \"Group\" })\n\t@XmlRootElement(nam...
import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Convert; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne...
package br.com.soapboxrace.jpa; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "CustomCarType", propOrder = { "baseCarId", "carClassHash", "isPreset", "level", "name", "apiId", "paints", "performanceParts", "physicsProfileHash", "rating", "resalePrice", "skillModParts", "skillModSlotCount", "vinyls", "visua...
@Convert(converter = PaintsConverter.class)
4
y1j2x34/spring-influxdb-orm
spring-influxdb-orm/src/main/java/com/vgerbot/orm/influxdb/binding/MapperMethod.java
[ "public abstract class Executor {\n\tprotected final InfluxDBRepository repository;\n\n\tpublic Executor(InfluxDBRepository repository) {\n\t\tthis.repository = repository;\n\t}\n\n\tpublic abstract ResultContext execute(MapperMethod method, Map<String, ParameterValue> parameters);\n}", "public class ExecutorFact...
import java.util.Collection; import java.util.LinkedList; import com.vgerbot.orm.influxdb.annotations.CoberturaIgnore; import com.vgerbot.orm.influxdb.exec.Executor; import com.vgerbot.orm.influxdb.exec.ExecutorFactory; import com.vgerbot.orm.influxdb.param.AnnotationParameterProducer; import com.vgerbot.orm.influxdb.p...
package com.vgerbot.orm.influxdb.binding; public class MapperMethod { private final Executor executor; private final ParameterProducer producer; private final MethodSignature methodSignature; private final MapperInterface mapperInterface; private final InfluxDBRepository repository; public MapperMethod(Class<...
this.executor = ExecutorFactory.getInstance().executorOf(signature, repository);
1
XYScience/StopApp
app/src/main/java/com/sscience/stopapp/activity/SettingActivity.java
[ "public abstract class BaseActivity extends AppCompatActivity {\n\n private static final int REQUEST_PERMISSION_CODE = 1000;\n\n protected abstract int getContentLayout();\n\n protected abstract void doOnCreate(@Nullable Bundle savedInstanceState);\n\n private PermissionCallback mPermissionCallback;\n\n...
import android.app.Activity; import android.content.ComponentName; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Build; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.design.widget.Coordina...
if (TextUtils.isEmpty((CharSequence) SharedPreferenceUtil .get(SettingActivity.this, ShortcutsManager.SP_ADD_SHORTCUT_MODE, ""))) { AppListActivity.actionStartActivity(SettingActivity.this, 2, true); buttonView.setChecked(fa...
appsRepository.openAccessibilityServices(new GetRootCallback() {
2
contentful/discovery-app-android
app/src/main/java/discovery/contentful/fragments/ContentTypesFragment.java
[ "public class EntriesActivity extends ResourceListActivity {\n private CDAContentType contentType;\n\n @Override protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n contentType =\n (CDAContentType) getIntent().getSerializableExtra(IntentConsts.EXTRA_CONTENT_...
import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.LoaderManager; import android.support.v4.content.Loader; import android.view.View; import android.widget.AdapterView; import discovery.contentful.R; import discovery.contentful.activities.E...
package discovery.contentful.fragments; public class ContentTypesFragment extends CFListFragment implements LoaderManager.LoaderCallbacks<ArrayList<ContentTypeWrapper>>, AbsListContainer.Listener { private ContentTypesAdapter adapter; public static ContentTypesFragment newInstance() { return new Con...
getLoaderManager().initLoader(Utils.getLoaderId(this), null, this);
6
stephanschloegl/WebWOZ
webwozwizard/src/com/webwoz/wizard/client/wizardlayouts/DefaultWizardScreen.java
[ "@RemoteServiceRelativePath(\"componentFactory\")\npublic interface ComponentFactory extends RemoteService {\n\n\tvoid pushComponents(int[][] components, int expid, String path,\n\t\t\tString ssLang, String mtsrc, String mttrg, String mtosrc,\n\t\t\tString mtotrg, String asrl, int wiz);\n\n\tString pushOutput(Strin...
import java.util.Date; import java.util.Vector; import com.google.gwt.core.client.GWT; import com.google.gwt.event.dom.client.ChangeEvent; import com.google.gwt.event.dom.client.ChangeHandler; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.e...
private TextBox preparedFreeTextShortTextBox; // Text Areas private TextArea experimentNotesTextArea; private TextArea translTextArea; private TextArea textTextArea; private TextArea textDomainTextArea; private TextArea translDomainTextArea; private TextArea shoutBoxTexatArea; private TextArea intructionTextA...
private ComponentFactoryAsync componentFactorySvc;
1
shyampurk/bluemix-todo-app
Android-Client/app/src/main/java/vitymobi/com/todobluemix/ActivityTaskList.java
[ "public class TaskListAdapter extends BaseAdapter {\n\n private Context parentContext;\n private LayoutInflater mInflater;\n private TaskSummaryTemplate[] tasksData;\n\n\n public TaskListAdapter(Context parentReference, TaskSummaryTemplate[] tasks){\n this.parentContext=parentReference;\n ...
import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.BroadcastReceiver; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.os.Handler; import android.os....
package vitymobi.com.todobluemix; /** * Created by manishautomatic on 22/03/16. */ public class ActivityTaskList extends AppCompatActivity implements View.OnClickListener { private Button mBtnAddNewTask; private ListView mLstVwTaskListing; private TaskListAdapter mAdapter ; TaskListing tListing ...
private void handleResponse(HandlerResponseMessage responseMessage) {
4
Lzw2016/fastdfs-java-client
src/main/java/org/cleverframe/fastdfs/protocol/tracker/request/DeleteStorageRequest.java
[ "public final class CmdConstants {\n /**\n * 客户端关闭连接命令\n */\n public static final byte FDFS_PROTO_CMD_QUIT = 82;\n /**\n * 连接状态检查命令\n */\n public static final byte FDFS_PROTO_CMD_ACTIVE_TEST = 111;\n /**\n * 服务端正确返回报文状态\n */\n public static final byte FDFS_PROTO_CMD_RESP = ...
import org.cleverframe.fastdfs.constant.CmdConstants; import org.cleverframe.fastdfs.constant.OtherConstants; import org.cleverframe.fastdfs.protocol.BaseRequest; import org.cleverframe.fastdfs.protocol.ProtocolHead; import org.cleverframe.fastdfs.mapper.FastDFSColumn; import org.cleverframe.fastdfs.utils.Validate;
package org.cleverframe.fastdfs.protocol.tracker.request; /** * 删除存储服务器 请求 * 作者:LiZW <br/> * 创建时间:2016/11/20 15:44 <br/> */ public class DeleteStorageRequest extends BaseRequest { /** * 组名 */ @FastDFSColumn(index = 0, max = OtherConstants.FDFS_GROUP_NAME_MAX_LEN) private String groupName; ...
Validate.notBlank(groupName, "分组不能为空");
4
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/controllers/ControllerHelper.java
[ "public class BindingInventory\n extends ObservableObject\n{\n\t/**\n\t * patterns for parsing property chains\n\t */\n\tprivate final static Pattern pathPattern = Pattern.compile(\"(\\\\\\\\|[\\\\.]*)(.+)\");\n\tprivate final static Pattern split = Pattern.compile(\"\\\\.\");\n\n\t//used for determining a range...
import android.widget.Toast; import org.json.JSONException; import org.json.JSONObject; import traction.mvc.observables.BindingInventory; import traction.mvc.implementations.ViewBindingFactory; import traction.mvc.implementations.ViewFactory; import traction.mvc.implementations.ui.menubinding.MenuInflater; import tract...
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
private IObjectListener invalidateMenuListener = new IObjectListener()
5
reines/httptunnel
src/test/java/com/yammer/httptunnel/client/HttpTunnelClientChannelTest.java
[ "public class FakeChannelSink extends AbstractChannelSink {\n\n\tpublic final Queue<ChannelEvent> events;\n\n\tpublic FakeChannelSink() {\n\t\tevents = new LinkedList<ChannelEvent>();\n\t}\n\n\t@Override\n\tpublic void eventSunk(ChannelPipeline pipeline, ChannelEvent e) throws Exception {\n\t\tevents.add(e);\n\t}\n...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; import java.net.*; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.channel.ChannelEvent; import org.jboss.netty.channel.Chann...
/* * Copyright 2009 Red Hat, Inc. * * Red Hat licenses this file to you under the Apache License, version 2.0 * (the "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
private HttpTunnelClientChannel channel;
4
ihongs/HongsCORE
hongs-serv-search/src/main/java/io/github/ihongs/dh/lucene/LuceneRecord.java
[ "public final class Cnst {\n\n //** 默认取值 **/\n\n public static final String LANG_DEF = \"zh_CN\"; // 默认语言\n\n public static final String ZONE_DEF = \"GMT+8\"; // 默认时区\n\n public static final int RN_DEF = 20 ; // 默认每页行数\n\n //** 查询参数 **/\n\n public static final String ID_KEY = \"id\"; // 编号\n...
import io.github.ihongs.Cnst; import io.github.ihongs.Core; import io.github.ihongs.CoreConfig; import io.github.ihongs.CoreLogger; import io.github.ihongs.HongsException; import io.github.ihongs.HongsExemption; import io.github.ihongs.action.FormSet; import io.github.ihongs.dh.IEntity; import io.github.ihongs.dh.JFigu...
package io.github.ihongs.dh.lucene; /** * Lucene 记录模型 * * 可选字段配置参数: * lucene-tokenizer Lucene 分词器类 * lucene-char-filter 存储时使用的 CharFilter 类 * lucene-token-filter 存储时使用的 TokenFilter 类 * lucene-find-filter 查询时使用的 CharFilter 类 * lucene-query-filter 查询时使用的 TokenFilter 类 * lucene-smart-parse 为 tru...
Object id = rd.get (Cnst.ID_KEY);
0
cmu-db/peloton-test
src/main/java/edu/cmu/cs/db/peloton/test/generate/defn/SearchCondition.java
[ "public final class DatabaseDefinition {\n private final Map<String, Map<String, ColumnInfo>> tables;\n\n public static final class ColumnInfo {\n private final JDBCType type;\n\n ColumnInfo(JDBCType type) {\n this.type = type;\n }\n\n public JDBCType getType() {\n ...
import edu.cmu.cs.db.peloton.test.common.DatabaseDefinition; import edu.cmu.cs.db.peloton.test.generate.ast.Ast; import edu.cmu.cs.db.peloton.test.generate.ast.Context; import edu.cmu.cs.db.peloton.test.generate.defn.operators.ConstantOption; import edu.cmu.cs.db.peloton.test.generate.defn.operators.SqlOperator; import...
package edu.cmu.cs.db.peloton.test.generate.defn; /** * Created by tianyuli on 4/1/17. */ public class SearchCondition implements Ast.Elem { private static final double EARLY_TERMINATION_PROB = 0.1; private final Set<SqlOperator> allowedOperators; private final int limit; public SearchCondition(S...
ConstantOption.NO_RESTRICTION).map(s -> new Ast.Clause(s, context));
3
adyliu/jafka
src/main/java/io/jafka/Jafka.java
[ "public class ConsumerConfig extends ZKConfig {\n\n private String groupId;\n\n private String consumerId;\n\n private int socketTimeoutMs;\n\n private int socketBufferSize;\n\n private int fetchSize;\n\n private long fetchBackoffMs;\n\n private long maxFetchBackoffMs;\n\n private boolean au...
import io.jafka.consumer.ConsumerConfig; import io.jafka.producer.ProducerConfig; import io.jafka.server.ServerConfig; import io.jafka.server.ServerStartable; import io.jafka.utils.Utils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.Closeable; import java.io.File; import java.util.Properties;
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
final ConsumerConfig consumerConfig = consumerProperties == null ? null : new ConsumerConfig(consumerProperties);
0
bushidowallet/bushido-java-core
src/test/java/com/bushidowallet/core/bitcoin/tx/input/MultiSigScriptHashInputTest.java
[ "public class Address {\n\n public static String PAY_TO_PUBLIC_KEY_HASH = \"pubkeyhash\";\n public static String PAY_TO_SCRIPT_HASH = \"scripthash\";\n\n private String type;\n //either public key hash or script hash, depends on type\n private byte[] hash;\n private int addressFlag;\n\n /**\n ...
import com.bushidowallet.core.bitcoin.Address; import com.bushidowallet.core.bitcoin.bip32.*; import com.bushidowallet.core.bitcoin.script.Script; import com.bushidowallet.core.bitcoin.tx.Transaction; import com.bushidowallet.core.bitcoin.tx.TransactionSignature; import com.bushidowallet.core.bitcoin.tx.UTXODescriptor;...
package com.bushidowallet.core.bitcoin.tx.input; /** * Created by Jesion on 2015-04-14. */ public class MultiSigScriptHashInputTest { private boolean compressedKeys = true; @BeforeClass public static void init () { Security.addProvider(new BouncyCastleProvider()); } //2 - of - 3 ...
System.out.println("private key of A: " + ByteUtil.toHex(keyOfA.getPrivate()));
5
cccssw/enigma-vk
src/cuchaz/enigma/analysis/SourceIndexBehaviorVisitor.java
[ "public class ArgumentEntry implements Entry, Serializable {\n\t\n\tprivate static final long serialVersionUID = 4472172468162696006L;\n\t\n\tprivate BehaviorEntry m_behaviorEntry;\n\tprivate int m_index;\n\tprivate String m_name;\n\t\n\tpublic ArgumentEntry(BehaviorEntry behaviorEntry, int index, String name) {\n\...
import com.strobel.assembler.metadata.MemberReference; import com.strobel.assembler.metadata.MethodDefinition; import com.strobel.assembler.metadata.MethodReference; import com.strobel.assembler.metadata.ParameterDefinition; import com.strobel.assembler.metadata.TypeReference; import com.strobel.decompiler.languages.Te...
/******************************************************************************* * Copyright (c) 2015 Jeff Martin. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser General Public * License v3.0 which accompanies this distribution, and is avail...
ArgumentEntry argumentEntry = new ArgumentEntry(behaviorEntry, def.getPosition(), node.getName());
0
benwaffle/PSlib
PSlib/src/TestClient.java
[ "@XmlAccessorType(XmlAccessType.FIELD)\n@XmlType(name = \"FinalGradeVO\", propOrder = {\n \"commentValue\",\n \"dateStored\",\n \"grade\",\n \"id\",\n \"percent\",\n \"reportingTermId\",\n \"sectionid\",\n \"storeType\"\n})\npublic class FinalGradeVO {\n\n @XmlElement(nillable = true)\n ...
import java.io.IOException; import java.util.HashMap; import javax.swing.JOptionPane; import powerschool.rest.vo.xsd.FinalGradeVO; import powerschool.rest.vo.xsd.SectionVO; import powerschool.rest.vo.xsd.StudentDataVO; import com.benwaffle.pslib.Log; import com.benwaffle.pslib.PSlib;
public class TestClient { public static void main(String[] args) { Log.logLvl = Log.Level.DEBUG; PSlib api = new PSlib("https://ps01.bergen.org"); try { api.login(JOptionPane.showInputDialog("Username"), JOptionPane.showInputDialog("Password")); } catch (Exception e) { System.out.println(...
for (FinalGradeVO at : data.getFinalGrades())
0
mjedynak/builder-generator-idea-plugin
src/main/java/pl/mjedynak/idea/plugins/builder/action/handler/DisplayChoosers.java
[ "public class CreateBuilderDialogFactory {\r\n\r\n private static final String BUILDER_SUFFIX = \"Builder\";\r\n private static final String METHOD_PREFIX = \"with\";\r\n private static final String DIALOG_NAME = \"CreateBuilder\";\r\n\r\n private PsiHelper psiHelper;\r\n private ReferenceEditorCombo...
import com.intellij.codeInsight.generation.PsiElementClassMember; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.project.Project; import com.intellij.psi.PsiClass; import com.intellij.psi.PsiDirectory; import com.intellij.psi.PsiPackage; import pl.mjedynak.idea.plugins.builder.factory.Crea...
package pl.mjedynak.idea.plugins.builder.action.handler; public class DisplayChoosers { private PsiClass psiClassFromEditor; private Project project; private Editor editor; private PsiHelper psiHelper; private CreateBuilderDialogFactory createBuilderDialogFactory; private PsiField...
BuilderContext context = new BuilderContext(
7
Vauff/Maunz-Discord
src/com/vauff/maunzdiscord/commands/legacy/Help.java
[ "public abstract class AbstractCommand\n{\n\t/**\n\t * Holds all messages as keys which await a reaction by a specific user.\n\t * The values hold an instance of {@link Await}\n\t */\n\tpublic static final HashMap<Snowflake, Await> AWAITED = new HashMap<>();\n\n\t/**\n\t * Enum holding the different bot permissions...
import com.vauff.maunzdiscord.commands.templates.AbstractCommand; import com.vauff.maunzdiscord.commands.templates.AbstractLegacyCommand; import com.vauff.maunzdiscord.commands.templates.AbstractSlashCommand; import com.vauff.maunzdiscord.core.Main; import com.vauff.maunzdiscord.core.Util; import com.vauff.maunzdiscord...
package com.vauff.maunzdiscord.commands.legacy; public class Help extends AbstractLegacyCommand<MessageCreateEvent> { private static HashMap<Snowflake, Integer> listPages = new HashMap<>(); @Override public void exe(MessageCreateEvent event, MessageChannel channel, User author) throws Exception { String[] arg...
if (cmd instanceof AbstractSlashCommand)
2
wrey75/WaveCleaner
src/main/java/com/oxande/xmlswing/components/JRadioButtonUI.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.JRadioButton; import org.w3c.dom.Element; import com.oxande.xmlswing.AttributeDefinition; import com.oxande.xmlswing.AttributesController; import com.oxande.xmlswing.Parser; import com.oxande.xmlswing.UnexpectedTag; import com.oxande.xmlswing.jcode.JavaClass; import com.oxande.xmlswing.jcode.J...
package com.oxande.xmlswing.components; /** * The JRadioButton implementation. * * @author wrey75 * @version $rev$ * * */ public class JRadioButtonUI extends JToggleButtonUI { public static final AttributeDefinition[] PROPERTIES = { };
public static final AttributesController CONTROLLER = new AttributesController( JToggleButtonUI.CONTROLLER, PROPERTIES );
1
scauwe/Generic-File-Driver-for-IDM
shim/src/main/java/info/vancauwenberge/filedriver/filelocator/RegExpFileLocator.java
[ "public abstract class AbstractStrategy implements IStrategy{\n\n\tpublic interface IStrategyParameters{\n\t\tpublic String getParameterName();\n\t\tpublic String getDefaultValue();\n\t\tpublic DataType getDataType();\n\t\tpublic Constraint[] getConstraints();\n\t}\n\t\n\tpublic static String getStringValueFor(ISt...
import java.io.File; import java.io.FilenameFilter; import java.io.RandomAccessFile; import java.lang.reflect.Field; import java.nio.channels.FileChannel; import java.nio.channels.FileLock; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.novell.nds.dirxml.driver.Trace; i...
} if (raFileStream != null) { try { raFileStream.close(); } catch (Exception eIgnore) { } } } } } else { trace.trace("File does not match regexp, ignored:" + name, TraceLevel.DEBUG); } return false; } } private enum Parameters implements IStrateg...
public void init(Trace trace, Map<String, Parameter> driverParams, IPublisher publisher)
2
sewerk/Bill-Calculator
app/src/main/java/pl/srw/billcalculator/form/fragment/FormFragment.java
[ "public class PreviousReadingsAdapter extends ArrayAdapter<String> {\n\n private Filter mFilter;\n private final String[] allData;\n\n public PreviousReadingsAdapter(Context context, int[] readings) {\n super(context, R.layout.form_autocomplete_item, R.id.autocomplete_text);\n allData = toStr...
import android.app.Dialog; import android.arch.lifecycle.ViewModelProviders; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.support.annotation.N...
&& event.getAction() == KeyEvent.ACTION_UP) { Timber.i("Form: back pressed"); } return false; }; public static FormFragment newInstance(Provider provider) { Bundle args = new Bundle(); args.putInt(EXTRA_PROVIDER, provider.ordinal()); FormFragm...
autoCompleteEditText.setAdapter(new PreviousReadingsAdapter(getContext(), readings));
0
horizon-institute/artcodes-android
app/src/main/java/uk/ac/horizon/artcodes/fragment/ExperienceLibraryFragment.java
[ "public final class Analytics\n{\n\tpublic enum Target\n\t{\n\t\tAPP,\n\t\t// Add more trackers here if you need, and update the code in #get(Target) below\n\t}\n\n\tprivate static final String CONTENT_TYPE = \"Experience\";\n\tprivate static final String SCAN_EVENT = \"scan_content\";\n\tprivate static final Strin...
import android.graphics.Color; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; import androidx.annotation.ColorInt; import androidx.annotation.DrawableRes; import androidx.annotation.NonNull; import com.google.android.material.floatingactionbutton.FloatingActionButton; impo...
/* * Artcodes recognises a different marker scheme that allows the * creation of aesthetically pleasing, even beautiful, codes. * Copyright (C) 2013-2016 The University of Nottingham * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Pu...
fab.setOnClickListener(v -> ExperienceEditActivity.start(getActivity(), new Experience(), account));
5
HugoGresse/Anecdote
app/src/main/java/io/gresse/hugo/anecdote/anecdote/WebsiteDialogFragment.java
[ "public class MediaType {\n\n public static final String URL = \"url\";\n public static final String TEXT = \"text\";\n public static final String IMAGE = \"image\";\n public static final String VIDEO = \"video\";\n\n}", "public class Content {\n\n @Nullable\n public Item url;\n\n public L...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.design.widget.TextInputLayout; import android.support.v7.app.AppCompatDialogFragment; import android.support.v7.widget.SwitchCompat; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; i...
package io.gresse.hugo.anecdote.anecdote; /** * FialogFragment to edit or add wesites * <p/> * Created by Hugo Gresse on 29/02/16. */ public class WebsiteDialogFragment extends AppCompatDialogFragment { public static final String ARGS_WEBSITE = "args_website"; @BindView(R.id.nameContainer) public...
mWebsitePage.content.items.add(new ContentItem(MediaType.TEXT, 1));
2
MKLab-ITI/easIE
src/main/java/certh/iti/mklab/easie/extractors/dynamicpages/DynamicHTMLExtractor.java
[ "public static class ScrapableField {\r\n\r\n public Object label;\r\n\r\n public Object value;\r\n\r\n public Object citeyear;\r\n\r\n public void setLabel(ExtractionProperties ep) {\r\n label = ep;\r\n }\r\n\r\n public void setValue(ExtractionProperties ep) {\r\n value = ep;\r\n ...
import certh.iti.mklab.easie.configuration.Configuration.ScrapableField; import certh.iti.mklab.easie.extractors.AbstractHTMLExtractor; import certh.iti.mklab.easie.FIELD_TYPE; import certh.iti.mklab.easie.exception.HTMLElementNotFoundException; import certh.iti.mklab.easie.extractors.FieldExtractor; import certh....
/* * Copyright 2016 vasgat. * * 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...
} catch (HTMLElementNotFoundException ex) {
3
goshippo/shippo-java-client
src/main/java/com/shippo/ExamplePickup.java
[ "public abstract class ShippoException extends Exception {\n\n public ShippoException(String message) {\n super(message, null);\n }\n\n public ShippoException(String message, Throwable e) {\n super(message, e);\n }\n\n private static final long serialVersionUID = 1L;\n\n}", "public cl...
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.time.LocalDateTime; import com.shippo.exception.ShippoException; import com.shippo.exception.InvalidRequestException; import com.shippo.model.CustomsDeclaration; import com.shippo.model.Shipment; import com.sh...
package com.shippo; public class ExamplePickup { public static void main(String[] args) throws ShippoException { // replace with your Shippo Token // don't have one? get more info here (https://goshippo.com/docs/#overview) Shippo.setApiKey("<API-KEY>"); Shippo.setApiVersion("2018-02-08"); // Optional d...
List<Rate> rates = shipment.getRates();
4