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
mokszr/ultimate-geojson
ugeojson-builder/src/main/java/org/ugeojson/builder/geometry/MultiPolygonBuilder.java
[ "public interface BuilderConstants {\n\n\tpublic static final String OPEN_BRACKET = \"[\";\n\tpublic static final String CLOSE_BRACKET = \"]\";\n\tpublic static final String OPEN_CURLY_BRACE = \"{\";\n\tpublic static final String CLOSE_CURLY_BRACE = \"}\";\n\t\n\tpublic static final String COMMA_SPACE = \", \";\n\t...
import java.util.List; import org.ugeojson.builder.common.BuilderConstants; import org.ugeojson.model.GeoJSONObjectTypeEnum; import org.ugeojson.model.geometry.LineStringDto; import org.ugeojson.model.geometry.MultiPolygonDto; import org.ugeojson.model.geometry.PolygonDto;
package org.ugeojson.builder.geometry; /** * @author moksuzer * */ public class MultiPolygonBuilder extends GeometryBuilder<MultiPolygonDto> { private static final MultiPolygonBuilder INSTANCE = new MultiPolygonBuilder(); public static MultiPolygonBuilder getInstance() { return INSTANCE; } private MultiP...
List<LineStringDto> linearRings = polygonDto.getLinearRings();
2
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRegistryAuditor.java
[ "public abstract class IHETransactionEventTypeCodes extends CodedValueType\n{\n\t/**\n\t * Create a new IHE Event Code using a specific code and value\n\t * \n\t * @param value Coded value for IHE event code\n\t * @param meaning Display name for IHE event code\n\t */\n\tprotected IHETransactionEventTypeCodes(String...
import org.openhealthtools.ihe.atna.auditor.codes.ihe.IHETransactionEventTypeCodes; import org.openhealthtools.ihe.atna.auditor.codes.rfc3881.RFC3881EventCodes.RFC3881EventOutcomeCodes; import org.openhealthtools.ihe.atna.auditor.context.AuditorModuleContext; import org.openhealthtools.ihe.atna.auditor.events.ihe.Impor...
/******************************************************************************* * Copyright (c) 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is a...
if (! EventUtils.isEmptyOrNull(userName)) {
5
sashavasko/WiFiAfterConnect
src/com/wifiafterconnect/handlers/SwitchURLHandler.java
[ "public class ParsedHttpInput extends Worker{\n\n\tpublic class JsonInput extends HttpInput {\n\t\tprivate JSONObject json = null;\n\t\t\n\t\tpublic JsonInput(URL url) {\n\t\t\tsuper(url);\n\t\t\t// TODO Auto-generated constructor stub\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean parse(String source) {\n\t\t\tjson =...
import com.wifiafterconnect.ParsedHttpInput; import com.wifiafterconnect.WifiAuthParams; import com.wifiafterconnect.html.HtmlForm; import com.wifiafterconnect.html.HtmlPage; import com.wifiafterconnect.util.HttpInput;
/** * */ package com.wifiafterconnect.handlers; /** * @author sasha * */ public class SwitchURLHandler extends CaptivePageHandler implements CaptivePageHandler.Detection{ /* (non-Javadoc) * @see com.wifiafterconnect.handlers.CaptivePageHandler#checkParamsMissing(com.wifiafterconnect.WifiAuthParams) */ @O...
public boolean checkParamsMissing(WifiAuthParams params) {
1
vert-x3/vertx-jdbc-client
src/main/java/io/vertx/jdbcclient/impl/actions/JDBCQueryAction.java
[ "public abstract class AbstractJDBCAction<T> {\n\n protected final SQLOptions options;\n protected final JDBCStatementHelper helper;\n private static final JsonArray EMPTY = new JsonArray(Collections.unmodifiableList(new ArrayList<>()));\n\n protected AbstractJDBCAction(SQLOptions options) {\n this(null, opt...
import io.vertx.ext.jdbc.impl.actions.AbstractJDBCAction; import io.vertx.ext.jdbc.impl.actions.JDBCStatementHelper; import io.vertx.ext.jdbc.spi.JDBCColumnDescriptorProvider; import io.vertx.ext.jdbc.spi.JDBCDecoder; import io.vertx.ext.sql.SQLOptions; import io.vertx.jdbcclient.impl.JDBCRow; import io.vertx.sqlclient...
/* * Copyright (c) 2011-2021 Contributors to the Eclipse Foundation * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 * which is available at https:...
public JDBCQueryAction(JDBCStatementHelper helper, SQLOptions options, Collector<Row, C, R> collector) {
4
DeOldSax/iliasDownloaderTool
src/main/java/download/IliasPdfDownloadCaller.java
[ "@Slf4j\r\npublic class IliasFile extends IliasTreeNode {\r\n\r\n\tprivate static final long serialVersionUID = -6286982393008142116L;\r\n\tprivate final int size;\r\n\tprivate final String extension;\r\n\tprivate final String sizeLabel;\r\n\t\r\n\tpublic IliasFile(String name, String url, IliasFolder parentFolder,...
import java.io.File; import java.util.List; import javafx.application.Platform; import javafx.concurrent.Task; import javafx.stage.FileChooser; import javafx.stage.Stage; import model.IliasFile; import model.IliasTreeNode; import model.persistance.IliasTreeProvider; import utils.DirectoryUtils; import control...
package download; /** * This class provides the option to ask the User for a position to store the * file and calls {@link IliasFileDownloaderTask}. * * @author deoldsax * */ public class IliasPdfDownloadCaller extends Task<Void> { private IliasTreeNode node; private DownloadMode mode; publ...
final List<IliasFile> allFiles = IliasTreeProvider.getAllIliasFiles();
0
AURIN/online-whatif
src/main/java/au/org/aurin/wif/impl/suitability/SuitabilityScenarioServiceImpl.java
[ "@ResponseStatus(value = HttpStatus.NOT_FOUND)\npublic class InvalidEntityIdException extends WifInvalidInputException {\n\n /** The Constant serialVersionUID. */\n private static final long serialVersionUID = 24265676271144835L;\n\n /**\n * Instantiates a new wif invalid input exception.\n */\n public Inva...
import java.io.IOException; import java.io.InputStream; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import javax.annotation.Resource; import ...
package au.org.aurin.wif.impl.suitability; /** * The Class SuitabilityScenarioServiceImpl. */ @Service @Qualifier("suitabilityScenarioService") public class SuitabilityScenarioServiceImpl implements SuitabilityScenarioService { /** The Constant serialVersionUID. */ @SuppressWarnings("unused") private sta...
final WifProject project = projectService.getProject(projectId);
3
mthli/Tweetin
Tweetin/src/io/github/mthli/Tweetin/Tweet/TweetAdapter.java
[ "public class CircleImageView extends ImageView {\n\n private static final ScaleType SCALE_TYPE = ScaleType.CENTER_CROP;\n\n private static final Bitmap.Config BITMAP_CONFIG = Bitmap.Config.ARGB_8888;\n private static final int COLORDRAWABLE_DIMENSION = 1;\n\n private static final int DEFAULT_BORDER_WID...
import android.app.Activity; import android.content.Intent; import android.text.method.LinkMovementMethod; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.*; import com.bumptech.glide.Glide; import com.github.curioustechizen.ago.RelativeTimeTextView; im...
if (tweet.getPictureURL() != null) { tweetHolder.pictureButton.setVisibility(View.VISIBLE); } else { tweetHolder.pictureButton.setVisibility(View.GONE); } tweetHolder.action.setVisibility(View.VISIBLE); } else { tweetHo...
activity.startActivity(tweetUnit.getIntentFromTweet(tweet, PictureActivity.class));
1
byoutline/CachedField
eventbuscachedfield/src/main/java/com/byoutline/eventbuscachedfield/EventBusCachedFieldWithArgBuilder.java
[ "public interface ProviderWithArg<RETURN_TYPE, ARG_TYPE> {\n\n RETURN_TYPE get(ARG_TYPE arg);\n}", "@AutoValue\npublic abstract class DbCacheArg<ARG_TYPE> {\n\n public static <ARG_TYPE> DbCacheArg<ARG_TYPE> create(@Nullable ARG_TYPE arg, @Nonnull FetchType fetchType) {\n return new AutoValue_DbCacheA...
import com.byoutline.cachedfield.ProviderWithArg; import com.byoutline.cachedfield.dbcache.DbCacheArg; import com.byoutline.cachedfield.dbcache.DbCachedValueProviderWithArg; import com.byoutline.cachedfield.dbcache.DbWriterWithArg; import com.byoutline.eventbuscachedfield.internal.EventIBus; import com.byoutline.ibusca...
package com.byoutline.eventbuscachedfield; /** * Fluent interface builder of {@link EventBusCachedField}. If you do not like * fluent interface create {@link EventBusCachedField} by one of its constructors. * * @param <RETURN_TYPE> Type of object to be cached. * @author Sebastian Kacprzak <sebastian.kacprzak at...
new EventIBus(eventBus),
4
greenjoe/sergeants
src/test/java/pl/joegreen/sergeants/Integration38TurnsTest.java
[ "public class GeneralsApi {\n private static final String ONE_VS_ONE_QUEUE = \"1v1\";\n private static final String TWO_VS_TWO_QUEUE = \"2v2\";\n private static final String FFA_QUEUE = \"\";\n private static final Logger LOGGER = LoggerFactory.getLogger(GeneralsApi.class);\n private Socket socket;\n...
import com.google.common.collect.ImmutableList; import org.hamcrest.Matchers; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.mockito.ArgumentCaptor; import org.mockito.Mockito; import pl.joegreen.sergeants.api.GeneralsApi; import pl.joegreen.sergeants.api.test.FakeSocket; import pl....
package pl.joegreen.sergeants; public class Integration38TurnsTest { private FakeSocket fakeSocket = new FakeSocket(); private GeneralsApi fakeGeneralsApi = GeneralsApi.createWithCustomSocket(fakeSocket); private Bot bot = Mockito.mock(Bot.class); private List<GameResult> gameResults; @Before ...
CompletableFuture<List<GameResult>> future = Games.playAsynchronouslyWithCustomApi(fakeGeneralsApi,
3
unchartedsoftware/ensemble-clustering
ensemble-clustering/src/test/java/com/oculusinfo/ml/unsupervised/TestGeoClusteringWithDPMeans.java
[ "public class DataSet implements Serializable, Iterable<Instance> {\r\n\tprivate static final long serialVersionUID = -544003860939601075L;\r\n\t\r\n\tprivate final Map<String, Instance> map = new LinkedHashMap<String, Instance>();\r\n\r\n\tprivate class DataSetIterator implements Iterator<Instance> {\r\n\t\tIterat...
import com.oculusinfo.ml.unsupervised.cluster.ClusterResult; import com.oculusinfo.ml.unsupervised.cluster.dpmeans.DPMeans; import com.oculusinfo.ml.DataSet; import com.oculusinfo.ml.Instance; import com.oculusinfo.ml.feature.spatial.GeoSpatialFeature; import com.oculusinfo.ml.feature.spatial.centroid.GeoSpatialCentroi...
/** * Copyright (c) 2013 Oculus Info Inc. * http://www.oculusinfo.com/ * * Released under the MIT License. * * 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, inclu...
clusterer.registerFeatureType("geo", GeoSpatialCentroid.class, new HaversineDistance(1.0));
3
stefanhaustein/nativehtml
swing/src/main/java/org/kobjects/nativehtml/swing/SwingPlatform.java
[ "public interface Platform {\n\tElement createElement(Document document, ElementType elementType, String name);\n\tvoid openInBrowser(URI url);\n\tInputStream openInputStream(URI url) throws IOException;\n float getPixelPerDp();\n}", "public class ElementImpl implements Element {\n \n public static String ge...
import java.io.InputStream; import java.net.MalformedURLException; import org.kobjects.nativehtml.dom.Platform; import org.kobjects.nativehtml.util.ElementImpl; import java.awt.Desktop; import java.awt.Image; import java.io.ByteArrayInputStream; import java.io.IOException; import java.net.URI; import java.net.URL; impo...
package org.kobjects.nativehtml.swing; public class SwingPlatform implements Platform { static String fakeDataUrl(String url) { if (url.startsWith("data:")) { int cut = url.indexOf(',') + 1; return "http://240.0.0.0/base64hash" + url.substring(cut).hashCode(); } return url; } Di...
public Element createElement(Document document, ElementType elementType, String elementName) {
3
naotawool/salary-calculation
src/main/java/salarycalculation/web/resources/EmployeeResource.java
[ "public class EmployeeRepositoryDao implements EmployeeRepository {\n\n private OrganizationRepository organizationRepository;\n private EmployeeDao dao;\n private EmployeeTransformer transformer;\n\n public EmployeeRepositoryDao() {\n this.dao = new EmployeeDao();\n this.organizationRepos...
import java.util.List; import java.util.stream.Collectors; import javax.validation.constraints.NotNull; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import com.codahale.metrics.annotation.Timed; import salarycalculation.d...
package salarycalculation.web.resources; /** * 従業員に関するリクエストを受け付けるクラス。 * * @author naotake */ @Path("/employee") @Produces(MediaType.APPLICATION_JSON + "; charset=utf-8") public class EmployeeResource { private EmployeeRepository repository; public EmployeeResource() {
repository = new EmployeeRepositoryDao();
0
agune/flyJenkins
flyJenkins/src/main/java/com/agun/flyJenkins/model/util/ModelSoting.java
[ "public class DeployLog {\n\n\tprivate String deployId;\n\tprivate String jobName;\n\tprivate String production;\n\tprivate String host;\n\tprivate int serviceGroupId;\n\tprivate int serviceId;\n\tprivate Date date;\n\tprivate Date reserveDate;\n\tprivate int requestOrder = 0;\n\t\n\tpublic int getRequestOrder() {\...
import java.util.Collections; import java.util.Comparator; import java.util.List; import com.agun.flyJenkins.model.DeployLog; import com.agun.flyJenkins.model.DeployReport; import com.agun.flyJenkins.model.DeployRequest; import com.agun.flyJenkins.model.ProductionMeta; import com.agun.flyJenkins.model.ServiceMeta;
package com.agun.flyJenkins.model.util; public class ModelSoting { public static void serviceSortByWeight(List<ServiceMeta> serviceMetaList){ Comparator<ServiceMeta> comparator = new Comparator<ServiceMeta>() { public int compare(ServiceMeta o1, ServiceMeta o2) { return (o1.getWeight() > o2.getWeight())?...
public static void deployReportSortId(List<DeployReport> deployReportList){
1
Sciss/TreeTable
java/src/main/java/de/sciss/treetable/j/ui/BasicTreeTableUI.java
[ "public class TreeTable extends JComponent implements Scrollable {\r\n\r\n public TreeTable() {\r\n this(new DefaultTreeTableNode());\r\n }\r\n\r\n public TreeTable(TreeTableNode root) {\r\n this(new DefaultTreeModel(root), new DefaultTreeColumnModel(root));\r\n }\r\n\r\n public TreeTab...
import java.awt.AlphaComposite; import java.awt.Color; import java.awt.Component; import java.awt.ComponentOrientation; import java.awt.Composite; import java.awt.Container; import java.awt.Dimension; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; import ja...
protected Component component; protected boolean tableColumn = true; protected boolean treeColumnSelected; protected boolean rowSelectionAllowed; protected boolean columnSelectionAllowed; protected Object node; protected int row; protected int column; protected Co...
TreeColumnModel model = treeTable.getTreeColumnModel();
5
AppHero2/Raffler-Android
app/src/main/java/com/raffler/app/RegisterUserActivity.java
[ "public class AlertView {\r\n public enum Style{\r\n ActionSheet,\r\n Alert\r\n }\r\n private final FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(\r\n ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM\r\n );\r\n public s...
import android.Manifest; import android.app.Activity; import android.content.Intent; import android.content.pm.PackageManager; import android.content.res.ColorStateList; import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import android.os.Build...
public void onResult(boolean success) { hud.dismiss(); startActivity(new Intent(RegisterUserActivity.this, MainActivity.class)); RegisterUserActivity.this.finish(); } }...
new AlertView.Builder().setContext(this)
0
dvanherbergen/robotframework-formslibrary
src/main/java/org/robotframework/formslibrary/operator/TabOperator.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 org.robotframework.formslibrary.FormsLibraryException; import org.robotframework.formslibrary.chooser.ByComponentTypeChooser; import org.robotframework.formslibrary.util.ComponentType; import org.robotframework.formslibrary.util.Logger; import org.robotframework.formslibrary.util.ObjectUtil;
package org.robotframework.formslibrary.operator; /** * Operator for working with Tabs. */ public class TabOperator extends AbstractComponentOperator { /** * Initialize a TabOperator with the first tabbar found in the current * context. */ public TabOperator() { super(ne...
throw new FormsLibraryException("Tab '" + name + "' not found.");
0
EBISPOT/webulous
webulous-service/src/main/java/uk/ac/ebi/spot/webulous/service/DataConversionService.java
[ "public class PseudoRandomAutoIDGenerator extends AbstractIDGenerator implements Revertable {\n\n private long nextId = System.nanoTime();\n\n private Stack<Long> checkpoints = new Stack<Long>();\n\n protected long getRawID(Class<? extends OWLEntity> type) throws AutoIDException {\n long id = nextId...
import org.apache.commons.lang3.StringUtils; import org.semanticweb.owlapi.model.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.data.domain.Sort; import org.s...
package uk.ac.ebi.spot.webulous.service; /** * @author Simon Jupp * @date 25/03/2015 * Samples, Phenotypes and Ontologies Team, EMBL-EBI */ @Service public class DataConversionService { @Autowired
DataConversionRunRepository dataConversionRunRepository;
7
AndroidCreativeDesign/AndroidSharingPlatform
app/src/main/java/cn/daixiaodong/myapp/fragment/IdeaListFragment.java
[ "@EActivity(R.layout.activity_sign_in)\npublic class SignInActivity extends BaseActivity {\n\n public final static int SIGN_IN_REQUEST_CODE = 1111;\n public final static int SIGN_IN_SUCCESS_RESULT_CODE = 1112;\n public final static int SIGN_IN_CANCEL_RESULT_CODE = 1113;\n\n\n @ViewById(R.id.id_tb_toolba...
import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.DefaultItemAnimator; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import andr...
if (isRefresh) { mData.clear(); } topicNum = list.size(); mData.addAll(0, list); //mAdapter.notifyDataSetChanged(); loadNotTopicData(isRefresh); } ...
SignInActivity_.intent(getParentFragment()).startForResult(SignInActivity.SIGN_IN_REQUEST_CODE);
0
nichbar/Aequorea
app/src/main/java/nich/work/aequorea/common/utils/IntentUtils.java
[ "public class Constants {\n public static final String AUTHOR = \"author\";\n public static final String TAG = \"tag\";\n public static final String ARTICLE_ID = \"article_id\";\n public static final String AUTHOR_ID = \"author_id\";\n public static final String TAG_ID = \"tag_id\";\n public stati...
import android.app.Activity; import android.content.Context; import android.content.Intent; import android.net.Uri; import androidx.core.app.ActivityOptionsCompat; import androidx.core.content.FileProvider; import android.view.View; import java.io.File; import nich.work.aequorea.BuildConfig; import nich.work.aequorea.c...
package nich.work.aequorea.common.utils; public class IntentUtils { public static void startSettingsActivity(Context context) { Intent i = new Intent(context, SettingsActivity.class); context.startActivity(i); } public static void startArticleActivity(Context context, long id) { ...
Intent i = new Intent(context, AuthorActivity.class);
3
kaif-open/kaif-android
app/src/main/java/io/kaif/mobile/view/daemon/VoteDaemon.java
[ "public class EventPublishSubject<T> {\n\n private final PublishSubject<T> subject;\n\n public EventPublishSubject() {\n this.subject = PublishSubject.create();\n }\n\n public Observable<T> getSubject(Class<?>... classes) {\n return subject.asObservable().filter(event -> {\n for (Class<?> clazz : cla...
import javax.inject.Inject; import javax.inject.Singleton; import io.kaif.mobile.event.EventPublishSubject; import io.kaif.mobile.event.vote.VoteArticleSuccessEvent; import io.kaif.mobile.event.vote.VoteDebateSuccessEvent; import io.kaif.mobile.event.vote.VoteEvent; import io.kaif.mobile.model.Vote; import io.kaif.mobi...
package io.kaif.mobile.view.daemon; @Singleton public class VoteDaemon { private final EventPublishSubject<VoteEvent> subject;
private final VoteService voteService;
5
Rezar/Ubiqlog
app/src/main/java/com/ubiqlog/vis/ui/CallLog.java
[ "public class Settings {\n\n\tpublic static final String googleMapKey = \"0U0FROSv7CVVKcfYcZY_7wDf4OBYAgX9HsueySA\";\n\tpublic static final String PREF_FILE_NAME = \"UbiqlogVisPrefFile\";\n\tpublic static final String LOG_FOLDER = Setting.LOG_FOLDER;\n\tpublic static final String SensorLocation = \"Location\";\n\tp...
import java.io.InputStream; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.Random; import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Conten...
String dateTime = _date.toLocaleString(); Paint p = new Paint(); int yTextOffset = 20; int xTextOffset = 10; int yRectOffset = 10; int xRectOffset = 10; p.setAntiAlias(true); p.setFakeBoldText(true); p.setTypeface(Typeface.DEFAULT_BOLD); p.setTextScaleX(1.2f); p.setTextAlign(Paint.Al...
_cBar = new ControlBar(this, 0, Settings.call_timeFrame, stateC, null,
0
ganguo/yingping_rn
Yingping/android/OfficialOpenSDK/src/main/java/com/share/api/sina/SinaShareBuilder.java
[ "public class OfficialConstant {\n\n /**\n * 新浪分享类型(网页,音乐,音频,视频)\n */\n public final static String SINA_WEBPAGE_TYPE = \"sina_webpage_type\"; //网页类型\n public final static String SINA_VIDEO_TYPE = \"sina_video_type\"; //视频类型\n public final static String SINA_VOICE_TYPE = \"sina_voice_type\"; /...
import android.app.Activity; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.widget.Toast; import com.share.api.base.OfficialConstant; import com.share.api.interfaces.sina.SinaCommonOpt; import com.share.api.interfaces.sina.SinaMediaObjOpt; import com.share.api.interfaces.sina.Sina...
package com.share.api.sina; /** * 负责初始化新浪分享需要的资源, 并且调用分享 * Created by Aaron on 6/24/16. */ public class SinaShareBuilder { private static WeiboMultiMessage weiboMessage; private static TextObject textObject; private static ImageObject imageObject; private static BaseMediaObject baseMediaObject; ...
public static class WebPageObjStep implements SinaCommonOpt<WebPageObjStep> {
1
DistantEye/EP_Utilities
EclipsePhaseLifePath/src/com/github/distanteye/ep_utils/commands/Command.java
[ "public abstract class ConditionalStatement extends Command {\r\n\tprivate boolean isInverted;\r\n\tprotected Command parent; // the containing command for this Conditional\r\n\t\r\n\t/**\r\n\t * Returns appropriate Conditional based on the input provided \r\n\t * @param input Validly formated conditional. Should s...
import java.util.ArrayList; import java.util.HashMap; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.github.distanteye.ep_utils.commands.conditionals.ConditionalStatement; import com.github.distanteye.ep_utils.commands.directives.Directive; import com.github.distanteye.ep_utils.contain...
*/ public void subpartsToParams() { for (int i = 0; i < subparts.length; i++) { params.put(i, subparts[i]); } } /** * Returns a human-readable version of the Command. This is a fallback, subclasses should implement their own * @return Returns basic command description */ public Stri...
protected boolean resolveConditional(CharacterEnvironment env)
3
jawher/immanix
src/test/java/immanix/AtLeastButFiniteMatcherTest.java
[ "public class AtLeastButFiniteMatcher<T> extends StaxMatcher<List<T>> {\n private final StaxMatcher<T> delegate;\n private final int n;\n\n public AtLeastButFiniteMatcher(StaxMatcher<T> delegate, int n) {\n this.delegate = delegate;\n this.n = n;\n }\n\n @Override\n public MatcherRes...
import org.junit.Test; import immanix.matchers.AtLeastButFiniteMatcher; import immanix.readers.ReplayEventReader; import immanix.utils.FullPacman; import immanix.utils.HungryPacman; import javax.xml.stream.events.XMLEvent; import java.util.Arrays; import java.util.List; import static org.junit.Assert.*; import static o...
package immanix; public class AtLeastButFiniteMatcherTest { @Test public void testDelegateMatcherIsCalledCorrectly() throws Exception { StaxMatcher< Object> delegateMatcher = new FullPacman(6); StaxMatcher<Object> spyDelegateMatcher = spy(delegateMatcher); AtLeastButFiniteMatcher<O...
List<XMLEvent> events = Arrays.<XMLEvent>asList(c("_1"), c("_2"), c("c"), c("d"), c("e"), c("f"));
4
daalft/PaliNLP2
src/de/unitrier/daalft/pali/morphology/strategy/AffixStrategy.java
[ "public class ConstructedWord\n{\n\n\t////////////////////////////////////////////////////////////////////////////////////////////////\n\t// Constants\n\t////////////////////////////////////////////////////////////////////////////////////////////////\n\n\t////////////////////////////////////////////////////////////...
import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import de.general.log.*; import de.unitrier.daalft.pali.morphology.element.ConstructedWord; import de.unitrier.daalft.pali.morphology.element.Morph; import de.unitrier.daalft.pali.morphology.element.Morpheme; import de.un...
package de.unitrier.daalft.pali.morphology.strategy; /** * Class implementing functionality related to affixes * @author David * */ public class AffixStrategy { //////////////////////////////////////////////////////////////// // Constants //////////////////////////////////////////////////////////////// /...
public List<ConstructedWord> apply (List<ConstructedWord> list) {
0
ChillingVan/AndroidInstantVideo
app/src/main/java/com/chillingvan/instantvideo/sample/test/publisher/TestMp4MuxerActivity.java
[ "public class CameraPreviewTextureView extends GLMultiTexProducerView {\n\n private H264Encoder.OnDrawListener onDrawListener;\n private IAndroidCanvasHelper drawTextHelper = IAndroidCanvasHelper.Factory.createAndroidCanvasHelper(IAndroidCanvasHelper.MODE.MODE_ASYNC);\n private Paint textPaint;\n\n publ...
import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.PorterDuff; import android.graphics.SurfaceTexture; import android.hardware.Camera; import android.media.MediaRecorder; import android.os.Bundle; import android.os.Handle...
/* * * * * * * Copyright (C) 2017 ChillingVan * * * * * * 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 *...
cameraPreviewTextureView.setOnDrawListener(new H264Encoder.OnDrawListener() {
3
IvoLimmen/mystart
server-api/src/main/java/org/limmen/mystart/server/LinkHandler.java
[ "@Getter\n@Setter\n@ToString\npublic class Link extends BaseObject implements Comparable<Link> {\n\n private static final String UNCATEGORIZED = \"Uncategorized\";\n\n private static final long serialVersionUID = -1267285018252976552L;\n\n public static String sanatizeUrl(String url) {\n Objects.requireNonNul...
import com.fasterxml.jackson.databind.ObjectMapper; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; import org.limmen.mystart.Link; import org.limmen.mystart.Storage; import org.limmen.mystart.criteria.Criteria; import org.limmen.mystart.criteria.Like; import org.limmen.mystart.crite...
package org.limmen.mystart.server; public class LinkHandler extends BaseHandler { public LinkHandler(Storage storage, ObjectMapper objectMapper) { super(storage, objectMapper); } private LinkDto toLinkDto(Link link) { LinkDto dto = new LinkDto(); dto.setId(link.getId()); dto.setDescripti...
new Like("description", input, String.class),
3
Amab/SWADroid
SWADroid/src/main/java/es/ugr/swad/swadroid/modules/rollcall/EventsDownload.java
[ "public class Constants {\n /**\n * URL of SWAD UGR Server\n */\n public static final String SWAD_UGR_SERVER = \"swad.ugr.es\";\n /**\n * URL of OpenSWAD Server\n */\n public static final String OPENSWAD_SERVER = \"openswad.org\";\n /**\n * Server URL\n */\n public static f...
import es.ugr.swad.swadroid.R; import es.ugr.swad.swadroid.database.DataBaseHelper; import es.ugr.swad.swadroid.model.Event; import es.ugr.swad.swadroid.modules.courses.Courses; import es.ugr.swad.swadroid.modules.login.Login; import es.ugr.swad.swadroid.modules.Module; import es.ugr.swad.swadroid.utils.Utils; import e...
/* * This file is part of SWADroid. * * Copyright (C) 2010 Juan Miguel Boyero Corral <juanmi1982@gmail.com> * * SWADroid 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 Lice...
addParam("wsKey", Login.getLoggedUser().getWsKey());
3
Fedict/dcattools
scrapers/src/main/java/be/fedict/dcat/scrapers/podmiis/HtmlPodMiis.java
[ "public class Cache {\n private static final Logger logger = LoggerFactory.getLogger(Cache.class);\n \n private DB db = null;\n private static final String CACHE = \"cache\";\n private static final String URLS = \"urls\";\n private static final String PAGES = \"pages\";\n\n /**\n * Stor...
import be.fedict.dcat.scrapers.Cache; import be.fedict.dcat.scrapers.Page; import be.fedict.dcat.helpers.Storage; import be.fedict.dcat.scrapers.Html; import be.fedict.dcat.vocab.MDR_LANG; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.uti...
/* * Copyright (c) 2017, FPS BOSA DG DT * 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, this * list of condit...
Cache cache = getCache();
0
DV8FromTheWorld/JDA-Audio
src/main/java/net/dv8tion/jda/audio/AudioConnection.java
[ "public interface IAudioSendFactory\n{\n /**\n * Called by JDA's audio system when a new {@link net.dv8tion.jda.core.audio.factory.IAudioSendSystem IAudioSendSystem}\n * instance is needed to handle the sending of UDP audio packets to discord.\n *\n * @param packetProvider\n * The co...
import com.sun.jna.ptr.PointerByReference; import gnu.trove.map.TIntObjectMap; import gnu.trove.map.hash.TIntObjectHashMap; import net.dv8tion.jda.audio.factory.IAudioSendFactory; import net.dv8tion.jda.audio.factory.IAudioSendSystem; import net.dv8tion.jda.audio.factory.IPacketProvider; import net.dv8tion.jda.audio.ho...
/* * Copyright 2015-2017 Austin Keener & Michael Ritter * * 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 ...
webSocket.close(ConnectionStatus.ERROR_CONNECTION_TIMEOUT);
3
appwoodoo/appwoodoo-android-sdk
SDK/appwoodoo/src/main/java/com/appwoodoo/sdk/io/SettingsApiHandler.java
[ "public interface WoodooDelegate {\n\n public void woodooArrived(Woodoo.WoodooStatus status);\n\n}", "public static enum WoodooStatus {ERROR, NETWORK_ERROR, SUCCESS};", "public class RemoteSetting {\n\n\tprivate String key;\n\tprivate String value;\n\t\n\tpublic String getKey() {\n\t\treturn key;\n\t}\n\t\n\...
import java.io.IOException; import java.util.ArrayList; import android.os.AsyncTask; import com.appwoodoo.sdk.BuildConfig; import com.appwoodoo.sdk.WoodooDelegate; import com.appwoodoo.sdk.Woodoo.WoodooStatus; import com.appwoodoo.sdk.model.RemoteSetting; import com.appwoodoo.sdk.state.Config; import com.appwoodoo.sdk....
package com.appwoodoo.sdk.io; public class SettingsApiHandler { public static void downloadSettings(final WoodooDelegate delegate) {
State.getInstance().setSettingsArrived(false);
4
exoplatform/task
integration/src/main/java/org/exoplatform/task/integration/ActivityTaskCreationListener.java
[ "@Data\n@NoArgsConstructor\npublic class ProjectDto implements Serializable {\n private static final Log LOG = ExoLogger.getLogger(ProjectDto.class);\n\n\n private long id;\n\n private String name;\n\n private String description;\n\n private String color;\n\n private Set<St...
import org.apache.commons.lang.StringEscapeUtils; import org.exoplatform.social.core.activity.ActivityLifeCycleEvent; import org.exoplatform.social.core.activity.ActivityListenerPlugin; import org.exoplatform.social.core.activity.model.ActivityStream; import org.exoplatform.social.core.activity.model.ExoSocialActivity;...
/* * Copyright (C) 2003-2015 eXo Platform SAS. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
List<ProjectDto> projects = ProjectUtil.getProjectTree(space.getGroupId(), projectService);
0
jGleitz/JUnit-KIT
src/final2/subtests/CreateTest.java
[ "public class Input {\n\tprivate static HashMap<String, String[]> filesMap = new HashMap<>();\n\tprivate static HashMap<String[], String> reverseFileMap = new HashMap<>();\n\n\t/**\n\t * This class is not meant to be instantiated.\n\t */\n\tprivate Input() {\n\t}\n\n\t/**\n\t * Returns a path to a file containing t...
import static org.hamcrest.CoreMatchers.is; import org.junit.Test; import test.Input; import test.SystemExitStatus; import test.runs.ExactRun; import test.runs.NoOutputRun; import test.runs.Run;
package final2.subtests; /** * Tests command 'create'. * * @author Annika Berger * @author Roman Langrehr * */ public class CreateTest extends LangtonSubtest { public CreateTest() {
setAllowedSystemExitStatus(SystemExitStatus.WITH_0);
1
tony-Shx/Swface
app/src/main/java/com/henu/swface/activity/RegisterFaceActivity.java
[ "public class BmobDataHelper {\n\tprivate Context context;\n\tprivate Handler myHandler;\n\tprivate static final String TAG = BmobDataHelper.class.getSimpleName();\n\n\tpublic BmobDataHelper(Context context, Handler myHandler) {\n\t\tthis.context = context;\n\t\tthis.myHandler = myHandler;\n\t\t//第一:默认初始化\n\t\tBmob...
import android.annotation.SuppressLint; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.ImageFormat; import android.graphics.Matrix; im...
break; default: break; } } private void startPhotoZoom(Uri uri) { Intent intent = new Intent("com.android.camera.action.CROP"); intent.setDataAndType(uri, "image/*"); // crop为true是设置在开启的intent中设置显示的view可以剪裁 intent.putExtra("crop", "true"); // aspectX aspectY 是宽高的比例 intent.putExtra("aspectX...
Response response = FaceUtil.detectFace(imageFile, API_KEY, API_Secret);
3
ZonCon/Ecommerce-Retronight-Android
app/src/main/java/com/megotechnologies/ecommerce_retronight/account/FragmentAccountCreate.java
[ "public class FragmentMeta extends Fragment{\n\n\tprotected View v;\n\tprotected MainActivity activity;\n\tprotected DbConnection dbC;\n\tprotected Boolean LOCATION_SELECTED = false;\n\tprotected Boolean IS_SIGNEDIN = false;\n\tprotected Boolean IS_CLICKED = false;\n\n\t@Override\n\tpublic void onCreate(Bundle save...
import android.app.AlertDialog; import android.app.FragmentTransaction; import android.content.DialogInterface; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.os.Message; import android.text.Editable; import android.text.TextWatcher; import android.util.TypedValue; import ...
package com.megotechnologies.ecommerce_retronight.account; public class FragmentAccountCreate extends FragmentMeta implements ZCFragmentLifecycle, ZCRunnable { public Boolean isBegin = false; Boolean RUN_FLAG = false; Thread accountTh, appsTh; TextView tvEmail, tvPassword, tvRepassword, tvTitle; EditText ed...
MLog.log("Focus=" + hasFocus);
5
DosMike/VillagerShops
src/main/java/de/dosmike/sponge/vshop/commands/cmdImport.java
[ "public class PermissionRegistra {\n\n\tpublic static final Permission ADMIN;\n\tpublic static final Permission PLAYER;\n\tpublic static final Permission IMPORT;\n\tpublic static final Permission IDENTIFY;\n\tpublic static final Permission LINKCHEST;\n\tpublic static final Permission MOVE;\n\tpublic static final Pe...
import com.flowpowered.math.vector.Vector3d; import de.dosmike.sponge.vshop.PermissionRegistra; import de.dosmike.sponge.vshop.Utilities; import de.dosmike.sponge.vshop.VillagerShops; import de.dosmike.sponge.vshop.shops.FieldResolvers; import de.dosmike.sponge.vshop.shops.ShopEntity; import org.jetbrains.annotations.N...
package de.dosmike.sponge.vshop.commands; public class cmdImport extends Command { static CommandSpec getCommandSpec() { return CommandSpec.builder() .permission(PermissionRegistra.IMPORT.getId()) .arguments(GenericArguments.none()).executor(new cmdImport()).build(); } @NotNull @Override public Comm...
VillagerShops.audit("%s imported a shop %s", Utilities.toString(src), shopEntity.toString());
1
rubenlagus/Tsupport
TMessagesProj/src/main/java/org/telegram/android/MessagesController.java
[ "public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.TcpConnectionDelegate {\n private HashMap<Integer, Datacenter> datacenters = new HashMap<>();\n\n private ArrayList<Long> sessionsToDestroy = new ArrayList<>();\n private ArrayList<Long> destroyingSessions = new ArrayList<>();...
import android.app.Activity; import android.app.AlertDialog; import android.content.SharedPreferences; import android.content.pm.PackageInfo; import android.os.Build; import android.text.Html; import android.util.Base64; import android.util.SparseArray; import org.telegram.messenger.ConnectionsManager; import org.teleg...
public boolean enableJoined = true; public int fontSize = AndroidUtilities.dp(16); public int maxGroupCount = 200; public int maxBroadcastCount = 100; public int groupBigSize; private ArrayList<TLRPC.TL_disabledFeature> disabledFeatures = new ArrayList<>(); private class UserActionUpdatesS...
public static boolean isFeatureEnabled(String feature, BaseFragment fragment) {
5
dlcs/the-mathmos-server
the-mathmos-server/src/main/java/com/digirati/themathmos/service/impl/W3CAnnotationSearchServiceImpl.java
[ "public class Parameters implements Serializable{\n\n /**\n *\n */\n private static final long serialVersionUID = 1118550633018738922L;\n private String query;\n private String motivation;\n private String date;\n private String user;\n\n public Parameters(){\n\n }\n public Parame...
import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.CacheManager; import org.springframework.cache.annotation.Cacheable; import org.springframework.data.elasticsearch.core.ElasticsearchTemplate; import org.springframework.stereotyp...
package com.digirati.themathmos.service.impl; @Service(W3CAnnotationSearchServiceImpl.W3C_ANNOTATION_SERVICE_NAME) public class W3CAnnotationSearchServiceImpl extends AnnotationSearchServiceImpl implements W3CAnnotationSearchService{ public static final String W3C_ANNOTATION_SERVICE_NAME = "w3CAnnotationS...
Map <String, Object> emptyMap = annotationUtils.returnEmptyResultSet(queryString,true, new PageParameters(),false);
3
farmerbb/SecondScreen
app/src/main/java/com/farmerbb/secondscreen/fragment/SettingsFragment.java
[ "public final class HdmiProfileSelectActivity extends AppCompatActivity {\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_quick_launch);\n setTitle(getResources().getString(R.string.select_profil...
import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.os.Build; import android.os.Bundle; import android.preference.CheckBoxPreference; import android.preference.Preference; import android.preference.Preference.OnPreferenceClickListener; import android.pref...
} saveSettings = true; } @Override public void onStop() { super.onStop(); if(saveSettings) saveSettings(); } @Override public void onResume() { super.onResume(); SharedPreferences prefMain = U.getPrefMain(getActivity()); if...
Intent intent = new Intent(getActivity(), HdmiProfileSelectActivity.class);
0
haplo-org/haplo-safe-view-templates
src/main/java/org/haplo/template/driver/rhinojs/JSFunctionThis.java
[ "final public class FunctionBinding {\n private NodeFunction function;\n private Driver driver;\n private Object view;\n private Context context;\n private Node nextArgument;\n private int argumentCount;\n\n FunctionBinding(NodeFunction function, Driver driver, Object view, Context context) {\n...
import org.haplo.template.html.FunctionBinding; import org.haplo.template.html.Node; import org.haplo.template.html.Escape; import org.haplo.template.html.DeferredRender; import org.haplo.template.html.Context; import org.haplo.template.html.RenderException; import org.haplo.template.html.Driver; import org.haplo.templ...
/* Haplo Safe View Templates http://haplo.org * (c) Haplo Services Ltd 2015 - 2016 http://www.haplo-services.com * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http:...
Template template = ((HaploTemplate)jsTemplate).getTemplate();
6
zaproxy/zap-api-java
subprojects/zap-clientapi/src/examples/java/org/zaproxy/clientapi/examples/authentication/FormBasedAuthentication.java
[ "public abstract class ApiResponse {\n\n private String name = null;\n\n public ApiResponse(String name) {\n super();\n this.name = name;\n }\n\n public String getName() {\n return name;\n }\n\n public void setName(String name) {\n this.name = name;\n }\n\n public...
import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.ArrayList; import java.util.List; import org.zaproxy.clientapi.core.ApiResponse; import org.zaproxy.clientapi.core.ApiResponseElement; import org.zaproxy.clientapi.core.ApiResponseList; import org.zaproxy.clientapi.core.ApiRespons...
/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2014 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
supportedMethodNames.add(((ApiResponseElement) authMethod).getValue());
1
hprose/hprose-j2me
cldc/1.1ext/src/hprose/client/CookieManager.java
[ "public final class HproseHelper {\r\n\r\n private static final Byte[] byteCache = new Byte[-(-128) + 127 + 1];\r\n private static final Character[] charCache = new Character[127 + 1];\r\n private static final Integer[] intCache = new Integer[-(-128) + 127 + 1];\r\n private static final Short[] shortCac...
import hprose.io.HproseHelper; import java.util.ArrayList; import java.util.Calendar; import java.util.HashMap; import java.util.Iterator; import java.util.Map.Entry; import java.util.TimeZone;
/**********************************************************\ | | | hprose | | | | Official WebSite: http://www.hprose.com/ | | ...
Iterator iter = container.entrySet().iterator();
3
momodalo/vimtouch
plugins/BasePlugin/src/org/kvj/vimtouch/ext/impl/read/TransferableFieldReader.java
[ "public interface FieldReader<T> {\n\n\tpublic FieldType getType();\n\n\tpublic T read(IncomingTransfer t) throws FieldReaderException;\n\n\tpublic void set(T value);\n}", "public class FieldReaderException extends Exception {\n\n\tprivate static final long serialVersionUID = -182968636242220254L;\n\n\tpublic Fie...
import org.kvj.vimtouch.ext.FieldReader; import org.kvj.vimtouch.ext.FieldReaderException; import org.kvj.vimtouch.ext.IncomingTransfer; import org.kvj.vimtouch.ext.Transferable; import org.kvj.vimtouch.ext.Transferable.FieldType;
package org.kvj.vimtouch.ext.impl.read; abstract public class TransferableFieldReader<T extends Transferable> implements FieldReader<T> { @Override public FieldType getType() { return FieldType.Transferable; } @Override
public T read(IncomingTransfer t) throws FieldReaderException {
2
sqrlserverjava/sqrl-server-base
src/test/java/com/github/sqrlserverjava/backchannel/SqrlServerOperationsRealClientDataTest.java
[ "public class SqrlClientFacingOperations {\n\tprivate static final Logger logger = LoggerFactory.getLogger(SqrlServerOperations.class);\n\n\tprivate final SqrlConfig config;\n\tprivate final SqrlConfigOperations configOperations;\n\tprivate final SqrlPersistenceFactory persistenceFactory;\n\n\n\tpublic SqrlClientFa...
import static junit.framework.TestCase.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import java.io.BufferedReader; import java.io.IOException; import java.io.StringReader; import java.net.URL; import java.util.Base64; import java.util.Collections; import java.ut...
package com.github.sqrlserverjava.backchannel; /** * Uses real data captured from the SQRL reference client * * @author Dave Badia * */ public class SqrlServerOperationsRealClientDataTest { private final Date expiryTime = new Date(System.currentTimeMillis() + 1_000_000); @Before public void setUp() thro...
final SqrlConfig config = TestCaseUtil.buildTestSqrlConfig("GiXid26ALy2THQ7GT0a8sg");
1
fredszaq/Rezenerator
rezenerator-core/src/main/java/com/tlorrain/android/rezenerator/core/RezeneratorRunner.java
[ "public class DefinitionFinder {\n\n\tprivate static final String KEY_EXTENDS = \"rezenerator.extends\";\n\tList<File> searchedDirs;\n\n\tpublic DefinitionFinder(List<File> searchedDirs) {\n\t\tthis.searchedDirs = searchedDirs;\n\t}\n\n\tpublic Properties find(String definitionName) {\n\t\tString fileName = definit...
import java.io.File; import java.io.IOException; import java.lang.reflect.Modifier; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import org.reflections.Reflections; import com.google.common.base.CaseFormat; import com.tlorrain.android.rezenerat...
package com.tlorrain.android.rezenerator.core; public class RezeneratorRunner { private static final String DRAWABLE_PREFIX = "drawable-"; public RunResult run(final Configuration configuration) { final Logger logger = configuration.getLogger(); final RunResult result = new RunResult(); final File inDir =...
final DefinitionReader definitionReader = new DefinitionReader(finder.find(nameSplit[1]));
1
Anchormen/sql4es
src/main/java/nl/anchormen/sql4es/ESQueryState.java
[ "public class ESStatement implements Statement {\n\n\tprivate static final SqlParser parser = new SqlParser();\n\tprotected ESConnection connection;\n\t\n\tprotected int queryTimeoutSec = 10;\n\tprotected boolean poolable = true;\n\tprotected boolean closeOnCompletion = false;\n\tprotected ResultSet result;\n\n\tpr...
import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.*; import nl.anchormen.sql4es.model.*; import org.elasticsearch.action.search.SearchRequestBuilder; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.client.Client; import org.elasticsearch...
package nl.anchormen.sql4es; /** * This class maintains the state of a {@link ESStatement} and is used interpret SELECT statements, * execute and parse them and keep {@link ResultSet} state while doing so. * * @author cversloot * */ public class ESQueryState{ // relevant resources private final QueryPar...
private final SearchHitParser hitParser = new SearchHitParser();
4
endercrest/VoidSpawn
src/main/java/com/endercrest/voidspawn/modes/island/BaseIslandMode.java
[ "public class ConfigManager {\n private VoidSpawn plugin;\n private static final ConfigManager instance = new ConfigManager();\n private File worldFile;\n private FileConfiguration config;\n private final int CURRENT_VERSION = 2;\n\n /**\n * Get the running instance of the ConfigManager\n ...
import com.endercrest.voidspawn.ConfigManager; import com.endercrest.voidspawn.TeleportManager; import com.endercrest.voidspawn.TeleportResult; import com.endercrest.voidspawn.modes.BaseMode; import com.endercrest.voidspawn.modes.status.Status; import org.bukkit.Location; import org.bukkit.entity.Player; import java.te...
package com.endercrest.voidspawn.modes.island; public abstract class BaseIslandMode extends BaseMode { public abstract TeleportResult onActivateIsland(Player player, String worldname); @Override public final TeleportResult onActivate(Player player, String worldName) { TeleportResult result = on...
return TeleportManager.getInstance().teleportSpawn(player, worldName);
1
dmfs/uri-toolkit
rfc3986-uri/src/main/java/org/dmfs/rfc3986/uris/Resolved.java
[ "public interface Authority\n{\n /**\n * Returns the {@link Optional} user info part of the authority in encoded form.\n *\n * @return The {@link UriEncoded} user info.\n */\n Optional<? extends UriEncoded> userInfo();\n\n /**\n * Returns the host of this authority.\n *\n * @ret...
import org.dmfs.optional.Optional; import org.dmfs.rfc3986.Authority; import org.dmfs.rfc3986.Fragment; import org.dmfs.rfc3986.Path; import org.dmfs.rfc3986.Query; import org.dmfs.rfc3986.Scheme; import org.dmfs.rfc3986.Uri;
/* * Copyright 2017 dmfs GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
public Optional<? extends Fragment> fragment()
1
cjburkey01/ClaimChunk
src/main/java/com/cjburkey/claimchunk/data/newdata/BulkMySQLDataHandler.java
[ "final class SqlBacking {\n\n private static boolean debug(ClaimChunk claimChunk) {\n return claimChunk.getConfigHandler().getPrintDatabaseDebug();\n }\n\n static Supplier<Connection> connect(\n String hostname,\n int port,\n String databaseName,\n String ...
import static com.cjburkey.claimchunk.data.newdata.SqlBacking.*; import com.cjburkey.claimchunk.ClaimChunk; import com.cjburkey.claimchunk.Utils; import com.cjburkey.claimchunk.chunk.ChunkPos; import com.cjburkey.claimchunk.chunk.DataChunk; import com.cjburkey.claimchunk.player.FullPlayerData; import com.cjburkey.claim...
package com.cjburkey.claimchunk.data.newdata; /** * Some servers keep MySQL on a separate host from the server. In this case, making a MySQL request * is EXTREMELY slow. This data handler only makes requests when it initializes, saves data, and * loads data. This handler uses a JSON handler so backups are possi...
public void addPlayers(FullPlayerData[] players) {
5
Mpmart08/MusicPlayer
src/app/musicplayer/view/SongsController.java
[ "public class MusicPlayer extends Application {\n\n private static MainController mainController;\n private static MediaPlayer mediaPlayer;\n private static ArrayList<Song> nowPlayingList;\n private static int nowPlayingIndex;\n private static Song nowPlaying;\n private static Timer timer;\n pr...
import java.net.URL; import java.util.ArrayList; import java.util.Collections; import java.util.ResourceBundle; import app.musicplayer.MusicPlayer; import app.musicplayer.model.Library; import app.musicplayer.model.Song; import app.musicplayer.util.ClippedTableCell; import app.musicplayer.util.ControlPanelTableCell; im...
package app.musicplayer.view; public class SongsController implements Initializable, SubView { @FXML private TableView<Song> tableView; @FXML private TableColumn<Song, Boolean> playingColumn; @FXML private TableColumn<Song, String> titleColumn; @FXML private TableColumn<Song, String> artistColumn; ...
artistColumn.setCellFactory(x -> new ClippedTableCell<>());
3
52North/SensorPlanningService
52n-sps-api/src/main/java/org/n52/sps/tasking/TaskingRequest.java
[ "public interface SweEncoderDecoder<T, E> {\r\n\r\n public static class Factory {\r\n\r\n public static TextEncoderDecoder createTextEncoderDecoder(AbstractEncodingType encoding) {\r\n// XmlHelper.qualifyWith(TextEncodingDocument.type, encoding); TODO check this qualifying principle and add tes...
import net.opengis.sps.x20.TaskingRequestDocument; import net.opengis.sps.x20.TaskingRequestType; import net.opengis.swe.x20.AbstractEncodingType; import org.apache.xmlbeans.XmlObject; import org.n52.oxf.swes.request.ExtensibleRequest; import org.n52.sps.util.encoding.SweEncoderDecoder; import org.n52.sps.util.en...
/** * Copyright (C) 2012-${latestYearOfContribution} 52°North Initiative for Geospatial Open Source * Software GmbH * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 2 as publishedby the Free * Software Foundation. * ...
public BinaryEncoderDecoder getBinaryEncoderDecoder() {
1
chms/jdotxt
src/com/chschmid/jdotxt/Jdotxt.java
[ "@SuppressWarnings(\"serial\")\n// The application main window\npublic class JdotxtGUI extends JFrame {\n\t\n\t// Minimal and maximal window dimension settings\n\tpublic static int MIN_WIDTH = 640;\n\tpublic static int MIN_HEIGHT = 480;\n\t\n\t// Lines to scroll using the mouse wheel\n\tpublic static int SCROLL_AMO...
import com.sun.jna.NativeLong; import com.sun.jna.WString; import com.todotxt.todotxttouch.task.LocalFileTaskRepository; import com.todotxt.todotxttouch.task.TaskBag; import com.todotxt.todotxttouch.task.TaskBagFactory; import java.awt.EventQueue; import java.io.File; import java.io.IOException; import java.util.prefs....
/** * jdotxt * * Copyright (C) 2013-2015 Christian M. Schmid * * jdotxt is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program...
LocalFileTaskRepository.TODO_TXT_FILE = new File(todoFile);
4
Doctoror/Pure-File-Manager
purefm/src/main/java/com/docd/purefm/tasks/DirectoryScanTask.java
[ "public abstract class BrowserBaseAdapter implements ListAdapter,\n MultiListenerFileObserver.OnEventListener {\n\n /**\n * Events to be monitor for every File in this Adapter\n */\n private static final int OBSERVER_EVENTS =\n FileObserver.CREATE |\n FileObserver.DELETE_S...
import android.os.AsyncTask; import android.support.v4.widget.SwipeRefreshLayout; import com.docd.purefm.adapters.BrowserBaseAdapter; import com.docd.purefm.browser.Browser; import com.docd.purefm.file.GenericFile; import com.docd.purefm.file.GenericFileFilter; import com.docd.purefm.settings.Settings; import com.docd....
/* * Copyright 2014 Yaroslav Mytkalyk * 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...
@NonNull final Settings settings,
4
cvtienhoven/graylog-plugin-aggregates
src/main/java/org/graylog/plugins/aggregates/maintenance/AggregatesMaintenance.java
[ "@JsonAutoDetect\n@JsonIgnoreProperties(ignoreUnknown = true)\n@AutoValue\npublic abstract class AggregatesConfig {\n\n @JsonProperty(\"purgeHistory\")\n public abstract boolean purgeHistory();\n\n @JsonProperty(\"historyRetention\")\n public abstract String historyRetention();\n\n @JsonProperty(\"re...
import java.util.ArrayList; import java.util.Calendar; import java.util.List; import java.util.Optional; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import javax.inject.Inject; import javax.inject.Named; import com.codah...
package org.graylog.plugins.aggregates.maintenance; public class AggregatesMaintenance extends Periodical { private static final Logger LOG = LoggerFactory.getLogger(AggregatesMaintenance.class); private final AlertService alertService; private final StreamService streamService; private final RuleS...
private final HistoryItemService historyItemService;
1
abicelis/Remindy
app/src/main/java/ve/com/abicelis/remindy/app/dialogs/SelectImageSourceDialogFragment.java
[ "public class VisualizerView extends View {\n private static final int LINE_WIDTH = 2; // width of visualizer lines\n private static final int LINE_SCALE = 220; // scales visualizer lines\n private List<Float> amplitudes; // amplitudes for line lengths\n private int width; // width of this View\n pri...
import android.Manifest; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.InstrumentationInfo; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.content.res.ColorStateList; import android.graphics.drawable.Drawable; import and...
package ve.com.abicelis.remindy.app.dialogs; /** * Created by abice on 16/3/2017. */ public class SelectImageSourceDialogFragment extends DialogFragment implements View.OnClickListener { //DATA private SelectImageSourceSelectedListener mListener; private Drawable mCameraDrawable; private Drawab...
mListener.onSourceSelected(ImageSourceType.NONE);
1
UWFlow/flow-android
src/com/uwflow/flow_android/fragment/ProfileFragment.java
[ "public class FlowApplication extends Application {\n\n public static final boolean isBlackberry = System.getProperty(\"os.name\").equals(\"qnx\");\n\n private static final String IS_USER_LOGGED_IN_KEY = \"is_user_logged_in\";\n private static final String MIXPANEL_TOKEN = \"0a5e88bd3f288fe8a2d8adf94b45221...
import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.*; import android.graphics.Bitmap; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.content.LocalBroadcastManager; import android.support.v4.view.ViewPager; import android.view.*; import ...
} else { viewPager.setCurrentItem(tabID); } init(); if (getArguments() != null) { mProfileID = getArguments().getString(Constants.PROFILE_ID_KEY); } profilePagerAdapter = new ProfilePagerAdapter(getChildFragmentManager(), getArguments(), mProfil...
FlowApplication app = (FlowApplication) getActivity().getApplication();
0
beerbong/com_beerbong_zipinst
src/com/beerbong/zipinst/IntroActivity.java
[ "public interface Core extends Serializable {\n\n public static final String PLUGIN_UI = \"UIPlugin\";\n public static final String PLUGIN_SUPERUSER = \"SuperUserPlugin\";\n public static final String PLUGIN_RECOVERY = \"RecoveryPlugin\";\n public static final String PLUGIN_STORAGE = \"StoragePlugin\";\...
import com.beerbong.zipinst.core.Core; import com.beerbong.zipinst.core.Core.CoreListener; import com.beerbong.zipinst.core.CoreFactory; import com.beerbong.zipinst.core.plugins.ui.UIPlugin; import com.beerbong.zipinst.core.plugins.update.RomUpdater; import com.beerbong.zipinst.io.Files; import com.beerbong.zipinst.pre...
/* * Copyright 2014 ZipInstaller Project * * This file is part of ZipInstaller. * * ZipInstaller is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) a...
((UIPlugin) getCore().getPlugin(Core.PLUGIN_UI)).registerUI(this);
3
cloudera/cm_ext
cm-schema/src/main/java/com/cloudera/config/DefaultValidatorConfiguration.java
[ "@SuppressWarnings(\"serial\")\npublic class JsonMdlParser\n implements Parser<ServiceMonitoringDefinitionsDescriptor> {\n\n // We deserialize using a MrBean based ObjectMapper. When serializing, we use\n // our own ObjectMapper that has a filter to leave out the properties put in\n // place by MrBean that star...
import com.cloudera.common.Parser; import com.cloudera.csd.StringInterpolator; import com.cloudera.csd.components.JsonMdlParser; import com.cloudera.csd.components.JsonSdlObjectMapper; import com.cloudera.csd.components.JsonSdlParser; import com.cloudera.csd.descriptors.ServiceDescriptor; import com.cloudera.csd.descri...
"userName", "groupName", "ownerName", "queueName", "poolName", "path", "expired", "clusterId", "clusterName", "clusterDisplayName", "rackId", "hostId", "hostname", "interface", "device", "logi...
public Parser<ServiceDescriptor> sdlParser() {
3
StumbleUponArchive/hbase
src/test/java/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.java
[ "public class HBaseAdmin implements Abortable, Closeable {\n private final Log LOG = LogFactory.getLog(this.getClass().getName());\n// private final HConnection connection;\n private HConnection connection;\n private volatile Configuration conf;\n private final long pause;\n private final int numRetries;\n /...
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.io.IOException; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.NavigableMap; import juni...
return preBalanceCalled && postBalanceCalled; } public boolean preBalanceCalledOnly() { return preBalanceCalled && !postBalanceCalled; } @Override public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> env, boolean b) throws IOException { if (bypass...
HBaseAdmin admin = UTIL.getHBaseAdmin();
0
Kixeye/janus
janus-core/src/test/java/com/kixeye/janus/JanusTest.java
[ "public static class Builder {\n\n private String serviceName;\n private ServerList serverList;\n private LoadBalancer loadBalancer;\n private StatsFactory statsFactory;\n private MetricRegistry metricRegistry = new MetricRegistry();\n private Long refreshIntervalInMillis = Janus.DEFAULT_REFRESH_I...
import java.lang.reflect.Field; import com.codahale.metrics.MetricRegistry; import com.kixeye.janus.Janus.Builder; import com.kixeye.janus.loadbalancer.LoadBalancer; import com.kixeye.janus.loadbalancer.RandomLoadBalancer; import com.kixeye.janus.loadbalancer.ZoneAwareLoadBalancer; import com.kixeye.janus.serverlist.Co...
/* * #%L * Janus * %% * Copyright (C) 2014 KIXEYE, Inc * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
new ConstServerList(VIP_TEST,"http://localhost:0001","http://localhost:002","http://localhost:003"),
5
jpush/jbox
android/JBox/app/src/main/java/com/jiguang/jbox/ui/main/MessageReceiver.java
[ "public class AppApplication extends Application {\n private static Context mContext;\n\n public static boolean shouldUpdateData = false;\n\n public static String currentDevKey = \"\";\n public static String currentChannelName = \"\";\n\n @Override public void onCreate() {\n super.onCreate();\n mContext ...
import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import com.activeandroid.query.Select; import com.jiguang.jbox.AppApplication; import com.jiguang.jbox.data.model.Channel; import com.jiguang.jbox.data.model.Developer; import com.jiguang.j...
package com.jiguang.jbox.ui.main; public class MessageReceiver extends BroadcastReceiver { private static final String TAG = LogUtil.makeLogTag(MessageReceiver.class); public MessageReceiver() { } @Override public void onReceive(Context context, Intent intent) { if (intent.getAction().equals(JPushIn...
Channel c = new Select().from(Channel.class)
1
tmalaska/hadcom.utils
src/main/java/com/cloudera/sa/hcu/io/route/scheduler/AbstractRoute.java
[ "public abstract class AbstractWriter\n{\t\n\tprotected static final String COMPRESSION_CODEC = \"writer.compression.codec\";\n\tpublic static final String CONF_OUTPUT_PATH = \"writer.output.path\";\n\t\n\tpublic AbstractWriter(Properties prop) throws IOException\n\t{\n\t\tString outputPath = PropertyUtils.getStrin...
import java.io.File; import java.io.IOException; import java.util.Properties; import java.util.Map.Entry; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSys...
package com.cloudera.sa.hcu.io.route.scheduler; public abstract class AbstractRoute implements IRouteWorker, DirWatcherObserver, PutExecuterObserver, PutListener { InputDirWatcherThread inputDirWatcher = null; public static final String CONF_INPUT_DIR = ".input.dir"; public static final String CONF_PROCESS_DI...
String hdfsRootDirectory = PropertyUtils.getStringProperty(prop, routeNamePrefix + "." + AbstractWriter.CONF_OUTPUT_PATH);
0
aviewdevs/aview
iview-api/src/main/java/com/github/aview/api/html5/Html5VideoService.java
[ "public enum AlphaKeyword {\n\n A_TO_F, G_TO_L, M_TO_R, S_TO_Z, ZERO_TO_NINE;\n}", "public enum Category {\n\tABC4KIDS, ARTS_AND_CULTURE, COMEDY, DOCUMENTARY, DRAMA, EDUCATION, INDIGENOUS, LIFESTYLE, NEWS_AND_CURRENT_AFFAIRS, PANEL_AND_DISCUSSION, SPORT, ABC3, ABC_NEWS_24;\n}", "public interface Episode exte...
import java.net.MalformedURLException; import java.net.URI; import java.net.URL; import java.net.URLEncoder; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import com.github.aview.api.AlphaKeyword; import com.github.aview.api.Category;...
package com.github.aview.api.html5; /* * #%L * iview-api * %% * Copyright (C) 2013 The aview authors * %% * 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 c...
public Series[] getAllSeries() throws VideoServiceException {
5
tliron/scripturian
components/scripturian/source/com/threecrickets/scripturian/adapter/jsr223/JeppAdapter.java
[ "public class Executable\n{\n\t//\n\t// Constants\n\t//\n\n\t/**\n\t * Prefix prepended to on-the-fly scriptlets stored in the document source.\n\t */\n\tpublic static final String ON_THE_FLY_PREFIX = \"_ON_THE_FLY_\";\n\n\t//\n\t// Static operations\n\t//\n\n\t/**\n\t * If the executable does not yet exist in the ...
import javax.script.ScriptEngine; import javax.script.ScriptException; import com.threecrickets.scripturian.Executable; import com.threecrickets.scripturian.ExecutionContext; import com.threecrickets.scripturian.LanguageAdapter; import com.threecrickets.scripturian.LanguageManager; import com.threecrickets.scripturian....
/** * Copyright 2009-2017 Three Crickets LLC. * <p> * The contents of this file are subject to the terms of the LGPL version 3.0: * http://www.gnu.org/copyleft/lesser.html * <p> * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly f...
public JeppAdapter() throws LanguageAdapterException
4
codebulb/LambdaOmega
src/test/java/ch/codebulb/lambdaomega/MBaseSequentialTest.java
[ "public static <T> L<T> l() {\n return new L<>(new ArrayList<>());\n}", "public static <T> List<T> list(T... ts) {\n return l(ts).l;\n}", "public static <K, V> E<K, V> e(K k, V v) {\n return new E(k, v);\n}", "public static M m() {\n return m(new LinkedHashMap<>());\n}", "public static <T> Set<T...
import static ch.codebulb.lambdaomega.L.l; import static ch.codebulb.lambdaomega.L.list; import static ch.codebulb.lambdaomega.M.e; import static ch.codebulb.lambdaomega.M.m; import static ch.codebulb.lambdaomega.S.set; import static ch.codebulb.lambdaomega.TestUtil.EXPECTED_MAP; import static ch.codebulb.lambdaomega.T...
package ch.codebulb.lambdaomega; /** * Test cases for the {@link M} implementation for {@link SequentialI}. */ public class MBaseSequentialTest { @Test public void testConvert() {
assertEquals(set(e("a", 0), e("b", 1), e("c", 2)), m("a", 0).i("b", 1).i("c", 2).toSet());
3
diadoc/diadocsdk-java
src/main/java/Diadoc/Api/counteragent/CounteragentClient.java
[ "public class DiadocException extends Exception {\n private int httpStatusCode;\n private String errorCode;\n\n public DiadocException(String message, int httpStatusCode, String errorCode) {\n super(message);\n this.httpStatusCode = httpStatusCode;\n this.errorCode = errorCode;\n }\...
import Diadoc.Api.exceptions.DiadocException; import Diadoc.Api.exceptions.DiadocSdkException; import Diadoc.Api.helpers.Tools; import Diadoc.Api.httpClient.DiadocHttpClient; import org.apache.http.client.methods.RequestBuilder; import org.apache.http.client.utils.URIBuilder; import org.apache.http.entity.ByteArrayEnti...
package Diadoc.Api.counteragent; public class CounteragentClient { private DiadocHttpClient diadocHttpClient; public CounteragentClient(DiadocHttpClient diadocHttpClient) { this.diadocHttpClient = diadocHttpClient; }
public AsyncMethodResult acquireCounteragent(String myOrgId, AcquireCounteragentRequest acquireCounteragentRequest) throws DiadocSdkException {
1
kw0516/Facepp-android-online
src/com/xiaoying/facedemo/faceset/FacesetListActivity.java
[ "public class MainApplication extends Application {\n\t\n\tpublic static final String APP_KEY = \"YOUR-APP_KEY \";\n\t\n\tpublic static final String APP_SECRET = \"YOUR-APP_SECRET \";\n\t\n\tpublic static final Client CLIENT = new Client(APP_KEY, APP_SECRET);\n\t\n\tpublic static String APP_ROOT_DIR = Environment.g...
import java.io.IOException; import java.util.List; import org.apache.http.ParseException; import org.apache.http.client.ClientProtocolException; import org.json.JSONException; import android.app.Activity; import android.app.ProgressDialog; import android.content.Intent; import android.os.AsyncTask; import android.os.Bu...
/* * 文件名:FacesetListActivity.java * 版权:<版权> * 描述:<描述> * 创建人:xiaoying * 创建时间:2013-5-21 * 修改人:xiaoying * 修改时间:2013-5-21 * 版本:v1.0 */ package com.xiaoying.facedemo.faceset; /** * 功能:Faceset列表 * @author xiaoying * */ public class FacesetListActivity extends Activity { public static final int MODE_VIEW ...
private InfoService mmService = new InfoService(MainApplication.CLIENT);
0
kongnanlive/PreferenceFragment
PreferenceFragmentExample/src/com/github/preferencefragment/preference/PreferencesFromCode.java
[ "public class CheckBoxPreference extends TwoStatePreference {\n\n public CheckBoxPreference(Context context, AttributeSet attrs, int defStyle) {\n super(context, attrs, defStyle);\n \n TypedArray a = context.obtainStyledAttributes(attrs,\n R.styleable.CheckBoxPreference, defSt...
import android.content.Intent; import android.content.res.TypedArray; import android.net.Uri; import android.os.Bundle; import android.support.v4.preference.CheckBoxPreference; import android.support.v4.preference.EditTextPreference; import android.support.v4.preference.ListPreference; import android.support.v4.prefere...
/* * Copyright (C) 2007 The Android Open Source Project * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or...
SwitchPreference switchPref = new SwitchPreference(this);
6
BeYkeRYkt/LightAPI
craftbukkit-nms-v1_18_R1/src/main/java/ru/beykerykt/minecraft/lightapi/bukkit/internal/handler/craftbukkit/nms/v1_18_R1/VanillaNMSHandler.java
[ "public class BukkitPlatformImpl implements IPlatformImpl, IBukkitExtension {\n\n private static final String DEFAULT_IMPL_NAME = \"craftbukkit\";\n /**\n * CONFIG\n */\n private final String CONFIG_TITLE = \"general\";\n private final String CONFIG_DEBUG = CONFIG_TITLE + \".debug\";\n privat...
import com.google.common.collect.Lists; import net.minecraft.core.BlockPos; import net.minecraft.core.SectionPos; import net.minecraft.network.protocol.game.ClientboundLightUpdatePacket; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.server.level.Thre...
/* * The MIT License (MIT) * * Copyright 2021 Vladimir Mikhailov <beykerykt@gmail.com> * * 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 limitati...
private IChunkData createBitChunkData(String worldName, int chunkX, int chunkZ) {
5
raydac/j-j-jvm
interpreter/src/main/java/com/igormaznitsa/jjjvm/impl/jse/JSEProviderImpl.java
[ "public interface JJJVMClass extends JJJVMConstants {\n\n JJJVMProvider getProvider();\n\n JJJVMConstantPool getConstantPool();\n\n JJJVMMethod findMethod(String methodName, String methodSignature) throws Throwable;\n\n JJJVMField findField(String fieldName) throws Throwable;\n\n JJJVMMethod findDeclaredMethod...
import com.igormaznitsa.jjjvm.model.JJJVMClass; import com.igormaznitsa.jjjvm.model.JJJVMObject; import com.igormaznitsa.jjjvm.model.JJJVMProvider; import com.igormaznitsa.jjjvm.model.JJJVMInnerClassRecord; import com.igormaznitsa.jjjvm.impl.JJJVMClassImpl; import com.igormaznitsa.jjjvm.impl.JJJVMImplUtils; import java...
} } } return args; } public Object[] newObjectArray(final JJJVMClass caller, final String jvmFormattedClassName, final int arrayLength) throws Throwable { final Object resolvedClass = resolveClass(jvmFormattedClassName); if (resolvedClass instanceof JJJVMClass) { return new JJJV...
if (obj instanceof JJJVMObject) {
1
zsoltk/GameOfLife
app/src/test/java/hu/supercluster/gameoflife/game/cellularautomaton/AbstractCellularAutomatonTest.java
[ "public interface Cell {\n public static final int STATE_ALIVE = 1;\n public static final int STATE_DEAD = 0;\n\n void reset(int state);\n long getId();\n int getY();\n int getX();\n void setState(int state);\n int getState();\n boolean isAlive();\n boolean isDead();\n void onNeighb...
import org.junit.After; import org.junit.Before; import org.junit.Test; import hu.supercluster.gameoflife.game.cell.Cell; import hu.supercluster.gameoflife.game.cell.CellFactory; import hu.supercluster.gameoflife.game.grid.Grid; import hu.supercluster.gameoflife.game.rule.Rule; import hu.supercluster.gameoflife.game.te...
package hu.supercluster.gameoflife.game.cellularautomaton; public class AbstractCellularAutomatonTest extends RobolectricTest { TestAutomaton automaton; @Before public void setup() { automaton = new TestAutomaton(5, 5); EventBus.getInstance().register(this); } @After public...
protected Rule<GrowableCell> createRule() {
3
paoding-code/jade-plugin-sql
src/main/java/net/paoding/rose/jade/plugin/sql/PlumSQLInterpreter.java
[ "public interface IDialect {\n\n\t/**\n\t * 将指定的操作转换为目标数据库的查询语句\n\t * @param operation 操作映射对象\n\t * @param runtime Statement运行时\n\t * \n\t * @return 查询语句\n\t * \n\t * @see IOperationMapper\n\t * @see StatementRuntime\n\t */\n\tpublic <T extends IOperationMapper> String translate(T operation, StatementRuntime runtim...
import java.util.Arrays; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactoryUtils; import org.springframework.beans.factory.InitializingBean; import org.springframework.context.Applicat...
/** * */ package net.paoding.rose.jade.plugin.sql; /** * Plum插件用于生成SQL的拦截器。 * * @author Alan.Geng[gengzhi718@gmail.com] */ @Order(-1) public class PlumSQLInterpreter implements Interpreter, InitializingBean, ApplicationContextAware { private static final Log logger = LogFactory.getLog(PlumSQLInterprete...
operationMapperManager.setEntityMapperManager(new EntityMapperManager());
2
Netflix/netflix-graph
src/main/java/com/netflix/nfgraph/serializer/NFCompressedGraphDeserializer.java
[ "public class NFGraphModelHolder implements Iterable<String> {\n\n public static final String CONNECTION_MODEL_GLOBAL = \"global\";\n\n private OrdinalMap<String> modelMap;\n\t\n\tpublic NFGraphModelHolder() {\n\t modelMap = new OrdinalMap<String>();\n\t modelMap.add(CONNECTION_MODEL_GLOBAL);\n\t}\n\t\n...
import java.io.InputStream; import com.netflix.nfgraph.NFGraphModelHolder; import com.netflix.nfgraph.compressed.NFCompressedGraph; import com.netflix.nfgraph.compressed.NFCompressedGraphPointers; import com.netflix.nfgraph.spec.NFGraphSpec; import com.netflix.nfgraph.spec.NFNodeSpec; import com.netflix.nfgraph.spec.NF...
/* * Copyright 2013-2017 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
NFGraphModelHolder models = deserializeModels(dis);
0
ThreeTen/threetenbp
src/main/java/org/threeten/bp/zone/ZoneRulesBuilder.java
[ "public final class LocalDate\n extends ChronoLocalDate\n implements Temporal, TemporalAdjuster, Serializable {\n\n /**\n * The minimum supported {@code LocalDate}, '-999999999-01-01'.\n * This could be used by an application as a \"far past\" date.\n */\n public static final LocalDa...
import static org.threeten.bp.temporal.ChronoField.YEAR; import static org.threeten.bp.temporal.TemporalAdjusters.nextOrSame; import static org.threeten.bp.temporal.TemporalAdjusters.previousOrSame; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.ut...
/* * Copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos * * 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 abov...
Month month,
2
marcio-da-silva-arantes/MINLP
MINLP/src/minlp/samples/specific/farmer/FarmerDeterministic.java
[ "public interface Expr {\n public Expr prod(double coef) throws Exception;\n public Expr prod(Expr expr2) throws Exception;\n \n public Expr sum(Expr expr2) throws Exception;\n public Expr sum(double constant) throws Exception;\n public Expr minus(Expr expr2) throws Exception;\n public Expr min...
import java.util.Locale; import minlp.Expr; import minlp.MINLP; import minlp.Set; import minlp.Var; import minlp.cplex.CPLEX;
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package minlp.samples.specific.farmer; /** * * @author Marcio */ public class FarmerDeterministic { /* Um fazendeiro desej...
public final Set I;
2
hoijui/JavaOSC
modules/core/src/test/java/com/illposed/osc/argument/handler/ColorArgumentHandlerTest.java
[ "public class BufferBytesReceiver implements BytesReceiver {\n\n\tprivate final ByteBuffer buffer;\n\n\tpublic BufferBytesReceiver(final ByteBuffer buffer) {\n\t\tthis.buffer = buffer;\n\t}\n\n\t@Override\n\tpublic BytesReceiver put(final byte data) {\n\n\t\tbuffer.put(data);\n\t\treturn this;\n\t}\n\n\t@Override\n...
import com.illposed.osc.BufferBytesReceiver; import com.illposed.osc.OSCParseException; import com.illposed.osc.OSCSerializeException; import com.illposed.osc.argument.ArgumentHandler; import com.illposed.osc.argument.OSCColor; import org.junit.Assert; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.Lo...
// SPDX-FileCopyrightText: 2015 C. Ramakrishnan / Illposed Software // SPDX-FileCopyrightText: 2021 Robin Vobruba <hoijui.quaero@gmail.com> // // SPDX-License-Identifier: BSD-3-Clause package com.illposed.osc.argument.handler; public class ColorArgumentHandlerTest { private final Logger log = LoggerFactory.getLog...
private static final OSCColor[] DEFAULT_COLORS = {
4
nutritionfactsorg/daily-dozen-android
app/src/main/java/org/nutritionfacts/dailydozen/task/LoadHistoryTask.java
[ "public class Bus {\n public static void register(Object object) {\n final EventBus bus = EventBus.getDefault();\n if (!bus.isRegistered(object)) {\n bus.register(object);\n }\n }\n\n public static void unregister(Object object) {\n final EventBus bus = EventBus.getDe...
import android.content.Context; import androidx.core.content.ContextCompat; import com.github.mikephil.charting.data.BarData; import com.github.mikephil.charting.data.BarDataSet; import com.github.mikephil.charting.data.BarEntry; import com.github.mikephil.charting.data.CombinedData; import com.github.mikephil.charting...
package org.nutritionfacts.dailydozen.task; public class LoadHistoryTask extends BaseTask<LoadHistoryCompleteEvent> { private static final int MONTHS_IN_YEAR = 12; private final ProgressListener progressListener; private final Context context;
private final LoadHistoryTaskParams inputParams;
4
VanetSim/VanetSim
src/vanetsim/gui/controlpanels/MixZonePanel.java
[ "public final class Renderer{\r\n\r\n\t/** The only instance of this class (singleton). */\r\n\tprivate static final Renderer INSTANCE = new Renderer();\r\n\r\n\t/**\r\n\t * Gets the single instance of this renderer.\r\n\t * \r\n\t * @return single instance of this renderer\r\n\t */\r\n\tpublic static Renderer getI...
import java.awt.Dimension; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.text.NumberFormat; import javax.swing.ButtonGroup; import javax.swing.JCheckBox; import javax.swing.JFormatt...
/* * 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.getInstance().addMixZone(tmpNode, ((Number)mixRadius_.getValue()).intValue() * 100);
4
ferstl/depgraph-maven-plugin
src/main/java/com/github/ferstl/depgraph/DependencyGraphMojo.java
[ "public final class DependencyNode {\n\n private final Artifact artifact;\n private final String effectiveVersion;\n private final NodeResolution resolution;\n private final Set<String> scopes;\n private final Set<String> classifiers;\n private final Set<String> types;\n\n\n public DependencyNode(Artifact ar...
import static java.util.EnumSet.allOf; import static java.util.EnumSet.complementOf; import static java.util.EnumSet.of; import java.util.EnumSet; import org.apache.maven.artifact.resolver.filter.ArtifactFilter; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo...
/* * Copyright (c) 2014 - 2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required ...
protected GraphFactory createGraphFactory(ArtifactFilter globalFilter, ArtifactFilter transitiveIncludeExcludeFilter, ArtifactFilter targetFilter, GraphStyleConfigurer graphStyleConfigurer) {
3
psycopaths/jconstraints
src/main/java/gov/nasa/jpf/constraints/expressions/NumericCompound.java
[ "public abstract class Expression<E> extends AbstractPrintable {\n \n \n public static final int QUOTE_IDENTIFIERS = 1;\n public static final int INCLUDE_VARIABLE_TYPE = 2;\n public static final int INCLUDE_BOUND_DECL_TYPE = 4;\n public static final int SIMPLE_PROP_OPERATORS = 8;\n \n public static final in...
import gov.nasa.jpf.constraints.api.Expression; import gov.nasa.jpf.constraints.api.ExpressionVisitor; import gov.nasa.jpf.constraints.api.Valuation; import gov.nasa.jpf.constraints.api.Variable; import gov.nasa.jpf.constraints.types.NumericType; import gov.nasa.jpf.constraints.types.Type; import gov.nasa.jpf.constrain...
/* * Copyright (C) 2015, United States Government, as represented by the * Administrator of the National Aeronautics and Space Administration. * All rights reserved. * * The PSYCO: A Predicate-based Symbolic Compositional Reasoning environment * platform is licensed under the Apache License, Version 2.0 (the "L...
public <R, D> R accept(ExpressionVisitor<R, D> visitor, D data) {
1
yyon/grapplemod
main/java/com/yyon/grapplinghook/CommonProxyClass.java
[ "public class TileEntityGrappleModifier extends TileEntity {\n\tpublic HashMap<grapplemod.upgradeCategories, Boolean> unlockedCategories = new HashMap<grapplemod.upgradeCategories, Boolean>();\n\tpublic GrappleCustomization customization;\n\t\n\tpublic TileEntityGrappleModifier() {\n\t\tthis.customization = new Gra...
import java.lang.reflect.Method; import java.util.HashSet; import com.yyon.grapplinghook.blocks.TileEntityGrappleModifier; import com.yyon.grapplinghook.controllers.grappleController; import com.yyon.grapplinghook.entities.grappleArrow; import com.yyon.grapplinghook.items.grappleBow; import com.yyon.grapplinghook.netwo...
package com.yyon.grapplinghook; public class CommonProxyClass { public enum keys { keyBindUseItem, keyBindForward, keyBindLeft, keyBindBack, keyBindRight, keyBindJump, keyBindSneak, keyBindAttack } Method capturePosition = null; public void preInit(FMLPreInitializationEvent event) { Mine...
public void getplayermovement(grappleController control, int playerid) {
1
zendesk/zendesk-jira-plugin
src/test/java/it/org/agilos/zendesk_jira_plugin/integrationtest/testcases/WebserviceTest.java
[ "public abstract class JIRATest {\r\n\r\n\tprivate Logger log = Logger.getLogger(JIRATest.class);\r\n\r\n\tprotected static final String PROJECT_KEY = \"WST\";\r\n\tprotected static final String USER_ID = \"integration\";\r\n\tprotected static final String PROJECT_DESCRIPTION = \"This is a Zendesk JIRA plugin integ...
import static org.testng.AssertJUnit.assertTrue; import it.org.agilos.zendesk_jira_plugin.integrationtest.JIRATest; import org.agilos.jira.soapclient.RemoteAuthenticationException; import org.agilos.zendesk_jira_plugin.integrationtest.fixtures.JIRAFixture; import org.agilos.zendesk_jira_plugin.integrationtest.fixtu...
package it.org.agilos.zendesk_jira_plugin.integrationtest.testcases; public class WebserviceTest extends JIRATest { private WebserviceFixture fixture; /** * Verifies that login requests with invalid users are rejected. */ @Test (groups = {"regressionTests"} ) public void testLoginInvalidUse...
ZendeskWSClient.getSoapService().login("Invalid user", JIRA.LOGIN_PASSWORD);
4
afpdev/alpheusafpparser
src/main/java/com/mgz/afp/goca/GAD_GraphicsData.java
[ "@AFPType\npublic abstract class StructuredField implements IAFPDecodeableWriteable {\n\n @AFPField\n StructuredFieldIntroducer structuredFieldIntroducer;\n /**\n * The structured field's padding data. Contains null if this structured field has no padding\n * data.\n */\n @AFPField(isOptional = true, maxS...
import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.EnumSet; import java.util.List; import com.mgz.afp.base.StructuredField; import com.mgz.afp.base.annotations.AFPField; import com.mgz.afp.enums.IMutualExclusiveGroupedFlag; import com.mgz.afp.enums.MutualExclusiveGroup...
drawingOrders = null; } } @Override public void writeAFP(OutputStream os, AFPParserConfiguration config) throws IOException { byte[] drawingOrdersData = null; os.write(commandCode); os.write(lengtOfFollowingParameters); os.write(nameOfSegment.getBytes(Constants.cpIBM...
public enum SegmentPropertiesFlag implements IMutualExclusiveGroupedFlag {
1
iFarSeer/TodoFluxArchitecture
app/src/main/java/com/farseer/todo/flux/view/TodoListActivity.java
[ "public interface ActionCreator {\n\n /**\n * 创建新建Item事件.\n *\n * @param description Item事项描述\n */\n void createItemNewAction(final String description);\n\n /**\n * 创建编辑Item事件.\n *\n * @param id items事项id\n * @param description Item事项描述\n * @param completed It...
import android.graphics.Paint; import android.os.Bundle; import android.support.v7.widget.AppCompatEditText; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.text.Html; import android.text.TextUtils; import andr...
/* * * Copyright 2016 zhaosc * * 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 l...
Store todoStore;
5
jpush/jmessage-api-java-client
src/main/java/cn/jmessage/api/user/UserClient.java
[ "public class FriendNote implements IModel {\n\n private static final String NOTE_NAME = \"note_name\";\n private static final String OTHERS = \"others\";\n private static final String USERNAME = \"username\";\n\n private String note_name;\n private String others;\n private String username;\n p...
import cn.jiguang.common.connection.*; import cn.jmessage.api.common.model.*; import cn.jmessage.api.common.model.friend.FriendNote; import cn.jmessage.api.common.model.friend.FriendNotePayload; import cn.jmessage.api.common.model.group.GroupShieldPayload; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import...
/** * Set don't disturb service while receiving messages. * You can Add or remove single conversation or group conversation * * @param username Necessary * @param payload NoDisturbPayload * @return No content * @throws APIConnectionException connect exception * @throws APIRe...
public ResponseWrapper setGroupShield(GroupShieldPayload payload, String username)
2
goerlitz/rdffederator
src/de/uni_koblenz/west/splendid/evaluation/FederationEvalStrategy.java
[ "public class OperatorTreePrinter extends QueryModelVisitorBase<RuntimeException> {\n\t\n\tprivate static final OperatorTreePrinter printer = new OperatorTreePrinter();\n\t\n\tprotected StringBuffer buffer = new StringBuffer();\n\tprivate String indent = \"\";\n\t\n\t/**\n\t * Prints the operator tree starting with...
import info.aduna.iteration.CloseableIteration; import info.aduna.iteration.DistinctIteration; import info.aduna.iteration.EmptyIteration; import info.aduna.iteration.UnionIteration; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.concurrent.Callable; ...
/* * This file is part of RDF Federator. * Copyright 2010 Olaf Goerlitz * * RDF Federator 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) a...
HashJoin join, BindingSet bindings) throws QueryEvaluationException {
5
krobot-framework/krobot
src/main/java/org/krobot/console/ConsoleProcessor.java
[ "public class ArgumentMap\n{\n private Map<String, Object> args;\n\n public ArgumentMap(Map<String, Object> args)\n {\n this.args = args;\n }\n\n public boolean has(String key)\n {\n return args.containsKey(key);\n }\n\n public <T> T get(String key, Class<T> type)\n {\n ...
import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.lang3.ArrayUtils; import org.fusesource.jansi.Ansi; import org.jline.reader.Candidate; import org.jline.reader.Completer; import org.jline.reader.Highlighter; import org.jline.reader.LineReader; ...
package org.krobot.console; public class ConsoleProcessor extends Thread { private Terminal terminal; private LineReader reader; private KrobotConsole console; private Highlighter highlighter; private Completer completer; public ConsoleProcessor(KrobotConsole console, Highlighter highlighte...
CommandArgument arg = command.getArguments()[i];
2
aponom84/MetrizedSmallWorld
src/main/java/org/latna/msw/evaluation/SingleAttributeDistributionTest.java
[ "public abstract class MetricElement {\n private final List<MetricElement> friends;\n\n public MetricElement() {\n friends = Collections.synchronizedList(new ArrayList());\n }\n \n /**\n * Calculate metric between current object and another.\n * @param gme any element for whose metric ...
import org.latna.msw.MetricElement; import org.latna.msw.SearchResult; import org.latna.msw.TestLib; import org.latna.msw.EvaluatedElement; import org.latna.msw.AbstractMetricStructure; import org.latna.msw.TestResult; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayLis...
package org.latna.msw.evaluation; /** * * @author Alexander Ponomarenko aponom84@gmail.com */ public class SingleAttributeDistributionTest { public static final int NUMBER_OF_THREADS = 12; public static final String resultsFolderPath = "evaluationResults\\SingleAttribute\\"; public static enum DISTRI...
SingleAttributeElementFactory ef = new SingleAttributeElementFactory(checkPoints[stageNumber] - db.getSize());
6
wheat7/Cashew
app/src/main/java/com/wheat7/cashew/fragment/DailyListFragment.java
[ "public abstract class BaseFragment<T extends ViewDataBinding> extends Fragment {\n\n public View mainLayout;\n private ViewDataBinding binding;\n\n\n @Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {\n int lay...
import android.graphics.Color; import android.os.Bundle; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.LinearLayoutManager; import android.view.View; import android.widget.Toast; import com.wheat7.cashew.R; import com.wheat7.cashew.base.BaseFragment; import com.wheat7.cashew.data...
package com.wheat7.cashew.fragment; /** * Created by wheat7 on 16/08/2017. */ public class DailyListFragment extends BaseFragment<FragmentDailyListBinding> implements SwipeRefreshLayout.OnRefreshListener { private String mDate; private DailyRecyclerAdapter mAdapter; @Override public int getLa...
throw new ApiException("请求错误!");
1
adiyoss/StructED
src/com/structed/dal/StandardReader.java
[ "public class ErrorConstants {\n\n\tpublic static final String GENERAL_ERROR = \"Error: \";\n\tpublic static final String RAW_DATA_EMPTY_ERROR = \"Raw data is empty\";\n\tpublic static final String VECTOR_CONVERT_ERROR = \"Error converting vector: \";\n\tpublic static final String PARSE_CLASSIFICATION_ERROR = \"Err...
import java.util.ArrayList; import com.structed.constants.ErrorConstants; import com.structed.data.entities.Example; import com.structed.data.Factory; import com.structed.data.InstancesContainer; import com.structed.data.entities.Vector; import com.structed.data.Logger; import java.io.BufferedReader; import java.io.Dat...
/* * The MIT License (MIT) * * StructED - Machine Learning Package for Structured Prediction * * Copyright (c) 2015 Yossi Adi, E-Mail: yossiadidrum@gmail.com * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), t...
Logger.error(ErrorConstants.GENERAL_ERROR);
5
s4u/pgpverify-maven-plugin
src/test/java/org/simplify4u/plugins/keyserver/PGPKeysCacheTest.java
[ "abstract static class KeyServerList {\n\n protected List<PGPKeysServerClient> keysServerClients = new ArrayList<>();\n protected PGPKeysServerClient lastClient;\n protected IOException lastException;\n\n KeyServerList withClients(List<PGPKeysServerClient> keysServerClients) {\n this.keysServerCl...
import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.URI; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import static org.assertj.core.a...
/* * Copyright 2020 Slawomir Jaranowski * * 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 ag...
public static final KeyId KEY_ID_1 = KeyId.from(1L);
4
TakWolf/CNode-Material-Design
app/src/main/java/org/cnodejs/android/md/presenter/implement/ReplyPresenter.java
[ "public final class ApiClient {\n\n private ApiClient() {}\n\n public static final ApiService service = new Retrofit.Builder()\n .baseUrl(ApiDefine.API_BASE_URL)\n .client(new OkHttpClient.Builder()\n .addInterceptor(createUserAgentInterceptor())\n ....
import android.app.Activity; import android.support.annotation.NonNull; import org.cnodejs.android.md.model.api.ApiClient; import org.cnodejs.android.md.model.api.SessionCallback; import org.cnodejs.android.md.model.entity.Reply; import org.cnodejs.android.md.model.entity.UpReplyResult; import org.cnodejs.android.md.mo...
package org.cnodejs.android.md.presenter.implement; public class ReplyPresenter implements IReplyPresenter { private final Activity activity; private final IReplyView replyView; public ReplyPresenter(@NonNull Activity activity, @NonNull IReplyView replyView) { this.activity = activity; ...
ApiClient.service.upReply(reply.getId(), LoginShared.getAccessToken(activity)).enqueue(new SessionCallback<UpReplyResult>(activity) {
1
RoboTricker/Transport-Pipes
src/main/java/de/robotricker/transportpipes/utils/WorldUtils.java
[ "public class PlayerSettingsService {\n\n @Inject\n private TransportPipes transportPipes;\n @Inject\n private GeneralConf generalConf;\n\n private Map<Player, PlayerSettingsConf> cachedSettingsConfs;\n\n public PlayerSettingsService() {\n this.cachedSettingsConfs = new HashMap<>();\n }\...
import com.comphenix.packetwrapper.WrapperPlayServerTitle; import com.comphenix.protocol.wrappers.EnumWrappers; import com.comphenix.protocol.wrappers.WrappedChatComponent; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.entity.Player; impo...
package de.robotricker.transportpipes.utils; public class WorldUtils { private static Map<Player, Integer> hidingDuctsTimers = new HashMap<>(); /** * THREAD-SAFE */ public static List<Player> getPlayerList(World world) { // Bukkit.getOnlinePlayers is the only thread safe playerlist ...
Set<Duct> showingDucts = new HashSet<>();
5
landtanin/StudentAttendanceCheck
app/src/main/java/com/landtanin/studentattendancecheck/fragment/FragmentTimeTable.java
[ "public class FridayFragment extends Fragment {\n\n private TimeTableListAdapter mTimeTableListAdapter;\n private List<TimeTableListItem> mTimeTableListItems = new ArrayList<>();\n private FragmentFridayBinding b;\n private Realm realm;\n\n public FridayFragment() {\n super();\n }\n\n pu...
import android.databinding.DataBindingUtil; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.design.widget.TabLayout; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.view.LayoutInflater; import android.view.View; import an...
package com.landtanin.studentattendancecheck.fragment; /** * Created by nuuneoi on 11/16/2014. */ public class FragmentTimeTable extends Fragment { FragmentTimeTableBinding b; public FragmentTimeTable() { super(); } public static FragmentTimeTable newInstance() { FragmentTimeTab...
return SundayFragment.newInstance();
3
Erudika/scoold
src/main/java/com/erudika/scoold/ScooldServer.java
[ "public class ScooldEmailer implements Emailer {\n\n\tprivate static final Logger logger = LoggerFactory.getLogger(ScooldEmailer.class);\n\tprivate static final ScooldConfig CONF = ScooldUtils.getConfig();\n\tprivate JavaMailSender mailSender;\n\n\tpublic ScooldEmailer(JavaMailSender mailSender) {\n\t\tthis.mailSen...
import com.erudika.para.client.ParaClient; import com.erudika.para.core.App; import com.erudika.para.core.email.Emailer; import com.erudika.para.core.utils.Config; import com.erudika.para.core.utils.Para; import com.erudika.para.core.utils.Utils; import com.erudika.scoold.utils.ScooldEmailer; import com.erudika.scoold....
/* * Copyright 2013-2022 Erudika. https://erudika.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
return new ScooldEmailer(mailSender);
0
CodeCrafter47/BungeeTabListPlus
bungee/src/main/java/codecrafter47/bungeetablistplus/managers/API.java
[ "public class BungeeTabListPlus {\n\n /**\n * Holds an INSTANCE of itself if the plugin is enabled\n */\n private static BungeeTabListPlus INSTANCE;\n @Getter\n private final Plugin plugin;\n\n public PlayerProvider playerProvider;\n @Getter\n private EventExecutor mainThreadExecutor;\n...
import codecrafter47.bungeetablistplus.BungeeTabListPlus; import codecrafter47.bungeetablistplus.api.bungee.*; import codecrafter47.bungeetablistplus.data.BTLPBungeeDataKeys; import codecrafter47.bungeetablistplus.placeholder.PlayerPlaceholderResolver; import codecrafter47.bungeetablistplus.placeholder.ServerPlaceholde...
/* * Copyright (C) 2020 Florian Stober * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * *...
if (customTablist instanceof DefaultCustomTablist) {
6
HimaJyun/Jecon
src/main/java/jp/jyn/jecon/command/Convert.java
[ "public class Jecon extends JavaPlugin {\n private static Jecon instance = null;\n\n private ConfigLoader config;\n private BalanceRepository repository;\n private VaultEconomy economy;\n\n // Stack(LIFO)\n private final Deque<Runnable> destructor = new ArrayDeque<>();\n\n @Override\n public...
import jp.jyn.jbukkitlib.command.SubCommand; import jp.jyn.jbukkitlib.config.YamlLoader; import jp.jyn.jecon.Jecon; import jp.jyn.jecon.config.ConfigLoader; import jp.jyn.jecon.config.MainConfig; import jp.jyn.jecon.db.Database; import jp.jyn.jecon.repository.BalanceRepository; import org.bukkit.command.CommandSender; ...
package jp.jyn.jecon.command; public class Convert extends SubCommand { private final ConfigLoader loader;
private final BalanceRepository repository;
4
darrenfoong/candc
src/training/PrintForest.java
[ "public class FilledDependency implements Comparable<FilledDependency> {\n\tprotected final short relID;\n\tprotected final short headIndex; // position of the \"head\" word in the sentence\n\tprotected final short fillerIndex; // position of the filler word in the sentence\n\tprotected final short unaryRuleID; // ...
import java.io.BufferedReader; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashSet; import cat_combination.FilledDependency; import cat_combination.SuperCategory; import chart_parser.Cell; import chart_parser.Chart; import io.Sentence; import lexicon.Categories; ...
package training; public class PrintForest { ArrayList<Integer> featureIDs; // used to collect features before printing Features features; // the complete feature set HashSet<FilledDependency> goldDeps; Category rootCat; public PrintForest(Features features) { featureIDs = new ArrayList<Integer>(); this.f...
for (SuperCategory superCat : root.getSuperCategories()) {
1
jloisel/reactive-couchbase
reactive-conversion-jackson/src/test/java/com/github/jloisel/reactive/conversion/jackson/JacksonConversionFactoryTest.java
[ "public interface ConversionFactory {\n\n /**\n * Provides a {@link Serializer} instance.\n * \n * @param clazz type of bean to serialize\n * @return serializer instance\n */\n <T extends ReactiveEntity> Serializer<T> serializer();\n\n /**\n * Provides a {@link Deserializer} instance.\n * \n * @p...
import static org.junit.Assert.assertEquals; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import com.fasterxml.jackson.databind.ObjectMapper; import com.github.jloisel.reactive.conversion.api.ConversionFactory; i...
package com.github.jloisel.reactive.conversion.jackson; @RunWith(MockitoJUnitRunner.class) public class JacksonConversionFactoryTest { @Mock private ObjectMapper mapper; private ConversionFactory factory; @Before public void before() { factory = new JacksonConversionFactory(mapper); } @Test ...
final Deserializer<ReactiveEntity> deserializer = factory.deserializer();
1
uber/rides-java-sdk
uber-rides/src/test/java/com/uber/sdk/rides/client/UberRidesApiTest.java
[ "public interface Authenticator {\n\n /**\n * Indicates whether this authenticator can be refreshed.\n *\n * @return\n */\n boolean isRefreshable();\n\n /**\n * Add authentication header required to the request.\n *\n * @param builder\n */\n void signRequest(Request.Build...
import com.uber.sdk.core.auth.Authenticator; import com.uber.sdk.core.client.Session; import com.uber.sdk.core.client.SessionConfiguration; import com.uber.sdk.core.client.internal.ApiInterceptor; import com.uber.sdk.core.client.internal.RefreshAuthenticator; import com.uber.sdk.rides.client.UberRidesApi; import org.ju...
/* * Copyright (c) 2016 Uber Technologies, Inc. * * 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, me...
SessionConfiguration config;
2