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
DaanVanYperen/odb-dynasty
core/src/net/mostlyoriginal/game/system/ui/DioramaSystem.java
[ "public class G {\n public static int ZOOM = 3;\n\n public static final int CANVAS_WIDTH = 160 * ZOOM;\n public static final int CANVAS_HEIGHT = 266 * ZOOM;\n public static String version = \"0.1.6\";\n\n public static final int MAX_COMPLETION = 20;\n}", "public class Burrow extends Component {\n\n...
import com.artemis.BaseSystem; import com.artemis.managers.TagManager; import com.badlogic.gdx.math.MathUtils; import net.mostlyoriginal.api.component.basic.Pos; import net.mostlyoriginal.api.plugin.extendedcomponentmapper.M; import net.mostlyoriginal.game.G; import net.mostlyoriginal.game.component.agent.Burrow; impor...
package net.mostlyoriginal.game.system.ui; /** * Sets the scene to reflect stockpiles. * <p> * Created by Daan on 27-8-2016. */ public class DioramaSystem extends BaseSystem { private static final float SUN_DISTANCE = 64; protected MinionSystem minionSystem; protected StockpileSystem stockpileSystem;...
protected M<Burrow> mBurrow;
1
idisfkj/HightCopyWX
app/src/main/java/com/idisfkj/hightcopywx/ui/widget/RegisterActivity.java
[ "public class MainActivity extends BaseActivity implements MainView {\n\n @InjectView(R.id.viewPage)\n ViewPager viewPage;\n @InjectView(R.id.wei_xin_s)\n ImageView weiXinS;\n @InjectView(R.id.address_book_s)\n ImageView addressBookS;\n @InjectView(R.id.find_s)\n ImageView findS;\n @Injec...
import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.net.Uri; impor...
package com.idisfkj.hightcopywx.ui.widget; /** * 注册 * Created by idisfkj on 16/4/27. * Email : idisfkj@qq.com. */ public class RegisterActivity extends Activity implements RegisterView, View.OnFocusChangeListener { @InjectView(R.id.register_picture) ImageView registerPicture; @InjectView(R.id.user...
ToastUtils.showShort(getResources().getString(R.string.choose_camera_error));
4
Jannyboy11/CustomRecipes
src/main/java/com/gmail/jannyboy11/customrecipes/impl/crafting/CRCraftingIngredient.java
[ "@FunctionalInterface\npublic interface CraftingIngredient extends Predicate<ItemStack>, ConfigurationSerializable {\n\t\n\t/**\n\t * Tests whether an ItemStack matches as an ingredient for the associated crafting recipe.\n\t * \n\t * @param itemStack the ItemSack to test\n\t * @return whether the ItemStack is an i...
import java.util.Map; import org.bukkit.craftbukkit.v1_12_R1.inventory.CraftItemStack; import org.bukkit.inventory.ItemStack; import com.gmail.jannyboy11.customrecipes.api.crafting.CraftingIngredient; import com.gmail.jannyboy11.customrecipes.api.crafting.vanilla.ingredient.ChoiceIngredient; import com.gmail.jannyboy11...
package com.gmail.jannyboy11.customrecipes.impl.crafting; public class CRCraftingIngredient<I extends RecipeItemStack> implements CraftingIngredient, NBTSerializable { protected final I nmsIngredient; public CRCraftingIngredient(I nmsIngredient) { this.nmsIngredient = nmsIngredient; } @Override public bo...
return NBTUtil.serializeRecipeItemStack(nmsIngredient);
6
SerCeMan/jnr-fuse
src/main/java/ru/serce/jnrfuse/FuseFS.java
[ "public class FileStat extends Struct {\n public static final int S_IFIFO = 0010000; // named pipe (fifo)\n public static final int S_IFCHR = 0020000; // character special\n public static final int S_IFDIR = 0040000; // directory\n public static final int S_IFBLK = 0060000; // block special\n pub...
import jnr.ffi.Pointer; import jnr.ffi.types.dev_t; import jnr.ffi.types.gid_t; import jnr.ffi.types.mode_t; import jnr.ffi.types.off_t; import jnr.ffi.types.size_t; import jnr.ffi.types.u_int32_t; import jnr.ffi.types.uid_t; import ru.serce.jnrfuse.struct.FileStat; import ru.serce.jnrfuse.struct.Flock; import ru.serce...
package ru.serce.jnrfuse; /** * Fuse file system. * All documentation from "fuse.h" * * @author Sergey Tselovalnikov * @see <fuse.h> * <p> * Most of these should work very similarly to the well known UNIX * file system operations. A major exception is that instead of * returning an error in 'errno', the op...
int statfs(String path, Statvfs stbuf);
4
callistaenterprise/blog-non-blocking-rest-service-with-spring-mvc
spring-mvc-asynch/src/main/java/se/callista/springmvc/asynch/pattern/routingslip/nonblocking/statemachine/RoutingSlipNonBlockingStateMachineController.java
[ "public class DeferredResultStateMachineCallback implements StateMachineCallback {\n\n private DeferredResult deferredResult;\n\n public DeferredResultStateMachineCallback(DeferredResult deferredResult) {\n this.deferredResult = deferredResult;\n }\n\n @Override\n public void onCompleted(State...
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.context.request.async.DeferredResult; import se.callista.springmvc.asynch.common.deferredresult.Defe...
package se.callista.springmvc.asynch.pattern.routingslip.nonblocking.statemachine; @RestController public class RoutingSlipNonBlockingStateMachineController { private LogHelper LOG; @Autowired private RoutingSlipNonBlockingConfiguration configuration; @Autowired private StateMachine stateMachi...
stateMachine.initProcessing(processingSteps, LOG, new DeferredResultStateMachineCallback(deferredResult));
0
paramsen/currency-android-reactive
app/src/main/java/com/amsen/par/cewlrency/base/dependency/view/ViewComponent.java
[ "public abstract class BaseActivity extends AppCompatActivity {\n @Inject\n EventStream eventStream;\n private ViewComponent component;\n private ViewTreeObserver.OnGlobalLayoutListener keyboardLayoutListener;\n private Window window;\n private View rootView;\n\n @Override\n protected void o...
import com.amsen.par.cewlrency.view.activity.BaseActivity; import com.amsen.par.cewlrency.view.activity.CurrencyActivity; import com.amsen.par.cewlrency.view.fragment.BaseFragment; import com.amsen.par.cewlrency.view.fragment.CurrencyFragment; import com.amsen.par.cewlrency.view.view.CurrencyInput; import com.amsen.par...
package com.amsen.par.cewlrency.base.dependency.view; /** * @author Pär Amsen @ Nixon Nixon / 2016 */ @Subcomponent(modules = ViewModule.class) public interface ViewComponent { void inject(BaseActivity activity); void inject(CurrencyActivity activity); void inject(BaseFragment fragment);
void inject(CurrencyFragment fragment);
3
jbehave/jbehave-web
web-runner/src/main/java/org/jbehave/web/runner/wicket/WebRunnerApplication.java
[ "public class ArchivingFileManager implements FileManager {\n\n final FileArchiver archiver;\n final FileMonitor monitor;\n private final File uploadDirectory;\n\n public ArchivingFileManager(FileArchiver archiver, FileMonitor monitor, File uploadDirectory) {\n this.archiver = archiver;\n ...
import java.io.File; import java.util.Arrays; import java.util.List; import org.apache.wicket.guice.GuiceComponentInjector; import org.apache.wicket.protocol.http.WebApplication; import org.jbehave.core.configuration.Configuration; import org.jbehave.core.configuration.MostUsefulConfiguration; import org.jbehave.core.e...
package org.jbehave.web.runner.wicket; public class WebRunnerApplication extends WebApplication { @Override protected void init() { super.init(); getComponentInstantiationListeners().add(new GuiceComponentInjector(this, modules())); mountPage("/home", Home.class); mountPage(...
protected FileMonitor fileMonitor() {
1
Catalysts/cat-boot
cat-boot-report-pdf/src/test/java/cc/catalysts/boot/report/pdf/impl/LinebreakTest.java
[ "public class PdfReport implements AutoCloseable {\n private static final Logger LOG = getLogger(PdfReport.class);\n\n private final String fileName;\n private final DocumentWithResources documentWithResources;\n\n public PdfReport(String fileName, DocumentWithResources documentWithResources) {\n ...
import cc.catalysts.boot.report.pdf.PdfReport; import cc.catalysts.boot.report.pdf.PdfReportService; import cc.catalysts.boot.report.pdf.ReportTableBuilder; import cc.catalysts.boot.report.pdf.config.DefaultPdfStyleSheet; import cc.catalysts.boot.report.pdf.config.PdfFont; import cc.catalysts.boot.report.pdf.config.Pdf...
package cc.catalysts.boot.report.pdf.impl; /** * @author Klaus Lehner */ public class LinebreakTest { private final PDColor BLACK = new PDColor(new float[]{0.0f, 0.0f, 0.0f}, PDDeviceRGB.INSTANCE); @Test public void demo() throws Exception {
ReportTable.setLayoutingAssertionsEnabled(true);
7
radkovo/CSSBox
src/main/java/org/fit/cssbox/awt/BackgroundBitmap.java
[ "abstract public class ElementBox extends Box\n{\n private static Logger log = LoggerFactory.getLogger(ElementBox.class);\n \n public static final CSSProperty.Display DISPLAY_ANY = null;\n public static final CSSProperty.Display DISPLAY_NONE = CSSProperty.Display.NONE;\n public static final CSSProper...
import java.awt.Graphics2D; import java.awt.LinearGradientPaint; import java.awt.RadialGradientPaint; import java.awt.MultipleGradientPaint.ColorSpaceType; import java.awt.MultipleGradientPaint.CycleMethod; import java.awt.Paint; import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import java.awt.geom.R...
/* * BackgroundBitmap.java * Copyright (c) 2005-2020 Radek Burget * * CSSBox 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 versi...
Rectangle pos = computeTargetImagePosition(img);
1
all4you/redant
redant-example/src/main/java/com/redant/example/controller/BaseController.java
[ "public enum RequestMethod {\n /**\n * GET\n */\n GET(HttpMethod.GET),\n /**\n * HEAD\n */\n HEAD(HttpMethod.HEAD),\n /**\n * POST\n */\n POST(HttpMethod.POST),\n /**\n * PUT\n */\n PUT(HttpMethod.PUT),\n /**\n * PATCH\n */\n PATCH(HttpMethod.PAT...
import com.redant.core.common.enums.RequestMethod; import com.redant.core.common.html.DefaultHtmlMaker; import com.redant.core.common.html.HtmlMaker; import com.redant.core.common.html.HtmlMakerEnum; import com.redant.core.common.html.HtmlMakerFactory; import com.redant.core.common.util.HtmlContentUtil; import com.reda...
package com.redant.example.controller; /** * BaseController * @author houyi.wh * @date 2017-10-20 */ @Controller(path="/") public class BaseController { @Mapping(requestMethod=RequestMethod.GET,renderType=RenderType.HTML) public String index(){ HtmlMaker htmlMaker = HtmlMakerFactory.instance()....
String htmlTpl = PageIndex.HTML;
6
seatgeek/android-PlacesAutocompleteTextView
placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/network/OkHttpPlacesHttpClient.java
[ "public class Constants {\n public static final String LOG_TAG = \"MapsPlacesAutoComplete\";\n public static final String MAGIC_HISTORY_VALUE_PRE = \"____history____=\";\n}", "public interface PlacesApiJsonParser {\n PlacesAutocompleteResponse autocompleteFromStream(InputStream is) throws JsonParsingExce...
import android.net.Uri; import android.util.Log; import com.seatgeek.placesautocomplete.Constants; import com.seatgeek.placesautocomplete.json.PlacesApiJsonParser; import com.seatgeek.placesautocomplete.model.PlacesApiException; import com.seatgeek.placesautocomplete.model.PlacesApiResponse; import com.seatgeek.placesa...
package com.seatgeek.placesautocomplete.network; class OkHttpPlacesHttpClient extends AbstractPlacesHttpClient { private final OkHttpClient okHttpClient;
OkHttpPlacesHttpClient(PlacesApiJsonParser parser) {
1
Sheigutn/pushbullet-java-8
src/main/java/com/github/sheigutn/pushbullet/items/user/User.java
[ "public class BlockUserRequest extends PostRequest<Block> {\n\n private String email;\n\n public BlockUserRequest(String userEmail) {\n super(Urls.BLOCKS);\n this.email = userEmail;\n }\n\n @Override\n public void applyBody(Gson gson, HttpPost post) {\n setJsonBody(gson.toJson(th...
import com.github.sheigutn.pushbullet.http.defaults.post.BlockUserRequest; import com.github.sheigutn.pushbullet.interfaces.Blockable; import com.github.sheigutn.pushbullet.interfaces.Pushable; import com.github.sheigutn.pushbullet.items.PushbulletObject; import com.github.sheigutn.pushbullet.items.push.sendable.Receiv...
package com.github.sheigutn.pushbullet.items.user; @Getter @ToString(callSuper = true) @NoArgsConstructor(access = AccessLevel.PROTECTED)
public class User extends PushbulletObject implements Pushable, Blockable {
2
dalingge/GankGirl
app/src/main/java/com/dalingge/gankio/module/read/ReadTadPagePresenter.java
[ "public class Constants {\n public static final int PAZE_SIZE = 20;\n\n public static final String API_URL = \"https://gank.io/api/\";\n\n public static final String API_URL_READ = \"http://gank.io/xiandu\";\n\n public static final String BUNDLE_KEY_TYPE = \"BUNDLE_KEY_TYPE\";\n public static final S...
import android.os.Bundle; import android.util.Log; import com.dalingge.gankio.Constants; import com.dalingge.gankio.common.base.BaseRxPresenter; import com.dalingge.gankio.common.rxjava.Function0; import com.dalingge.gankio.data.model.ReadTypeBean; import com.dalingge.gankio.network.HttpRetrofit; import com.dalingge.ga...
package com.dalingge.gankio.module.read; /** * Created by dingboyang on 2017/4/26. */ public class ReadTadPagePresenter extends BaseRxPresenter<ReadTadPageFragment> { @Override protected void onCreate(Bundle savedState) { super.onCreate(savedState);
restartableFirst(RequestCommand.REQUEST_READ_TYPE,
5
zetbaitsu/CodePolitan
app/src/main/java/id/zelory/codepolitan/ui/fragment/KomikFragment.java
[ "public abstract class BenihRecyclerListener extends RecyclerView.OnScrollListener\n{\n private int previousTotal = 0;\n private boolean loading = true;\n private int visibleThreshold = 3;\n private int firstVisibleItem;\n private int visibleItemCount;\n private int totalItemCount;\n private in...
import android.content.Intent; import android.support.v7.widget.GridLayoutManager; import android.view.View; import id.zelory.benih.view.BenihRecyclerListener; import id.zelory.codepolitan.R; import id.zelory.codepolitan.data.model.Article; import id.zelory.codepolitan.data.LocalDataManager; import id.zelory.codepolita...
/* * Copyright (c) 2015 Zelory. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
LocalDataManager.saveArticles(adapter.getData());
2
dvanherbergen/robotframework-formslibrary
src/main/java/org/robotframework/formslibrary/operator/ContextOperator.java
[ "public class ByComponentTypeChooser implements ComponentChooser {\r\n\r\n private ComponentType[] allowedTypes;\r\n private int index;\r\n\r\n /**\r\n * @param index\r\n * Specifies which occurrence of the component in the context to\r\n * select. Use -1 to select all occ...
import java.awt.Component; import java.awt.Container; import java.awt.Point; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import org.netbeans.jemmy.ComponentChooser; import org.robotframework.formslibrary.chooser.ByComponentTyp...
package org.robotframework.formslibrary.operator; /** * Operator for the current or given context. This operator allows searching for * components in the context without resulting in an error if nothing is found. */ public class ContextOperator { private Container context; /** * Initialize a co...
public Component findTextField(ByNameChooser chooser) {
1
kollerlukas/Camera-Roll-Android-App
app/src/main/java/us/koller/cameraroll/ui/ExcludePathsActivity.java
[ "public class File_POJO\n implements Parcelable, SortUtil.Sortable {\n\n private String path;\n private String name;\n\n private ArrayList<File_POJO> children;\n public boolean isMedia;\n public boolean excluded;\n\n public File_POJO(String path, boolean isMedia) {\n this.path = path...
import android.content.Context; import android.os.Build; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.annotation.RequiresApi; import android.support.design.widget.Snackbar; import android.support.v7.app.ActionBar; import android.support.v7.widget.LinearLayoutManager; impo...
package us.koller.cameraroll.ui; public class ExcludePathsActivity extends ThemeableActivity { public static final String ROOTS = "ROOTS"; public static final String CURRENT_DIR = "CURRENT_DIR"; public static final String STORAGE_ROOTS = "Storage Roots"; private File_POJO roots; private File_P...
private FilesProvider filesProvider;
2
dvanherbergen/robotframework-formslibrary
src/main/java/org/robotframework/formslibrary/keyword/TableKeywords.java
[ "public class FormsLibraryException extends RuntimeException {\n\n private static final long serialVersionUID = 1L;\n\n public static final boolean ROBOT_SUPPRESS_NAME = true;\n\n public FormsLibraryException(String message) {\n super(message);\n }\n\n public FormsLibraryException(Throwable t)...
import java.awt.Component; import java.util.ArrayList; import java.util.List; import org.robotframework.formslibrary.FormsLibraryException; import org.robotframework.formslibrary.chooser.ByNameChooser; import org.robotframework.formslibrary.context.ContextChangeMonitor; import org.robotframework.formslibrary.oper...
package org.robotframework.formslibrary.keyword; @RobotKeywords public class TableKeywords { @RobotKeyword("Select a row in a result table by content.\n\n" + "Example:\n" + "| Select Row | _market_ | _gas_ | \n") @ArgumentNames({ "*columnvalues" }) public void selectRow(String... columnValues) { new ...
throw new FormsLibraryException("Row could not be found within the first 50 records.");
0
Lambda-3/DiscourseSimplification
src/main/java/org/lambda3/text/simplification/discourse/runner/discourse_tree/extraction/rules/SubordinationPostAttributionExtractor.java
[ "public enum Relation {\n\n UNKNOWN,\n\n // Coordinations\n UNKNOWN_COORDINATION, // the default for coordination\n CONTRAST,\n CAUSE_C,\n RESULT_C,\n LIST,\n DISJUNCTION,\n TEMPORAL_AFTER_C,\n TEMPORAL_BEFORE_C,\n\n // Subordinations\n UNKNOWN_SUBORDINATION, // the default for s...
import org.lambda3.text.simplification.discourse.utils.parseTree.ParseTreeExtractionUtils; import org.lambda3.text.simplification.discourse.utils.words.WordsUtils; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Optional; import edu.stanford.nlp.ling.Word; import edu.stanfor...
/* * ==========================License-Start============================= * DiscourseSimplification : SubordinationPostAttributionExtractor * * Copyright © 2017 Lambda³ * * GNU General Public License 3 * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General...
public Optional<Extraction> extract(Leaf leaf) throws ParseTreeException {
4
Martin20150405/Pano360
vrlib/src/main/java/com/martin/ads/vrlib/filters/advanced/MixBlendFilter.java
[ "public abstract class AbsFilter {\n protected static final String TAG = \"AbsFilter\";\n private final LinkedList<Runnable> mPreDrawTaskList;\n protected int surfaceWidth,surfaceHeight;\n\n public AbsFilter() {\n mPreDrawTaskList = new LinkedList<Runnable>();\n }\n\n abstract public void i...
import android.content.Context; import android.opengl.GLES20; import com.martin.ads.vrlib.filters.base.AbsFilter; import com.martin.ads.vrlib.object.Plane; import com.martin.ads.vrlib.programs.GLTwoInputProgram; import com.martin.ads.vrlib.textures.BitmapTexture; import com.martin.ads.vrlib.utils.BufferUtils; import co...
package com.martin.ads.vrlib.filters.advanced; /** * Created by Ads on 2016/11/20. * * Using frameBuffer will rotate the image 180 degree around the Y-axis * so I rotate the texture before render * If you don't have enough filter, use Simpler filter to take position * Again,the order of filters matters ! ! ! ...
mTexCoordinateBuffer2= BufferUtils.getFloatBuffer(PlaneTextureRotationUtils.TEXTURE_NO_ROTATION,0);
4
andrewoma/dexx
collection/src/main/java/com/github/andrewoma/dexx/collection/internal/hashmap/ListMap.java
[ "public interface Builder<E, R> {\n @NotNull\n Builder<E, R> add(E element);\n\n @NotNull\n Builder<E, R> addAll(@NotNull Traversable<E> elements);\n\n @NotNull\n Builder<E, R> addAll(@NotNull java.lang.Iterable<E> elements);\n\n @NotNull\n Builder<E, R> addAll(@NotNull Iterator<E> iterator)...
import com.github.andrewoma.dexx.collection.Builder; import com.github.andrewoma.dexx.collection.BuilderFactory; import com.github.andrewoma.dexx.collection.Function; import com.github.andrewoma.dexx.collection.Pair; import com.github.andrewoma.dexx.collection.internal.base.AbstractMap; import com.github.andrewoma.dexx...
/* * Copyright (c) 2014 Andrew O'Malley * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, pub...
public static <K, V> BuilderFactory<Pair<K, V>, ListMap<K, V>> factory() {
3
cyriux/mpcmaid
MpcMaid/src/com/mpcmaid/pgm/command/MultiSampleCommand.java
[ "public final class Layer extends BaseElement {\n\n\t// offset for each sample\n\tprivate static final int SAMPLE_LENGTH = 0x18;\n\n\t// ----- parameter -----\n\n\tpublic final static Parameter SAMPLE_NAME = Parameter.string(\"Sample\", 0x00, 16);\n\n\tprivate final static Parameter LEVEL = Parameter.integer(\"Leve...
import java.util.ArrayList; import java.util.Collection; import java.util.List; import com.mpcmaid.pgm.Layer; import com.mpcmaid.pgm.MultisampleBuilder; import com.mpcmaid.pgm.Pad; import com.mpcmaid.pgm.Program; import com.mpcmaid.pgm.Sample; import com.mpcmaid.pgm.SampleMatrix; import com.mpcmaid.pgm.MultisampleBuild...
package com.mpcmaid.pgm.command; /** * Imports sample files to create a multisample program * * @author cyrille martraire */ public class MultiSampleCommand extends ImportCommand { private final List samples = new ArrayList();
private final Program pgm;
3
idega/com.idega.company
src/java/com/idega/company/presentation/EmployeeAccountPreferences.java
[ "public class CompanyConstants {\n\n\tpublic static final String IW_BUNDLE_IDENTIFIER = \"com.idega.company\";\n\t\n\tpublic static final String GROUP_TYPE_COMPANY = \"iw_company\";\n\n}", "public interface CompanyBusiness extends IBOService {\n\t/**\n\t * @see com.idega.company.business.CompanyBusinessBean#getCo...
import is.idega.idegaweb.egov.citizen.presentation.CitizenAccountPreferences; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import org.springframework.beans.factory.annotation.Autowired; import com.idega.block.web2.business.JQuery; import com.idega.block.web2.business.Web2Business; i...
package com.idega.company.presentation; public class EmployeeAccountPreferences extends CitizenAccountPreferences { private static final String PARAMETER_NAME = "cmp_name"; private static final String PARAMETER_SSN = "cmp_ssn"; private static final String PARAMETER_ADDRESS = "cmp_address"; private static fin...
CompanyHome companyHome = (CompanyHome) IDOLookup.getHome(Company.class);
4
qiujuer/Blink
Android/Blink/library/src/main/java/net/qiujuer/blink/core/BlinkConn.java
[ "public class AsyncReceiveDispatcher extends AsyncDispatcher implements ReceiveDispatcher {\n // Parser the receive data type\n private PacketParser mParser;\n // Receive Data\n private Receiver mReceiver;\n // Posting responses.\n private ReceiveDelivery mReceiveDelivery;\n // Blink Connector\...
import net.qiujuer.blink.async.AsyncReceiveDispatcher; import net.qiujuer.blink.async.AsyncSendDispatcher; import net.qiujuer.blink.async.HandleSelector; import net.qiujuer.blink.box.ByteSendPacket; import net.qiujuer.blink.box.FileSendPacket; import net.qiujuer.blink.box.StringSendPacket; import net.qiujuer.blink.kit....
/* * Copyright (C) 2014 Qiujuer <qiujuer@live.cn> * WebSite http://www.qiujuer.net * Created 04/16/2015 * Changed 04/19/2015 * Version 1.0.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the Lice...
public FileSendPacket send(File file) {
4
pangliang/MirServer-Netty
GameServer/src/main/java/com/zhaoxiaodan/mirserver/gameserver/handler/MerchantHandler.java
[ "@Entity\npublic class Player extends AnimalObject {\n\n\tprivate static final Logger logger = LogManager.getLogger();\n\n\tpublic static final String SCRIPT_NAME = \"PlayerScript\";\n\n\tstatic {\n\t\ttry {\n\t\t\tScriptEngine.loadScript(SCRIPT_NAME);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}...
import com.zhaoxiaodan.mirserver.gameserver.entities.Player; import com.zhaoxiaodan.mirserver.gameserver.objects.Merchant; import com.zhaoxiaodan.mirserver.gameserver.GameClientPackets; import com.zhaoxiaodan.mirserver.gameserver.engine.MerchantEngine; import com.zhaoxiaodan.mirserver.gameserver.engine.ScriptEngine; im...
package com.zhaoxiaodan.mirserver.gameserver.handler; public class MerchantHandler extends PlayerHandler { @Override
public void onPacket(ClientPacket packet, Player player) throws Exception {
6
eneim/ObservableScrollers
sample/src/main/java/im/ene/lab/obervablescrollers/sample/ui/ObsGoogleStandActivity.java
[ "public class DummyRecyclerViewFragment extends ObsFragment {\n\n public static DummyRecyclerViewFragment newInstance() {\n DummyRecyclerViewFragment fragment = new DummyRecyclerViewFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }\n\n ...
import android.animation.ArgbEvaluator; import android.animation.ObjectAnimator; import android.animation.TypeEvaluator; import android.animation.ValueAnimator; import android.annotation.TargetApi; import android.graphics.drawable.ColorDrawable; import android.os.Build; import android.os.Bundle; import android.support....
float toolbarTransition = Math.min( 0, Math.max( -mToolbarHeight - mTabs.getHeight(), pagerHeaderTransition + mBaseScrollMount ) ); ViewCompat.setTranslationY(getActionbarToolbar(), Math.max(pagerHea...
fragment = DummyRecyclerViewFragment.newInstance();
0
ralscha/wampspring
src/test/java/ch/rasc/wampspring/pubsub/PubSubReplyAnnotationTest.java
[ "@Configuration\npublic class DefaultWampConfiguration {\n\n\tprivate final List<WampConfigurer> configurers = new ArrayList<>();\n\n\tprivate ObjectMapper objectMapper = null;\n\n\tprotected ObjectMapper internalObjectMapper = null;\n\n\tprotected PathMatcher internalPathMatcher = null;\n\n\tprotected ConversionSe...
import static org.assertj.core.api.Assertions.assertThat; import java.io.IOException; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; import java.util.concurrent.TimeoutException; import org.junit.Assert; import org.junit.Test; import org.springframework.boot...
/** * Copyright 2014-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
EventMessage event = (EventMessage) result.getWampMessage();
1
bgandon/killbill-simple-tax-plugin
src/test/java/org/killbill/billing/plugin/simpletax/internal/TestTaxCodeService.java
[ "@Nonnull\npublic static Set<String> splitTaxCodes(@Nonnull String names) {\n ImmutableSet.Builder<String> taxCodes = ImmutableSet.builder();\n for (String name : split(names, TAX_CODES_SPLIT_SEPARATORS)) {\n taxCodes.add(name);\n }\n return taxCodes.build();\n}", "public static InvoiceItemBuil...
import static java.util.Arrays.asList; import static java.util.UUID.randomUUID; import static org.apache.commons.lang3.StringUtils.startsWith; import static org.killbill.billing.ErrorCode.CAT_NO_SUCH_PLAN; import static org.killbill.billing.ObjectType.INVOICE_ITEM; import static org.killbill.billing.plugin.simpletax.co...
/* * Copyright 2015 Benjamin Gandon * * 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...
for (String name : splitTaxCodes(names)) {
0
taichi/siden
siden-core/src/main/java/ninja/siden/def/AppDef.java
[ "public interface AssetsCustomizer {\n\n\tAssetsCustomizer cacheTime(Integer time);\n\n\tAssetsCustomizer directoryListing(boolean is);\n\n\tAssetsCustomizer welcomeFiles(String... files);\n\n\t// AssetsCustomizer etag(Boolean is);\n\n\tAssetsCustomizer from(ClassLoader loader);\n}", "@FunctionalInterface\npublic...
import org.xnio.OptionMap; import io.undertow.predicate.Predicate; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; import ninja.siden.AssetsCustomizer; import ninja.siden.ExceptionalRoute; import ninja.siden.Filter; import ninja.siden.HttpMethod; import ninja.siden.RendererCustomizer;...
/* * Copyright 2015 SATO taichi * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
public RoutingCustomizer add(HttpMethod method, String path, Route route) {
5
lambdazen/pixy
src/main/java/com/lambdazen/pixy/pipemakers/OutLoop2.java
[ "public interface PipeMaker {\n\t/** Returns the signature as relationName + \"/\" + arity */\n\tpublic String getSignature();\n\n\t/** Given the bindings, this method returns a PixyPipe and adds any new replacements typically of the form x -> $x */\n\tpublic PixyPipe makePipe(List<PixyDatum> bindings, Map<String, ...
import java.util.List; import java.util.Map; import com.lambdazen.pixy.PipeMaker; import com.lambdazen.pixy.PixyDatum; import com.lambdazen.pixy.PixyPipe; import com.lambdazen.pixy.VariableGenerator; import com.lambdazen.pixy.pipes.AdjacentStep;
package com.lambdazen.pixy.pipemakers; public class OutLoop2 implements PipeMaker { @Override public String getSignature() { return "outLoop/2"; } @Override public PixyPipe makePipe(List<PixyDatum> bindings, Map<String, PixyDatum> replacements, VariableGenerator varGen) {
return PipeMakerUtils.adjacentLoopPipe(AdjacentStep.out, AdjacentStep.in, bindings, replacements, varGen);
4
radkovo/CSSBox
src/main/java/org/fit/cssbox/layout/BrowserConfig.java
[ "public interface ContentObserver\n{\n \n /**\n * This method is called when some content failed to load.\n * @param url the content URL\n */\n public void contentLoadFailed(URL url);\n\n}", "public abstract class DOMSource\n{\n protected DocumentSource src;\n protected String charset;\...
import org.fit.cssbox.io.DefaultDOMSource; import org.fit.cssbox.io.DefaultDocumentSource; import org.fit.cssbox.io.DocumentSource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import cz.vutbr.web.csskit.Color; import java.io.IOException; import java.lang.reflect.Constructor; import java.net.URL; import jav...
/* * BrowserConfig.java * Copyright (c) 2005-2012 Radek Burget * * CSSBox 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....
private ContentObserver contentObserver;
0
michaeltandy/contraction-hierarchies
src/test/java/uk/me/mjt/ch/cache/CachedContractedDijkstraTest.java
[ "public class DijkstraSolution {\n\n public final int totalDriveTimeMs;\n public final List<Node> nodes;\n public final List<DirectedEdge> edges;\n \n private final DijkstraSolution preceding; // Can we remove this?\n \n public DijkstraSolution(int totalDriveTime, List<Node> nodes, List<Direct...
import java.util.HashMap; import org.junit.Test; import static org.junit.Assert.*; import uk.me.mjt.ch.DijkstraSolution; import uk.me.mjt.ch.GraphContractor; import uk.me.mjt.ch.MakeTestData; import uk.me.mjt.ch.MapData; import uk.me.mjt.ch.Node;
package uk.me.mjt.ch.cache; public class CachedContractedDijkstraTest { public CachedContractedDijkstraTest() { } @Test public void testContractedGraphDijkstra() {
MapData graph = MakeTestData.makeLadder(2,10);
3
dbasedow/prospecter
src/test/java/de/danielbasedow/prospecter/core/query/build/AdvancedQueryBuilderTest.java
[ "public class MalformedQueryException extends Exception {\n public MalformedQueryException(String msg) {\n super(msg);\n }\n\n public MalformedQueryException(String msg, Throwable cause) {\n super(msg, cause);\n }\n}", "public class Query {\n protected final int queryId;\n protecte...
import aima.core.logic.propositional.parsing.ast.Sentence; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import de.danielbasedow.prospecter.core.MalformedQueryException; import de.danielbasedow.prospecter.core.query.Query; import de.danielbasedow.prospecter.core.sch...
package de.danielbasedow.prospecter.core.query.build; public class AdvancedQueryBuilderTest extends TestCase { private AdvancedQueryBuilder builder; private static final ObjectMapper mapper = new ObjectMapper(); public void setUp() { try { SchemaBuilder schemaBuilder = new SchemaBuil...
} catch (MalformedQueryException e) {
0
SilenceDut/NBAPlus
app/src/main/java/com/me/silencedut/nbaplus/ui/activity/SettingsActivity.java
[ "public class App extends Application {\n private static Application sInstance;\n @Override\n public void onCreate() {\n super.onCreate();\n FIR.init(this);\n// mRefWatcher = LeakCanary.install(this);\n sInstance = this;\n AppService.getInstance().initService();\n\n }\...
import android.content.Context; import android.content.Intent; import android.content.res.Resources; import android.os.Bundle; import android.preference.Preference; import android.preference.Preference.OnPreferenceChangeListener; import android.preference.PreferenceFragment; import android.support.v7.app.AppCompatActiv...
package com.me.silencedut.nbaplus.ui.activity; /** * Created by SilenceDut on 2015/12/18. */ public class SettingsActivity extends AppCompatActivity implements RevealBackgroundView.OnStateChangeListener{ @Bind(R.id.toolbar) Toolbar mToolBar; @Bind(R.id.swipBackLayout)
SwipeBackLayout mSwipeBackLayout;
2
cmusatyalab/elijah-provisioning
android/android/src/edu/cmu/cs/cloudlet/android/network/CloudletConnector.java
[ "public class CloudletActivity extends Activity {\n\tpublic static String CLOUDLET_SYNTHESIS_IP = \"cloudlet.krha.kr\";\n\tpublic static int CLOUDLET_SYNTHESIS_PORT = 8021;\n\n\tprivate static final int SYNTHESIS_MENU_ID_SETTINGS = 11123;\n\tprivate static final int SYNTHESIS_MENU_ID_CLEAR = 12311;\n\n\tprotected B...
import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.File; import java.io.IOException; import java.math.BigInteger; import java.net.InetSocketAddress; import java.net.Socket; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator;...
package edu.cmu.cs.cloudlet.android.network; public class CloudletConnector extends Thread { // Network Message public static final int CONNECTION_ERROR = 1; public static final int NETWORK_ERROR = 2; public static final int PROGRESS_MESSAGE = 3; public static final int FINISH_MESSAGE = 4; public static fina...
KLog.printErr(e.getLocalizedMessage());
5
novucs/factions-top
hook/legacyfactions-1-3/src/main/java/net/novucs/ftop/hook/LegacyFactions0103.java
[ "public class ChunkPos {\n\n private final String world;\n private final int x;\n private final int z;\n\n public static ChunkPos of(Chunk chunk) {\n return new ChunkPos(chunk.getWorld().getName(), chunk.getX(), chunk.getZ());\n }\n\n public static ChunkPos of(ChunkSnapshot snapshot) {\n ...
import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import net.novucs.ftop.entity.ChunkPos; import net.novucs.ftop.hook.event.FactionClaimEvent; import net.novucs.ftop.hook.event.FactionDisbandEvent; import net.novucs.ftop.hook.event.FactionJoinEvent; import net.novucs.ftop.hook.ev...
package net.novucs.ftop.hook; public class LegacyFactions0103 extends FactionsHook { private final Set<ChunkPos> recentlyClaimedChunks = new HashSet<>(); public LegacyFactions0103(Plugin plugin) { super(plugin); } @Override public String getFactionAt(String worldName, int chunkX, int c...
callEvent(new FactionLeaveEvent(event.getFactionOld().getId(), player));
4
scriptkitty/SNC
unikl/disco/calculator/optimization/AbstractOptimizer.java
[ "public class Arrival implements Serializable {\r\n\t\r\n\t//Members\r\n\t\r\n\t/**\r\n\t * \r\n\t */\r\n\tprivate static final long serialVersionUID = 1079479343537123673L;\r\n\tprivate SymbolicFunction rho;\r\n\tprivate SymbolicFunction sigma;\r\n\tprivate Set<Integer> Arrivaldependencies;\r\n\tprivate Set<Intege...
import unikl.disco.calculator.symbolic_math.Arrival; import unikl.disco.calculator.symbolic_math.ParameterMismatchException; import unikl.disco.calculator.symbolic_math.ServerOverloadException; import unikl.disco.calculator.symbolic_math.ThetaOutOfBoundException; import unikl.disco.calculator.network.AbstractAnalys...
/* * (c) 2017 Michael A. Beck, Sebastian Henningsen * disco | Distributed Computer Systems Lab * University of Kaiserslautern, Germany * All Rights Reserved. * * This software is work in progress and is released in the hope that it will * be useful to the scientific community. It is provided "as i...
public abstract double Bound(Arrival input, AbstractAnalysis.Boundtype boundtype, double bound, double thetagranularity, double hoeldergranularity) throws ThetaOutOfBoundException, ParameterMismatchException, ServerOverloadException;
0
mitdbg/AdaptDB
src/main/java/perf/benchmark/SingleAttributeQueries.java
[ "public class Predicate {\n\tpublic enum PREDTYPE {\n\t\tLEQ, GEQ, GT, LT, EQ\n\t};\n\n\tpublic int attribute;\n\tpublic TYPE type;\n\tpublic Object value;\n\tpublic PREDTYPE predtype;\n\n\tpublic Predicate(int attr, TYPE t, Object val, PREDTYPE predtype) {\n\t\tthis.attribute = attr;\n\t\tthis.type = t;\n\t\tthis....
import core.adapt.Predicate; import core.adapt.Predicate.PREDTYPE; import core.adapt.Query; import core.adapt.iterator.IteratorRecord; import core.adapt.spark.SparkQuery; import core.utils.ConfUtils; import core.utils.TypeUtils.SimpleDate; import core.utils.TypeUtils.TYPE; import org.apache.hadoop.io.LongWritable; impo...
package perf.benchmark; public class SingleAttributeQueries { public final static String propertyFile = BenchmarkSettings.conf;
public final static ConfUtils cfg = new ConfUtils(propertyFile);
5
pokowaka/android-geom
geom/src/main/java/math/geom2d/circulinear/CirculinearCurves2D.java
[ "public class Point2D implements GeometricObject2D, PointShape2D, Cloneable,\r\n CirculinearShape2D {\r\n\r\n // ===================================================================\r\n // class variables\r\n\r\n /** The x coordinate of this point. */\r\n protected double x;\r\n\r\n /** The y c...
import android.annotation.TargetApi; import android.os.Build; import java.util.ArrayList; import java.util.Collection; import java.util.TreeMap; import java.util.TreeSet; import math.geom2d.Point2D; import math.geom2d.Shape2D; import math.geom2d.Vector2D; import math.geom2d.conic.Circle2D; import math.geom2d....
/** * File: CirculinearCurve2DUtils.java * Project: javaGeom * * Distributed under the LGPL License. * * Created: 16 mai 09 */ package math.geom2d.circulinear; /** * Some utilities for working with circulinear curves. * * @author dlegland * */ @TargetApi(Build.VERSION_CODES.GINGERBREA...
if (curve instanceof ContinuousCurve2D) {
3
WojciechZankowski/iextrading4j-hist
iextrading4j-hist-deep/src/main/java/pl/zankowski/iextrading4j/hist/deep/trading/IEXPriceLevelUpdateMessage.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 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.util.IEXByteConverter; import pl.zankowski.iextrading4j.hist.deep.trading.field.IEXEventFlag; import...
package pl.zankowski.iextrading4j.hist.deep.trading; public class IEXPriceLevelUpdateMessage extends IEXMessage { public static final int LENGTH = 30;
private final IEXEventFlag eventFlag;
4
badvision/jace
src/main/java/jace/hardware/CardSSC.java
[ "public class EmulatorUILogic implements Reconfigurable {\r\n\r\n static Debugger debugger;\r\n\r\n static {\r\n debugger = new Debugger() {\r\n @Override\r\n public void updateStatus() {\r\n enableDebug(true);\r\n MOS65C02 cpu = (MOS65C02) Emulator.c...
import jace.EmulatorUILogic; import jace.config.ConfigurableField; import jace.config.Name; import jace.config.Reconfigurable; import jace.core.Card; import jace.core.Computer; import jace.core.RAMEvent; import jace.core.RAMEvent.TYPE; import jace.core.Utility; import java.io.BufferedReader; import java.io.IOException;...
public void setSlot(int slot) { try { loadRom("jace/data/SSC.rom"); } catch (IOException ex) { Logger.getLogger(CardSSC.class.getName()).log(Level.SEVERE, null, ex); } super.setSlot(slot); Utility.loadIconLabel("network-wired.png").ifPresent(icon->{ ...
EmulatorUILogic.addIndicator(this, activityIndicator);
0
andreynovikov/Androzic
src/main/java/com/androzic/track/TrackExportDialog.java
[ "public class Androzic extends BaseApplication implements OnSharedPreferenceChangeListener, XmlRenderThemeMenuCallback\n{\n\tprivate static final String TAG = \"Androzic\";\n\n\tpublic static final String BROADCAST_WAYPOINT_ADDED = \"com.androzic.waypointAdded\";\n\tpublic static final String BROADCAST_WAYPOINT_REM...
import java.io.File; import java.util.Calendar; import java.util.List; import android.app.Activity; import android.app.Dialog; import android.app.ProgressDialog; import android.content.SharedPreferences; import android.graphics.Color; import android.os.Bundle; import android.preference.PreferenceManager; import android...
package com.androzic.track; public class TrackExportDialog extends DialogFragment implements TextWatcher { private EditText nameText; private Spinner formatSpinner; private ColorButton color;
private SliderContainer fromSliderContainer;
6
seanchenxi/gwt-storage
examples/serializer-test/src/main/java/com/seanchenxi/gwt/storage/server/TestServiceImpl.java
[ "@RemoteServiceRelativePath(\"TestService\")\npublic interface TestService extends RemoteService {\n\n RpcTestValue getRpcTestValue();\n\n List<RpcTestValue> getRpcTestValueList();\n\n Map<RpcTestMapKey, RpcTestMapValue> getRpcTestValueStringMap();\n\n TestValue testDeserialization(TestValue value, String seria...
import com.google.gwt.user.client.rpc.SerializationException; import com.google.gwt.user.server.rpc.RemoteServiceServlet; import com.seanchenxi.gwt.storage.client.service.TestService; import com.seanchenxi.gwt.storage.client.value.GenericTestValue; import com.seanchenxi.gwt.storage.client.value.TestValue; import com.se...
/* * Copyright 2013 Xi CHEN * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
public GenericTestValue<TestValue> testGenericDeserialization(GenericTestValue<TestValue> value1, String serialized) throws SerializationException {
1
truecaller/android-actors-library
generator/src/test/java/com/truecaller/androidactors/ActorInterfaceDescriptionImplTest.java
[ "public class ActorClass {\n}", "public interface ActorGenerifiedPromise {\n @NonNull\n Promise testMethod();\n}", "public interface ActorNullablePromise {\n Promise<String> testMethod();\n}", "public interface ActorWithConstant {\n int CONSTANT = 10;\n}", "public interface ActorWithException {\...
import com.google.common.collect.Iterables; import com.google.testing.compile.CompilationRule; import com.truecaller.androidactors.cases.ActorClass; import com.truecaller.androidactors.cases.ActorGenerifiedPromise; import com.truecaller.androidactors.cases.ActorNullablePromise; import com.truecaller.androidactors.cases...
/* * Copyright (C) 2017 True Software Scandinavia AB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
TypeElement element = getTypeElement(ActorWithException.class);
4
StarTux/CraftBay
src/main/java/edu/self/startux/craftBay/locale/Message.java
[ "public interface Auction extends ConfigurationSerializable {\n /**\n * Get this auction's id\n * @return the id\n */\n public int getId();\n\n /**\n * The AuctionScheduler should set the id with this method.\n * @param id the id\n */\n pub...
import edu.self.startux.craftBay.Auction; import edu.self.startux.craftBay.AuctionTime; import edu.self.startux.craftBay.CraftBayPlugin; import edu.self.startux.craftBay.Item; import edu.self.startux.craftBay.Merchant; import edu.self.startux.craftBay.MoneyAmount; import edu.self.startux.craftBay.event.AuctionBidEvent;...
String string = ChatColor.translateAlternateColorCodes('&', (String) o); Pattern pattern = Pattern.compile("<([^>]+)>"); Matcher matcher = pattern.matcher(string); int lastIndex = 0; while (matcher.find()) { Color color = Color.getByName(matche...
set("timeleft", new AuctionTime(auction.getTimeLeft()));
1
dnault/therapi-json-rpc
src/main/java/com/github/therapi/jsonrpc/web/AbstractSpringJsonRpcController.java
[ "public class ApiDocProvider {\n private final CommentFormatter commentFormatter = new CommentFormatter();\n private final JsonSchemaProvider schemaProvider = new JsonSchemaProvider();\n\n public List<ApiNamespaceDoc> getDocumentation(MethodRegistry registry) throws IOException {\n final ObjectWrite...
import com.fasterxml.jackson.databind.ObjectMapper; import com.github.therapi.apidoc.ApiDocProvider; import com.github.therapi.apidoc.ApiDocWriter; import com.github.therapi.apidoc.ApiModelDoc; import com.github.therapi.apidoc.ModelDocWriter; import com.github.therapi.core.MethodRegistry; import com.github.therapi.core...
package com.github.therapi.jsonrpc.web; /** * Base class for a Spring controller that acts as a JSON-RPC 2.0 endpoint and * automatically scans the Spring application context for remotable services. * Subclasses should be annotated with {@code @Controller} and must override the * abstract {@link #getObjectMapper...
protected ResponseFormat getDefaultResponseFormat() {
4
adiyoss/StructED
tutorials-code/vowel/FeatureFunctionsVowelDuration.java
[ "public interface IKernel {\n Vector convertVector(Vector vector, int vectorSize);\n}", "public class Consts {\n\n // GENERALS\n\tpublic static final String SPACE = \" \";\n public static final String TAB = \"\\t\";\n public static final String COMMA_NOTE = \",\";\n\tpublic static final String CLASSIF...
import com.structed.data.Factory; import com.structed.data.entities.Vector; import com.structed.data.Logger; import com.structed.utils.ConverterHelplers; import com.structed.utils.MathHelpers; import jsc.distributions.Gamma; import com.structed.models.kernels.IKernel; import com.structed.constants.Consts; import com.st...
phiFeatures.put(loc, calculateMean(example, start, end, TOTAL_ENERGY, win_size_50, true));//Mean of low energy loc++; phiFeatures.put(loc, calculateMean(example, start, end, TOTAL_ENERGY, win_size_50, false));//Mean of low energy loc++; phi...
Logger.error("Error in function: calculateDiff, feature number: " + featureNumber + ", example: " + example.path);
6
ddoa/dea-code-examples
examples/simpleorder-javaee/src/main/java/oose/dea/config/AppBinding.java
[ "@Singleton\n@WebServlet(urlPatterns = \"/viewItems\")\npublic class ViewItemsPageController extends HttpServlet {\n @Inject\n private ItemService itemService;\n\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n List<Item> items...
import com.google.inject.servlet.ServletModule; import oose.dea.controller.ViewItemsPageController; import oose.dea.dataaccess.ItemDAO; import oose.dea.dataaccess.ItemJdbcDAO; import oose.dea.services.ItemService; import oose.dea.services.local.LocalItemService;
package oose.dea.config; public class AppBinding extends ServletModule { @Override protected void configureServlets() { super.configureServlets(); serve("/viewItems").with(ViewItemsPageController.class);
bind(ItemService.class).to(LocalItemService.class);
4
jsmith613/Aruco-Marker-Tracking-Android
openCVTutorial1CameraPreview/src/main/java/min3d/parser/AParser.java
[ "public class AnimationObject3d extends Object3d {\n\tprivate int numFrames;\n\tprivate KeyFrame[] frames;\n\tprivate int currentFrameIndex;\n\tprivate long startTime;\n\tprivate long currentTime;\n\tprivate boolean isPlaying;\n\tprivate float interpolation;\n\tprivate float fps = 70;\n\tprivate boolean updateVerti...
import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import min3d.animation.AnimationObject3d; import min3d.core.Object3dContainer; import min3d.vos.Color4; import min3d.vos.Number3d; import min3d.vos.Uv;...
package min3d.parser; /** * Abstract parser class with basic parsing functionality. * * @author dennis.ippel * */ public abstract class AParser implements IParser { protected Resources resources; protected String resourceID; protected String packageID; protected String currentMaterialKey; protected ArrayL...
public Object3dContainer getParsedObject() {
1
bobthekingofegypt/BobBall
app/src/main/java/org/bobstuff/bobball/BobBallActivity.java
[ "public class GameEventStartBar extends GameEvent {\n public static final Creator<GameEventStartBar> CREATOR = new Creator<GameEventStartBar>() {\n @Override\n public GameEventStartBar createFromParcel(Parcel in) {\n return new GameEventStartBar(in);\n }\n\n @Override\n ...
import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.PixelFormat; import android.graphics.PointF; import android.os.Bundle...
} scores.addScore(valueString, gameManager.getCurrGameState().getPlayer(playerId).getScore()); showTopScores(); } }).show(); } private void showTopScores() { finish(); Intent intent = new...
gameManager.addEvent(new GameEventStartBar(gameManager.getGameTime(), initialTouchPoint, dir, playerId));
0
llbit/ow2-asm
test/conform/org/objectweb/asm/commons/GASMifierTest.java
[ "public abstract class AbstractTest extends TestCase {\n\n protected String n;\n\n protected InputStream is;\n\n public AbstractTest() {\n super(\"test\");\n }\n\n protected void init(final String n, final InputStream is) {\n this.n = n;\n this.is = is;\n }\n\n protected Te...
import java.io.PrintWriter; import java.io.StringReader; import java.io.StringWriter; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.net.URL; import java.net.URLClassLoader; import junit.framework.TestSuite; import org.codehaus.janino.ClassLoaderIClassLoader; import org...
/*** * ASM tests * Copyright (c) 2000-2011 INRIA, France Telecom * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * ...
public MethodVisitor visitMethod(final int access, final String name,
3
taoneill/war
war/src/main/java/com/tommytony/war/command/SetTeamCommand.java
[ "public class Team {\n\tprivate final Warzone warzone;\n\tRandom teamSpawnRandomizer = new Random();\n\tprivate List<Player> players = new ArrayList<Player>();\n\tprivate List<Player> teamChatPlayers = new ArrayList<Player>();\n\tprivate List<Location> teamSpawns;\n\tprivate Location teamFlag = null;\n\tprivate Str...
import java.util.logging.Level; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import com.tommytony.war.Team; import com.tommytony.war.War; import com.tommytony.war.Warzone; import com.tommytony.war.config.TeamConfig; import com.tommytony.war.config.TeamKind; import com.tommytony.war.mapper.W...
package com.tommytony.war.command; /** * Places a soawn * * @author Tim Düsterhus */ public class SetTeamCommand extends AbstractZoneMakerCommand { public SetTeamCommand(WarCommandHandler handler, CommandSender sender, String[] args) throws NotZoneMakerException { super(handler, sender, args); } @Overrid...
newTeam.setRemainingLives(newTeam.getTeamConfig().resolveInt(TeamConfig.LIFEPOOL));
3
highsource/tenra
core/src/main/java/org/hisrc/tenra/converter/railwaytransportnetwork/_3/RailwayNodeTypeConverter.java
[ "public interface Converter<I, O> {\n\n\tpublic O convert(I value);\n\n}", "public class IdentifierPropertyTypeToStringConverter implements\n\t\tConverter<IdentifierPropertyType, String> {\n\t\n\tpublic static final Converter<IdentifierPropertyType, String> INSTANCE = new IdentifierPropertyTypeToStringConverter()...
import inspire.x.specification.gmlas.railwaytransportnetwork._3.RailwayNodeType; import java.util.ArrayList; import java.util.List; import net.opengis.gml.v_3_2_1.ReferenceType; import org.hisrc.tenra.converter.Converter; import org.hisrc.tenra.converter.basetypes._3.IdentifierPropertyTypeToStringConverter; import org....
package org.hisrc.tenra.converter.railwaytransportnetwork._3; public class RailwayNodeTypeConverter implements Converter<RailwayNodeType, RailwayNode> { public static final Converter<RailwayNodeType, RailwayNode> INSTANCE = new RailwayNodeTypeConverter(); public RailwayNode convert(RailwayNodeType value) { ...
geographicalName = TransportNodeType_JAXBElement_GeographicalName_ToStringConverter.INSTANCE
2
TomGrill/gdx-dialogs
core/src/de/tomgrill/gdxdialogs/core/FallbackGDXDialogs.java
[ "public class FallbackGDXButtonDialog implements GDXButtonDialog {\n\n\n\t@Override\n\tpublic GDXButtonDialog setCancelable(boolean cancelable) {\n\t\treturn this;\n\t}\n\n\t@Override\n\tpublic GDXButtonDialog show() {\n\t\tGdx.app.debug(GDXDialogsVars.LOG_TAG, FallbackGDXButtonDialog.class.getSimpleName() + \" now...
import de.tomgrill.gdxdialogs.core.dialogs.FallbackGDXButtonDialog; import de.tomgrill.gdxdialogs.core.dialogs.FallbackGDXProgressDialog; import de.tomgrill.gdxdialogs.core.dialogs.FallbackGDXTextPrompt; import de.tomgrill.gdxdialogs.core.dialogs.GDXButtonDialog; import de.tomgrill.gdxdialogs.core.dialogs.GDXProgressDi...
/******************************************************************************* * Copyright 2015 See AUTHORS 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.apach...
registerDialog(GDXButtonDialog.class.getName(), FallbackGDXButtonDialog.class.getName());
0
Netflix/Raigad
raigad/src/main/java/com/netflix/raigad/aws/UpdateSecuritySettings.java
[ "@ImplementedBy(RaigadConfiguration.class)\npublic interface IConfiguration {\n\n void initialize();\n\n /**\n * @return Path to the home dir of Elasticsearch\n */\n String getElasticsearchHome();\n\n String getYamlLocation();\n\n String getBackupLocation();\n\n /**\n * @return Path to...
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Random; import com.google.common.collect.Lists; import com.google.inject.Inject; import com.google.inject.Singleton; import com.netflix.raigad.configuration.IConfiguration; import com.netflix.raigad.identity.IMembership; import...
/** * Copyright 2017 Netflix, Inc. * <p> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or...
List<RaigadInstance> instances = getInstanceList();
4
cerner/beadledom
client/beadledom-client-example/example-client/src/main/java/com/cerner/beadledom/client/example/client/ExampleOneClientModule.java
[ "@Deprecated\npublic abstract class BeadledomClient implements Client {\n\n protected BeadledomClient() {\n }\n\n /**\n * A boolean indicator to check if the Client is still alive.\n *\n * @return true if the client is closed otherwise false.\n */\n public abstract boolean isClosed();\n\n /**\n * Bui...
import com.cerner.beadledom.client.BeadledomClient; import com.cerner.beadledom.client.BeadledomClientConfiguration; import com.cerner.beadledom.client.BeadledomClientModule; import com.cerner.beadledom.client.BeadledomWebTarget; import com.cerner.beadledom.client.example.PaginatedClientResource; import com.cerner.bead...
package com.cerner.beadledom.client.example.client; /** * Guice module for the Example One client. * * <p>Normally a service would have only one module that provides all resource proxies. This example * only splits apart the two resources to show what two separate clients would look like and so that * testing ca...
install(BeadledomClientModule.with(ResourceOneFeature.class));
2
nloko/SyncMyPix
src/com/nloko/android/syncmypix/MainActivity.java
[ "public class PhotoStore {\n\n private final String TAG = PhotoStore.class.getSimpleName();\n\n // Directory name under the root directory for photo storage.\n private final String DIRECTORY = \"photos\";\n\n /** Map of keys to entries in the directory. */\n private final Map<Long, Entry> mEntries;\n...
import java.io.IOException; import java.lang.ref.WeakReference; import java.lang.reflect.Method; import java.net.MalformedURLException; import com.android.providers.contacts.PhotoStore; import com.facebook.android.DialogError; import com.facebook.android.Facebook; import com.facebook.android.Facebook.DialogListener; im...
// // MainActivity.java is part of SyncMyPix // // Authors: // Neil Loknath <neil.loknath@gmail.com> // // Copyright (c) 2009 Neil Loknath // // SyncMyPix 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 ...
Facebook fbClient = null;
1
open-io/oio-api-java
src/main/java/io/openio/sds/ClientBuilder.java
[ "public static OioHttp http(OioHttpSettings settings, SocketProvider socketProvider) {\n Check.checkArgument(null != settings);\n Check.checkArgument(null != socketProvider);\n return new OioHttp(settings, socketProvider);\n}", "public interface SocketProvider {\n\n public Socket getSocket(String host...
import static io.openio.sds.http.OioHttp.http; import java.io.FileNotFoundException; import java.net.InetSocketAddress; import java.net.URI; import io.openio.sds.common.SocketProvider; import io.openio.sds.common.SocketProviders; import io.openio.sds.http.OioHttp; import io.openio.sds.http.OioHttpSettings; import io.op...
package io.openio.sds; /** * Builder for @link {@link Client} implementations * * @author Christopher Dedeurwaerder * @author Florent Vennetier */ public class ClientBuilder { /** * Create a new {@link AdvancedClient} using the specified settings. * * @param settings * the settings to us...
final OioHttpSettings http, PoolingSettings pooling) {
5
ajitsing/Sherlock
sherlock/src/androidTest/java/com/singhajit/sherlock/core/SherlockTest.java
[ "public class CrashRecord {\n private String place;\n private String reason;\n private String date;\n private String stackTrace;\n\n public CrashRecord(String place, String reason, String date, String stackTrace) {\n this.place = place;\n this.reason = reason;\n this.date = date;\n this.stackTrace ...
import android.content.Context; import android.support.test.InstrumentationRegistry; import com.singhajit.sherlock.core.database.CrashRecord; import com.singhajit.sherlock.core.database.DatabaseResetRule; import com.singhajit.sherlock.core.database.SherlockDatabaseHelper; import com.singhajit.sherlock.core.investigatio...
package com.singhajit.sherlock.core; public class SherlockTest { @Rule public DatabaseResetRule databaseResetRule = new DatabaseResetRule(); @Test public void shouldReturnAllCapturedCrashes() throws Exception { Context targetContext = InstrumentationRegistry.getTargetContext(); Sherlock.init(tar...
database.insertCrash(CrashRecord.createFrom(crash1));
0
rahulmaddineni/Stayfit
app/libs/MPAndroidChart-2.2.3/MPAndroidChart-2.2.3/MPChartExample/src/com/xxmassdeveloper/mpchartexample/ListViewMultiChartActivity.java
[ "public class LineDataSet extends LineRadarDataSet<Entry> implements ILineDataSet {\n\n /** List representing all colors that are used for the circles */\n private List<Integer> mCircleColors = null;\n\n /** the color of the inner circles */\n private int mCircleColorHole = Color.WHITE;\n\n /** the r...
import android.content.Context; import android.graphics.Color; import android.os.Bundle; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.widget.ArrayAdapter; import android.widget.ListView; import com.github.mikephil.charting.data.BarData; import com.github.mik...
package com.xxmassdeveloper.mpchartexample; /** * Demonstrates the use of charts inside a ListView. IMPORTANT: provide a * specific height attribute for the chart inside your listview-item * * @author Philipp Jahoda */ public class ListViewMultiChartActivity extends DemoBase { @Override protected vo...
list.add(new PieChartItem(generateDataPie(i + 1), getApplicationContext()));
4
hanuor/pearl
sapphire/src/main/java/com/hanuor/sapphire/infoGet/StartEngineModulePrimary.java
[ "public class SuggestionView extends RelativeLayout{\n private TextView textView;\n private String defaultheaderTextColor = \"#eeeeee\";\n private String defaultfooterTextColor = \"#eeeeee\";\n private HintsStoreDB hintsStoreDB;\n private float footerTextSize = 13f;\n private transient Context con...
import java.util.Iterator; import android.content.Context; import android.util.Log; import com.hanuor.client.MaxValueEvaluator; import com.hanuor.sapphire.hub.SuggestionView; import com.hanuor.sapphire.temporarydb.SapphireDbManager; import com.hanuor.sapphire.temporarydb.SapphireImgDbHelper; import com.hanuor.sapphire....
package com.hanuor.sapphire.infoGet; /* * Copyright (C) 2016 Hanuor Inc. by Shantanu Johri(https://hanuor.github.io/shanjohri/) * * 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...
private ImagesUtil imagesUtil;
5
MovieNetwork/Wubble
app/src/main/java/com/proxima/Wubble/activities/FeedActivity.java
[ "public class FeedRecyclerAdapter extends RecyclerView.Adapter<FeedRecyclerAdapter.ViewHolder> {\n protected Context myContext;\n protected List<ParseObject> myWubbles;\n protected ParseObject wubbleObject;\n private ArrayList<ParseUser> mUserList;\n ArrayList<String> likeList = new ArrayList<>();\n ...
import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.Menu; import android.view.Menu...
package com.proxima.Wubble.activities; public class FeedActivity extends ToolbarActivity { private Context context; protected static FeedRecyclerAdapter adapter; protected RecyclerView.LayoutManager feedLayoutManager; protected RecyclerView feedRecyclerView; protected SwipeRefreshLayout swipe...
case REQUEST_PEOPLE_SEARCH:
5
aro-tech/interface-it
src/main/java/com/github/aro_tech/interface_it/api/CoreMixinGenerator.java
[ "public class SimpleSingleFileOutputOptions implements MultiFileOutputOptions {\n\tprivate final String targetInterfaceName;\n\tprivate final String targetPackageName;\n\tprivate final File saveDirectory;\n\n\t/**\n\t * Constructor\n\t * @param targetInterfaceName\n\t * @param targetPackageName\n\t * @param saveDir...
import java.io.File; import java.io.IOException; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.Ha...
}; return Arrays.stream(clazz.getFields()).filter(isPublicStatic.and((fld) -> extraFilter.test((Field) fld))) .sorted(Comparator.comparing(Field::getName)).collect(Collectors.toList()); } /** * Generate code for one constant * * @param field * @param fieldClass * @param imports * @param buf * ...
new SimpleSingleFileOutputOptions(targetInterfaceName, targetPackageName, null));
0
predic8/sqlrest
src/java/de/oio/sqlrest/xml/CreateEntityHandler.java
[ "public class RESTRequestHandler extends DefaultHandler {\n\n\tprivate StringBuffer text = new StringBuffer();\n\tprivate String elementName = \"\";\n\tprivate Hashtable valuePairs = new Hashtable();\n\n\t/**\n\t * @see org.xml.sax.ContentHandler#startElement(String, String, String, Attributes)\n\t */\n\tpublic voi...
import java.io.IOException; import java.sql.SQLException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.apache.log4j.Logger; imp...
/* * Copyright (c) 2003, Orientation in Objects GmbH, www.oio.de * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice...
RestUtil.getRowUrl(
4
cloudspannerecosystem/pgadapter
src/main/java/com/google/cloud/spanner/pgadapter/wireprotocol/DescribeMessage.java
[ "public class ConnectionHandler extends Thread {\n\n private static final Logger logger = Logger.getLogger(ConnectionHandler.class.getName());\n private static final AtomicLong CONNECTION_HANDLER_ID_GENERATOR = new AtomicLong(0L);\n private final ProxyServer server;\n private final Socket socket;\n private fin...
import com.google.cloud.spanner.pgadapter.ConnectionHandler; import com.google.cloud.spanner.pgadapter.ConnectionHandler.QueryMode; import com.google.cloud.spanner.pgadapter.metadata.DescribePortalMetadata; import com.google.cloud.spanner.pgadapter.metadata.DescribeStatementMetadata; import com.google.cloud.spanner.pga...
// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
public DescribeMessage(ConnectionHandler connection) throws Exception {
0
webpagebytes/demo-cms-app
src/main/java/com/webpagebytes/wpbsample/controllers/PerformWithdrawalController.java
[ "public class Account {\r\n\tprivate int user_id;\r\n\tprivate long balance;\r\n\t\r\n\tpublic int getUser_id() {\r\n\t\treturn user_id;\r\n\t}\r\n\tpublic void setUser_id(int user_id) {\r\n\t\tthis.user_id = user_id;\r\n\t}\r\n\tpublic long getBalance() {\r\n\t\treturn balance;\r\n\t}\r\n\tpublic void setBalance(l...
import com.webpagebytes.wpbsample.data.Session; import com.webpagebytes.wpbsample.data.User; import com.webpagebytes.wpbsample.data.DepositWithdrawal.OperationType; import com.webpagebytes.wpbsample.utility.HashService; import java.io.IOException; import java.security.NoSuchAlgorithmException; import java.sql.SQL...
/* * Copyright 2015 Webpagebytes * * 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 ...
String enteredHash = HashService.getHashSha1(password.getBytes());
5
mauriciogracia/DGuitarSoftware
DGuitar/src/dguitar/codecs/guitarPro/version3/GP3InputStream.java
[ "public class GPBend {\n /**\n * A list of points the bend is constitued of.\n */\n private List<GPBendPoint> _points;\n\n /**\n * The bend type (bend, bend and release,...).\n * \n * @see GPBendType\n */\n private GPBendType _type;\n\n /**\n * The bend height\n */\n ...
import java.io.IOException; import java.io.InputStream; import java.util.List; import dguitar.codecs.guitarPro.GPBend; import dguitar.codecs.guitarPro.GPBendPoint; import dguitar.codecs.guitarPro.GPBendType; import dguitar.codecs.guitarPro.GPChordDiagram; import dguitar.codecs.guitarPro.GPChordNote; import dguitar.code...
package dguitar.codecs.guitarPro.version3; /** * The class GP3InputStream allows to parse an InputStream containing a file * encoded with the Guitar Pro 3 format. * * @author Matthieu Wipliez * @author Mauricio Gracia Gutierrez */ public class GP3InputStream extends GPInputStream { /** * The versions...
private GPBeat readBeat() throws IOException {
4
Akshansh986/Webkiosk
Webkiosk/src/main/java/com/blackMonster/webkiosk/controller/updateAtnd/UpdateAvgAtnd.java
[ "public class RefreshDBPrefs {\n\n public static final String REFRESH_SERVICE_STATUS = \"refSStatus\";\n\n\n //Name value is out of sync, would be great if someone could fix it.\n public static final String DETAILED_ATND_TIMESTAMP = \"lastUpdate\";\n public static final String REFRESH_START_TIMESTAMP = ...
import android.content.Context; import com.blackMonster.webkiosk.SharedPrefs.RefreshDBPrefs; import com.blackMonster.webkiosk.crawler.CrawlerDelegate; import com.blackMonster.webkiosk.crawler.Model.SubjectAttendance; import com.blackMonster.webkiosk.databases.model.MySubjectAttendance; import com.blackMonster.webkiosk....
package com.blackMonster.webkiosk.controller.updateAtnd; public class UpdateAvgAtnd { public static final int ERROR = -100; /** * Updates Avg attendance to local db. * @param newSubjectAttendances * @param context * @return Number of subject whose attendance is modified * @throws S...
public static int update(List<SubjectAttendance> newSubjectAttendances, Context context) throws SubjectChangedException {
2
danimahardhika/wallpaperboard
library/src/main/java/com/dm/wallpaper/board/fragments/LatestFragment.java
[ "public class LatestAdapter extends RecyclerView.Adapter<LatestAdapter.ViewHolder> {\r\n\r\n private final Context mContext;\r\n private List<Wallpaper> mWallpapers;\r\n private final DisplayImageOptions.Builder mOptions;\r\n\r\n public LatestAdapter(@NonNull Context context, @NonNull List<Wallpaper> wa...
import android.content.res.Configuration; import android.graphics.BitmapFactory; import android.os.AsyncTask; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; im...
package com.dm.wallpaper.board.fragments; /* * Wallpaper Board * * Copyright (c) 2017 Dani Mahardhika * * 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 * * h...
if (WallpaperBoardApplication.getConfig().getWallpapersGrid() ==
1
ahammer/StockSimulator
android/src/com/metalrain/stocksimulator/android/views/OrderView.java
[ "public class StockSimulator extends Application {\n\n private GameState state;\n\n private static StockSimulator instance;\n\n public static GameState getGameState() {\n return instance.state;\n }\n\n @Override\n public void onCreate() {\n super.onCreate();\n instance = this;...
import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.FrameLayout; import android.widget.TextView; import com.metalrain.stocksimulator.android.StockSimulator; imp...
package com.metalrain.stocksimulator.android.views; /** * Created by Adam Hammer on 15-06-25. */ public class OrderView extends FrameLayout { @InjectView(R.id.market_item_name) TextView marketItemName; @InjectView(R.id.quantity) EditText quantity; @InjectView(R.id.button_increase_quantity) ...
PlayerEntity playerEntity = StockSimulator.getGameState().getCurrentPlayer();
7
MaChristmann/mobile-trial
sample/ExitAfterExpired/src/org/mobiletrial/exitafterexpired/MainActivity.java
[ "public class LicenseChecker {\n\tprivate static final String TAG = \"LicenseChecker\";\n\t\n\tprivate static final String KEY_FACTORY_ALGORITHM = \"RSA\";\n\n\t// Timeout value (in milliseconds) for calls to service.\n\tprivate static final int TIMEOUT_MS = 100 * 1000;\n\n\tprivate static final SecureRandom RANDOM...
import java.net.MalformedURLException; import java.net.URI; import java.net.URL; import org.mobiletrial.license.LicenseChecker; import org.mobiletrial.license.LicenseCheckerCallback; import org.mobiletrial.license.NotLicensedDialog; import org.mobiletrial.license.PlaystoreAccountType; import org.mobiletrial.license.Ret...
package org.mobiletrial.exitafterexpired; public class MainActivity extends Activity { private static final int BUYAPP_REQUEST = 1337; // Enter your public key here you get from the MobileTrial server private static final String BASE64_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDfydLjwPqSyuYHR3Wfc...
new PlaystoreAccountType());
3
rapidpro/surveyor
app/src/main/java/io/rapidpro/surveyor/data/Submission.java
[ "public class Logger {\n\n private static final String TAG = \"Surveyor\";\n\n public static void e(String message, Throwable t) {\n Log.e(TAG, message, t);\n }\n\n public static void w(String message) {\n Log.w(TAG, message);\n }\n\n public static void d(String message) {\n L...
import android.net.Uri; import com.nyaruka.goflow.mobile.Event; import com.nyaruka.goflow.mobile.Modifier; import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; impor...
package io.rapidpro.surveyor.data; public class Submission { private static final String SESSION_FILE = "session.json"; private static final String MODIFIERS_FILE = "modifiers.jsonl"; private static final String EVENTS_FILE = "events.jsonl"; private static final String COMPLETION_FILE = ".complet...
return SurveyUtils.mkdir(directory, MEDIA_DIR);
7
karlnicholas/votesmart
src/main/java/org/votesmart/classes/RatingClass.java
[ "@XmlRootElement(name=\"rating\")\r\npublic class Rating extends GeneralInfoBase {\r\n\r\n\tpublic ArrayList<CandidateRating> candidateRating;\r\n\t\r\n\t@XmlType(name=\"candidateRating\", namespace=\"rating\")\r\n\tpublic static class CandidateRating {\r\n\t\tpublic String candidateId;\r\n\t\tpublic String rating;...
import org.votesmart.api.*; import org.votesmart.data.Rating; import org.votesmart.data.Sig; import org.votesmart.data.Sigs; import org.votesmart.data.SigRating; import org.votesmart.data.Categories; import org.votesmart.data.CandidateRating;
package org.votesmart.classes; /** * <pre> * Rating Class * * * - Required * * - Multiple rows * * Rating.getCategories * This method dumps categories that contain released ratingss according to state. * Input: stateId (default: 'NA') * Output: {@link Categories} * * Rating.getSigList ...
public Rating getRating(String ratingId) throws VoteSmartException, VoteSmartErrorException {
0
wkgcass/Style
src/main/java/net/cassite/style/aggregation/IterableFuncSup.java
[ "public class StyleRuntimeException extends RuntimeException {\n /**\n *\n */\n private static final long serialVersionUID = 3062353717153173710L;\n\n public StyleRuntimeException(Throwable t) {\n super(t);\n }\n\n /**\n * Throw <code>this</c...
import java.util.Collection; import java.util.Iterator; import net.cassite.style.StyleRuntimeException; import net.cassite.style.def; import net.cassite.style.ptr; import net.cassite.style.control.*; import net.cassite.style.interfaces.RFunc1; import static net.cassite.style.Style.*; import static net.cassite.style.agg...
package net.cassite.style.aggregation; /** * Supporter of iterables * * @param <T> element type of the iterable * @author wkgcass */ public class IterableFuncSup<T> implements A1FuncSup<T> { protected final Iterable<T> iterable; IterableFuncSup(Iterable<T> iterable) { this.iter...
StyleRuntimeException sErr = $(err);
0
oxoooo/materialize
app/src/main/java/ooo/oxo/apps/materialize/MainActivity.java
[ "public class ActivityOptionsCompatCompat extends ActivityOptionsCompat {\n\n public static ActivityOptionsCompat makeClipRevealAnimation(\n View source, int startX, int startY, int width, int height) {\n if (Build.VERSION.SDK_INT >= 23) {\n return new ActivityOptionsImpl23(ActivityO...
import android.content.Intent; import android.databinding.DataBindingUtil; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.ActivityCompat; import an...
/* * Materialize - Materialize all those not material * Copyright (C) 2015 XiNGRZ <xxx@oxo.ooo> * * 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 * (a...
private IconCacheManager iconCacheManager;
1
LTTPP/Eemory
org.lttpp.eemory/src/org/lttpp/eemory/util/EclipseUtil.java
[ "public final class Constants {\n\n private Constants() {\n\n }\n\n public static final String EVERNOTE_INTERNATIONAL = \"Evernote International\";\n public static final String EVERNOTE_YINXIANG = \"印象笔记\";\n public static final String EVERNOTE_SANDBOX = \"Evernote Sandbox\";\n\n // Command IDs\n ...
import java.io.File; import java.util.Arrays; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.eclipse.core.commands.Exe...
package org.lttpp.eemory.util; public class EclipseUtil { public static List<File> getSelectedFiles(final ExecutionEvent event) throws NoDataFoundException { ISelection selection = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getSelection(); final List<File> files = ListUtil.list...
public static List<List<StyleText>> getSelectedStyleText(final StyledText styledText) {
3
nikacotAndroid/Weather-Guru-MVP
app/src/main/java/mk/petrovski/weathergurumvp/ui/city/ManageCityActivity.java
[ "@Entity(nameInDb = \"city\") public class CityDetailsModel {\n\n @Id(autoincrement = true) private Long id;\n\n private String areaName;\n private String country;\n private String latitude;\n private String longitude;\n private String population;\n private String region;\n private String weatherUrl;\n pri...
import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.view.View; import android.widget.AdapterView; import android.widget.AutoCompleteTextView; import android.widget.TextView; import butterk...
package mk.petrovski.weathergurumvp.ui.city; /** * Created by Nikola Petrovski on 2/14/2017. */ public class ManageCityActivity extends BaseActivity implements ManageCityMvpView, AdapterView.OnItemClickListener, CityAdapter.DeleteListener { @Inject ManageCityMvpPresenter<ManageCityMvpView> presenter; @Inj...
@Override public void showAutocompleteCities(List<LocationModel> locationList,
1
VanetSim/VanetSim
src/vanetsim/map/OSM/OSMLoader.java
[ "public final class ErrorLog {\r\n\r\n\t/** The <code>java.util.logging.Logger</code> instance. */\r\n\tprivate static Logger logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME); //$NON-NLS-1$\r\n\r\n\t/**\r\n\t * Sets the parameters for the static class.\r\n\t *\r\n\t * @param level\tthe minimum level for error m...
import java.awt.Color; import java.io.File; import java.io.FileInputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.concurrent.CyclicBarrier; import java.util.ArrayDeque; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; ...
/* * VANETsim open source project - http://www.vanet-simulator.org * Copyright (C) 2008 - 2013 Andreas Tomandl, Florian Scheuer, Bernhard Gruber * * 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 Softwa...
Map map = Map.getInstance();
4
cristcost/sensormix
sensormix-integration-bundle/src/test/java/com/google/developers/gdgfirenze/integration/SensormixServiceMockJpa.java
[ "public class SensormixServiceJpaImpl implements SensormixService, SensormixAdminInterface {\r\n\r\n /**\r\n * The class logger.\r\n */\r\n private static Logger logger = Logger.getLogger(SensormixServiceJpaImpl.class.getName());\r\n\r\n /**\r\n * Serializer that wrap Kryo instance to be thread safe.\r\n ...
import java.util.Date; import java.util.List; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; import javax.servlet.ServletException; import com.google.developers.gdgfirenze.dataservice.SensormixServiceJpaImpl; import com.google.developers.gdgfirenze.model.AbstractSample; import com....
package com.google.developers.gdgfirenze.integration; /** * The server side implementation of the RPC service. */ public class SensormixServiceMockJpa implements SensormixService { private EntityManagerFactory emf;
private SensormixServiceJpaImpl sensormixServiceJpaImpl;
0
xcltapestry/XCL-Charts
lib/src/main/java/org/xclcharts/chart/DialChart.java
[ "public class XEnum {\n\t\n\t\t/**\n\t\t * 横向显示位置,靠左,中间,还是靠右(如图标题......)\n\t\t * @author XCL\n\t\t *\n\t\t */\n\t\tpublic enum HorizontalAlign {\n\t\t\tLEFT, CENTER ,RIGHT\n\t\t}\t\t\t\n\t\t\n\t\t/**\n\t\t * 竖向显示位置,上方,中间,底部 (如坐标轴标签......)\n\t\t * @author XCL\n\t\t *\n\t\t */\n\t\tpublic enum VerticalAlign\n\t\t{\n\...
import org.xclcharts.renderer.axis.RoundAxisRender; import org.xclcharts.renderer.plot.PlotAttrInfo; import org.xclcharts.renderer.plot.PlotAttrInfoRender; import org.xclcharts.renderer.plot.Pointer; import org.xclcharts.renderer.plot.PointerRender; import android.graphics.Canvas; import android.util.Log; import java.u...
/** * Copyright 2014 XCL-Charts * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
RoundAxisRender roundAxis = new RoundAxisRender();
3
MewX/light-novel-library_Wenku8_Android
studio-android/LightNovelLibrary/app/src/main/java/org/mewx/wenku8/activity/MainActivity.java
[ "public class MyApp extends Application {\n @SuppressLint(\"StaticFieldLeak\")\n private static Context context;\n\n @Override\n public void onCreate() {\n super.onCreate();\n context = getApplicationContextLocal();\n }\n\n /**\n * wrap the getApplicationContext() function for ea...
import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.content.res.Configuration; import android.os.Build; import android.os.Bundle; import android.view.Menu; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.core.app.ActivityCompa...
package org.mewx.wenku8.activity; public class MainActivity extends BaseMaterialActivity { private static final int REQUEST_WRITE_EXTERNAL = 100; private static final int REQUEST_READ_EXTERNAL = 101; private static final AtomicBoolean NEW_VERSION_CHECKED = new AtomicBoolean(false); // This is f...
private NavigationDrawerFragment mNavigationDrawerFragment;
3
otto-de/edison-hal
src/main/java/de/otto/edison/hal/HalRepresentation.java
[ "public static Curies emptyCuries() {\n return new Curies();\n}", "public static Builder copyOf(final Embedded embedded) {\n final Builder builder = new Builder();\n if (embedded != null && embedded.items != null) {\n builder._embedded.putAll(embedded.items);\n }\n return builder;\n}", "pu...
import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.JsonNode; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL; import static de.otto.edison.hal.Curies.emptyCu...
package de.otto.edison.hal; /** * Representation used to parse and create HAL+JSON documents from Java classes. * * @see <a href="http://stateless.co/hal_specification.html">hal_specification.html</a> * @see <a href="https://tools.ietf.org/html/draft-kelly-json-hal-08">draft-kelly-json-hal-08</a> * * @since 0...
return embedded != null ? embedded : emptyEmbedded();
2
dvanherbergen/robotframework-formslibrary
src/main/java/org/robotframework/formslibrary/keyword/LWWindowKeywords.java
[ "public class ContextOperator {\r\n\r\n\tprivate Container context;\r\n\r\n\t/**\r\n\t * Initialize a context operator for the current context.\r\n\t */\r\n\tpublic ContextOperator() {\r\n\t\tthis(FormsContext.getContext());\r\n\t}\r\n\r\n\t/**\r\n\t * Initialize a context operator for the given context.\r\n\t */\r...
import java.util.List; import org.robotframework.formslibrary.operator.ContextOperator; import org.robotframework.formslibrary.operator.FrameOperator; import org.robotframework.formslibrary.operator.LWWindowOperator; import org.robotframework.formslibrary.operator.OracleEngineOperator; import org.robotframework.fo...
package org.robotframework.formslibrary.keyword; @RobotKeywords public class LWWindowKeywords { @RobotKeyword("List Window Titles.\n\nLogs the open window titles.\n\nExample:\n| List Window Titles |\n") public List<String> listWindowTitles() { List<String> result = new LWWindowOperator().getWindowTit...
return FrameOperator.isFrameInCurrentAppContext();
1
getsocial-im/getsocial-android-sdk
example/src/main/java/im/getsocial/demo/fragment/ActivitiesFragment.java
[ "public final class Utils {\n\n\tpublic static final String PROD = \"Production\";\n\tpublic static final String TESTING_SSL = \"Testing SSL\";\n\tpublic static final String TESTING = \"Testing\";\n\n\t// this should match what we have in HadesConfigurationProvider\n\tpublic static final List<String> HADES_CONFIGS ...
import android.app.AlertDialog; import android.widget.FrameLayout; import android.widget.Toast; import java.util.Arrays; import java.util.Collections; import java.util.List; import im.getsocial.demo.Utils; import im.getsocial.demo.adapter.MenuItem; import im.getsocial.demo.utils.EditTextWOCopyPaste; import im.getsocial...
.withAction(new MenuItem.Action() { @Override public void execute() { ActivityFeedViewBuilder.create(ActivitiesQuery.inAllTopics().byUser(UserId.currentUser())) .show()...
if (Utils.isCustomErrorMessageEnabled(getContext())) {
0
jonathangerbaud/Contacts
src/com/abewy/android/apps/contacts/adapter/ContactMediumGridAdapter.java
[ "public class ContactHolder\n{\n\tpublic final TextView\tletterText;\n\tpublic final ImageView\tpicture;\n\tpublic final TextView\tprimaryText;\n\n\tpublic ContactHolder(TextView letterText, ImageView picture, TextView primaryText)\n\t{\n\t\tthis.letterText = letterText;\n\t\tthis.picture = picture;\n\t\tthis.prima...
import org.apache.commons.lang3.StringUtils; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.abewy.android.apps.contacts.R; import com.abewy.android.apps.contacts.adapter.holder.ContactHolder; import com.abewy.android.apps.contacts.core.CorePrefs; import com.abewy.a...
package com.abewy.android.apps.contacts.adapter; public class ContactMediumGridAdapter extends ContactBaseAdapter { public ContactMediumGridAdapter() { super(); } @Override protected int getLayoutRes() { if (CorePrefs.isRoundedPictures()) return R.layout.item_contact_medium_grid_rounded_item; retu...
holder.picture.setImageResource(ContactsUtil.getDrawable(contact.getId()));
4
ofelbaum/spb-transport-app
src/main/java/com/emal/android/transport/spb/activity/SearchActivity.java
[ "public enum VehicleType {\n BUS(\"vehicle_bus\", \"0\", \"A\", false, Color.BLUE),\n TROLLEY(\"vehicle_trolley\", \"1\", \"Ш\", true, Color.GREEN),\n TRAM(\"vehicle_tram\", \"2\", \"T\", false, Color.RED),\n SHIP(\"vehicle_ship\", \"46\", \"S\", false, Color.YELLOW);\n\n private String code;\n pr...
import android.app.Activity; import android.graphics.*; import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; import android.view.*; import android.view.MenuItem; import android.widget.*; import com.emal.android.transport.spb.R; import com.emal.android.transport.spb.VehicleType; import com.ema...
package com.emal.android.transport.spb.activity; /** * @author alexey.emelyanenko@gmail.com * @since 1.5 */ public class SearchActivity extends Activity { private static final String TAG = SearchActivity.class.getName(); private SearchView searchView; private ListView listView; private AsyncTask...
private RoutesStorage routesStorage = new RoutesStorage();
3
mosmetro-android/mosmetro-android
app/src/main/java/pw/thedrhax/mosmetro/httpclient/clients/OkHttp.java
[ "public abstract class Client {\n public enum METHOD { GET, POST }\n\n public final List<InterceptorTask> interceptors = new LinkedList<>();\n public final Headers headers;\n\n private boolean intercepting = false;\n private boolean followRedirects = true;\n protected Context context;\n protect...
import android.annotation.SuppressLint; import android.content.Context; import android.os.Build; import android.webkit.CookieManager; import android.webkit.CookieSyncManager; import java.io.IOException; import java.io.InterruptedIOException; import java.security.KeyManagementException; import java.security.NoSuchAlgori...
/** * Wi-Fi в метро (pw.thedrhax.mosmetro, Moscow Wi-Fi autologin) * Copyright © 2015 Dmitry Karikh <the.dr.hax@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version ...
protected HttpResponse request(HttpRequest request) throws IOException {
4
DataDog/jenkins-datadog-plugin
src/main/java/org/datadog/jenkins/plugins/datadog/listeners/DatadogSaveableListener.java
[ "public interface DatadogClient {\n\n public static enum ClientType {\n HTTP,\n DSD;\n\n private ClientType() { }\n }\n\n public static enum Status {\n OK(0),\n WARNING(1),\n CRITICAL(2),\n UNKNOWN(3);\n\n private final int val;\n\n private Sta...
import org.datadog.jenkins.plugins.datadog.DatadogEvent; import org.datadog.jenkins.plugins.datadog.DatadogUtilities; import org.datadog.jenkins.plugins.datadog.clients.ClientFactory; import org.datadog.jenkins.plugins.datadog.events.ConfigChangedEventImpl; import java.util.Map; import java.util.Set; import java.util.l...
/* The MIT License Copyright (c) 2015-Present Datadog, Inc <opensource@datadoghq.com> All rights reserved. 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 l...
DatadogClient client = ClientFactory.getClient();
3
maker56/UltimateSurvivalGames
UltimateSurvivalGames/src/me/maker56/survivalgames/commands/arguments/ConfigArgument.java
[ "public class Helper {\r\n\r\n\tpublic static void showLobbyHelpsite(Player p) {\r\n\t\tp.sendMessage(MessageHandler.getMessage(\"prefix\") + \"Lobby Management §7§m---§r §6Helpsite\");\r\n\t\tfor(BaseComponent[] bc : lobby) {\r\n\t\t\tp.spigot().sendMessage(bc);\r\n\t\t}\r\n\t}\r\n\t\r\n\tpublic static void showCo...
import me.maker56.survivalgames.chat.Helper; import me.maker56.survivalgames.commands.messages.MessageHandler; import me.maker56.survivalgames.commands.permission.Permission; import me.maker56.survivalgames.commands.permission.PermissionHandler; import me.maker56.survivalgames.database.ConfigReloader; import org.b...
package me.maker56.survivalgames.commands.arguments; public class ConfigArgument { private CommandSender sender; private String[] args; public ConfigArgument(CommandSender sender, String[] args) { this.sender = sender; this.args = args; } public boolean execute() { if(!(sender instanc...
p.sendMessage(MessageHandler.getMessage("no-permission"));
1
SilentChaos512/ScalingHealth
src/main/java/net/silentchaos512/scalinghealth/utils/SHPlayers.java
[ "public interface IPlayerData {\n int getAllHearts();\n\n int getHeartByCrystals();\n\n void setXpHearts(PlayerEntity player, int amount);\n\n void setHeartByCrystals(PlayerEntity player, int amount);\n\n int getPowerCrystals();\n\n void setPowerCrystalCount(PlayerEntity player, int amount);\n\n ...
import net.minecraft.entity.player.PlayerEntity; import net.silentchaos512.scalinghealth.capability.IPlayerData; import net.silentchaos512.scalinghealth.capability.PlayerDataCapability; import net.silentchaos512.scalinghealth.config.Config; import net.silentchaos512.scalinghealth.config.EvalVars; import net.silentchaos...
package net.silentchaos512.scalinghealth.utils; /** * Utility class for player-related settings. Same as with {@link SHDifficulty}, this should put a * stop to the tangled mess of config references. */ public final class SHPlayers { private SHPlayers() {throw new IllegalAccessError("Utility class");}
public static IPlayerData getPlayerData(PlayerEntity entity){
0
YiuChoi/MicroReader
app/src/main/java/name/caiyao/microreader/ui/fragment/WeixinFragment.java
[ "public class WeixinNews {\n @SerializedName(\"ctime\")\n private String ctime;\n @SerializedName(\"title\")\n private String title;\n @SerializedName(\"description\")\n private String description;\n @SerializedName(\"picUrl\")\n private String picUrl;\n @SerializedName(\"url\")\n priv...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.design.widget.Snackbar; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import androi...
package name.caiyao.microreader.ui.fragment; public class WeixinFragment extends BaseFragment implements SwipeRefreshLayout.OnRefreshListener, IWeixinFragment { WeixinAdapter weixinAdapter; @BindView(R.id.swipe_target) RecyclerView swipeTarget; @BindView(R.id.swipeToLoadLayout) SwipeRefreshLay...
if (NetWorkUtil.isWifiConnected(getActivity())) {
6
AstartesGuardian/WebDAV-Server
WebDAV-Server/src/webdav/server/virtual/entity/standard/IRsGhost.java
[ "public class FileSystemPath\r\n{\r\n public FileSystemPath(String fileName, FileSystemPath parent)\r\n {\r\n this.fileName = fileName;\r\n this.parent = parent;\r\n this.fileSystemPathManager = parent.fileSystemPathManager;\r\n }\r\n public FileSystemPath(String fileName, FileSyste...
import http.FileSystemPath; import http.server.exceptions.NotFoundException; import http.server.exceptions.UserRequiredException; import http.server.message.HTTPEnvRequest; import java.time.Instant; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Map; import j...
package webdav.server.virtual.entity.standard; public abstract class IRsGhost extends Rs { public IRsGhost(FileSystemPath path) { this.path = path; } protected final FileSystemPath path; @Override
public boolean isVisible(HTTPEnvRequest env) throws UserRequiredException
3
OliverColeman/ahni
src/com/ojcoleman/ahni/experiments/MDP.java
[ "public interface Activator extends XmlPersistable {\n\n\t/**\n\t * @return Object output array of type double with dimensions dependent on implementation, given last provided input\n\t * activation via <code>nextSequence(double[])</code> or <code>nextSequence(double[][])</code>.\n\t * @see Activator#nextSe...
import java.awt.Color; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.File; import java.io.FileWriter; import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java....
trialCount = gridSize; else if (environmentReplaceProb == 0) trialCount = environmentCount; else trialCount = actionCountMax * stateCountMax; logger.info("MDP trial count set to " + trialCount); } ((Properties) props).getEvolver().addEventListener(this); super.init(props); } private void...
NiceWriter logOutput = !logText ? null : new NiceWriter(new FileWriter(baseFileName + ".txt"), "0.00");
4
CBSkarmory/AWGW
src/main/java/cbskarmory/units/air/AdvFighter.java
[ "public class Player {\n\n public static int numberOfPlayers;\n public final CO CO;\n public final int id;\n private ArrayList<Unit> unitsControlled;\n private int money;\n private ArrayList<Property> propertiesOwned;\n private int commTowers;\n private Color teamColor;\n\n /**\n * Co...
import cbskarmory.Player; import cbskarmory.PassiveFlag.MoveType; import cbskarmory.terrain.Terrain; import cbskarmory.units.Stealth; import cbskarmory.units.Unit; import cbskarmory.weapons.WeaponType;
/* * Copyright(c) 2017 CBSkarmory (https://github.com/CBSkarmory) * * This code 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. * * This code is distributed in the hope that it will be useful, * but WI...
setWeapon(0, WeaponType.MISSILE);
5
mguetlein/CheS-Mapper
src/main/java/org/chesmapper/view/gui/CompoundListPanel.java
[ "public class Cluster extends ZoomableCompoundGroup implements CompoundGroupWithProperties, DoubleNameElement,\r\n\t\tComparable<Cluster>\r\n{\r\n\tprivate ClusterData clusterData;\r\n\r\n\tHashMap<String, List<Compound>> compoundsOrderedByPropterty = new HashMap<String, List<Compound>>();\r\n\r\n\tprivate boolean ...
import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.beans.PropertyChangeEvent; import java.beans.Prope...
@Override public void propertyChange(PropertyChangeEvent evt) { if (evt.getPropertyName().equals(ViewControler.PROPERTY_COMPOUND_DESCRIPTOR_CHANGED) || evt.getPropertyName().equals(ViewControler.PROPERTY_HIGHLIGHT_CHANGED) || evt.getPropertyName().equals(ViewControler.PROPERTY_FEATURE_SORT...
setForeground(ComponentFactory.FOREGROUND);
6
Andyccs/sqat
stylechecker/src/main/java/com/sqatntu/SqatServer.java
[ "public class Benchmark {\n public static final int LINE_OF_CODE = 200;\n public static final int DEPTH_OF_CONDITION_NESTING = 3;\n public static final int AVERAGE_LENGTH_OF_IDENTIFIER = 17;\n public static final int NUMBER_OF_ATTRIBUTES = 6;\n public static final int NUMBER_OF_METHODS = 10;\n}", "public cla...
import com.sqatntu.metrics.Benchmark; import com.sqatntu.metrics.MetricCalculator; import com.sqatntu.metrics.ScoreCalculator; import com.sqatntu.stylechecker.StyleChecker; import com.sqatntu.stylechecker.StyleCheckerException; import com.sqatntu.stylechecker.proto.ErrorOuterClass; import com.sqatntu.stylechecker.proto...
/* * The MIT License (MIT) * * Copyright (c) 2015 Andy Chong Chin Shin * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software * and associated documentation files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to...
MetricCalculator calculator = new MetricCalculator();
1
quanhua92/GLMediaPlayer
glmediaplayer/src/main/java/com/quan404/glmediaplayer/GLMediaPlayer.java
[ "public class LogConfig {\n public static final boolean ON = true;\n}", "public class AndroidPlayer implements BasePlayer, MediaPlayer.OnVideoSizeChangedListener {\n private MediaPlayer mediaPlayer = new MediaPlayer();\n private BasePlayer.OnVideoSizeChangedListener listener;\n @Override\n public v...
import android.content.Context; import android.media.MediaPlayer; import android.util.Log; import android.view.Surface; import com.google.android.exoplayer.ExoPlayer; import com.quan404.glmediaplayer.config.LogConfig; import com.quan404.glmediaplayer.players.AndroidPlayer; import com.quan404.glmediaplayer.players.BaseP...
package com.quan404.glmediaplayer; /** * Created by quanhua on 06/01/2016. */ public class GLMediaPlayer { private final static String TAG = "GLMediaPlayer"; private BasePlayer mediaPlayer = null; private Context context = null; private VideoSurfaceView mVideoView; //=================== + Con...
public GLMediaPlayer(Context context, BaseVideoRenderer renderer, boolean useExoPlayer) {
4
opacapp/opacclient
opacclient/libopac/src/main/java/de/geeksfactory/opacclient/apis/SISIS.java
[ "public class Account {\n private long id;\n private String library;\n\n private String label;\n private String name;\n private String password;\n private long cached;\n private boolean password_known_valid = false;\n private boolean supportPolicyHintSeen = false;\n\n @Override\n publi...
import org.apache.http.NameValuePair; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.utils.URLEncodedUtils; import org.apache.http.message.BasicNameValuePair; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; import org.json.JSONException; i...
@Override public SearchRequestResult search(List<SearchQuery> query) throws IOException, OpacErrorException, JSONException { List<NameValuePair> params = new ArrayList<>(); int index = 0; int restrictionIndex = 0; start(); params.add(new BasicNam...
return new SearchRequestResult(new ArrayList<SearchResult>(), 0, 1,
3
winks/cinder
src/org/art_core/dev/cinder/views/JFInputView.java
[ "public final class CinderLog {\n\tpublic final int OK = IStatus.OK;\n\tpublic final int INFO = IStatus.INFO;\n\tpublic final int WARNING = IStatus.WARNING;\n\tpublic final int ERROR = IStatus.ERROR;\n\t\n\tprivate CinderLog() {}\n\t\n\t/**\n\t * Logs debug messages if the config allows it.\n\t * @param message\n\t...
import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.ResourceBundle; import org.art_core.dev.cinder.CinderLog; import org.art_core.dev.cinder.CinderPlugin; import org.art_core.dev.cinder.controller.MainController; import org.art_core.dev.cinder.model.ItemManager; import org.a...
package org.art_core.dev.cinder.views; /** * Main view for cinder. * @author Florian Anderiasch * */ public class JFInputView extends ViewPart { private final String[] colNames = { "", "Name", "Message", "Location", "Line", "Offset", "Status", "Changed" }; private final int[] colSizes = {20, 150, 200, 200, ...
private MainController cControl;
2
tvportal/android
app/src/main/java/com/mitechlt/tvportal/play/activities/TVShowActivity.java
[ "public class VideoCastManager extends BaseCastManager\n implements OnMiniControllerChangedListener, OnFailedListener {\n\n public static final String EXTRA_HAS_AUTH = \"hasAuth\";\n public static final String EXTRA_MEDIA = \"media\";\n public static final String EXTRA_START_POINT = \"startPoint\";\...
import android.app.AlertDialog; import android.app.Dialog; import android.content.ContentValues; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.preference.Prefere...
super.onResume(); } @Override protected void onPause() { if (mCastManager != null) { mCastManager.decrementUiCounter(); mCastManager.removeVideoCastConsumer(mCastConsumer); } super.onPause(); } @Override protected void onDestroy() { ...
getContentResolver().insert(FavoritesContentProvider.CONTENT_URI, values);
2
GoogleCloudPlatform/healthcare-api-dicom-fuse
src/main/java/com/google/dicomwebfuse/fuse/DicomPathParser.java
[ "static final String DCM_EXTENSION = \".dcm\"; // Default extension", "public class DicomPathCacher {\n\n private final ConcurrentHashMap<String, DicomPath> temporaryDicomPaths = new ConcurrentHashMap<>();\n\n public void putDicomPath(String path, DicomPath dicomPath) {\n temporaryDicomPaths.put(path, dicomP...
import static com.google.dicomwebfuse.fuse.FuseConstants.DCM_EXTENSION; import com.google.dicomwebfuse.fuse.cacher.DicomPathCacher; import com.google.dicomwebfuse.entities.DicomPath; import com.google.dicomwebfuse.entities.DicomPathLevel; import com.google.dicomwebfuse.exception.DicomFuseException; import java.util.reg...
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
private final DicomPathCacher dicomPathCacher;
1