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
sqrlserverjava/sqrl-server-base
src/main/java/com/github/sqrlserverjava/backchannel/nut/SqrlNutToken1SingleBlockFormat.java
[ "@XmlRootElement\npublic class SqrlConfig {\n\t// @formatter:off\n\t/* *********************************************************************************************/\n\t/* *************************************** REQUIRED ********************************************/\n\t/* *******************************************...
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.net.Inet4Address; import java.net.Inet6Address; import java.net.InetAddress; import java.net.UnknownHostException; import java.security.Gene...
package com.github.sqrlserverjava.backchannel.nut; /** * "Nut" token format matching the size (but not the data layout) of the format suggested by the SQRL spec. This is not * the preferred format but is retained in case clients have issues processing our preferred format, which is larger in * size * * This ...
public Optional<String> compareSqrlClientInetAddress(final InetAddress requesterIpAddress, final SqrlConfig config)
0
BoD/irondad
src/main/java/org/jraf/irondad/handler/opengraph/OpengraphHandler.java
[ "public class Constants {\n public static final String TAG = \"irondad/\";\n\n public static final String PROJECT_FULL_NAME = \"BoD irondad\";\n public static final String PROJECT_URL = \"https://github.com/BoD/irondad\";\n public static final String VERSION_NAME = \"v1.11.1\"; // xxx When updating this...
import java.util.regex.Pattern; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.select.Elements; import com.github.kevinsawicki.http.HttpRequest; import com.github.kevinsawicki.http.HttpRequest.HttpRequestException; import org.jraf.irondad.Constants; import org.jraf.irondad.handler.BaseHandler...
/* * This source is part of the * _____ ___ ____ * __ / / _ \/ _ | / __/___ _______ _ * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / * /___/ * repository. * * Copyright (C) 2013 Benoit 'BoD' Lubek (BoD@JRAF.org) * * This library is free sof...
Log.i(TAG, url);
6
ghjansen/cas
cas-control/src/main/java/com/ghjansen/cas/control/task/CompleteTask.java
[ "public abstract class SimulationController<I extends Simulation, M extends SimulationBuilder> {\n\n private final I simulation;\n private final ExecutorService executor;\n private final Task completeTask;\n private final Task iterationTask;\n private final Task unitTask;\n private final TaskNotif...
import com.ghjansen.cas.control.simulation.SimulationController; import com.ghjansen.cas.core.exception.InvalidCombinationException; import com.ghjansen.cas.core.exception.InvalidStateException; import com.ghjansen.cas.core.exception.InvalidTransitionException; import com.ghjansen.cas.core.exception.TimeLimitReachedExc...
/* * CAS - Cellular Automata Simulator * Copyright (C) 2016 Guilherme Humberto Jansen * * 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 y...
} catch (InvalidTransitionException e) {
3
blubin/JOpt
src/test/java/edu/harvard/econcs/jopt/LPSolveTest.java
[ "public interface IMIP extends Serializable {\n\n\n\t// Variables\n\t////////////\n\t/**\n\t * @return a Map from Strings to Variables.\n\t */\n\tMap<String,Variable> getVars();\n\n /**\n * @return whether the mip contains the variable.\n */\n boolean containsVar(Variable var);\n\n /**\n * @ret...
import edu.harvard.econcs.jopt.solver.IMIP; import edu.harvard.econcs.jopt.solver.IMIPResult; import edu.harvard.econcs.jopt.solver.MIPException; import edu.harvard.econcs.jopt.solver.SolveParam; import edu.harvard.econcs.jopt.solver.client.SolverClient; import edu.harvard.econcs.jopt.solver.server.cplex.CPlexMIPSolver...
package edu.harvard.econcs.jopt; /** * @author Fabio Isler */ public class LPSolveTest { private static final Logger logger = LogManager.getLogger(LPSolveTest.class); @Test public void compareResultsToCplex() { IMIP mip = TestSuite.provideTrivialExample();
SolverClient lpSolveSolverClient = new SolverClient(new LPSolveMIPSolver());
4
vexorian/kawigi-edit
kawigi/language/EditorLanguage.java
[ "public enum ActID\r\n{\r\n\t/*\r\n\r\n\tKawigiEdit's full recognized command list (is it long enough?)\r\n\tThe values are:\r\n\t-\tAccelerator\r\n\t-\tMnemonic (the underlined letter you'd use to get to it on a menu or on\r\n\t\ta button with Alt down)\r\n\t-\tText\r\n\t-\tTooltip\r\n\t-\tIcon file\r\n\t-\tAction...
import java.util.*; import java.util.regex.*; import java.io.*; import kawigi.cmd.ActID; import kawigi.cmd.ProblemContext; import kawigi.properties.PrefFactory; import kawigi.properties.PrefProxy; import kawigi.problem.*; import kawigi.util.StringsUtil; import kawigi.KawigiEdit;
// fortunately these symbols are the same for all languages StringsUtil.addArrayMarks(val); } } /** * Adds code of array test case parameter initializing. Method have to end * the code line. * * @param num Sequential number of the parameter * @param type Type of the parameter ...
boolean needStmt = PrefFactory.getPrefs().getBoolean(ActID.actSaveStatement.preference, false);
0
iGoodie/TwitchSpawn
src/main/java/net/programmer/igoodie/twitchspawn/tracer/TraceManager.java
[ "@Mod(TwitchSpawn.MOD_ID)\npublic class TwitchSpawn {\n\n public static final String MOD_ID = \"twitchspawn\";\n public static final Logger LOGGER = LogManager.getLogger(TwitchSpawn.class);\n\n public static MinecraftServer SERVER;\n public static TraceManager TRACE_MANAGER;\n\n public TwitchSpawn() ...
import io.socket.client.Socket; import net.minecraft.commands.CommandSourceStack; import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.server.level.ServerPlayer; import net.minecraftforge.fmllegacy.network.NetworkDirection; import net.programmer.igoodie.twitchspawn.TwitchSpawn; import net.progr...
package net.programmer.igoodie.twitchspawn.tracer; public class TraceManager { private boolean running; private Map<String, Socket> sockets; // mc_nick.lowercase() -> sio_socket private List<WebSocketTracer> webSocketTracers; public TraceManager() { this.sockets = new HashMap<>(); t...
tracer = new StreamlabsSocketTracer(this);
7
tokuhirom/jtt
src/main/java/me/geso/jtt/tt/TTSyntax.java
[ "public class ParserError extends JTTError {\n\tprivate static final long serialVersionUID = 1L;\n\tprivate Parser parser;\n\n\tpublic ParserError(String msg, Parser parser) {\n\t\tsuper(msg);\n\t\tthis.parser = parser;\n\t}\n\n\tpublic String toString() {\n\t\tint line = parser.getLine();\n\t\tSource src = parser....
import java.util.List; import me.geso.jtt.exception.ParserError; import me.geso.jtt.lexer.Token; import me.geso.jtt.parser.Node; import me.geso.jtt.vm.Irep; import me.geso.jtt.Compiler; import me.geso.jtt.Source; import me.geso.jtt.Syntax;
package me.geso.jtt.tt; public class TTSyntax implements Syntax { private final String openTag; private final String closeTag; public TTSyntax(String openTag, String closeTag) { this.openTag = openTag; this.closeTag = closeTag; } public TTSyntax() { this.openTag = "[%"; this.closeTag = "%]"; } /* (...
public List<Token> tokenize(Source source, String src) {
5
poli-libras/poli-libras
poli-libras-core/src/br/usp/libras/syntax/SynTransfPortLibras.java
[ "public class AdverbIncorporationTransform implements TokensTransform {\n\n\t@Override\n\tpublic List<TokenMorph> transform(List<TokenMorph> tokens) {\n\n\t\tList<TokenMorph> transformedTokens = Lists.newArrayList(tokens);\n\t\tVerbFinder verbFinder = new VerbFinder();\n\t\tTokenMorph tokenVerb = verbFinder.findVer...
import java.util.ArrayList; import java.util.List; import org.cogroo.text.Sentence; import br.usp.libras.syntax.transforms.AdverbIncorporationTransform; import br.usp.libras.syntax.transforms.AdverbTaggerTransform; import br.usp.libras.syntax.transforms.OrderChangerTransform; import br.usp.libras.syntax.transforms.Prun...
package br.usp.libras.syntax; /** * Syntactic transformer from Portuguese to LIBRAS. * @author leonardo, koga, guilherme, willian * */ public class SynTransfPortLibras implements SyntacticTranformer { private List<TokensTransform> tokensTransforms = new ArrayList<TokensTransform>(); private SyntacticAn...
this.tokensTransforms.add(new SecondPersonTransform());
4
jcgay/send-notification
send-notification/src/test/java/NotifySendExample.java
[ "@AutoValue\npublic abstract class Application {\n\n /**\n * Uniquely identify an application. <br>\n * In order to ensure your application's signature is unique, the recommendation is to follow the Internet Media\n * type (also known as MIME content type) format as defined in IETF <a href=\"http://t...
import fr.jcgay.notification.Application; import fr.jcgay.notification.Icon; import fr.jcgay.notification.Notification; import fr.jcgay.notification.Notifier; import fr.jcgay.notification.SendNotification; import java.net.URL; import java.util.concurrent.TimeUnit;
class NotifySendExample { public static void main(String[] args) { URL icon = NotifySendExample.class.getResource("/image/dialog-clean.png"); Application application = Application.builder() .id("notify-send-example") .name("Notify Send Example") .icon(Icon.cr...
Notification notification = Notification.builder()
2
jachness/blockcalls
app/src/androidTest/java/com/jachness/blockcalls/services/MasterCheckerTest.java
[ "public abstract class AndroidTest {\n private Context targetContext;\n private AllComponentTest component;\n private AppPreferences appPreferences;\n private Context context;\n\n protected void setUp() throws Exception {\n targetContext = InstrumentationRegistry.getTargetContext();\n c...
import android.support.test.runner.AndroidJUnit4; import com.jachness.blockcalls.AndroidTest; import com.jachness.blockcalls.exceptions.PhoneNumberException; import com.jachness.blockcalls.exceptions.TooShortNumberException; import com.jachness.blockcalls.stuff.AppPreferences; import com.jachness.blockcalls.stuff.Block...
package com.jachness.blockcalls.services; /** * Created by jachness on 11/11/2016. */ @SuppressWarnings("TryWithIdenticalCatches") @RunWith(AndroidJUnit4.class) public class MasterCheckerTest extends AndroidTest { @Inject MasterChecker checker; @Inject NormalizerService normalizerService; ...
} catch (TooShortNumberException e) {
2
chncwang/easy2db
src/main/java/com/chncwang/easy2db/table/util/ForeignKeyUtil.java
[ "public class ColumnDef {\n private final Class<?> mClass;\n private final String mName;\n\n public ColumnDef(final Class<?> clazz, final String name) {\n PreconditionsUtil.checkNotNull(name, \"name\");\n\n mClass = clazz;\n mName = name;\n }\n\n @Override\n public String toSt...
import com.chncwang.easy2db.table.ColumnDef; import com.chncwang.easy2db.table.value.ColumnWithValue; import com.chncwang.easy2db.table.value.ForeignKeyWithValue; import com.chncwang.easy2db.table.value.PrimaryKeyWithValue; import com.chncwang.easy2db.table.value.Row;
package com.chncwang.easy2db.table.util; public class ForeignKeyUtil { private ForeignKeyUtil() {} public static void setForeignKeyPrimaryKeyValue( final ForeignKeyWithValue foreignKeyWithValue, final Object value) { getPrimayKeyWithValue(foreignKeyWithValue).setValue(value); } p...
final Row row = foreignKeyWithValue.getForeignRow();
4
qqq3/good-weather
app/src/main/java/org/asdtm/goodweather/widget/LessWidgetService.java
[ "public class ConnectionDetector {\n\n private Context mContext;\n\n public ConnectionDetector(Context context) {\n mContext = context;\n }\n\n public boolean isNetworkAvailableAndConnected() {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) mContext.getS...
import android.app.IntentService; import android.appwidget.AppWidgetManager; import android.content.ComponentName; import android.content.Intent; import android.content.SharedPreferences; import android.util.Log; import android.widget.RemoteViews; import org.asdtm.goodweather.ConnectionDetector; import org.asdtm.goodwe...
package org.asdtm.goodweather.widget; public class LessWidgetService extends IntentService { private static final String TAG = "UpdateLessWidgetService"; public LessWidgetService() { super(TAG); } @Override protected void onHandleIntent(Intent intent) { ConnectionDetector chec...
SharedPreferences preferences = getSharedPreferences(Constants.APP_SETTINGS_NAME, 0);
5
Tubitv/TubiPlayer
lib/src/main/java/com/tubitv/media/fsm/concrete/MakingAdCallState.java
[ "public abstract class BaseState implements State {\n\n protected PlayerUIController controller;\n\n protected PlayerAdLogicController componentController;\n\n protected MediaModel movieMedia;\n\n protected AdMediaModel adMedia;\n\n /**\n * for testing purpose,\n *\n * @param fsmPlayer\n ...
import android.support.annotation.NonNull; import com.tubitv.media.fsm.BaseState; import com.tubitv.media.fsm.Input; import com.tubitv.media.fsm.State; import com.tubitv.media.fsm.callback.AdInterface; import com.tubitv.media.fsm.callback.RetrieveAdCallback; import com.tubitv.media.fsm.concrete.factory.StateFactory; im...
package com.tubitv.media.fsm.concrete; /** * Created by allensun on 7/31/17. */ public class MakingAdCallState extends BaseState { @Override public State transformToState(Input input, StateFactory factory) { switch (input) { case AD_RECEIVED: return factory.createState(R...
private void fetchAd(AdInterface adInterface, AdRetriever retriever, RetrieveAdCallback callback) {
3
airlift/airlift
sample-server/src/main/java/io/airlift/sample/Main.java
[ "public final class Announcer\n{\n private static final Logger log = Logger.get(Announcer.class);\n private final ConcurrentMap<UUID, ServiceAnnouncement> announcements = new MapMaker().makeMap();\n\n private final DiscoveryAnnouncementClient announcementClient;\n private final ScheduledExecutorService ...
import org.weakref.jmx.guice.MBeanModule; import com.google.inject.Injector; import io.airlift.bootstrap.Bootstrap; import io.airlift.discovery.client.Announcer; import io.airlift.discovery.client.DiscoveryModule; import io.airlift.event.client.http.HttpEventModule; import io.airlift.http.server.HttpServerModule; impor...
/* * Copyright 2010 Proofpoint, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
injector.getInstance(Announcer.class).start();
0
plusonelabs/calendar-widget
app/src/main/java/org/andstatus/todoagenda/task/dmfs/DmfsOpenTasksProvider.java
[ "public class EventSource {\n private static final String TAG = EventSource.class.getSimpleName();\n public final static EventSource EMPTY = new EventSource(EventProviderType.EMPTY, 0, \"Empty\", \"\", 0, false);\n public static final String STORE_SEPARATOR = \",\";\n\n private static final String KEY_P...
import android.content.ContentUris; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.text.TextUtils; import org.andstatus.todoagenda.prefs.EventSource; import org.andstatus.todoagenda.prefs.FilterMode; import org.andstatus.todoagenda.p...
package org.andstatus.todoagenda.task.dmfs; public class DmfsOpenTasksProvider extends AbstractTaskProvider { public DmfsOpenTasksProvider(EventProviderType type, Context context, int widgetId) { super(type, context, widgetId); } @Override
public List<TaskEvent> queryTasks() {
5
spoqa/battery
src/main/java/com/spoqa/battery/codecs/UrlEncodedFormEncoder.java
[ "public final class CodecUtils {\r\n public static final String TAG = \"CodecUtils\";\r\n\r\n private static final Class PRIMITIVE_TYPE_STRING = String.class;\r\n private static final Class PRIMITIVE_TYPE_INTEGER = int.class;\r\n private static final Class PRIMITIVE_TYPE_INTEGER_BOXED = Integer.class;\r...
import com.spoqa.battery.CodecUtils; import com.spoqa.battery.FieldNameTranslator; import com.spoqa.battery.Logger; import com.spoqa.battery.RequestSerializer; import com.spoqa.battery.TypeAdapterCollection; import com.spoqa.battery.annotations.RequestBody; import com.spoqa.battery.exceptions.SerializationExcepti...
/** * Copyright (c) 2014-2015 Spoqa, All Rights Reserved. */ package com.spoqa.battery.codecs; public class UrlEncodedFormEncoder implements RequestSerializer { private static final String TAG = "UrlEncodedFormEncoder"; private static final String MIME_TYPE = "application/x-www-form-urlencoded...
TypeAdapterCollection typeAdapters) throws SerializationException {
5
byhieg/easyweather
app/src/main/java/com/weather/byhieg/easyweather/data/source/remote/WeatherRemoteDataSource.java
[ "public class MyApplication extends Application{\n\n private static MyApplication mcontext;\n public static DaoMaster daoMaster;\n public static DaoSession daoSession;\n public static LocationClient mLocationClient;\n\n\n private static final String cityUrl = \"https://free-api.heweather.com/\";\n ...
import com.weather.byhieg.easyweather.MyApplication; import com.weather.byhieg.easyweather.data.bean.HWeather; import com.weather.byhieg.easyweather.data.source.WeatherDataSource; import com.weather.byhieg.easyweather.data.source.local.entity.WeatherEntity; import com.weather.byhieg.easyweather.data.source.remote.conf....
package com.weather.byhieg.easyweather.data.source.remote; /** * Created by byhieg on 17/5/21. * Contact with byhieg@gmail.com */ public class WeatherRemoteDataSource implements WeatherDataSource { ApiService mApiService; Call<HWeather> mCall; { mApiService = NetService.getInstance().cre...
maps.put("key", MyApplication.getHeweatherKey());
0
shaohui10086/ShareUtil
shareutil/src/main/java/me/shaohui/shareutil/login/instance/WxLoginInstance.java
[ "public class ShareManager {\n\n private static boolean isInit = false;\n\n public static ShareConfig CONFIG;\n\n public static void init(ShareConfig config) {\n isInit = true;\n CONFIG = config;\n }\n}", "public abstract class LoginListener {\n\n public abstract void loginSuccess(Log...
import android.app.Activity; import android.content.Context; import android.content.Intent; import com.tencent.mm.sdk.modelbase.BaseReq; import com.tencent.mm.sdk.modelbase.BaseResp; import com.tencent.mm.sdk.modelmsg.SendAuth; import com.tencent.mm.sdk.openapi.IWXAPI; import com.tencent.mm.sdk.openapi.IWXAPIEventHandl...
package me.shaohui.shareutil.login.instance; /** * Created by shaohui on 2016/12/1. */ public class WxLoginInstance extends LoginInstance { public static final String SCOPE_USER_INFO = "snsapi_userinfo"; private static final String SCOPE_BASE = "snsapi_base"; private static final String BASE_URL = "...
mLoginListener.loginSuccess(new LoginResult(LoginPlatform.WX, wxToken));
2
790710371/bangbanghelper
app/src/main/java/com/mero/wyt_register/activity/InstallXposedAty.java
[ "public class Config {\n\tpublic static final String ID=\"prefs\";//当前应用的ID\n\tpublic static final String CHARSET=\"UTF-8\";//编码格式\n\tpublic static final String DEBUGGING=\"T\";//可调试开发阶段标志\n\tpublic static final String URL=\"www.haoma.com\";//临时接码平台地址\n\tpublic static final String KEY_IS_FIRST_IN = \"isFirstIn\";\n...
import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.net.Uri; import an...
package com.mero.wyt_register.activity; public class InstallXposedAty extends Activity implements View.OnClickListener { private static final String TAG = "InstallXposedAty"; private CustomTitleBar title_bar;
private RoundButton btn_isRoot;
5
marcelothebuilder/webpedidos
src/main/java/com/github/marcelothebuilder/webpedidos/controller/CadastroUsuarioBean.java
[ "@Entity\n@Table(name=\"grupo\")\npublic class Grupo implements Serializable {\n\tprivate Integer codigo;\n\tprivate String nome;\n\tprivate String descricao;\n\tprivate static final long serialVersionUID = 1L;\n\n\tpublic Grupo() {\n\t\tsuper();\n\t} \n\t\n\t@Id\n\t@GeneratedValue(strategy = GenerationType.IDENT...
import java.io.Serializable; import java.util.Set; import javax.faces.application.FacesMessage; import javax.faces.context.FacesContext; import javax.faces.view.ViewScoped; import javax.inject.Inject; import javax.inject.Named; import javax.validation.ConstraintViolation; import javax.validation.ConstraintViolationExce...
/** * */ package com.github.marcelothebuilder.webpedidos.controller; /** * Controller de cadastro de usuário. * * @author Marcelo Paixao Resende * */ @Named @ViewScoped public class CadastroUsuarioBean implements Serializable { private static final long serialVersionUID = -1052057176578639073L; private...
private Set<Grupo> grupoOptions;
0
sailthru/sailthru-java-client
src/main/com/sailthru/client/AbstractSailthruClient.java
[ "public class JsonHandler implements SailthruResponseHandler {\n\n public static final String format = \"json\";\n\n \n public Object parseResponse(String response) {\n GsonBuilder builder = new GsonBuilder();\n builder.setDateFormat(SailthruUtil.SAILTHRU_API_DATE_FORMAT);\n builder.re...
import com.google.common.annotations.VisibleForTesting; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.sailthru.client.handler.JsonHandler; import com.sailthru.client.handler.SailthruResponseHandler; import com.sailthru.client.handler.response.JsonResponse; import com.sailthru.client....
package com.sailthru.client; /** * Abstract class exposing generic API calls for Sailthru API as per http://docs.sailthru.com/api * @author Prajwal Tuladhar <praj@sailthru.com> */ public abstract class AbstractSailthruClient { private static final Gson GSON = SailthruUtil.createGson(); public static fina...
protected Object httpRequest(HttpRequestMethod method, ApiParams apiParams, ApiFileParams fileParams) throws IOException {
3
roncoo/roncoo-adminlte-springmvc
src/main/java/com/roncoo/adminlte/controller/admin/DataDictionaryListController.java
[ "public class RcDataDictionaryList 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 priv...
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind....
/* * 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...
public PageBean<RcDataDictionaryList> queryForList(@RequestParam(value = "start", defaultValue = "1") int start, @RequestParam(value = "length", defaultValue = "10") int pageSize, @RequestParam(value = "fieldCode") String fieldCode, @RequestParam(value = "date", required = false) String date, @RequestParam(value = "se...
5
badvision/jace
src/main/java/jace/cheat/MetaCheat.java
[ "public class Emulator {\r\n\r\n public static Emulator instance;\r\n public static EmulatorUILogic logic = new EmulatorUILogic();\r\n public static Thread mainThread;\r\n\r\n// public static void main(String... args) {\r\n// mainThread = Thread.currentThread();\r\n// instance = new Emulat...
import jace.Emulator; import jace.JaceApplication; import jace.core.CPU; import jace.core.Computer; import jace.core.RAM; import jace.core.RAMEvent; import jace.core.RAMListener; import jace.state.State; import jace.ui.MetacheatUI; import java.io.BufferedReader; import java.io.File; import java.io.FileReader...
} public Property<String> startAddressProperty() { return startAddressProperty; } public Property<String> endAddressProperty() { return endAddressProperty; } public void newSearch() { RAM memory = Emulator.computer.getMemory(); resultList.clear(); ...
CPU cpu = Emulator.computer.getCpu();
2
irq0/jext2
src/fusejext2/tasks/Mkdir.java
[ "public class Constants {\n\t// Special inode numbers\n\tpublic static final int\tEXT2_BAD_INO = 1; /* Bad blocks inode */\n\tpublic static final int EXT2_ROOT_INO = 2; /* Root inode */\n\tpublic static final int EXT2_BOOT_LOADER_INO = 5; /* Boot loader inode */\n\tpublic static final int EXT2_UNDEL_...
import fusejext2.Util; import jext2.Constants; import jext2.DirectoryInode; import jext2.Inode; import jext2.InodeAlloc; import jext2.ModeBuilder; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NotADirectory; import jlowfuse.FuseReq; import jlowfuse.Reply; import fuse.FuseContext; import fusejext2.Jext...
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 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 vers...
throw new NotADirectory();
6
luboganev/dejalist
DejalistApp/src/com/luboganev/dejalist/ui/ProductActivity.java
[ "public class CropActivity extends FragmentActivity {\r\n\tprivate final static int REQUEST_CODE_PICK_IMAGE = 1;\r\n\tprivate final static int REQUEST_CODE_TAKE_PHOTO = 2;\r\n\t\r\n\tprivate final static String STATE_FILE_URI = \"state_file_uri\";\r\n\tprivate final static String STATE_DESTINATION_FILE_URI = \"stat...
import static nl.qbusict.cupboard.CupboardFactory.cupboard; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import android.app.ActionBar; import android.app.Activity; import android.content.ContentValues; import andr...
else { finish(); return; } } else { mIsStartedByShare = false; // Load just category sent to this activity mNewCategoryId = getIntent().getLongExtra(EXTRA_CATEGORY_ID, Products.PRODUCT_CATEGORY_NONE_ID); // ...
File cachedFile = CacheManager.cacheData(getApplicationContext(), incomingFile);
1
ryankennedy/swagger-jaxrs-doclet
jaxrs-doclet/src/test/java/com/hypnoticocelot/jaxrs/doclet/apidocs/ObjectTest.java
[ "public class DocletOptions {\n public static final String DEFAULT_SWAGGER_UI_ZIP_PATH = \"n/a\";\n private File outputDirectory;\n private String docBasePath = \"http://localhost:8080\";\n private String apiBasePath = \"http://localhost:8080\";\n private String swaggerUiZipPath = DEFAULT_SWAGGER_UI_...
import com.hypnoticocelot.jaxrs.doclet.DocletOptions; import com.hypnoticocelot.jaxrs.doclet.Recorder; import com.hypnoticocelot.jaxrs.doclet.model.ApiDeclaration; import com.hypnoticocelot.jaxrs.doclet.parser.JaxRsAnnotationParser; import com.sun.javadoc.RootDoc; import org.junit.Before; import org.junit.Test; import ...
package com.hypnoticocelot.jaxrs.doclet.apidocs; public class ObjectTest { private Recorder recorderMock; private DocletOptions options; @Before public void setup() { recorderMock = mock(Recorder.class); options = new DocletOptions().setRecorder(recorderMock); } @Test ...
final ApiDeclaration api = loadFixture("/fixtures/object/object.json", ApiDeclaration.class);
4
codecentric/conference-app
app/src/main/java/de/codecentric/controller/AllSessionsController.java
[ "public interface LocationDao {\r\n\r\n List<Location> getLocations();\r\n\r\n Location getLocation(String shortName);\r\n\r\n}\r", "public interface SessionDao {\n\n List<Session> getAllSessions();\n\n List<String> getListOfConferenceDays();\n\n List<Session> getAllStaticSessions();\n\n /* retu...
import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web...
package de.codecentric.controller; @Controller @RequestMapping("/allSessions") public class AllSessionsController { @Autowired private SessionDao sessionDao; @Autowired private TimeslotDao timeslotDao; @Autowired private LocationDao locationDao; public AllSessionsContro...
List<Session> daySessions = sessionDao.getAllSessionsByDateAndType(day.getShortName(), SessionType.openspace);
6
Ellzord/JALSE
src/main/java/jalse/entities/methods/GetAttributeMethod.java
[ " public static Object defaultValue(final Class<?> type) {\nfinal Object value = WRAPPER_DEFAULTS.get(Objects.requireNonNull(type));\nif (value == null) {\n throw new IllegalArgumentException(\"Not primitive wrapper\");\n}\nreturn value;\n }", " public static Class<?> toClass(final Type type) {\nreturn t...
import static jalse.entities.functions.Functions.defaultValue; import static jalse.entities.functions.Functions.toClass; import java.util.Objects; import jalse.attributes.AttributeContainer; import jalse.attributes.AttributeType; import jalse.attributes.NamedAttributeType; import jalse.entities.Entity; import jalse.ent...
package jalse.entities.methods; /** * This is used for mapping calls to: * * <ul> * <li>{@link AttributeContainer#getOptAttribute(String, AttributeType)}</li> * <li>{@link AttributeContainer#getAttribute(String, AttributeType)}</li> * </ul> * * @author Elliot Ford * * @see GetAttribute * @see GetAttribute...
private final Object defaultValue;
0
dantetam/civgame
src/system/CivilizationSystem.java
[ "public class MenuGame {\n\n\tpublic Grid grid;\n\tpublic long seed;\n\tpublic CivilizationSystem civSystem;\n\tpublic String terrainString;\n\t\n\tpublic Civilization[][] civRecord; //A record of the owners of the respective tiles\n\tpublic Civilization[][] civUnitRecord; //A record of the units present at those t...
import java.util.ArrayList; import menugame.MenuGame; import menugame.Tutorial; import processing.core.PApplet; import data.EntityData; import data.Field; import render.CivGame; import game.*; import game_ai.Intelligence; import units.*;
package system; public class CivilizationSystem extends BaseSystem { public boolean requestTurn = false; public int turnsPassed = 0; public Grid theGrid; public CivilizationSystem(CivGame civGame) { super(civGame); } public CivilizationSystem(MenuGame menuGame) { super(null); } //Generalize it for...
if (main instanceof Tutorial)
1
jfinkels/analyticalengine
src/test/java/analyticalengine/attendant/AttendantTestBase.java
[ "public class BadCard extends CardException {\n\n /**\n * A default generated serial version UID.\n */\n private static final long serialVersionUID = -3311831632309378417L;\n\n /**\n * Instantiates this exception with the specified error message and the\n * specified card that caused the ex...
import analyticalengine.cards.BadCard; import analyticalengine.cards.Card; import analyticalengine.cards.UnknownCard; import analyticalengine.components.ArrayListCardReader; import analyticalengine.components.CardReader; import java.io.IOException; import java.net.URISyntaxException; import java.nio.file.Files; import ...
/** * AttendantTestBase.java - base class for tests that use an Analytical Engine * * Copyright 2014-2016 Jeffrey Finkelstein. * * This file is part of analyticalengine. * * analyticalengine is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as publ...
List<Card> cards = new ArrayList<Card>();
1
algohub/judge-engine
src/main/java/org/algohub/engine/codegenerator/PythonCodeGenerator.java
[ "@SuppressWarnings({\"PMD.BeanMembersShouldSerialize\", \"PMD.UnusedPrivateField\", \"PMD.SingularField\",\n \"PMD.ArrayIsStoredDirectly\"}) @JsonIgnoreProperties(ignoreUnknown = true) public\nclass Function {\n\n /**\n * Function name.\n */\n private final String name;\n /**\n * Return metadata.\n *...
import com.fasterxml.jackson.core.JsonProcessingException; import org.algohub.engine.pojo.Function; import org.algohub.engine.type.IntermediateType; import org.algohub.engine.type.LanguageType; import org.algohub.engine.type.TypeNode; import org.algohub.engine.util.ObjectMapperInstance;
package org.algohub.engine.codegenerator; /** * Generate Python code. */ @SuppressWarnings({"PMD.InsufficientStringBufferDeclaration"}) public final class PythonCodeGenerator { private PythonCodeGenerator() {} /** * Generate the main function. * * @param function Function type info. * @param from...
public static String generateMain(final Function function, boolean fromFile) {
0
ptgoetz/storm-hdfs
src/main/java/org/apache/storm/hdfs/bolt/AbstractHdfsBolt.java
[ "public interface FileNameFormat extends Serializable {\n\n void prepare(Map conf, TopologyContext topologyContext);\n\n /**\n * Returns the filename the HdfsBolt will create.\n * @param rotation the current file rotation number (incremented on every rotation)\n * @param timeStamp current time in ...
import backtype.storm.task.OutputCollector; import backtype.storm.task.TopologyContext; import backtype.storm.topology.OutputFieldsDeclarer; import backtype.storm.topology.base.BaseRichBolt; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org...
/** * 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...
protected ArrayList<RotationAction> rotationActions = new ArrayList<RotationAction>();
4
Comcast/flume2storm
test-impl/src/main/java/com/comcast/viper/flume2storm/connection/receptor/SimpleEventReceptor.java
[ "public class SimpleConnectionParameters implements ConnectionParameters {\n /** Configuration attribute name for {@link #getHostname()} */\n public static final String HOSTNAME = \"hostname\";\n /** Default value for {@value #HOSTNAME} */\n public static final String HOSTNAME_DEFAULT = \"localhost\";\n /** Co...
import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.comcast.viper.flume2storm.connection...
/** * Copyright 2014 Comcast Cable Communications Management, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
SimpleEventSender eventSender = SimpleEventSenderRouter.getInstance().get(connectionParameters);
2
wenerme/bbvm
jbbvm/bbvm-core/src/main/java/me/wener/bbvm/vm/invoke/GraphInvoke.java
[ "public interface ImageManager extends ResourceManager<ImageManager, ImageResource> {\n /**\n * @param file Resource name\n * @param index Resource index start from 0\n */\n ImageResource load(String file, int index);\n\n /**\n * @return Mutable directories to search the resource\n */\...
import me.wener.bbvm.dev.ImageManager; import me.wener.bbvm.dev.PageManager; import me.wener.bbvm.vm.Operand; import me.wener.bbvm.vm.Register; import me.wener.bbvm.vm.SystemInvoke; import me.wener.bbvm.vm.VM; import javax.inject.Inject; import javax.inject.Named;
package me.wener.bbvm.vm.invoke; /** * @author wener * @since 15/12/18 */ public class GraphInvoke { private final VM vm; private final Register r3; private final Register r2; private final Register r1; private final Register r0; private final PageManager pages;
private final ImageManager images;
0
bhatti/PlexRBAC
src/main/java/com/plexobject/rbac/service/impl/AuthorizationServiceImpl.java
[ "public class ServiceFactory {\n private static RepositoryFactory REPOSITORY_FACTORY = new RepositoryFactoryImpl();\n private static PermissionManager PERMISSION_MANAGER = new PermissionManagerImpl(\n REPOSITORY_FACTORY, new JavascriptEvaluator());\n\n public static RepositoryFactory getDefaultF...
import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Context; import javax.ws.rs.c...
package com.plexobject.rbac.service.impl; @Path("/authorize") @Component("authorizationService") @Scope("singleton") public class AuthorizationServiceImpl implements AuthorizationService, InitializingBean { private static final Logger LOGGER = Logger .getLogger(AuthorizationServiceImpl.clas...
return Response.status(RestClient.CLIENT_ERROR_BAD_REQUEST).type(
1
wkgcass/Style
src/main/java/net/cassite/style/aggregation/ListFuncSup.java
[ "public class $ {\n private $() {\n }\n\n private static RFunc1<Boolean, ?> alwaysTrue = t -> true;\n\n /**\n * Used as 1st argument in {@link A1FuncSup#forThose(RFunc1, def)} or\n * {@link MapFuncSup#forThose(RFunc2, def)} <br>\n * When its supposed to be always ...
import java.util.List; import java.util.ListIterator; import net.cassite.style.interfaces.*; import net.cassite.style.$; import net.cassite.style.StyleRuntimeException; import net.cassite.style.def; import net.cassite.style.control.*; import static net.cassite.style.Style.*; import static net.cassite.style.aggregation....
package net.cassite.style.aggregation; /** * Supporter of lists * * @author wkgcass * * @param <T> * element type of the collection */ public class ListFuncSup<T> extends CollectionFuncSup<T> { ListFuncSup(List<T> collection) { super(collection); } /**...
toSelf($(func));
0
NessComputing/components-ness-httpclient
client/src/test/java/com/nesscomputing/httpclient/TestContentLength.java
[ "public final class HttpClient implements Closeable\n{\n private final HttpClientFactory httpClientFactory;\n\n /**\n * Creates a new HTTP client with the default implementation (currently Apache HTTPClient 4) and default settings.\n */\n public HttpClient()\n {\n this(new HttpClientDefau...
import com.nesscomputing.httpclient.response.ContentResponseHandler; import com.nesscomputing.httpclient.testsupport.GenericTestHandler; import com.nesscomputing.httpclient.testsupport.LocalHttpService; import com.nesscomputing.httpclient.testsupport.StringResponseConverter; import com.nesscomputing.testing.lessio.Allo...
/** * Copyright (C) 2012 Ness Computing, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
HttpClientResponseHandler<String> responseHandler = new ContentResponseHandler<String>(new StringResponseConverter() {
2
latraccia/sd-dss-util
sd-dss-util-lib/src/main/java/it/latraccia/dss/util/builder/SignatureBuilder.java
[ "public abstract class FormatBuilder<T\n extends SignatureFormat>\n implements IBuilder<FormatBuilder.SignatureFormatLevelPackaging> {\n\n protected SignatureFormat format;\n protected SignatureLevel level;\n protected SignaturePackaging packaging;\n protected String serviceUrl;\n\n pub...
import eu.europa.ec.markt.dss.applet.main.FileType; import eu.europa.ec.markt.dss.applet.util.SigningUtils; import eu.europa.ec.markt.dss.common.SignatureTokenType; import eu.europa.ec.markt.dss.exception.BadPasswordException; import eu.europa.ec.markt.dss.exception.DSSException; import eu.europa.ec.markt.dss.signature...
/* * SD-DSS-Util, a Utility Library and a Command Line Interface for SD-DSS. * Copyright (C) 2013 La Traccia http://www.latraccia.it/en/ * Developed by Francesco Pontillo * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as publi...
private DigestAlgorithm digestAlgorithm;
3
Simonsator/BungeecordPartyAndFriends
src/main/java/de/simonsator/partyandfriends/communication/sql/MySQL.java
[ "public class BukkitBungeeAdapter {\n\tprivate static BukkitBungeeAdapter instance;\n\tprivate final Plugin PAF_EXTENSION;\n\tprivate boolean forceUuidSupport = false;\n\n\tpublic BukkitBungeeAdapter(PAFExtension pPlugin) {\n\t\tthis((PAFPluginBase) pPlugin);\n\t}\n\n\tpublic BukkitBungeeAdapter(PAFPluginBase pPlug...
import de.simonsator.partyandfriends.api.adapter.BukkitBungeeAdapter; import de.simonsator.partyandfriends.communication.sql.cache.LocalPlayerCache; import de.simonsator.partyandfriends.communication.sql.cache.NoCache; import de.simonsator.partyandfriends.communication.sql.cache.PlayerCache; import de.simonsator.partya...
package de.simonsator.partyandfriends.communication.sql; /** * @author Simonsator * @version 2.0.0 */ public class MySQL extends PoolSQLCommunication { private final String TABLE_PREFIX; private final PlayerCache cache; /** * Connects to the MySQL server * * @param pMySQLData The MySQL data */ publi...
Disabler.getInstance().registerDeactivated(this);
8
amouat/diffxml
src/java/org/diffxml/diffxml/fmes/EditScript.java
[ "public final class DOMOps {\n\n /**\n * Factory used in outputting XML.\n */\n private static final TransformerFactory TRANSFORMER_FACTORY =\n TransformerFactory.newInstance();\n\n /**\n * Private constructor.\n */\n private DOMOps() {\n //Shouldn't be instantiated\n }\...
import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import java.util.List; import java.io.IOException; import org.diffxml.diffxml.DOMOps; import org.diffxml.diffxml.DiffFactory; import org.diffxml.diffxml.fmes.delta.DULDelta; import org.diffxml.diffxml.fmes...
} } // If node isn't matched, delete it if (!matchings.isMatched(n) && n.getNodeType() != Node.DOCUMENT_TYPE_NODE) { mDelta.delete(n); n.getParentNode().removeChild(n); } } /** * Mark the children of a node out...
if (DiffFactory.isDebug()) {
1
xnickmx/google-play-client
google-play-client/src/main/java/com/faceture/google/play/PlayClientBuilder.java
[ "public class GoogleUtil {\n\n public String createAuthHeaderValue(String authToken) {\n if (null == authToken || authToken.isEmpty()) {\n throw new IllegalArgumentException(\"authToken is null or empty\");\n }\n\n return GoogleConst.AUTH_HEADER_START + authToken;\n }\n\n pu...
import com.faceture.google.GoogleUtil; import com.faceture.google.gson.GsonWrapper; import com.faceture.google.play.domain.PlayDomainFactory; import com.faceture.http.HttpClientFactory; import com.faceture.http.HttpUtil; import com.faceture.rest.RestClient; import com.faceture.rest.RestClientUtil; import com.faceture.r...
/* * Copyright (c) 2012. Faceture Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program...
GsonWrapper gsonWrapper = new GsonWrapper(gson);
1
loomchild/segment
segment/src/test/java/net/loomchild/segment/srx/io/SrxParsersTest.java
[ "public static Reader getReader(InputStream inputStream) {\n\ttry {\n\t\tReader reader = new InputStreamReader(inputStream, \"utf-8\");\n\t\treturn reader;\n\t} catch (UnsupportedEncodingException e) {\n\t\tthrow new IORuntimeException(e);\n\t}\n}", "public static InputStream getResourceStream(String name) {\n\tI...
import static net.loomchild.segment.util.Util.getReader; import static net.loomchild.segment.util.Util.getResourceStream; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.io.Reader; import java.util.List; import net.loomchild...
package net.loomchild.segment.srx.io; public class SrxParsersTest { private static final SrxParser ONE = new Srx1Parser(); private static final SrxParser TWO = new Srx2Parser(); private static final SrxParser ANY = new SrxAnyParser(); private static final SrxParser SAX = new Srx2SaxParser(); private static ...
SrxDocument document = parser.parse(reader);
3
groupon/Message-Bus
mbus-java/src/main/java/com/groupon/messagebus/client/examples/ProducerExample.java
[ "public enum DestinationType{\n QUEUE,\n TOPIC\n}", "public class HostParams {\n private String host;\n private int port;\n\n public HostParams(String aHost, int aPort) {\n host = aHost;\n port = aPort;\n }\n\n public String getHost() {\n return host;\n }\n\n ...
import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.math.BigInteger; import java.security.SecureRandom; import java.util.HashMap; import java.util.Properties; import org.apache.log4j.BasicConfigurator; import com.groupon.messagebus.api.DestinationType; import co...
package com.groupon.messagebus.client.examples; /* * Copyright (c) 2013, Groupon, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * Redistributions of source code must retain the ...
config.setDestinationType(DestinationType.valueOf(properties.getProperty("dest_type")));
0
xvik/generics-resolver
src/main/java/ru/vyarus/java/generics/resolver/util/walk/TypesWalker.java
[ "public final class ArrayTypeUtils {\n\n private static final String ARRAY_TYPE_SIMPLE_PREFIX = \"[\";\n private static final String ARRAY_TYPE_OBJECT_PREFIX = \"[L\";\n\n @SuppressWarnings({\"checkstyle:Indentation\", \"PMD.NonStaticInitializer\", \"PMD.AvoidUsingShortType\"})\n private static final Ma...
import ru.vyarus.java.generics.resolver.util.ArrayTypeUtils; import ru.vyarus.java.generics.resolver.util.GenericsResolutionUtils; import ru.vyarus.java.generics.resolver.util.GenericsUtils; import ru.vyarus.java.generics.resolver.util.TypeUtils; import ru.vyarus.java.generics.resolver.util.map.IgnoreGenericsMap; impor...
package ru.vyarus.java.generics.resolver.util.walk; /** * Deep types analysis utility. * <p> * Algorithm: * <ul> * <li>If types are not compatible - notify fail</li> * <li>Ask visitor to continue</li> * <li>If one if types is Object - stop</li> * <li>Look if types are arrays and cycle with actual array type<...
canContinue = doWalk(ArrayTypeUtils.getArrayComponentType(one), oneKnownGenerics,
0
UWFlow/flow-android
src/com/uwflow/flow_android/activities/FullScreenImageActivity.java
[ "public class FlowActivity extends FragmentActivity {\n protected FlowDatabaseHelper flowDatabaseHelper;\n\n @Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n getActionBar().setDisplayHomeAsUpEnabled(true);\n getActionBar().setHomeBut...
import android.graphics.Bitmap; import android.graphics.Point; import android.os.Bundle; import android.widget.ImageView; import com.uwflow.flow_android.FlowActivity; import com.uwflow.flow_android.R; import com.uwflow.flow_android.custom_view.TouchImageView; import com.uwflow.flow_android.db_object.ScheduleImage; impo...
package com.uwflow.flow_android.activities; public class FullScreenImageActivity extends FlowActivity { private ImageView mImageView; private FlowDatabaseLoader mFlowDatabaseLoader; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mFlo...
public void onScheduleImageLoaded(ScheduleImage scheduleImage) {
2
acromusashi/acromusashi-stream
src/test/java/acromusashi/stream/component/infinispan/bolt/InfinispanStoreBoltTest.java
[ "public class CacheHelper<K, V>\n{\n /** キャッシュサーバURL */\n protected String cacheServerUrl;\n\n /** キャッシュ名称 */\n protected String cacheName;\n\n /** Remoteキャッシュマネージャ */\n protected RemoteCacheManager remoteCacheManager;\n\n /** 最新データを保持するキャッシュ */\n protected RemoteCach...
import static org.junit.Assert.assertTrue; import static org.mockito.Matchers.anyString; import org.infinispan.client.hotrod.RemoteCache; import org.infinispan.client.hotrod.exceptions.HotRodClientException; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import...
package acromusashi.stream.component.infinispan.bolt; /** * InfinispanStoreBoltのテストクラス * * @author kimura */ @RunWith(MockitoJUnitRunner.class) public class InfinispanStoreBoltTest { /** テスト対象 */ private InfinispanStoreBolt<String, String> target; /** テスト用のOutputCollector */ @Mock private O...
TupleCacheMapper<String, String> mapper = new SimpleCacheMapper<>();
1
NikitaKozlov/Pury
pury/src/test/java/com/nikitakozlov/pury/aspects/StopProfilingAspectTest.java
[ "public final class Pury {\n\n public static final String LOG_TAG = \"Pury\";\n public static final String LOGGER_PLUGIN = \"LoggerPlugin\";\n\n public static void setLogger(Logger logger) {\n }\n\n public synchronized static Logger getLogger() {\n return null;\n }\n\n public static bool...
import com.nikitakozlov.pury.Pury; import com.nikitakozlov.pury.PurySetter; import com.nikitakozlov.pury.annotations.StopProfiling; import com.nikitakozlov.pury.annotations.StopProfilings; import com.nikitakozlov.pury.profile.Profiler; import com.nikitakozlov.pury.profile.ProfilingManager; import com.nikitakozlov.pury....
package com.nikitakozlov.pury.aspects; public class StopProfilingAspectTest { private static final int RUNS_COUNTER_5 = 5; private static final String PROFILER_NAME_1 = "profilerName 1"; private static final String STAGE_NAME_1 = "stageName 1"; private static final int RUNS_COUNTER_4 = 4; pri...
Pury.setEnabled(false);
0
xzela/jastroblast
jastroblast-core/src/org/doublelong/jastroblast/screen/MainScreen.java
[ "public class JastroBlast extends Game\n{\n\tpublic final String WINDOW_TITLE = \"jAstroBlast\";\n\tpublic static final int WINDOW_WIDTH = 800;\n\tpublic static final int WINDOW_HEIGHT = 600;\n\n\tpublic static AssetManager manager = new AssetManager();\n\tpublic static final boolean DEBUG = true;\n\n\t@Override\n\...
import org.doublelong.jastroblast.JastroBlast; import org.doublelong.jastroblast.controller.MenuController; import org.doublelong.jastroblast.entity.MainMenu; import org.doublelong.jastroblast.entity.Menu; import org.doublelong.jastroblast.entity.Screens; import org.doublelong.jastroblast.managers.ScreenManager; import...
package org.doublelong.jastroblast.screen; public class MainScreen extends AbstractScreen { private Stage stage; private Image logo; private Music menuMusic; private Table table; @Override public Menu getMenu() { return this.menu; } private Image cursor; Runnable onMenuFinish = new Runnable() { @Override...
ScreenManager.getInstance().show(Screens.GAME);
4
marcelothebuilder/webpedidos
src/main/java/com/github/marcelothebuilder/webpedidos/repository/Pedidos.java
[ "@Entity\n@Table(name = \"cliente\", uniqueConstraints = {\n\t\t@UniqueConstraint(name = \"uk_doc_receita_federal\", columnNames = { \"doc_receita_federal\" }),\n\t\t@UniqueConstraint(name = \"uk_email\", columnNames = { \"email\" }) })\npublic class Cliente implements Serializable {\n\tprivate static final long se...
import java.io.Serializable; import java.math.BigDecimal; import java.util.Calendar; import java.util.Collection; import java.util.Collections; import java.util.Date; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; import java.util.TreeSet; import javax.inject.Inject;...
/** * */ package com.github.marcelothebuilder.webpedidos.repository; /** * @author Marcelo Paixao Resende * */ public class Pedidos implements Serializable { private static final long serialVersionUID = 1L; private @Inject EntityManager manager; public Pedido porCodigo(Long codigo) { assert (codigo >= ...
Set<DataValor> set = new TreeSet<>(new DataValorDataComparator());
5
wisedog/Whoochoo
src/net/wisedog/android/whooing/activity/BbsArticleFragment.java
[ "public class Define {\n public static boolean DEBUG = false;\n \n\tpublic static String APP_ID = \"125\";\n\tpublic static String APP_SECRET = \"1c5224ad2961704a6076c0bda127003933828a16\";\n\tpublic static String PIN = null;\n\tpublic static String REAL_TOKEN = null;\n\tpublic static int USER_ID = -1;\n\tpub...
import java.net.MalformedURLException; import java.net.URL; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import net.wisedog.android.whooing.Define; import net.wisedog.android.whooing.R; import net.wisedog.android.whooing.dataset.BoardItem; import net.wisedog.android.whooing.netw...
/* * Copyright (C) 2013 Jongha Kim * * 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...
String dateString = DateUtil.getDateWithTimestamp(objResult.getLong("timestamp") * 1000);
5
Flibio/JobsLite
src/main/java/me/flibio/jobslite/listeners/PlayerBlockBreakListener.java
[ "@SuppressWarnings(\"deprecation\")\n@Plugin(id = ID, name = NAME, version = VERSION, dependencies = {}, description = DESCRIPTION)\npublic class JobsLite {\n\n private static JobsLite instance;\n\n @Inject @ConfigDir(sharedRoot = false) Path configDir;\n\n @SuppressWarnings(\"unused\") @Inject private Met...
import com.google.common.collect.ImmutableMap; import io.github.flibio.utils.message.MessageStorage; import me.flibio.jobslite.JobsLite; import me.flibio.jobslite.api.Job; import me.flibio.jobslite.api.JobManager; import me.flibio.jobslite.api.PlayerManager; import me.flibio.jobslite.api.Reward; import me.flibio.jobsli...
/* * This file is part of JobsLite, licensed under the MIT License (MIT). * * Copyright (c) 2015 - 2018 Flibio * Copyright (c) Contributors * * 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 So...
Optional<Job> jOpt = jobManager.getJob(jobString);
1
Niels-NTG/FTLAV
src/main/java/net/blerf/ftl/parser/SavedGameParser.java
[ "public class AdvancedFTLConstants implements FTLConstants {\n\n\tprivate final List<CrewType> crewTypes;\n\n\n\tpublic AdvancedFTLConstants() {\n\t\tList<CrewType> mutableCrewTypes = new ArrayList<>();\n\t\tmutableCrewTypes.add(CrewType.ANAEROBIC);\n\t\tmutableCrewTypes.add(CrewType.BATTLE);\n\t\tmutableCrewTypes....
import net.blerf.ftl.constants.AdvancedFTLConstants; import net.blerf.ftl.constants.Difficulty; import net.blerf.ftl.constants.FTLConstants; import net.blerf.ftl.constants.OriginalFTLConstants; import net.blerf.ftl.model.ShipLayout; import net.blerf.ftl.xml.CrewBlueprint; import net.blerf.ftl.xml.DroneBlueprint; import...
if (headerAlpha == 7 || headerAlpha == 8 || headerAlpha == 9) { gameState.setCurrentBeaconId(readInt(in)); gameState.setWaiting(readBool(in)); gameState.setWaitEventSeed(readInt(in)); gameState.setUnknownEpsilon(readString(in)); gameState.setSectorHazardsVisible(readBool(in)); gameState.setR...
ShipBlueprint shipBlueprint = DataManager.get().getShip(shipBlueprintId);
6
spullara/mysql-connector-java
src/test/java/testsuite/regression/ResultSetRegressionTest.java
[ "public abstract class BaseTestCase extends TestCase {\n\tprivate final static String ADMIN_CONNECTION_PROPERTY_NAME = \"com.mysql.jdbc.testsuite.admin-url\";\n\n\tprivate final static String NO_MULTI_HOST_PROPERTY_NAME = \"com.mysql.jdbc.testsuite.no-multi-hosts-tests\";\n\n\t/**\n\t * JDBC URL, initialized from c...
import java.io.Reader; import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.math.BigDecimal; import java.sql.CallableStatement; import java.sql.Clob; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.Date; import jav...
for (int maxRowIndex = 0; maxRowIndex < maxRows.size(); maxRowIndex++) { int maxRowsToExpect = ((Integer) maxRows.get(maxRowIndex)) .intValue(); fetchStmt.setMaxRows(maxRowsToExpect); int rowCount = 0; this.rs = fetchStmt .executeQuery("SELECT * FROM testBug25517"); while...
StandardLogger.bufferedLog = advisorBuf;
5
kristian/JDigitalSimulator
src/main/java/lc/kra/jds/contacts/DragContact.java
[ "public class Simulation extends JComponent implements Scrollable, Printable {\n\tprivate static final long serialVersionUID = 1l;\n\n\tpublic enum Layer { TOPMOST, BOTTOMMOST; }\n\n\tprivate static final Color SELECTION = new Color(10, 200, 10, 75);\n\tprivate static final Dimension SIZE = new Dimension(2000, 2000...
import lc.kra.jds.exceptions.LocationOutOfBoundsException; import lc.kra.jds.exceptions.WireNotConnectable; import lc.kra.jds.gui.Guitilities; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Point; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseList...
/* * JDigitalSimulator * Copyright (C) 2017 Kristian Kraljic * * 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. *...
public DragContact(final Simulation simulation, final Class<? extends Contact> cls) {
0
tommai78101/Marble-Run
src/nttu/edu/graphics/RenderView.java
[ "public class LevelSelectionActivity extends Activity implements OnItemClickListener, View.OnClickListener {\n\t\n\tGridView grid;\n\tButton backButton;\n\tpublic static final int MAX_STAGES = 15;\n\tfinal int[] resources = new int[]{R.drawable.s1, R.drawable.s2, R.drawable.s3, R.drawable.s4, R.drawable.s5, R.drawa...
import java.io.IOException; import nttu.edu.activities.LevelSelectionActivity; import nttu.edu.activities.PlayActivity; import nttu.edu.handler.ImageInfo; import nttu.edu.hud.BestScore; import nttu.edu.hud.TimeBasedScore; import nttu.edu.level.HUD; import nttu.edu.level.Stage; import nttu.edu.score.Format; import nttu....
package nttu.edu.graphics; public class RenderView extends SurfaceView implements Runnable { SurfaceHolder holder; Handler tickHandler; Handler renderHandler; PlayActivity parent; Stage stage; //------------------- public HUD hud; BestScore best;
public TimeBasedScore timeScore;
4
noctarius/snowcast
src/main/java/com/noctarius/snowcast/impl/operations/BackupDetachLogicalNodeOperation.java
[ "public final class SnowcastEpoch {\n\n private static final long INITIALIZATION_TIMESTAMP = System.currentTimeMillis();\n private static final long INITIALIZATION_NANOTIME = System.nanoTime();\n\n private final long offset;\n\n private SnowcastEpoch(@Nonnegative long offset) {\n this.offset = of...
import com.hazelcast.nio.Address; import com.hazelcast.nio.ObjectDataInput; import com.hazelcast.nio.ObjectDataOutput; import com.hazelcast.spi.BackupOperation; import com.noctarius.snowcast.SnowcastEpoch; import com.noctarius.snowcast.impl.NodeSequencerService; import com.noctarius.snowcast.impl.SequencerDataSerialize...
/* * Copyright (c) 2015-2017, Christoph Engelbert (aka noctarius) and * contributors. 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/li...
private SequencerDefinition definition;
3
xda/XDA-One
android/src/main/java/com/xda/one/ui/PostPagerFragment.java
[ "public interface ThreadClient {\n\n public EventBus getBus();\n\n public ResponseUnifiedThreadContainer getThreads(final int forumId, final int page);\n\n public ResponseUnifiedThreadContainer getParticipatedThreads(final int page);\n\n public ResponseUnifiedThreadContainer getSubscribedThreads(final i...
import com.squareup.otto.Subscribe; import com.xda.one.R; import com.xda.one.api.inteface.ThreadClient; import com.xda.one.api.model.response.ResponseUnifiedThread; import com.xda.one.api.model.response.container.ResponsePostContainer; import com.xda.one.api.retrofit.RetrofitThreadClient; import com.xda.one.event.threa...
private HierarchySpinnerAdapter mSpinnerAdapter; private ResponsePostContainer mContainerArgument; private Callback mCallback; private int mTargetHeight; private PostPageAdapter mPageAdapter; private TextView mTopBar; private View mFirst; private View mLast; public static Pos...
mPageRecyclerView.setLayoutManager(new XDALinerLayoutManager(getActivity()));
7
52North/Supervisor
core/src/main/java/org/n52/supervisor/resources/Checks.java
[ "@Singleton\npublic class CheckerResolver {\n\n private static Logger log = LoggerFactory.getLogger(CheckerResolver.class);\n\n\t@Inject\n\tprivate Set<RunnerFactory> factories;\n \n public CheckRunner getRunner(final Check check) {\n log.debug(\"Resolving check: {}\", check);\n // String che...
import java.net.URI; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import javax.ws.rs.DefaultValue; import javax.ws.rs.GET; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam;...
/** * Copyright (C) 2013 - 2014 52°North Initiative for Geospatial Open Source Software 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/LIC...
final Check check = checkDatabase.getCheck(id);
1
citysearch/web-widgets
src/main/java/com/citysearch/webwidget/facade/ConquestNearByPlacesFacade.java
[ "public class HouseAd {\n private String title;\n private String tagLine;\n private String destinationUrl;\n private String imageURL;\n private String trackingUrl;\n private String displayUrl;\n\n public String getTrackingUrl() {\n return trackingUrl;\n }\n\n public void setTrackin...
import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.TreeSet; import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import com.citysearch.webwidget.bean.HouseAd; import com.citysearch.webwidget.bean.NearbyPlace; import com.citysearch.webwidget.bean.NearbyPlaces...
package com.citysearch.webwidget.facade; public class ConquestNearByPlacesFacade extends AbstractNearByPlacesFacade { private Logger log = Logger.getLogger(getClass()); protected ConquestNearByPlacesFacade(String contextPath, int displaySize) { super(contextPath, displaySize); } public Nea...
List<NearbyPlace> nearbyPlaces = getAdsFromPFP(request, null, getDisplaySize());
1
xuzhenyang/ZeroCola
src/main/java/co/lilpilot/blog/controller/AdminPostController.java
[ "@Data\npublic class CustomPage<T> {\n private int pageIndex;\n private int pageSize;\n private int totalPage;\n private int totalNumber;\n private List<T> data = Collections.emptyList();\n\n public CustomPage() {\n this.pageIndex = 1;\n this.pageSize = 10;\n this.totalPage = ...
import co.lilpilot.blog.model.CustomPage; import co.lilpilot.blog.model.Post; import co.lilpilot.blog.model.enums.PostStatusEnum; import co.lilpilot.blog.model.vo.PostListVO; import co.lilpilot.blog.service.PostService; import co.lilpilot.blog.util.Result; import io.swagger.annotations.ApiImplicitParam; import io.swagg...
package co.lilpilot.blog.controller; /** * Created by lilpilot on 2017/5/25. */ @RestController @RequestMapping("/api/v1/admin") @Slf4j public class AdminPostController { @Autowired
private PostService postService;
4
SkaceKamen/sqflint
src/cz/zipek/sqflint/sqf/operators/ParamsOperator.java
[ "public class Linter extends SQFParser {\n\tpublic static final int CODE_OK = 0;\n\tpublic static final int CODE_ERR = 1;\n\t\n\tprivate final List<SQFParseException> errors = new ArrayList<>();\n\tprivate final List<Warning> warnings = new ArrayList<>();\n\t\n\tprivate final List<SQFInclude> includes = new ArrayLi...
import cz.zipek.sqflint.sqf.SQFExpression; import cz.zipek.sqflint.sqf.SQFString; import cz.zipek.sqflint.linter.Linter; import cz.zipek.sqflint.linter.SQFVariable; import cz.zipek.sqflint.parser.SQFParser; import cz.zipek.sqflint.parser.Token; import cz.zipek.sqflint.sqf.SQFArray; import cz.zipek.sqflint.sqf.SQFBlock;...
/* * The MIT License * * Copyright 2016 Jan Zípek (jan at zipek.cz). * * 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 * t...
public void analyze(Linter source, SQFContext context, SQFExpression expression) {
0
OpenNTF/POI4Xpages
poi4xpages/bundles/biz.webgate.dominoext.poi/src/biz/webgate/dominoext/poi/component/kernel/SimpleViewExportProcessor.java
[ "public class UISimpleViewExport extends UIComponentBase implements FacesAjaxComponent {\n\n\tpublic static final String COMPONENT_TYPE = \"biz.webgate.dominoext.poi.SVE\"; //$NON-NLS-1$\n\tpublic static final String COMPONENT_FAMILY = \"biz.webgate.dominoext.poi.SVE\"; //$NON-NLS-1$\n\tpublic static final String R...
import biz.webgate.dominoext.poi.utils.logging.ErrorPageBuilder; import lotus.domino.Database; import lotus.domino.NotesException; import lotus.domino.View; import lotus.domino.ViewEntryCollection; import javax.faces.context.FacesContext; import javax.faces.el.MethodBinding; import javax.servlet.http.HttpServletRespons...
/** * Copyright (c) 2012-2021 WebGate Consulting AG and others * * 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 ...
ErrorPageBuilder.getInstance().processError(httpResponse, "SimpleViewExport failed: No exportFormat defined or not valid (exportFormat = " + strExpFormat + ").", null);
8
OpenModLoader/OpenModLoader
src/main/java/com/openmodloader/loader/BuiltinModConfigurator.java
[ "public class EventContext {\n}", "public interface IModConfig {\n default void apply(IModConfigurator configurator) {\n configurator.configure(this);\n }\n\n void addEventConfig(IEventConfig config);\n\n void addRegistrationConfig(IRegistrationConfig config);\n\n Collection<IEventConfig> ge...
import com.openmodloader.api.event.EventContext; import com.openmodloader.api.mod.config.IModConfig; import com.openmodloader.api.mod.config.IModConfigurator; import com.openmodloader.api.mod.config.SimpleEventConfig; import com.openmodloader.core.event.GuiEvent; import net.minecraft.client.gui.menu.GuiMainMenu; import...
package com.openmodloader.loader; public class BuiltinModConfigurator implements IModConfigurator { @Override public void configure(IModConfig config) {
config.addEventConfig(SimpleEventConfig.builder()
3
WojciechZankowski/iextrading4j-hist
iextrading4j-hist-test/src/test/java/pl/zankowski/iextrading4j/hist/test/segment/TOPS16SegmentTest.java
[ "public enum IEXMessageType implements IEXByteEnum {\n\n QUOTE_UPDATE((byte) 0x51),\n TRADE_REPORT((byte) 0x54),\n TRADE_BREAK((byte) 0x42),\n SYSTEM_EVENT((byte) 0x53),\n SECURITY_DIRECTORY((byte) 0x44),\n TRADING_STATUS((byte) 0x48),\n OPERATIONAL_HALT_STATUS((byte) 0x4f),\n SHORT_SALE_PRI...
import org.junit.jupiter.api.Test; import pl.zankowski.iextrading4j.hist.api.IEXMessageType; import pl.zankowski.iextrading4j.hist.api.field.IEXPrice; import pl.zankowski.iextrading4j.hist.api.message.IEXMessage; import pl.zankowski.iextrading4j.hist.api.message.IEXMessageHeader; import pl.zankowski.iextrading4j.hist.a...
package pl.zankowski.iextrading4j.hist.test.segment; class TOPS16SegmentTest extends ExtendedUnitTestBase { @Test void testTOPS16Segment() throws IOException { final byte[] packet = loadPacket("TOPS16Segment.dump"); final IEXTOPSMessageBlock segment = (IEXTOPSMessageBlock) IEXTOPSMessageBl...
assertThat(messageHeader.getMessageProtocolID()).isEqualTo(IEXMessageProtocol.TOPS_1_6);
4
open-io/oio-api-java
src/test/java/io/openio/sds/TestHelper.java
[ "public class Hash {\n\n\tprivate MessageDigest md;\n\n\tprivate Hash(MessageDigest md) {\n\t\tthis.md = md;\n\t}\n\n\t/**\n\t * Returns an {@link Hash} instance ready to compute a md5 hash\n\t * \n\t * @return an {@link Hash} instance ready to compute a md5 hash\n\t */\n\tpublic static Hash md5() {\n\t\ttry {\n\t\...
import static java.lang.String.format; import java.io.ByteArrayOutputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.List; import java.util.Random; import io.openio.sds.common.Hash; import io.openio.sds.models.ChunkInfo; ...
package io.openio.sds; public class TestHelper { private static final String TEST_ACCOUNT = "TEST"; private static String defaultNs = "OPENIO"; private static boolean isLoaded = false; private static Settings settings = null; public static ProxySettings proxySettings() { return setting...
public static ObjectInfo newTestObjectInfo(OioUrl url, long size) {
2
s4/core
src/main/java/io/s4/adapter/Adapter.java
[ "public class EventWrapper {\n private List<CompoundKeyInfo> compoundKeys = null;\n private List<List<String>> compoundKeyNames = null;\n private Object event;\n private String streamName;\n\n public List<CompoundKeyInfo> getCompoundKeys() {\n return compoundKeys;\n }\n\n public Object g...
import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; import org.apache.log4j.Logger; import org.springframework.context.ApplicationContext; import org.springframework.context.support.FileSystemXmlApplicationContext; import io.s4.collector.EventWrapper; import io.s4.dispatcher.EventDispat...
/* * Copyright (c) 2010 Yahoo! Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
public void processEvent(EventWrapper eventWrapper) {
0
gems-uff/prov-viewer
src/main/java/br/uff/ic/debugging/Physics.java
[ "public class GuiButtons {\n\n /**\n * Method to exit the application\n */\n public static void Exit() {\n System.exit(0);\n }\n \n public static void Delete(Variables variables){\n Collection picked = new HashSet(variables.view.getPickedVertexState().getPicked());\n GuiF...
import br.uff.ic.provviewer.GUI.GuiButtons; import br.uff.ic.provviewer.GUI.GuiReadFile; import br.uff.ic.utility.GraphAttribute; import static br.uff.ic.provviewer.ProvDebugger.DebugTrials; import br.uff.ic.utility.graph.ActivityVertex; import br.uff.ic.utility.graph.Edge; import br.uff.ic.utility.graph.EntityVertex; ...
edge = new Edge("trial_" + trial + "_e3", e3, e4); edges.put(edge.getID(), edge); edge = new Edge("trial_" + trial + "_e4", e4, e5); edges.put(edge.getID(), edge); edge = new Edge("trial_" + trial + "_e5", e5, e6); edges.put(edge.getID(), edge); ...
Vertex fire = new ActivityVertex("trial_" + trial + "_Fire", "Fire", "");
4
SamuelGjk/GComic
app/src/main/java/moe/yukinoneko/gcomic/module/gallery/PictureFragment.java
[ "public abstract class BaseFragment<T extends BasePresenter> extends Fragment {\n\n protected T presenter;\n\n protected Unbinder unbinder;\n\n @Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(provideVie...
import android.content.Context; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.view.View; import android.widget.ProgressBar; import com.bumptech.glide.Glide; import com.bumptech.glide.load.model.GlideUrl; import com.bumptech.glide.load.resource.drawable.GlideDrawable; import co...
/* * 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. * ...
((ExternalGalleryActivity) getActivity()).toggleSystemUi();
4
longtaoge/SelectName
app/src/main/java/org/xiangbalao/selectname/utils/DataUtil.java
[ "public class DatabaseHelper extends OrmLiteSqliteOpenHelper {\n\tprivate static Class<?>[] clazzes;\n\tprivate static String dataBaseName;\n\tprivate static int dataBaseVersion;//\n\t@SuppressWarnings(\"unused\")\n\tprivate static String password;// 数据库加密时使用\n\tprivate static DatabaseHelper instance;\n\n\tpublic s...
import android.content.Context; import com.j256.ormlite.dao.Dao; import org.xiangbalao.common.db.DatabaseHelper; import org.xiangbalao.common.util.LogUtils; import org.xiangbalao.selectname.R; import org.xiangbalao.selectname.model.Number; import org.xiangbalao.selectname.model.Word; import org.xiangbalao.selectname.ui...
package org.xiangbalao.selectname.utils; public class DataUtil { private static String DB_PATH = "/data/data/org.xiangbalao.selectname/databases/"; private String DB_NAME = "name.db"; private java.lang.String ASSETS_NAME = "name.db"; public DataUtil() { } public void initDb(Context conte...
DatabaseHelper helper = DatabaseHelper.getInstance(context);
0
pimps/ysoserial-modified
src/main/java/ysoserial/payloads/Spring2.java
[ "public class CmdExecuteHelper {\n\t\n\tprivate String terminalType;\n\t\n\tprivate String[] commandArray;\n\t\n\tprivate String command;\n\n\tpublic CmdExecuteHelper(String terminalType, String command) {\n\t\tsuper();\n\t\tthis.terminalType = terminalType;\n\t\tthis.command = command;\n\t\t\n\t\tswitch (terminalT...
import static java.lang.Class.forName; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Type; import javax.xml.transform.Templates; import org.springframework.aop.framework.AdvisedSupport; import org.springframework.aop.target.SingletonTargetSource; import ysoserial.payloads.annotation.Dependencies;...
package ysoserial.payloads; /** * * Just a PoC to proof that the ObjectFactory stuff is not the real problem. * * Gadget chain: * TemplatesImpl.newTransformer() * Method.invoke(Object, Object...) * AopUtils.invokeJoinpointUsingReflection(Object, Method, Object[]) * JdkDynamicAopProxy.invoke(Object, Me...
final Object templates = Gadgets.createTemplatesImpl(cmdHelper.getCommandArray());
1
PeterisP/morphology
src/main/java/lv/semti/morphology/lexicon/Lexicon.java
[ "public class AllEndings {\n\tprivate ArrayList<Ending> endings;\n\tprivate node root = new node(' ');\n\t\n\tpublic AllEndings(List<Ending> endingsource) {\n\t\tendings = new ArrayList<Ending>();\n\t\tendings.addAll(endingsource);\n\t\tfor (Ending e : endingsource) { add(e); };\n\t\troot.populate(new LinkedList<En...
import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; import lv.semti.morphology.analyzer.AllEndings; import lv...
File backupfile = new File(failaVārds + ".bak"); Writer straume = new BufferedWriter(new OutputStreamWriter( new FileOutputStream(newfile), "UTF-8")); straume.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); straume.write("<Lexicon revision=\"" + (revision != null ? revision : "") + "\" licenc...
ArrayList<Variants> celmi = Mijas.mijuVarianti(stem, mija, word.matches("\\p{Lu}.*"));
1
bingoogolapple/Graduation-Design
FrogCare/src/com/bingoogol/frogcare/receiver/BootCompleteReceiver.java
[ "public class ApplockService extends Service {\n\tprivate static final String TAG = \"ApplockService\";\n\tprivate AppLockDao mAppLockDao;\n\tprivate boolean mIsWatching;\n\tprivate List<String> mTempStopProtectPackageNames;\n\tprivate List<String> mProtectPackageNames;\n\n\tprivate ApplockObserver mApplockObserver...
import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.Date; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.graphics.PixelFormat; import android.hardware.Camera; import android.hardware.Camera.Parameters...
package com.bingoogol.frogcare.receiver; public class BootCompleteReceiver extends BroadcastReceiver { private static final String TAG = "BootCompleteReceiver"; private WindowManager wm; private Camera camera; private SurfaceView surfaceView; private Callback cameraPreviewHolderCallback = new Callback() { @...
File imgFile = new File(StorageUtil.getTheftDir(), DateUtil.dateToSecondsString(new Date()) + ".jpg");
2
flexgp/flexgp
mrgp-flexgp/src/evogpj/test/GetFinalModels.java
[ "public class CSVDataJava extends ScaledData {\n\t/**\n\t * Parse given csvfile into set of input and target values.\n\t * \n\t * @param csvfile file of comma-separated values, last value in each line is\n\t * the target value\n\t */\n\tpublic CSVDataJava(String csvfile) {\n\t\tsuper(DataSizeRetreiver.num_fi...
import evogpj.evaluation.java.CSVDataJava; import evogpj.evaluation.java.DataJava; import evogpj.genotype.Tree; import evogpj.genotype.TreeGenerator; import evogpj.gp.Individual; import evogpj.math.Function; import java.io.BufferedWriter; import java.io.File; import java.io.FileNotFoundException; import java.io.FileRea...
/** * Copyright (c) 2011-2014 Evolutionary Design and Optimization Group * * Licensed under the MIT License. * * See the "LICENSE" file for a copy of the license. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHAN...
Tree g = TreeGenerator.generateTree(model);
2
Yuanhongliang/HLOLI
app/src/main/java/com/xiaoyuan/hloli/ui/home/fragment/OtherFragment.java
[ "public class Channel implements Serializable{\n\n /**\n * id : 12\n * chnl_type :\n * showhot : 0\n * specil : 0\n * is_entry : 0\n * name : 最新\n * img :\n * subtitle :\n * shownew : 0\n * tag_custom :\n * intent :\n * bgcolor :\n * url :\n */\n private...
import android.support.design.widget.TabLayout; import android.support.v4.app.Fragment; import android.support.v4.view.ViewPager; import android.util.Log; import com.xiaoyuan.hloli.R; import com.xiaoyuan.hloli.bean.Channel; import com.xiaoyuan.hloli.manager.SharedPreManager; import com.xiaoyuan.hloli.ui.base.BaseActivi...
package com.xiaoyuan.hloli.ui.home.fragment; /** * 其他页面 * Created by yuan on 2017/4/25. */ public class OtherFragment extends BaseFragment { @Bind(R.id.frag_other_tab) TabLayout tabLayout; @Bind(R.id.frag_other_vp) ViewPager viewPager; List<String> titles = new ArrayList<>(); List<Fragm...
viewPager.setAdapter(new BaseFragmentAdapter(((BaseActivity) context).getSupportFragmentManager(), fragments, titles));
4
idega/com.idega.formbuilder
src/java/com/idega/formbuilder/presentation/components/FBHomePage.java
[ "public class FBComponentBase extends IWBaseComponent {\n\n\tpublic static final String COMPONENT_FAMILY = \"formbuilder\";\n\n\tprotected Logger logger = Logger.getLogger(FBComponentBase.class.getName());\n\n\tprivate String id;\n\tprivate String styleClass;\n\n\tpublic FBComponentBase() {\n\t\tthis(null, null);\n...
import java.rmi.RemoteException; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Locale; import javax.faces.context.FacesContext; import org.springframework.beans.factory.annotation.Autowired; import com.idega.block.web2.business.JQuery; import com.idega.block.web2.bus...
package com.idega.formbuilder.presentation.components; public class FBHomePage extends FBComponentBase { public static final String COMPONENT_TYPE = "HomePage"; private static final String CONTAINER_DIV_ID = "fbHomePage"; private static final String CONTAINER_HEADER_ID = "fbHomePageHeaderBlock"; private stat...
FormDocument formDocument = (FormDocument) WFUtil.getBeanInstance(FormDocument.BEAN_ID);
4
whiskeyfei/SimpleNews.io
app/src/main/java/com/kong/app/blog/BlogPresenter.java
[ "public class Feed {\n\n private String title;\n private String description;\n private String home_page_url;\n private String feed_url;\n private boolean expired;\n private List<PostsBean> posts;\n\n public String getTitle() {\n return title;\n }\n\n public void setTitle(String tit...
import com.google.gson.reflect.TypeToken; import com.kong.app.blog.model.Feed; import com.kong.app.news.commons.ApiConstants; import com.kong.lib.mvp.ISchedulerProvider; import com.kong.lib.mvp.Injection; import com.kong.lib.utils.GsonUtils; import com.kong.lib.utils.OkHttpUtils; import com.kong.lib.utils.StringUtils; ...
package com.kong.app.blog; /** * Created by CaoPengfei on 17/6/21. */ public class BlogPresenter implements BlogContract.Presenter { private final BlogContract.View mView; private final ISchedulerProvider mSchedulerProvider; private final CompositeSubscription mSubscriptions; public BlogPresente...
public Observable<Feed> getObservable() {
0
Wackymax/CPOrm
CPOrm/src/main/java/za/co/cporm/provider/CPOrmContentProvider.java
[ "public class CPOrm {\n\n private static Context applicationContext;\n private static TableDetailsCache tableDetailsCache;\n\n public enum ChangeType {\n INSERT,\n UPDATE,\n DELETE\n }\n\n /**\n * This is an optional initialize method that can be used to set the application c...
import android.annotation.TargetApi; import android.content.ContentProvider; import android.content.ContentProviderOperation; import android.content.ContentProviderResult; import android.content.ContentValues; import android.content.Context; import android.content.OperationApplicationException; import android.content.p...
package za.co.cporm.provider; /** * The base content provided that will expose all of the model objects. * Objects are expose in the form of authority/table_name/* */ public class CPOrmContentProvider extends ContentProvider { public static final String PARAMETER_OFFSET = "OFFSET"; public static final S...
protected CPOrmDatabase database;
2
captain-miao/bleYan
example/src/main/java/com/github/captain_miao/android/bluetoothletutorial/fragment/BleDevicesFragment.java
[ "public class BleScanner {\n private final static String TAG = BleScanner.class.getName();\n public BaseBleScanner bleScanner;\n\n public BleScanner(Context context, final SimpleScanCallback callback) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n bleScanner = new Loll...
import android.Manifest; import android.app.Activity; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.content.Context; import android.content.Intent; import android.location.LocationManager; import android.os.Build; import android.os.Bundle; import android.provider.Se...
package com.github.captain_miao.android.bluetoothletutorial.fragment; /** * @author Yan Lu * @since 2015-07-23 */ public class BleDevicesFragment extends BaseFragment implements SimpleScanCallback, PermissionListener { private static final String TAG = BleDevicesFragment.class.getSimpleName(); private...
private List<BleDevice> mDataList = new ArrayList<>();
7
cmu-db/peloton-test
src/main/java/edu/cmu/cs/db/peloton/test/generate/defn/Join.java
[ "public final class DatabaseDefinition {\n private final Map<String, Map<String, ColumnInfo>> tables;\n\n public static final class ColumnInfo {\n private final JDBCType type;\n\n ColumnInfo(JDBCType type) {\n this.type = type;\n }\n\n public JDBCType getType() {\n ...
import com.google.common.collect.Sets; import edu.cmu.cs.db.peloton.test.common.DatabaseDefinition; import edu.cmu.cs.db.peloton.test.generate.ast.Ast; import edu.cmu.cs.db.peloton.test.generate.ast.Context; import edu.cmu.cs.db.peloton.test.generate.defn.operators.SqlBinaryOperator; import edu.cmu.cs.db.peloton.test.g...
package edu.cmu.cs.db.peloton.test.generate.defn; /** * Created by tianyuli on 5/7/17. */ public class Join implements Ast.Elem { private static List<String> joins = Arrays.asList("JOIN", "LEFT JOIN", "RIGHT JOIN", "FULL JOIN"); @Override public Optional<Ast.Clause> generate(DatabaseDefinition db, Con...
String leftTable = RandomUtils.randomElement(db.tables(), random);
5
lecho/campus
campus/src/lecho/app/campus/fragment/PlaceDetailsFragment.java
[ "public class GalleryActivity extends SherlockFragmentActivity implements OnImagesDirListener {\n\tpublic static final String TAG = \"PlaceDetailsActivity\";\n\tprivate ViewPager mPager;\n\tprivate ProgressBar mProgressBar;\n\tprivate LinePageIndicator mIndicator;\n\tprivate String mSymbol;\n\n\t@Override\n\tprotec...
import java.io.File; import lecho.app.campus.R; import lecho.app.campus.activity.GalleryActivity; import lecho.app.campus.dao.Unit; import lecho.app.campus.loader.PlaceDetailsLoader; import lecho.app.campus.utils.BitmapAsyncTask; import lecho.app.campus.utils.Config; import lecho.app.campus.utils.PlaceDetails; import l...
package lecho.app.campus.fragment; /** * Displays Place details, image, name, symbol etc. * * @author Lecho * */ public class PlaceDetailsFragment extends SherlockFragment implements LoaderCallbacks<PlaceDetails> { public static final String TAG = "PlaceDetailsFragment"; private static final int PLACE_DETA...
return new PlaceDetailsLoader(getActivity().getApplicationContext(), getArguments().getLong(
2
marbl/MHAP
src/main/java/edu/umd/marbl/mhap/main/AlignmentTry.java
[ "public final class AlignElementDoubleSketch<T extends Sketch<T>> implements AlignElement<AlignElementDoubleSketch<T>>\n{\n\tprivate final T[] elements;\n\tprivate final int seqLength;\n\tprivate final int stepSize;\n\t\n\tpublic AlignElementDoubleSketch(T[] sketchArray, int stepSize, int seqLength)\n\t{\n\t\tthis....
import edu.umd.marbl.mhap.align.Aligner; import edu.umd.marbl.mhap.align.Alignment; import edu.umd.marbl.mhap.impl.MinHashBitSequenceSubSketches; import edu.umd.marbl.mhap.impl.OverlapInfo; import edu.umd.marbl.mhap.sketch.MinHashBitSketch; import edu.umd.marbl.mhap.sketch.ZeroNGramsFoundException; import edu.umd.marbl...
/* * MHAP package * * This software is distributed "as is", without any warranty, including * any implied warranty of merchantability or fitness for a particular * use. The authors assume no responsibility for, and shall not be liable * for, any special, indirect, or consequential damages, or any damages * w...
Aligner<AlignElementString> aligner = new Aligner<AlignElementString>(true, -2.0, -1*Float.MAX_VALUE, 0.0);
1
MyGrades/mygrades-app
app/src/main/java/de/mygrades/database/dao/DaoMaster.java
[ "public class UniversityDao extends AbstractDao<University, Long> {\n\n public static final String TABLENAME = \"UNIVERSITY\";\n\n /**\n * Properties of entity University.<br/>\n * Can be used for QueryBuilder and for referencing column names.\n */\n public static class Properties {\n pub...
import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase.CursorFactory; import android.database.sqlite.SQLiteOpenHelper; import android.util.Log; import de.greenrobot.dao.AbstractDaoMaster; import de.greenrobot.dao.identityscope.IdentityScopeType; impo...
package de.mygrades.database.dao; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. /** * Master of DAO (schema version 4): knows all DAOs. */ public class DaoMaster extends AbstractDaoMaster { public static final int SCHEMA_VERSION = 4; /** Creates underlying database table using DAOs. */ public st...
OverviewDao.createTable(db, ifNotExists);
6
SolraBizna/jarm
src/name/bizna/ocarm/CP7.java
[ "public class AlignmentException extends Exception {\n\tstatic final long serialVersionUID = 1;\n}", "public final class BusErrorException extends Exception {\n\n\tprivate static final long serialVersionUID = 1;\n\n\tprivate final String reason;\n\tprivate final long address;\n\tprivate final AccessType accessTyp...
import java.nio.BufferOverflowException; import java.nio.CharBuffer; import name.bizna.jarm.AlignmentException; import name.bizna.jarm.BusErrorException; import name.bizna.jarm.CPU; import name.bizna.jarm.EscapeCompleteException; import name.bizna.jarm.EscapeRetryException; import name.bizna.jarm.SaneCoprocessor; impor...
package name.bizna.ocarm; public class CP7 extends SaneCoprocessor { CharBuffer buffer = CharBuffer.allocate(1024);
CP7(CPU cpu) { super(cpu); }
2
bit-man/SwissArmyJavaGit
javagit/src/main/java/edu/nyu/cs/javagit/client/cli/CliGitAdd.java
[ "public final class JavaGitConfiguration {\n\n /*\n * The path to our git binaries. Default to null, which means that the git command is available\n * via the system PATH environment variable.\n */\n private static File gitPath = null;\n\n /*\n * The version string fpr the locally-installed git binaries....
import edu.nyu.cs.javagit.api.JavaGitConfiguration; import edu.nyu.cs.javagit.api.JavaGitException; import edu.nyu.cs.javagit.api.commands.GitAddOptions; import edu.nyu.cs.javagit.api.commands.GitAddResponse; import edu.nyu.cs.javagit.client.GitAddResponseImpl; import edu.nyu.cs.javagit.client.IGitAdd; import edu.nyu.c...
/* * ==================================================================== * Copyright (c) 2008 JavaGit Project. All rights reserved. * * This software is licensed using the GNU LGPL v2.1 license. A copy * of the license is included with the distribution of this source * code in the LICENSE.txt file. The text o...
CheckUtilities.checkFileValidity(repositoryPath);
3
EndlessCodeGroup/RPGInventory
src/main/java/ru/endlesscode/rpginventory/item/Texture.java
[ "public class MaterialCompat {\n @NotNull\n public static Material getMaterial(String name) {\n return Objects.requireNonNull(getMaterialOrNull(name));\n }\n\n @NotNull\n public static Material getMaterialOrAir(String name) {\n Material material = getMaterialOrNull(name);\n if (m...
import com.comphenix.protocol.wrappers.nbt.NbtCompound; import com.comphenix.protocol.wrappers.nbt.NbtFactory; import org.bukkit.Color; import org.bukkit.Material; import org.bukkit.inventory.ItemFlag; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.Damageable; import org.bukkit.inventory.meta.I...
package ru.endlesscode.rpginventory.item; public class Texture { private static final Texture EMPTY_TEXTURE = new Texture(new ItemStack(Material.AIR)); @NotNull private final ItemStack prototype; private final int data; private Texture(@NotNull ItemStack prototype) { this(prototype, (s...
ItemStack item = ItemUtils.toBukkitItemStack(new ItemStack(material));
3
cvtienhoven/graylog-plugin-aggregates
src/test/java/org/graylog/plugins/aggregates/report/ReportFactoryTest.java
[ "public interface HistoryAggregateItem {\n\tpublic String getMoment();\n\t\n public long getNumberOfHits();\n \n}", "@AutoValue\n@JsonAutoDetect\npublic abstract class HistoryAggregateItemImpl implements HistoryAggregateItem{\n \n\t@JsonProperty(\"moment\")\n @Override\n public abstract String ...
import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.HashMap; import java.util.List; import java.util.Map; import org.graylog.plugins....
package org.graylog.plugins.aggregates.report; @RunWith(MockitoJUnitRunner.class) public class ReportFactoryTest { @Test public void testGenerateTimeSeriesChart() throws ParseException, FileNotFoundException{ Map<Rule, List<HistoryAggregateItem>> map = new HashMap<Rule, List<HistoryAggregateItem>>(); Cale...
ReportSchedule schedule = ReportScheduleImpl.create("1231231", "name", "expression", "P1D", false, 0L, reportReceivers);
2
OpenWatch/OpenWatch-Android
app/OpenWatch/src/org/ale/openwatch/model/OWServerObject.java
[ "public class Constants {\n\n public static final String SUPPORT_EMAIL = \"team@openwatch.net\";\n public static final String GOOGLE_STORE_URL = \"https://play.google.com/store/apps/details?id=org.ale.openwatch\";\n public static final String APPLE_STORE_URL = \"https://itunes.apple.com/us/app/openwatch-so...
import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.util.Log; import com.orm.androrm.*; import com.orm.androrm.field.*; import com.orm.androrm.migration.Migrator; import com.orm.androrm.statement.Statement; import org.ale.openwatch.constants.Constants; im...
package org.ale.openwatch.model; public class OWServerObject extends Model implements OWServerObjectInterface{ private static final String TAG = "OWMediaObject"; public CharField title = new CharField(); public IntegerField views = new IntegerField(); public IntegerField actions = new IntegerField(); publi...
setLastEdited(context, Constants.utc_formatter.format(new Date()));
0
bhatti/PlexRBAC
src/main/java/com/plexobject/rbac/service/impl/SubjectsServiceImpl.java
[ "public class ServiceFactory {\n private static RepositoryFactory REPOSITORY_FACTORY = new RepositoryFactoryImpl();\n private static PermissionManager PERMISSION_MANAGER = new PermissionManagerImpl(\n REPOSITORY_FACTORY, new JavascriptEvaluator());\n\n public static RepositoryFactory getDefaultF...
import java.util.Collection; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.DefaultValue; import javax.ws.rs.GET; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; impo...
package com.plexobject.rbac.service.impl; @Path("/security/subjects") @Component("subjectsService") @Scope("singleton") public class SubjectsServiceImpl implements SubjectsService, InitializingBean { private static final Logger LOGGER = Logger .getLogger(SubjectsServiceImpl.class); @Autowired ...
private final ServiceJMXBeanImpl mbean;
5
roybailey/research-graphql
research-graphql-product-service/src/main/java/me/roybailey/springboot/controller/ProductController.java
[ "@JsonInclude(JsonInclude.Include.NON_NULL)\n@JsonPropertyOrder({\n \"id\",\n \"name\",\n \"brand\",\n \"category\",\n \"description\",\n \"price\"\n})\n@lombok.Builder\n@lombok.NoArgsConstructor\n@lombok.AllArgsConstructor\npublic class ProductDto {\n\n @JsonProperty(\"id\")\n private Strin...
import lombok.extern.slf4j.Slf4j; import me.roybailey.data.schema.ProductDto; import me.roybailey.springboot.domain.Category; import me.roybailey.springboot.domain.Product; import me.roybailey.springboot.mapper.ProductMapper; import me.roybailey.springboot.repository.CategoryRepository; import me.roybailey.springboot.r...
package me.roybailey.springboot.controller; @Slf4j @Controller @RequestMapping(value = "/product-api/v1", produces = MediaType.APPLICATION_JSON_VALUE) public class ProductController { @Autowired
private CategoryRepository categoryRepository;
4
rwitzel/streamflyer
streamflyer-experimental/src/main/java/com/github/rwitzel/streamflyer/experimental/range/RangeFilterModifier.java
[ "public class AfterModification {\r\n\r\n //\r\n // injected\r\n //\r\n\r\n /**\r\n * See <code>ModifyingReader#newMinimumLengthOfLookBehind</code>.\r\n * <p>\r\n * The value of this property must be a non-negative number.\r\n */\r\n private int newMinimumLengthOfLookBehind;\r\n\r\n ...
import com.github.rwitzel.streamflyer.core.AfterModification; import com.github.rwitzel.streamflyer.core.Modifier; import com.github.rwitzel.streamflyer.experimental.stateful.State; import com.github.rwitzel.streamflyer.experimental.stateful.StatefulModifier; import com.github.rwitzel.streamflyer.internal.thirdpart...
/** * Copyright (C) 2011 rwitzel75@googlemail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required ...
public AfterModification modify(StringBuilder characterBuffer, int firstModifiableCharacterInBuffer,
0
jaychang0917/SimpleRecyclerView
app/src/main/java/com/jaychang/demo/srv/BasicUsageActivity.java
[ "public class BookCell extends SimpleCell<Book, BookCell.ViewHolder>\n implements Updatable<Book> {\n\n private static final String KEY_TITLE = \"KEY_TITLE\";\n private boolean showHandle;\n\n public BookCell(Book item) {\n super(item);\n }\n\n @Override\n protected int getLayoutRes() {\n return R.layo...
import android.os.Bundle; import android.support.annotation.NonNull; import android.view.View; import com.jaychang.demo.srv.cell.BookCell; import com.jaychang.demo.srv.cell.NumberCell; import com.jaychang.demo.srv.model.Book; import com.jaychang.demo.srv.util.DataUtils; import com.jaychang.demo.srv.util.ToastUtils; imp...
package com.jaychang.demo.srv; public class BasicUsageActivity extends BaseActivity { @BindView(R.id.linearVerRecyclerView) SimpleRecyclerView linearVerRecyclerView; @BindView(R.id.linearHorRecyclerView) SimpleRecyclerView linearHorRecyclerView; @BindView(R.id.gridRecyclerView) SimpleRecyclerView grid...
List<Book> books = DataUtils.getBooks();
3
Niels-NTG/FTLAV
src/main/java/net/blerf/ftl/parser/SavedGameParser.java
[ "public class AdvancedFTLConstants implements FTLConstants {\n\n\tprivate final List<CrewType> crewTypes;\n\n\n\tpublic AdvancedFTLConstants() {\n\t\tList<CrewType> mutableCrewTypes = new ArrayList<>();\n\t\tmutableCrewTypes.add(CrewType.ANAEROBIC);\n\t\tmutableCrewTypes.add(CrewType.BATTLE);\n\t\tmutableCrewTypes....
import net.blerf.ftl.constants.AdvancedFTLConstants; import net.blerf.ftl.constants.Difficulty; import net.blerf.ftl.constants.FTLConstants; import net.blerf.ftl.constants.OriginalFTLConstants; import net.blerf.ftl.model.ShipLayout; import net.blerf.ftl.xml.CrewBlueprint; import net.blerf.ftl.xml.DroneBlueprint; import...
gameState.setRebelFlagshipHop(readInt(in)); gameState.setRebelFlagshipMoving(readBool(in)); gameState.setUnknownKappa(readInt(in)); gameState.setRebelFlagshipBaseTurns(readInt(in)); } else if (headerAlpha == 2) { gameState.setSectorHazardsVisible(readBool(in)); gameState.setRebelFlagshipV...
ShipLayout shipLayout = DataManager.get().getShipLayout(shipLayoutId);
3
dubasdey/MQQueueMonitor
src/main/java/org/erc/qmm/MonitorPanel.java
[ "public class QueueConfig {\n\t\n\t/** The desc. */\n\tprivate String desc;\n\t\n\t/** The host. */\n\tprivate String host;\n\t\n\t/** The port. */\n\tprivate int port;\n\t\n\t/** The poll time. */\n\tprivate int pollTime;\n\t\n\t/** The channel. */\n\tprivate String channel;\n\t\n\t/** The manager. */\n\tprivate S...
import java.awt.BorderLayout; import java.awt.Color; import java.awt.FlowLayout; import java.text.MessageFormat; import javax.swing.BorderFactory; import javax.swing.ImageIcon; import javax.swing.JLabel; import javax.swing.JPanel; import org.erc.qmm.config.QueueConfig; import org.erc.qmm.i18n.Messages; import org.erc.q...
package org.erc.qmm; /** * The Class MonitorPanel. */ public class MonitorPanel extends JPanel { private static Log log = Log.getLog(MonitorPanel.class); /** The Constant serialVersionUID. */ private static final long serialVersionUID = 1181783867179893568L; /** The total enqueued. */ private long totalE...
inLabel.setText(Messages.getString("MonitorPanel.enqueued")); //$NON-NLS-1$
1
cytomine/Cytomine-java-client
src/test/java/client/DescriptionTest.java
[ "public class CytomineException extends Exception {\n\n private static final Logger log = LogManager.getLogger(CytomineException.class);\n\n int httpCode;\n String message = \"\";\n\n public CytomineException(Exception e) {\n super(e);\n this.message = e.getMessage();\n }\n\n public ...
import be.cytomine.client.CytomineException; import be.cytomine.client.collections.Collection; import be.cytomine.client.models.Annotation; import be.cytomine.client.models.Description; import be.cytomine.client.models.ImageInstance; import be.cytomine.client.models.Project; import org.apache.logging.log4j.LogManager; ...
package client; /* * Copyright (c) 2009-2020. Authors: see NOTICE file. * * 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 * * Unles...
Project project = Utils.getProject();
5
popo1379/popomusic
app/src/main/java/com/popomusic/videofragment/GameFragment.java
[ "public class VideoAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {\n private List<ItemList> datas;\n static final int TYPE_ITEM = 0;\n static final int TYPE_FOOTER = 1;\n private boolean showFoot = false;\n\n public VideoAdapter(List<ItemList> lists){\n this.datas=lists;\n }...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.StaggeredGridLayoutMana...
package com.popomusic.videofragment; /** * Created by popo on 2017/6/20 0020. */ public class GameFragment extends Fragment implements VideoData.View,SwipeRefreshLayout.OnRefreshListener { RecyclerView listView; VideoAdapter videoadapter;
VideoPresenter mPresent;
2
flyver/Flyver-Apps
AirQualityMonitorApp/FlyverCore/src/main/java/co/flyver/flyvercore/maincontrollers/MainControllerConsumers.java
[ "public class PIDSettings {\n\n public enum PIDKeys {\n PID_YAW_PROPORTIONAL(\"pid_yaw_p\"),\n PID_YAW_INTEGRAL(\"pid_yaw_i\"),\n PID_YAW_DERIVATIVE(\"pid_yaw_d\"),\n PID_PITCH_PROPORTIONAL(\"pid_pitch_p\"),\n PID_PITCH_INTEGRAL(\"pid_pitch_i\"),\n PID_PITCH_DERIVATIVE(\...
import co.flyver.flyvercore.pidcontrollers.PIDSettings; import co.flyver.utils.flyvermq.FlyverMQ; import co.flyver.utils.flyvermq.FlyverMQMessage; import co.flyver.utils.flyvermq.exceptions.FlyverMQException; import co.flyver.utils.flyvermq.interfaces.FlyverMQConsumer; import co.flyver.utils.settings.FlyverPreferences;
package co.flyver.flyvercore.maincontrollers; /** * Created by Petar Petrov on 2/13/15. */ public class MainControllerConsumers { FlyverMQConsumer throttleConsumer = null; FlyverMQConsumer pitchConsumer = null; FlyverMQConsumer rollConsumer = null; FlyverMQConsumer yawConsumer = null; FlyverMQC...
public void dataReceived(FlyverMQMessage message) {
2
erlymon/erlymon-monitor-android
erlymon-monitor-app/src/main/java/org/erlymon/monitor/mvp/presenter/CreateDevicePresenter.java
[ "public class MainApp extends MultiDexApplication {\n private static AppComponent sAppComponent;\n\n @Override\n public void onCreate() {\n super.onCreate();\n\n Stetho.initializeWithDefaults(this);\n\n CrashlyticsCore core = new CrashlyticsCore.Builder()\n .disabled(Bui...
import com.arellomobile.mvp.InjectViewState; import org.erlymon.monitor.MainApp; import org.erlymon.monitor.mvp.MainService; import org.erlymon.monitor.mvp.model.Device; import org.erlymon.monitor.mvp.model.User; import org.erlymon.monitor.mvp.view.CreateDeviceView; import javax.inject.Inject; import rx.Subscription;
/* * Copyright (c) 2016, Sergey Penkovsky <sergey.penkovsky@gmail.com> * * This file is part of Erlymon Monitor. * * Erlymon Monitor 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 t...
MainService mMainService;
1
richardtynan/thornsec
src/profile/router/ExtDHClient.java
[ "public interface INetworkData extends IData {\n\n\tpublic String[] getServerLabels();\n\n\tpublic String[] getDeviceLabels();\n\n\tpublic String[] getDeviceMacs();\n\n\tpublic String[] getServerProfiles(String server);\n\n\tpublic String getServerData(String server, String label);\n\n\tpublic String getServerUser(...
import java.util.Vector; import core.iface.INetworkData; import core.iface.IProfile; import core.profile.AProfile; import profile.Router; import singleton.IPTablesConf; import singleton.NetConf; import unit.fs.FileUnit;
package profile.router; public class ExtDHClient extends AProfile { public ExtDHClient() { super("router_ext_dhcp"); } public Vector<IProfile> getUnits(String server, INetworkData data) { Vector<IProfile> vec = new Vector<IProfile>();
vec.addElement(NetConf.getInstance(server, data.getLabel()).addDynamicIface("router_ext_dhcp_iface",
5
ceaseless-prayer/CeaselessAndroid
app/src/main/java/org/theotech/ceaselessandroid/fragment/PersonSupportFragment.java
[ "public interface CacheManager {\n ScriptureData getCachedScripture();\n\n void cacheScripture(ScriptureData scriptureData);\n\n String getCachedVerseImageURL();\n\n void cacheVerseImageURL(String verseImageURL);\n\n List<String> getCachedPersonIdsToPrayFor();\n\n void cachePersonIdsToPrayFor(List...
import android.os.Bundle; import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ListView; import android.widget.TextView; import com.joanzapata.iconify.widget.IconTextView; import com.makeramen.roundedimageview.RoundedIm...
package org.theotech.ceaselessandroid.fragment; public class PersonSupportFragment extends Fragment implements ICardPageFragment { private static final String TAG = PersonSupportFragment.class.getSimpleName(); @BindView(R.id.person_name) TextView personName; @BindView(R.id.person_image) Round...
private PersonManager personManager;
2
schnatterer/nusic
nusic-ui-android/src/main/java/info/schnatterer/nusic/android/activities/NusicPreferencesActivity.java
[ "@SuppressLint(\"NewApi\")\npublic class NusicPreferencesFragment extends RoboPreferenceFragment {\n\n @Inject\n private PreferenceReleasedTodayTimePickerListener releaseTodayTimePickerListener;\n @Inject\n private PreferenceVisibilityButtonListener preferenceVisibilityButtonListener;\n\n @Override\n...
import roboguice.activity.RoboAppCompatPreferenceActivity; import android.annotation.TargetApi; import android.app.Fragment; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.preference.Preference; import android.view.MenuItem; import info.schnatterer.nusic.android.fragmen...
/** * 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...
private PreferenceVisibilityButtonListener preferenceVisibilityButtonListener;
2