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
marcohc/android-clean-architecture
app/src/main/java/com/marcohc/architecture/app/data/factory/UserDataStoreFactory.java
[ "public class UserCacheDataStore implements UserDiskDataStore {\n\n @Override\n public Observable<List<UserEntity>> getUsersWithPicture() {\n return Observable.fromCallable(new SaveInCacheCallable(ALL_WITH_PICTURE));\n }\n\n @Override\n public Observable<List<UserEntity>> getUsersWithoutPictur...
import com.marcohc.architecture.app.data.datastore.user.UserCacheDataStore; import com.marcohc.architecture.app.data.datastore.user.UserCloudDataStore; import com.marcohc.architecture.app.data.datastore.user.UserDiskDataStore; import com.marcohc.architecture.app.data.datastore.user.UsersWithPictureDataStore; import com...
package com.marcohc.architecture.app.data.factory; /** * The factory provides different data sources . * <p> * Its responsibility is to hide the origin of each data source. * * @author Marco Hernaiz * @since 08/08/16 */ public final class UserDataStoreFactory { public static UserDiskDataStore createUserDi...
return new UserCacheDataStore();
0
codeforkjeff/refine_viaf
src/test/java/com/codefork/refine/controllers/ReconcileControllerTest.java
[ "@Service\npublic class Config {\n\n public static final String DEFAULT_SERVICE_NAME = \"VIAF Reconciliation Service\";\n private static final String CONFIG_FILENAME = \"refine_viaf.properties\";\n\n private Log log = LogFactory.getLog(Config.class);\n private String serviceName = DEFAULT_SERVICE_NAME;\...
import com.codefork.refine.Config; import com.codefork.refine.resources.Result; import com.codefork.refine.resources.SearchResponse; import com.codefork.refine.resources.ServiceMetaDataResponse; import com.codefork.refine.resources.SourceMetaDataResponse; import com.codefork.refine.viaf.VIAF; import com.codefork.refine...
package com.codefork.refine.controllers; public class ReconcileControllerTest { @Test @SuppressWarnings("unchecked") public void testServiceMetaData() throws Exception { Config config = new Config(); VIAF viaf = new VIAF(new VIAFService(), config); ReconcileController rc = new R...
List<Result> result = response.getResult();
1
Assassinss/Interessant
app/src/main/java/me/zsj/interessant/ResultActivity.java
[ "public interface SearchApi {\r\n\r\n @GET(\"v3/queries/hot\")\r\n Flowable<List<String>> getTrendingTag();\r\n\r\n @GET(\"v1/search?num=10\")\r\n Flowable<SearchResult> query(@Query(\"query\") String key, @Query(\"start\") int start);\r\n\r\n}\r", "public abstract class ToolbarActivity extends RxAppC...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.Menu; import android.view.MenuItem; import com.jakewharton.rxbinding2.support.v7.widget.RxRecyclerView; import java.util.A...
package me.zsj.interessant; /** * @author zsj */ public class ResultActivity extends ToolbarActivity { private int start; private List<ItemList> itemLists = new ArrayList<>(); private SearchApi searchApi; private InterestingAdapter adapter; @Override public int pr...
}, ErrorAction.error(this));
4
trezor/trezor-android
cgcmn-liban/src/main/java/com/circlegate/liban/utils/FileUtils.java
[ "public interface ApiDataAppVersionCodeLegacyResolver {\n int resolveAppVersionCodeLegacy(int legacyDataVersion);\n}", "public interface ApiDataInput extends ApiDataInputOutputBase {\n int getDataAppVersionCode(); // version code verze aplikace, ktera puvodne dana data ulozila...\n\n boolean readBoolean(...
import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.File; import android.content.Context; import android.os.Environment; import com.circlegate.liban.base.ApiDataIO.ApiDataAppVersionCodeLegacyResolver; import com.circleg...
package com.circlegate.liban.utils; public class FileUtils { private static final String TAG = FileUtils.class.getSimpleName(); private static final String TMP_FILE_POSTFIX = "~tmp"; /* Checks if external storage is available for read and write */ public static boolean isExternalStorageWritable() ...
this(lock, fileName, minReadAppVersionCode, ApiDataInputOutputBase.FLAG_NONE);
2
lgvalle/Beautiful-Photos
app/src/main/java/com/lgvalle/beaufitulphotos/gallery/DetailsFragment.java
[ "public abstract class BaseFragment extends Fragment {\n\n\t/**\n\t * Bind layout\n\t */\n\tprotected abstract void initLayout();\n\n\t/**\n\t * @return Activity layout resource\n\t */\n\tprotected abstract int getContentView();\n\n\t@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container...
import android.os.Build; import android.os.Bundle; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import butterknife.InjectView; import butterknife.OnClick; import com.facebook.rebound.*; import com.lgvalle.beaufitulphotos.BaseFragment; import com.lgvalle.beaufitulphotos.R; i...
package com.lgvalle.beaufitulphotos.gallery; /** * Created by lgvalle on 22/07/14. * <p/> * Display a single photo in full screen. * <p/> * Initializes photoview with already cached thumbnail while fetching large image */ public class DetailsFragment extends BaseFragment { private static final String TAG = Det...
BusHelper.register(this);
4
jiang111/ZhiHu-TopAnswer
app/src/main/java/com/jiang/android/zhihu_topanswer/fragment/RecyclerViewFragment.java
[ "public abstract class BaseAdapter extends RecyclerView.Adapter<BaseViewHolder> {\n\n\n @Override\n public BaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n final BaseViewHolder holder = new BaseViewHolder(LayoutInflater.from(parent.getContext()).inflate(viewType, parent, false));\n...
import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.LinearLayoutManager; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.V...
} }); mRecyclerView.setCanLOADMORE(true); mRecyclerView.setOnLoadMoreListener(new LoadMoreRecyclerView.OnLoadMoreListener() { @Override public void onLoadMore() { L.i("onLoadMore"); initData(false, ++mPage); } ...
Intent intent = new Intent(getActivity(), AnswersActivity.class);
5
mp911de/spinach
src/test/java/biz/paluch/spinach/ClusterConnectionTest.java
[ "public static String host() {\n return System.getProperty(\"host\", \"localhost\");\n}", "public static int port() {\n return Integer.valueOf(System.getProperty(\"port\", \"7711\"));\n}", "public interface DisqueConnection<K, V> extends StatefulConnection<K, V> {\n\n /**\n * Returns the {@link Dis...
import static biz.paluch.spinach.TestSettings.host; import static biz.paluch.spinach.TestSettings.port; import static org.assertj.core.api.Assertions.assertThat; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import biz.paluch.spinach.api.DisqueConnection; import biz.paluch.spinach.su...
/* * Copyright 2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
FastShutdown.shutdown(disqueClient);
4
Meituan-Dianping/Robust
auto-patch-plugin/src/main/java/com/meituan/robust/utils/SmaliTool.java
[ "public class Constants {\n\n public static final String ORIGINCLASS = \"originClass\";\n public static final String MODIFY_ANNOTATION = \"com.meituan.robust.patch.annotaion.Modify\";\n // public static final String MODIFY_ANNOTATION = Modify.class.getCanonicalName();\n public static final String ADD...
import com.meituan.robust.Constants; import com.meituan.robust.autopatch.ClassMapping; import com.meituan.robust.autopatch.Config; import com.meituan.robust.autopatch.NameManger; import com.meituan.robust.autopatch.ReadMapping; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import ja...
package com.meituan.robust.utils; /** * Created by mivanzhang on 17/2/8. */ public class SmaliTool { private static SmaliTool instance; public static SmaliTool getInstance() { if (instance == null) { instance = new SmaliTool(); } return instance; } private S...
File diretory = new File(Config.robustGenerateDirectory + "classout" + File.separator + Config.patchPackageName.replaceAll("\\.", Matcher.quoteReplacement(File.separator)));
2
iChun/Sync
src/main/java/me/ichun/mods/sync/common/core/ProxyCommon.java
[ "@Mod(modid = Sync.MOD_ID, name = Sync.MOD_NAME,\n version = Sync.VERSION,\n certificateFingerprint = iChunUtil.CERT_FINGERPRINT,\n guiFactory = iChunUtil.GUI_CONFIG_FACTORY,\n dependencies = \"required-after:ichunutil@[\" + iChunUtil.VERSION_MAJOR + \".2.0,\" + (iChunUtil.VERSION_MAJOR ...
import me.ichun.mods.ichunutil.common.core.network.PacketChannel; import me.ichun.mods.ichunutil.common.item.ItemGeneric; import me.ichun.mods.sync.common.Sync; import me.ichun.mods.sync.common.block.BlockDualVertical; import me.ichun.mods.sync.common.block.EnumType; import me.ichun.mods.sync.common.creativetab.Creativ...
package me.ichun.mods.sync.common.core; public class ProxyCommon { public void preInitMod() { Sync.creativeTabSync = new CreativeTabSync(); Sync.blockDualVertical = (new BlockDualVertical()).setRegistryName("sync", "block_multi").setLightLevel(0.5F).setHardness(2.0F).setTranslationKey("sync.b...
Sync.itemTreadmill = new ItemTreadmill().setRegistryName("sync", "item_treadmill").setTranslationKey("Sync_Treadmill").setCreativeTab(Sync.creativeTabSync);
5
qiujuer/Blink
Android/Blink/library/src/main/java/net/qiujuer/blink/core/BlinkConn.java
[ "public class AsyncReceiveDispatcher extends AsyncDispatcher implements ReceiveDispatcher {\n // Parser the receive data type\n private PacketParser mParser;\n // Receive Data\n private Receiver mReceiver;\n // Posting responses.\n private ReceiveDelivery mReceiveDelivery;\n // Blink Connector\...
import net.qiujuer.blink.async.AsyncReceiveDispatcher; import net.qiujuer.blink.async.AsyncSendDispatcher; import net.qiujuer.blink.async.HandleSelector; import net.qiujuer.blink.box.ByteSendPacket; import net.qiujuer.blink.box.FileSendPacket; import net.qiujuer.blink.box.StringSendPacket; import net.qiujuer.blink.kit....
/* * Copyright (C) 2014 Qiujuer <qiujuer@live.cn> * WebSite http://www.qiujuer.net * Created 04/16/2015 * Changed 04/19/2015 * Version 1.0.0 * * 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 Lice...
public ByteSendPacket send(byte[] bytes) {
3
weswilliams/GivWenZen
src/test/java/org/givwenzen/annotations/MarkedClassFinderTest.java
[ "public class MarkedClass {\r\n private Class<?> markedClass;\r\n public static final DummyMarkedClass DUMMY_MARKED_CLASS = new DummyMarkedClass();\r\n\r\n public MarkedClass(Class<?> markedClass) {\r\n this.markedClass = markedClass;\r\n }\r\n\r\n public String getName() {\r\n return markedClas...
import junit.framework.TestCase; import java.util.Set; import org.givwenzen.annotations.MarkedClass; import org.givwenzen.annotations.MarkedClassFinder; import org.givwenzen.annotations.left.MarkedClassA; import org.givwenzen.annotations.middle.MarkedClassX; import org.givwenzen.annotations.middle.sub.MarkedClass...
package org.givwenzen.annotations; public class MarkedClassFinderTest extends TestCase { @Override protected void setUp() throws Exception { super.setUp(); } public void testFindClassWithMarkerAnnotationWithNoType() throws Exception { MarkedClassFinder markedClassFinder = new ...
assertTrue(classes.contains(new MarkedClass(MarkedClassY.class)));
4
devalexx/evilrain
Main/src/com/alex/rain/managers/EditorManager.java
[ "public interface SeparatorHelper {\n public static AntoanAngelovSeparatorHelper antoanAngelovSeparatorHelper = new AntoanAngelovSeparatorHelper();\n public static EarClippingSeparatorHelper earClippingSeparatorHelper = new EarClippingSeparatorHelper();\n public static SeparatorHelper defaultSeparatorHelpe...
import com.alex.rain.helpers.SeparatorHelper; import com.alex.rain.listeners.GameContactListener; import com.alex.rain.models.Ground; import com.alex.rain.models.SimpleActor; import com.alex.rain.stages.EditableGameWorld; import com.alex.rain.ui.EditorUI; import com.alex.rain.viewports.GameViewport; import com.badlogic...
/******************************************************************************* * Copyright 2013 See AUTHORS file. * * Licensed under the GNU GENERAL PUBLIC LICENSE V3 * you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.gnu.org/licenses/gpl.html ...
Ground ground = new Ground(newMeshVertices);
2
redBorder/cep
src/main/java/net/redborder/cep/CorrelationService.java
[ "public class RestManager {\n private static final Logger log = LogManager.getLogger(RestManager.class);\n private static RestListener listener;\n private static HttpServer server;\n\n private RestManager() {}\n\n /**\n * Starts the HTTP server exposing the resources defined in the RestRules clas...
import net.redborder.cep.rest.RestManager; import net.redborder.cep.sinks.SinksManager; import net.redborder.cep.siddhi.SiddhiHandler; import net.redborder.cep.sources.SourcesManager; import net.redborder.cep.sources.parsers.ParsersManager; import net.redborder.cep.util.ConfigData;
package net.redborder.cep; public class CorrelationService { public static final String DEFAULT_CONFIG_FILE = "./conf/config.yml"; public static void main(String[] args) { // First, initialize the config file if (args.length >= 1) ConfigData.setConfigFile(args[0]); else ConfigData.set...
final SourcesManager sourcesManager = new SourcesManager(parsersManager, siddhiHandler);
3
yinyiliang/RabbitCloud
app/src/main/java/yyl/rabbitcloud/liveroom/LiveRoomPresenter.java
[ "public class RxPresenter<T extends BaseContract.BaseView> implements BaseContract.BasePresenter<T> {\n\n protected T mView;\n private CompositeDisposable mCompositeDisposable;\n\n private void unSubscribe() {\n if (!mCompositeDisposable.isDisposed()) {\n mCompositeDisposable.clear();\n ...
import com.google.gson.Gson; import com.orhanobut.logger.Logger; import org.json.JSONObject; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.Socket; import java.util.ArrayList; import java.util.List; import javax.inject.Inj...
package yyl.rabbitcloud.liveroom; /** * Created by yyl on 2017/6/23. */ public class LiveRoomPresenter extends RxPresenter<LiveRoomContract.View> implements LiveRoomContract.Presenter<LiveRoomContract.View> { /********************** * 以下是弹幕Socket连接相关 *****************/ private List<S...
bos.write(DanmuUtil.getConnectData(chatInfo.getData()));
5
schnatterer/nusic
nusic-data-android/src/main/java/info/schnatterer/nusic/data/dao/sqlite/ArtistDaoSqlite.java
[ "public class DatabaseException extends Exception {\n private static final long serialVersionUID = 1L;\n\n /**\n * Constructs a new exception with <code>null</code> as its detail message.\n * The cause is not initialized, and may subsequently be initialized by a\n * call to {@link #initCause}.\n ...
import javax.inject.Inject; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import info.schnatterer.nusic.data.DatabaseException; import info.schnatterer.nusic.data.NusicDatabaseSqlite; import info.schnatterer.nusic.data.NusicDatabaseSqlite.TableArtist; import info....
/** * Copyright (C) 2013 Johannes Schnatterer * * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * This file is part of nusic. * * nusic is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License a...
public Artist findByAndroidId(long androidId) throws DatabaseException {
0
Leviathan-Studio/CraftStudioAPI
src/main/java/com/leviathanstudio/craftstudio/proxy/CSClientProxy.java
[ "@Mod(modid = CraftStudioApi.API_ID, name = CraftStudioApi.NAME, updateJSON = \"https://leviathan-studio.com/craftstudioapi/update.json\",\n version = \"1.0.0\",\n acceptedMinecraftVersions = \"1.12\")\npublic class CraftStudioApi\n{\n private static final Logger LOGGER = LogManager.getLogger...
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Set; import com.leviathanstudio.craftstudio.CraftStudioApi; import com.leviathanstudio.craftstudio.client.animation.ClientAnimationHandler; import com.leviathanstudio.craftstudio.client.registry.CSRegistryHelper; impor...
package com.leviathanstudio.craftstudio.proxy; /** * Client proxy of the CraftStudioApi * * @since 0.3.0 * * @author Timmypote * @author ZeAmateis */ public class CSClientProxy extends CSCommonProxy { @Override public void preInit(FMLPreInitializationEvent e) { super.preInit(e); thi...
CraftStudioApi.getLogger().error("Error loading @CraftStudioLoader in class " + className + " for method " + methodName + "().");
0
calibre2opds/calibre2opds
OpdsOutput/src/main/java/com/gmail/dpierron/calibre/opds/CatalogManager.java
[ "public class CachedFile extends File {\r\n private final static Logger logger = LogManager.getLogger(CachedFile.class);\r\n\r\n private long privateLastModified;\r\n private long privateLength;\r\n private long privateCrc; // A -ve value indicates invalid CRC;\r\n private final static long...
import com.gmail.dpierron.calibre.cache.CachedFile; import com.gmail.dpierron.calibre.cache.CachedFileManager; import com.gmail.dpierron.calibre.configuration.ConfigurationHolder; import com.gmail.dpierron.calibre.configuration.ConfigurationManager; import com.gmail.dpierron.calibre.configuration.DeviceMode; impor...
bookDetailsCustomColumns = null; listOfUnchangedCatalogFiles = new LinkedList<CachedFile>(); mapOfImagesToCopy = new HashMap<String, CachedFile>(); htmlManager = null; thumbnailManager = null; coverManager = null; securityManager = null; currentProfile = null; titleDateFormat...
assert currentProfile.getDeviceMode().equals(DeviceMode.Nook);
4
sewerk/Bill-Calculator
app/src/main/java/pl/srw/billcalculator/bill/SavedBillsRegistry.java
[ "public interface Bill {\n\n Long getId();\n Long getPricesId();\n\n Date getDateFrom();\n void setDateFrom(Date dateFrom);\n Date getDateTo();\n void setDateTo(Date dateTo);\n Double getAmountToPay();\n void setAmountToPay(Double value);\n}", "@Entity(active = true)\npublic class PgeG11Bi...
import android.support.v4.util.SimpleArrayMap; import org.threeten.bp.LocalDate; import java.util.Random; import javax.inject.Inject; import javax.inject.Singleton; import pl.srw.billcalculator.db.Bill; import pl.srw.billcalculator.db.PgeG11Bill; import pl.srw.billcalculator.db.PgeG12Bill; import pl.srw.billcalculator....
package pl.srw.billcalculator.bill; @Singleton public class SavedBillsRegistry { private final SimpleArrayMap<String, Long> registry; @Inject SavedBillsRegistry() { registry = new SimpleArrayMap<>(); } public String register(Bill bill) { Timber.d("register() called with: bil...
} else if (bill instanceof PgeG11Bill) {
1
ervinsae/EZCode
app/src/main/java/com/ervin/litepal/Api/APIService.java
[ "public class GitModel {\n @Expose\n private String login;\n @Expose\n private Integer id;\n @SerializedName(\"avatar_url\")\n @Expose\n private String avatarUrl;\n @SerializedName(\"gravatar_id\")\n @Expose\n private String gravatarId;\n @Expose\n private String url;\n @Seria...
import com.ervin.litepal.model.GitModel; import com.ervin.litepal.model.LoginData; import com.ervin.litepal.model.User; import com.ervin.litepal.model.meizhi.MeizhiEntity; import com.ervin.litepal.model.meizhi.VideoEntity; import com.ervin.litepal.model.movie.MovieEntity; import com.ervin.litepal.request.RequestBody; i...
package com.ervin.litepal.api; /** * Created by Ervin on 2015/11/12. */ public interface APIService { @FormUrlEncoded @POST("appUsersLogin") Call<LoginData> getLoginData(@Field("type") String type, @Field("data") String data); //2.0的写法 //void getLoginData(@Field("phoneNumber") String phoneNumber,...
Observable<VideoEntity> getVedioData(@Path("page") int page);
4
norbertmartin12/site-monitor
app/src/main/java/org/site_monitor/task/CallSiteTask.java
[ "@DatabaseTable\npublic class SiteCall implements Parcelable {\n public static final Creator<SiteCall> CREATOR = new Creator<SiteCall>() {\n @Override\n public SiteCall createFromParcel(Parcel in) {\n return new SiteCall(in);\n }\n\n @Override\n public SiteCall[] new...
import java.util.Collections; import java.util.LinkedList; import java.util.List; import android.content.Context; import android.util.Log; import android.util.Pair; import org.site_monitor.BuildConfig; import org.site_monitor.model.bo.SiteCall; import org.site_monitor.model.bo.SiteSettings; import org.site_monitor.mode...
/* * Copyright (c) 2016 Martin Norbert * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
private NetworkUtil networkUtil = new NetworkUtil();
6
wso2/balana
modules/balana-core/src/test/java/org/wso2/balana/BaseTestCase.java
[ "public class AdvanceTestV3 extends TestCase {\n\n /**\n * directory name that states the test type\n */\n private final static String ROOT_DIRECTORY = \"advance\";\n\n /**\n * directory name that states XACML version\n */\n private final static String VERSION_DIRECTORY = \"3\";\n\n ...
import junit.framework.Test; import junit.framework.TestSuite; import org.wso2.balana.advance.AdvanceTestV3; import org.wso2.balana.advance.XACML3HigherOrderFunctionTest; import org.wso2.balana.basic.TestFunctionV3; import org.wso2.balana.basic.BasicTestV3; import org.wso2.balana.basic.TestMultipleRequestV3; import org...
/* * Copyright (c) WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless...
testSuite.addTestSuite(ConformanceTestV3.class);
7
nfl/glitr
src/main/java/com/nfl/glitr/GlitrBuilder.java
[ "public class QueryComplexityCalculator {\n\n private static final Logger logger = LoggerFactory.getLogger(QueryComplexityCalculator.class);\n\n private static final String[] ALPHABET = new String[]{\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s...
import com.nfl.glitr.annotation.GlitrForwardPagingArguments; import com.nfl.glitr.calculator.QueryComplexityCalculator; import com.nfl.glitr.registry.TypeRegistry; import com.nfl.glitr.registry.TypeRegistryBuilder; import com.nfl.glitr.registry.datafetcher.AnnotationBasedDataFetcherFactory; import com.nfl.glitr.relay.R...
package com.nfl.glitr; public class GlitrBuilder { private static final Logger logger = LoggerFactory.getLogger(GlitrBuilder.class); private Map<Class, List<Object>> overrides = new HashMap<>(); private Map<Class<? extends Annotation>, AnnotationBasedDataFetcherFactory> annotationToDataFetcherFactoryMa...
private Map<Class<? extends Annotation>, Func5<TypeRegistry, Field, Method, Class, Annotation, GraphQLOutputType>> annotationToGraphQLOutputTypeMap = new HashMap<>();
1
SEMERU-WM/ChangeScribe
CommitSummarizer/CommitSummarizer.core/src/main/java/co/edu/unal/colswe/changescribe/core/textgenerator/phrase/MethodPhraseGenerator.java
[ "public class Constants {\n\n\tpublic static final String RENAME = \"RENAME\";\n\tpublic static final String TREE = \"^{tree}\";\n\tpublic static final String DELETE = \"DELETE\";\n\tpublic static final String REMOVE = \"REMOVE\";\n\tpublic static final String ADD = \"ADD\";\n\tpublic static final String MODIFY = \...
import java.util.LinkedList; import java.util.List; import org.apache.commons.lang3.StringUtils; import org.eclipse.jdt.core.dom.MethodDeclaration; import org.eclipse.jdt.core.dom.SingleVariableDeclaration; import org.eclipse.jdt.core.dom.TypeDeclaration; import co.edu.unal.colswe.changescribe.core.Constants; import co...
package co.edu.unal.colswe.changescribe.core.textgenerator.phrase; public class MethodPhraseGenerator implements PhraseGenerator { private MethodDeclaration method; private final StereotypedElement element; private String type; private String phraseString; private LinkedList<Parameter> parameters = new Linke...
String methodName = Tokenizer.split(getMethod().getName().getFullyQualifiedName());
7
mauriciotogneri/green-coffee
greencoffee/src/main/java/com/mauriciotogneri/greencoffee/GreenCoffeeSteps.java
[ "public class InvalidStepDefinitionException extends RuntimeException\n{\n public InvalidStepDefinitionException(Method method)\n {\n super(String.format(\"A step definition cannot have more than one annotation%n%nClass: %s%nMethod: %s%n\", method.getDeclaringClass().getSimpleName(), method.getName()))...
import android.support.annotation.IdRes; import android.support.annotation.StringRes; import android.support.test.InstrumentationRegistry; import android.support.test.espresso.Espresso; import android.support.test.espresso.UiController; import android.support.test.espresso.ViewAction; import android.support.test.espres...
package com.mauriciotogneri.greencoffee; public class GreenCoffeeSteps { List<StepDefinition> stepDefinitions() { List<StepDefinition> stepDefinitions = new ArrayList<>(); for (Method method : getClass().getDeclaredMethods()) { String pattern = pattern(method); ...
return new ActionableView(onView(withId(resourceId)));
3
akeranen/the-one
src/gui/SimMenuBar.java
[ "public class NodeMessageFilter implements NodeFilter {\n\tprivate String messageId;\n\n\t/**\n\t * Creates a new filter with the given message ID\n\t * @param messageId The message ID used for filtering\n\t */\n\tpublic NodeMessageFilter(String messageId) {\n\t\tthis.messageId = messageId;\n\t}\n\n\tpublic boolean...
import gui.nodefilter.NodeMessageFilter; import gui.playfield.PlayField; import gui.playfield.NodeGraphic; import java.awt.Container; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageI...
/* * Copyright 2010 Aalto University, ComNet * Released under GPLv3. See LICENSE.txt for details. */ package gui; /** * Menu bar of the simulator GUI * */ @SuppressWarnings("serial") public class SimMenuBar extends JMenuBar implements ActionListener { /** title of the about window */ public static final St...
Settings settings = new Settings(UNDERLAY_NS);
3
vert-x3/vertx-jdbc-client
src/test/java/io/vertx/it/MSSQLTest.java
[ "@VertxGen\npublic interface JDBCClient extends SQLClient {\n\n /**\n * The default data source provider is C3P0\n */\n String DEFAULT_PROVIDER_CLASS = \"io.vertx.ext.jdbc.spi.impl.C3P0DataSourceProvider\";\n\n /**\n * The name of the default data source\n */\n String DEFAULT_DS_NAME = \"DEFAULT_DS\";\...
import io.vertx.core.json.JsonArray; import io.vertx.core.json.JsonObject; import io.vertx.ext.jdbc.JDBCClient; import io.vertx.ext.jdbc.spi.DataSourceProvider; import io.vertx.ext.unit.Async; import io.vertx.ext.unit.TestContext; import io.vertx.ext.unit.junit.RunTestOnContext; import io.vertx.ext.unit.junit.VertxUnit...
/* * Copyright (c) 2011-2014 The original author or authors * ------------------------------------------------------ * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Apache License v2.0 which accompanies this distributi...
final DataSourceProvider provider = new AgroalCPDataSourceProvider(options, new PoolOptions().setMaxSize(1));
5
kravchik/senjin
src/main/java/yk/senjin/shaders/gshader/GProgram.java
[ "abstract public class AbstractState implements State {\n\n public void release() {\n }\n}", "public class ShaderHandler2 extends AbstractState {\n public static ShaderHandler2 currentShader;\n\n private boolean isLinked;\n public int program = -1;\n public final List<UniformVariable> uniforms =...
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL20; import org.lwjgl.opengl.Util; import yk.jcommon.collections.YList; import yk.jcommon.collections.YMap; import yk.jcommon.collections.YSet; import yk.jcommon.fastgeom.Vec2f; import yk.jcommon.fastgeom.Vec3f; import yk.jcommon.fastgeom.Vec4f; import yk.jcommon.u...
pfs.inputSuffix = suffix; suffix = ""; pfs.outputSuffix = suffix; } if (pvs != null) pvs.translate(); if (pgs != null) pgs.translate(); if (pfs != null) pfs.translate(); asserts(); shaderState = newShaderProgram(); return this...
public void setInput(AVboTyped vbo) {
7
rrauschenbach/mobi-api4java
src/main/java/org/rr/mobi4java/EXTHHeader.java
[ "public static int getInt(byte[] buffer, int offset, int length) {\n\treturn getInt(getBytes(buffer, offset, length));\n}", "public static byte[] getBytes(byte[] buffer, int offset) {\n\tbyte[] b = new byte[buffer.length - offset];\n\tSystem.arraycopy(buffer, offset, b, 0, buffer.length - offset);\n\treturn b;\n}...
import static org.apache.commons.lang3.BooleanUtils.negate; import static org.rr.mobi4java.ByteUtils.getInt; import static org.rr.mobi4java.ByteUtils.getBytes; import static org.rr.mobi4java.ByteUtils.getString; import static org.rr.mobi4java.ByteUtils.writeInt; import static org.rr.mobi4java.ByteUtils.writeString; imp...
package org.rr.mobi4java; public class EXTHHeader { private final int exthHeaderOffset; private List<EXTHRecord> recordList; public EXTHHeader(int exthHeaderOffset) { this.exthHeaderOffset = exthHeaderOffset; this.recordList = new ArrayList<>(); } EXTHHeader readEXTHHeader(byte[] mobiHeader) throws IO...
writeInt(size(), 4, out);
3
howsun/howsun-javaee-framework
source/src/main/java/org/howsun/dao/jpadao/JpaGenericDao.java
[ "public interface ExtendExecutant {\n\t/**\n\t * 执行器\n\t * @param executant 必须为各ORM的数据库操作工具\n\t */\n\tvoid executing(Object executant);\n}", "public interface GenericDao {\n\t/**\n\t * 保存\n\t * @param object\n\t */\n\tpublic void save(Object object);\n\n\t/**\n\t * 更新\n\t * @param object\n\t */\n\tpublic void upd...
import java.io.Serializable; import java.math.BigInteger; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import javax.inject.Named; import javax.persistence.EmbeddedId; import javax.persistence.EntityManager; import javax.persistence.Id; import javax.persistence.PersistenceContext; import j...
package org.howsun.dao.jpadao; /** * * 功能描述: * * PROPAGATION_REQUIRED:支持当前事务,如果当前没有事务,就新建一个事务。这是最常见的选择。<br> * PROPAGATION_SUPPORTS:支持当前事务,如果当前没有事务,就以非事务方式执行。<br> * PROPAGATION_MANDATORY:支持当前事务,如果当前没有事务,就抛出异常。<br> * PROPAGATION_REQUIRES_NEW:新建事务,如果当前存在事务,把当前事务挂起。<br> * PROPAGATION_NOT_SUPPORTED:以非事务方式执行操作,如果当...
protected Log log = LogFactory.getLog(JpaGenericDao.class);
4
avarabyeu/restendpoint
src/test/java/com/github/avarabyeu/restendpoint/http/mock/RestEndpointsTest.java
[ "@Ignore\npublic class BaseRestEndointTest {\n\n public static final String SERIALIZED_STRING = \"{\\\"intField\\\":100,\\\"stringField\\\":\\\"test string\\\"}\";\n public static final String SERIALIZED_STRING_PATTERN = \"{\\\"intField\\\":%d,\\\"stringField\\\":\\\"%s\\\"}\";\n public static final String...
import com.github.avarabyeu.restendpoint.http.BaseRestEndointTest; import com.github.avarabyeu.restendpoint.http.Injector; import com.github.avarabyeu.restendpoint.http.RestEndpoint; import com.github.avarabyeu.restendpoint.http.RestEndpoints; import com.github.avarabyeu.restendpoint.http.exception.RestEndpointIOExcept...
/* * Copyright (C) 2014 Andrei Varabyeu * * 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...
.withSerializer(new StringSerializer())
7
siis/coal
src/main/java/edu/psu/cse/siis/coal/transformers/PropagationTransformer.java
[ "public class Constants {\n public static final String ANY_STRING = \"(.*)\";\n public static final String ANY_CLASS = \"(.*)\";\n public static final int ANY_INT = -1;\n public static final int VALUE_LIMIT = 256;\n public static final int INSTANCE_INVOKE_BASE_INDEX = -1;\n public static final String NULL_STR...
import edu.psu.cse.siis.coal.values.BasePropagationValue; import edu.psu.cse.siis.coal.values.PathValue; import edu.psu.cse.siis.coal.values.PropagationValue; import edu.psu.cse.siis.coal.values.TopPropagationValue; import heros.EdgeFunction; import java.util.HashSet; import java.util.Objects; import java.util.Set; imp...
/* * Copyright (C) 2015 The Pennsylvania State University and the University of Wisconsin * Systems and Internet Infrastructure Security Laboratory * * Author: Damien Octeau * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Y...
for (PathValue pathValue : ((PropagationValue) source).getPathValues()) {
4
idega/com.idega.block.form
src/java/com/idega/block/form/presentation/SavedForms.java
[ "public class IWBundleStarter implements IWBundleStartable {\n\n\tpublic static final String BUNDLE_IDENTIFIER = \"com.idega.block.form\";\n\n\tpublic void start(IWBundle starterBundle) {\n\t}\n\n\tpublic void stop(IWBundle starterBundle) {\n\t}\n}", "public class SubmissionDataBean {\n\n\tpublic static final Str...
import java.rmi.RemoteException; import java.sql.Date; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.logging.Level; import java.util.logging....
package com.idega.block.form.presentation; public class SavedForms extends IWBaseComponent { public static final String PERSONAL_ID_VARIABLE = SubmissionDataBean.VARIABLE_OWNER_PERSONAL_ID; @Autowired
private XFormsDAO xformsDAO;
6
speedingdeer/linked-data-visualization-tools
src/main/java/es/upm/fi/dia/oeg/map4rdf/client/inject/InjectorModule.java
[ "@Singleton\npublic class DashboardPresenter extends PagePresenter<DashboardPresenter.Display> implements\n FacetConstraintsChangedHandler, LoadResourceEventHandler, AreaFilterChangedHandler, EditResourceEventHandler, EditResourceCloseEventHandler {\n\n public interface Display extends WidgetDisplay {\n ...
import net.customware.gwt.presenter.client.DefaultEventBus; import net.customware.gwt.presenter.client.EventBus; import net.customware.gwt.presenter.client.gin.AbstractPresenterModule; import es.upm.fi.dia.oeg.map4rdf.client.maplet.Maplet; import es.upm.fi.dia.oeg.map4rdf.client.maplet.stats.StatisticsMaplet; import es...
/** * Copyright (c) 2011 Ontology Engineering Group, * Departamento de Inteligencia Artificial, * Facultad de Informetica, Universidad * Politecnica de Madrid, Spain * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Sof...
bindDisplay(DashboardPresenter.Display.class, DashboardView.class);
4
socrata/datasync
src/test/java/com/socrata/datasync/utilities/DeltaImporter2PublisherTest.java
[ "public class TestBase\n{\n public static final boolean testOnStaging = false;\n\n public static final String DOMAIN = (testOnStaging) ?\n \"https://opendata.test-socrata.com\" : \"https://sandbox.demo.socrata.com\";\n public static final String USERNAME = (testOnStaging) ?\n \"adrian...
import com.socrata.datasync.TestBase; import com.socrata.datasync.config.controlfile.ControlFile; import com.socrata.datasync.config.controlfile.FileTypeControl; import com.socrata.datasync.deltaimporter2.BlobId; import com.socrata.datasync.deltaimporter2.CommitMessage; import com.socrata.datasync.deltaimporter2.JobId;...
package com.socrata.datasync.utilities; public class DeltaImporter2PublisherTest extends TestBase { ObjectMapper mapper = new ObjectMapper().enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testDeserializationReturnIds() throws IOException { String typicalBlo...
BlobId id1 = mapper.readValue(typicalBlobJson, BlobId.class);
3
IPEldorado/RemoteResources
src/com/eldorado/remoteresources/android/server/connection/Server.java
[ "public class AndroidDeviceClient implements Serializable {\n\n\tprivate static final long serialVersionUID = -4688390733043132636L;\n\n\t/**\n\t * The device serial number\n\t */\n\tprivate final String serialNumber;\n\n\t/**\n\t * The device model\n\t */\n\tprivate final String model;\n\n\t/**\n\t * The device cl...
import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.net.InetSocketAddress; import java.net.Socket; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; import com.andr...
} } private void stopDataServers() { for (String dataServedDevice : dataServers.keySet()) { stopDataServer(dataServedDevice); } } void stopDataServer(String serialNumber) { if (dataServers.get(serialNumber) != null) { dataServers.get(serialNumber).close(); } } public synchronized List<AndroidDe...
String getHandleFileResult(final AndroidDevice aDevice, SubType subType,
6
AlbinoDrought/party-reader
app/src/main/java/party/minge/reddit/CommentItemView.java
[ "abstract public class DialogReplyListener implements Replier.ReplyListener {\n private Context context;\n private String title;\n\n public DialogReplyListener(Context context, String title) {\n this.context = context;\n this.title = title;\n }\n\n @Override\n public void onFailure(E...
import android.app.AlertDialog; import android.content.Context; import android.text.Spannable; import android.text.format.DateUtils; import android.text.method.LinkMovementMethod; import android.view.View; import android.widget.LinearLayout; import android.widget.ListView; import android.widget.TextView; import com.joa...
package party.minge.reddit; @EViewGroup(R.layout.comment_item) public class CommentItemView extends LinearLayout { static final int MAX_DEPTH = 15; protected CommentNode commentNode; @DimensionPixelSizeRes(R.dimen.comment_bar_size) protected int commentBarSize; @IntArrayRes protected in...
this.replier.setReplyListener(new DialogReplyListener(this.getContext(), "Error replying to comment") {
0
mini2Dx/miniscript
lua/src/main/java/org/mini2Dx/miniscript/lua/LuaScriptExecutorPool.java
[ "public class InsufficientCompilersException extends Exception {\n\tprivate static final long serialVersionUID = 2947579725300422095L;\n\n\tpublic InsufficientCompilersException() {\n\t\tsuper(\"There were insufficient compilers available to compile the provided script\");\n\t}\n}", "public class NoSuchScriptExce...
import org.luaj.vm2.lib.jse.JsePlatform; import org.mini2Dx.miniscript.core.*; import org.mini2Dx.miniscript.core.exception.InsufficientCompilersException; import org.mini2Dx.miniscript.core.exception.NoSuchScriptException; import org.mini2Dx.miniscript.core.exception.ScriptExecutorUnavailableException; import org.mini...
/** * The MIT License (MIT) * * Copyright (c) 2016 Thomas Cashman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to...
throw new ScriptExecutorUnavailableException(scriptId);
2
Arcus92/PlayMusicExporter
playmusiclib/src/main/java/de/arcus/playmusiclib/PlayMusicManager.java
[ "public class SuperUser {\r\n /**\r\n * The su process\r\n */\r\n private static Process mProcess;\r\n\r\n /**\r\n * Gets the active su process\r\n * @return Process\r\n */\r\n static Process getProcess() {\r\n return mProcess;\r\n }\r\n\r\n /**\r\n * Starts the supe...
import android.content.Context; import android.content.Intent; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.graphics.Bitmap; import android.net.Uri; import android.os.Build; import...
// Close the database closeDatabase(); // Copy the database to the temp folder if (!SuperUserTools.fileCopy(getDatabasePath(), getTempDatabasePath())) throw new CouldNotOpenDatabaseException(); // Opens the database try { mDatabase = SQLiteDataba...
public boolean exportMusicTrack(MusicTrack musicTrack, String dest) {
5
mchro/RejsekortReader
code/android/RejsekortReader/src/info/rejsekort/reader/rkf/blocks/TCPUStaticBlock.java
[ "public abstract class DataType {\n\t/** The bits as a string of \"0\" and \"1\": \"000110001...\" */\n\tprotected String mBits;\n\tprotected boolean mReverse = true;\n\tpublic int mBitlength;\n\t\n\tpublic DataType(int bitlength, boolean reverse) {\n\t\tmReverse = reverse;\n\t\tmBitlength = bitlength;\n\t}\n\t\n\t...
import info.rejsekort.reader.rkf.datatypes.DataType; import info.rejsekort.reader.rkf.datatypes.RKFInteger; import info.rejsekort.reader.rkf.datatypes.DateCompact; import info.rejsekort.reader.rkf.datatypes.ByteString; import info.rejsekort.reader.rkf.datatypes.MoneyAmount24;
package info.rejsekort.reader.rkf.blocks; public class TCPUStaticBlock extends InterpretedBlock { public ByteString mIdentifier; public RKFInteger mVersionNumber; public ByteString mAID; public ByteString mPurseSerialNumber; public DateCompact mStartDate; public RKFInteger mDataPointer;
public MoneyAmount24 mMinimumValue;
4
redomar/JavaGame
src/com/redomar/game/level/LevelHandler.java
[ "public abstract class Entity {\n\n\tprotected double x, y;\n\tprotected String name;\n\tprotected LevelHandler level;\n\n\tpublic Entity(LevelHandler level) {\n\t\tinit(level);\n\t}\n\n\tpublic final void init(LevelHandler level) {\n\t\tthis.level = level;\n\t}\n\n\tpublic abstract void tick();\n\n\tpublic abstrac...
import com.redomar.game.entities.Entity; import com.redomar.game.entities.Player; import com.redomar.game.entities.PlayerMP; import com.redomar.game.gfx.Screen; import com.redomar.game.level.tiles.Tile; import com.redomar.game.lib.utils.Vector2i; import com.redomar.game.scenes.Scene; import com.redomar.game.script.Prin...
package com.redomar.game.level; public class LevelHandler { private byte[] tiles; private int width; private int height; private List<Entity> entities; private List<Entity> entities_p; private String imagePath; private BufferedImage image; private Printing print; private Comparator<Node> nodeSorter; pub...
Scene scene = new Scene(xOffset, yOffset, screen, this);
6
yanzhenjie/LiveSourceCode
CoolHttp/app/src/main/java/com/yanzhenjie/coolhttp/MainActivity.java
[ "public class CoolHttp {\n\n\n /**\n * https://git.oschina.net/ysb/NoHttpUtil\n *\n * https://github.com/LiqiNew/NohttpRxUtils\n */\n\n private static Context sContext;\n private static HttpConfig sHttpConfig;\n\n public static void initialize(Context context) {\n initialize(conte...
import android.content.Intent; import android.graphics.Rect; import android.os.Build; import android.os.Bundle; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; import andr...
package com.yanzhenjie.coolhttp; public class MainActivity extends AppCompatActivity { private static final int REQUEST_CODE_ACTIVITY_ALBUM = 100; private TextView mTvResult; private RecyclerView mRecyclerView; private AlbumPreviewAdapter mAdapter; private List<String> mPreivewList; @Over...
public void onSucceed(Response<String> response) {
5
hoijui/JavaOSC
modules/core/src/main/java/com/illposed/osc/transport/tcp/TCPTransport.java
[ "public class ByteArrayListBytesReceiver implements BytesReceiver {\n\n\tprivate final List<byte[]> buffer;\n\tprivate int pos;\n\n\tpublic ByteArrayListBytesReceiver() {\n\n\t\tthis.buffer = new LinkedList<>();\n\t\tthis.pos = 0;\n\t}\n\n\t@Override\n\tpublic BytesReceiver put(final byte data) {\n\n\t\tbuffer.add(...
import com.illposed.osc.ByteArrayListBytesReceiver; import com.illposed.osc.OSCPacket; import com.illposed.osc.OSCParseException; import com.illposed.osc.OSCParser; import com.illposed.osc.OSCSerializeException; import com.illposed.osc.OSCSerializer; import com.illposed.osc.OSCSerializerAndParserBuilder; import com.ill...
// SPDX-FileCopyrightText: 2004-2019 C. Ramakrishnan / Illposed Software // SPDX-FileCopyrightText: 2021 Robin Vobruba <hoijui.quaero@gmail.com> // // SPDX-License-Identifier: BSD-3-Clause package com.illposed.osc.transport.tcp; /** * A {@link Transport} implementation for sending and receiving OSC packets over * ...
private final OSCParser parser;
3
betroy/xifan
app/src/main/java/com/troy/xifan/activity/SearchActivity.java
[ "public class StatusAdapter extends RecyclerArrayAdapter<StatusRes> {\n private static final String TYPE_FAVORITE_STATUS = \"favorite_status\";\n private static final String TYPE_DELETE_STATUS = \"delete_status\";\n\n private Context mContext;\n\n public StatusAdapter(Context context) {\n super(c...
import android.graphics.drawable.Drawable; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.Toolbar; import android.text.Editable; import android.text.TextWatcher; import android.view.KeyEvent; import android.vie...
package com.troy.xifan.activity; /** * Created by chenlongfei on 2016/12/17. */ @Route(Constants.Router.SEARCH) public class SearchActivity extends BaseActivity { @BindView(R.id.search_bar) Toolbar mSearchBar; @BindView(R.id.edit_search_bar) EditText mEditSearchBar; @BindView(R.id.recycler_view) EasyRec...
.searchPublicTimeline(request, new SimpleHttpRequestCallback<List<StatusRes>>() {
3
petosorus/dotalys-cli
src/de/lighti/packet/Entities.java
[ "public class DotaPlay {\r\n public interface ProgressListener {\r\n void bytesRemaining( int position );\r\n }\r\n\r\n /**\r\n * The current parsing state.\r\n */\r\n private static ParseState state;\r\n\r\n private static List<GameEventListener> listeners = new ArrayList<GameEventLis...
import java.io.IOException; import java.nio.ByteBuffer; import java.util.HashSet; import java.util.Set; import java.util.logging.Logger; import com.valve.dota2.Netmessages.CSVCMsg_PacketEntities; import de.lighti.DotaPlay; import de.lighti.GameEventListener; import de.lighti.model.Entity; import de.lighti.mode...
package de.lighti.packet; /** * This class handles the CSVCMsg_PacketEntities SVCMessage. The packet is originally * a binary field and denotes created, changed, and deleted entities. * * The code is based on the c++ parser library https://github.com/dschleck/edith * * @author Tobias Mahlmann *...
final EntityClass eClass = state.getEntityClass( class_i );
3
autonomousapps/ReactiveStopwatch
app/src/main/java/com/autonomousapps/reactivestopwatch/di/StopwatchModule.java
[ "public class RemoteStopwatch implements Stopwatch {\n\n private static final String TAG = RemoteStopwatch.class.getSimpleName();\n\n private final Context context;\n\n private IStopwatchService remoteService;\n private BehaviorSubject<IStopwatchService> serviceConnectionSubject = BehaviorSubject.create...
import com.autonomousapps.reactivestopwatch.time.RemoteStopwatch; import com.autonomousapps.reactivestopwatch.time.Stopwatch; import com.autonomousapps.reactivestopwatch.time.StopwatchImpl; import com.autonomousapps.reactivestopwatch.time.SystemTimeProvider; import com.autonomousapps.reactivestopwatch.time.TimeProvider...
package com.autonomousapps.reactivestopwatch.di; @Module(includes = { ContextModule.class }) abstract class StopwatchModule { @Binds
public abstract TimeProvider bindsTimeProvider(SystemTimeProvider systemTimeProvider);
4
SamuelGjk/GComic
app/src/main/java/moe/yukinoneko/gcomic/module/gallery/GalleryPresenter.java
[ "public abstract class BasePresenter<T extends IBaseView> {\n protected CompositeSubscription mCompositeSubscription;\n protected Context mContext;\n protected T iView;\n\n public BasePresenter(Context context, T iView) {\n this.mContext = context;\n this.iView = iView;\n }\n\n publi...
import rx.functions.Action1; import android.content.Context; import java.util.List; import moe.yukinoneko.gcomic.R; import moe.yukinoneko.gcomic.base.BasePresenter; import moe.yukinoneko.gcomic.data.ChapterData; import moe.yukinoneko.gcomic.database.GComicDB; import moe.yukinoneko.gcomic.database.model.ReadHistoryModel...
/* * Copyright (C) 2016 SamuelGjk <samuel.alva@outlook.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * ...
Subscription subscription = GComicDB.getInstance(mContext)
2
SoyaLeaf/CalendarII
app/src/main/java/top/soyask/calendarii/ui/fragment/month/MonthFragment.java
[ "public class Day implements CalendarView.IDay, Serializable {\n\n private static final String BIRTHDAY = \"生日\";\n private int dayOfMonth;\n private LunarDay lunar;\n private boolean isToday;\n private int dayOfWeek;\n private int year;\n private int month;\n private boolean isHoliday;\n ...
import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.support.annotation.DimenRes; import android.support.annotation.Nullable; import android.view.View; import top.soyask.calendarii.R; import...
package top.soyask.calendarii.ui.fragment.month; public class MonthFragment extends BaseFragment { private static final String TAG = "MonthFragment"; public static final String ADD_EVENT = "add_event"; public static final String DELETE_EVENT = "delete_event"; public static final String UPDATE_EVEN...
mYear = position / MONTH_COUNT + YEAR_START_REAL;
7
HitTheSticks/Sploosh
src/com/htssoft/sploosh/VortonSpace.java
[ "public class FluidTracer {\n\t/**\n\t * Position of the fluid tracer at the current time.\n\t * */\n\tpublic final Vector3f position = new Vector3f();\n\t\n\t/**\n\t * This is an intertial component, which may be affected\n\t * by outside forces.\n\t * \n\t * The reynolds ratio below determines how much affect\n\t...
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.concurrent.atomic.AtomicReference; import com.htssoft.sploosh.presentation.FluidTracer; import com.htssoft.sploosh.space.OTree; import com.htssoft.sploosh.space.OTreeNode; import com.htssoft.sploosh.threading.Kernel; import c...
Vector3f pos = new Vector3f(); for (Vorton vI : vortons){ BufferedVorton v = (BufferedVorton) vI; pos.set(v.getPosition()); inputTransform.transformInverseVector(pos, pos); x = pos.x; y = pos.y; x *= scale; y *= scale; float norm = norm2(x, y); if (norm >= 0.001f){ vort.x =...
public void advectTracers(FluidTracer[] tracers, float tpf){
0
Leaking/WeGit
app/src/main/java/com/quinn/githubknife/interactor/UserInfoInteractorImpl.java
[ "public class GitHubAccount {\n\n\n private static final String TAG = \"GitHubAccount\";\n\n public static final String ACCOUNT_TYPE = \"com.githubknife\";\n\n private final Account account;\n\n private final AccountManager manager;\n\n private volatile static GitHubAccount instance;\n\n private C...
import android.content.Context; import android.os.Handler; import android.os.Message; import android.text.TextUtils; import com.quinn.githubknife.R; import com.quinn.githubknife.account.GitHubAccount; import com.quinn.githubknife.listener.OnLoadUserInfoListener; import com.quinn.githubknife.model.GithubService; import ...
package com.quinn.githubknife.interactor; /** * Created by Quinn on 7/22/15. */ public class UserInfoInteractorImpl implements UserInfoInteractor { private final static String TAG = UserInfoInteractorImpl.class.getSimpleName(); private final static int USER_MSG = 1; private final static int FOLLOW_S...
this.service = RetrofitUtil.getJsonRetrofitInstance(context).create(GithubService.class);
3
mtsar/mtsar
src/main/java/mtsar/resources/AnswerResource.java
[ "public final class AnswerAggregationCSV {\n private static final CSVFormat FORMAT = CSVFormat.EXCEL.withHeader();\n private static final String[] HEADER = {\"task_id\", \"answers\"};\n private static final Comparator<AnswerAggregation> ORDER = (a1, a2) -> a1.getTask().getId().compareTo(a2.getTask().getId(...
import io.dropwizard.jersey.PATCH; import mtsar.api.*; import mtsar.api.csv.AnswerAggregationCSV; import mtsar.api.csv.AnswerCSV; import mtsar.api.sql.AnswerDAO; import mtsar.api.sql.TaskDAO; import mtsar.api.sql.WorkerDAO; import mtsar.views.AnswersView; import org.apache.commons.csv.CSVParser; import org.glassfish.je...
/* * Copyright 2015 Dmitry Ustalov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
private final WorkerDAO workerDAO;
4
dmfs/uri-toolkit
rfc3986-uri/src/main/java/org/dmfs/rfc3986/uris/EmptyUri.java
[ "public interface Authority\n{\n /**\n * Returns the {@link Optional} user info part of the authority in encoded form.\n *\n * @return The {@link UriEncoded} user info.\n */\n Optional<? extends UriEncoded> userInfo();\n\n /**\n * Returns the host of this authority.\n *\n * @ret...
import org.dmfs.optional.Optional; import org.dmfs.rfc3986.Authority; import org.dmfs.rfc3986.Fragment; import org.dmfs.rfc3986.Path; import org.dmfs.rfc3986.Query; import org.dmfs.rfc3986.Scheme; import org.dmfs.rfc3986.Uri; import org.dmfs.rfc3986.paths.EmptyPath; import static org.dmfs.optional.Absent.absent;
/* * Copyright 2017 dmfs GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
public Optional<? extends Query> query()
3
danielflower/app-runner
src/main/java/com/danielflower/apprunner/AppEstate.java
[ "public interface AppDescription {\n String name();\n\n String gitUrl();\n\n void gitUrl(String url) throws URISyntaxException, GitAPIException;\n\n Availability currentAvailability();\n\n BuildStatus lastBuildStatus();\n\n BuildStatus lastSuccessfulBuild();\n\n String latestBuildLog();\n\n ...
import com.danielflower.apprunner.mgmt.AppDescription; import com.danielflower.apprunner.mgmt.AppManager; import com.danielflower.apprunner.problems.AppNotFoundException; import com.danielflower.apprunner.runners.AppRunnerFactoryProvider; import com.danielflower.apprunner.runners.UnsupportedProjectTypeException; import...
package com.danielflower.apprunner; public class AppEstate { public static final Logger log = LoggerFactory.getLogger(AppEstate.class); private final List<AppDescription> managers = new ArrayList<>(); private final ProxyMap proxyMap; private final FileSandbox fileSandbox; private final List<AppC...
throw new AppNotFoundException("No app found with name '" + name + "'. Valid names: " + allAppNames());
2
easemob/emchat-server-examples
emchat-server-java/src/main/java/com/easemob/server/example/api/impl/EasemobIMUsers.java
[ "public interface IMUserAPI {\r\n\r\n\t/**\r\n\t * 注册IM用户[单个] <br>\r\n\t * POST\r\n\t * \r\n\t * @param payload\r\n\t * <code>{\"username\":\"${用户名}\",\"password\":\"${密码}\", \"nickname\":\"${昵称值}\"}</code>\r\n\t * @return\r\n\t */\r\n\tObject createNewIMUserSingle(Object payload);\r\n\r\n\t/**\r\n\t * 注...
import com.easemob.server.example.api.IMUserAPI; import com.easemob.server.example.comm.EasemobAPI; import com.easemob.server.example.comm.OrgInfo; import com.easemob.server.example.comm.ResponseHandler; import com.easemob.server.example.comm.TokenUtil; import io.swagger.client.ApiException; import io.swagger.cli...
package com.easemob.server.example.api.impl; public class EasemobIMUsers implements IMUserAPI { private UsersApi api = new UsersApi(); private ResponseHandler responseHandler = new ResponseHandler(); @Override public Object createNewIMUserSingle(final Object payload) { return responseHandler.hand...
return api.orgNameAppNameUsersPost(OrgInfo.ORG_NAME,OrgInfo.APP_NAME, (RegisterUsers) payload,TokenUtil.getAccessToken());
2
free-iot/freeiot-android
app/src/main/java/com/pandocloud/freeiot/ui/SplashActivity.java
[ "public class UserState {\n\t\n\tprivate static final String USER_PREFS_NAME = \"pando_user_prefs\";\n\t\n\tprivate SharedPreferences mPrefs;\n\t\n\tprivate String accessToken;\n\t\n\tprivate static UserState sInstances;\n\t\n\tprivate void init(Context context) {\n\t\tif (mPrefs == null) {\n\t\t\tmPrefs = context....
import android.os.Bundle; import android.os.Handler; import com.pandocloud.android.api.interfaces.SimpleRequestListener; import com.pandocloud.freeiot.R; import com.pandocloud.freeiot.ui.app.UserState; import com.pandocloud.freeiot.ui.base.BaseActivity; import com.pandocloud.freeiot.ui.helper.ProductInfoHelper; import ...
package com.pandocloud.freeiot.ui; /** * Created by ywen on 15/5/18. */ public class SplashActivity extends BaseActivity { private Handler mHandler = new Handler(); private boolean mBackPressed = false; @Override protected void onCreate(Bundle savedInstances) { super.onCreate(savedInstanc...
ActivityUtils.start(SplashActivity.this, MainActivity.class, R.anim.slide_in_from_right, R.anim.slide_out_to_left);
5
florian-mollin/loto-associatif-app
Loto/src/main/java/com/mollin/loto/gui/main/numberpane/LotoNumberPaneGUI.java
[ "public class AdaptativeText extends Text {\n\n /**\n * Constructeur du texte\n *\n * @param label Le label\n * @param fontSize Le binding correspondant à la taille de la police\n */\n public AdaptativeText(String label, NumberExpression fontSize) {\n super(label);\n Strin...
import com.mollin.loto.gui.main.utils.AdaptativeText; import com.mollin.loto.gui.main.utils.FontSizeCalculator; import com.mollin.loto.gui.utils.Utils; import com.mollin.loto.logic.main.grid.Grid; import com.mollin.loto.logic.main.grid.LotoGridListener; import com.mollin.loto.logic.main.utils.Constants; import javafx.b...
package com.mollin.loto.gui.main.numberpane; /** * Panneau d'affichage du dernier numéro tiré * * @author MOLLIN Florian */ public class LotoNumberPaneGUI extends StackPane implements LotoGridListener { /** * Paramètres du panneau */ private final LotoNumberPaneGUIParameters param; /** ...
public void onUpdate(Grid grid, Integer lastNumber) {
3
iChun/Sync
src/main/java/me/ichun/mods/sync/common/block/BlockDualVertical.java
[ "@Mod(modid = Sync.MOD_ID, name = Sync.MOD_NAME,\n version = Sync.VERSION,\n certificateFingerprint = iChunUtil.CERT_FINGERPRINT,\n guiFactory = iChunUtil.GUI_CONFIG_FACTORY,\n dependencies = \"required-after:ichunutil@[\" + iChunUtil.VERSION_MAJOR + \".2.0,\" + (iChunUtil.VERSION_MAJOR ...
import com.mojang.authlib.GameProfile; import me.ichun.mods.ichunutil.common.core.util.EntityHelper; import me.ichun.mods.ichunutil.common.iChunUtil; import me.ichun.mods.morph.api.MorphApi; import me.ichun.mods.sync.common.Sync; import me.ichun.mods.sync.common.packet.PacketPlayerEnterStorage; import me.ichun.mods.syn...
package me.ichun.mods.sync.common.block; public class BlockDualVertical extends BlockContainer { public static int renderPass; private static final AxisAlignedBB TREADMILL_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.4D, 1.0D); private static final AxisAlignedBB TOP_AABB = new AxisAlignedBB(0.0F, ...
return new TileEntityShellConstructor();
5
de-luxe/burstcoin-observer
src/main/java/burstcoin/observer/service/ATService.java
[ "public class ObserverProperties\n{\n private static final Logger LOG = LoggerFactory.getLogger(ObserverProperties.class);\n private static final String STRING_LIST_PROPERTY_DELIMITER = \",\";\n private static final Properties PROPS = new Properties();\n\n static\n {\n try\n {\n PROPS.load(new FileI...
import burstcoin.observer.ObserverProperties; import burstcoin.observer.bean.CrowdfundBean; import burstcoin.observer.bean.CrowdfundState; import burstcoin.observer.controller.CrowdfundController; import burstcoin.observer.event.CrowdfundUpdateEvent; import burstcoin.observer.service.model.State; import burstcoin.obser...
List<CrowdfundBean> crowdfundBeans = new ArrayList<>(); // different by code?! Map<String, List<AutomatedTransaction>> atByCodeLookup = new HashMap<>(); for(AutomatedTransaction automatedTransaction : atLookup.values()) { if(!atByCodeLookup.containsKey(auto...
AutomatedTransactionIds automatedTransactionIds = objectMapper.readValue(response.getContentAsString(), AutomatedTransactionIds.class);
7
bwssytems/ha-bridge
src/main/java/com/bwssystems/HABridge/HomeManager.java
[ "public interface ResourceHandler {\r\n\tpublic Object getItems(String type);\r\n\tpublic void refresh();\r\n}\r", "public class BroadlinkHome implements Home {\r\n private static final Logger log = LoggerFactory.getLogger(BroadlinkHome.class);\r\n\tprivate Map<String, BLDevice> broadlinkMap;\r\n\tprivate Bool...
import java.util.Collection; import java.util.HashMap; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.bwssystems.HABridge.devicemanagmeent.ResourceHandler; import com.bwssystems.HABridge.plugins.NestBridge.NestHome; import com.bwssystems.HABridge.plugins.broadlink.Broad...
package com.bwssystems.HABridge; public class HomeManager { private static final Logger log = LoggerFactory.getLogger(HomeManager.class); Map<String, Home> homeList; Map<String, Home> resourceList; public HomeManager() { homeList = new HashMap<String, Home>(); resourceList = new HashMap<String...
aHome = new HalHome(bridgeSettings);
2
andrey7mel/android-step-by-step
app/src/main/java/com/andrey7mel/stepbystep/presenter/RepoInfoPresenter.java
[ "public class App extends Application {\n\n private static AppComponent component;\n\n public static AppComponent getComponent() {\n return component;\n }\n\n @Override\n public void onCreate() {\n super.onCreate();\n component = buildComponent();\n }\n\n protected AppCompo...
import android.os.Bundle; import com.andrey7mel.stepbystep.other.App; import com.andrey7mel.stepbystep.presenter.mappers.RepoBranchesMapper; import com.andrey7mel.stepbystep.presenter.mappers.RepoContributorsMapper; import com.andrey7mel.stepbystep.presenter.vo.Branch; import com.andrey7mel.stepbystep.presenter.vo.Cont...
package com.andrey7mel.stepbystep.presenter; public class RepoInfoPresenter extends BasePresenter { private static final String BUNDLE_BRANCHES_KEY = "BUNDLE_BRANCHES_KEY"; private static final String BUNDLE_CONTRIBUTORS_KEY = "BUNDLE_CONTRIBUTORS_KEY"; private static final int COUNT_SUBSCRIPTION = 2...
private Repository repository;
5
evgeniyosipov/facshop
facshop-store/src/main/java/ru/evgeniyosipov/facshop/store/web/CustomerController.java
[ "@Stateless\npublic class UserBean extends AbstractFacade<Customer> {\n\n @PersistenceContext(unitName = \"facshopPU\")\n private EntityManager em;\n\n @Override\n protected EntityManager getEntityManager() {\n return em;\n }\n\n @Override\n public void create(Customer user) {\n G...
import ru.evgeniyosipov.facshop.store.ejb.UserBean; import ru.evgeniyosipov.facshop.entity.Customer; import ru.evgeniyosipov.facshop.entity.Person; import ru.evgeniyosipov.facshop.store.qualifiers.LoggedIn; import ru.evgeniyosipov.facshop.store.web.util.JsfUtil; import ru.evgeniyosipov.facshop.store.web.util.MD5Util; i...
package ru.evgeniyosipov.facshop.store.web; @Named(value = "customerController") @SessionScoped public class CustomerController implements Serializable { private static final String BUNDLE = "bundles.Bundle"; private static final long serialVersionUID = 2081269066939259737L; @Inject @LoggedIn Pe...
private ru.evgeniyosipov.facshop.store.ejb.UserBean ejbFacade;
0
DevotedMC/ExilePearl
src/main/java/com/devotedmc/ExilePearl/command/CmdAdminExileAny.java
[ "public interface ExilePearl {\n\n\t/**\n\t * Gets the pearl item name\n\t * @return The item name\n\t */\n\tString getItemName();\n\n\t/**\n\t * Gets the exiled player ID\n\t * @return The player ID\n\t */\n\tUUID getPlayerId();\n\n\t/**\n\t * Gets the unique pearl ID\n\t * @return The pearl ID\n\t */\n\tint getPe...
import java.util.UUID; import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.block.BlockState; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.InventoryHolder; import com.devotedmc.ExilePearl.ExilePearl; import com.devotedmc.ExilePearl.ExilePearlApi; impo...
package com.devotedmc.ExilePearl.command; public class CmdAdminExileAny extends PearlCommand { public CmdAdminExileAny(ExilePearlApi pearlApi) { super(pearlApi); this.aliases.add("exileany"); this.setHelpShort("Exiles a player."); this.commandArgs.add(requiredPlayerOrUUID("player")); this.commandArgs....
msg(Lang.unknownPlayer);
2
AppHero2/Raffler-Android
app/src/main/java/com/raffler/app/AppSplashActivity.java
[ "public class AlertView {\r\n public enum Style{\r\n ActionSheet,\r\n Alert\r\n }\r\n private final FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(\r\n ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM\r\n );\r\n public s...
import android.content.Intent; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.ActivityCompat...
package com.raffler.app; /** * Created by Ghost on 14/8/2017. */ public class AppSplashActivity extends AppCompatActivity { private static final String TAG = "AppSplashActivity"; private static final long SPLASH_DURATION = 100L;//2000L; private Handler handler; private Runnable runnable; ...
User user = AppManager.getSession();
4
enterprisegeeks/try_java_ee7
try_java_ee7-web/src/main/java/enterprisegeeks/action/ChatRoomAction.java
[ "@Vetoed //CDI対象外\n@Entity\npublic class Chat implements Serializable {\n \n /** id(自動生成) */\n @Id\n @GeneratedValue // ID自動生成 \n private long id;\n \n /** チャットを行ったチャットルーム */\n @ManyToOne // 多対1関連\n private Room room;\n \n /** 発言者 */\n @ManyToOne\n private Account speaker;\n ...
import enterprisegeeks.entity.Chat; import enterprisegeeks.entity.Room; import enterprisegeeks.model.Auth; import enterprisegeeks.model.ChatRoom; import enterprisegeeks.service.ChatNotifier; import enterprisegeeks.service.Service; import java.io.Serializable; import java.sql.Timestamp; import java.util.List; import jav...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package enterprisegeeks.action; /** * */ @Named @ViewScoped //viewScopeは管理Beanのみにしたほうが良い気がする。 public class ChatRoomAction implement...
private ChatRoom chatRoom;
3
roncoo/roncoo-adminlte-springmvc
src/main/java/com/roncoo/adminlte/biz/RoleBiz.java
[ "public class RcPermission implements Serializable {\r\n private Long id;\r\n\r\n private String statusId;\r\n\r\n @JsonFormat(pattern = \"yyyy-MM-dd HH:mm:ss\")\r\n private Date createTime;\r\n\r\n @JsonFormat(pattern = \"yyyy-MM-dd HH:mm:ss\")\r\n private Date updateTime;\r\n\r\n private Stri...
import com.roncoo.adminlte.util.base.Page; import java.util.ArrayList; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import com.roncoo.adminlte.bean.entity.RcPe...
/* * Copyright 2015-2016 RonCoo(http://www.roncoo.com) Group. * * 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 * * U...
Result<List<RcPermission>> resultPermission = permissionService.listForId(idList);
0
otto-de/jlineup
core/src/main/java/de/otto/jlineup/JLineupRunner.java
[ "public class Browser implements AutoCloseable {\n\n private final static Logger LOG = LoggerFactory.getLogger(lookup().lookupClass());\n\n public static final int THREAD_POOL_SUBMIT_SHUFFLE_TIME_IN_MS = 233;\n public static final int DEFAULT_SLEEP_AFTER_SCROLL_MILLIS = 50;\n public static final int DEF...
import de.otto.jlineup.browser.Browser; import de.otto.jlineup.browser.BrowserUtils; import de.otto.jlineup.config.JobConfig; import de.otto.jlineup.config.JobConfigValidator; import de.otto.jlineup.config.Step; import de.otto.jlineup.exceptions.ValidationError; import de.otto.jlineup.file.FileService; import de.otto.j...
package de.otto.jlineup; public class JLineupRunner { private final static Logger LOG = LoggerFactory.getLogger(lookup().lookupClass()); public static final String REPORT_LOG_NAME_KEY = "reportlogname"; public static final String LOGFILE_NAME = "jlineup.log"; private final JobConfig jobConfig; ...
public JLineupRunner(JobConfig jobConfig, RunStepConfig runStepConfig) throws ValidationError {
5
Lzw2016/fastdfs-java-client
src/main/java/org/cleverframe/fastdfs/protocol/storage/request/UploadSlaveFileRequest.java
[ "public final class CmdConstants {\n /**\n * 客户端关闭连接命令\n */\n public static final byte FDFS_PROTO_CMD_QUIT = 82;\n /**\n * 连接状态检查命令\n */\n public static final byte FDFS_PROTO_CMD_ACTIVE_TEST = 111;\n /**\n * 服务端正确返回报文状态\n */\n public static final byte FDFS_PROTO_CMD_RESP = ...
import org.cleverframe.fastdfs.constant.CmdConstants; import org.cleverframe.fastdfs.constant.OtherConstants; import org.cleverframe.fastdfs.protocol.BaseRequest; import org.cleverframe.fastdfs.protocol.ProtocolHead; import org.cleverframe.fastdfs.mapper.DynamicFieldType; import org.cleverframe.fastdfs.mapper.FastDFSCo...
package org.cleverframe.fastdfs.protocol.storage.request; /** * 从文件上传命令 * 作者:LiZW <br/> * 创建时间:2016/11/20 19:09 <br/> */ public class UploadSlaveFileRequest extends BaseRequest { /** * 主文件名长度 */ @FastDFSColumn(index = 0) private long masterFileNameSize; /** * 发送文件长度 */ @F...
@FastDFSColumn(index = 4, dynamicField = DynamicFieldType.allRestByte)
4
pgroth/hbase-rdf
src/main/java/nl/vu/datalayer/hbase/HBaseFactory.java
[ "public abstract class HBaseConnection {\n\n\tpublic static final byte NATIVE_JAVA = 0;\n\tpublic static final byte REST = 1;\n\t\n\tpublic static HBaseConnection create(byte connectionType) throws IOException{\n\t\tswitch (connectionType){\n\t\tcase NATIVE_JAVA: {\t\n\t\t\treturn new NativeJavaConnection();\n\t\t}...
import java.io.FileInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Properties; import nl.vu.datalayer.hbase.connection.HBaseConnection; import nl.vu.datalayer.hbase.operations.HBHexastoreOperationManager; import nl.vu.datalayer.hbase.operations.HBPrefixMatchOperationManager; ...
package nl.vu.datalayer.hbase; public class HBaseFactory { public static HBaseClientSolution getHBaseSolution(String schemaName, HBaseConnection con, ArrayList<Statement> statements) { if (schemaName.equals(HBasePredicateCFSchema.SCHEMA_NAME)){ HBasePredicateCFSchema schema = new HBasePredi...
new HBasePredicateCFOperationManager(con, schema));
3
julianctni/mensaDD
app/src/main/java/com/pasta/mensadd/fragments/MealWeekFragment.java
[ "public class Utils {\n\n public static ScaleAnimation getFavoriteScaleOutAnimation(final View view) {\n final ScaleAnimation scaleOut = new ScaleAnimation(0.0f, 1.3f, 0.0f, 1.3f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);\n final ScaleAnimation scaleIn = new ScaleAnimatio...
import android.graphics.Color; import android.graphics.PorterDuff; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentPagerAdapter; import androidx.viewpager.widget.PagerTabStrip; import ...
package com.pasta.mensadd.fragments; public class MealWeekFragment extends Fragment implements LoadMealsCallback { private static final String TAG_MENSA_ID = "mensaId"; private static final int PAGE_COUNT = 5; private String mMensaId; private Canteen mCanteen; private MealDayPagerAdapter mPag...
NetworkController.getInstance(getContext()).fetchMeals(mCanteen.getCode(), this);
7
idega/is.idega.idegaweb.egov.course
src/java/is/idega/idegaweb/egov/course/presentation/CourseWaitingList.java
[ "public class CourseConstants {\n\n\tpublic static final String CASE_CODE_KEY = \"COURSEA\";\n\n\tpublic static final String IW_BUNDLE_IDENTIFIER = \"is.idega.idegaweb.egov.course\";\n\n\tpublic static final String ADMINISTRATOR_ROLE_KEY = \"afterSchoolCareAdministrator\";\n\tpublic static final String SUPER_ADMINI...
import is.idega.idegaweb.egov.course.CourseConstants; import is.idega.idegaweb.egov.course.business.CourseParticipantsWriter; import is.idega.idegaweb.egov.course.data.Course; import is.idega.idegaweb.egov.course.data.CourseChoice; import is.idega.idegaweb.egov.course.data.CourseType; import java.rmi.RemoteException; i...
/* * $Id: CourseWaitingList.java,v 1.6 2009/05/25 14:58:07 laddi Exp $ Created on Mar 28, 2007 * * Copyright (C) 2007 Idega Software hf. All Rights Reserved. * * This software is the proprietary information of Idega hf. Use is subject to license terms. */ package is.idega.idegaweb.egov.course.presentation; ...
boolean showAllCourses = iwc.getApplicationSettings().getBoolean(CourseConstants.PROPERTY_SHOW_ALL_COURSES, false);
0
Fedict/commons-eid
commons-eid-tests/src/test/java/be/bosa/commons/eid/client/tests/integration/BeIDCardsTest.java
[ "public class BeIDCard implements AutoCloseable {\n\n\tprivate static final String UI_MISSING_LOG_MESSAGE = \"No BeIDCardUI set and can't load DefaultBeIDCardUI\";\n\tprivate static final String UI_DEFAULT_REQUIRES_HEAD = \"No BeIDCardUI set and DefaultBeIDCardUI requires a graphical environment\";\n\tprivate stati...
import be.bosa.commons.eid.client.BeIDCard; import be.bosa.commons.eid.client.BeIDCards; import be.bosa.commons.eid.client.CancelledException; import be.bosa.commons.eid.client.FileType; import be.bosa.commons.eid.consumer.Identity; import be.bosa.commons.eid.consumer.tlv.TlvParser; import org.junit.Test; import static...
/* * Commons eID Project. * Copyright (C) 2014 - 2018 BOSA. * * This is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License version 3.0 as published by * the Free Software Foundation. * * This software is distributed in the hope that it will be usef...
byte[] identityFile = beIDCard.readFile(FileType.Identity);
4
wesabe/grendel
src/main/java/com/wesabe/grendel/resources/LinksResource.java
[ "public class Credentials {\n\t/**\n\t * An authentication challenge {@link Response}. Use this when a client's\n\t * provided credentials are invalid.\n\t */\n\tpublic static final Response CHALLENGE =\n\t\tResponse.status(Status.UNAUTHORIZED)\n\t\t\t.header(HttpHeaders.WWW_AUTHENTICATE, \"Basic realm=\\\"Grendel\...
import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; import javax.ws.rs.core.Response.Status; import com.google.inject.I...
package com.wesabe.grendel.resources; /** * A class which exposes a list of {@link User}s linked to a particular * {@link Document} as a resource. * * @author coda */ @Path("/users/{user_id}/documents/{name}/links/") @Produces(MediaType.APPLICATION_JSON) public class LinksResource { private final UserDAO user...
final Document doc = documentDAO.findByOwnerAndName(session.getUser(), documentName);
2
pangliang/MirServer-Netty
GameServer/src/main/java/com/zhaoxiaodan/mirserver/gameserver/objects/Merchant.java
[ "@Entity\npublic class Player extends AnimalObject {\n\n\tprivate static final Logger logger = LogManager.getLogger();\n\n\tpublic static final String SCRIPT_NAME = \"PlayerScript\";\n\n\tstatic {\n\t\ttry {\n\t\t\tScriptEngine.loadScript(SCRIPT_NAME);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}...
import com.zhaoxiaodan.mirserver.gameserver.entities.Player; import com.zhaoxiaodan.mirserver.gameserver.types.Race; import com.zhaoxiaodan.mirserver.gameserver.GameServerPackets; import com.zhaoxiaodan.mirserver.network.Protocol; import com.zhaoxiaodan.mirserver.network.packets.ServerPacket; import com.zhaoxiaodan.mir...
package com.zhaoxiaodan.mirserver.gameserver.objects; public class Merchant extends AnimalObject { public String scriptName; public String name; public int looks = 12; public Merchant() { this.hp = Integer.MAX_VALUE; } @Override public String getName() { return name; } @Override public int getPower(...
player.session.sendPacket(new GameServerPackets.MerchantSay(this.inGameId, msg, this.getName()));
2
kaklakariada/portmapper
src/main/java/org/chris/portmapper/router/weupnp/WeUPnPRouter.java
[ "public class PortMapping {\n\n public static final String MAPPING_ENTRY_LEASE_DURATION = \"NewLeaseDuration\";\n public static final String MAPPING_ENTRY_ENABLED = \"NewEnabled\";\n public static final String MAPPING_ENTRY_REMOTE_HOST = \"NewRemoteHost\";\n public static final String MAPPING_ENTRY_INTE...
import org.bitlet.weupnp.PortMappingEntry; import org.chris.portmapper.model.PortMapping; import org.chris.portmapper.model.Protocol; import org.chris.portmapper.router.AbstractRouter; import org.chris.portmapper.router.IRouter; import org.chris.portmapper.router.RouterException; import org.slf4j.Logger; import org.slf...
/** * UPnP PortMapper - A tool for managing port forwardings via UPnP * Copyright (C) 2015 Christoph Pirkl <christoph at users.sourceforge.net> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Founda...
final Protocol protocol = entry.getProtocol().equalsIgnoreCase("TCP") ? Protocol.TCP : Protocol.UDP;
1
tassioauad/GameCheck
app/src/main/java/com/tassioauad/gamecheck/view/activity/SearchPlatformActivity.java
[ "public class GameCatalogApplication extends Application {\n\n private ObjectGraph objectGraph;\n\n @Override\n public void onCreate() {\n super.onCreate();\n\n objectGraph = ObjectGraph.create(\n new Object[]{\n new AppModule(GameCatalogApplication.this)...
import android.app.SearchManager; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.os.Parcelable; import android.support.v4.view.MenuItemCompat; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.DefaultItemAnimator; import android.su...
package com.tassioauad.gamecheck.view.activity; public class SearchPlatformActivity extends AppCompatActivity implements SearchPlatformView { @Inject SearchPlatformPresenter presenter; private final int numberOfColumns = 2; private List<Platform> platformList; private String name; private...
((GameCatalogApplication) getApplication()).getObjectGraph().plus(new SearchPlatformViewModule(this)).inject(this);
0
jacobhyphenated/PokerServer
src/main/java/com/hyphenated/card/controller/PlayerController.java
[ "@Entity\n@Table(name=\"game\")\npublic class Game implements Serializable {\n\n\tprivate static final long serialVersionUID = -495064662454346171L;\n\tprivate long id;\n\tprivate int playersRemaining;\n\tprivate Player playerInBTN;\n\tprivate GameType gameType;\n\tprivate String name;\n\tprivate boolean isStarted;...
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import com.hyphenated.card.domain.Game; import com.hyphenated.card.domain.Player; ...
/* The MIT License (MIT) Copyright (c) 2013 Jacob Kanipe-Illig Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, m...
private PlayerActionService playerActionService;
4
shillner/unleash-maven-plugin
plugin/src/main/java/com/itemis/maven/plugins/unleash/steps/actions/CalculateVersions.java
[ "public class ArtifactCoordinates {\n private String groupId;\n private String artifactId;\n private String version;\n private String type;\n private String classifier;\n\n public ArtifactCoordinates(String groupId, String artifactId, String version) {\n this(groupId, artifactId, version, null, null);\n }...
import java.util.List; import javax.inject.Inject; import javax.inject.Named; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.project.MavenProject; import org.apache.maven.settings.Settings; import org.codehaus.plexus.components.interac...
package com.itemis.maven.plugins.unleash.steps.actions; /** * Calculates the versions for all modules of the project used during the release build.<br> * This step applies several strategies for version calculation such as prompting the user or checking globally defined * versions. * * @author <a href="mailto...
private ReleaseMetadata metadata;
1
codebling/VFSJFileChooser2
src/net/sf/vfsjfilechooser/accessories/DefaultAccessoriesPanel.java
[ "@SuppressWarnings(\"serial\")\r\npublic class VFSJFileChooser extends JComponent implements Accessible\r\n{\r\n private static final Frame SHARED_FRAME = new Frame();\r\n private static final FileObject[] EMPTY_FILEOBJECT_ARRAY = new FileObject[]{};\r\n\r\n // ******************************\r\n // ****...
import net.sf.vfsjfilechooser.VFSJFileChooser; import net.sf.vfsjfilechooser.accessories.bookmarks.BookmarksDialog; import net.sf.vfsjfilechooser.accessories.connection.ConnectionDialog; import net.sf.vfsjfilechooser.utils.SwingCommonsUtilities; import net.sf.vfsjfilechooser.utils.VFSResources; import org.apache.c...
/* * * Copyright (C) 2008-2009 Yves Zoundi * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
private ConnectionDialog connectionDialog;
2
cestella/streaming_outliers
core/src/test/java/com/caseystella/analytics/outlier/streaming/mad/OutlierRunner.java
[ "public class DataPoint {\n private long timestamp;\n private double value;\n private Map<String, String> metadata;\n private String source;\n\n public DataPoint() {\n\n }\n\n public DataPoint(long timestamp, double value, Map<String, String> metadata, String source) {\n this.timestamp =...
import com.caseystella.analytics.DataPoint; import com.caseystella.analytics.extractor.Extractor; import com.caseystella.analytics.outlier.Outlier; import com.caseystella.analytics.extractor.DataPointExtractor; import com.caseystella.analytics.extractor.DataPointExtractorConfig; import com.caseystella.analytics.outlier...
package com.caseystella.analytics.outlier.streaming.mad; public class OutlierRunner { OutlierConfig config;
Extractor extractor;
1
koterpillar/android-sasl
classpath-0.98/gnu/javax/crypto/sasl/ServerFactory.java
[ "public class AnonymousServer\n extends ServerMechanism\n implements SaslServer\n{\n public AnonymousServer()\n {\n super(Registry.SASL_ANONYMOUS_MECHANISM);\n }\n\n protected void initMechanism() throws SaslException\n {\n }\n\n protected void resetMechanism() throws SaslException\n {\n }\n\n pu...
import gnu.java.security.Registry; import gnu.javax.crypto.sasl.anonymous.AnonymousServer; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import javax.security.auth....
/* ServerFactory.java -- Copyright (C) 2003, 2006 Free Software Foundation, Inc. Modified for Android (C) 2009, 2010 by Alexey Kotlyarov This file is a part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published ...
return new AnonymousServer();
0
Darkona/AdventureBackpack2
src/main/java/com/darkona/adventurebackpack/block/BlockAdventureBackpack.java
[ "@Mod(modid = ModInfo.MOD_ID,\n name = ModInfo.MOD_NAME,\n version = ModInfo.MOD_VERSION,\n guiFactory = ModInfo.GUI_FACTORY_CLASS\n)\npublic class AdventureBackpack\n{\n\n @SidedProxy(clientSide = ModInfo.MOD_CLIENT_PROXY, serverSide = ModInfo.MOD_SERVER_PROXY)\n public static IProxy pro...
import com.darkona.adventurebackpack.AdventureBackpack; import com.darkona.adventurebackpack.client.Icons; import com.darkona.adventurebackpack.handlers.GuiHandler; import com.darkona.adventurebackpack.init.ModItems; import com.darkona.adventurebackpack.reference.BackpackNames; import com.darkona.adventurebackpack.refe...
} private String getAssociatedTileColorName(IBlockAccess world, int x, int y, int z) { return ((TileAdventureBackpack) world.getTileEntity(x, y, z)).getColorName(); } @Override public boolean canRenderInPass(int pass) { return true; } @Override public boolean ca...
Icons.milkStill = iconRegister.registerIcon(ModInfo.MOD_ID + ":fluid.milk");
3
ThomasDaheim/ownNoteEditor
ownNoteEditor/src/main/java/tf/ownnote/ui/notes/NoteMetaData.java
[ "public class CommentDataMapper {\n private final static CommentDataMapper INSTANCE = new CommentDataMapper();\n \n private static final String COMMENT_STRING_PREFIX = \"<!-- \";\n private static final String COMMENT_STRING_SUFFIX = \" -->\";\n public static final String COMMENT_DATA_SEP = \"---\";\n...
import java.io.File; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; import java.util.stream.Collectors; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBoolean...
/* * Copyright (c) 2014ff Thomas Feuster * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and...
private final ObservableSet<TagData> myTags = FXCollections.<TagData>observableSet();
5
ericleong/forceengine
Force Engine/src/forceengine/demo/objects/Gel.java
[ "public interface Colored {\n\tpublic Color getColor();\n}", "public class CircleMath {\n\t/**\n\t * checks whether or not 2 circles have collided with each other\n\t * \n\t * @param circle1\n\t * the first circle\n\t * @param circle2\n\t * the second circle\n\t * @return whether or not they...
import java.awt.Color; import forceengine.graphics.Colored; import forceengine.math.CircleMath; import forceengine.objects.Circle; import forceengine.objects.ForceCircle; import forceengine.objects.Point; import forceengine.objects.PointVector; import forceengine.objects.RectVector; import forceengine.objects.Vector;
package forceengine.demo.objects; public class Gel extends ForceCircle implements Colored { public static final Color color = new Color(26, 141, 240, 100); public Gel(double x, double y, double vx, double vy, double radius, double mass, double restitution) { super(x, y, vx, vy, radius, mass, restitution); ...
Vector r = new RectVector(x - c.getX(), y - c.getY());
6
CMPUT301F16T01/Carrier
app/src/main/java/comcmput301f16t01/github/carrier/Requests/MakeRequestActivity.java
[ "public class CarrierLocation extends Location {\n private String address;\n private String shortAddress;\n\n public CarrierLocation() {\n // get current location\n super(\"\");\n }\n\n public CarrierLocation(double latitude, double longitude) {\n super(\"\");\n this.setLa...
import android.app.Activity; import android.content.DialogInterface; import android.content.Intent; import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.MotionEvent; import android.view.View; import android.view.WindowManager; import a...
package comcmput301f16t01.github.carrier.Requests; /** * <p>MakeRequestActivity is where the user can request a trip. It begins by passing the user to select * their start and end locations on map and then returns here to get further information about the * fare and a description, finally allowing them to submit...
Intent intent = new Intent(MakeRequestActivity.this, SetLocationsActivity.class);
3
kraftek/awsdownload
src/main/java/ro/cs/products/landsat/LandsatAWSSearch.java
[ "public abstract class ProductDownloader<T extends ProductDescriptor> {\n private static final String startMessage = \"(%s,%s) %s [size: %skB]\";\n private static final String completeMessage = \"(%s,%s) %s [elapsed: %ss]\";\n private static final String errorMessage =\"Cannot download %s: %s\";\n priva...
import ro.cs.products.ProductDownloader; import ro.cs.products.base.AbstractSearch; import ro.cs.products.base.ProductDescriptor; import ro.cs.products.sentinel2.amazon.Result; import ro.cs.products.sentinel2.amazon.ResultParser; import ro.cs.products.util.Constants; import ro.cs.products.util.Logger; import ro.cs.prod...
/* * 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 ...
Result productResult = ResultParser.parse(NetUtils.getResponseAsString(tileUrl));
3
JavaWoW/JavaWoW
src/main/java/com/github/javawow/realm/handler/RealmVerifyHandler.java
[ "public interface SeekableLittleEndianAccessor extends LittleEndianAccessor {\n\tvoid seek(int offset);\n\tint getPosition();\n}", "public class LittleEndianWriterStream extends GenericLittleEndianWriter {\n\tprivate int opcode;\n\tprivate ByteArrayOutputStream baos;\n\n\tpublic LittleEndianWriterStream(int opcod...
import org.slf4j.LoggerFactory; import com.github.javawow.data.input.SeekableLittleEndianAccessor; import com.github.javawow.data.output.LittleEndianWriterStream; import com.github.javawow.realm.RealmDecoder; import com.github.javawow.realm.RealmEncoder; import com.github.javawow.tools.CryptoUtil; import com.github.jav...
/* * Java World of Warcraft Emulation Project * Copyright (C) 2015-2020 JavaWoW * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your op...
Cipher clientDecryptCipher = CryptoUtil.createRC4Cipher(false, K);
4
IHTSDO/snomed-utilities
src/main/java/org/ihtsdo/snomed/util/mrcm/MrcmBuilder.java
[ "public class Concept implements Comparable<Concept>, RF2SchemaConstants {\n\n\tprivate static Map<Long, Concept> allStatedConcepts = new HashMap<Long, Concept>();\n\tprivate static Map<Long, Concept> allInferredConcepts = new HashMap<Long, Concept>();\n\tprivate static Map<Long, Boolean> fullyDefinedMap = new Hash...
import java.io.UnsupportedEncodingException; import java.text.DecimalFormat; import java.util.Arrays; import java.util.Collection; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeSet; import org.apac...
package org.ihtsdo.snomed.util.mrcm; public class MrcmBuilder implements SnomedConstants { private static String INDENT_0 = ""; private static String INDENT_1 = "\t"; private static int MAX_MATCH_RELAXATION = 3; private static enum CROSSOVER_STATUS { NOT_CROSSOVER, TYPE_CROSSOVER, DESTINATION_CROSSOVER }; ...
Description.getFormattedConcept(c.getSctId()), characteristicType);
1
rjmarsan/Pixelesque
src/com/rj/pixelesque/PixelArtEditor.java
[ "public class Bucket extends SuperShape {\n\tPixelArtEditor p;\n\tpublic Bucket(PixelArtEditor p, PixelArt art, Cursor c, int color, boolean fill) {\n\t\tsuper(p, art,c, color, fill);\n\t\tthis.p = p;\n\t\tthis.highlightCursorStart=false;\n\t}\n\n\tpublic void updatePointArea() {\n\t\tif (thread != null) thread.kee...
import java.io.File; import processing.core.PApplet; import android.app.Dialog; import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.graphics.Bitmap; import android.graphics.Colo...
lastx = detector.getFocusX(); lasty = detector.getFocusY(); scheduleRedraw(); return true; } @Override public boolean onScaleBegin(ScaleGestureDetector detector) { avgx = 0; avgy = 0; lastx = detector.getFocusX(); lasty = d...
public Shape makeShape(PApplet p, PixelArt pix, Cursor cursor) {
6
DiatomStudio/SketchChair
src/cc/sketchchair/sketch/main.java
[ "public class GLOBAL {\n\n\tpublic static boolean useMaskedUpdating = false;\n\n\tstatic SketchProperties sketchProperties = new SketchProperties();\n\t\n\tpublic static double CAM_OFFSET_X = 300;\n\tpublic static double CAM_OFFSET_Y = -900;\n\tpublic static int windowWidth;\n\tpublic static int windowHeight;\n\tpu...
import cc.sketchchair.core.GLOBAL; import cc.sketchchair.core.UITools; import ModalGUI.GUIComponentSet; import ModalGUI.GUILabel; import ModalGUI.GUIPanel; import ModalGUI.GUIPanelTabbed; import ModalGUI.GUIToggle; import ModalGUI.ModalGUI; import processing.core.PApplet; import java.awt.event.MouseEvent; import java.a...
/******************************************************************************* * This is part of SketchChair, an open-source tool for designing your own furniture. * www.sketchchair.cc * * Copyright (C) 2012, Diatom Studio ltd. Contact: hello@diatom.cc * * This program is free software: you c...
public ModalGUI gui;
7
OpenJunction/JavaJunction
src/main/java/edu/stanford/junction/provider/xmpp/JunctionProvider.java
[ "public abstract class Junction {\n\tprotected JunctionActor mOwner;\n\tpublic static String NS_JX = \"jx\";\n\t\n\t/**\n\t * Required constructors\n\t */\n\tpublic Junction() {}\n\t\n\t\n\t/** \n\t * Activity Description\n\t */\n\t\n\tpublic abstract ActivityScript getActivityScript();\n\t\n\tpublic abstract URI g...
import java.net.URI; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.UUID; import java.util.Date; import java.io.IOException; import java.net.UnknownHostExce...
/* * Copyright (C) 2010 Stanford University * * 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 ...
= getXMPPConnection(mConfig,JunctionMaker.getSessionIDFromURI(invitation));
1
TheCount/jhilbert
src/main/java/jhilbert/expressions/impl/AnonymiserImpl.java
[ "public interface DVConstraints extends Iterable<Variable[]>, Serializable {\n\n\t/**\n\t * Adds the specified variables to these <code>DVConstraints</code>\n\t * by adding each non-diagonal pair.\n\t *\n\t * @param vars variables to be added.\n\t *\n\t * @throws DataException if the same variable appears twice in ...
import jhilbert.data.DVConstraints; import jhilbert.data.DataException; import jhilbert.data.DataFactory; import jhilbert.data.Term; import jhilbert.data.Variable; import jhilbert.expressions.Anonymiser; import jhilbert.expressions.Expression; import org.apache.log4j.Logger; import java.util.Collections; import java.ut...
/* JHilbert, a verifier for collaborative theorem proving Copyright © 2008, 2009, 2011 The JHilbert Authors See the AUTHORS file for the list of JHilbert authors. See the commit logs ("git log") for a list of individual contributions. This program is free software: you can redistribute it and/...
public Expression anonymise(final Expression expr) {
6
spgroup/groundhog
src/java/main/br/ufpe/cin/groundhog/search/SearchGoogleCode.java
[ "@Entity(\"issues\")\npublic class Issue extends GitHubEntity {\n @Indexed(unique=true, dropDups=true)\n @SerializedName(\"id\")\n\t@Id private int id;\n\n\t@SerializedName(\"number\")\n\tprivate int number;\n\n\t@SerializedName(\"comments\")\n\tprivate int commentsCount;\n\n\t@Reference private Project proje...
import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Future; import javax.inject.Inject; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import br.ufpe.cin.groundhog.Issue; import br.ufpe.cin...
package br.ufpe.cin.groundhog.search; /** * Responsible for performing the project searches on Google Code * @author fjsj, gustavopinto, Rodrigo Alves * @deprecated */ public class SearchGoogleCode implements ForgeSearch { private static String root = "http://code.google.com"; private final Requests request...
private void setCheckoutCommandToProject(String command, Project project) {
1
MHAVLOVICK/Sketchy
src/main/java/com/sketchy/server/action/GetImageFiles.java
[ "public abstract class ImageAttributes {\n\t\n\tpublic static final String DATA_FILE_EXTENSION = \".dat\";\n\tpublic static final String IMAGE_FILE_EXTENSION = \".png\";\n\t\n\tpublic static String getDataFilename(String imageName) {\n\t\treturn imageName + DATA_FILE_EXTENSION;\n\t}\n\n\tpublic static String getIma...
import java.io.File; import java.io.FilenameFilter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.apache.commons.io.FileUtils; import org.apache.commons.lan...
/* Sketchy Copyright (C) 2015 Matthew Havlovick http://www.quickdrawbot.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your op...
public JSONServletResult execute(HttpServletRequest request) throws Exception {
3
CvvT/DexTamper
src/org/jf/dexlib2/analysis/ClassProto.java
[ "public class TypeProtoUtils {\n /**\n * Get the chain of superclasses of the given class. The first element will be the immediate superclass followed by\n * it's superclass, etc. up to java.lang.Object.\n *\n * Returns an empty iterable if called on java.lang.Object or a primitive.\n *\n ...
import com.google.common.base.Predicates; import com.google.common.base.Supplier; import com.google.common.base.Suppliers; import com.google.common.collect.FluentIterable; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common....
public String getSuperclass() { return getClassDef().getSuperclass(); } /** * This is a helper method for getCommonSuperclass * * It checks if this class is an interface, and if so, if other implements it. * * If this class is undefined, we go ahead and check if it is liste...
public Method getMethodByVtableIndex(int vtableIndex) {
3
heremaps/here-aaa-java-sdk
here-oauth-client/src/test/java/com/here/account/http/java/JavaHttpProviderTest.java
[ "public class NoAuthorizer implements HttpProvider.HttpRequestAuthorizer {\n\n /**\n * Does nothing, as no Authorization header is required when using \n * instances of this class.\n * \n * <p>\n * {@inheritDoc}\n */\n @Override\n public void authorize(HttpRequest httpRequest, Strin...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.Unsupported...
/* * Copyright (c) 2016 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
byte[] expectedBody = "foo=bar".getBytes(JsonSerializer.CHARSET);
8
annefried/sitent
de.uni-saarland.coli.sitent/src/main/java/sitent/io/CorpusToCsvWriterAnnotator.java
[ "public class Segment extends ClassificationAnnotation {\n /** @generated\n * @ordered \n */\n @SuppressWarnings (\"hiding\")\n public final static int typeIndexID = JCasRegistry.register(Segment.class);\n /** @generated\n * @ordered \n */\n @SuppressWarnings (\"hiding\")\n public final static int typ...
import static org.apache.uima.fit.factory.CollectionReaderFactory.createReader; import static org.apache.uima.fit.pipeline.SimplePipeline.runPipeline; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.Collection; import java.u...
package sitent.io; /** * Writes situation entity types corpus to XML format: assumes Segments, finds * situations and writes this info to a readable XML format. TODO: create * similar format with standoff annotations where situation entities are * indicated only by the verbs in the text. * * @author afried ...
for (Annotation annot : SitEntUimaUtils.getList(segment.getTokens())) {
4
stykiaz/we3c_tracker
app/controllers/Heatmaps.java
[ "@MongoCollection(name = \"recorded_location\")\npublic class RecordedLocation {\n\n\tpublic static JacksonDBCollection<RecordedLocation.Model, String> coll = MongoDB.getCollection(\"recorded_location\", RecordedLocation.Model.class, String.class);\n\t\n\tpublic static class Model {\n\t\n\t\t@ObjectId\n\t\t@Id\n\t\...
import java.awt.Point; import java.awt.Rectangle; import java.awt.geom.GeneralPath; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.ArrayLi...
package controllers; @Security.Authenticated(AdminSecurity.class) public class Heatmaps extends Controller { public static class HeatMapRequest { public int multiplier; public Long start_date; public Long end_date; public HeatMapRequest() { multiplier = 100; } } //http://www.intuit.com/websit...
TrackSession.Model session = TrackSession.coll.findOneById( location.sessionId );
1
appfoundry/android-nfc-lib
nfclib/src/main/java/be/appfoundry/nfclibrary/utilities/async/WriteSmsNfcAsync.java
[ "public class InsufficientCapacityException extends Exception {\n\n public InsufficientCapacityException() {\n }\n\n public InsufficientCapacityException(String message) {\n super(message);\n }\n\n public InsufficientCapacityException(StackTraceElement[] stackTraceElements) {\n setStack...
import be.appfoundry.nfclibrary.tasks.interfaces.AsyncOperationCallback; import be.appfoundry.nfclibrary.tasks.interfaces.AsyncUiCallback; import be.appfoundry.nfclibrary.utilities.interfaces.NfcWriteUtility; import android.content.Intent; import android.nfc.FormatException; import org.jetbrains.annotations.NotNull; im...
/* * WriteSmsNfcAsync.java * NfcLibrary project. * * Created by : Daneo van Overloop - 17/6/2014. * * The MIT License (MIT) * * Copyright (c) 2014 AppFoundry. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation ...
public boolean performWrite(NfcWriteUtility writeUtility) throws ReadOnlyTagException, InsufficientCapacityException, TagNotPresentException, FormatException {
1
jhy/jsoup
src/main/java/org/jsoup/nodes/Entities.java
[ "public final class StringUtil {\n // memoised padding up to 21 (blocks 0 to 20 spaces)\n static final String[] padding = {\"\", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \",\n \" \", \" \", \" \", \" \", \" \", \" ...
import org.jsoup.SerializationException; import org.jsoup.internal.StringUtil; import org.jsoup.helper.Validate; import org.jsoup.nodes.Document.OutputSettings; import org.jsoup.parser.CharacterReader; import org.jsoup.parser.Parser; import java.io.IOException; import java.nio.charset.CharsetEncoder; import java.util.A...
if (c < 0x20 || !canEncode(coreCharset, c, encoder)) appendEncoded(accum, escapeMode, codePoint); else accum.append(c); } } else { final String c = new String(Character.toC...
Validate.isTrue(i == size, "Unexpected count of entities loaded");
1
dotcool/coolreader
src/com/dotcool/reader/task/AddNovelTask.java
[ "public class CallbackEventData implements ICallbackEventData {\n\tprotected String message;\n\tprotected String source;\n\n\tpublic CallbackEventData() {};\n\n\tpublic CallbackEventData(String message) {\n\t\tthis.message = message;\n\t}\n\n\tpublic CallbackEventData(String message, String source) {\n\t\tthis.mess...
import android.content.Context; import android.os.AsyncTask; import android.util.Log; import com.dotcool.R; import com.dotcool.reader.callback.CallbackEventData; import com.dotcool.reader.callback.ICallbackEventData; import com.dotcool.reader.callback.ICallbackNotifier; import com.dotcool.reader.dao.NovelsDao; import c...
package com.dotcool.reader.task; public class AddNovelTask extends AsyncTask<PageModel, ICallbackEventData, AsyncTaskResult<NovelCollectionModel>> implements ICallbackNotifier { public volatile IAsyncTaskOwner owner; public AddNovelTask(IAsyncTaskOwner displayLightNovelListActivity) { this.owner = displayLightN...
publishProgress(new CallbackEventData(ctx.getResources().getString(R.string.add_novel_task_check, page.getPage())));
0
lkorth/auto-fi
app/src/main/java/com/lukekorth/auto_fi/receivers/WifiConnectionReceiver.java
[ "public class MainActivity extends AppCompatActivity {\n\n private static final int START_VPN = 1;\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n if (!hasCompletedIntro()) {\n startActivity(new Intent(this, AppIntroAct...
import android.app.Notification; import android.app.NotificationManager; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.net.wifi.WifiConfiguration; import android.net.wifi.WifiManager; import com.lukekorth.auto_fi.MainActivity; import com.lukekort...
package com.lukekorth.auto_fi.receivers; public class WifiConnectionReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { if (!"android.net.wifi.STATE_CHANGE".equals(intent.getAction())) { return; }
WifiHelper wifiHelper = new WifiHelper(context);
8