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
MKLab-ITI/easIE
src/main/java/certh/iti/mklab/easie/extractors/staticpages/StaticHTMLExtractor.java
[ "public enum FIELD_TYPE {\r\n METRIC,\r\n COMPANY_INFO\r\n}\r", "public class FieldExtractor extends AbstractContentExtractor {\r\n\r\n public FieldExtractor(Element document, String source) {\r\n super.document = document;\r\n super.source = source;\r\n }\r\n\r\n @Override\r\n pro...
import org.apache.commons.lang3.tuple.Pair; import org.bson.Document; import org.jsoup.nodes.Element; import certh.iti.mklab.easie.FIELD_TYPE; import certh.iti.mklab.easie.extractors.FieldExtractor; import certh.iti.mklab.easie.configuration.Configuration.ScrapableField; import certh.iti.mklab.easie.extractors.Ab...
/* * 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...
TableFieldExtractor extractor = new TableFieldExtractor((Element) fetcher.getHTMLDocument(), table_selector, source);
5
diecode/KillerMoney
src/net/diecode/killermoney/commands/subcommands/kmadmin/MultiplierCommand.java
[ "public class Utils {\n\n public static boolean chanceGenerator(double chance) {\n return (Math.random() * 100) < chance;\n }\n\n public static double randomNumber(double min, double max) {\n if (min == max) {\n return min;\n }\n\n double randomNumber = new Random().n...
import net.diecode.killermoney.Utils; import net.diecode.killermoney.enums.KMCommandType; import net.diecode.killermoney.enums.KMPermission; import net.diecode.killermoney.enums.LanguageString; import net.diecode.killermoney.enums.SenderType; import net.diecode.killermoney.events.KMGlobalMultiplierChangeEvent; import n...
package net.diecode.killermoney.commands.subcommands.kmadmin; public class MultiplierCommand extends KMSubCommand { public MultiplierCommand(String command) { super( new ArrayList<KMCommandType>() { { add(KMCommandType.KM_ADMIN)...
if (MultiplierHandler.getTimer() != null) {
8
wheat7/Cashew
app/src/main/java/com/wheat7/cashew/fragment/ClassifyListFragment.java
[ "public abstract class BaseFragment<T extends ViewDataBinding> extends Fragment {\n\n public View mainLayout;\n private ViewDataBinding binding;\n\n\n @Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {\n int lay...
import android.graphics.Color; import android.os.Bundle; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.LinearLayoutManager; import android.util.Log; import android.view.View; import android.widget.Toast; import com.wheat7.cashew.R; import com.wheat7.cashew.base.BaseFragment; impo...
package com.wheat7.cashew.fragment; /** * Created by wheat7 on 2017/8/5. */ public class ClassifyListFragment extends BaseFragment<FragmentClassifyListBinding> implements SwipeRefreshLayout.OnRefreshListener { private String mType; private ClassifyRecyclerAdapter mAdapter; private int mCurrentPage;...
getBinding().recyclerClassify.setOnScrollListener(new LoadMoreRecyclerOnScrollListener(layoutManager) {
6
narrowtux/Showcase
src/main/java/com/narrowtux/showcase/types/ExchangeShowcase.java
[ "public class Showcase extends JavaPlugin {\n\tprivate Logger log;\n\tprivate ShowcasePlayerListener playerListener = new ShowcasePlayerListener();\n\tprivate ShowcaseBlockListener blockListener = new ShowcaseBlockListener();\n\tprivate ShowcaseWorldListener worldListener = new ShowcaseWorldListener();\n\tpublic st...
import java.util.HashMap; import java.util.Map; import org.bukkit.Material; import com.narrowtux.narrowtuxlib.assistant.TextPage; import com.narrowtux.showcase.Showcase; import com.narrowtux.showcase.ShowcaseCreationAssistant; import com.narrowtux.showcase.ShowcaseExtra; import com.narrowtux.showcase.ShowcasePlayer; im...
/* * Copyright (C) 2011 Moritz Schmale <narrow.m@gmail.com> * * Showcase is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Th...
ShowcasePlayer player = ShowcasePlayer.getPlayer(assistant.getPlayer());
3
witwall/sfntly-java
src/main/java/com/google/typography/font/tools/subsetter/GlyphStripper.java
[ "public class ReadableFontData extends FontData {\n\n public static ReadableFontData createReadableFontData(byte[] b) {\n ByteArray<?> ba = new MemoryByteArray(b);\n return new ReadableFontData(ba);\n }\n\n\n /**\n * Flag on whether the checksum has been set.\n */\n private volatile boolean checksumSe...
import com.google.typography.font.sfntly.data.ReadableFontData; import com.google.typography.font.sfntly.data.WritableFontData; import com.google.typography.font.sfntly.table.truetype.CompositeGlyph; import com.google.typography.font.sfntly.table.truetype.Glyph; import com.google.typography.font.sfntly.table.truetype.G...
/* * Copyright 2011 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
ReadableFontData originalGlyfData = glyph.readFontData();
0
edwise/complete-spring-project
src/main/java/com/edwise/completespring/services/impl/BookServiceImpl.java
[ "@Document(collection = \"books\")\n@ApiModel(value = \"Book entity\", description = \"Complete info of a entity book\")\n@Data\n@Accessors(chain = true)\n@EqualsAndHashCode(exclude = {\"id\"}, doNotUseGetters = true)\n@ToString(doNotUseGetters = true)\npublic class Book {\n\n @ApiModelProperty(value = \"The id ...
import com.edwise.completespring.entities.Book; import com.edwise.completespring.exceptions.NotFoundException; import com.edwise.completespring.repositories.BookRepository; import com.edwise.completespring.repositories.SequenceIdRepository; import com.edwise.completespring.services.BookService; import org.springframewo...
package com.edwise.completespring.services.impl; @Service public class BookServiceImpl implements BookService { public static final String BOOK_COLLECTION = "books"; private static final String BOOK_NOT_FOUND_MSG = "Book not found"; @Autowired private BookRepository bookRepository; @Autowired
private SequenceIdRepository sequenceIdRepository;
3
cqjjjzr/BiliLiveLib
BiliLiveLib/src/main/java/charlie/bililivelib/user/SessionLoginHelper.java
[ "public class BiliLiveLib {\n public static final String PROJECT_NAME = \"BiliLiveLib\";\n\n public static final String VERSION = \"rv5\";\n public static String DEFAULT_USER_AGENT = PROJECT_NAME + \" \" + VERSION;\n}", "public class Globals {\n private static final String BILI_PASSPORT_HOST_ROOT = \"...
import charlie.bililivelib.BiliLiveLib; import charlie.bililivelib.Globals; import charlie.bililivelib.OptionalGlobals; import charlie.bililivelib.exceptions.BiliLiveException; import charlie.bililivelib.exceptions.NetworkException; import charlie.bililivelib.exceptions.WrongCaptchaException; import charlie.bililivelib...
package charlie.bililivelib.user; /** * 用于登录会话的工具类。注意,由于无法直接访问Bilibili直播登录API,因此本类直接使用了HtmlUnit进行模拟登录。<br> * 因此,该类的执行效率极低,请勿频繁使用此类。<br> * <span style="color:red">约定:本类所有public方法在传入Null参数时抛出NullPointerException。</span> * * @author Charlie Jiang * @see Session * @since rv1 */ @Getter public class SessionLogin...
private LoginStatus status = NOT_COMPLETED;
7
fikr4n/itl-java
itl/src/main/java/org/arabeyes/itl/newmethod/MainModule.java
[ "enum output_t {\n OUTPUT_NORMAL, /*< Textual output */\n OUTPUT_JSON /*< JSON output */\n}", "static class date_t {\n int year, month, day;\n\n /**\n * @param day starts from 1\n * @param month starts from 1, like the old ITL\n */\n date_t set(int day, int month, int year) {\n ...
import static org.arabeyes.itl.newmethod.ConfigModule.parse_arguments; import static org.arabeyes.itl.newmethod.PrayerModule.get_prayer_times; import static org.arabeyes.itl.newmethod.PrayerModule.get_qibla_direction; import org.arabeyes.itl.newmethod.ConfigModule.output_t; import org.arabeyes.itl.newmethod.DefsModule....
/* Copyright (c) 2014, Mohamed A.M. Bamakhrama <mohamed@alumni.tum.de> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright ...
final location loc = new location();
2
kinnla/eniac
src/eniac/data/model/Benchmark.java
[ "public class Manager {\n\n\t/*\n\t * ========================= applet lifecycle states =======================\n\t */\n\n\tpublic enum LifeCycle {\n\n\t\t/**\n\t\t * Default lifecycle state on startup\n\t\t */\n\t\tDEFAULT,\n\n\t\t/**\n\t\t * Livecycle state indicating a successful initialization\n\t\t */\n\t\tINI...
import java.util.Arrays; import java.util.Observable; import java.util.Observer; import java.util.Timer; import java.util.TimerTask; import org.xml.sax.Attributes; import eniac.Manager; import eniac.data.model.unit.Unit; import eniac.io.XMLUtil; import eniac.simulation.Frequency; import eniac.util.Status;
/******************************************************************************* * Copyright (c) 2003-2005, 2013 Till Zoppke. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available...
long simTime = (long) Status.SIMULATION_TIME.getValue();
4
d4rken/myolib
myolib/src/main/java/eu/darken/myolib/Myo.java
[ "public class MyoMsg {\n private final UUID mServiceUUID;\n private final UUID mCharacteristicUUID;\n private final UUID mDescriptorUUID;\n private final Callback mCallback;\n private int mRetryCounter = -1;\n private Integer mGattStatus = null;\n private State mState = State.NEW;\n\n /**\n ...
import android.bluetooth.BluetoothDevice; import android.content.Context; import android.support.annotation.Nullable; import eu.darken.myolib.msgs.MyoMsg; import eu.darken.myolib.msgs.ReadMsg; import eu.darken.myolib.msgs.WriteMsg; import eu.darken.myolib.services.Battery; import eu.darken.myolib.services.Control; impo...
/* * Android Myo library by darken * Matthias Urhahn (matthias.urhahn@rwth-aachen.de) * mHealth - Uniklinik RWTH-Aachen. */ package eu.darken.myolib; /** * Extension of {@link BaseMyo} that provides direct methods to change Myo settings or read them. * It constructs the appropriate {@link MyoMsg} message objec...
MyoMsg writeMsg = new WriteMsg(Generic.DEVICE_NAME, newName.getBytes(), new MyoMsg.Callback() {
2
rpgmakervx/slardar
src/main/java/org/easyarch/test/service/UserService.java
[ "public class Parameter {\n\n private String name;\n private Object value;\n\n public Parameter(String name, Object value) {\n this.name = name;\n this.value = value;\n }\n\n public String getName() {\n return name;\n }\n\n public void setName(String name) {\n this.n...
import org.easyarch.slardar.entity.Parameter; import org.easyarch.slardar.session.DBSession; import org.easyarch.slardar.session.DBSessionFactory; import org.easyarch.slardar.session.DBSessionFactoryBuilder; import org.easyarch.slardar.utils.ParamUtil; import org.easyarch.slardar.utils.ResourcesUtil; import org.easyarc...
package org.easyarch.test.service; /** * Description : * Created by xingtianyu on 17-2-9 * 上午2:22 * description: */ public class UserService { private UserMapper mapper;
private DBSession session;
1
R2RML-api/R2RML-api
r2rml-api-rdf4j-binding/src/test/java/rdf4jTest/NTriplesSyntax2_Test.java
[ "public class RDF4JR2RMLMappingManager extends R2RMLMappingManagerImpl {\n\n private static RDF4JR2RMLMappingManager INSTANCE = new RDF4JR2RMLMappingManager(new RDF4J());\n\n private RDF4JR2RMLMappingManager(RDF4J rdf) {\n super(rdf);\n }\n\n public Collection<TriplesMap> importMappings(Model mod...
import org.eclipse.rdf4j.rio.helpers.StatementCollector; import eu.optique.r2rml.api.model.PredicateObjectMap; import eu.optique.r2rml.api.model.RefObjectMap; import eu.optique.r2rml.api.model.SubjectMap; import eu.optique.r2rml.api.model.Template; import eu.optique.r2rml.api.model.TriplesMap; import java.io.Inpu...
/******************************************************************************* * Copyright 2013, the Optique Consortium * 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...
Collection<TriplesMap> coll = mm.importMappings(m);
5
fadmaa/RDF-faceted-browser
functional_test/org/deri/rdf/browser/functest/GetPropertiesWithCountTest.java
[ "public class RdfEngine {\n\t\n\tprivate static Logger logger = Logger.getLogger(\"org.deri.rdf.browser.RdfEngine\");\n\n\tpublic List<AnnotatedResultItem> getPropertiesWithCount(String sparql, String endpoint, String varname) {\n\t\tList<AnnotatedResultItem> propsWithCount = new ArrayList<AnnotatedResultItem>();\n...
import static org.testng.Assert.*; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.deri.rdf.browser.RdfEngine; import org.deri.rdf.browser.functest.util.AssertionUtil; import org.deri.rdf.browser.model.AnnotatedResultItem; import org.deri.rdf.browser.model.F...
package org.deri.rdf.browser.functest; public class GetPropertiesWithCountTest { RdfEngine rdfEngine; SparqlEngine sparqlEngine; String endpoint = "http://localhost:3030/test/query"; MainFilter mainFilter = new MainFilter("s", "s", "a <http://xmlns.com/foaf/0.1/Person> ."); @BeforeClass public void init(){ ...
expected.add(new AnnotatedResultItem(1, "sheer", RdfDecoratedValue.LITERAL));
6
asaflevy/SelenuimExtend
src/test/java/com/outbrain/selenium/extjs/core/tests/ButtonComponentTest.java
[ "public class Window extends BasicForm {\r\n\r\n /**\r\n * Constructor for Window.\r\n * @param locator ComponentLocator\r\n */\r\n public Window(final ComponentLocator locator) {\r\n super(locator);\r\n }\r\n\r\n /**\r\n * Constructor for Window.\r\n * @param selenium Selenium\r\n * @param expre...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import org.junit.Test; import org.mockito.Mockito; import com.outbrain.selenium.extjs.components.Window; import com.outbrain.selenium.extjs.core.locators.ComponentLocator; import ...
package com.outbrain.selenium.extjs.core.tests; /** * @author Asaf Levy * @version $Revision: 1.0 */ public class ButtonComponentTest { /** * Method testWindow. */ @Test public void testWindow() { final Selenium sel = Mockito.mock(Selenium.class);
final ComponentLocatorFactory loc = new ComponentLocatorFactory(sel);
2
EndlessCodeGroup/RPGInventory
src/main/java/ru/endlesscode/rpginventory/inventory/backpack/BackpackType.java
[ "public class RPGInventory extends PluginLifecycle {\n private static RPGInventory instance;\n\n private Permission perms;\n private Economy economy;\n\n private BukkitLevelSystem.Provider levelSystemProvider;\n private BukkitClassSystem.Provider classSystemProvider;\n\n private FileLanguage langu...
import java.util.Arrays; import java.util.List; import java.util.UUID; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import org.jetbrains.annotations.NotNull; import ru.endlesscode.rpginventory.RPGInventory; import ru.endlesscode....
/* * This file is part of RPGInventory. * Copyright (C) 2015-2017 Osip Fatkullin * * RPGInventory is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) a...
FileLanguage lang = RPGInventory.getLanguage();
0
urbanairship/datacube
src/test/java/com/urbanairship/datacube/OmittedDimensionTest.java
[ "enum CommitType {\n READ_COMBINE_CAS,\n INCREMENT,\n OVERWRITE\n}", "public class BigEndianLongBucketer implements Bucketer<Long> {\n private final static List<BucketType> bucketTypes = ImmutableList.of(BucketType.IDENTITY);\n\n @Override\n public SetMultimap<BucketType, CSerializable> bucketFo...
import com.google.common.collect.ImmutableList; import com.google.common.collect.Maps; import com.urbanairship.datacube.DbHarness.CommitType; import com.urbanairship.datacube.bucketers.BigEndianLongBucketer; import com.urbanairship.datacube.dbharnesses.MapDbHarness; import com.urbanairship.datacube.idservices.CachingId...
package com.urbanairship.datacube; public class OmittedDimensionTest { public static final Dimension<Long> X = new Dimension<Long>("X", new BigEndianLongBucketer(), false, 8, true); public static final Dimension<Long> Y = new Dimension<Long>("Y", new BigEndianLongBucketer(), false, 8, false); public st...
DbHarness<LongOp> dbHarness = new MapDbHarness<LongOp>(backingMap, LongOp.DESERIALIZER, CommitType.OVERWRITE, idService);
5
vidstige/jadb
test/se/vidstige/jadb/test/unit/PackageManagerTest.java
[ "public class JadbConnection implements ITransportFactory {\n\n private final String host;\n private final int port;\n\n private static final int DEFAULTPORT = 5037;\n\n public JadbConnection() {\n this(\"localhost\", DEFAULTPORT);\n }\n\n public JadbConnection(String host, int port) {\n ...
import org.junit.After; import org.junit.Before; import org.junit.Test; import se.vidstige.jadb.JadbConnection; import se.vidstige.jadb.JadbDevice; import se.vidstige.jadb.managers.Package; import se.vidstige.jadb.managers.PackageManager; import se.vidstige.jadb.test.fakes.FakeAdbServer; import java.util.ArrayList; imp...
package se.vidstige.jadb.test.unit; public class PackageManagerTest { private static final String DEVICE_SERIAL = "serial-123"; private FakeAdbServer server; private JadbDevice device; @Before public void setUp() throws Exception { server = new FakeAdbServer(15037); server.star...
device = new JadbConnection("localhost", 15037).getDevices().get(0);
0
HumBuch/HumBuch
src/test/java/de/dhbw/humbuch/view/SettingsViewTest.java
[ "public class GuiceJUnitRunner extends BlockJUnit4ClassRunner {\n\tprivate Injector injector;\n\n\t/**\n\t * Specifies the Guice {@link Module} classes which should be used when\n\t * injecting a JUnit test class\n\t */\n\t@Target(ElementType.TYPE)\n\t@Retention(RetentionPolicy.RUNTIME)\n\t@Inherited\n\tpublic @int...
import java.util.ArrayList; import org.junit.Test; import org.junit.runner.RunWith; import com.google.inject.Inject; import com.vaadin.ui.Field; import de.dhbw.humbuch.guice.GuiceJUnitRunner; import de.dhbw.humbuch.guice.GuiceJUnitRunner.GuiceModules; import de.dhbw.humbuch.guice.TestModule; import de.dhbw.humbuch.mode...
package de.dhbw.humbuch.view; @RunWith(GuiceJUnitRunner.class) @GuiceModules({ TestModule.class }) public class SettingsViewTest extends BaseTest { private SettingsView settingsView; @Inject public void setInjected(MVVMConfig mvvmConfig, TestPersistenceInitialiser testPersistenceInitialiser, SettingsVie...
DAO<User> daoUser) {
4
jbrixhe/spring-webflux-client
src/main/java/com/webfluxclient/handler/ReactiveInvocationHandlerFactory.java
[ "public enum LogLevel {\n /** No logs. */\n NONE,\n\n /**\n * Logs request and response lines.\n *\n * <p>Example:\n * <pre>{@code\n * --> POST /hello\n * Content-Type: application/json\n *\n * <-- 200 OK POST /hello (22ms)\n * }</pre>\n */\n BASIC,\n\n /**\n ...
import com.webfluxclient.LogLevel; import com.webfluxclient.Logger; import com.webfluxclient.RequestProcessor; import com.webfluxclient.ResponseProcessor; import com.webfluxclient.codec.ExtendedClientCodecConfigurer; import java.lang.reflect.InvocationHandler; import java.net.URI; import java.util.List;
package com.webfluxclient.handler; public interface ReactiveInvocationHandlerFactory { InvocationHandler build( ExtendedClientCodecConfigurer codecConfigurer, List<RequestProcessor> requestProcessors, List<ResponseProcessor> responseProcessors,
Logger logger,
1
bbuenz/provisions
src/main/java/edu/stanford/crypto/verification/AssetsVerifier.java
[ "public class BlockingExecutor\nextends ThreadPoolExecutor {\n public BlockingExecutor() {\n super(Runtime.getRuntime().availableProcessors() - 1, Runtime.getRuntime().availableProcessors() - 1, 2, TimeUnit.DAYS, new ArrayBlockingQueue<Runnable>(Runtime.getRuntime().availableProcessors() * 4), new CallerR...
import edu.stanford.crypto.BlockingExecutor; import edu.stanford.crypto.ECConstants; import edu.stanford.crypto.bitcoin.SQLBlockchain; import edu.stanford.crypto.proof.assets.AddressProof; import edu.stanford.crypto.proof.assets.AddressProofEntry; import edu.stanford.crypto.proof.assets.AssetProof; import edu.stanford....
/* * Decompiled with CFR 0_110. */ package edu.stanford.crypto.verification; public class AssetsVerifier implements Verifier<AssetProof, GeneratorData<AssetProof>> { private final AddressProofVerifier addressVerifier = new AddressProofVerifier(); private final BlockingQueue<AddressProofEntry> proof...
try (SQLBlockchain blockchain = new SQLBlockchain()) {
2
millecker/storm-apps
commons/src/at/illecker/storm/commons/postagger/GatePOSTagger.java
[ "public class Configuration {\n private static final Logger LOG = LoggerFactory\n .getLogger(Configuration.class);\n\n public static final boolean RUNNING_WITHIN_JAR = Configuration.class\n .getResource(\"Configuration.class\").toString().startsWith(\"jar:\");\n\n public static final String WORKING_DIR...
import java.util.ArrayList; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.illecker.storm.commons.Configuration; import at.illecker.storm.commons.Dataset; import at.illecker.storm.commons.preprocessor.Preprocessor; import at.illecker.storm.commons.tokenizer.Tokenizer; import a...
/** * 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...
Preprocessor preprocessor = Preprocessor.getInstance();
2
headwirecom/aemdc
src/main/java/com/headwire/aemdc/runner/HelpRunner.java
[ "public class CommandMenu {\r\n\r\n private static final Logger LOG = LoggerFactory.getLogger(CommandMenu.class);\r\n\r\n SortedMap<Integer, Command> menuItems = new TreeMap<Integer, Command>();\r\n\r\n public void setCommand(final Integer operationNumber, final Command cmd) {\r\n menuItems.put(operationNumbe...
import java.io.IOException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.headwire.aemdc.command.CommandMenu; import com.headwire.aemdc.command.HelpCommand; import com.headwire.aemdc.companion.Config; import com.headwire.aemdc.companion.Constants; import com.headwire.aemdc.companion.Resourc...
package com.headwire.aemdc.runner; /** * Help creator * */ public class HelpRunner extends BasisRunner { private static final Logger LOG = LoggerFactory.getLogger(HelpRunner.class); private static final String HELP_FOLDER = "help"; /** * Invoker */
private final CommandMenu menu = new CommandMenu();
0
Zoey76/L2J_LoginServer
src/main/java/com/l2jserver/login/network/L2LoginPacketHandler.java
[ "public static enum LoginClientState\r\n{\r\n\tCONNECTED,\r\n\tAUTHED_GG,\r\n\tAUTHED_LOGIN\r\n}\r", "public class AuthGameGuard extends L2LoginClientPacket\r\n{\r\n\tprivate int _sessionId;\r\n\tprivate int _data1;\r\n\tprivate int _data2;\r\n\tprivate int _data3;\r\n\tprivate int _data4;\r\n\t\r\n\tpublic int g...
import java.nio.ByteBuffer; import java.util.logging.Logger; import com.l2jserver.login.network.L2LoginClient.LoginClientState; import com.l2jserver.login.network.clientpackets.AuthGameGuard; import com.l2jserver.login.network.clientpackets.RequestAuthLogin; import com.l2jserver.login.network.clientpackets.Request...
/* * 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...
packet = new RequestServerList();
3
Sparker0i/Weather
app/src/main/java/com/a5corp/weather/widget/LargeWidgetProvider.java
[ "public class Log {\n public static void i(String tag , String message) {\n if (BuildConfig.DEBUG)\n android.util.Log.i(tag , message);\n }\n\n public static void i(String tag , String message , Throwable r) {\n if (BuildConfig.DEBUG)\n android.util.Log.i(tag, message, r...
import android.app.AlarmManager; import android.app.PendingIntent; import android.appwidget.AppWidgetManager; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.os.Build; import android.preference.PreferenceManage...
package com.a5corp.weather.widget; public class LargeWidgetProvider extends AbstractWidgetProvider { private static final String TAG = "LargeWidgetProvider"; private static final String ACTION_UPDATE_TIME = "com.a5corp.weather.UPDATE_TIME"; @Override public void onUpdate(Context context, AppWidge...
WeatherInfo weather;
2
autentia/wadl-tools
spring-wadl-generator/src/main/java/com/autentia/web/rest/wadl/builder/namespace/QNameBuilderFactory.java
[ "public class QNameBuilder {\n\n private static final Logger logger = LoggerFactory.getLogger(QNameBuilder.class);\n\n private static final Pattern BY_DOTS = Pattern.compile(\"\\\\.\");\n private static final Pattern VOWELS = Pattern.compile(\"[aeiou]\");\n private static final QName EMPTY_Q_NAME = new ...
import com.autentia.xml.namespace.QNameBuilder; import com.autentia.xml.namespace.QNameMemory; import com.autentia.xml.namespace.QNamePrefixesCache; import com.autentia.xml.namespace.QNamesCache; import com.autentia.xml.namespace.cache.InMemoryQNamePrefixesCache; import com.autentia.xml.namespace.cache.InMemoryQNamesCa...
/** * Copyright 2013 Autentia Real Business Solution S.L. * * 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 * * Unl...
final QNamePrefixesCache cache = new InMemoryQNamePrefixesCache();
4
longkai/catnut
src/org/catnut/adapter/CommentsAdapter.java
[ "public class CatnutApp extends Application {\n\n\tpublic static final String TAG = \"CatnutApp\";\n\n\t/** singleton */\n\tprivate static CatnutApp sApp;\n\t/** http request header for weibo' s access token */\n\tprivate static Map<String, String> sAuthHeaders;\n\n\tprivate RequestQueue mRequestQueue;\n\tprivate S...
import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.database.Cursor; import android.graphics.Typeface; import android.provider.BaseColumns; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.MotionEvent; import andro...
/* * The MIT License (MIT) * Copyright (c) 2014 longkai * The software shall be used for good, not evil. */ package org.catnut.adapter; /** * 评论界面列表适配器 * * @author longkai */ public class CommentsAdapter extends CursorAdapter { private LayoutInflater mInflater; private TweetImageSpan mImageSpan; private...
holder.avatarIndex = cursor.getColumnIndex(User.profile_image_url);
2
jplu/stanfordNLPRESTAPI
src/test/java/fr/eurecom/stanfordnlprestapi/datatypes/SentenceImplTest.java
[ "public enum NlpProcess {\n NER,\n POS,\n TOKENIZE,\n COREF,\n DATE,\n NUMBER,\n GAZETTEER\n}", "public interface Sentence {\n void addToken(final Token newToken);\n\n void addEntity(final Entity newEntity);\n \n void addCoref(final Coref newCoref);\n\n void nextSentence(final Sentence newNextSentence...
import org.apache.jena.vocabulary.RDF; import org.junit.Assert; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import fr.eurecom.stanfordnlprestapi.enums.NlpProcess; import fr.eurecom.stanfordnlprestapi.interfaces.Sentence; import fr.eurecom.stanfordnlprestapi.interfaces.Token; import f...
/** * StanfordNLPRESTAPI - Offering a REST API over Stanford CoreNLP to get results in NIF format. * Copyright © 2017 Julien Plu (julien.plu@redaction-developpez.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * t...
model.isIsomorphicWith(sentence.rdfModel("stanfordnlp", NlpProcess.NER,
0
WirelessRedstoneGroup/WirelessRedstone
core/src/main/java/net/licks92/wirelessredstone/commands/Info.java
[ "public enum SignType {\n TRANSMITTER, SCREEN, RECEIVER, RECEIVER_CLOCK, RECEIVER_DELAYER, RECEIVER_INVERTER, RECEIVER_SWITCH\n}", "@SerializableAs(\"WirelessChannel\")\npublic class WirelessChannel implements ConfigurationSerializable {\n\n private int id;\n private String name;\n private boolean act...
import net.licks92.wirelessredstone.signs.SignType; import net.licks92.wirelessredstone.signs.WirelessChannel; import net.licks92.wirelessredstone.signs.WirelessReceiver; import net.licks92.wirelessredstone.signs.WirelessScreen; import net.licks92.wirelessredstone.signs.WirelessTransmitter; import net.licks92.wirelessr...
package net.licks92.wirelessredstone.commands; @CommandInfo(description = "Shows WirelessChannel information", usage = "<channel> [signtype]", aliases = {"info", "i"}, tabCompletion = {WirelessCommandTabCompletion.CHANNEL, WirelessCommandTabCompletion.SIGNTYPE}, permission = "info", canUseInConsole = ...
for (WirelessTransmitter transmitter : channel.getTransmitters()) {
4
takahashikzn/indolently
src/main/java/jp/root42/indolently/regex/ReMatcher.java
[ "public interface $iter<T>\n extends Iterator<T>, Supplier<T>, EdgeAwareIterable<T>, Loopable<T, $iter<T>>, Filterable<T, $iter<T>>,\n ReducibleIterable<T>, Matchable<T> {\n\n @Override\n default T get() { return this.next(); }\n\n @Override\n default Iterator<T> iterator() { return this; }\n\n ...
import java.util.Objects; import java.util.function.BiConsumer; import java.util.function.BiFunction; import java.util.function.Consumer; import java.util.function.Function; import java.util.regex.Matcher; import jp.root42.indolently.$iter; import jp.root42.indolently.Iterative; import jp.root42.indolently.bridge.Regex...
// Copyright 2014 takahashikzn // // 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 wri...
return Iterative.iterator( //
1
jchampemont/notedown
src/main/java/com/jeanchampemont/notedown/web/api/NoteRestController.java
[ "@Service\npublic class NoteService {\n\n private Log log = LogFactory.getLog(NoteService.class);\n\n private NoteRepository repo;\n\n private NoteEventRepository eventRepo;\n\n private AuthenticationService authenticationService;\n\n private int maxHistorySize;\n\n @Autowired\n public NoteServ...
import com.jeanchampemont.notedown.note.NoteService; import com.jeanchampemont.notedown.note.persistence.Note; import com.jeanchampemont.notedown.security.AuthenticationService; import com.jeanchampemont.notedown.note.dto.NoteDto; import com.jeanchampemont.notedown.web.utils.ConflictException; import com.jeanchampemont...
/* * Copyright (C) 2014, 2015 NoteDown * * This file is part of the NoteDown project. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 ...
throw new ConflictException();
4
pemessier/SoulEVSpy
app/src/androidTest/java/org/hexpresso/elm327/CommandTest.java
[ "public abstract class AbstractCommand implements Command {\r\n\r\n protected String mCommand = null; // ELM327 command\r\n protected long mResponseTimeDelay = 200; // Time delay before receiving the response, in milliseconds\r\n protected Response mResponse = new...
import android.test.AndroidTestCase; import junit.framework.Assert; import org.hexpresso.elm327.commands.AbstractCommand; import org.hexpresso.elm327.commands.Response; import org.hexpresso.elm327.commands.ResponseFilter; import org.hexpresso.elm327.commands.general.VehicleIdentifierNumberCommand; import org.hexp...
package org.hexpresso.elm327; /** * Created by Pierre-Etienne Messier <pierre.etienne.messier@gmail.com> on 2015-10-24. */ public class CommandTest extends AndroidTestCase { ByteArrayInputStream input = null; ByteArrayOutputStream output = null; final String msg2101 = "7EC 10 3D 61 01...
PrintVersionIdCommand cmd = (PrintVersionIdCommand) new PrintVersionIdCommand().withAutoProcessResponse(true);
4
pktczwd/tcc-transaction
tcc-transaction-tutorial-sample/tcc-transaction-sample/tcc-transaction-capital/src/main/java/org/pankai/tcctransaction/sample/capital/service/CapitalTradeOrderService.java
[ "public class TransactionContext implements Serializable{\n\n private TransactionXid xid;\n private int status;\n\n private Map<String,String> attachments = new ConcurrentHashMap<>();\n\n public TransactionContext(){\n\n }\n\n public TransactionContext(TransactionXid xid,int status){\n this...
import org.pankai.tcctransaction.Compensable; import org.pankai.tcctransaction.api.TransactionContext; import org.pankai.tcctransaction.sample.capital.domain.entity.CapitalAccount; import org.pankai.tcctransaction.sample.capital.domain.entity.TradeOrder; import org.pankai.tcctransaction.sample.capital.domain.repository...
package org.pankai.tcctransaction.sample.capital.service; /** * Created by pktczwd on 2016/12/19. */ @Service public class CapitalTradeOrderService { @Autowired private CapitalAccountRepository capitalAccountRepository; @Autowired private TradeOrderRepository tradeOrderRepository; @Compensabl...
public String record(TransactionContext transactionContext, CapitalTradeOrderDto tradeOrderDto) {
0
atam4j/atam4j
acceptance-tests/src/test/java/me/atam/atam4jsampleapp/PassingTestAcceptanceTest.java
[ "public class PollingPredicate<T> {\n\n private int maxAttempts;\n private int retryPollInterval;\n private Predicate<T> predicate;\n private Supplier<T> supplier;\n\n public PollingPredicate(int maxAttempts, int retryPollInterval, Predicate<T> predicate, Supplier<T> supplier) {\n this.maxAtte...
import me.atam.atam4j.PollingPredicate; import me.atam.atam4j.dummytests.PassingTestWithNoCategory; import me.atam.atam4j.dummytests.TestThatKnowsIfItsBeingRun; import me.atam.atam4jdomain.IndividualTestResult; import me.atam.atam4jdomain.TestsRunResult; import me.atam.atam4jsampleapp.testsupport.AcceptanceTest; import...
package me.atam.atam4jsampleapp; public class PassingTestAcceptanceTest extends AcceptanceTest { @Test public void givenPassingTest_whenTestsEndpointCalledBeforeTestRun_thenTooEarlyMessageReceived() { //given dropwizardTestSupportAppConfig = Atam4jApplicationStarter .startAp...
hasItem(new IndividualTestResult(PassingTestWithNoCategory.class.getName(), "testThatPasses", true))
3
Bigkoo/Android-PickerView
wheelview/src/main/java/com/contrarywind/view/WheelView.java
[ "public interface WheelAdapter<T> {\n\t/**\n\t * Gets items count\n\t * @return the count of wheel items\n\t */\n\tint getItemsCount();\n\t\n\t/**\n\t * Gets a wheel item by index.\n\t * @param index the item index\n\t * @return the wheel item text or null\n\t */\n\tT getItem(int index);\n\t\n\t/**\n\t * Gets maxim...
import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.Typeface; import android.os.Handler; import android.text.TextUtils; import android.util.AttributeSet; import android.util.DisplayMet...
package com.contrarywind.view; /** * 3d滚轮控件 */ public class WheelView extends View { public enum ACTION { // 点击,滑翔(滑到尽头),拖拽事件 CLICK, FLING, DAGGLE } public enum DividerType { // 分隔线类型 FILL, WRAP, CIRCLE } private static final String[] TIME_NUM = {"00", "01", "02", "03", "04"...
private WheelAdapter adapter;
0
priiduneemre/btcd-cli4j
daemon/src/main/java/com/neemre/btcdcli4j/daemon/BtcdDaemonImpl.java
[ "@Data\n@ToString(callSuper = true)\n@EqualsAndHashCode(callSuper = false)\npublic class BitcoindException extends Exception {\n\n\tprivate static final long serialVersionUID = 1L;\n\n\tprivate int code;\n\n\t\n\tpublic BitcoindException(int code, String message) {\n\t\tsuper(message); \n\t\tthis.code = code;\n\t}\...
import java.util.HashMap; import java.util.Map; import java.util.Properties; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.neemre.btcdcli4j.core.BitcoindException; import com.nee...
package com.neemre.btcdcli4j.daemon; public class BtcdDaemonImpl implements BtcdDaemon { private static final Logger LOG = LoggerFactory.getLogger(BtcdDaemonImpl.class); private DaemonConfigurator configurator; private Map<Notifications, NotificationMonitor> monitors; private Map<Notifications, Future<Void>...
public void addWalletListener(WalletListener listener) {
6
maximeAudrain/jenerate
org.jenerate/src/java/org/jenerate/internal/generate/method/handler/MethodGeneratorHandler.java
[ "public enum MethodsGenerationCommandIdentifier implements CommandIdentifier {\r\n\r\n EQUALS_HASH_CODE(\"org.jenerate.commands.GenerateEqualsHashCodeCommand\"),\r\n TO_STRING(\"org.jenerate.commands.GenerateToStringCommand\"),\r\n COMPARE_TO(\"org.jenerate.commands.GenerateCompareToCommand\");\r\n\r\n ...
import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelEx...
/** * Copyright (c) 2014 European Organisation for Nuclear Research (CERN), All Rights Reserved. */ package org.jenerate.internal.generate.method.handler; /** * Handler that determine which generation should be performed depending on the event commandId. It also ensures that * the currently selected obj...
private static final JavaCodeFormatter CODE_FORMATTER = new JavaCodeFormatterImpl();
1
Zerthick/PlayerShopsRPG
src/main/java/io/github/zerthick/playershopsrpg/cmd/cmdexecutors/shop/ShopDestroyForceExecutor.java
[ "@Plugin(id = \"playershopsrpg\",\n name = \"PlayerShopsRPG\",\n description = \"A region-based player shop plugin.\",\n authors = {\n \"Zerthick\"\n }\n)\npublic class PlayerShopsRPG {\n\n private ShopManager shopManager;\n private EconManager econManager;\n priv...
import org.spongepowered.api.text.Text; import org.spongepowered.api.text.chat.ChatTypes; import org.spongepowered.api.text.format.TextColors; import java.util.Optional; import com.google.common.collect.ImmutableMap; import io.github.zerthick.playershopsrpg.PlayerShopsRPG; import io.github.zerthick.playershopsrpg.cmd.c...
/* * Copyright (C) 2016 Zerthick * * This file is part of PlayerShopsRPG. * * PlayerShopsRPG 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 ...
player.sendMessage(ChatTypes.CHAT, Text.of(TextColors.BLUE, Messages.processDropins(Messages.DESTROY_SUCCESS,
4
dingwpmz/Mycat-Demo
src/main/java/persistent/prestige/modules/eshop/service/impl/EsDataInitServiceImpl.java
[ "@Repository(\"goodsDao\")\n@MybatisScan\npublic interface GoodsDao extends Dao<Goods,java.lang.Integer>{\n\t\n\n}", "@Repository(\"skuDao\")\n@MybatisScan\npublic interface SkuDao extends Dao<Sku,java.lang.Integer>{\n\t\n\t/**\n\t * 更新库存\n\t * @param skuId\n\t * @param num\n\t * @return\n\t */\n\tInteger updateS...
import java.text.SimpleDateFormat; import java.util.Date; import java.util.Random; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import persistent.prestige.modules.eshop.dao.GoodsDao; import persistent.prestige.modules.eshop.dao.SkuDao; import persistent.p...
package persistent.prestige.modules.eshop.service.impl; @Service("esDataInitService") public class EsDataInitServiceImpl implements EsDataInitService { @Autowired private GoodsDao goodsDao; @Autowired private SkuDao skuDao; @Autowired private SkuItemDao skuItemDao; @Override public void saveInitGoods...
Sku s = new Sku();
4
codeforkjeff/conciliator
src/main/java/com/codefork/refine/solr/Solr.java
[ "@Component\npublic class Config {\n\n public static final String PROP_CACHE_ENABLED = \"cache.enabled\";\n public static final String PROP_CACHE_TTL = \"cache.ttl\";\n public static final String PROP_CACHE_SIZE = \"cache.size\";\n\n private static final String CONFIG_FILENAME = \"conciliator.properties...
import com.codefork.refine.Config; import com.codefork.refine.SearchQuery; import com.codefork.refine.ThreadPoolFactory; import com.codefork.refine.datasource.ConnectionFactory; import com.codefork.refine.datasource.WebServiceDataSource; import com.codefork.refine.resources.NameType; import com.codefork.refine.resource...
package com.codefork.refine.solr; /** * Data source for a Solr interface */ @Component("solr") public class Solr extends WebServiceDataSource { public static final String PROP_URL_DOCUMENT = "url.document"; public static final String PROP_URL_QUERY = "url.query"; public static final String PROP_FIELD_...
public String createURL(SearchQuery query) throws Exception {
1
srcdeps/srcdeps-core
srcdeps-core-config-yaml/src/main/java/org/srcdeps/config/yaml/internal/SrcdepsConstructor.java
[ "public class SrcVersion implements Serializable {\n /**\n * Some well known version types\n */\n public enum WellKnownType {\n branch(false), revision(true), tag(true);\n private static final Map<String, WellKnownType> valueMap;\n static {\n Map<String, WellKnownType> m = ...
import org.yaml.snakeyaml.constructor.Constructor; import org.yaml.snakeyaml.nodes.Node; import org.yaml.snakeyaml.nodes.NodeId; import org.yaml.snakeyaml.nodes.ScalarNode; import java.nio.charset.Charset; import java.nio.file.Path; import java.nio.file.Paths; import java.util.regex.Pattern; import org.srcdeps.core.Src...
/** * Copyright 2015-2019 Maven Source Dependencies * Plugin contributors as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org...
} else if (type == SrcVersion.class) {
0
hantsy/angularjs-springmvc-sample-boot
src/test/java/com/hantsylabs/restexample/springmvc/test/mock/MockBeanBlogServiceTest.java
[ "@Data\n@Builder\n@NoArgsConstructor\n@AllArgsConstructor\n@Entity\n@Table(name = \"posts\")\npublic class Post implements Serializable {\n\n /**\n *\n */\n private static final long serialVersionUID = 1L;\n\n public enum Status {\n\n DRAFT,\n PUBLISHED\n }\n\n public Post(Strin...
import com.hantsylabs.restexample.springmvc.domain.Post; import com.hantsylabs.restexample.springmvc.model.PostDetails; import com.hantsylabs.restexample.springmvc.repository.CommentRepository; import com.hantsylabs.restexample.springmvc.repository.PostRepository; import com.hantsylabs.restexample.springmvc.repository....
package com.hantsylabs.restexample.springmvc.test.mock; @RunWith(SpringRunner.class) @SpringBootTest @Slf4j @Ignore //upgrade to 1.4.1, failed. public class MockBeanBlogServiceTest { @MockBean private PostRepository postRepository; @MockBean private CommentRepository comments; @Inject priva...
given(postRepository.findAll(PostSpecifications.filterByKeywordAndStatus("q", Post.Status.DRAFT), pr))
4
ayaseruri/TorrFM
app/src/main/java/ayaseruri/torr/torrfm/view/FavouriteSongsDialog.java
[ "public class MusicListAdaptar extends RecyclerView.Adapter<MusicListAdaptar.ViewHolder> {\n private List<SongInfo> mSongInfos;\n private Context mContext;\n private IItemAction iItemAction;\n\n public MusicListAdaptar(Context mContext, List<SongInfo> mSongInfos, IItemAction iItemAction) {\n this...
import android.content.Context; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.widget.FrameLayout; import android.widget.TextView; import com.github.johnpersano.supertoasts.SuperToast; impo...
package ayaseruri.torr.torrfm.view; /** * Created by ayaseruri on 15/12/16. */ public class FavouriteSongsDialog extends SweetSheet implements FavouriteSongsModel.IFavouriteSongsChanged { private MusicListAdaptar musicListAdaptar; private Context mContext; private FavouriteSongsModel favouriteSongsMo...
Dao dao = DBHelper.getInstance(mContext).getDao(SongInfo.class);
1
jchampemont/WTFDYUM
src/main/java/com/jeanchampemont/wtfdyum/service/feature/impl/NotifyUnfollowFeatureStrategy.java
[ "public class Event {\n\n public Event() {\n // left deliberately empty\n }\n\n public Event(final EventType type, final String additionalData) {\n this.type = type;\n this.additionalData = additionalData;\n }\n\n private EventType type;\n\n private String additionalData;\n\n ...
import java.util.HashSet; import java.util.List; import java.util.Optional; import java.util.Set; import com.google.common.primitives.Longs; import com.jeanchampemont.wtfdyum.dto.Event; import com.jeanchampemont.wtfdyum.dto.Feature; import com.jeanchampemont.wtfdyum.dto.Principal; import com.jeanchampemont.wtfdyum.dto....
/* * Copyright (C) 2015, 2016 WTFDYUM * * This file is part of the WTFDYUM project. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 *...
public Set<Event> cron(final Long userId) throws WTFDYUMException {
0
itfsw/mybatis-generator-plugin
src/main/java/com/itfsw/mybatis/generator/plugins/ExampleEnhancedPlugin.java
[ "public class BasePlugin extends PluginAdapter {\n protected static final Logger logger = LoggerFactory.getLogger(BasePlugin.class);\n protected CommentGenerator commentGenerator;\n protected List<String> warnings;\n\n /**\n * mybatis 版本\n */\n public static final String PRO_MYBATIS_VERSION =...
import com.itfsw.mybatis.generator.plugins.utils.BasePlugin; import com.itfsw.mybatis.generator.plugins.utils.FormatTools; import com.itfsw.mybatis.generator.plugins.utils.JavaElementGeneratorTools; import com.itfsw.mybatis.generator.plugins.utils.PluginTools; import com.itfsw.mybatis.generator.plugins.utils.enhanced.I...
package com.itfsw.mybatis.generator.plugins; /** * --------------------------------------------------------------------------- * Example 增强插件 * --------------------------------------------------------------------------- * @author: hewei * @time:2017/1/16 16:28 * ------------------------------------------------...
Method createCriteriaMethod = JavaElementGeneratorTools.generateMethod(
2
tfg13/LanXchange
modules/swing/src/main/java/de/tobifleig/lxc/plaf/swing/LXCPanel.java
[ "public class LXC {\n\n /**\n * The internal version id.\n * For automatic updates.\n */\n public static final int versionId = 170;\n /**\n * The external version id.\n */\n public static final String versionString = \"v1.50\";\n /**\n * Logger for core components\n */\n ...
import de.tobifleig.lxc.LXC; import de.tobifleig.lxc.data.LXCFile; import de.tobifleig.lxc.data.LXCJob; import de.tobifleig.lxc.data.VirtualFile; import de.tobifleig.lxc.data.impl.RealFile; import de.tobifleig.lxc.log.LXCLogBackend; import de.tobifleig.lxc.log.LXCLogger; import de.tobifleig.lxc.plaf.GuiListener; import...
selBackground = new java.awt.Color(220, 220, 220, 200); options = new OptionsDialog((JFrame) SwingUtilities.getRoot(LXCPanel.this), true); } private Image loadImg(String path) { try { return ImageIO.read(new File(path)); } catch (IOException ex) { logger....
VirtualFile vFile = file.getFiles().get(0);
3
mleoking/LeoTask
leotask/src/core/org/leores/net/mod/FullyConnected.java
[ "public abstract class RandomEngine extends PersistentObject {\r\n\t/**\r\n\t * Makes this class non instantiable, but still let's others inherit from\r\n\t * it.\r\n\t */\r\n\tprotected RandomEngine() {\r\n\t}\r\n\r\n\t/**\r\n\t * Equivalent to <tt>raw()</tt>.\r\n\t * This has the effect that random engines can no...
import org.leores.math.rand.RandomEngine; import org.leores.net.Link; import org.leores.net.Network; import org.leores.net.Networks; import org.leores.net.Node; import org.leores.util.*; import org.leores.util.able.NewInstanceable;
package org.leores.net.mod; public class FullyConnected extends Model { public FullyConnected(Integer nNode) { initialize(null, nNode); } public Network genNetwork(Network net) { Network rtn = net; if (rtn == null) { rtn = newNetwork(); } rtn.createNodes(nNode); for (int i = 0; i < ...
public Networks genNetworks(Networks nets) {
3
ChristopherMann/2FactorWallet
wallet_lib/src/test/java/de/uni_bonn/bit/ProtocolAttackTest.java
[ "public class EncryptedSignatureWithProof {\n\n @Stringable\n private BigInteger sigma;\n @Stringable\n private BigInteger alphaPhone;\n private ZKProofPhone proof;\n\n public EncryptedSignatureWithProof(){}\n\n public EncryptedSignatureWithProof(BigInteger sigma, BigInteger alphaPhone, ZKProof...
import org.bitcoinj.core.ECKey; import org.bitcoinj.core.Sha256Hash; import com.google.common.collect.Lists; import com.google.common.math.DoubleMath; import de.uni_bonn.bit.wallet_protocol.EncryptedSignatureWithProof; import de.uni_bonn.bit.wallet_protocol.EphemeralPublicValueWithProof; import de.uni_bonn.bit.wallet_p...
/* * Copyright 2014 Christopher Mann * * 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 writi...
convertPubKeyToPoint(desktopKeyShare).multiply(convertPrivKeyToBigInt(phoneKeyShare)));
5
EndlessCodeGroup/RPGInventory
src/main/java/ru/endlesscode/rpginventory/event/listener/LockerListener.java
[ "public class RPGInventory extends PluginLifecycle {\n private static RPGInventory instance;\n\n private Permission perms;\n private Economy economy;\n\n private BukkitLevelSystem.Provider levelSystemProvider;\n private BukkitClassSystem.Provider classSystemProvider;\n\n private FileLanguage langu...
import ru.endlesscode.rpginventory.inventory.InventoryLocker; import ru.endlesscode.rpginventory.inventory.InventoryManager; import ru.endlesscode.rpginventory.utils.ItemUtils; import ru.endlesscode.rpginventory.utils.PlayerUtils; import java.util.List; import org.bukkit.GameMode; import org.bukkit.Material; import org...
/* * This file is part of RPGInventory. * Copyright (C) 2015-2017 Osip Fatkullin * * RPGInventory is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) a...
PlayerUtils.sendMessage(player, RPGInventory.getLanguage().getMessage("error.previous"));
4
ZabinX/DuskRPG
DuskFiles/Dusk3.0.1/src/in/groan/dusk/db/Accounts.java
[ "public interface Constants {\n\t//Version\n\tpublic String VERSION_STR = \"3.0.1\";\n\t\t//\n\tpublic int VERSION_MAJ \t= 3;\n\tpublic int VERSION_MIN \t= 0;\n\tpublic int VERSION_LCL \t= 1;\n\t\n\t//DuskServer Variables\n\tpublic static int SRV_PORT\t\t\t\t= 7400;\n\tpublic static int TRACKER_PORT\t\t\t= 7401;\n...
import in.groan.dusk.Constants; import in.groan.dusk.DuskEngine; import in.groan.dusk.object.entity.Job; import in.groan.dusk.object.entity.Player; import in.groan.dusk.object.entity.Race; import in.groan.dusk.util.Log; import in.groan.dusk.util.Statistics; import java.io.BufferedReader; import java.io.IOExcept...
+ID+" AND slots="+slot+";"; stmt.execute(query); } } if(!hashInv.isEmpty()) newInventory(trans,ID,hashInv); } } private void newInventory(Transaction trans,int ID, HashMap hashInv) throws DatabaseException { trans=new JDBCTransaction(createConnection()); try { Connect...
Race race = null;
4
sfPlayer1/Matcher
src/matcher/classifier/MethodClassifier.java
[ "public class Util {\n\tpublic static <T> Set<T> newIdentityHashSet() {\n\t\treturn Collections.newSetFromMap(new IdentityHashMap<>());//new IdentityHashSet<>();\n\t}\n\n\tpublic static <T> Set<T> newIdentityHashSet(Collection<? extends T> c) {\n\t\tSet<T> ret = Collections.newSetFromMap(new IdentityHashMap<>(c.siz...
import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.EnumMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.objectweb.asm.Handle; import org.objectweb.asm.Opcodes; import org.objectweb.asm.tree.AbstractInsnNode; imp...
List<ClassInstance> ret = new ArrayList<>(args.length); for (MethodVarInstance arg : args) { ret.add(arg.getType()); } return ret; } private static AbstractClassifier retType = new AbstractClassifier("ret type") { @Override public double getScore(MethodInstance methodA, MethodInstance methodB, Clas...
return ClassifierUtil.classifyPosition(methodA, methodB, MemberInstance::getPosition, (m, idx) -> m.getCls().getMethod(idx), m -> m.getCls().getMethods());
3
ptitfred/magrit
server/sshd/src/test/java/org/kercoin/magrit/sshd/commands/AbstractCommandTest.java
[ "@Singleton\npublic class Context {\n\t\n\tprivate final Configuration configuration = new Configuration();\n\t\n\tprivate Injector injector;\n\t\n\tprivate final GitUtils gitUtils;\n\t\n\tprivate final ExecutorService commandRunnerPool;\n\n\tpublic Context() {\n\t\tgitUtils = null;\n\t\tcommandRunnerPool = null;\n...
import static org.fest.assertions.Assertions.assertThat; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.verify; import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; import java.util.concurrent.ExecutorService; import org.apache.sshd.server.Environment; imp...
/* Copyright 2011-2012 Frederic Menou and others referred in AUTHORS file. This file is part of Magrit. Magrit is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your ...
cmd = new FakeCommand(new Context(new GitUtils(), commandRunnerPool));
1
cardinity/cardinity-sdk-java
src/main/java/com/cardinity/CardinityClient.java
[ "public abstract class CardinityException extends RuntimeException {\n\n private static final long serialVersionUID = -4551051157520060255L;\n\n public CardinityException(String message) {\n super(message, null);\n }\n\n}", "public class ValidationException extends CardinityException {\n\n priv...
import com.cardinity.exceptions.CardinityException; import com.cardinity.exceptions.ValidationException; import com.cardinity.model.Void; import com.cardinity.model.*; import com.cardinity.oauth.CardinityOAuthProvider; import com.cardinity.rest.CardinityRestClient; import com.cardinity.rest.RestClient; import com.cardi...
package com.cardinity; public class CardinityClient { private static final String MESSAGE_PAYMENT_ID_MISSING = "paymentID must be not null."; private final static TypeToken<Payment> PAYMENT_TYPE = new TypeToken<Payment>() { }; private final static TypeToken<List<Payment>> PAYMENT_LIST_TYPE = new Typ...
throw new ValidationException("Consumer key and consumer secret must be not null");
1
copygirl/WearableBackpacks
src/main/java/net/mcft/copy/backpacks/client/gui/config/BackpacksConfigScreen.java
[ "@Mod(modid = WearableBackpacks.MOD_ID, name = WearableBackpacks.MOD_NAME,\n version = WearableBackpacks.VERSION, dependencies = \"required-after:forge@[14.21.0.2375,)\",\n guiFactory = \"net.mcft.copy.backpacks.client.BackpacksGuiFactory\")\npublic class WearableBackpacks {\n\t\n\tpublic static final Strin...
import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.resources.I18n; import net.minecraft.util.text.TextComponentString; import net.minecraftforge.fml.client.config.GuiMessageDialog; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import java.lang.refl...
package net.mcft.copy.backpacks.client.gui.config; @SideOnly(Side.CLIENT) public class BackpacksConfigScreen extends BaseConfigScreen { private final GuiButton _buttonTest; /** Creates a config GUI screen for Wearable Backpacks (and its GENERAL category). */ public BackpacksConfigScreen(GuiScreen parentScre...
_buttonTest.setAction(() -> GuiElementBase.display(new GuiTestScreen(BackpacksConfigScreen.this)));
2
juliuskrah/spring-profiles
src/main/java/com/jipasoft/config/MongoConfig.java
[ "public final class JSR310DateConverters {\n\tprivate JSR310DateConverters() {\n\t}\n\n\tpublic static class LocalDateToDateConverter implements Converter<LocalDate, Date> {\n\n\t\tpublic static final LocalDateToDateConverter INSTANCE = new LocalDateToDateConverter();\n\n\t\tprivate LocalDateToDateConverter() {\n\t...
import com.jipasoft.domain.util.JSR310DateConverters.LocalDateToDateConverter; import com.jipasoft.domain.util.JSR310DateConverters.ZonedDateTimeToDateConverter; import com.jipasoft.repository.mongo.BaseRepositoryImpl; import com.jipasoft.util.Profiles; import java.util.ArrayList; import java.util.List; import org.spri...
/* * Copyright 2016, Julius Krah * by the @authors tag. See the LICENCE in the distribution for a * full listing of individual contributors. * * 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 * ...
converters.add(LocalDateTimeToDateConverter.INSTANCE);
4
TheClimateCorporation/mirage
library/src/main/java/com/climate/mirage/targets/ViewTarget.java
[ "public class Mirage {\n\n\t/**\n\t * Location of where the resource came from\n\t */\n\tpublic static enum Source {\n\t\tMEMORY,\n\t\tDISK,\n\t\tEXTERNAL\n\t}\n\n\tpublic static final Executor THREAD_POOL_EXECUTOR = new MirageExecutor();\n\n\tprivate static final String TAG = Mirage.class.getSimpleName();\n\tpriva...
import android.content.Context; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.os.Build; import android.support.annotation.DrawableRes; import android.view.View; import android.view.ViewTreeObserver; import com.climate.mirage.Mi...
package com.climate.mirage.targets; /** * The basic implementation of {@link com.climate.mirage.targets.Target} for images * into a view widget. */ abstract public class ViewTarget<V extends View> implements Target<Bitmap>, DrawableFactory { private MirageRequest request; private WeakReference<V> viewRef; pr...
private MirageTask<Void, Void, Bitmap> mirageTask;
5
kovertopz/Paulscode-SoundSystem
src/main/java/paulscode/sound/codecs/CodecJOgg.java
[ "public class CachedUrlStream implements PhysicalOggStream {\n\n private boolean closed=false;\n private URLConnection source;\n private InputStream sourceStream;\n private Object drainLock=new Object();\n private RandomAccessFile drain;\n private byte[] memoryCache;\n private ArrayList pageOffsets=ne...
import java.io.InputStream; import java.io.IOException; import java.net.URL; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.ShortBuffer; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import de.jarnbjo.ogg.CachedUrlStream; import de.jarnbjo.ogg.EndOfOggStrea...
package paulscode.sound.codecs; // From the j-ogg library, http://www.j-ogg.de /** * The CodecJOgg class provides an ICodec interface to the external J-Ogg * library. *<b><br><br> * This software is based on or using the J-Ogg library available from * http://www.j-ogg.de and copyrighted by Tor-Einar Jarn...
private SoundSystemLogger logger;
8
Epic-Breakfast-Productions/OWAT
implementations/java/OWAT-app/src/main/java/com/ebp/owat/app/Main.java
[ "public class CommandLineOps {\n\tprivate static final Logger LOGGER = LoggerFactory.getLogger(CommandLineOps.class);\n\t\n\tprivate final String[] argsGotten;\n\n\t@Option(name=\"-m\", aliases={\"--mode\"}, usage=\"The mode that this will run with. Required. \", required = true)\n\tprivate RunMode runMode = null;\...
import com.ebp.owat.app.config.CommandLineOps; import com.ebp.owat.app.config.Globals; import com.ebp.owat.app.gui.MainGuiApp; import com.ebp.owat.lib.runner.DeScrambleRunner; import com.ebp.owat.lib.runner.ScrambleRunner; import com.ebp.owat.lib.runner.utils.results.RunResults; import org.slf4j.Logger; import org.slf4...
package com.ebp.owat.app; /** * Created by Greg Stewart on 5/27/17. */ public class Main { private static final Logger LOGGER = LoggerFactory.getLogger(Main.class); private static CommandLineOps COMMAND_LINE_OPS; public static void main(String[] args) throws IOException, URISyntaxException {
new Globals();//init globals, no need to keep object.
1
unbroken-dome/gradle-gitversion-plugin
src/main/java/org/unbrokendome/gradle/plugins/gitversion/model/jgit/JGitRepository.java
[ "public interface CloseableGitRepository extends GitRepository, AutoCloseable {\n\n @Override\n void close();\n}", "public interface CloseableIterator<E> extends Iterator<E>, AutoCloseable {\n\n // do not throw checked Exceptions\n @Override\n void close();\n\n static <E> CloseableIterator<E> em...
import com.google.common.collect.Multimap; import com.google.common.collect.Multimaps; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevSort;...
package org.unbrokendome.gradle.plugins.gitversion.model.jgit; public final class JGitRepository implements CloseableGitRepository { private final Repository repository; private final Supplier<Multimap<ObjectId, JGitTag>> tagsByCommitId = Lazy.of(this::retrieveTagsByCommitId); JGitRepository(Reposito...
IOConsumer<RevWalk> revWalkInitializer = revWalk -> {
6
SW-Team/java-TelegramBot
src/milk/telegram/method/sender/PhotoSender.java
[ "public class TelegramBot extends Thread{\n\n public static final String BASE_URL = \"https://api.telegram.org/bot%s/%s\";\n\n private String token = \"\";\n\n private int lastId = 0;\n private int limit = 100;\n private int timeout = 1500;\n\n private User me;\n\n private Handler handler;\n\n ...
import milk.telegram.bot.TelegramBot; import milk.telegram.type.file.Document; import milk.telegram.type.file.photo.PhotoSize; import milk.telegram.type.message.Message; import milk.telegram.type.message.DocumentMessage; import milk.telegram.type.reply.ReplyMarkup;
package milk.telegram.method.sender; public class PhotoSender extends Sender{ public PhotoSender(TelegramBot bot){ super(bot); } public String getPhoto(){ return this.optString("photo"); } public String getCaption(){ return this.optString("caption"); } public P...
public DocumentSender setReplyMarkup(ReplyMarkup markup){
5
rampage128/hombot-control
wear/src/main/java/de/jlab/android/hombot/WearMainActivity.java
[ "public class HombotStatus {\n\n public static enum Status {\n OFFLINE, CHARGING, STANDBY, WORKING, UNDOCKING, DOCKING, PAUSE, HOMING\n }\n\n public static enum Mode {\n ZIGZAG, CELLBYCELL, SPIRAL, MYSPACE, MYSPACE_RECORD\n }\n\n private Status status = Status.OFFLINE;\n private int ...
import android.animation.Animator; import android.content.SharedPreferences; import android.graphics.Color; import android.graphics.PorterDuff; import android.os.Bundle; import android.preference.Preference; import android.preference.PreferenceManager; import android.support.wearable.activity.WearableActivity; import a...
package de.jlab.android.hombot; public class WearMainActivity extends WearableActivity implements WearRequestEngine.WearRequestListener, OverlayFragment.OverlayListener { private static class ViewHolder { RelativeLayout container; View joyTop; View joyRight; View joyBottom; ...
private HombotStatus mBotStatus;
0
mindwind/craft-armor
src/main/java/io/craft/armor/api/ArmorBeanPostProcessor.java
[ "public interface ArmorAttribute {\n\t\n\t\n\tpublic static final int DEFAULT_THREADS = Runtime.getRuntime().availableProcessors();\n\tpublic static final int DEFAULT_TIMEOUT = 3;\n\t\n\t\n\tExecutorService getExecutorService();\n\tArmorFilterChain getFilterChain();\n\tvoid setFilterChain(ArmorFilterCh...
import io.craft.armor.ArmorAttribute; import io.craft.armor.ArmorContext; import io.craft.armor.Armors; import io.craft.armor.DefaultArmorAttribute; import io.craft.armor.spi.ArmorProxyFactory; import java.lang.reflect.Method; import lombok.Getter; import lombok.Setter; import org.slf4j.Logger; import org.slf4j.LoggerF...
package io.craft.armor.api; /** * A spring factory hook to armed spring-based service. * While the service bean is initiating in spring container, this processor is callback to process {@link Armor} annotation * and create an armor proxy for the service bean. * * @author mindwind * @author warden * @versio...
ArmorAttribute attr = new DefaultArmorAttribute();
3
Simdea/gmlrva
gmlrva-lib/src/main/java/pt/simdea/gmlrva/lib/animation/GenericItemAnimator.java
[ "@SuppressWarnings(\"WeakerAccess\")\npublic interface IGenericRecyclerViewLayout<T extends RecyclerView.ViewHolder & IViewHolder> extends Serializable {\n\n /**\n * Procedure meant to handle the ViewHolder instance creation.\n * @param parent the root ViewGroup {@link ViewGroup} for the ViewHolder insta...
import android.animation.AnimatorSet; import android.support.annotation.IntRange; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v7.widget.DefaultItemAnimator; import android.support.v7.widget.RecyclerView; import android.util.ArrayMap; import java.util.Lis...
/* * Copyright (c) 2017. Simdea. */ package pt.simdea.gmlrva.lib.animation; /** * This class is meant to serve as a base {@link RecyclerView.ItemAnimator}, * responsible for coordinating default animations performed by {@link RecyclerView}. * * Created by Paulo Ribeiro on 10/7/2017. * Simdea © All Rights R...
throw new UnsupportedOperationException(GMLRVAConstants.UNSUPPORTED_ERROR);
5
jbenech/gnikrap
gnikrap-core/src/main/java/org/gnikrap/script/ScriptExecutionManager.java
[ "public interface GnikrapAppContext {\n\n /**\n * Returns the {@link GnikrapApp} object (the application entry point).\n */\n GnikrapApp getGnikrapApp();\n\n /**\n * Returns the {@link EV3ActionProcessor} object (process asynchronously all the actions/events from the GUI).\n */\n EV3ActionProcessor getE...
import org.gnikrap.script.ev3menu.WelcomeMenu; import org.gnikrap.utils.LoggerUtils; import org.gnikrap.utils.MapBuilder; import org.gnikrap.utils.StopableExecutor; import java.io.IOException; import java.util.Collections; import java.util.concurrent.Future; import java.util.logging.Level; import java.util.logging.Logg...
/* * Gnikrap is a simple scripting environment for the Lego Mindstrom EV3 * Copyright (C) 2014-2015 Jean BENECH * * Gnikrap 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 Licens...
private WelcomeMenu menu;
4
groundupworks/flying-photo-booth
flying-photo-booth/src/com/groundupworks/flyingphotobooth/fragments/CaptureFragment.java
[ "public class LaunchActivity extends BaseFragmentActivity {\n\n /**\n * Worker handler for posting background tasks.\n */\n private Handler mWorkerHandler;\n\n /**\n * Handler for the back pressed event.\n */\n private WeakReference<BackPressedHandler> mBackPressedHandler = new WeakRefer...
import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Bitmap; import android.hardware.Camera; import android.hardware.Camera.AutoFocusCallback; import android.hardware.Camera.CameraInfo; import android.hardware.Camer...
/* * This file is part of Flying PhotoBooth. * * Flying PhotoBooth is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Flying...
private LaunchActivity.BackPressedHandler mBackPressedHandler;
0
sgtcaze/NametagEdit
src/main/java/com/nametagedit/plugin/NametagCommand.java
[ "@Data\n@AllArgsConstructor\npublic class GroupData implements INametag {\n\n private String groupName;\n private String prefix;\n private String suffix;\n private String permission;\n private Permission bukkitPermission;\n private int sortPriority;\n\n public GroupData() {\n\n }\n\n publ...
import com.nametagedit.plugin.api.data.GroupData; import com.nametagedit.plugin.api.events.NametagEvent; import com.nametagedit.plugin.converter.Converter; import com.nametagedit.plugin.converter.ConverterTask; import com.nametagedit.plugin.utils.Utils; import lombok.AllArgsConstructor; import org.bukkit.Bukkit; import...
package com.nametagedit.plugin; @AllArgsConstructor public class NametagCommand implements CommandExecutor, TabExecutor { private final NametagHandler handler; private List<String> getSuggestions(String argument, String... array) { argument = argument.toLowerCase(); List<String> suggestions...
sender.sendMessage(Utils.format("\n&8» &a&lNametagEdit Player Help &8«"));
4
googlearchive/android-AutofillFramework
afservice/src/main/java/com/example/android/autofill/service/data/source/local/dao/AutofillDao.java
[ "@Entity(primaryKeys = {\"id\"})\npublic class AutofillDataset {\n @NonNull\n @ColumnInfo(name = \"id\")\n private final String mId;\n\n @NonNull\n @ColumnInfo(name = \"datasetName\")\n private final String mDatasetName;\n\n @NonNull\n @ColumnInfo(name = \"packageName\")\n private final S...
import java.util.List; import android.arch.persistence.room.Dao; import android.arch.persistence.room.Insert; import android.arch.persistence.room.OnConflictStrategy; import android.arch.persistence.room.Query; import com.example.android.autofill.service.model.AutofillDataset; import com.example.android.autofill.servic...
/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
List<DatasetWithFilledAutofillFields> getDatasets(List<String> allAutofillHints);
2
bushidowallet/bushido-java-core
src/main/java/com/bushidowallet/core/bitcoin/tx/input/MultiSigScriptHashInput.java
[ "public class ECKey {\n\n public static final X9ECParameters curve = SECNamedCurves.getByName(\"secp256k1\");\n public static final ECDomainParameters params = new ECDomainParameters(curve.getCurve(), curve.getG(), curve.getN(), curve.getH());\n\n private BigInteger priv;\n private byte[] pub;\n priv...
import com.bushidowallet.core.bitcoin.bip32.ECKey; import com.bushidowallet.core.bitcoin.script.Script; import com.bushidowallet.core.bitcoin.tx.SigHash; import com.bushidowallet.core.bitcoin.tx.Transaction; import com.bushidowallet.core.bitcoin.tx.TransactionSignature; import com.bushidowallet.core.bitcoin.tx.output.O...
package com.bushidowallet.core.bitcoin.tx.input; /** * Created by Jesion on 2015-04-14. */ public class MultiSigScriptHashInput extends Input { public List<ECKey> publicKeys; public Map<String, Integer> publicKeyIndex; public int treshold; // in order to map a transaction signature to its publi...
public Script redeemScript;
1
kpavlov/fixio
core/src/main/java/fixio/netty/codec/FixMessageEncoder.java
[ "public class FixConst {\n\n public static final ZoneId DEFAULT_ZONE_ID = ZoneOffset.UTC;\n\n public static final String DATE_PATTERN = \"yyyyMMdd\";\n //\n public static final String TIME_PATTERN_SECONDS = \"HH:mm:ss\";\n public static final String TIME_PATTERN_MILLIS = \"HH:mm:ss.SSS\";\n public...
import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.util.List; import fixio.fixprotocol.FixConst; import fixio.fixprotocol.FixMessageBuilder; import fixio.fixprotocol.FixMessageFragment; import fixio.fixprotocol.FixMessageHeader; import fixio.fixprotocol.Group; import fixio.fixprotoco...
/* * Copyright 2014 The FIX.io Project * * The FIX.io Project licenses this file to you under the Apache License, * version 2.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unles...
private static void validateRequiredFields(FixMessageHeader header) {
2
eskatos/asadmin
asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/AbstractAsadminMojo.java
[ "public class AsAdmin\n{\n\n private static final String OUTPUT_PREFIX = \"[ASADMIN] \";\n private static Map<IAsAdminConfig, AsAdmin> instances;\n public static final String HOST_OPT = \"--host\";\n public static final String PORT_OPT = \"--port\";\n public static final String SECURE_OPT = \"--secur...
import org.n0pe.asadmin.IAsAdminConfig; import java.io.File; import java.util.Collections; import java.util.Map; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.SystemUtils; import org.apache.maven.plugin.A...
/* * Copyright (c) 2010, Paul Merlin. * Copyright (c) 2011, J.Francis. * Copyright (c) 2011, Marenz. * * 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/licens...
protected abstract AsAdminCmdList getAsCommandList()
1
R2RML-api/R2RML-api
r2rml-api-jena-binding/src/test/java/jenaTest/NTriplesSyntax_Test.java
[ "public class JenaR2RMLMappingManager extends R2RMLMappingManagerImpl {\n\n private static JenaR2RMLMappingManager INSTANCE = new JenaR2RMLMappingManager(new JenaRDF());\n\n private JenaR2RMLMappingManager(JenaRDF rdf) {\n super(rdf);\n }\n\n public Collection<TriplesMap> importMappings(Model mod...
import org.apache.jena.rdf.model.ModelFactory; import eu.optique.r2rml.api.model.LogicalTable; import eu.optique.r2rml.api.model.ObjectMap; import eu.optique.r2rml.api.model.PredicateMap; import eu.optique.r2rml.api.model.PredicateObjectMap; import eu.optique.r2rml.api.model.SubjectMap; import eu.optique.r2rml.ap...
/******************************************************************************* * Copyright 2013, the Optique Consortium * 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...
Iterator<PredicateMap> pmit=pom.getPredicateMaps().iterator();
4
spring-cloud/spring-cloud-zookeeper
spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/configclient/DiscoveryClientConfigServiceAutoConfigurationTests.java
[ "@Configuration(proxyBeanMethods = false)\n@ConditionalOnZookeeperEnabled\n@EnableConfigurationProperties\npublic class ZookeeperAutoConfiguration {\n\n\tprivate static final Log log = LogFactory.getLog(ZookeeperAutoConfiguration.class);\n\n\t@Bean\n\t@ConditionalOnMissingBean\n\tpublic ZookeeperProperties zookeepe...
import java.util.Arrays; import org.junit.After; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration; import org.springframework.boot.test.util.TestPropertyValues; import org.springframework.cloud.client.DefaultServiceInstanc...
/* * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
public ZookeeperDiscoveryClient zookeeperDiscoveryClient(ZookeeperDiscoveryProperties properties) {
4
BlochsTech/BitcoinCardTerminal
src/com/blochstech/bitcoincardterminal/ViewModel/ViewStateManagers/MessageManager.java
[ "public class MainActivity extends FragmentActivity {\n\t\n\tprivate NfcAdapter mAdapter;\n\tprivate PendingIntent mPendingIntent;\n\tprivate String[][] techListsArray;\n\t\n\tpublic static MainActivity instance;\n\t\n\tpublic static Context GetMainContext(){\n\t\tContext res = instance != null ? instance.getApplic...
import java.util.LinkedList; import java.util.Queue; import com.blochstech.bitcoincardterminal.MainActivity; import com.blochstech.bitcoincardterminal.Interfaces.Message; import com.blochstech.bitcoincardterminal.Interfaces.Message.MessageType; import com.blochstech.bitcoincardterminal.Model.Model; import com.blochstec...
package com.blochstech.bitcoincardterminal.ViewModel.ViewStateManagers; //The core idea is to avoid any one View having to know all the other Views in order to update say a global status icon, //message or page number.. public class MessageManager { //Singleton pattern: private static MessageManager instance = n...
Toast.makeText(MainActivity.GetMainContext(), "ERR: " + msg, Toast.LENGTH_LONG).show();
0
ikromin/jphotoframe
src/main/java/net/igorkromin/jphotoframe/ui/PhotoUpdateThread.java
[ "public class ConfigOptions {\n\n public static final String DEFAULT_DEVICE_NUM = \"0\";\n public static final String DEFAULT_IMG_TIME = \"30000\";\n public static final String DEFAULT_WEATHER_UPDATE_TIME = \"600000\";\n public static final String DEFAULT_FORMAT_TIME = \"H:mm\";\n public static final...
import net.igorkromin.jphotoframe.ConfigOptions; import net.igorkromin.jphotoframe.ImageDirectory; import net.igorkromin.jphotoframe.img.BackgroundFiller; import net.igorkromin.jphotoframe.img.Factory; import net.igorkromin.jphotoframe.img.ImageScaler; import net.igorkromin.jphotoframe.img.ImageUtil; import net.igorkro...
/** * JPhotoFrame - a simple Java application for displaying a collection of photos in a full-screen slideshow. * Copyright (C) 2015 Igor Kromin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foun...
private BackgroundFiller filler;
2
Pivopil/spring-boot-oauth2-rest-service-password-encoding
rest/src/main/java/io/github/pivopil/rest/services/CustomClientDetailsService.java
[ "public class Builders {\n private Builders() {\n }\n\n private static Map<Class<? extends BasicEntity>, ? super EntityBuilder> map = new ConcurrentHashMap<>();\n\n static {\n map.put(User.class, new UserBuilder());\n map.put(Content.class, new ContentBuilder());\n map.put(Company.c...
import io.github.pivopil.share.builders.Builders; import io.github.pivopil.share.builders.impl.ClientBuilder; import io.github.pivopil.share.entities.impl.Client; import io.github.pivopil.share.exceptions.ExceptionAdapter; import io.github.pivopil.share.persistence.ClientRepository; import io.github.pivopil.share.viewm...
package io.github.pivopil.rest.services; /** * Created on 24.10.16. */ @Service @DependsOn("ovalValidator") public class CustomClientDetailsService implements ClientDetailsService {
private final ClientRepository clientRepository;
4
SamuelGjk/DiyCode
app/src/main/java/moe/yukinoneko/diycode/module/news/NewsListAdapter.java
[ "public class News implements Parcelable {\n\n @SerializedName(\"id\") public int id; // 新闻 id\n @SerializedName(\"title\") public String title; // 标题\n @SerializedName(\"created_at\") public Date createdAt; ...
import moe.yukinoneko.diycode.R; import moe.yukinoneko.diycode.bean.News; import moe.yukinoneko.diycode.list.BaseRecyclerListAdapter; import moe.yukinoneko.diycode.module.news.details.NewsDetailsActivity; import moe.yukinoneko.diycode.module.user.UserActivity; import moe.yukinoneko.diycode.tool.ImageLoadHelper; import ...
/* * Copyright (c) 2017 SamuelGjk <samuel.alva@outlook.com> * * This file is part of DiyCode * * DiyCode 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 o...
holder.textHost.setText(UrlHelper.getHost(holder.news.address));
6
fiber-space/jupyter-kernel-jsr223
src/main/java/org/jupyterkernel/kernel/MessageObject.java
[ "public class T_JSON {\n public static String message_protocol_version = null;\n \n private static double protocol_version = 0.0;\n \n public static void setProtocolVersion(String protocolVersion)\n {\n message_protocol_version = protocolVersion;\n protocol_version = Double.parseDoub...
import java.nio.charset.StandardCharsets; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import org.json.JSONObject; import org.jupyterkernel.json.messages.T_JSON; import org.jupyterkernel.json.messages.T_header; ...
/* * Copyright 2016 kay schluehr. * * 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 ...
if(null == T_JSON.message_protocol_version)
0
UweTrottmann/tmdb-java
src/main/java/com/uwetrottmann/tmdb2/services/MoviesService.java
[ "public class Images {\n\n public Integer id;\n public List<Image> backdrops;\n public List<Image> posters;\n public List<Image> stills;\n\n}", "public class Keywords {\n\n public Integer id;\n\n @SerializedName(value = \"keywords\", alternate = {\"results\"})\n public List<BaseKeyword> keywo...
import com.uwetrottmann.tmdb2.entities.AccountStates; import com.uwetrottmann.tmdb2.entities.AlternativeTitles; import com.uwetrottmann.tmdb2.entities.AppendToResponse; import com.uwetrottmann.tmdb2.entities.Changes; import com.uwetrottmann.tmdb2.entities.Credits; import com.uwetrottmann.tmdb2.entities.Images; import c...
package com.uwetrottmann.tmdb2.services; public interface MoviesService { /** * Get the basic movie information for a specific movie id. * * @param movieId A Movie TMDb id. * @param language <em>Optional.</em> ISO 639-1 code. */ @GET("movie/{movie_id}")
Call<Movie> summary(
2
huyongli/TigerVideo
TigerVideoPlayer/src/main/java/cn/ittiger/player/ui/StandardVideoView.java
[ "public interface FullScreenGestureStateListener {\r\n\r\n /**\r\n * 手势开始\r\n */\r\n void onFullScreenGestureStart();\r\n\r\n /**\r\n * 手势结束\r\n */\r\n void onFullScreenGestureFinish();\r\n}\r", "public interface FullScreenToggleListener {\r\n\r\n /**\r\n * 开始进入全屏\r\n */\r\n...
import android.annotation.TargetApi; import android.app.Activity; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Color; import android.os.Build; import android.util.AttributeSet; import android.view.Gravity; import android.view.MotionEvent; import android.view.Te...
package cn.ittiger.player.ui; /** * 视频播放时界面上各控件的显示控制 * @author: ylhu * @time: 2017/12/15 */ public abstract class StandardVideoView extends RelativeLayout implements View.OnClickListener, View.OnTouchListener, FullScreenGestureStateListener, FullScreenToggleListener...
this.addView(mVideoThumbView, ViewIndex.VIDEO_THUMB_VIEW_INDEX, params);
7
shreaker/V2I-Traffic-Light-Demonstrator
Android_App/Traffic_Light/src/main/java/hauptseminar/hm/edu/trafficlight/app/activity/PedestrianTab.java
[ "public final class R {\n public static final class anim {\n public static final int abc_fade_in=0x7f050000;\n public static final int abc_fade_out=0x7f050001;\n public static final int abc_grow_fade_in_from_bottom=0x7f050002;\n public static final int abc_popup_enter=0x7f050003;\n ...
import android.os.Bundle; import android.support.v4.app.Fragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageButton; import android.widget.TabHost; import android.widget.TextView; import hauptseminar.hm.edu.trafficligh...
package hauptseminar.hm.edu.trafficlight.app.activity; /** * Created by shreaker on 27.11.16. */ public class PedestrianTab extends Fragment implements View.OnClickListener { private static final int HTTP_CODE_OK = 200; private View view;
private AppData appData;
1
Rsgm/Hakd
core/src/game/pythonapi/PyDebug.java
[ "public class Hakd extends Game {\n public static Hakd HAKD;\n\n private Preferences prefs;\n // private static Preferences save1; // save this for later // Use kryo\n\n private GamePlay gamePlay;\n\n public static final AssetManager assets = new AssetManager(new HakdFileHandleResolver());\n\n pub...
import game.Hakd; import game.Internet; import game.gameplay.City; import game.gameplay.Player; import gui.windows.device.Terminal; import networks.InternetProviderNetwork; import networks.Network; import networks.NetworkFactory;
package game.pythonapi; public class PyDebug { private final Terminal terminal; public PyDebug(Terminal terminal) { this.terminal = terminal; } public Internet getInternet() { return terminal.getDevice().getNetwork().getInternet(); } public Player getPlayer() { retur...
public Network createNetwork(City city, Internet internet, InternetProviderNetwork isp) {
2
TrainerGuy22/Oceania
src/main/java/oceania/client/ClientProxy.java
[ "public class CommonProxy {\r\n\t\r\n\tpublic void init() {\r\n\t\tOceania.TAB = new CreativeTabOceania();\r\n\t\tEntities.initEntities();\r\n\t\tinitTileEntities();\r\n\t\tinitRecipes();\r\n\t\t\r\n\t\tOceania.TAB.setIconStack(new ItemStack(Items.itemMulti, 1, 0));\r\n\t\t\r\n\t\tGameRegistry.registerWorldGenerato...
import oceania.common.CommonProxy; import oceania.entity.EntityOceaniaBoat; import oceania.entity.EntityOceaniaBoatNormal; import oceania.entity.EntityOceaniaBoatWithChest; import oceania.entity.EntitySubmarine; import oceania.entity.render.RenderOceaniaBoat; import oceania.entity.render.RenderOceaniaBoatWithChes...
package oceania.client; public class ClientProxy extends CommonProxy { @Override public void init() { super.init();
RenderingRegistry.registerEntityRenderingHandler(EntityOceaniaBoatNormal.class, new RenderOceaniaBoat());
2
acmeair/acmeair
acmeair-loader/src/main/java/com/acmeair/loader/CustomerLoader.java
[ "public interface Customer {\n\n\tpublic enum MemberShipStatus { NONE, SILVER, GOLD, PLATINUM, EXEC_PLATINUM, GRAPHITE };\n\tpublic enum PhoneType { UNKNOWN, HOME, BUSINESS, MOBILE };\n\t\n\t\n\tpublic String getCustomerId();\n\t\n\tpublic String getUsername();\n\t\n\tpublic void setUsername(String username);\n\t\n...
import com.acmeair.entities.Customer; import com.acmeair.entities.CustomerAddress; import com.acmeair.entities.Customer.PhoneType; import com.acmeair.service.CustomerService; import com.acmeair.service.ServiceLocator;
/******************************************************************************* * Copyright (c) 2013 IBM Corp. * * 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/li...
CustomerAddress address = customerService.createAddress("123 Main St.", null, "Anytown", "NC", "USA", "27617");
1
apache/incubator-taverna-mobile
app/src/main/java/org/apache/taverna/mobile/ui/workflowdetail/WorkflowDetailFragment.java
[ "@Singleton\npublic class DataManager {\n\n private BaseApiManager mBaseApiManager;\n\n private DBHelper mDBHelper;\n\n private PreferencesHelper mPreferencesHelper;\n\n @Inject\n public DataManager(BaseApiManager baseApiManager, DBHelper dbHelper, PreferencesHelper\n mPreferencesHelper) {...
import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v4.app.Fragment; import android.support.v7.app.AlertDia...
ButterKnife.bind(this, rootView); mWorkflowDetailPresenter.attachView(this); return rootView; } @Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); if (ConnectionInfo.isConnectingToInternet(ge...
public void setImage(User user) {
1
FedericoPecora/coordination_oru
src/main/java/se/oru/coordination/coordination_oru/tests/TestTrajectoryEnvelopeCoordinatorWithMotionPlanner9.java
[ "public class ConstantAccelerationForwardModel implements ForwardModel {\n\t\t\n\tprivate double maxAccel, maxVel;\n\tprivate double temporalResolution = -1;\n\tprivate int trackingPeriodInMillis = 0;\n\tprivate int controlPeriodInMillis = -1;\n\t\n\tpublic ConstantAccelerationForwardModel(double maxAccel, double m...
import java.io.File; import java.util.Comparator; import java.util.logging.Level; import org.metacsp.multi.spatioTemporal.paths.Pose; import org.metacsp.multi.spatioTemporal.paths.PoseSteering; import org.metacsp.multi.spatioTemporal.paths.TrajectoryEnvelope; import org.metacsp.utility.logging.MetaCSPLogging; import co...
package se.oru.coordination.coordination_oru.tests; @DemoDescription(desc = "One-shot navigation of 2 robots showing multiple overlapping critical sections.") public class TestTrajectoryEnvelopeCoordinatorWithMotionPlanner9 { public static void main(String[] args) throws InterruptedException { double MAX_ACC...
tec.setForwardModel(1, new ConstantAccelerationForwardModel(MAX_ACCEL, MAX_VEL, tec.getTemporalResolution(), tec.getControlPeriod(), tec.getRobotTrackingPeriodInMillis(1)));
0
springtestdbunit/spring-test-dbunit
spring-test-dbunit/src/test/java/com/github/springtestdbunit/DbUnitTestExecutionListenerPrepareTest.java
[ "public enum DatabaseOperation {\n\n\t/**\n\t * Updates the contents of existing database tables from the dataset.\n\t */\n\tUPDATE,\n\n\t/**\n\t * Inserts new database tables and contents from the dataset.\n\t */\n\tINSERT,\n\n\t/**\n\t * Refresh the contents of existing database tables. Rows from the dataset will...
import static org.junit.Assert.*; import static org.mockito.BDDMockito.given; import static org.mockito.Matchers.*; import static org.mockito.Mockito.*; import javax.sql.DataSource; import org.dbunit.database.DatabaseDataSourceConnection; import org.dbunit.database.IDatabaseConnection; import org.dbunit.dataset.IDataSe...
DatabaseConnections databaseConnections = (DatabaseConnections) testContextManager .getTestContextAttribute(DbUnitTestExecutionListener.CONNECTION_ATTRIBUTE); assertSame(this.databaseConnection, databaseConnections.get("dbUnitDatabaseConnection")); assertEquals(FlatXmlDataSetLoader.class, testContextManager ...
public static class CustomDatabaseOperationLookup implements DatabaseOperationLookup {
3
castle/castle-java
src/main/java/io/castle/client/internal/backend/OkRestApiBackend.java
[ "public class Castle {\n public static final String URL_TRACK = \"/v1/track\";\n public static final String URL_AUTHENTICATE = \"/v1/authenticate\";\n public static final String URL_DEVICES = \"/v1/devices/\";\n public static final String URL_USERS = \"/v1/users/\";\n public static final String URL_I...
import com.google.common.collect.ImmutableMap; import com.google.gson.*; import io.castle.client.Castle; import io.castle.client.internal.config.CastleConfiguration; import io.castle.client.internal.json.CastleGsonModel; import io.castle.client.internal.utils.OkHttpExceptionUtil; import io.castle.client.internal.utils....
private final HttpUrl impersonateBase; private final HttpUrl privacyBase; public OkRestApiBackend(OkHttpClient client, CastleGsonModel model, CastleConfiguration configuration) { this.baseUrl = HttpUrl.parse(configuration.getApiBaseUrl()); this.client = client; this.model = model; ...
VerdictTransportModel transport = gson.fromJson(jsonResponse, VerdictTransportModel.class);
5
jbossas/jboss-vfs
src/test/java/org/jboss/test/vfs/FileVFSUnitTestCase.java
[ "public class ClassPathIterator {\n ZipInputStream zis;\n FileIterator fileIter;\n File file;\n VirtualFileIterator vfIter;\n VirtualFile vf;\n int rootLength;\n\n public ClassPathIterator(URL url) throws IOException {\n String protocol = url != null ? url.getProtocol() : null;\n ...
import java.io.Closeable; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.net.URI; import java.net.URL; import java.net.URLClassLoader; import java.net.URLDecoder; import ja...
*/ public void testFindResourceInFilesOnlyJar() throws Exception { VirtualFile testdir = getVirtualFile("/vfs/test"); VirtualFile jar = testdir.getChild("jar1-filesonly.jar"); List<Closeable> mounts = recursiveMount(jar); try { assertTrue("jar1-filesonly.jar != null"...
ClassPathIterator iter = new ClassPathIterator(classes.toURL());
0
Qualtagh/JBroTable
test/io/github/qualtagh/swing/table/view/JBroTableHeaderTest.java
[ "public interface IModelFieldGroup extends Cloneable {\n String getCaption();\n void setCaption( String caption );\n \n String getIdentifier();\n void setIdentifier( String identifier );\n \n ModelFieldGroup getParent();\n \n int getColspan();\n \n int getRowspan();\n void setRowspan( int rowspan );\n ...
import com.sun.java.swing.plaf.windows.WindowsLookAndFeel; import io.github.qualtagh.swing.table.model.IModelFieldGroup; import io.github.qualtagh.swing.table.model.ModelData; import io.github.qualtagh.swing.table.model.ModelField; import io.github.qualtagh.swing.table.model.ModelFieldGroup; import io.github.qualtagh.s...
package io.github.qualtagh.swing.table.view; public class JBroTableHeaderTest { private JBroTable table; public static void main( String args[] ) throws Exception { JBroTableHeaderTest test = new JBroTableHeaderTest(); test.setUp(); } @Before public void setUp() throws Exception { UIManage...
MouseRobot robot = new MouseRobot();
6
wisedog/Whoochoo
src/net/wisedog/android/whooing/activity/BbsListFragment.java
[ "public class Define {\n public static boolean DEBUG = false;\n \n\tpublic static String APP_ID = \"125\";\n\tpublic static String APP_SECRET = \"1c5224ad2961704a6076c0bda127003933828a16\";\n\tpublic static String PIN = null;\n\tpublic static String REAL_TOKEN = null;\n\tpublic static int USER_ID = -1;\n\tpub...
import java.util.ArrayList; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import net.wisedog.android.whooing.Define; import net.wisedog.android.whooing.R; import net.wisedog.android.whooing.WhooingApplication; import net.wisedog.android.whooing.adapter.BoardAdapter; import net.wi...
setListAdapter(mAdapter); super.onActivityCreated(savedInstanceState); } @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { BoardItem item = (BoardItem)(getListView().getItemAtPosition(position)); BbsArticleFragment f = new BbsArticleFragment(); f.setData(mBoa...
JSONObject obj = WhooingApplication.getInstance().getRepo().getUserValue();
1
caseydavenport/biermacht
src/com/biermacht/brews/frontend/IngredientActivities/AddHopsActivity.java
[ "public class IngredientSpinnerAdapter extends ArrayAdapter<Ingredient> {\n\n // Fields\n private Context context;\n private List<Ingredient> list;\n private String title;\n private boolean isListAdapter;\n\n // Constructor\n public IngredientSpinnerAdapter(Context context, List<Ingredient> list, String titl...
import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.view.View; import android.view.WindowManager; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.AdapterView.OnItemSelectedListener; imp...
package com.biermacht.brews.frontend.IngredientActivities; public class AddHopsActivity extends AddEditIngredientActivity { // Editable rows to display public Spinner useSpinner; public Spinner formSpinner; public View alphaAcidView; public View descriptionView; // Titles from rows public TextView a...
adapter = new IngredientSpinnerAdapter(this, ingredientList, "Hop", true);
0
Manabu-GT/DebugOverlay-Android
debugoverlay-ext-timber/src/main/java/com/ms_square/debugoverlay_ext_timber/TimberModule.java
[ "public abstract class OverlayModule<T> implements DataModule<T>, ViewModule<T> {\n\n private final DataModule<T> dataModule;\n\n private final ViewModule<T> viewModule;\n\n public OverlayModule(DataModule<T> dataModule, ViewModule<T> viewModule) {\n this.dataModule = dataModule;\n this.viewM...
import android.support.annotation.NonNull; import android.support.annotation.Size; import com.ms_square.debugoverlay.OverlayModule; import com.ms_square.debugoverlay.ViewModule; import com.ms_square.debugoverlay.modules.LogcatLine; import com.ms_square.debugoverlay.modules.LogcatLineColorScheme; import com.ms_square.de...
package com.ms_square.debugoverlay_ext_timber; public class TimberModule extends OverlayModule<LogcatLine> { public static final int DEFAULT_MAX_LINES = 15; /** * Pass BuildConfig.DEBUG not to plant a tree in the release build. * @param isDebug - should be your BuildConfig.DEBUG */ publi...
public TimberModule(boolean isDebug, @Size(min=1,max=100) int maxLines, @NonNull LogcatLineColorScheme colorScheme) {
3
vimeo/stag-java
stag-library-compiler/src/main/java/com/vimeo/stag/processor/generators/model/AnnotatedClass.java
[ "public class MethodFieldAccessor extends FieldAccessor {\n\n /**\n * Field naming notation,\n * used to determine the\n * names of the accessor methods.\n */\n public enum Notation {\n STANDARD,\n HUNGARIAN\n }\n\n @NotNull private final String mSetterName;\n @NotNull p...
import com.google.gson.annotations.SerializedName; import com.vimeo.stag.UseStag; import com.vimeo.stag.UseStag.FieldOption; import com.vimeo.stag.processor.generators.model.accessor.DirectFieldAccessor; import com.vimeo.stag.processor.generators.model.accessor.FieldAccessor; import com.vimeo.stag.processor.generators....
/* * The MIT License (MIT) * <p/> * Copyright (c) 2016 Vimeo * <p/> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to u...
TypeMirror inheritedType = TypeUtils.getInheritedType(element);
3
DevConMyanmar/devcon-android-2013
src/org/devcon/android/SpeakerDetailActivity.java
[ "public class StorageUtil {\n\n private Context mContext;\n\n public static StorageUtil getInstance(Context context) {\n return new StorageUtil(context);\n }\n\n private StorageUtil(Context context) {\n mContext = context;\n }\n\n public Object ReadArrayListFromSD(String filename) {\...
import android.os.Bundle; import android.widget.ImageView; import android.widget.TextView; import com.actionbarsherlock.view.Menu; import com.actionbarsherlock.view.MenuItem; import com.google.analytics.tracking.android.EasyTracker; import com.nostra13.universalimageloader.core.DisplayImageOptions; import com.nostra13....
package org.devcon.android; public class SpeakerDetailActivity extends BaseActivity { private static final String TAG = makeLogTag(SpeakerFragment.class); private String sName, sTitle, sBio, sEmail, photoURL; private int sId; private StorageUtil store; private ArrayList<Talk> talks = new Arr...
private final ImageLoadingListener animateFirstListener = new AnimateFirstDisplayListener();
3
idega/com.idega.xformsmanager
src/java/com/idega/xformsmanager/component/impl/FormComponentPageImpl.java
[ "public interface ButtonArea extends Container {\n\n\tpublic abstract Button addButton(ConstButtonType button_type,\n\t\t\tString component_after_this_id) throws NullPointerException;\n}", "public interface Page extends Container {\n\n\tpublic abstract PropertiesPage getProperties();\n\n\tpublic abstract ButtonAr...
import com.idega.xformsmanager.business.component.ButtonArea; import com.idega.xformsmanager.business.component.Page; import com.idega.xformsmanager.business.component.properties.PropertiesPage; import com.idega.xformsmanager.component.FormComponentButtonArea; import com.idega.xformsmanager.component.FormComponentPage;...
package com.idega.xformsmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.3 $ * * Last modified: $Date: 2008/11/20 18:59:54 $ by $Author: civilis $ */ public class FormComponentPageImpl extends FormComponentContainerImpl implements Page, FormCom...
public ButtonArea getButtonArea() {
0
GoogleCloudPlatform/weasis-chcapi-extension
src/main/java/org/weasis/dicom/google/api/ui/dicomstore/LoadStudiesTask.java
[ "public class GoogleAPIClient {\n\n private static final String APPLICATION_NAME = \"Weasis-GoogleDICOMExplorer/1.0\";\n\n /**\n * Directory to store user credentials.\n */\n private static final java.io.File DATA_STORE_DIR = new java.io.File(System.getProperty(\"user.home\"), \".weasis/google_auth...
import org.weasis.dicom.google.api.GoogleAPIClient; import org.weasis.dicom.google.api.model.DicomStore; import org.weasis.dicom.google.api.model.StudyModel; import org.weasis.dicom.google.api.model.StudyQuery; import org.weasis.dicom.google.api.ui.StudyView; import java.time.LocalDate; import java.time.LocalTime; impo...
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
private final DicomStore store;
1
MCBans/MCBans
src/main/java/com/mcbans/plugin/request/Kick.java
[ "public static String localize(final String key, final Object... args){\n // message file not proper loaded\n if (messages == null){\n ActionLog.getInstance().warning(\"Localized messages file is NOT loaded.\");\n return \"!\" + key + \"!\";\n }\n\n String msg = getString(messages, key);\n...
import static com.mcbans.plugin.I18n.localize; import org.bukkit.ChatColor; import org.bukkit.entity.Player; import com.mcbans.plugin.I18n; import com.mcbans.plugin.MCBans; import com.mcbans.plugin.events.PlayerKickEvent; import com.mcbans.plugin.permission.Perms; import com.mcbans.plugin.util.Util;
package com.mcbans.plugin.request; public class Kick { private final MCBans plugin; private final String playerName; private final String senderName; private String reason,senderUUID,playerUUID; private final boolean useExactName; public Kick(final MCBans plugin, final String playerName, f...
if (Perms.EXEMPT_KICK.has(player)){
4
saladinkzn/spring-data-tarantool
src/integration/java/ru/shadam/tarantool/ops/update/TarantoolUpdateObjectTests.java
[ "public class SimpleSocketChannelProvider implements SocketChannelProvider {\n private static final Logger logger = LoggerFactory.getLogger(SimpleSocketChannelProvider.class);\n\n private final String host;\n private final int port;\n\n public SimpleSocketChannelProvider(String host, int port) {\n ...
import com.palantir.docker.compose.DockerComposeRule; import com.palantir.docker.compose.connection.waiting.HealthChecks; import org.apache.commons.io.IOUtils; import org.junit.Assert; import org.junit.Before; import org.junit.ClassRule; import org.junit.Test; import org.tarantool.TarantoolClientConfig; import org.tara...
package ru.shadam.tarantool.ops.update; /** * @author sala */ public class TarantoolUpdateObjectTests { private static final String COUNTER = "counter"; private TarantoolClientOps<Integer, List<?>, Object, List<?>> clientOps; private TarantoolOperations<Long, String> operations; @ClassRule pu...
SimpleSocketChannelProvider provider = new SimpleSocketChannelProvider("localhost", tarantoolPort);
0
xxonehjh/remote-files-sync
src/main/java/com/hjh/files/sync/client/FileCopyBySimple.java
[ "public class HLogFactory {\n\n\tprivate static ILogFactory instance;\n\n\tpublic static boolean isInstanceNull() {\n\t\treturn null == instance;\n\t}\n\n\tprivate static ILog empty = new ILog() {\n\n\t\t@Override\n\t\tpublic void debug(String msg) {\n\t\t}\n\n\t\t@Override\n\t\tpublic void info(String msg) {\n\t\t...
import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import org.apache.http.util.Asserts; import com.hjh.files.sync.common.HLogFactory; import com.hjh.files.sync.common.ILog; import com.hjh.files.sync.common.RemoteFile; import com.hjh.files.sync.common.StopAble; import com.hjh.files.sync.co...
package com.hjh.files.sync.client; public class FileCopyBySimple implements FileCopy { private static ILog logger = HLogFactory.create(FileCopyBySimple.class); private ClientFolder client_folder; private int block_size; public FileCopyBySimple(ClientFolder client_folder, int block_size) { this.client_folder...
String target_md5 = MD5.md5(target);
4
desht/ScrollingMenuSign
src/main/java/me/desht/scrollingmenusign/views/redout/Switch.java
[ "public class SMSException extends DHUtilsException {\n\n private static final long serialVersionUID = 1L;\n\n public SMSException(String message) {\n super(message);\n }\n\n}", "public interface SMSInteractableBlock {\n public void processEvent(ScrollingMenuSign plugin, BlockDamageEvent event)...
import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import me.desht.dhutils.LogUtils; import me.desht.dhutils.MiscUtil; import me.desht.dhutils.PersistableLocation; import me.desht.dhutils.block.BlockUtil; import me.desht.scrollingmenusign.SMSException; import me.desht.scroll...
package me.desht.scrollingmenusign.views.redout; public class Switch implements Comparable<Switch>, SMSInteractableBlock { private static final Map<String, Set<ConfigurationSection>> deferred = new HashMap<String, Set<ConfigurationSection>>(); private final SMSGlobalScrollableView view; private final P...
public Switch(SMSGlobalScrollableView view, ConfigurationSection conf) throws SMSException {
0
sherlok/sherlok
src/main/java/org/sherlok/mappings/BundleDef.java
[ "public static void checkOnlyAlphanumDotUnderscore(String test,\n String variableName) throws SherlokException {\n if (test == null || test.length() == 0) {\n throw new SherlokException(variableName + \" cannot be empty or null\");\n }\n if (ALPHANUM_DOT_UNDERSCORE.matcher(test).find()) {\n ...
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import static java.lang.Character.isLetterOrDigit; import static java.util.regex.Pattern.compile; impo...
/** * Copyright (C) 2014-2015 Renaud Richardet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicabl...
private Map<String, String> repositories = map();
3