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
maximeAudrain/jenerate
org.jenerate/src/java/org/jenerate/internal/ui/dialogs/factory/impl/ToStringDialogFactory.java
[ "public interface CommandIdentifier {\r\n\r\n /**\r\n * @return the unique string identifier of a command\r\n */\r\n String getIdentifier();\r\n\r\n}\r", "public enum MethodsGenerationCommandIdentifier implements CommandIdentifier {\r\n\r\n EQUALS_HASH_CODE(\"org.jenerate.commands.GenerateEqualsH...
import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.Set; import org.eclipse.jdt.core.IField; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IMethod; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.swt.widge...
package org.jenerate.internal.ui.dialogs.factory.impl; /** * {@link DialogFactory} implementation for the {@link ToStringDialog} * * @author maudrain */ public class ToStringDialogFactory extends AbstractDialogFactory<ToStringGenerationData> { /** * Constructor * * @param dial...
PreferencesManager preferencesManager) {
3
CollapsedDom/Stud.IP-Client
core/coreplugins/file_downloader/src/main/java/de/danner_web/studip_client/plugins/file_downloader/FileDownloadPlugin.java
[ "public class PluginSettings {\n\n\tprivate Map<String, String> settings;\n\tprivate PluginInformation info;\n\n\tprivate Preferences rootPref = Preferences\n\t\t\t.userNodeForPackage(Starter.class);\n\tprivate static Logger logger = LogManager.getLogger(PluginSettings.class);\n\n\tpublic PluginSettings(PluginInfor...
import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.io.File; import javax.swing.JPanel; import de.danner_web.studip_client.data.PluginSettings; import de.danner_web.studip_client.model.Context; import de.danner_web.studip_client.plugin.Plugin; import de.danner_web.studip_client.plugins.f...
package de.danner_web.studip_client.plugins.file_downloader; /** * Plugin Class for the "Dokumenten Downloader". * * @author Danner Dominik * */ public class FileDownloadPlugin extends Plugin { /** * Settings name where the target folder dir is saved. */ static final String SYNC_FOLDER = "sync_dir"; ...
public FileDownloadPlugin(Context context, OAuthConnector con, PluginSettings settings) {
4
adealjason/dtsopensource
dts-parent/dts-core/src/main/java/org/github/dtsopensource/core/BusinessActivityControlService.java
[ "@Slf4j\r\npublic abstract class DTSManager implements InitializingBean, IDTSStore {\r\n\r\n protected IDTSStore store;\r\n\r\n private final AtomicBoolean isInit = new AtomicBoolean(false);\r\n\r\n @Override\r\n public void afterPropertiesSet() throws Exception {\r\n try {\r\n ...
import javax.annotation.PostConstruct; import org.apache.commons.lang.StringUtils; import org.github.dtsopensource.core.manager.DTSManager; import org.github.dtsopensource.core.manager.transaction.DTSTransactionSynchronizationAdapter; import org.github.dtsopensource.core.rule.ActivityRuleMananger; import org.githu...
package org.github.dtsopensource.core; /** * @author ligaofeng 2016年11月29日 上午11:09:45 */ @Slf4j @Setter public class BusinessActivityControlService { private DTSConfig dtsConfig; private DTSManager dtsManager; private IDTSRule activityRuleMananger; /** * 初始化httpRemot...
ActivityRuleEntity activityRuleEntity = this.getBizTypeRule(bizType);
8
ikromin/jphotoframe
src/main/java/net/igorkromin/jphotoframe/ui/PhotoUpdateThread.java
[ "public class ConfigOptions {\n\n public static final String DEFAULT_DEVICE_NUM = \"0\";\n public static final String DEFAULT_IMG_TIME = \"30000\";\n public static final String DEFAULT_WEATHER_UPDATE_TIME = \"600000\";\n public static final String DEFAULT_FORMAT_TIME = \"H:mm\";\n public static final...
import net.igorkromin.jphotoframe.ConfigOptions; import net.igorkromin.jphotoframe.ImageDirectory; import net.igorkromin.jphotoframe.img.BackgroundFiller; import net.igorkromin.jphotoframe.img.Factory; import net.igorkromin.jphotoframe.img.ImageScaler; import net.igorkromin.jphotoframe.img.ImageUtil; import net.igorkro...
/** * JPhotoFrame - a simple Java application for displaying a collection of photos in a full-screen slideshow. * Copyright (C) 2015 Igor Kromin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foun...
ImageUtil.writeImage(c, buffer);
5
timboudreau/nb-nodejs
node-projects/src/main/java/org/netbeans/modules/nodejs/node/LibraryFilterNode.java
[ "public class NodeJSProject implements Project, ProjectConfiguration, ActionProvider,\n Comparable<NodeJSProject>, ProjectInformation,\n PrivilegedTemplates, RecommendedTemplates, CreateFromTemplateAttributesProvider,\n PropertyChangeListener, MoveOrRenameOperationImplementation,\n Delet...
import java.awt.BorderLayout; import java.awt.EventQueue; import java.awt.Image; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.ut...
} return sb.toString(); } @Override public String getShortDescription () { if (this.description != null || this.name != null) { StringBuilder sb = new StringBuilder( "<html><body>" ); //NOI18N synchronized ( key ) { sb.append( "<b><u>" ).appen...
List<AddLibraryAction.LibraryAndVersion> libs
5
ProxyPrint/proxyprint-kitchen
src/test/java/controllers/RegisterRequestTests.java
[ "@Configuration\r\n@EnableAutoConfiguration\r\n@ComponentScan\r\n@EnableCaching\r\n@EnableSwagger2\r\n@EnableAsync\r\npublic class WebAppConfig extends SpringBootServletInitializer {\r\n\r\n private static final Class<WebAppConfig> APP_CLASS = WebAppConfig.class;\r\n \r\n @Override\r\n protected Spr...
import com.google.common.reflect.TypeToken; import com.google.gson.Gson; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import io.github.proxyprint.kitchen.WebAppConfig; import io.github.proxyprint.kitchen.models.Admin; import io.github.proxyprint.kitchen.models.printshops.Manager; import io.gith...
package controllers; @ActiveProfiles("test") @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(WebAppConfig.class) @WebIntegrationTest public class RegisterRequestTests { @Autowired private WebApplicationContext wac; @Autowired private FilterChainProxy springSecurityFilterChain;...
Manager m = this.managers.findByUsername("manager");
2
i2p/i2p.itoopie
src/net/i2p/itoopie/i2pcontrol/methods/SetI2PControl.java
[ "public class InvalidParametersException extends Exception {\n\n\t/**\n\t * Signifies that the paramers we sent were invalid for the used JSONRPC2\n\t * method.\n\t */\n\tprivate static final long serialVersionUID = 4044188679464846005L;\n\n}", "public class InvalidPasswordException extends Exception {\n\n\t/**\n...
import java.util.EnumMap; import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.Map.Entry; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import net.i2p.itoopie.i2pcontrol.InvalidParametersException; import net.i2p.itoopie.i2pcontrol.InvalidPassword...
package net.i2p.itoopie.i2pcontrol.methods; public class SetI2PControl { public static EnumMap<I2P_CONTROL, Object> execute(Map<I2P_CONTROL,String> settings)
throws InvalidPasswordException, JSONRPC2SessionException, InvalidParametersException{
7
OpenDDRdotORG/OpenDDR-Java
src/org/openddr/simpleapi/oddr/builder/os/OperaOSModelBuilder.java
[ "public interface Builder {\n\n public boolean canBuild(UserAgent userAgent);\n\n public BuiltObject build(UserAgent userAgent, int confidenceTreshold);\n}", "public class WinPhoneDeviceBuilder extends OrderedTokenDeviceBuilder {\n\n private Map<String, Device> devices;\n\n public WinPhoneDeviceBuilde...
import org.openddr.simpleapi.oddr.model.os.OperatingSystem; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.openddr.simpleapi.oddr.builder.Builder; import org.openddr.simpleapi.oddr.builder.device.WinPhoneDeviceBuilder; import org.openddr.simpleapi.oddr.builder.os.mozilla.And...
/** * Copyright 2011 OpenDDR LLC * This software is distributed under the terms of the GNU Lesser General Public License. * * * This file is part of OpenDDR Simple APIs. * OpenDDR Simple APIs is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as ...
public BuiltObject build(UserAgent userAgent, int confidenceTreshold) {
5
wso2/carbon-governance
components/governance/org.wso2.carbon.governance.generic/src/main/java/org/wso2/carbon/governance/generic/services/ManageGenericArtifactService.java
[ "@SuppressWarnings(\"unused\")\npublic class GenericArtifactManager {\n\n private String artifactNameAttribute;\n private String artifactNamespaceAttribute;\n private String artifactElementNamespace;\n private GovernanceArtifactManager manager;\n private String mediaType;\n\n /**\n * Construct...
import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact; import org.wso2.carbon.go...
String[] lifecycleName = new String[artifacts.length]; String[] lifecycleState = new String[artifacts.length]; String[] paths = new String[artifacts.length]; for (GenericArtifact artifact : artifacts) { int i = bean.getSize(); paths[i] = ar...
GovernanceConstants.DEFAULT_SERVICE_NAME.
1
gallir/SpokenPic
src/com/spokenpic/ViewChangePass.java
[ "public static class ChangePassData extends JsonData {\n\tpublic String old_password;\n\tpublic String password;\n}", "public static class LoginResult extends JsonData {\n\tpublic String email;\n\tpublic String key;\n\tpublic String username;\n\tpublic String password;\n\tpublic Integer pk = null; // An integer k...
import android.app.ProgressDialog; import android.content.Intent; import android.graphics.Color; import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; impo...
/** * SpokenPic Java source code * @author Ricardo Galli (gallir@gmail.com) * @copyright: Menéame & APSL, 2012 * @license: GPL3 */ package com.spokenpic; public class ViewChangePass extends SherlockActivity implements RestClientListener { private ProgressDialog pd = null; @Override public void onCreate(Bu...
RestClientPut client = new RestClientPut("/api/v1/changepassword/" + App.getInstance().getPk() + "/", data.toString());
4
Gotye-QPlus/GotyeSDK-Android
GotyeSDK/src/com/gotye/sdk/InnerConstants.java
[ "public class GotyeImageMessageProxy extends GotyeMessageProxy<GotyeImageMessage> {\n\n\tpublic GotyeImageMessageProxy(GotyeImageMessage message) {\n\t\tsuper(message);\n\t}\n\n\tpublic String getSavePath() {\n\t\treturn savePath;\n\t}\n\n\tpublic void setSavePath(String savePath) {\n\t\tthis.savePath = savePath;\n...
import java.io.ByteArrayOutputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.graphics.Bitmap; import android.graphi...
package com.gotye.sdk; public final class InnerConstants implements GotyeChatListener, GotyeLoginListener{ public static final int START_FROM_MAIN = 0; public static final int START_FROM_ROOM = 1; static String configName = "gotye_config"; static GotyeAPI api; public static GotyeUser curUserInfo; public...
GotyeMessageProxy proxy = GotyeMessageActivity.sendMap.remove(msg.getMessageID());
3
rm3l/maoni
maoni/src/main/java/org/rm3l/maoni/ui/MaoniActivity.java
[ "public static class CallbacksConfiguration {\n\n @Nullable\n private static CallbacksConfiguration SINGLETON = null;\n\n @Nullable\n private Validator validator;\n\n @Nullable\n private Listener listener;\n\n @Nullable\n private UiListener uiListener;\n\n private CallbacksConfiguration(@...
import android.app.Dialog; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ProviderInfo; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.net.Uri; import android.os.Bundle; import andr...
/* * Copyright (c) 2016 Armel Soro * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish,...
private Feedback.App mAppInfo;
4
junjunguo/PocketMaps
PocketMaps/app/src/main/java/com/junjunguo/pocketmaps/fragments/AppSettings.java
[ "public class MainActivity extends AppCompatActivity implements OnClickMapListener {\n public final static int ITEM_TOUCH_HELPER_LEFT = 4;\n public final static int ITEM_TOUCH_HELPER_RIGHT = 8;\n private MyMapAdapter mapAdapter;\n private boolean changeMap;\n private RecyclerView mapsRV;\n private...
import android.app.Activity; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.DialogInterface.OnClickListener; import androidx.appcompat.app.AlertDialog; import android.util.Log; import android.view.MotionEvent; import android.view.View; impor...
/** * dynamic show start or stop tracking */ public void trackingBtnClicked() { final ImageView iv = (ImageView) activity.findViewById(R.id.app_settings_tracking_iv); final TextView tv = (TextView) activity.findViewById(R.id.app_settings_tracking_tv_switch); if (getTracking()....
Intent intent = new Intent(activity, MainActivity.class);
0
TorchPowered/OpenByte
src/main/java/net/openbyte/Launch.java
[ "public class Files {\n /**\n * Represents the current OpenByte workspace directory.\n */\n public static File WORKSPACE_DIRECTORY = new File(System.getProperty(\"user.home\"), \".openbyte\");\n /**\n * Represents the plugins directory inside of the workspace directory.\n */\n public sta...
import org.kohsuke.github.GHRelease; import org.kohsuke.github.GHRepository; import org.kohsuke.github.GitHub; import org.kohsuke.github.GitHubBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.swing.*; import java.io.File; import java.util.ArrayList; import java.util.HashMap; import net.ope...
/* * This file is part of OpenByte IDE, licensed under the MIT License (MIT). * * Copyright (c) TorchPowered 2016 * * 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,...
public static final HashMap<String, OpenProjectSolution> nameToSolution = new HashMap<String, OpenProjectSolution>();
1
yuqirong/NewsPublish
src/com/cjlu/newspublish/actions/impl/NewsTypeAction.java
[ "@SuppressWarnings(\"unchecked\")\npublic abstract class BaseAction<T> extends ActionSupport implements\n\t\tModelDriven<T>, Preparable, RequestAware, SessionAware ,ApplicationAware{\n\n\tprivate static final long serialVersionUID = 1L;\n\tpublic T model;\n\tprotected Map<String, Object> sessionMap;\n\tprotected Ma...
import java.io.ByteArrayInputStream; import java.io.UnsupportedEncodingException; import java.util.List; import javassist.bytecode.stackmap.TypeData.ClassName; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.s...
package com.cjlu.newspublish.actions.impl; @Controller @Scope("prototype") public class NewsTypeAction extends BaseAction<NewsType> { private static final long serialVersionUID = -3235298362946735728L; @Autowired private NewsTypeService newsTypeService; @Autowired private NewsService newsService; List<News...
private Page<News> p = null;
2
tim-group/karg
src/test/java/com/timgroup/karg/reference/LensesTest.java
[ "public interface Keyword<T> extends KeywordArgumentsLens<T> {\n\n KeywordArguments metadata();\n KeywordArgument of(T value);\n T from(KeywordArguments keywordArguments);\n T from(KeywordArguments keywordArguments, T defaultValue);\n \n}", "public class KeywordArguments implements Map<Keyword<?>, ...
import java.util.List; import org.hamcrest.Matchers; import org.junit.Test; import com.google.common.base.Function; import com.google.common.base.Predicate; import com.google.common.collect.Lists; import com.timgroup.karg.keywords.Keyword; import com.timgroup.karg.keywords.KeywordArguments; import com.timgroup.karg.key...
package com.timgroup.karg.reference; public class LensesTest { private static final Keyword<String> NAME = Keywords.newKeyword(); private static final Keyword<KeywordArguments> ADDRESS = Keywords.newKeyword(); private static final Keyword<String> FIRST_LINE = Keywords.newKeyword(); private st...
Lens<KeywordArguments, String> FIRST_LINE_OF_ADDRESS = Getters.compose(ADDRESS, FIRST_LINE);
4
loicortola/led-controller
android/app/src/main/java/com/loicortola/controller/ui/fragment/DeviceFragment.java
[ "public class DeviceAdapter extends RecyclerView.Adapter<DeviceAdapter.ViewHolder> {\n\n private List<Device> mDataset;\n private DeviceCardClickListener l;\n\n public interface DeviceCardClickListener {\n void onSetupBtnClicked(String deviceId);\n void onCardClicked(String deviceId);\n ...
import android.content.Context; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v4.app.DialogFragment; import android.support.v4.app.Fragment; import android.support.v7.widget.GridLayoutManager; import android.sup...
package com.loicortola.controller.ui.fragment; /** * Created by loic on 28/03/2016. */ public class DeviceFragment extends Fragment implements DeviceAdapter.DeviceCardClickListener, DeviceSetupDialogFragment.OnSettingsChangedListener { public interface NavigationListener { void onDeviceSelected(Stri...
private DeviceService mDeviceService;
4
wardle/rsterminology
rsterminology-server/src/main/java/com/eldrix/terminology/server/resources/ConceptResource.java
[ "public static class CrossMapTableFilter {\n\tprivate long _mapSetId;\n\n\tpublic CrossMapTableFilter(long mapSetId) {\n\t\t_mapSetId = mapSetId;\n\t}\n\n\t@QueryAssembled\n\tpublic void queryAssembled(SelectContext<CrossMapTable> context) {\n\t\tcontext.getSelect().andQualifier(CrossMapTable.MAP_SET_ID.eq(_mapSetI...
import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Configuration; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; import com.eldrix.terminology.server.reso...
package com.eldrix.terminology.server.resources; @Path("snomedct/concepts") @Produces(MediaType.APPLICATION_JSON) public class ConceptResource { @Context private Configuration config; /** * Return information about a specified concept. * @param id * @param uriInfo * @return */ @GET @Path("{conceptId}...
public DataResponse<Concept> getOne(@PathParam("conceptId") long id, @Context UriInfo uriInfo) {
1
CreateChance/DoorGod
app/src/main/java/com/createchance/doorgod/lockfragments/PatternLockFragment.java
[ "public class LockInfo extends DataSupport {\n\n private String lockString;\n\n private int lockType;\n\n public String getLockString() {\n return lockString;\n }\n\n public void setLockString(String lockString) {\n this.lockString = lockString;\n }\n\n public int getLockType() {\...
import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.provider.Settings; import android.support.v4.app.Fragment; import android.support.v7.app.AlertDialog; import android.view.LayoutInflat...
package com.createchance.doorgod.lockfragments; public class PatternLockFragment extends Fragment { private static final String TAG = "PatternLockFragment"; private TextView fingerprintInfo; private ImageView fingerprintIcon; private Button moreButton; private Lock9View patternView;
private DoorGodService.ServiceBinder mService;
1
theblindr/blindr
app/src/com/lesgens/blindr/SplashscreenActivity.java
[ "public class Controller {\n\tprivate City city;\n\tprivate HashMap<String, User> users;\n\tprivate Session session;\n\tprivate User myselfUser;\n\tprivate ArrayList<Match> matches;\n\tprivate int dimensionAvatar;\n\n\tprivate static Controller controller;\n\n\tprivate Controller(){\n\t\tcity = new City(\"\");\n\t\...
import java.util.List; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.graphics.Typeface; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.Wi...
package com.lesgens.blindr; public class SplashscreenActivity extends Activity implements UserAuthenticatedListener { private GoogleApiClient mGoogleApiClient; private static final String[] PERMISSIONS = {"public_profile", "user_photos"}; private boolean mConnected = false; private UiLifecycleHelper uiHelper; ...
Server.connect(session.getAccessToken());
4
graywolf336/CasinoSlots
src/test/java/test/com/craftyn/casinoslots/TestActions.java
[ "@PrepareForTest({ CraftItemFactory.class })\r\npublic class TestInstanceCreator {\r\n private Random r;\r\n private CasinoSlots main;\r\n private Server mockServer;\r\n private Player mockOpPlayer, mockNotOpPlayer;\r\n private CommandSender mockSender, mockOpPlayerSender;\r\n private ConsoleComma...
import static org.junit.Assert.*; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import org.bukkit.entity.Player; import org.bukkit.plugin.PluginDescriptionFile; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; ...
package test.com.craftyn.casinoslots; @RunWith(PowerMockRunner.class) @PrepareForTest({ CasinoSlots.class, PluginDescriptionFile.class }) @PowerMockIgnore("javax.management.*") public class TestActions { private static TestInstanceCreator creator; private static CasinoSlots main; private static Player...
public void addXpActionInvalidTest() throws UnknownActionException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
6
ominidi/ominidi-web
src/main/java/org/ominidi/facebook/service/PageFeedService.java
[ "@Getter\r\npublic class Feed<Post> implements Iterable<Post> {\r\n private final List<Post> posts;\r\n private final String nextUrl;\r\n private final String prevUrl;\r\n private final Integer size;\r\n\r\n public Feed(List<Post> posts, String nextUrl, String prevUrl) {\r\n this.posts = posts...
import org.ominidi.domain.model.Feed; import org.ominidi.domain.model.Post; import org.ominidi.facebook.exception.ConnectionException; import org.ominidi.facebook.mapper.FeedMapper; import org.ominidi.facebook.mapper.PostMapper; import org.ominidi.facebook.repository.ConnectionAware; import org.springframework.be...
package org.ominidi.facebook.service; @Service public class PageFeedService implements FeedAware { private ConnectionAware pageFeed;
private FeedMapper feedMapper;
3
ojacquemart/vlilleChecker
app/src/com/vlille/checker/ui/StationInfoActivity.java
[ "@Table(name = DB.Table.STATION)\npublic class Station extends Entity {\n\n public static final String ID = \"_id\";\n public static final String NAME = \"suggest_text_1\";\n public static final String LATITUDE = \"latitude\";\n public static final String LATITUDE_E6 = \"latitudeE6\";\n public static...
import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.MenuItem; import android.view.View; import android.widget.ImageButton; import android.widget.TextView; import com.vlille.checker.R; import com.vlille.checker.model.Stati...
package com.vlille.checker.ui; public class StationInfoActivity extends AppCompatActivity { private static final String TAG = StationInfoActivity.class.getSimpleName();
private StationHolder holder;
1
kantenkugel/KanzeBot
src/com/kantenkugel/discordbot/commands/sections/MiscCommands.java
[ "public class Statics {\n public static final SimpleLog LOG = SimpleLog.getLog(BotConfig.get(\"logname\", \"KanzeBot\"));\n public static long START_TIME = System.currentTimeMillis();\n public static String OAUTH_ID = BotConfig.get(\"oauthAppId\", \"\");\n\n public static User botOwner;\n\n public st...
import com.kantenkugel.discordbot.Statics; import com.kantenkugel.discordbot.commands.Command; import com.kantenkugel.discordbot.commands.CommandWrapper; import com.kantenkugel.discordbot.moduleutils.DocParser; import com.kantenkugel.discordbot.util.MessageUtil; import com.kantenkugel.discordbot.util.MiscUtil; import n...
/* * Copyright 2016 Michael Ritter (Kantenkugel) * * 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 ...
registry.put("feedback", new CommandWrapper("Used to give Feedback about KanzeBot", (e, cfg) -> {
2
vector-im/riot-automated-tests
VectorMobileTests/src/test/java/mobilestests_ios/RiotPublicRoomsTests.java
[ "public class RiotHomePageTabObjects extends RiotTabPageObjects{\n\n\tpublic RiotHomePageTabObjects(AppiumDriver<MobileElement> myDriver) throws InterruptedException {\n\t\tsuper(myDriver);\n\t\tPageFactory.initElements(new AppiumFieldDecorator(driver), this);\n\t\tAssert.assertTrue(waitUntilDisplayed((IOSDriver<Mo...
import java.io.FileNotFoundException; import org.testng.Assert; import org.testng.annotations.BeforeGroups; import org.testng.annotations.Listeners; import org.testng.annotations.Test; import com.esotericsoftware.yamlbeans.YamlException; import io.appium.java_client.SwipeElementDirection; import pom_ios.main_tabs.RiotH...
package mobilestests_ios; /** * Tests on public rooms, on the rooms tab. * @author jeangb */ @Listeners({ ScreenshotUtility.class }) public class RiotPublicRoomsTests extends RiotParentTest{ private String riotUserADisplayName="riotuser1"; /** * Force using matrix.org and not custom one. </br> * 1. Hit ...
RiotRoomsTabPageObjects roomsTab=homePageTab.openRoomsTab();
1
nchambers/probschemas
src/main/java/nate/probschemas/Learner.java
[ "public class Pair<A,B> {\n A first;\n B second;\n\n public Pair(A one, B two) {\n first = one;\n second = two;\n }\n\n public A first() { return first; }\n public B second() { return second; }\n public void setFirst(A obj) { first = obj; }\n public void setSecond(B obj) { second = obj; }\n \n publi...
import java.io.File; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Random; import java.util.Set; import edu.stanford.nlp.stats.ClassicCounter; import edu.stanford.nlp.stats.Counter; import nate.util.Pair; import nate.muc.MUCKeyReader; import nate.muc.KeyReader; import nat...
while( docids.size() < num ) { int draw = rand.nextInt(_trainDocsNames.size()); while( docids.contains(draw) ) draw = rand.nextInt(_trainDocsNames.size()); docids.add(draw); } System.out.println("Wanted " + num + " random docs, drew " + docids.size() + " docs."); for(...
public Triple inferUsingSampledData(GibbsSamplerEntities sampler) {
5
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...
AuditorModuleContext ctx = AuditorModuleContext.getContext();
2
Gocnak/Botnak
src/main/java/irc/message/MessageQueue.java
[ "public class ChatPane implements DocumentListener {\n\n private JFrame poppedOutPane = null;\n\n // The timestamp of when we decided to wait to scroll back down\n private long scrollbarTimestamp = -1;\n\n public void setPoppedOutPane(JFrame pane) {\n poppedOutPane = pane;\n }\n\n public JF...
import gui.ChatPane; import gui.CombinedChatPane; import gui.forms.GUIMain; import sound.SoundEngine; import util.Utils; import util.settings.Settings; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ExecutorService; import java.util.concurrent.Exec...
package irc.message; /** * Created by Nick on 1/14/2015. * <p> * Created to aid in the faster response time of the GUI while large * quantities of messages come in, using the Pircbot Queue. */ public class MessageQueue extends Thread { private static ExecutorService pool; private static BlockingQueue<M...
if (Settings.loadedDonationSounds) {
5
aikuma/aikuma
Aikuma/src/org/lp20/aikuma/ui/ThumbRespeakFragment.java
[ "public class Recording extends FileModel {\n\n\t// String tag for debugging\n\tprivate static final String TAG = \"Recording\";\n\t\n\t/** sample file duration in sec */\n\tpublic static final long SAMPLE_SEC = 15;\n\t\n\t/**\n\t * The constructor used when first creating a Recording.\n\t *\n\t * @param\trecording...
import android.app.Fragment; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.Handler; import android.util.Log; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.View.On...
Log.i("Thumb", ""+ gestureTime); if(gestureTime >= VALID_GESTURE_TIME) { isCommented = false; } if(isMarkerReached && outputType == 0) respeakButton.setEnabled(true); if(isEndReached) playButton.setEnabled(false); } return false; } }); respeakButton.setOn...
private Player.OnCompletionListener onCompletionListener =
4
oehf/ipf-oht-atna
auditor/src/test/java/org/openhealthtools/ihe/atna/auditor/tests/mesa/Mesa11180.java
[ "public class PIXSourceAuditor extends PIXAuditor \n{\n\t/**\n\t * Get an instance of the PIX Source Auditor from the \n\t * global context\n\t * \n\t * @return PIX Source Auditor instance\n\t */\n\tpublic static PIXSourceAuditor getAuditor()\n\t{\n\t\tAuditorModuleContext ctx = AuditorModuleContext.getContext();\n...
import org.junit.Ignore; import org.junit.Test; import org.openhealthtools.ihe.atna.auditor.PIXSourceAuditor; import org.openhealthtools.ihe.atna.auditor.XDSConsumerAuditor; import org.openhealthtools.ihe.atna.auditor.XDSSourceAuditor; import org.openhealthtools.ihe.atna.auditor.codes.rfc3881.RFC3881EventCodes.RFC3881E...
/** * **************************************************************************** * Copyright (c) 2008,2009 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, ...
XDSConsumerAuditor consumerAuditor = XDSConsumerAuditor.getAuditor();
1
asm-products/nexus-camera
src/com/android/camera/VideoUI.java
[ "static public interface OnPreferenceChangedListener {\n public void onSharedPreferenceChanged();\n public void onRestorePreferencesClicked();\n public void onOverriddenPreferencesClicked();\n public void onCameraPickerClicked(int cameraId);\n}", "abstract public class AbstractSettingPopup extends Rot...
import android.graphics.Bitmap; import android.graphics.Color; import android.graphics.Matrix; import android.graphics.SurfaceTexture; import android.graphics.drawable.ColorDrawable; import android.hardware.Camera.Parameters; import android.os.Handler; import android.os.Message; import android.util.Log; import android....
} public void overrideSettings(final String... keyvalues) { mVideoMenu.overrideSettings(keyvalues); } public void setOrientationIndicator(int orientation, boolean animation) { // We change the orientation of the linearlayout only for phone UI // because when in portrait the wid...
public void showPopup(AbstractSettingPopup popup) {
1
l0s/fernet-java8
fernet-jersey-auth/src/test/java/com/macasaet/fernet/jersey/example/tokeninjection/ProtectedResource.java
[ "@SuppressWarnings({\"PMD.AvoidDuplicateLiterals\", \"PMD.TooManyMethods\"})\npublic class Key {\n\n private final byte[] signingKey;\n private final byte[] encryptionKey;\n\n /**\n * Create a Key from individual components.\n *\n * @param signingKey\n * a 128-bit (16 byte) key f...
import com.macasaet.fernet.jaxrs.FernetToken; import com.macasaet.fernet.jersey.example.common.Session; import com.macasaet.fernet.jersey.example.common.User; import com.macasaet.fernet.jersey.example.common.UserRepository; import java.util.Collection; import java.util.function.Supplier; import javax.inject.Inject; imp...
/** Copyright 2017 Carlos Macasaet 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 i...
private Validator<Session> validator;
3
indvd00m/java-ascii-render
ascii-render/src/test/java/com/indvd00m/ascii/render/tests/TestEllipse.java
[ "public class Canvas implements ICanvas {\n\n\tpublic static final char NULL_CHAR = '\\0';\n\n\tprotected final int width;\n\tprotected final int height;\n\tprotected final List<StringBuilder> lines;\n\n\t// cache\n\tprotected String cachedText;\n\tprotected String cachedLines;\n\tprotected boolean needUpdateCache ...
import com.indvd00m.ascii.render.Canvas; import com.indvd00m.ascii.render.Point; import com.indvd00m.ascii.render.api.ICanvas; import com.indvd00m.ascii.render.api.IContext; import com.indvd00m.ascii.render.api.IPoint; import com.indvd00m.ascii.render.elements.Ellipse; import org.junit.Test; import static org.junit.Ass...
package com.indvd00m.ascii.render.tests; /** * @author indvd00m (gotoindvdum[at]gmail[dot]com) * @since 1.0.0 */ public class TestEllipse { @Test public void test01() { IContext context = mock(IContext.class);
ICanvas canvas = new Canvas(10, 5);
2
omise/omise-java
src/main/java/co/omise/requests/RequestBuilder.java
[ "public class Client {\n\n private final OkHttpClient httpClient;\n private Requester requester;\n\n /**\n * Creates a Client that sends the specified API version string in the header to access an earlier version\n * of the Omise API.\n *\n * <p>\n * Note: Please ensure to have at least...
import co.omise.Client; import co.omise.Endpoint; import co.omise.Serializer; import co.omise.models.OmiseObjectBase; import co.omise.models.Params; import okhttp3.HttpUrl; import okhttp3.MediaType; import okhttp3.RequestBody; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.Map; impor...
package co.omise.requests; /** * RequestBuilder is base class, all extending classes would be used to generate a {@link Request} that would then be passed on to {@link Client} in order * to carry out a certain task through an HTTP request * * @param <T> the generic type for any Model that would need to be return...
protected HttpUrl buildUrl(Endpoint endpoint, String path, String... segments) {
1
mikaelhg/openblocks
src/main/java/edu/mit/blocks/workspace/typeblocking/BlockDropAnimator.java
[ "public class Block implements ISupportMemento {\r\n\r\n //Defines a NULL id for a Block\r\n public static final Long NULL = Long.valueOf(-1);\r\n\r\n //block identifying information\r\n private final Long blockID;\r\n private String label;\r\n private String pageLabel = null;\r\n private Strin...
import java.awt.Point; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import edu.mit.blocks.codeblocks.Block; import edu.mit.blocks.codeblocks.BlockLink; import edu.mit.blocks.renderable.RenderableBlock; import edu.mit.blocks.workspace.Page; import edu.mit.blocks.workspace.PageChangeEve...
package edu.mit.blocks.workspace.typeblocking; /** * The BlockDropAnimator has two function, to fly a block to * it's location and then attempt to link the child if possible. * It takes in a RenderableBlock, drags the block, and drops it * if possible. This class uses a timer to assist in the * smooth...
Page p = workspace.getCurrentPage(block);
3
emina/kodkod
test/kodkod/test/unit/UCoreTest.java
[ "public final class Reflection {\n\tprivate Reflection() {}\n\t\n\t/**\n\t * This method invokes each method in the given set on the given instance,\n\t * and returns a map from the invoked methods to the resulting objects.\n\t * @return a map from the given methods to the objects they produced when invoked\n\t * o...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static kodkod.test.util.Reflection.*; import java.lang.reflect.Method; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; impor...
/** * */ package kodkod.test.unit; /** * Tests the unsat core functionality. * @author Emina Torlak */ public final class UCoreTest { private static final Class<?>[] FIXED_SCOPE = { NUM378.class }; // scopes 1-5 private static final Class<?>[] EASY = { Toughnut.class, MED007.class, MED009...
solver.options().setSolver(SATFactory.MiniSatProver);
3
mechero/code-quality-game
sonar-connector/src/main/java/com/thepracticaldeveloper/devgame/modules/retriever/service/SonarDataRetriever.java
[ "public interface SonarServerConfigurationService {\n SonarServerStatus checkServerDetails(SonarServerConfiguration config);\n\n boolean checkServerAuthentication(SonarServerConfiguration config);\n\n SonarServerConfiguration getConfiguration();\n}", "@JsonInclude(JsonInclude.Include.NON_NULL)\n@JsonProp...
import com.thepracticaldeveloper.devgame.modules.configuration.service.SonarServerConfigurationService; import com.thepracticaldeveloper.devgame.modules.sonarapi.resultbeans.Issue; import com.thepracticaldeveloper.devgame.modules.sonarapi.resultbeans.Issues; import com.thepracticaldeveloper.devgame.modules.sonarapi.res...
package com.thepracticaldeveloper.devgame.modules.retriever.service; @Service @EnableAsync @EnableScheduling public final class SonarDataRetriever { private static final Log log = LogFactory.getLog(SonarDataRetriever.class); private static final String GET_ISSUES_COMMAND = "/api/issues/search?organizations=...
Set<Issue> issues = new HashSet<>();
1
tommai78101/PokemonWalking
game/src/main/java/item/KeyItem.java
[ "public abstract class Item extends Entity implements Comparable<Item>, Renderable {\n\n\tprotected String name;\n\tprotected String itemDialogueName;\n\tprotected String description;\n\tprotected ItemCategories category;\n\tprotected boolean picked;\n\tprotected boolean isReturnMenuFlag;\n\tprotected int id;\n\tpr...
import java.util.Arrays; import java.util.List; import abstracts.Item; import entity.Player; import enums.ItemCategories; import level.Area; import main.Game; import menu.Inventory;
/** * Open-source Game Boy inspired game. * * Created by tom_mai78101. Hobby game programming only. * * All rights copyrighted to The Pokémon Company and Nintendo. */ package item; /** * Any base implementations of the abstract class object, Item, will need to implement or devise a * way to create Dialogu...
public void doAction(Game game) {
4
kunka/CoolAndroidBinding
src/com/kk/binding/kernel/CommandBinding.java
[ "public interface ICommand {\r\n\tpublic void execute(View view, Object... args);\r\n}\r", "public abstract class ListenerToCommand {\r\n private ICommand mCommand;\r\n private Object param;\r\n\r\n public Object getParam() {\r\n return param;\r\n }\r\n\r\n public void setParam(Object param)...
import com.kk.binding.command.ICommand; import com.kk.binding.listener.ListenerToCommand; import com.kk.binding.property.INotifyPropertyChanged; import com.kk.binding.property.IPropertyChanged; import com.kk.binding.property.PropertyChangedEventArgs; import com.kk.binding.util.BindLog; import com.kk.binding.util....
/* * Copyright (C) 2013 kk-team.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 applicable la...
public void propertyChanged(Object sender, PropertyChangedEventArgs args) {
4
mpusher/mpush-client-java
src/main/java/com/mpush/handler/AckHandler.java
[ "public interface Logger {\n\n void enable(boolean enabled);\n\n void d(String s, Object... args);\n\n void i(String s, Object... args);\n\n void w(String s, Object... args);\n\n void e(Throwable e, String s, Object... args);\n}", "public interface Connection {\n\n void connect();\n\n void cl...
import com.mpush.api.Logger; import com.mpush.api.connection.Connection; import com.mpush.api.protocol.Packet; import com.mpush.client.ClientConfig; import com.mpush.client.AckRequestMgr; import com.mpush.message.AckMessage;
/* * (C) Copyright 2015-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
this.logger = ClientConfig.I.getLogger();
3
xiangxik/castle-shop
src/main/java/com/whenling/shop/controller/ProductController.java
[ "@Entity\n@Table(name = \"tbl_product\")\npublic class Product extends DataEntity<Admin, Long> implements Defaultable {\n\n\tprivate static final long serialVersionUID = -6934807834358886933L;\n\n\t/** 编号 */\n\t@NotNull\n\t@Pattern(regexp = \"^[0-9a-zA-Z_-]+$\")\n\t@Size(max = 100)\n\t@Column(nullable = false, uniq...
import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.Reques...
package com.whenling.shop.controller; @Controller @RequestMapping("/product") public class ProductController extends CrudController<Product, Long> { @Autowired private SpecificationRepository specificationRepository; @Autowired private ProductSkuRepository productSkuRepository; @RequestMapping(value = "/pag...
List<ProductSku> skus = entity.getProductSkus().subList(0, skuCount);
1
palominolabs/benchpress
worker-svc/src/main/java/com/palominolabs/benchpress/worker/WorkerMainModule.java
[ "public final class IpcHttpClientModule extends AbstractModule {\n @Override\n protected void configure() {\n AsyncHttpClientConfig.Builder builder = new AsyncHttpClientConfig.Builder();\n bind(AsyncHttpClient.class).annotatedWith(Ipc.class).toInstance(new AsyncHttpClient(builder.build()));\n ...
import com.google.inject.AbstractModule; import com.google.inject.Provides; import com.google.inject.Singleton; import com.palominolabs.benchpress.ipc.IpcHttpClientModule; import com.palominolabs.benchpress.ipc.IpcJsonModule; import com.palominolabs.benchpress.jersey.JerseySupportModule; import com.palominolabs.benchpr...
package com.palominolabs.benchpress.worker; public final class WorkerMainModule extends AbstractModule { @Override protected void configure() { binder().requireExplicitBindings(); bind(WorkerMain.class); install(new WorkerResourceModule()); install(new ConfigModuleBuilder().ad...
install(new JerseySupportModule());
2
thwegene/OCT
src/oct/polygonization/OctDualMasspointQuad.java
[ "public enum OCT_EDGE implements OCT_ENUM {\r\n\r\n\t/**\r\n\t * BACK DOWN, Direction X,Y,Z: 0, -1, -1\r\n\t */\r\n\tBD(0, -1, -1, OCT_VERTEX.LBD, OCT_VERTEX.RBD), // 0\r\n\t/**\r\n\t * RIGHT DOWN, Direction X,Y,Z: 1, 0, -1\r\n\t */\r\n\tRD(1, 0, -1, OCT_VERTEX.RBD, OCT_VERTEX.RFD), // 1\r\n\t/**\r\n\t * FRONT DOWN...
import java.util.ArrayList; import java.util.HashMap; import oct.enums.OCT_EDGE; import oct.enums.OCT_ENUM; import oct.enums.OCT_FACE; import oct.enums.OCT_VERTEX; import oct.math.OctFunction; import oct.octree.OctNode; import oct.octree.OctOctree; import oct.octree.OctRST; import oct.octree.OctXYZ; import p...
package oct.polygonization; public class OctDualMasspointQuad extends OctPoly { private PApplet p5; private OctOctree myOctree; public OctMesh octMesh; private OctXYZ[] vertexList; private float nodeSizeX; private float nodeSizeY; private float nodeSizeZ; private OctFunction myFunction; ...
for (OCT_EDGE e : OCT_EDGE.values()) {
0
tang-jie/AvatarMQ
src/com/newlandframework/avatarmq/broker/AckPullMessageController.java
[ "public class ProducerAckMessage extends BaseMessage implements Serializable {\n\n private String ack;\n private int status;\n private String msgId;\n\n public String getAck() {\n return ack;\n }\n\n public void setAck(String ack) {\n this.ack = ack;\n }\n\n public int getStatu...
import com.newlandframework.avatarmq.msg.ProducerAckMessage; import com.newlandframework.avatarmq.core.AckTaskQueue; import com.newlandframework.avatarmq.core.ChannelCache; import com.newlandframework.avatarmq.core.MessageSystemConfig; import com.newlandframework.avatarmq.core.SemaphoreCache; import com.newlandframewor...
/** * Copyright (C) 2016 Newland Group Holding Limited * * 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...
SemaphoreCache.acquire(MessageSystemConfig.AckTaskSemaphoreValue);
4
jochen777/jFormchecker
src/main/java/de/jformchecker/elements/DateInputSelectCompound.java
[ "public interface FormCheckerElement {\n\n\t// RFE: check, if some methods can be protected\n\n\t// get internal name of this input-element\n\tpublic String getName();\n\t\n\t// set internal name\n\tpublic void setName(String name);\n\n\n\t// get the value that the user entered\n\tpublic String getValue();\n\n\t// ...
import java.time.DateTimeException; import java.time.LocalDate; import java.time.ZoneId; import java.util.Date; import java.util.Map; import de.jformchecker.FormCheckerElement; import de.jformchecker.StringUtils; import de.jformchecker.TagAttributes; import de.jformchecker.criteria.ValidationResult; import de.jformchec...
package de.jformchecker.elements; // DateInput Compound Element offering the date-inputs as select-boxes // TODO: allow individual order (for internationalisation) public class DateInputSelectCompound extends AbstractInput<DateInputSelectCompound> implements FormCheckerElement { SelectInput day; SelectInput ...
CommonSelects commonSelects = new CommonSelects(messageSource);
4
neoremind/navi-pbrpc
src/test/java/com/baidu/beidou/navi/pbrpc/it/ComplicatedResponsePbrpcClientTest.java
[ "public class PbrpcClientFactory {\n\n /**\n * 获取短连接调用客户端\n * \n * @param ip\n * 远程服务ip\n * @param port\n * 远程服务端口\n * @return SimplePbrpcClient\n */\n public static SimplePbrpcClient buildShortLiveConnection(String ip, int port) {\n return buildSho...
import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; import org.junit.Test; import com.baidu.beidou.navi.pbrpc.client.PbrpcClientFactory; import com.baidu.beidou.navi.pbrpc.client.callback.CallFuture; import com.baidu.beidou.navi.pbrpc.demo.proto.Demo.DemoBatchRequest; import com.baidu.bei...
package com.baidu.beidou.navi.pbrpc.it; public class ComplicatedResponsePbrpcClientTest extends BaseTest { @Test public void testComplicatedCall() throws Exception { System.out.println("============================"); System.out.println("async call test starts ..."); System.out.prin...
DemoBatchResponse res = null;
3
ReadyTalk/swt-bling
src/main/java/com/readytalk/swt/text/painter/TextPainter.java
[ "public class ColorFactory {\n\n static Map<RGB, Color> colorMap;\n\n static {\n colorMap = new HashMap<RGB, Color>();\n }\n\n // this should use the current display\n public static Color getColor(int red, int green, int blue) {\n return getColor(Display.getCurrent(), red, green, blue);\n }\n\n /**\n ...
import java.util.ArrayList; import java.util.List; import com.readytalk.swt.util.ColorFactory; import com.readytalk.swt.util.FontFactory; import org.eclipse.swt.SWT; import org.eclipse.swt.events.MouseAdapter; import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.events.MouseMoveListener; import org.eclipse....
package com.readytalk.swt.text.painter; /** * TextPainter is a utility class used to render text onto a Composite within a * given boundary with a call to its handlePaint method. It can render the * following TextTypes: * <p> * <li>TEXT</li> * <li>BOLD</li> * <li>ITALIC</li> * <li>BOLD_AND_ITALIC</li> *...
private Hyperlink activeHyperlink;
2
tianshaojie/jee-universal-bms
web/src/main/java/com/yuzhi/back/web/controller/IndexController.java
[ "public class Resource {\n private Long id;\n\n private Long pid;\n\n private String name;\n\n private String url;\n\n private String icon;\n\n private Integer status;\n\n private Long sort;\n\n private Date createTime;\n\n private Date updateTime;\n\n public Long getId() {\n re...
import com.yuzhi.back.dao.entity.Resource; import com.yuzhi.back.dao.entity.User; import com.yuzhi.back.service.ResourceService; import com.yuzhi.back.service.UserService; import com.yuzhi.back.common.JsonResult; import com.yuzhi.back.common.ResultCode; import com.yuzhi.back.common.Tree; import org.apache.shiro.Securit...
package com.yuzhi.back.web.controller; /** * Created by xuejt on 2015/4/3. */ @Controller @RequestMapping(value = "/") public class IndexController { @javax.annotation.Resource UserService userService; @javax.annotation.Resource ResourceService resourceService; @RequestMapping(value = "v1/api...
return new JsonResult(ResultCode.SUCCESS_CODE, ResultCode.SUCCESS_MSG, treeList);
5
aliumujib/Nibo
nibo_library/src/main/java/com/alium/nibo/repo/directions/DirectionFinder.java
[ "public class Distance {\n public String text;\n public int value;\n\n public Distance(String text, int value) {\n this.text = text;\n this.value = value;\n }\n}", "public class Duration {\n public String text;\n public int value;\n\n public Duration(String text, int value) {\n ...
import android.app.Activity; import android.os.AsyncTask; import android.util.Log; import com.alium.nibo.models.Distance; import com.alium.nibo.models.Duration; import com.alium.nibo.models.Route; import com.alium.nibo.repo.contracts.DirectionFinderListener; import com.alium.nibo.utils.NiboConstants; import com.google....
package com.alium.nibo.repo.directions; /** * Created by Abdul-Mujib Aliu on 4/3/2016. */ public class DirectionFinder { private static final String DIRECTION_URL_API = "https://maps.googleapis.com/maps/api/directions/json?"; private String GOOGLE_API_KEY; private Activity activity; private Dire...
List<Route> routes = new ArrayList<Route>();
2
TranquilMarmot/spaceout
src/com/bitwaffle/spaceguts/graphics/gui/menu/PauseMenu.java
[ "public class Entities {\n\t/** player instance */\n\tpublic static Player player;\n\t/** camera instance */\n\tpublic static Camera camera;\n\t/** the skybox */\n\tpublic static Skybox skybox;\n\n\t/** all the current passive entities */\n\tpublic static ArrayList<Entity> passiveEntities = new ArrayList<Entity>(10...
import java.util.Map; import com.bitwaffle.spaceguts.entities.Entities; import com.bitwaffle.spaceguts.graphics.gui.GUI; import com.bitwaffle.spaceguts.graphics.gui.GUIObject; import com.bitwaffle.spaceguts.physics.Physics; import com.bitwaffle.spaceguts.util.menu.MenuPainter; import com.bitwaffle.spaceguts.util.menu.M...
package com.bitwaffle.spaceguts.graphics.gui.menu; /** * The pause menu! * * @author arthurdent * */ public class PauseMenu extends GUIObject { /** whether or not to go back to the main menu on the next update */ public static boolean backToMainMenu = false; private MenuPainter menuPainter; /** * Pau...
menuPainter = new MenuPainter(rawMenu, Style.HORIZONTAL_MENU, -40);
5
iGoodie/TwitchSpawn
src/main/java/net/programmer/igoodie/twitchspawn/tslanguage/action/ForAction.java
[ "public class EventArguments {\n\n public static EventArguments createRandom(String streamerNickname) {\n EventArguments eventArguments = new EventArguments(TSLEventKeyword.randomPair());\n\n eventArguments.streamerNickname = streamerNickname;\n eventArguments.randomize();\n\n return ...
import net.minecraft.server.level.ServerPlayer; import net.programmer.igoodie.twitchspawn.tslanguage.event.EventArguments; import net.programmer.igoodie.twitchspawn.tslanguage.keyword.TSLActionKeyword; import net.programmer.igoodie.twitchspawn.tslanguage.parser.TSLParser; import net.programmer.igoodie.twitchspawn.tslan...
package net.programmer.igoodie.twitchspawn.tslanguage.action; public class ForAction extends TSLAction { private TSLAction action; private String iterationCount; /* * FOR 5 TIMES * SUMMON zombie * ON ... * * Word#0 -> 5 * Word#1 -> TIMES * Word#[2,n) -> <action> ...
public ForAction(List<String> words) throws TSLSyntaxError {
3
brwe/es-token-plugin
src/test/java/org/elasticsearch/ml/factories/VectorizerPMMLSingleNodeTests.java
[ "public interface DataSource {\n /**\n * Returns a list of values for the given field\n */\n <T> List<T> getValues(String field);\n\n /**\n * Returns an array of 0s and 1s. 1 if the corresponding term in the terms array is present in the field and 0 otherwise.\n */\n double[] getOccurren...
import org.dmg.pmml.PMML; import org.elasticsearch.ml.modelinput.DataSource; import org.elasticsearch.ml.modelinput.MockDataSource; import org.elasticsearch.ml.modelinput.ModelInputEvaluator; import org.elasticsearch.ml.modelinput.SparseVectorModelInput; import org.elasticsearch.ml.modelinput.VectorModelInput; import o...
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this fi...
ModelAndModelInputEvaluator<SparseVectorModelInput, String> fieldsToVectorAndModel = parser.buildFromPMML(pmml, 0);
3
gigabytedevelopers/CalcMate
app/src/main/java/com/gigabytedevelopersinc/app/calculator/EventListener.java
[ "public enum Mode {\n BINARY(0), DECIMAL(1), HEXADECIMAL(2);\n\n int quickSerializable;\n\n Mode(int num) {\n this.quickSerializable = num;\n }\n\n public int getQuickSerializable() {\n return quickSerializable;\n }\n}", "public enum Panel {\n GRAPH, FUNCTION, HEX, BASIC, ADVANC...
import android.content.Context; import android.support.v4.view.ViewPager; import android.view.KeyEvent; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import com.gigabytedevelopersinc.app.calculator.BaseModule.Mode; im...
void setHandler(Context context, Logic handler, ViewPager pager) { setHandler(context, handler, pager, null, null); } void setHandler(Context context, Logic handler, ViewPager smallPager, ViewPager largePager) { setHandler(context, handler, null, smallPager, largePager); } private ...
mHandler.insert(MatrixTransposeView.PATTERN);
4
850759383/ZhihuDailyNews
app/src/main/java/com/yininghuang/zhihudailynews/detail/ZhihuNewsDetailActivity.java
[ "abstract public class BaseActivity extends AppCompatActivity {\n\n public static final int DARK_THEME = 0;\n public static final int LIGHT_THEME = 1;\n\n @Override\n protected void onResume() {\n super.onResume();\n if ((getThemeId() == DARK_THEME && !UserSettingConstants.DARK_THEME) || (...
import android.os.Bundle; import android.support.annotation.Nullable; import com.yininghuang.zhihudailynews.BaseActivity; import com.yininghuang.zhihudailynews.R; import com.yininghuang.zhihudailynews.net.Api; import com.yininghuang.zhihudailynews.net.RetrofitHelper; import com.yininghuang.zhihudailynews.net.ZhihuDaily...
package com.yininghuang.zhihudailynews.detail; /** * Created by Yining Huang on 2016/10/18. */ public class ZhihuNewsDetailActivity extends BaseActivity { private static final int LIGHT_THEME = R.style.AppTheme_NoActionBar_TranslucentStatusBar; private static final int DARK_THEME = R.style.AppThemeDark_N...
if (UserSettingConstants.DARK_THEME)
4
w-shackleton/droidpad-android
src/uk/digitalsquid/droidpad/layout/JsonDecoder.java
[ "public interface LogTag {\n\tstatic final String TAG = \"droidpad\";\n}", "public class Button extends Item {\n\tprivate static final long serialVersionUID = -7921469580817352801L;\n\t\n\tpublic final String text;\n\tpublic final int textSize;\r\n\t\r\n\tprivate boolean resetButton;\r\n\t\n\tprotected boolean tm...
import uk.digitalsquid.droidpad.buttons.Slider; import uk.digitalsquid.droidpad.buttons.ToggleButton; import uk.digitalsquid.droidpad.buttons.TouchPanel; import java.io.IOException; import java.io.Reader; import java.util.Locale; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObje...
/* This file is part of DroidPad. * * DroidPad 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. * * DroidPad is dist...
Orientation orientation = Orientation.Both;
5
thomas-kendall/trivia-microservices
trivia-user-management-service/src/main/java/trivia/usermanagement/service/UserManagementService.java
[ "public class RoleDTO {\n\tpublic int id;\n\tpublic String name;\n\n\tpublic RoleDTO() {\n\t}\n\n\tpublic RoleDTO(int id, String name) {\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t}\n\n\tpublic RoleDTO(String name) {\n\t\tthis.name = name;\n\t}\n}", "public class UserDTO {\n\tpublic int id;\n\tpublic String ema...
import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Set; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import trivia.use...
package trivia.usermanagement.service; @Service @Transactional public class UserManagementService { @Autowired private RoleRepository roleRepository; @Autowired private UserRepository userRepository; public UserDTO authenticateUser(String email, String password) { UserDTO userDTO = null; User user = use...
private Collection<RoleDTO> convertRolesToRoleDTOs(Collection<Role> roles) {
2
VernonLee/Theogony
app/src/main/java/com/nodlee/theogony/ui/activity/ChampionListActivity.java
[ "public class App extends Application {\n\n public static final String META_DATA_APP_KEY = \"app_key\";\n\n @Override\n public void onCreate() {\n super.onCreate();\n RealmProvider.getInstance().init(this);\n }\n}", "public class DragonDataWatcher extends AsyncTask<String, Void, Void> {\...
import android.content.Intent; import android.content.res.Resources; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.design.widget.NavigationView; import android.support.design.widget.TabLayout; import android.support.v4.view.GravityCompat; import android.support.v4.view.Men...
package com.nodlee.theogony.ui.activity; /** * 作者:nodlee * 时间:16/8/1 * 说明:英雄列表,单元格以缩略图+文字显示 */ public class ChampionListActivity extends BaseActivity implements NavigationView.OnNavigationItemSelectedListener { @BindView(R.id.drawer_layout) DrawerLayout mDrawerLayout; @BindView(R.id.navigation_view...
ViewPagerWithTitleAdapter adapter = new ViewPagerWithTitleAdapter(getSupportFragmentManager());
2
rhritz/kyberia-haiku
app/models/feeds/LocationHistory.java
[ "@Entity(\"Feed\")\npublic class Feed extends MongoEntity{\n\n public static DBCollection dbcol = null;\n private static final String key = \"feed_\";\n\n protected String name;\n protected ObjectId owner;\n protected List<ObjectId> nodes;\n protected Int...
import com.mongodb.BasicDBObject; import com.mongodb.DBCursor; import java.util.List; import java.util.Map; import play.Logger; import play.mvc.Http.Request; import play.mvc.Scope.RenderArgs; import play.mvc.Scope.Session; import models.Feed; import models.Page; import models.User; import models.UserLocation; import pl...
/* Kyberia Haiku - advanced community web application Copyright (C) 2010 Robert Hritz 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, o...
r = MongoDB.transform(iobj, MongoDB.getSelf().toUserLocation());
4
sromku/bugsnag-eclipse-plugin
Bugsnag Plugin/src/com/sromku/bugsnag/views/ProjectsView.java
[ "public class Api {\n\n\tprivate static final String BASE_URL = \"https://api.bugsnag.com/\";\n\tprivate static Api instance = null;\n\t\n\tprivate Api() {\n\t}\n\n\tpublic static Api getInstance() {\n\t\tif (instance == null) {\n\t\t\tinstance = new Api();\n\t\t}\n\t\treturn instance;\n\t}\n\n\tpublic Account getA...
import java.util.List; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.viewer...
package com.sromku.bugsnag.views; /** * Composite view which holds table of bugsnag accounts and projects + options * to manage them. * * @author sromku */ public class ProjectsView extends Composite { private TreeViewer treeViewer; private Button removeButton; private Button editButton; ...
List<Account> values = PreferencesManager.getAccounts();
2
ozimov/cirneco
hamcrest/guava-hamcrest-matchers/src/main/java/it/ozimov/cirneco/hamcrest/guava/GuavaMatchers.java
[ "public class IsEmptyGuavaOptional extends TypeSafeMatcher<Optional> {\n\n /**\n * Creates a matcher that matches when the examined {@linkplain Optional} contains no object.\n */\n public static Matcher<Optional> emptyGuavaOptional() {\n return new IsEmptyGuavaOptional();\n }\n\n @Overrid...
import com.google.common.base.Equivalence; import com.google.common.base.Optional; import com.google.common.collect.Multimap; import com.google.common.collect.Multiset; import it.ozimov.cirneco.hamcrest.guava.base.IsEmptyGuavaOptional; import it.ozimov.cirneco.hamcrest.guava.base.IsEquivalent; import it.ozimov.cirneco....
package it.ozimov.cirneco.hamcrest.guava; /** * The {@code GuavaMatchers} class groups all the matchers introduced by Cirneco's Hamcrest extension for <a * href="https://github.com/google/guava">Google Guava library</a>. Suggested use would be to import all the static * methods of this class in a unit test. * *...
return IsMultisetElementWithCount.elementWithCount(element, size);
5
jeasonlzy/okhttp-OkGo
okserver/src/main/java/com/lzy/okserver/upload/UploadTask.java
[ "public class UploadManager extends BaseDao<Progress> {\n\n private UploadManager() {\n super(new DBHelper());\n }\n\n public static UploadManager getInstance() {\n return UploadManagerHolder.instance;\n }\n\n private static class UploadManagerHolder {\n private static final Uplo...
import java.util.concurrent.ThreadPoolExecutor; import okhttp3.Call; import android.content.ContentValues; import com.lzy.okgo.db.UploadManager; import com.lzy.okgo.model.Progress; import com.lzy.okgo.model.Response; import com.lzy.okgo.request.base.ProgressRequestBody; import com.lzy.okgo.request.base.Request; import ...
/* * Copyright 2016 jeasonlzy(廖子尧) * * 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...
UploadManager.getInstance().replace(progress);
0
underhilllabs/dccsched
src/com/underhilllabs/dccsched/io/RemoteSpeakersHandler.java
[ "public static long queryItemUpdated(Uri uri, ContentResolver resolver) {\n final String[] projection = { SyncColumns.UPDATED };\n final Cursor cursor = resolver.query(uri, projection, null, null, null);\n try {\n if (cursor.moveToFirst()) {\n return cursor.getLong(0);\n } else {\n...
import android.content.ContentProviderOperation; import android.content.ContentResolver; import android.net.Uri; import android.util.Log; import java.io.IOException; import java.util.ArrayList; import static com.underhilllabs.dccsched.util.ParserUtils.queryItemUpdated; import static com.underhilllabs.dccsched.util.Pars...
/* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
final SpreadsheetEntry entry = SpreadsheetEntry.fromParser(parser);
6
Expugn/S-argo
src/main/java/io/github/spugn/Sargo/Functions/Profile.java
[ "public class CommandManager\n{\n private final CommandLine COMMAND_LINE;\n private final Message MESSAGE;\n private final String userDiscordID;\n\n public CommandManager(Message message)\n {\n this.MESSAGE = message;\n\n if (message.getAuthor().isPresent())\n {\n user...
import discord4j.core.object.entity.Member; import discord4j.core.object.entity.Message; import discord4j.core.object.entity.TextChannel; import discord4j.core.object.util.Snowflake; import discord4j.core.spec.EmbedCreateSpec; import io.github.spugn.Sargo.Managers.CommandManager; import io.github.spugn.Sargo.Objects.*;...
package io.github.spugn.Sargo.Functions; /** * PROFILE * <p> * Displays a user's statistics from scouting. * </p> * * @author S'pugn * @version 2.0 * @since v1.0 */ public class Profile { //private static IChannel CHANNEL; private String DISCORD_ID; private TextChannel CHANNEL; //priva...
s.setThumbnail(new GitHubImage("images/System/Profile_Icon.png").getURL());
3
dschadow/ApplicationIntrusionDetection
duke-encounters/src/main/java/de/dominikschadow/dukeencounters/account/AccountController.java
[ "@Entity\n@Table(name = \"confirmations\")\n@Data\npublic class Confirmation {\n @Id\n @GeneratedValue\n private long id;\n @ManyToOne\n @JoinColumn(name = \"user_id\", nullable = false)\n private DukeEncountersUser user;\n @ManyToOne(fetch = FetchType.LAZY)\n @JoinColumn(name = \"encounter_...
import de.dominikschadow.dukeencounters.confirmation.Confirmation; import de.dominikschadow.dukeencounters.confirmation.ConfirmationService; import de.dominikschadow.dukeencounters.encounter.DukeEncountersUser; import de.dominikschadow.dukeencounters.encounter.Encounter; import de.dominikschadow.dukeencounters.encounte...
/* * Copyright (C) 2016 Dominik Schadow, dominikschadow@gmail.com * * This file is part of the Application Intrusion Detection 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 ...
private final EncounterService encounterService;
4
docbleach/DocBleach
module/module-office/src/main/java/xyz/docbleach/module/ole2/SummaryInformationSanitiser.java
[ "public class BleachSession implements Serializable {\n\n private static final Logger LOGGER = LoggerFactory.getLogger(BleachSession.class);\n private static final int MAX_ONGOING_TASKS = 10;\n private final transient Bleach bleach;\n private final Collection<Threat> threats = new ArrayList<>();\n /**\n * Co...
import java.io.IOException; import org.apache.poi.hpsf.NoPropertySetStreamException; import org.apache.poi.hpsf.PropertySet; import org.apache.poi.hpsf.SummaryInformation; import org.apache.poi.hpsf.UnexpectedPropertySetTypeException; import org.apache.poi.poifs.filesystem.DocumentEntry; import org.apache.poi.poifs.fil...
package xyz.docbleach.module.ole2; public class SummaryInformationSanitiser extends EntryFilter { private static final Logger LOGGER = LoggerFactory.getLogger(SummaryInformationSanitiser.class); private static final String NORMAL_TEMPLATE = "Normal.dotm"; public SummaryInformationSanitiser(BleachSession sessi...
.severity(ThreatSeverity.LOW)
3
GoogleCloudPlatform/healthcare-api-dicom-fuse
src/main/java/com/google/dicomwebfuse/dao/spec/InstancesPathBuilder.java
[ "public static final String DATASETS = \"/datasets/\";", "public static final String DICOM_STORES = \"/dicomStores/\";", "public static final String DICOM_WEB = \"/dicomWeb\";", "public static final String INSTANCES = \"/instances/\";", "public static final String LOCATIONS = \"/locations/\";", "public st...
import static com.google.dicomwebfuse.dao.Constants.DATASETS; import static com.google.dicomwebfuse.dao.Constants.DICOM_STORES; import static com.google.dicomwebfuse.dao.Constants.DICOM_WEB; import static com.google.dicomwebfuse.dao.Constants.INSTANCES; import static com.google.dicomwebfuse.dao.Constants.LOCATIONS; imp...
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
dicomStoreId + DICOM_WEB + STUDIES + studyId + SERIES + seriesId + INSTANCES;
3
ToroCraft/NemesisSystem
src/main/java/net/torocraft/nemesissystem/handlers/DiscoveryHandler.java
[ "public class NemesisConfig {\n\n\tprivate static final String CATEGORY = \"NemesisSystem Settings\";\n\tprivate static Configuration config;\n\tprivate static final String[] DEFAULT_MOB_LIST = {\n\t\t\t\"minecraft:zombie\",\n\t\t\t\"minecraft:zombie_pigman\",\n\t\t\t\"minecraft:zombie_villager\",\n\t\t\t\"minecraf...
import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.util.text.TextComponentString; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickItem; import net.minecraftforge.fml.common.eventhandler...
package net.torocraft.nemesissystem.handlers; public class DiscoveryHandler { public static void init() { MinecraftForge.EVENT_BUS.register(new DiscoveryHandler()); } @SubscribeEvent public void readBook(RightClickItem event) { if (event.getWorld().isRemote) { return; } ItemStack item = event.getIt...
NemesisSystem.NETWORK.sendTo(new MessageOpenNemesisDetailsGui(nemesis, knowledge), (EntityPlayerMP) event.getEntityPlayer());
5
simo415/spc
src/com/sijobe/spc/worldedit/WorldEditCommandSet.java
[ "public abstract class MultipleCommands extends CommandBase {\n\n /**\n * The name of the command \n */\n private final String name;\n \n /**\n * Default constructor initialises the instance using the specified command \n * name. \n * \n * @param name - The command name\n */\n public ...
import com.sijobe.spc.command.MultipleCommands; import com.sijobe.spc.core.IHook; import com.sijobe.spc.util.WorldEditCUIHelper; import com.sijobe.spc.wrapper.CommandSender; import com.sijobe.spc.wrapper.Coordinate; import com.sijobe.spc.wrapper.MinecraftServer; import com.sijobe.spc.wrapper.Player; import java.util.Li...
package com.sijobe.spc.worldedit; /** * The class that provides connection to WorldEdit. * * @author simo_415 * @version 1.2 */ public class WorldEditCommandSet extends MultipleCommands { /*static { DynamicClassLoader.addFile(new File(Minecraft.getMinecraftDirectory(),"bin/WorldEdit.jar")); }*/ ...
public void execute(CommandSender sender, List<?> params) {
3
SQiShER/java-object-diff
src/integration-test/java/de/danielbechler/diff/example/gettingstarted/GettingStarted.java
[ "public class ObjectDiffer\n{\n\tprivate final DifferDispatcher dispatcher;\n\n\tpublic ObjectDiffer(final DifferDispatcher differDispatcher)\n\t{\n\t\tthis.dispatcher = differDispatcher;\n\t}\n\n\t/**\n\t * Recursively inspects the given objects and returns a node representing their differences. Both objects\n\t *...
import de.danielbechler.diff.ObjectDiffer; import de.danielbechler.diff.ObjectDifferBuilder; import de.danielbechler.diff.example.phonebook.Contact; import de.danielbechler.diff.example.phonebook.PhoneBook; import de.danielbechler.diff.example.phonebook.PhoneNumber; import de.danielbechler.diff.node.DiffNode; import de...
/* * Copyright 2014 Daniel Bechler * * 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 i...
walterWhite.setPhoneNumber("Home", new PhoneNumber("1", "505", "316-7871"));
3
kevalpatel2106/smart-lens
app/src/main/java/com/kevalpatel2106/smartlens/infopage/InfoActivity.java
[ "@SuppressLint(\"Registered\")\npublic class BaseActivity extends AppCompatActivity {\n private CompositeDisposable mCompositeDisposable = new CompositeDisposable();\n\n @Override\n public void setContentView(@LayoutRes int layoutResID) {\n super.setContentView(layoutResID);\n\n //Bind butter...
import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.ActivityOptionsCompat; import android.support.v4.app.Fragment; import android.support.v7.widget.LinearLayoutManager; ...
/* * Copyright 2017 Keval Patel. * * 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 ...
WikiHelper mWikiRetrofitHelper;
3
ivannov/predcomposer
src/test/java/com/nosoftskills/predcomposer/game/GamesServiceTest.java
[ "public abstract class BaseServiceTest {\n\n protected static EntityManager entityManager;\n\n @BeforeClass\n public static void setupTestObjects() {\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"predcomposer-test\");\n entityManager = emf.createEntityManager();\n }...
import com.nosoftskills.predcomposer.common.BaseServiceTest; import com.nosoftskills.predcomposer.model.Game; import org.junit.Test; import java.time.LocalDateTime; import static com.nosoftskills.predcomposer.common.TestData.competition; import static com.nosoftskills.predcomposer.common.TestData.game1; import static c...
package com.nosoftskills.predcomposer.game; /** * @author Ivan St. Ivanov */ public class GamesServiceTest extends BaseServiceTest { private GamesService gamesService; @Override protected void setupClassUnderTest() { this.gamesService = new GamesService(); this.gamesService.entityMan...
boolean locked = game2.isLocked();
4
IRIT-SMAC/agent-tooling
avt/src/main/java/fr/irit/smac/libs/tooling/avt/impl/StandardAVT.java
[ "public enum EFeedback {\n GREATER {\n @Override\n public String toString() {\n return \"+\";\n }\n },\n LOWER {\n @Override\n public String toString() {\n return \"-\";\n }\n },\n GOOD {\n @Override\n public String toStrin...
import fr.irit.smac.libs.tooling.avt.EFeedback; import fr.irit.smac.libs.tooling.avt.EMessageException; import fr.irit.smac.libs.tooling.avt.IAdvancedAVT; import fr.irit.smac.libs.tooling.avt.deltamanager.IDeltaManager; import fr.irit.smac.libs.tooling.avt.deltamanager.IDeltaManager.EDirection; import fr.irit.smac.libs...
} return criticity; } /** * Sets the criticity. * * @param criticity * the new criticity * @throws IllegalArgumentException * if value > 1 or value < 0 */ @Override public void setCriticity(double criticity) { if (Double...
protected EDirection getDirectionFromFreedback(EFeedback feedback) {
4
uncodecn/uncode-dal-all
uncode-dal/src/main/java/cn/uncode/dal/jdbc/template/AbstractTemplate.java
[ "public class Criterion {\n \n private String column;\n \n private Condition condition;\n \n private Object value;\n\n private Object secondValue;\n\n private boolean noValue;\n\n private boolean singleValue;\n\n private boolean betweenValue;\n\n private boolean listValue;\n\n pr...
import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import cn.uncode.dal.criteria.Cr...
package cn.uncode.dal.jdbc.template; public abstract class AbstractTemplate { private static final Logger LOG = LoggerFactory.getLogger(AbstractTemplate.class); /** * 根据查询条件成生sql * @param sql sql * @param model table */ protected String caculationQueryCriteria(SQL sql, Table mo...
List<Criterion> criterions = criteria.getCriteria();
0
ibrdtn/ibrdtn-android-library
library/src/main/java/de/tubs/ibr/dtn/streaming/DtnStreamTransmitter.java
[ "public class Bundle implements Parcelable {\n\tprivate EID destination = null;\n\tprivate SingletonEndpoint source = null;\n\tprivate SingletonEndpoint custodian = null;\n\tprivate SingletonEndpoint reportto = null;\n\tprivate Long lifetime = null;\n\tprivate Timestamp timestamp = null;\n\tprivate Long sequencenum...
import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.IOException; import java.util.LinkedList; import java.util.Queue; import java.util.UUID; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.ScheduledExecutorService; import java.util...
package de.tubs.ibr.dtn.streaming; public class DtnStreamTransmitter { private static final String TAG = "DtnOutputStream";
private BundleID mPrevAckedId = null;
2
vanniktech/espresso-utils
espresso-core-utils/src/androidTest/java/com/vanniktech/espresso/core/utils/AttributeMatcherTest.java
[ "@CheckResult public static AttributeMatcher withAttr(@AttrRes final int attr, @ColorInt final int color) {\n return new AttributeMatcher(attr, null, ColorChecker.from(color));\n}", "@CheckResult public static AttributeMatcher withAttrRes(@AttrRes final int attr, @ColorRes final int colorRes) {\n return new Att...
import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.rule.ActivityTestRule; import com.vanniktech.espresso.core.utils.test.R; import junit.framework.AssertionFailedError; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import...
package com.vanniktech.espresso.core.utils; @RunWith(AndroidJUnit4.class) public final class AttributeMatcherTest { @Rule public final ExpectedException expectedException = ExpectedException.none(); @Rule public final ActivityTestRule<AttributeMatcherActivity> activityTestRule = new ActivityTestRule<>(Attribute...
onView(withId(VIEW_ID)).check(matches(withAttr(R.attr.colorError, BLUE)));
0
zznate/intravert-ug
src/main/java/io/teknek/intravert/action/impl/GetKeyspaceAction.java
[ "public interface Action {\n void doAction(Operation operation, Response response, RequestContext request, ApplicationContext application);\n}", "public class Constants {\n public static final String STATUS = \"status\";\n public static final String OK = \"ok\";\n public static final String SESSION_ID = \"ses...
import java.util.Arrays; import java.util.HashMap; import java.util.Map; import io.teknek.intravert.action.Action; import io.teknek.intravert.model.Constants; import io.teknek.intravert.model.Operation; import io.teknek.intravert.model.Response; import io.teknek.intravert.service.ApplicationContext; import io.teknek.in...
package io.teknek.intravert.action.impl; public class GetKeyspaceAction implements Action { @Override
public void doAction(Operation operator, Response response, RequestContext request,
5
palominolabs/benchpress
worker-core/src/test/java/com/palominolabs/benchpress/worker/WorkerAdvertiserTest.java
[ "public interface ZookeeperConfig {\n @Config(\"benchpress.zookeeper.client.connection-string\")\n @Default(\"127.0.0.1:2281\")\n String getConnectionString();\n\n @Config(\"benchpress.zookeeper.path\")\n @Default(\"/benchpress\")\n String getBasePath();\n\n @Config(\"benchpress.zookeeper.worke...
import com.fasterxml.jackson.core.type.TypeReference; import com.google.common.io.Closeables; import com.google.inject.AbstractModule; import com.google.inject.Guice; import com.google.inject.Inject; import com.google.inject.Injector; import com.palominolabs.benchpress.config.ZookeeperConfig; import com.palominolabs.be...
package com.palominolabs.benchpress.worker; public final class WorkerAdvertiserTest { @Inject private WorkerAdvertiser workerAdvertiser; @Inject
private ZookeeperConfig zookeeperConfig;
0
creativetrendsapps/SimplicityBrowser
app/src/main/java/com/creativetrends/app/simplicity/activities/BookmarksActivity.java
[ "public class AdapterBookmarks extends RecyclerView.Adapter<AdapterBookmarks.ViewHolderBookmark> implements TouchHelperAdapter {\n @SuppressLint(\"StaticFieldLeak\")\n private static AdapterBookmarks adapter;\n private Context context;\n private LayoutInflater layoutInflater;\n private ArrayList<Book...
import android.annotation.SuppressLint; import android.content.SharedPreferences; import android.content.res.Configuration; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; import android.os.Environment; import android.preference.Preference...
package com.creativetrends.app.simplicity.activities; /** * Created by Creative Trends Apps. */ public class BookmarksActivity extends BaseActivity implements AdapterBookmarks.onBookmarkSelected, OnStartDragListener, SearchView.OnQueryTextListener { @SuppressLint("StaticFieldLeak") public static Adapter...
if (TabManager.getList() != null) {
5
criticalmaps/criticalmaps-android
app/src/main/java/de/stephanlindauer/criticalmaps/Main.java
[ "@Singleton\npublic class PermissionCheckHandler {\n private Activity activity;\n private PermissionRequest activePermissionRequest;\n\n @Inject\n @SuppressWarnings(\"WeakerAccess\")\n public PermissionCheckHandler() {\n }\n\n public void attachActivity(Activity activity) {\n Timber.d(\"...
import android.animation.ArgbEvaluator; import android.animation.ValueAnimator; import android.annotation.TargetApi; import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.drawable.GradientDrawable; import android.net.Uri; import android.os.Build; i...
package de.stephanlindauer.criticalmaps; public class Main extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener { private final static String KEY_NAV_ID = "main_navid"; private final static String KEY_SAVED_FRAGMENT_STATES = "main_savedfragmentstate"; private final s...
ServerSyncService.startService();
4
lob/lob-java
src/main/java/com/lob/model/SelfMailer.java
[ "public class APIException extends LobException {\n\n private static final long serialVersionUID = 1L;\n\n @JsonCreator\n public APIException(@JsonProperty(\"error\") final Map<String, Object> error) {\n super((String)error.get(\"message\"), (Integer)error.get(\"status_code\"));\n }\n\n}", "pub...
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.lob.exception.APIException; import com.lob.exception.AuthenticationException; import com.lo...
", description='" + description + '\'' + ", to=" + to + ", from=" + from + ", url='" + url + '\'' + ", outsideTemplateId='" + outsideTemplateId + '\'' + ", insideTemplateId='" + insideTemplateId + '\'' + ", o...
public LobResponse<SelfMailer> create() throws APIException, IOException, AuthenticationException, InvalidRequestException, RateLimitException {
6
games647/LagMonitor
src/main/java/com/github/games647/lagmonitor/task/PingManager.java
[ "public class PaperPing implements PingFetcher {\n\n @Override\n public boolean isAvailable() {\n try {\n //Only available in Paper\n Player.Spigot.class.getDeclaredMethod(\"getPing\");\n return true;\n } catch (NoSuchMethodException noSuchMethodEx) {\n ...
import com.github.games647.lagmonitor.ping.PaperPing; import com.github.games647.lagmonitor.ping.PingFetcher; import com.github.games647.lagmonitor.ping.ReflectionPing; import com.github.games647.lagmonitor.ping.SpigotPing; import com.github.games647.lagmonitor.util.RollingOverHistory; import com.google.common.collect....
package com.github.games647.lagmonitor.task; public class PingManager implements Runnable, Listener { //the server is pinging the client every 40 Ticks (2 sec) - so check it then //https://github.com/bergerkiller/CraftSource/blob/master/net.minecraft.server/PlayerConnection.java#L178 public static fina...
SpigotPing.class, PaperPing.class, ReflectionPing.class
0
chedim/minedriod
src/main/java/com/onkiup/minedroid/gui/views/ScrollView.java
[ "public interface Context {\n /**\n * @return Context id\n */\n int contextId();\n\n}", "@SideOnly(Side.CLIENT)\npublic class GuiManager {\n /**\n * Current MineDroid theme\n */\n public static HashMap<Integer, Style> themes = new HashMap<Integer, Style>();\n\n /**\n * Minecraft...
import com.onkiup.minedroid.Context; import com.onkiup.minedroid.gui.GuiManager; import com.onkiup.minedroid.gui.Overlay; import com.onkiup.minedroid.gui.XmlHelper; import com.onkiup.minedroid.gui.drawables.Drawable; import com.onkiup.minedroid.gui.events.MouseEvent; import com.onkiup.minedroid.gui.primitives.Point; im...
package com.onkiup.minedroid.gui.views; /** * Allows to scroll big views */ public class ScrollView extends ContentView { protected View child; protected Point scroll = new Point(0, 0); protected Drawable scrollDrawable; public ScrollView(Context context) { super(context);
ResourceLocation rl = GuiManager.getTheme(context).getStyle("scroll_view").getResource("scrollbar_drawable", null);
1
monkeyk/oauth2-shiro
authz/src/main/java/com/monkeyk/os/oauth/token/AuthorizationCodeTokenHandler.java
[ "public class AccessToken extends AbstractDomain {\n private static final long serialVersionUID = 7336709167855003668L;\n\n\n public static final String BEARER_TYPE = \"Bearer\";\n\n\n /**\n * 默认的 refresh_token 的有效时长: 30天\n */\n public final static int REFRESH_TOKEN_VALIDITY_SECONDS = 60 * 60 * ...
import com.monkeyk.os.domain.oauth.AccessToken; import com.monkeyk.os.web.WebUtils; import com.monkeyk.os.oauth.OAuthTokenxRequest; import com.monkeyk.os.oauth.validator.AbstractClientDetailsValidator; import com.monkeyk.os.oauth.validator.AuthorizationCodeClientDetailsValidator; import org.apache.oltu.oauth2.common.ex...
/* * Copyright (c) 2013 Andaily Information Technology Co. Ltd * www.andaily.com * All rights reserved. * * This software is the confidential and proprietary information of * Andaily Information Technology Co. Ltd ("Confidential Information"). * You shall not disclose such Confidential Information and shall use ...
AccessToken accessToken = oauthService.retrieveAuthorizationCodeAccessToken(clientDetails(), tokenRequest.getCode());
0
Expugn/S-argo
src/main/java/io/github/spugn/Sargo/Functions/BannerInfo.java
[ "public class CommandManager\n{\n private final CommandLine COMMAND_LINE;\n private final Message MESSAGE;\n private final String userDiscordID;\n\n public CommandManager(Message message)\n {\n this.MESSAGE = message;\n\n if (message.getAuthor().isPresent())\n {\n user...
import discord4j.core.object.entity.Message; import discord4j.core.object.entity.TextChannel; import io.github.spugn.Sargo.Managers.CommandManager; import io.github.spugn.Sargo.Objects.*; import io.github.spugn.Sargo.Objects.Character; import io.github.spugn.Sargo.Sargo; import io.github.spugn.Sargo.Utilities.GitHubIma...
package io.github.spugn.Sargo.Functions; /** * BANNER INFO * <p> * Manages the information in the Embed Messages when * listing available banners or information about a * specific banner. * </p> * * @author S'pugn * @version 2.0 * @since v1.0 * @see BannerListMenu * @see BannerInfoMenu */ pu...
copper = (int) (ScoutSettingsParser.getCopperRate() * 100);
5
tmalaska/hadcom.utils
src/main/java/com/cloudera/sa/hcu/io/route/scheduler/ScheduledDrivenRoute.java
[ "public class HeartBeatConsoleOutputListener implements PutListener\n{\n\tint waitMS;\n\tlong timePostedMS;\n\tlong lastPosting;\n\tlong numberOfFiles;\n\tpublic HeartBeatConsoleOutputListener(int waitSeconds)\n\t{\n\t\tthis.waitMS = waitSeconds * 1000;\n\t\tthis.timePostedMS = 0;\n\t\t\n\t}\n\n\tpublic void onA100...
import java.io.File; import java.io.IOException; import java.util.Properties; import java.util.Map.Entry; import com.cloudera.sa.hcu.io.put.listener.HeartBeatConsoleOutputListener; import com.cloudera.sa.hcu.io.put.local.reader.AbstractLocalFileColumnReader; import com.cloudera.sa.hcu.io.route.scheduler.thread.InputDir...
package com.cloudera.sa.hcu.io.route.scheduler; public class ScheduledDrivenRoute extends AbstractRoute { public static final String CONF_BATCH_SEND_EVERY_N_MINUTES = ".batch.send.every.n.min"; int internalTimeInMinutes; public ScheduledDrivenRoute(String routeNamePrefix, Properties prop) throws IOException ...
PutExecutionThread putExecuter = new PutExecutionThread(batchDir, putProperties, this, this);
3
fwix/java-gearman
src/org/gearman/WorkerJob.java
[ "abstract static class ConnectionController<K, C extends GearmanCallbackResult> implements GearmanConnectionHandler<Object>, GearmanCallbackHandler<K,C> {\n\tprivate final JobServerPoolAbstract<?> sc;\n\t\t\n\t/** The key mapping to this object in the connMap */\n\tprivate final K key;\n\tprivate ControllerState st...
import org.gearman.JobServerPoolAbstract.ConnectionController; import org.gearman.core.GearmanConnection; import org.gearman.core.GearmanPacket; import org.gearman.core.GearmanPacket.Magic; import org.gearman.util.ByteArray;
package org.gearman; /** * The {@link GearmanJob} implementation for the {@link GearmanFunction} object. It provides * the underlying implementation in sending data back to the client. * * @author isaiah.v */ class WorkerJob extends GearmanJob { private final static byte[] DEFAULT_UID = new byte[]{0}; prot...
conn.sendPacket(GearmanPacket.createWORK_DATA(Magic.REQ, jobHandle.getBytes(), data), null /*TODO*/);
3
heroku/heroku.jar
heroku-api/src/main/java/com/heroku/api/request/key/KeyRemove.java
[ "public class Heroku {\n\n\n public enum Config {\n ENDPOINT(\"HEROKU_HOST\", \"heroku.host\", \"heroku.com\");\n public final String environmentVariable;\n public final String systemProperty;\n public final String defaultValue;\n public final String value;\n\n Config(St...
import com.heroku.api.Heroku; import com.heroku.api.exception.RequestFailedException; import com.heroku.api.http.Http; import com.heroku.api.http.HttpUtil; import com.heroku.api.request.Request; import com.heroku.api.request.RequestConfig; import com.heroku.api.response.Unit; import java.util.Collections; import java.u...
package com.heroku.api.request.key; /** * TODO: Javadoc * * @author James Ward */ public class KeyRemove implements Request<Unit> { // delete("/user/keys/#{escape(key)}").to_s private final RequestConfig config; public KeyRemove(String keyIdOrFingerprint) {
this.config = new RequestConfig().with(Heroku.RequestKey.SSHKey, keyIdOrFingerprint);
0
einsteinsci/betterbeginnings
src/main/java/net/einsteinsci/betterbeginnings/event/BBEventHandler.java
[ "@Mod(modid = ModMain.MODID, version = ModMain.VERSION, name = ModMain.NAME,\n guiFactory = \"net.einsteinsci.betterbeginnings.config.BBConfigGuiFactory\")\npublic class ModMain\n{\n\tpublic static final String MODID = \"betterbeginnings\";\n\tpublic static final String VERSION = \"0.9.8-pre1\";\n\tpublic stati...
import net.einsteinsci.betterbeginnings.ModMain; import net.einsteinsci.betterbeginnings.config.BBConfig; import net.einsteinsci.betterbeginnings.items.ItemCharredMeat; import net.einsteinsci.betterbeginnings.items.ItemFireBow; import net.einsteinsci.betterbeginnings.items.ItemHammer; import net.einsteinsci.betterbegin...
} } } } } @SubscribeEvent public void onBlockDrops(BlockEvent.HarvestDropsEvent e) { Block block = e.state.getBlock(); EntityPlayer player = e.harvester; // All onBlockDrops activity that does not have to do with players must // occur before here. if (player == null) { return; } ...
RegisterAchievements.achievementGet(e.player, "notchApple");
6
mock4aj/mock4aj
mock4aj-core/src/test/java/info/rubico/mock4aj/codegen/cglib/calls/CglibCallWeavingSimulatorTest.java
[ "public interface CallContext {\n\n /**\n * Adds an aspect to the context.\n */\n void withAspect(Class<?> aspectClass);\n\n Weaver getConfiguredWeaver();\n\n void from(Class<?> sourceType);\n\n void from(CallSource source);\n\n CallSource getConfiguredCallSource();\n}", "public class Mo...
import static org.hamcrest.CoreMatchers.*; import static org.junit.Assert.*; import static org.mockito.Matchers.*; import static org.mockito.Mockito.*; import info.rubico.mock4aj.api.calls.CallContext; import info.rubico.mock4aj.api.exceptions.Mock4AjException; import info.rubico.mock4aj.codegen.cglib.calls.caller.Cgli...
package info.rubico.mock4aj.codegen.cglib.calls; public class CglibCallWeavingSimulatorTest { // NOPMD private Date targetMock; private Date targetSelectorMock; private CglibMethodSelectorGenerator targetSelectorGeneratorMock; private CallContext contextMock; private CallerGenerator callerGene...
catch (Mock4AjException exception) {
1
yuqirong/CarManager
src/com/carmanager/services/impl/PermissionServiceImpl.java
[ "@Repository(\"permissionDao\")\npublic class PermissionDaoImpl extends BaseDaoImpl<Permission> {\n\n}", "public class Permission extends BaseEntity{\n\t\n\tprivate static final long serialVersionUID = 5092176352477554939L;\n\tprivate String name; //资源名称\n\tprivate String permission; //权限字符串\n private String u...
import java.util.HashSet; import java.util.Set; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.carmanager.daos.impl.PermissionDaoImpl; import com.carmanager.entities.Permission; import com.carmanager.entities.Role; import com.carmanager.services....
package com.carmanager.services.impl; @Service("permissionService") public class PermissionServiceImpl extends BaseServiceImpl<Permission> implements PermissionService { @Autowired
private PermissionDaoImpl permissionDao;
0
AwaisKing/Linked-Words
app/src/main/java/awais/backworddictionary/TTSActivity.java
[ "public final class TTSItemsAdapter<T> extends RecyclerView.Adapter<TTSItemsAdapter.TTSViewHolder> {\n private final List<TTSItemHolder<T>> list;\n private final View.OnClickListener onClickListener;\n private final Context context;\n private final Resources resources;\n private final LayoutInflater ...
import static android.speech.tts.TextToSpeech.EngineInfo; import static android.speech.tts.TextToSpeech.QUEUE_FLUSH; import static androidx.recyclerview.widget.DividerItemDecoration.VERTICAL; import android.annotation.SuppressLint; import android.content.ContentResolver; import android.content.DialogInterface; import a...
SettingsHelper.setTTSVoice(voiceName); } Main.ttsRefresher.doRefresh(); finishResult(RESULT_OK); } else if (v == btnPlayTest) { Locale language = null; Locale locale; try { locale = VERSION.SDK_INT >=...
private final NumberPickerProgressListener progressListener = (numberPicker, progressValue, isChangeCompleted) -> {
4
PunchThrough/bean-sdk-android
sdk/src/main/java/com/punchthrough/bean/sdk/internal/serial/GattSerialTransportProfile.java
[ "public class BaseProfile {\n\n protected final GattClient mGattClient;\n\n public BaseProfile(GattClient client) {\n this.mGattClient = client;\n }\n\n public String getName() {\n return \"BaseProfile\";\n }\n\n public boolean isReady() {\n return false;\n }\n\n public ...
import android.bluetooth.BluetoothGattCharacteristic; import android.bluetooth.BluetoothGattDescriptor; import android.bluetooth.BluetoothGattService; import android.os.Handler; import android.util.Log; import com.punchthrough.bean.sdk.BuildConfig; import com.punchthrough.bean.sdk.internal.ble.BaseProfile; import com.p...
package com.punchthrough.bean.sdk.internal.serial; /** * Custom BLE profile that allows serial communications */ public class GattSerialTransportProfile extends BaseProfile { protected static final String TAG = "GattSerialXportProfile"; // Constants public static final int PACKET_TX_MAX_PAYLOAD_LEN...
Constants.UUID_SCRATCH_CHAR_1,
5
Lambda-3/DiscourseSimplification
src/main/java/org/lambda3/text/simplification/discourse/runner/discourse_tree/extraction/rules/SubordinationPostPurposeExtractor.java
[ "public enum Relation {\n\n UNKNOWN,\n\n // Coordinations\n UNKNOWN_COORDINATION, // the default for coordination\n CONTRAST,\n CAUSE_C,\n RESULT_C,\n LIST,\n DISJUNCTION,\n TEMPORAL_AFTER_C,\n TEMPORAL_BEFORE_C,\n\n // Subordinations\n UNKNOWN_SUBORDINATION, // the default for s...
import org.lambda3.text.simplification.discourse.utils.parseTree.ParseTreeExtractionUtils; import org.lambda3.text.simplification.discourse.utils.words.WordsUtils; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Optional; import edu.stanford.nlp.ling.Word; import edu.stanfor...
/* * ==========================License-Start============================= * DiscourseSimplification : SubordinationPostEnablementExtractor * * Copyright © 2017 Lambda³ * * GNU General Public License 3 * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General ...
leftConstituentWords.addAll(ParseTreeExtractionUtils.getPrecedingWords(leaf.getParseTree(), matcher.getNode("sbar"), false));
5
maxpowa/AdvancedHUD
src/main/java/advancedhud/client/huditems/HudItemExperienceBar.java
[ "public class HUDRegistry {\n protected static List<HudItem> hudItemList = new ArrayList<HudItem>();\n protected static boolean initialLoadComplete = false;\n protected static List<HudItem> hudItemListActive = new ArrayList<HudItem>();\n\n private static Logger log = LogManager.getLogger(\"AdvancedHUD-A...
import advancedhud.api.Alignment; import advancedhud.api.HUDRegistry; import advancedhud.api.HudItem; import advancedhud.api.RenderAssist; import advancedhud.client.ui.GuiAdvancedHUDConfiguration; import advancedhud.client.ui.GuiScreenHudItem; import advancedhud.client.ui.GuiScreenReposition; import net.minecraft.clien...
package advancedhud.client.huditems; public class HudItemExperienceBar extends HudItem { private float max_xp = 0; private float current_xp = 0; private int current_level = 0; @Override public String getName() { return "experiencebar"; } @Override public String getButtonLabe...
if ((mc.currentScreen instanceof GuiAdvancedHUDConfiguration || mc.currentScreen instanceof GuiScreenReposition) && filled == 0) {
5
nowucca/SimpleAffableBean
src/main/java/viewmodel/admin/AdminOrderViewModel.java
[ "public class Customer {\n\n private long customerId;\n\n private String name;\n\n private String email;\n\n private String phone;\n\n private String address;\n\n private String cityRegion;\n\n private String ccNumber;\n\n public Customer(long customerId, String name, String email,\n ...
import business.customer.Customer; import business.order.CustomerOrder; import business.order.CustomerOrderDetails; import business.order.CustomerOrderLineItem; import business.product.Product; import viewmodel.BaseAdminViewModel; import javax.servlet.http.HttpServletRequest; import java.util.List;
/** * BSD 3-Clause License * * Copyright (C) 2018 Steven Atkinson <steven@nowucca.com> * 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...
private Customer customer;
0
duniter-gchange/gchange-pod
gchange-pod-es-plugin/src/main/java/org/duniter/elasticsearch/gchange/rest/RestModule.java
[ "public class RestMarketLikeAction {\n\n @Inject\n public RestMarketLikeAction(RestLikeGetAction getAction,\n RestLikePostAction postAction) {\n\n getAction.allowLikeIndex(MarketIndexDao.INDEX, MarketRecordDao.TYPE);\n postAction.allowLikeIndex(MarketIndexDao.INDEX...
import org.duniter.elasticsearch.gchange.rest.like.RestMarketLikeAction; import org.duniter.elasticsearch.gchange.rest.market.*; import org.duniter.elasticsearch.gchange.rest.market.search.CustomSearchAction; import org.duniter.elasticsearch.gchange.rest.mixed.RestMixedSearchAction; import org.duniter.elasticsearch.gch...
package org.duniter.elasticsearch.gchange.rest; /* * #%L * duniter4j-elasticsearch-plugin * %% * Copyright (C) 2014 - 2016 EIS * %% * 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, eithe...
bind(CustomSearchAction.class).asEagerSingleton();
1
zaclimon/xipl
tiflibrary/src/androidTest/java/com/google/android/media/tv/companionlibrary/test/TestJobService.java
[ "public final class Channel {\n /** @hide */\n public static final String[] PROJECTION = getProjection();\n\n private static final long INVALID_CHANNEL_ID = -1;\n private static final int INVALID_INTEGER_VALUE = -1;\n private static final int IS_SEARCHABLE = 1;\n\n private long mId;\n private S...
import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import android.content.Context; import android.net.Uri; import androidx.annotation.VisibleForTesting; import com.google.android.media.tv.companionlibrary.mod...
/* * Copyright 2016 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 applica...
InternalProviderData internalProviderData = new InternalProviderData();
1
sladeware/groningen
src/test/java/org/arbeitspferde/groningen/display/DisplayMediatorTest.java
[ "@PipelineScoped\npublic class Pipeline {\n private static final Logger log = Logger.getLogger(Pipeline.class.getCanonicalName());\n\n @Inject\n @NamedConfigParam(\"subjects_to_display\")\n private final Provider<Integer> subjectsToDisplay = new Provider<Integer>() {\n @Override\n public Integer get() {\n...
import org.arbeitspferde.groningen.Pipeline; import org.arbeitspferde.groningen.PipelineId; import org.arbeitspferde.groningen.common.ClockedExperimentDbTestCaseBase; import org.arbeitspferde.groningen.common.EvaluatedSubject; import org.arbeitspferde.groningen.experimentdb.SubjectStateBridge; import org.arbeitspferde....
/* Copyright 2012 Google, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
SubjectStateBridge subject1, subject2;
3
ceaseless-prayer/CeaselessAndroid
app/src/main/java/org/theotech/ceaselessandroid/fragment/PeopleFavoriteSupportFragment.java
[ "public interface PersonManager {\n\n RealmList<Person> getPersonFromPersonPOJO(List<PersonPOJO> people);\n\n void setRealm(Realm realm);\n\n List<PersonPOJO> getNextPeopleToPrayFor(int n) throws AlreadyPrayedForAllContactsException;\n\n List<PersonPOJO> getActivePeople();\n\n List<PersonPOJO> getFav...
import android.content.Context; import android.os.Bundle; import androidx.fragment.app.Fragment; import android.util.SparseBooleanArray; import android.view.ActionMode; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; im...
package org.theotech.ceaselessandroid.fragment; public class PeopleFavoriteSupportFragment extends Fragment implements Refreshable { private static final String TAG = PeopleFavoriteSupportFragment.class.getSimpleName(); @BindView(R.id.people_favorite) ListView peopleFavorite; private PersonMana...
Picasso.with(context).load(CommonUtils.getContactUri(person.getId())).placeholder(R.drawable.placeholder_user).fit().into(holder.personThumbnail);
3
oakesville/mythling
src/com/oakesville/mythling/MusicPlaybackService.java
[ "public class AppSettings {\n private static final String TAG = AppSettings.class.getSimpleName();\n\n public static final String PACKAGE = \"com.oakesville.mythling\";\n public static final String DEVICE_PLAYBACK_CATEGORY_VIDEO = \"device_playback_cat_video\";\n public static final String DEVICE_PLAYBA...
import android.app.Service; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.media.AudioManager; import android.media.AudioManager.OnAudioFocusChangeListener; import android.media.MediaPlayer; import android.media.MediaPlayer.OnCompletionListener; impor...
/** * Copyright 2015 Donald Oakes * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
private AppSettings appSettings;
0